diff --git a/.changelog/3f7cbe56f62f48ea81616fa30f426280.json b/.changelog/3f7cbe56f62f48ea81616fa30f426280.json new file mode 100644 index 00000000000..0162f55afd2 --- /dev/null +++ b/.changelog/3f7cbe56f62f48ea81616fa30f426280.json @@ -0,0 +1,8 @@ +{ + "id": "3f7cbe56-f62f-48ea-8161-6fa30f426280", + "type": "documentation", + "description": "Doc-only update to get doc bug fixes into the SDK docs", + "modules": [ + "service/cloudwatch" + ] +} \ No newline at end of file diff --git a/.changelog/661388d366ed4d9ebeb4c98437577ae6.json b/.changelog/661388d366ed4d9ebeb4c98437577ae6.json new file mode 100644 index 00000000000..9eb74d6a0b5 --- /dev/null +++ b/.changelog/661388d366ed4d9ebeb4c98437577ae6.json @@ -0,0 +1,8 @@ +{ + "id": "661388d3-66ed-4d9e-beb4-c98437577ae6", + "type": "feature", + "description": "Added protections to interacting with fields containing customer information.", + "modules": [ + "service/detective" + ] +} \ No newline at end of file diff --git a/.changelog/bebe6d57df62408287224b0966f3da29.json b/.changelog/bebe6d57df62408287224b0966f3da29.json new file mode 100644 index 00000000000..4b662e074b1 --- /dev/null +++ b/.changelog/bebe6d57df62408287224b0966f3da29.json @@ -0,0 +1,8 @@ +{ + "id": "bebe6d57-df62-4082-8722-4b0966f3da29", + "type": "feature", + "description": "Add ThrottlingException with error code 429 to handle CloudTrail Delegated Admin request rate exceeded on organization resources.", + "modules": [ + "service/cloudtrail" + ] +} \ No newline at end of file diff --git a/service/cloudtrail/deserializers.go b/service/cloudtrail/deserializers.go index a87b0b2cc81..b374af00080 100644 --- a/service/cloudtrail/deserializers.go +++ b/service/cloudtrail/deserializers.go @@ -802,6 +802,9 @@ func awsAwsjson11_deserializeOpErrorCreateTrail(response *smithyhttp.Response, m case strings.EqualFold("TagsLimitExceededException", errorCode): return awsAwsjson11_deserializeErrorTagsLimitExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("TrailAlreadyExistsException", errorCode): return awsAwsjson11_deserializeErrorTrailAlreadyExistsException(response, errorBody) @@ -1333,6 +1336,9 @@ func awsAwsjson11_deserializeOpErrorDeleteTrail(response *smithyhttp.Response, m case strings.EqualFold("OperationNotPermittedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotPermittedException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("TrailNotFoundException", errorCode): return awsAwsjson11_deserializeErrorTrailNotFoundException(response, errorBody) @@ -2347,6 +2353,9 @@ func awsAwsjson11_deserializeOpErrorGetInsightSelectors(response *smithyhttp.Res case strings.EqualFold("OperationNotPermittedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotPermittedException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("TrailNotFoundException", errorCode): return awsAwsjson11_deserializeErrorTrailNotFoundException(response, errorBody) @@ -4129,6 +4138,9 @@ func awsAwsjson11_deserializeOpErrorPutEventSelectors(response *smithyhttp.Respo case strings.EqualFold("OperationNotPermittedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotPermittedException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("TrailNotFoundException", errorCode): return awsAwsjson11_deserializeErrorTrailNotFoundException(response, errorBody) @@ -4276,6 +4288,9 @@ func awsAwsjson11_deserializeOpErrorPutInsightSelectors(response *smithyhttp.Res case strings.EqualFold("S3BucketDoesNotExistException", errorCode): return awsAwsjson11_deserializeErrorS3BucketDoesNotExistException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("TrailNotFoundException", errorCode): return awsAwsjson11_deserializeErrorTrailNotFoundException(response, errorBody) @@ -5266,6 +5281,9 @@ func awsAwsjson11_deserializeOpErrorStartLogging(response *smithyhttp.Response, case strings.EqualFold("OperationNotPermittedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotPermittedException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("TrailNotFoundException", errorCode): return awsAwsjson11_deserializeErrorTrailNotFoundException(response, errorBody) @@ -5812,6 +5830,9 @@ func awsAwsjson11_deserializeOpErrorStopLogging(response *smithyhttp.Response, m case strings.EqualFold("OperationNotPermittedException", errorCode): return awsAwsjson11_deserializeErrorOperationNotPermittedException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("TrailNotFoundException", errorCode): return awsAwsjson11_deserializeErrorTrailNotFoundException(response, errorBody) @@ -6316,6 +6337,9 @@ func awsAwsjson11_deserializeOpErrorUpdateTrail(response *smithyhttp.Response, m case strings.EqualFold("S3BucketDoesNotExistException", errorCode): return awsAwsjson11_deserializeErrorS3BucketDoesNotExistException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("TrailNotFoundException", errorCode): return awsAwsjson11_deserializeErrorTrailNotFoundException(response, errorBody) @@ -8960,6 +8984,41 @@ func awsAwsjson11_deserializeErrorTagsLimitExceededException(response *smithyhtt return output } +func awsAwsjson11_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ThrottlingException{} + err := awsAwsjson11_deserializeDocumentThrottlingException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + func awsAwsjson11_deserializeErrorTrailAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -14451,6 +14510,46 @@ func awsAwsjson11_deserializeDocumentTagsList(v *[]types.Tag, value interface{}) return nil } +func awsAwsjson11_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ThrottlingException + if *v == nil { + sv = &types.ThrottlingException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentTrail(v **types.Trail, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/cloudtrail/types/errors.go b/service/cloudtrail/types/errors.go index 49b924b746f..205f4747985 100644 --- a/service/cloudtrail/types/errors.go +++ b/service/cloudtrail/types/errors.go @@ -2107,6 +2107,32 @@ func (e *TagsLimitExceededException) ErrorCode() string { } func (e *TagsLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// This exception is thrown when the request rate exceeds the limit. +type ThrottlingException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ThrottlingException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ThrottlingException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ThrottlingException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ThrottlingException" + } + return *e.ErrorCodeOverride +} +func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // This exception is thrown when the specified trail already exists. type TrailAlreadyExistsException struct { Message *string diff --git a/service/cloudwatch/api_op_ListTagsForResource.go b/service/cloudwatch/api_op_ListTagsForResource.go index 0024b46876d..9ef662fe9d0 100644 --- a/service/cloudwatch/api_op_ListTagsForResource.go +++ b/service/cloudwatch/api_op_ListTagsForResource.go @@ -38,7 +38,7 @@ type ListTagsForResourceInput struct { // The ARN of the CloudWatch resource that you want to view tags for. The ARN // format of an alarm is arn:aws:cloudwatch:Region:account-id:alarm:alarm-name // The ARN format of a Contributor Insights rule is - // arn:aws:cloudwatch:Region:account-id:insight-rule:insight-rule-name For more + // arn:aws:cloudwatch:Region:account-id:insight-rule/insight-rule-name For more // information about ARN format, see Resource Types Defined by Amazon CloudWatch (https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazoncloudwatch.html#amazoncloudwatch-resources-for-iam-policies) // in the Amazon Web Services General Reference. // diff --git a/service/cloudwatch/api_op_TagResource.go b/service/cloudwatch/api_op_TagResource.go index 97b9ba907ab..1e0b9f0be89 100644 --- a/service/cloudwatch/api_op_TagResource.go +++ b/service/cloudwatch/api_op_TagResource.go @@ -48,7 +48,7 @@ type TagResourceInput struct { // The ARN of the CloudWatch resource that you're adding tags to. The ARN format // of an alarm is arn:aws:cloudwatch:Region:account-id:alarm:alarm-name The ARN // format of a Contributor Insights rule is - // arn:aws:cloudwatch:Region:account-id:insight-rule:insight-rule-name For more + // arn:aws:cloudwatch:Region:account-id:insight-rule/insight-rule-name For more // information about ARN format, see Resource Types Defined by Amazon CloudWatch (https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazoncloudwatch.html#amazoncloudwatch-resources-for-iam-policies) // in the Amazon Web Services General Reference. // diff --git a/service/cloudwatch/api_op_UntagResource.go b/service/cloudwatch/api_op_UntagResource.go index 366e7ecbf72..10094f8ff33 100644 --- a/service/cloudwatch/api_op_UntagResource.go +++ b/service/cloudwatch/api_op_UntagResource.go @@ -36,7 +36,7 @@ type UntagResourceInput struct { // The ARN of the CloudWatch resource that you're removing tags from. The ARN // format of an alarm is arn:aws:cloudwatch:Region:account-id:alarm:alarm-name // The ARN format of a Contributor Insights rule is - // arn:aws:cloudwatch:Region:account-id:insight-rule:insight-rule-name For more + // arn:aws:cloudwatch:Region:account-id:insight-rule/insight-rule-name For more // information about ARN format, see Resource Types Defined by Amazon CloudWatch (https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazoncloudwatch.html#amazoncloudwatch-resources-for-iam-policies) // in the Amazon Web Services General Reference. // diff --git a/service/fsx/internal/endpoints/endpoints.go b/service/fsx/internal/endpoints/endpoints.go index 237eace4cf4..0daa2974454 100644 --- a/service/fsx/internal/endpoints/endpoints.go +++ b/service/fsx/internal/endpoints/endpoints.go @@ -295,6 +295,9 @@ var defaultPartitions = endpoints.Partitions{ }, Deprecated: aws.TrueTernary, }, + endpoints.EndpointKey{ + Region: "il-central-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "me-central-1", }: endpoints.Endpoint{}, diff --git a/service/guardduty/internal/endpoints/endpoints.go b/service/guardduty/internal/endpoints/endpoints.go index 8e2ff065896..acaa30350ee 100644 --- a/service/guardduty/internal/endpoints/endpoints.go +++ b/service/guardduty/internal/endpoints/endpoints.go @@ -199,6 +199,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-west-3", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "il-central-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "me-central-1", }: endpoints.Endpoint{}, diff --git a/service/pinpointemail/internal/endpoints/endpoints.go b/service/pinpointemail/internal/endpoints/endpoints.go index 5d653f56072..e2a80ae75ae 100644 --- a/service/pinpointemail/internal/endpoints/endpoints.go +++ b/service/pinpointemail/internal/endpoints/endpoints.go @@ -202,6 +202,9 @@ var defaultPartitions = endpoints.Partitions{ }, Deprecated: aws.TrueTernary, }, + endpoints.EndpointKey{ + Region: "il-central-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "me-south-1", }: endpoints.Endpoint{}, diff --git a/service/s3outposts/internal/endpoints/endpoints.go b/service/s3outposts/internal/endpoints/endpoints.go index 95af3867417..273b37e8ac6 100644 --- a/service/s3outposts/internal/endpoints/endpoints.go +++ b/service/s3outposts/internal/endpoints/endpoints.go @@ -216,6 +216,9 @@ var defaultPartitions = endpoints.Partitions{ }: endpoints.Endpoint{ Deprecated: aws.TrueTernary, }, + endpoints.EndpointKey{ + Region: "il-central-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "me-south-1", }: endpoints.Endpoint{}, diff --git a/service/servicequotas/internal/endpoints/endpoints.go b/service/servicequotas/internal/endpoints/endpoints.go index a4ae4b77084..4b0148d08c7 100644 --- a/service/servicequotas/internal/endpoints/endpoints.go +++ b/service/servicequotas/internal/endpoints/endpoints.go @@ -199,6 +199,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-west-3", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "il-central-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "me-central-1", }: endpoints.Endpoint{}, diff --git a/service/ses/internal/endpoints/endpoints.go b/service/ses/internal/endpoints/endpoints.go index 927f86d4a04..f944fb1929a 100644 --- a/service/ses/internal/endpoints/endpoints.go +++ b/service/ses/internal/endpoints/endpoints.go @@ -202,6 +202,9 @@ var defaultPartitions = endpoints.Partitions{ }, Deprecated: aws.TrueTernary, }, + endpoints.EndpointKey{ + Region: "il-central-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "me-south-1", }: endpoints.Endpoint{}, diff --git a/service/sesv2/internal/endpoints/endpoints.go b/service/sesv2/internal/endpoints/endpoints.go index 6aafe63bd0d..8054263d379 100644 --- a/service/sesv2/internal/endpoints/endpoints.go +++ b/service/sesv2/internal/endpoints/endpoints.go @@ -202,6 +202,9 @@ var defaultPartitions = endpoints.Partitions{ }, Deprecated: aws.TrueTernary, }, + endpoints.EndpointKey{ + Region: "il-central-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "me-south-1", }: endpoints.Endpoint{},