From 34bafde434e6f37da4c4e1ea11393f69e91560b0 Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Tue, 14 Nov 2023 19:18:26 +0000 Subject: [PATCH] Regenerated Clients --- .../5b444290be1a40dbb6de9d63a9d732ae.json | 8 + .../6154ac66f66a4879bf008ced316862f2.json | 8 + .../78a6f0ebc1c145d59dd3972e5cf62b99.json | 8 + .../7991c36359944dfab03f83d85d8810ae.json | 8 + .../8e3020333b3149d0a331d2c1acc8f3b3.json | 8 + .../aa90b85328ac426e90e84e3e52446f56.json | 8 + .../aeb654ab45f54a3bb2e2f7eaba5be3bb.json | 8 + .../b529262a1c6b4281bf7029a037c8dc89.json | 8 + .../b5c5a7bf1f8d4ff889199222ce8eae06.json | 8 + .../c0acbd7d103449ceb68820c55cef32f9.json | 8 + .../c17a9eaad0dd4b2d8d50c59a79c3d600.json | 8 + .../ef43596d444140f1ab14f94d2e8ae6c0.json | 8 + .../internal/endpoints/endpoints.go | 30 + service/backup/api_op_DescribeBackupJob.go | 5 + .../backup/api_op_ListBackupJobSummaries.go | 409 ++ service/backup/api_op_ListBackupJobs.go | 6 + service/backup/api_op_ListCopyJobSummaries.go | 408 ++ service/backup/api_op_ListCopyJobs.go | 8 + .../backup/api_op_ListRestoreJobSummaries.go | 402 ++ service/backup/deserializers.go | 1389 ++++- service/backup/endpoints.go | 2 +- service/backup/endpoints_test.go | 20 + service/backup/generated.json | 3 + service/backup/serializers.go | 256 + service/backup/types/enums.go | 122 + service/backup/types/types.go | 136 + .../cleanrooms/api_op_CreateCollaboration.go | 6 + service/cleanrooms/api_op_CreateMembership.go | 8 +- service/cleanrooms/api_op_UpdateMembership.go | 2 +- service/cleanrooms/deserializers.go | 167 + service/cleanrooms/endpoints.go | 2 +- service/cleanrooms/serializers.go | 73 + service/cleanrooms/types/types.go | 115 +- service/cleanrooms/validators.go | 83 + .../internal/endpoints/endpoints.go | 12 + .../internal/endpoints/endpoints.go | 56 + service/connect/api_op_StartChatContact.go | 10 + service/connect/serializers.go | 33 + service/connect/types/types.go | 10 + service/glue/api_op_BatchGetTableOptimizer.go | 265 + service/glue/api_op_CreateTableOptimizer.go | 279 + service/glue/api_op_DeleteTableOptimizer.go | 273 + service/glue/api_op_GetTableOptimizer.go | 285 + service/glue/api_op_ListTableOptimizerRuns.go | 382 ++ ...p_StartDataQualityRuleRecommendationRun.go | 3 +- service/glue/api_op_UpdateTableOptimizer.go | 278 + service/glue/deserializers.go | 4740 +++++++++++------ service/glue/generated.json | 6 + service/glue/serializers.go | 560 ++ service/glue/types/enums.go | 38 + service/glue/types/types.go | 131 + service/glue/validators.go | 285 + service/iot/api_op_CreateSecurityProfile.go | 3 + service/iot/api_op_CreateThingGroup.go | 5 +- service/iot/api_op_DescribeSecurityProfile.go | 3 + service/iot/api_op_SearchIndex.go | 3 +- service/iot/api_op_UpdateSecurityProfile.go | 9 + service/iot/deserializers.go | 77 + service/iot/serializers.go | 46 + service/iot/types/types.go | 33 +- service/iot/validators.go | 28 + service/lambda/types/enums.go | 2 + service/mediatailor/api_op_CreateProgram.go | 2 +- .../mediatailor/api_op_GetChannelSchedule.go | 12 +- .../api_op_GetPlaybackConfiguration.go | 2 +- service/mediatailor/api_op_ListAlerts.go | 12 +- service/mediatailor/api_op_ListChannels.go | 12 +- service/mediatailor/api_op_ListLiveSources.go | 12 +- .../api_op_ListPlaybackConfigurations.go | 12 +- .../api_op_ListPrefetchSchedules.go | 12 +- .../mediatailor/api_op_ListSourceLocations.go | 12 +- service/mediatailor/api_op_ListVodSources.go | 12 +- .../api_op_PutPlaybackConfiguration.go | 4 +- service/mediatailor/api_op_UpdateProgram.go | 2 +- service/mediatailor/deserializers.go | 36 +- service/mediatailor/endpoints.go | 2 +- service/mediatailor/serializers.go | 96 +- service/mediatailor/types/types.go | 36 +- service/mediatailor/validators.go | 3 + service/pipes/api_op_CreatePipe.go | 8 +- service/pipes/api_op_DescribePipe.go | 8 +- service/pipes/api_op_UpdatePipe.go | 27 +- service/pipes/deserializers.go | 248 + service/pipes/endpoints.go | 2 +- service/pipes/serializers.go | 116 + service/pipes/types/enums.go | 88 +- service/pipes/types/types.go | 245 +- service/pipes/validators.go | 88 + .../resourceexplorer2/api_op_CreateIndex.go | 2 +- .../resourceexplorer2/api_op_CreateView.go | 4 + ..._op_GetAccountLevelServiceConfiguration.go | 255 + .../resourceexplorer2/api_op_ListIndexes.go | 6 +- .../api_op_ListIndexesForMembers.go | 387 ++ .../api_op_ListSupportedResourceTypes.go | 6 +- service/resourceexplorer2/api_op_ListViews.go | 6 +- service/resourceexplorer2/api_op_Search.go | 6 +- service/resourceexplorer2/deserializers.go | 474 ++ service/resourceexplorer2/endpoints.go | 4 +- service/resourceexplorer2/generated.json | 2 + service/resourceexplorer2/serializers.go | 155 + service/resourceexplorer2/types/enums.go | 18 + service/resourceexplorer2/types/errors.go | 13 +- service/resourceexplorer2/types/types.go | 46 + service/resourceexplorer2/validators.go | 39 + service/sagemaker/api_op_CreateAutoMLJobV2.go | 2 +- service/sagemaker/types/types.go | 14 +- service/sagemaker/validators.go | 6 - service/sfn/api_client.go | 20 + service/sfn/api_op_DeleteStateMachine.go | 6 +- service/sfn/api_op_DescribeExecution.go | 58 +- service/sfn/api_op_DescribeMapRun.go | 15 +- service/sfn/api_op_ListExecutions.go | 11 +- service/sfn/api_op_RedriveExecution.go | 339 ++ service/sfn/api_op_SendTaskFailure.go | 3 +- service/sfn/api_op_SendTaskHeartbeat.go | 5 +- service/sfn/api_op_SendTaskSuccess.go | 3 +- service/sfn/api_op_StartExecution.go | 4 +- service/sfn/deserializers.go | 506 ++ service/sfn/doc.go | 5 +- service/sfn/endpoints.go | 2 +- service/sfn/generated.json | 1 + service/sfn/serializers.go | 77 + service/sfn/types/enums.go | 54 +- service/sfn/types/errors.go | 30 + service/sfn/types/types.go | 68 +- service/sfn/validators.go | 39 + service/signer/api_op_DescribeSigningJob.go | 2 +- service/signer/api_op_GetRevocationStatus.go | 17 +- service/signer/api_op_ListSigningJobs.go | 6 +- service/signer/api_op_ListSigningPlatforms.go | 12 +- service/signer/api_op_ListSigningProfiles.go | 6 +- service/signer/api_op_PutSigningProfile.go | 2 +- service/signer/api_op_SignPayload.go | 7 +- service/signer/api_op_StartSigningJob.go | 6 +- service/signer/doc.go | 15 +- service/signer/endpoints.go | 2 +- service/signer/types/types.go | 68 +- 137 files changed, 13388 insertions(+), 2158 deletions(-) create mode 100644 .changelog/5b444290be1a40dbb6de9d63a9d732ae.json create mode 100644 .changelog/6154ac66f66a4879bf008ced316862f2.json create mode 100644 .changelog/78a6f0ebc1c145d59dd3972e5cf62b99.json create mode 100644 .changelog/7991c36359944dfab03f83d85d8810ae.json create mode 100644 .changelog/8e3020333b3149d0a331d2c1acc8f3b3.json create mode 100644 .changelog/aa90b85328ac426e90e84e3e52446f56.json create mode 100644 .changelog/aeb654ab45f54a3bb2e2f7eaba5be3bb.json create mode 100644 .changelog/b529262a1c6b4281bf7029a037c8dc89.json create mode 100644 .changelog/b5c5a7bf1f8d4ff889199222ce8eae06.json create mode 100644 .changelog/c0acbd7d103449ceb68820c55cef32f9.json create mode 100644 .changelog/c17a9eaad0dd4b2d8d50c59a79c3d600.json create mode 100644 .changelog/ef43596d444140f1ab14f94d2e8ae6c0.json create mode 100644 service/backup/api_op_ListBackupJobSummaries.go create mode 100644 service/backup/api_op_ListCopyJobSummaries.go create mode 100644 service/backup/api_op_ListRestoreJobSummaries.go create mode 100644 service/glue/api_op_BatchGetTableOptimizer.go create mode 100644 service/glue/api_op_CreateTableOptimizer.go create mode 100644 service/glue/api_op_DeleteTableOptimizer.go create mode 100644 service/glue/api_op_GetTableOptimizer.go create mode 100644 service/glue/api_op_ListTableOptimizerRuns.go create mode 100644 service/glue/api_op_UpdateTableOptimizer.go create mode 100644 service/resourceexplorer2/api_op_GetAccountLevelServiceConfiguration.go create mode 100644 service/resourceexplorer2/api_op_ListIndexesForMembers.go create mode 100644 service/sfn/api_op_RedriveExecution.go diff --git a/.changelog/5b444290be1a40dbb6de9d63a9d732ae.json b/.changelog/5b444290be1a40dbb6de9d63a9d732ae.json new file mode 100644 index 00000000000..ad95c23ef58 --- /dev/null +++ b/.changelog/5b444290be1a40dbb6de9d63a9d732ae.json @@ -0,0 +1,8 @@ +{ + "id": "5b444290-be1a-40db-b6de-9d63a9d732ae", + "type": "feature", + "description": "Add Python 3.12 (python3.12) support to AWS Lambda", + "modules": [ + "service/lambda" + ] +} \ No newline at end of file diff --git a/.changelog/6154ac66f66a4879bf008ced316862f2.json b/.changelog/6154ac66f66a4879bf008ced316862f2.json new file mode 100644 index 00000000000..ccc13d64ae4 --- /dev/null +++ b/.changelog/6154ac66f66a4879bf008ced316862f2.json @@ -0,0 +1,8 @@ +{ + "id": "6154ac66-f66a-4879-bf00-8ced316862f2", + "type": "feature", + "description": "Resource Explorer supports multi-account search. You can now use Resource Explorer to search and discover resources across AWS accounts within your organization or organizational unit.", + "modules": [ + "service/resourceexplorer2" + ] +} \ No newline at end of file diff --git a/.changelog/78a6f0ebc1c145d59dd3972e5cf62b99.json b/.changelog/78a6f0ebc1c145d59dd3972e5cf62b99.json new file mode 100644 index 00000000000..26dd58df6ad --- /dev/null +++ b/.changelog/78a6f0ebc1c145d59dd3972e5cf62b99.json @@ -0,0 +1,8 @@ +{ + "id": "78a6f0eb-c1c1-45d5-9dd3-972e5cf62b99", + "type": "feature", + "description": "This release makes Model Registry Inference Specification fields as not required.", + "modules": [ + "service/sagemaker" + ] +} \ No newline at end of file diff --git a/.changelog/7991c36359944dfab03f83d85d8810ae.json b/.changelog/7991c36359944dfab03f83d85d8810ae.json new file mode 100644 index 00000000000..e9aea7173ea --- /dev/null +++ b/.changelog/7991c36359944dfab03f83d85d8810ae.json @@ -0,0 +1,8 @@ +{ + "id": "7991c363-5994-4dfa-b03f-83d85d8810ae", + "type": "documentation", + "description": "Documentation updates for AWS Signer", + "modules": [ + "service/signer" + ] +} \ No newline at end of file diff --git a/.changelog/8e3020333b3149d0a331d2c1acc8f3b3.json b/.changelog/8e3020333b3149d0a331d2c1acc8f3b3.json new file mode 100644 index 00000000000..38ba666f6ce --- /dev/null +++ b/.changelog/8e3020333b3149d0a331d2c1acc8f3b3.json @@ -0,0 +1,8 @@ +{ + "id": "8e302033-3b31-49d0-a331-d2c1acc8f3b3", + "type": "feature", + "description": "This feature provides the ability for the collaboration creator to configure either the member who can run queries or a different member in the collaboration to be billed for query compute costs.", + "modules": [ + "service/cleanrooms" + ] +} \ No newline at end of file diff --git a/.changelog/aa90b85328ac426e90e84e3e52446f56.json b/.changelog/aa90b85328ac426e90e84e3e52446f56.json new file mode 100644 index 00000000000..4dd354e6dae --- /dev/null +++ b/.changelog/aa90b85328ac426e90e84e3e52446f56.json @@ -0,0 +1,8 @@ +{ + "id": "aa90b853-28ac-426e-90e8-4e3e52446f56", + "type": "feature", + "description": "Introducing SegmentAttributes parameter for StartChatContact API", + "modules": [ + "service/connect" + ] +} \ No newline at end of file diff --git a/.changelog/aeb654ab45f54a3bb2e2f7eaba5be3bb.json b/.changelog/aeb654ab45f54a3bb2e2f7eaba5be3bb.json new file mode 100644 index 00000000000..75e78ef5155 --- /dev/null +++ b/.changelog/aeb654ab45f54a3bb2e2f7eaba5be3bb.json @@ -0,0 +1,8 @@ +{ + "id": "aeb654ab-45f5-4a3b-b2e2-f7eaba5be3bb", + "type": "feature", + "description": "Removed unnecessary default values.", + "modules": [ + "service/mediatailor" + ] +} \ No newline at end of file diff --git a/.changelog/b529262a1c6b4281bf7029a037c8dc89.json b/.changelog/b529262a1c6b4281bf7029a037c8dc89.json new file mode 100644 index 00000000000..fefa82e74fb --- /dev/null +++ b/.changelog/b529262a1c6b4281bf7029a037c8dc89.json @@ -0,0 +1,8 @@ +{ + "id": "b529262a-1c6b-4281-bf70-29a037c8dc89", + "type": "feature", + "description": "Added support (via new LogConfiguration field in CreatePipe and UpdatePipe APIs) for logging to Amazon CloudWatch Logs, Amazon Simple Storage Service (Amazon S3), and Amazon Kinesis Data Firehose", + "modules": [ + "service/pipes" + ] +} \ No newline at end of file diff --git a/.changelog/b5c5a7bf1f8d4ff889199222ce8eae06.json b/.changelog/b5c5a7bf1f8d4ff889199222ce8eae06.json new file mode 100644 index 00000000000..afaf8904114 --- /dev/null +++ b/.changelog/b5c5a7bf1f8d4ff889199222ce8eae06.json @@ -0,0 +1,8 @@ +{ + "id": "b5c5a7bf-1f8d-4ff8-8919-9222ce8eae06", + "type": "feature", + "description": "AWS Backup - Features: Provide Job Summary for your backup activity.", + "modules": [ + "service/backup" + ] +} \ No newline at end of file diff --git a/.changelog/c0acbd7d103449ceb68820c55cef32f9.json b/.changelog/c0acbd7d103449ceb68820c55cef32f9.json new file mode 100644 index 00000000000..d63206d6a05 --- /dev/null +++ b/.changelog/c0acbd7d103449ceb68820c55cef32f9.json @@ -0,0 +1,8 @@ +{ + "id": "c0acbd7d-1034-49ce-b688-20c55cef32f9", + "type": "feature", + "description": "This release introduces new attributes in API CreateSecurityProfile, UpdateSecurityProfile and DescribeSecurityProfile to support management of Metrics Export for AWS IoT Device Defender Detect.", + "modules": [ + "service/iot" + ] +} \ No newline at end of file diff --git a/.changelog/c17a9eaad0dd4b2d8d50c59a79c3d600.json b/.changelog/c17a9eaad0dd4b2d8d50c59a79c3d600.json new file mode 100644 index 00000000000..2e92febb31e --- /dev/null +++ b/.changelog/c17a9eaad0dd4b2d8d50c59a79c3d600.json @@ -0,0 +1,8 @@ +{ + "id": "c17a9eaa-d0dd-4b2d-8d50-c59a79c3d600", + "type": "feature", + "description": "Introduces new storage optimization APIs to support automatic compaction of Apache Iceberg tables.", + "modules": [ + "service/glue" + ] +} \ No newline at end of file diff --git a/.changelog/ef43596d444140f1ab14f94d2e8ae6c0.json b/.changelog/ef43596d444140f1ab14f94d2e8ae6c0.json new file mode 100644 index 00000000000..857cfb046c8 --- /dev/null +++ b/.changelog/ef43596d444140f1ab14f94d2e8ae6c0.json @@ -0,0 +1,8 @@ +{ + "id": "ef43596d-4441-40f1-ab14-f94d2e8ae6c0", + "type": "feature", + "description": "This release adds support to redrive executions in AWS Step Functions with a new RedriveExecution operation.", + "modules": [ + "service/sfn" + ] +} \ No newline at end of file diff --git a/service/appconfigdata/internal/endpoints/endpoints.go b/service/appconfigdata/internal/endpoints/endpoints.go index 4c8469a7193..4e95752572a 100644 --- a/service/appconfigdata/internal/endpoints/endpoints.go +++ b/service/appconfigdata/internal/endpoints/endpoints.go @@ -400,12 +400,42 @@ var defaultPartitions = endpoints.Partitions{ RegionRegex: partitionRegexp.AwsUsGov, IsRegionalized: true, Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "fips-us-gov-east-1", + }: endpoints.Endpoint{ + Hostname: "appconfigdata.us-gov-east-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-east-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-gov-west-1", + }: endpoints.Endpoint{ + Hostname: "appconfigdata.us-gov-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-west-1", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "us-gov-east-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-gov-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "appconfigdata.us-gov-east-1.amazonaws.com", + }, endpoints.EndpointKey{ Region: "us-gov-west-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "appconfigdata.us-gov-west-1.amazonaws.com", + }, }, }, } diff --git a/service/backup/api_op_DescribeBackupJob.go b/service/backup/api_op_DescribeBackupJob.go index 8b51817c653..bfe0444204d 100644 --- a/service/backup/api_op_DescribeBackupJob.go +++ b/service/backup/api_op_DescribeBackupJob.go @@ -110,6 +110,11 @@ type DescribeBackupJobOutput struct { // This returns the boolean value that a backup job is a parent (composite) job. IsParent bool + // This is the job count for the specified message category. Example strings may + // include AccessDenied , Success , and InvalidParameters . See Monitoring (https://docs.aws.amazon.com/aws-backup/latest/devguide/monitoring.html) + // for a list of MessageCategory strings. + MessageCategory *string + // This returns the number of child (nested) backup jobs. NumberOfChildJobs *int64 diff --git a/service/backup/api_op_ListBackupJobSummaries.go b/service/backup/api_op_ListBackupJobSummaries.go new file mode 100644 index 00000000000..da076b5b7f5 --- /dev/null +++ b/service/backup/api_op_ListBackupJobSummaries.go @@ -0,0 +1,409 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package backup + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/backup/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// This is a request for a summary of backup jobs created or running within the +// most recent 30 days. You can include parameters AccountID, State, ResourceType, +// MessageCategory, AggregationPeriod, MaxResults, or NextToken to filter results. +// This request returns a summary that contains Region, Account, State, +// ResourceType, MessageCategory, StartTime, EndTime, and Count of included jobs. +func (c *Client) ListBackupJobSummaries(ctx context.Context, params *ListBackupJobSummariesInput, optFns ...func(*Options)) (*ListBackupJobSummariesOutput, error) { + if params == nil { + params = &ListBackupJobSummariesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListBackupJobSummaries", params, optFns, c.addOperationListBackupJobSummariesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListBackupJobSummariesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListBackupJobSummariesInput struct { + + // Returns the job count for the specified account. If the request is sent from a + // member account or an account not part of Amazon Web Services Organizations, jobs + // within requestor's account will be returned. Root, admin, and delegated + // administrator accounts can use the value ANY to return job counts from every + // account in the organization. AGGREGATE_ALL aggregates job counts from all + // accounts within the authenticated organization, then returns the sum. + AccountId *string + + // This is the period that sets the boundaries for returned results. Acceptable + // values include + // - ONE_DAY for daily job count for the prior 14 days. + // - SEVEN_DAYS for the aggregated job count for the prior 7 days. + // - FOURTEEN_DAYS for aggregated job count for prior 14 days. + AggregationPeriod types.AggregationPeriod + + // This parameter sets the maximum number of items to be returned. The value is an + // integer. Range of accepted values is from 1 to 500. + MaxResults *int32 + + // This parameter returns the job count for the specified message category. + // Example accepted strings include AccessDenied , Success , and InvalidParameters + // . See Monitoring (https://docs.aws.amazon.com/aws-backup/latest/devguide/monitoring.html) + // for a list of accepted MessageCategory strings. The the value ANY returns count + // of all message categories. AGGREGATE_ALL aggregates job counts for all message + // categories and returns the sum. + MessageCategory *string + + // The next item following a partial list of returned resources. For example, if a + // request is made to return maxResults number of resources, NextToken allows you + // to return more items in your list starting at the location pointed to by the + // next token. + NextToken *string + + // Returns the job count for the specified resource type. Use request + // GetSupportedResourceTypes to obtain strings for supported resource types. The + // the value ANY returns count of all resource types. AGGREGATE_ALL aggregates job + // counts for all resource types and returns the sum. The type of Amazon Web + // Services resource to be backed up; for example, an Amazon Elastic Block Store + // (Amazon EBS) volume or an Amazon Relational Database Service (Amazon RDS) + // database. + ResourceType *string + + // This parameter returns the job count for jobs with the specified state. The the + // value ANY returns count of all states. AGGREGATE_ALL aggregates job counts for + // all states and returns the sum. + State types.BackupJobStatus + + noSmithyDocumentSerde +} + +type ListBackupJobSummariesOutput struct { + + // This is the period that sets the boundaries for returned results. + // - ONE_DAY for daily job count for the prior 14 days. + // - SEVEN_DAYS for the aggregated job count for the prior 7 days. + // - FOURTEEN_DAYS for aggregated job count for prior 14 days. + AggregationPeriod *string + + // This request returns a summary that contains Region, Account, State, + // ResourceType, MessageCategory, StartTime, EndTime, and Count of included jobs. + BackupJobSummaries []types.BackupJobSummary + + // The next item following a partial list of returned resources. For example, if a + // request is made to return maxResults number of resources, NextToken allows you + // to return more items in your list starting at the location pointed to by the + // next token. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListBackupJobSummariesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListBackupJobSummaries{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListBackupJobSummaries{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addListBackupJobSummariesResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBackupJobSummaries(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListBackupJobSummariesAPIClient is a client that implements the +// ListBackupJobSummaries operation. +type ListBackupJobSummariesAPIClient interface { + ListBackupJobSummaries(context.Context, *ListBackupJobSummariesInput, ...func(*Options)) (*ListBackupJobSummariesOutput, error) +} + +var _ ListBackupJobSummariesAPIClient = (*Client)(nil) + +// ListBackupJobSummariesPaginatorOptions is the paginator options for +// ListBackupJobSummaries +type ListBackupJobSummariesPaginatorOptions struct { + // This parameter sets the maximum number of items to be returned. The value is an + // integer. Range of accepted values is from 1 to 500. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListBackupJobSummariesPaginator is a paginator for ListBackupJobSummaries +type ListBackupJobSummariesPaginator struct { + options ListBackupJobSummariesPaginatorOptions + client ListBackupJobSummariesAPIClient + params *ListBackupJobSummariesInput + nextToken *string + firstPage bool +} + +// NewListBackupJobSummariesPaginator returns a new ListBackupJobSummariesPaginator +func NewListBackupJobSummariesPaginator(client ListBackupJobSummariesAPIClient, params *ListBackupJobSummariesInput, optFns ...func(*ListBackupJobSummariesPaginatorOptions)) *ListBackupJobSummariesPaginator { + if params == nil { + params = &ListBackupJobSummariesInput{} + } + + options := ListBackupJobSummariesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListBackupJobSummariesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListBackupJobSummariesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListBackupJobSummaries page. +func (p *ListBackupJobSummariesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListBackupJobSummariesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListBackupJobSummaries(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListBackupJobSummaries(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "backup", + OperationName: "ListBackupJobSummaries", + } +} + +type opListBackupJobSummariesResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opListBackupJobSummariesResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opListBackupJobSummariesResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "backup" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "backup" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("backup") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addListBackupJobSummariesResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opListBackupJobSummariesResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/backup/api_op_ListBackupJobs.go b/service/backup/api_op_ListBackupJobs.go index e2d683c3e87..0a3acb42964 100644 --- a/service/backup/api_op_ListBackupJobs.go +++ b/service/backup/api_op_ListBackupJobs.go @@ -62,6 +62,12 @@ type ListBackupJobsInput struct { // Returns only backup jobs that were created before the specified date. ByCreatedBefore *time.Time + // This returns a list of backup jobs for the specified message category. Example + // strings may include AccessDenied , Success , and InvalidParameters . See + // Monitoring (https://docs.aws.amazon.com/aws-backup/latest/devguide/monitoring.html) + // for a list of MessageCategory strings. + ByMessageCategory *string + // This is a filter to list child (nested) jobs based on parent job ID. ByParentJobId *string diff --git a/service/backup/api_op_ListCopyJobSummaries.go b/service/backup/api_op_ListCopyJobSummaries.go new file mode 100644 index 00000000000..f9c73cb6a5a --- /dev/null +++ b/service/backup/api_op_ListCopyJobSummaries.go @@ -0,0 +1,408 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package backup + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/backup/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// This request obtains a list of copy jobs created or running within the the most +// recent 30 days. You can include parameters AccountID, State, ResourceType, +// MessageCategory, AggregationPeriod, MaxResults, or NextToken to filter results. +// This request returns a summary that contains Region, Account, State, +// RestourceType, MessageCategory, StartTime, EndTime, and Count of included jobs. +func (c *Client) ListCopyJobSummaries(ctx context.Context, params *ListCopyJobSummariesInput, optFns ...func(*Options)) (*ListCopyJobSummariesOutput, error) { + if params == nil { + params = &ListCopyJobSummariesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListCopyJobSummaries", params, optFns, c.addOperationListCopyJobSummariesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListCopyJobSummariesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListCopyJobSummariesInput struct { + + // Returns the job count for the specified account. If the request is sent from a + // member account or an account not part of Amazon Web Services Organizations, jobs + // within requestor's account will be returned. Root, admin, and delegated + // administrator accounts can use the value ANY to return job counts from every + // account in the organization. AGGREGATE_ALL aggregates job counts from all + // accounts within the authenticated organization, then returns the sum. + AccountId *string + + // This is the period that sets the boundaries for returned results. + // - ONE_DAY for daily job count for the prior 14 days. + // - SEVEN_DAYS for the aggregated job count for the prior 7 days. + // - FOURTEEN_DAYS for aggregated job count for prior 14 days. + AggregationPeriod types.AggregationPeriod + + // This parameter sets the maximum number of items to be returned. The value is an + // integer. Range of accepted values is from 1 to 500. + MaxResults *int32 + + // This parameter returns the job count for the specified message category. + // Example accepted strings include AccessDenied , Success , and InvalidParameters + // . See Monitoring (https://docs.aws.amazon.com/aws-backup/latest/devguide/monitoring.html) + // for a list of accepted MessageCategory strings. The the value ANY returns count + // of all message categories. AGGREGATE_ALL aggregates job counts for all message + // categories and returns the sum. + MessageCategory *string + + // The next item following a partial list of returned resources. For example, if a + // request is made to return maxResults number of resources, NextToken allows you + // to return more items in your list starting at the location pointed to by the + // next token. + NextToken *string + + // Returns the job count for the specified resource type. Use request + // GetSupportedResourceTypes to obtain strings for supported resource types. The + // the value ANY returns count of all resource types. AGGREGATE_ALL aggregates job + // counts for all resource types and returns the sum. The type of Amazon Web + // Services resource to be backed up; for example, an Amazon Elastic Block Store + // (Amazon EBS) volume or an Amazon Relational Database Service (Amazon RDS) + // database. + ResourceType *string + + // This parameter returns the job count for jobs with the specified state. The the + // value ANY returns count of all states. AGGREGATE_ALL aggregates job counts for + // all states and returns the sum. + State types.CopyJobStatus + + noSmithyDocumentSerde +} + +type ListCopyJobSummariesOutput struct { + + // This is the period that sets the boundaries for returned results. + // - ONE_DAY for daily job count for the prior 14 days. + // - SEVEN_DAYS for the aggregated job count for the prior 7 days. + // - FOURTEEN_DAYS for aggregated job count for prior 14 days. + AggregationPeriod *string + + // This return shows a summary that contains Region, Account, State, ResourceType, + // MessageCategory, StartTime, EndTime, and Count of included jobs. + CopyJobSummaries []types.CopyJobSummary + + // The next item following a partial list of returned resources. For example, if a + // request is made to return maxResults number of resources, NextToken allows you + // to return more items in your list starting at the location pointed to by the + // next token. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListCopyJobSummariesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListCopyJobSummaries{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListCopyJobSummaries{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addListCopyJobSummariesResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCopyJobSummaries(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListCopyJobSummariesAPIClient is a client that implements the +// ListCopyJobSummaries operation. +type ListCopyJobSummariesAPIClient interface { + ListCopyJobSummaries(context.Context, *ListCopyJobSummariesInput, ...func(*Options)) (*ListCopyJobSummariesOutput, error) +} + +var _ ListCopyJobSummariesAPIClient = (*Client)(nil) + +// ListCopyJobSummariesPaginatorOptions is the paginator options for +// ListCopyJobSummaries +type ListCopyJobSummariesPaginatorOptions struct { + // This parameter sets the maximum number of items to be returned. The value is an + // integer. Range of accepted values is from 1 to 500. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListCopyJobSummariesPaginator is a paginator for ListCopyJobSummaries +type ListCopyJobSummariesPaginator struct { + options ListCopyJobSummariesPaginatorOptions + client ListCopyJobSummariesAPIClient + params *ListCopyJobSummariesInput + nextToken *string + firstPage bool +} + +// NewListCopyJobSummariesPaginator returns a new ListCopyJobSummariesPaginator +func NewListCopyJobSummariesPaginator(client ListCopyJobSummariesAPIClient, params *ListCopyJobSummariesInput, optFns ...func(*ListCopyJobSummariesPaginatorOptions)) *ListCopyJobSummariesPaginator { + if params == nil { + params = &ListCopyJobSummariesInput{} + } + + options := ListCopyJobSummariesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListCopyJobSummariesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListCopyJobSummariesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListCopyJobSummaries page. +func (p *ListCopyJobSummariesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCopyJobSummariesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListCopyJobSummaries(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListCopyJobSummaries(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "backup", + OperationName: "ListCopyJobSummaries", + } +} + +type opListCopyJobSummariesResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opListCopyJobSummariesResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opListCopyJobSummariesResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "backup" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "backup" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("backup") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addListCopyJobSummariesResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opListCopyJobSummariesResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/backup/api_op_ListCopyJobs.go b/service/backup/api_op_ListCopyJobs.go index e2547efaaeb..b4b25ae9aa3 100644 --- a/service/backup/api_op_ListCopyJobs.go +++ b/service/backup/api_op_ListCopyJobs.go @@ -58,6 +58,14 @@ type ListCopyJobsInput struct { // . ByDestinationVaultArn *string + // This parameter returns the job count for the specified message category. + // Example accepted strings include AccessDenied , Success , and InvalidParameters + // . See Monitoring (https://docs.aws.amazon.com/aws-backup/latest/devguide/monitoring.html) + // for a list of accepted MessageCategory strings. The the value ANY returns count + // of all message categories. AGGREGATE_ALL aggregates job counts for all message + // categories and returns the sum. + ByMessageCategory *string + // This is a filter to list child (nested) jobs based on parent job ID. ByParentJobId *string diff --git a/service/backup/api_op_ListRestoreJobSummaries.go b/service/backup/api_op_ListRestoreJobSummaries.go new file mode 100644 index 00000000000..6d719e62986 --- /dev/null +++ b/service/backup/api_op_ListRestoreJobSummaries.go @@ -0,0 +1,402 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package backup + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/backup/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// This request obtains a summary of restore jobs created or running within the +// the most recent 30 days. You can include parameters AccountID, State, +// ResourceType, AggregationPeriod, MaxResults, or NextToken to filter results. +// This request returns a summary that contains Region, Account, State, +// RestourceType, MessageCategory, StartTime, EndTime, and Count of included jobs. +func (c *Client) ListRestoreJobSummaries(ctx context.Context, params *ListRestoreJobSummariesInput, optFns ...func(*Options)) (*ListRestoreJobSummariesOutput, error) { + if params == nil { + params = &ListRestoreJobSummariesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListRestoreJobSummaries", params, optFns, c.addOperationListRestoreJobSummariesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListRestoreJobSummariesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListRestoreJobSummariesInput struct { + + // Returns the job count for the specified account. If the request is sent from a + // member account or an account not part of Amazon Web Services Organizations, jobs + // within requestor's account will be returned. Root, admin, and delegated + // administrator accounts can use the value ANY to return job counts from every + // account in the organization. AGGREGATE_ALL aggregates job counts from all + // accounts within the authenticated organization, then returns the sum. + AccountId *string + + // This is the period that sets the boundaries for returned results. Acceptable + // values include + // - ONE_DAY for daily job count for the prior 14 days. + // - SEVEN_DAYS for the aggregated job count for the prior 7 days. + // - FOURTEEN_DAYS for aggregated job count for prior 14 days. + AggregationPeriod types.AggregationPeriod + + // This parameter sets the maximum number of items to be returned. The value is an + // integer. Range of accepted values is from 1 to 500. + MaxResults *int32 + + // The next item following a partial list of returned resources. For example, if a + // request is made to return maxResults number of resources, NextToken allows you + // to return more items in your list starting at the location pointed to by the + // next token. + NextToken *string + + // Returns the job count for the specified resource type. Use request + // GetSupportedResourceTypes to obtain strings for supported resource types. The + // the value ANY returns count of all resource types. AGGREGATE_ALL aggregates job + // counts for all resource types and returns the sum. The type of Amazon Web + // Services resource to be backed up; for example, an Amazon Elastic Block Store + // (Amazon EBS) volume or an Amazon Relational Database Service (Amazon RDS) + // database. + ResourceType *string + + // This parameter returns the job count for jobs with the specified state. The the + // value ANY returns count of all states. AGGREGATE_ALL aggregates job counts for + // all states and returns the sum. + State types.RestoreJobState + + noSmithyDocumentSerde +} + +type ListRestoreJobSummariesOutput struct { + + // This is the period that sets the boundaries for returned results. + // - ONE_DAY for daily job count for the prior 14 days. + // - SEVEN_DAYS for the aggregated job count for the prior 7 days. + // - FOURTEEN_DAYS for aggregated job count for prior 14 days. + AggregationPeriod *string + + // The next item following a partial list of returned resources. For example, if a + // request is made to return maxResults number of resources, NextToken allows you + // to return more items in your list starting at the location pointed to by the + // next token. + NextToken *string + + // This return contains a summary that contains Region, Account, State, + // ResourceType, MessageCategory, StartTime, EndTime, and Count of included jobs. + RestoreJobSummaries []types.RestoreJobSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListRestoreJobSummariesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListRestoreJobSummaries{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListRestoreJobSummaries{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addListRestoreJobSummariesResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRestoreJobSummaries(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListRestoreJobSummariesAPIClient is a client that implements the +// ListRestoreJobSummaries operation. +type ListRestoreJobSummariesAPIClient interface { + ListRestoreJobSummaries(context.Context, *ListRestoreJobSummariesInput, ...func(*Options)) (*ListRestoreJobSummariesOutput, error) +} + +var _ ListRestoreJobSummariesAPIClient = (*Client)(nil) + +// ListRestoreJobSummariesPaginatorOptions is the paginator options for +// ListRestoreJobSummaries +type ListRestoreJobSummariesPaginatorOptions struct { + // This parameter sets the maximum number of items to be returned. The value is an + // integer. Range of accepted values is from 1 to 500. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListRestoreJobSummariesPaginator is a paginator for ListRestoreJobSummaries +type ListRestoreJobSummariesPaginator struct { + options ListRestoreJobSummariesPaginatorOptions + client ListRestoreJobSummariesAPIClient + params *ListRestoreJobSummariesInput + nextToken *string + firstPage bool +} + +// NewListRestoreJobSummariesPaginator returns a new +// ListRestoreJobSummariesPaginator +func NewListRestoreJobSummariesPaginator(client ListRestoreJobSummariesAPIClient, params *ListRestoreJobSummariesInput, optFns ...func(*ListRestoreJobSummariesPaginatorOptions)) *ListRestoreJobSummariesPaginator { + if params == nil { + params = &ListRestoreJobSummariesInput{} + } + + options := ListRestoreJobSummariesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListRestoreJobSummariesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListRestoreJobSummariesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListRestoreJobSummaries page. +func (p *ListRestoreJobSummariesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListRestoreJobSummariesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListRestoreJobSummaries(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListRestoreJobSummaries(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "backup", + OperationName: "ListRestoreJobSummaries", + } +} + +type opListRestoreJobSummariesResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opListRestoreJobSummariesResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opListRestoreJobSummariesResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "backup" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "backup" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("backup") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addListRestoreJobSummariesResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opListRestoreJobSummariesResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/backup/deserializers.go b/service/backup/deserializers.go index 441ee5b9f01..6ac8e590a2c 100644 --- a/service/backup/deserializers.go +++ b/service/backup/deserializers.go @@ -2766,6 +2766,15 @@ func awsRestjson1_deserializeOpDocumentDescribeBackupJobOutput(v **DescribeBacku sv.IsParent = jtv } + case "MessageCategory": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.MessageCategory = ptr.String(jtv) + } + case "NumberOfChildJobs": if value != nil { jtv, ok := value.(json.Number) @@ -7242,6 +7251,174 @@ func awsRestjson1_deserializeOpDocumentListBackupJobsOutput(v **ListBackupJobsOu return nil } +type awsRestjson1_deserializeOpListBackupJobSummaries struct { +} + +func (*awsRestjson1_deserializeOpListBackupJobSummaries) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListBackupJobSummaries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListBackupJobSummaries(response, &metadata) + } + output := &ListBackupJobSummariesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, 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 out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListBackupJobSummariesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListBackupJobSummaries(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + 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) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListBackupJobSummariesOutput(v **ListBackupJobSummariesOutput, 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 *ListBackupJobSummariesOutput + if *v == nil { + sv = &ListBackupJobSummariesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AggregationPeriod": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.AggregationPeriod = ptr.String(jtv) + } + + case "BackupJobSummaries": + if err := awsRestjson1_deserializeDocumentBackupJobSummaryList(&sv.BackupJobSummaries, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpListBackupPlans struct { } @@ -8226,14 +8403,14 @@ func awsRestjson1_deserializeOpDocumentListCopyJobsOutput(v **ListCopyJobsOutput return nil } -type awsRestjson1_deserializeOpListFrameworks struct { +type awsRestjson1_deserializeOpListCopyJobSummaries struct { } -func (*awsRestjson1_deserializeOpListFrameworks) ID() string { +func (*awsRestjson1_deserializeOpListCopyJobSummaries) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListFrameworks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListCopyJobSummaries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8247,9 +8424,9 @@ func (m *awsRestjson1_deserializeOpListFrameworks) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListFrameworks(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListCopyJobSummaries(response, &metadata) } - output := &ListFrameworksOutput{} + output := &ListCopyJobSummariesOutput{} out.Result = output var buff [1024]byte @@ -8270,7 +8447,7 @@ func (m *awsRestjson1_deserializeOpListFrameworks) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListFrameworksOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListCopyJobSummariesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8283,7 +8460,7 @@ func (m *awsRestjson1_deserializeOpListFrameworks) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorListFrameworks(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListCopyJobSummaries(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8340,7 +8517,7 @@ func awsRestjson1_deserializeOpErrorListFrameworks(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentListFrameworksOutput(v **ListFrameworksOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListCopyJobSummariesOutput(v **ListCopyJobSummariesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8353,17 +8530,26 @@ func awsRestjson1_deserializeOpDocumentListFrameworksOutput(v **ListFrameworksOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListFrameworksOutput + var sv *ListCopyJobSummariesOutput if *v == nil { - sv = &ListFrameworksOutput{} + sv = &ListCopyJobSummariesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Frameworks": - if err := awsRestjson1_deserializeDocumentFrameworkList(&sv.Frameworks, value); err != nil { + case "AggregationPeriod": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.AggregationPeriod = ptr.String(jtv) + } + + case "CopyJobSummaries": + if err := awsRestjson1_deserializeDocumentCopyJobSummaryList(&sv.CopyJobSummaries, value); err != nil { return err } @@ -8385,14 +8571,14 @@ func awsRestjson1_deserializeOpDocumentListFrameworksOutput(v **ListFrameworksOu return nil } -type awsRestjson1_deserializeOpListLegalHolds struct { +type awsRestjson1_deserializeOpListFrameworks struct { } -func (*awsRestjson1_deserializeOpListLegalHolds) ID() string { +func (*awsRestjson1_deserializeOpListFrameworks) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListLegalHolds) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListFrameworks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8406,9 +8592,9 @@ func (m *awsRestjson1_deserializeOpListLegalHolds) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListLegalHolds(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListFrameworks(response, &metadata) } - output := &ListLegalHoldsOutput{} + output := &ListFrameworksOutput{} out.Result = output var buff [1024]byte @@ -8429,7 +8615,7 @@ func (m *awsRestjson1_deserializeOpListLegalHolds) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListLegalHoldsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListFrameworksOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8442,7 +8628,7 @@ func (m *awsRestjson1_deserializeOpListLegalHolds) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorListLegalHolds(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListFrameworks(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8499,7 +8685,7 @@ func awsRestjson1_deserializeOpErrorListLegalHolds(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentListLegalHoldsOutput(v **ListLegalHoldsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListFrameworksOutput(v **ListFrameworksOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8512,17 +8698,17 @@ func awsRestjson1_deserializeOpDocumentListLegalHoldsOutput(v **ListLegalHoldsOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListLegalHoldsOutput + var sv *ListFrameworksOutput if *v == nil { - sv = &ListLegalHoldsOutput{} + sv = &ListFrameworksOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "LegalHolds": - if err := awsRestjson1_deserializeDocumentLegalHoldsList(&sv.LegalHolds, value); err != nil { + case "Frameworks": + if err := awsRestjson1_deserializeDocumentFrameworkList(&sv.Frameworks, value); err != nil { return err } @@ -8544,14 +8730,14 @@ func awsRestjson1_deserializeOpDocumentListLegalHoldsOutput(v **ListLegalHoldsOu return nil } -type awsRestjson1_deserializeOpListProtectedResources struct { +type awsRestjson1_deserializeOpListLegalHolds struct { } -func (*awsRestjson1_deserializeOpListProtectedResources) ID() string { +func (*awsRestjson1_deserializeOpListLegalHolds) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListProtectedResources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListLegalHolds) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8565,9 +8751,9 @@ func (m *awsRestjson1_deserializeOpListProtectedResources) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListProtectedResources(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListLegalHolds(response, &metadata) } - output := &ListProtectedResourcesOutput{} + output := &ListLegalHoldsOutput{} out.Result = output var buff [1024]byte @@ -8588,7 +8774,7 @@ func (m *awsRestjson1_deserializeOpListProtectedResources) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListProtectedResourcesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListLegalHoldsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8601,7 +8787,7 @@ func (m *awsRestjson1_deserializeOpListProtectedResources) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListProtectedResources(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListLegalHolds(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8658,7 +8844,7 @@ func awsRestjson1_deserializeOpErrorListProtectedResources(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentListProtectedResourcesOutput(v **ListProtectedResourcesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListLegalHoldsOutput(v **ListLegalHoldsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8671,15 +8857,20 @@ func awsRestjson1_deserializeOpDocumentListProtectedResourcesOutput(v **ListProt return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListProtectedResourcesOutput + var sv *ListLegalHoldsOutput if *v == nil { - sv = &ListProtectedResourcesOutput{} + sv = &ListLegalHoldsOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "LegalHolds": + if err := awsRestjson1_deserializeDocumentLegalHoldsList(&sv.LegalHolds, value); err != nil { + return err + } + case "NextToken": if value != nil { jtv, ok := value.(string) @@ -8689,11 +8880,6 @@ func awsRestjson1_deserializeOpDocumentListProtectedResourcesOutput(v **ListProt sv.NextToken = ptr.String(jtv) } - case "Results": - if err := awsRestjson1_deserializeDocumentProtectedResourcesList(&sv.Results, value); err != nil { - return err - } - default: _, _ = key, value @@ -8703,14 +8889,14 @@ func awsRestjson1_deserializeOpDocumentListProtectedResourcesOutput(v **ListProt return nil } -type awsRestjson1_deserializeOpListProtectedResourcesByBackupVault struct { +type awsRestjson1_deserializeOpListProtectedResources struct { } -func (*awsRestjson1_deserializeOpListProtectedResourcesByBackupVault) ID() string { +func (*awsRestjson1_deserializeOpListProtectedResources) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListProtectedResourcesByBackupVault) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListProtectedResources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8724,9 +8910,9 @@ func (m *awsRestjson1_deserializeOpListProtectedResourcesByBackupVault) HandleDe } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListProtectedResourcesByBackupVault(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListProtectedResources(response, &metadata) } - output := &ListProtectedResourcesByBackupVaultOutput{} + output := &ListProtectedResourcesOutput{} out.Result = output var buff [1024]byte @@ -8747,7 +8933,7 @@ func (m *awsRestjson1_deserializeOpListProtectedResourcesByBackupVault) HandleDe return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListProtectedResourcesByBackupVaultOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListProtectedResourcesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8760,7 +8946,7 @@ func (m *awsRestjson1_deserializeOpListProtectedResourcesByBackupVault) HandleDe return out, metadata, err } -func awsRestjson1_deserializeOpErrorListProtectedResourcesByBackupVault(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListProtectedResources(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8804,9 +8990,6 @@ func awsRestjson1_deserializeOpErrorListProtectedResourcesByBackupVault(response case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) @@ -8820,7 +9003,7 @@ func awsRestjson1_deserializeOpErrorListProtectedResourcesByBackupVault(response } } -func awsRestjson1_deserializeOpDocumentListProtectedResourcesByBackupVaultOutput(v **ListProtectedResourcesByBackupVaultOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListProtectedResourcesOutput(v **ListProtectedResourcesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8833,9 +9016,171 @@ func awsRestjson1_deserializeOpDocumentListProtectedResourcesByBackupVaultOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListProtectedResourcesByBackupVaultOutput + var sv *ListProtectedResourcesOutput if *v == nil { - sv = &ListProtectedResourcesByBackupVaultOutput{} + sv = &ListProtectedResourcesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Results": + if err := awsRestjson1_deserializeDocumentProtectedResourcesList(&sv.Results, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListProtectedResourcesByBackupVault struct { +} + +func (*awsRestjson1_deserializeOpListProtectedResourcesByBackupVault) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListProtectedResourcesByBackupVault) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListProtectedResourcesByBackupVault(response, &metadata) + } + output := &ListProtectedResourcesByBackupVaultOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, 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 out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListProtectedResourcesByBackupVaultOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListProtectedResourcesByBackupVault(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + 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) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListProtectedResourcesByBackupVaultOutput(v **ListProtectedResourcesByBackupVaultOutput, 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 *ListProtectedResourcesByBackupVaultOutput + if *v == nil { + sv = &ListProtectedResourcesByBackupVaultOutput{} } else { sv = *v } @@ -9843,6 +10188,174 @@ func awsRestjson1_deserializeOpDocumentListRestoreJobsOutput(v **ListRestoreJobs return nil } +type awsRestjson1_deserializeOpListRestoreJobSummaries struct { +} + +func (*awsRestjson1_deserializeOpListRestoreJobSummaries) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListRestoreJobSummaries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListRestoreJobSummaries(response, &metadata) + } + output := &ListRestoreJobSummariesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, 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 out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListRestoreJobSummariesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListRestoreJobSummaries(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + 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) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListRestoreJobSummariesOutput(v **ListRestoreJobSummariesOutput, 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 *ListRestoreJobSummariesOutput + if *v == nil { + sv = &ListRestoreJobSummariesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AggregationPeriod": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.AggregationPeriod = ptr.String(jtv) + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "RestoreJobSummaries": + if err := awsRestjson1_deserializeDocumentRestoreJobSummaryList(&sv.RestoreJobSummaries, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpListTags struct { } @@ -12968,6 +13481,15 @@ func awsRestjson1_deserializeDocumentBackupJob(v **types.BackupJob, value interf sv.IsParent = jtv } + case "MessageCategory": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.MessageCategory = ptr.String(jtv) + } + case "ParentJobId": if value != nil { jtv, ok := value.(string) @@ -13038,22 +13560,217 @@ func awsRestjson1_deserializeDocumentBackupJob(v **types.BackupJob, value interf } } - case "State": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected BackupJobState to be of type string, got %T instead", value) + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BackupJobState to be of type string, got %T instead", value) + } + sv.State = types.BackupJobState(jtv) + } + + case "StatusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.StatusMessage = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentBackupJobChildJobsInState(v *map[string]int64, 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 mv map[string]int64 + if *v == nil { + mv = map[string]int64{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal int64 + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + parsedVal = i64 + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentBackupJobsList(v *[]types.BackupJob, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.BackupJob + if *v == nil { + cv = []types.BackupJob{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BackupJob + destAddr := &col + if err := awsRestjson1_deserializeDocumentBackupJob(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentBackupJobSummary(v **types.BackupJobSummary, 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.BackupJobSummary + if *v == nil { + sv = &types.BackupJobSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "Count": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Count = int32(i64) + } + + case "EndTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "MessageCategory": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageCategory to be of type string, got %T instead", value) + } + sv.MessageCategory = ptr.String(jtv) + } + + case "Region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Region to be of type string, got %T instead", value) + } + sv.Region = ptr.String(jtv) + } + + case "ResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + case "StartTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected timestamp to be a JSON Number, got %T instead", value) + } - sv.State = types.BackupJobState(jtv) } - case "StatusMessage": + case "State": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected string to be of type string, got %T instead", value) + return fmt.Errorf("expected BackupJobStatus to be of type string, got %T instead", value) } - sv.StatusMessage = ptr.String(jtv) + sv.State = types.BackupJobStatus(jtv) } default: @@ -13065,47 +13782,7 @@ func awsRestjson1_deserializeDocumentBackupJob(v **types.BackupJob, value interf return nil } -func awsRestjson1_deserializeDocumentBackupJobChildJobsInState(v *map[string]int64, 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 mv map[string]int64 - if *v == nil { - mv = map[string]int64{} - } else { - mv = *v - } - - for key, value := range shape { - var parsedVal int64 - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected Long to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - parsedVal = i64 - } - mv[key] = parsedVal - - } - *v = mv - return nil -} - -func awsRestjson1_deserializeDocumentBackupJobsList(v *[]types.BackupJob, value interface{}) error { +func awsRestjson1_deserializeDocumentBackupJobSummaryList(v *[]types.BackupJobSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -13118,17 +13795,17 @@ func awsRestjson1_deserializeDocumentBackupJobsList(v *[]types.BackupJob, value return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.BackupJob + var cv []types.BackupJobSummary if *v == nil { - cv = []types.BackupJob{} + cv = []types.BackupJobSummary{} } else { cv = *v } for _, value := range shape { - var col types.BackupJob + var col types.BackupJobSummary destAddr := &col - if err := awsRestjson1_deserializeDocumentBackupJob(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentBackupJobSummary(&destAddr, value); err != nil { return err } col = *destAddr @@ -14765,62 +15442,277 @@ func awsRestjson1_deserializeDocumentCopyJob(v **types.CopyJob, value interface{ sv.DestinationRecoveryPointArn = ptr.String(jtv) } - case "IamRoleArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected IAMRoleArn to be of type string, got %T instead", value) - } - sv.IamRoleArn = ptr.String(jtv) - } + case "IamRoleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IAMRoleArn to be of type string, got %T instead", value) + } + sv.IamRoleArn = ptr.String(jtv) + } + + case "IsParent": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean2 to be of type *bool, got %T instead", value) + } + sv.IsParent = jtv + } + + case "MessageCategory": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.MessageCategory = ptr.String(jtv) + } + + case "NumberOfChildJobs": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.NumberOfChildJobs = ptr.Int64(i64) + } + + case "ParentJobId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.ParentJobId = ptr.String(jtv) + } + + case "ResourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.ResourceArn = ptr.String(jtv) + } + + case "ResourceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.ResourceName = ptr.String(jtv) + } + + case "ResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + case "SourceBackupVaultArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.SourceBackupVaultArn = ptr.String(jtv) + } + + case "SourceRecoveryPointArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.SourceRecoveryPointArn = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CopyJobState to be of type string, got %T instead", value) + } + sv.State = types.CopyJobState(jtv) + } + + case "StatusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.StatusMessage = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCopyJobChildJobsInState(v *map[string]int64, 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 mv map[string]int64 + if *v == nil { + mv = map[string]int64{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal int64 + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + parsedVal = i64 + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentCopyJobsList(v *[]types.CopyJob, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.CopyJob + if *v == nil { + cv = []types.CopyJob{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CopyJob + destAddr := &col + if err := awsRestjson1_deserializeDocumentCopyJob(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentCopyJobSummary(v **types.CopyJobSummary, 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.CopyJobSummary + if *v == nil { + sv = &types.CopyJobSummary{} + } else { + sv = *v + } - case "IsParent": + for key, value := range shape { + switch key { + case "AccountId": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Boolean2 to be of type *bool, got %T instead", value) + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) } - sv.IsParent = jtv + sv.AccountId = ptr.String(jtv) } - case "NumberOfChildJobs": + case "Count": if value != nil { jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + return fmt.Errorf("expected integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } - sv.NumberOfChildJobs = ptr.Int64(i64) + sv.Count = int32(i64) } - case "ParentJobId": + case "EndTime": if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected string to be of type string, got %T instead", value) + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected timestamp to be a JSON Number, got %T instead", value) + } - sv.ParentJobId = ptr.String(jtv) } - case "ResourceArn": + case "MessageCategory": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + return fmt.Errorf("expected MessageCategory to be of type string, got %T instead", value) } - sv.ResourceArn = ptr.String(jtv) + sv.MessageCategory = ptr.String(jtv) } - case "ResourceName": + case "Region": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected string to be of type string, got %T instead", value) + return fmt.Errorf("expected Region to be of type string, got %T instead", value) } - sv.ResourceName = ptr.String(jtv) + sv.Region = ptr.String(jtv) } case "ResourceType": @@ -14832,40 +15724,29 @@ func awsRestjson1_deserializeDocumentCopyJob(v **types.CopyJob, value interface{ sv.ResourceType = ptr.String(jtv) } - case "SourceBackupVaultArn": + case "StartTime": if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ARN to be of type string, got %T instead", value) - } - sv.SourceBackupVaultArn = ptr.String(jtv) - } + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - case "SourceRecoveryPointArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ARN to be of type string, got %T instead", value) - } - sv.SourceRecoveryPointArn = ptr.String(jtv) - } + default: + return fmt.Errorf("expected timestamp to be a JSON Number, got %T instead", value) - case "State": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected CopyJobState to be of type string, got %T instead", value) } - sv.State = types.CopyJobState(jtv) } - case "StatusMessage": + case "State": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected string to be of type string, got %T instead", value) + return fmt.Errorf("expected CopyJobStatus to be of type string, got %T instead", value) } - sv.StatusMessage = ptr.String(jtv) + sv.State = types.CopyJobStatus(jtv) } default: @@ -14877,47 +15758,7 @@ func awsRestjson1_deserializeDocumentCopyJob(v **types.CopyJob, value interface{ return nil } -func awsRestjson1_deserializeDocumentCopyJobChildJobsInState(v *map[string]int64, 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 mv map[string]int64 - if *v == nil { - mv = map[string]int64{} - } else { - mv = *v - } - - for key, value := range shape { - var parsedVal int64 - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected Long to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - parsedVal = i64 - } - mv[key] = parsedVal - - } - *v = mv - return nil -} - -func awsRestjson1_deserializeDocumentCopyJobsList(v *[]types.CopyJob, value interface{}) error { +func awsRestjson1_deserializeDocumentCopyJobSummaryList(v *[]types.CopyJobSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -14930,17 +15771,17 @@ func awsRestjson1_deserializeDocumentCopyJobsList(v *[]types.CopyJob, value inte return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.CopyJob + var cv []types.CopyJobSummary if *v == nil { - cv = []types.CopyJob{} + cv = []types.CopyJobSummary{} } else { cv = *v } for _, value := range shape { - var col types.CopyJob + var col types.CopyJobSummary destAddr := &col - if err := awsRestjson1_deserializeDocumentCopyJob(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentCopyJobSummary(&destAddr, value); err != nil { return err } col = *destAddr @@ -17700,6 +18541,152 @@ func awsRestjson1_deserializeDocumentRestoreJobsListMember(v **types.RestoreJobs return nil } +func awsRestjson1_deserializeDocumentRestoreJobSummary(v **types.RestoreJobSummary, 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.RestoreJobSummary + if *v == nil { + sv = &types.RestoreJobSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "Count": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Count = int32(i64) + } + + case "EndTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Region to be of type string, got %T instead", value) + } + sv.Region = ptr.String(jtv) + } + + case "ResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + case "StartTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RestoreJobState to be of type string, got %T instead", value) + } + sv.State = types.RestoreJobState(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRestoreJobSummaryList(v *[]types.RestoreJobSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.RestoreJobSummary + if *v == nil { + cv = []types.RestoreJobSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RestoreJobSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentRestoreJobSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentServiceUnavailableException(v **types.ServiceUnavailableException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/backup/endpoints.go b/service/backup/endpoints.go index 55f697dc70d..3d129c43ea0 100644 --- a/service/backup/endpoints.go +++ b/service/backup/endpoints.go @@ -430,7 +430,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { uriString := func() string { var out strings.Builder out.WriteString("https://backup-fips.") diff --git a/service/backup/endpoints_test.go b/service/backup/endpoints_test.go index 321491c725e..69c48844355 100644 --- a/service/backup/endpoints_test.go +++ b/service/backup/endpoints_test.go @@ -1751,3 +1751,23 @@ func TestEndpointCase47(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Partition doesn't support DualStack +func TestEndpointCase48(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/backup/generated.json b/service/backup/generated.json index 9057aa25f0f..3ca6592d3da 100644 --- a/service/backup/generated.json +++ b/service/backup/generated.json @@ -49,12 +49,14 @@ "api_op_GetLegalHold.go", "api_op_GetRecoveryPointRestoreMetadata.go", "api_op_GetSupportedResourceTypes.go", + "api_op_ListBackupJobSummaries.go", "api_op_ListBackupJobs.go", "api_op_ListBackupPlanTemplates.go", "api_op_ListBackupPlanVersions.go", "api_op_ListBackupPlans.go", "api_op_ListBackupSelections.go", "api_op_ListBackupVaults.go", + "api_op_ListCopyJobSummaries.go", "api_op_ListCopyJobs.go", "api_op_ListFrameworks.go", "api_op_ListLegalHolds.go", @@ -65,6 +67,7 @@ "api_op_ListRecoveryPointsByResource.go", "api_op_ListReportJobs.go", "api_op_ListReportPlans.go", + "api_op_ListRestoreJobSummaries.go", "api_op_ListRestoreJobs.go", "api_op_ListTags.go", "api_op_PutBackupVaultAccessPolicy.go", diff --git a/service/backup/serializers.go b/service/backup/serializers.go index 7f61e71fe76..1c9c3e9276c 100644 --- a/service/backup/serializers.go +++ b/service/backup/serializers.go @@ -2988,6 +2988,10 @@ func awsRestjson1_serializeOpHttpBindingsListBackupJobsInput(v *ListBackupJobsIn encoder.SetQuery("createdBefore").String(smithytime.FormatDateTime(*v.ByCreatedBefore)) } + if v.ByMessageCategory != nil { + encoder.SetQuery("messageCategory").String(*v.ByMessageCategory) + } + if v.ByParentJobId != nil { encoder.SetQuery("parentJobId").String(*v.ByParentJobId) } @@ -3015,6 +3019,90 @@ func awsRestjson1_serializeOpHttpBindingsListBackupJobsInput(v *ListBackupJobsIn return nil } +type awsRestjson1_serializeOpListBackupJobSummaries struct { +} + +func (*awsRestjson1_serializeOpListBackupJobSummaries) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListBackupJobSummaries) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListBackupJobSummariesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/audit/backup-job-summaries") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListBackupJobSummariesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListBackupJobSummariesInput(v *ListBackupJobSummariesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AccountId != nil { + encoder.SetQuery("AccountId").String(*v.AccountId) + } + + if len(v.AggregationPeriod) > 0 { + encoder.SetQuery("AggregationPeriod").String(string(v.AggregationPeriod)) + } + + if v.MaxResults != nil { + encoder.SetQuery("MaxResults").Integer(*v.MaxResults) + } + + if v.MessageCategory != nil { + encoder.SetQuery("MessageCategory").String(*v.MessageCategory) + } + + if v.NextToken != nil { + encoder.SetQuery("NextToken").String(*v.NextToken) + } + + if v.ResourceType != nil { + encoder.SetQuery("ResourceType").String(*v.ResourceType) + } + + if len(v.State) > 0 { + encoder.SetQuery("State").String(string(v.State)) + } + + return nil +} + type awsRestjson1_serializeOpListBackupPlans struct { } @@ -3442,6 +3530,10 @@ func awsRestjson1_serializeOpHttpBindingsListCopyJobsInput(v *ListCopyJobsInput, encoder.SetQuery("destinationVaultArn").String(*v.ByDestinationVaultArn) } + if v.ByMessageCategory != nil { + encoder.SetQuery("messageCategory").String(*v.ByMessageCategory) + } + if v.ByParentJobId != nil { encoder.SetQuery("parentJobId").String(*v.ByParentJobId) } @@ -3469,6 +3561,90 @@ func awsRestjson1_serializeOpHttpBindingsListCopyJobsInput(v *ListCopyJobsInput, return nil } +type awsRestjson1_serializeOpListCopyJobSummaries struct { +} + +func (*awsRestjson1_serializeOpListCopyJobSummaries) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListCopyJobSummaries) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListCopyJobSummariesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/audit/copy-job-summaries") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListCopyJobSummariesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListCopyJobSummariesInput(v *ListCopyJobSummariesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AccountId != nil { + encoder.SetQuery("AccountId").String(*v.AccountId) + } + + if len(v.AggregationPeriod) > 0 { + encoder.SetQuery("AggregationPeriod").String(string(v.AggregationPeriod)) + } + + if v.MaxResults != nil { + encoder.SetQuery("MaxResults").Integer(*v.MaxResults) + } + + if v.MessageCategory != nil { + encoder.SetQuery("MessageCategory").String(*v.MessageCategory) + } + + if v.NextToken != nil { + encoder.SetQuery("NextToken").String(*v.NextToken) + } + + if v.ResourceType != nil { + encoder.SetQuery("ResourceType").String(*v.ResourceType) + } + + if len(v.State) > 0 { + encoder.SetQuery("State").String(string(v.State)) + } + + return nil +} + type awsRestjson1_serializeOpListFrameworks struct { } @@ -4217,6 +4393,86 @@ func awsRestjson1_serializeOpHttpBindingsListRestoreJobsInput(v *ListRestoreJobs return nil } +type awsRestjson1_serializeOpListRestoreJobSummaries struct { +} + +func (*awsRestjson1_serializeOpListRestoreJobSummaries) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListRestoreJobSummaries) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListRestoreJobSummariesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/audit/restore-job-summaries") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListRestoreJobSummariesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListRestoreJobSummariesInput(v *ListRestoreJobSummariesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AccountId != nil { + encoder.SetQuery("AccountId").String(*v.AccountId) + } + + if len(v.AggregationPeriod) > 0 { + encoder.SetQuery("AggregationPeriod").String(string(v.AggregationPeriod)) + } + + if v.MaxResults != nil { + encoder.SetQuery("MaxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("NextToken").String(*v.NextToken) + } + + if v.ResourceType != nil { + encoder.SetQuery("ResourceType").String(*v.ResourceType) + } + + if len(v.State) > 0 { + encoder.SetQuery("State").String(string(v.State)) + } + + return nil +} + type awsRestjson1_serializeOpListTags struct { } diff --git a/service/backup/types/enums.go b/service/backup/types/enums.go index 5ffc239aab4..9095ef143c6 100644 --- a/service/backup/types/enums.go +++ b/service/backup/types/enums.go @@ -2,6 +2,26 @@ package types +type AggregationPeriod string + +// Enum values for AggregationPeriod +const ( + AggregationPeriodOneDay AggregationPeriod = "ONE_DAY" + AggregationPeriodSevenDays AggregationPeriod = "SEVEN_DAYS" + AggregationPeriodFourteenDays AggregationPeriod = "FOURTEEN_DAYS" +) + +// Values returns all known values for AggregationPeriod. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (AggregationPeriod) Values() []AggregationPeriod { + return []AggregationPeriod{ + "ONE_DAY", + "SEVEN_DAYS", + "FOURTEEN_DAYS", + } +} + type BackupJobState string // Enum values for BackupJobState @@ -34,6 +54,42 @@ func (BackupJobState) Values() []BackupJobState { } } +type BackupJobStatus string + +// Enum values for BackupJobStatus +const ( + BackupJobStatusCreated BackupJobStatus = "CREATED" + BackupJobStatusPending BackupJobStatus = "PENDING" + BackupJobStatusRunning BackupJobStatus = "RUNNING" + BackupJobStatusAborting BackupJobStatus = "ABORTING" + BackupJobStatusAborted BackupJobStatus = "ABORTED" + BackupJobStatusCompleted BackupJobStatus = "COMPLETED" + BackupJobStatusFailed BackupJobStatus = "FAILED" + BackupJobStatusExpired BackupJobStatus = "EXPIRED" + BackupJobStatusPartial BackupJobStatus = "PARTIAL" + BackupJobStatusAggregateAll BackupJobStatus = "AGGREGATE_ALL" + BackupJobStatusAny BackupJobStatus = "ANY" +) + +// Values returns all known values for BackupJobStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (BackupJobStatus) Values() []BackupJobStatus { + return []BackupJobStatus{ + "CREATED", + "PENDING", + "RUNNING", + "ABORTING", + "ABORTED", + "COMPLETED", + "FAILED", + "EXPIRED", + "PARTIAL", + "AGGREGATE_ALL", + "ANY", + } +} + type BackupVaultEvent string // Enum values for BackupVaultEvent @@ -122,6 +178,42 @@ func (CopyJobState) Values() []CopyJobState { } } +type CopyJobStatus string + +// Enum values for CopyJobStatus +const ( + CopyJobStatusCreated CopyJobStatus = "CREATED" + CopyJobStatusRunning CopyJobStatus = "RUNNING" + CopyJobStatusAborting CopyJobStatus = "ABORTING" + CopyJobStatusAborted CopyJobStatus = "ABORTED" + CopyJobStatusCompleting CopyJobStatus = "COMPLETING" + CopyJobStatusCompleted CopyJobStatus = "COMPLETED" + CopyJobStatusFailing CopyJobStatus = "FAILING" + CopyJobStatusFailed CopyJobStatus = "FAILED" + CopyJobStatusPartial CopyJobStatus = "PARTIAL" + CopyJobStatusAggregateAll CopyJobStatus = "AGGREGATE_ALL" + CopyJobStatusAny CopyJobStatus = "ANY" +) + +// Values returns all known values for CopyJobStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (CopyJobStatus) Values() []CopyJobStatus { + return []CopyJobStatus{ + "CREATED", + "RUNNING", + "ABORTING", + "ABORTED", + "COMPLETING", + "COMPLETED", + "FAILING", + "FAILED", + "PARTIAL", + "AGGREGATE_ALL", + "ANY", + } +} + type LegalHoldStatus string // Enum values for LegalHoldStatus @@ -166,6 +258,36 @@ func (RecoveryPointStatus) Values() []RecoveryPointStatus { } } +type RestoreJobState string + +// Enum values for RestoreJobState +const ( + RestoreJobStateCreated RestoreJobState = "CREATED" + RestoreJobStatePending RestoreJobState = "PENDING" + RestoreJobStateRunning RestoreJobState = "RUNNING" + RestoreJobStateAborted RestoreJobState = "ABORTED" + RestoreJobStateCompleted RestoreJobState = "COMPLETED" + RestoreJobStateFailed RestoreJobState = "FAILED" + RestoreJobStateAggregateAll RestoreJobState = "AGGREGATE_ALL" + RestoreJobStateAny RestoreJobState = "ANY" +) + +// Values returns all known values for RestoreJobState. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (RestoreJobState) Values() []RestoreJobState { + return []RestoreJobState{ + "CREATED", + "PENDING", + "RUNNING", + "ABORTED", + "COMPLETED", + "FAILED", + "AGGREGATE_ALL", + "ANY", + } +} + type RestoreJobStatus string // Enum values for RestoreJobStatus diff --git a/service/backup/types/types.go b/service/backup/types/types.go index f1b7ef36f61..addeee6416c 100644 --- a/service/backup/types/types.go +++ b/service/backup/types/types.go @@ -99,6 +99,13 @@ type BackupJob struct { // This is a boolean value indicating this is a parent (composite) backup job. IsParent bool + // This parameter is the job count for the specified message category. Example + // strings include AccessDenied , Success , and InvalidParameters . See Monitoring (https://docs.aws.amazon.com/aws-backup/latest/devguide/monitoring.html) + // for a list of MessageCategory strings. The the value ANY returns count of all + // message categories. AGGREGATE_ALL aggregates job counts for all message + // categories and returns the sum. + MessageCategory *string + // This uniquely identifies a request to Backup to back up a resource. The return // will be the parent (composite) job ID. ParentJobId *string @@ -144,6 +151,49 @@ type BackupJob struct { noSmithyDocumentSerde } +// This is a summary of jobs created or running within the most recent 30 days. +// The returned summary may contain the following: Region, Account, State, +// RestourceType, MessageCategory, StartTime, EndTime, and Count of included jobs. +type BackupJobSummary struct { + + // The account ID that owns the jobs within the summary. + AccountId *string + + // The value as a number of jobs in a job summary. + Count int32 + + // The value of time in number format of a job end time. This value is the time in + // Unix format, Coordinated Universal Time (UTC), and accurate to milliseconds. For + // example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + EndTime *time.Time + + // This parameter is the job count for the specified message category. Example + // strings include AccessDenied , Success , and InvalidParameters . See Monitoring (https://docs.aws.amazon.com/aws-backup/latest/devguide/monitoring.html) + // for a list of MessageCategory strings. The the value ANY returns count of all + // message categories. AGGREGATE_ALL aggregates job counts for all message + // categories and returns the sum. + MessageCategory *string + + // The Amazon Web Services Regions within the job summary. + Region *string + + // This value is the job count for the specified resource type. The request + // GetSupportedResourceTypes returns strings for supported resource types. + ResourceType *string + + // The value of time in number format of a job start time. This value is the time + // in Unix format, Coordinated Universal Time (UTC), and accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + StartTime *time.Time + + // This value is job count for jobs with the specified state. + State BackupJobStatus + + noSmithyDocumentSerde +} + // Contains an optional backup plan display name and an array of BackupRule // objects, each of which specifies a backup rule. Each rule in a backup plan is a // separate scheduled task and can back up a different selection of Amazon Web @@ -771,6 +821,13 @@ type CopyJob struct { // This is a boolean value indicating this is a parent (composite) copy job. IsParent bool + // This parameter is the job count for the specified message category. Example + // strings include AccessDenied , Success , and InvalidParameters . See Monitoring (https://docs.aws.amazon.com/aws-backup/latest/devguide/monitoring.html) + // for a list of MessageCategory strings. The the value ANY returns count of all + // message categories. AGGREGATE_ALL aggregates job counts for all message + // categories and returns the sum + MessageCategory *string + // This is the number of child (nested) copy jobs. NumberOfChildJobs *int64 @@ -810,6 +867,49 @@ type CopyJob struct { noSmithyDocumentSerde } +// This is a summary of copy jobs created or running within the most recent 30 +// days. The returned summary may contain the following: Region, Account, State, +// RestourceType, MessageCategory, StartTime, EndTime, and Count of included jobs. +type CopyJobSummary struct { + + // The account ID that owns the jobs within the summary. + AccountId *string + + // The value as a number of jobs in a job summary. + Count int32 + + // The value of time in number format of a job end time. This value is the time in + // Unix format, Coordinated Universal Time (UTC), and accurate to milliseconds. For + // example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + EndTime *time.Time + + // This parameter is the job count for the specified message category. Example + // strings include AccessDenied , Success , and InvalidParameters . See Monitoring (https://docs.aws.amazon.com/aws-backup/latest/devguide/monitoring.html) + // for a list of MessageCategory strings. The the value ANY returns count of all + // message categories. AGGREGATE_ALL aggregates job counts for all message + // categories and returns the sum. + MessageCategory *string + + // This is the Amazon Web Services Regions within the job summary. + Region *string + + // This value is the job count for the specified resource type. The request + // GetSupportedResourceTypes returns strings for supported resource types + ResourceType *string + + // The value of time in number format of a job start time. This value is the time + // in Unix format, Coordinated Universal Time (UTC), and accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + StartTime *time.Time + + // This value is job count for jobs with the specified state. + State CopyJobStatus + + noSmithyDocumentSerde +} + // This is a resource filter containing FromDate: DateTime and ToDate: DateTime. // Both values are required. Future DateTime values are not permitted. The date and // time are in Unix format and Coordinated Universal Time (UTC), and it is accurate @@ -1426,4 +1526,40 @@ type RestoreJobsListMember struct { noSmithyDocumentSerde } +// This is a summary of restore jobs created or running within the most recent 30 +// days. The returned summary may contain the following: Region, Account, State, +// ResourceType, MessageCategory, StartTime, EndTime, and Count of included jobs. +type RestoreJobSummary struct { + + // The account ID that owns the jobs within the summary. + AccountId *string + + // The value as a number of jobs in a job summary. + Count int32 + + // The value of time in number format of a job end time. This value is the time in + // Unix format, Coordinated Universal Time (UTC), and accurate to milliseconds. For + // example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + EndTime *time.Time + + // The Amazon Web Services Regions within the job summary. + Region *string + + // This value is the job count for the specified resource type. The request + // GetSupportedResourceTypes returns strings for supported resource types. + ResourceType *string + + // The value of time in number format of a job start time. This value is the time + // in Unix format, Coordinated Universal Time (UTC), and accurate to milliseconds. + // For example, the value 1516925490.087 represents Friday, January 26, 2018 + // 12:11:30.087 AM. + StartTime *time.Time + + // This value is job count for jobs with the specified state. + State RestoreJobState + + noSmithyDocumentSerde +} + type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/cleanrooms/api_op_CreateCollaboration.go b/service/cleanrooms/api_op_CreateCollaboration.go index 0c71b5e8b95..1c0981efaf5 100644 --- a/service/cleanrooms/api_op_CreateCollaboration.go +++ b/service/cleanrooms/api_op_CreateCollaboration.go @@ -65,6 +65,12 @@ type CreateCollaborationInput struct { // This member is required. QueryLogStatus types.CollaborationQueryLogStatus + // The collaboration creator's payment responsibilities set by the collaboration + // creator. If the collaboration creator hasn't specified anyone as the member + // paying for query compute costs, then the member who can query is the default + // payer. + CreatorPaymentConfiguration *types.PaymentConfiguration + // The settings for client-side encryption with Cryptographic Computing for Clean // Rooms. DataEncryptionMetadata *types.DataEncryptionMetadata diff --git a/service/cleanrooms/api_op_CreateMembership.go b/service/cleanrooms/api_op_CreateMembership.go index f551083b1e2..a4e7fbddd5e 100644 --- a/service/cleanrooms/api_op_CreateMembership.go +++ b/service/cleanrooms/api_op_CreateMembership.go @@ -41,7 +41,7 @@ type CreateMembershipInput struct { CollaborationIdentifier *string // An indicator as to whether query logging has been enabled or disabled for the - // collaboration. + // membership. // // This member is required. QueryLogStatus types.MembershipQueryLogStatus @@ -50,6 +50,12 @@ type CreateMembershipInput struct { // can receive results. DefaultResultConfiguration *types.MembershipProtectedQueryResultConfiguration + // The payment responsibilities accepted by the collaboration member. Not required + // if the collaboration member has the member ability to run queries. Required if + // the collaboration member doesn't have the member ability to run queries but is + // configured as a payer by the collaboration creator. + PaymentConfiguration *types.MembershipPaymentConfiguration + // An optional label that you can assign to a resource when you create it. Each // tag consists of a key and an optional value, both of which you define. When you // use tagging, you can also use tag-based access control in IAM policies to diff --git a/service/cleanrooms/api_op_UpdateMembership.go b/service/cleanrooms/api_op_UpdateMembership.go index 9de0bf32e3d..87abe3395a8 100644 --- a/service/cleanrooms/api_op_UpdateMembership.go +++ b/service/cleanrooms/api_op_UpdateMembership.go @@ -44,7 +44,7 @@ type UpdateMembershipInput struct { DefaultResultConfiguration *types.MembershipProtectedQueryResultConfiguration // An indicator as to whether query logging has been enabled or disabled for the - // collaboration. + // membership. QueryLogStatus types.MembershipQueryLogStatus noSmithyDocumentSerde diff --git a/service/cleanrooms/deserializers.go b/service/cleanrooms/deserializers.go index 8a089a0ed2a..d97bf963e19 100644 --- a/service/cleanrooms/deserializers.go +++ b/service/cleanrooms/deserializers.go @@ -10374,6 +10374,11 @@ func awsRestjson1_deserializeDocumentMembership(v **types.Membership, value inte return err } + case "paymentConfiguration": + if err := awsRestjson1_deserializeDocumentMembershipPaymentConfiguration(&sv.PaymentConfiguration, value); err != nil { + return err + } + case "queryLogStatus": if value != nil { jtv, ok := value.(string) @@ -10417,6 +10422,42 @@ func awsRestjson1_deserializeDocumentMembership(v **types.Membership, value inte return nil } +func awsRestjson1_deserializeDocumentMembershipPaymentConfiguration(v **types.MembershipPaymentConfiguration, 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.MembershipPaymentConfiguration + if *v == nil { + sv = &types.MembershipPaymentConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "queryCompute": + if err := awsRestjson1_deserializeDocumentMembershipQueryComputePaymentConfig(&sv.QueryCompute, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentMembershipProtectedQueryOutputConfiguration(v *types.MembershipProtectedQueryOutputConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -10502,6 +10543,46 @@ func awsRestjson1_deserializeDocumentMembershipProtectedQueryResultConfiguration return nil } +func awsRestjson1_deserializeDocumentMembershipQueryComputePaymentConfig(v **types.MembershipQueryComputePaymentConfig, 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.MembershipQueryComputePaymentConfig + if *v == nil { + sv = &types.MembershipQueryComputePaymentConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "isResponsible": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IsResponsible = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentMembershipSummary(v **types.MembershipSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -10608,6 +10689,11 @@ func awsRestjson1_deserializeDocumentMembershipSummary(v **types.MembershipSumma return err } + case "paymentConfiguration": + if err := awsRestjson1_deserializeDocumentMembershipPaymentConfiguration(&sv.PaymentConfiguration, value); err != nil { + return err + } + case "status": if value != nil { jtv, ok := value.(string) @@ -10755,6 +10841,11 @@ func awsRestjson1_deserializeDocumentMemberSummary(v **types.MemberSummary, valu sv.MembershipId = ptr.String(jtv) } + case "paymentConfiguration": + if err := awsRestjson1_deserializeDocumentPaymentConfiguration(&sv.PaymentConfiguration, value); err != nil { + return err + } + case "status": if value != nil { jtv, ok := value.(string) @@ -10859,6 +10950,42 @@ func awsRestjson1_deserializeDocumentParameterMap(v *map[string]string, value in return nil } +func awsRestjson1_deserializeDocumentPaymentConfiguration(v **types.PaymentConfiguration, 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.PaymentConfiguration + if *v == nil { + sv = &types.PaymentConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "queryCompute": + if err := awsRestjson1_deserializeDocumentQueryComputePaymentConfig(&sv.QueryCompute, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentProtectedQuery(v **types.ProtectedQuery, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -11563,6 +11690,46 @@ func awsRestjson1_deserializeDocumentProtectedQuerySummaryList(v *[]types.Protec return nil } +func awsRestjson1_deserializeDocumentQueryComputePaymentConfig(v **types.QueryComputePaymentConfig, 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.QueryComputePaymentConfig + if *v == nil { + sv = &types.QueryComputePaymentConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "isResponsible": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IsResponsible = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentQueryTables(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/cleanrooms/endpoints.go b/service/cleanrooms/endpoints.go index 914d60578b9..db0b32d59bb 100644 --- a/service/cleanrooms/endpoints.go +++ b/service/cleanrooms/endpoints.go @@ -430,7 +430,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { uriString := func() string { var out strings.Builder out.WriteString("https://cleanrooms-fips.") diff --git a/service/cleanrooms/serializers.go b/service/cleanrooms/serializers.go index 996ede1b7e4..44d0927d4b7 100644 --- a/service/cleanrooms/serializers.go +++ b/service/cleanrooms/serializers.go @@ -392,6 +392,13 @@ func awsRestjson1_serializeOpDocumentCreateCollaborationInput(v *CreateCollabora } } + if v.CreatorPaymentConfiguration != nil { + ok := object.Key("creatorPaymentConfiguration") + if err := awsRestjson1_serializeDocumentPaymentConfiguration(v.CreatorPaymentConfiguration, ok); err != nil { + return err + } + } + if v.DataEncryptionMetadata != nil { ok := object.Key("dataEncryptionMetadata") if err := awsRestjson1_serializeDocumentDataEncryptionMetadata(v.DataEncryptionMetadata, ok); err != nil { @@ -821,6 +828,13 @@ func awsRestjson1_serializeOpDocumentCreateMembershipInput(v *CreateMembershipIn } } + if v.PaymentConfiguration != nil { + ok := object.Key("paymentConfiguration") + if err := awsRestjson1_serializeDocumentMembershipPaymentConfiguration(v.PaymentConfiguration, ok); err != nil { + return err + } + } + if len(v.QueryLogStatus) > 0 { ok := object.Key("queryLogStatus") ok.String(string(v.QueryLogStatus)) @@ -4113,6 +4127,20 @@ func awsRestjson1_serializeDocumentMemberList(v []types.MemberSpecification, val return nil } +func awsRestjson1_serializeDocumentMembershipPaymentConfiguration(v *types.MembershipPaymentConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.QueryCompute != nil { + ok := object.Key("queryCompute") + if err := awsRestjson1_serializeDocumentMembershipQueryComputePaymentConfig(v.QueryCompute, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentMembershipProtectedQueryOutputConfiguration(v types.MembershipProtectedQueryOutputConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4150,6 +4178,18 @@ func awsRestjson1_serializeDocumentMembershipProtectedQueryResultConfiguration(v return nil } +func awsRestjson1_serializeDocumentMembershipQueryComputePaymentConfig(v *types.MembershipQueryComputePaymentConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.IsResponsible != nil { + ok := object.Key("isResponsible") + ok.Boolean(*v.IsResponsible) + } + + return nil +} + func awsRestjson1_serializeDocumentMemberSpecification(v *types.MemberSpecification, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4171,6 +4211,13 @@ func awsRestjson1_serializeDocumentMemberSpecification(v *types.MemberSpecificat } } + if v.PaymentConfiguration != nil { + ok := object.Key("paymentConfiguration") + if err := awsRestjson1_serializeDocumentPaymentConfiguration(v.PaymentConfiguration, ok); err != nil { + return err + } + } + return nil } @@ -4185,6 +4232,20 @@ func awsRestjson1_serializeDocumentParameterMap(v map[string]string, value smith return nil } +func awsRestjson1_serializeDocumentPaymentConfiguration(v *types.PaymentConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.QueryCompute != nil { + ok := object.Key("queryCompute") + if err := awsRestjson1_serializeDocumentQueryComputePaymentConfig(v.QueryCompute, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentProtectedQueryOutputConfiguration(v types.ProtectedQueryOutputConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4263,6 +4324,18 @@ func awsRestjson1_serializeDocumentProtectedQuerySQLParameters(v *types.Protecte return nil } +func awsRestjson1_serializeDocumentQueryComputePaymentConfig(v *types.QueryComputePaymentConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.IsResponsible != nil { + ok := object.Key("isResponsible") + ok.Boolean(*v.IsResponsible) + } + + return nil +} + func awsRestjson1_serializeDocumentScalarFunctionsList(v []types.ScalarFunctions, value smithyjson.Value) error { array := value.Array() defer array.Close() diff --git a/service/cleanrooms/types/types.go b/service/cleanrooms/types/types.go index aded3d2cbc9..d78f3096de5 100644 --- a/service/cleanrooms/types/types.go +++ b/service/cleanrooms/types/types.go @@ -1007,27 +1007,27 @@ type ConfiguredTableSummary struct { // The settings for client-side encryption for cryptographic computing. type DataEncryptionMetadata struct { - // Indicates whether encrypted tables can contain cleartext data (true) or are to - // cryptographically process every column (false). + // Indicates whether encrypted tables can contain cleartext data ( TRUE ) or are to + // cryptographically process every column ( FALSE ). // // This member is required. AllowCleartext *bool - // Indicates whether Fingerprint columns can contain duplicate entries (true) or - // are to contain only non-repeated values (false). + // Indicates whether Fingerprint columns can contain duplicate entries ( TRUE ) or + // are to contain only non-repeated values ( FALSE ). // // This member is required. AllowDuplicates *bool // Indicates whether Fingerprint columns can be joined on any other Fingerprint - // column with a different name (true) or can only be joined on Fingerprint columns - // of the same name (false). + // column with a different name ( TRUE ) or can only be joined on Fingerprint + // columns of the same name ( FALSE ). // // This member is required. AllowJoinsOnColumnsWithDifferentNames *bool - // Indicates whether NULL values are to be copied as NULL to encrypted tables - // (true) or cryptographically processed (false). + // Indicates whether NULL values are to be copied as NULL to encrypted tables ( TRUE + // ) or cryptographically processed ( FALSE ). // // This member is required. PreserveNulls *bool @@ -1100,14 +1100,18 @@ type Membership struct { // This member is required. MemberAbilities []MemberAbility + // The payment responsibilities accepted by the collaboration member. + // + // This member is required. + PaymentConfiguration *MembershipPaymentConfiguration + // An indicator as to whether query logging has been enabled or disabled for the - // collaboration. + // membership. // // This member is required. QueryLogStatus MembershipQueryLogStatus - // The status of the membership. Valid values are `ACTIVE`, `REMOVED`, and - // `COLLABORATION_DELETED`. + // The status of the membership. // // This member is required. Status MembershipStatus @@ -1124,6 +1128,19 @@ type Membership struct { noSmithyDocumentSerde } +// An object representing the payment responsibilities accepted by the +// collaboration member. +type MembershipPaymentConfiguration struct { + + // The payment responsibilities accepted by the collaboration member for query + // compute costs. + // + // This member is required. + QueryCompute *MembershipQueryComputePaymentConfig + + noSmithyDocumentSerde +} + // Contains configurations for protected query results. // // The following types satisfy this interface: @@ -1159,6 +1176,26 @@ type MembershipProtectedQueryResultConfiguration struct { noSmithyDocumentSerde } +// An object representing the payment responsibilities accepted by the +// collaboration member for query compute costs. +type MembershipQueryComputePaymentConfig struct { + + // Indicates whether the collaboration member has accepted to pay for query + // compute costs ( TRUE ) or has not accepted to pay for query compute costs ( FALSE + // ). If the collaboration creator has not specified anyone to pay for query + // compute costs, then the member who can query is the default payer. An error + // message is returned for the following reasons: + // - If you set the value to FALSE but you are responsible to pay for query + // compute costs. + // - If you set the value to TRUE but you are not responsible to pay for query + // compute costs. + // + // This member is required. + IsResponsible *bool + + noSmithyDocumentSerde +} + // The membership object listed by the request. type MembershipSummary struct { @@ -1208,8 +1245,12 @@ type MembershipSummary struct { // This member is required. MemberAbilities []MemberAbility - // The status of the membership. Valid values are `ACTIVE`, `REMOVED`, and - // `COLLABORATION_DELETED`. + // The payment responsibilities accepted by the collaboration member. + // + // This member is required. + PaymentConfiguration *MembershipPaymentConfiguration + + // The status of the membership. // // This member is required. Status MembershipStatus @@ -1241,6 +1282,12 @@ type MemberSpecification struct { // This member is required. MemberAbilities []MemberAbility + // The collaboration member's payment responsibilities set by the collaboration + // creator. If the collaboration creator hasn't specified anyone as the member + // paying for query compute costs, then the member who can query is the default + // payer. + PaymentConfiguration *PaymentConfiguration + noSmithyDocumentSerde } @@ -1268,8 +1315,13 @@ type MemberSummary struct { // This member is required. DisplayName *string - // The status of the member. Valid values are `INVITED`, `ACTIVE`, `LEFT`, and - // `REMOVED`. + // The collaboration member's payment responsibilities set by the collaboration + // creator. + // + // This member is required. + PaymentConfiguration *PaymentConfiguration + + // The status of the member. // // This member is required. Status MemberStatus @@ -1288,6 +1340,19 @@ type MemberSummary struct { noSmithyDocumentSerde } +// An object representing the collaboration member's payment responsibilities set +// by the collaboration creator. +type PaymentConfiguration struct { + + // The collaboration member's payment responsibilities set by the collaboration + // creator for query compute costs. + // + // This member is required. + QueryCompute *QueryComputePaymentConfig + + noSmithyDocumentSerde +} + // The parameters for an Clean Rooms protected query. type ProtectedQuery struct { @@ -1518,6 +1583,26 @@ type ProtectedQuerySummary struct { noSmithyDocumentSerde } +// An object representing the collaboration member's payment responsibilities set +// by the collaboration creator for query compute costs. +type QueryComputePaymentConfig struct { + + // Indicates whether the collaboration creator has configured the collaboration + // member to pay for query compute costs ( TRUE ) or has not configured the + // collaboration member to pay for query compute costs ( FALSE ). Exactly one + // member can be configured to pay for query compute costs. An error is returned if + // the collaboration creator sets a TRUE value for more than one member in the + // collaboration. If the collaboration creator hasn't specified anyone as the + // member paying for query compute costs, then the member who can query is the + // default payer. An error is returned if the collaboration creator sets a FALSE + // value for the member who can query. + // + // This member is required. + IsResponsible *bool + + noSmithyDocumentSerde +} + // A schema is a relation within a collaboration. type Schema struct { diff --git a/service/cleanrooms/validators.go b/service/cleanrooms/validators.go index cd8f6e3db5f..03ea7e8694b 100644 --- a/service/cleanrooms/validators.go +++ b/service/cleanrooms/validators.go @@ -1301,6 +1301,25 @@ func validateMemberList(v []types.MemberSpecification) error { } } +func validateMembershipPaymentConfiguration(v *types.MembershipPaymentConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MembershipPaymentConfiguration"} + if v.QueryCompute == nil { + invalidParams.Add(smithy.NewErrParamRequired("QueryCompute")) + } else if v.QueryCompute != nil { + if err := validateMembershipQueryComputePaymentConfig(v.QueryCompute); err != nil { + invalidParams.AddNested("QueryCompute", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateMembershipProtectedQueryOutputConfiguration(v types.MembershipProtectedQueryOutputConfiguration) error { if v == nil { return nil @@ -1339,6 +1358,21 @@ func validateMembershipProtectedQueryResultConfiguration(v *types.MembershipProt } } +func validateMembershipQueryComputePaymentConfig(v *types.MembershipQueryComputePaymentConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MembershipQueryComputePaymentConfig"} + if v.IsResponsible == nil { + invalidParams.Add(smithy.NewErrParamRequired("IsResponsible")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateMemberSpecification(v *types.MemberSpecification) error { if v == nil { return nil @@ -1353,6 +1387,30 @@ func validateMemberSpecification(v *types.MemberSpecification) error { if v.DisplayName == nil { invalidParams.Add(smithy.NewErrParamRequired("DisplayName")) } + if v.PaymentConfiguration != nil { + if err := validatePaymentConfiguration(v.PaymentConfiguration); err != nil { + invalidParams.AddNested("PaymentConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePaymentConfiguration(v *types.PaymentConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PaymentConfiguration"} + if v.QueryCompute == nil { + invalidParams.Add(smithy.NewErrParamRequired("QueryCompute")) + } else if v.QueryCompute != nil { + if err := validateQueryComputePaymentConfig(v.QueryCompute); err != nil { + invalidParams.AddNested("QueryCompute", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1416,6 +1474,21 @@ func validateProtectedQueryS3OutputConfiguration(v *types.ProtectedQueryS3Output } } +func validateQueryComputePaymentConfig(v *types.QueryComputePaymentConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "QueryComputePaymentConfig"} + if v.IsResponsible == nil { + invalidParams.Add(smithy.NewErrParamRequired("IsResponsible")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateTableReference(v types.TableReference) error { if v == nil { return nil @@ -1532,6 +1605,11 @@ func validateOpCreateCollaborationInput(v *CreateCollaborationInput) error { if len(v.QueryLogStatus) == 0 { invalidParams.Add(smithy.NewErrParamRequired("QueryLogStatus")) } + if v.CreatorPaymentConfiguration != nil { + if err := validatePaymentConfiguration(v.CreatorPaymentConfiguration); err != nil { + invalidParams.AddNested("CreatorPaymentConfiguration", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1632,6 +1710,11 @@ func validateOpCreateMembershipInput(v *CreateMembershipInput) error { invalidParams.AddNested("DefaultResultConfiguration", err.(smithy.InvalidParamsError)) } } + if v.PaymentConfiguration != nil { + if err := validateMembershipPaymentConfiguration(v.PaymentConfiguration); err != nil { + invalidParams.AddNested("PaymentConfiguration", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/codepipeline/internal/endpoints/endpoints.go b/service/codepipeline/internal/endpoints/endpoints.go index bee42120e5d..86e59c908b9 100644 --- a/service/codepipeline/internal/endpoints/endpoints.go +++ b/service/codepipeline/internal/endpoints/endpoints.go @@ -166,6 +166,12 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-3", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, @@ -187,6 +193,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, @@ -241,6 +250,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/computeoptimizer/internal/endpoints/endpoints.go b/service/computeoptimizer/internal/endpoints/endpoints.go index adc7b2406a6..a1d747f7e90 100644 --- a/service/computeoptimizer/internal/endpoints/endpoints.go +++ b/service/computeoptimizer/internal/endpoints/endpoints.go @@ -187,6 +187,14 @@ var defaultPartitions = endpoints.Partitions{ Region: "ap-south-1", }, }, + endpoints.EndpointKey{ + Region: "ap-south-2", + }: endpoints.Endpoint{ + Hostname: "compute-optimizer.ap-south-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ap-south-2", + }, + }, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{ @@ -203,6 +211,22 @@ var defaultPartitions = endpoints.Partitions{ Region: "ap-southeast-2", }, }, + endpoints.EndpointKey{ + Region: "ap-southeast-3", + }: endpoints.Endpoint{ + Hostname: "compute-optimizer.ap-southeast-3.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ap-southeast-3", + }, + }, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + }: endpoints.Endpoint{ + Hostname: "compute-optimizer.ap-southeast-4.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ap-southeast-4", + }, + }, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{ @@ -219,6 +243,14 @@ var defaultPartitions = endpoints.Partitions{ Region: "eu-central-1", }, }, + endpoints.EndpointKey{ + Region: "eu-central-2", + }: endpoints.Endpoint{ + Hostname: "compute-optimizer.eu-central-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "eu-central-2", + }, + }, endpoints.EndpointKey{ Region: "eu-north-1", }: endpoints.Endpoint{ @@ -235,6 +267,14 @@ var defaultPartitions = endpoints.Partitions{ Region: "eu-south-1", }, }, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{ + Hostname: "compute-optimizer.eu-south-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "eu-south-2", + }, + }, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{ @@ -259,6 +299,22 @@ var defaultPartitions = endpoints.Partitions{ Region: "eu-west-3", }, }, + endpoints.EndpointKey{ + Region: "il-central-1", + }: endpoints.Endpoint{ + Hostname: "compute-optimizer.il-central-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "il-central-1", + }, + }, + endpoints.EndpointKey{ + Region: "me-central-1", + }: endpoints.Endpoint{ + Hostname: "compute-optimizer.me-central-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "me-central-1", + }, + }, endpoints.EndpointKey{ Region: "me-south-1", }: endpoints.Endpoint{ diff --git a/service/connect/api_op_StartChatContact.go b/service/connect/api_op_StartChatContact.go index 268fd218295..679318cbb95 100644 --- a/service/connect/api_op_StartChatContact.go +++ b/service/connect/api_op_StartChatContact.go @@ -106,6 +106,16 @@ type StartChatContactInput struct { // PersistentChat. RelatedContactId *string + // A set of system defined key-value pairs stored on individual contact segments + // using an attribute map. The attributes are standard Amazon Connect attributes. + // They can be accessed in flows. Attribute keys can include only alphanumeric, -, + // and _. This field can be used to show channel subtype, such as connect:Guide . + // The types application/vnd.amazonaws.connect.message.interactive and + // application/vnd.amazonaws.connect.message.interactive.response must be present + // in the SupportedMessagingContentTypes field of this API in order to set + // SegmentAttributes as { "connect:Subtype": {"valueString" : "connect:Guide" }} . + SegmentAttributes map[string]types.SegmentAttributeValue + // The supported chat message content types. Supported types are text/plain , // text/markdown , application/json , // application/vnd.amazonaws.connect.message.interactive , and diff --git a/service/connect/serializers.go b/service/connect/serializers.go index e6c1546a9b3..1e8f26d331f 100644 --- a/service/connect/serializers.go +++ b/service/connect/serializers.go @@ -13657,6 +13657,13 @@ func awsRestjson1_serializeOpDocumentStartChatContactInput(v *StartChatContactIn ok.String(*v.RelatedContactId) } + if v.SegmentAttributes != nil { + ok := object.Key("SegmentAttributes") + if err := awsRestjson1_serializeDocumentSegmentAttributes(v.SegmentAttributes, ok); err != nil { + return err + } + } + if v.SupportedMessagingContentTypes != nil { ok := object.Key("SupportedMessagingContentTypes") if err := awsRestjson1_serializeDocumentSupportedMessagingContentTypes(v.SupportedMessagingContentTypes, ok); err != nil { @@ -21731,6 +21738,32 @@ func awsRestjson1_serializeDocumentSecurityProfilesSearchFilter(v *types.Securit return nil } +func awsRestjson1_serializeDocumentSegmentAttributes(v map[string]types.SegmentAttributeValue, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + mapVar := v[key] + if err := awsRestjson1_serializeDocumentSegmentAttributeValue(&mapVar, om); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentSegmentAttributeValue(v *types.SegmentAttributeValue, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ValueString != nil { + ok := object.Key("ValueString") + ok.String(*v.ValueString) + } + + return nil +} + func awsRestjson1_serializeDocumentSendNotificationActionDefinition(v *types.SendNotificationActionDefinition, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/connect/types/types.go b/service/connect/types/types.go index 3563d7b71b3..9a278926069 100644 --- a/service/connect/types/types.go +++ b/service/connect/types/types.go @@ -3560,6 +3560,16 @@ type SecurityProfileSummary struct { noSmithyDocumentSerde } +// A value for a segment attribute. This is structured as a map where the key is +// valueString and the value is a string. +type SegmentAttributeValue struct { + + // The value of a segment attribute. + ValueString *string + + noSmithyDocumentSerde +} + // Information about the send notification action. type SendNotificationActionDefinition struct { diff --git a/service/glue/api_op_BatchGetTableOptimizer.go b/service/glue/api_op_BatchGetTableOptimizer.go new file mode 100644 index 00000000000..12247098722 --- /dev/null +++ b/service/glue/api_op_BatchGetTableOptimizer.go @@ -0,0 +1,265 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package glue + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/glue/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the configuration for the specified table optimizers. +func (c *Client) BatchGetTableOptimizer(ctx context.Context, params *BatchGetTableOptimizerInput, optFns ...func(*Options)) (*BatchGetTableOptimizerOutput, error) { + if params == nil { + params = &BatchGetTableOptimizerInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchGetTableOptimizer", params, optFns, c.addOperationBatchGetTableOptimizerMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchGetTableOptimizerOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchGetTableOptimizerInput struct { + + // A list of BatchGetTableOptimizerEntry objects specifying the table optimizers + // to retrieve. + // + // This member is required. + Entries []types.BatchGetTableOptimizerEntry + + noSmithyDocumentSerde +} + +type BatchGetTableOptimizerOutput struct { + + // A list of errors from the operation. + Failures []types.BatchGetTableOptimizerError + + // A list of BatchTableOptimizer objects. + TableOptimizers []types.BatchTableOptimizer + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchGetTableOptimizerMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchGetTableOptimizer{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchGetTableOptimizer{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addBatchGetTableOptimizerResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpBatchGetTableOptimizerValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetTableOptimizer(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opBatchGetTableOptimizer(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "glue", + OperationName: "BatchGetTableOptimizer", + } +} + +type opBatchGetTableOptimizerResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opBatchGetTableOptimizerResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opBatchGetTableOptimizerResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "glue" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "glue" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("glue") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addBatchGetTableOptimizerResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opBatchGetTableOptimizerResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/glue/api_op_CreateTableOptimizer.go b/service/glue/api_op_CreateTableOptimizer.go new file mode 100644 index 00000000000..d83e9a790ad --- /dev/null +++ b/service/glue/api_op_CreateTableOptimizer.go @@ -0,0 +1,279 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package glue + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/glue/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new table optimizer for a specific function. compaction is the only +// currently supported optimizer type. +func (c *Client) CreateTableOptimizer(ctx context.Context, params *CreateTableOptimizerInput, optFns ...func(*Options)) (*CreateTableOptimizerOutput, error) { + if params == nil { + params = &CreateTableOptimizerInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateTableOptimizer", params, optFns, c.addOperationCreateTableOptimizerMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateTableOptimizerOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateTableOptimizerInput struct { + + // The Catalog ID of the table. + // + // This member is required. + CatalogId *string + + // The name of the database in the catalog in which the table resides. + // + // This member is required. + DatabaseName *string + + // The name of the table. + // + // This member is required. + TableName *string + + // A TableOptimizerConfiguration object representing the configuration of a table + // optimizer. + // + // This member is required. + TableOptimizerConfiguration *types.TableOptimizerConfiguration + + // The type of table optimizer. Currently, the only valid value is compaction . + // + // This member is required. + Type types.TableOptimizerType + + noSmithyDocumentSerde +} + +type CreateTableOptimizerOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateTableOptimizerMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateTableOptimizer{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateTableOptimizer{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addCreateTableOptimizerResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateTableOptimizerValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTableOptimizer(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateTableOptimizer(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "glue", + OperationName: "CreateTableOptimizer", + } +} + +type opCreateTableOptimizerResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opCreateTableOptimizerResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opCreateTableOptimizerResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "glue" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "glue" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("glue") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addCreateTableOptimizerResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opCreateTableOptimizerResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/glue/api_op_DeleteTableOptimizer.go b/service/glue/api_op_DeleteTableOptimizer.go new file mode 100644 index 00000000000..b1af7af1961 --- /dev/null +++ b/service/glue/api_op_DeleteTableOptimizer.go @@ -0,0 +1,273 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package glue + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/glue/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes an optimizer and all associated metadata for a table. The optimization +// will no longer be performed on the table. +func (c *Client) DeleteTableOptimizer(ctx context.Context, params *DeleteTableOptimizerInput, optFns ...func(*Options)) (*DeleteTableOptimizerOutput, error) { + if params == nil { + params = &DeleteTableOptimizerInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteTableOptimizer", params, optFns, c.addOperationDeleteTableOptimizerMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteTableOptimizerOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteTableOptimizerInput struct { + + // The Catalog ID of the table. + // + // This member is required. + CatalogId *string + + // The name of the database in the catalog in which the table resides. + // + // This member is required. + DatabaseName *string + + // The name of the table. + // + // This member is required. + TableName *string + + // The type of table optimizer. + // + // This member is required. + Type types.TableOptimizerType + + noSmithyDocumentSerde +} + +type DeleteTableOptimizerOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteTableOptimizerMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteTableOptimizer{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteTableOptimizer{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addDeleteTableOptimizerResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpDeleteTableOptimizerValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTableOptimizer(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteTableOptimizer(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "glue", + OperationName: "DeleteTableOptimizer", + } +} + +type opDeleteTableOptimizerResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opDeleteTableOptimizerResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opDeleteTableOptimizerResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "glue" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "glue" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("glue") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addDeleteTableOptimizerResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opDeleteTableOptimizerResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/glue/api_op_GetTableOptimizer.go b/service/glue/api_op_GetTableOptimizer.go new file mode 100644 index 00000000000..8ee6496bbf1 --- /dev/null +++ b/service/glue/api_op_GetTableOptimizer.go @@ -0,0 +1,285 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package glue + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/glue/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the configuration of all optimizers associated with a specified table. +func (c *Client) GetTableOptimizer(ctx context.Context, params *GetTableOptimizerInput, optFns ...func(*Options)) (*GetTableOptimizerOutput, error) { + if params == nil { + params = &GetTableOptimizerInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetTableOptimizer", params, optFns, c.addOperationGetTableOptimizerMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetTableOptimizerOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetTableOptimizerInput struct { + + // The Catalog ID of the table. + // + // This member is required. + CatalogId *string + + // The name of the database in the catalog in which the table resides. + // + // This member is required. + DatabaseName *string + + // The name of the table. + // + // This member is required. + TableName *string + + // The type of table optimizer. + // + // This member is required. + Type types.TableOptimizerType + + noSmithyDocumentSerde +} + +type GetTableOptimizerOutput struct { + + // The Catalog ID of the table. + CatalogId *string + + // The name of the database in the catalog in which the table resides. + DatabaseName *string + + // The name of the table. + TableName *string + + // The optimizer associated with the specified table. + TableOptimizer *types.TableOptimizer + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetTableOptimizerMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetTableOptimizer{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetTableOptimizer{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addGetTableOptimizerResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpGetTableOptimizerValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTableOptimizer(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetTableOptimizer(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "glue", + OperationName: "GetTableOptimizer", + } +} + +type opGetTableOptimizerResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opGetTableOptimizerResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opGetTableOptimizerResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "glue" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "glue" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("glue") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addGetTableOptimizerResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opGetTableOptimizerResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/glue/api_op_ListTableOptimizerRuns.go b/service/glue/api_op_ListTableOptimizerRuns.go new file mode 100644 index 00000000000..05527f09329 --- /dev/null +++ b/service/glue/api_op_ListTableOptimizerRuns.go @@ -0,0 +1,382 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package glue + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/glue/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the history of previous optimizer runs for a specific table. +func (c *Client) ListTableOptimizerRuns(ctx context.Context, params *ListTableOptimizerRunsInput, optFns ...func(*Options)) (*ListTableOptimizerRunsOutput, error) { + if params == nil { + params = &ListTableOptimizerRunsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTableOptimizerRuns", params, optFns, c.addOperationListTableOptimizerRunsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTableOptimizerRunsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListTableOptimizerRunsInput struct { + + // The Catalog ID of the table. + // + // This member is required. + CatalogId *string + + // The name of the database in the catalog in which the table resides. + // + // This member is required. + DatabaseName *string + + // The name of the table. + // + // This member is required. + TableName *string + + // The type of table optimizer. Currently, the only valid value is compaction . + // + // This member is required. + Type types.TableOptimizerType + + // The maximum number of optimizer runs to return on each call. + MaxResults int32 + + // A continuation token, if this is a continuation call. + NextToken *string + + noSmithyDocumentSerde +} + +type ListTableOptimizerRunsOutput struct { + + // The Catalog ID of the table. + CatalogId *string + + // The name of the database in the catalog in which the table resides. + DatabaseName *string + + // A continuation token for paginating the returned list of optimizer runs, + // returned if the current segment of the list is not the last. + NextToken *string + + // The name of the table. + TableName *string + + // A list of the optimizer runs associated with a table. + TableOptimizerRuns []types.TableOptimizerRun + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTableOptimizerRunsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListTableOptimizerRuns{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListTableOptimizerRuns{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addListTableOptimizerRunsResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpListTableOptimizerRunsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTableOptimizerRuns(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListTableOptimizerRunsAPIClient is a client that implements the +// ListTableOptimizerRuns operation. +type ListTableOptimizerRunsAPIClient interface { + ListTableOptimizerRuns(context.Context, *ListTableOptimizerRunsInput, ...func(*Options)) (*ListTableOptimizerRunsOutput, error) +} + +var _ ListTableOptimizerRunsAPIClient = (*Client)(nil) + +// ListTableOptimizerRunsPaginatorOptions is the paginator options for +// ListTableOptimizerRuns +type ListTableOptimizerRunsPaginatorOptions struct { + // The maximum number of optimizer runs to return on each call. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListTableOptimizerRunsPaginator is a paginator for ListTableOptimizerRuns +type ListTableOptimizerRunsPaginator struct { + options ListTableOptimizerRunsPaginatorOptions + client ListTableOptimizerRunsAPIClient + params *ListTableOptimizerRunsInput + nextToken *string + firstPage bool +} + +// NewListTableOptimizerRunsPaginator returns a new ListTableOptimizerRunsPaginator +func NewListTableOptimizerRunsPaginator(client ListTableOptimizerRunsAPIClient, params *ListTableOptimizerRunsInput, optFns ...func(*ListTableOptimizerRunsPaginatorOptions)) *ListTableOptimizerRunsPaginator { + if params == nil { + params = &ListTableOptimizerRunsInput{} + } + + options := ListTableOptimizerRunsPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListTableOptimizerRunsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListTableOptimizerRunsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListTableOptimizerRuns page. +func (p *ListTableOptimizerRunsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListTableOptimizerRunsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.MaxResults = p.options.Limit + + result, err := p.client.ListTableOptimizerRuns(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListTableOptimizerRuns(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "glue", + OperationName: "ListTableOptimizerRuns", + } +} + +type opListTableOptimizerRunsResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opListTableOptimizerRunsResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opListTableOptimizerRunsResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "glue" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "glue" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("glue") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addListTableOptimizerRunsResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opListTableOptimizerRunsResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/glue/api_op_StartDataQualityRuleRecommendationRun.go b/service/glue/api_op_StartDataQualityRuleRecommendationRun.go index f85080376b9..56fc6ae6613 100644 --- a/service/glue/api_op_StartDataQualityRuleRecommendationRun.go +++ b/service/glue/api_op_StartDataQualityRuleRecommendationRun.go @@ -19,7 +19,8 @@ import ( // Starts a recommendation run that is used to generate rules when you don't know // what rules to write. Glue Data Quality analyzes the data and comes up with // recommendations for a potential ruleset. You can then triage the ruleset and -// modify the generated ruleset to your liking. +// modify the generated ruleset to your liking. Recommendation runs are +// automatically deleted after 90 days. func (c *Client) StartDataQualityRuleRecommendationRun(ctx context.Context, params *StartDataQualityRuleRecommendationRunInput, optFns ...func(*Options)) (*StartDataQualityRuleRecommendationRunOutput, error) { if params == nil { params = &StartDataQualityRuleRecommendationRunInput{} diff --git a/service/glue/api_op_UpdateTableOptimizer.go b/service/glue/api_op_UpdateTableOptimizer.go new file mode 100644 index 00000000000..5199731b670 --- /dev/null +++ b/service/glue/api_op_UpdateTableOptimizer.go @@ -0,0 +1,278 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package glue + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/glue/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the configuration for an existing table optimizer. +func (c *Client) UpdateTableOptimizer(ctx context.Context, params *UpdateTableOptimizerInput, optFns ...func(*Options)) (*UpdateTableOptimizerOutput, error) { + if params == nil { + params = &UpdateTableOptimizerInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateTableOptimizer", params, optFns, c.addOperationUpdateTableOptimizerMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateTableOptimizerOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateTableOptimizerInput struct { + + // The Catalog ID of the table. + // + // This member is required. + CatalogId *string + + // The name of the database in the catalog in which the table resides. + // + // This member is required. + DatabaseName *string + + // The name of the table. + // + // This member is required. + TableName *string + + // A TableOptimizerConfiguration object representing the configuration of a table + // optimizer. + // + // This member is required. + TableOptimizerConfiguration *types.TableOptimizerConfiguration + + // The type of table optimizer. Currently, the only valid value is compaction . + // + // This member is required. + Type types.TableOptimizerType + + noSmithyDocumentSerde +} + +type UpdateTableOptimizerOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateTableOptimizerMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateTableOptimizer{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateTableOptimizer{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addUpdateTableOptimizerResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpUpdateTableOptimizerValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateTableOptimizer(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateTableOptimizer(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "glue", + OperationName: "UpdateTableOptimizer", + } +} + +type opUpdateTableOptimizerResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opUpdateTableOptimizerResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opUpdateTableOptimizerResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "glue" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "glue" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("glue") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addUpdateTableOptimizerResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opUpdateTableOptimizerResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/glue/deserializers.go b/service/glue/deserializers.go index bbff8924b4c..4bc11179a19 100644 --- a/service/glue/deserializers.go +++ b/service/glue/deserializers.go @@ -1464,6 +1464,117 @@ func awsAwsjson11_deserializeOpErrorBatchGetPartition(response *smithyhttp.Respo } } +type awsAwsjson11_deserializeOpBatchGetTableOptimizer struct { +} + +func (*awsAwsjson11_deserializeOpBatchGetTableOptimizer) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpBatchGetTableOptimizer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorBatchGetTableOptimizer(response, &metadata) + } + output := &BatchGetTableOptimizerOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, 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 out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentBatchGetTableOptimizerOutput(&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 out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorBatchGetTableOptimizer(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + 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) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpBatchGetTriggers struct { } @@ -4818,14 +4929,14 @@ func awsAwsjson11_deserializeOpErrorCreateTable(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpCreateTrigger struct { +type awsAwsjson11_deserializeOpCreateTableOptimizer struct { } -func (*awsAwsjson11_deserializeOpCreateTrigger) ID() string { +func (*awsAwsjson11_deserializeOpCreateTableOptimizer) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpCreateTrigger) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpCreateTableOptimizer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4839,9 +4950,9 @@ func (m *awsAwsjson11_deserializeOpCreateTrigger) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorCreateTrigger(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorCreateTableOptimizer(response, &metadata) } - output := &CreateTriggerOutput{} + output := &CreateTableOptimizerOutput{} out.Result = output var buff [1024]byte @@ -4861,7 +4972,7 @@ func (m *awsAwsjson11_deserializeOpCreateTrigger) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentCreateTriggerOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentCreateTableOptimizerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4875,7 +4986,7 @@ func (m *awsAwsjson11_deserializeOpCreateTrigger) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorCreateTrigger(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorCreateTableOptimizer(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4916,30 +5027,21 @@ func awsAwsjson11_deserializeOpErrorCreateTrigger(response *smithyhttp.Response, } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("AlreadyExistsException", errorCode): return awsAwsjson11_deserializeErrorAlreadyExistsException(response, errorBody) - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) - case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("IdempotentParameterMismatchException", errorCode): - return awsAwsjson11_deserializeErrorIdempotentParameterMismatchException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("OperationTimeoutException", errorCode): - return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) - - case strings.EqualFold("ResourceNumberLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorResourceNumberLimitExceededException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -4950,14 +5052,14 @@ func awsAwsjson11_deserializeOpErrorCreateTrigger(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpCreateUserDefinedFunction struct { +type awsAwsjson11_deserializeOpCreateTrigger struct { } -func (*awsAwsjson11_deserializeOpCreateUserDefinedFunction) ID() string { +func (*awsAwsjson11_deserializeOpCreateTrigger) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpCreateUserDefinedFunction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpCreateTrigger) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4971,9 +5073,9 @@ func (m *awsAwsjson11_deserializeOpCreateUserDefinedFunction) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorCreateUserDefinedFunction(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorCreateTrigger(response, &metadata) } - output := &CreateUserDefinedFunctionOutput{} + output := &CreateTriggerOutput{} out.Result = output var buff [1024]byte @@ -4993,7 +5095,7 @@ func (m *awsAwsjson11_deserializeOpCreateUserDefinedFunction) HandleDeserialize( return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentCreateUserDefinedFunctionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentCreateTriggerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5007,7 +5109,7 @@ func (m *awsAwsjson11_deserializeOpCreateUserDefinedFunction) HandleDeserialize( return out, metadata, err } -func awsAwsjson11_deserializeOpErrorCreateUserDefinedFunction(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorCreateTrigger(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5051,11 +5153,14 @@ func awsAwsjson11_deserializeOpErrorCreateUserDefinedFunction(response *smithyht case strings.EqualFold("AlreadyExistsException", errorCode): return awsAwsjson11_deserializeErrorAlreadyExistsException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("GlueEncryptionException", errorCode): - return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) + case strings.EqualFold("IdempotentParameterMismatchException", errorCode): + return awsAwsjson11_deserializeErrorIdempotentParameterMismatchException(response, errorBody) case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) @@ -5079,14 +5184,14 @@ func awsAwsjson11_deserializeOpErrorCreateUserDefinedFunction(response *smithyht } } -type awsAwsjson11_deserializeOpCreateWorkflow struct { +type awsAwsjson11_deserializeOpCreateUserDefinedFunction struct { } -func (*awsAwsjson11_deserializeOpCreateWorkflow) ID() string { +func (*awsAwsjson11_deserializeOpCreateUserDefinedFunction) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpCreateWorkflow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpCreateUserDefinedFunction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5100,9 +5205,9 @@ func (m *awsAwsjson11_deserializeOpCreateWorkflow) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorCreateWorkflow(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorCreateUserDefinedFunction(response, &metadata) } - output := &CreateWorkflowOutput{} + output := &CreateUserDefinedFunctionOutput{} out.Result = output var buff [1024]byte @@ -5122,7 +5227,7 @@ func (m *awsAwsjson11_deserializeOpCreateWorkflow) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentCreateWorkflowOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentCreateUserDefinedFunctionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5136,7 +5241,7 @@ func (m *awsAwsjson11_deserializeOpCreateWorkflow) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorCreateWorkflow(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorCreateUserDefinedFunction(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5180,8 +5285,11 @@ func awsAwsjson11_deserializeOpErrorCreateWorkflow(response *smithyhttp.Response case strings.EqualFold("AlreadyExistsException", errorCode): return awsAwsjson11_deserializeErrorAlreadyExistsException(response, errorBody) - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("GlueEncryptionException", errorCode): + return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) @@ -5205,14 +5313,14 @@ func awsAwsjson11_deserializeOpErrorCreateWorkflow(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpDeleteBlueprint struct { +type awsAwsjson11_deserializeOpCreateWorkflow struct { } -func (*awsAwsjson11_deserializeOpDeleteBlueprint) ID() string { +func (*awsAwsjson11_deserializeOpCreateWorkflow) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteBlueprint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpCreateWorkflow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5226,9 +5334,9 @@ func (m *awsAwsjson11_deserializeOpDeleteBlueprint) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteBlueprint(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorCreateWorkflow(response, &metadata) } - output := &DeleteBlueprintOutput{} + output := &CreateWorkflowOutput{} out.Result = output var buff [1024]byte @@ -5248,7 +5356,7 @@ func (m *awsAwsjson11_deserializeOpDeleteBlueprint) HandleDeserialize(ctx contex return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteBlueprintOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentCreateWorkflowOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5262,7 +5370,7 @@ func (m *awsAwsjson11_deserializeOpDeleteBlueprint) HandleDeserialize(ctx contex return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteBlueprint(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorCreateWorkflow(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5303,6 +5411,12 @@ func awsAwsjson11_deserializeOpErrorDeleteBlueprint(response *smithyhttp.Respons } switch { + case strings.EqualFold("AlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorAlreadyExistsException(response, errorBody) + + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) @@ -5312,6 +5426,9 @@ func awsAwsjson11_deserializeOpErrorDeleteBlueprint(response *smithyhttp.Respons case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + case strings.EqualFold("ResourceNumberLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorResourceNumberLimitExceededException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -5322,14 +5439,14 @@ func awsAwsjson11_deserializeOpErrorDeleteBlueprint(response *smithyhttp.Respons } } -type awsAwsjson11_deserializeOpDeleteClassifier struct { +type awsAwsjson11_deserializeOpDeleteBlueprint struct { } -func (*awsAwsjson11_deserializeOpDeleteClassifier) ID() string { +func (*awsAwsjson11_deserializeOpDeleteBlueprint) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteClassifier) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteBlueprint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5343,9 +5460,9 @@ func (m *awsAwsjson11_deserializeOpDeleteClassifier) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteClassifier(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteBlueprint(response, &metadata) } - output := &DeleteClassifierOutput{} + output := &DeleteBlueprintOutput{} out.Result = output var buff [1024]byte @@ -5365,7 +5482,7 @@ func (m *awsAwsjson11_deserializeOpDeleteClassifier) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteClassifierOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteBlueprintOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5379,7 +5496,7 @@ func (m *awsAwsjson11_deserializeOpDeleteClassifier) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteClassifier(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteBlueprint(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5420,8 +5537,11 @@ func awsAwsjson11_deserializeOpErrorDeleteClassifier(response *smithyhttp.Respon } switch { - case strings.EqualFold("EntityNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) @@ -5436,14 +5556,14 @@ func awsAwsjson11_deserializeOpErrorDeleteClassifier(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpDeleteColumnStatisticsForPartition struct { +type awsAwsjson11_deserializeOpDeleteClassifier struct { } -func (*awsAwsjson11_deserializeOpDeleteColumnStatisticsForPartition) ID() string { +func (*awsAwsjson11_deserializeOpDeleteClassifier) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteColumnStatisticsForPartition) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteClassifier) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5457,9 +5577,9 @@ func (m *awsAwsjson11_deserializeOpDeleteColumnStatisticsForPartition) HandleDes } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteColumnStatisticsForPartition(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteClassifier(response, &metadata) } - output := &DeleteColumnStatisticsForPartitionOutput{} + output := &DeleteClassifierOutput{} out.Result = output var buff [1024]byte @@ -5479,7 +5599,7 @@ func (m *awsAwsjson11_deserializeOpDeleteColumnStatisticsForPartition) HandleDes return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteColumnStatisticsForPartitionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteClassifierOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5493,7 +5613,7 @@ func (m *awsAwsjson11_deserializeOpDeleteColumnStatisticsForPartition) HandleDes return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteColumnStatisticsForPartition(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteClassifier(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5537,15 +5657,6 @@ func awsAwsjson11_deserializeOpErrorDeleteColumnStatisticsForPartition(response case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("GlueEncryptionException", errorCode): - return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) - - case strings.EqualFold("InternalServiceException", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) - - case strings.EqualFold("InvalidInputException", errorCode): - return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) @@ -5559,14 +5670,14 @@ func awsAwsjson11_deserializeOpErrorDeleteColumnStatisticsForPartition(response } } -type awsAwsjson11_deserializeOpDeleteColumnStatisticsForTable struct { +type awsAwsjson11_deserializeOpDeleteColumnStatisticsForPartition struct { } -func (*awsAwsjson11_deserializeOpDeleteColumnStatisticsForTable) ID() string { +func (*awsAwsjson11_deserializeOpDeleteColumnStatisticsForPartition) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteColumnStatisticsForTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteColumnStatisticsForPartition) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5580,9 +5691,9 @@ func (m *awsAwsjson11_deserializeOpDeleteColumnStatisticsForTable) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteColumnStatisticsForTable(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteColumnStatisticsForPartition(response, &metadata) } - output := &DeleteColumnStatisticsForTableOutput{} + output := &DeleteColumnStatisticsForPartitionOutput{} out.Result = output var buff [1024]byte @@ -5602,7 +5713,7 @@ func (m *awsAwsjson11_deserializeOpDeleteColumnStatisticsForTable) HandleDeseria return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteColumnStatisticsForTableOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteColumnStatisticsForPartitionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5616,7 +5727,7 @@ func (m *awsAwsjson11_deserializeOpDeleteColumnStatisticsForTable) HandleDeseria return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteColumnStatisticsForTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteColumnStatisticsForPartition(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5682,14 +5793,14 @@ func awsAwsjson11_deserializeOpErrorDeleteColumnStatisticsForTable(response *smi } } -type awsAwsjson11_deserializeOpDeleteConnection struct { +type awsAwsjson11_deserializeOpDeleteColumnStatisticsForTable struct { } -func (*awsAwsjson11_deserializeOpDeleteConnection) ID() string { +func (*awsAwsjson11_deserializeOpDeleteColumnStatisticsForTable) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteColumnStatisticsForTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5703,9 +5814,9 @@ func (m *awsAwsjson11_deserializeOpDeleteConnection) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteConnection(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteColumnStatisticsForTable(response, &metadata) } - output := &DeleteConnectionOutput{} + output := &DeleteColumnStatisticsForTableOutput{} out.Result = output var buff [1024]byte @@ -5725,7 +5836,7 @@ func (m *awsAwsjson11_deserializeOpDeleteConnection) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteConnectionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteColumnStatisticsForTableOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5739,7 +5850,7 @@ func (m *awsAwsjson11_deserializeOpDeleteConnection) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteColumnStatisticsForTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5783,6 +5894,15 @@ func awsAwsjson11_deserializeOpErrorDeleteConnection(response *smithyhttp.Respon case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("GlueEncryptionException", errorCode): + return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) @@ -5796,14 +5916,14 @@ func awsAwsjson11_deserializeOpErrorDeleteConnection(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpDeleteCrawler struct { +type awsAwsjson11_deserializeOpDeleteConnection struct { } -func (*awsAwsjson11_deserializeOpDeleteCrawler) ID() string { +func (*awsAwsjson11_deserializeOpDeleteConnection) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteCrawler) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5817,9 +5937,9 @@ func (m *awsAwsjson11_deserializeOpDeleteCrawler) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteCrawler(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteConnection(response, &metadata) } - output := &DeleteCrawlerOutput{} + output := &DeleteConnectionOutput{} out.Result = output var buff [1024]byte @@ -5839,7 +5959,7 @@ func (m *awsAwsjson11_deserializeOpDeleteCrawler) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteCrawlerOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteConnectionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5853,7 +5973,7 @@ func (m *awsAwsjson11_deserializeOpDeleteCrawler) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteCrawler(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5894,18 +6014,12 @@ func awsAwsjson11_deserializeOpErrorDeleteCrawler(response *smithyhttp.Response, } switch { - case strings.EqualFold("CrawlerRunningException", errorCode): - return awsAwsjson11_deserializeErrorCrawlerRunningException(response, errorBody) - case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) - case strings.EqualFold("SchedulerTransitioningException", errorCode): - return awsAwsjson11_deserializeErrorSchedulerTransitioningException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -5916,14 +6030,14 @@ func awsAwsjson11_deserializeOpErrorDeleteCrawler(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpDeleteCustomEntityType struct { +type awsAwsjson11_deserializeOpDeleteCrawler struct { } -func (*awsAwsjson11_deserializeOpDeleteCustomEntityType) ID() string { +func (*awsAwsjson11_deserializeOpDeleteCrawler) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteCustomEntityType) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteCrawler) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5937,9 +6051,9 @@ func (m *awsAwsjson11_deserializeOpDeleteCustomEntityType) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteCustomEntityType(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteCrawler(response, &metadata) } - output := &DeleteCustomEntityTypeOutput{} + output := &DeleteCrawlerOutput{} out.Result = output var buff [1024]byte @@ -5959,7 +6073,7 @@ func (m *awsAwsjson11_deserializeOpDeleteCustomEntityType) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteCustomEntityTypeOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteCrawlerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5973,7 +6087,7 @@ func (m *awsAwsjson11_deserializeOpDeleteCustomEntityType) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteCustomEntityType(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteCrawler(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6014,21 +6128,18 @@ func awsAwsjson11_deserializeOpErrorDeleteCustomEntityType(response *smithyhttp. } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("CrawlerRunningException", errorCode): + return awsAwsjson11_deserializeErrorCrawlerRunningException(response, errorBody) case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) - - case strings.EqualFold("InvalidInputException", errorCode): - return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + case strings.EqualFold("SchedulerTransitioningException", errorCode): + return awsAwsjson11_deserializeErrorSchedulerTransitioningException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6039,14 +6150,14 @@ func awsAwsjson11_deserializeOpErrorDeleteCustomEntityType(response *smithyhttp. } } -type awsAwsjson11_deserializeOpDeleteDatabase struct { +type awsAwsjson11_deserializeOpDeleteCustomEntityType struct { } -func (*awsAwsjson11_deserializeOpDeleteDatabase) ID() string { +func (*awsAwsjson11_deserializeOpDeleteCustomEntityType) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteDatabase) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteCustomEntityType) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6060,9 +6171,9 @@ func (m *awsAwsjson11_deserializeOpDeleteDatabase) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteDatabase(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteCustomEntityType(response, &metadata) } - output := &DeleteDatabaseOutput{} + output := &DeleteCustomEntityTypeOutput{} out.Result = output var buff [1024]byte @@ -6082,7 +6193,7 @@ func (m *awsAwsjson11_deserializeOpDeleteDatabase) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteDatabaseOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteCustomEntityTypeOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6096,7 +6207,7 @@ func (m *awsAwsjson11_deserializeOpDeleteDatabase) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteDatabase(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteCustomEntityType(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6137,8 +6248,8 @@ func awsAwsjson11_deserializeOpErrorDeleteDatabase(response *smithyhttp.Response } switch { - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) @@ -6162,14 +6273,14 @@ func awsAwsjson11_deserializeOpErrorDeleteDatabase(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpDeleteDataQualityRuleset struct { +type awsAwsjson11_deserializeOpDeleteDatabase struct { } -func (*awsAwsjson11_deserializeOpDeleteDataQualityRuleset) ID() string { +func (*awsAwsjson11_deserializeOpDeleteDatabase) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteDataQualityRuleset) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteDatabase) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6183,9 +6294,9 @@ func (m *awsAwsjson11_deserializeOpDeleteDataQualityRuleset) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteDataQualityRuleset(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteDatabase(response, &metadata) } - output := &DeleteDataQualityRulesetOutput{} + output := &DeleteDatabaseOutput{} out.Result = output var buff [1024]byte @@ -6205,7 +6316,7 @@ func (m *awsAwsjson11_deserializeOpDeleteDataQualityRuleset) HandleDeserialize(c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteDataQualityRulesetOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteDatabaseOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6219,7 +6330,7 @@ func (m *awsAwsjson11_deserializeOpDeleteDataQualityRuleset) HandleDeserialize(c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteDataQualityRuleset(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteDatabase(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6260,6 +6371,9 @@ func awsAwsjson11_deserializeOpErrorDeleteDataQualityRuleset(response *smithyhtt } switch { + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) @@ -6282,14 +6396,14 @@ func awsAwsjson11_deserializeOpErrorDeleteDataQualityRuleset(response *smithyhtt } } -type awsAwsjson11_deserializeOpDeleteDevEndpoint struct { +type awsAwsjson11_deserializeOpDeleteDataQualityRuleset struct { } -func (*awsAwsjson11_deserializeOpDeleteDevEndpoint) ID() string { +func (*awsAwsjson11_deserializeOpDeleteDataQualityRuleset) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteDevEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteDataQualityRuleset) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6303,9 +6417,9 @@ func (m *awsAwsjson11_deserializeOpDeleteDevEndpoint) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteDevEndpoint(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteDataQualityRuleset(response, &metadata) } - output := &DeleteDevEndpointOutput{} + output := &DeleteDataQualityRulesetOutput{} out.Result = output var buff [1024]byte @@ -6325,7 +6439,7 @@ func (m *awsAwsjson11_deserializeOpDeleteDevEndpoint) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteDevEndpointOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteDataQualityRulesetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6339,7 +6453,7 @@ func (m *awsAwsjson11_deserializeOpDeleteDevEndpoint) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteDevEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteDataQualityRuleset(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6402,131 +6516,14 @@ func awsAwsjson11_deserializeOpErrorDeleteDevEndpoint(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpDeleteJob struct { -} - -func (*awsAwsjson11_deserializeOpDeleteJob) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpDeleteJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteJob(response, &metadata) - } - output := &DeleteJobOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, 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 out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentDeleteJobOutput(&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 out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorDeleteJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - 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) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("InternalServiceException", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) - - case strings.EqualFold("InvalidInputException", errorCode): - return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - - case strings.EqualFold("OperationTimeoutException", errorCode): - return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpDeleteMLTransform struct { +type awsAwsjson11_deserializeOpDeleteDevEndpoint struct { } -func (*awsAwsjson11_deserializeOpDeleteMLTransform) ID() string { +func (*awsAwsjson11_deserializeOpDeleteDevEndpoint) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteMLTransform) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteDevEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6540,9 +6537,9 @@ func (m *awsAwsjson11_deserializeOpDeleteMLTransform) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteMLTransform(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteDevEndpoint(response, &metadata) } - output := &DeleteMLTransformOutput{} + output := &DeleteDevEndpointOutput{} out.Result = output var buff [1024]byte @@ -6562,7 +6559,7 @@ func (m *awsAwsjson11_deserializeOpDeleteMLTransform) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteMLTransformOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteDevEndpointOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6576,7 +6573,7 @@ func (m *awsAwsjson11_deserializeOpDeleteMLTransform) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteMLTransform(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteDevEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6639,14 +6636,14 @@ func awsAwsjson11_deserializeOpErrorDeleteMLTransform(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpDeletePartition struct { +type awsAwsjson11_deserializeOpDeleteJob struct { } -func (*awsAwsjson11_deserializeOpDeletePartition) ID() string { +func (*awsAwsjson11_deserializeOpDeleteJob) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeletePartition) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6660,9 +6657,9 @@ func (m *awsAwsjson11_deserializeOpDeletePartition) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeletePartition(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteJob(response, &metadata) } - output := &DeletePartitionOutput{} + output := &DeleteJobOutput{} out.Result = output var buff [1024]byte @@ -6682,7 +6679,7 @@ func (m *awsAwsjson11_deserializeOpDeletePartition) HandleDeserialize(ctx contex return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeletePartitionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6696,7 +6693,7 @@ func (m *awsAwsjson11_deserializeOpDeletePartition) HandleDeserialize(ctx contex return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeletePartition(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6737,9 +6734,6 @@ func awsAwsjson11_deserializeOpErrorDeletePartition(response *smithyhttp.Respons } switch { - case strings.EqualFold("EntityNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) @@ -6759,14 +6753,14 @@ func awsAwsjson11_deserializeOpErrorDeletePartition(response *smithyhttp.Respons } } -type awsAwsjson11_deserializeOpDeletePartitionIndex struct { +type awsAwsjson11_deserializeOpDeleteMLTransform struct { } -func (*awsAwsjson11_deserializeOpDeletePartitionIndex) ID() string { +func (*awsAwsjson11_deserializeOpDeleteMLTransform) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeletePartitionIndex) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteMLTransform) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6780,9 +6774,9 @@ func (m *awsAwsjson11_deserializeOpDeletePartitionIndex) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeletePartitionIndex(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteMLTransform(response, &metadata) } - output := &DeletePartitionIndexOutput{} + output := &DeleteMLTransformOutput{} out.Result = output var buff [1024]byte @@ -6802,7 +6796,7 @@ func (m *awsAwsjson11_deserializeOpDeletePartitionIndex) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeletePartitionIndexOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteMLTransformOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6816,7 +6810,7 @@ func (m *awsAwsjson11_deserializeOpDeletePartitionIndex) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeletePartitionIndex(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteMLTransform(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6857,15 +6851,9 @@ func awsAwsjson11_deserializeOpErrorDeletePartitionIndex(response *smithyhttp.Re } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson11_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("GlueEncryptionException", errorCode): - return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) @@ -6885,14 +6873,14 @@ func awsAwsjson11_deserializeOpErrorDeletePartitionIndex(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpDeleteRegistry struct { +type awsAwsjson11_deserializeOpDeletePartition struct { } -func (*awsAwsjson11_deserializeOpDeleteRegistry) ID() string { +func (*awsAwsjson11_deserializeOpDeletePartition) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteRegistry) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeletePartition) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6906,9 +6894,9 @@ func (m *awsAwsjson11_deserializeOpDeleteRegistry) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteRegistry(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeletePartition(response, &metadata) } - output := &DeleteRegistryOutput{} + output := &DeletePartitionOutput{} out.Result = output var buff [1024]byte @@ -6928,7 +6916,7 @@ func (m *awsAwsjson11_deserializeOpDeleteRegistry) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteRegistryOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeletePartitionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6942,7 +6930,7 @@ func (m *awsAwsjson11_deserializeOpDeleteRegistry) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteRegistry(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeletePartition(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6983,18 +6971,18 @@ func awsAwsjson11_deserializeOpErrorDeleteRegistry(response *smithyhttp.Response } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) - case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7005,14 +6993,14 @@ func awsAwsjson11_deserializeOpErrorDeleteRegistry(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpDeleteResourcePolicy struct { +type awsAwsjson11_deserializeOpDeletePartitionIndex struct { } -func (*awsAwsjson11_deserializeOpDeleteResourcePolicy) ID() string { +func (*awsAwsjson11_deserializeOpDeletePartitionIndex) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeletePartitionIndex) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7026,9 +7014,9 @@ func (m *awsAwsjson11_deserializeOpDeleteResourcePolicy) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteResourcePolicy(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeletePartitionIndex(response, &metadata) } - output := &DeleteResourcePolicyOutput{} + output := &DeletePartitionIndexOutput{} out.Result = output var buff [1024]byte @@ -7048,7 +7036,7 @@ func (m *awsAwsjson11_deserializeOpDeleteResourcePolicy) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteResourcePolicyOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeletePartitionIndexOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7062,7 +7050,7 @@ func (m *awsAwsjson11_deserializeOpDeleteResourcePolicy) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeletePartitionIndex(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7103,12 +7091,15 @@ func awsAwsjson11_deserializeOpErrorDeleteResourcePolicy(response *smithyhttp.Re } switch { - case strings.EqualFold("ConditionCheckFailureException", errorCode): - return awsAwsjson11_deserializeErrorConditionCheckFailureException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("GlueEncryptionException", errorCode): + return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) @@ -7128,14 +7119,14 @@ func awsAwsjson11_deserializeOpErrorDeleteResourcePolicy(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpDeleteSchema struct { +type awsAwsjson11_deserializeOpDeleteRegistry struct { } -func (*awsAwsjson11_deserializeOpDeleteSchema) ID() string { +func (*awsAwsjson11_deserializeOpDeleteRegistry) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteSchema) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteRegistry) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7149,9 +7140,9 @@ func (m *awsAwsjson11_deserializeOpDeleteSchema) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteSchema(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteRegistry(response, &metadata) } - output := &DeleteSchemaOutput{} + output := &DeleteRegistryOutput{} out.Result = output var buff [1024]byte @@ -7171,7 +7162,7 @@ func (m *awsAwsjson11_deserializeOpDeleteSchema) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteSchemaOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteRegistryOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7185,7 +7176,7 @@ func (m *awsAwsjson11_deserializeOpDeleteSchema) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteSchema(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteRegistry(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7248,14 +7239,14 @@ func awsAwsjson11_deserializeOpErrorDeleteSchema(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpDeleteSchemaVersions struct { +type awsAwsjson11_deserializeOpDeleteResourcePolicy struct { } -func (*awsAwsjson11_deserializeOpDeleteSchemaVersions) ID() string { +func (*awsAwsjson11_deserializeOpDeleteResourcePolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteSchemaVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7269,9 +7260,9 @@ func (m *awsAwsjson11_deserializeOpDeleteSchemaVersions) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteSchemaVersions(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteResourcePolicy(response, &metadata) } - output := &DeleteSchemaVersionsOutput{} + output := &DeleteResourcePolicyOutput{} out.Result = output var buff [1024]byte @@ -7291,7 +7282,7 @@ func (m *awsAwsjson11_deserializeOpDeleteSchemaVersions) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteSchemaVersionsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteResourcePolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7305,7 +7296,7 @@ func (m *awsAwsjson11_deserializeOpDeleteSchemaVersions) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteSchemaVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7346,126 +7337,9 @@ func awsAwsjson11_deserializeOpErrorDeleteSchemaVersions(response *smithyhttp.Re } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) - - case strings.EqualFold("EntityNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - - case strings.EqualFold("InvalidInputException", errorCode): - return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpDeleteSecurityConfiguration struct { -} - -func (*awsAwsjson11_deserializeOpDeleteSecurityConfiguration) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpDeleteSecurityConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteSecurityConfiguration(response, &metadata) - } - output := &DeleteSecurityConfigurationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, 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 out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentDeleteSecurityConfigurationOutput(&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 out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorDeleteSecurityConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - 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) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } + case strings.EqualFold("ConditionCheckFailureException", errorCode): + return awsAwsjson11_deserializeErrorConditionCheckFailureException(response, errorBody) - switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) @@ -7488,14 +7362,14 @@ func awsAwsjson11_deserializeOpErrorDeleteSecurityConfiguration(response *smithy } } -type awsAwsjson11_deserializeOpDeleteSession struct { +type awsAwsjson11_deserializeOpDeleteSchema struct { } -func (*awsAwsjson11_deserializeOpDeleteSession) ID() string { +func (*awsAwsjson11_deserializeOpDeleteSchema) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteSession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteSchema) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7509,9 +7383,9 @@ func (m *awsAwsjson11_deserializeOpDeleteSession) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteSession(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteSchema(response, &metadata) } - output := &DeleteSessionOutput{} + output := &DeleteSchemaOutput{} out.Result = output var buff [1024]byte @@ -7531,7 +7405,7 @@ func (m *awsAwsjson11_deserializeOpDeleteSession) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteSessionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteSchemaOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7545,7 +7419,7 @@ func (m *awsAwsjson11_deserializeOpDeleteSession) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteSession(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteSchema(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7592,18 +7466,12 @@ func awsAwsjson11_deserializeOpErrorDeleteSession(response *smithyhttp.Response, case strings.EqualFold("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) - case strings.EqualFold("IllegalSessionStateException", errorCode): - return awsAwsjson11_deserializeErrorIllegalSessionStateException(response, errorBody) - - case strings.EqualFold("InternalServiceException", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("OperationTimeoutException", errorCode): - return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7614,14 +7482,14 @@ func awsAwsjson11_deserializeOpErrorDeleteSession(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpDeleteTable struct { +type awsAwsjson11_deserializeOpDeleteSchemaVersions struct { } -func (*awsAwsjson11_deserializeOpDeleteTable) ID() string { +func (*awsAwsjson11_deserializeOpDeleteSchemaVersions) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteSchemaVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7635,9 +7503,9 @@ func (m *awsAwsjson11_deserializeOpDeleteTable) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteTable(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteSchemaVersions(response, &metadata) } - output := &DeleteTableOutput{} + output := &DeleteSchemaVersionsOutput{} out.Result = output var buff [1024]byte @@ -7657,7 +7525,7 @@ func (m *awsAwsjson11_deserializeOpDeleteTable) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteTableOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteSchemaVersionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7671,7 +7539,7 @@ func (m *awsAwsjson11_deserializeOpDeleteTable) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteSchemaVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7712,24 +7580,18 @@ func awsAwsjson11_deserializeOpErrorDeleteTable(response *smithyhttp.Response, m } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("OperationTimeoutException", errorCode): - return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) - - case strings.EqualFold("ResourceNotReadyException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotReadyException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7740,14 +7602,14 @@ func awsAwsjson11_deserializeOpErrorDeleteTable(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpDeleteTableVersion struct { +type awsAwsjson11_deserializeOpDeleteSecurityConfiguration struct { } -func (*awsAwsjson11_deserializeOpDeleteTableVersion) ID() string { +func (*awsAwsjson11_deserializeOpDeleteSecurityConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteTableVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteSecurityConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7761,9 +7623,9 @@ func (m *awsAwsjson11_deserializeOpDeleteTableVersion) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteTableVersion(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteSecurityConfiguration(response, &metadata) } - output := &DeleteTableVersionOutput{} + output := &DeleteSecurityConfigurationOutput{} out.Result = output var buff [1024]byte @@ -7783,7 +7645,7 @@ func (m *awsAwsjson11_deserializeOpDeleteTableVersion) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteTableVersionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteSecurityConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7797,7 +7659,7 @@ func (m *awsAwsjson11_deserializeOpDeleteTableVersion) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteTableVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteSecurityConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7860,14 +7722,14 @@ func awsAwsjson11_deserializeOpErrorDeleteTableVersion(response *smithyhttp.Resp } } -type awsAwsjson11_deserializeOpDeleteTrigger struct { +type awsAwsjson11_deserializeOpDeleteSession struct { } -func (*awsAwsjson11_deserializeOpDeleteTrigger) ID() string { +func (*awsAwsjson11_deserializeOpDeleteSession) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteTrigger) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteSession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7881,9 +7743,9 @@ func (m *awsAwsjson11_deserializeOpDeleteTrigger) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteTrigger(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteSession(response, &metadata) } - output := &DeleteTriggerOutput{} + output := &DeleteSessionOutput{} out.Result = output var buff [1024]byte @@ -7903,7 +7765,7 @@ func (m *awsAwsjson11_deserializeOpDeleteTrigger) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteTriggerOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteSessionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7917,7 +7779,7 @@ func (m *awsAwsjson11_deserializeOpDeleteTrigger) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteTrigger(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteSession(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7958,9 +7820,15 @@ func awsAwsjson11_deserializeOpErrorDeleteTrigger(response *smithyhttp.Response, } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("IllegalSessionStateException", errorCode): + return awsAwsjson11_deserializeErrorIllegalSessionStateException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) @@ -7980,14 +7848,14 @@ func awsAwsjson11_deserializeOpErrorDeleteTrigger(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpDeleteUserDefinedFunction struct { +type awsAwsjson11_deserializeOpDeleteTable struct { } -func (*awsAwsjson11_deserializeOpDeleteUserDefinedFunction) ID() string { +func (*awsAwsjson11_deserializeOpDeleteTable) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteUserDefinedFunction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8001,9 +7869,9 @@ func (m *awsAwsjson11_deserializeOpDeleteUserDefinedFunction) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteUserDefinedFunction(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteTable(response, &metadata) } - output := &DeleteUserDefinedFunctionOutput{} + output := &DeleteTableOutput{} out.Result = output var buff [1024]byte @@ -8023,7 +7891,7 @@ func (m *awsAwsjson11_deserializeOpDeleteUserDefinedFunction) HandleDeserialize( return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteUserDefinedFunctionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteTableOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8037,7 +7905,7 @@ func (m *awsAwsjson11_deserializeOpDeleteUserDefinedFunction) HandleDeserialize( return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteUserDefinedFunction(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8078,6 +7946,9 @@ func awsAwsjson11_deserializeOpErrorDeleteUserDefinedFunction(response *smithyht } switch { + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) @@ -8090,6 +7961,9 @@ func awsAwsjson11_deserializeOpErrorDeleteUserDefinedFunction(response *smithyht case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + case strings.EqualFold("ResourceNotReadyException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotReadyException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -8100,14 +7974,14 @@ func awsAwsjson11_deserializeOpErrorDeleteUserDefinedFunction(response *smithyht } } -type awsAwsjson11_deserializeOpDeleteWorkflow struct { +type awsAwsjson11_deserializeOpDeleteTableOptimizer struct { } -func (*awsAwsjson11_deserializeOpDeleteWorkflow) ID() string { +func (*awsAwsjson11_deserializeOpDeleteTableOptimizer) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDeleteWorkflow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteTableOptimizer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8121,9 +7995,9 @@ func (m *awsAwsjson11_deserializeOpDeleteWorkflow) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteWorkflow(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteTableOptimizer(response, &metadata) } - output := &DeleteWorkflowOutput{} + output := &DeleteTableOptimizerOutput{} out.Result = output var buff [1024]byte @@ -8143,7 +8017,7 @@ func (m *awsAwsjson11_deserializeOpDeleteWorkflow) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDeleteWorkflowOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteTableOptimizerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8157,7 +8031,7 @@ func (m *awsAwsjson11_deserializeOpDeleteWorkflow) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDeleteWorkflow(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteTableOptimizer(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8198,8 +8072,128 @@ func awsAwsjson11_deserializeOpErrorDeleteWorkflow(response *smithyhttp.Response } switch { - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDeleteTableVersion struct { +} + +func (*awsAwsjson11_deserializeOpDeleteTableVersion) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteTableVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteTableVersion(response, &metadata) + } + output := &DeleteTableVersionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, 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 out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeleteTableVersionOutput(&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 out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteTableVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + 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) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) @@ -8220,14 +8214,14 @@ func awsAwsjson11_deserializeOpErrorDeleteWorkflow(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpGetBlueprint struct { +type awsAwsjson11_deserializeOpDeleteTrigger struct { } -func (*awsAwsjson11_deserializeOpGetBlueprint) ID() string { +func (*awsAwsjson11_deserializeOpDeleteTrigger) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetBlueprint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteTrigger) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8241,9 +8235,9 @@ func (m *awsAwsjson11_deserializeOpGetBlueprint) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetBlueprint(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteTrigger(response, &metadata) } - output := &GetBlueprintOutput{} + output := &DeleteTriggerOutput{} out.Result = output var buff [1024]byte @@ -8263,7 +8257,7 @@ func (m *awsAwsjson11_deserializeOpGetBlueprint) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetBlueprintOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteTriggerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8277,7 +8271,7 @@ func (m *awsAwsjson11_deserializeOpGetBlueprint) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetBlueprint(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteTrigger(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8318,8 +8312,8 @@ func awsAwsjson11_deserializeOpErrorGetBlueprint(response *smithyhttp.Response, } switch { - case strings.EqualFold("EntityNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) @@ -8340,14 +8334,14 @@ func awsAwsjson11_deserializeOpErrorGetBlueprint(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpGetBlueprintRun struct { +type awsAwsjson11_deserializeOpDeleteUserDefinedFunction struct { } -func (*awsAwsjson11_deserializeOpGetBlueprintRun) ID() string { +func (*awsAwsjson11_deserializeOpDeleteUserDefinedFunction) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetBlueprintRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteUserDefinedFunction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8361,9 +8355,9 @@ func (m *awsAwsjson11_deserializeOpGetBlueprintRun) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetBlueprintRun(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteUserDefinedFunction(response, &metadata) } - output := &GetBlueprintRunOutput{} + output := &DeleteUserDefinedFunctionOutput{} out.Result = output var buff [1024]byte @@ -8383,7 +8377,7 @@ func (m *awsAwsjson11_deserializeOpGetBlueprintRun) HandleDeserialize(ctx contex return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetBlueprintRunOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteUserDefinedFunctionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8397,7 +8391,7 @@ func (m *awsAwsjson11_deserializeOpGetBlueprintRun) HandleDeserialize(ctx contex return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetBlueprintRun(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteUserDefinedFunction(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8444,6 +8438,9 @@ func awsAwsjson11_deserializeOpErrorGetBlueprintRun(response *smithyhttp.Respons case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) @@ -8457,14 +8454,14 @@ func awsAwsjson11_deserializeOpErrorGetBlueprintRun(response *smithyhttp.Respons } } -type awsAwsjson11_deserializeOpGetBlueprintRuns struct { +type awsAwsjson11_deserializeOpDeleteWorkflow struct { } -func (*awsAwsjson11_deserializeOpGetBlueprintRuns) ID() string { +func (*awsAwsjson11_deserializeOpDeleteWorkflow) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetBlueprintRuns) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDeleteWorkflow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8478,9 +8475,9 @@ func (m *awsAwsjson11_deserializeOpGetBlueprintRuns) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetBlueprintRuns(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteWorkflow(response, &metadata) } - output := &GetBlueprintRunsOutput{} + output := &DeleteWorkflowOutput{} out.Result = output var buff [1024]byte @@ -8500,7 +8497,7 @@ func (m *awsAwsjson11_deserializeOpGetBlueprintRuns) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetBlueprintRunsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDeleteWorkflowOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8514,7 +8511,7 @@ func (m *awsAwsjson11_deserializeOpGetBlueprintRuns) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetBlueprintRuns(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDeleteWorkflow(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8555,8 +8552,8 @@ func awsAwsjson11_deserializeOpErrorGetBlueprintRuns(response *smithyhttp.Respon } switch { - case strings.EqualFold("EntityNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) @@ -8577,14 +8574,14 @@ func awsAwsjson11_deserializeOpErrorGetBlueprintRuns(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpGetCatalogImportStatus struct { +type awsAwsjson11_deserializeOpGetBlueprint struct { } -func (*awsAwsjson11_deserializeOpGetCatalogImportStatus) ID() string { +func (*awsAwsjson11_deserializeOpGetBlueprint) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetCatalogImportStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetBlueprint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8598,9 +8595,9 @@ func (m *awsAwsjson11_deserializeOpGetCatalogImportStatus) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetCatalogImportStatus(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetBlueprint(response, &metadata) } - output := &GetCatalogImportStatusOutput{} + output := &GetBlueprintOutput{} out.Result = output var buff [1024]byte @@ -8620,7 +8617,7 @@ func (m *awsAwsjson11_deserializeOpGetCatalogImportStatus) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetCatalogImportStatusOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetBlueprintOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8634,7 +8631,7 @@ func (m *awsAwsjson11_deserializeOpGetCatalogImportStatus) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetCatalogImportStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetBlueprint(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8675,9 +8672,15 @@ func awsAwsjson11_deserializeOpErrorGetCatalogImportStatus(response *smithyhttp. } switch { + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) @@ -8691,14 +8694,14 @@ func awsAwsjson11_deserializeOpErrorGetCatalogImportStatus(response *smithyhttp. } } -type awsAwsjson11_deserializeOpGetClassifier struct { +type awsAwsjson11_deserializeOpGetBlueprintRun struct { } -func (*awsAwsjson11_deserializeOpGetClassifier) ID() string { +func (*awsAwsjson11_deserializeOpGetBlueprintRun) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetClassifier) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetBlueprintRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8712,9 +8715,9 @@ func (m *awsAwsjson11_deserializeOpGetClassifier) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetClassifier(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetBlueprintRun(response, &metadata) } - output := &GetClassifierOutput{} + output := &GetBlueprintRunOutput{} out.Result = output var buff [1024]byte @@ -8734,7 +8737,7 @@ func (m *awsAwsjson11_deserializeOpGetClassifier) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetClassifierOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetBlueprintRunOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8748,7 +8751,7 @@ func (m *awsAwsjson11_deserializeOpGetClassifier) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetClassifier(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetBlueprintRun(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8792,6 +8795,9 @@ func awsAwsjson11_deserializeOpErrorGetClassifier(response *smithyhttp.Response, case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) @@ -8805,14 +8811,14 @@ func awsAwsjson11_deserializeOpErrorGetClassifier(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpGetClassifiers struct { +type awsAwsjson11_deserializeOpGetBlueprintRuns struct { } -func (*awsAwsjson11_deserializeOpGetClassifiers) ID() string { +func (*awsAwsjson11_deserializeOpGetBlueprintRuns) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetClassifiers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetBlueprintRuns) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8826,9 +8832,9 @@ func (m *awsAwsjson11_deserializeOpGetClassifiers) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetClassifiers(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetBlueprintRuns(response, &metadata) } - output := &GetClassifiersOutput{} + output := &GetBlueprintRunsOutput{} out.Result = output var buff [1024]byte @@ -8848,7 +8854,7 @@ func (m *awsAwsjson11_deserializeOpGetClassifiers) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetClassifiersOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetBlueprintRunsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8862,7 +8868,7 @@ func (m *awsAwsjson11_deserializeOpGetClassifiers) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetClassifiers(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetBlueprintRuns(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8903,6 +8909,15 @@ func awsAwsjson11_deserializeOpErrorGetClassifiers(response *smithyhttp.Response } switch { + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) @@ -8916,14 +8931,14 @@ func awsAwsjson11_deserializeOpErrorGetClassifiers(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpGetColumnStatisticsForPartition struct { +type awsAwsjson11_deserializeOpGetCatalogImportStatus struct { } -func (*awsAwsjson11_deserializeOpGetColumnStatisticsForPartition) ID() string { +func (*awsAwsjson11_deserializeOpGetCatalogImportStatus) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetColumnStatisticsForPartition) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetCatalogImportStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8937,9 +8952,9 @@ func (m *awsAwsjson11_deserializeOpGetColumnStatisticsForPartition) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetColumnStatisticsForPartition(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetCatalogImportStatus(response, &metadata) } - output := &GetColumnStatisticsForPartitionOutput{} + output := &GetCatalogImportStatusOutput{} out.Result = output var buff [1024]byte @@ -8959,7 +8974,7 @@ func (m *awsAwsjson11_deserializeOpGetColumnStatisticsForPartition) HandleDeseri return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetColumnStatisticsForPartitionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetCatalogImportStatusOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8973,7 +8988,7 @@ func (m *awsAwsjson11_deserializeOpGetColumnStatisticsForPartition) HandleDeseri return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetColumnStatisticsForPartition(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetCatalogImportStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9014,18 +9029,9 @@ func awsAwsjson11_deserializeOpErrorGetColumnStatisticsForPartition(response *sm } switch { - case strings.EqualFold("EntityNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - - case strings.EqualFold("GlueEncryptionException", errorCode): - return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("InvalidInputException", errorCode): - return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) @@ -9039,14 +9045,14 @@ func awsAwsjson11_deserializeOpErrorGetColumnStatisticsForPartition(response *sm } } -type awsAwsjson11_deserializeOpGetColumnStatisticsForTable struct { +type awsAwsjson11_deserializeOpGetClassifier struct { } -func (*awsAwsjson11_deserializeOpGetColumnStatisticsForTable) ID() string { +func (*awsAwsjson11_deserializeOpGetClassifier) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetColumnStatisticsForTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetClassifier) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9060,9 +9066,9 @@ func (m *awsAwsjson11_deserializeOpGetColumnStatisticsForTable) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetColumnStatisticsForTable(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetClassifier(response, &metadata) } - output := &GetColumnStatisticsForTableOutput{} + output := &GetClassifierOutput{} out.Result = output var buff [1024]byte @@ -9082,7 +9088,7 @@ func (m *awsAwsjson11_deserializeOpGetColumnStatisticsForTable) HandleDeserializ return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetColumnStatisticsForTableOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetClassifierOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9096,7 +9102,7 @@ func (m *awsAwsjson11_deserializeOpGetColumnStatisticsForTable) HandleDeserializ return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetColumnStatisticsForTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetClassifier(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9140,15 +9146,117 @@ func awsAwsjson11_deserializeOpErrorGetColumnStatisticsForTable(response *smithy case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("GlueEncryptionException", errorCode): - return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError - case strings.EqualFold("InvalidInputException", errorCode): - return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + } +} + +type awsAwsjson11_deserializeOpGetClassifiers struct { +} + +func (*awsAwsjson11_deserializeOpGetClassifiers) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetClassifiers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetClassifiers(response, &metadata) + } + output := &GetClassifiersOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, 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 out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetClassifiersOutput(&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 out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetClassifiers(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + 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) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) @@ -9162,14 +9270,14 @@ func awsAwsjson11_deserializeOpErrorGetColumnStatisticsForTable(response *smithy } } -type awsAwsjson11_deserializeOpGetConnection struct { +type awsAwsjson11_deserializeOpGetColumnStatisticsForPartition struct { } -func (*awsAwsjson11_deserializeOpGetConnection) ID() string { +func (*awsAwsjson11_deserializeOpGetColumnStatisticsForPartition) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetColumnStatisticsForPartition) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9183,9 +9291,9 @@ func (m *awsAwsjson11_deserializeOpGetConnection) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetConnection(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetColumnStatisticsForPartition(response, &metadata) } - output := &GetConnectionOutput{} + output := &GetColumnStatisticsForPartitionOutput{} out.Result = output var buff [1024]byte @@ -9205,7 +9313,7 @@ func (m *awsAwsjson11_deserializeOpGetConnection) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetConnectionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetColumnStatisticsForPartitionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9219,7 +9327,7 @@ func (m *awsAwsjson11_deserializeOpGetConnection) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetColumnStatisticsForPartition(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9266,6 +9374,9 @@ func awsAwsjson11_deserializeOpErrorGetConnection(response *smithyhttp.Response, case strings.EqualFold("GlueEncryptionException", errorCode): return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) @@ -9282,14 +9393,14 @@ func awsAwsjson11_deserializeOpErrorGetConnection(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpGetConnections struct { +type awsAwsjson11_deserializeOpGetColumnStatisticsForTable struct { } -func (*awsAwsjson11_deserializeOpGetConnections) ID() string { +func (*awsAwsjson11_deserializeOpGetColumnStatisticsForTable) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetConnections) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetColumnStatisticsForTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9303,9 +9414,9 @@ func (m *awsAwsjson11_deserializeOpGetConnections) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetConnections(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetColumnStatisticsForTable(response, &metadata) } - output := &GetConnectionsOutput{} + output := &GetColumnStatisticsForTableOutput{} out.Result = output var buff [1024]byte @@ -9325,7 +9436,7 @@ func (m *awsAwsjson11_deserializeOpGetConnections) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetConnectionsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetColumnStatisticsForTableOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9339,7 +9450,7 @@ func (m *awsAwsjson11_deserializeOpGetConnections) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetConnections(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetColumnStatisticsForTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9386,6 +9497,9 @@ func awsAwsjson11_deserializeOpErrorGetConnections(response *smithyhttp.Response case strings.EqualFold("GlueEncryptionException", errorCode): return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) @@ -9402,14 +9516,14 @@ func awsAwsjson11_deserializeOpErrorGetConnections(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpGetCrawler struct { +type awsAwsjson11_deserializeOpGetConnection struct { } -func (*awsAwsjson11_deserializeOpGetCrawler) ID() string { +func (*awsAwsjson11_deserializeOpGetConnection) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetCrawler) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9423,9 +9537,9 @@ func (m *awsAwsjson11_deserializeOpGetCrawler) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetCrawler(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetConnection(response, &metadata) } - output := &GetCrawlerOutput{} + output := &GetConnectionOutput{} out.Result = output var buff [1024]byte @@ -9445,7 +9559,7 @@ func (m *awsAwsjson11_deserializeOpGetCrawler) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetCrawlerOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetConnectionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9459,7 +9573,7 @@ func (m *awsAwsjson11_deserializeOpGetCrawler) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetCrawler(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9503,6 +9617,12 @@ func awsAwsjson11_deserializeOpErrorGetCrawler(response *smithyhttp.Response, me case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("GlueEncryptionException", errorCode): + return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) @@ -9516,14 +9636,14 @@ func awsAwsjson11_deserializeOpErrorGetCrawler(response *smithyhttp.Response, me } } -type awsAwsjson11_deserializeOpGetCrawlerMetrics struct { +type awsAwsjson11_deserializeOpGetConnections struct { } -func (*awsAwsjson11_deserializeOpGetCrawlerMetrics) ID() string { +func (*awsAwsjson11_deserializeOpGetConnections) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetCrawlerMetrics) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetConnections) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9537,9 +9657,9 @@ func (m *awsAwsjson11_deserializeOpGetCrawlerMetrics) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetCrawlerMetrics(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetConnections(response, &metadata) } - output := &GetCrawlerMetricsOutput{} + output := &GetConnectionsOutput{} out.Result = output var buff [1024]byte @@ -9559,7 +9679,7 @@ func (m *awsAwsjson11_deserializeOpGetCrawlerMetrics) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetCrawlerMetricsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetConnectionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9573,7 +9693,7 @@ func (m *awsAwsjson11_deserializeOpGetCrawlerMetrics) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetCrawlerMetrics(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetConnections(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9614,6 +9734,15 @@ func awsAwsjson11_deserializeOpErrorGetCrawlerMetrics(response *smithyhttp.Respo } switch { + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("GlueEncryptionException", errorCode): + return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) @@ -9627,14 +9756,14 @@ func awsAwsjson11_deserializeOpErrorGetCrawlerMetrics(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpGetCrawlers struct { +type awsAwsjson11_deserializeOpGetCrawler struct { } -func (*awsAwsjson11_deserializeOpGetCrawlers) ID() string { +func (*awsAwsjson11_deserializeOpGetCrawler) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetCrawlers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetCrawler) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9648,9 +9777,9 @@ func (m *awsAwsjson11_deserializeOpGetCrawlers) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetCrawlers(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetCrawler(response, &metadata) } - output := &GetCrawlersOutput{} + output := &GetCrawlerOutput{} out.Result = output var buff [1024]byte @@ -9670,7 +9799,7 @@ func (m *awsAwsjson11_deserializeOpGetCrawlers) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetCrawlersOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetCrawlerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9684,7 +9813,232 @@ func (m *awsAwsjson11_deserializeOpGetCrawlers) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetCrawlers(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetCrawler(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + 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) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetCrawlerMetrics struct { +} + +func (*awsAwsjson11_deserializeOpGetCrawlerMetrics) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetCrawlerMetrics) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetCrawlerMetrics(response, &metadata) + } + output := &GetCrawlerMetricsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, 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 out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetCrawlerMetricsOutput(&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 out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetCrawlerMetrics(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + 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) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetCrawlers struct { +} + +func (*awsAwsjson11_deserializeOpGetCrawlers) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetCrawlers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetCrawlers(response, &metadata) + } + output := &GetCrawlersOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, 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 out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetCrawlersOutput(&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 out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetCrawlers(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -14229,14 +14583,14 @@ func awsAwsjson11_deserializeOpErrorGetTable(response *smithyhttp.Response, meta } } -type awsAwsjson11_deserializeOpGetTables struct { +type awsAwsjson11_deserializeOpGetTableOptimizer struct { } -func (*awsAwsjson11_deserializeOpGetTables) ID() string { +func (*awsAwsjson11_deserializeOpGetTableOptimizer) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetTables) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetTableOptimizer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -14250,9 +14604,9 @@ func (m *awsAwsjson11_deserializeOpGetTables) HandleDeserialize(ctx context.Cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetTables(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetTableOptimizer(response, &metadata) } - output := &GetTablesOutput{} + output := &GetTableOptimizerOutput{} out.Result = output var buff [1024]byte @@ -14272,7 +14626,7 @@ func (m *awsAwsjson11_deserializeOpGetTables) HandleDeserialize(ctx context.Cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetTablesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetTableOptimizerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -14286,7 +14640,7 @@ func (m *awsAwsjson11_deserializeOpGetTables) HandleDeserialize(ctx context.Cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetTables(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetTableOptimizer(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -14327,27 +14681,18 @@ func awsAwsjson11_deserializeOpErrorGetTables(response *smithyhttp.Response, met } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("FederationSourceException", errorCode): - return awsAwsjson11_deserializeErrorFederationSourceException(response, errorBody) - - case strings.EqualFold("FederationSourceRetryableException", errorCode): - return awsAwsjson11_deserializeErrorFederationSourceRetryableException(response, errorBody) - - case strings.EqualFold("GlueEncryptionException", errorCode): - return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("OperationTimeoutException", errorCode): - return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -14358,14 +14703,14 @@ func awsAwsjson11_deserializeOpErrorGetTables(response *smithyhttp.Response, met } } -type awsAwsjson11_deserializeOpGetTableVersion struct { +type awsAwsjson11_deserializeOpGetTables struct { } -func (*awsAwsjson11_deserializeOpGetTableVersion) ID() string { +func (*awsAwsjson11_deserializeOpGetTables) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetTableVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetTables) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -14379,9 +14724,9 @@ func (m *awsAwsjson11_deserializeOpGetTableVersion) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetTableVersion(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetTables(response, &metadata) } - output := &GetTableVersionOutput{} + output := &GetTablesOutput{} out.Result = output var buff [1024]byte @@ -14401,7 +14746,7 @@ func (m *awsAwsjson11_deserializeOpGetTableVersion) HandleDeserialize(ctx contex return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetTableVersionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetTablesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -14415,7 +14760,136 @@ func (m *awsAwsjson11_deserializeOpGetTableVersion) HandleDeserialize(ctx contex return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetTableVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetTables(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + 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) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("FederationSourceException", errorCode): + return awsAwsjson11_deserializeErrorFederationSourceException(response, errorBody) + + case strings.EqualFold("FederationSourceRetryableException", errorCode): + return awsAwsjson11_deserializeErrorFederationSourceRetryableException(response, errorBody) + + case strings.EqualFold("GlueEncryptionException", errorCode): + return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetTableVersion struct { +} + +func (*awsAwsjson11_deserializeOpGetTableVersion) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetTableVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorGetTableVersion(response, &metadata) + } + output := &GetTableVersionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, 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 out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentGetTableVersionOutput(&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 out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetTableVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -18096,14 +18570,14 @@ func awsAwsjson11_deserializeOpErrorListStatements(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpListTriggers struct { +type awsAwsjson11_deserializeOpListTableOptimizerRuns struct { } -func (*awsAwsjson11_deserializeOpListTriggers) ID() string { +func (*awsAwsjson11_deserializeOpListTableOptimizerRuns) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListTriggers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListTableOptimizerRuns) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -18117,9 +18591,9 @@ func (m *awsAwsjson11_deserializeOpListTriggers) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListTriggers(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListTableOptimizerRuns(response, &metadata) } - output := &ListTriggersOutput{} + output := &ListTableOptimizerRunsOutput{} out.Result = output var buff [1024]byte @@ -18139,7 +18613,7 @@ func (m *awsAwsjson11_deserializeOpListTriggers) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListTriggersOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListTableOptimizerRunsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18153,7 +18627,7 @@ func (m *awsAwsjson11_deserializeOpListTriggers) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListTriggers(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListTableOptimizerRuns(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -18194,6 +18668,9 @@ func awsAwsjson11_deserializeOpErrorListTriggers(response *smithyhttp.Response, } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) @@ -18203,9 +18680,6 @@ func awsAwsjson11_deserializeOpErrorListTriggers(response *smithyhttp.Response, case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("OperationTimeoutException", errorCode): - return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -18216,14 +18690,14 @@ func awsAwsjson11_deserializeOpErrorListTriggers(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpListWorkflows struct { +type awsAwsjson11_deserializeOpListTriggers struct { } -func (*awsAwsjson11_deserializeOpListWorkflows) ID() string { +func (*awsAwsjson11_deserializeOpListTriggers) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListWorkflows) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListTriggers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -18237,9 +18711,9 @@ func (m *awsAwsjson11_deserializeOpListWorkflows) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListWorkflows(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListTriggers(response, &metadata) } - output := &ListWorkflowsOutput{} + output := &ListTriggersOutput{} out.Result = output var buff [1024]byte @@ -18259,7 +18733,7 @@ func (m *awsAwsjson11_deserializeOpListWorkflows) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListWorkflowsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListTriggersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18273,7 +18747,7 @@ func (m *awsAwsjson11_deserializeOpListWorkflows) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListWorkflows(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListTriggers(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -18314,6 +18788,9 @@ func awsAwsjson11_deserializeOpErrorListWorkflows(response *smithyhttp.Response, } switch { + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) @@ -18333,14 +18810,14 @@ func awsAwsjson11_deserializeOpErrorListWorkflows(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpPutDataCatalogEncryptionSettings struct { +type awsAwsjson11_deserializeOpListWorkflows struct { } -func (*awsAwsjson11_deserializeOpPutDataCatalogEncryptionSettings) ID() string { +func (*awsAwsjson11_deserializeOpListWorkflows) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutDataCatalogEncryptionSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListWorkflows) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -18354,9 +18831,9 @@ func (m *awsAwsjson11_deserializeOpPutDataCatalogEncryptionSettings) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutDataCatalogEncryptionSettings(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListWorkflows(response, &metadata) } - output := &PutDataCatalogEncryptionSettingsOutput{} + output := &ListWorkflowsOutput{} out.Result = output var buff [1024]byte @@ -18376,7 +18853,7 @@ func (m *awsAwsjson11_deserializeOpPutDataCatalogEncryptionSettings) HandleDeser return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutDataCatalogEncryptionSettingsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListWorkflowsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18390,7 +18867,7 @@ func (m *awsAwsjson11_deserializeOpPutDataCatalogEncryptionSettings) HandleDeser return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutDataCatalogEncryptionSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListWorkflows(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -18450,14 +18927,14 @@ func awsAwsjson11_deserializeOpErrorPutDataCatalogEncryptionSettings(response *s } } -type awsAwsjson11_deserializeOpPutResourcePolicy struct { +type awsAwsjson11_deserializeOpPutDataCatalogEncryptionSettings struct { } -func (*awsAwsjson11_deserializeOpPutResourcePolicy) ID() string { +func (*awsAwsjson11_deserializeOpPutDataCatalogEncryptionSettings) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutDataCatalogEncryptionSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -18471,9 +18948,9 @@ func (m *awsAwsjson11_deserializeOpPutResourcePolicy) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutResourcePolicy(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutDataCatalogEncryptionSettings(response, &metadata) } - output := &PutResourcePolicyOutput{} + output := &PutDataCatalogEncryptionSettingsOutput{} out.Result = output var buff [1024]byte @@ -18493,7 +18970,7 @@ func (m *awsAwsjson11_deserializeOpPutResourcePolicy) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutResourcePolicyOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentPutDataCatalogEncryptionSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18507,7 +18984,7 @@ func (m *awsAwsjson11_deserializeOpPutResourcePolicy) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutDataCatalogEncryptionSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -18548,12 +19025,6 @@ func awsAwsjson11_deserializeOpErrorPutResourcePolicy(response *smithyhttp.Respo } switch { - case strings.EqualFold("ConditionCheckFailureException", errorCode): - return awsAwsjson11_deserializeErrorConditionCheckFailureException(response, errorBody) - - case strings.EqualFold("EntityNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) @@ -18573,14 +19044,14 @@ func awsAwsjson11_deserializeOpErrorPutResourcePolicy(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpPutSchemaVersionMetadata struct { +type awsAwsjson11_deserializeOpPutResourcePolicy struct { } -func (*awsAwsjson11_deserializeOpPutSchemaVersionMetadata) ID() string { +func (*awsAwsjson11_deserializeOpPutResourcePolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutSchemaVersionMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -18594,9 +19065,9 @@ func (m *awsAwsjson11_deserializeOpPutSchemaVersionMetadata) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutSchemaVersionMetadata(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutResourcePolicy(response, &metadata) } - output := &PutSchemaVersionMetadataOutput{} + output := &PutResourcePolicyOutput{} out.Result = output var buff [1024]byte @@ -18616,7 +19087,7 @@ func (m *awsAwsjson11_deserializeOpPutSchemaVersionMetadata) HandleDeserialize(c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutSchemaVersionMetadataOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentPutResourcePolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18630,7 +19101,7 @@ func (m *awsAwsjson11_deserializeOpPutSchemaVersionMetadata) HandleDeserialize(c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutSchemaVersionMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -18671,20 +19142,20 @@ func awsAwsjson11_deserializeOpErrorPutSchemaVersionMetadata(response *smithyhtt } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("AlreadyExistsException", errorCode): - return awsAwsjson11_deserializeErrorAlreadyExistsException(response, errorBody) + case strings.EqualFold("ConditionCheckFailureException", errorCode): + return awsAwsjson11_deserializeErrorConditionCheckFailureException(response, errorBody) case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("ResourceNumberLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorResourceNumberLimitExceededException(response, errorBody) + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -18696,14 +19167,14 @@ func awsAwsjson11_deserializeOpErrorPutSchemaVersionMetadata(response *smithyhtt } } -type awsAwsjson11_deserializeOpPutWorkflowRunProperties struct { +type awsAwsjson11_deserializeOpPutSchemaVersionMetadata struct { } -func (*awsAwsjson11_deserializeOpPutWorkflowRunProperties) ID() string { +func (*awsAwsjson11_deserializeOpPutSchemaVersionMetadata) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutWorkflowRunProperties) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutSchemaVersionMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -18717,9 +19188,9 @@ func (m *awsAwsjson11_deserializeOpPutWorkflowRunProperties) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutWorkflowRunProperties(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutSchemaVersionMetadata(response, &metadata) } - output := &PutWorkflowRunPropertiesOutput{} + output := &PutSchemaVersionMetadataOutput{} out.Result = output var buff [1024]byte @@ -18739,7 +19210,7 @@ func (m *awsAwsjson11_deserializeOpPutWorkflowRunProperties) HandleDeserialize(c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutWorkflowRunPropertiesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentPutSchemaVersionMetadataOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18753,7 +19224,7 @@ func (m *awsAwsjson11_deserializeOpPutWorkflowRunProperties) HandleDeserialize(c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutWorkflowRunProperties(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutSchemaVersionMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -18794,24 +19265,18 @@ func awsAwsjson11_deserializeOpErrorPutWorkflowRunProperties(response *smithyhtt } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("AlreadyExistsException", errorCode): return awsAwsjson11_deserializeErrorAlreadyExistsException(response, errorBody) - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) - case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("OperationTimeoutException", errorCode): - return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) - case strings.EqualFold("ResourceNumberLimitExceededException", errorCode): return awsAwsjson11_deserializeErrorResourceNumberLimitExceededException(response, errorBody) @@ -18825,14 +19290,14 @@ func awsAwsjson11_deserializeOpErrorPutWorkflowRunProperties(response *smithyhtt } } -type awsAwsjson11_deserializeOpQuerySchemaVersionMetadata struct { +type awsAwsjson11_deserializeOpPutWorkflowRunProperties struct { } -func (*awsAwsjson11_deserializeOpQuerySchemaVersionMetadata) ID() string { +func (*awsAwsjson11_deserializeOpPutWorkflowRunProperties) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpQuerySchemaVersionMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutWorkflowRunProperties) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -18846,9 +19311,9 @@ func (m *awsAwsjson11_deserializeOpQuerySchemaVersionMetadata) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorQuerySchemaVersionMetadata(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutWorkflowRunProperties(response, &metadata) } - output := &QuerySchemaVersionMetadataOutput{} + output := &PutWorkflowRunPropertiesOutput{} out.Result = output var buff [1024]byte @@ -18868,7 +19333,7 @@ func (m *awsAwsjson11_deserializeOpQuerySchemaVersionMetadata) HandleDeserialize return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentQuerySchemaVersionMetadataOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentPutWorkflowRunPropertiesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -18882,7 +19347,7 @@ func (m *awsAwsjson11_deserializeOpQuerySchemaVersionMetadata) HandleDeserialize return out, metadata, err } -func awsAwsjson11_deserializeOpErrorQuerySchemaVersionMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutWorkflowRunProperties(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -18923,125 +19388,8 @@ func awsAwsjson11_deserializeOpErrorQuerySchemaVersionMetadata(response *smithyh } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("EntityNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - - case strings.EqualFold("InvalidInputException", errorCode): - return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpRegisterSchemaVersion struct { -} - -func (*awsAwsjson11_deserializeOpRegisterSchemaVersion) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpRegisterSchemaVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorRegisterSchemaVersion(response, &metadata) - } - output := &RegisterSchemaVersionOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, 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 out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentRegisterSchemaVersionOutput(&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 out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorRegisterSchemaVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - 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) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("AlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorAlreadyExistsException(response, errorBody) case strings.EqualFold("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) @@ -19055,6 +19403,9 @@ func awsAwsjson11_deserializeOpErrorRegisterSchemaVersion(response *smithyhttp.R case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + case strings.EqualFold("ResourceNumberLimitExceededException", errorCode): return awsAwsjson11_deserializeErrorResourceNumberLimitExceededException(response, errorBody) @@ -19068,14 +19419,14 @@ func awsAwsjson11_deserializeOpErrorRegisterSchemaVersion(response *smithyhttp.R } } -type awsAwsjson11_deserializeOpRemoveSchemaVersionMetadata struct { +type awsAwsjson11_deserializeOpQuerySchemaVersionMetadata struct { } -func (*awsAwsjson11_deserializeOpRemoveSchemaVersionMetadata) ID() string { +func (*awsAwsjson11_deserializeOpQuerySchemaVersionMetadata) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpRemoveSchemaVersionMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpQuerySchemaVersionMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -19089,9 +19440,9 @@ func (m *awsAwsjson11_deserializeOpRemoveSchemaVersionMetadata) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorRemoveSchemaVersionMetadata(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorQuerySchemaVersionMetadata(response, &metadata) } - output := &RemoveSchemaVersionMetadataOutput{} + output := &QuerySchemaVersionMetadataOutput{} out.Result = output var buff [1024]byte @@ -19111,7 +19462,7 @@ func (m *awsAwsjson11_deserializeOpRemoveSchemaVersionMetadata) HandleDeserializ return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentRemoveSchemaVersionMetadataOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentQuerySchemaVersionMetadataOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19125,7 +19476,7 @@ func (m *awsAwsjson11_deserializeOpRemoveSchemaVersionMetadata) HandleDeserializ return out, metadata, err } -func awsAwsjson11_deserializeOpErrorRemoveSchemaVersionMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorQuerySchemaVersionMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -19185,14 +19536,14 @@ func awsAwsjson11_deserializeOpErrorRemoveSchemaVersionMetadata(response *smithy } } -type awsAwsjson11_deserializeOpResetJobBookmark struct { +type awsAwsjson11_deserializeOpRegisterSchemaVersion struct { } -func (*awsAwsjson11_deserializeOpResetJobBookmark) ID() string { +func (*awsAwsjson11_deserializeOpRegisterSchemaVersion) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpResetJobBookmark) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpRegisterSchemaVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -19206,9 +19557,9 @@ func (m *awsAwsjson11_deserializeOpResetJobBookmark) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorResetJobBookmark(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorRegisterSchemaVersion(response, &metadata) } - output := &ResetJobBookmarkOutput{} + output := &RegisterSchemaVersionOutput{} out.Result = output var buff [1024]byte @@ -19228,7 +19579,7 @@ func (m *awsAwsjson11_deserializeOpResetJobBookmark) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentResetJobBookmarkOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentRegisterSchemaVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19242,7 +19593,7 @@ func (m *awsAwsjson11_deserializeOpResetJobBookmark) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorResetJobBookmark(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorRegisterSchemaVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -19283,6 +19634,12 @@ func awsAwsjson11_deserializeOpErrorResetJobBookmark(response *smithyhttp.Respon } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) @@ -19292,8 +19649,8 @@ func awsAwsjson11_deserializeOpErrorResetJobBookmark(response *smithyhttp.Respon case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("OperationTimeoutException", errorCode): - return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + case strings.EqualFold("ResourceNumberLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorResourceNumberLimitExceededException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -19305,14 +19662,14 @@ func awsAwsjson11_deserializeOpErrorResetJobBookmark(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpResumeWorkflowRun struct { +type awsAwsjson11_deserializeOpRemoveSchemaVersionMetadata struct { } -func (*awsAwsjson11_deserializeOpResumeWorkflowRun) ID() string { +func (*awsAwsjson11_deserializeOpRemoveSchemaVersionMetadata) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpResumeWorkflowRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpRemoveSchemaVersionMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -19326,9 +19683,9 @@ func (m *awsAwsjson11_deserializeOpResumeWorkflowRun) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorResumeWorkflowRun(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorRemoveSchemaVersionMetadata(response, &metadata) } - output := &ResumeWorkflowRunOutput{} + output := &RemoveSchemaVersionMetadataOutput{} out.Result = output var buff [1024]byte @@ -19348,7 +19705,7 @@ func (m *awsAwsjson11_deserializeOpResumeWorkflowRun) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentResumeWorkflowRunOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentRemoveSchemaVersionMetadataOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19362,7 +19719,7 @@ func (m *awsAwsjson11_deserializeOpResumeWorkflowRun) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorResumeWorkflowRun(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorRemoveSchemaVersionMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -19403,24 +19760,15 @@ func awsAwsjson11_deserializeOpErrorResumeWorkflowRun(response *smithyhttp.Respo } switch { - case strings.EqualFold("ConcurrentRunsExceededException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentRunsExceededException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("IllegalWorkflowStateException", errorCode): - return awsAwsjson11_deserializeErrorIllegalWorkflowStateException(response, errorBody) - - case strings.EqualFold("InternalServiceException", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("OperationTimeoutException", errorCode): - return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -19431,14 +19779,14 @@ func awsAwsjson11_deserializeOpErrorResumeWorkflowRun(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpRunStatement struct { +type awsAwsjson11_deserializeOpResetJobBookmark struct { } -func (*awsAwsjson11_deserializeOpRunStatement) ID() string { +func (*awsAwsjson11_deserializeOpResetJobBookmark) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpRunStatement) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpResetJobBookmark) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -19452,9 +19800,9 @@ func (m *awsAwsjson11_deserializeOpRunStatement) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorRunStatement(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorResetJobBookmark(response, &metadata) } - output := &RunStatementOutput{} + output := &ResetJobBookmarkOutput{} out.Result = output var buff [1024]byte @@ -19474,7 +19822,7 @@ func (m *awsAwsjson11_deserializeOpRunStatement) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentRunStatementOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentResetJobBookmarkOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19488,7 +19836,7 @@ func (m *awsAwsjson11_deserializeOpRunStatement) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson11_deserializeOpErrorRunStatement(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorResetJobBookmark(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -19529,15 +19877,9 @@ func awsAwsjson11_deserializeOpErrorRunStatement(response *smithyhttp.Response, } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("IllegalSessionStateException", errorCode): - return awsAwsjson11_deserializeErrorIllegalSessionStateException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) @@ -19547,12 +19889,6 @@ func awsAwsjson11_deserializeOpErrorRunStatement(response *smithyhttp.Response, case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) - case strings.EqualFold("ResourceNumberLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorResourceNumberLimitExceededException(response, errorBody) - - case strings.EqualFold("ValidationException", errorCode): - return awsAwsjson11_deserializeErrorValidationException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -19563,14 +19899,14 @@ func awsAwsjson11_deserializeOpErrorRunStatement(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpSearchTables struct { +type awsAwsjson11_deserializeOpResumeWorkflowRun struct { } -func (*awsAwsjson11_deserializeOpSearchTables) ID() string { +func (*awsAwsjson11_deserializeOpResumeWorkflowRun) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpSearchTables) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpResumeWorkflowRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -19584,9 +19920,9 @@ func (m *awsAwsjson11_deserializeOpSearchTables) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorSearchTables(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorResumeWorkflowRun(response, &metadata) } - output := &SearchTablesOutput{} + output := &ResumeWorkflowRunOutput{} out.Result = output var buff [1024]byte @@ -19606,7 +19942,7 @@ func (m *awsAwsjson11_deserializeOpSearchTables) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentSearchTablesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentResumeWorkflowRunOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19620,7 +19956,7 @@ func (m *awsAwsjson11_deserializeOpSearchTables) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson11_deserializeOpErrorSearchTables(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorResumeWorkflowRun(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -19661,6 +19997,15 @@ func awsAwsjson11_deserializeOpErrorSearchTables(response *smithyhttp.Response, } switch { + case strings.EqualFold("ConcurrentRunsExceededException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentRunsExceededException(response, errorBody) + + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("IllegalWorkflowStateException", errorCode): + return awsAwsjson11_deserializeErrorIllegalWorkflowStateException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) @@ -19680,14 +20025,14 @@ func awsAwsjson11_deserializeOpErrorSearchTables(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpStartBlueprintRun struct { +type awsAwsjson11_deserializeOpRunStatement struct { } -func (*awsAwsjson11_deserializeOpStartBlueprintRun) ID() string { +func (*awsAwsjson11_deserializeOpRunStatement) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartBlueprintRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpRunStatement) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -19701,9 +20046,9 @@ func (m *awsAwsjson11_deserializeOpStartBlueprintRun) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartBlueprintRun(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorRunStatement(response, &metadata) } - output := &StartBlueprintRunOutput{} + output := &RunStatementOutput{} out.Result = output var buff [1024]byte @@ -19723,7 +20068,7 @@ func (m *awsAwsjson11_deserializeOpStartBlueprintRun) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartBlueprintRunOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentRunStatementOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19737,7 +20082,7 @@ func (m *awsAwsjson11_deserializeOpStartBlueprintRun) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartBlueprintRun(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorRunStatement(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -19778,11 +20123,14 @@ func awsAwsjson11_deserializeOpErrorStartBlueprintRun(response *smithyhttp.Respo } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("IllegalBlueprintStateException", errorCode): - return awsAwsjson11_deserializeErrorIllegalBlueprintStateException(response, errorBody) + case strings.EqualFold("IllegalSessionStateException", errorCode): + return awsAwsjson11_deserializeErrorIllegalSessionStateException(response, errorBody) case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) @@ -19796,6 +20144,9 @@ func awsAwsjson11_deserializeOpErrorStartBlueprintRun(response *smithyhttp.Respo case strings.EqualFold("ResourceNumberLimitExceededException", errorCode): return awsAwsjson11_deserializeErrorResourceNumberLimitExceededException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -19806,14 +20157,14 @@ func awsAwsjson11_deserializeOpErrorStartBlueprintRun(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpStartCrawler struct { +type awsAwsjson11_deserializeOpSearchTables struct { } -func (*awsAwsjson11_deserializeOpStartCrawler) ID() string { +func (*awsAwsjson11_deserializeOpSearchTables) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartCrawler) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpSearchTables) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -19827,9 +20178,9 @@ func (m *awsAwsjson11_deserializeOpStartCrawler) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartCrawler(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorSearchTables(response, &metadata) } - output := &StartCrawlerOutput{} + output := &SearchTablesOutput{} out.Result = output var buff [1024]byte @@ -19849,7 +20200,7 @@ func (m *awsAwsjson11_deserializeOpStartCrawler) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartCrawlerOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentSearchTablesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19863,7 +20214,7 @@ func (m *awsAwsjson11_deserializeOpStartCrawler) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartCrawler(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorSearchTables(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -19904,11 +20255,11 @@ func awsAwsjson11_deserializeOpErrorStartCrawler(response *smithyhttp.Response, } switch { - case strings.EqualFold("CrawlerRunningException", errorCode): - return awsAwsjson11_deserializeErrorCrawlerRunningException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("EntityNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) @@ -19923,14 +20274,14 @@ func awsAwsjson11_deserializeOpErrorStartCrawler(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpStartCrawlerSchedule struct { +type awsAwsjson11_deserializeOpStartBlueprintRun struct { } -func (*awsAwsjson11_deserializeOpStartCrawlerSchedule) ID() string { +func (*awsAwsjson11_deserializeOpStartBlueprintRun) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartCrawlerSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartBlueprintRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -19944,9 +20295,9 @@ func (m *awsAwsjson11_deserializeOpStartCrawlerSchedule) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartCrawlerSchedule(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartBlueprintRun(response, &metadata) } - output := &StartCrawlerScheduleOutput{} + output := &StartBlueprintRunOutput{} out.Result = output var buff [1024]byte @@ -19966,7 +20317,7 @@ func (m *awsAwsjson11_deserializeOpStartCrawlerSchedule) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartCrawlerScheduleOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartBlueprintRunOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -19980,7 +20331,7 @@ func (m *awsAwsjson11_deserializeOpStartCrawlerSchedule) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartCrawlerSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartBlueprintRun(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -20024,17 +20375,20 @@ func awsAwsjson11_deserializeOpErrorStartCrawlerSchedule(response *smithyhttp.Re case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("NoScheduleException", errorCode): - return awsAwsjson11_deserializeErrorNoScheduleException(response, errorBody) + case strings.EqualFold("IllegalBlueprintStateException", errorCode): + return awsAwsjson11_deserializeErrorIllegalBlueprintStateException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) - case strings.EqualFold("SchedulerRunningException", errorCode): - return awsAwsjson11_deserializeErrorSchedulerRunningException(response, errorBody) - - case strings.EqualFold("SchedulerTransitioningException", errorCode): - return awsAwsjson11_deserializeErrorSchedulerTransitioningException(response, errorBody) + case strings.EqualFold("ResourceNumberLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorResourceNumberLimitExceededException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -20046,14 +20400,14 @@ func awsAwsjson11_deserializeOpErrorStartCrawlerSchedule(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpStartDataQualityRuleRecommendationRun struct { +type awsAwsjson11_deserializeOpStartCrawler struct { } -func (*awsAwsjson11_deserializeOpStartDataQualityRuleRecommendationRun) ID() string { +func (*awsAwsjson11_deserializeOpStartCrawler) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartDataQualityRuleRecommendationRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartCrawler) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -20067,9 +20421,9 @@ func (m *awsAwsjson11_deserializeOpStartDataQualityRuleRecommendationRun) Handle } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartDataQualityRuleRecommendationRun(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartCrawler(response, &metadata) } - output := &StartDataQualityRuleRecommendationRunOutput{} + output := &StartCrawlerOutput{} out.Result = output var buff [1024]byte @@ -20089,7 +20443,7 @@ func (m *awsAwsjson11_deserializeOpStartDataQualityRuleRecommendationRun) Handle return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartDataQualityRuleRecommendationRunOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartCrawlerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20103,7 +20457,7 @@ func (m *awsAwsjson11_deserializeOpStartDataQualityRuleRecommendationRun) Handle return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartDataQualityRuleRecommendationRun(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartCrawler(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -20144,18 +20498,138 @@ func awsAwsjson11_deserializeOpErrorStartDataQualityRuleRecommendationRun(respon } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("CrawlerRunningException", errorCode): + return awsAwsjson11_deserializeErrorCrawlerRunningException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("InvalidInputException", errorCode): - return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpStartCrawlerSchedule struct { +} + +func (*awsAwsjson11_deserializeOpStartCrawlerSchedule) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpStartCrawlerSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorStartCrawlerSchedule(response, &metadata) + } + output := &StartCrawlerScheduleOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, 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 out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentStartCrawlerScheduleOutput(&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 out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorStartCrawlerSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + 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) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("NoScheduleException", errorCode): + return awsAwsjson11_deserializeErrorNoScheduleException(response, errorBody) case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + case strings.EqualFold("SchedulerRunningException", errorCode): + return awsAwsjson11_deserializeErrorSchedulerRunningException(response, errorBody) + + case strings.EqualFold("SchedulerTransitioningException", errorCode): + return awsAwsjson11_deserializeErrorSchedulerTransitioningException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -20166,14 +20640,14 @@ func awsAwsjson11_deserializeOpErrorStartDataQualityRuleRecommendationRun(respon } } -type awsAwsjson11_deserializeOpStartDataQualityRulesetEvaluationRun struct { +type awsAwsjson11_deserializeOpStartDataQualityRuleRecommendationRun struct { } -func (*awsAwsjson11_deserializeOpStartDataQualityRulesetEvaluationRun) ID() string { +func (*awsAwsjson11_deserializeOpStartDataQualityRuleRecommendationRun) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartDataQualityRulesetEvaluationRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartDataQualityRuleRecommendationRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -20187,9 +20661,9 @@ func (m *awsAwsjson11_deserializeOpStartDataQualityRulesetEvaluationRun) HandleD } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartDataQualityRulesetEvaluationRun(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartDataQualityRuleRecommendationRun(response, &metadata) } - output := &StartDataQualityRulesetEvaluationRunOutput{} + output := &StartDataQualityRuleRecommendationRunOutput{} out.Result = output var buff [1024]byte @@ -20209,7 +20683,7 @@ func (m *awsAwsjson11_deserializeOpStartDataQualityRulesetEvaluationRun) HandleD return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartDataQualityRulesetEvaluationRunOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartDataQualityRuleRecommendationRunOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20223,7 +20697,7 @@ func (m *awsAwsjson11_deserializeOpStartDataQualityRulesetEvaluationRun) HandleD return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartDataQualityRulesetEvaluationRun(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartDataQualityRuleRecommendationRun(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -20267,9 +20741,6 @@ func awsAwsjson11_deserializeOpErrorStartDataQualityRulesetEvaluationRun(respons case strings.EqualFold("ConflictException", errorCode): return awsAwsjson11_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("EntityNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) @@ -20289,14 +20760,14 @@ func awsAwsjson11_deserializeOpErrorStartDataQualityRulesetEvaluationRun(respons } } -type awsAwsjson11_deserializeOpStartExportLabelsTaskRun struct { +type awsAwsjson11_deserializeOpStartDataQualityRulesetEvaluationRun struct { } -func (*awsAwsjson11_deserializeOpStartExportLabelsTaskRun) ID() string { +func (*awsAwsjson11_deserializeOpStartDataQualityRulesetEvaluationRun) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartExportLabelsTaskRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartDataQualityRulesetEvaluationRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -20310,9 +20781,9 @@ func (m *awsAwsjson11_deserializeOpStartExportLabelsTaskRun) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartExportLabelsTaskRun(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartDataQualityRulesetEvaluationRun(response, &metadata) } - output := &StartExportLabelsTaskRunOutput{} + output := &StartDataQualityRulesetEvaluationRunOutput{} out.Result = output var buff [1024]byte @@ -20332,7 +20803,7 @@ func (m *awsAwsjson11_deserializeOpStartExportLabelsTaskRun) HandleDeserialize(c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartExportLabelsTaskRunOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartDataQualityRulesetEvaluationRunOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20346,7 +20817,7 @@ func (m *awsAwsjson11_deserializeOpStartExportLabelsTaskRun) HandleDeserialize(c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartExportLabelsTaskRun(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartDataQualityRulesetEvaluationRun(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -20387,6 +20858,9 @@ func awsAwsjson11_deserializeOpErrorStartExportLabelsTaskRun(response *smithyhtt } switch { + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) @@ -20409,14 +20883,14 @@ func awsAwsjson11_deserializeOpErrorStartExportLabelsTaskRun(response *smithyhtt } } -type awsAwsjson11_deserializeOpStartImportLabelsTaskRun struct { +type awsAwsjson11_deserializeOpStartExportLabelsTaskRun struct { } -func (*awsAwsjson11_deserializeOpStartImportLabelsTaskRun) ID() string { +func (*awsAwsjson11_deserializeOpStartExportLabelsTaskRun) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartImportLabelsTaskRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartExportLabelsTaskRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -20430,9 +20904,9 @@ func (m *awsAwsjson11_deserializeOpStartImportLabelsTaskRun) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartImportLabelsTaskRun(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartExportLabelsTaskRun(response, &metadata) } - output := &StartImportLabelsTaskRunOutput{} + output := &StartExportLabelsTaskRunOutput{} out.Result = output var buff [1024]byte @@ -20452,7 +20926,7 @@ func (m *awsAwsjson11_deserializeOpStartImportLabelsTaskRun) HandleDeserialize(c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartImportLabelsTaskRunOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartExportLabelsTaskRunOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20466,7 +20940,7 @@ func (m *awsAwsjson11_deserializeOpStartImportLabelsTaskRun) HandleDeserialize(c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartImportLabelsTaskRun(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartExportLabelsTaskRun(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -20519,9 +20993,6 @@ func awsAwsjson11_deserializeOpErrorStartImportLabelsTaskRun(response *smithyhtt case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) - case strings.EqualFold("ResourceNumberLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorResourceNumberLimitExceededException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -20532,14 +21003,14 @@ func awsAwsjson11_deserializeOpErrorStartImportLabelsTaskRun(response *smithyhtt } } -type awsAwsjson11_deserializeOpStartJobRun struct { +type awsAwsjson11_deserializeOpStartImportLabelsTaskRun struct { } -func (*awsAwsjson11_deserializeOpStartJobRun) ID() string { +func (*awsAwsjson11_deserializeOpStartImportLabelsTaskRun) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartJobRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartImportLabelsTaskRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -20553,9 +21024,9 @@ func (m *awsAwsjson11_deserializeOpStartJobRun) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartJobRun(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartImportLabelsTaskRun(response, &metadata) } - output := &StartJobRunOutput{} + output := &StartImportLabelsTaskRunOutput{} out.Result = output var buff [1024]byte @@ -20575,7 +21046,7 @@ func (m *awsAwsjson11_deserializeOpStartJobRun) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartJobRunOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartImportLabelsTaskRunOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20589,7 +21060,7 @@ func (m *awsAwsjson11_deserializeOpStartJobRun) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartJobRun(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartImportLabelsTaskRun(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -20630,9 +21101,6 @@ func awsAwsjson11_deserializeOpErrorStartJobRun(response *smithyhttp.Response, m } switch { - case strings.EqualFold("ConcurrentRunsExceededException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentRunsExceededException(response, errorBody) - case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) @@ -20658,14 +21126,14 @@ func awsAwsjson11_deserializeOpErrorStartJobRun(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpStartMLEvaluationTaskRun struct { +type awsAwsjson11_deserializeOpStartJobRun struct { } -func (*awsAwsjson11_deserializeOpStartMLEvaluationTaskRun) ID() string { +func (*awsAwsjson11_deserializeOpStartJobRun) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartMLEvaluationTaskRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartJobRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -20679,9 +21147,9 @@ func (m *awsAwsjson11_deserializeOpStartMLEvaluationTaskRun) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartMLEvaluationTaskRun(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartJobRun(response, &metadata) } - output := &StartMLEvaluationTaskRunOutput{} + output := &StartJobRunOutput{} out.Result = output var buff [1024]byte @@ -20701,7 +21169,7 @@ func (m *awsAwsjson11_deserializeOpStartMLEvaluationTaskRun) HandleDeserialize(c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartMLEvaluationTaskRunOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartJobRunOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20715,7 +21183,7 @@ func (m *awsAwsjson11_deserializeOpStartMLEvaluationTaskRun) HandleDeserialize(c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartMLEvaluationTaskRun(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartJobRun(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -20768,12 +21236,12 @@ func awsAwsjson11_deserializeOpErrorStartMLEvaluationTaskRun(response *smithyhtt case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("MLTransformNotReadyException", errorCode): - return awsAwsjson11_deserializeErrorMLTransformNotReadyException(response, errorBody) - case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + case strings.EqualFold("ResourceNumberLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorResourceNumberLimitExceededException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -20784,14 +21252,14 @@ func awsAwsjson11_deserializeOpErrorStartMLEvaluationTaskRun(response *smithyhtt } } -type awsAwsjson11_deserializeOpStartMLLabelingSetGenerationTaskRun struct { +type awsAwsjson11_deserializeOpStartMLEvaluationTaskRun struct { } -func (*awsAwsjson11_deserializeOpStartMLLabelingSetGenerationTaskRun) ID() string { +func (*awsAwsjson11_deserializeOpStartMLEvaluationTaskRun) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartMLLabelingSetGenerationTaskRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartMLEvaluationTaskRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -20805,9 +21273,9 @@ func (m *awsAwsjson11_deserializeOpStartMLLabelingSetGenerationTaskRun) HandleDe } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartMLLabelingSetGenerationTaskRun(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartMLEvaluationTaskRun(response, &metadata) } - output := &StartMLLabelingSetGenerationTaskRunOutput{} + output := &StartMLEvaluationTaskRunOutput{} out.Result = output var buff [1024]byte @@ -20827,7 +21295,7 @@ func (m *awsAwsjson11_deserializeOpStartMLLabelingSetGenerationTaskRun) HandleDe return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartMLLabelingSetGenerationTaskRunOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartMLEvaluationTaskRunOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20841,7 +21309,7 @@ func (m *awsAwsjson11_deserializeOpStartMLLabelingSetGenerationTaskRun) HandleDe return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartMLLabelingSetGenerationTaskRun(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartMLEvaluationTaskRun(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -20894,6 +21362,9 @@ func awsAwsjson11_deserializeOpErrorStartMLLabelingSetGenerationTaskRun(response case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + case strings.EqualFold("MLTransformNotReadyException", errorCode): + return awsAwsjson11_deserializeErrorMLTransformNotReadyException(response, errorBody) + case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) @@ -20907,14 +21378,14 @@ func awsAwsjson11_deserializeOpErrorStartMLLabelingSetGenerationTaskRun(response } } -type awsAwsjson11_deserializeOpStartTrigger struct { +type awsAwsjson11_deserializeOpStartMLLabelingSetGenerationTaskRun struct { } -func (*awsAwsjson11_deserializeOpStartTrigger) ID() string { +func (*awsAwsjson11_deserializeOpStartMLLabelingSetGenerationTaskRun) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartTrigger) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartMLLabelingSetGenerationTaskRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -20928,9 +21399,9 @@ func (m *awsAwsjson11_deserializeOpStartTrigger) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartTrigger(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartMLLabelingSetGenerationTaskRun(response, &metadata) } - output := &StartTriggerOutput{} + output := &StartMLLabelingSetGenerationTaskRunOutput{} out.Result = output var buff [1024]byte @@ -20950,7 +21421,7 @@ func (m *awsAwsjson11_deserializeOpStartTrigger) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartTriggerOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartMLLabelingSetGenerationTaskRunOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -20964,7 +21435,7 @@ func (m *awsAwsjson11_deserializeOpStartTrigger) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartTrigger(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartMLLabelingSetGenerationTaskRun(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -21020,9 +21491,6 @@ func awsAwsjson11_deserializeOpErrorStartTrigger(response *smithyhttp.Response, case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) - case strings.EqualFold("ResourceNumberLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorResourceNumberLimitExceededException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -21033,14 +21501,14 @@ func awsAwsjson11_deserializeOpErrorStartTrigger(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpStartWorkflowRun struct { +type awsAwsjson11_deserializeOpStartTrigger struct { } -func (*awsAwsjson11_deserializeOpStartWorkflowRun) ID() string { +func (*awsAwsjson11_deserializeOpStartTrigger) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartWorkflowRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartTrigger) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -21054,9 +21522,9 @@ func (m *awsAwsjson11_deserializeOpStartWorkflowRun) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartWorkflowRun(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartTrigger(response, &metadata) } - output := &StartWorkflowRunOutput{} + output := &StartTriggerOutput{} out.Result = output var buff [1024]byte @@ -21076,7 +21544,7 @@ func (m *awsAwsjson11_deserializeOpStartWorkflowRun) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartWorkflowRunOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartTriggerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21090,7 +21558,7 @@ func (m *awsAwsjson11_deserializeOpStartWorkflowRun) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartWorkflowRun(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartTrigger(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -21159,14 +21627,14 @@ func awsAwsjson11_deserializeOpErrorStartWorkflowRun(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpStopCrawler struct { +type awsAwsjson11_deserializeOpStartWorkflowRun struct { } -func (*awsAwsjson11_deserializeOpStopCrawler) ID() string { +func (*awsAwsjson11_deserializeOpStartWorkflowRun) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStopCrawler) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartWorkflowRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -21180,9 +21648,9 @@ func (m *awsAwsjson11_deserializeOpStopCrawler) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStopCrawler(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartWorkflowRun(response, &metadata) } - output := &StopCrawlerOutput{} + output := &StartWorkflowRunOutput{} out.Result = output var buff [1024]byte @@ -21202,7 +21670,7 @@ func (m *awsAwsjson11_deserializeOpStopCrawler) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStopCrawlerOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartWorkflowRunOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21216,7 +21684,7 @@ func (m *awsAwsjson11_deserializeOpStopCrawler) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStopCrawler(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartWorkflowRun(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -21257,137 +21725,23 @@ func awsAwsjson11_deserializeOpErrorStopCrawler(response *smithyhttp.Response, m } switch { - case strings.EqualFold("CrawlerNotRunningException", errorCode): - return awsAwsjson11_deserializeErrorCrawlerNotRunningException(response, errorBody) - - case strings.EqualFold("CrawlerStoppingException", errorCode): - return awsAwsjson11_deserializeErrorCrawlerStoppingException(response, errorBody) + case strings.EqualFold("ConcurrentRunsExceededException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentRunsExceededException(response, errorBody) case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("OperationTimeoutException", errorCode): - return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpStopCrawlerSchedule struct { -} - -func (*awsAwsjson11_deserializeOpStopCrawlerSchedule) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpStopCrawlerSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStopCrawlerSchedule(response, &metadata) - } - output := &StopCrawlerScheduleOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, 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 out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentStopCrawlerScheduleOutput(&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 out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorStopCrawlerSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - 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) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) - switch { - case strings.EqualFold("EntityNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) - case strings.EqualFold("SchedulerNotRunningException", errorCode): - return awsAwsjson11_deserializeErrorSchedulerNotRunningException(response, errorBody) - - case strings.EqualFold("SchedulerTransitioningException", errorCode): - return awsAwsjson11_deserializeErrorSchedulerTransitioningException(response, errorBody) + case strings.EqualFold("ResourceNumberLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorResourceNumberLimitExceededException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -21399,14 +21753,14 @@ func awsAwsjson11_deserializeOpErrorStopCrawlerSchedule(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpStopSession struct { +type awsAwsjson11_deserializeOpStopCrawler struct { } -func (*awsAwsjson11_deserializeOpStopSession) ID() string { +func (*awsAwsjson11_deserializeOpStopCrawler) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStopSession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStopCrawler) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -21420,9 +21774,9 @@ func (m *awsAwsjson11_deserializeOpStopSession) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStopSession(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStopCrawler(response, &metadata) } - output := &StopSessionOutput{} + output := &StopCrawlerOutput{} out.Result = output var buff [1024]byte @@ -21442,7 +21796,7 @@ func (m *awsAwsjson11_deserializeOpStopSession) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStopSessionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStopCrawlerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21456,7 +21810,7 @@ func (m *awsAwsjson11_deserializeOpStopSession) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStopSession(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStopCrawler(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -21497,20 +21851,14 @@ func awsAwsjson11_deserializeOpErrorStopSession(response *smithyhttp.Response, m } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) - - case strings.EqualFold("IllegalSessionStateException", errorCode): - return awsAwsjson11_deserializeErrorIllegalSessionStateException(response, errorBody) + case strings.EqualFold("CrawlerNotRunningException", errorCode): + return awsAwsjson11_deserializeErrorCrawlerNotRunningException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("CrawlerStoppingException", errorCode): + return awsAwsjson11_deserializeErrorCrawlerStoppingException(response, errorBody) - case strings.EqualFold("InvalidInputException", errorCode): - return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) @@ -21525,14 +21873,14 @@ func awsAwsjson11_deserializeOpErrorStopSession(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpStopTrigger struct { +type awsAwsjson11_deserializeOpStopCrawlerSchedule struct { } -func (*awsAwsjson11_deserializeOpStopTrigger) ID() string { +func (*awsAwsjson11_deserializeOpStopCrawlerSchedule) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStopTrigger) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStopCrawlerSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -21546,9 +21894,9 @@ func (m *awsAwsjson11_deserializeOpStopTrigger) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStopTrigger(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStopCrawlerSchedule(response, &metadata) } - output := &StopTriggerOutput{} + output := &StopCrawlerScheduleOutput{} out.Result = output var buff [1024]byte @@ -21568,7 +21916,7 @@ func (m *awsAwsjson11_deserializeOpStopTrigger) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStopTriggerOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStopCrawlerScheduleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21582,7 +21930,7 @@ func (m *awsAwsjson11_deserializeOpStopTrigger) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStopTrigger(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStopCrawlerSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -21623,21 +21971,18 @@ func awsAwsjson11_deserializeOpErrorStopTrigger(response *smithyhttp.Response, m } switch { - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) - case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) - - case strings.EqualFold("InvalidInputException", errorCode): - return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + case strings.EqualFold("SchedulerNotRunningException", errorCode): + return awsAwsjson11_deserializeErrorSchedulerNotRunningException(response, errorBody) + + case strings.EqualFold("SchedulerTransitioningException", errorCode): + return awsAwsjson11_deserializeErrorSchedulerTransitioningException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -21648,14 +21993,14 @@ func awsAwsjson11_deserializeOpErrorStopTrigger(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpStopWorkflowRun struct { +type awsAwsjson11_deserializeOpStopSession struct { } -func (*awsAwsjson11_deserializeOpStopWorkflowRun) ID() string { +func (*awsAwsjson11_deserializeOpStopSession) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStopWorkflowRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStopSession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -21669,9 +22014,9 @@ func (m *awsAwsjson11_deserializeOpStopWorkflowRun) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStopWorkflowRun(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStopSession(response, &metadata) } - output := &StopWorkflowRunOutput{} + output := &StopSessionOutput{} out.Result = output var buff [1024]byte @@ -21691,7 +22036,7 @@ func (m *awsAwsjson11_deserializeOpStopWorkflowRun) HandleDeserialize(ctx contex return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStopWorkflowRunOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStopSessionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21705,7 +22050,7 @@ func (m *awsAwsjson11_deserializeOpStopWorkflowRun) HandleDeserialize(ctx contex return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStopWorkflowRun(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStopSession(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -21746,11 +22091,14 @@ func awsAwsjson11_deserializeOpErrorStopWorkflowRun(response *smithyhttp.Respons } switch { - case strings.EqualFold("EntityNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("IllegalWorkflowStateException", errorCode): - return awsAwsjson11_deserializeErrorIllegalWorkflowStateException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("IllegalSessionStateException", errorCode): + return awsAwsjson11_deserializeErrorIllegalSessionStateException(response, errorBody) case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) @@ -21771,14 +22119,14 @@ func awsAwsjson11_deserializeOpErrorStopWorkflowRun(response *smithyhttp.Respons } } -type awsAwsjson11_deserializeOpTagResource struct { +type awsAwsjson11_deserializeOpStopTrigger struct { } -func (*awsAwsjson11_deserializeOpTagResource) ID() string { +func (*awsAwsjson11_deserializeOpStopTrigger) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStopTrigger) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -21792,9 +22140,9 @@ func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorTagResource(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStopTrigger(response, &metadata) } - output := &TagResourceOutput{} + output := &StopTriggerOutput{} out.Result = output var buff [1024]byte @@ -21814,7 +22162,7 @@ func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentTagResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStopTriggerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21828,7 +22176,7 @@ func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStopTrigger(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -21869,6 +22217,9 @@ func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, m } switch { + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) @@ -21891,14 +22242,14 @@ func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpUntagResource struct { +type awsAwsjson11_deserializeOpStopWorkflowRun struct { } -func (*awsAwsjson11_deserializeOpUntagResource) ID() string { +func (*awsAwsjson11_deserializeOpStopWorkflowRun) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStopWorkflowRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -21912,9 +22263,9 @@ func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUntagResource(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStopWorkflowRun(response, &metadata) } - output := &UntagResourceOutput{} + output := &StopWorkflowRunOutput{} out.Result = output var buff [1024]byte @@ -21934,7 +22285,7 @@ func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUntagResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStopWorkflowRunOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -21948,7 +22299,7 @@ func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStopWorkflowRun(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -21992,6 +22343,9 @@ func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("IllegalWorkflowStateException", errorCode): + return awsAwsjson11_deserializeErrorIllegalWorkflowStateException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) @@ -22011,14 +22365,14 @@ func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpUpdateBlueprint struct { +type awsAwsjson11_deserializeOpTagResource struct { } -func (*awsAwsjson11_deserializeOpUpdateBlueprint) ID() string { +func (*awsAwsjson11_deserializeOpTagResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateBlueprint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -22032,9 +22386,9 @@ func (m *awsAwsjson11_deserializeOpUpdateBlueprint) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateBlueprint(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorTagResource(response, &metadata) } - output := &UpdateBlueprintOutput{} + output := &TagResourceOutput{} out.Result = output var buff [1024]byte @@ -22054,7 +22408,7 @@ func (m *awsAwsjson11_deserializeOpUpdateBlueprint) HandleDeserialize(ctx contex return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateBlueprintOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentTagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22068,7 +22422,7 @@ func (m *awsAwsjson11_deserializeOpUpdateBlueprint) HandleDeserialize(ctx contex return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateBlueprint(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -22109,15 +22463,9 @@ func awsAwsjson11_deserializeOpErrorUpdateBlueprint(response *smithyhttp.Respons } switch { - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) - case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("IllegalBlueprintStateException", errorCode): - return awsAwsjson11_deserializeErrorIllegalBlueprintStateException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) @@ -22137,134 +22485,14 @@ func awsAwsjson11_deserializeOpErrorUpdateBlueprint(response *smithyhttp.Respons } } -type awsAwsjson11_deserializeOpUpdateClassifier struct { -} - -func (*awsAwsjson11_deserializeOpUpdateClassifier) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpUpdateClassifier) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateClassifier(response, &metadata) - } - output := &UpdateClassifierOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, 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 out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentUpdateClassifierOutput(&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 out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorUpdateClassifier(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - 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) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("EntityNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - - case strings.EqualFold("InvalidInputException", errorCode): - return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - - case strings.EqualFold("OperationTimeoutException", errorCode): - return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) - - case strings.EqualFold("VersionMismatchException", errorCode): - return awsAwsjson11_deserializeErrorVersionMismatchException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpUpdateColumnStatisticsForPartition struct { +type awsAwsjson11_deserializeOpUntagResource struct { } -func (*awsAwsjson11_deserializeOpUpdateColumnStatisticsForPartition) ID() string { +func (*awsAwsjson11_deserializeOpUntagResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateColumnStatisticsForPartition) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -22278,9 +22506,9 @@ func (m *awsAwsjson11_deserializeOpUpdateColumnStatisticsForPartition) HandleDes } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateColumnStatisticsForPartition(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUntagResource(response, &metadata) } - output := &UpdateColumnStatisticsForPartitionOutput{} + output := &UntagResourceOutput{} out.Result = output var buff [1024]byte @@ -22300,7 +22528,7 @@ func (m *awsAwsjson11_deserializeOpUpdateColumnStatisticsForPartition) HandleDes return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateColumnStatisticsForPartitionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUntagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22314,7 +22542,7 @@ func (m *awsAwsjson11_deserializeOpUpdateColumnStatisticsForPartition) HandleDes return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateColumnStatisticsForPartition(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -22358,9 +22586,6 @@ func awsAwsjson11_deserializeOpErrorUpdateColumnStatisticsForPartition(response case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("GlueEncryptionException", errorCode): - return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) @@ -22380,14 +22605,14 @@ func awsAwsjson11_deserializeOpErrorUpdateColumnStatisticsForPartition(response } } -type awsAwsjson11_deserializeOpUpdateColumnStatisticsForTable struct { +type awsAwsjson11_deserializeOpUpdateBlueprint struct { } -func (*awsAwsjson11_deserializeOpUpdateColumnStatisticsForTable) ID() string { +func (*awsAwsjson11_deserializeOpUpdateBlueprint) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateColumnStatisticsForTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateBlueprint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -22401,9 +22626,9 @@ func (m *awsAwsjson11_deserializeOpUpdateColumnStatisticsForTable) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateColumnStatisticsForTable(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateBlueprint(response, &metadata) } - output := &UpdateColumnStatisticsForTableOutput{} + output := &UpdateBlueprintOutput{} out.Result = output var buff [1024]byte @@ -22423,7 +22648,7 @@ func (m *awsAwsjson11_deserializeOpUpdateColumnStatisticsForTable) HandleDeseria return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateColumnStatisticsForTableOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateBlueprintOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22437,7 +22662,7 @@ func (m *awsAwsjson11_deserializeOpUpdateColumnStatisticsForTable) HandleDeseria return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateColumnStatisticsForTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateBlueprint(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -22478,11 +22703,14 @@ func awsAwsjson11_deserializeOpErrorUpdateColumnStatisticsForTable(response *smi } switch { + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("GlueEncryptionException", errorCode): - return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) + case strings.EqualFold("IllegalBlueprintStateException", errorCode): + return awsAwsjson11_deserializeErrorIllegalBlueprintStateException(response, errorBody) case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) @@ -22503,14 +22731,14 @@ func awsAwsjson11_deserializeOpErrorUpdateColumnStatisticsForTable(response *smi } } -type awsAwsjson11_deserializeOpUpdateConnection struct { +type awsAwsjson11_deserializeOpUpdateClassifier struct { } -func (*awsAwsjson11_deserializeOpUpdateConnection) ID() string { +func (*awsAwsjson11_deserializeOpUpdateClassifier) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateClassifier) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -22524,9 +22752,9 @@ func (m *awsAwsjson11_deserializeOpUpdateConnection) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateConnection(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateClassifier(response, &metadata) } - output := &UpdateConnectionOutput{} + output := &UpdateClassifierOutput{} out.Result = output var buff [1024]byte @@ -22546,7 +22774,7 @@ func (m *awsAwsjson11_deserializeOpUpdateConnection) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateConnectionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateClassifierOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22560,7 +22788,7 @@ func (m *awsAwsjson11_deserializeOpUpdateConnection) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateClassifier(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -22604,15 +22832,15 @@ func awsAwsjson11_deserializeOpErrorUpdateConnection(response *smithyhttp.Respon case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("GlueEncryptionException", errorCode): - return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) - case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + case strings.EqualFold("VersionMismatchException", errorCode): + return awsAwsjson11_deserializeErrorVersionMismatchException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -22623,14 +22851,14 @@ func awsAwsjson11_deserializeOpErrorUpdateConnection(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpUpdateCrawler struct { +type awsAwsjson11_deserializeOpUpdateColumnStatisticsForPartition struct { } -func (*awsAwsjson11_deserializeOpUpdateCrawler) ID() string { +func (*awsAwsjson11_deserializeOpUpdateColumnStatisticsForPartition) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateCrawler) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateColumnStatisticsForPartition) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -22644,9 +22872,9 @@ func (m *awsAwsjson11_deserializeOpUpdateCrawler) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateCrawler(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateColumnStatisticsForPartition(response, &metadata) } - output := &UpdateCrawlerOutput{} + output := &UpdateColumnStatisticsForPartitionOutput{} out.Result = output var buff [1024]byte @@ -22666,7 +22894,7 @@ func (m *awsAwsjson11_deserializeOpUpdateCrawler) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateCrawlerOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateColumnStatisticsForPartitionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22680,7 +22908,7 @@ func (m *awsAwsjson11_deserializeOpUpdateCrawler) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateCrawler(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateColumnStatisticsForPartition(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -22721,21 +22949,21 @@ func awsAwsjson11_deserializeOpErrorUpdateCrawler(response *smithyhttp.Response, } switch { - case strings.EqualFold("CrawlerRunningException", errorCode): - return awsAwsjson11_deserializeErrorCrawlerRunningException(response, errorBody) - case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("GlueEncryptionException", errorCode): + return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) - case strings.EqualFold("VersionMismatchException", errorCode): - return awsAwsjson11_deserializeErrorVersionMismatchException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -22746,14 +22974,14 @@ func awsAwsjson11_deserializeOpErrorUpdateCrawler(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpUpdateCrawlerSchedule struct { +type awsAwsjson11_deserializeOpUpdateColumnStatisticsForTable struct { } -func (*awsAwsjson11_deserializeOpUpdateCrawlerSchedule) ID() string { +func (*awsAwsjson11_deserializeOpUpdateColumnStatisticsForTable) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateCrawlerSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateColumnStatisticsForTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -22767,9 +22995,9 @@ func (m *awsAwsjson11_deserializeOpUpdateCrawlerSchedule) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateCrawlerSchedule(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateColumnStatisticsForTable(response, &metadata) } - output := &UpdateCrawlerScheduleOutput{} + output := &UpdateColumnStatisticsForTableOutput{} out.Result = output var buff [1024]byte @@ -22789,7 +23017,7 @@ func (m *awsAwsjson11_deserializeOpUpdateCrawlerSchedule) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateCrawlerScheduleOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateColumnStatisticsForTableOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22803,7 +23031,7 @@ func (m *awsAwsjson11_deserializeOpUpdateCrawlerSchedule) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateCrawlerSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateColumnStatisticsForTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -22847,18 +23075,18 @@ func awsAwsjson11_deserializeOpErrorUpdateCrawlerSchedule(response *smithyhttp.R case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("GlueEncryptionException", errorCode): + return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) - case strings.EqualFold("SchedulerTransitioningException", errorCode): - return awsAwsjson11_deserializeErrorSchedulerTransitioningException(response, errorBody) - - case strings.EqualFold("VersionMismatchException", errorCode): - return awsAwsjson11_deserializeErrorVersionMismatchException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -22869,14 +23097,14 @@ func awsAwsjson11_deserializeOpErrorUpdateCrawlerSchedule(response *smithyhttp.R } } -type awsAwsjson11_deserializeOpUpdateDatabase struct { +type awsAwsjson11_deserializeOpUpdateConnection struct { } -func (*awsAwsjson11_deserializeOpUpdateDatabase) ID() string { +func (*awsAwsjson11_deserializeOpUpdateConnection) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateDatabase) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -22890,9 +23118,9 @@ func (m *awsAwsjson11_deserializeOpUpdateDatabase) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateDatabase(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateConnection(response, &metadata) } - output := &UpdateDatabaseOutput{} + output := &UpdateConnectionOutput{} out.Result = output var buff [1024]byte @@ -22912,7 +23140,7 @@ func (m *awsAwsjson11_deserializeOpUpdateDatabase) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateDatabaseOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateConnectionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -22926,7 +23154,7 @@ func (m *awsAwsjson11_deserializeOpUpdateDatabase) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateDatabase(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -22967,18 +23195,12 @@ func awsAwsjson11_deserializeOpErrorUpdateDatabase(response *smithyhttp.Response } switch { - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) - case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("GlueEncryptionException", errorCode): return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) - case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) @@ -22995,14 +23217,14 @@ func awsAwsjson11_deserializeOpErrorUpdateDatabase(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpUpdateDataQualityRuleset struct { +type awsAwsjson11_deserializeOpUpdateCrawler struct { } -func (*awsAwsjson11_deserializeOpUpdateDataQualityRuleset) ID() string { +func (*awsAwsjson11_deserializeOpUpdateCrawler) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateDataQualityRuleset) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateCrawler) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -23016,9 +23238,9 @@ func (m *awsAwsjson11_deserializeOpUpdateDataQualityRuleset) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateDataQualityRuleset(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateCrawler(response, &metadata) } - output := &UpdateDataQualityRulesetOutput{} + output := &UpdateCrawlerOutput{} out.Result = output var buff [1024]byte @@ -23038,7 +23260,7 @@ func (m *awsAwsjson11_deserializeOpUpdateDataQualityRuleset) HandleDeserialize(c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateDataQualityRulesetOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateCrawlerOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23052,7 +23274,7 @@ func (m *awsAwsjson11_deserializeOpUpdateDataQualityRuleset) HandleDeserialize(c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateDataQualityRuleset(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateCrawler(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -23093,17 +23315,131 @@ func awsAwsjson11_deserializeOpErrorUpdateDataQualityRuleset(response *smithyhtt } switch { - case strings.EqualFold("AlreadyExistsException", errorCode): - return awsAwsjson11_deserializeErrorAlreadyExistsException(response, errorBody) + case strings.EqualFold("CrawlerRunningException", errorCode): + return awsAwsjson11_deserializeErrorCrawlerRunningException(response, errorBody) case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("IdempotentParameterMismatchException", errorCode): - return awsAwsjson11_deserializeErrorIdempotentParameterMismatchException(response, errorBody) + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + + case strings.EqualFold("VersionMismatchException", errorCode): + return awsAwsjson11_deserializeErrorVersionMismatchException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateCrawlerSchedule struct { +} + +func (*awsAwsjson11_deserializeOpUpdateCrawlerSchedule) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateCrawlerSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateCrawlerSchedule(response, &metadata) + } + output := &UpdateCrawlerScheduleOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, 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 out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateCrawlerScheduleOutput(&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 out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateCrawlerSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + 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) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) @@ -23111,8 +23447,11 @@ func awsAwsjson11_deserializeOpErrorUpdateDataQualityRuleset(response *smithyhtt case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) - case strings.EqualFold("ResourceNumberLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorResourceNumberLimitExceededException(response, errorBody) + case strings.EqualFold("SchedulerTransitioningException", errorCode): + return awsAwsjson11_deserializeErrorSchedulerTransitioningException(response, errorBody) + + case strings.EqualFold("VersionMismatchException", errorCode): + return awsAwsjson11_deserializeErrorVersionMismatchException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -23124,14 +23463,14 @@ func awsAwsjson11_deserializeOpErrorUpdateDataQualityRuleset(response *smithyhtt } } -type awsAwsjson11_deserializeOpUpdateDevEndpoint struct { +type awsAwsjson11_deserializeOpUpdateDatabase struct { } -func (*awsAwsjson11_deserializeOpUpdateDevEndpoint) ID() string { +func (*awsAwsjson11_deserializeOpUpdateDatabase) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateDevEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateDatabase) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -23145,9 +23484,9 @@ func (m *awsAwsjson11_deserializeOpUpdateDevEndpoint) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateDevEndpoint(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateDatabase(response, &metadata) } - output := &UpdateDevEndpointOutput{} + output := &UpdateDatabaseOutput{} out.Result = output var buff [1024]byte @@ -23167,7 +23506,7 @@ func (m *awsAwsjson11_deserializeOpUpdateDevEndpoint) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateDevEndpointOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateDatabaseOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23181,7 +23520,7 @@ func (m *awsAwsjson11_deserializeOpUpdateDevEndpoint) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateDevEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateDatabase(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -23222,9 +23561,15 @@ func awsAwsjson11_deserializeOpErrorUpdateDevEndpoint(response *smithyhttp.Respo } switch { + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("GlueEncryptionException", errorCode): + return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) @@ -23234,9 +23579,6 @@ func awsAwsjson11_deserializeOpErrorUpdateDevEndpoint(response *smithyhttp.Respo case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): - return awsAwsjson11_deserializeErrorValidationException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -23247,14 +23589,14 @@ func awsAwsjson11_deserializeOpErrorUpdateDevEndpoint(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpUpdateJob struct { +type awsAwsjson11_deserializeOpUpdateDataQualityRuleset struct { } -func (*awsAwsjson11_deserializeOpUpdateJob) ID() string { +func (*awsAwsjson11_deserializeOpUpdateDataQualityRuleset) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateDataQualityRuleset) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -23268,9 +23610,9 @@ func (m *awsAwsjson11_deserializeOpUpdateJob) HandleDeserialize(ctx context.Cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateJob(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateDataQualityRuleset(response, &metadata) } - output := &UpdateJobOutput{} + output := &UpdateDataQualityRulesetOutput{} out.Result = output var buff [1024]byte @@ -23290,7 +23632,7 @@ func (m *awsAwsjson11_deserializeOpUpdateJob) HandleDeserialize(ctx context.Cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateJobOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateDataQualityRulesetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23304,7 +23646,7 @@ func (m *awsAwsjson11_deserializeOpUpdateJob) HandleDeserialize(ctx context.Cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateDataQualityRuleset(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -23345,12 +23687,15 @@ func awsAwsjson11_deserializeOpErrorUpdateJob(response *smithyhttp.Response, met } switch { - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("AlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorAlreadyExistsException(response, errorBody) case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("IdempotentParameterMismatchException", errorCode): + return awsAwsjson11_deserializeErrorIdempotentParameterMismatchException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) @@ -23360,6 +23705,9 @@ func awsAwsjson11_deserializeOpErrorUpdateJob(response *smithyhttp.Response, met case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + case strings.EqualFold("ResourceNumberLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorResourceNumberLimitExceededException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -23370,14 +23718,14 @@ func awsAwsjson11_deserializeOpErrorUpdateJob(response *smithyhttp.Response, met } } -type awsAwsjson11_deserializeOpUpdateJobFromSourceControl struct { +type awsAwsjson11_deserializeOpUpdateDevEndpoint struct { } -func (*awsAwsjson11_deserializeOpUpdateJobFromSourceControl) ID() string { +func (*awsAwsjson11_deserializeOpUpdateDevEndpoint) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateJobFromSourceControl) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateDevEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -23391,9 +23739,9 @@ func (m *awsAwsjson11_deserializeOpUpdateJobFromSourceControl) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateJobFromSourceControl(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateDevEndpoint(response, &metadata) } - output := &UpdateJobFromSourceControlOutput{} + output := &UpdateDevEndpointOutput{} out.Result = output var buff [1024]byte @@ -23413,7 +23761,7 @@ func (m *awsAwsjson11_deserializeOpUpdateJobFromSourceControl) HandleDeserialize return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateJobFromSourceControlOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateDevEndpointOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23427,7 +23775,7 @@ func (m *awsAwsjson11_deserializeOpUpdateJobFromSourceControl) HandleDeserialize return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateJobFromSourceControl(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateDevEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -23468,12 +23816,6 @@ func awsAwsjson11_deserializeOpErrorUpdateJobFromSourceControl(response *smithyh } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("AlreadyExistsException", errorCode): - return awsAwsjson11_deserializeErrorAlreadyExistsException(response, errorBody) - case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) @@ -23499,14 +23841,14 @@ func awsAwsjson11_deserializeOpErrorUpdateJobFromSourceControl(response *smithyh } } -type awsAwsjson11_deserializeOpUpdateMLTransform struct { +type awsAwsjson11_deserializeOpUpdateJob struct { } -func (*awsAwsjson11_deserializeOpUpdateMLTransform) ID() string { +func (*awsAwsjson11_deserializeOpUpdateJob) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateMLTransform) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -23520,9 +23862,9 @@ func (m *awsAwsjson11_deserializeOpUpdateMLTransform) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateMLTransform(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateJob(response, &metadata) } - output := &UpdateMLTransformOutput{} + output := &UpdateJobOutput{} out.Result = output var buff [1024]byte @@ -23542,7 +23884,7 @@ func (m *awsAwsjson11_deserializeOpUpdateMLTransform) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateMLTransformOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23556,7 +23898,7 @@ func (m *awsAwsjson11_deserializeOpUpdateMLTransform) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateMLTransform(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -23597,135 +23939,12 @@ func awsAwsjson11_deserializeOpErrorUpdateMLTransform(response *smithyhttp.Respo } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("EntityNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - - case strings.EqualFold("InternalServiceException", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) - - case strings.EqualFold("InvalidInputException", errorCode): - return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - - case strings.EqualFold("OperationTimeoutException", errorCode): - return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpUpdatePartition struct { -} - -func (*awsAwsjson11_deserializeOpUpdatePartition) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpUpdatePartition) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdatePartition(response, &metadata) - } - output := &UpdatePartitionOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, 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 out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentUpdatePartitionOutput(&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 out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorUpdatePartition(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - 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) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) - switch { case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("GlueEncryptionException", errorCode): - return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) @@ -23745,14 +23964,14 @@ func awsAwsjson11_deserializeOpErrorUpdatePartition(response *smithyhttp.Respons } } -type awsAwsjson11_deserializeOpUpdateRegistry struct { +type awsAwsjson11_deserializeOpUpdateJobFromSourceControl struct { } -func (*awsAwsjson11_deserializeOpUpdateRegistry) ID() string { +func (*awsAwsjson11_deserializeOpUpdateJobFromSourceControl) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateRegistry) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateJobFromSourceControl) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -23766,9 +23985,9 @@ func (m *awsAwsjson11_deserializeOpUpdateRegistry) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateRegistry(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateJobFromSourceControl(response, &metadata) } - output := &UpdateRegistryOutput{} + output := &UpdateJobFromSourceControlOutput{} out.Result = output var buff [1024]byte @@ -23788,7 +24007,7 @@ func (m *awsAwsjson11_deserializeOpUpdateRegistry) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateRegistryOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateJobFromSourceControlOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23802,7 +24021,7 @@ func (m *awsAwsjson11_deserializeOpUpdateRegistry) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateRegistry(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateJobFromSourceControl(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -23846,8 +24065,8 @@ func awsAwsjson11_deserializeOpErrorUpdateRegistry(response *smithyhttp.Response case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("AlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorAlreadyExistsException(response, errorBody) case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) @@ -23858,6 +24077,12 @@ func awsAwsjson11_deserializeOpErrorUpdateRegistry(response *smithyhttp.Response case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -23868,14 +24093,14 @@ func awsAwsjson11_deserializeOpErrorUpdateRegistry(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpUpdateSchema struct { +type awsAwsjson11_deserializeOpUpdateMLTransform struct { } -func (*awsAwsjson11_deserializeOpUpdateSchema) ID() string { +func (*awsAwsjson11_deserializeOpUpdateMLTransform) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateSchema) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateMLTransform) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -23889,9 +24114,9 @@ func (m *awsAwsjson11_deserializeOpUpdateSchema) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateSchema(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateMLTransform(response, &metadata) } - output := &UpdateSchemaOutput{} + output := &UpdateMLTransformOutput{} out.Result = output var buff [1024]byte @@ -23911,7 +24136,7 @@ func (m *awsAwsjson11_deserializeOpUpdateSchema) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateSchemaOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateMLTransformOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -23925,7 +24150,7 @@ func (m *awsAwsjson11_deserializeOpUpdateSchema) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateSchema(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateMLTransform(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -23969,9 +24194,6 @@ func awsAwsjson11_deserializeOpErrorUpdateSchema(response *smithyhttp.Response, case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) - case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) @@ -23981,6 +24203,9 @@ func awsAwsjson11_deserializeOpErrorUpdateSchema(response *smithyhttp.Response, case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -23991,14 +24216,14 @@ func awsAwsjson11_deserializeOpErrorUpdateSchema(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpUpdateSourceControlFromJob struct { +type awsAwsjson11_deserializeOpUpdatePartition struct { } -func (*awsAwsjson11_deserializeOpUpdateSourceControlFromJob) ID() string { +func (*awsAwsjson11_deserializeOpUpdatePartition) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateSourceControlFromJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdatePartition) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -24012,9 +24237,9 @@ func (m *awsAwsjson11_deserializeOpUpdateSourceControlFromJob) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateSourceControlFromJob(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdatePartition(response, &metadata) } - output := &UpdateSourceControlFromJobOutput{} + output := &UpdatePartitionOutput{} out.Result = output var buff [1024]byte @@ -24034,7 +24259,7 @@ func (m *awsAwsjson11_deserializeOpUpdateSourceControlFromJob) HandleDeserialize return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateSourceControlFromJobOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdatePartitionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -24048,7 +24273,7 @@ func (m *awsAwsjson11_deserializeOpUpdateSourceControlFromJob) HandleDeserialize return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateSourceControlFromJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdatePartition(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -24089,15 +24314,12 @@ func awsAwsjson11_deserializeOpErrorUpdateSourceControlFromJob(response *smithyh } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("AlreadyExistsException", errorCode): - return awsAwsjson11_deserializeErrorAlreadyExistsException(response, errorBody) - case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + case strings.EqualFold("GlueEncryptionException", errorCode): + return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) + case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) @@ -24107,9 +24329,6 @@ func awsAwsjson11_deserializeOpErrorUpdateSourceControlFromJob(response *smithyh case strings.EqualFold("OperationTimeoutException", errorCode): return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): - return awsAwsjson11_deserializeErrorValidationException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -24120,14 +24339,14 @@ func awsAwsjson11_deserializeOpErrorUpdateSourceControlFromJob(response *smithyh } } -type awsAwsjson11_deserializeOpUpdateTable struct { +type awsAwsjson11_deserializeOpUpdateRegistry struct { } -func (*awsAwsjson11_deserializeOpUpdateTable) ID() string { +func (*awsAwsjson11_deserializeOpUpdateRegistry) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateRegistry) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -24141,9 +24360,9 @@ func (m *awsAwsjson11_deserializeOpUpdateTable) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateTable(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateRegistry(response, &metadata) } - output := &UpdateTableOutput{} + output := &UpdateRegistryOutput{} out.Result = output var buff [1024]byte @@ -24163,7 +24382,7 @@ func (m *awsAwsjson11_deserializeOpUpdateTable) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateTableOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateRegistryOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -24177,7 +24396,7 @@ func (m *awsAwsjson11_deserializeOpUpdateTable) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateRegistry(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -24218,30 +24437,21 @@ func awsAwsjson11_deserializeOpErrorUpdateTable(response *smithyhttp.Response, m } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("EntityNotFoundException", errorCode): return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) - case strings.EqualFold("GlueEncryptionException", errorCode): - return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) - case strings.EqualFold("InternalServiceException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("OperationTimeoutException", errorCode): - return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) - - case strings.EqualFold("ResourceNotReadyException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotReadyException(response, errorBody) - - case strings.EqualFold("ResourceNumberLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorResourceNumberLimitExceededException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -24252,14 +24462,14 @@ func awsAwsjson11_deserializeOpErrorUpdateTable(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpUpdateTrigger struct { +type awsAwsjson11_deserializeOpUpdateSchema struct { } -func (*awsAwsjson11_deserializeOpUpdateTrigger) ID() string { +func (*awsAwsjson11_deserializeOpUpdateSchema) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateTrigger) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateSchema) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -24273,9 +24483,9 @@ func (m *awsAwsjson11_deserializeOpUpdateTrigger) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateTrigger(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateSchema(response, &metadata) } - output := &UpdateTriggerOutput{} + output := &UpdateSchemaOutput{} out.Result = output var buff [1024]byte @@ -24295,7 +24505,7 @@ func (m *awsAwsjson11_deserializeOpUpdateTrigger) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateTriggerOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateSchemaOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -24309,7 +24519,511 @@ func (m *awsAwsjson11_deserializeOpUpdateTrigger) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateTrigger(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateSchema(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + 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) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateSourceControlFromJob struct { +} + +func (*awsAwsjson11_deserializeOpUpdateSourceControlFromJob) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateSourceControlFromJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateSourceControlFromJob(response, &metadata) + } + output := &UpdateSourceControlFromJobOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, 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 out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateSourceControlFromJobOutput(&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 out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateSourceControlFromJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + 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) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("AlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorAlreadyExistsException(response, errorBody) + + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateTable struct { +} + +func (*awsAwsjson11_deserializeOpUpdateTable) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateTable(response, &metadata) + } + output := &UpdateTableOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, 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 out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateTableOutput(&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 out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + 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) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("GlueEncryptionException", errorCode): + return awsAwsjson11_deserializeErrorGlueEncryptionException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + + case strings.EqualFold("ResourceNotReadyException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotReadyException(response, errorBody) + + case strings.EqualFold("ResourceNumberLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorResourceNumberLimitExceededException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateTableOptimizer struct { +} + +func (*awsAwsjson11_deserializeOpUpdateTableOptimizer) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateTableOptimizer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateTableOptimizer(response, &metadata) + } + output := &UpdateTableOptimizerOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, 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 out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateTableOptimizerOutput(&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 out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateTableOptimizer(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + 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) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("InternalServiceException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateTrigger struct { +} + +func (*awsAwsjson11_deserializeOpUpdateTrigger) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateTrigger) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateTrigger(response, &metadata) + } + output := &UpdateTriggerOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, 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 out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentUpdateTriggerOutput(&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 out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateTrigger(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -26863,6 +27577,112 @@ func awsAwsjson11_deserializeDocumentBatchGetPartitionValueList(v *[]types.Parti return nil } +func awsAwsjson11_deserializeDocumentBatchGetTableOptimizerError(v **types.BatchGetTableOptimizerError, 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.BatchGetTableOptimizerError + if *v == nil { + sv = &types.BatchGetTableOptimizerError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "catalogId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CatalogIdString to be of type string, got %T instead", value) + } + sv.CatalogId = ptr.String(jtv) + } + + case "databaseName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected databaseNameString to be of type string, got %T instead", value) + } + sv.DatabaseName = ptr.String(jtv) + } + + case "error": + if err := awsAwsjson11_deserializeDocumentErrorDetail(&sv.Error, value); err != nil { + return err + } + + case "tableName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected tableNameString to be of type string, got %T instead", value) + } + sv.TableName = ptr.String(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TableOptimizerType to be of type string, got %T instead", value) + } + sv.Type = types.TableOptimizerType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentBatchGetTableOptimizerErrors(v *[]types.BatchGetTableOptimizerError, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.BatchGetTableOptimizerError + if *v == nil { + cv = []types.BatchGetTableOptimizerError{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BatchGetTableOptimizerError + destAddr := &col + if err := awsAwsjson11_deserializeDocumentBatchGetTableOptimizerError(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentBatchStopJobRunError(v **types.BatchStopJobRunError, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -27034,6 +27854,103 @@ func awsAwsjson11_deserializeDocumentBatchStopJobRunSuccessfulSubmissionList(v * return nil } +func awsAwsjson11_deserializeDocumentBatchTableOptimizer(v **types.BatchTableOptimizer, 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.BatchTableOptimizer + if *v == nil { + sv = &types.BatchTableOptimizer{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "catalogId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CatalogIdString to be of type string, got %T instead", value) + } + sv.CatalogId = ptr.String(jtv) + } + + case "databaseName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected databaseNameString to be of type string, got %T instead", value) + } + sv.DatabaseName = ptr.String(jtv) + } + + case "tableName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected tableNameString to be of type string, got %T instead", value) + } + sv.TableName = ptr.String(jtv) + } + + case "tableOptimizer": + if err := awsAwsjson11_deserializeDocumentTableOptimizer(&sv.TableOptimizer, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentBatchTableOptimizers(v *[]types.BatchTableOptimizer, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.BatchTableOptimizer + if *v == nil { + cv = []types.BatchTableOptimizer{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BatchTableOptimizer + destAddr := &col + if err := awsAwsjson11_deserializeDocumentBatchTableOptimizer(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentBatchUpdatePartitionFailureEntry(v **types.BatchUpdatePartitionFailureEntry, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -44876,6 +45793,73 @@ func awsAwsjson11_deserializeDocumentRulesetNames(v *[]string, value interface{} return nil } +func awsAwsjson11_deserializeDocumentRunMetrics(v **types.RunMetrics, 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.RunMetrics + if *v == nil { + sv = &types.RunMetrics{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "JobDurationInHour": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageString to be of type string, got %T instead", value) + } + sv.JobDurationInHour = ptr.String(jtv) + } + + case "NumberOfBytesCompacted": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageString to be of type string, got %T instead", value) + } + sv.NumberOfBytesCompacted = ptr.String(jtv) + } + + case "NumberOfDpus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageString to be of type string, got %T instead", value) + } + sv.NumberOfDpus = ptr.String(jtv) + } + + case "NumberOfFilesCompacted": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageString to be of type string, got %T instead", value) + } + sv.NumberOfFilesCompacted = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentS3CatalogDeltaSource(v **types.S3CatalogDeltaSource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -49967,6 +50951,225 @@ func awsAwsjson11_deserializeDocumentTableList(v *[]types.Table, value interface return nil } +func awsAwsjson11_deserializeDocumentTableOptimizer(v **types.TableOptimizer, 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.TableOptimizer + if *v == nil { + sv = &types.TableOptimizer{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "configuration": + if err := awsAwsjson11_deserializeDocumentTableOptimizerConfiguration(&sv.Configuration, value); err != nil { + return err + } + + case "lastRun": + if err := awsAwsjson11_deserializeDocumentTableOptimizerRun(&sv.LastRun, value); err != nil { + return err + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TableOptimizerType to be of type string, got %T instead", value) + } + sv.Type = types.TableOptimizerType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentTableOptimizerConfiguration(v **types.TableOptimizerConfiguration, 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.TableOptimizerConfiguration + if *v == nil { + sv = &types.TableOptimizerConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "enabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected NullableBoolean to be of type *bool, got %T instead", value) + } + sv.Enabled = ptr.Bool(jtv) + } + + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ArnString to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentTableOptimizerRun(v **types.TableOptimizerRun, 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.TableOptimizerRun + if *v == nil { + sv = &types.TableOptimizerRun{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "endTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected TableOptimizerRunTimestamp to be a JSON Number, got %T instead", value) + + } + } + + case "error": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessageString to be of type string, got %T instead", value) + } + sv.Error = ptr.String(jtv) + } + + case "eventType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TableOptimizerEventType to be of type string, got %T instead", value) + } + sv.EventType = types.TableOptimizerEventType(jtv) + } + + case "metrics": + if err := awsAwsjson11_deserializeDocumentRunMetrics(&sv.Metrics, value); err != nil { + return err + } + + case "startTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected TableOptimizerRunTimestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentTableOptimizerRuns(v *[]types.TableOptimizerRun, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.TableOptimizerRun + if *v == nil { + cv = []types.TableOptimizerRun{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.TableOptimizerRun + destAddr := &col + if err := awsAwsjson11_deserializeDocumentTableOptimizerRun(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentTableVersion(v **types.TableVersion, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -52522,6 +53725,47 @@ func awsAwsjson11_deserializeOpDocumentBatchGetPartitionOutput(v **BatchGetParti return nil } +func awsAwsjson11_deserializeOpDocumentBatchGetTableOptimizerOutput(v **BatchGetTableOptimizerOutput, 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 *BatchGetTableOptimizerOutput + if *v == nil { + sv = &BatchGetTableOptimizerOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Failures": + if err := awsAwsjson11_deserializeDocumentBatchGetTableOptimizerErrors(&sv.Failures, value); err != nil { + return err + } + + case "TableOptimizers": + if err := awsAwsjson11_deserializeDocumentBatchTableOptimizers(&sv.TableOptimizers, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentBatchGetTriggersOutput(v **BatchGetTriggersOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -53849,6 +55093,37 @@ func awsAwsjson11_deserializeOpDocumentCreateSessionOutput(v **CreateSessionOutp return nil } +func awsAwsjson11_deserializeOpDocumentCreateTableOptimizerOutput(v **CreateTableOptimizerOutput, 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 *CreateTableOptimizerOutput + if *v == nil { + sv = &CreateTableOptimizerOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentCreateTableOutput(v **CreateTableOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -54715,6 +55990,37 @@ func awsAwsjson11_deserializeOpDocumentDeleteSessionOutput(v **DeleteSessionOutp return nil } +func awsAwsjson11_deserializeOpDocumentDeleteTableOptimizerOutput(v **DeleteTableOptimizerOutput, 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 *DeleteTableOptimizerOutput + if *v == nil { + sv = &DeleteTableOptimizerOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentDeleteTableOutput(v **DeleteTableOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -57941,6 +59247,69 @@ func awsAwsjson11_deserializeOpDocumentGetStatementOutput(v **GetStatementOutput return nil } +func awsAwsjson11_deserializeOpDocumentGetTableOptimizerOutput(v **GetTableOptimizerOutput, 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 *GetTableOptimizerOutput + if *v == nil { + sv = &GetTableOptimizerOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CatalogId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CatalogIdString to be of type string, got %T instead", value) + } + sv.CatalogId = ptr.String(jtv) + } + + case "DatabaseName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.DatabaseName = ptr.String(jtv) + } + + case "TableName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.TableName = ptr.String(jtv) + } + + case "TableOptimizer": + if err := awsAwsjson11_deserializeDocumentTableOptimizer(&sv.TableOptimizer, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentGetTableOutput(v **GetTableOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -59360,6 +60729,78 @@ func awsAwsjson11_deserializeOpDocumentListStatementsOutput(v **ListStatementsOu return nil } +func awsAwsjson11_deserializeOpDocumentListTableOptimizerRunsOutput(v **ListTableOptimizerRunsOutput, 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 *ListTableOptimizerRunsOutput + if *v == nil { + sv = &ListTableOptimizerRunsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CatalogId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CatalogIdString to be of type string, got %T instead", value) + } + sv.CatalogId = ptr.String(jtv) + } + + case "DatabaseName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.DatabaseName = ptr.String(jtv) + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ListTableOptimizerRunsToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "TableName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.TableName = ptr.String(jtv) + } + + case "TableOptimizerRuns": + if err := awsAwsjson11_deserializeDocumentTableOptimizerRuns(&sv.TableOptimizerRuns, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentListTriggersOutput(v **ListTriggersOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -61403,6 +62844,37 @@ func awsAwsjson11_deserializeOpDocumentUpdateSourceControlFromJobOutput(v **Upda return nil } +func awsAwsjson11_deserializeOpDocumentUpdateTableOptimizerOutput(v **UpdateTableOptimizerOutput, 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 *UpdateTableOptimizerOutput + if *v == nil { + sv = &UpdateTableOptimizerOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentUpdateTableOutput(v **UpdateTableOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/glue/generated.json b/service/glue/generated.json index 6e668926df7..cbcfe1367b2 100644 --- a/service/glue/generated.json +++ b/service/glue/generated.json @@ -21,6 +21,7 @@ "api_op_BatchGetDevEndpoints.go", "api_op_BatchGetJobs.go", "api_op_BatchGetPartition.go", + "api_op_BatchGetTableOptimizer.go", "api_op_BatchGetTriggers.go", "api_op_BatchGetWorkflows.go", "api_op_BatchStopJobRun.go", @@ -48,6 +49,7 @@ "api_op_CreateSecurityConfiguration.go", "api_op_CreateSession.go", "api_op_CreateTable.go", + "api_op_CreateTableOptimizer.go", "api_op_CreateTrigger.go", "api_op_CreateUserDefinedFunction.go", "api_op_CreateWorkflow.go", @@ -72,6 +74,7 @@ "api_op_DeleteSecurityConfiguration.go", "api_op_DeleteSession.go", "api_op_DeleteTable.go", + "api_op_DeleteTableOptimizer.go", "api_op_DeleteTableVersion.go", "api_op_DeleteTrigger.go", "api_op_DeleteUserDefinedFunction.go", @@ -126,6 +129,7 @@ "api_op_GetSession.go", "api_op_GetStatement.go", "api_op_GetTable.go", + "api_op_GetTableOptimizer.go", "api_op_GetTableVersion.go", "api_op_GetTableVersions.go", "api_op_GetTables.go", @@ -158,6 +162,7 @@ "api_op_ListSchemas.go", "api_op_ListSessions.go", "api_op_ListStatements.go", + "api_op_ListTableOptimizerRuns.go", "api_op_ListTriggers.go", "api_op_ListWorkflows.go", "api_op_PutDataCatalogEncryptionSettings.go", @@ -208,6 +213,7 @@ "api_op_UpdateSchema.go", "api_op_UpdateSourceControlFromJob.go", "api_op_UpdateTable.go", + "api_op_UpdateTableOptimizer.go", "api_op_UpdateTrigger.go", "api_op_UpdateUserDefinedFunction.go", "api_op_UpdateWorkflow.go", diff --git a/service/glue/serializers.go b/service/glue/serializers.go index e70e5c0f2e0..52ff1570a03 100644 --- a/service/glue/serializers.go +++ b/service/glue/serializers.go @@ -677,6 +677,61 @@ func (m *awsAwsjson11_serializeOpBatchGetPartition) HandleSerialize(ctx context. return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpBatchGetTableOptimizer struct { +} + +func (*awsAwsjson11_serializeOpBatchGetTableOptimizer) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpBatchGetTableOptimizer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*BatchGetTableOptimizerInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSGlue.BatchGetTableOptimizer") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentBatchGetTableOptimizerInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpBatchGetTriggers struct { } @@ -2162,6 +2217,61 @@ func (m *awsAwsjson11_serializeOpCreateTable) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpCreateTableOptimizer struct { +} + +func (*awsAwsjson11_serializeOpCreateTableOptimizer) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateTableOptimizer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateTableOptimizerInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSGlue.CreateTableOptimizer") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateTableOptimizerInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpCreateTrigger struct { } @@ -3482,6 +3592,61 @@ func (m *awsAwsjson11_serializeOpDeleteTable) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDeleteTableOptimizer struct { +} + +func (*awsAwsjson11_serializeOpDeleteTableOptimizer) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteTableOptimizer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteTableOptimizerInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSGlue.DeleteTableOptimizer") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteTableOptimizerInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpDeleteTableVersion struct { } @@ -6452,6 +6617,61 @@ func (m *awsAwsjson11_serializeOpGetTable) HandleSerialize(ctx context.Context, return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpGetTableOptimizer struct { +} + +func (*awsAwsjson11_serializeOpGetTableOptimizer) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetTableOptimizer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetTableOptimizerInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSGlue.GetTableOptimizer") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetTableOptimizerInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpGetTables struct { } @@ -8212,6 +8432,61 @@ func (m *awsAwsjson11_serializeOpListStatements) HandleSerialize(ctx context.Con return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpListTableOptimizerRuns struct { +} + +func (*awsAwsjson11_serializeOpListTableOptimizerRuns) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListTableOptimizerRuns) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListTableOptimizerRunsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSGlue.ListTableOptimizerRuns") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListTableOptimizerRunsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpListTriggers struct { } @@ -10962,6 +11237,61 @@ func (m *awsAwsjson11_serializeOpUpdateTable) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpUpdateTableOptimizer struct { +} + +func (*awsAwsjson11_serializeOpUpdateTableOptimizer) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateTableOptimizer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateTableOptimizerInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSGlue.UpdateTableOptimizer") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateTableOptimizerInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpUpdateTrigger struct { } @@ -11690,6 +12020,46 @@ func awsAwsjson11_serializeDocumentBatchGetPartitionValueList(v []types.Partitio return nil } +func awsAwsjson11_serializeDocumentBatchGetTableOptimizerEntries(v []types.BatchGetTableOptimizerEntry, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentBatchGetTableOptimizerEntry(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentBatchGetTableOptimizerEntry(v *types.BatchGetTableOptimizerEntry, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CatalogId != nil { + ok := object.Key("catalogId") + ok.String(*v.CatalogId) + } + + if v.DatabaseName != nil { + ok := object.Key("databaseName") + ok.String(*v.DatabaseName) + } + + if v.TableName != nil { + ok := object.Key("tableName") + ok.String(*v.TableName) + } + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + return nil +} + func awsAwsjson11_serializeDocumentBatchStopJobRunJobRunIdList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -19081,6 +19451,23 @@ func awsAwsjson11_serializeDocumentTableInput(v *types.TableInput, value smithyj return nil } +func awsAwsjson11_serializeDocumentTableOptimizerConfiguration(v *types.TableOptimizerConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Enabled != nil { + ok := object.Key("enabled") + ok.Boolean(*v.Enabled) + } + + if v.RoleArn != nil { + ok := object.Key("roleArn") + ok.String(*v.RoleArn) + } + + return nil +} + func awsAwsjson11_serializeDocumentTagKeysList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -19904,6 +20291,20 @@ func awsAwsjson11_serializeOpDocumentBatchGetPartitionInput(v *BatchGetPartition return nil } +func awsAwsjson11_serializeOpDocumentBatchGetTableOptimizerInput(v *BatchGetTableOptimizerInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Entries != nil { + ok := object.Key("Entries") + if err := awsAwsjson11_serializeDocumentBatchGetTableOptimizerEntries(v.Entries, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeOpDocumentBatchGetTriggersInput(v *BatchGetTriggersInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -20999,6 +21400,40 @@ func awsAwsjson11_serializeOpDocumentCreateTableInput(v *CreateTableInput, value return nil } +func awsAwsjson11_serializeOpDocumentCreateTableOptimizerInput(v *CreateTableOptimizerInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CatalogId != nil { + ok := object.Key("CatalogId") + ok.String(*v.CatalogId) + } + + if v.DatabaseName != nil { + ok := object.Key("DatabaseName") + ok.String(*v.DatabaseName) + } + + if v.TableName != nil { + ok := object.Key("TableName") + ok.String(*v.TableName) + } + + if v.TableOptimizerConfiguration != nil { + ok := object.Key("TableOptimizerConfiguration") + if err := awsAwsjson11_serializeDocumentTableOptimizerConfiguration(v.TableOptimizerConfiguration, ok); err != nil { + return err + } + } + + if len(v.Type) > 0 { + ok := object.Key("Type") + ok.String(string(v.Type)) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentCreateTriggerInput(v *CreateTriggerInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -21491,6 +21926,33 @@ func awsAwsjson11_serializeOpDocumentDeleteTableInput(v *DeleteTableInput, value return nil } +func awsAwsjson11_serializeOpDocumentDeleteTableOptimizerInput(v *DeleteTableOptimizerInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CatalogId != nil { + ok := object.Key("CatalogId") + ok.String(*v.CatalogId) + } + + if v.DatabaseName != nil { + ok := object.Key("DatabaseName") + ok.String(*v.DatabaseName) + } + + if v.TableName != nil { + ok := object.Key("TableName") + ok.String(*v.TableName) + } + + if len(v.Type) > 0 { + ok := object.Key("Type") + ok.String(string(v.Type)) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDeleteTableVersionInput(v *DeleteTableVersionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -22608,6 +23070,33 @@ func awsAwsjson11_serializeOpDocumentGetTableInput(v *GetTableInput, value smith return nil } +func awsAwsjson11_serializeOpDocumentGetTableOptimizerInput(v *GetTableOptimizerInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CatalogId != nil { + ok := object.Key("CatalogId") + ok.String(*v.CatalogId) + } + + if v.DatabaseName != nil { + ok := object.Key("DatabaseName") + ok.String(*v.DatabaseName) + } + + if v.TableName != nil { + ok := object.Key("TableName") + ok.String(*v.TableName) + } + + if len(v.Type) > 0 { + ok := object.Key("Type") + ok.String(string(v.Type)) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentGetTablesInput(v *GetTablesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -23447,6 +23936,43 @@ func awsAwsjson11_serializeOpDocumentListStatementsInput(v *ListStatementsInput, return nil } +func awsAwsjson11_serializeOpDocumentListTableOptimizerRunsInput(v *ListTableOptimizerRunsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CatalogId != nil { + ok := object.Key("CatalogId") + ok.String(*v.CatalogId) + } + + if v.DatabaseName != nil { + ok := object.Key("DatabaseName") + ok.String(*v.DatabaseName) + } + + if v.MaxResults != 0 { + ok := object.Key("MaxResults") + ok.Integer(v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.TableName != nil { + ok := object.Key("TableName") + ok.String(*v.TableName) + } + + if len(v.Type) > 0 { + ok := object.Key("Type") + ok.String(string(v.Type)) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentListTriggersInput(v *ListTriggersInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -24911,6 +25437,40 @@ func awsAwsjson11_serializeOpDocumentUpdateTableInput(v *UpdateTableInput, value return nil } +func awsAwsjson11_serializeOpDocumentUpdateTableOptimizerInput(v *UpdateTableOptimizerInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CatalogId != nil { + ok := object.Key("CatalogId") + ok.String(*v.CatalogId) + } + + if v.DatabaseName != nil { + ok := object.Key("DatabaseName") + ok.String(*v.DatabaseName) + } + + if v.TableName != nil { + ok := object.Key("TableName") + ok.String(*v.TableName) + } + + if v.TableOptimizerConfiguration != nil { + ok := object.Key("TableOptimizerConfiguration") + if err := awsAwsjson11_serializeDocumentTableOptimizerConfiguration(v.TableOptimizerConfiguration, ok); err != nil { + return err + } + } + + if len(v.Type) > 0 { + ok := object.Key("Type") + ok.String(string(v.Type)) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentUpdateTriggerInput(v *UpdateTriggerInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/glue/types/enums.go b/service/glue/types/enums.go index e57c56616fc..18de6ca0340 100644 --- a/service/glue/types/enums.go +++ b/service/glue/types/enums.go @@ -1755,6 +1755,44 @@ func (StatementState) Values() []StatementState { } } +type TableOptimizerEventType string + +// Enum values for TableOptimizerEventType +const ( + TableOptimizerEventTypeStarting TableOptimizerEventType = "starting" + TableOptimizerEventTypeCompleted TableOptimizerEventType = "completed" + TableOptimizerEventTypeFailed TableOptimizerEventType = "failed" + TableOptimizerEventTypeInProgress TableOptimizerEventType = "in_progress" +) + +// Values returns all known values for TableOptimizerEventType. Note that this can +// be expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (TableOptimizerEventType) Values() []TableOptimizerEventType { + return []TableOptimizerEventType{ + "starting", + "completed", + "failed", + "in_progress", + } +} + +type TableOptimizerType string + +// Enum values for TableOptimizerType +const ( + TableOptimizerTypeCompaction TableOptimizerType = "compaction" +) + +// Values returns all known values for TableOptimizerType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (TableOptimizerType) Values() []TableOptimizerType { + return []TableOptimizerType{ + "compaction", + } +} + type TargetFormat string // Enum values for TargetFormat diff --git a/service/glue/types/types.go b/service/glue/types/types.go index c7cd2ae3402..83dac8821a7 100644 --- a/service/glue/types/types.go +++ b/service/glue/types/types.go @@ -352,6 +352,47 @@ type BasicCatalogTarget struct { noSmithyDocumentSerde } +// Represents a table optimizer to retrieve in the BatchGetTableOptimizer +// operation. +type BatchGetTableOptimizerEntry struct { + + // The Catalog ID of the table. + CatalogId *string + + // The name of the database in the catalog in which the table resides. + DatabaseName *string + + // The name of the table. + TableName *string + + // The type of table optimizer. + Type TableOptimizerType + + noSmithyDocumentSerde +} + +// Contains details on one of the errors in the error list returned by the +// BatchGetTableOptimizer operation. +type BatchGetTableOptimizerError struct { + + // The Catalog ID of the table. + CatalogId *string + + // The name of the database in the catalog in which the table resides. + DatabaseName *string + + // An ErrorDetail object containing code and message details about the error. + Error *ErrorDetail + + // The name of the table. + TableName *string + + // The type of table optimizer. + Type TableOptimizerType + + noSmithyDocumentSerde +} + // Records an error that occurred when attempting to stop a specified job run. type BatchStopJobRunError struct { @@ -379,6 +420,26 @@ type BatchStopJobRunSuccessfulSubmission struct { noSmithyDocumentSerde } +// Contains details for one of the table optimizers returned by the +// BatchGetTableOptimizer operation. +type BatchTableOptimizer struct { + + // The Catalog ID of the table. + CatalogId *string + + // The name of the database in the catalog in which the table resides. + DatabaseName *string + + // The name of the table. + TableName *string + + // A TableOptimizer object that contains details on the configuration and last run + // of a table optimzer. + TableOptimizer *TableOptimizer + + noSmithyDocumentSerde +} + // Contains information about a batch update partition error. type BatchUpdatePartitionFailureEntry struct { @@ -5808,6 +5869,24 @@ type ResourceUri struct { noSmithyDocumentSerde } +// Metrics for the optimizer run. +type RunMetrics struct { + + // The duration of the job in hours. + JobDurationInHour *string + + // The number of bytes removed by the compaction job run. + NumberOfBytesCompacted *string + + // The number of DPU hours consumed by the job. + NumberOfDpus *string + + // The number of files removed by the compaction job run. + NumberOfFilesCompacted *string + + noSmithyDocumentSerde +} + // Specifies a Delta Lake data source that is registered in the Glue Data Catalog. // The data source must be stored in Amazon S3. type S3CatalogDeltaSource struct { @@ -7518,6 +7597,58 @@ type TableInput struct { noSmithyDocumentSerde } +// Contains details about an optimizer associated with a table. +type TableOptimizer struct { + + // A TableOptimizerConfiguration object that was specified when creating or + // updating a table optimizer. + Configuration *TableOptimizerConfiguration + + // A TableOptimizerRun object representing the last run of the table optimizer. + LastRun *TableOptimizerRun + + // The type of table optimizer. Currently, the only valid value is compaction . + Type TableOptimizerType + + noSmithyDocumentSerde +} + +// Contains details on the configuration of a table optimizer. You pass this +// configuration when creating or updating a table optimizer. +type TableOptimizerConfiguration struct { + + // Whether table optimization is enabled. + Enabled *bool + + // A role passed by the caller which gives the service permission to update the + // resources associated with the optimizer on the caller's behalf. + RoleArn *string + + noSmithyDocumentSerde +} + +// Contains details for a table optimizer run. +type TableOptimizerRun struct { + + // Represents the epoch timestamp at which the compaction job ended. + EndTimestamp *time.Time + + // An error that occured during the optimizer run. + Error *string + + // An event type representing the status of the table optimizer run. + EventType TableOptimizerEventType + + // A RunMetrics object containing metrics for the optimizer run. + Metrics *RunMetrics + + // Represents the epoch timestamp at which the compaction job was started within + // Lake Formation. + StartTimestamp *time.Time + + noSmithyDocumentSerde +} + // Specifies a version of a table. type TableVersion struct { diff --git a/service/glue/validators.go b/service/glue/validators.go index 9d61970176f..01beb98a096 100644 --- a/service/glue/validators.go +++ b/service/glue/validators.go @@ -250,6 +250,26 @@ func (m *validateOpBatchGetPartition) HandleInitialize(ctx context.Context, in m return next.HandleInitialize(ctx, in) } +type validateOpBatchGetTableOptimizer struct { +} + +func (*validateOpBatchGetTableOptimizer) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchGetTableOptimizer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchGetTableOptimizerInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchGetTableOptimizerInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpBatchGetTriggers struct { } @@ -790,6 +810,26 @@ func (m *validateOpCreateTable) HandleInitialize(ctx context.Context, in middlew return next.HandleInitialize(ctx, in) } +type validateOpCreateTableOptimizer struct { +} + +func (*validateOpCreateTableOptimizer) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateTableOptimizer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateTableOptimizerInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateTableOptimizerInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateTrigger struct { } @@ -1250,6 +1290,26 @@ func (m *validateOpDeleteTable) HandleInitialize(ctx context.Context, in middlew return next.HandleInitialize(ctx, in) } +type validateOpDeleteTableOptimizer struct { +} + +func (*validateOpDeleteTableOptimizer) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteTableOptimizer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteTableOptimizerInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteTableOptimizerInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteTableVersion struct { } @@ -2050,6 +2110,26 @@ func (m *validateOpGetTable) HandleInitialize(ctx context.Context, in middleware return next.HandleInitialize(ctx, in) } +type validateOpGetTableOptimizer struct { +} + +func (*validateOpGetTableOptimizer) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetTableOptimizer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetTableOptimizerInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetTableOptimizerInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetTables struct { } @@ -2490,6 +2570,26 @@ func (m *validateOpListStatements) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } +type validateOpListTableOptimizerRuns struct { +} + +func (*validateOpListTableOptimizerRuns) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListTableOptimizerRuns) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListTableOptimizerRunsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListTableOptimizerRunsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpPutDataCatalogEncryptionSettings struct { } @@ -3370,6 +3470,26 @@ func (m *validateOpUpdateTable) HandleInitialize(ctx context.Context, in middlew return next.HandleInitialize(ctx, in) } +type validateOpUpdateTableOptimizer struct { +} + +func (*validateOpUpdateTableOptimizer) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateTableOptimizer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateTableOptimizerInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateTableOptimizerInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateTrigger struct { } @@ -3478,6 +3598,10 @@ func addOpBatchGetPartitionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpBatchGetPartition{}, middleware.After) } +func addOpBatchGetTableOptimizerValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchGetTableOptimizer{}, middleware.After) +} + func addOpBatchGetTriggersValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpBatchGetTriggers{}, middleware.After) } @@ -3586,6 +3710,10 @@ func addOpCreateTableValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateTable{}, middleware.After) } +func addOpCreateTableOptimizerValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateTableOptimizer{}, middleware.After) +} + func addOpCreateTriggerValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateTrigger{}, middleware.After) } @@ -3678,6 +3806,10 @@ func addOpDeleteTableValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteTable{}, middleware.After) } +func addOpDeleteTableOptimizerValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteTableOptimizer{}, middleware.After) +} + func addOpDeleteTableVersionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteTableVersion{}, middleware.After) } @@ -3838,6 +3970,10 @@ func addOpGetTableValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetTable{}, middleware.After) } +func addOpGetTableOptimizerValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetTableOptimizer{}, middleware.After) +} + func addOpGetTablesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetTables{}, middleware.After) } @@ -3926,6 +4062,10 @@ func addOpListStatementsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListStatements{}, middleware.After) } +func addOpListTableOptimizerRunsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTableOptimizerRuns{}, middleware.After) +} + func addOpPutDataCatalogEncryptionSettingsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutDataCatalogEncryptionSettings{}, middleware.After) } @@ -4102,6 +4242,10 @@ func addOpUpdateTableValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateTable{}, middleware.After) } +func addOpUpdateTableOptimizerValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateTableOptimizer{}, middleware.After) +} + func addOpUpdateTriggerValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateTrigger{}, middleware.After) } @@ -7971,6 +8115,21 @@ func validateOpBatchGetPartitionInput(v *BatchGetPartitionInput) error { } } +func validateOpBatchGetTableOptimizerInput(v *BatchGetTableOptimizerInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchGetTableOptimizerInput"} + if v.Entries == nil { + invalidParams.Add(smithy.NewErrParamRequired("Entries")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpBatchGetTriggersInput(v *BatchGetTriggersInput) error { if v == nil { return nil @@ -8536,6 +8695,33 @@ func validateOpCreateTableInput(v *CreateTableInput) error { } } +func validateOpCreateTableOptimizerInput(v *CreateTableOptimizerInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateTableOptimizerInput"} + if v.CatalogId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CatalogId")) + } + if v.DatabaseName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DatabaseName")) + } + if v.TableName == nil { + invalidParams.Add(smithy.NewErrParamRequired("TableName")) + } + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if v.TableOptimizerConfiguration == nil { + invalidParams.Add(smithy.NewErrParamRequired("TableOptimizerConfiguration")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateTriggerInput(v *CreateTriggerInput) error { if v == nil { return nil @@ -8928,6 +9114,30 @@ func validateOpDeleteTableInput(v *DeleteTableInput) error { } } +func validateOpDeleteTableOptimizerInput(v *DeleteTableOptimizerInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteTableOptimizerInput"} + if v.CatalogId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CatalogId")) + } + if v.DatabaseName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DatabaseName")) + } + if v.TableName == nil { + invalidParams.Add(smithy.NewErrParamRequired("TableName")) + } + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteTableVersionInput(v *DeleteTableVersionInput) error { if v == nil { return nil @@ -9631,6 +9841,30 @@ func validateOpGetTableInput(v *GetTableInput) error { } } +func validateOpGetTableOptimizerInput(v *GetTableOptimizerInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetTableOptimizerInput"} + if v.CatalogId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CatalogId")) + } + if v.DatabaseName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DatabaseName")) + } + if v.TableName == nil { + invalidParams.Add(smithy.NewErrParamRequired("TableName")) + } + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetTablesInput(v *GetTablesInput) error { if v == nil { return nil @@ -10021,6 +10255,30 @@ func validateOpListStatementsInput(v *ListStatementsInput) error { } } +func validateOpListTableOptimizerRunsInput(v *ListTableOptimizerRunsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListTableOptimizerRunsInput"} + if v.CatalogId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CatalogId")) + } + if v.DatabaseName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DatabaseName")) + } + if v.TableName == nil { + invalidParams.Add(smithy.NewErrParamRequired("TableName")) + } + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpPutDataCatalogEncryptionSettingsInput(v *PutDataCatalogEncryptionSettingsInput) error { if v == nil { return nil @@ -10843,6 +11101,33 @@ func validateOpUpdateTableInput(v *UpdateTableInput) error { } } +func validateOpUpdateTableOptimizerInput(v *UpdateTableOptimizerInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateTableOptimizerInput"} + if v.CatalogId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CatalogId")) + } + if v.DatabaseName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DatabaseName")) + } + if v.TableName == nil { + invalidParams.Add(smithy.NewErrParamRequired("TableName")) + } + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if v.TableOptimizerConfiguration == nil { + invalidParams.Add(smithy.NewErrParamRequired("TableOptimizerConfiguration")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateTriggerInput(v *UpdateTriggerInput) error { if v == nil { return nil diff --git a/service/iot/api_op_CreateSecurityProfile.go b/service/iot/api_op_CreateSecurityProfile.go index d3d0c52bc4f..e847f917447 100644 --- a/service/iot/api_op_CreateSecurityProfile.go +++ b/service/iot/api_op_CreateSecurityProfile.go @@ -63,6 +63,9 @@ type CreateSecurityProfileInput struct { // Specifies the behaviors that, when violated by a device (thing), cause an alert. Behaviors []types.Behavior + // Specifies the MQTT topic and role ARN required for metric export. + MetricsExportConfig *types.MetricsExportConfig + // A description of the security profile. SecurityProfileDescription *string diff --git a/service/iot/api_op_CreateThingGroup.go b/service/iot/api_op_CreateThingGroup.go index 02502ec73a7..87eff23be12 100644 --- a/service/iot/api_op_CreateThingGroup.go +++ b/service/iot/api_op_CreateThingGroup.go @@ -17,8 +17,9 @@ import ( ) // Create a thing group. This is a control plane operation. See Authorization (https://docs.aws.amazon.com/iot/latest/developerguide/iot-authorization.html) -// for information about authorizing control plane actions. Requires permission to -// access the CreateThingGroup (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) +// for information about authorizing control plane actions. If the ThingGroup that +// you create has the exact same attributes as an existing ThingGroup , you will +// get a 200 success response. Requires permission to access the CreateThingGroup (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) // action. func (c *Client) CreateThingGroup(ctx context.Context, params *CreateThingGroupInput, optFns ...func(*Options)) (*CreateThingGroupOutput, error) { if params == nil { diff --git a/service/iot/api_op_DescribeSecurityProfile.go b/service/iot/api_op_DescribeSecurityProfile.go index 4b402e8d987..76f4878b954 100644 --- a/service/iot/api_op_DescribeSecurityProfile.go +++ b/service/iot/api_op_DescribeSecurityProfile.go @@ -72,6 +72,9 @@ type DescribeSecurityProfileOutput struct { // The time the security profile was last modified. LastModifiedDate *time.Time + // Specifies the MQTT topic and role ARN required for metric export. + MetricsExportConfig *types.MetricsExportConfig + // The ARN of the security profile. SecurityProfileArn *string diff --git a/service/iot/api_op_SearchIndex.go b/service/iot/api_op_SearchIndex.go index 4adc9869012..1458b292cbb 100644 --- a/service/iot/api_op_SearchIndex.go +++ b/service/iot/api_op_SearchIndex.go @@ -45,7 +45,8 @@ type SearchIndexInput struct { // The search index name. IndexName *string - // The maximum number of results to return at one time. + // The maximum number of results to return at one time. The response might contain + // fewer results but will never contain more. MaxResults *int32 // The token used to get the next set of results, or null if there are no diff --git a/service/iot/api_op_UpdateSecurityProfile.go b/service/iot/api_op_UpdateSecurityProfile.go index 8ef06a8c318..08dbb5430fd 100644 --- a/service/iot/api_op_UpdateSecurityProfile.go +++ b/service/iot/api_op_UpdateSecurityProfile.go @@ -76,11 +76,17 @@ type UpdateSecurityProfileInput struct { // behaviors are defined in the current invocation, an exception occurs. DeleteBehaviors bool + // Set the value as true to delete metrics export related configurations. + DeleteMetricsExportConfig bool + // The expected version of the security profile. A new version is generated // whenever the security profile is updated. If you specify a value that is // different from the actual version, a VersionConflictException is thrown. ExpectedVersion *int64 + // Specifies the MQTT topic and role ARN required for metric export. + MetricsExportConfig *types.MetricsExportConfig + // A description of the security profile. SecurityProfileDescription *string @@ -115,6 +121,9 @@ type UpdateSecurityProfileOutput struct { // The time the security profile was last modified. LastModifiedDate *time.Time + // Specifies the MQTT topic and role ARN required for metric export. + MetricsExportConfig *types.MetricsExportConfig + // The ARN of the security profile that was updated. SecurityProfileArn *string diff --git a/service/iot/deserializers.go b/service/iot/deserializers.go index c0baa9ec6f7..86db4bb3e25 100644 --- a/service/iot/deserializers.go +++ b/service/iot/deserializers.go @@ -15925,6 +15925,11 @@ func awsRestjson1_deserializeOpDocumentDescribeSecurityProfileOutput(v **Describ } } + case "metricsExportConfig": + if err := awsRestjson1_deserializeDocumentMetricsExportConfig(&sv.MetricsExportConfig, value); err != nil { + return err + } + case "securityProfileArn": if value != nil { jtv, ok := value.(string) @@ -37323,6 +37328,11 @@ func awsRestjson1_deserializeOpDocumentUpdateSecurityProfileOutput(v **UpdateSec } } + case "metricsExportConfig": + if err := awsRestjson1_deserializeDocumentMetricsExportConfig(&sv.MetricsExportConfig, value); err != nil { + return err + } + case "securityProfileArn": if value != nil { jtv, ok := value.(string) @@ -42315,6 +42325,15 @@ func awsRestjson1_deserializeDocumentBehavior(v **types.Behavior, value interfac return err } + case "exportMetric": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected ExportMetric to be of type *bool, got %T instead", value) + } + sv.ExportMetric = ptr.Bool(jtv) + } + case "metric": if value != nil { jtv, ok := value.(string) @@ -49320,6 +49339,55 @@ func awsRestjson1_deserializeDocumentMetricNames(v *[]string, value interface{}) return nil } +func awsRestjson1_deserializeDocumentMetricsExportConfig(v **types.MetricsExportConfig, 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.MetricsExportConfig + if *v == nil { + sv = &types.MetricsExportConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "mqttTopic": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MqttTopic to be of type string, got %T instead", value) + } + sv.MqttTopic = ptr.String(jtv) + } + + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentMetricToRetain(v **types.MetricToRetain, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -49342,6 +49410,15 @@ func awsRestjson1_deserializeDocumentMetricToRetain(v **types.MetricToRetain, va for key, value := range shape { switch key { + case "exportMetric": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected ExportMetric to be of type *bool, got %T instead", value) + } + sv.ExportMetric = ptr.Bool(jtv) + } + case "metric": if value != nil { jtv, ok := value.(string) diff --git a/service/iot/serializers.go b/service/iot/serializers.go index bd357d486b2..2ae6058aaae 100644 --- a/service/iot/serializers.go +++ b/service/iot/serializers.go @@ -3891,6 +3891,13 @@ func awsRestjson1_serializeOpDocumentCreateSecurityProfileInput(v *CreateSecurit } } + if v.MetricsExportConfig != nil { + ok := object.Key("metricsExportConfig") + if err := awsRestjson1_serializeDocumentMetricsExportConfig(v.MetricsExportConfig, ok); err != nil { + return err + } + } + if v.SecurityProfileDescription != nil { ok := object.Key("securityProfileDescription") ok.String(*v.SecurityProfileDescription) @@ -19490,6 +19497,18 @@ func awsRestjson1_serializeOpDocumentUpdateSecurityProfileInput(v *UpdateSecurit ok.Boolean(v.DeleteBehaviors) } + if v.DeleteMetricsExportConfig { + ok := object.Key("deleteMetricsExportConfig") + ok.Boolean(v.DeleteMetricsExportConfig) + } + + if v.MetricsExportConfig != nil { + ok := object.Key("metricsExportConfig") + if err := awsRestjson1_serializeDocumentMetricsExportConfig(v.MetricsExportConfig, ok); err != nil { + return err + } + } + if v.SecurityProfileDescription != nil { ok := object.Key("securityProfileDescription") ok.String(*v.SecurityProfileDescription) @@ -20881,6 +20900,11 @@ func awsRestjson1_serializeDocumentBehavior(v *types.Behavior, value smithyjson. } } + if v.ExportMetric != nil { + ok := object.Key("exportMetric") + ok.Boolean(*v.ExportMetric) + } + if v.Metric != nil { ok := object.Key("metric") ok.String(*v.Metric) @@ -22070,10 +22094,32 @@ func awsRestjson1_serializeDocumentMetricDimension(v *types.MetricDimension, val return nil } +func awsRestjson1_serializeDocumentMetricsExportConfig(v *types.MetricsExportConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MqttTopic != nil { + ok := object.Key("mqttTopic") + ok.String(*v.MqttTopic) + } + + if v.RoleArn != nil { + ok := object.Key("roleArn") + ok.String(*v.RoleArn) + } + + return nil +} + func awsRestjson1_serializeDocumentMetricToRetain(v *types.MetricToRetain, value smithyjson.Value) error { object := value.Object() defer object.Close() + if v.ExportMetric != nil { + ok := object.Key("exportMetric") + ok.Boolean(*v.ExportMetric) + } + if v.Metric != nil { ok := object.Key("metric") ok.String(*v.Metric) diff --git a/service/iot/types/types.go b/service/iot/types/types.go index e2daa85119a..939c89956e6 100644 --- a/service/iot/types/types.go +++ b/service/iot/types/types.go @@ -782,6 +782,9 @@ type Behavior struct { // SNS when IoT Device Defender detects that a device is behaving anomalously. Criteria *BehaviorCriteria + // Value indicates exporting metrics related to the behavior when it is true. + ExportMetric *bool + // What is measured by the behavior. Metric *string @@ -2489,6 +2492,24 @@ type MetricDimension struct { noSmithyDocumentSerde } +// Set configurations for metrics export. +type MetricsExportConfig struct { + + // The MQTT topic that Device Defender Detect should publish messages to for + // metrics export. + // + // This member is required. + MqttTopic *string + + // This role ARN has permission to publish MQTT messages, after which Device + // Defender Detect can assume the role and publish messages on your behalf. + // + // This member is required. + RoleArn *string + + noSmithyDocumentSerde +} + // The metric you want to retain. Dimensions are optional. type MetricToRetain struct { @@ -2497,6 +2518,10 @@ type MetricToRetain struct { // This member is required. Metric *string + // Value added in both Behavior and AdditionalMetricsToRetainV2 to indicate if + // Device Defender Detect should export the corresponding metrics. + ExportMetric *bool + // The dimension of a metric. This can't be used with custom metrics. MetricDimension *MetricDimension @@ -3853,7 +3878,8 @@ type ThingGroupIndexingConfiguration struct { // Contains fields that are indexed and whose types are already known by the Fleet // Indexing service. This is an optional field. For more information, see Managed // fields (https://docs.aws.amazon.com/iot/latest/developerguide/managing-fleet-index.html#managed-field) - // in the Amazon Web Services IoT Core Developer Guide. + // in the Amazon Web Services IoT Core Developer Guide. You can't modify managed + // fields by updating fleet indexing configuration. ManagedFields []Field noSmithyDocumentSerde @@ -3918,7 +3944,10 @@ type ThingIndexingConfiguration struct { Filter *IndexingFilter // Contains fields that are indexed and whose types are already known by the Fleet - // Indexing service. + // Indexing service. This is an optional field. For more information, see Managed + // fields (https://docs.aws.amazon.com/iot/latest/developerguide/managing-fleet-index.html#managed-field) + // in the Amazon Web Services IoT Core Developer Guide. You can't modify managed + // fields by updating fleet indexing configuration. ManagedFields []Field // Named shadow indexing mode. Valid values are: diff --git a/service/iot/validators.go b/service/iot/validators.go index 6ee93cbb4eb..18035248976 100644 --- a/service/iot/validators.go +++ b/service/iot/validators.go @@ -5767,6 +5767,24 @@ func validateMetricDimension(v *types.MetricDimension) error { } } +func validateMetricsExportConfig(v *types.MetricsExportConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MetricsExportConfig"} + if v.MqttTopic == nil { + invalidParams.Add(smithy.NewErrParamRequired("MqttTopic")) + } + if v.RoleArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateMetricToRetain(v *types.MetricToRetain) error { if v == nil { return nil @@ -7255,6 +7273,11 @@ func validateOpCreateSecurityProfileInput(v *CreateSecurityProfileInput) error { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } + if v.MetricsExportConfig != nil { + if err := validateMetricsExportConfig(v.MetricsExportConfig); err != nil { + invalidParams.AddNested("MetricsExportConfig", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -9802,6 +9825,11 @@ func validateOpUpdateSecurityProfileInput(v *UpdateSecurityProfileInput) error { invalidParams.AddNested("AdditionalMetricsToRetainV2", err.(smithy.InvalidParamsError)) } } + if v.MetricsExportConfig != nil { + if err := validateMetricsExportConfig(v.MetricsExportConfig); err != nil { + invalidParams.AddNested("MetricsExportConfig", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/lambda/types/enums.go b/service/lambda/types/enums.go index 0c41a349d4d..33b4d6d3e94 100644 --- a/service/lambda/types/enums.go +++ b/service/lambda/types/enums.go @@ -370,6 +370,7 @@ const ( RuntimePython311 Runtime = "python3.11" RuntimeNodejs20x Runtime = "nodejs20.x" RuntimeProvidedal2023 Runtime = "provided.al2023" + RuntimePython312 Runtime = "python3.12" ) // Values returns all known values for Runtime. Note that this can be expanded in @@ -411,6 +412,7 @@ func (Runtime) Values() []Runtime { "python3.11", "nodejs20.x", "provided.al2023", + "python3.12", } } diff --git a/service/mediatailor/api_op_CreateProgram.go b/service/mediatailor/api_op_CreateProgram.go index e49e8b2f312..11aa8a74eeb 100644 --- a/service/mediatailor/api_op_CreateProgram.go +++ b/service/mediatailor/api_op_CreateProgram.go @@ -87,7 +87,7 @@ type CreateProgramOutput struct { CreationTime *time.Time // The duration of the live program in milliseconds. - DurationMillis int64 + DurationMillis *int64 // The name of the LiveSource for this Program. LiveSourceName *string diff --git a/service/mediatailor/api_op_GetChannelSchedule.go b/service/mediatailor/api_op_GetChannelSchedule.go index e35455a78f3..ae551117928 100644 --- a/service/mediatailor/api_op_GetChannelSchedule.go +++ b/service/mediatailor/api_op_GetChannelSchedule.go @@ -46,7 +46,7 @@ type GetChannelScheduleInput struct { // response to the current request. If there are more than MaxResults channel // schedules, use the value of NextToken in the response to get the next page of // results. - MaxResults int32 + MaxResults *int32 // (Optional) If the playback configuration has more than MaxResults channel // schedules, use NextToken to get the second and subsequent pages of results. For @@ -187,8 +187,8 @@ func NewGetChannelSchedulePaginator(client GetChannelScheduleAPIClient, params * } options := GetChannelSchedulePaginatorOptions{} - if params.MaxResults != 0 { - options.Limit = params.MaxResults + if params.MaxResults != nil { + options.Limit = *params.MaxResults } for _, fn := range optFns { @@ -218,7 +218,11 @@ func (p *GetChannelSchedulePaginator) NextPage(ctx context.Context, optFns ...fu params := *p.params params.NextToken = p.nextToken - params.MaxResults = p.options.Limit + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit result, err := p.client.GetChannelSchedule(ctx, ¶ms, optFns...) if err != nil { diff --git a/service/mediatailor/api_op_GetPlaybackConfiguration.go b/service/mediatailor/api_op_GetPlaybackConfiguration.go index 747fa49f8ea..39aae0223d7 100644 --- a/service/mediatailor/api_op_GetPlaybackConfiguration.go +++ b/service/mediatailor/api_op_GetPlaybackConfiguration.go @@ -99,7 +99,7 @@ type GetPlaybackConfigurationOutput struct { // content stream. For more information about ad break behavior, including ad // replacement and insertion, see Ad Behavior in AWS Elemental MediaTailor (https://docs.aws.amazon.com/mediatailor/latest/ug/ad-behavior.html) // . - PersonalizationThresholdSeconds int32 + PersonalizationThresholdSeconds *int32 // The Amazon Resource Name (ARN) for the playback configuration. PlaybackConfigurationArn *string diff --git a/service/mediatailor/api_op_ListAlerts.go b/service/mediatailor/api_op_ListAlerts.go index 3d0cabcf26c..4e628f59fdd 100644 --- a/service/mediatailor/api_op_ListAlerts.go +++ b/service/mediatailor/api_op_ListAlerts.go @@ -43,7 +43,7 @@ type ListAlertsInput struct { // The maximum number of alerts that you want MediaTailor to return in response to // the current request. If there are more than MaxResults alerts, use the value of // NextToken in the response to get the next page of results. - MaxResults int32 + MaxResults *int32 // Pagination token returned by the list request when results exceed the maximum // allowed. Use the token to fetch the next page of results. @@ -177,8 +177,8 @@ func NewListAlertsPaginator(client ListAlertsAPIClient, params *ListAlertsInput, } options := ListAlertsPaginatorOptions{} - if params.MaxResults != 0 { - options.Limit = params.MaxResults + if params.MaxResults != nil { + options.Limit = *params.MaxResults } for _, fn := range optFns { @@ -208,7 +208,11 @@ func (p *ListAlertsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti params := *p.params params.NextToken = p.nextToken - params.MaxResults = p.options.Limit + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit result, err := p.client.ListAlerts(ctx, ¶ms, optFns...) if err != nil { diff --git a/service/mediatailor/api_op_ListChannels.go b/service/mediatailor/api_op_ListChannels.go index 1d8b9e933df..3425332e73d 100644 --- a/service/mediatailor/api_op_ListChannels.go +++ b/service/mediatailor/api_op_ListChannels.go @@ -38,7 +38,7 @@ type ListChannelsInput struct { // The maximum number of channels that you want MediaTailor to return in response // to the current request. If there are more than MaxResults channels, use the // value of NextToken in the response to get the next page of results. - MaxResults int32 + MaxResults *int32 // Pagination token returned by the list request when results exceed the maximum // allowed. Use the token to fetch the next page of results. @@ -169,8 +169,8 @@ func NewListChannelsPaginator(client ListChannelsAPIClient, params *ListChannels } options := ListChannelsPaginatorOptions{} - if params.MaxResults != 0 { - options.Limit = params.MaxResults + if params.MaxResults != nil { + options.Limit = *params.MaxResults } for _, fn := range optFns { @@ -200,7 +200,11 @@ func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Op params := *p.params params.NextToken = p.nextToken - params.MaxResults = p.options.Limit + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit result, err := p.client.ListChannels(ctx, ¶ms, optFns...) if err != nil { diff --git a/service/mediatailor/api_op_ListLiveSources.go b/service/mediatailor/api_op_ListLiveSources.go index 91552cc8093..bbb89037306 100644 --- a/service/mediatailor/api_op_ListLiveSources.go +++ b/service/mediatailor/api_op_ListLiveSources.go @@ -44,7 +44,7 @@ type ListLiveSourcesInput struct { // response to the current request. If there are more than MaxResults live // sources, use the value of NextToken in the response to get the next page of // results. - MaxResults int32 + MaxResults *int32 // Pagination token returned by the list request when results exceed the maximum // allowed. Use the token to fetch the next page of results. @@ -180,8 +180,8 @@ func NewListLiveSourcesPaginator(client ListLiveSourcesAPIClient, params *ListLi } options := ListLiveSourcesPaginatorOptions{} - if params.MaxResults != 0 { - options.Limit = params.MaxResults + if params.MaxResults != nil { + options.Limit = *params.MaxResults } for _, fn := range optFns { @@ -211,7 +211,11 @@ func (p *ListLiveSourcesPaginator) NextPage(ctx context.Context, optFns ...func( params := *p.params params.NextToken = p.nextToken - params.MaxResults = p.options.Limit + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit result, err := p.client.ListLiveSources(ctx, ¶ms, optFns...) if err != nil { diff --git a/service/mediatailor/api_op_ListPlaybackConfigurations.go b/service/mediatailor/api_op_ListPlaybackConfigurations.go index b9658c0b9d1..31001329d5e 100644 --- a/service/mediatailor/api_op_ListPlaybackConfigurations.go +++ b/service/mediatailor/api_op_ListPlaybackConfigurations.go @@ -40,7 +40,7 @@ type ListPlaybackConfigurationsInput struct { // return in response to the current request. If there are more than MaxResults // playback configurations, use the value of NextToken in the response to get the // next page of results. - MaxResults int32 + MaxResults *int32 // Pagination token returned by the list request when results exceed the maximum // allowed. Use the token to fetch the next page of results. @@ -178,8 +178,8 @@ func NewListPlaybackConfigurationsPaginator(client ListPlaybackConfigurationsAPI } options := ListPlaybackConfigurationsPaginatorOptions{} - if params.MaxResults != 0 { - options.Limit = params.MaxResults + if params.MaxResults != nil { + options.Limit = *params.MaxResults } for _, fn := range optFns { @@ -209,7 +209,11 @@ func (p *ListPlaybackConfigurationsPaginator) NextPage(ctx context.Context, optF params := *p.params params.NextToken = p.nextToken - params.MaxResults = p.options.Limit + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit result, err := p.client.ListPlaybackConfigurations(ctx, ¶ms, optFns...) if err != nil { diff --git a/service/mediatailor/api_op_ListPrefetchSchedules.go b/service/mediatailor/api_op_ListPrefetchSchedules.go index 0208dd92000..20b2d691e70 100644 --- a/service/mediatailor/api_op_ListPrefetchSchedules.go +++ b/service/mediatailor/api_op_ListPrefetchSchedules.go @@ -43,7 +43,7 @@ type ListPrefetchSchedulesInput struct { // response to the current request. If there are more than MaxResults prefetch // schedules, use the value of NextToken in the response to get the next page of // results. - MaxResults int32 + MaxResults *int32 // (Optional) If the playback configuration has more than MaxResults prefetch // schedules, use NextToken to get the second and subsequent pages of results. For @@ -189,8 +189,8 @@ func NewListPrefetchSchedulesPaginator(client ListPrefetchSchedulesAPIClient, pa } options := ListPrefetchSchedulesPaginatorOptions{} - if params.MaxResults != 0 { - options.Limit = params.MaxResults + if params.MaxResults != nil { + options.Limit = *params.MaxResults } for _, fn := range optFns { @@ -220,7 +220,11 @@ func (p *ListPrefetchSchedulesPaginator) NextPage(ctx context.Context, optFns .. params := *p.params params.NextToken = p.nextToken - params.MaxResults = p.options.Limit + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit result, err := p.client.ListPrefetchSchedules(ctx, ¶ms, optFns...) if err != nil { diff --git a/service/mediatailor/api_op_ListSourceLocations.go b/service/mediatailor/api_op_ListSourceLocations.go index 7a0263ccca2..f5ff532704f 100644 --- a/service/mediatailor/api_op_ListSourceLocations.go +++ b/service/mediatailor/api_op_ListSourceLocations.go @@ -39,7 +39,7 @@ type ListSourceLocationsInput struct { // response to the current request. If there are more than MaxResults source // locations, use the value of NextToken in the response to get the next page of // results. - MaxResults int32 + MaxResults *int32 // Pagination token returned by the list request when results exceed the maximum // allowed. Use the token to fetch the next page of results. @@ -173,8 +173,8 @@ func NewListSourceLocationsPaginator(client ListSourceLocationsAPIClient, params } options := ListSourceLocationsPaginatorOptions{} - if params.MaxResults != 0 { - options.Limit = params.MaxResults + if params.MaxResults != nil { + options.Limit = *params.MaxResults } for _, fn := range optFns { @@ -204,7 +204,11 @@ func (p *ListSourceLocationsPaginator) NextPage(ctx context.Context, optFns ...f params := *p.params params.NextToken = p.nextToken - params.MaxResults = p.options.Limit + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit result, err := p.client.ListSourceLocations(ctx, ¶ms, optFns...) if err != nil { diff --git a/service/mediatailor/api_op_ListVodSources.go b/service/mediatailor/api_op_ListVodSources.go index 9029d60a3ab..03713fe170b 100644 --- a/service/mediatailor/api_op_ListVodSources.go +++ b/service/mediatailor/api_op_ListVodSources.go @@ -43,7 +43,7 @@ type ListVodSourcesInput struct { // The maximum number of VOD sources that you want MediaTailor to return in // response to the current request. If there are more than MaxResults VOD sources, // use the value of NextToken in the response to get the next page of results. - MaxResults int32 + MaxResults *int32 // Pagination token returned by the list request when results exceed the maximum // allowed. Use the token to fetch the next page of results. @@ -178,8 +178,8 @@ func NewListVodSourcesPaginator(client ListVodSourcesAPIClient, params *ListVodS } options := ListVodSourcesPaginatorOptions{} - if params.MaxResults != 0 { - options.Limit = params.MaxResults + if params.MaxResults != nil { + options.Limit = *params.MaxResults } for _, fn := range optFns { @@ -209,7 +209,11 @@ func (p *ListVodSourcesPaginator) NextPage(ctx context.Context, optFns ...func(* params := *p.params params.NextToken = p.nextToken - params.MaxResults = p.options.Limit + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit result, err := p.client.ListVodSources(ctx, ¶ms, optFns...) if err != nil { diff --git a/service/mediatailor/api_op_PutPlaybackConfiguration.go b/service/mediatailor/api_op_PutPlaybackConfiguration.go index d0186174029..b3dfb3bc011 100644 --- a/service/mediatailor/api_op_PutPlaybackConfiguration.go +++ b/service/mediatailor/api_op_PutPlaybackConfiguration.go @@ -85,7 +85,7 @@ type PutPlaybackConfigurationInput struct { // content stream. For more information about ad break behavior, including ad // replacement and insertion, see Ad Behavior in AWS Elemental MediaTailor (https://docs.aws.amazon.com/mediatailor/latest/ug/ad-behavior.html) // . - PersonalizationThresholdSeconds int32 + PersonalizationThresholdSeconds *int32 // The URL for a high-quality video asset to transcode and use to fill in time // that's not used by ads. AWS Elemental MediaTailor shows the slate to fill in @@ -170,7 +170,7 @@ type PutPlaybackConfigurationOutput struct { // content stream. For more information about ad break behavior, including ad // replacement and insertion, see Ad Behavior in AWS Elemental MediaTailor (https://docs.aws.amazon.com/mediatailor/latest/ug/ad-behavior.html) // . - PersonalizationThresholdSeconds int32 + PersonalizationThresholdSeconds *int32 // The Amazon Resource Name (ARN) associated with the playback configuration. PlaybackConfigurationArn *string diff --git a/service/mediatailor/api_op_UpdateProgram.go b/service/mediatailor/api_op_UpdateProgram.go index dd1395761a2..5724ca28490 100644 --- a/service/mediatailor/api_op_UpdateProgram.go +++ b/service/mediatailor/api_op_UpdateProgram.go @@ -74,7 +74,7 @@ type UpdateProgramOutput struct { CreationTime *time.Time // The duration of the live program in milliseconds. - DurationMillis int64 + DurationMillis *int64 // The name of the LiveSource for this Program. LiveSourceName *string diff --git a/service/mediatailor/deserializers.go b/service/mediatailor/deserializers.go index 95ff8cd8242..428713a2aec 100644 --- a/service/mediatailor/deserializers.go +++ b/service/mediatailor/deserializers.go @@ -1142,7 +1142,7 @@ func awsRestjson1_deserializeOpDocumentCreateProgramOutput(v **CreateProgramOutp if err != nil { return err } - sv.DurationMillis = i64 + sv.DurationMillis = ptr.Int64(i64) } case "LiveSourceName": @@ -3891,7 +3891,7 @@ func awsRestjson1_deserializeOpDocumentGetPlaybackConfigurationOutput(v **GetPla if err != nil { return err } - sv.PersonalizationThresholdSeconds = int32(i64) + sv.PersonalizationThresholdSeconds = ptr.Int32(int32(i64)) } case "PlaybackConfigurationArn": @@ -5648,7 +5648,7 @@ func awsRestjson1_deserializeOpDocumentPutPlaybackConfigurationOutput(v **PutPla if err != nil { return err } - sv.PersonalizationThresholdSeconds = int32(i64) + sv.PersonalizationThresholdSeconds = ptr.Int32(int32(i64)) } case "PlaybackConfigurationArn": @@ -6680,7 +6680,7 @@ func awsRestjson1_deserializeOpDocumentUpdateProgramOutput(v **UpdateProgramOutp if err != nil { return err } - sv.DurationMillis = i64 + sv.DurationMillis = ptr.Int64(i64) } case "LiveSourceName": @@ -8481,7 +8481,7 @@ func awsRestjson1_deserializeDocumentClipRange(v **types.ClipRange, value interf if err != nil { return err } - sv.EndOffsetMillis = i64 + sv.EndOffsetMillis = ptr.Int64(i64) } default: @@ -8617,7 +8617,7 @@ func awsRestjson1_deserializeDocumentDashPlaylistSettings(v **types.DashPlaylist if err != nil { return err } - sv.ManifestWindowSeconds = int32(i64) + sv.ManifestWindowSeconds = ptr.Int32(int32(i64)) } case "MinBufferTimeSeconds": @@ -8630,7 +8630,7 @@ func awsRestjson1_deserializeDocumentDashPlaylistSettings(v **types.DashPlaylist if err != nil { return err } - sv.MinBufferTimeSeconds = int32(i64) + sv.MinBufferTimeSeconds = ptr.Int32(int32(i64)) } case "MinUpdatePeriodSeconds": @@ -8643,7 +8643,7 @@ func awsRestjson1_deserializeDocumentDashPlaylistSettings(v **types.DashPlaylist if err != nil { return err } - sv.MinUpdatePeriodSeconds = int32(i64) + sv.MinUpdatePeriodSeconds = ptr.Int32(int32(i64)) } case "SuggestedPresentationDelaySeconds": @@ -8656,7 +8656,7 @@ func awsRestjson1_deserializeDocumentDashPlaylistSettings(v **types.DashPlaylist if err != nil { return err } - sv.SuggestedPresentationDelaySeconds = int32(i64) + sv.SuggestedPresentationDelaySeconds = ptr.Int32(int32(i64)) } default: @@ -8785,7 +8785,7 @@ func awsRestjson1_deserializeDocumentHlsPlaylistSettings(v **types.HlsPlaylistSe if err != nil { return err } - sv.ManifestWindowSeconds = int32(i64) + sv.ManifestWindowSeconds = ptr.Int32(int32(i64)) } default: @@ -9019,7 +9019,7 @@ func awsRestjson1_deserializeDocumentLivePreRollConfiguration(v **types.LivePreR if err != nil { return err } - sv.MaxDurationSeconds = int32(i64) + sv.MaxDurationSeconds = ptr.Int32(int32(i64)) } default: @@ -9378,7 +9378,7 @@ func awsRestjson1_deserializeDocumentPlaybackConfiguration(v **types.PlaybackCon if err != nil { return err } - sv.PersonalizationThresholdSeconds = int32(i64) + sv.PersonalizationThresholdSeconds = ptr.Int32(int32(i64)) } case "PlaybackConfigurationArn": @@ -9796,7 +9796,7 @@ func awsRestjson1_deserializeDocumentScheduleAdBreak(v **types.ScheduleAdBreak, if err != nil { return err } - sv.ApproximateDurationSeconds = i64 + sv.ApproximateDurationSeconds = ptr.Int64(i64) } case "ApproximateStartTime": @@ -9874,7 +9874,7 @@ func awsRestjson1_deserializeDocumentScheduleEntry(v **types.ScheduleEntry, valu if err != nil { return err } - sv.ApproximateDurationSeconds = i64 + sv.ApproximateDurationSeconds = ptr.Int64(i64) } case "ApproximateStartTime": @@ -10429,7 +10429,7 @@ func awsRestjson1_deserializeDocumentSpliceInsertMessage(v **types.SpliceInsertM if err != nil { return err } - sv.AvailNum = int32(i64) + sv.AvailNum = ptr.Int32(int32(i64)) } case "AvailsExpected": @@ -10442,7 +10442,7 @@ func awsRestjson1_deserializeDocumentSpliceInsertMessage(v **types.SpliceInsertM if err != nil { return err } - sv.AvailsExpected = int32(i64) + sv.AvailsExpected = ptr.Int32(int32(i64)) } case "SpliceEventId": @@ -10455,7 +10455,7 @@ func awsRestjson1_deserializeDocumentSpliceInsertMessage(v **types.SpliceInsertM if err != nil { return err } - sv.SpliceEventId = int32(i64) + sv.SpliceEventId = ptr.Int32(int32(i64)) } case "UniqueProgramId": @@ -10468,7 +10468,7 @@ func awsRestjson1_deserializeDocumentSpliceInsertMessage(v **types.SpliceInsertM if err != nil { return err } - sv.UniqueProgramId = int32(i64) + sv.UniqueProgramId = ptr.Int32(int32(i64)) } default: diff --git a/service/mediatailor/endpoints.go b/service/mediatailor/endpoints.go index c8b022680bf..b72f23d7b09 100644 --- a/service/mediatailor/endpoints.go +++ b/service/mediatailor/endpoints.go @@ -430,7 +430,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { uriString := func() string { var out strings.Builder out.WriteString("https://api.mediatailor-fips.") diff --git a/service/mediatailor/serializers.go b/service/mediatailor/serializers.go index bc534af6cd4..985f8cd5093 100644 --- a/service/mediatailor/serializers.go +++ b/service/mediatailor/serializers.go @@ -1892,8 +1892,8 @@ func awsRestjson1_serializeOpHttpBindingsGetChannelScheduleInput(v *GetChannelSc encoder.SetQuery("durationMinutes").String(*v.DurationMinutes) } - if v.MaxResults != 0 { - encoder.SetQuery("maxResults").Integer(v.MaxResults) + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) } if v.NextToken != nil { @@ -2095,8 +2095,8 @@ func awsRestjson1_serializeOpHttpBindingsListAlertsInput(v *ListAlertsInput, enc return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MaxResults != 0 { - encoder.SetQuery("maxResults").Integer(v.MaxResults) + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) } if v.NextToken != nil { @@ -2163,8 +2163,8 @@ func awsRestjson1_serializeOpHttpBindingsListChannelsInput(v *ListChannelsInput, return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MaxResults != 0 { - encoder.SetQuery("maxResults").Integer(v.MaxResults) + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) } if v.NextToken != nil { @@ -2227,8 +2227,8 @@ func awsRestjson1_serializeOpHttpBindingsListLiveSourcesInput(v *ListLiveSources return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MaxResults != 0 { - encoder.SetQuery("maxResults").Integer(v.MaxResults) + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) } if v.NextToken != nil { @@ -2300,8 +2300,8 @@ func awsRestjson1_serializeOpHttpBindingsListPlaybackConfigurationsInput(v *List return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MaxResults != 0 { - encoder.SetQuery("MaxResults").Integer(v.MaxResults) + if v.MaxResults != nil { + encoder.SetQuery("MaxResults").Integer(*v.MaxResults) } if v.NextToken != nil { @@ -2391,9 +2391,9 @@ func awsRestjson1_serializeOpDocumentListPrefetchSchedulesInput(v *ListPrefetchS object := value.Object() defer object.Close() - if v.MaxResults != 0 { + if v.MaxResults != nil { ok := object.Key("MaxResults") - ok.Integer(v.MaxResults) + ok.Integer(*v.MaxResults) } if v.NextToken != nil { @@ -2462,8 +2462,8 @@ func awsRestjson1_serializeOpHttpBindingsListSourceLocationsInput(v *ListSourceL return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MaxResults != 0 { - encoder.SetQuery("maxResults").Integer(v.MaxResults) + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) } if v.NextToken != nil { @@ -2591,8 +2591,8 @@ func awsRestjson1_serializeOpHttpBindingsListVodSourcesInput(v *ListVodSourcesIn return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MaxResults != 0 { - encoder.SetQuery("maxResults").Integer(v.MaxResults) + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) } if v.NextToken != nil { @@ -2825,9 +2825,9 @@ func awsRestjson1_serializeOpDocumentPutPlaybackConfigurationInput(v *PutPlaybac ok.String(*v.Name) } - if v.PersonalizationThresholdSeconds != 0 { + if v.PersonalizationThresholdSeconds != nil { ok := object.Key("PersonalizationThresholdSeconds") - ok.Integer(v.PersonalizationThresholdSeconds) + ok.Integer(*v.PersonalizationThresholdSeconds) } if v.SlateAdUrl != nil { @@ -3885,9 +3885,9 @@ func awsRestjson1_serializeDocumentClipRange(v *types.ClipRange, value smithyjso object := value.Object() defer object.Close() - { + if v.EndOffsetMillis != nil { ok := object.Key("EndOffsetMillis") - ok.Long(v.EndOffsetMillis) + ok.Long(*v.EndOffsetMillis) } return nil @@ -3930,24 +3930,24 @@ func awsRestjson1_serializeDocumentDashPlaylistSettings(v *types.DashPlaylistSet object := value.Object() defer object.Close() - if v.ManifestWindowSeconds != 0 { + if v.ManifestWindowSeconds != nil { ok := object.Key("ManifestWindowSeconds") - ok.Integer(v.ManifestWindowSeconds) + ok.Integer(*v.ManifestWindowSeconds) } - if v.MinBufferTimeSeconds != 0 { + if v.MinBufferTimeSeconds != nil { ok := object.Key("MinBufferTimeSeconds") - ok.Integer(v.MinBufferTimeSeconds) + ok.Integer(*v.MinBufferTimeSeconds) } - if v.MinUpdatePeriodSeconds != 0 { + if v.MinUpdatePeriodSeconds != nil { ok := object.Key("MinUpdatePeriodSeconds") - ok.Integer(v.MinUpdatePeriodSeconds) + ok.Integer(*v.MinUpdatePeriodSeconds) } - if v.SuggestedPresentationDelaySeconds != 0 { + if v.SuggestedPresentationDelaySeconds != nil { ok := object.Key("SuggestedPresentationDelaySeconds") - ok.Integer(v.SuggestedPresentationDelaySeconds) + ok.Integer(*v.SuggestedPresentationDelaySeconds) } return nil @@ -3976,9 +3976,9 @@ func awsRestjson1_serializeDocumentHlsPlaylistSettings(v *types.HlsPlaylistSetti } } - if v.ManifestWindowSeconds != 0 { + if v.ManifestWindowSeconds != nil { ok := object.Key("ManifestWindowSeconds") - ok.Integer(v.ManifestWindowSeconds) + ok.Integer(*v.ManifestWindowSeconds) } return nil @@ -4057,9 +4057,9 @@ func awsRestjson1_serializeDocumentLivePreRollConfiguration(v *types.LivePreRoll ok.String(*v.AdDecisionServerUrl) } - if v.MaxDurationSeconds != 0 { + if v.MaxDurationSeconds != nil { ok := object.Key("MaxDurationSeconds") - ok.Integer(v.MaxDurationSeconds) + ok.Integer(*v.MaxDurationSeconds) } return nil @@ -4323,24 +4323,24 @@ func awsRestjson1_serializeDocumentSpliceInsertMessage(v *types.SpliceInsertMess object := value.Object() defer object.Close() - if v.AvailNum != 0 { + if v.AvailNum != nil { ok := object.Key("AvailNum") - ok.Integer(v.AvailNum) + ok.Integer(*v.AvailNum) } - if v.AvailsExpected != 0 { + if v.AvailsExpected != nil { ok := object.Key("AvailsExpected") - ok.Integer(v.AvailsExpected) + ok.Integer(*v.AvailsExpected) } - if v.SpliceEventId != 0 { + if v.SpliceEventId != nil { ok := object.Key("SpliceEventId") - ok.Integer(v.SpliceEventId) + ok.Integer(*v.SpliceEventId) } - if v.UniqueProgramId != 0 { + if v.UniqueProgramId != nil { ok := object.Key("UniqueProgramId") - ok.Integer(v.UniqueProgramId) + ok.Integer(*v.UniqueProgramId) } return nil @@ -4364,9 +4364,9 @@ func awsRestjson1_serializeDocumentTransition(v *types.Transition, value smithyj object := value.Object() defer object.Close() - if v.DurationMillis != 0 { + if v.DurationMillis != nil { ok := object.Key("DurationMillis") - ok.Long(v.DurationMillis) + ok.Long(*v.DurationMillis) } if len(v.RelativePosition) > 0 { @@ -4379,9 +4379,9 @@ func awsRestjson1_serializeDocumentTransition(v *types.Transition, value smithyj ok.String(*v.RelativeProgram) } - if v.ScheduledStartTimeMillis != 0 { + if v.ScheduledStartTimeMillis != nil { ok := object.Key("ScheduledStartTimeMillis") - ok.Long(v.ScheduledStartTimeMillis) + ok.Long(*v.ScheduledStartTimeMillis) } if v.Type != nil { @@ -4417,14 +4417,14 @@ func awsRestjson1_serializeDocumentUpdateProgramTransition(v *types.UpdateProgra object := value.Object() defer object.Close() - if v.DurationMillis != 0 { + if v.DurationMillis != nil { ok := object.Key("DurationMillis") - ok.Long(v.DurationMillis) + ok.Long(*v.DurationMillis) } - if v.ScheduledStartTimeMillis != 0 { + if v.ScheduledStartTimeMillis != nil { ok := object.Key("ScheduledStartTimeMillis") - ok.Long(v.ScheduledStartTimeMillis) + ok.Long(*v.ScheduledStartTimeMillis) } return nil diff --git a/service/mediatailor/types/types.go b/service/mediatailor/types/types.go index 3d824b198e7..98a68087c18 100644 --- a/service/mediatailor/types/types.go +++ b/service/mediatailor/types/types.go @@ -320,7 +320,7 @@ type ClipRange struct { // of the VOD source associated with the program. // // This member is required. - EndOffsetMillis int64 + EndOffsetMillis *int64 noSmithyDocumentSerde } @@ -378,20 +378,20 @@ type DashPlaylistSettings struct { // The total duration (in seconds) of each manifest. Minimum value: 30 seconds. // Maximum value: 3600 seconds. - ManifestWindowSeconds int32 + ManifestWindowSeconds *int32 // Minimum amount of content (measured in seconds) that a player must keep // available in the buffer. Minimum value: 2 seconds. Maximum value: 60 seconds. - MinBufferTimeSeconds int32 + MinBufferTimeSeconds *int32 // Minimum amount of time (in seconds) that the player should wait before // requesting updates to the manifest. Minimum value: 2 seconds. Maximum value: 60 // seconds. - MinUpdatePeriodSeconds int32 + MinUpdatePeriodSeconds *int32 // Amount of time (in seconds) that the player should be from the live point at // the end of the manifest. Minimum value: 2 seconds. Maximum value: 60 seconds. - SuggestedPresentationDelaySeconds int32 + SuggestedPresentationDelaySeconds *int32 noSmithyDocumentSerde } @@ -431,7 +431,7 @@ type HlsPlaylistSettings struct { // The total duration (in seconds) of each manifest. Minimum value: 30 seconds. // Maximum value: 3600 seconds. - ManifestWindowSeconds int32 + ManifestWindowSeconds *int32 noSmithyDocumentSerde } @@ -506,7 +506,7 @@ type LivePreRollConfiguration struct { // The maximum allowed duration for the pre-roll ad avail. AWS Elemental // MediaTailor won't play pre-roll ads to exceed this duration, regardless of the // total duration of ads that the ADS returns. - MaxDurationSeconds int32 + MaxDurationSeconds *int32 noSmithyDocumentSerde } @@ -647,7 +647,7 @@ type PlaybackConfiguration struct { // content stream. For more information about ad break behavior, including ad // replacement and insertion, see Ad Behavior in AWS Elemental MediaTailor (https://docs.aws.amazon.com/mediatailor/latest/ug/ad-behavior.html) // . - PersonalizationThresholdSeconds int32 + PersonalizationThresholdSeconds *int32 // The Amazon Resource Name (ARN) for the playback configuration. PlaybackConfigurationArn *string @@ -839,7 +839,7 @@ type ResponseOutputItem struct { type ScheduleAdBreak struct { // The approximate duration of the ad break, in seconds. - ApproximateDurationSeconds int64 + ApproximateDurationSeconds *int64 // The approximate time that the ad will start playing. ApproximateStartTime *time.Time @@ -892,7 +892,7 @@ type ScheduleEntry struct { SourceLocationName *string // The approximate duration of this program, in seconds. - ApproximateDurationSeconds int64 + ApproximateDurationSeconds *int64 // The approximate time that the program will start playing. ApproximateStartTime *time.Time @@ -1070,21 +1070,21 @@ type SpliceInsertMessage struct { // This is written to splice_insert.avail_num , as defined in section 9.7.3.1 of // the SCTE-35 specification. The default value is 0 . Values must be between 0 // and 256 , inclusive. - AvailNum int32 + AvailNum *int32 // This is written to splice_insert.avails_expected , as defined in section 9.7.3.1 // of the SCTE-35 specification. The default value is 0 . Values must be between 0 // and 256 , inclusive. - AvailsExpected int32 + AvailsExpected *int32 // This is written to splice_insert.splice_event_id , as defined in section 9.7.3.1 // of the SCTE-35 specification. The default value is 1 . - SpliceEventId int32 + SpliceEventId *int32 // This is written to splice_insert.unique_program_id , as defined in section // 9.7.3.1 of the SCTE-35 specification. The default value is 0 . Values must be // between 0 and 256 , inclusive. - UniqueProgramId int32 + UniqueProgramId *int32 noSmithyDocumentSerde } @@ -1129,14 +1129,14 @@ type Transition struct { Type *string // The duration of the live program in seconds. - DurationMillis int64 + DurationMillis *int64 // The name of the program that this program will be inserted next to, as defined // by RelativePosition . RelativeProgram *string // The date and time that the program is scheduled to start, in epoch milliseconds. - ScheduledStartTimeMillis int64 + ScheduledStartTimeMillis *int64 noSmithyDocumentSerde } @@ -1157,10 +1157,10 @@ type UpdateProgramScheduleConfiguration struct { type UpdateProgramTransition struct { // The duration of the live program in seconds. - DurationMillis int64 + DurationMillis *int64 // The date and time that the program is scheduled to start, in epoch milliseconds. - ScheduledStartTimeMillis int64 + ScheduledStartTimeMillis *int64 noSmithyDocumentSerde } diff --git a/service/mediatailor/validators.go b/service/mediatailor/validators.go index c2225de6356..8350b4dd14c 100644 --- a/service/mediatailor/validators.go +++ b/service/mediatailor/validators.go @@ -1085,6 +1085,9 @@ func validateClipRange(v *types.ClipRange) error { return nil } invalidParams := smithy.InvalidParamsError{Context: "ClipRange"} + if v.EndOffsetMillis == nil { + invalidParams.Add(smithy.NewErrParamRequired("EndOffsetMillis")) + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/pipes/api_op_CreatePipe.go b/service/pipes/api_op_CreatePipe.go index ef40e31f353..19e72bcbc29 100644 --- a/service/pipes/api_op_CreatePipe.go +++ b/service/pipes/api_op_CreatePipe.go @@ -68,13 +68,19 @@ type CreatePipeInput struct { // The parameters required to set up enrichment on your pipe. EnrichmentParameters *types.PipeEnrichmentParameters + // The logging configuration settings for the pipe. + LogConfiguration *types.PipeLogConfigurationParameters + // The parameters required to set up a source for your pipe. SourceParameters *types.PipeSourceParameters // The list of key-value pairs to associate with the pipe. Tags map[string]string - // The parameters required to set up a target for your pipe. + // The parameters required to set up a target for your pipe. For more information + // about pipe target parameters, including how to use dynamic path parameters, see + // Target parameters (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-target.html) + // in the Amazon EventBridge User Guide. TargetParameters *types.PipeTargetParameters noSmithyDocumentSerde diff --git a/service/pipes/api_op_DescribePipe.go b/service/pipes/api_op_DescribePipe.go index 29a3dcbb98a..a591264e18b 100644 --- a/service/pipes/api_op_DescribePipe.go +++ b/service/pipes/api_op_DescribePipe.go @@ -72,6 +72,9 @@ type DescribePipeOutput struct { // (YYYY-MM-DDThh:mm:ss.sTZD). LastModifiedTime *time.Time + // The logging configuration settings for the pipe. + LogConfiguration *types.PipeLogConfiguration + // The name of the pipe. Name *string @@ -93,7 +96,10 @@ type DescribePipeOutput struct { // The ARN of the target resource. Target *string - // The parameters required to set up a target for your pipe. + // The parameters required to set up a target for your pipe. For more information + // about pipe target parameters, including how to use dynamic path parameters, see + // Target parameters (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-target.html) + // in the Amazon EventBridge User Guide. TargetParameters *types.PipeTargetParameters // Metadata pertaining to the operation's result. diff --git a/service/pipes/api_op_UpdatePipe.go b/service/pipes/api_op_UpdatePipe.go index c029fb3c351..bf08e30ba27 100644 --- a/service/pipes/api_op_UpdatePipe.go +++ b/service/pipes/api_op_UpdatePipe.go @@ -17,15 +17,16 @@ import ( "time" ) -// Update an existing pipe. When you call UpdatePipe , only the fields that are -// included in the request are changed, the rest are unchanged. The exception to -// this is if you modify any Amazon Web Services-service specific fields in the -// SourceParameters , EnrichmentParameters , or TargetParameters objects. The -// fields in these objects are updated atomically as one and override existing -// values. This is by design and means that if you don't specify an optional field -// in one of these Parameters objects, that field will be set to its system-default -// value after the update. For more information about pipes, see Amazon -// EventBridge Pipes (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes.html) +// Update an existing pipe. When you call UpdatePipe , EventBridge only the updates +// fields you have specified in the request; the rest remain unchanged. The +// exception to this is if you modify any Amazon Web Services-service specific +// fields in the SourceParameters , EnrichmentParameters , or TargetParameters +// objects. For example, DynamoDBStreamParameters or EventBridgeEventBusParameters +// . EventBridge updates the fields in these objects atomically as one and +// overrides existing values. This is by design, and means that if you don't +// specify an optional field in one of these Parameters objects, EventBridge sets +// that field to its system-default value during the update. For more information +// about pipes, see Amazon EventBridge Pipes (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes.html) // in the Amazon EventBridge User Guide. func (c *Client) UpdatePipe(ctx context.Context, params *UpdatePipeInput, optFns ...func(*Options)) (*UpdatePipeOutput, error) { if params == nil { @@ -66,13 +67,19 @@ type UpdatePipeInput struct { // The parameters required to set up enrichment on your pipe. EnrichmentParameters *types.PipeEnrichmentParameters + // The logging configuration settings for the pipe. + LogConfiguration *types.PipeLogConfigurationParameters + // The parameters required to set up a source for your pipe. SourceParameters *types.UpdatePipeSourceParameters // The ARN of the target resource. Target *string - // The parameters required to set up a target for your pipe. + // The parameters required to set up a target for your pipe. For more information + // about pipe target parameters, including how to use dynamic path parameters, see + // Target parameters (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-target.html) + // in the Amazon EventBridge User Guide. TargetParameters *types.PipeTargetParameters noSmithyDocumentSerde diff --git a/service/pipes/deserializers.go b/service/pipes/deserializers.go index 56d50d94ea1..aca0975982e 100644 --- a/service/pipes/deserializers.go +++ b/service/pipes/deserializers.go @@ -691,6 +691,11 @@ func awsRestjson1_deserializeOpDocumentDescribePipeOutput(v **DescribePipeOutput } } + case "LogConfiguration": + if err := awsRestjson1_deserializeDocumentPipeLogConfiguration(&sv.LogConfiguration, value); err != nil { + return err + } + case "Name": if value != nil { jtv, ok := value.(string) @@ -2753,6 +2758,46 @@ func awsRestjson1_deserializeDocumentCapacityProviderStrategyItem(v **types.Capa return nil } +func awsRestjson1_deserializeDocumentCloudwatchLogsLogDestination(v **types.CloudwatchLogsLogDestination, 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.CloudwatchLogsLogDestination + if *v == nil { + sv = &types.CloudwatchLogsLogDestination{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LogGroupArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CloudwatchLogGroupArn to be of type string, got %T instead", value) + } + sv.LogGroupArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -3588,6 +3633,46 @@ func awsRestjson1_deserializeDocumentFilterList(v *[]types.Filter, value interfa return nil } +func awsRestjson1_deserializeDocumentFirehoseLogDestination(v **types.FirehoseLogDestination, 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.FirehoseLogDestination + if *v == nil { + sv = &types.FirehoseLogDestination{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DeliveryStreamArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FirehoseArn to be of type string, got %T instead", value) + } + sv.DeliveryStreamArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentHeaderParametersMap(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -3624,6 +3709,42 @@ func awsRestjson1_deserializeDocumentHeaderParametersMap(v *map[string]string, v return nil } +func awsRestjson1_deserializeDocumentIncludeExecutionData(v *[]types.IncludeExecutionDataOption, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.IncludeExecutionDataOption + if *v == nil { + cv = []types.IncludeExecutionDataOption{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.IncludeExecutionDataOption + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IncludeExecutionDataOption to be of type string, got %T instead", value) + } + col = types.IncludeExecutionDataOption(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentInternalException(v **types.InternalException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -4181,6 +4302,66 @@ func awsRestjson1_deserializeDocumentPipeList(v *[]types.Pipe, value interface{} return nil } +func awsRestjson1_deserializeDocumentPipeLogConfiguration(v **types.PipeLogConfiguration, 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.PipeLogConfiguration + if *v == nil { + sv = &types.PipeLogConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CloudwatchLogsLogDestination": + if err := awsRestjson1_deserializeDocumentCloudwatchLogsLogDestination(&sv.CloudwatchLogsLogDestination, value); err != nil { + return err + } + + case "FirehoseLogDestination": + if err := awsRestjson1_deserializeDocumentFirehoseLogDestination(&sv.FirehoseLogDestination, value); err != nil { + return err + } + + case "IncludeExecutionData": + if err := awsRestjson1_deserializeDocumentIncludeExecutionData(&sv.IncludeExecutionData, value); err != nil { + return err + } + + case "Level": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogLevel to be of type string, got %T instead", value) + } + sv.Level = types.LogLevel(jtv) + } + + case "S3LogDestination": + if err := awsRestjson1_deserializeDocumentS3LogDestination(&sv.S3LogDestination, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentPipeSourceActiveMQBrokerParameters(v **types.PipeSourceActiveMQBrokerParameters, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -5881,6 +6062,73 @@ func awsRestjson1_deserializeDocumentQueryStringParametersMap(v *map[string]stri return nil } +func awsRestjson1_deserializeDocumentS3LogDestination(v **types.S3LogDestination, 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.S3LogDestination + if *v == nil { + sv = &types.S3LogDestination{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BucketName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.BucketName = ptr.String(jtv) + } + + case "BucketOwner": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.BucketOwner = ptr.String(jtv) + } + + case "OutputFormat": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3OutputFormat to be of type string, got %T instead", value) + } + sv.OutputFormat = types.S3OutputFormat(jtv) + } + + case "Prefix": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Prefix = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentSageMakerPipelineParameter(v **types.SageMakerPipelineParameter, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/pipes/endpoints.go b/service/pipes/endpoints.go index 23eb82706ae..ac6ca3730d9 100644 --- a/service/pipes/endpoints.go +++ b/service/pipes/endpoints.go @@ -430,7 +430,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { uriString := func() string { var out strings.Builder out.WriteString("https://pipes-fips.") diff --git a/service/pipes/serializers.go b/service/pipes/serializers.go index cf6b4a44b72..6f5724dea1b 100644 --- a/service/pipes/serializers.go +++ b/service/pipes/serializers.go @@ -117,6 +117,13 @@ func awsRestjson1_serializeOpDocumentCreatePipeInput(v *CreatePipeInput, value s } } + if v.LogConfiguration != nil { + ok := object.Key("LogConfiguration") + if err := awsRestjson1_serializeDocumentPipeLogConfigurationParameters(v.LogConfiguration, ok); err != nil { + return err + } + } + if v.RoleArn != nil { ok := object.Key("RoleArn") ok.String(*v.RoleArn) @@ -828,6 +835,13 @@ func awsRestjson1_serializeOpDocumentUpdatePipeInput(v *UpdatePipeInput, value s } } + if v.LogConfiguration != nil { + ok := object.Key("LogConfiguration") + if err := awsRestjson1_serializeDocumentPipeLogConfigurationParameters(v.LogConfiguration, ok); err != nil { + return err + } + } + if v.RoleArn != nil { ok := object.Key("RoleArn") ok.String(*v.RoleArn) @@ -1074,6 +1088,18 @@ func awsRestjson1_serializeDocumentCapacityProviderStrategyItem(v *types.Capacit return nil } +func awsRestjson1_serializeDocumentCloudwatchLogsLogDestinationParameters(v *types.CloudwatchLogsLogDestinationParameters, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogGroupArn != nil { + ok := object.Key("LogGroupArn") + ok.String(*v.LogGroupArn) + } + + return nil +} + func awsRestjson1_serializeDocumentDeadLetterConfig(v *types.DeadLetterConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1384,6 +1410,18 @@ func awsRestjson1_serializeDocumentFilterList(v []types.Filter, value smithyjson return nil } +func awsRestjson1_serializeDocumentFirehoseLogDestinationParameters(v *types.FirehoseLogDestinationParameters, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DeliveryStreamArn != nil { + ok := object.Key("DeliveryStreamArn") + ok.String(*v.DeliveryStreamArn) + } + + return nil +} + func awsRestjson1_serializeDocumentHeaderParametersMap(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1395,6 +1433,17 @@ func awsRestjson1_serializeDocumentHeaderParametersMap(v map[string]string, valu return nil } +func awsRestjson1_serializeDocumentIncludeExecutionData(v []types.IncludeExecutionDataOption, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + func awsRestjson1_serializeDocumentKafkaBootstrapServers(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -1514,6 +1563,46 @@ func awsRestjson1_serializeDocumentPipeEnrichmentParameters(v *types.PipeEnrichm return nil } +func awsRestjson1_serializeDocumentPipeLogConfigurationParameters(v *types.PipeLogConfigurationParameters, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CloudwatchLogsLogDestination != nil { + ok := object.Key("CloudwatchLogsLogDestination") + if err := awsRestjson1_serializeDocumentCloudwatchLogsLogDestinationParameters(v.CloudwatchLogsLogDestination, ok); err != nil { + return err + } + } + + if v.FirehoseLogDestination != nil { + ok := object.Key("FirehoseLogDestination") + if err := awsRestjson1_serializeDocumentFirehoseLogDestinationParameters(v.FirehoseLogDestination, ok); err != nil { + return err + } + } + + if v.IncludeExecutionData != nil { + ok := object.Key("IncludeExecutionData") + if err := awsRestjson1_serializeDocumentIncludeExecutionData(v.IncludeExecutionData, ok); err != nil { + return err + } + } + + if len(v.Level) > 0 { + ok := object.Key("Level") + ok.String(string(v.Level)) + } + + if v.S3LogDestination != nil { + ok := object.Key("S3LogDestination") + if err := awsRestjson1_serializeDocumentS3LogDestinationParameters(v.S3LogDestination, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentPipeSourceActiveMQBrokerParameters(v *types.PipeSourceActiveMQBrokerParameters, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2348,6 +2437,33 @@ func awsRestjson1_serializeDocumentQueryStringParametersMap(v map[string]string, return nil } +func awsRestjson1_serializeDocumentS3LogDestinationParameters(v *types.S3LogDestinationParameters, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BucketName != nil { + ok := object.Key("BucketName") + ok.String(*v.BucketName) + } + + if v.BucketOwner != nil { + ok := object.Key("BucketOwner") + ok.String(*v.BucketOwner) + } + + if len(v.OutputFormat) > 0 { + ok := object.Key("OutputFormat") + ok.String(string(v.OutputFormat)) + } + + if v.Prefix != nil { + ok := object.Key("Prefix") + ok.String(*v.Prefix) + } + + return nil +} + func awsRestjson1_serializeDocumentSageMakerPipelineParameter(v *types.SageMakerPipelineParameter, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/pipes/types/enums.go b/service/pipes/types/enums.go index b08052ef2ba..3c7b25bd00a 100644 --- a/service/pipes/types/enums.go +++ b/service/pipes/types/enums.go @@ -111,6 +111,22 @@ func (EcsResourceRequirementType) Values() []EcsResourceRequirementType { } } +type IncludeExecutionDataOption string + +// Enum values for IncludeExecutionDataOption +const ( + IncludeExecutionDataOptionAll IncludeExecutionDataOption = "ALL" +) + +// Values returns all known values for IncludeExecutionDataOption. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// The ordering of this slice is not guaranteed to be stable across updates. +func (IncludeExecutionDataOption) Values() []IncludeExecutionDataOption { + return []IncludeExecutionDataOption{ + "ALL", + } +} + type KinesisStreamStartPosition string // Enum values for KinesisStreamStartPosition @@ -151,6 +167,28 @@ func (LaunchType) Values() []LaunchType { } } +type LogLevel string + +// Enum values for LogLevel +const ( + LogLevelOff LogLevel = "OFF" + LogLevelError LogLevel = "ERROR" + LogLevelInfo LogLevel = "INFO" + LogLevelTrace LogLevel = "TRACE" +) + +// Values returns all known values for LogLevel. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (LogLevel) Values() []LogLevel { + return []LogLevel{ + "OFF", + "ERROR", + "INFO", + "TRACE", + } +} + type MSKStartPosition string // Enum values for MSKStartPosition @@ -190,17 +228,21 @@ type PipeState string // Enum values for PipeState const ( - PipeStateRunning PipeState = "RUNNING" - PipeStateStopped PipeState = "STOPPED" - PipeStateCreating PipeState = "CREATING" - PipeStateUpdating PipeState = "UPDATING" - PipeStateDeleting PipeState = "DELETING" - PipeStateStarting PipeState = "STARTING" - PipeStateStopping PipeState = "STOPPING" - PipeStateCreateFailed PipeState = "CREATE_FAILED" - PipeStateUpdateFailed PipeState = "UPDATE_FAILED" - PipeStateStartFailed PipeState = "START_FAILED" - PipeStateStopFailed PipeState = "STOP_FAILED" + PipeStateRunning PipeState = "RUNNING" + PipeStateStopped PipeState = "STOPPED" + PipeStateCreating PipeState = "CREATING" + PipeStateUpdating PipeState = "UPDATING" + PipeStateDeleting PipeState = "DELETING" + PipeStateStarting PipeState = "STARTING" + PipeStateStopping PipeState = "STOPPING" + PipeStateCreateFailed PipeState = "CREATE_FAILED" + PipeStateUpdateFailed PipeState = "UPDATE_FAILED" + PipeStateStartFailed PipeState = "START_FAILED" + PipeStateStopFailed PipeState = "STOP_FAILED" + PipeStateDeleteFailed PipeState = "DELETE_FAILED" + PipeStateCreateRollbackFailed PipeState = "CREATE_ROLLBACK_FAILED" + PipeStateDeleteRollbackFailed PipeState = "DELETE_ROLLBACK_FAILED" + PipeStateUpdateRollbackFailed PipeState = "UPDATE_ROLLBACK_FAILED" ) // Values returns all known values for PipeState. Note that this can be expanded @@ -219,6 +261,10 @@ func (PipeState) Values() []PipeState { "UPDATE_FAILED", "START_FAILED", "STOP_FAILED", + "DELETE_FAILED", + "CREATE_ROLLBACK_FAILED", + "DELETE_ROLLBACK_FAILED", + "UPDATE_ROLLBACK_FAILED", } } @@ -333,6 +379,26 @@ func (RequestedPipeStateDescribeResponse) Values() []RequestedPipeStateDescribeR } } +type S3OutputFormat string + +// Enum values for S3OutputFormat +const ( + S3OutputFormatJson S3OutputFormat = "json" + S3OutputFormatPlain S3OutputFormat = "plain" + S3OutputFormatW3c S3OutputFormat = "w3c" +) + +// Values returns all known values for S3OutputFormat. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (S3OutputFormat) Values() []S3OutputFormat { + return []S3OutputFormat{ + "json", + "plain", + "w3c", + } +} + type SelfManagedKafkaStartPosition string // Enum values for SelfManagedKafkaStartPosition diff --git a/service/pipes/types/types.go b/service/pipes/types/types.go index ef4628470ed..ea5a7674fca 100644 --- a/service/pipes/types/types.go +++ b/service/pipes/types/types.go @@ -209,12 +209,35 @@ type CapacityProviderStrategyItem struct { noSmithyDocumentSerde } +// The Amazon CloudWatch Logs logging configuration settings for the pipe. +type CloudwatchLogsLogDestination struct { + + // The Amazon Web Services Resource Name (ARN) for the CloudWatch log group to + // which EventBridge sends the log records. + LogGroupArn *string + + noSmithyDocumentSerde +} + +// The Amazon CloudWatch Logs logging configuration settings for the pipe. +type CloudwatchLogsLogDestinationParameters struct { + + // The Amazon Web Services Resource Name (ARN) for the CloudWatch log group to + // which EventBridge sends the log records. + // + // This member is required. + LogGroupArn *string + + noSmithyDocumentSerde +} + // A DeadLetterConfig object that contains information about a dead-letter queue // configuration. type DeadLetterConfig struct { - // The ARN of the Amazon SQS queue specified as the target for the dead-letter - // queue. + // The ARN of the specified target for the dead-letter queue. For Amazon Kinesis + // stream and Amazon DynamoDB stream sources, specify either an Amazon SNS topic or + // Amazon SQS queue ARN. Arn *string noSmithyDocumentSerde @@ -421,8 +444,9 @@ type Filter struct { noSmithyDocumentSerde } -// The collection of event patterns used to filter events. For more information, -// see Events and Event Patterns (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html) +// The collection of event patterns used to filter events. To remove a filter, +// specify a FilterCriteria object with an empty array of Filter objects. For more +// information, see Events and Event Patterns (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html) // in the Amazon EventBridge User Guide. type FilterCriteria struct { @@ -432,6 +456,28 @@ type FilterCriteria struct { noSmithyDocumentSerde } +// The Amazon Kinesis Data Firehose logging configuration settings for the pipe. +type FirehoseLogDestination struct { + + // The Amazon Resource Name (ARN) of the Kinesis Data Firehose delivery stream to + // which EventBridge delivers the pipe log records. + DeliveryStreamArn *string + + noSmithyDocumentSerde +} + +// The Amazon Kinesis Data Firehose logging configuration settings for the pipe. +type FirehoseLogDestinationParameters struct { + + // Specifies the Amazon Resource Name (ARN) of the Kinesis Data Firehose delivery + // stream to which EventBridge delivers the pipe log records. + // + // This member is required. + DeliveryStreamArn *string + + noSmithyDocumentSerde +} + // The Secrets Manager secret that stores your broker credentials. // // The following types satisfy this interface: @@ -563,12 +609,81 @@ type PipeEnrichmentParameters struct { // Valid JSON text passed to the enrichment. In this case, nothing from the event // itself is passed to the enrichment. For more information, see The JavaScript // Object Notation (JSON) Data Interchange Format (http://www.rfc-editor.org/rfc/rfc7159.txt) - // . + // . To remove an input template, specify an empty string. InputTemplate *string noSmithyDocumentSerde } +// The logging configuration settings for the pipe. +type PipeLogConfiguration struct { + + // The Amazon CloudWatch Logs logging configuration settings for the pipe. + CloudwatchLogsLogDestination *CloudwatchLogsLogDestination + + // The Amazon Kinesis Data Firehose logging configuration settings for the pipe. + FirehoseLogDestination *FirehoseLogDestination + + // Whether the execution data (specifically, the payload , awsRequest , and + // awsResponse fields) is included in the log messages for this pipe. This applies + // to all log destinations for the pipe. For more information, see Including + // execution data in logs (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-logs.html#eb-pipes-logs-execution-data) + // in the Amazon EventBridge User Guide. + IncludeExecutionData []IncludeExecutionDataOption + + // The level of logging detail to include. This applies to all log destinations + // for the pipe. + Level LogLevel + + // The Amazon S3 logging configuration settings for the pipe. + S3LogDestination *S3LogDestination + + noSmithyDocumentSerde +} + +// Specifies the logging configuration settings for the pipe. When you call +// UpdatePipe , EventBridge updates the fields in the +// PipeLogConfigurationParameters object atomically as one and overrides existing +// values. This is by design. If you don't specify an optional field in any of the +// Amazon Web Services service parameters objects ( +// CloudwatchLogsLogDestinationParameters , FirehoseLogDestinationParameters , or +// S3LogDestinationParameters ), EventBridge sets that field to its system-default +// value during the update. For example, suppose when you created the pipe you +// specified a Kinesis Data Firehose stream log destination. You then update the +// pipe to add an Amazon S3 log destination. In addition to specifying the +// S3LogDestinationParameters for the new log destination, you must also specify +// the fields in the FirehoseLogDestinationParameters object in order to retain +// the Kinesis Data Firehose stream log destination. For more information on +// generating pipe log records, see Log EventBridge Pipes in the Amazon +// EventBridge User Guide. +type PipeLogConfigurationParameters struct { + + // The level of logging detail to include. This applies to all log destinations + // for the pipe. For more information, see Specifying EventBridge Pipes log level (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-logs.html#eb-pipes-logs-level) + // in the Amazon EventBridge User Guide. + // + // This member is required. + Level LogLevel + + // The Amazon CloudWatch Logs logging configuration settings for the pipe. + CloudwatchLogsLogDestination *CloudwatchLogsLogDestinationParameters + + // The Amazon Kinesis Data Firehose logging configuration settings for the pipe. + FirehoseLogDestination *FirehoseLogDestinationParameters + + // Specify ON to include the execution data (specifically, the payload and + // awsRequest fields) in the log messages for this pipe. This applies to all log + // destinations for the pipe. For more information, see Including execution data + // in logs (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-logs.html#eb-pipes-logs-execution-data) + // in the Amazon EventBridge User Guide. The default is OFF . + IncludeExecutionData []IncludeExecutionDataOption + + // The Amazon S3 logging configuration settings for the pipe. + S3LogDestination *S3LogDestinationParameters + + noSmithyDocumentSerde +} + // The parameters for using an Active MQ broker as a source. type PipeSourceActiveMQBrokerParameters struct { @@ -710,8 +825,9 @@ type PipeSourceParameters struct { // The parameters for using a DynamoDB stream as a source. DynamoDBStreamParameters *PipeSourceDynamoDBStreamParameters - // The collection of event patterns used to filter events. For more information, - // see Events and Event Patterns (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html) + // The collection of event patterns used to filter events. To remove a filter, + // specify a FilterCriteria object with an empty array of Filter objects. For more + // information, see Events and Event Patterns (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html) // in the Amazon EventBridge User Guide. FilterCriteria *FilterCriteria @@ -958,7 +1074,7 @@ type PipeTargetEventBridgeEventBusParameters struct { // The URL subdomain of the endpoint. For example, if the URL for Endpoint is // https://abcde.veo.endpoints.event.amazonaws.com, then the EndpointId is - // abcde.veo . When using Java, you must include auth-crt on the class path. + // abcde.veo . EndpointId *string // Amazon Web Services resources, identified by Amazon Resource Name (ARN), which @@ -995,7 +1111,7 @@ type PipeTargetHttpParameters struct { noSmithyDocumentSerde } -// The parameters for using a Kinesis stream as a source. +// The parameters for using a Kinesis stream as a target. type PipeTargetKinesisStreamParameters struct { // Determines which shard in the stream the data record is assigned to. Partition @@ -1016,21 +1132,24 @@ type PipeTargetKinesisStreamParameters struct { // The parameters for using a Lambda function as a target. type PipeTargetLambdaFunctionParameters struct { - // Choose from the following options. - // - RequestResponse (default) - Invoke the function synchronously. Keep the - // connection open until the function returns a response or times out. The API - // response includes the function response and additional data. - // - Event - Invoke the function asynchronously. Send events that fail multiple - // times to the function's dead-letter queue (if it's configured). The API response - // only includes a status code. - // - DryRun - Validate parameter values and verify that the user or role has - // permission to invoke the function. + // Specify whether to invoke the function synchronously or asynchronously. + // - REQUEST_RESPONSE (default) - Invoke synchronously. This corresponds to the + // RequestResponse option in the InvocationType parameter for the Lambda Invoke (https://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html#API_Invoke_RequestSyntax) + // API. + // - FIRE_AND_FORGET - Invoke asynchronously. This corresponds to the Event + // option in the InvocationType parameter for the Lambda Invoke (https://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html#API_Invoke_RequestSyntax) + // API. + // For more information, see Invocation types (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes.html#pipes-invocation) + // in the Amazon EventBridge User Guide. InvocationType PipeTargetInvocationType noSmithyDocumentSerde } -// The parameters required to set up a target for your pipe. +// The parameters required to set up a target for your pipe. For more information +// about pipe target parameters, including how to use dynamic path parameters, see +// Target parameters (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes-event-target.html) +// in the Amazon EventBridge User Guide. type PipeTargetParameters struct { // The parameters for using an Batch job as a target. @@ -1052,23 +1171,23 @@ type PipeTargetParameters struct { // Valid JSON text passed to the target. In this case, nothing from the event // itself is passed to the target. For more information, see The JavaScript Object // Notation (JSON) Data Interchange Format (http://www.rfc-editor.org/rfc/rfc7159.txt) - // . + // . To remove an input template, specify an empty string. InputTemplate *string - // The parameters for using a Kinesis stream as a source. + // The parameters for using a Kinesis stream as a target. KinesisStreamParameters *PipeTargetKinesisStreamParameters // The parameters for using a Lambda function as a target. LambdaFunctionParameters *PipeTargetLambdaFunctionParameters // These are custom parameters to be used when the target is a Amazon Redshift - // cluster to invoke the Amazon Redshift Data API ExecuteStatement. + // cluster to invoke the Amazon Redshift Data API BatchExecuteStatement. RedshiftDataParameters *PipeTargetRedshiftDataParameters // The parameters for using a SageMaker pipeline as a target. SageMakerPipelineParameters *PipeTargetSageMakerPipelineParameters - // The parameters for using a Amazon SQS stream as a source. + // The parameters for using a Amazon SQS stream as a target. SqsQueueParameters *PipeTargetSqsQueueParameters // The parameters for using a Step Functions state machine as a target. @@ -1078,7 +1197,7 @@ type PipeTargetParameters struct { } // These are custom parameters to be used when the target is a Amazon Redshift -// cluster to invoke the Amazon Redshift Data API ExecuteStatement. +// cluster to invoke the Amazon Redshift Data API BatchExecuteStatement. type PipeTargetRedshiftDataParameters struct { // The name of the database. Required when authenticating using temporary @@ -1097,7 +1216,7 @@ type PipeTargetRedshiftDataParameters struct { DbUser *string // The name or ARN of the secret that enables access to the database. Required - // when authenticating using SageMaker. + // when authenticating using Secrets Manager. SecretManagerArn *string // The name of the SQL statement. You can name the SQL statement when you create @@ -1121,7 +1240,7 @@ type PipeTargetSageMakerPipelineParameters struct { noSmithyDocumentSerde } -// The parameters for using a Amazon SQS stream as a source. +// The parameters for using a Amazon SQS stream as a target. type PipeTargetSqsQueueParameters struct { // This parameter applies only to FIFO (first-in-first-out) queues. The token used @@ -1137,7 +1256,17 @@ type PipeTargetSqsQueueParameters struct { // The parameters for using a Step Functions state machine as a target. type PipeTargetStateMachineParameters struct { - // Specify whether to wait for the state machine to finish or not. + // Specify whether to invoke the Step Functions state machine synchronously or + // asynchronously. + // - REQUEST_RESPONSE (default) - Invoke synchronously. For more information, see + // StartSyncExecution (https://docs.aws.amazon.com/step-functions/latest/apireference/API_StartSyncExecution.html) + // in the Step Functions API Reference. REQUEST_RESPONSE is not supported for + // STANDARD state machine workflows. + // - FIRE_AND_FORGET - Invoke asynchronously. For more information, see + // StartExecution (https://docs.aws.amazon.com/step-functions/latest/apireference/API_StartExecution.html) + // in the Step Functions API Reference. + // For more information, see Invocation types (https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-pipes.html#pipes-invocation) + // in the Amazon EventBridge User Guide. InvocationType PipeTargetInvocationType noSmithyDocumentSerde @@ -1187,6 +1316,63 @@ type PlacementStrategy struct { noSmithyDocumentSerde } +// The Amazon S3 logging configuration settings for the pipe. +type S3LogDestination struct { + + // The name of the Amazon S3 bucket to which EventBridge delivers the log records + // for the pipe. + BucketName *string + + // The Amazon Web Services account that owns the Amazon S3 bucket to which + // EventBridge delivers the log records for the pipe. + BucketOwner *string + + // The format EventBridge uses for the log records. + // - json : JSON + // - plain : Plain text + // - w3c : W3C extended logging file format (https://www.w3.org/TR/WD-logfile) + OutputFormat S3OutputFormat + + // The prefix text with which to begin Amazon S3 log object names. For more + // information, see Organizing objects using prefixes (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-prefixes.html) + // in the Amazon Simple Storage Service User Guide. + Prefix *string + + noSmithyDocumentSerde +} + +// The Amazon S3 logging configuration settings for the pipe. +type S3LogDestinationParameters struct { + + // Specifies the name of the Amazon S3 bucket to which EventBridge delivers the + // log records for the pipe. + // + // This member is required. + BucketName *string + + // Specifies the Amazon Web Services account that owns the Amazon S3 bucket to + // which EventBridge delivers the log records for the pipe. + // + // This member is required. + BucketOwner *string + + // How EventBridge should format the log records. + // - json : JSON + // - plain : Plain text + // - w3c : W3C extended logging file format (https://www.w3.org/TR/WD-logfile) + OutputFormat S3OutputFormat + + // Specifies any prefix text with which to begin Amazon S3 log object names. You + // can use prefixes to organize the data that you store in Amazon S3 buckets. A + // prefix is a string of characters at the beginning of the object key name. A + // prefix can be any length, subject to the maximum length of the object key name + // (1,024 bytes). For more information, see Organizing objects using prefixes (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-prefixes.html) + // in the Amazon Simple Storage Service User Guide. + Prefix *string + + noSmithyDocumentSerde +} + // Name/Value pair of a parameter to start execution of a SageMaker Model Building // Pipeline. type SageMakerPipelineParameter struct { @@ -1402,8 +1588,9 @@ type UpdatePipeSourceParameters struct { // The parameters for using a DynamoDB stream as a source. DynamoDBStreamParameters *UpdatePipeSourceDynamoDBStreamParameters - // The collection of event patterns used to filter events. For more information, - // see Events and Event Patterns (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html) + // The collection of event patterns used to filter events. To remove a filter, + // specify a FilterCriteria object with an empty array of Filter objects. For more + // information, see Events and Event Patterns (https://docs.aws.amazon.com/eventbridge/latest/userguide/eventbridge-and-event-patterns.html) // in the Amazon EventBridge User Guide. FilterCriteria *FilterCriteria diff --git a/service/pipes/validators.go b/service/pipes/validators.go index 3fb56ca06b1..ac226019354 100644 --- a/service/pipes/validators.go +++ b/service/pipes/validators.go @@ -325,6 +325,21 @@ func validateCapacityProviderStrategyItem(v *types.CapacityProviderStrategyItem) } } +func validateCloudwatchLogsLogDestinationParameters(v *types.CloudwatchLogsLogDestinationParameters) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CloudwatchLogsLogDestinationParameters"} + if v.LogGroupArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateEcsContainerOverride(v *types.EcsContainerOverride) error { if v == nil { return nil @@ -468,6 +483,21 @@ func validateEcsTaskOverride(v *types.EcsTaskOverride) error { } } +func validateFirehoseLogDestinationParameters(v *types.FirehoseLogDestinationParameters) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FirehoseLogDestinationParameters"} + if v.DeliveryStreamArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("DeliveryStreamArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateNetworkConfiguration(v *types.NetworkConfiguration) error { if v == nil { return nil @@ -485,6 +515,36 @@ func validateNetworkConfiguration(v *types.NetworkConfiguration) error { } } +func validatePipeLogConfigurationParameters(v *types.PipeLogConfigurationParameters) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PipeLogConfigurationParameters"} + if v.S3LogDestination != nil { + if err := validateS3LogDestinationParameters(v.S3LogDestination); err != nil { + invalidParams.AddNested("S3LogDestination", err.(smithy.InvalidParamsError)) + } + } + if v.FirehoseLogDestination != nil { + if err := validateFirehoseLogDestinationParameters(v.FirehoseLogDestination); err != nil { + invalidParams.AddNested("FirehoseLogDestination", err.(smithy.InvalidParamsError)) + } + } + if v.CloudwatchLogsLogDestination != nil { + if err := validateCloudwatchLogsLogDestinationParameters(v.CloudwatchLogsLogDestination); err != nil { + invalidParams.AddNested("CloudwatchLogsLogDestination", err.(smithy.InvalidParamsError)) + } + } + if len(v.Level) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Level")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validatePipeSourceActiveMQBrokerParameters(v *types.PipeSourceActiveMQBrokerParameters) error { if v == nil { return nil @@ -768,6 +828,24 @@ func validatePipeTargetSageMakerPipelineParameters(v *types.PipeTargetSageMakerP } } +func validateS3LogDestinationParameters(v *types.S3LogDestinationParameters) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "S3LogDestinationParameters"} + if v.BucketName == nil { + invalidParams.Add(smithy.NewErrParamRequired("BucketName")) + } + if v.BucketOwner == nil { + invalidParams.Add(smithy.NewErrParamRequired("BucketOwner")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateSageMakerPipelineParameter(v *types.SageMakerPipelineParameter) error { if v == nil { return nil @@ -917,6 +995,11 @@ func validateOpCreatePipeInput(v *CreatePipeInput) error { if v.RoleArn == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) } + if v.LogConfiguration != nil { + if err := validatePipeLogConfigurationParameters(v.LogConfiguration); err != nil { + invalidParams.AddNested("LogConfiguration", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1056,6 +1139,11 @@ func validateOpUpdatePipeInput(v *UpdatePipeInput) error { if v.RoleArn == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) } + if v.LogConfiguration != nil { + if err := validatePipeLogConfigurationParameters(v.LogConfiguration); err != nil { + invalidParams.AddNested("LogConfiguration", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/resourceexplorer2/api_op_CreateIndex.go b/service/resourceexplorer2/api_op_CreateIndex.go index bed5c0fdd0c..b08dd412557 100644 --- a/service/resourceexplorer2/api_op_CreateIndex.go +++ b/service/resourceexplorer2/api_op_CreateIndex.go @@ -70,7 +70,7 @@ type CreateIndexInput struct { // This value helps ensure idempotency. Resource Explorer uses this value to // prevent the accidental creation of duplicate versions. We recommend that you // generate a UUID-type value (https://wikipedia.org/wiki/Universally_unique_identifier) - // to ensure the uniqueness of your views. + // to ensure the uniqueness of your index. ClientToken *string // The specified tags are attached only to the index created in this Amazon Web diff --git a/service/resourceexplorer2/api_op_CreateView.go b/service/resourceexplorer2/api_op_CreateView.go index ebdcc9e19c9..eec1dd4aa14 100644 --- a/service/resourceexplorer2/api_op_CreateView.go +++ b/service/resourceexplorer2/api_op_CreateView.go @@ -74,6 +74,10 @@ type CreateViewInput struct { // is an empty list, with no optional fields included in the results. IncludedProperties []types.IncludedProperty + // The root ARN of the account, an organizational unit (OU), or an organization + // ARN. If left empty, the default is account. + Scope *string + // Tag key and value pairs that are attached to the view. Tags map[string]string diff --git a/service/resourceexplorer2/api_op_GetAccountLevelServiceConfiguration.go b/service/resourceexplorer2/api_op_GetAccountLevelServiceConfiguration.go new file mode 100644 index 00000000000..b0edc2c2b00 --- /dev/null +++ b/service/resourceexplorer2/api_op_GetAccountLevelServiceConfiguration.go @@ -0,0 +1,255 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package resourceexplorer2 + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/resourceexplorer2/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the status of your account's Amazon Web Services service access, and +// validates the service linked role required to access the multi-account search +// feature. Only the management account or a delegated administrator with service +// access enabled can invoke this API call. +func (c *Client) GetAccountLevelServiceConfiguration(ctx context.Context, params *GetAccountLevelServiceConfigurationInput, optFns ...func(*Options)) (*GetAccountLevelServiceConfigurationOutput, error) { + if params == nil { + params = &GetAccountLevelServiceConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetAccountLevelServiceConfiguration", params, optFns, c.addOperationGetAccountLevelServiceConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetAccountLevelServiceConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetAccountLevelServiceConfigurationInput struct { + noSmithyDocumentSerde +} + +type GetAccountLevelServiceConfigurationOutput struct { + + // Details about the organization, and whether configuration is ENABLED or DISABLED + // . + OrgConfiguration *types.OrgConfiguration + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetAccountLevelServiceConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetAccountLevelServiceConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetAccountLevelServiceConfiguration{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addGetAccountLevelServiceConfigurationResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountLevelServiceConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetAccountLevelServiceConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "resource-explorer-2", + OperationName: "GetAccountLevelServiceConfiguration", + } +} + +type opGetAccountLevelServiceConfigurationResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opGetAccountLevelServiceConfigurationResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opGetAccountLevelServiceConfigurationResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "resource-explorer-2" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "resource-explorer-2" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("resource-explorer-2") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addGetAccountLevelServiceConfigurationResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opGetAccountLevelServiceConfigurationResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/resourceexplorer2/api_op_ListIndexes.go b/service/resourceexplorer2/api_op_ListIndexes.go index 413fd953109..60de03c50b7 100644 --- a/service/resourceexplorer2/api_op_ListIndexes.go +++ b/service/resourceexplorer2/api_op_ListIndexes.go @@ -50,7 +50,8 @@ type ListIndexesInput struct { // The parameter for receiving additional results if you receive a NextToken // response in a previous request. A NextToken response indicates that more output // is available. Set this parameter to the value of the previous call's NextToken - // response to indicate where the output should continue from. + // response to indicate where the output should continue from. The pagination + // tokens expire after 24 hours. NextToken *string // If specified, limits the response to only information about the index in the @@ -73,7 +74,8 @@ type ListIndexesOutput struct { // If present, indicates that more output is available than is included in the // current response. Use this value in the NextToken request parameter in a // subsequent call to the operation to get the next part of the output. You should - // repeat this until the NextToken response element comes back as null . + // repeat this until the NextToken response element comes back as null . The + // pagination tokens expire after 24 hours. NextToken *string // Metadata pertaining to the operation's result. diff --git a/service/resourceexplorer2/api_op_ListIndexesForMembers.go b/service/resourceexplorer2/api_op_ListIndexesForMembers.go new file mode 100644 index 00000000000..bb9390b2a65 --- /dev/null +++ b/service/resourceexplorer2/api_op_ListIndexesForMembers.go @@ -0,0 +1,387 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package resourceexplorer2 + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/resourceexplorer2/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves a list of a member's indexes in all Amazon Web Services Regions that +// are currently collecting resource information for Amazon Web Services Resource +// Explorer. Only the management account or a delegated administrator with service +// access enabled can invoke this API call. +func (c *Client) ListIndexesForMembers(ctx context.Context, params *ListIndexesForMembersInput, optFns ...func(*Options)) (*ListIndexesForMembersOutput, error) { + if params == nil { + params = &ListIndexesForMembersInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListIndexesForMembers", params, optFns, c.addOperationListIndexesForMembersMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListIndexesForMembersOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListIndexesForMembersInput struct { + + // The account IDs will limit the output to only indexes from these accounts. + // + // This member is required. + AccountIdList []string + + // The maximum number of results that you want included on each page of the + // response. If you do not include this parameter, it defaults to a value + // appropriate to the operation. If additional items exist beyond those included in + // the current response, the NextToken response element is present and has a value + // (is not null). Include that value as the NextToken request parameter in the + // next call to the operation to get the next part of the results. An API operation + // can return fewer results than the maximum even when there are more results + // available. You should check NextToken after every operation to ensure that you + // receive all of the results. + MaxResults *int32 + + // The parameter for receiving additional results if you receive a NextToken + // response in a previous request. A NextToken response indicates that more output + // is available. Set this parameter to the value of the previous call's NextToken + // response to indicate where the output should continue from. The pagination + // tokens expire after 24 hours. + NextToken *string + + noSmithyDocumentSerde +} + +type ListIndexesForMembersOutput struct { + + // A structure that contains the details and status of each index. + Indexes []types.MemberIndex + + // If present, indicates that more output is available than is included in the + // current response. Use this value in the NextToken request parameter in a + // subsequent call to the operation to get the next part of the output. You should + // repeat this until the NextToken response element comes back as null . The + // pagination tokens expire after 24 hours. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListIndexesForMembersMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListIndexesForMembers{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListIndexesForMembers{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addListIndexesForMembersResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpListIndexesForMembersValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListIndexesForMembers(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListIndexesForMembersAPIClient is a client that implements the +// ListIndexesForMembers operation. +type ListIndexesForMembersAPIClient interface { + ListIndexesForMembers(context.Context, *ListIndexesForMembersInput, ...func(*Options)) (*ListIndexesForMembersOutput, error) +} + +var _ ListIndexesForMembersAPIClient = (*Client)(nil) + +// ListIndexesForMembersPaginatorOptions is the paginator options for +// ListIndexesForMembers +type ListIndexesForMembersPaginatorOptions struct { + // The maximum number of results that you want included on each page of the + // response. If you do not include this parameter, it defaults to a value + // appropriate to the operation. If additional items exist beyond those included in + // the current response, the NextToken response element is present and has a value + // (is not null). Include that value as the NextToken request parameter in the + // next call to the operation to get the next part of the results. An API operation + // can return fewer results than the maximum even when there are more results + // available. You should check NextToken after every operation to ensure that you + // receive all of the results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListIndexesForMembersPaginator is a paginator for ListIndexesForMembers +type ListIndexesForMembersPaginator struct { + options ListIndexesForMembersPaginatorOptions + client ListIndexesForMembersAPIClient + params *ListIndexesForMembersInput + nextToken *string + firstPage bool +} + +// NewListIndexesForMembersPaginator returns a new ListIndexesForMembersPaginator +func NewListIndexesForMembersPaginator(client ListIndexesForMembersAPIClient, params *ListIndexesForMembersInput, optFns ...func(*ListIndexesForMembersPaginatorOptions)) *ListIndexesForMembersPaginator { + if params == nil { + params = &ListIndexesForMembersInput{} + } + + options := ListIndexesForMembersPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListIndexesForMembersPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListIndexesForMembersPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListIndexesForMembers page. +func (p *ListIndexesForMembersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListIndexesForMembersOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListIndexesForMembers(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListIndexesForMembers(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "resource-explorer-2", + OperationName: "ListIndexesForMembers", + } +} + +type opListIndexesForMembersResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opListIndexesForMembersResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opListIndexesForMembersResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "resource-explorer-2" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "resource-explorer-2" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("resource-explorer-2") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addListIndexesForMembersResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opListIndexesForMembersResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/resourceexplorer2/api_op_ListSupportedResourceTypes.go b/service/resourceexplorer2/api_op_ListSupportedResourceTypes.go index c3dc44470d4..18f6acfcba4 100644 --- a/service/resourceexplorer2/api_op_ListSupportedResourceTypes.go +++ b/service/resourceexplorer2/api_op_ListSupportedResourceTypes.go @@ -49,7 +49,8 @@ type ListSupportedResourceTypesInput struct { // The parameter for receiving additional results if you receive a NextToken // response in a previous request. A NextToken response indicates that more output // is available. Set this parameter to the value of the previous call's NextToken - // response to indicate where the output should continue from. + // response to indicate where the output should continue from. The pagination + // tokens expire after 24 hours. NextToken *string noSmithyDocumentSerde @@ -60,7 +61,8 @@ type ListSupportedResourceTypesOutput struct { // If present, indicates that more output is available than is included in the // current response. Use this value in the NextToken request parameter in a // subsequent call to the operation to get the next part of the output. You should - // repeat this until the NextToken response element comes back as null . + // repeat this until the NextToken response element comes back as null . The + // pagination tokens expire after 24 hours. NextToken *string // The list of resource types supported by Resource Explorer. diff --git a/service/resourceexplorer2/api_op_ListViews.go b/service/resourceexplorer2/api_op_ListViews.go index 18c97a98b41..79943154f86 100644 --- a/service/resourceexplorer2/api_op_ListViews.go +++ b/service/resourceexplorer2/api_op_ListViews.go @@ -52,7 +52,8 @@ type ListViewsInput struct { // The parameter for receiving additional results if you receive a NextToken // response in a previous request. A NextToken response indicates that more output // is available. Set this parameter to the value of the previous call's NextToken - // response to indicate where the output should continue from. + // response to indicate where the output should continue from. The pagination + // tokens expire after 24 hours. NextToken *string noSmithyDocumentSerde @@ -63,7 +64,8 @@ type ListViewsOutput struct { // If present, indicates that more output is available than is included in the // current response. Use this value in the NextToken request parameter in a // subsequent call to the operation to get the next part of the output. You should - // repeat this until the NextToken response element comes back as null . + // repeat this until the NextToken response element comes back as null . The + // pagination tokens expire after 24 hours. NextToken *string // The list of views available in the Amazon Web Services Region in which you diff --git a/service/resourceexplorer2/api_op_Search.go b/service/resourceexplorer2/api_op_Search.go index 26cf9fae9df..9f39042b415 100644 --- a/service/resourceexplorer2/api_op_Search.go +++ b/service/resourceexplorer2/api_op_Search.go @@ -70,7 +70,8 @@ type SearchInput struct { // The parameter for receiving additional results if you receive a NextToken // response in a previous request. A NextToken response indicates that more output // is available. Set this parameter to the value of the previous call's NextToken - // response to indicate where the output should continue from. + // response to indicate where the output should continue from. The pagination + // tokens expire after 24 hours. NextToken *string // Specifies the Amazon resource name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) @@ -92,7 +93,8 @@ type SearchOutput struct { // If present, indicates that more output is available than is included in the // current response. Use this value in the NextToken request parameter in a // subsequent call to the operation to get the next part of the output. You should - // repeat this until the NextToken response element comes back as null . + // repeat this until the NextToken response element comes back as null . The + // pagination tokens expire after 24 hours. NextToken *string // The list of structures that describe the resources that match the query. diff --git a/service/resourceexplorer2/deserializers.go b/service/resourceexplorer2/deserializers.go index cefdb9aedd7..cb385564d90 100644 --- a/service/resourceexplorer2/deserializers.go +++ b/service/resourceexplorer2/deserializers.go @@ -1132,6 +1132,9 @@ func awsRestjson1_deserializeOpErrorDisassociateDefaultView(response *smithyhttp case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -1148,6 +1151,162 @@ func awsRestjson1_deserializeOpErrorDisassociateDefaultView(response *smithyhttp } } +type awsRestjson1_deserializeOpGetAccountLevelServiceConfiguration struct { +} + +func (*awsRestjson1_deserializeOpGetAccountLevelServiceConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetAccountLevelServiceConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetAccountLevelServiceConfiguration(response, &metadata) + } + output := &GetAccountLevelServiceConfigurationOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, 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 out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetAccountLevelServiceConfigurationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetAccountLevelServiceConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + 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) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetAccountLevelServiceConfigurationOutput(v **GetAccountLevelServiceConfigurationOutput, 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 *GetAccountLevelServiceConfigurationOutput + if *v == nil { + sv = &GetAccountLevelServiceConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OrgConfiguration": + if err := awsRestjson1_deserializeDocumentOrgConfiguration(&sv.OrgConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpGetDefaultView struct { } @@ -1865,6 +2024,171 @@ func awsRestjson1_deserializeOpDocumentListIndexesOutput(v **ListIndexesOutput, return nil } +type awsRestjson1_deserializeOpListIndexesForMembers struct { +} + +func (*awsRestjson1_deserializeOpListIndexesForMembers) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListIndexesForMembers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListIndexesForMembers(response, &metadata) + } + output := &ListIndexesForMembersOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, 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 out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListIndexesForMembersOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListIndexesForMembers(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + 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) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListIndexesForMembersOutput(v **ListIndexesForMembersOutput, 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 *ListIndexesForMembersOutput + if *v == nil { + sv = &ListIndexesForMembersOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Indexes": + if err := awsRestjson1_deserializeDocumentMemberIndexList(&sv.Indexes, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpListSupportedResourceTypes struct { } @@ -3757,6 +4081,156 @@ func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalS return nil } +func awsRestjson1_deserializeDocumentMemberIndex(v **types.MemberIndex, 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.MemberIndex + if *v == nil { + sv = &types.MemberIndex{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "Region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Region = ptr.String(jtv) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IndexType to be of type string, got %T instead", value) + } + sv.Type = types.IndexType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMemberIndexList(v *[]types.MemberIndex, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.MemberIndex + if *v == nil { + cv = []types.MemberIndex{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MemberIndex + destAddr := &col + if err := awsRestjson1_deserializeDocumentMemberIndex(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentOrgConfiguration(v **types.OrgConfiguration, 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.OrgConfiguration + if *v == nil { + sv = &types.OrgConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AWSServiceAccessStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AWSServiceAccessStatus to be of type string, got %T instead", value) + } + sv.AWSServiceAccessStatus = types.AWSServiceAccessStatus(jtv) + } + + case "ServiceLinkedRole": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ServiceLinkedRole = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentRegionList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/resourceexplorer2/endpoints.go b/service/resourceexplorer2/endpoints.go index e5b0e642688..ba9b715d773 100644 --- a/service/resourceexplorer2/endpoints.go +++ b/service/resourceexplorer2/endpoints.go @@ -375,7 +375,7 @@ func (r *resolver) ResolveEndpoint( _ = _PartitionResult if true == _PartitionResult.SupportsDualStack { if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { uriString := func() string { var out strings.Builder out.WriteString("https://resource-explorer-2-fips.") @@ -417,7 +417,7 @@ func (r *resolver) ResolveEndpoint( }, nil } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { uriString := func() string { var out strings.Builder out.WriteString("https://resource-explorer-2-fips.") diff --git a/service/resourceexplorer2/generated.json b/service/resourceexplorer2/generated.json index a894f120975..21ffb95e269 100644 --- a/service/resourceexplorer2/generated.json +++ b/service/resourceexplorer2/generated.json @@ -16,10 +16,12 @@ "api_op_DeleteIndex.go", "api_op_DeleteView.go", "api_op_DisassociateDefaultView.go", + "api_op_GetAccountLevelServiceConfiguration.go", "api_op_GetDefaultView.go", "api_op_GetIndex.go", "api_op_GetView.go", "api_op_ListIndexes.go", + "api_op_ListIndexesForMembers.go", "api_op_ListSupportedResourceTypes.go", "api_op_ListTagsForResource.go", "api_op_ListViews.go", diff --git a/service/resourceexplorer2/serializers.go b/service/resourceexplorer2/serializers.go index 6b7e65943e1..a6474f7b304 100644 --- a/service/resourceexplorer2/serializers.go +++ b/service/resourceexplorer2/serializers.go @@ -334,6 +334,11 @@ func awsRestjson1_serializeOpDocumentCreateViewInput(v *CreateViewInput, value s } } + if v.Scope != nil { + ok := object.Key("Scope") + ok.String(*v.Scope) + } + if v.Tags != nil { ok := object.Key("Tags") if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { @@ -551,6 +556,58 @@ func awsRestjson1_serializeOpHttpBindingsDisassociateDefaultViewInput(v *Disasso return nil } +type awsRestjson1_serializeOpGetAccountLevelServiceConfiguration struct { +} + +func (*awsRestjson1_serializeOpGetAccountLevelServiceConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetAccountLevelServiceConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetAccountLevelServiceConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/GetAccountLevelServiceConfiguration") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetAccountLevelServiceConfigurationInput(v *GetAccountLevelServiceConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + type awsRestjson1_serializeOpGetDefaultView struct { } @@ -822,6 +879,93 @@ func awsRestjson1_serializeOpDocumentListIndexesInput(v *ListIndexesInput, value return nil } +type awsRestjson1_serializeOpListIndexesForMembers struct { +} + +func (*awsRestjson1_serializeOpListIndexesForMembers) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListIndexesForMembers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListIndexesForMembersInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/ListIndexesForMembers") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentListIndexesForMembersInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListIndexesForMembersInput(v *ListIndexesForMembersInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListIndexesForMembersInput(v *ListIndexesForMembersInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountIdList != nil { + ok := object.Key("AccountIdList") + if err := awsRestjson1_serializeDocumentAccountIdList(v.AccountIdList, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + type awsRestjson1_serializeOpListSupportedResourceTypes struct { } @@ -1467,6 +1611,17 @@ func awsRestjson1_serializeOpDocumentUpdateViewInput(v *UpdateViewInput, value s return nil } +func awsRestjson1_serializeDocumentAccountIdList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsRestjson1_serializeDocumentIncludedProperty(v *types.IncludedProperty, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/resourceexplorer2/types/enums.go b/service/resourceexplorer2/types/enums.go index c39dd5232ab..b1ffc552660 100644 --- a/service/resourceexplorer2/types/enums.go +++ b/service/resourceexplorer2/types/enums.go @@ -2,6 +2,24 @@ package types +type AWSServiceAccessStatus string + +// Enum values for AWSServiceAccessStatus +const ( + AWSServiceAccessStatusEnabled AWSServiceAccessStatus = "ENABLED" + AWSServiceAccessStatusDisabled AWSServiceAccessStatus = "DISABLED" +) + +// Values returns all known values for AWSServiceAccessStatus. Note that this can +// be expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (AWSServiceAccessStatus) Values() []AWSServiceAccessStatus { + return []AWSServiceAccessStatus{ + "ENABLED", + "DISABLED", + } +} + type IndexState string // Enum values for IndexState diff --git a/service/resourceexplorer2/types/errors.go b/service/resourceexplorer2/types/errors.go index 706bd8e77ed..385aca22c88 100644 --- a/service/resourceexplorer2/types/errors.go +++ b/service/resourceexplorer2/types/errors.go @@ -34,9 +34,14 @@ func (e *AccessDeniedException) ErrorCode() string { } func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The request failed because either you specified parameters that didn’t match -// the original request, or you attempted to create a view with a name that already -// exists in this Amazon Web Services Region. +// If you attempted to create a view, then the request failed because either you +// specified parameters that didn’t match the original request, or you attempted to +// create a view with a name that already exists in this Amazon Web Services +// Region. If you attempted to create an index, then the request failed because +// either you specified parameters that didn't match the original request, or an +// index already exists in the current Amazon Web Services Region. If you attempted +// to update an index type to AGGREGATOR , then the request failed because you +// already have an AGGREGATOR index in a different Amazon Web Services Region. type ConflictException struct { Message *string @@ -146,7 +151,7 @@ func (e *ServiceQuotaExceededException) ErrorCode() string { func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request failed because you exceeded a rate limit for this operation. For -// more information, see Quotas for Resource Explorer (https://docs.aws.amazon.com/arexug/mainline/quotas.html) +// more information, see Quotas for Resource Explorer (https://docs.aws.amazon.com/resource-explorer/latest/userguide/quotas.html) // . type ThrottlingException struct { Message *string diff --git a/service/resourceexplorer2/types/types.go b/service/resourceexplorer2/types/types.go index 5590ab5c1ae..61d5be67cea 100644 --- a/service/resourceexplorer2/types/types.go +++ b/service/resourceexplorer2/types/types.go @@ -73,6 +73,52 @@ type Index struct { noSmithyDocumentSerde } +// An index is the data store used by Amazon Web Services Resource Explorer to +// hold information about your Amazon Web Services resources that the service +// discovers. +type MemberIndex struct { + + // The account ID for the index. + AccountId *string + + // The Amazon resource name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // of the index. + Arn *string + + // The Amazon Web Services Region in which the index exists. + Region *string + + // The type of index. It can be one of the following values: + // - LOCAL – The index contains information about resources from only the same + // Amazon Web Services Region. + // - AGGREGATOR – Resource Explorer replicates copies of the indexed information + // about resources in all other Amazon Web Services Regions to the aggregator + // index. This lets search results in the Region with the aggregator index to + // include resources from all Regions in the account where Resource Explorer is + // turned on. + Type IndexType + + noSmithyDocumentSerde +} + +// This is a structure that contains the status of Amazon Web Services service +// access, and whether you have a valid service-linked role to enable multi-account +// search for your organization. +type OrgConfiguration struct { + + // This value displays whether your Amazon Web Services service access is ENABLED + // or DISABLED . + // + // This member is required. + AWSServiceAccessStatus AWSServiceAccessStatus + + // This value shows whether or not you have a valid a service-linked role required + // to start the multi-account search feature. + ServiceLinkedRole *string + + noSmithyDocumentSerde +} + // A resource in Amazon Web Services that Amazon Web Services Resource Explorer // has discovered, and for which it has stored information in the index of the // Amazon Web Services Region that contains the resource. diff --git a/service/resourceexplorer2/validators.go b/service/resourceexplorer2/validators.go index 1ceaa7b4bfd..1566fe0696b 100644 --- a/service/resourceexplorer2/validators.go +++ b/service/resourceexplorer2/validators.go @@ -110,6 +110,26 @@ func (m *validateOpGetView) HandleInitialize(ctx context.Context, in middleware. return next.HandleInitialize(ctx, in) } +type validateOpListIndexesForMembers struct { +} + +func (*validateOpListIndexesForMembers) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListIndexesForMembers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListIndexesForMembersInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListIndexesForMembersInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListTagsForResource struct { } @@ -250,6 +270,10 @@ func addOpGetViewValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetView{}, middleware.After) } +func addOpListIndexesForMembersValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListIndexesForMembers{}, middleware.After) +} + func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } @@ -406,6 +430,21 @@ func validateOpGetViewInput(v *GetViewInput) error { } } +func validateOpListIndexesForMembersInput(v *ListIndexesForMembersInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListIndexesForMembersInput"} + if v.AccountIdList == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountIdList")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { if v == nil { return nil diff --git a/service/sagemaker/api_op_CreateAutoMLJobV2.go b/service/sagemaker/api_op_CreateAutoMLJobV2.go index 2812846b40b..d3d223287ba 100644 --- a/service/sagemaker/api_op_CreateAutoMLJobV2.go +++ b/service/sagemaker/api_op_CreateAutoMLJobV2.go @@ -98,7 +98,7 @@ type CreateAutoMLJobV2Input struct { // target model to enhance a default objective metric, the cross-entropy loss. // After fine-tuning a language model, you can evaluate the quality of its // generated text using different metrics. For a list of the available metrics, see - // Metrics for fine-tuning LLMs in Autopilot (https://docs.aws.amazon.com/sagemaker/latest/dg/llms-finetuning-models.html) + // Metrics for fine-tuning LLMs in Autopilot (https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-llms-finetuning-metrics.html) // . AutoMLJobObjective *types.AutoMLJobObjective diff --git a/service/sagemaker/types/types.go b/service/sagemaker/types/types.go index 2bdf5fa4d22..7e6616b0d1a 100644 --- a/service/sagemaker/types/types.go +++ b/service/sagemaker/types/types.go @@ -1508,7 +1508,7 @@ type AutoMLJobObjective struct { // target model to enhance a default objective metric, the cross-entropy loss. // After fine-tuning a language model, you can evaluate the quality of its // generated text using different metrics. For a list of the available metrics, see - // Metrics for fine-tuning LLMs in Autopilot (https://docs.aws.amazon.com/sagemaker/latest/dg/llms-finetuning-models.html) + // Metrics for fine-tuning LLMs in Autopilot (https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-llms-finetuning-metrics.html) // . // // This member is required. @@ -7057,20 +7057,16 @@ type InferenceSpecification struct { Containers []ModelPackageContainerDefinition // The supported MIME types for the input data. - // - // This member is required. SupportedContentTypes []string - // The supported MIME types for the output data. - // - // This member is required. - SupportedResponseMIMETypes []string - // A list of the instance types that are used to generate inferences in real-time. // This parameter is required for unversioned models, and optional for versioned // models. SupportedRealtimeInferenceInstanceTypes []ProductionVariantInstanceType + // The supported MIME types for the output data. + SupportedResponseMIMETypes []string + // A list of the instance types on which a transformation job can be run or on // which an endpoint can be deployed. This parameter is required for unversioned // models, and optional for versioned models. @@ -13596,7 +13592,7 @@ type TextGenerationJobConfig struct { // The name of the base model to fine-tune. Autopilot supports fine-tuning a // variety of large language models. For information on the list of supported - // models, see Text generation models supporting fine-tuning in Autopilot (https://docs.aws.amazon.com/sagemaker/src/AWSIronmanApiDoc/build/server-root/sagemaker/latest/dg/llms-finetuning-models.html#llms-finetuning-supported-llms) + // models, see Text generation models supporting fine-tuning in Autopilot (https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-llms-finetuning-models.html#autopilot-llms-finetuning-supported-llms) // . If no BaseModelName is provided, the default model used is Falcon-7B-Instruct. BaseModelName *string diff --git a/service/sagemaker/validators.go b/service/sagemaker/validators.go index eb55e0772f8..3001bf05378 100644 --- a/service/sagemaker/validators.go +++ b/service/sagemaker/validators.go @@ -8396,12 +8396,6 @@ func validateInferenceSpecification(v *types.InferenceSpecification) error { invalidParams.AddNested("Containers", err.(smithy.InvalidParamsError)) } } - if v.SupportedContentTypes == nil { - invalidParams.Add(smithy.NewErrParamRequired("SupportedContentTypes")) - } - if v.SupportedResponseMIMETypes == nil { - invalidParams.Add(smithy.NewErrParamRequired("SupportedResponseMIMETypes")) - } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/sfn/api_client.go b/service/sfn/api_client.go index d2d3a8af1e6..542df2111b7 100644 --- a/service/sfn/api_client.go +++ b/service/sfn/api_client.go @@ -4,6 +4,7 @@ package sfn import ( "context" + cryptorand "crypto/rand" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" @@ -16,6 +17,7 @@ import ( smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" + smithyrand "github.com/aws/smithy-go/rand" smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" @@ -46,6 +48,8 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveHTTPSignerV4(&options) + resolveIdempotencyTokenProvider(&options) + for _, fn := range optFns { fn(&options) } @@ -100,6 +104,10 @@ type Options struct { // Signature Version 4 (SigV4) Signer HTTPSignerV4 HTTPSignerV4 + // Provides idempotency tokens values that will be automatically populated into + // idempotent API operations. + IdempotencyTokenProvider IdempotencyTokenProvider + // The logger writer interface to write logging messages to. Logger logging.Logger @@ -441,6 +449,13 @@ func newDefaultV4Signer(o Options) *v4.Signer { }) } +func resolveIdempotencyTokenProvider(o *Options) { + if o.IdempotencyTokenProvider != nil { + return + } + o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) +} + func addRetryMiddlewares(stack *middleware.Stack, o Options) error { mo := retry.AddRetryMiddlewaresOptions{ Retryer: o.Retryer, @@ -479,6 +494,11 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { return nil } +// IdempotencyTokenProvider interface for providing idempotency token +type IdempotencyTokenProvider interface { + GetIdempotencyToken() (string, error) +} + func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) } diff --git a/service/sfn/api_op_DeleteStateMachine.go b/service/sfn/api_op_DeleteStateMachine.go index 49801ff6312..5411dcef2d2 100644 --- a/service/sfn/api_op_DeleteStateMachine.go +++ b/service/sfn/api_op_DeleteStateMachine.go @@ -15,8 +15,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes a state machine. This is an asynchronous operation: It sets the state -// machine's status to DELETING and begins the deletion process. A qualified state +// Deletes a state machine. This is an asynchronous operation. It sets the state +// machine's status to DELETING and begins the deletion process. A state machine +// is deleted only when all its executions are completed. On the next state +// transition, the state machine's executions are terminated. A qualified state // machine ARN can either refer to a Distributed Map state defined within a state // machine, a version ARN, or an alias ARN. The following are some examples of // qualified and unqualified state machine ARNs: diff --git a/service/sfn/api_op_DescribeExecution.go b/service/sfn/api_op_DescribeExecution.go index b06e0359f16..c1e8ec638bd 100644 --- a/service/sfn/api_op_DescribeExecution.go +++ b/service/sfn/api_op_DescribeExecution.go @@ -19,13 +19,15 @@ import ( // Provides information about a state machine execution, such as the state machine // associated with the execution, the execution input and output, and relevant -// execution metadata. Use this API action to return the Map Run Amazon Resource -// Name (ARN) if the execution was dispatched by a Map Run. If you specify a -// version or alias ARN when you call the StartExecution API action, -// DescribeExecution returns that ARN. This operation is eventually consistent. The -// results are best effort and may not reflect very recent updates and changes. -// Executions of an EXPRESS state machinearen't supported by DescribeExecution -// unless a Map Run dispatched them. +// execution metadata. If you've redriven (https://docs.aws.amazon.com/step-functions/latest/dg/redrive-executions.html) +// an execution, you can use this API action to return information about the +// redrives of that execution. In addition, you can use this API action to return +// the Map Run Amazon Resource Name (ARN) if the execution was dispatched by a Map +// Run. If you specify a version or alias ARN when you call the StartExecution API +// action, DescribeExecution returns that ARN. This operation is eventually +// consistent. The results are best effort and may not reflect very recent updates +// and changes. Executions of an EXPRESS state machine aren't supported by +// DescribeExecution unless a Map Run dispatched them. func (c *Client) DescribeExecution(ctx context.Context, params *DescribeExecutionInput, optFns ...func(*Options)) (*DescribeExecutionOutput, error) { if params == nil { params = &DescribeExecutionInput{} @@ -109,6 +111,48 @@ type DescribeExecutionOutput struct { // Provides details about execution input or output. OutputDetails *types.CloudWatchEventsExecutionDataDetails + // The number of times you've redriven an execution. If you have not yet redriven + // an execution, the redriveCount is 0. This count is not updated for redrives + // that failed to start or are pending to be redriven. + RedriveCount *int32 + + // The date the execution was last redriven. If you have not yet redriven an + // execution, the redriveDate is null. The redriveDate is unavailable if you + // redrive a Map Run that starts child workflow executions of type EXPRESS . + RedriveDate *time.Time + + // Indicates whether or not an execution can be redriven at a given point in time. + // - For executions of type STANDARD , redriveStatus is NOT_REDRIVABLE if calling + // the RedriveExecution API action would return the ExecutionNotRedrivable error. + // - For a Distributed Map that includes child workflows of type STANDARD , + // redriveStatus indicates whether or not the Map Run can redrive child workflow + // executions. + // - For a Distributed Map that includes child workflows of type EXPRESS , + // redriveStatus indicates whether or not the Map Run can redrive child workflow + // executions. You can redrive failed or timed out EXPRESS workflows only if + // they're a part of a Map Run. When you redrive (https://docs.aws.amazon.com/step-functions/latest/dg/redrive-map-run.html) + // the Map Run, these workflows are restarted using the StartExecution API + // action. + RedriveStatus types.ExecutionRedriveStatus + + // When redriveStatus is NOT_REDRIVABLE , redriveStatusReason specifies the reason + // why an execution cannot be redriven. + // - For executions of type STANDARD , or for a Distributed Map that includes + // child workflows of type STANDARD , redriveStatusReason can include one of the + // following reasons: + // - State machine is in DELETING status . + // - Execution is RUNNING and cannot be redriven . + // - Execution is SUCCEEDED and cannot be redriven . + // - Execution was started before the launch of RedriveExecution . + // - Execution history event limit exceeded . + // - Execution has exceeded the max execution time . + // - Execution redrivable period exceeded . + // - For a Distributed Map that includes child workflows of type EXPRESS , + // redriveStatusReason is only returned if the child workflows are not + // redrivable. This happens when the child workflow executions have completed + // successfully. + RedriveStatusReason *string + // The Amazon Resource Name (ARN) of the state machine alias associated with the // execution. The alias ARN is a combination of state machine ARN and the alias // name separated by a colon (:). For example, stateMachineARN:PROD . If you start diff --git a/service/sfn/api_op_DescribeMapRun.go b/service/sfn/api_op_DescribeMapRun.go index c6584b10154..ebf4cdb7f5c 100644 --- a/service/sfn/api_op_DescribeMapRun.go +++ b/service/sfn/api_op_DescribeMapRun.go @@ -17,8 +17,10 @@ import ( "time" ) -// Provides information about a Map Run's configuration, progress, and results. -// For more information, see Examining Map Run (https://docs.aws.amazon.com/step-functions/latest/dg/concepts-examine-map-run.html) +// Provides information about a Map Run's configuration, progress, and results. If +// you've redriven (https://docs.aws.amazon.com/step-functions/latest/dg/redrive-map-run.html) +// a Map Run, this API action also returns information about the redrives of that +// Map Run. For more information, see Examining Map Run (https://docs.aws.amazon.com/step-functions/latest/dg/concepts-examine-map-run.html) // in the Step Functions Developer Guide. func (c *Client) DescribeMapRun(ctx context.Context, params *DescribeMapRunInput, optFns ...func(*Options)) (*DescribeMapRunOutput, error) { if params == nil { @@ -98,6 +100,15 @@ type DescribeMapRunOutput struct { // This member is required. ToleratedFailurePercentage float32 + // The number of times you've redriven a Map Run. If you have not yet redriven a + // Map Run, the redriveCount is 0. This count is not updated for redrives that + // failed to start or are pending to be redriven. + RedriveCount *int32 + + // The date a Map Run was last redriven. If you have not yet redriven a Map Run, + // the redriveDate is null. + RedriveDate *time.Time + // The date when the Map Run was stopped. StopDate *time.Time diff --git a/service/sfn/api_op_ListExecutions.go b/service/sfn/api_op_ListExecutions.go index 965cf54e1ce..3e8db105b4c 100644 --- a/service/sfn/api_op_ListExecutions.go +++ b/service/sfn/api_op_ListExecutions.go @@ -19,7 +19,8 @@ import ( // Lists all executions of a state machine or a Map Run. You can list all // executions related to a state machine by specifying a state machine Amazon // Resource Name (ARN), or those related to a Map Run by specifying a Map Run ARN. -// You can also provide a state machine alias (https://docs.aws.amazon.com/step-functions/latest/dg/concepts-state-machine-alias.html) +// Using this API action, you can also list all redriven (https://docs.aws.amazon.com/step-functions/latest/dg/redrive-executions.html) +// executions. You can also provide a state machine alias (https://docs.aws.amazon.com/step-functions/latest/dg/concepts-state-machine-alias.html) // ARN or version (https://docs.aws.amazon.com/step-functions/latest/dg/concepts-state-machine-version.html) // ARN to list the executions associated with a specific alias or version. Results // are sorted by time, with the most recent execution first. If nextToken is @@ -69,6 +70,14 @@ type ListExecutionsInput struct { // pagination token will return an HTTP 400 InvalidToken error. NextToken *string + // Sets a filter to list executions based on whether or not they have been + // redriven. For a Distributed Map, redriveFilter sets a filter to list child + // workflow executions based on whether or not they have been redriven. If you do + // not provide a redriveFilter , Step Functions returns a list of both redriven and + // non-redriven executions. If you provide a state machine ARN in redriveFilter , + // the API returns a validation exception. + RedriveFilter types.ExecutionRedriveFilter + // The Amazon Resource Name (ARN) of the state machine whose executions is listed. // You can specify either a mapRunArn or a stateMachineArn , but not both. You can // also return a list of executions associated with a specific alias (https://docs.aws.amazon.com/step-functions/latest/dg/concepts-state-machine-alias.html) diff --git a/service/sfn/api_op_RedriveExecution.go b/service/sfn/api_op_RedriveExecution.go new file mode 100644 index 00000000000..c225f9b9d82 --- /dev/null +++ b/service/sfn/api_op_RedriveExecution.go @@ -0,0 +1,339 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package sfn + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Restarts unsuccessful executions of Standard workflows that didn't complete +// successfully in the last 14 days. These include failed, aborted, or timed out +// executions. When you redrive (https://docs.aws.amazon.com/step-functions/latest/dg/redrive-executions.html) +// an execution, it continues the failed execution from the unsuccessful step and +// uses the same input. Step Functions preserves the results and execution history +// of the successful steps, and doesn't rerun these steps when you redrive an +// execution. Redriven executions use the same state machine definition and +// execution ARN as the original execution attempt. For workflows that include an +// Inline Map (https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-map-state.html) +// or Parallel (https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-parallel-state.html) +// state, RedriveExecution API action reschedules and redrives only the iterations +// and branches that failed or aborted. To redrive a workflow that includes a +// Distributed Map state with failed child workflow executions, you must redrive +// the parent workflow (https://docs.aws.amazon.com/step-functions/latest/dg/use-dist-map-orchestrate-large-scale-parallel-workloads.html#dist-map-orchestrate-parallel-workloads-key-terms) +// . The parent workflow redrives all the unsuccessful states, including +// Distributed Map. This API action is not supported by EXPRESS state machines. +// However, you can restart the unsuccessful executions of Express child workflows +// in a Distributed Map by redriving its Map Run. When you redrive a Map Run, the +// Express child workflows are rerun using the StartExecution API action. For more +// information, see Redriving Map Runs (https://docs.aws.amazon.com/step-functions/latest/dg/redrive-map-run.html) +// . You can redrive executions if your original execution meets the following +// conditions: +// - The execution status isn't SUCCEEDED . +// - Your workflow execution has not exceeded the redrivable period of 14 days. +// Redrivable period refers to the time during which you can redrive a given +// execution. This period starts from the day a state machine completes its +// execution. +// - The workflow execution has not exceeded the maximum open time of one year. +// For more information about state machine quotas, see Quotas related to state +// machine executions (https://docs.aws.amazon.com/step-functions/latest/dg/limits-overview.html#service-limits-state-machine-executions) +// . +// - The execution event history count is less than 24,999. Redriven executions +// append their event history to the existing event history. Make sure your +// workflow execution contains less than 24,999 events to accommodate the +// ExecutionRedriven history event and at least one other history event. +func (c *Client) RedriveExecution(ctx context.Context, params *RedriveExecutionInput, optFns ...func(*Options)) (*RedriveExecutionOutput, error) { + if params == nil { + params = &RedriveExecutionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RedriveExecution", params, optFns, c.addOperationRedriveExecutionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RedriveExecutionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RedriveExecutionInput struct { + + // The Amazon Resource Name (ARN) of the execution to be redriven. + // + // This member is required. + ExecutionArn *string + + // A unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. If you don’t specify a client token, the Amazon Web Services SDK + // automatically generates a client token and uses it for the request to ensure + // idempotency. The API uses one of the last 10 client tokens provided. + ClientToken *string + + noSmithyDocumentSerde +} + +type RedriveExecutionOutput struct { + + // The date the execution was last redriven. + // + // This member is required. + RedriveDate *time.Time + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRedriveExecutionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpRedriveExecution{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpRedriveExecution{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addRedriveExecutionResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addIdempotencyToken_opRedriveExecutionMiddleware(stack, options); err != nil { + return err + } + if err = addOpRedriveExecutionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRedriveExecution(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpRedriveExecution struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpRedriveExecution) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpRedriveExecution) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*RedriveExecutionInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *RedriveExecutionInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opRedriveExecutionMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpRedriveExecution{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opRedriveExecution(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "states", + OperationName: "RedriveExecution", + } +} + +type opRedriveExecutionResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opRedriveExecutionResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opRedriveExecutionResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "states" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "states" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("states") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addRedriveExecutionResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opRedriveExecutionResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/sfn/api_op_SendTaskFailure.go b/service/sfn/api_op_SendTaskFailure.go index eb36a0f4410..26fd2a61a07 100644 --- a/service/sfn/api_op_SendTaskFailure.go +++ b/service/sfn/api_op_SendTaskFailure.go @@ -15,7 +15,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Used by activity workers and task states using the callback (https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token) +// Used by activity workers, Task states using the callback (https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token) +// pattern, and optionally Task states using the job run (https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-sync) // pattern to report that the task identified by the taskToken failed. func (c *Client) SendTaskFailure(ctx context.Context, params *SendTaskFailureInput, optFns ...func(*Options)) (*SendTaskFailureOutput, error) { if params == nil { diff --git a/service/sfn/api_op_SendTaskHeartbeat.go b/service/sfn/api_op_SendTaskHeartbeat.go index 50c756f6d80..7a7332f437a 100644 --- a/service/sfn/api_op_SendTaskHeartbeat.go +++ b/service/sfn/api_op_SendTaskHeartbeat.go @@ -15,14 +15,15 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Used by activity workers and task states using the callback (https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token) +// Used by activity workers and Task states using the callback (https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token) +// pattern, and optionally Task states using the job run (https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-sync) // pattern to report to Step Functions that the task represented by the specified // taskToken is still making progress. This action resets the Heartbeat clock. The // Heartbeat threshold is specified in the state machine's Amazon States Language // definition ( HeartbeatSeconds ). This action does not in itself create an event // in the execution history. However, if the task times out, the execution history // contains an ActivityTimedOut entry for activities, or a TaskTimedOut entry for -// for tasks using the job run (https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-sync) +// tasks using the job run (https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-sync) // or callback (https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token) // pattern. The Timeout of a task, defined in the state machine's Amazon States // Language definition, is its maximum allowed duration, regardless of the number diff --git a/service/sfn/api_op_SendTaskSuccess.go b/service/sfn/api_op_SendTaskSuccess.go index 758494515c3..3c443429d90 100644 --- a/service/sfn/api_op_SendTaskSuccess.go +++ b/service/sfn/api_op_SendTaskSuccess.go @@ -15,7 +15,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Used by activity workers and task states using the callback (https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token) +// Used by activity workers, Task states using the callback (https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token) +// pattern, and optionally Task states using the job run (https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-sync) // pattern to report that the task identified by the taskToken completed // successfully. func (c *Client) SendTaskSuccess(ctx context.Context, params *SendTaskSuccessInput, optFns ...func(*Options)) (*SendTaskSuccessOutput, error) { diff --git a/service/sfn/api_op_StartExecution.go b/service/sfn/api_op_StartExecution.go index 02b5d6f0c01..fdbb8598494 100644 --- a/service/sfn/api_op_StartExecution.go +++ b/service/sfn/api_op_StartExecution.go @@ -91,7 +91,9 @@ type StartExecutionInput struct { // Optional name of the execution. This name must be unique for your Amazon Web // Services account, Region, and state machine for 90 days. For more information, // see Limits Related to State Machine Executions (https://docs.aws.amazon.com/step-functions/latest/dg/limits.html#service-limits-state-machine-executions) - // in the Step Functions Developer Guide. A name must not contain: + // in the Step Functions Developer Guide. If you don't provide a name for the + // execution, Step Functions automatically generates a universally unique + // identifier (UUID) as the execution name. A name must not contain: // - white space // - brackets < > { } [ ] // - wildcard characters ? * diff --git a/service/sfn/deserializers.go b/service/sfn/deserializers.go index 99070a38087..2907075aab5 100644 --- a/service/sfn/deserializers.go +++ b/service/sfn/deserializers.go @@ -2738,6 +2738,126 @@ func awsAwsjson10_deserializeOpErrorPublishStateMachineVersion(response *smithyh } } +type awsAwsjson10_deserializeOpRedriveExecution struct { +} + +func (*awsAwsjson10_deserializeOpRedriveExecution) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpRedriveExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorRedriveExecution(response, &metadata) + } + output := &RedriveExecutionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, 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 out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentRedriveExecutionOutput(&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 out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorRedriveExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + 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) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ExecutionDoesNotExist", errorCode): + return awsAwsjson10_deserializeErrorExecutionDoesNotExist(response, errorBody) + + case strings.EqualFold("ExecutionLimitExceeded", errorCode): + return awsAwsjson10_deserializeErrorExecutionLimitExceeded(response, errorBody) + + case strings.EqualFold("ExecutionNotRedrivable", errorCode): + return awsAwsjson10_deserializeErrorExecutionNotRedrivable(response, errorBody) + + case strings.EqualFold("InvalidArn", errorCode): + return awsAwsjson10_deserializeErrorInvalidArn(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson10_deserializeOpSendTaskFailure struct { } @@ -4318,6 +4438,41 @@ func awsAwsjson10_deserializeErrorExecutionLimitExceeded(response *smithyhttp.Re return output } +func awsAwsjson10_deserializeErrorExecutionNotRedrivable(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.ExecutionNotRedrivable{} + err := awsAwsjson10_deserializeDocumentExecutionNotRedrivable(&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 awsAwsjson10_deserializeErrorInvalidArn(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -6040,6 +6195,35 @@ func awsAwsjson10_deserializeDocumentExecutionListItem(v **types.ExecutionListIt sv.Name = ptr.String(jtv) } + case "redriveCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected RedriveCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RedriveCount = ptr.Int32(int32(i64)) + } + + case "redriveDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.RedriveDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + case "startDate": if value != nil { switch jtv := value.(type) { @@ -6117,6 +6301,90 @@ func awsAwsjson10_deserializeDocumentExecutionListItem(v **types.ExecutionListIt return nil } +func awsAwsjson10_deserializeDocumentExecutionNotRedrivable(v **types.ExecutionNotRedrivable, 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.ExecutionNotRedrivable + if *v == nil { + sv = &types.ExecutionNotRedrivable{} + } 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 awsAwsjson10_deserializeDocumentExecutionRedrivenEventDetails(v **types.ExecutionRedrivenEventDetails, 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.ExecutionRedrivenEventDetails + if *v == nil { + sv = &types.ExecutionRedrivenEventDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "redriveCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected RedriveCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RedriveCount = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeDocumentExecutionStartedEventDetails(v **types.ExecutionStartedEventDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6345,6 +6613,11 @@ func awsAwsjson10_deserializeDocumentHistoryEvent(v **types.HistoryEvent, value return err } + case "executionRedrivenEventDetails": + if err := awsAwsjson10_deserializeDocumentExecutionRedrivenEventDetails(&sv.ExecutionRedrivenEventDetails, value); err != nil { + return err + } + case "executionStartedEventDetails": if err := awsAwsjson10_deserializeDocumentExecutionStartedEventDetails(&sv.ExecutionStartedEventDetails, value); err != nil { return err @@ -6428,6 +6701,11 @@ func awsAwsjson10_deserializeDocumentHistoryEvent(v **types.HistoryEvent, value return err } + case "mapRunRedrivenEventDetails": + if err := awsAwsjson10_deserializeDocumentMapRunRedrivenEventDetails(&sv.MapRunRedrivenEventDetails, value); err != nil { + return err + } + case "mapRunStartedEventDetails": if err := awsAwsjson10_deserializeDocumentMapRunStartedEventDetails(&sv.MapRunStartedEventDetails, value); err != nil { return err @@ -7467,6 +7745,19 @@ func awsAwsjson10_deserializeDocumentMapRunExecutionCounts(v **types.MapRunExecu sv.Failed = i64 } + case "failuresNotRedrivable": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected LongObject to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.FailuresNotRedrivable = ptr.Int64(i64) + } + case "pending": if value != nil { jtv, ok := value.(json.Number) @@ -7480,6 +7771,19 @@ func awsAwsjson10_deserializeDocumentMapRunExecutionCounts(v **types.MapRunExecu sv.Pending = i64 } + case "pendingRedrive": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected LongObject to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.PendingRedrive = ptr.Int64(i64) + } + case "resultsWritten": if value != nil { jtv, ok := value.(json.Number) @@ -7651,6 +7955,19 @@ func awsAwsjson10_deserializeDocumentMapRunItemCounts(v **types.MapRunItemCounts sv.Failed = i64 } + case "failuresNotRedrivable": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected LongObject to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.FailuresNotRedrivable = ptr.Int64(i64) + } + case "pending": if value != nil { jtv, ok := value.(json.Number) @@ -7664,6 +7981,19 @@ func awsAwsjson10_deserializeDocumentMapRunItemCounts(v **types.MapRunItemCounts sv.Pending = i64 } + case "pendingRedrive": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected LongObject to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.PendingRedrive = ptr.Int64(i64) + } + case "resultsWritten": if value != nil { jtv, ok := value.(json.Number) @@ -7862,6 +8192,59 @@ func awsAwsjson10_deserializeDocumentMapRunListItem(v **types.MapRunListItem, va return nil } +func awsAwsjson10_deserializeDocumentMapRunRedrivenEventDetails(v **types.MapRunRedrivenEventDetails, 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.MapRunRedrivenEventDetails + if *v == nil { + sv = &types.MapRunRedrivenEventDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "mapRunArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongArn to be of type string, got %T instead", value) + } + sv.MapRunArn = ptr.String(jtv) + } + + case "redriveCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected RedriveCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RedriveCount = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeDocumentMapRunStartedEventDetails(v **types.MapRunStartedEventDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -10101,6 +10484,53 @@ func awsAwsjson10_deserializeOpDocumentDescribeExecutionOutput(v **DescribeExecu return err } + case "redriveCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected RedriveCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RedriveCount = ptr.Int32(int32(i64)) + } + + case "redriveDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.RedriveDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "redriveStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExecutionRedriveStatus to be of type string, got %T instead", value) + } + sv.RedriveStatus = types.ExecutionRedriveStatus(jtv) + } + + case "redriveStatusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SensitiveData to be of type string, got %T instead", value) + } + sv.RedriveStatusReason = ptr.String(jtv) + } + case "startDate": if value != nil { switch jtv := value.(type) { @@ -10250,6 +10680,35 @@ func awsAwsjson10_deserializeOpDocumentDescribeMapRunOutput(v **DescribeMapRunOu sv.MaxConcurrency = int32(i64) } + case "redriveCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected RedriveCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RedriveCount = ptr.Int32(int32(i64)) + } + + case "redriveDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.RedriveDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + case "startDate": if value != nil { switch jtv := value.(type) { @@ -11156,6 +11615,53 @@ func awsAwsjson10_deserializeOpDocumentPublishStateMachineVersionOutput(v **Publ return nil } +func awsAwsjson10_deserializeOpDocumentRedriveExecutionOutput(v **RedriveExecutionOutput, 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 *RedriveExecutionOutput + if *v == nil { + sv = &RedriveExecutionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "redriveDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.RedriveDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentSendTaskFailureOutput(v **SendTaskFailureOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/sfn/doc.go b/service/sfn/doc.go index 9e370fe8ea9..4137caf570a 100644 --- a/service/sfn/doc.go +++ b/service/sfn/doc.go @@ -18,5 +18,8 @@ // Amazon Web Services. You can access and use Step Functions using the console, // the Amazon Web Services SDKs, or an HTTP API. For more information about Step // Functions, see the Step Functions Developer Guide (https://docs.aws.amazon.com/step-functions/latest/dg/welcome.html) -// . +// . If you use the Step Functions API actions using Amazon Web Services SDK +// integrations, make sure the API actions are in camel case and parameter names +// are in Pascal case. For example, you could use Step Functions API action +// startSyncExecution and specify its parameter as StateMachineArn . package sfn diff --git a/service/sfn/endpoints.go b/service/sfn/endpoints.go index 01167b7ef88..b74db7c44e5 100644 --- a/service/sfn/endpoints.go +++ b/service/sfn/endpoints.go @@ -430,7 +430,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { if _Region == "us-gov-west-1" { uriString := "https://states.us-gov-west-1.amazonaws.com" diff --git a/service/sfn/generated.json b/service/sfn/generated.json index 81682d2b988..e2680da406b 100644 --- a/service/sfn/generated.json +++ b/service/sfn/generated.json @@ -32,6 +32,7 @@ "api_op_ListStateMachines.go", "api_op_ListTagsForResource.go", "api_op_PublishStateMachineVersion.go", + "api_op_RedriveExecution.go", "api_op_SendTaskFailure.go", "api_op_SendTaskHeartbeat.go", "api_op_SendTaskSuccess.go", diff --git a/service/sfn/serializers.go b/service/sfn/serializers.go index f8a9efdfde6..1194d206958 100644 --- a/service/sfn/serializers.go +++ b/service/sfn/serializers.go @@ -1281,6 +1281,61 @@ func (m *awsAwsjson10_serializeOpPublishStateMachineVersion) HandleSerialize(ctx return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpRedriveExecution struct { +} + +func (*awsAwsjson10_serializeOpRedriveExecution) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpRedriveExecution) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*RedriveExecutionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSStepFunctions.RedriveExecution") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentRedriveExecutionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpSendTaskFailure struct { } @@ -2337,6 +2392,11 @@ func awsAwsjson10_serializeOpDocumentListExecutionsInput(v *ListExecutionsInput, ok.String(*v.NextToken) } + if len(v.RedriveFilter) > 0 { + ok := object.Key("redriveFilter") + ok.String(string(v.RedriveFilter)) + } + if v.StateMachineArn != nil { ok := object.Key("stateMachineArn") ok.String(*v.StateMachineArn) @@ -2467,6 +2527,23 @@ func awsAwsjson10_serializeOpDocumentPublishStateMachineVersionInput(v *PublishS return nil } +func awsAwsjson10_serializeOpDocumentRedriveExecutionInput(v *RedriveExecutionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.ExecutionArn != nil { + ok := object.Key("executionArn") + ok.String(*v.ExecutionArn) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentSendTaskFailureInput(v *SendTaskFailureInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/sfn/types/enums.go b/service/sfn/types/enums.go index 456cf256487..bf3d0d4692f 100644 --- a/service/sfn/types/enums.go +++ b/service/sfn/types/enums.go @@ -2,15 +2,54 @@ package types +type ExecutionRedriveFilter string + +// Enum values for ExecutionRedriveFilter +const ( + ExecutionRedriveFilterRedriven ExecutionRedriveFilter = "REDRIVEN" + ExecutionRedriveFilterNotRedriven ExecutionRedriveFilter = "NOT_REDRIVEN" +) + +// Values returns all known values for ExecutionRedriveFilter. Note that this can +// be expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ExecutionRedriveFilter) Values() []ExecutionRedriveFilter { + return []ExecutionRedriveFilter{ + "REDRIVEN", + "NOT_REDRIVEN", + } +} + +type ExecutionRedriveStatus string + +// Enum values for ExecutionRedriveStatus +const ( + ExecutionRedriveStatusRedrivable ExecutionRedriveStatus = "REDRIVABLE" + ExecutionRedriveStatusNotRedrivable ExecutionRedriveStatus = "NOT_REDRIVABLE" + ExecutionRedriveStatusRedrivableByMapRun ExecutionRedriveStatus = "REDRIVABLE_BY_MAP_RUN" +) + +// Values returns all known values for ExecutionRedriveStatus. Note that this can +// be expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ExecutionRedriveStatus) Values() []ExecutionRedriveStatus { + return []ExecutionRedriveStatus{ + "REDRIVABLE", + "NOT_REDRIVABLE", + "REDRIVABLE_BY_MAP_RUN", + } +} + type ExecutionStatus string // Enum values for ExecutionStatus const ( - ExecutionStatusRunning ExecutionStatus = "RUNNING" - ExecutionStatusSucceeded ExecutionStatus = "SUCCEEDED" - ExecutionStatusFailed ExecutionStatus = "FAILED" - ExecutionStatusTimedOut ExecutionStatus = "TIMED_OUT" - ExecutionStatusAborted ExecutionStatus = "ABORTED" + ExecutionStatusRunning ExecutionStatus = "RUNNING" + ExecutionStatusSucceeded ExecutionStatus = "SUCCEEDED" + ExecutionStatusFailed ExecutionStatus = "FAILED" + ExecutionStatusTimedOut ExecutionStatus = "TIMED_OUT" + ExecutionStatusAborted ExecutionStatus = "ABORTED" + ExecutionStatusPendingRedrive ExecutionStatus = "PENDING_REDRIVE" ) // Values returns all known values for ExecutionStatus. Note that this can be @@ -23,6 +62,7 @@ func (ExecutionStatus) Values() []ExecutionStatus { "FAILED", "TIMED_OUT", "ABORTED", + "PENDING_REDRIVE", } } @@ -89,6 +129,8 @@ const ( HistoryEventTypeMapRunFailed HistoryEventType = "MapRunFailed" HistoryEventTypeMapRunStarted HistoryEventType = "MapRunStarted" HistoryEventTypeMapRunSucceeded HistoryEventType = "MapRunSucceeded" + HistoryEventTypeExecutionRedriven HistoryEventType = "ExecutionRedriven" + HistoryEventTypeMapRunRedriven HistoryEventType = "MapRunRedriven" ) // Values returns all known values for HistoryEventType. Note that this can be @@ -155,6 +197,8 @@ func (HistoryEventType) Values() []HistoryEventType { "MapRunFailed", "MapRunStarted", "MapRunSucceeded", + "ExecutionRedriven", + "MapRunRedriven", } } diff --git a/service/sfn/types/errors.go b/service/sfn/types/errors.go index 9cf849865e7..914917fec34 100644 --- a/service/sfn/types/errors.go +++ b/service/sfn/types/errors.go @@ -196,6 +196,33 @@ func (e *ExecutionLimitExceeded) ErrorCode() string { } func (e *ExecutionLimitExceeded) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The execution Amazon Resource Name (ARN) that you specified for executionArn +// cannot be redriven. +type ExecutionNotRedrivable struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ExecutionNotRedrivable) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ExecutionNotRedrivable) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ExecutionNotRedrivable) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ExecutionNotRedrivable" + } + return *e.ErrorCodeOverride +} +func (e *ExecutionNotRedrivable) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The provided Amazon Resource Name (ARN) is not valid. type InvalidArn struct { Message *string @@ -616,6 +643,7 @@ func (e *StateMachineTypeNotSupported) ErrorCode() string { } func (e *StateMachineTypeNotSupported) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The activity does not exist. type TaskDoesNotExist struct { Message *string @@ -641,6 +669,8 @@ func (e *TaskDoesNotExist) ErrorCode() string { } func (e *TaskDoesNotExist) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The task token has either expired or the task associated with the token has +// already been closed. type TaskTimedOut struct { Message *string diff --git a/service/sfn/types/types.go b/service/sfn/types/types.go index da9dd2a62cb..b26b2393381 100644 --- a/service/sfn/types/types.go +++ b/service/sfn/types/types.go @@ -221,6 +221,14 @@ type ExecutionListItem struct { // was specified in ListExecutions , the mapRunArn isn't returned. MapRunArn *string + // The number of times you've redriven an execution. If you have not yet redriven + // an execution, the redriveCount is 0. This count is not updated for redrives + // that failed to start or are pending to be redriven. + RedriveCount *int32 + + // The date the execution was last redriven. + RedriveDate *time.Time + // The Amazon Resource Name (ARN) of the state machine alias used to start an // execution. If the state machine execution was started with an unqualified ARN or // a version ARN, it returns null. @@ -239,6 +247,17 @@ type ExecutionListItem struct { noSmithyDocumentSerde } +// Contains details about a redriven execution. +type ExecutionRedrivenEventDetails struct { + + // The number of times you've redriven an execution. If you have not yet redriven + // an execution, the redriveCount is 0. This count is not updated for redrives + // that failed to start or are pending to be redriven. + RedriveCount *int32 + + noSmithyDocumentSerde +} + // Contains details about the start of the execution. type ExecutionStartedEventDetails struct { @@ -332,6 +351,9 @@ type HistoryEvent struct { // Contains details about an execution failure event. ExecutionFailedEventDetails *ExecutionFailedEventDetails + // Contains details about the redrive attempt of an execution. + ExecutionRedrivenEventDetails *ExecutionRedrivenEventDetails + // Contains details about the start of the execution. ExecutionStartedEventDetails *ExecutionStartedEventDetails @@ -378,6 +400,9 @@ type HistoryEvent struct { // Contains error and cause details about a Map Run that failed. MapRunFailedEventDetails *MapRunFailedEventDetails + // Contains details about the redrive attempt of a Map Run. + MapRunRedrivenEventDetails *MapRunRedrivenEventDetails + // Contains details, such as mapRunArn , and the start date and time of a Map Run. // mapRunArn is the Amazon Resource Name (ARN) of the Map Run that was started. MapRunStartedEventDetails *MapRunStartedEventDetails @@ -612,6 +637,19 @@ type MapRunExecutionCounts struct { // This member is required. Total int64 + // The number of FAILED , ABORTED , or TIMED_OUT child workflow executions that + // cannot be redriven because their execution status is terminal. For example, if + // your execution event history contains 25,000 entries, or the + // toleratedFailureCount or toleratedFailurePercentage for the Distributed Map has + // exceeded. + FailuresNotRedrivable *int64 + + // The number of unsuccessful child workflow executions currently waiting to be + // redriven. The status of these child workflow executions could be FAILED , + // ABORTED , or TIMED_OUT in the original execution attempt or a previous redrive + // attempt. + PendingRedrive *int64 + noSmithyDocumentSerde } @@ -681,6 +719,17 @@ type MapRunItemCounts struct { // This member is required. Total int64 + // The number of FAILED , ABORTED , or TIMED_OUT items in child workflow + // executions that cannot be redriven because the execution status of those child + // workflows is terminal. For example, if your execution event history contains + // 25,000 entries, or the toleratedFailureCount or toleratedFailurePercentage for + // the Distributed Map has exceeded. + FailuresNotRedrivable *int64 + + // The number of unsuccessful items in child workflow executions currently waiting + // to be redriven. + PendingRedrive *int64 + noSmithyDocumentSerde } @@ -713,6 +762,20 @@ type MapRunListItem struct { noSmithyDocumentSerde } +// Contains details about a Map Run that was redriven. +type MapRunRedrivenEventDetails struct { + + // The Amazon Resource Name (ARN) of a Map Run that was redriven. + MapRunArn *string + + // The number of times the Map Run has been redriven at this point in the + // execution's history including this event. The redrive count for a redriven Map + // Run is always greater than 0. + RedriveCount *int32 + + noSmithyDocumentSerde +} + // Contains details about a Map Run that was started during a state machine // execution. type MapRunStartedEventDetails struct { @@ -745,9 +808,8 @@ type RoutingConfigurationListItem struct { // This member is required. StateMachineVersionArn *string - // The percentage of traffic you want to route to the second state machine - // version. The sum of the weights in the routing configuration must be equal to - // 100. + // The percentage of traffic you want to route to a state machine version. The sum + // of the weights in the routing configuration must be equal to 100. // // This member is required. Weight int32 diff --git a/service/sfn/validators.go b/service/sfn/validators.go index cba6cb26e02..8e7d0d5a944 100644 --- a/service/sfn/validators.go +++ b/service/sfn/validators.go @@ -410,6 +410,26 @@ func (m *validateOpPublishStateMachineVersion) HandleInitialize(ctx context.Cont return next.HandleInitialize(ctx, in) } +type validateOpRedriveExecution struct { +} + +func (*validateOpRedriveExecution) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRedriveExecution) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RedriveExecutionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRedriveExecutionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpSendTaskFailure struct { } @@ -710,6 +730,10 @@ func addOpPublishStateMachineVersionValidationMiddleware(stack *middleware.Stack return stack.Initialize.Add(&validateOpPublishStateMachineVersion{}, middleware.After) } +func addOpRedriveExecutionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRedriveExecution{}, middleware.After) +} + func addOpSendTaskFailureValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpSendTaskFailure{}, middleware.After) } @@ -1099,6 +1123,21 @@ func validateOpPublishStateMachineVersionInput(v *PublishStateMachineVersionInpu } } +func validateOpRedriveExecutionInput(v *RedriveExecutionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RedriveExecutionInput"} + if v.ExecutionArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ExecutionArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpSendTaskFailureInput(v *SendTaskFailureInput) error { if v == nil { return nil diff --git a/service/signer/api_op_DescribeSigningJob.go b/service/signer/api_op_DescribeSigningJob.go index 92dd66936e9..e38265ae483 100644 --- a/service/signer/api_op_DescribeSigningJob.go +++ b/service/signer/api_op_DescribeSigningJob.go @@ -91,7 +91,7 @@ type DescribeSigningJobOutput struct { // Thr expiration timestamp for the signature generated by the signing job. SignatureExpiresAt *time.Time - // Name of the S3 bucket where the signed code image is saved by code signing. + // Name of the S3 bucket where the signed code image is saved by AWS Signer. SignedObject *types.SignedObject // The Amazon Resource Name (ARN) of your code signing certificate. diff --git a/service/signer/api_op_GetRevocationStatus.go b/service/signer/api_op_GetRevocationStatus.go index c76110f89f7..5e2951b03e4 100644 --- a/service/signer/api_op_GetRevocationStatus.go +++ b/service/signer/api_op_GetRevocationStatus.go @@ -38,7 +38,18 @@ type GetRevocationStatusInput struct { // A list of composite signed hashes that identify certificates. A certificate // identifier consists of a subject certificate TBS hash (signed by the parent CA) // combined with a parent CA TBS hash (signed by the parent CA’s CA). Root - // certificates are defined as their own CA. + // certificates are defined as their own CA. The following example shows how to + // calculate a hash for this parameter using OpenSSL commands: openssl asn1parse + // -in childCert.pem -strparse 4 -out childCert.tbs + // openssl sha384 < childCert.tbs -binary > childCertTbsHash + // + // openssl asn1parse -in parentCert.pem -strparse 4 -out parentCert.tbs + // + // openssl sha384 < parentCert.tbs -binary > parentCertTbsHash xxd -p + // childCertTbsHash > certificateHash.hex xxd -p parentCertTbsHash >> + // certificateHash.hex + // + // cat certificateHash.hex | tr -d '\n' // // This member is required. CertificateHashes []string @@ -68,8 +79,8 @@ type GetRevocationStatusInput struct { type GetRevocationStatusOutput struct { - // A list of revoked entities (including one or more of the signing profile ARN, - // signing job ID, and certificate hash) supplied as input to the API. + // A list of revoked entities (including zero or more of the signing profile ARN, + // signing job ARN, and certificate hashes) supplied as input to the API. RevokedEntities []string // Metadata pertaining to the operation's result. diff --git a/service/signer/api_op_ListSigningJobs.go b/service/signer/api_op_ListSigningJobs.go index 51bf1ad155d..7b33554e98a 100644 --- a/service/signer/api_op_ListSigningJobs.go +++ b/service/signer/api_op_ListSigningJobs.go @@ -19,11 +19,11 @@ import ( // Lists all your signing jobs. You can use the maxResults parameter to limit the // number of signing jobs that are returned in the response. If additional jobs -// remain to be listed, code signing returns a nextToken value. Use this value in +// remain to be listed, AWS Signer returns a nextToken value. Use this value in // subsequent calls to ListSigningJobs to fetch the remaining values. You can // continue calling ListSigningJobs with your maxResults parameter and with new -// values that code signing returns in the nextToken parameter until all of your -// signing jobs have been returned. +// values that Signer returns in the nextToken parameter until all of your signing +// jobs have been returned. func (c *Client) ListSigningJobs(ctx context.Context, params *ListSigningJobsInput, optFns ...func(*Options)) (*ListSigningJobsOutput, error) { if params == nil { params = &ListSigningJobsInput{} diff --git a/service/signer/api_op_ListSigningPlatforms.go b/service/signer/api_op_ListSigningPlatforms.go index b5267cd8dcb..40fb10000da 100644 --- a/service/signer/api_op_ListSigningPlatforms.go +++ b/service/signer/api_op_ListSigningPlatforms.go @@ -16,12 +16,12 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists all signing platforms available in code signing that match the request -// parameters. If additional jobs remain to be listed, code signing returns a -// nextToken value. Use this value in subsequent calls to ListSigningJobs to fetch -// the remaining values. You can continue calling ListSigningJobs with your -// maxResults parameter and with new values that code signing returns in the -// nextToken parameter until all of your signing jobs have been returned. +// Lists all signing platforms available in AWS Signer that match the request +// parameters. If additional jobs remain to be listed, Signer returns a nextToken +// value. Use this value in subsequent calls to ListSigningJobs to fetch the +// remaining values. You can continue calling ListSigningJobs with your maxResults +// parameter and with new values that Signer returns in the nextToken parameter +// until all of your signing jobs have been returned. func (c *Client) ListSigningPlatforms(ctx context.Context, params *ListSigningPlatformsInput, optFns ...func(*Options)) (*ListSigningPlatformsOutput, error) { if params == nil { params = &ListSigningPlatformsInput{} diff --git a/service/signer/api_op_ListSigningProfiles.go b/service/signer/api_op_ListSigningProfiles.go index 538a3adaae5..754e457b880 100644 --- a/service/signer/api_op_ListSigningProfiles.go +++ b/service/signer/api_op_ListSigningProfiles.go @@ -18,11 +18,11 @@ import ( // Lists all available signing profiles in your AWS account. Returns only profiles // with an ACTIVE status unless the includeCanceled request field is set to true . -// If additional jobs remain to be listed, code signing returns a nextToken value. +// If additional jobs remain to be listed, AWS Signer returns a nextToken value. // Use this value in subsequent calls to ListSigningJobs to fetch the remaining // values. You can continue calling ListSigningJobs with your maxResults parameter -// and with new values that code signing returns in the nextToken parameter until -// all of your signing jobs have been returned. +// and with new values that Signer returns in the nextToken parameter until all of +// your signing jobs have been returned. func (c *Client) ListSigningProfiles(ctx context.Context, params *ListSigningProfilesInput, optFns ...func(*Options)) (*ListSigningProfilesOutput, error) { if params == nil { params = &ListSigningProfilesInput{} diff --git a/service/signer/api_op_PutSigningProfile.go b/service/signer/api_op_PutSigningProfile.go index a5423f0899b..84738d182a4 100644 --- a/service/signer/api_op_PutSigningProfile.go +++ b/service/signer/api_op_PutSigningProfile.go @@ -16,7 +16,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates a signing profile. A signing profile is a code signing template that +// Creates a signing profile. A signing profile is a code-signing template that // can be used to carry out a pre-defined signing job. func (c *Client) PutSigningProfile(ctx context.Context, params *PutSigningProfileInput, optFns ...func(*Options)) (*PutSigningProfileOutput, error) { if params == nil { diff --git a/service/signer/api_op_SignPayload.go b/service/signer/api_op_SignPayload.go index 0b3e3138b2a..d61373ed522 100644 --- a/service/signer/api_op_SignPayload.go +++ b/service/signer/api_op_SignPayload.go @@ -38,7 +38,8 @@ type SignPayloadInput struct { // This member is required. Payload []byte - // Payload content type + // Payload content type. The single valid type is + // application/vnd.cncf.notary.payload.v1+json . // // This member is required. PayloadFormat *string @@ -62,9 +63,7 @@ type SignPayloadOutput struct { // The AWS account ID of the job owner. JobOwner *string - // Information including the signing profile ARN and the signing job ID. Clients - // use metadata to signature records, for example, as annotations added to the - // signature manifest inside an OCI registry. + // Information including the signing profile ARN and the signing job ID. Metadata map[string]string // A cryptographic signature. diff --git a/service/signer/api_op_StartSigningJob.go b/service/signer/api_op_StartSigningJob.go index 275fdb02635..cd53999247a 100644 --- a/service/signer/api_op_StartSigningJob.go +++ b/service/signer/api_op_StartSigningJob.go @@ -23,12 +23,12 @@ import ( // Creating a Bucket (http://docs.aws.amazon.com/AmazonS3/latest/gsg/CreatingABucket.html) // in the Amazon S3 Getting Started Guide. // - Your S3 source bucket must be version enabled. -// - You must create an S3 destination bucket. Code signing uses your S3 +// - You must create an S3 destination bucket. AWS Signer uses your S3 // destination bucket to write your signed code. // - You specify the name of the source and destination buckets when calling the // StartSigningJob operation. -// - You must also specify a request token that identifies your request to code -// signing. +// - You must also specify a request token that identifies your request to +// Signer. // // You can call the DescribeSigningJob and the ListSigningJobs actions after you // call StartSigningJob . For a Java example that shows how to use this action, see diff --git a/service/signer/doc.go b/service/signer/doc.go index 3ad3d17c53c..03f7cc7f48e 100644 --- a/service/signer/doc.go +++ b/service/signer/doc.go @@ -3,8 +3,8 @@ // Package signer provides the API client, operations, and parameter types for AWS // Signer. // -// AWS Signer is a fully managed code signing service to help you ensure the trust -// and integrity of your code. AWS Signer supports the following applications: With +// AWS Signer is a fully managed code-signing service to help you ensure the trust +// and integrity of your code. Signer supports the following applications: With // code signing for AWS Lambda, you can sign AWS Lambda (http://docs.aws.amazon.com/lambda/latest/dg/) // deployment packages. Integrated support is provided for Amazon S3 (http://docs.aws.amazon.com/AmazonS3/latest/gsg/) // , Amazon CloudWatch (http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/) @@ -15,9 +15,12 @@ // Amazon FreeRTOS (http://docs.aws.amazon.com/freertos/latest/userguide/) and AWS // IoT Device Management (http://docs.aws.amazon.com/iot/latest/developerguide/) , // and is integrated with AWS Certificate Manager (ACM) (http://docs.aws.amazon.com/acm/latest/userguide/) -// . In order to sign code, you import a third-party code signing certificate using +// . In order to sign code, you import a third-party code-signing certificate using // ACM, and use that to sign updates in Amazon FreeRTOS and AWS IoT Device -// Management. With code signing for containers …(TBD) For more information about -// AWS Signer, see the AWS Signer Developer Guide (https://docs.aws.amazon.com/signer/latest/developerguide/Welcome.html) -// . +// Management. With Signer and the Notation CLI from the Notary
 Project (https://notaryproject.dev/) +// , you can sign container images stored in a container registry such as Amazon +// Elastic Container Registry (ECR). The signatures are stored in the registry +// alongside the images, where they are available for verifying image authenticity +// and integrity. For more information about Signer, see the AWS Signer Developer +// Guide (https://docs.aws.amazon.com/signer/latest/developerguide/Welcome.html) . package signer diff --git a/service/signer/endpoints.go b/service/signer/endpoints.go index 0994b2430a2..1d926393d92 100644 --- a/service/signer/endpoints.go +++ b/service/signer/endpoints.go @@ -430,7 +430,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { uriString := func() string { var out strings.Builder out.WriteString("https://signer-fips.") diff --git a/service/signer/types/types.go b/service/signer/types/types.go index 77c4925343a..1970594d74a 100644 --- a/service/signer/types/types.go +++ b/service/signer/types/types.go @@ -17,16 +17,16 @@ type Destination struct { noSmithyDocumentSerde } -// The encryption algorithm options that are available to a code signing job. +// The encryption algorithm options that are available to a code-signing job. type EncryptionAlgorithmOptions struct { - // The set of accepted encryption algorithms that are allowed in a code signing + // The set of accepted encryption algorithms that are allowed in a code-signing // job. // // This member is required. AllowedValues []EncryptionAlgorithm - // The default encryption algorithm that is used by a code signing job. + // The default encryption algorithm that is used by a code-signing job. // // This member is required. DefaultValue EncryptionAlgorithm @@ -34,15 +34,15 @@ type EncryptionAlgorithmOptions struct { noSmithyDocumentSerde } -// The hash algorithms that are available to a code signing job. +// The hash algorithms that are available to a code-signing job. type HashAlgorithmOptions struct { - // The set of accepted hash algorithms allowed in a code signing job. + // The set of accepted hash algorithms allowed in a code-signing job. // // This member is required. AllowedValues []HashAlgorithm - // The default hash algorithm that is used in a code signing job. + // The default hash algorithm that is used in a code-signing job. // // This member is required. DefaultValue HashAlgorithm @@ -68,21 +68,21 @@ type Permission struct { noSmithyDocumentSerde } -// The name and prefix of the S3 bucket where code signing saves your signed +// The name and prefix of the Amazon S3 bucket where AWS Signer saves your signed // objects. type S3Destination struct { // Name of the S3 bucket. BucketName *string - // An Amazon S3 prefix that you can use to limit responses to those that begin - // with the specified prefix. + // An S3 prefix that you can use to limit responses to those that begin with the + // specified prefix. Prefix *string noSmithyDocumentSerde } -// The S3 bucket name and key where code signing saved your signed code image. +// The Amazon S3 bucket name and key where Signer saved your signed code image. type S3SignedObject struct { // Name of the S3 bucket. @@ -94,7 +94,7 @@ type S3SignedObject struct { noSmithyDocumentSerde } -// Information about the S3 bucket where you saved your unsigned code. +// Information about the Amazon S3 bucket where you saved your unsigned code. type S3Source struct { // Name of the S3 bucket. @@ -137,15 +137,15 @@ type SignedObject struct { noSmithyDocumentSerde } -// The configuration of a code signing operation. +// The configuration of a signing operation. type SigningConfiguration struct { - // The encryption algorithm options that are available for a code signing job. + // The encryption algorithm options that are available for a code-signing job. // // This member is required. EncryptionAlgorithmOptions *EncryptionAlgorithmOptions - // The hash algorithm options that are available for a code signing job. + // The hash algorithm options that are available for a code-signing job. // // This member is required. HashAlgorithmOptions *HashAlgorithmOptions @@ -157,26 +157,26 @@ type SigningConfiguration struct { // of a signing job. type SigningConfigurationOverrides struct { - // A specified override of the default encryption algorithm that is used in a code - // signing job. + // A specified override of the default encryption algorithm that is used in a + // code-signing job. EncryptionAlgorithm EncryptionAlgorithm - // A specified override of the default hash algorithm that is used in a code - // signing job. + // A specified override of the default hash algorithm that is used in a + // code-signing job. HashAlgorithm HashAlgorithm noSmithyDocumentSerde } -// The image format of a code signing platform or profile. +// The image format of a AWS Signer platform or profile. type SigningImageFormat struct { - // The default format of a code signing image. + // The default format of a signing image. // // This member is required. DefaultFormat ImageFormat - // The supported formats of a code signing image. + // The supported formats of a signing image. // // This member is required. SupportedFormats []ImageFormat @@ -262,41 +262,41 @@ type SigningMaterial struct { } // Contains information about the signing configurations and parameters that are -// used to perform a code signing job. +// used to perform a code-signing job. type SigningPlatform struct { - // The category of a code signing platform. + // The category of a signing platform. Category Category - // The display name of a code signing platform. + // The display name of a signing platform. DisplayName *string - // The maximum size (in MB) of code that can be signed by a code signing platform. + // The maximum size (in MB) of code that can be signed by a signing platform. MaxSizeInMB int32 - // Any partner entities linked to a code signing platform. + // Any partner entities linked to a signing platform. Partner *string - // The ID of a code signing platform. + // The ID of a signing platform. PlatformId *string // Indicates whether revocation is supported for the platform. RevocationSupported bool - // The configuration of a code signing platform. This includes the designated hash + // The configuration of a signing platform. This includes the designated hash // algorithm and encryption algorithm of a signing platform. SigningConfiguration *SigningConfiguration - // The image format of a code signing platform or profile. + // The image format of a AWS Signer platform or profile. SigningImageFormat *SigningImageFormat - // The types of targets that can be signed by a code signing platform. + // The types of targets that can be signed by a signing platform. Target *string noSmithyDocumentSerde } -// Any overrides that are applied to the signing configuration of a code signing +// Any overrides that are applied to the signing configuration of a signing // platform. type SigningPlatformOverrides struct { @@ -314,7 +314,7 @@ type SigningPlatformOverrides struct { noSmithyDocumentSerde } -// Contains information about the ACM certificates and code signing configuration +// Contains information about the ACM certificates and signing configuration // parameters that can be used by a given code signing user. type SigningProfile struct { @@ -342,10 +342,10 @@ type SigningProfile struct { // The ACM certificate that is available for use by a signing profile. SigningMaterial *SigningMaterial - // The parameters that are available for use by a code signing user. + // The parameters that are available for use by a Signer user. SigningParameters map[string]string - // The status of a code signing profile. + // The status of a signing profile. Status SigningProfileStatus // A list of tags associated with the signing profile.