From cbe412488cf3a26fba06c39d1a0d79e4dcec98a8 Mon Sep 17 00:00:00 2001 From: aws-sdk-go-automation <43143561+aws-sdk-go-automation@users.noreply.github.com> Date: Wed, 19 Jan 2022 11:19:08 -0800 Subject: [PATCH] Release v1.42.37 (2022-01-19) (#4248) Release v1.42.37 (2022-01-19) === ### Service Client Updates * `service/ec2-instance-connect`: Updates service API and documentation * `service/macie2`: Updates service API --- CHANGELOG.md | 7 ++ aws/version.go | 2 +- .../2018-04-02/api-2.json | 18 +++- .../2018-04-02/docs-2.json | 6 ++ models/apis/macie2/2020-01-01/api-2.json | 6 +- service/ec2instanceconnect/api.go | 95 ++++++++++++++++--- service/ec2instanceconnect/errors.go | 9 ++ service/ec2instanceconnect/examples_test.go | 2 + service/macie2/api.go | 12 ++- 9 files changed, 136 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f51c2a8cc9..bc5d4abec81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +Release v1.42.37 (2022-01-19) +=== + +### Service Client Updates +* `service/ec2-instance-connect`: Updates service API and documentation +* `service/macie2`: Updates service API + Release v1.42.36 (2022-01-18) === diff --git a/aws/version.go b/aws/version.go index 9b8d136e5b8..839550b7d0a 100644 --- a/aws/version.go +++ b/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.42.36" +const SDKVersion = "1.42.37" diff --git a/models/apis/ec2-instance-connect/2018-04-02/api-2.json b/models/apis/ec2-instance-connect/2018-04-02/api-2.json index 23cdb545dd6..26c1734a4f5 100644 --- a/models/apis/ec2-instance-connect/2018-04-02/api-2.json +++ b/models/apis/ec2-instance-connect/2018-04-02/api-2.json @@ -26,7 +26,8 @@ {"shape":"InvalidArgsException"}, {"shape":"ServiceException"}, {"shape":"ThrottlingException"}, - {"shape":"EC2InstanceNotFoundException"} + {"shape":"EC2InstanceNotFoundException"}, + {"shape":"EC2InstanceStateInvalidException"} ] }, "SendSerialConsoleSSHPublicKey":{ @@ -46,7 +47,8 @@ {"shape":"EC2InstanceNotFoundException"}, {"shape":"EC2InstanceTypeInvalidException"}, {"shape":"SerialConsoleSessionLimitExceededException"}, - {"shape":"SerialConsoleSessionUnavailableException"} + {"shape":"SerialConsoleSessionUnavailableException"}, + {"shape":"EC2InstanceStateInvalidException"} ] } }, @@ -71,6 +73,13 @@ }, "exception":true }, + "EC2InstanceStateInvalidException":{ + "type":"structure", + "members":{ + "Message":{"shape":"String"} + }, + "exception":true + }, "EC2InstanceTypeInvalidException":{ "type":"structure", "members":{ @@ -101,15 +110,14 @@ "SSHPublicKey":{ "type":"string", "max":4096, - "min":256 + "min":80 }, "SendSSHPublicKeyRequest":{ "type":"structure", "required":[ "InstanceId", "InstanceOSUser", - "SSHPublicKey", - "AvailabilityZone" + "SSHPublicKey" ], "members":{ "InstanceId":{"shape":"InstanceId"}, diff --git a/models/apis/ec2-instance-connect/2018-04-02/docs-2.json b/models/apis/ec2-instance-connect/2018-04-02/docs-2.json index 639078aeeae..a7da98023a7 100644 --- a/models/apis/ec2-instance-connect/2018-04-02/docs-2.json +++ b/models/apis/ec2-instance-connect/2018-04-02/docs-2.json @@ -22,6 +22,11 @@ "refs": { } }, + "EC2InstanceStateInvalidException": { + "base": "

Unable to connect because the instance is not in a valid state. Connecting to a stopped or terminated instance is not supported. If the instance is stopped, start your instance, and try to connect again.

", + "refs": { + } + }, "EC2InstanceTypeInvalidException": { "base": "

The instance type is not supported for connecting via the serial console. Only Nitro instance types are currently supported.

", "refs": { @@ -110,6 +115,7 @@ "refs": { "AuthException$Message": null, "EC2InstanceNotFoundException$Message": null, + "EC2InstanceStateInvalidException$Message": null, "EC2InstanceTypeInvalidException$Message": null, "InvalidArgsException$Message": null, "SerialConsoleAccessDisabledException$Message": null, diff --git a/models/apis/macie2/2020-01-01/api-2.json b/models/apis/macie2/2020-01-01/api-2.json index fe88dea8781..abcb6ce6bac 100644 --- a/models/apis/macie2/2020-01-01/api-2.json +++ b/models/apis/macie2/2020-01-01/api-2.json @@ -2814,7 +2814,11 @@ "shape": "TagMap", "locationName": "tags" } - } + }, + "required": [ + "regex", + "name" + ] }, "CreateCustomDataIdentifierResponse": { "type": "structure", diff --git a/service/ec2instanceconnect/api.go b/service/ec2instanceconnect/api.go index cf3ee5ef819..764de612f78 100644 --- a/service/ec2instanceconnect/api.go +++ b/service/ec2instanceconnect/api.go @@ -87,6 +87,11 @@ func (c *EC2InstanceConnect) SendSSHPublicKeyRequest(input *SendSSHPublicKeyInpu // * EC2InstanceNotFoundException // The specified instance was not found. // +// * EC2InstanceStateInvalidException +// Unable to connect because the instance is not in a valid state. Connecting +// to a stopped or terminated instance is not supported. If the instance is +// stopped, start your instance, and try to connect again. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-instance-connect-2018-04-02/SendSSHPublicKey func (c *EC2InstanceConnect) SendSSHPublicKey(input *SendSSHPublicKeyInput) (*SendSSHPublicKeyOutput, error) { req, out := c.SendSSHPublicKeyRequest(input) @@ -202,6 +207,11 @@ func (c *EC2InstanceConnect) SendSerialConsoleSSHPublicKeyRequest(input *SendSer // * SerialConsoleSessionUnavailableException // Unable to start a serial console session. Please try again. // +// * EC2InstanceStateInvalidException +// Unable to connect because the instance is not in a valid state. Connecting +// to a stopped or terminated instance is not supported. If the instance is +// stopped, start your instance, and try to connect again. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-instance-connect-2018-04-02/SendSerialConsoleSSHPublicKey func (c *EC2InstanceConnect) SendSerialConsoleSSHPublicKey(input *SendSerialConsoleSSHPublicKeyInput) (*SendSerialConsoleSSHPublicKeyOutput, error) { req, out := c.SendSerialConsoleSSHPublicKeyRequest(input) @@ -353,6 +363,72 @@ func (s *EC2InstanceNotFoundException) RequestID() string { return s.RespMetadata.RequestID } +// Unable to connect because the instance is not in a valid state. Connecting +// to a stopped or terminated instance is not supported. If the instance is +// stopped, start your instance, and try to connect again. +type EC2InstanceStateInvalidException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"Message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s EC2InstanceStateInvalidException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s EC2InstanceStateInvalidException) GoString() string { + return s.String() +} + +func newErrorEC2InstanceStateInvalidException(v protocol.ResponseMetadata) error { + return &EC2InstanceStateInvalidException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *EC2InstanceStateInvalidException) Code() string { + return "EC2InstanceStateInvalidException" +} + +// Message returns the exception's message. +func (s *EC2InstanceStateInvalidException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *EC2InstanceStateInvalidException) OrigErr() error { + return nil +} + +func (s *EC2InstanceStateInvalidException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *EC2InstanceStateInvalidException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *EC2InstanceStateInvalidException) RequestID() string { + return s.RespMetadata.RequestID +} + // The instance type is not supported for connecting via the serial console. // Only Nitro instance types are currently supported. type EC2InstanceTypeInvalidException struct { @@ -486,9 +562,7 @@ type SendSSHPublicKeyInput struct { _ struct{} `type:"structure"` // The Availability Zone in which the EC2 instance was launched. - // - // AvailabilityZone is a required field - AvailabilityZone *string `min:"6" type:"string" required:"true"` + AvailabilityZone *string `min:"6" type:"string"` // The ID of the EC2 instance. // @@ -504,7 +578,7 @@ type SendSSHPublicKeyInput struct { // private key. // // SSHPublicKey is a required field - SSHPublicKey *string `min:"256" type:"string" required:"true"` + SSHPublicKey *string `min:"80" type:"string" required:"true"` } // String returns the string representation. @@ -528,9 +602,6 @@ func (s SendSSHPublicKeyInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *SendSSHPublicKeyInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "SendSSHPublicKeyInput"} - if s.AvailabilityZone == nil { - invalidParams.Add(request.NewErrParamRequired("AvailabilityZone")) - } if s.AvailabilityZone != nil && len(*s.AvailabilityZone) < 6 { invalidParams.Add(request.NewErrParamMinLen("AvailabilityZone", 6)) } @@ -549,8 +620,8 @@ func (s *SendSSHPublicKeyInput) Validate() error { if s.SSHPublicKey == nil { invalidParams.Add(request.NewErrParamRequired("SSHPublicKey")) } - if s.SSHPublicKey != nil && len(*s.SSHPublicKey) < 256 { - invalidParams.Add(request.NewErrParamMinLen("SSHPublicKey", 256)) + if s.SSHPublicKey != nil && len(*s.SSHPublicKey) < 80 { + invalidParams.Add(request.NewErrParamMinLen("SSHPublicKey", 80)) } if invalidParams.Len() > 0 { @@ -638,7 +709,7 @@ type SendSerialConsoleSSHPublicKeyInput struct { // in the Amazon EC2 User Guide. // // SSHPublicKey is a required field - SSHPublicKey *string `min:"256" type:"string" required:"true"` + SSHPublicKey *string `min:"80" type:"string" required:"true"` // The serial port of the EC2 instance. Currently only port 0 is supported. // @@ -676,8 +747,8 @@ func (s *SendSerialConsoleSSHPublicKeyInput) Validate() error { if s.SSHPublicKey == nil { invalidParams.Add(request.NewErrParamRequired("SSHPublicKey")) } - if s.SSHPublicKey != nil && len(*s.SSHPublicKey) < 256 { - invalidParams.Add(request.NewErrParamMinLen("SSHPublicKey", 256)) + if s.SSHPublicKey != nil && len(*s.SSHPublicKey) < 80 { + invalidParams.Add(request.NewErrParamMinLen("SSHPublicKey", 80)) } if invalidParams.Len() > 0 { diff --git a/service/ec2instanceconnect/errors.go b/service/ec2instanceconnect/errors.go index d4c4e79f08e..975b63cb08e 100644 --- a/service/ec2instanceconnect/errors.go +++ b/service/ec2instanceconnect/errors.go @@ -21,6 +21,14 @@ const ( // The specified instance was not found. ErrCodeEC2InstanceNotFoundException = "EC2InstanceNotFoundException" + // ErrCodeEC2InstanceStateInvalidException for service response error code + // "EC2InstanceStateInvalidException". + // + // Unable to connect because the instance is not in a valid state. Connecting + // to a stopped or terminated instance is not supported. If the instance is + // stopped, start your instance, and try to connect again. + ErrCodeEC2InstanceStateInvalidException = "EC2InstanceStateInvalidException" + // ErrCodeEC2InstanceTypeInvalidException for service response error code // "EC2InstanceTypeInvalidException". // @@ -75,6 +83,7 @@ const ( var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ "AuthException": newErrorAuthException, "EC2InstanceNotFoundException": newErrorEC2InstanceNotFoundException, + "EC2InstanceStateInvalidException": newErrorEC2InstanceStateInvalidException, "EC2InstanceTypeInvalidException": newErrorEC2InstanceTypeInvalidException, "InvalidArgsException": newErrorInvalidArgsException, "SerialConsoleAccessDisabledException": newErrorSerialConsoleAccessDisabledException, diff --git a/service/ec2instanceconnect/examples_test.go b/service/ec2instanceconnect/examples_test.go index fffe30ba254..47bea01c04b 100644 --- a/service/ec2instanceconnect/examples_test.go +++ b/service/ec2instanceconnect/examples_test.go @@ -52,6 +52,8 @@ func ExampleEC2InstanceConnect_SendSSHPublicKey_shared00() { fmt.Println(ec2instanceconnect.ErrCodeThrottlingException, aerr.Error()) case ec2instanceconnect.ErrCodeEC2InstanceNotFoundException: fmt.Println(ec2instanceconnect.ErrCodeEC2InstanceNotFoundException, aerr.Error()) + case ec2instanceconnect.ErrCodeEC2InstanceStateInvalidException: + fmt.Println(ec2instanceconnect.ErrCodeEC2InstanceStateInvalidException, aerr.Error()) default: fmt.Println(aerr.Error()) } diff --git a/service/macie2/api.go b/service/macie2/api.go index be7cf7094b5..ea8338742d3 100644 --- a/service/macie2/api.go +++ b/service/macie2/api.go @@ -8561,9 +8561,11 @@ type CreateCustomDataIdentifierInput struct { MaximumMatchDistance *int64 `locationName:"maximumMatchDistance" type:"integer"` - Name *string `locationName:"name" type:"string"` + // Name is a required field + Name *string `locationName:"name" type:"string" required:"true"` - Regex *string `locationName:"regex" type:"string"` + // Regex is a required field + Regex *string `locationName:"regex" type:"string" required:"true"` // The severity to assign to findings that the custom data identifier produces, // based on the number of occurrences of text that matches the custom data identifier's @@ -8607,6 +8609,12 @@ func (s CreateCustomDataIdentifierInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateCustomDataIdentifierInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateCustomDataIdentifierInput"} + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Regex == nil { + invalidParams.Add(request.NewErrParamRequired("Regex")) + } if s.SeverityLevels != nil { for i, v := range s.SeverityLevels { if v == nil {