From 81664391263eb5e42e76689f77528dede681daae Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Thu, 17 Nov 2022 19:15:20 +0000 Subject: [PATCH] Regenerated Clients --- .../0709d66e172e48299ccbb9e0c12b1a0c.json | 8 + .../15bc823beef64d2c85e5296f5c436d1a.json | 8 + .../185543fe3a9a4b47ae76d4664acc015a.json | 8 + .../1c90d9049a4b4a9eaed892bab19fe91b.json | 8 + .../25d2d240c59845228963b43d843f37f4.json | 8 + .../613ca9cc7c7644d180138537f1341cc9.json | 8 + .../63c3e770356d4cfe8b06ecd32a8b4251.json | 8 + .../65a239c7b3dd4d92a440d25aa16d6c4e.json | 8 + .../6943b91bdabf4d50a02f33ff80d2e0b7.json | 8 + .../837f1d402c914aeca0feb8f7c86df585.json | 8 + .../9d08a2a69b984196a1de343ff14aa7c0.json | 8 + .../9defc6d1fe0a4fd1812c73318fbb414f.json | 8 + .../a119ce5937c14f2ab7858ed117d073b4.json | 8 + .../a5cc8720b1764530a1e59691f21aea44.json | 8 + .../b19a17f9cef74f88b4e0000ae0e9451b.json | 8 + .../d511d1090c8b4c1da07022be395385a1.json | 8 + .../ded8f31b212d4ffca74ba68e42c2c2fe.json | 8 + .../e0d76d9a608d42849d8ca5c3ca13a558.json | 8 + .../e45f068af28a4305a28ba9605b71b9a5.json | 8 + service/amplify/api_op_CreateApp.go | 5 +- service/amplify/api_op_UpdateApp.go | 5 +- service/amplify/types/enums.go | 2 + service/amplify/types/types.go | 5 +- service/appflow/api_op_CreateFlow.go | 5 + service/appflow/api_op_DescribeFlow.go | 21 + service/appflow/api_op_UpdateFlow.go | 5 + service/appflow/deserializers.go | 327 ++ service/appflow/serializers.go | 73 + service/appflow/types/enums.go | 38 + service/appflow/types/types.go | 135 +- service/appflow/validators.go | 48 + service/appsync/api_op_CreateFunction.go | 20 +- service/appsync/api_op_CreateResolver.go | 9 + service/appsync/api_op_EvaluateCode.go | 151 + .../appsync/api_op_EvaluateMappingTemplate.go | 4 + service/appsync/api_op_UpdateFunction.go | 20 +- service/appsync/api_op_UpdateResolver.go | 9 + service/appsync/deserializers.go | 547 ++++ service/appsync/generated.json | 1 + service/appsync/serializers.go | 150 + service/appsync/types/enums.go | 32 + service/appsync/types/errors.go | 3 + service/appsync/types/types.go | 94 +- service/appsync/validators.go | 89 +- .../api_op_CreateEndpoint.go | 6 +- .../api_op_CreateReplicationInstance.go | 5 + .../api_op_ModifyEndpoint.go | 10 +- .../api_op_ModifyReplicationInstance.go | 5 + .../databasemigrationservice/deserializers.go | 116 + .../databasemigrationservice/serializers.go | 10 + .../databasemigrationservice/types/types.go | 62 +- .../internal/endpoints/endpoints.go | 3 + service/ec2/api_op_CreateFlowLogs.go | 28 +- service/ec2/api_op_CreateNatGateway.go | 4 + service/ec2/serializers.go | 5 + service/ec2/types/types.go | 148 +- .../api_op_CreateTargetGroup.go | 40 +- .../api_op_ModifyTargetGroup.go | 15 +- service/elasticloadbalancingv2/types/types.go | 261 +- .../emrserverless/api_op_CreateApplication.go | 3 + .../emrserverless/api_op_UpdateApplication.go | 3 + service/emrserverless/deserializers.go | 18 + service/emrserverless/serializers.go | 10 + service/emrserverless/types/enums.go | 18 + service/emrserverless/types/types.go | 6 + service/ivschat/api_op_CreateChatToken.go | 16 +- .../api_op_CreateLoggingConfiguration.go | 165 + service/ivschat/api_op_CreateRoom.go | 14 +- .../api_op_DeleteLoggingConfiguration.go | 116 + .../ivschat/api_op_GetLoggingConfiguration.go | 151 + service/ivschat/api_op_GetRoom.go | 3 + .../api_op_ListLoggingConfigurations.go | 218 ++ service/ivschat/api_op_ListRooms.go | 3 + service/ivschat/api_op_ListTagsForResource.go | 3 +- service/ivschat/api_op_TagResource.go | 3 +- service/ivschat/api_op_UntagResource.go | 3 +- .../api_op_UpdateLoggingConfiguration.go | 158 + service/ivschat/api_op_UpdateRoom.go | 17 +- service/ivschat/deserializers.go | 1503 ++++++++- service/ivschat/doc.go | 88 +- service/ivschat/generated.json | 6 + service/ivschat/serializers.go | 467 +++ service/ivschat/types/enums.go | 62 + service/ivschat/types/types.go | 135 +- service/ivschat/types/types_exported_test.go | 34 + service/ivschat/validators.go | 240 ++ .../lambda/api_op_CreateCodeSigningConfig.go | 2 +- .../lambda/api_op_CreateEventSourceMapping.go | 32 +- service/lambda/api_op_CreateFunction.go | 1 + .../lambda/api_op_DeleteEventSourceMapping.go | 16 +- .../lambda/api_op_GetEventSourceMapping.go | 16 +- .../lambda/api_op_GetFunctionConfiguration.go | 1 + .../api_op_GetProvisionedConcurrencyConfig.go | 4 +- service/lambda/api_op_PublishVersion.go | 1 + .../api_op_PutProvisionedConcurrencyConfig.go | 4 +- .../lambda/api_op_UpdateEventSourceMapping.go | 32 +- service/lambda/api_op_UpdateFunctionCode.go | 1 + .../api_op_UpdateFunctionConfiguration.go | 1 + service/lambda/types/enums.go | 2 + service/lambda/types/types.go | 67 +- .../api_op_CreateDatasetImportJob.go | 4 + .../api_op_CreateMetricAttribution.go | 145 + .../api_op_CreateSolutionVersion.go | 3 + .../api_op_DeleteMetricAttribution.go | 116 + .../api_op_DescribeMetricAttribution.go | 121 + .../api_op_ListMetricAttributionMetrics.go | 223 ++ .../api_op_ListMetricAttributions.go | 219 ++ .../api_op_UpdateMetricAttribution.go | 128 + service/personalize/deserializers.go | 2713 ++++++++++++----- service/personalize/generated.json | 6 + service/personalize/serializers.go | 537 ++++ service/personalize/types/types.go | 112 + service/personalize/validators.go | 238 ++ service/polly/types/enums.go | 6 + service/rum/api_op_CreateAppMonitor.go | 6 + service/rum/api_op_UpdateAppMonitor.go | 6 + service/rum/deserializers.go | 45 + service/rum/serializers.go | 26 + service/rum/types/enums.go | 18 + service/rum/types/types.go | 15 + service/s3control/api_op_GetAccessPoint.go | 3 +- .../api_op_GetStorageLensConfiguration.go | 9 +- .../api_op_PutStorageLensConfiguration.go | 9 +- service/s3control/deserializers.go | 192 ++ service/s3control/serializers.go | 126 + service/s3control/types/types.go | 153 +- service/secretsmanager/api_op_DeleteSecret.go | 4 +- service/secretsmanager/api_op_ListSecrets.go | 2 +- service/secretsmanager/api_op_RotateSecret.go | 12 +- service/secretsmanager/types/types.go | 45 +- service/securityhub/deserializers.go | 32 + service/securityhub/serializers.go | 22 + service/securityhub/types/types.go | 16 +- .../api_op_GetConfiguration.go | 112 + .../api_op_ListAssociatedResources.go | 7 +- ...pi_op_ListAttributeGroupsForApplication.go | 2 +- .../api_op_PutConfiguration.go | 117 + .../deserializers.go | 375 ++- .../servicecatalogappregistry/generated.json | 2 + .../servicecatalogappregistry/serializers.go | 142 + .../servicecatalogappregistry/types/enums.go | 4 +- .../servicecatalogappregistry/types/types.go | 40 +- .../servicecatalogappregistry/validators.go | 39 + service/sts/api_op_AssumeRole.go | 87 +- service/sts/api_op_AssumeRoleWithSAML.go | 74 +- .../sts/api_op_AssumeRoleWithWebIdentity.go | 74 +- service/sts/api_op_GetFederationToken.go | 87 +- service/textract/api_op_AnalyzeDocument.go | 15 +- service/textract/types/enums.go | 10 +- service/textract/types/types.go | 4 + .../internal/endpoints/endpoints.go | 5 + .../voiceid/internal/endpoints/endpoints.go | 16 +- .../api_op_CreateStandbyWorkspaces.go | 129 + service/workspaces/deserializers.go | 555 ++++ service/workspaces/generated.json | 1 + service/workspaces/serializers.go | 116 + service/workspaces/types/enums.go | 57 + service/workspaces/types/types.go | 88 + service/workspaces/validators.go | 86 + 159 files changed, 12434 insertions(+), 1433 deletions(-) create mode 100644 .changelog/0709d66e172e48299ccbb9e0c12b1a0c.json create mode 100644 .changelog/15bc823beef64d2c85e5296f5c436d1a.json create mode 100644 .changelog/185543fe3a9a4b47ae76d4664acc015a.json create mode 100644 .changelog/1c90d9049a4b4a9eaed892bab19fe91b.json create mode 100644 .changelog/25d2d240c59845228963b43d843f37f4.json create mode 100644 .changelog/613ca9cc7c7644d180138537f1341cc9.json create mode 100644 .changelog/63c3e770356d4cfe8b06ecd32a8b4251.json create mode 100644 .changelog/65a239c7b3dd4d92a440d25aa16d6c4e.json create mode 100644 .changelog/6943b91bdabf4d50a02f33ff80d2e0b7.json create mode 100644 .changelog/837f1d402c914aeca0feb8f7c86df585.json create mode 100644 .changelog/9d08a2a69b984196a1de343ff14aa7c0.json create mode 100644 .changelog/9defc6d1fe0a4fd1812c73318fbb414f.json create mode 100644 .changelog/a119ce5937c14f2ab7858ed117d073b4.json create mode 100644 .changelog/a5cc8720b1764530a1e59691f21aea44.json create mode 100644 .changelog/b19a17f9cef74f88b4e0000ae0e9451b.json create mode 100644 .changelog/d511d1090c8b4c1da07022be395385a1.json create mode 100644 .changelog/ded8f31b212d4ffca74ba68e42c2c2fe.json create mode 100644 .changelog/e0d76d9a608d42849d8ca5c3ca13a558.json create mode 100644 .changelog/e45f068af28a4305a28ba9605b71b9a5.json create mode 100644 service/appsync/api_op_EvaluateCode.go create mode 100644 service/ivschat/api_op_CreateLoggingConfiguration.go create mode 100644 service/ivschat/api_op_DeleteLoggingConfiguration.go create mode 100644 service/ivschat/api_op_GetLoggingConfiguration.go create mode 100644 service/ivschat/api_op_ListLoggingConfigurations.go create mode 100644 service/ivschat/api_op_UpdateLoggingConfiguration.go create mode 100644 service/ivschat/types/types_exported_test.go create mode 100644 service/personalize/api_op_CreateMetricAttribution.go create mode 100644 service/personalize/api_op_DeleteMetricAttribution.go create mode 100644 service/personalize/api_op_DescribeMetricAttribution.go create mode 100644 service/personalize/api_op_ListMetricAttributionMetrics.go create mode 100644 service/personalize/api_op_ListMetricAttributions.go create mode 100644 service/personalize/api_op_UpdateMetricAttribution.go create mode 100644 service/servicecatalogappregistry/api_op_GetConfiguration.go create mode 100644 service/servicecatalogappregistry/api_op_PutConfiguration.go create mode 100644 service/workspaces/api_op_CreateStandbyWorkspaces.go diff --git a/.changelog/0709d66e172e48299ccbb9e0c12b1a0c.json b/.changelog/0709d66e172e48299ccbb9e0c12b1a0c.json new file mode 100644 index 00000000000..487cbeb68f3 --- /dev/null +++ b/.changelog/0709d66e172e48299ccbb9e0c12b1a0c.json @@ -0,0 +1,8 @@ +{ + "id": "0709d66e-172e-4829-9ccb-b9e0c12b1a0c", + "type": "documentation", + "description": "Documentation updates for Secrets Manager.", + "modules": [ + "service/secretsmanager" + ] +} \ No newline at end of file diff --git a/.changelog/15bc823beef64d2c85e5296f5c436d1a.json b/.changelog/15bc823beef64d2c85e5296f5c436d1a.json new file mode 100644 index 00000000000..ce430857cf5 --- /dev/null +++ b/.changelog/15bc823beef64d2c85e5296f5c436d1a.json @@ -0,0 +1,8 @@ +{ + "id": "15bc823b-eef6-4d2c-85e5-296f5c436d1a", + "type": "feature", + "description": "Add Node 18 (nodejs18.x) support to AWS Lambda.", + "modules": [ + "service/lambda" + ] +} \ No newline at end of file diff --git a/.changelog/185543fe3a9a4b47ae76d4664acc015a.json b/.changelog/185543fe3a9a4b47ae76d4664acc015a.json new file mode 100644 index 00000000000..a9350307351 --- /dev/null +++ b/.changelog/185543fe3a9a4b47ae76d4664acc015a.json @@ -0,0 +1,8 @@ +{ + "id": "185543fe-3a9a-4b47-ae76-d4664acc015a", + "type": "feature", + "description": "This release provides support for creation and use of metric attributions in AWS Personalize", + "modules": [ + "service/personalize" + ] +} \ No newline at end of file diff --git a/.changelog/1c90d9049a4b4a9eaed892bab19fe91b.json b/.changelog/1c90d9049a4b4a9eaed892bab19fe91b.json new file mode 100644 index 00000000000..c34c82bc4fa --- /dev/null +++ b/.changelog/1c90d9049a4b4a9eaed892bab19fe91b.json @@ -0,0 +1,8 @@ +{ + "id": "1c90d904-9a4b-4a9e-aed8-92bab19fe91b", + "type": "feature", + "description": "Added SourceLayerArn and SourceLayerHash field for security findings. Updated AwsLambdaFunction Resource detail", + "modules": [ + "service/securityhub" + ] +} \ No newline at end of file diff --git a/.changelog/25d2d240c59845228963b43d843f37f4.json b/.changelog/25d2d240c59845228963b43d843f37f4.json new file mode 100644 index 00000000000..1a9a64b1e3d --- /dev/null +++ b/.changelog/25d2d240c59845228963b43d843f37f4.json @@ -0,0 +1,8 @@ +{ + "id": "25d2d240-c598-4522-8963-b43d843f37f4", + "type": "feature", + "description": "This release adds support for specifying and extracting information from documents using the Signatures feature within Analyze Document API", + "modules": [ + "service/textract" + ] +} \ No newline at end of file diff --git a/.changelog/613ca9cc7c7644d180138537f1341cc9.json b/.changelog/613ca9cc7c7644d180138537f1341cc9.json new file mode 100644 index 00000000000..8e71303b735 --- /dev/null +++ b/.changelog/613ca9cc7c7644d180138537f1341cc9.json @@ -0,0 +1,8 @@ +{ + "id": "613ca9cc-7c76-44d1-8013-8537f1341cc9", + "type": "documentation", + "description": "Provides new target group attributes to turn on/off cross zone load balancing and configure target group health for Network Load Balancers and Application Load Balancers. Provides improvements to health check configuration for Network Load Balancers.", + "modules": [ + "service/elasticloadbalancingv2" + ] +} \ No newline at end of file diff --git a/.changelog/63c3e770356d4cfe8b06ecd32a8b4251.json b/.changelog/63c3e770356d4cfe8b06ecd32a8b4251.json new file mode 100644 index 00000000000..e3884e93004 --- /dev/null +++ b/.changelog/63c3e770356d4cfe8b06ecd32a8b4251.json @@ -0,0 +1,8 @@ +{ + "id": "63c3e770-356d-4cfe-8b06-ecd32a8b4251", + "type": "feature", + "description": "This release introduces the APPSYNC_JS runtime, and adds support for JavaScript in AppSync functions and AppSync pipeline resolvers.", + "modules": [ + "service/appsync" + ] +} \ No newline at end of file diff --git a/.changelog/65a239c7b3dd4d92a440d25aa16d6c4e.json b/.changelog/65a239c7b3dd4d92a440d25aa16d6c4e.json new file mode 100644 index 00000000000..2cc76193669 --- /dev/null +++ b/.changelog/65a239c7b3dd4d92a440d25aa16d6c4e.json @@ -0,0 +1,8 @@ +{ + "id": "65a239c7-b3dd-4d92-a440-d25aa16d6c4e", + "type": "feature", + "description": "Adds LoggingConfiguration APIs for IVS Chat - a feature that allows customers to store and record sent messages in a chat room to S3 buckets, CloudWatch logs, or Kinesis firehose.", + "modules": [ + "service/ivschat" + ] +} \ No newline at end of file diff --git a/.changelog/6943b91bdabf4d50a02f33ff80d2e0b7.json b/.changelog/6943b91bdabf4d50a02f33ff80d2e0b7.json new file mode 100644 index 00000000000..a2740dd141a --- /dev/null +++ b/.changelog/6943b91bdabf4d50a02f33ff80d2e0b7.json @@ -0,0 +1,8 @@ +{ + "id": "6943b91b-dabf-4d50-a02f-33ff80d2e0b7", + "type": "documentation", + "description": "Documentation updates for AWS Security Token Service.", + "modules": [ + "service/sts" + ] +} \ No newline at end of file diff --git a/.changelog/837f1d402c914aeca0feb8f7c86df585.json b/.changelog/837f1d402c914aeca0feb8f7c86df585.json new file mode 100644 index 00000000000..d4dfe09e384 --- /dev/null +++ b/.changelog/837f1d402c914aeca0feb8f7c86df585.json @@ -0,0 +1,8 @@ +{ + "id": "837f1d40-2c91-4aec-a0fe-b8f7c86df585", + "type": "feature", + "description": "Add two new neural voices - Ola (pl-PL) and Hala (ar-AE).", + "modules": [ + "service/polly" + ] +} \ No newline at end of file diff --git a/.changelog/9d08a2a69b984196a1de343ff14aa7c0.json b/.changelog/9d08a2a69b984196a1de343ff14aa7c0.json new file mode 100644 index 00000000000..0c253f32a4c --- /dev/null +++ b/.changelog/9d08a2a69b984196a1de343ff14aa7c0.json @@ -0,0 +1,8 @@ +{ + "id": "9d08a2a6-9b98-4196-a1de-343ff14aa7c0", + "type": "feature", + "description": "The release introduces CreateStandbyWorkspaces, an API that allows you to create standby WorkSpaces associated with a primary WorkSpace in another Region. DescribeWorkspaces now includes related WorkSpaces properties. DescribeWorkspaceBundles and CreateWorkspaceBundle now return more bundle details.", + "modules": [ + "service/workspaces" + ] +} \ No newline at end of file diff --git a/.changelog/9defc6d1fe0a4fd1812c73318fbb414f.json b/.changelog/9defc6d1fe0a4fd1812c73318fbb414f.json new file mode 100644 index 00000000000..de111419946 --- /dev/null +++ b/.changelog/9defc6d1fe0a4fd1812c73318fbb414f.json @@ -0,0 +1,8 @@ +{ + "id": "9defc6d1-fe0a-4fd1-812c-73318fbb414f", + "type": "feature", + "description": "AppFlow simplifies the preparation and cataloging of SaaS data into the AWS Glue Data Catalog where your data can be discovered and accessed by AWS analytics and ML services. AppFlow now also supports data field partitioning and file size optimization to improve query performance and reduce cost.", + "modules": [ + "service/appflow" + ] +} \ No newline at end of file diff --git a/.changelog/a119ce5937c14f2ab7858ed117d073b4.json b/.changelog/a119ce5937c14f2ab7858ed117d073b4.json new file mode 100644 index 00000000000..4b33670fc23 --- /dev/null +++ b/.changelog/a119ce5937c14f2ab7858ed117d073b4.json @@ -0,0 +1,8 @@ +{ + "id": "a119ce59-37c1-4f2a-b785-8ed117d073b4", + "type": "feature", + "description": "This release adds a new optional parameter \"privateIpAddress\" for the CreateNatGateway API. PrivateIPAddress will allow customers to select a custom Private IPv4 address instead of having it be auto-assigned.", + "modules": [ + "service/ec2" + ] +} \ No newline at end of file diff --git a/.changelog/a5cc8720b1764530a1e59691f21aea44.json b/.changelog/a5cc8720b1764530a1e59691f21aea44.json new file mode 100644 index 00000000000..17dea6c07d1 --- /dev/null +++ b/.changelog/a5cc8720b1764530a1e59691f21aea44.json @@ -0,0 +1,8 @@ +{ + "id": "a5cc8720-b176-4530-a1e5-9691f21aea44", + "type": "feature", + "description": "Adds a new value (WEB_COMPUTE) to the Platform enum that allows customers to create Amplify Apps with Server-Side Rendering support.", + "modules": [ + "service/amplify" + ] +} \ No newline at end of file diff --git a/.changelog/b19a17f9cef74f88b4e0000ae0e9451b.json b/.changelog/b19a17f9cef74f88b4e0000ae0e9451b.json new file mode 100644 index 00000000000..c69ec8b9350 --- /dev/null +++ b/.changelog/b19a17f9cef74f88b4e0000ae0e9451b.json @@ -0,0 +1,8 @@ +{ + "id": "b19a17f9-cef7-4f88-b4e0-000ae0e9451b", + "type": "feature", + "description": "Added 34 new S3 Storage Lens metrics to support additional customer use cases.", + "modules": [ + "service/s3control" + ] +} \ No newline at end of file diff --git a/.changelog/d511d1090c8b4c1da07022be395385a1.json b/.changelog/d511d1090c8b4c1da07022be395385a1.json new file mode 100644 index 00000000000..a2962d278b0 --- /dev/null +++ b/.changelog/d511d1090c8b4c1da07022be395385a1.json @@ -0,0 +1,8 @@ +{ + "id": "d511d109-0c8b-4c1d-a070-22be395385a1", + "type": "feature", + "description": "Adds support for Internet Protocol Version 6 (IPv6) on DMS Replication Instances", + "modules": [ + "service/databasemigrationservice" + ] +} \ No newline at end of file diff --git a/.changelog/ded8f31b212d4ffca74ba68e42c2c2fe.json b/.changelog/ded8f31b212d4ffca74ba68e42c2c2fe.json new file mode 100644 index 00000000000..b8dbbdae253 --- /dev/null +++ b/.changelog/ded8f31b212d4ffca74ba68e42c2c2fe.json @@ -0,0 +1,8 @@ +{ + "id": "ded8f31b-212d-4ffc-a74b-a68e42c2c2fe", + "type": "feature", + "description": "This release adds support for tagged resource associations, which allows you to associate a group of resources with a defined resource tag key and value to the application.", + "modules": [ + "service/servicecatalogappregistry" + ] +} \ No newline at end of file diff --git a/.changelog/e0d76d9a608d42849d8ca5c3ca13a558.json b/.changelog/e0d76d9a608d42849d8ca5c3ca13a558.json new file mode 100644 index 00000000000..c9c156a4edc --- /dev/null +++ b/.changelog/e0d76d9a608d42849d8ca5c3ca13a558.json @@ -0,0 +1,8 @@ +{ + "id": "e0d76d9a-608d-4284-9d8c-a5c3ca13a558", + "type": "feature", + "description": "CloudWatch RUM now supports custom events. To use custom events, create an app monitor or update an app monitor with CustomEvent Status as ENABLED.", + "modules": [ + "service/rum" + ] +} \ No newline at end of file diff --git a/.changelog/e45f068af28a4305a28ba9605b71b9a5.json b/.changelog/e45f068af28a4305a28ba9605b71b9a5.json new file mode 100644 index 00000000000..24dbb62972c --- /dev/null +++ b/.changelog/e45f068af28a4305a28ba9605b71b9a5.json @@ -0,0 +1,8 @@ +{ + "id": "e45f068a-f28a-4305-a28b-a9605b71b9a5", + "type": "feature", + "description": "Adds support for AWS Graviton2 based applications. You can now select CPU architecture when creating new applications or updating existing ones.", + "modules": [ + "service/emrserverless" + ] +} \ No newline at end of file diff --git a/service/amplify/api_op_CreateApp.go b/service/amplify/api_op_CreateApp.go index ead9e1ce896..51aae1f8e4c 100644 --- a/service/amplify/api_op_CreateApp.go +++ b/service/amplify/api_op_CreateApp.go @@ -105,7 +105,10 @@ type CreateAppInput struct { // in the Amplify User Guide . OauthToken *string - // The platform or framework for an Amplify app. + // The platform for the Amplify app. For a static app, set the platform type to + // WEB. For a dynamic server-side rendered (SSR) app, set the platform type to + // WEB_COMPUTE. For an app requiring Amplify Hosting's original SSR support only, + // set the platform type to WEB_DYNAMIC. Platform types.Platform // The repository for an Amplify app. diff --git a/service/amplify/api_op_UpdateApp.go b/service/amplify/api_op_UpdateApp.go index e548b1038f8..7fc405cdbb9 100644 --- a/service/amplify/api_op_UpdateApp.go +++ b/service/amplify/api_op_UpdateApp.go @@ -105,7 +105,10 @@ type UpdateAppInput struct { // in the Amplify User Guide . OauthToken *string - // The platform for an Amplify app. + // The platform for the Amplify app. For a static app, set the platform type to + // WEB. For a dynamic server-side rendered (SSR) app, set the platform type to + // WEB_COMPUTE. For an app requiring Amplify Hosting's original SSR support only, + // set the platform type to WEB_DYNAMIC. Platform types.Platform // The name of the repository for an Amplify app diff --git a/service/amplify/types/enums.go b/service/amplify/types/enums.go index d18e1b06662..59dbb9dbbb9 100644 --- a/service/amplify/types/enums.go +++ b/service/amplify/types/enums.go @@ -88,6 +88,7 @@ type Platform string const ( PlatformWeb Platform = "WEB" PlatformWebDynamic Platform = "WEB_DYNAMIC" + PlatformWebCompute Platform = "WEB_COMPUTE" ) // Values returns all known values for Platform. Note that this can be expanded in @@ -97,6 +98,7 @@ func (Platform) Values() []Platform { return []Platform{ "WEB", "WEB_DYNAMIC", + "WEB_COMPUTE", } } diff --git a/service/amplify/types/types.go b/service/amplify/types/types.go index 1edaca26f89..6c2781bdec7 100644 --- a/service/amplify/types/types.go +++ b/service/amplify/types/types.go @@ -56,7 +56,10 @@ type App struct { // This member is required. Name *string - // The platform for the Amplify app. + // The platform for the Amplify app. For a static app, set the platform type to + // WEB. For a dynamic server-side rendered (SSR) app, set the platform type to + // WEB_COMPUTE. For an app requiring Amplify Hosting's original SSR support only, + // set the platform type to WEB_DYNAMIC. // // This member is required. Platform Platform diff --git a/service/appflow/api_op_CreateFlow.go b/service/appflow/api_op_CreateFlow.go index a55893aec2b..fee08dbe2a8 100644 --- a/service/appflow/api_op_CreateFlow.go +++ b/service/appflow/api_op_CreateFlow.go @@ -71,6 +71,11 @@ type CreateFlowInput struct { // the Amazon AppFlow-managed KMS key. KmsArn *string + // Specifies the configuration that Amazon AppFlow uses when it catalogs the data + // that's transferred by the associated flow. When Amazon AppFlow catalogs the data + // from a flow, it stores metadata in a data catalog. + MetadataCatalogConfig *types.MetadataCatalogConfig + // The tags used to organize, track, or control access for your flow. Tags map[string]string diff --git a/service/appflow/api_op_DescribeFlow.go b/service/appflow/api_op_DescribeFlow.go index 1147648b20d..01553c0eb69 100644 --- a/service/appflow/api_op_DescribeFlow.go +++ b/service/appflow/api_op_DescribeFlow.go @@ -77,12 +77,33 @@ type DescribeFlowOutput struct { // Describes the details of the most recent flow run. LastRunExecutionDetails *types.ExecutionDetails + // Describes the metadata catalog, metadata table, and data partitions that Amazon + // AppFlow used for the associated flow run. + LastRunMetadataCatalogDetails []types.MetadataCatalogDetail + // Specifies when the flow was last updated. LastUpdatedAt *time.Time // Specifies the user name of the account that performed the most recent update. LastUpdatedBy *string + // Specifies the configuration that Amazon AppFlow uses when it catalogs the data + // that's transferred by the associated flow. When Amazon AppFlow catalogs the data + // from a flow, it stores metadata in a data catalog. + MetadataCatalogConfig *types.MetadataCatalogConfig + + // The version number of your data schema. Amazon AppFlow assigns this version + // number. The version number increases by one when you change any of the following + // settings in your flow configuration: + // + // * Source-to-destination field mappings + // + // * + // Field data types + // + // * Partition keys + SchemaVersion *int64 + // The configuration that controls how Amazon AppFlow retrieves data from the // source connector. SourceFlowConfig *types.SourceFlowConfig diff --git a/service/appflow/api_op_UpdateFlow.go b/service/appflow/api_op_UpdateFlow.go index 8e65e253b18..6fd328acab7 100644 --- a/service/appflow/api_op_UpdateFlow.go +++ b/service/appflow/api_op_UpdateFlow.go @@ -61,6 +61,11 @@ type UpdateFlowInput struct { // A description of the flow. Description *string + // Specifies the configuration that Amazon AppFlow uses when it catalogs the data + // that's transferred by the associated flow. When Amazon AppFlow catalogs the data + // from a flow, it stores metadata in a data catalog. + MetadataCatalogConfig *types.MetadataCatalogConfig + noSmithyDocumentSerde } diff --git a/service/appflow/deserializers.go b/service/appflow/deserializers.go index 637a40eb86c..ec74ae081c8 100644 --- a/service/appflow/deserializers.go +++ b/service/appflow/deserializers.go @@ -1399,6 +1399,11 @@ func awsRestjson1_deserializeOpDocumentDescribeFlowOutput(v **DescribeFlowOutput return err } + case "lastRunMetadataCatalogDetails": + if err := awsRestjson1_deserializeDocumentMetadataCatalogDetails(&sv.LastRunMetadataCatalogDetails, value); err != nil { + return err + } + case "lastUpdatedAt": if value != nil { switch jtv := value.(type) { @@ -1424,6 +1429,24 @@ func awsRestjson1_deserializeOpDocumentDescribeFlowOutput(v **DescribeFlowOutput sv.LastUpdatedBy = ptr.String(jtv) } + case "metadataCatalogConfig": + if err := awsRestjson1_deserializeDocumentMetadataCatalogConfig(&sv.MetadataCatalogConfig, value); err != nil { + return err + } + + case "schemaVersion": + 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.SchemaVersion = ptr.Int64(i64) + } + case "sourceFlowConfig": if err := awsRestjson1_deserializeDocumentSourceFlowConfig(&sv.SourceFlowConfig, value); err != nil { return err @@ -3797,6 +3820,19 @@ func awsRestjson1_deserializeDocumentAggregationConfig(v **types.AggregationConf sv.AggregationType = types.AggregationType(jtv) } + case "targetFileSize": + 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.TargetFileSize = ptr.Int64(i64) + } + default: _, _ = key, value @@ -7043,6 +7079,11 @@ func awsRestjson1_deserializeDocumentExecutionRecord(v **types.ExecutionRecord, } } + case "metadataCatalogDetails": + if err := awsRestjson1_deserializeDocumentMetadataCatalogDetails(&sv.MetadataCatalogDetails, value); err != nil { + return err + } + case "startedAt": if value != nil { switch jtv := value.(type) { @@ -7497,6 +7538,64 @@ func awsRestjson1_deserializeDocumentFlowList(v *[]types.FlowDefinition, value i return nil } +func awsRestjson1_deserializeDocumentGlueDataCatalogConfig(v **types.GlueDataCatalogConfig, 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.GlueDataCatalogConfig + if *v == nil { + sv = &types.GlueDataCatalogConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "databaseName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GlueDataCatalogDatabaseName to be of type string, got %T instead", value) + } + sv.DatabaseName = ptr.String(jtv) + } + + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GlueDataCatalogIAMRole to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + case "tablePrefix": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GlueDataCatalogTablePrefix to be of type string, got %T instead", value) + } + sv.TablePrefix = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentGoogleAnalyticsConnectorProfileProperties(v **types.GoogleAnalyticsConnectorProfileProperties, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8170,6 +8269,135 @@ func awsRestjson1_deserializeDocumentMarketoSourceProperties(v **types.MarketoSo return nil } +func awsRestjson1_deserializeDocumentMetadataCatalogConfig(v **types.MetadataCatalogConfig, 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.MetadataCatalogConfig + if *v == nil { + sv = &types.MetadataCatalogConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "glueDataCatalog": + if err := awsRestjson1_deserializeDocumentGlueDataCatalogConfig(&sv.GlueDataCatalog, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMetadataCatalogDetail(v **types.MetadataCatalogDetail, 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.MetadataCatalogDetail + if *v == nil { + sv = &types.MetadataCatalogDetail{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "catalogType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CatalogType to be of type string, got %T instead", value) + } + sv.CatalogType = types.CatalogType(jtv) + } + + case "partitionRegistrationOutput": + if err := awsRestjson1_deserializeDocumentRegistrationOutput(&sv.PartitionRegistrationOutput, value); err != nil { + return err + } + + case "tableName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.TableName = ptr.String(jtv) + } + + case "tableRegistrationOutput": + if err := awsRestjson1_deserializeDocumentRegistrationOutput(&sv.TableRegistrationOutput, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMetadataCatalogDetails(v *[]types.MetadataCatalogDetail, 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.MetadataCatalogDetail + if *v == nil { + cv = []types.MetadataCatalogDetail{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MetadataCatalogDetail + destAddr := &col + if err := awsRestjson1_deserializeDocumentMetadataCatalogDetail(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentOAuth2CustomParameter(v **types.OAuth2CustomParameter, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8530,6 +8758,42 @@ func awsRestjson1_deserializeDocumentOAuthScopeList(v *[]string, value interface return nil } +func awsRestjson1_deserializeDocumentPathPrefixHierarchy(v *[]types.PathPrefix, 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.PathPrefix + if *v == nil { + cv = []types.PathPrefix{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PathPrefix + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PathPrefix to be of type string, got %T instead", value) + } + col = types.PathPrefix(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentPrefixConfig(v **types.PrefixConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8552,6 +8816,11 @@ func awsRestjson1_deserializeDocumentPrefixConfig(v **types.PrefixConfig, value for key, value := range shape { switch key { + case "pathPrefixHierarchy": + if err := awsRestjson1_deserializeDocumentPathPrefixHierarchy(&sv.PathPrefixHierarchy, value); err != nil { + return err + } + case "prefixFormat": if value != nil { jtv, ok := value.(string) @@ -8969,6 +9238,64 @@ func awsRestjson1_deserializeDocumentRegionList(v *[]string, value interface{}) return nil } +func awsRestjson1_deserializeDocumentRegistrationOutput(v **types.RegistrationOutput, 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.RegistrationOutput + if *v == nil { + sv = &types.RegistrationOutput{} + } 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 String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "result": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Result = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExecutionStatus to be of type string, got %T instead", value) + } + sv.Status = types.ExecutionStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/appflow/serializers.go b/service/appflow/serializers.go index 2b0dc768559..1a49fa39ec4 100644 --- a/service/appflow/serializers.go +++ b/service/appflow/serializers.go @@ -192,6 +192,13 @@ func awsRestjson1_serializeOpDocumentCreateFlowInput(v *CreateFlowInput, value s ok.String(*v.KmsArn) } + if v.MetadataCatalogConfig != nil { + ok := object.Key("metadataCatalogConfig") + if err := awsRestjson1_serializeDocumentMetadataCatalogConfig(v.MetadataCatalogConfig, ok); err != nil { + return err + } + } + if v.SourceFlowConfig != nil { ok := object.Key("sourceFlowConfig") if err := awsRestjson1_serializeDocumentSourceFlowConfig(v.SourceFlowConfig, ok); err != nil { @@ -1726,6 +1733,13 @@ func awsRestjson1_serializeOpDocumentUpdateFlowInput(v *UpdateFlowInput, value s ok.String(*v.FlowName) } + if v.MetadataCatalogConfig != nil { + ok := object.Key("metadataCatalogConfig") + if err := awsRestjson1_serializeDocumentMetadataCatalogConfig(v.MetadataCatalogConfig, ok); err != nil { + return err + } + } + if v.SourceFlowConfig != nil { ok := object.Key("sourceFlowConfig") if err := awsRestjson1_serializeDocumentSourceFlowConfig(v.SourceFlowConfig, ok); err != nil { @@ -1759,6 +1773,11 @@ func awsRestjson1_serializeDocumentAggregationConfig(v *types.AggregationConfig, ok.String(string(v.AggregationType)) } + if v.TargetFileSize != nil { + ok := object.Key("targetFileSize") + ok.Long(*v.TargetFileSize) + } + return nil } @@ -2693,6 +2712,28 @@ func awsRestjson1_serializeDocumentEventBridgeDestinationProperties(v *types.Eve return nil } +func awsRestjson1_serializeDocumentGlueDataCatalogConfig(v *types.GlueDataCatalogConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DatabaseName != nil { + ok := object.Key("databaseName") + ok.String(*v.DatabaseName) + } + + if v.RoleArn != nil { + ok := object.Key("roleArn") + ok.String(*v.RoleArn) + } + + if v.TablePrefix != nil { + ok := object.Key("tablePrefix") + ok.String(*v.TablePrefix) + } + + return nil +} + func awsRestjson1_serializeDocumentGoogleAnalyticsConnectorProfileCredentials(v *types.GoogleAnalyticsConnectorProfileCredentials, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2961,6 +3002,20 @@ func awsRestjson1_serializeDocumentMarketoSourceProperties(v *types.MarketoSourc return nil } +func awsRestjson1_serializeDocumentMetadataCatalogConfig(v *types.MetadataCatalogConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.GlueDataCatalog != nil { + ok := object.Key("glueDataCatalog") + if err := awsRestjson1_serializeDocumentGlueDataCatalogConfig(v.GlueDataCatalog, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentOAuth2Credentials(v *types.OAuth2Credentials, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3088,10 +3143,28 @@ func awsRestjson1_serializeDocumentOAuthScopeList(v []string, value smithyjson.V return nil } +func awsRestjson1_serializeDocumentPathPrefixHierarchy(v []types.PathPrefix, 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_serializeDocumentPrefixConfig(v *types.PrefixConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() + if v.PathPrefixHierarchy != nil { + ok := object.Key("pathPrefixHierarchy") + if err := awsRestjson1_serializeDocumentPathPrefixHierarchy(v.PathPrefixHierarchy, ok); err != nil { + return err + } + } + if len(v.PrefixFormat) > 0 { ok := object.Key("prefixFormat") ok.String(string(v.PrefixFormat)) diff --git a/service/appflow/types/enums.go b/service/appflow/types/enums.go index 8428de20059..d28f4a0b864 100644 --- a/service/appflow/types/enums.go +++ b/service/appflow/types/enums.go @@ -58,6 +58,22 @@ func (AuthenticationType) Values() []AuthenticationType { } } +type CatalogType string + +// Enum values for CatalogType +const ( + CatalogTypeGlue CatalogType = "GLUE" +) + +// Values returns all known values for CatalogType. 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 (CatalogType) Values() []CatalogType { + return []CatalogType{ + "GLUE", + } +} + type ConnectionMode string // Enum values for ConnectionMode @@ -545,6 +561,7 @@ const ( OperatorPropertiesKeysSubfieldCategoryMap OperatorPropertiesKeys = "SUBFIELD_CATEGORY_MAP" OperatorPropertiesKeysExcludeSourceFieldsList OperatorPropertiesKeys = "EXCLUDE_SOURCE_FIELDS_LIST" OperatorPropertiesKeysIncludeNewFields OperatorPropertiesKeys = "INCLUDE_NEW_FIELDS" + OperatorPropertiesKeysOrderedPartitionKeysList OperatorPropertiesKeys = "ORDERED_PARTITION_KEYS_LIST" ) // Values returns all known values for OperatorPropertiesKeys. Note that this can @@ -568,6 +585,7 @@ func (OperatorPropertiesKeys) Values() []OperatorPropertiesKeys { "SUBFIELD_CATEGORY_MAP", "EXCLUDE_SOURCE_FIELDS_LIST", "INCLUDE_NEW_FIELDS", + "ORDERED_PARTITION_KEYS_LIST", } } @@ -627,6 +645,24 @@ func (Operators) Values() []Operators { } } +type PathPrefix string + +// Enum values for PathPrefix +const ( + PathPrefixExecutionId PathPrefix = "EXECUTION_ID" + PathPrefixSchemaVersion PathPrefix = "SCHEMA_VERSION" +) + +// Values returns all known values for PathPrefix. 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 (PathPrefix) Values() []PathPrefix { + return []PathPrefix{ + "EXECUTION_ID", + "SCHEMA_VERSION", + } +} + type PrefixFormat string // Enum values for PrefixFormat @@ -1110,6 +1146,7 @@ const ( TaskTypePassthrough TaskType = "Passthrough" TaskTypeTruncate TaskType = "Truncate" TaskTypeValidate TaskType = "Validate" + TaskTypePartition TaskType = "Partition" ) // Values returns all known values for TaskType. Note that this can be expanded in @@ -1126,6 +1163,7 @@ func (TaskType) Values() []TaskType { "Passthrough", "Truncate", "Validate", + "Partition", } } diff --git a/service/appflow/types/types.go b/service/appflow/types/types.go index e5dcf1959d8..5336140133e 100644 --- a/service/appflow/types/types.go +++ b/service/appflow/types/types.go @@ -15,6 +15,12 @@ type AggregationConfig struct { // or leave them unaggregated. AggregationType AggregationType + // The desired file size, in MB, for each output file that Amazon AppFlow writes to + // the flow destination. For each file, Amazon AppFlow attempts to achieve the size + // that you specify. The actual file sizes might differ from this target based on + // the number and size of the records that each file contains. + TargetFileSize *int64 + noSmithyDocumentSerde } @@ -1093,6 +1099,10 @@ type ExecutionRecord struct { // Specifies the time of the most recent update. LastUpdatedAt *time.Time + // Describes the metadata catalog, metadata table, and data partitions that Amazon + // AppFlow used for the associated flow run. + MetadataCatalogDetails []MetadataCatalogDetail + // Specifies the start time of the flow run. StartedAt *time.Time @@ -1205,6 +1215,42 @@ type FlowDefinition struct { noSmithyDocumentSerde } +// Specifies the configuration that Amazon AppFlow uses when it catalogs your data +// with the Glue Data Catalog. When Amazon AppFlow catalogs your data, it stores +// metadata in Data Catalog tables. This metadata represents the data that's +// transferred by the flow that you configure with these settings. You can +// configure a flow with these settings only when the flow destination is Amazon +// S3. +type GlueDataCatalogConfig struct { + + // The name of the Data Catalog database that stores the metadata tables that + // Amazon AppFlow creates in your Amazon Web Services account. These tables contain + // metadata for the data that's transferred by the flow that you configure with + // this parameter. When you configure a new flow with this parameter, you must + // specify an existing database. + // + // This member is required. + DatabaseName *string + + // The Amazon Resource Name (ARN) of an IAM role that grants Amazon AppFlow the + // permissions it needs to create Data Catalog tables, databases, and partitions. + // For an example IAM policy that has the required permissions, see Identity-based + // policy examples for Amazon AppFlow + // (https://docs.aws.amazon.com/appflow/latest/userguide/security_iam_id-based-policy-examples.html). + // + // This member is required. + RoleArn *string + + // A naming prefix for each Data Catalog table that Amazon AppFlow creates for the + // flow that you configure with this setting. Amazon AppFlow adds the prefix to the + // beginning of the each table name. + // + // This member is required. + TablePrefix *string + + noSmithyDocumentSerde +} + // The connector-specific profile credentials required by Google Analytics. type GoogleAnalyticsConnectorProfileCredentials struct { @@ -1458,6 +1504,47 @@ type MarketoSourceProperties struct { noSmithyDocumentSerde } +// Specifies the configuration that Amazon AppFlow uses when it catalogs your data. +// When Amazon AppFlow catalogs your data, it stores metadata in a data catalog. +type MetadataCatalogConfig struct { + + // Specifies the configuration that Amazon AppFlow uses when it catalogs your data + // with the Glue Data Catalog. + GlueDataCatalog *GlueDataCatalogConfig + + noSmithyDocumentSerde +} + +// Describes the metadata catalog, metadata table, and data partitions that Amazon +// AppFlow used for the associated flow run. +type MetadataCatalogDetail struct { + + // The type of metadata catalog that Amazon AppFlow used for the associated flow + // run. This parameter returns the following value: GLUE The metadata catalog is + // provided by the Glue Data Catalog. Glue includes the Glue Data Catalog as a + // component. + CatalogType CatalogType + + // Describes the status of the attempt from Amazon AppFlow to register the data + // partitions with the metadata catalog. The data partitions organize the flow + // output into a hierarchical path, such as a folder path in an S3 bucket. Amazon + // AppFlow creates the partitions (if they don't already exist) based on your flow + // configuration. + PartitionRegistrationOutput *RegistrationOutput + + // The name of the table that stores the metadata for the associated flow run. The + // table stores metadata that represents the data that the flow transferred. Amazon + // AppFlow stores the table in the metadata catalog. + TableName *string + + // Describes the status of the attempt from Amazon AppFlow to register the metadata + // table with the metadata catalog. Amazon AppFlow creates or updates this table + // for the associated flow run. + TableRegistrationOutput *RegistrationOutput + + noSmithyDocumentSerde +} + // The OAuth 2.0 credentials required for OAuth 2.0 authentication. type OAuth2Credentials struct { @@ -1601,12 +1688,26 @@ type OAuthProperties struct { noSmithyDocumentSerde } -// Determines the prefix that Amazon AppFlow applies to the destination folder -// name. You can name your destination folders according to the flow frequency and -// date. +// Specifies elements that Amazon AppFlow includes in the file and folder names in +// the flow destination. type PrefixConfig struct { - // Determines the level of granularity that's included in the prefix. + // Specifies whether the destination file path includes either or both of the + // following elements: EXECUTION_ID The ID that Amazon AppFlow assigns to the flow + // run. SCHEMA_VERSION The version number of your data schema. Amazon AppFlow + // assigns this version number. The version number increases by one when you change + // any of the following settings in your flow configuration: + // + // * + // Source-to-destination field mappings + // + // * Field data types + // + // * Partition keys + PathPrefixHierarchy []PathPrefix + + // Determines the level of granularity for the date and time that's included in the + // prefix. PrefixFormat PrefixFormat // Determines the format of the prefix, and whether it applies to the file name, @@ -1718,6 +1819,27 @@ type RedshiftMetadata struct { noSmithyDocumentSerde } +// Describes the status of an attempt from Amazon AppFlow to register a resource. +// When you run a flow that you've configured to use a metadata catalog, Amazon +// AppFlow registers a metadata table and data partitions with that catalog. This +// operation provides the status of that registration attempt. The operation also +// indicates how many related resources Amazon AppFlow created or updated. +type RegistrationOutput struct { + + // Explains the status of the registration attempt from Amazon AppFlow. If the + // attempt fails, the message explains why. + Message *string + + // Indicates the number of resources that Amazon AppFlow created or updated. + // Possible resources include metadata tables and data partitions. + Result *string + + // Indicates the status of the registration attempt from Amazon AppFlow. + Status ExecutionStatus + + noSmithyDocumentSerde +} + // The properties that are applied when Amazon S3 is used as a destination. type S3DestinationProperties struct { @@ -2550,9 +2672,8 @@ type UpsolverMetadata struct { // data when Upsolver is used as the destination. type UpsolverS3OutputFormatConfig struct { - // Determines the prefix that Amazon AppFlow applies to the destination folder - // name. You can name your destination folders according to the flow frequency and - // date. + // Specifies elements that Amazon AppFlow includes in the file and folder names in + // the flow destination. // // This member is required. PrefixConfig *PrefixConfig diff --git a/service/appflow/validators.go b/service/appflow/validators.go index b3559995d03..5331e165693 100644 --- a/service/appflow/validators.go +++ b/service/appflow/validators.go @@ -1017,6 +1017,27 @@ func validateEventBridgeDestinationProperties(v *types.EventBridgeDestinationPro } } +func validateGlueDataCatalogConfig(v *types.GlueDataCatalogConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GlueDataCatalogConfig"} + if v.RoleArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) + } + if v.DatabaseName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DatabaseName")) + } + if v.TablePrefix == nil { + invalidParams.Add(smithy.NewErrParamRequired("TablePrefix")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateGoogleAnalyticsConnectorProfileCredentials(v *types.GoogleAnalyticsConnectorProfileCredentials) error { if v == nil { return nil @@ -1197,6 +1218,23 @@ func validateMarketoSourceProperties(v *types.MarketoSourceProperties) error { } } +func validateMetadataCatalogConfig(v *types.MetadataCatalogConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MetadataCatalogConfig"} + if v.GlueDataCatalog != nil { + if err := validateGlueDataCatalogConfig(v.GlueDataCatalog); err != nil { + invalidParams.AddNested("GlueDataCatalog", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOAuth2Properties(v *types.OAuth2Properties) error { if v == nil { return nil @@ -2058,6 +2096,11 @@ func validateOpCreateFlowInput(v *CreateFlowInput) error { invalidParams.AddNested("Tasks", err.(smithy.InvalidParamsError)) } } + if v.MetadataCatalogConfig != nil { + if err := validateMetadataCatalogConfig(v.MetadataCatalogConfig); err != nil { + invalidParams.AddNested("MetadataCatalogConfig", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -2329,6 +2372,11 @@ func validateOpUpdateFlowInput(v *UpdateFlowInput) error { invalidParams.AddNested("Tasks", err.(smithy.InvalidParamsError)) } } + if v.MetadataCatalogConfig != nil { + if err := validateMetadataCatalogConfig(v.MetadataCatalogConfig); err != nil { + invalidParams.AddNested("MetadataCatalogConfig", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/appsync/api_op_CreateFunction.go b/service/appsync/api_op_CreateFunction.go index ce13a30f46c..e573decac78 100644 --- a/service/appsync/api_op_CreateFunction.go +++ b/service/appsync/api_op_CreateFunction.go @@ -40,20 +40,23 @@ type CreateFunctionInput struct { // This member is required. DataSourceName *string - // The version of the request mapping template. Currently, the supported value is - // 2018-05-29. - // - // This member is required. - FunctionVersion *string - // The Function name. The function name does not have to be unique. // // This member is required. Name *string + // The function code that contains the request and response functions. When code is + // used, the runtime is required. The runtime value must be APPSYNC_JS. + Code *string + // The Function description. Description *string + // The version of the request mapping template. Currently, the supported value is + // 2018-05-29. Note that when using VTL and mapping templates, the functionVersion + // is required. + FunctionVersion *string + // The maximum batching size for a resolver. MaxBatchSize int32 @@ -64,6 +67,11 @@ type CreateFunctionInput struct { // The Function response mapping template. ResponseMappingTemplate *string + // Describes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync + // function. Specifies the name and version of the runtime to use. Note that if a + // runtime is specified, code must also be specified. + Runtime *types.AppSyncRuntime + // Describes a Sync configuration for a resolver. Specifies which Conflict // Detection strategy and Resolution strategy to use when the resolver is invoked. SyncConfig *types.SyncConfig diff --git a/service/appsync/api_op_CreateResolver.go b/service/appsync/api_op_CreateResolver.go index 613f17e0d54..07e32c93fa5 100644 --- a/service/appsync/api_op_CreateResolver.go +++ b/service/appsync/api_op_CreateResolver.go @@ -49,6 +49,10 @@ type CreateResolverInput struct { // The caching configuration for the resolver. CachingConfig *types.CachingConfig + // The resolver code that contains the request and response functions. When code is + // used, the runtime is required. The runtime value must be APPSYNC_JS. + Code *string + // The name of the data source for which the resolver is being created. DataSourceName *string @@ -81,6 +85,11 @@ type CreateResolverInput struct { // The mapping template to use for responses from the data source. ResponseMappingTemplate *string + // Describes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync + // function. Specifies the name and version of the runtime to use. Note that if a + // runtime is specified, code must also be specified. + Runtime *types.AppSyncRuntime + // The SyncConfig for a resolver attached to a versioned data source. SyncConfig *types.SyncConfig diff --git a/service/appsync/api_op_EvaluateCode.go b/service/appsync/api_op_EvaluateCode.go new file mode 100644 index 00000000000..accba2842c9 --- /dev/null +++ b/service/appsync/api_op_EvaluateCode.go @@ -0,0 +1,151 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package appsync + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/appsync/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Evaluates the given code and returns the response. The code definition +// requirements depend on the specified runtime. For APPSYNC_JS runtimes, the code +// defines the request and response functions. The request function takes the +// incoming request after a GraphQL operation is parsed and converts it into a +// request configuration for the selected data source operation. The response +// function interprets responses from the data source and maps it to the shape of +// the GraphQL field output type. +func (c *Client) EvaluateCode(ctx context.Context, params *EvaluateCodeInput, optFns ...func(*Options)) (*EvaluateCodeOutput, error) { + if params == nil { + params = &EvaluateCodeInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "EvaluateCode", params, optFns, c.addOperationEvaluateCodeMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*EvaluateCodeOutput) + out.ResultMetadata = metadata + return out, nil +} + +type EvaluateCodeInput struct { + + // The code definition to be evaluated. Note that code and runtime are both + // required for this action. The runtime value must be APPSYNC_JS. + // + // This member is required. + Code *string + + // The map that holds all of the contextual information for your resolver + // invocation. A context is required for this action. + // + // This member is required. + Context *string + + // The runtime to be used when evaluating the code. Currently, only the APPSYNC_JS + // runtime is supported. + // + // This member is required. + Runtime *types.AppSyncRuntime + + // The function within the code to be evaluated. If provided, the valid values are + // request and response. + Function *string + + noSmithyDocumentSerde +} + +type EvaluateCodeOutput struct { + + // Contains the payload of the response error. + Error *types.EvaluateCodeErrorDetail + + // The result of the evaluation operation. + EvaluationResult *string + + // A list of logs that were generated by calls to util.log.info and util.log.error + // in the evaluated code. + Logs []string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationEvaluateCodeMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpEvaluateCode{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpEvaluateCode{}, middleware.After) + if 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); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpEvaluateCodeValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEvaluateCode(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opEvaluateCode(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "appsync", + OperationName: "EvaluateCode", + } +} diff --git a/service/appsync/api_op_EvaluateMappingTemplate.go b/service/appsync/api_op_EvaluateMappingTemplate.go index d548e27cc9f..1f8b8155a16 100644 --- a/service/appsync/api_op_EvaluateMappingTemplate.go +++ b/service/appsync/api_op_EvaluateMappingTemplate.go @@ -57,6 +57,10 @@ type EvaluateMappingTemplateOutput struct { // The mapping template; this can be a request or response template. EvaluationResult *string + // A list of logs that were generated by calls to util.log.info and util.log.error + // in the evaluated code. + Logs []string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/appsync/api_op_UpdateFunction.go b/service/appsync/api_op_UpdateFunction.go index bb11c7fbb6a..77f56a602a4 100644 --- a/service/appsync/api_op_UpdateFunction.go +++ b/service/appsync/api_op_UpdateFunction.go @@ -44,20 +44,23 @@ type UpdateFunctionInput struct { // This member is required. FunctionId *string - // The version of the request mapping template. Currently, the supported value is - // 2018-05-29. - // - // This member is required. - FunctionVersion *string - // The Function name. // // This member is required. Name *string + // The function code that contains the request and response functions. When code is + // used, the runtime is required. The runtime value must be APPSYNC_JS. + Code *string + // The Function description. Description *string + // The version of the request mapping template. Currently, the supported value is + // 2018-05-29. Note that when using VTL and mapping templates, the functionVersion + // is required. + FunctionVersion *string + // The maximum batching size for a resolver. MaxBatchSize int32 @@ -68,6 +71,11 @@ type UpdateFunctionInput struct { // The Function request mapping template. ResponseMappingTemplate *string + // Describes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync + // function. Specifies the name and version of the runtime to use. Note that if a + // runtime is specified, code must also be specified. + Runtime *types.AppSyncRuntime + // Describes a Sync configuration for a resolver. Specifies which Conflict // Detection strategy and Resolution strategy to use when the resolver is invoked. SyncConfig *types.SyncConfig diff --git a/service/appsync/api_op_UpdateResolver.go b/service/appsync/api_op_UpdateResolver.go index 0ae13cc9708..d4e8608e644 100644 --- a/service/appsync/api_op_UpdateResolver.go +++ b/service/appsync/api_op_UpdateResolver.go @@ -47,6 +47,10 @@ type UpdateResolverInput struct { // The caching configuration for the resolver. CachingConfig *types.CachingConfig + // The resolver code that contains the request and response functions. When code is + // used, the runtime is required. The runtime value must be APPSYNC_JS. + Code *string + // The new data source name. DataSourceName *string @@ -78,6 +82,11 @@ type UpdateResolverInput struct { // The new response mapping template. ResponseMappingTemplate *string + // Describes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync + // function. Specifies the name and version of the runtime to use. Note that if a + // runtime is specified, code must also be specified. + Runtime *types.AppSyncRuntime + // The SyncConfig for a resolver attached to a versioned data source. SyncConfig *types.SyncConfig diff --git a/service/appsync/deserializers.go b/service/appsync/deserializers.go index 2f33f00ab76..8ec6e5a29d3 100644 --- a/service/appsync/deserializers.go +++ b/service/appsync/deserializers.go @@ -1226,6 +1226,9 @@ func awsRestjson1_deserializeOpErrorCreateResolver(response *smithyhttp.Response } switch { + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) @@ -2080,6 +2083,9 @@ func awsRestjson1_deserializeOpErrorDeleteResolver(response *smithyhttp.Response } switch { + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) @@ -2292,6 +2298,173 @@ func awsRestjson1_deserializeOpErrorDisassociateApi(response *smithyhttp.Respons } } +type awsRestjson1_deserializeOpEvaluateCode struct { +} + +func (*awsRestjson1_deserializeOpEvaluateCode) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpEvaluateCode) 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_deserializeOpErrorEvaluateCode(response, &metadata) + } + output := &EvaluateCodeOutput{} + 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_deserializeOpDocumentEvaluateCodeOutput(&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_deserializeOpErrorEvaluateCode(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentEvaluateCodeOutput(v **EvaluateCodeOutput, 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 *EvaluateCodeOutput + if *v == nil { + sv = &EvaluateCodeOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "error": + if err := awsRestjson1_deserializeDocumentEvaluateCodeErrorDetail(&sv.Error, value); err != nil { + return err + } + + case "evaluationResult": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EvaluationResult to be of type string, got %T instead", value) + } + sv.EvaluationResult = ptr.String(jtv) + } + + case "logs": + if err := awsRestjson1_deserializeDocumentLogs(&sv.Logs, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpEvaluateMappingTemplate struct { } @@ -2445,6 +2618,11 @@ func awsRestjson1_deserializeOpDocumentEvaluateMappingTemplateOutput(v **Evaluat sv.EvaluationResult = ptr.String(jtv) } + case "logs": + if err := awsRestjson1_deserializeDocumentLogs(&sv.Logs, value); err != nil { + return err + } + default: _, _ = key, value @@ -6984,6 +7162,9 @@ func awsRestjson1_deserializeOpErrorUpdateResolver(response *smithyhttp.Response } switch { + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): return awsRestjson1_deserializeErrorConcurrentModificationException(response, errorBody) @@ -8111,6 +8292,55 @@ func awsRestjson1_deserializeDocumentApiLimitExceededException(v **types.ApiLimi return nil } +func awsRestjson1_deserializeDocumentAppSyncRuntime(v **types.AppSyncRuntime, 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.AppSyncRuntime + if *v == nil { + sv = &types.AppSyncRuntime{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuntimeName to be of type string, got %T instead", value) + } + sv.Name = types.RuntimeName(jtv) + } + + case "runtimeVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RuntimeVersion = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentAuthorizationConfig(v **types.AuthorizationConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8205,6 +8435,42 @@ func awsRestjson1_deserializeDocumentAwsIamConfig(v **types.AwsIamConfig, value return nil } +func awsRestjson1_deserializeDocumentBadRequestDetail(v **types.BadRequestDetail, 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.BadRequestDetail + if *v == nil { + sv = &types.BadRequestDetail{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "codeErrors": + if err := awsRestjson1_deserializeDocumentCodeErrors(&sv.CodeErrors, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentBadRequestException(v **types.BadRequestException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8227,6 +8493,11 @@ func awsRestjson1_deserializeDocumentBadRequestException(v **types.BadRequestExc for key, value := range shape { switch key { + case "detail": + if err := awsRestjson1_deserializeDocumentBadRequestDetail(&sv.Detail, value); err != nil { + return err + } + case "message": if value != nil { jtv, ok := value.(string) @@ -8236,6 +8507,15 @@ func awsRestjson1_deserializeDocumentBadRequestException(v **types.BadRequestExc sv.Message = ptr.String(jtv) } + case "reason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BadRequestReason to be of type string, got %T instead", value) + } + sv.Reason = types.BadRequestReason(jtv) + } + default: _, _ = key, value @@ -8330,6 +8610,164 @@ func awsRestjson1_deserializeDocumentCachingKeys(v *[]string, value interface{}) return nil } +func awsRestjson1_deserializeDocumentCodeError(v **types.CodeError, 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.CodeError + if *v == nil { + sv = &types.CodeError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errorType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorType = ptr.String(jtv) + } + + case "location": + if err := awsRestjson1_deserializeDocumentCodeErrorLocation(&sv.Location, value); err != nil { + return err + } + + case "value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCodeErrorLocation(v **types.CodeErrorLocation, 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.CodeErrorLocation + if *v == nil { + sv = &types.CodeErrorLocation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "column": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected CodeErrorColumn to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Column = int32(i64) + } + + case "line": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected CodeErrorLine to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Line = int32(i64) + } + + case "span": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected CodeErrorSpan to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Span = int32(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCodeErrors(v *[]types.CodeError, 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.CodeError + if *v == nil { + cv = []types.CodeError{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CodeError + destAddr := &col + if err := awsRestjson1_deserializeDocumentCodeError(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentCognitoUserPoolConfig(v **types.CognitoUserPoolConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8905,6 +9343,51 @@ func awsRestjson1_deserializeDocumentErrorDetail(v **types.ErrorDetail, value in return nil } +func awsRestjson1_deserializeDocumentEvaluateCodeErrorDetail(v **types.EvaluateCodeErrorDetail, 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.EvaluateCodeErrorDetail + if *v == nil { + sv = &types.EvaluateCodeErrorDetail{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "codeErrors": + if err := awsRestjson1_deserializeDocumentCodeErrors(&sv.CodeErrors, value); err != nil { + return err + } + + 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 awsRestjson1_deserializeDocumentFunctionConfiguration(v **types.FunctionConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8927,6 +9410,15 @@ func awsRestjson1_deserializeDocumentFunctionConfiguration(v **types.FunctionCon for key, value := range shape { switch key { + case "code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Code to be of type string, got %T instead", value) + } + sv.Code = ptr.String(jtv) + } + case "dataSourceName": if value != nil { jtv, ok := value.(string) @@ -9012,6 +9504,11 @@ func awsRestjson1_deserializeDocumentFunctionConfiguration(v **types.FunctionCon sv.ResponseMappingTemplate = ptr.String(jtv) } + case "runtime": + if err := awsRestjson1_deserializeDocumentAppSyncRuntime(&sv.Runtime, value); err != nil { + return err + } + case "syncConfig": if err := awsRestjson1_deserializeDocumentSyncConfig(&sv.SyncConfig, value); err != nil { return err @@ -9615,6 +10112,42 @@ func awsRestjson1_deserializeDocumentLogConfig(v **types.LogConfig, value interf return nil } +func awsRestjson1_deserializeDocumentLogs(v *[]string, 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 []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentMapOfStringToString(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -9999,6 +10532,15 @@ func awsRestjson1_deserializeDocumentResolver(v **types.Resolver, value interfac return err } + case "code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Code to be of type string, got %T instead", value) + } + sv.Code = ptr.String(jtv) + } + case "dataSourceName": if value != nil { jtv, ok := value.(string) @@ -10071,6 +10613,11 @@ func awsRestjson1_deserializeDocumentResolver(v **types.Resolver, value interfac sv.ResponseMappingTemplate = ptr.String(jtv) } + case "runtime": + if err := awsRestjson1_deserializeDocumentAppSyncRuntime(&sv.Runtime, value); err != nil { + return err + } + case "syncConfig": if err := awsRestjson1_deserializeDocumentSyncConfig(&sv.SyncConfig, value); err != nil { return err diff --git a/service/appsync/generated.json b/service/appsync/generated.json index d0b23453c78..6c3ed70dcf8 100644 --- a/service/appsync/generated.json +++ b/service/appsync/generated.json @@ -26,6 +26,7 @@ "api_op_DeleteResolver.go", "api_op_DeleteType.go", "api_op_DisassociateApi.go", + "api_op_EvaluateCode.go", "api_op_EvaluateMappingTemplate.go", "api_op_FlushApiCache.go", "api_op_GetApiAssociation.go", diff --git a/service/appsync/serializers.go b/service/appsync/serializers.go index bb6aa0f9be6..a472ff34160 100644 --- a/service/appsync/serializers.go +++ b/service/appsync/serializers.go @@ -571,6 +571,11 @@ func awsRestjson1_serializeOpDocumentCreateFunctionInput(v *CreateFunctionInput, object := value.Object() defer object.Close() + if v.Code != nil { + ok := object.Key("code") + ok.String(*v.Code) + } + if v.DataSourceName != nil { ok := object.Key("dataSourceName") ok.String(*v.DataSourceName) @@ -606,6 +611,13 @@ func awsRestjson1_serializeOpDocumentCreateFunctionInput(v *CreateFunctionInput, ok.String(*v.ResponseMappingTemplate) } + if v.Runtime != nil { + ok := object.Key("runtime") + if err := awsRestjson1_serializeDocumentAppSyncRuntime(v.Runtime, ok); err != nil { + return err + } + } + if v.SyncConfig != nil { ok := object.Key("syncConfig") if err := awsRestjson1_serializeDocumentSyncConfig(v.SyncConfig, ok); err != nil { @@ -825,6 +837,11 @@ func awsRestjson1_serializeOpDocumentCreateResolverInput(v *CreateResolverInput, } } + if v.Code != nil { + ok := object.Key("code") + ok.String(*v.Code) + } + if v.DataSourceName != nil { ok := object.Key("dataSourceName") ok.String(*v.DataSourceName) @@ -862,6 +879,13 @@ func awsRestjson1_serializeOpDocumentCreateResolverInput(v *CreateResolverInput, ok.String(*v.ResponseMappingTemplate) } + if v.Runtime != nil { + ok := object.Key("runtime") + if err := awsRestjson1_serializeDocumentAppSyncRuntime(v.Runtime, ok); err != nil { + return err + } + } + if v.SyncConfig != nil { ok := object.Key("syncConfig") if err := awsRestjson1_serializeDocumentSyncConfig(v.SyncConfig, ok); err != nil { @@ -1534,6 +1558,91 @@ func awsRestjson1_serializeOpHttpBindingsDisassociateApiInput(v *DisassociateApi return nil } +type awsRestjson1_serializeOpEvaluateCode struct { +} + +func (*awsRestjson1_serializeOpEvaluateCode) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpEvaluateCode) 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.(*EvaluateCodeInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/dataplane-evaluatecode") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, 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_serializeOpDocumentEvaluateCodeInput(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_serializeOpHttpBindingsEvaluateCodeInput(v *EvaluateCodeInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentEvaluateCodeInput(v *EvaluateCodeInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Code != nil { + ok := object.Key("code") + ok.String(*v.Code) + } + + if v.Context != nil { + ok := object.Key("context") + ok.String(*v.Context) + } + + if v.Function != nil { + ok := object.Key("function") + ok.String(*v.Function) + } + + if v.Runtime != nil { + ok := object.Key("runtime") + if err := awsRestjson1_serializeDocumentAppSyncRuntime(v.Runtime, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpEvaluateMappingTemplate struct { } @@ -3611,6 +3720,11 @@ func awsRestjson1_serializeOpDocumentUpdateFunctionInput(v *UpdateFunctionInput, object := value.Object() defer object.Close() + if v.Code != nil { + ok := object.Key("code") + ok.String(*v.Code) + } + if v.DataSourceName != nil { ok := object.Key("dataSourceName") ok.String(*v.DataSourceName) @@ -3646,6 +3760,13 @@ func awsRestjson1_serializeOpDocumentUpdateFunctionInput(v *UpdateFunctionInput, ok.String(*v.ResponseMappingTemplate) } + if v.Runtime != nil { + ok := object.Key("runtime") + if err := awsRestjson1_serializeDocumentAppSyncRuntime(v.Runtime, ok); err != nil { + return err + } + } + if v.SyncConfig != nil { ok := object.Key("syncConfig") if err := awsRestjson1_serializeDocumentSyncConfig(v.SyncConfig, ok); err != nil { @@ -3880,6 +4001,11 @@ func awsRestjson1_serializeOpDocumentUpdateResolverInput(v *UpdateResolverInput, } } + if v.Code != nil { + ok := object.Key("code") + ok.String(*v.Code) + } + if v.DataSourceName != nil { ok := object.Key("dataSourceName") ok.String(*v.DataSourceName) @@ -3912,6 +4038,13 @@ func awsRestjson1_serializeOpDocumentUpdateResolverInput(v *UpdateResolverInput, ok.String(*v.ResponseMappingTemplate) } + if v.Runtime != nil { + ok := object.Key("runtime") + if err := awsRestjson1_serializeDocumentAppSyncRuntime(v.Runtime, ok); err != nil { + return err + } + } + if v.SyncConfig != nil { ok := object.Key("syncConfig") if err := awsRestjson1_serializeDocumentSyncConfig(v.SyncConfig, ok); err != nil { @@ -4063,6 +4196,23 @@ func awsRestjson1_serializeDocumentAdditionalAuthenticationProviders(v []types.A return nil } +func awsRestjson1_serializeDocumentAppSyncRuntime(v *types.AppSyncRuntime, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Name) > 0 { + ok := object.Key("name") + ok.String(string(v.Name)) + } + + if v.RuntimeVersion != nil { + ok := object.Key("runtimeVersion") + ok.String(*v.RuntimeVersion) + } + + return nil +} + func awsRestjson1_serializeDocumentAuthorizationConfig(v *types.AuthorizationConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/appsync/types/enums.go b/service/appsync/types/enums.go index a846382e978..ff42c64d0bd 100644 --- a/service/appsync/types/enums.go +++ b/service/appsync/types/enums.go @@ -148,6 +148,22 @@ func (AuthorizationType) Values() []AuthorizationType { } } +type BadRequestReason string + +// Enum values for BadRequestReason +const ( + BadRequestReasonCodeError BadRequestReason = "CODE_ERROR" +) + +// Values returns all known values for BadRequestReason. 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 (BadRequestReason) Values() []BadRequestReason { + return []BadRequestReason{ + "CODE_ERROR", + } +} + type ConflictDetectionType string // Enum values for ConflictDetectionType @@ -306,6 +322,22 @@ func (ResolverKind) Values() []ResolverKind { } } +type RuntimeName string + +// Enum values for RuntimeName +const ( + RuntimeNameAppsyncJs RuntimeName = "APPSYNC_JS" +) + +// Values returns all known values for RuntimeName. 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 (RuntimeName) Values() []RuntimeName { + return []RuntimeName{ + "APPSYNC_JS", + } +} + type SchemaStatus string // Enum values for SchemaStatus diff --git a/service/appsync/types/errors.go b/service/appsync/types/errors.go index 0bab72035ef..6cac8a65d2d 100644 --- a/service/appsync/types/errors.go +++ b/service/appsync/types/errors.go @@ -93,6 +93,9 @@ func (e *ApiLimitExceededException) ErrorFault() smithy.ErrorFault { return smit type BadRequestException struct { Message *string + Reason BadRequestReason + Detail *BadRequestDetail + noSmithyDocumentSerde } diff --git a/service/appsync/types/types.go b/service/appsync/types/types.go index ce4e0be0752..758f859a8d6 100644 --- a/service/appsync/types/types.go +++ b/service/appsync/types/types.go @@ -203,6 +203,24 @@ type ApiKey struct { noSmithyDocumentSerde } +// Describes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync +// function. Specifies the name and version of the runtime to use. Note that if a +// runtime is specified, code must also be specified. +type AppSyncRuntime struct { + + // The name of the runtime to use. Currently, the only allowed value is APPSYNC_JS. + // + // This member is required. + Name RuntimeName + + // The version of the runtime to use. Currently, the only allowed version is 1.0.0. + // + // This member is required. + RuntimeVersion *string + + noSmithyDocumentSerde +} + // The authorization configuration in case the HTTP endpoint requires // authorization. type AuthorizationConfig struct { @@ -233,6 +251,16 @@ type AwsIamConfig struct { noSmithyDocumentSerde } +// Provides further details for the reason behind the bad request. For reason type +// CODE_ERROR, the detail will contain a list of code errors. +type BadRequestDetail struct { + + // Contains the list of errors in the request. + CodeErrors []CodeError + + noSmithyDocumentSerde +} + // The caching configuration for a resolver that has caching activated. type CachingConfig struct { @@ -250,6 +278,38 @@ type CachingConfig struct { noSmithyDocumentSerde } +// Describes an AppSync error. +type CodeError struct { + + // The type of code error. Examples include, but aren't limited to: LINT_ERROR, + // PARSER_ERROR. + ErrorType *string + + // The line, column, and span location of the error in the code. + Location *CodeErrorLocation + + // A user presentable error. Examples include, but aren't limited to: Parsing + // error: Unterminated string literal. + Value *string + + noSmithyDocumentSerde +} + +// Describes the location of the error in a code sample. +type CodeErrorLocation struct { + + // The column number in the code. Defaults to 0 if unknown. + Column int32 + + // The line number in the code. Defaults to 0 if unknown. + Line int32 + + // The span/length of the error. Defaults to -1 if unknown. + Span int32 + + noSmithyDocumentSerde +} + // Describes an Amazon Cognito user pool configuration. type CognitoUserPoolConfig struct { @@ -416,8 +476,8 @@ type ElasticsearchDataSourceConfig struct { noSmithyDocumentSerde } -// Contains the list of errors generated when attempting to evaluate a mapping -// template. +// Contains the list of errors generated. When using JavaScript, this will apply to +// the request or response function evaluation. type ErrorDetail struct { // The error payload. @@ -426,10 +486,26 @@ type ErrorDetail struct { noSmithyDocumentSerde } +// Contains the list of errors from a code evaluation response. +type EvaluateCodeErrorDetail struct { + + // Contains the list of CodeError objects. + CodeErrors []CodeError + + // The error payload. + Message *string + + noSmithyDocumentSerde +} + // A function is a reusable entity. You can use multiple functions to compose the // resolver logic. type FunctionConfiguration struct { + // The function code that contains the request and response functions. When code is + // used, the runtime is required. The runtime value must be APPSYNC_JS. + Code *string + // The name of the DataSource. DataSourceName *string @@ -459,6 +535,11 @@ type FunctionConfiguration struct { // The Function response mapping template. ResponseMappingTemplate *string + // Describes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync + // function. Specifies the name and version of the runtime to use. Note that if a + // runtime is specified, code must also be specified. + Runtime *AppSyncRuntime + // Describes a Sync configuration for a resolver. Specifies which Conflict // Detection strategy and Resolution strategy to use when the resolver is invoked. SyncConfig *SyncConfig @@ -715,6 +796,10 @@ type Resolver struct { // The caching configuration for the resolver. CachingConfig *CachingConfig + // The resolver code that contains the request and response functions. When code is + // used, the runtime is required. The runtime value must be APPSYNC_JS. + Code *string + // The resolver data source name. DataSourceName *string @@ -748,6 +833,11 @@ type Resolver struct { // The response mapping template. ResponseMappingTemplate *string + // Describes a runtime used by an AWS AppSync pipeline resolver or AWS AppSync + // function. Specifies the name and version of the runtime to use. Note that if a + // runtime is specified, code must also be specified. + Runtime *AppSyncRuntime + // The SyncConfig for a resolver attached to a versioned data source. SyncConfig *SyncConfig diff --git a/service/appsync/validators.go b/service/appsync/validators.go index 02d20b33282..17b0acc8fec 100644 --- a/service/appsync/validators.go +++ b/service/appsync/validators.go @@ -370,6 +370,26 @@ func (m *validateOpDisassociateApi) HandleInitialize(ctx context.Context, in mid return next.HandleInitialize(ctx, in) } +type validateOpEvaluateCode struct { +} + +func (*validateOpEvaluateCode) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpEvaluateCode) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*EvaluateCodeInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpEvaluateCodeInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpEvaluateMappingTemplate struct { } @@ -1042,6 +1062,10 @@ func addOpDisassociateApiValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDisassociateApi{}, middleware.After) } +func addOpEvaluateCodeValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpEvaluateCode{}, middleware.After) +} + func addOpEvaluateMappingTemplateValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpEvaluateMappingTemplate{}, middleware.After) } @@ -1206,6 +1230,24 @@ func validateAdditionalAuthenticationProviders(v []types.AdditionalAuthenticatio } } +func validateAppSyncRuntime(v *types.AppSyncRuntime) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AppSyncRuntime"} + if len(v.Name) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.RuntimeVersion == nil { + invalidParams.Add(smithy.NewErrParamRequired("RuntimeVersion")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateAuthorizationConfig(v *types.AuthorizationConfig) error { if v == nil { return nil @@ -1538,8 +1580,10 @@ func validateOpCreateFunctionInput(v *CreateFunctionInput) error { if v.DataSourceName == nil { invalidParams.Add(smithy.NewErrParamRequired("DataSourceName")) } - if v.FunctionVersion == nil { - invalidParams.Add(smithy.NewErrParamRequired("FunctionVersion")) + if v.Runtime != nil { + if err := validateAppSyncRuntime(v.Runtime); err != nil { + invalidParams.AddNested("Runtime", err.(smithy.InvalidParamsError)) + } } if invalidParams.Len() > 0 { return invalidParams @@ -1610,6 +1654,11 @@ func validateOpCreateResolverInput(v *CreateResolverInput) error { invalidParams.AddNested("CachingConfig", err.(smithy.InvalidParamsError)) } } + if v.Runtime != nil { + if err := validateAppSyncRuntime(v.Runtime); err != nil { + invalidParams.AddNested("Runtime", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1791,6 +1840,31 @@ func validateOpDisassociateApiInput(v *DisassociateApiInput) error { } } +func validateOpEvaluateCodeInput(v *EvaluateCodeInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EvaluateCodeInput"} + if v.Runtime == nil { + invalidParams.Add(smithy.NewErrParamRequired("Runtime")) + } else if v.Runtime != nil { + if err := validateAppSyncRuntime(v.Runtime); err != nil { + invalidParams.AddNested("Runtime", err.(smithy.InvalidParamsError)) + } + } + if v.Code == nil { + invalidParams.Add(smithy.NewErrParamRequired("Code")) + } + if v.Context == nil { + invalidParams.Add(smithy.NewErrParamRequired("Context")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpEvaluateMappingTemplateInput(v *EvaluateMappingTemplateInput) error { if v == nil { return nil @@ -2280,8 +2354,10 @@ func validateOpUpdateFunctionInput(v *UpdateFunctionInput) error { if v.DataSourceName == nil { invalidParams.Add(smithy.NewErrParamRequired("DataSourceName")) } - if v.FunctionVersion == nil { - invalidParams.Add(smithy.NewErrParamRequired("FunctionVersion")) + if v.Runtime != nil { + if err := validateAppSyncRuntime(v.Runtime); err != nil { + invalidParams.AddNested("Runtime", err.(smithy.InvalidParamsError)) + } } if invalidParams.Len() > 0 { return invalidParams @@ -2352,6 +2428,11 @@ func validateOpUpdateResolverInput(v *UpdateResolverInput) error { invalidParams.AddNested("CachingConfig", err.(smithy.InvalidParamsError)) } } + if v.Runtime != nil { + if err := validateAppSyncRuntime(v.Runtime); err != nil { + invalidParams.AddNested("Runtime", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/databasemigrationservice/api_op_CreateEndpoint.go b/service/databasemigrationservice/api_op_CreateEndpoint.go index 31739ccdbf4..2471bd55880 100644 --- a/service/databasemigrationservice/api_op_CreateEndpoint.go +++ b/service/databasemigrationservice/api_op_CreateEndpoint.go @@ -48,9 +48,9 @@ type CreateEndpointInput struct { // The type of engine for the endpoint. Valid values, depending on the EndpointType // value, include "mysql", "oracle", "postgres", "mariadb", "aurora", - // "aurora-postgresql", "opensearch", "redshift", "s3", "db2", "azuredb", "sybase", - // "dynamodb", "mongodb", "kinesis", "kafka", "elasticsearch", "docdb", - // "sqlserver", and "neptune". + // "aurora-postgresql", "opensearch", "redshift", "s3", "db2", "db2-zos", + // "azuredb", "sybase", "dynamodb", "mongodb", "kinesis", "kafka", "elasticsearch", + // "docdb", "sqlserver", "neptune", and "babelfish". // // This member is required. EngineName *string diff --git a/service/databasemigrationservice/api_op_CreateReplicationInstance.go b/service/databasemigrationservice/api_op_CreateReplicationInstance.go index 9359237e6bf..a2622b95043 100644 --- a/service/databasemigrationservice/api_op_CreateReplicationInstance.go +++ b/service/databasemigrationservice/api_op_CreateReplicationInstance.go @@ -99,6 +99,11 @@ type CreateReplicationInstanceInput struct { // set the AvailabilityZone parameter if the Multi-AZ parameter is set to true. MultiAZ *bool + // The type of IP address protocol used by a replication instance, such as IPv4 + // only or Dual-stack that supports both IPv4 and IPv6 addressing. IPv6 only is not + // yet supported. + NetworkType *string + // The weekly time range during which system maintenance can occur, in Universal // Coordinated Time (UTC). Format: ddd:hh24:mi-ddd:hh24:mi Default: A 30-minute // window selected at random from an 8-hour block of time per Amazon Web Services diff --git a/service/databasemigrationservice/api_op_ModifyEndpoint.go b/service/databasemigrationservice/api_op_ModifyEndpoint.go index 699f337347a..a2a3367178c 100644 --- a/service/databasemigrationservice/api_op_ModifyEndpoint.go +++ b/service/databasemigrationservice/api_op_ModifyEndpoint.go @@ -90,11 +90,11 @@ type ModifyEndpointInput struct { // The type of endpoint. Valid values are source and target. EndpointType types.ReplicationEndpointTypeValue - // The type of engine for the endpoint. Valid values, depending on the - // EndpointType, include "mysql", "oracle", "postgres", "mariadb", "aurora", - // "aurora-postgresql", "opensearch", "redshift", "s3", "db2", "azuredb", "sybase", - // "dynamodb", "mongodb", "kinesis", "kafka", "elasticsearch", "documentdb", - // "sqlserver", and "neptune". + // The database engine name. Valid values, depending on the EndpointType, include + // "mysql", "oracle", "postgres", "mariadb", "aurora", "aurora-postgresql", + // "redshift", "s3", "db2", "db2-zos", "azuredb", "sybase", "dynamodb", "mongodb", + // "kinesis", "kafka", "elasticsearch", "documentdb", "sqlserver", "neptune", and + // "babelfish". EngineName *string // If this attribute is Y, the current call to ModifyEndpoint replaces all existing diff --git a/service/databasemigrationservice/api_op_ModifyReplicationInstance.go b/service/databasemigrationservice/api_op_ModifyReplicationInstance.go index 5b209994998..17b86a968fa 100644 --- a/service/databasemigrationservice/api_op_ModifyReplicationInstance.go +++ b/service/databasemigrationservice/api_op_ModifyReplicationInstance.go @@ -74,6 +74,11 @@ type ModifyReplicationInstanceInput struct { // set the AvailabilityZone parameter if the Multi-AZ parameter is set to true. MultiAZ *bool + // The type of IP address protocol used by a replication instance, such as IPv4 + // only or Dual-stack that supports both IPv4 and IPv6 addressing. IPv6 only is not + // yet supported. + NetworkType *string + // The weekly time range (in UTC) during which system maintenance can occur, which // might result in an outage. Changing this parameter does not result in an outage, // except in the following situation, and the change is asynchronously applied as diff --git a/service/databasemigrationservice/deserializers.go b/service/databasemigrationservice/deserializers.go index 7c05efc4259..b440887d598 100644 --- a/service/databasemigrationservice/deserializers.go +++ b/service/databasemigrationservice/deserializers.go @@ -14454,6 +14454,15 @@ func awsAwsjson11_deserializeDocumentReplicationInstance(v **types.ReplicationIn sv.MultiAZ = jtv } + case "NetworkType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NetworkType = ptr.String(jtv) + } + case "PendingModifiedValues": if err := awsAwsjson11_deserializeDocumentReplicationPendingModifiedValues(&sv.PendingModifiedValues, value); err != nil { return err @@ -14504,6 +14513,11 @@ func awsAwsjson11_deserializeDocumentReplicationInstance(v **types.ReplicationIn sv.ReplicationInstanceIdentifier = ptr.String(jtv) } + case "ReplicationInstanceIpv6Addresses": + if err := awsAwsjson11_deserializeDocumentReplicationInstanceIpv6AddressList(&sv.ReplicationInstanceIpv6Addresses, value); err != nil { + return err + } + case "ReplicationInstancePrivateIpAddress": if value != nil { jtv, ok := value.(string) @@ -14569,6 +14583,42 @@ func awsAwsjson11_deserializeDocumentReplicationInstance(v **types.ReplicationIn return nil } +func awsAwsjson11_deserializeDocumentReplicationInstanceIpv6AddressList(v *[]string, 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 []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentReplicationInstanceList(v *[]types.ReplicationInstance, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -14824,6 +14874,15 @@ func awsAwsjson11_deserializeDocumentReplicationPendingModifiedValues(v **types. sv.MultiAZ = ptr.Bool(jtv) } + case "NetworkType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NetworkType = ptr.String(jtv) + } + case "ReplicationInstanceClass": if value != nil { jtv, ok := value.(string) @@ -14896,6 +14955,11 @@ func awsAwsjson11_deserializeDocumentReplicationSubnetGroup(v **types.Replicatio return err } + case "SupportedNetworkTypes": + if err := awsAwsjson11_deserializeDocumentStringList(&sv.SupportedNetworkTypes, value); err != nil { + return err + } + case "VpcId": if value != nil { jtv, ok := value.(string) @@ -17434,6 +17498,58 @@ func awsAwsjson11_deserializeDocumentTableStatistics(v **types.TableStatistics, for key, value := range shape { switch key { + case "AppliedDdls": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected LongOptional to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AppliedDdls = ptr.Int64(i64) + } + + case "AppliedDeletes": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected LongOptional to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AppliedDeletes = ptr.Int64(i64) + } + + case "AppliedInserts": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected LongOptional to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AppliedInserts = ptr.Int64(i64) + } + + case "AppliedUpdates": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected LongOptional to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AppliedUpdates = ptr.Int64(i64) + } + case "Ddls": if value != nil { jtv, ok := value.(json.Number) diff --git a/service/databasemigrationservice/serializers.go b/service/databasemigrationservice/serializers.go index 09f3fd5cc16..923454ecbd1 100644 --- a/service/databasemigrationservice/serializers.go +++ b/service/databasemigrationservice/serializers.go @@ -5639,6 +5639,11 @@ func awsAwsjson11_serializeOpDocumentCreateReplicationInstanceInput(v *CreateRep ok.Boolean(*v.MultiAZ) } + if v.NetworkType != nil { + ok := object.Key("NetworkType") + ok.String(*v.NetworkType) + } + if v.PreferredMaintenanceWindow != nil { ok := object.Key("PreferredMaintenanceWindow") ok.String(*v.PreferredMaintenanceWindow) @@ -6904,6 +6909,11 @@ func awsAwsjson11_serializeOpDocumentModifyReplicationInstanceInput(v *ModifyRep ok.Boolean(*v.MultiAZ) } + if v.NetworkType != nil { + ok := object.Key("NetworkType") + ok.String(*v.NetworkType) + } + if v.PreferredMaintenanceWindow != nil { ok := object.Key("PreferredMaintenanceWindow") ok.String(*v.PreferredMaintenanceWindow) diff --git a/service/databasemigrationservice/types/types.go b/service/databasemigrationservice/types/types.go index bb308eff6fa..9cd765f6ee5 100644 --- a/service/databasemigrationservice/types/types.go +++ b/service/databasemigrationservice/types/types.go @@ -438,14 +438,14 @@ type Endpoint struct { EndpointType ReplicationEndpointTypeValue // The expanded name for the engine name. For example, if the EngineName parameter - // is "aurora," this value would be "Amazon Aurora MySQL." + // is "aurora", this value would be "Amazon Aurora MySQL". EngineDisplayName *string // The database engine name. Valid values, depending on the EndpointType, include // "mysql", "oracle", "postgres", "mariadb", "aurora", "aurora-postgresql", - // "opensearch", "redshift", "s3", "db2", "azuredb", "sybase", "dynamodb", - // "mongodb", "kinesis", "kafka", "elasticsearch", "documentdb", "sqlserver", and - // "neptune". + // "redshift", "s3", "db2", "db2-zos", "azuredb", "sybase", "dynamodb", "mongodb", + // "kinesis", "kafka", "elasticsearch", "documentdb", "sqlserver", "neptune", and + // "babelfish". EngineName *string // Value returned by a call to CreateEndpoint that can be used for cross-account @@ -1354,8 +1354,8 @@ type OracleSettings struct { ArchivedLogDestId *int32 // When this field is set to Y, DMS only accesses the archived redo logs. If the - // archived redo logs are stored on Oracle ASM only, the DMS user account needs to - // be granted ASM privileges. + // archived redo logs are stored on Automatic Storage Management (ASM) only, the + // DMS user account needs to be granted ASM privileges. ArchivedLogsOnly *bool // For an Oracle source endpoint, your Oracle Automatic Storage Management (ASM) @@ -1487,9 +1487,9 @@ type OracleSettings struct { // in the Database Migration Service User Guide. SecretsManagerAccessRoleArn *string - // Required only if your Oracle endpoint uses Advanced Storage Manager (ASM). The - // full ARN of the IAM role that specifies DMS as the trusted entity and grants the - // required permissions to access the SecretsManagerOracleAsmSecret. This + // Required only if your Oracle endpoint uses Automatic Storage Management (ASM). + // The full ARN of the IAM role that specifies DMS as the trusted entity and grants + // the required permissions to access the SecretsManagerOracleAsmSecret. This // SecretsManagerOracleAsmSecret has the secret value that allows access to the // Oracle ASM of the endpoint. You can specify one of two sets of values for these // permissions. You can specify the values for this setting and @@ -1503,8 +1503,8 @@ type OracleSettings struct { // in the Database Migration Service User Guide. SecretsManagerOracleAsmAccessRoleArn *string - // Required only if your Oracle endpoint uses Advanced Storage Manager (ASM). The - // full ARN, partial ARN, or friendly name of the SecretsManagerOracleAsmSecret + // Required only if your Oracle endpoint uses Automatic Storage Management (ASM). + // The full ARN, partial ARN, or friendly name of the SecretsManagerOracleAsmSecret // that contains the Oracle ASM connection details for the Oracle endpoint. SecretsManagerOracleAsmSecretId *string @@ -2065,6 +2065,11 @@ type ReplicationInstance struct { // set the AvailabilityZone parameter if the Multi-AZ parameter is set to true. MultiAZ bool + // The type of IP address protocol used by a replication instance, such as IPv4 + // only or Dual-stack that supports both IPv4 and IPv6 addressing. IPv6 only is not + // yet supported. + NetworkType *string + // The pending modification values. PendingModifiedValues *ReplicationPendingModifiedValues @@ -2102,6 +2107,9 @@ type ReplicationInstance struct { // Example: myrepinstance ReplicationInstanceIdentifier *string + // One or more IPv6 addresses for the replication instance. + ReplicationInstanceIpv6Addresses []string + // The private IP address of the replication instance. // // Deprecated: This member has been deprecated. @@ -2196,6 +2204,11 @@ type ReplicationPendingModifiedValues struct { // set the AvailabilityZone parameter if the Multi-AZ parameter is set to true. MultiAZ *bool + // The type of IP address protocol used by a replication instance, such as IPv4 + // only or Dual-stack that supports both IPv4 and IPv6 addressing. IPv6 only is not + // yet supported. + NetworkType *string + // The compute and memory capacity of the replication instance as defined for the // specified replication instance class. For more information on the settings and // capacities for the available replication instance classes, see Selecting the @@ -2222,6 +2235,11 @@ type ReplicationSubnetGroup struct { // The subnets that are in the subnet group. Subnets []Subnet + // The IP addressing protocol supported by the subnet group. This is used by a + // replication instance with values such as IPv4 only or Dual-stack that supports + // both IPv4 and IPv6 addressing. IPv6 only is not yet supported. + SupportedNetworkTypes []string + // The ID of the VPC. VpcId *string @@ -2739,7 +2757,7 @@ type S3Settings struct { // an DMS CloudFormation template. The default value is 60 seconds. CdcMaxBatchInterval *int32 - // Minimum file size, defined in megabytes, to reach for a file output to Amazon + // Minimum file size, defined in kilobytes, to reach for a file output to Amazon // S3. When CdcMinFileSize and CdcMaxBatchInterval are both specified, the file // write is triggered by whichever parameter condition is met first within an DMS // CloudFormation template. The default value is 32 MB. @@ -3136,13 +3154,14 @@ type SupportedEndpointType struct { EndpointType ReplicationEndpointTypeValue // The expanded name for the engine name. For example, if the EngineName parameter - // is "aurora," this value would be "Amazon Aurora MySQL." + // is "aurora", this value would be "Amazon Aurora MySQL". EngineDisplayName *string // The database engine name. Valid values, depending on the EndpointType, include // "mysql", "oracle", "postgres", "mariadb", "aurora", "aurora-postgresql", - // "redshift", "s3", "db2", "azuredb", "sybase", "dynamodb", "mongodb", "kinesis", - // "kafka", "elasticsearch", "documentdb", "sqlserver", and "neptune". + // "redshift", "s3", "db2", "db2-zos", "azuredb", "sybase", "dynamodb", "mongodb", + // "kinesis", "kafka", "elasticsearch", "documentdb", "sqlserver", "neptune", and + // "babelfish". EngineName *string // The earliest DMS engine version that supports this endpoint engine. Note that @@ -3200,6 +3219,19 @@ type SybaseSettings struct { // DescribeTableStatistics operation. type TableStatistics struct { + // The number of data definition language (DDL) statements used to build and modify + // the structure of your tables applied on the target. + AppliedDdls *int64 + + // The number of delete actions applied on a target table. + AppliedDeletes *int64 + + // The number of insert actions applied on a target table. + AppliedInserts *int64 + + // The number of update actions applied on a target table. + AppliedUpdates *int64 + // The data definition language (DDL) used to build and modify the structure of // your tables. Ddls int64 diff --git a/service/directoryservice/internal/endpoints/endpoints.go b/service/directoryservice/internal/endpoints/endpoints.go index 5802b20dd11..3851e197d2c 100644 --- a/service/directoryservice/internal/endpoints/endpoints.go +++ b/service/directoryservice/internal/endpoints/endpoints.go @@ -234,6 +234,9 @@ var defaultPartitions = endpoints.Partitions{ }, Deprecated: aws.TrueTernary, }, + endpoints.EndpointKey{ + Region: "me-central-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "me-south-1", }: endpoints.Endpoint{}, diff --git a/service/ec2/api_op_CreateFlowLogs.go b/service/ec2/api_op_CreateFlowLogs.go index 385b76c29f8..a4174af9120 100644 --- a/service/ec2/api_op_CreateFlowLogs.go +++ b/service/ec2/api_op_CreateFlowLogs.go @@ -43,7 +43,8 @@ func (c *Client) CreateFlowLogs(ctx context.Context, params *CreateFlowLogsInput type CreateFlowLogsInput struct { // The IDs of the resources to monitor. For example, if the resource type is VPC, - // specify the IDs of the VPCs. Constraints: Maximum of 1000 resources + // specify the IDs of the VPCs. Constraints: Maximum of 25 for transit gateway + // resource types. Maximum of 1000 for the other resource types. // // This member is required. ResourceIds []string @@ -98,13 +99,16 @@ type CreateFlowLogsInput struct { LogDestinationType types.LogDestinationType // The fields to include in the flow log record. List the fields in the order in - // which they should appear. For more information about the available fields, see - // Flow log records - // (https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html#flow-log-records). - // If you omit this parameter, the flow log is created using the default format. If - // you specify this parameter, you must include at least one field. Specify the - // fields using the ${field-id} format, separated by spaces. For the CLI, surround - // this parameter value with single quotes on Linux or double quotes on Windows. + // which they should appear. If you omit this parameter, the flow log is created + // using the default format. If you specify this parameter, you must include at + // least one field. For more information about the available fields, see Flow log + // records + // (https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html#flow-log-records) + // in the Amazon VPC User Guide or Transit Gateway Flow Log records + // (https://docs.aws.amazon.com/vpc/latest/tgw/tgw-flow-logs.html#flow-log-records) + // in the Amazon Web Services Transit Gateway Guide. Specify the fields using the + // ${field-id} format, separated by spaces. For the CLI, surround this parameter + // value with single quotes on Linux or double quotes on Windows. LogFormat *string // The name of a new or existing CloudWatch Logs log group where Amazon EC2 @@ -113,8 +117,9 @@ type CreateFlowLogsInput struct { LogGroupName *string // The maximum interval of time during which a flow of packets is captured and - // aggregated into a flow log record. You can specify 60 seconds (1 minute) or 600 - // seconds (10 minutes). When a network interface is attached to a Nitro-based + // aggregated into a flow log record. The possible values are 60 seconds (1 minute) + // or 600 seconds (10 minutes). This parameter must be 60 seconds for transit + // gateway resource types. When a network interface is attached to a Nitro-based // instance // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances), // the aggregation interval is always 60 seconds or less, regardless of the value @@ -125,7 +130,8 @@ type CreateFlowLogsInput struct { TagSpecifications []types.TagSpecification // The type of traffic to monitor (accepted traffic, rejected traffic, or all - // traffic). + // traffic). This parameter is not supported for transit gateway resource types. It + // is required for the other resource types. TrafficType types.TrafficType noSmithyDocumentSerde diff --git a/service/ec2/api_op_CreateNatGateway.go b/service/ec2/api_op_CreateNatGateway.go index 339bec2d501..fc5364762b3 100644 --- a/service/ec2/api_op_CreateNatGateway.go +++ b/service/ec2/api_op_CreateNatGateway.go @@ -68,6 +68,10 @@ type CreateNatGatewayInput struct { // UnauthorizedOperation. DryRun *bool + // The private IPv4 address to assign to the NAT gateway. If you don't provide an + // address, a private IPv4 address will be automatically assigned. + PrivateIpAddress *string + // The tags to assign to the NAT gateway. TagSpecifications []types.TagSpecification diff --git a/service/ec2/serializers.go b/service/ec2/serializers.go index 1d45ca5a59f..43c1bb9ce34 100644 --- a/service/ec2/serializers.go +++ b/service/ec2/serializers.go @@ -46809,6 +46809,11 @@ func awsEc2query_serializeOpDocumentCreateNatGatewayInput(v *CreateNatGatewayInp objectKey.Boolean(*v.DryRun) } + if v.PrivateIpAddress != nil { + objectKey := object.Key("PrivateIpAddress") + objectKey.String(*v.PrivateIpAddress) + } + if v.SubnetId != nil { objectKey := object.Key("SubnetId") objectKey.String(*v.SubnetId) diff --git a/service/ec2/types/types.go b/service/ec2/types/types.go index 25b4cfe2125..6c6d5423331 100644 --- a/service/ec2/types/types.go +++ b/service/ec2/types/types.go @@ -13194,36 +13194,24 @@ type SpotFleetRequestConfigData struct { // across the Spot Instance pools specified by the Spot Fleet launch configuration. // For more information, see Allocation strategies for Spot Instances // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-allocation-strategy.html) - // in the Amazon EC2 User Guide. priceCapacityOptimized (recommended) Spot Fleet - // identifies the pools with - // - // the highest capacity availability for the number of - // instances that are launching. This means that we will request Spot Instances - // from the pools that we believe have the lowest chance of interruption in the - // near term. Spot Fleet then requests Spot Instances from the lowest priced of - // these pools. capacityOptimized Spot Fleet identifies the pools with - // - // the highest - // capacity availability for the number of instances that are launching. This means - // that we will request Spot Instances from the pools that we believe have the - // lowest chance of interruption in the near term. To give certain instance types a - // higher chance of launching first, use capacityOptimizedPrioritized. Set a - // priority for each instance type by using the Priority parameter for - // LaunchTemplateOverrides. You can assign the same priority to different - // LaunchTemplateOverrides. EC2 implements the priorities on a best-effort basis, - // but optimizes for capacity first. capacityOptimizedPrioritized is supported only - // if your Spot Fleet uses a launch template. Note that if the - // OnDemandAllocationStrategy is set to prioritized, the same priority is applied - // when fulfilling On-Demand capacity. diversified Spot Fleet requests instances - // from all of the Spot Instance pools that you specify. lowestPrice Spot Fleet - // requests instances from the lowest priced Spot Instance pool that has available - // capacity. If the lowest priced pool doesn't have available capacity, the Spot - // Instances come from the next lowest priced pool that has available capacity. If - // a pool runs out of capacity before fulfilling your desired capacity, Spot Fleet - // will continue to fulfill your request by drawing from the next lowest priced - // pool. To ensure that your desired capacity is met, you might receive Spot - // Instances from several pools. Because this strategy only considers instance - // price and not capacity availability, it might lead to high interruption rates. + // in the Amazon EC2 User Guide. lowestPrice - Spot Fleet launches instances from + // the lowest-price Spot Instance pool that has available capacity. If the cheapest + // pool doesn't have available capacity, the Spot Instances come from the next + // cheapest pool that has available capacity. If a pool runs out of capacity before + // fulfilling your desired capacity, Spot Fleet will continue to fulfill your + // request by drawing from the next cheapest pool. To ensure that your desired + // capacity is met, you might receive Spot Instances from several pools. + // diversified - Spot Fleet launches instances from all of the Spot Instance pools + // that you specify. capacityOptimized (recommended) - Spot Fleet launches + // instances from Spot Instance pools with optimal capacity for the number of + // instances that are launching. To give certain instance types a higher chance of + // launching first, use capacityOptimizedPrioritized. Set a priority for each + // instance type by using the Priority parameter for LaunchTemplateOverrides. You + // can assign the same priority to different LaunchTemplateOverrides. EC2 + // implements the priorities on a best-effort basis, but optimizes for capacity + // first. capacityOptimizedPrioritized is supported only if your Spot Fleet uses a + // launch template. Note that if the OnDemandAllocationStrategy is set to + // prioritized, the same priority is applied when fulfilling On-Demand capacity. // Default: lowestPrice AllocationStrategy AllocationStrategy @@ -13561,37 +13549,25 @@ type SpotOptions struct { // across the Spot Instance pools specified by the EC2 Fleet launch configuration. // For more information, see Allocation strategies for Spot Instances // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-allocation-strategy.html) - // in the Amazon EC2 User Guide. price-capacity-optimized (recommended) EC2 Fleet - // identifies the pools with - // - // the highest capacity availability for the number of - // instances that are launching. This means that we will request Spot Instances - // from the pools that we believe have the lowest chance of interruption in the - // near term. EC2 Fleet then requests Spot Instances from the lowest priced of - // these pools. capacity-optimized EC2 Fleet identifies the pools with - // - // the highest - // capacity availability for the number of instances that are launching. This means - // that we will request Spot Instances from the pools that we believe have the - // lowest chance of interruption in the near term. To give certain instance types a - // higher chance of launching first, use capacity-optimized-prioritized. Set a - // priority for each instance type by using the Priority parameter for - // LaunchTemplateOverrides. You can assign the same priority to different - // LaunchTemplateOverrides. EC2 implements the priorities on a best-effort basis, - // but optimizes for capacity first. capacity-optimized-prioritized is supported - // only if your EC2 Fleet uses a launch template. Note that if the On-Demand - // AllocationStrategy is set to prioritized, the same priority is applied when - // fulfilling On-Demand capacity. diversified EC2 Fleet requests instances from all - // of the Spot Instance pools that you specify. lowest-price EC2 Fleet requests - // instances from the lowest priced Spot Instance pool that has available capacity. - // If the lowest priced pool doesn't have available capacity, the Spot Instances - // come from the next lowest priced pool that has available capacity. If a pool - // runs out of capacity before fulfilling your desired capacity, EC2 Fleet will - // continue to fulfill your request by drawing from the next lowest priced pool. To - // ensure that your desired capacity is met, you might receive Spot Instances from - // several pools. Because this strategy only considers instance price and not - // capacity availability, it might lead to high interruption rates. Default: - // lowest-price + // in the Amazon EC2 User Guide. lowest-price - EC2 Fleet launches instances from + // the lowest-price Spot Instance pool that has available capacity. If the cheapest + // pool doesn't have available capacity, the Spot Instances come from the next + // cheapest pool that has available capacity. If a pool runs out of capacity before + // fulfilling your desired capacity, EC2 Fleet will continue to fulfill your + // request by drawing from the next cheapest pool. To ensure that your desired + // capacity is met, you might receive Spot Instances from several pools. + // diversified - EC2 Fleet launches instances from all of the Spot Instance pools + // that you specify. capacity-optimized (recommended) - EC2 Fleet launches + // instances from Spot Instance pools with optimal capacity for the number of + // instances that are launching. To give certain instance types a higher chance of + // launching first, use capacity-optimized-prioritized. Set a priority for each + // instance type by using the Priority parameter for LaunchTemplateOverrides. You + // can assign the same priority to different LaunchTemplateOverrides. EC2 + // implements the priorities on a best-effort basis, but optimizes for capacity + // first. capacity-optimized-prioritized is supported only if your fleet uses a + // launch template. Note that if the On-Demand AllocationStrategy is set to + // prioritized, the same priority is applied when fulfilling On-Demand capacity. + // Default: lowest-price AllocationStrategy SpotAllocationStrategy // The behavior when a Spot Instance is interrupted. Default: terminate @@ -13645,37 +13621,25 @@ type SpotOptionsRequest struct { // across the Spot Instance pools specified by the EC2 Fleet launch configuration. // For more information, see Allocation strategies for Spot Instances // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-allocation-strategy.html) - // in the Amazon EC2 User Guide. price-capacity-optimized (recommended) EC2 Fleet - // identifies the pools with - // - // the highest capacity availability for the number of - // instances that are launching. This means that we will request Spot Instances - // from the pools that we believe have the lowest chance of interruption in the - // near term. EC2 Fleet then requests Spot Instances from the lowest priced of - // these pools. capacity-optimized EC2 Fleet identifies the pools with - // - // the highest - // capacity availability for the number of instances that are launching. This means - // that we will request Spot Instances from the pools that we believe have the - // lowest chance of interruption in the near term. To give certain instance types a - // higher chance of launching first, use capacity-optimized-prioritized. Set a - // priority for each instance type by using the Priority parameter for - // LaunchTemplateOverrides. You can assign the same priority to different - // LaunchTemplateOverrides. EC2 implements the priorities on a best-effort basis, - // but optimizes for capacity first. capacity-optimized-prioritized is supported - // only if your EC2 Fleet uses a launch template. Note that if the On-Demand - // AllocationStrategy is set to prioritized, the same priority is applied when - // fulfilling On-Demand capacity. diversified EC2 Fleet requests instances from all - // of the Spot Instance pools that you specify. lowest-price EC2 Fleet requests - // instances from the lowest priced Spot Instance pool that has available capacity. - // If the lowest priced pool doesn't have available capacity, the Spot Instances - // come from the next lowest priced pool that has available capacity. If a pool - // runs out of capacity before fulfilling your desired capacity, EC2 Fleet will - // continue to fulfill your request by drawing from the next lowest priced pool. To - // ensure that your desired capacity is met, you might receive Spot Instances from - // several pools. Because this strategy only considers instance price and not - // capacity availability, it might lead to high interruption rates. Default: - // lowest-price + // in the Amazon EC2 User Guide. lowest-price - EC2 Fleet launches instances from + // the lowest-price Spot Instance pool that has available capacity. If the cheapest + // pool doesn't have available capacity, the Spot Instances come from the next + // cheapest pool that has available capacity. If a pool runs out of capacity before + // fulfilling your desired capacity, EC2 Fleet will continue to fulfill your + // request by drawing from the next cheapest pool. To ensure that your desired + // capacity is met, you might receive Spot Instances from several pools. + // diversified - EC2 Fleet launches instances from all of the Spot Instance pools + // that you specify. capacity-optimized (recommended) - EC2 Fleet launches + // instances from Spot Instance pools with optimal capacity for the number of + // instances that are launching. To give certain instance types a higher chance of + // launching first, use capacity-optimized-prioritized. Set a priority for each + // instance type by using the Priority parameter for LaunchTemplateOverrides. You + // can assign the same priority to different LaunchTemplateOverrides. EC2 + // implements the priorities on a best-effort basis, but optimizes for capacity + // first. capacity-optimized-prioritized is supported only if your fleet uses a + // launch template. Note that if the On-Demand AllocationStrategy is set to + // prioritized, the same priority is applied when fulfilling On-Demand capacity. + // Default: lowest-price AllocationStrategy SpotAllocationStrategy // The behavior when a Spot Instance is interrupted. Default: terminate diff --git a/service/elasticloadbalancingv2/api_op_CreateTargetGroup.go b/service/elasticloadbalancingv2/api_op_CreateTargetGroup.go index 5407058709a..98694fae937 100644 --- a/service/elasticloadbalancingv2/api_op_CreateTargetGroup.go +++ b/service/elasticloadbalancingv2/api_op_CreateTargetGroup.go @@ -59,11 +59,10 @@ type CreateTargetGroupInput struct { HealthCheckEnabled *bool // The approximate amount of time, in seconds, between health checks of an - // individual target. If the target group protocol is HTTP or HTTPS, the default is - // 30 seconds. If the target group protocol is TCP, TLS, UDP, or TCP_UDP, the - // supported values are 10 and 30 seconds and the default is 30 seconds. If the - // target group protocol is GENEVE, the default is 10 seconds. If the target type - // is lambda, the default is 35 seconds. + // individual target. The range is 5-300. If the target group protocol is TCP, TLS, + // UDP, TCP_UDP, HTTP or HTTPS, the default is 30 seconds. If the target group + // protocol is GENEVE, the default is 10 seconds. If the target type is lambda, the + // default is 35 seconds. HealthCheckIntervalSeconds *int32 // [HTTP/HTTPS health checks] The destination for health checks on the targets. @@ -87,17 +86,17 @@ type CreateTargetGroupInput struct { HealthCheckProtocol types.ProtocolEnum // The amount of time, in seconds, during which no response from a target means a - // failed health check. For target groups with a protocol of HTTP, HTTPS, or - // GENEVE, the default is 5 seconds. For target groups with a protocol of TCP or - // TLS, this value must be 6 seconds for HTTP health checks and 10 seconds for TCP - // and HTTPS health checks. If the target type is lambda, the default is 30 - // seconds. + // failed health check. The range is 2–120 seconds. For target groups with a + // protocol of HTTP, the default is 6 seconds. For target groups with a protocol of + // TCP, TLS or HTTPS, the default is 10 seconds. For target groups with a protocol + // of GENEVE, the default is 5 seconds. If the target type is lambda, the default + // is 30 seconds. HealthCheckTimeoutSeconds *int32 - // The number of consecutive health checks successes required before considering an - // unhealthy target healthy. For target groups with a protocol of HTTP or HTTPS, - // the default is 5. For target groups with a protocol of TCP, TLS, or GENEVE, the - // default is 3. If the target type is lambda, the default is 5. + // The number of consecutive health check successes required before considering a + // target healthy. The range is 2-10. If the target group protocol is TCP, TCP_UDP, + // UDP, TLS, HTTP or HTTPS, the default is 5. For target groups with a protocol of + // GENEVE, the default is 3. If the target type is lambda, the default is 5. HealthyThresholdCount *int32 // The type of IP address used for this target group. The possible values are ipv4 @@ -106,7 +105,10 @@ type CreateTargetGroupInput struct { IpAddressType types.TargetGroupIpAddressTypeEnum // [HTTP/HTTPS health checks] The HTTP or gRPC codes to use when checking for a - // successful response from a target. + // successful response from a target. For target groups with a protocol of TCP, + // TCP_UDP, UDP or TLS the range is 200-599. For target groups with a protocol of + // HTTP or HTTPS, the range is 200-499. For target groups with a protocol of + // GENEVE, the range is 200-399. Matcher *types.Matcher // The port on which the targets receive traffic. This port is used unless you @@ -151,10 +153,10 @@ type CreateTargetGroupInput struct { TargetType types.TargetTypeEnum // The number of consecutive health check failures required before considering a - // target unhealthy. If the target group protocol is HTTP or HTTPS, the default is - // 2. If the target group protocol is TCP or TLS, this value must be the same as - // the healthy threshold count. If the target group protocol is GENEVE, the default - // is 3. If the target type is lambda, the default is 2. + // target unhealthy. The range is 2-10. If the target group protocol is TCP, + // TCP_UDP, UDP, TLS, HTTP or HTTPS, the default is 2. For target groups with a + // protocol of GENEVE, the default is 3. If the target type is lambda, the default + // is 5. UnhealthyThresholdCount *int32 // The identifier of the virtual private cloud (VPC). If the target is a Lambda diff --git a/service/elasticloadbalancingv2/api_op_ModifyTargetGroup.go b/service/elasticloadbalancingv2/api_op_ModifyTargetGroup.go index 33ba987ba56..0c91257f6fb 100644 --- a/service/elasticloadbalancingv2/api_op_ModifyTargetGroup.go +++ b/service/elasticloadbalancingv2/api_op_ModifyTargetGroup.go @@ -12,9 +12,7 @@ import ( ) // Modifies the health checks used when evaluating the health state of the targets -// in the specified target group. If the protocol of the target group is TCP, TLS, -// UDP, or TCP_UDP, you can't modify the health check protocol, interval, timeout, -// or success codes. +// in the specified target group. func (c *Client) ModifyTargetGroup(ctx context.Context, params *ModifyTargetGroupInput, optFns ...func(*Options)) (*ModifyTargetGroupOutput, error) { if params == nil { params = &ModifyTargetGroupInput{} @@ -41,8 +39,7 @@ type ModifyTargetGroupInput struct { HealthCheckEnabled *bool // The approximate amount of time, in seconds, between health checks of an - // individual target. For TCP health checks, the supported values are 10 or 30 - // seconds. + // individual target. HealthCheckIntervalSeconds *int32 // [HTTP/HTTPS health checks] The destination for health checks on the targets. @@ -72,12 +69,14 @@ type ModifyTargetGroupInput struct { HealthyThresholdCount *int32 // [HTTP/HTTPS health checks] The HTTP or gRPC codes to use when checking for a - // successful response from a target. + // successful response from a target. For target groups with a protocol of TCP, + // TCP_UDP, UDP or TLS the range is 200-599. For target groups with a protocol of + // HTTP or HTTPS, the range is 200-499. For target groups with a protocol of + // GENEVE, the range is 200-399. Matcher *types.Matcher // The number of consecutive health check failures required before considering the - // target unhealthy. For target groups with a protocol of TCP or TLS, this value - // must be the same as the healthy threshold count. + // target unhealthy. UnhealthyThresholdCount *int32 noSmithyDocumentSerde diff --git a/service/elasticloadbalancingv2/types/types.go b/service/elasticloadbalancingv2/types/types.go index adcf0b7fdb7..a1d1afb3db1 100644 --- a/service/elasticloadbalancingv2/types/types.go +++ b/service/elasticloadbalancingv2/types/types.go @@ -250,8 +250,8 @@ type ForwardActionConfig struct { // The target group stickiness for the rule. TargetGroupStickinessConfig *TargetGroupStickinessConfig - // One or more target groups. For Network Load Balancers, you can specify a single - // target group. + // The target groups. For Network Load Balancers, you can specify a single target + // group. TargetGroups []TargetGroupTuple noSmithyDocumentSerde @@ -260,11 +260,11 @@ type ForwardActionConfig struct { // Information about a host header condition. type HostHeaderConditionConfig struct { - // One or more host names. The maximum size of each name is 128 characters. The - // comparison is case insensitive. The following wildcard characters are supported: - // * (matches 0 or more characters) and ? (matches exactly 1 character). If you - // specify multiple strings, the condition is satisfied if one of the strings - // matches the host name. + // The host names. The maximum size of each name is 128 characters. The comparison + // is case insensitive. The following wildcard characters are supported: * (matches + // 0 or more characters) and ? (matches exactly 1 character). If you specify + // multiple strings, the condition is satisfied if one of the strings matches the + // host name. Values []string noSmithyDocumentSerde @@ -281,14 +281,14 @@ type HttpHeaderConditionConfig struct { // condition. HttpHeaderName *string - // One or more strings to compare against the value of the HTTP header. The maximum - // size of each string is 128 characters. The comparison strings are case - // insensitive. The following wildcard characters are supported: * (matches 0 or - // more characters) and ? (matches exactly 1 character). If the same header appears - // multiple times in the request, we search them in order until a match is found. - // If you specify multiple strings, the condition is satisfied if one of the - // strings matches the value of the HTTP header. To require that all of the strings - // are a match, create one condition per string. + // The strings to compare against the value of the HTTP header. The maximum size of + // each string is 128 characters. The comparison strings are case insensitive. The + // following wildcard characters are supported: * (matches 0 or more characters) + // and ? (matches exactly 1 character). If the same header appears multiple times + // in the request, we search them in order until a match is found. If you specify + // multiple strings, the condition is satisfied if one of the strings matches the + // value of the HTTP header. To require that all of the strings are a match, create + // one condition per string. Values []string noSmithyDocumentSerde @@ -483,49 +483,55 @@ type LoadBalancerAddress struct { // Information about a load balancer attribute. type LoadBalancerAttribute struct { - // The name of the attribute. The following attribute is supported by all load + // The name of the attribute. The following attributes are supported by all load // balancers: // // * deletion_protection.enabled - Indicates whether deletion // protection is enabled. The value is true or false. The default is false. // - // The - // following attributes are supported by both Application Load Balancers and - // Network Load Balancers: + // * + // load_balancing.cross_zone.enabled - Indicates whether cross-zone load balancing + // is enabled. The possible values are true and false. The default for Network Load + // Balancers and Gateway Load Balancers is false. The default for Application Load + // Balancers is true, and cannot be changed. // - // * access_logs.s3.enabled - Indicates whether access - // logs are enabled. The value is true or false. The default is false. + // The following attributes are + // supported by both Application Load Balancers and Network Load Balancers: // // * - // access_logs.s3.bucket - The name of the S3 bucket for the access logs. This - // attribute is required if access logs are enabled. The bucket must exist in the - // same region as the load balancer and have a bucket policy that grants Elastic - // Load Balancing permissions to write to the bucket. + // access_logs.s3.enabled - Indicates whether access logs are enabled. The value is + // true or false. The default is false. // - // * access_logs.s3.prefix - - // The prefix for the location in the S3 bucket for the access logs. + // * access_logs.s3.bucket - The name of the + // S3 bucket for the access logs. This attribute is required if access logs are + // enabled. The bucket must exist in the same region as the load balancer and have + // a bucket policy that grants Elastic Load Balancing permissions to write to the + // bucket. // - // * - // ipv6.deny_all_igw_traffic - Blocks internet gateway (IGW) access to the load - // balancer. It is set to false for internet-facing load balancers and true for - // internal load balancers, preventing unintended access to your internal load - // balancer through an internet gateway. + // * access_logs.s3.prefix - The prefix for the location in the S3 bucket + // for the access logs. // - // The following attributes are supported by - // only Application Load Balancers: + // * ipv6.deny_all_igw_traffic - Blocks internet gateway + // (IGW) access to the load balancer. It is set to false for internet-facing load + // balancers and true for internal load balancers, preventing unintended access to + // your internal load balancer through an internet gateway. // - // * idle_timeout.timeout_seconds - The idle - // timeout value, in seconds. The valid range is 1-4000 seconds. The default is 60 - // seconds. + // The following + // attributes are supported by only Application Load Balancers: // - // * routing.http.desync_mitigation_mode - Determines how the load - // balancer handles requests that might pose a security risk to your application. - // The possible values are monitor, defensive, and strictest. The default is - // defensive. + // * + // idle_timeout.timeout_seconds - The idle timeout value, in seconds. The valid + // range is 1-4000 seconds. The default is 60 seconds. // - // * routing.http.drop_invalid_header_fields.enabled - Indicates - // whether HTTP headers with invalid header fields are removed by the load balancer - // (true) or routed to targets (false). The default is false. + // * + // routing.http.desync_mitigation_mode - Determines how the load balancer handles + // requests that might pose a security risk to your application. The possible + // values are monitor, defensive, and strictest. The default is defensive. + // + // * + // routing.http.drop_invalid_header_fields.enabled - Indicates whether HTTP headers + // with invalid header fields are removed by the load balancer (true) or routed to + // targets (false). The default is false. // // * // routing.http.preserve_host_header.enabled - Indicates whether the Application @@ -575,13 +581,6 @@ type LoadBalancerAttribute struct { // WAF-enabled load balancer to route requests to targets if it is unable to // forward the request to Amazon Web Services WAF. The possible values are true and // false. The default is false. - // - // The following attribute is supported by Network - // Load Balancers and Gateway Load Balancers: - // - // * load_balancing.cross_zone.enabled - // - Indicates whether cross-zone load balancing is enabled. The possible values - // are true and false. The default is false. Key *string // The value of the attribute. @@ -615,11 +614,14 @@ type Matcher struct { // 12. GrpcCode *string - // For Application Load Balancers, you can specify values between 200 and 499, and - // the default value is 200. You can specify multiple values (for example, + // For Application Load Balancers, you can specify values between 200 and 499, with + // the default value being 200. You can specify multiple values (for example, // "200,202") or a range of values (for example, "200-299"). For Network Load - // Balancers and Gateway Load Balancers, this must be "200–399". Note that when - // using shorthand syntax, some values such as commas need to be escaped. + // Balancers, you can specify values between 200 and 599, with the default value + // being 200-399. You can specify multiple values (for example, "200,202") or a + // range of values (for example, "200-299"). For Gateway Load Balancers, this must + // be "200–399". Note that when using shorthand syntax, some values such as commas + // need to be escaped. HttpCode *string noSmithyDocumentSerde @@ -628,13 +630,13 @@ type Matcher struct { // Information about a path pattern condition. type PathPatternConditionConfig struct { - // One or more path patterns to compare against the request URL. The maximum size - // of each string is 128 characters. The comparison is case sensitive. The - // following wildcard characters are supported: * (matches 0 or more characters) - // and ? (matches exactly 1 character). If you specify multiple strings, the - // condition is satisfied if one of them matches the request URL. The path pattern - // is compared only to the path of the URL, not to its query string. To compare - // against the query string, use QueryStringConditionConfig. + // The path patterns to compare against the request URL. The maximum size of each + // string is 128 characters. The comparison is case sensitive. The following + // wildcard characters are supported: * (matches 0 or more characters) and ? + // (matches exactly 1 character). If you specify multiple strings, the condition is + // satisfied if one of them matches the request URL. The path pattern is compared + // only to the path of the URL, not to its query string. To compare against the + // query string, use QueryStringConditionConfig. Values []string noSmithyDocumentSerde @@ -647,13 +649,13 @@ type PathPatternConditionConfig struct { // character can be percentage encoded. type QueryStringConditionConfig struct { - // One or more key/value pairs or values to find in the query string. The maximum - // size of each string is 128 characters. The comparison is case insensitive. The - // following wildcard characters are supported: * (matches 0 or more characters) - // and ? (matches exactly 1 character). To search for a literal '*' or '?' - // character in a query string, you must escape these characters in Values using a - // '\' character. If you specify multiple key/value pairs or values, the condition - // is satisfied if one of them is found in the query string. + // The key/value pairs or values to find in the query string. The maximum size of + // each string is 128 characters. The comparison is case insensitive. The following + // wildcard characters are supported: * (matches 0 or more characters) and ? + // (matches exactly 1 character). To search for a literal '*' or '?' character in a + // query string, you must escape these characters in Values using a '\' character. + // If you specify multiple key/value pairs or values, the condition is satisfied if + // one of them is found in the query string. Values []QueryStringKeyValuePair noSmithyDocumentSerde @@ -849,7 +851,7 @@ type RulePriorityPair struct { // of the client. type SourceIpConditionConfig struct { - // One or more source IP addresses, in CIDR format. You can use both IPv4 and IPv6 + // The source IP addresses, in CIDR format. You can use both IPv4 and IPv6 // addresses. Wildcards are not supported. If you specify multiple addresses, the // condition is satisfied if the source IP address of the request matches one of // the CIDR blocks. This condition is not satisfied by the addresses in the @@ -936,15 +938,18 @@ type TargetDescription struct { // An Availability Zone or all. This determines whether the target receives traffic // from the load balancer nodes in the specified Availability Zone or from all - // enabled Availability Zones for the load balancer. This parameter is not - // supported if the target type of the target group is instance or alb. If the - // target type is ip and the IP address is in a subnet of the VPC for the target - // group, the Availability Zone is automatically detected and this parameter is - // optional. If the IP address is outside the VPC, this parameter is required. With - // an Application Load Balancer, if the target type is ip and the IP address is - // outside the VPC for the target group, the only supported value is all. If the - // target type is lambda, this parameter is optional and the only supported value - // is all. + // enabled Availability Zones for the load balancer. For Application Load Balancer + // target groups, the specified Availability Zone value is only applicable when + // cross-zone load balancing is off. Otherwise the parameter is ignored and treated + // as all. This parameter is not supported if the target type of the target group + // is instance or alb. If the target type is ip and the IP address is in a subnet + // of the VPC for the target group, the Availability Zone is automatically detected + // and this parameter is optional. If the IP address is outside the VPC, this + // parameter is required. For Application Load Balancer target groups with + // cross-zone load balancing off, if the target type is ip and the IP address is + // outside of the VPC for the target group, this should be an Availability Zone + // inside the VPC for the target group. If the target type is lambda, this + // parameter is optional and the only supported value is all. AvailabilityZone *string // The port on which the target is listening. If the target group protocol is @@ -1034,7 +1039,7 @@ type TargetGroup struct { // Information about a target group attribute. type TargetGroupAttribute struct { - // The name of the attribute. The following attribute is supported by all load + // The name of the attribute. The following attributes are supported by all load // balancers: // // * deregistration_delay.timeout_seconds - The amount of time, in @@ -1043,48 +1048,82 @@ type TargetGroupAttribute struct { // default value is 300 seconds. If the target is a Lambda function, this attribute // is not supported. // - // The following attributes are supported by Application Load - // Balancers, Network Load Balancers, and Gateway Load Balancers: + // * stickiness.enabled - Indicates whether target stickiness is + // enabled. The value is true or false. The default is false. // - // * - // stickiness.enabled - Indicates whether target stickiness is enabled. The value - // is true or false. The default is false. + // * stickiness.type - + // Indicates the type of stickiness. The possible values are: // - // * stickiness.type - Indicates the type - // of stickiness. The possible values are: + // * lb_cookie and + // app_cookie for Application Load Balancers. // - // * lb_cookie and app_cookie for - // Application Load Balancers. + // * source_ip for Network Load + // Balancers. // - // * source_ip for Network Load Balancers. + // * source_ip_dest_ip and source_ip_dest_ip_proto for Gateway Load + // Balancers. // - // * - // source_ip_dest_ip and source_ip_dest_ip_proto for Gateway Load Balancers. + // The following attributes are supported by Application Load Balancers + // and Network Load Balancers: // - // The - // following attributes are supported only if the load balancer is an Application - // Load Balancer and the target is an instance or an IP address: + // * load_balancing.cross_zone.enabled - Indicates + // whether cross zone load balancing is enabled. The value is true, false or + // use_load_balancer_configuration. The default is + // use_load_balancer_configuration. // // * - // load_balancing.algorithm.type - The load balancing algorithm determines how the - // load balancer selects targets when routing requests. The value is round_robin or - // least_outstanding_requests. The default is round_robin. + // target_group_health.dns_failover.minimum_healthy_targets.count - The minimum + // number of targets that must be healthy. If the number of healthy targets is + // below this value, mark the zone as unhealthy in DNS, so that traffic is routed + // only to healthy zones. The possible values are off or an integer from 1 to the + // maximum number of targets. The default is off. // // * - // slow_start.duration_seconds - The time period, in seconds, during which a newly - // registered target receives an increasing share of the traffic to the target - // group. After this time period ends, the target receives its full share of - // traffic. The range is 30-900 seconds (15 minutes). The default is 0 seconds - // (disabled). - // - // * stickiness.app_cookie.cookie_name - Indicates the name of the - // application-based cookie. Names that start with the following prefixes are not - // allowed: AWSALB, AWSALBAPP, and AWSALBTG; they're reserved for use by the load - // balancer. + // target_group_health.dns_failover.minimum_healthy_targets.percentage - The + // minimum percentage of targets that must be healthy. If the percentage of healthy + // targets is below this value, mark the zone as unhealthy in DNS, so that traffic + // is routed only to healthy zones. The possible values are off or an integer from + // 1 to 100. The default is off. + // + // * + // target_group_health.unhealthy_state_routing.minimum_healthy_targets.count - The + // minimum number of targets that must be healthy. // - // * stickiness.app_cookie.duration_seconds - The time period, in - // seconds, during which requests from a client should be routed to the same - // target. After this time period expires, the application-based cookie is + // If the number of healthy + // targets is below this value, send traffic to all targets, including unhealthy + // targets. The possible values are 1 to the maximum number of targets. The default + // is 1. + // + // * + // target_group_health.unhealthy_state_routing.minimum_healthy_targets.percentage - + // The minimum percentage of targets that must be healthy. If the percentage of + // healthy targets is below this value, send traffic to all targets, including + // unhealthy targets. The possible values are off or an integer from 1 to 100. The + // default is off. + // + // The following attributes are supported only if the load + // balancer is an Application Load Balancer and the target is an instance or an IP + // address: + // + // * load_balancing.algorithm.type - The load balancing algorithm + // determines how the load balancer selects targets when routing requests. The + // value is round_robin or least_outstanding_requests. The default is + // round_robin. + // + // * slow_start.duration_seconds - The time period, in seconds, + // during which a newly registered target receives an increasing share of the + // traffic to the target group. After this time period ends, the target receives + // its full share of traffic. The range is 30-900 seconds (15 minutes). The default + // is 0 seconds (disabled). + // + // * stickiness.app_cookie.cookie_name - Indicates the + // name of the application-based cookie. Names that start with the following + // prefixes are not allowed: AWSALB, AWSALBAPP, and AWSALBTG; they're reserved for + // use by the load balancer. + // + // * stickiness.app_cookie.duration_seconds - The time + // period, in seconds, during which requests from a client should be routed to the + // same target. After this time period expires, the application-based cookie is // considered stale. The range is 1 second to 1 week (604800 seconds). The default // value is 1 day (86400 seconds). // diff --git a/service/emrserverless/api_op_CreateApplication.go b/service/emrserverless/api_op_CreateApplication.go index c4a6e4551fb..4cbc00b07eb 100644 --- a/service/emrserverless/api_op_CreateApplication.go +++ b/service/emrserverless/api_op_CreateApplication.go @@ -46,6 +46,9 @@ type CreateApplicationInput struct { // This member is required. Type *string + // The CPU architecture of an application. + Architecture types.Architecture + // The configuration for an application to automatically start on job submission. AutoStartConfiguration *types.AutoStartConfig diff --git a/service/emrserverless/api_op_UpdateApplication.go b/service/emrserverless/api_op_UpdateApplication.go index 8d5829341df..09e2cda62fe 100644 --- a/service/emrserverless/api_op_UpdateApplication.go +++ b/service/emrserverless/api_op_UpdateApplication.go @@ -42,6 +42,9 @@ type UpdateApplicationInput struct { // This member is required. ClientToken *string + // The CPU architecture of an application. + Architecture types.Architecture + // The configuration for an application to automatically start on job submission. AutoStartConfiguration *types.AutoStartConfig diff --git a/service/emrserverless/deserializers.go b/service/emrserverless/deserializers.go index 78024e5ca56..d01a7c51595 100644 --- a/service/emrserverless/deserializers.go +++ b/service/emrserverless/deserializers.go @@ -2285,6 +2285,15 @@ func awsRestjson1_deserializeDocumentApplication(v **types.Application, value in sv.ApplicationId = ptr.String(jtv) } + case "architecture": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Architecture to be of type string, got %T instead", value) + } + sv.Architecture = types.Architecture(jtv) + } + case "arn": if value != nil { jtv, ok := value.(string) @@ -2466,6 +2475,15 @@ func awsRestjson1_deserializeDocumentApplicationSummary(v **types.ApplicationSum for key, value := range shape { switch key { + case "architecture": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Architecture to be of type string, got %T instead", value) + } + sv.Architecture = types.Architecture(jtv) + } + case "arn": if value != nil { jtv, ok := value.(string) diff --git a/service/emrserverless/serializers.go b/service/emrserverless/serializers.go index 1efab60142b..01c7c30642f 100644 --- a/service/emrserverless/serializers.go +++ b/service/emrserverless/serializers.go @@ -142,6 +142,11 @@ func awsRestjson1_serializeOpDocumentCreateApplicationInput(v *CreateApplication object := value.Object() defer object.Close() + if len(v.Architecture) > 0 { + ok := object.Key("architecture") + ok.String(string(v.Architecture)) + } + if v.AutoStartConfiguration != nil { ok := object.Key("autoStartConfiguration") if err := awsRestjson1_serializeDocumentAutoStartConfig(v.AutoStartConfiguration, ok); err != nil { @@ -1111,6 +1116,11 @@ func awsRestjson1_serializeOpDocumentUpdateApplicationInput(v *UpdateApplication object := value.Object() defer object.Close() + if len(v.Architecture) > 0 { + ok := object.Key("architecture") + ok.String(string(v.Architecture)) + } + if v.AutoStartConfiguration != nil { ok := object.Key("autoStartConfiguration") if err := awsRestjson1_serializeDocumentAutoStartConfig(v.AutoStartConfiguration, ok); err != nil { diff --git a/service/emrserverless/types/enums.go b/service/emrserverless/types/enums.go index e3111ec8c7b..45be89513e3 100644 --- a/service/emrserverless/types/enums.go +++ b/service/emrserverless/types/enums.go @@ -30,6 +30,24 @@ func (ApplicationState) Values() []ApplicationState { } } +type Architecture string + +// Enum values for Architecture +const ( + ArchitectureArm64 Architecture = "ARM64" + ArchitectureX8664 Architecture = "X86_64" +) + +// Values returns all known values for Architecture. 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 (Architecture) Values() []Architecture { + return []Architecture{ + "ARM64", + "X86_64", + } +} + type JobRunState string // Enum values for JobRunState diff --git a/service/emrserverless/types/types.go b/service/emrserverless/types/types.go index 1cfcd5bf471..725e3d49e1e 100644 --- a/service/emrserverless/types/types.go +++ b/service/emrserverless/types/types.go @@ -45,6 +45,9 @@ type Application struct { // This member is required. UpdatedAt *time.Time + // The CPU architecture of an application. + Architecture Architecture + // The configuration for an application to automatically start on job submission. AutoStartConfiguration *AutoStartConfig @@ -113,6 +116,9 @@ type ApplicationSummary struct { // This member is required. UpdatedAt *time.Time + // The CPU architecture of an application. + Architecture Architecture + // The name of the application. Name *string diff --git a/service/ivschat/api_op_CreateChatToken.go b/service/ivschat/api_op_CreateChatToken.go index 6bbf398fb8c..2989a6781b6 100644 --- a/service/ivschat/api_op_CreateChatToken.go +++ b/service/ivschat/api_op_CreateChatToken.go @@ -12,11 +12,17 @@ import ( "time" ) -// Creates an encrypted token that is used to establish an individual WebSocket -// connection to a room. The token is valid for one minute, and a connection -// (session) established with the token is valid for the specified duration. -// Encryption keys are owned by Amazon IVS Chat and never used directly by your -// application. +// Creates an encrypted token that is used by a chat participant to establish an +// individual WebSocket chat connection to a room. When the token is used to +// connect to chat, the connection is valid for the session duration specified in +// the request. The token becomes invalid at the token-expiration timestamp +// included in the response. Use the capabilities field to permit an end user to +// send messages or moderate a room. The attributes field securely attaches +// structured data to the chat session; the data is included within each message +// sent by the end user and received by other participants in the room. Common use +// cases for attributes include passing end-user profile data like an icon, display +// name, colors, badges, and other display features. Encryption keys are owned by +// Amazon IVS Chat and never used directly by your application. func (c *Client) CreateChatToken(ctx context.Context, params *CreateChatTokenInput, optFns ...func(*Options)) (*CreateChatTokenOutput, error) { if params == nil { params = &CreateChatTokenInput{} diff --git a/service/ivschat/api_op_CreateLoggingConfiguration.go b/service/ivschat/api_op_CreateLoggingConfiguration.go new file mode 100644 index 00000000000..5a328e2e5fc --- /dev/null +++ b/service/ivschat/api_op_CreateLoggingConfiguration.go @@ -0,0 +1,165 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ivschat + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/ivschat/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Creates a logging configuration that allows clients to store and record sent +// messages. +func (c *Client) CreateLoggingConfiguration(ctx context.Context, params *CreateLoggingConfigurationInput, optFns ...func(*Options)) (*CreateLoggingConfigurationOutput, error) { + if params == nil { + params = &CreateLoggingConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateLoggingConfiguration", params, optFns, c.addOperationCreateLoggingConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateLoggingConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateLoggingConfigurationInput struct { + + // A complex type that contains a destination configuration for where chat content + // will be logged. There can be only one type of destination (cloudWatchLogs, + // firehose, or s3) in a destinationConfiguration. + // + // This member is required. + DestinationConfiguration types.DestinationConfiguration + + // Logging-configuration name. The value does not need to be unique. + Name *string + + // Tags to attach to the resource. Array of maps, each of the form string:string + // (key:value). See Tagging AWS Resources + // (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) for details, + // including restrictions that apply to tags and "Tag naming limits and + // requirements"; Amazon IVS Chat has no constraints on tags beyond what is + // documented there. + Tags map[string]string + + noSmithyDocumentSerde +} + +type CreateLoggingConfigurationOutput struct { + + // Logging-configuration ARN, assigned by the system. + Arn *string + + // Time when the logging configuration was created. This is an ISO 8601 timestamp; + // note that this is returned as a string. + CreateTime *time.Time + + // A complex type that contains a destination configuration for where chat content + // will be logged, from the request. There is only one type of destination + // (cloudWatchLogs, firehose, or s3) in a destinationConfiguration. + DestinationConfiguration types.DestinationConfiguration + + // Logging-configuration ID, generated by the system. This is a relative + // identifier, the part of the ARN that uniquely identifies the logging + // configuration. + Id *string + + // Logging-configuration name, from the request (if specified). + Name *string + + // The state of the logging configuration. When the state is ACTIVE, the + // configuration is ready to log chat content. + State types.CreateLoggingConfigurationState + + // Tags attached to the resource, from the request (if specified). Array of maps, + // each of the form string:string (key:value). + Tags map[string]string + + // Time of the logging configuration’s last update. This is an ISO 8601 timestamp; + // note that this is returned as a string. + UpdateTime *time.Time + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateLoggingConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateLoggingConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateLoggingConfiguration{}, middleware.After) + if 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); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateLoggingConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLoggingConfiguration(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opCreateLoggingConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ivschat", + OperationName: "CreateLoggingConfiguration", + } +} diff --git a/service/ivschat/api_op_CreateRoom.go b/service/ivschat/api_op_CreateRoom.go index 48598067d73..da543d3906e 100644 --- a/service/ivschat/api_op_CreateRoom.go +++ b/service/ivschat/api_op_CreateRoom.go @@ -30,6 +30,9 @@ func (c *Client) CreateRoom(ctx context.Context, params *CreateRoomInput, optFns type CreateRoomInput struct { + // Array of logging-configuration identifiers attached to the room. + LoggingConfigurationIdentifiers []string + // Maximum number of characters in a single message. Messages are expected to be // UTF-8 encoded and this limit applies specifically to rune/code-point count, not // number of bytes. Default: 500. @@ -69,11 +72,16 @@ type CreateRoomOutput struct { // ARN that uniquely identifies the room. Id *string - // Maximum number of characters in a single message, from the request. + // Array of logging configurations attached to the room, from the request (if + // specified). + LoggingConfigurationIdentifiers []string + + // Maximum number of characters in a single message, from the request (if + // specified). MaximumMessageLength int32 // Maximum number of messages per second that can be sent to the room (by all - // clients), from the request. + // clients), from the request (if specified). MaximumMessageRatePerSecond int32 // Configuration information for optional review of messages. @@ -82,7 +90,7 @@ type CreateRoomOutput struct { // Room name, from the request (if specified). Name *string - // Tags attached to the resource, from the request. + // Tags attached to the resource, from the request (if specified). Tags map[string]string // Time of the room’s last update. This is an ISO 8601 timestamp; note that this is diff --git a/service/ivschat/api_op_DeleteLoggingConfiguration.go b/service/ivschat/api_op_DeleteLoggingConfiguration.go new file mode 100644 index 00000000000..4c70415d708 --- /dev/null +++ b/service/ivschat/api_op_DeleteLoggingConfiguration.go @@ -0,0 +1,116 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ivschat + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the specified logging configuration. +func (c *Client) DeleteLoggingConfiguration(ctx context.Context, params *DeleteLoggingConfigurationInput, optFns ...func(*Options)) (*DeleteLoggingConfigurationOutput, error) { + if params == nil { + params = &DeleteLoggingConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteLoggingConfiguration", params, optFns, c.addOperationDeleteLoggingConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteLoggingConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteLoggingConfigurationInput struct { + + // Identifier of the logging configuration to be deleted. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type DeleteLoggingConfigurationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteLoggingConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteLoggingConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteLoggingConfiguration{}, middleware.After) + if 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); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteLoggingConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLoggingConfiguration(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteLoggingConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ivschat", + OperationName: "DeleteLoggingConfiguration", + } +} diff --git a/service/ivschat/api_op_GetLoggingConfiguration.go b/service/ivschat/api_op_GetLoggingConfiguration.go new file mode 100644 index 00000000000..22c199e9aa1 --- /dev/null +++ b/service/ivschat/api_op_GetLoggingConfiguration.go @@ -0,0 +1,151 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ivschat + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/ivschat/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Gets the specified logging configuration. +func (c *Client) GetLoggingConfiguration(ctx context.Context, params *GetLoggingConfigurationInput, optFns ...func(*Options)) (*GetLoggingConfigurationOutput, error) { + if params == nil { + params = &GetLoggingConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetLoggingConfiguration", params, optFns, c.addOperationGetLoggingConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetLoggingConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetLoggingConfigurationInput struct { + + // Identifier of the logging configuration to be retrieved. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type GetLoggingConfigurationOutput struct { + + // Logging-configuration ARN, from the request (if identifier was an ARN). + Arn *string + + // Time when the logging configuration was created. This is an ISO 8601 timestamp; + // note that this is returned as a string. + CreateTime *time.Time + + // A complex type that contains a destination configuration for where chat content + // will be logged. There is only one type of destination (cloudWatchLogs, firehose, + // or s3) in a destinationConfiguration. + DestinationConfiguration types.DestinationConfiguration + + // Logging-configuration ID, generated by the system. This is a relative + // identifier, the part of the ARN that uniquely identifies the logging + // configuration. + Id *string + + // Logging-configuration name. This value does not need to be unique. + Name *string + + // The state of the logging configuration. When the state is ACTIVE, the + // configuration is ready to log chat content. + State types.LoggingConfigurationState + + // Tags attached to the resource. Array of maps, each of the form string:string + // (key:value). + Tags map[string]string + + // Time of the logging configuration’s last update. This is an ISO 8601 timestamp; + // note that this is returned as a string. + UpdateTime *time.Time + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetLoggingConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetLoggingConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetLoggingConfiguration{}, middleware.After) + if 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); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpGetLoggingConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLoggingConfiguration(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opGetLoggingConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ivschat", + OperationName: "GetLoggingConfiguration", + } +} diff --git a/service/ivschat/api_op_GetRoom.go b/service/ivschat/api_op_GetRoom.go index d8a63c65897..9d42fc9de68 100644 --- a/service/ivschat/api_op_GetRoom.go +++ b/service/ivschat/api_op_GetRoom.go @@ -52,6 +52,9 @@ type GetRoomOutput struct { // ARN that uniquely identifies the room. Id *string + // Array of logging configurations attached to the room. + LoggingConfigurationIdentifiers []string + // Maximum number of characters in a single message. Messages are expected to be // UTF-8 encoded and this limit applies specifically to rune/code-point count, not // number of bytes. Default: 500. diff --git a/service/ivschat/api_op_ListLoggingConfigurations.go b/service/ivschat/api_op_ListLoggingConfigurations.go new file mode 100644 index 00000000000..1ac604d2982 --- /dev/null +++ b/service/ivschat/api_op_ListLoggingConfigurations.go @@ -0,0 +1,218 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ivschat + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/ivschat/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets summary information about all your logging configurations in the AWS region +// where the API request is processed. +func (c *Client) ListLoggingConfigurations(ctx context.Context, params *ListLoggingConfigurationsInput, optFns ...func(*Options)) (*ListLoggingConfigurationsOutput, error) { + if params == nil { + params = &ListLoggingConfigurationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListLoggingConfigurations", params, optFns, c.addOperationListLoggingConfigurationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListLoggingConfigurationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListLoggingConfigurationsInput struct { + + // Maximum number of logging configurations to return. Default: 50. + MaxResults int32 + + // The first logging configurations to retrieve. This is used for pagination; see + // the nextToken response field. + NextToken *string + + noSmithyDocumentSerde +} + +type ListLoggingConfigurationsOutput struct { + + // List of the matching logging configurations (summary information only). There is + // only one type of destination (cloudWatchLogs, firehose, or s3) in a + // destinationConfiguration. + // + // This member is required. + LoggingConfigurations []types.LoggingConfigurationSummary + + // If there are more logging configurations than maxResults, use nextToken in the + // request to get the next set. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListLoggingConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListLoggingConfigurations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListLoggingConfigurations{}, middleware.After) + if 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); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLoggingConfigurations(options.Region), middleware.Before); 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 + } + return nil +} + +// ListLoggingConfigurationsAPIClient is a client that implements the +// ListLoggingConfigurations operation. +type ListLoggingConfigurationsAPIClient interface { + ListLoggingConfigurations(context.Context, *ListLoggingConfigurationsInput, ...func(*Options)) (*ListLoggingConfigurationsOutput, error) +} + +var _ ListLoggingConfigurationsAPIClient = (*Client)(nil) + +// ListLoggingConfigurationsPaginatorOptions is the paginator options for +// ListLoggingConfigurations +type ListLoggingConfigurationsPaginatorOptions struct { + // Maximum number of logging configurations to return. Default: 50. + 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 +} + +// ListLoggingConfigurationsPaginator is a paginator for ListLoggingConfigurations +type ListLoggingConfigurationsPaginator struct { + options ListLoggingConfigurationsPaginatorOptions + client ListLoggingConfigurationsAPIClient + params *ListLoggingConfigurationsInput + nextToken *string + firstPage bool +} + +// NewListLoggingConfigurationsPaginator returns a new +// ListLoggingConfigurationsPaginator +func NewListLoggingConfigurationsPaginator(client ListLoggingConfigurationsAPIClient, params *ListLoggingConfigurationsInput, optFns ...func(*ListLoggingConfigurationsPaginatorOptions)) *ListLoggingConfigurationsPaginator { + if params == nil { + params = &ListLoggingConfigurationsInput{} + } + + options := ListLoggingConfigurationsPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListLoggingConfigurationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListLoggingConfigurationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListLoggingConfigurations page. +func (p *ListLoggingConfigurationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListLoggingConfigurationsOutput, 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.ListLoggingConfigurations(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_opListLoggingConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ivschat", + OperationName: "ListLoggingConfigurations", + } +} diff --git a/service/ivschat/api_op_ListRooms.go b/service/ivschat/api_op_ListRooms.go index a557328fc46..4981350b956 100644 --- a/service/ivschat/api_op_ListRooms.go +++ b/service/ivschat/api_op_ListRooms.go @@ -31,6 +31,9 @@ func (c *Client) ListRooms(ctx context.Context, params *ListRoomsInput, optFns . type ListRoomsInput struct { + // Logging-configuration identifier. + LoggingConfigurationIdentifier *string + // Maximum number of rooms to return. Default: 50. MaxResults int32 diff --git a/service/ivschat/api_op_ListTagsForResource.go b/service/ivschat/api_op_ListTagsForResource.go index e8e8618347f..13e2595ad2f 100644 --- a/service/ivschat/api_op_ListTagsForResource.go +++ b/service/ivschat/api_op_ListTagsForResource.go @@ -38,7 +38,8 @@ type ListTagsForResourceInput struct { type ListTagsForResourceOutput struct { - // Tags attached to the resource, from the request. + // Tags attached to the resource. Array of maps, each of the form string:string + // (key:value). // // This member is required. Tags map[string]string diff --git a/service/ivschat/api_op_TagResource.go b/service/ivschat/api_op_TagResource.go index 2e960257ea5..ba4e2845fb6 100644 --- a/service/ivschat/api_op_TagResource.go +++ b/service/ivschat/api_op_TagResource.go @@ -33,7 +33,8 @@ type TagResourceInput struct { // This member is required. ResourceArn *string - // Array of tags to be added or updated. See Tagging AWS Resources + // Array of tags to be added or updated. Array of maps, each of the form + // string:string (key:value). See Tagging AWS Resources // (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) for details, // including restrictions that apply to tags and "Tag naming limits and // requirements"; Amazon IVS Chat has no constraints beyond what is documented diff --git a/service/ivschat/api_op_UntagResource.go b/service/ivschat/api_op_UntagResource.go index 5688a25e458..bc6d0e6d388 100644 --- a/service/ivschat/api_op_UntagResource.go +++ b/service/ivschat/api_op_UntagResource.go @@ -33,7 +33,8 @@ type UntagResourceInput struct { // This member is required. ResourceArn *string - // Array of tags to be removed. See Tagging AWS Resources + // Array of tags to be removed. Array of maps, each of the form string:string + // (key:value). See Tagging AWS Resources // (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) for details, // including restrictions that apply to tags and "Tag naming limits and // requirements"; Amazon IVS Chat has no constraints beyond what is documented diff --git a/service/ivschat/api_op_UpdateLoggingConfiguration.go b/service/ivschat/api_op_UpdateLoggingConfiguration.go new file mode 100644 index 00000000000..318e6beb586 --- /dev/null +++ b/service/ivschat/api_op_UpdateLoggingConfiguration.go @@ -0,0 +1,158 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ivschat + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/ivschat/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Updates a specified logging configuration. +func (c *Client) UpdateLoggingConfiguration(ctx context.Context, params *UpdateLoggingConfigurationInput, optFns ...func(*Options)) (*UpdateLoggingConfigurationOutput, error) { + if params == nil { + params = &UpdateLoggingConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateLoggingConfiguration", params, optFns, c.addOperationUpdateLoggingConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateLoggingConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateLoggingConfigurationInput struct { + + // Identifier of the logging configuration to be updated. + // + // This member is required. + Identifier *string + + // A complex type that contains a destination configuration for where chat content + // will be logged. There can be only one type of destination (cloudWatchLogs, + // firehose, or s3) in a destinationConfiguration. + DestinationConfiguration types.DestinationConfiguration + + // Logging-configuration name. The value does not need to be unique. + Name *string + + noSmithyDocumentSerde +} + +type UpdateLoggingConfigurationOutput struct { + + // Logging-configuration ARN, from the request (if identifier was an ARN). + Arn *string + + // Time when the logging configuration was created. This is an ISO 8601 timestamp; + // note that this is returned as a string. + CreateTime *time.Time + + // A complex type that contains a destination configuration for where chat content + // will be logged, from the request. There is only one type of destination + // (cloudWatchLogs, firehose, or s3) in a destinationConfiguration. + DestinationConfiguration types.DestinationConfiguration + + // Logging-configuration ID, generated by the system. This is a relative + // identifier, the part of the ARN that uniquely identifies the room. + Id *string + + // Logging-configuration name, from the request (if specified). + Name *string + + // The state of the logging configuration. When the state is ACTIVE, the + // configuration is ready to log chat content. + State types.UpdateLoggingConfigurationState + + // Tags attached to the resource. Array of maps, each of the form string:string + // (key:value). + Tags map[string]string + + // Time of the logging configuration’s last update. This is an ISO 8601 timestamp; + // note that this is returned as a string. + UpdateTime *time.Time + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateLoggingConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateLoggingConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateLoggingConfiguration{}, middleware.After) + if 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); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateLoggingConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateLoggingConfiguration(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateLoggingConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ivschat", + OperationName: "UpdateLoggingConfiguration", + } +} diff --git a/service/ivschat/api_op_UpdateRoom.go b/service/ivschat/api_op_UpdateRoom.go index fcc4a0947bf..adffa172132 100644 --- a/service/ivschat/api_op_UpdateRoom.go +++ b/service/ivschat/api_op_UpdateRoom.go @@ -35,6 +35,9 @@ type UpdateRoomInput struct { // This member is required. Identifier *string + // Array of logging-configuration identifiers attached to the room. + LoggingConfigurationIdentifiers []string + // The maximum number of characters in a single message. Messages are expected to // be UTF-8 encoded and this limit applies specifically to rune/code-point count, // not number of bytes. Default: 500. @@ -67,20 +70,26 @@ type UpdateRoomOutput struct { // ARN that uniquely identifies the room. Id *string - // Maximum number of characters in a single message, from the request. + // Array of logging configurations attached to the room, from the request (if + // specified). + LoggingConfigurationIdentifiers []string + + // Maximum number of characters in a single message, from the request (if + // specified). MaximumMessageLength int32 // Maximum number of messages per second that can be sent to the room (by all - // clients), from the request. + // clients), from the request (if specified). MaximumMessageRatePerSecond int32 // Configuration information for optional review of messages. MessageReviewHandler *types.MessageReviewHandler - // Room name, from the request. + // Room name, from the request (if specified). Name *string - // Tags attached to the resource. + // Tags attached to the resource. Array of maps, each of the form string:string + // (key:value). Tags map[string]string // Time of the room’s last update. This is an ISO 8601 timestamp; note that this is diff --git a/service/ivschat/deserializers.go b/service/ivschat/deserializers.go index 35e381bfc25..a01320e7584 100644 --- a/service/ivschat/deserializers.go +++ b/service/ivschat/deserializers.go @@ -206,14 +206,14 @@ func awsRestjson1_deserializeOpDocumentCreateChatTokenOutput(v **CreateChatToken return nil } -type awsRestjson1_deserializeOpCreateRoom struct { +type awsRestjson1_deserializeOpCreateLoggingConfiguration struct { } -func (*awsRestjson1_deserializeOpCreateRoom) ID() string { +func (*awsRestjson1_deserializeOpCreateLoggingConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateRoom) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateLoggingConfiguration) 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) @@ -227,9 +227,9 @@ func (m *awsRestjson1_deserializeOpCreateRoom) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateRoom(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateLoggingConfiguration(response, &metadata) } - output := &CreateRoomOutput{} + output := &CreateLoggingConfigurationOutput{} out.Result = output var buff [1024]byte @@ -250,7 +250,7 @@ func (m *awsRestjson1_deserializeOpCreateRoom) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateRoomOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateLoggingConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -263,7 +263,7 @@ func (m *awsRestjson1_deserializeOpCreateRoom) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateRoom(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateLoggingConfiguration(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)} @@ -332,7 +332,7 @@ func awsRestjson1_deserializeOpErrorCreateRoom(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentCreateRoomOutput(v **CreateRoomOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateLoggingConfigurationOutput(v **CreateLoggingConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -345,9 +345,9 @@ func awsRestjson1_deserializeOpDocumentCreateRoomOutput(v **CreateRoomOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateRoomOutput + var sv *CreateLoggingConfigurationOutput if *v == nil { - sv = &CreateRoomOutput{} + sv = &CreateLoggingConfigurationOutput{} } else { sv = *v } @@ -358,7 +358,7 @@ func awsRestjson1_deserializeOpDocumentCreateRoomOutput(v **CreateRoomOutput, va if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RoomArn to be of type string, got %T instead", value) + return fmt.Errorf("expected LoggingConfigurationArn to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } @@ -376,53 +376,36 @@ func awsRestjson1_deserializeOpDocumentCreateRoomOutput(v **CreateRoomOutput, va sv.CreateTime = ptr.Time(t) } + case "destinationConfiguration": + if err := awsRestjson1_deserializeDocumentDestinationConfiguration(&sv.DestinationConfiguration, value); err != nil { + return err + } + case "id": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RoomID to be of type string, got %T instead", value) + return fmt.Errorf("expected LoggingConfigurationID to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } - case "maximumMessageLength": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected RoomMaxMessageLength to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.MaximumMessageLength = int32(i64) - } - - case "maximumMessageRatePerSecond": + case "name": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RoomMaxMessageRatePerSecond to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected LoggingConfigurationName to be of type string, got %T instead", value) } - sv.MaximumMessageRatePerSecond = int32(i64) - } - - case "messageReviewHandler": - if err := awsRestjson1_deserializeDocumentMessageReviewHandler(&sv.MessageReviewHandler, value); err != nil { - return err + sv.Name = ptr.String(jtv) } - case "name": + case "state": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RoomName to be of type string, got %T instead", value) + return fmt.Errorf("expected CreateLoggingConfigurationState to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.State = types.CreateLoggingConfigurationState(jtv) } case "tags": @@ -452,14 +435,14 @@ func awsRestjson1_deserializeOpDocumentCreateRoomOutput(v **CreateRoomOutput, va return nil } -type awsRestjson1_deserializeOpDeleteMessage struct { +type awsRestjson1_deserializeOpCreateRoom struct { } -func (*awsRestjson1_deserializeOpDeleteMessage) ID() string { +func (*awsRestjson1_deserializeOpCreateRoom) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteMessage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateRoom) 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) @@ -473,9 +456,9 @@ func (m *awsRestjson1_deserializeOpDeleteMessage) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteMessage(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateRoom(response, &metadata) } - output := &DeleteMessageOutput{} + output := &CreateRoomOutput{} out.Result = output var buff [1024]byte @@ -496,7 +479,7 @@ func (m *awsRestjson1_deserializeOpDeleteMessage) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteMessageOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateRoomOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -509,7 +492,7 @@ func (m *awsRestjson1_deserializeOpDeleteMessage) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteMessage(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateRoom(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)} @@ -553,11 +536,17 @@ func awsRestjson1_deserializeOpErrorDeleteMessage(response *smithyhttp.Response, case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("PendingVerification", errorCode): + return awsRestjson1_deserializeErrorPendingVerification(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): - return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) @@ -572,7 +561,7 @@ func awsRestjson1_deserializeOpErrorDeleteMessage(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentDeleteMessageOutput(v **DeleteMessageOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateRoomOutput(v **CreateRoomOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -585,24 +574,109 @@ func awsRestjson1_deserializeOpDocumentDeleteMessageOutput(v **DeleteMessageOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteMessageOutput + var sv *CreateRoomOutput if *v == nil { - sv = &DeleteMessageOutput{} + sv = &CreateRoomOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoomArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Time to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreateTime = ptr.Time(t) + } + case "id": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ID to be of type string, got %T instead", value) + return fmt.Errorf("expected RoomID to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } + case "loggingConfigurationIdentifiers": + if err := awsRestjson1_deserializeDocumentLoggingConfigurationIdentifierList(&sv.LoggingConfigurationIdentifiers, value); err != nil { + return err + } + + case "maximumMessageLength": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected RoomMaxMessageLength to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumMessageLength = int32(i64) + } + + case "maximumMessageRatePerSecond": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected RoomMaxMessageRatePerSecond to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumMessageRatePerSecond = int32(i64) + } + + case "messageReviewHandler": + if err := awsRestjson1_deserializeDocumentMessageReviewHandler(&sv.MessageReviewHandler, value); err != nil { + return err + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoomName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + case "updateTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Time to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.UpdateTime = ptr.Time(t) + } + default: _, _ = key, value @@ -612,14 +686,14 @@ func awsRestjson1_deserializeOpDocumentDeleteMessageOutput(v **DeleteMessageOutp return nil } -type awsRestjson1_deserializeOpDeleteRoom struct { +type awsRestjson1_deserializeOpDeleteLoggingConfiguration struct { } -func (*awsRestjson1_deserializeOpDeleteRoom) ID() string { +func (*awsRestjson1_deserializeOpDeleteLoggingConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteRoom) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteLoggingConfiguration) 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) @@ -633,9 +707,9 @@ func (m *awsRestjson1_deserializeOpDeleteRoom) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteRoom(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteLoggingConfiguration(response, &metadata) } - output := &DeleteRoomOutput{} + output := &DeleteLoggingConfigurationOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -647,7 +721,7 @@ func (m *awsRestjson1_deserializeOpDeleteRoom) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteRoom(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteLoggingConfiguration(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)} @@ -691,6 +765,9 @@ func awsRestjson1_deserializeOpErrorDeleteRoom(response *smithyhttp.Response, me case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("PendingVerification", errorCode): return awsRestjson1_deserializeErrorPendingVerification(response, errorBody) @@ -710,14 +787,14 @@ func awsRestjson1_deserializeOpErrorDeleteRoom(response *smithyhttp.Response, me } } -type awsRestjson1_deserializeOpDisconnectUser struct { +type awsRestjson1_deserializeOpDeleteMessage struct { } -func (*awsRestjson1_deserializeOpDisconnectUser) ID() string { +func (*awsRestjson1_deserializeOpDeleteMessage) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDisconnectUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteMessage) 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) @@ -731,15 +808,43 @@ func (m *awsRestjson1_deserializeOpDisconnectUser) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDisconnectUser(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteMessage(response, &metadata) } - output := &DisconnectUserOutput{} + output := &DeleteMessageOutput{} 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_deserializeOpDocumentDeleteMessageOutput(&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_deserializeOpErrorDisconnectUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteMessage(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)} @@ -802,36 +907,486 @@ func awsRestjson1_deserializeOpErrorDisconnectUser(response *smithyhttp.Response } } -type awsRestjson1_deserializeOpGetRoom struct { -} - -func (*awsRestjson1_deserializeOpGetRoom) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetRoom) 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 +func awsRestjson1_deserializeOpDocumentDeleteMessageOutput(v **DeleteMessageOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil } - response, ok := out.RawResponse.(*smithyhttp.Response) + shape, ok := value.(map[string]interface{}) if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + return fmt.Errorf("unexpected JSON type %v", value) } - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetRoom(response, &metadata) + var sv *DeleteMessageOutput + if *v == nil { + sv = &DeleteMessageOutput{} + } else { + sv = *v } - output := &GetRoomOutput{} - out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + for key, value := range shape { + switch key { + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ID to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } - body := io.TeeReader(response.Body, ringBuffer) + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteRoom struct { +} + +func (*awsRestjson1_deserializeOpDeleteRoom) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteRoom) 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_deserializeOpErrorDeleteRoom(response, &metadata) + } + output := &DeleteRoomOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteRoom(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("PendingVerification", errorCode): + return awsRestjson1_deserializeErrorPendingVerification(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDisconnectUser struct { +} + +func (*awsRestjson1_deserializeOpDisconnectUser) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDisconnectUser) 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_deserializeOpErrorDisconnectUser(response, &metadata) + } + output := &DisconnectUserOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDisconnectUser(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(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 + + } +} + +type awsRestjson1_deserializeOpGetLoggingConfiguration struct { +} + +func (*awsRestjson1_deserializeOpGetLoggingConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetLoggingConfiguration) 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_deserializeOpErrorGetLoggingConfiguration(response, &metadata) + } + output := &GetLoggingConfigurationOutput{} + 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_deserializeOpDocumentGetLoggingConfigurationOutput(&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_deserializeOpErrorGetLoggingConfiguration(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetLoggingConfigurationOutput(v **GetLoggingConfigurationOutput, 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 *GetLoggingConfigurationOutput + if *v == nil { + sv = &GetLoggingConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LoggingConfigurationArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Time to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreateTime = ptr.Time(t) + } + + case "destinationConfiguration": + if err := awsRestjson1_deserializeDocumentDestinationConfiguration(&sv.DestinationConfiguration, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LoggingConfigurationID to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LoggingConfigurationName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "state": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LoggingConfigurationState to be of type string, got %T instead", value) + } + sv.State = types.LoggingConfigurationState(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + case "updateTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Time to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.UpdateTime = ptr.Time(t) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetRoom struct { +} + +func (*awsRestjson1_deserializeOpGetRoom) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetRoom) 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_deserializeOpErrorGetRoom(response, &metadata) + } + output := &GetRoomOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() @@ -972,6 +1527,11 @@ func awsRestjson1_deserializeOpDocumentGetRoomOutput(v **GetRoomOutput, value in sv.Id = ptr.String(jtv) } + case "loggingConfigurationIdentifiers": + if err := awsRestjson1_deserializeDocumentLoggingConfigurationIdentifierList(&sv.LoggingConfigurationIdentifiers, value); err != nil { + return err + } + case "maximumMessageLength": if value != nil { jtv, ok := value.(json.Number) @@ -1021,13 +1581,172 @@ func awsRestjson1_deserializeOpDocumentGetRoomOutput(v **GetRoomOutput, value in if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Time to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err + return fmt.Errorf("expected Time to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.UpdateTime = ptr.Time(t) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListLoggingConfigurations struct { +} + +func (*awsRestjson1_deserializeOpListLoggingConfigurations) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListLoggingConfigurations) 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_deserializeOpErrorListLoggingConfigurations(response, &metadata) + } + output := &ListLoggingConfigurationsOutput{} + 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_deserializeOpDocumentListLoggingConfigurationsOutput(&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_deserializeOpErrorListLoggingConfigurations(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListLoggingConfigurationsOutput(v **ListLoggingConfigurationsOutput, 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 *ListLoggingConfigurationsOutput + if *v == nil { + sv = &ListLoggingConfigurationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "loggingConfigurations": + if err := awsRestjson1_deserializeDocumentLoggingConfigurationList(&sv.LoggingConfigurations, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } - sv.UpdateTime = ptr.Time(t) + sv.NextToken = ptr.String(jtv) } default: @@ -1692,6 +2411,229 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } +type awsRestjson1_deserializeOpUpdateLoggingConfiguration struct { +} + +func (*awsRestjson1_deserializeOpUpdateLoggingConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateLoggingConfiguration) 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_deserializeOpErrorUpdateLoggingConfiguration(response, &metadata) + } + output := &UpdateLoggingConfigurationOutput{} + 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_deserializeOpDocumentUpdateLoggingConfigurationOutput(&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_deserializeOpErrorUpdateLoggingConfiguration(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("PendingVerification", errorCode): + return awsRestjson1_deserializeErrorPendingVerification(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateLoggingConfigurationOutput(v **UpdateLoggingConfigurationOutput, 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 *UpdateLoggingConfigurationOutput + if *v == nil { + sv = &UpdateLoggingConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LoggingConfigurationArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Time to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreateTime = ptr.Time(t) + } + + case "destinationConfiguration": + if err := awsRestjson1_deserializeDocumentDestinationConfiguration(&sv.DestinationConfiguration, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LoggingConfigurationID to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LoggingConfigurationName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "state": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UpdateLoggingConfigurationState to be of type string, got %T instead", value) + } + sv.State = types.UpdateLoggingConfigurationState(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + case "updateTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Time to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.UpdateTime = ptr.Time(t) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpUpdateRoom struct { } @@ -1865,6 +2807,11 @@ func awsRestjson1_deserializeOpDocumentUpdateRoomOutput(v **UpdateRoomOutput, va sv.Id = ptr.String(jtv) } + case "loggingConfigurationIdentifiers": + if err := awsRestjson1_deserializeDocumentLoggingConfigurationIdentifierList(&sv.LoggingConfigurationIdentifiers, value); err != nil { + return err + } + case "maximumMessageLength": if value != nil { jtv, ok := value.(json.Number) @@ -2233,22 +3180,62 @@ func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDenie return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AccessDeniedException + var sv *types.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } 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 awsRestjson1_deserializeDocumentCloudWatchLogsDestinationConfiguration(v **types.CloudWatchLogsDestinationConfiguration, 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.CloudWatchLogsDestinationConfiguration if *v == nil { - sv = &types.AccessDeniedException{} + sv = &types.CloudWatchLogsDestinationConfiguration{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "logGroupName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected LogGroupName to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.LogGroupName = ptr.String(jtv) } default: @@ -2318,6 +3305,106 @@ func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictExcepti return nil } +func awsRestjson1_deserializeDocumentDestinationConfiguration(v *types.DestinationConfiguration, 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 uv types.DestinationConfiguration +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "cloudWatchLogs": + var mv types.CloudWatchLogsDestinationConfiguration + destAddr := &mv + if err := awsRestjson1_deserializeDocumentCloudWatchLogsDestinationConfiguration(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.DestinationConfigurationMemberCloudWatchLogs{Value: mv} + break loop + + case "firehose": + var mv types.FirehoseDestinationConfiguration + destAddr := &mv + if err := awsRestjson1_deserializeDocumentFirehoseDestinationConfiguration(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.DestinationConfigurationMemberFirehose{Value: mv} + break loop + + case "s3": + var mv types.S3DestinationConfiguration + destAddr := &mv + if err := awsRestjson1_deserializeDocumentS3DestinationConfiguration(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.DestinationConfigurationMemberS3{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsRestjson1_deserializeDocumentFirehoseDestinationConfiguration(v **types.FirehoseDestinationConfiguration, 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.FirehoseDestinationConfiguration + if *v == nil { + sv = &types.FirehoseDestinationConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "deliveryStreamName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeliveryStreamName to be of type string, got %T instead", value) + } + sv.DeliveryStreamName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -2358,6 +3445,179 @@ func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalS return nil } +func awsRestjson1_deserializeDocumentLoggingConfigurationIdentifierList(v *[]string, 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 []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LoggingConfigurationIdentifier to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentLoggingConfigurationList(v *[]types.LoggingConfigurationSummary, 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.LoggingConfigurationSummary + if *v == nil { + cv = []types.LoggingConfigurationSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.LoggingConfigurationSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentLoggingConfigurationSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentLoggingConfigurationSummary(v **types.LoggingConfigurationSummary, 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.LoggingConfigurationSummary + if *v == nil { + sv = &types.LoggingConfigurationSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LoggingConfigurationArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Time to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreateTime = ptr.Time(t) + } + + case "destinationConfiguration": + if err := awsRestjson1_deserializeDocumentDestinationConfiguration(&sv.DestinationConfiguration, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LoggingConfigurationID to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LoggingConfigurationName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "state": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LoggingConfigurationState to be of type string, got %T instead", value) + } + sv.State = types.LoggingConfigurationState(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + case "updateTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Time to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.UpdateTime = ptr.Time(t) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentMessageReviewHandler(v **types.MessageReviewHandler, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -2592,6 +3852,11 @@ func awsRestjson1_deserializeDocumentRoomSummary(v **types.RoomSummary, value in sv.Id = ptr.String(jtv) } + case "loggingConfigurationIdentifiers": + if err := awsRestjson1_deserializeDocumentLoggingConfigurationIdentifierList(&sv.LoggingConfigurationIdentifiers, value); err != nil { + return err + } + case "messageReviewHandler": if err := awsRestjson1_deserializeDocumentMessageReviewHandler(&sv.MessageReviewHandler, value); err != nil { return err @@ -2633,6 +3898,46 @@ func awsRestjson1_deserializeDocumentRoomSummary(v **types.RoomSummary, value in return nil } +func awsRestjson1_deserializeDocumentS3DestinationConfiguration(v **types.S3DestinationConfiguration, 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.S3DestinationConfiguration + if *v == nil { + sv = &types.S3DestinationConfiguration{} + } 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 BucketName to be of type string, got %T instead", value) + } + sv.BucketName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/ivschat/doc.go b/service/ivschat/doc.go index befbf532593..64f118971bb 100644 --- a/service/ivschat/doc.go +++ b/service/ivschat/doc.go @@ -20,17 +20,21 @@ // client applications (browser and Android/iOS apps) using the Amazon IVS Chat // Messaging API. We refer to these as clients. // -// Resources The following resource -// is part of Amazon IVS Chat: +// Resources The following resources +// are part of Amazon IVS Chat: // -// * Room — The central Amazon IVS Chat resource -// through which clients connect to and exchange chat messages. See the Room -// endpoints for more information. +// * LoggingConfiguration — A configuration that +// allows customers to store and record sent messages in a chat room. See the +// Logging Configuration endpoints for more information. // -// Tagging A tag is a metadata label that you -// assign to an AWS resource. A tag comprises a key and a value, both set by you. -// For example, you might set a tag as topic:nature to label a particular video -// category. See Tagging AWS Resources +// * Room — The central +// Amazon IVS Chat resource through which clients connect to and exchange chat +// messages. See the Room endpoints for more information. +// +// Tagging A tag is a +// metadata label that you assign to an AWS resource. A tag comprises a key and a +// value, both set by you. For example, you might set a tag as topic:nature to +// label a particular video category. See Tagging AWS Resources // (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) for more // information, including restrictions that apply to tags and "Tag naming limits // and requirements"; Amazon IVS Chat has no service-specific constraints beyond @@ -104,40 +108,60 @@ // # Chat Token Endpoint // // * CreateChatToken — Creates an encrypted -// token that is used to establish an individual WebSocket connection to a room. -// The token is valid for one minute, and a connection (session) established with -// the token is valid for the specified duration. +// token that is used by a chat participant to establish an individual WebSocket +// chat connection to a room. When the token is used to connect to chat, the +// connection is valid for the session duration specified in the request. The token +// becomes invalid at the token-expiration timestamp included in the +// response. // // # Room Endpoints // -// * CreateRoom — -// Creates a room that allows clients to connect and pass messages. +// * CreateRoom — Creates a room that allows clients to +// connect and pass messages. +// +// * DeleteRoom — Deletes the specified room. +// +// * +// GetRoom — Gets the specified room. +// +// * ListRooms — Gets summary information about +// all your rooms in the AWS region where the API request is processed. +// +// * +// UpdateRoom — Updates a room’s configuration. +// +// # Logging Configuration Endpoints +// +// * +// CreateLoggingConfiguration — Creates a logging configuration that allows clients +// to store and record sent messages. // -// * DeleteRoom — -// Deletes the specified room. +// * DeleteLoggingConfiguration — Deletes the +// specified logging configuration. // -// * GetRoom — Gets the specified room. +// * GetLoggingConfiguration — Gets the specified +// logging configuration. // -// * ListRooms — -// Gets summary information about all your rooms in the AWS region where the API -// request is processed. +// * ListLoggingConfigurations — Gets summary information +// about all your logging configurations in the AWS region where the API request is +// processed. // -// * UpdateRoom — Updates a room’s configuration. +// * UpdateLoggingConfiguration — Updates a specified logging +// configuration. // -// Tags -// Endpoints +// # Tags Endpoints // -// * ListTagsForResource — Gets information about AWS tags for the -// specified ARN. +// * ListTagsForResource — Gets information about +// AWS tags for the specified ARN. // -// * TagResource — Adds or updates tags for the AWS resource with -// the specified ARN. +// * TagResource — Adds or updates tags for the +// AWS resource with the specified ARN. // -// * UntagResource — Removes tags from the resource with the -// specified ARN. +// * UntagResource — Removes tags from the +// resource with the specified ARN. // -// All the above are HTTP operations. There is a separate messaging -// API for managing Chat resources; see the Amazon IVS Chat Messaging API -// Reference +// All the above are HTTP operations. There is a +// separate messaging API for managing Chat resources; see the Amazon IVS Chat +// Messaging API Reference // (https://docs.aws.amazon.com/ivs/latest/chatmsgapireference/chat-messaging-api.html). package ivschat diff --git a/service/ivschat/generated.json b/service/ivschat/generated.json index 597e1dd68bc..1b9b4d6530b 100644 --- a/service/ivschat/generated.json +++ b/service/ivschat/generated.json @@ -9,16 +9,21 @@ "api_client.go", "api_client_test.go", "api_op_CreateChatToken.go", + "api_op_CreateLoggingConfiguration.go", "api_op_CreateRoom.go", + "api_op_DeleteLoggingConfiguration.go", "api_op_DeleteMessage.go", "api_op_DeleteRoom.go", "api_op_DisconnectUser.go", + "api_op_GetLoggingConfiguration.go", "api_op_GetRoom.go", + "api_op_ListLoggingConfigurations.go", "api_op_ListRooms.go", "api_op_ListTagsForResource.go", "api_op_SendEvent.go", "api_op_TagResource.go", "api_op_UntagResource.go", + "api_op_UpdateLoggingConfiguration.go", "api_op_UpdateRoom.go", "deserializers.go", "doc.go", @@ -31,6 +36,7 @@ "types/enums.go", "types/errors.go", "types/types.go", + "types/types_exported_test.go", "validators.go" ], "go": "1.15", diff --git a/service/ivschat/serializers.go b/service/ivschat/serializers.go index 997c30c8ff1..c808049547a 100644 --- a/service/ivschat/serializers.go +++ b/service/ivschat/serializers.go @@ -106,6 +106,88 @@ func awsRestjson1_serializeOpDocumentCreateChatTokenInput(v *CreateChatTokenInpu return nil } +type awsRestjson1_serializeOpCreateLoggingConfiguration struct { +} + +func (*awsRestjson1_serializeOpCreateLoggingConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateLoggingConfiguration) 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.(*CreateLoggingConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/CreateLoggingConfiguration") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, 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_serializeOpDocumentCreateLoggingConfigurationInput(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_serializeOpHttpBindingsCreateLoggingConfigurationInput(v *CreateLoggingConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateLoggingConfigurationInput(v *CreateLoggingConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DestinationConfiguration != nil { + ok := object.Key("destinationConfiguration") + if err := awsRestjson1_serializeDocumentDestinationConfiguration(v.DestinationConfiguration, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCreateRoom struct { } @@ -166,6 +248,13 @@ func awsRestjson1_serializeOpDocumentCreateRoomInput(v *CreateRoomInput, value s object := value.Object() defer object.Close() + if v.LoggingConfigurationIdentifiers != nil { + ok := object.Key("loggingConfigurationIdentifiers") + if err := awsRestjson1_serializeDocumentLoggingConfigurationIdentifierList(v.LoggingConfigurationIdentifiers, ok); err != nil { + return err + } + } + if v.MaximumMessageLength != 0 { ok := object.Key("maximumMessageLength") ok.Integer(v.MaximumMessageLength) @@ -198,6 +287,74 @@ func awsRestjson1_serializeOpDocumentCreateRoomInput(v *CreateRoomInput, value s return nil } +type awsRestjson1_serializeOpDeleteLoggingConfiguration struct { +} + +func (*awsRestjson1_serializeOpDeleteLoggingConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteLoggingConfiguration) 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.(*DeleteLoggingConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/DeleteLoggingConfiguration") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, 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_serializeOpDocumentDeleteLoggingConfigurationInput(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_serializeOpHttpBindingsDeleteLoggingConfigurationInput(v *DeleteLoggingConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDeleteLoggingConfigurationInput(v *DeleteLoggingConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Identifier != nil { + ok := object.Key("identifier") + ok.String(*v.Identifier) + } + + return nil +} + type awsRestjson1_serializeOpDeleteMessage struct { } @@ -422,6 +579,74 @@ func awsRestjson1_serializeOpDocumentDisconnectUserInput(v *DisconnectUserInput, return nil } +type awsRestjson1_serializeOpGetLoggingConfiguration struct { +} + +func (*awsRestjson1_serializeOpGetLoggingConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetLoggingConfiguration) 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.(*GetLoggingConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/GetLoggingConfiguration") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, 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_serializeOpDocumentGetLoggingConfigurationInput(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_serializeOpHttpBindingsGetLoggingConfigurationInput(v *GetLoggingConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentGetLoggingConfigurationInput(v *GetLoggingConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Identifier != nil { + ok := object.Key("identifier") + ok.String(*v.Identifier) + } + + return nil +} + type awsRestjson1_serializeOpGetRoom struct { } @@ -490,6 +715,79 @@ func awsRestjson1_serializeOpDocumentGetRoomInput(v *GetRoomInput, value smithyj return nil } +type awsRestjson1_serializeOpListLoggingConfigurations struct { +} + +func (*awsRestjson1_serializeOpListLoggingConfigurations) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListLoggingConfigurations) 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.(*ListLoggingConfigurationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/ListLoggingConfigurations") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, 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_serializeOpDocumentListLoggingConfigurationsInput(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_serializeOpHttpBindingsListLoggingConfigurationsInput(v *ListLoggingConfigurationsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListLoggingConfigurationsInput(v *ListLoggingConfigurationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != 0 { + ok := object.Key("maxResults") + ok.Integer(v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + type awsRestjson1_serializeOpListRooms struct { } @@ -550,6 +848,11 @@ func awsRestjson1_serializeOpDocumentListRoomsInput(v *ListRoomsInput, value smi object := value.Object() defer object.Close() + if v.LoggingConfigurationIdentifier != nil { + ok := object.Key("loggingConfigurationIdentifier") + ok.String(*v.LoggingConfigurationIdentifier) + } + if v.MaxResults != 0 { ok := object.Key("maxResults") ok.Integer(v.MaxResults) @@ -858,6 +1161,86 @@ func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInpu return nil } +type awsRestjson1_serializeOpUpdateLoggingConfiguration struct { +} + +func (*awsRestjson1_serializeOpUpdateLoggingConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateLoggingConfiguration) 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.(*UpdateLoggingConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/UpdateLoggingConfiguration") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, 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_serializeOpDocumentUpdateLoggingConfigurationInput(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_serializeOpHttpBindingsUpdateLoggingConfigurationInput(v *UpdateLoggingConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateLoggingConfigurationInput(v *UpdateLoggingConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DestinationConfiguration != nil { + ok := object.Key("destinationConfiguration") + if err := awsRestjson1_serializeDocumentDestinationConfiguration(v.DestinationConfiguration, ok); err != nil { + return err + } + } + + if v.Identifier != nil { + ok := object.Key("identifier") + ok.String(*v.Identifier) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + return nil +} + type awsRestjson1_serializeOpUpdateRoom struct { } @@ -923,6 +1306,13 @@ func awsRestjson1_serializeOpDocumentUpdateRoomInput(v *UpdateRoomInput, value s ok.String(*v.Identifier) } + if v.LoggingConfigurationIdentifiers != nil { + ok := object.Key("loggingConfigurationIdentifiers") + if err := awsRestjson1_serializeDocumentLoggingConfigurationIdentifierList(v.LoggingConfigurationIdentifiers, ok); err != nil { + return err + } + } + if v.MaximumMessageLength != 0 { ok := object.Key("maximumMessageLength") ok.Integer(v.MaximumMessageLength) @@ -970,6 +1360,48 @@ func awsRestjson1_serializeDocumentChatTokenCapabilities(v []types.ChatTokenCapa return nil } +func awsRestjson1_serializeDocumentCloudWatchLogsDestinationConfiguration(v *types.CloudWatchLogsDestinationConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LogGroupName != nil { + ok := object.Key("logGroupName") + ok.String(*v.LogGroupName) + } + + return nil +} + +func awsRestjson1_serializeDocumentDestinationConfiguration(v types.DestinationConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.DestinationConfigurationMemberCloudWatchLogs: + av := object.Key("cloudWatchLogs") + if err := awsRestjson1_serializeDocumentCloudWatchLogsDestinationConfiguration(&uv.Value, av); err != nil { + return err + } + + case *types.DestinationConfigurationMemberFirehose: + av := object.Key("firehose") + if err := awsRestjson1_serializeDocumentFirehoseDestinationConfiguration(&uv.Value, av); err != nil { + return err + } + + case *types.DestinationConfigurationMemberS3: + av := object.Key("s3") + if err := awsRestjson1_serializeDocumentS3DestinationConfiguration(&uv.Value, av); err != nil { + return err + } + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + func awsRestjson1_serializeDocumentEventAttributes(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -981,6 +1413,29 @@ func awsRestjson1_serializeDocumentEventAttributes(v map[string]string, value sm return nil } +func awsRestjson1_serializeDocumentFirehoseDestinationConfiguration(v *types.FirehoseDestinationConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DeliveryStreamName != nil { + ok := object.Key("deliveryStreamName") + ok.String(*v.DeliveryStreamName) + } + + return nil +} + +func awsRestjson1_serializeDocumentLoggingConfigurationIdentifierList(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_serializeDocumentMessageReviewHandler(v *types.MessageReviewHandler, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -998,6 +1453,18 @@ func awsRestjson1_serializeDocumentMessageReviewHandler(v *types.MessageReviewHa return nil } +func awsRestjson1_serializeDocumentS3DestinationConfiguration(v *types.S3DestinationConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BucketName != nil { + ok := object.Key("bucketName") + ok.String(*v.BucketName) + } + + return nil +} + func awsRestjson1_serializeDocumentTags(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/ivschat/types/enums.go b/service/ivschat/types/enums.go index 9a5289d6bfa..01e73fdac1a 100644 --- a/service/ivschat/types/enums.go +++ b/service/ivschat/types/enums.go @@ -22,6 +22,23 @@ func (ChatTokenCapability) Values() []ChatTokenCapability { } } +type CreateLoggingConfigurationState string + +// Enum values for CreateLoggingConfigurationState +const ( + CreateLoggingConfigurationStateActive CreateLoggingConfigurationState = "ACTIVE" +) + +// Values returns all known values for CreateLoggingConfigurationState. 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 (CreateLoggingConfigurationState) Values() []CreateLoggingConfigurationState { + return []CreateLoggingConfigurationState{ + "ACTIVE", + } +} + type FallbackResult string // Enum values for FallbackResult @@ -40,6 +57,34 @@ func (FallbackResult) Values() []FallbackResult { } } +type LoggingConfigurationState string + +// Enum values for LoggingConfigurationState +const ( + LoggingConfigurationStateCreating LoggingConfigurationState = "CREATING" + LoggingConfigurationStateCreateFailed LoggingConfigurationState = "CREATE_FAILED" + LoggingConfigurationStateDeleting LoggingConfigurationState = "DELETING" + LoggingConfigurationStateDeleteFailed LoggingConfigurationState = "DELETE_FAILED" + LoggingConfigurationStateUpdating LoggingConfigurationState = "UPDATING" + LoggingConfigurationStateUpdateFailed LoggingConfigurationState = "UPDATE_FAILED" + LoggingConfigurationStateActive LoggingConfigurationState = "ACTIVE" +) + +// Values returns all known values for LoggingConfigurationState. 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 (LoggingConfigurationState) Values() []LoggingConfigurationState { + return []LoggingConfigurationState{ + "CREATING", + "CREATE_FAILED", + "DELETING", + "DELETE_FAILED", + "UPDATING", + "UPDATE_FAILED", + "ACTIVE", + } +} + type ResourceType string // Enum values for ResourceType @@ -56,6 +101,23 @@ func (ResourceType) Values() []ResourceType { } } +type UpdateLoggingConfigurationState string + +// Enum values for UpdateLoggingConfigurationState +const ( + UpdateLoggingConfigurationStateActive UpdateLoggingConfigurationState = "ACTIVE" +) + +// Values returns all known values for UpdateLoggingConfigurationState. 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 (UpdateLoggingConfigurationState) Values() []UpdateLoggingConfigurationState { + return []UpdateLoggingConfigurationState{ + "ACTIVE", + } +} + type ValidationExceptionReason string // Enum values for ValidationExceptionReason diff --git a/service/ivschat/types/types.go b/service/ivschat/types/types.go index 0c4c52bf907..69a78af7002 100644 --- a/service/ivschat/types/types.go +++ b/service/ivschat/types/types.go @@ -7,6 +7,113 @@ import ( "time" ) +// Specifies a CloudWatch Logs location where chat logs will be stored. +type CloudWatchLogsDestinationConfiguration struct { + + // Name of the Amazon Cloudwatch Logs destination where chat activity will be + // logged. + // + // This member is required. + LogGroupName *string + + noSmithyDocumentSerde +} + +// A complex type that describes a location where chat logs will be stored. Each +// member represents the configuration of one log destination. For logging, you +// define only one type of destination (for CloudWatch Logs, Kinesis Firehose, or +// S3). +// +// The following types satisfy this interface: +// +// DestinationConfigurationMemberCloudWatchLogs +// DestinationConfigurationMemberFirehose +// DestinationConfigurationMemberS3 +type DestinationConfiguration interface { + isDestinationConfiguration() +} + +// Name of the Amazon CloudWatch Logs destination where chat activity will be +// logged. +type DestinationConfigurationMemberCloudWatchLogs struct { + Value CloudWatchLogsDestinationConfiguration + + noSmithyDocumentSerde +} + +func (*DestinationConfigurationMemberCloudWatchLogs) isDestinationConfiguration() {} + +// Name of the Amazon Kinesis Data Firehose destination where chat activity will be +// logged +type DestinationConfigurationMemberFirehose struct { + Value FirehoseDestinationConfiguration + + noSmithyDocumentSerde +} + +func (*DestinationConfigurationMemberFirehose) isDestinationConfiguration() {} + +// Name of the Amazon S3 bucket where chat activity will be logged. +type DestinationConfigurationMemberS3 struct { + Value S3DestinationConfiguration + + noSmithyDocumentSerde +} + +func (*DestinationConfigurationMemberS3) isDestinationConfiguration() {} + +// Specifies a Kinesis Firehose location where chat logs will be stored. +type FirehoseDestinationConfiguration struct { + + // Name of the Amazon Kinesis Firehose delivery stream where chat activity will be + // logged. + // + // This member is required. + DeliveryStreamName *string + + noSmithyDocumentSerde +} + +// Summary information about a logging configuration. +type LoggingConfigurationSummary struct { + + // Logging-configuration ARN. + Arn *string + + // Time when the logging configuration was created. This is an ISO 8601 timestamp; + // note that this is returned as a string. + CreateTime *time.Time + + // A complex type that contains a destination configuration for where chat content + // will be logged. + DestinationConfiguration DestinationConfiguration + + // Logging-configuration ID, generated by the system. This is a relative + // identifier, the part of the ARN that uniquely identifies the room. + Id *string + + // Logging-configuration name. The value does not need to be unique. + Name *string + + // The state of the logging configuration. When this is ACTIVE, the configuration + // is ready for logging chat content. + State LoggingConfigurationState + + // Tags to attach to the resource. Array of maps, each of the form string:string + // (key:value). See Tagging AWS Resources + // (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) for details, + // including restrictions that apply to tags and "Tag naming limits and + // requirements"; Amazon IVS Chat has no constraints on tags beyond what is + // documented there. + Tags map[string]string + + // Time of the logging configuration’s last update. This is an ISO 8601 timestamp; + // note that this is returned as a string. + UpdateTime *time.Time + + noSmithyDocumentSerde +} + // Configuration information for optional message review. type MessageReviewHandler struct { @@ -40,13 +147,17 @@ type RoomSummary struct { // ARN that uniquely identifies the room. Id *string + // List of logging-configuration identifiers attached to the room. + LoggingConfigurationIdentifiers []string + // Configuration information for optional review of messages. MessageReviewHandler *MessageReviewHandler // Room name. The value does not need to be unique. Name *string - // Tags attached to the resource. See Tagging AWS Resources + // Tags attached to the resource. Array of maps, each of the form string:string + // (key:value). See Tagging AWS Resources // (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) for details, // including restrictions that apply to tags and "Tag naming limits and // requirements"; Amazon IVS Chat has no constraints beyond what is documented @@ -60,6 +171,17 @@ type RoomSummary struct { noSmithyDocumentSerde } +// Specifies an S3 location where chat logs will be stored. +type S3DestinationConfiguration struct { + + // Name of the Amazon S3 bucket where chat activity will be logged. + // + // This member is required. + BucketName *string + + noSmithyDocumentSerde +} + // This object is used in the ValidationException error. type ValidationExceptionField struct { @@ -77,3 +199,14 @@ type ValidationExceptionField struct { } type noSmithyDocumentSerde = smithydocument.NoSerde + +// UnknownUnionMember is returned when a union member is returned over the wire, +// but has an unknown tag. +type UnknownUnionMember struct { + Tag string + Value []byte + + noSmithyDocumentSerde +} + +func (*UnknownUnionMember) isDestinationConfiguration() {} diff --git a/service/ivschat/types/types_exported_test.go b/service/ivschat/types/types_exported_test.go new file mode 100644 index 00000000000..ad1ce1fdce1 --- /dev/null +++ b/service/ivschat/types/types_exported_test.go @@ -0,0 +1,34 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types_test + +import ( + "fmt" + "github.com/aws/aws-sdk-go-v2/service/ivschat/types" +) + +func ExampleDestinationConfiguration_outputUsage() { + var union types.DestinationConfiguration + // type switches can be used to check the union value + switch v := union.(type) { + case *types.DestinationConfigurationMemberCloudWatchLogs: + _ = v.Value // Value is types.CloudWatchLogsDestinationConfiguration + + case *types.DestinationConfigurationMemberFirehose: + _ = v.Value // Value is types.FirehoseDestinationConfiguration + + case *types.DestinationConfigurationMemberS3: + _ = v.Value // Value is types.S3DestinationConfiguration + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.FirehoseDestinationConfiguration +var _ *types.CloudWatchLogsDestinationConfiguration +var _ *types.S3DestinationConfiguration diff --git a/service/ivschat/validators.go b/service/ivschat/validators.go index 9a52c7312bd..148147caa4c 100644 --- a/service/ivschat/validators.go +++ b/service/ivschat/validators.go @@ -5,6 +5,7 @@ package ivschat import ( "context" "fmt" + "github.com/aws/aws-sdk-go-v2/service/ivschat/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" ) @@ -29,6 +30,46 @@ func (m *validateOpCreateChatToken) HandleInitialize(ctx context.Context, in mid return next.HandleInitialize(ctx, in) } +type validateOpCreateLoggingConfiguration struct { +} + +func (*validateOpCreateLoggingConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateLoggingConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateLoggingConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateLoggingConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteLoggingConfiguration struct { +} + +func (*validateOpDeleteLoggingConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteLoggingConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteLoggingConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteLoggingConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteMessage struct { } @@ -89,6 +130,26 @@ func (m *validateOpDisconnectUser) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } +type validateOpGetLoggingConfiguration struct { +} + +func (*validateOpGetLoggingConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetLoggingConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetLoggingConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetLoggingConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetRoom struct { } @@ -189,6 +250,26 @@ func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpUpdateLoggingConfiguration struct { +} + +func (*validateOpUpdateLoggingConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateLoggingConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateLoggingConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateLoggingConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateRoom struct { } @@ -213,6 +294,14 @@ func addOpCreateChatTokenValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateChatToken{}, middleware.After) } +func addOpCreateLoggingConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateLoggingConfiguration{}, middleware.After) +} + +func addOpDeleteLoggingConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteLoggingConfiguration{}, middleware.After) +} + func addOpDeleteMessageValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteMessage{}, middleware.After) } @@ -225,6 +314,10 @@ func addOpDisconnectUserValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDisconnectUser{}, middleware.After) } +func addOpGetLoggingConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetLoggingConfiguration{}, middleware.After) +} + func addOpGetRoomValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetRoom{}, middleware.After) } @@ -245,10 +338,88 @@ func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) } +func addOpUpdateLoggingConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateLoggingConfiguration{}, middleware.After) +} + func addOpUpdateRoomValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateRoom{}, middleware.After) } +func validateCloudWatchLogsDestinationConfiguration(v *types.CloudWatchLogsDestinationConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CloudWatchLogsDestinationConfiguration"} + if v.LogGroupName == nil { + invalidParams.Add(smithy.NewErrParamRequired("LogGroupName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDestinationConfiguration(v types.DestinationConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DestinationConfiguration"} + switch uv := v.(type) { + case *types.DestinationConfigurationMemberCloudWatchLogs: + if err := validateCloudWatchLogsDestinationConfiguration(&uv.Value); err != nil { + invalidParams.AddNested("[cloudWatchLogs]", err.(smithy.InvalidParamsError)) + } + + case *types.DestinationConfigurationMemberFirehose: + if err := validateFirehoseDestinationConfiguration(&uv.Value); err != nil { + invalidParams.AddNested("[firehose]", err.(smithy.InvalidParamsError)) + } + + case *types.DestinationConfigurationMemberS3: + if err := validateS3DestinationConfiguration(&uv.Value); err != nil { + invalidParams.AddNested("[s3]", err.(smithy.InvalidParamsError)) + } + + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateFirehoseDestinationConfiguration(v *types.FirehoseDestinationConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FirehoseDestinationConfiguration"} + if v.DeliveryStreamName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DeliveryStreamName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateS3DestinationConfiguration(v *types.S3DestinationConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "S3DestinationConfiguration"} + if v.BucketName == nil { + invalidParams.Add(smithy.NewErrParamRequired("BucketName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateChatTokenInput(v *CreateChatTokenInput) error { if v == nil { return nil @@ -267,6 +438,40 @@ func validateOpCreateChatTokenInput(v *CreateChatTokenInput) error { } } +func validateOpCreateLoggingConfigurationInput(v *CreateLoggingConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateLoggingConfigurationInput"} + if v.DestinationConfiguration == nil { + invalidParams.Add(smithy.NewErrParamRequired("DestinationConfiguration")) + } else if v.DestinationConfiguration != nil { + if err := validateDestinationConfiguration(v.DestinationConfiguration); err != nil { + invalidParams.AddNested("DestinationConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteLoggingConfigurationInput(v *DeleteLoggingConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteLoggingConfigurationInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteMessageInput(v *DeleteMessageInput) error { if v == nil { return nil @@ -318,6 +523,21 @@ func validateOpDisconnectUserInput(v *DisconnectUserInput) error { } } +func validateOpGetLoggingConfigurationInput(v *GetLoggingConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetLoggingConfigurationInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetRoomInput(v *GetRoomInput) error { if v == nil { return nil @@ -402,6 +622,26 @@ func validateOpUntagResourceInput(v *UntagResourceInput) error { } } +func validateOpUpdateLoggingConfigurationInput(v *UpdateLoggingConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateLoggingConfigurationInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if v.DestinationConfiguration != nil { + if err := validateDestinationConfiguration(v.DestinationConfiguration); err != nil { + invalidParams.AddNested("DestinationConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateRoomInput(v *UpdateRoomInput) error { if v == nil { return nil diff --git a/service/lambda/api_op_CreateCodeSigningConfig.go b/service/lambda/api_op_CreateCodeSigningConfig.go index 3e1bc6375ab..065663df0b7 100644 --- a/service/lambda/api_op_CreateCodeSigningConfig.go +++ b/service/lambda/api_op_CreateCodeSigningConfig.go @@ -12,7 +12,7 @@ import ( ) // Creates a code signing configuration. A code signing configuration -// (https://docs.aws.amazon.com/lambda/latest/dg/configuration-trustedcode.html) +// (https://docs.aws.amazon.com/lambda/latest/dg/configuration-codesigning.html) // defines a list of allowed signing profiles and defines the code-signing // validation policy (action to be taken if deployment validation checks fail). func (c *Client) CreateCodeSigningConfig(ctx context.Context, params *CreateCodeSigningConfigInput, optFns ...func(*Options)) (*CreateCodeSigningConfigOutput, error) { diff --git a/service/lambda/api_op_CreateEventSourceMapping.go b/service/lambda/api_op_CreateEventSourceMapping.go index 9d2b257c2f5..f305d0636c1 100644 --- a/service/lambda/api_op_CreateEventSourceMapping.go +++ b/service/lambda/api_op_CreateEventSourceMapping.go @@ -187,10 +187,18 @@ type CreateEventSourceMappingInput struct { // event source mapping. FunctionResponseTypes []types.FunctionResponseType - // (Streams and Amazon SQS standard queues) The maximum amount of time, in seconds, - // that Lambda spends gathering records before invoking the function. Default: 0 - // Related setting: When you set BatchSize to a value greater than 10, you must set - // MaximumBatchingWindowInSeconds to at least 1. + // The maximum amount of time, in seconds, that Lambda spends gathering records + // before invoking the function. You can configure MaximumBatchingWindowInSeconds + // to any value from 0 seconds to 300 seconds in increments of seconds. For streams + // and Amazon SQS event sources, the default batching window is 0 seconds. For + // Amazon MSK, Self-managed Apache Kafka, and Amazon MQ event sources, the default + // batching window is 500 ms. Note that because you can only change + // MaximumBatchingWindowInSeconds in increments of seconds, you cannot revert back + // to the 500 ms default batching window after you have changed it. To restore the + // default batching window, you must create a new event source mapping. Related + // setting: For streams and Amazon SQS event sources, when you set BatchSize to a + // value greater than 10, you must set MaximumBatchingWindowInSeconds to at least + // 1. MaximumBatchingWindowInSeconds *int32 // (Streams only) Discard records older than the specified age. The default value @@ -284,10 +292,18 @@ type CreateEventSourceMappingOutput struct { // The result of the last Lambda invocation of your function. LastProcessingResult *string - // (Streams and Amazon SQS standard queues) The maximum amount of time, in seconds, - // that Lambda spends gathering records before invoking the function. Default: 0 - // Related setting: When you set BatchSize to a value greater than 10, you must set - // MaximumBatchingWindowInSeconds to at least 1. + // The maximum amount of time, in seconds, that Lambda spends gathering records + // before invoking the function. You can configure MaximumBatchingWindowInSeconds + // to any value from 0 seconds to 300 seconds in increments of seconds. For streams + // and Amazon SQS event sources, the default batching window is 0 seconds. For + // Amazon MSK, Self-managed Apache Kafka, and Amazon MQ event sources, the default + // batching window is 500 ms. Note that because you can only change + // MaximumBatchingWindowInSeconds in increments of seconds, you cannot revert back + // to the 500 ms default batching window after you have changed it. To restore the + // default batching window, you must create a new event source mapping. Related + // setting: For streams and Amazon SQS event sources, when you set BatchSize to a + // value greater than 10, you must set MaximumBatchingWindowInSeconds to at least + // 1. MaximumBatchingWindowInSeconds *int32 // (Streams only) Discard records older than the specified age. The default value diff --git a/service/lambda/api_op_CreateFunction.go b/service/lambda/api_op_CreateFunction.go index 9249cee1a33..89912aea97c 100644 --- a/service/lambda/api_op_CreateFunction.go +++ b/service/lambda/api_op_CreateFunction.go @@ -222,6 +222,7 @@ type CreateFunctionOutput struct { // The function's environment variables // (https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html). + // Omitted from CloudTrail logs. Environment *types.EnvironmentResponse // The size of the function’s /tmp directory in MB. The default value is 512, but diff --git a/service/lambda/api_op_DeleteEventSourceMapping.go b/service/lambda/api_op_DeleteEventSourceMapping.go index a40d3623018..39e060e94d5 100644 --- a/service/lambda/api_op_DeleteEventSourceMapping.go +++ b/service/lambda/api_op_DeleteEventSourceMapping.go @@ -90,10 +90,18 @@ type DeleteEventSourceMappingOutput struct { // The result of the last Lambda invocation of your function. LastProcessingResult *string - // (Streams and Amazon SQS standard queues) The maximum amount of time, in seconds, - // that Lambda spends gathering records before invoking the function. Default: 0 - // Related setting: When you set BatchSize to a value greater than 10, you must set - // MaximumBatchingWindowInSeconds to at least 1. + // The maximum amount of time, in seconds, that Lambda spends gathering records + // before invoking the function. You can configure MaximumBatchingWindowInSeconds + // to any value from 0 seconds to 300 seconds in increments of seconds. For streams + // and Amazon SQS event sources, the default batching window is 0 seconds. For + // Amazon MSK, Self-managed Apache Kafka, and Amazon MQ event sources, the default + // batching window is 500 ms. Note that because you can only change + // MaximumBatchingWindowInSeconds in increments of seconds, you cannot revert back + // to the 500 ms default batching window after you have changed it. To restore the + // default batching window, you must create a new event source mapping. Related + // setting: For streams and Amazon SQS event sources, when you set BatchSize to a + // value greater than 10, you must set MaximumBatchingWindowInSeconds to at least + // 1. MaximumBatchingWindowInSeconds *int32 // (Streams only) Discard records older than the specified age. The default value diff --git a/service/lambda/api_op_GetEventSourceMapping.go b/service/lambda/api_op_GetEventSourceMapping.go index e47df50bb83..ce677479892 100644 --- a/service/lambda/api_op_GetEventSourceMapping.go +++ b/service/lambda/api_op_GetEventSourceMapping.go @@ -87,10 +87,18 @@ type GetEventSourceMappingOutput struct { // The result of the last Lambda invocation of your function. LastProcessingResult *string - // (Streams and Amazon SQS standard queues) The maximum amount of time, in seconds, - // that Lambda spends gathering records before invoking the function. Default: 0 - // Related setting: When you set BatchSize to a value greater than 10, you must set - // MaximumBatchingWindowInSeconds to at least 1. + // The maximum amount of time, in seconds, that Lambda spends gathering records + // before invoking the function. You can configure MaximumBatchingWindowInSeconds + // to any value from 0 seconds to 300 seconds in increments of seconds. For streams + // and Amazon SQS event sources, the default batching window is 0 seconds. For + // Amazon MSK, Self-managed Apache Kafka, and Amazon MQ event sources, the default + // batching window is 500 ms. Note that because you can only change + // MaximumBatchingWindowInSeconds in increments of seconds, you cannot revert back + // to the 500 ms default batching window after you have changed it. To restore the + // default batching window, you must create a new event source mapping. Related + // setting: For streams and Amazon SQS event sources, when you set BatchSize to a + // value greater than 10, you must set MaximumBatchingWindowInSeconds to at least + // 1. MaximumBatchingWindowInSeconds *int32 // (Streams only) Discard records older than the specified age. The default value diff --git a/service/lambda/api_op_GetFunctionConfiguration.go b/service/lambda/api_op_GetFunctionConfiguration.go index aeec844622c..b09ef686688 100644 --- a/service/lambda/api_op_GetFunctionConfiguration.go +++ b/service/lambda/api_op_GetFunctionConfiguration.go @@ -84,6 +84,7 @@ type GetFunctionConfigurationOutput struct { // The function's environment variables // (https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html). + // Omitted from CloudTrail logs. Environment *types.EnvironmentResponse // The size of the function’s /tmp directory in MB. The default value is 512, but diff --git a/service/lambda/api_op_GetProvisionedConcurrencyConfig.go b/service/lambda/api_op_GetProvisionedConcurrencyConfig.go index 5504e76d66e..ed8fa43c5ba 100644 --- a/service/lambda/api_op_GetProvisionedConcurrencyConfig.go +++ b/service/lambda/api_op_GetProvisionedConcurrencyConfig.go @@ -57,7 +57,9 @@ type GetProvisionedConcurrencyConfigInput struct { type GetProvisionedConcurrencyConfigOutput struct { - // The amount of provisioned concurrency allocated. + // The amount of provisioned concurrency allocated. When a weighted alias is used + // during linear and canary deployments, this value fluctuates depending on the + // amount of concurrency that is provisioned for the function versions. AllocatedProvisionedConcurrentExecutions *int32 // The amount of provisioned concurrency available. diff --git a/service/lambda/api_op_PublishVersion.go b/service/lambda/api_op_PublishVersion.go index f03f97463aa..a7c84852bfb 100644 --- a/service/lambda/api_op_PublishVersion.go +++ b/service/lambda/api_op_PublishVersion.go @@ -93,6 +93,7 @@ type PublishVersionOutput struct { // The function's environment variables // (https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html). + // Omitted from CloudTrail logs. Environment *types.EnvironmentResponse // The size of the function’s /tmp directory in MB. The default value is 512, but diff --git a/service/lambda/api_op_PutProvisionedConcurrencyConfig.go b/service/lambda/api_op_PutProvisionedConcurrencyConfig.go index e235fcccefe..f6e7028feec 100644 --- a/service/lambda/api_op_PutProvisionedConcurrencyConfig.go +++ b/service/lambda/api_op_PutProvisionedConcurrencyConfig.go @@ -61,7 +61,9 @@ type PutProvisionedConcurrencyConfigInput struct { type PutProvisionedConcurrencyConfigOutput struct { - // The amount of provisioned concurrency allocated. + // The amount of provisioned concurrency allocated. When a weighted alias is used + // during linear and canary deployments, this value fluctuates depending on the + // amount of concurrency that is provisioned for the function versions. AllocatedProvisionedConcurrentExecutions *int32 // The amount of provisioned concurrency available. diff --git a/service/lambda/api_op_UpdateEventSourceMapping.go b/service/lambda/api_op_UpdateEventSourceMapping.go index 5274a0359c0..cfd95dffba4 100644 --- a/service/lambda/api_op_UpdateEventSourceMapping.go +++ b/service/lambda/api_op_UpdateEventSourceMapping.go @@ -172,10 +172,18 @@ type UpdateEventSourceMappingInput struct { // event source mapping. FunctionResponseTypes []types.FunctionResponseType - // (Streams and Amazon SQS standard queues) The maximum amount of time, in seconds, - // that Lambda spends gathering records before invoking the function. Default: 0 - // Related setting: When you set BatchSize to a value greater than 10, you must set - // MaximumBatchingWindowInSeconds to at least 1. + // The maximum amount of time, in seconds, that Lambda spends gathering records + // before invoking the function. You can configure MaximumBatchingWindowInSeconds + // to any value from 0 seconds to 300 seconds in increments of seconds. For streams + // and Amazon SQS event sources, the default batching window is 0 seconds. For + // Amazon MSK, Self-managed Apache Kafka, and Amazon MQ event sources, the default + // batching window is 500 ms. Note that because you can only change + // MaximumBatchingWindowInSeconds in increments of seconds, you cannot revert back + // to the 500 ms default batching window after you have changed it. To restore the + // default batching window, you must create a new event source mapping. Related + // setting: For streams and Amazon SQS event sources, when you set BatchSize to a + // value greater than 10, you must set MaximumBatchingWindowInSeconds to at least + // 1. MaximumBatchingWindowInSeconds *int32 // (Streams only) Discard records older than the specified age. The default value @@ -249,10 +257,18 @@ type UpdateEventSourceMappingOutput struct { // The result of the last Lambda invocation of your function. LastProcessingResult *string - // (Streams and Amazon SQS standard queues) The maximum amount of time, in seconds, - // that Lambda spends gathering records before invoking the function. Default: 0 - // Related setting: When you set BatchSize to a value greater than 10, you must set - // MaximumBatchingWindowInSeconds to at least 1. + // The maximum amount of time, in seconds, that Lambda spends gathering records + // before invoking the function. You can configure MaximumBatchingWindowInSeconds + // to any value from 0 seconds to 300 seconds in increments of seconds. For streams + // and Amazon SQS event sources, the default batching window is 0 seconds. For + // Amazon MSK, Self-managed Apache Kafka, and Amazon MQ event sources, the default + // batching window is 500 ms. Note that because you can only change + // MaximumBatchingWindowInSeconds in increments of seconds, you cannot revert back + // to the 500 ms default batching window after you have changed it. To restore the + // default batching window, you must create a new event source mapping. Related + // setting: For streams and Amazon SQS event sources, when you set BatchSize to a + // value greater than 10, you must set MaximumBatchingWindowInSeconds to at least + // 1. MaximumBatchingWindowInSeconds *int32 // (Streams only) Discard records older than the specified age. The default value diff --git a/service/lambda/api_op_UpdateFunctionCode.go b/service/lambda/api_op_UpdateFunctionCode.go index ca7d45cedb0..69b5458316b 100644 --- a/service/lambda/api_op_UpdateFunctionCode.go +++ b/service/lambda/api_op_UpdateFunctionCode.go @@ -127,6 +127,7 @@ type UpdateFunctionCodeOutput struct { // The function's environment variables // (https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html). + // Omitted from CloudTrail logs. Environment *types.EnvironmentResponse // The size of the function’s /tmp directory in MB. The default value is 512, but diff --git a/service/lambda/api_op_UpdateFunctionConfiguration.go b/service/lambda/api_op_UpdateFunctionConfiguration.go index e651bb0607e..3623bf2b485 100644 --- a/service/lambda/api_op_UpdateFunctionConfiguration.go +++ b/service/lambda/api_op_UpdateFunctionConfiguration.go @@ -162,6 +162,7 @@ type UpdateFunctionConfigurationOutput struct { // The function's environment variables // (https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html). + // Omitted from CloudTrail logs. Environment *types.EnvironmentResponse // The size of the function’s /tmp directory in MB. The default value is 512, but diff --git a/service/lambda/types/enums.go b/service/lambda/types/enums.go index 65d195f9cf3..061eefd69d6 100644 --- a/service/lambda/types/enums.go +++ b/service/lambda/types/enums.go @@ -286,6 +286,7 @@ const ( RuntimeRuby27 Runtime = "ruby2.7" RuntimeProvided Runtime = "provided" RuntimeProvidedal2 Runtime = "provided.al2" + RuntimeNodejs18x Runtime = "nodejs18.x" ) // Values returns all known values for Runtime. Note that this can be expanded in @@ -320,6 +321,7 @@ func (Runtime) Values() []Runtime { "ruby2.7", "provided", "provided.al2", + "nodejs18.x", } } diff --git a/service/lambda/types/types.go b/service/lambda/types/types.go index bc6a4ba4566..a06a5939608 100644 --- a/service/lambda/types/types.go +++ b/service/lambda/types/types.go @@ -103,7 +103,8 @@ type AmazonManagedKafkaEventSourceConfig struct { // The identifier for the Kafka consumer group to join. The consumer group ID must // be unique among all your Kafka event sources. After creating a Kafka event // source mapping with the consumer group ID specified, you cannot update this - // value. For more information, see services-msk-consumer-group-id. + // value. For more information, see Customizable consumer group ID + // (https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-consumer-group-id). ConsumerGroupId *string noSmithyDocumentSerde @@ -265,7 +266,7 @@ type EnvironmentResponse struct { // Error messages for environment variables that couldn't be applied. Error *EnvironmentError - // Environment variable key-value pairs. + // Environment variable key-value pairs. Omitted from CloudTrail logs. Variables map[string]string noSmithyDocumentSerde @@ -331,10 +332,18 @@ type EventSourceMappingConfiguration struct { // The result of the last Lambda invocation of your function. LastProcessingResult *string - // (Streams and Amazon SQS standard queues) The maximum amount of time, in seconds, - // that Lambda spends gathering records before invoking the function. Default: 0 - // Related setting: When you set BatchSize to a value greater than 10, you must set - // MaximumBatchingWindowInSeconds to at least 1. + // The maximum amount of time, in seconds, that Lambda spends gathering records + // before invoking the function. You can configure MaximumBatchingWindowInSeconds + // to any value from 0 seconds to 300 seconds in increments of seconds. For streams + // and Amazon SQS event sources, the default batching window is 0 seconds. For + // Amazon MSK, Self-managed Apache Kafka, and Amazon MQ event sources, the default + // batching window is 500 ms. Note that because you can only change + // MaximumBatchingWindowInSeconds in increments of seconds, you cannot revert back + // to the 500 ms default batching window after you have changed it. To restore the + // default batching window, you must create a new event source mapping. Related + // setting: For streams and Amazon SQS event sources, when you set BatchSize to a + // value greater than 10, you must set MaximumBatchingWindowInSeconds to at least + // 1. MaximumBatchingWindowInSeconds *int32 // (Streams only) Discard records older than the specified age. The default value @@ -501,6 +510,7 @@ type FunctionConfiguration struct { // The function's environment variables // (https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html). + // Omitted from CloudTrail logs. Environment *EnvironmentResponse // The size of the function’s /tmp directory in MB. The default value is 512, but @@ -842,7 +852,9 @@ type OnSuccess struct { // version. type ProvisionedConcurrencyConfigListItem struct { - // The amount of provisioned concurrency allocated. + // The amount of provisioned concurrency allocated. When a weighted alias is used + // during linear and canary deployments, this value fluctuates depending on the + // amount of concurrency that is provisioned for the function versions. AllocatedProvisionedConcurrentExecutions *int32 // The amount of provisioned concurrency available. @@ -884,7 +896,8 @@ type SelfManagedKafkaEventSourceConfig struct { // The identifier for the Kafka consumer group to join. The consumer group ID must // be unique among all your Kafka event sources. After creating a Kafka event // source mapping with the consumer group ID specified, you cannot update this - // value. For more information, see services-msk-consumer-group-id. + // value. For more information, see Customizable consumer group ID + // (https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html#services-msk-consumer-group-id). ConsumerGroupId *string noSmithyDocumentSerde @@ -905,30 +918,32 @@ type SourceAccessConfiguration struct { // key used for SASL/PLAIN authentication of your Apache Kafka brokers. // // * - // VPC_SUBNET - The subnets associated with your VPC. Lambda connects to these - // subnets to fetch data from your self-managed Apache Kafka cluster. + // VPC_SUBNET - (Self-managed Apache Kafka) The subnets associated with your VPC. + // Lambda connects to these subnets to fetch data from your self-managed Apache + // Kafka cluster. // - // * - // VPC_SECURITY_GROUP - The VPC security group used to manage access to your - // self-managed Apache Kafka brokers. + // * VPC_SECURITY_GROUP - (Self-managed Apache Kafka) The VPC + // security group used to manage access to your self-managed Apache Kafka + // brokers. // - // * SASL_SCRAM_256_AUTH - The Secrets Manager - // ARN of your secret key used for SASL SCRAM-256 authentication of your + // * SASL_SCRAM_256_AUTH - (Self-managed Apache Kafka) The Secrets + // Manager ARN of your secret key used for SASL SCRAM-256 authentication of your // self-managed Apache Kafka brokers. // - // * SASL_SCRAM_512_AUTH - The Secrets Manager - // ARN of your secret key used for SASL SCRAM-512 authentication of your - // self-managed Apache Kafka brokers. + // * SASL_SCRAM_512_AUTH - (Amazon MSK, + // Self-managed Apache Kafka) The Secrets Manager ARN of your secret key used for + // SASL SCRAM-512 authentication of your self-managed Apache Kafka brokers. // - // * VIRTUAL_HOST - (Amazon MQ) The name of the - // virtual host in your RabbitMQ broker. Lambda uses this RabbitMQ host as the - // event source. This property cannot be specified in an UpdateEventSourceMapping - // API call. + // * + // VIRTUAL_HOST - (RabbitMQ) The name of the virtual host in your RabbitMQ broker. + // Lambda uses this RabbitMQ host as the event source. This property cannot be + // specified in an UpdateEventSourceMapping API call. // - // * CLIENT_CERTIFICATE_TLS_AUTH - (Amazon MSK, self-managed Apache - // Kafka) The Secrets Manager ARN of your secret key containing the certificate - // chain (X.509 PEM), private key (PKCS#8 PEM), and private key password (optional) - // used for mutual TLS authentication of your MSK/Apache Kafka brokers. + // * + // CLIENT_CERTIFICATE_TLS_AUTH - (Amazon MSK, self-managed Apache Kafka) The + // Secrets Manager ARN of your secret key containing the certificate chain (X.509 + // PEM), private key (PKCS#8 PEM), and private key password (optional) used for + // mutual TLS authentication of your MSK/Apache Kafka brokers. // // * // SERVER_ROOT_CA_CERTIFICATE - (Self-managed Apache Kafka) The Secrets Manager ARN diff --git a/service/personalize/api_op_CreateDatasetImportJob.go b/service/personalize/api_op_CreateDatasetImportJob.go index 68e7d714009..3e5401991ac 100644 --- a/service/personalize/api_op_CreateDatasetImportJob.go +++ b/service/personalize/api_op_CreateDatasetImportJob.go @@ -92,6 +92,10 @@ type CreateDatasetImportJobInput struct { // Amazon Personalize replaces any record with the same ID with the new one. ImportMode types.ImportMode + // If you created a metric attribution, specify whether to publish metrics for this + // import job to Amazon S3 + PublishAttributionMetricsToS3 *bool + // A list of tags // (https://docs.aws.amazon.com/personalize/latest/dev/tagging-resources.html) to // apply to the dataset import job. diff --git a/service/personalize/api_op_CreateMetricAttribution.go b/service/personalize/api_op_CreateMetricAttribution.go new file mode 100644 index 00000000000..91bdc249f95 --- /dev/null +++ b/service/personalize/api_op_CreateMetricAttribution.go @@ -0,0 +1,145 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package personalize + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/personalize/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a metric attribution. A metric attribution creates reports on the data +// that you import into Amazon Personalize. Depending on how you imported the data, +// you can view reports in Amazon CloudWatch or Amazon S3. For more information, +// see Measuring impact of recommendations +// (https://docs.aws.amazon.com/personalize/latest/dg/measuring-recommendation-impact.html). +func (c *Client) CreateMetricAttribution(ctx context.Context, params *CreateMetricAttributionInput, optFns ...func(*Options)) (*CreateMetricAttributionOutput, error) { + if params == nil { + params = &CreateMetricAttributionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateMetricAttribution", params, optFns, c.addOperationCreateMetricAttributionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateMetricAttributionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateMetricAttributionInput struct { + + // The Amazon Resource Name (ARN) of the destination dataset group for the metric + // attribution. + // + // This member is required. + DatasetGroupArn *string + + // A list of metric attributes for the metric attribution. Each metric attribute + // specifies an event type to track and a function. Available functions are SUM() + // or SAMPLECOUNT(). For SUM() functions, provide the dataset type (either + // Interactions or Items) and column to sum as a parameter. For example + // SUM(Items.PRICE). + // + // This member is required. + Metrics []types.MetricAttribute + + // The output configuration details for the metric attribution. + // + // This member is required. + MetricsOutputConfig *types.MetricAttributionOutput + + // A name for the metric attribution. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type CreateMetricAttributionOutput struct { + + // The Amazon Resource Name (ARN) for the new metric attribution. + MetricAttributionArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateMetricAttributionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateMetricAttribution{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateMetricAttribution{}, middleware.After) + if 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); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateMetricAttributionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateMetricAttribution(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opCreateMetricAttribution(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "personalize", + OperationName: "CreateMetricAttribution", + } +} diff --git a/service/personalize/api_op_CreateSolutionVersion.go b/service/personalize/api_op_CreateSolutionVersion.go index ba59943d101..6f5cdc7cf04 100644 --- a/service/personalize/api_op_CreateSolutionVersion.go +++ b/service/personalize/api_op_CreateSolutionVersion.go @@ -83,6 +83,9 @@ type CreateSolutionVersionInput struct { // This member is required. SolutionArn *string + // The name of the solution version. + Name *string + // A list of tags // (https://docs.aws.amazon.com/personalize/latest/dev/tagging-resources.html) to // apply to the solution version. diff --git a/service/personalize/api_op_DeleteMetricAttribution.go b/service/personalize/api_op_DeleteMetricAttribution.go new file mode 100644 index 00000000000..c08f19520e1 --- /dev/null +++ b/service/personalize/api_op_DeleteMetricAttribution.go @@ -0,0 +1,116 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package personalize + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a metric attribution. +func (c *Client) DeleteMetricAttribution(ctx context.Context, params *DeleteMetricAttributionInput, optFns ...func(*Options)) (*DeleteMetricAttributionOutput, error) { + if params == nil { + params = &DeleteMetricAttributionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteMetricAttribution", params, optFns, c.addOperationDeleteMetricAttributionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteMetricAttributionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteMetricAttributionInput struct { + + // The metric attribution's Amazon Resource Name (ARN). + // + // This member is required. + MetricAttributionArn *string + + noSmithyDocumentSerde +} + +type DeleteMetricAttributionOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteMetricAttributionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteMetricAttribution{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteMetricAttribution{}, middleware.After) + if 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); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteMetricAttributionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteMetricAttribution(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteMetricAttribution(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "personalize", + OperationName: "DeleteMetricAttribution", + } +} diff --git a/service/personalize/api_op_DescribeMetricAttribution.go b/service/personalize/api_op_DescribeMetricAttribution.go new file mode 100644 index 00000000000..175d2a4f74c --- /dev/null +++ b/service/personalize/api_op_DescribeMetricAttribution.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package personalize + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/personalize/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Describes a metric attribution. +func (c *Client) DescribeMetricAttribution(ctx context.Context, params *DescribeMetricAttributionInput, optFns ...func(*Options)) (*DescribeMetricAttributionOutput, error) { + if params == nil { + params = &DescribeMetricAttributionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeMetricAttribution", params, optFns, c.addOperationDescribeMetricAttributionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeMetricAttributionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeMetricAttributionInput struct { + + // The metric attribution's Amazon Resource Name (ARN). + // + // This member is required. + MetricAttributionArn *string + + noSmithyDocumentSerde +} + +type DescribeMetricAttributionOutput struct { + + // The details of the metric attribution. + MetricAttribution *types.MetricAttribution + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeMetricAttributionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeMetricAttribution{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeMetricAttribution{}, middleware.After) + if 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); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDescribeMetricAttributionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMetricAttribution(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeMetricAttribution(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "personalize", + OperationName: "DescribeMetricAttribution", + } +} diff --git a/service/personalize/api_op_ListMetricAttributionMetrics.go b/service/personalize/api_op_ListMetricAttributionMetrics.go new file mode 100644 index 00000000000..3e26d118f94 --- /dev/null +++ b/service/personalize/api_op_ListMetricAttributionMetrics.go @@ -0,0 +1,223 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package personalize + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/personalize/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the metrics for the metric attribution. +func (c *Client) ListMetricAttributionMetrics(ctx context.Context, params *ListMetricAttributionMetricsInput, optFns ...func(*Options)) (*ListMetricAttributionMetricsOutput, error) { + if params == nil { + params = &ListMetricAttributionMetricsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListMetricAttributionMetrics", params, optFns, c.addOperationListMetricAttributionMetricsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListMetricAttributionMetricsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListMetricAttributionMetricsInput struct { + + // The maximum number of metrics to return in one page of results. + MaxResults *int32 + + // The Amazon Resource Name (ARN) of the metric attribution to retrieve attributes + // for. + MetricAttributionArn *string + + // Specify the pagination token from a previous request to retrieve the next page + // of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListMetricAttributionMetricsOutput struct { + + // The metrics for the specified metric attribution. + Metrics []types.MetricAttribute + + // Specify the pagination token from a previous + // ListMetricAttributionMetricsResponse request to retrieve the next page of + // results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListMetricAttributionMetricsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListMetricAttributionMetrics{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListMetricAttributionMetrics{}, middleware.After) + if 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); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMetricAttributionMetrics(options.Region), middleware.Before); 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 + } + return nil +} + +// ListMetricAttributionMetricsAPIClient is a client that implements the +// ListMetricAttributionMetrics operation. +type ListMetricAttributionMetricsAPIClient interface { + ListMetricAttributionMetrics(context.Context, *ListMetricAttributionMetricsInput, ...func(*Options)) (*ListMetricAttributionMetricsOutput, error) +} + +var _ ListMetricAttributionMetricsAPIClient = (*Client)(nil) + +// ListMetricAttributionMetricsPaginatorOptions is the paginator options for +// ListMetricAttributionMetrics +type ListMetricAttributionMetricsPaginatorOptions struct { + // The maximum number of metrics to return in one page of 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 +} + +// ListMetricAttributionMetricsPaginator is a paginator for +// ListMetricAttributionMetrics +type ListMetricAttributionMetricsPaginator struct { + options ListMetricAttributionMetricsPaginatorOptions + client ListMetricAttributionMetricsAPIClient + params *ListMetricAttributionMetricsInput + nextToken *string + firstPage bool +} + +// NewListMetricAttributionMetricsPaginator returns a new +// ListMetricAttributionMetricsPaginator +func NewListMetricAttributionMetricsPaginator(client ListMetricAttributionMetricsAPIClient, params *ListMetricAttributionMetricsInput, optFns ...func(*ListMetricAttributionMetricsPaginatorOptions)) *ListMetricAttributionMetricsPaginator { + if params == nil { + params = &ListMetricAttributionMetricsInput{} + } + + options := ListMetricAttributionMetricsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListMetricAttributionMetricsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListMetricAttributionMetricsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListMetricAttributionMetrics page. +func (p *ListMetricAttributionMetricsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListMetricAttributionMetricsOutput, 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.ListMetricAttributionMetrics(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_opListMetricAttributionMetrics(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "personalize", + OperationName: "ListMetricAttributionMetrics", + } +} diff --git a/service/personalize/api_op_ListMetricAttributions.go b/service/personalize/api_op_ListMetricAttributions.go new file mode 100644 index 00000000000..f5d42d4fe2f --- /dev/null +++ b/service/personalize/api_op_ListMetricAttributions.go @@ -0,0 +1,219 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package personalize + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/personalize/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists metric attributions. +func (c *Client) ListMetricAttributions(ctx context.Context, params *ListMetricAttributionsInput, optFns ...func(*Options)) (*ListMetricAttributionsOutput, error) { + if params == nil { + params = &ListMetricAttributionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListMetricAttributions", params, optFns, c.addOperationListMetricAttributionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListMetricAttributionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListMetricAttributionsInput struct { + + // The metric attributions' dataset group Amazon Resource Name (ARN). + DatasetGroupArn *string + + // The maximum number of metric attributions to return in one page of results. + MaxResults *int32 + + // Specify the pagination token from a previous request to retrieve the next page + // of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListMetricAttributionsOutput struct { + + // The list of metric attributions. + MetricAttributions []types.MetricAttributionSummary + + // Specify the pagination token from a previous request to retrieve the next page + // of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListMetricAttributionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListMetricAttributions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListMetricAttributions{}, middleware.After) + if 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); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMetricAttributions(options.Region), middleware.Before); 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 + } + return nil +} + +// ListMetricAttributionsAPIClient is a client that implements the +// ListMetricAttributions operation. +type ListMetricAttributionsAPIClient interface { + ListMetricAttributions(context.Context, *ListMetricAttributionsInput, ...func(*Options)) (*ListMetricAttributionsOutput, error) +} + +var _ ListMetricAttributionsAPIClient = (*Client)(nil) + +// ListMetricAttributionsPaginatorOptions is the paginator options for +// ListMetricAttributions +type ListMetricAttributionsPaginatorOptions struct { + // The maximum number of metric attributions to return in one page of 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 +} + +// ListMetricAttributionsPaginator is a paginator for ListMetricAttributions +type ListMetricAttributionsPaginator struct { + options ListMetricAttributionsPaginatorOptions + client ListMetricAttributionsAPIClient + params *ListMetricAttributionsInput + nextToken *string + firstPage bool +} + +// NewListMetricAttributionsPaginator returns a new ListMetricAttributionsPaginator +func NewListMetricAttributionsPaginator(client ListMetricAttributionsAPIClient, params *ListMetricAttributionsInput, optFns ...func(*ListMetricAttributionsPaginatorOptions)) *ListMetricAttributionsPaginator { + if params == nil { + params = &ListMetricAttributionsInput{} + } + + options := ListMetricAttributionsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListMetricAttributionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListMetricAttributionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListMetricAttributions page. +func (p *ListMetricAttributionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListMetricAttributionsOutput, 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.ListMetricAttributions(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_opListMetricAttributions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "personalize", + OperationName: "ListMetricAttributions", + } +} diff --git a/service/personalize/api_op_UpdateMetricAttribution.go b/service/personalize/api_op_UpdateMetricAttribution.go new file mode 100644 index 00000000000..1427b9d58f6 --- /dev/null +++ b/service/personalize/api_op_UpdateMetricAttribution.go @@ -0,0 +1,128 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package personalize + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/personalize/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates a metric attribution. +func (c *Client) UpdateMetricAttribution(ctx context.Context, params *UpdateMetricAttributionInput, optFns ...func(*Options)) (*UpdateMetricAttributionOutput, error) { + if params == nil { + params = &UpdateMetricAttributionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateMetricAttribution", params, optFns, c.addOperationUpdateMetricAttributionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateMetricAttributionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateMetricAttributionInput struct { + + // Add new metric attributes to the metric attribution. + AddMetrics []types.MetricAttribute + + // The Amazon Resource Name (ARN) for the metric attribution to update. + MetricAttributionArn *string + + // An output config for the metric attribution. + MetricsOutputConfig *types.MetricAttributionOutput + + // Remove metric attributes from the metric attribution. + RemoveMetrics []string + + noSmithyDocumentSerde +} + +type UpdateMetricAttributionOutput struct { + + // The Amazon Resource Name (ARN) for the metric attribution that you updated. + MetricAttributionArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateMetricAttributionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateMetricAttribution{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateMetricAttribution{}, middleware.After) + if 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); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateMetricAttributionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateMetricAttribution(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateMetricAttribution(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "personalize", + OperationName: "UpdateMetricAttribution", + } +} diff --git a/service/personalize/deserializers.go b/service/personalize/deserializers.go index ca0641b88b9..394c5977fe6 100644 --- a/service/personalize/deserializers.go +++ b/service/personalize/deserializers.go @@ -1146,6 +1146,129 @@ func awsAwsjson11_deserializeOpErrorCreateFilter(response *smithyhttp.Response, } } +type awsAwsjson11_deserializeOpCreateMetricAttribution struct { +} + +func (*awsAwsjson11_deserializeOpCreateMetricAttribution) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateMetricAttribution) 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_deserializeOpErrorCreateMetricAttribution(response, &metadata) + } + output := &CreateMetricAttributionOutput{} + 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_deserializeOpDocumentCreateMetricAttributionOutput(&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_deserializeOpErrorCreateMetricAttribution(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceAlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response, errorBody) + + case strings.EqualFold("ResourceInUseException", errorCode): + return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpCreateRecommender struct { } @@ -1619,6 +1742,9 @@ func awsAwsjson11_deserializeOpErrorCreateSolutionVersion(response *smithyhttp.R case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceAlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response, errorBody) + case strings.EqualFold("ResourceInUseException", errorCode): return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) @@ -2113,6 +2239,101 @@ func awsAwsjson11_deserializeOpErrorDeleteFilter(response *smithyhttp.Response, } } +type awsAwsjson11_deserializeOpDeleteMetricAttribution struct { +} + +func (*awsAwsjson11_deserializeOpDeleteMetricAttribution) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteMetricAttribution) 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_deserializeOpErrorDeleteMetricAttribution(response, &metadata) + } + output := &DeleteMetricAttributionOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteMetricAttribution(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceInUseException", errorCode): + return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpDeleteRecommender struct { } @@ -3652,14 +3873,14 @@ func awsAwsjson11_deserializeOpErrorDescribeFilter(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpDescribeRecipe struct { +type awsAwsjson11_deserializeOpDescribeMetricAttribution struct { } -func (*awsAwsjson11_deserializeOpDescribeRecipe) ID() string { +func (*awsAwsjson11_deserializeOpDescribeMetricAttribution) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeRecipe) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeMetricAttribution) 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) @@ -3673,9 +3894,9 @@ func (m *awsAwsjson11_deserializeOpDescribeRecipe) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeRecipe(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeMetricAttribution(response, &metadata) } - output := &DescribeRecipeOutput{} + output := &DescribeMetricAttributionOutput{} out.Result = output var buff [1024]byte @@ -3695,7 +3916,7 @@ func (m *awsAwsjson11_deserializeOpDescribeRecipe) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeRecipeOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeMetricAttributionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3709,7 +3930,7 @@ func (m *awsAwsjson11_deserializeOpDescribeRecipe) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeRecipe(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeMetricAttribution(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)} @@ -3766,14 +3987,14 @@ func awsAwsjson11_deserializeOpErrorDescribeRecipe(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpDescribeRecommender struct { +type awsAwsjson11_deserializeOpDescribeRecipe struct { } -func (*awsAwsjson11_deserializeOpDescribeRecommender) ID() string { +func (*awsAwsjson11_deserializeOpDescribeRecipe) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeRecommender) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeRecipe) 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) @@ -3787,9 +4008,9 @@ func (m *awsAwsjson11_deserializeOpDescribeRecommender) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeRecommender(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeRecipe(response, &metadata) } - output := &DescribeRecommenderOutput{} + output := &DescribeRecipeOutput{} out.Result = output var buff [1024]byte @@ -3809,7 +4030,7 @@ func (m *awsAwsjson11_deserializeOpDescribeRecommender) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeRecommenderOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeRecipeOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3823,7 +4044,7 @@ func (m *awsAwsjson11_deserializeOpDescribeRecommender) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeRecommender(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeRecipe(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)} @@ -3880,14 +4101,14 @@ func awsAwsjson11_deserializeOpErrorDescribeRecommender(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpDescribeSchema struct { +type awsAwsjson11_deserializeOpDescribeRecommender struct { } -func (*awsAwsjson11_deserializeOpDescribeSchema) ID() string { +func (*awsAwsjson11_deserializeOpDescribeRecommender) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeSchema) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeRecommender) 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) @@ -3901,9 +4122,9 @@ func (m *awsAwsjson11_deserializeOpDescribeSchema) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeSchema(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeRecommender(response, &metadata) } - output := &DescribeSchemaOutput{} + output := &DescribeRecommenderOutput{} out.Result = output var buff [1024]byte @@ -3923,7 +4144,7 @@ func (m *awsAwsjson11_deserializeOpDescribeSchema) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeSchemaOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeRecommenderOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3937,7 +4158,7 @@ func (m *awsAwsjson11_deserializeOpDescribeSchema) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeSchema(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeRecommender(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)} @@ -3994,14 +4215,14 @@ func awsAwsjson11_deserializeOpErrorDescribeSchema(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpDescribeSolution struct { +type awsAwsjson11_deserializeOpDescribeSchema struct { } -func (*awsAwsjson11_deserializeOpDescribeSolution) ID() string { +func (*awsAwsjson11_deserializeOpDescribeSchema) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpDescribeSolution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpDescribeSchema) 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) @@ -4015,9 +4236,9 @@ func (m *awsAwsjson11_deserializeOpDescribeSolution) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeSolution(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorDescribeSchema(response, &metadata) } - output := &DescribeSolutionOutput{} + output := &DescribeSchemaOutput{} out.Result = output var buff [1024]byte @@ -4037,7 +4258,7 @@ func (m *awsAwsjson11_deserializeOpDescribeSolution) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentDescribeSolutionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentDescribeSchemaOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4051,7 +4272,121 @@ func (m *awsAwsjson11_deserializeOpDescribeSolution) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorDescribeSolution(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorDescribeSchema(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpDescribeSolution struct { +} + +func (*awsAwsjson11_deserializeOpDescribeSolution) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDescribeSolution) 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_deserializeOpErrorDescribeSolution(response, &metadata) + } + output := &DescribeSolutionOutput{} + 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_deserializeOpDocumentDescribeSolutionOutput(&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_deserializeOpErrorDescribeSolution(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)} @@ -5362,14 +5697,14 @@ func awsAwsjson11_deserializeOpErrorListFilters(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpListRecipes struct { +type awsAwsjson11_deserializeOpListMetricAttributionMetrics struct { } -func (*awsAwsjson11_deserializeOpListRecipes) ID() string { +func (*awsAwsjson11_deserializeOpListMetricAttributionMetrics) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListRecipes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListMetricAttributionMetrics) 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) @@ -5383,9 +5718,9 @@ func (m *awsAwsjson11_deserializeOpListRecipes) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListRecipes(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListMetricAttributionMetrics(response, &metadata) } - output := &ListRecipesOutput{} + output := &ListMetricAttributionMetricsOutput{} out.Result = output var buff [1024]byte @@ -5405,7 +5740,7 @@ func (m *awsAwsjson11_deserializeOpListRecipes) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListRecipesOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListMetricAttributionMetricsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5419,7 +5754,7 @@ func (m *awsAwsjson11_deserializeOpListRecipes) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListRecipes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListMetricAttributionMetrics(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)} @@ -5476,14 +5811,14 @@ func awsAwsjson11_deserializeOpErrorListRecipes(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpListRecommenders struct { +type awsAwsjson11_deserializeOpListMetricAttributions struct { } -func (*awsAwsjson11_deserializeOpListRecommenders) ID() string { +func (*awsAwsjson11_deserializeOpListMetricAttributions) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListRecommenders) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListMetricAttributions) 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) @@ -5497,9 +5832,9 @@ func (m *awsAwsjson11_deserializeOpListRecommenders) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListRecommenders(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListMetricAttributions(response, &metadata) } - output := &ListRecommendersOutput{} + output := &ListMetricAttributionsOutput{} out.Result = output var buff [1024]byte @@ -5519,7 +5854,7 @@ func (m *awsAwsjson11_deserializeOpListRecommenders) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListRecommendersOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListMetricAttributionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5533,7 +5868,7 @@ func (m *awsAwsjson11_deserializeOpListRecommenders) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListRecommenders(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListMetricAttributions(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)} @@ -5590,14 +5925,14 @@ func awsAwsjson11_deserializeOpErrorListRecommenders(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpListSchemas struct { +type awsAwsjson11_deserializeOpListRecipes struct { } -func (*awsAwsjson11_deserializeOpListSchemas) ID() string { +func (*awsAwsjson11_deserializeOpListRecipes) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListSchemas) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListRecipes) 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) @@ -5611,9 +5946,9 @@ func (m *awsAwsjson11_deserializeOpListSchemas) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListSchemas(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListRecipes(response, &metadata) } - output := &ListSchemasOutput{} + output := &ListRecipesOutput{} out.Result = output var buff [1024]byte @@ -5633,7 +5968,7 @@ func (m *awsAwsjson11_deserializeOpListSchemas) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListSchemasOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListRecipesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5647,7 +5982,7 @@ func (m *awsAwsjson11_deserializeOpListSchemas) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListSchemas(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListRecipes(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)} @@ -5688,6 +6023,9 @@ func awsAwsjson11_deserializeOpErrorListSchemas(response *smithyhttp.Response, m } switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) @@ -5701,14 +6039,14 @@ func awsAwsjson11_deserializeOpErrorListSchemas(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpListSolutions struct { +type awsAwsjson11_deserializeOpListRecommenders struct { } -func (*awsAwsjson11_deserializeOpListSolutions) ID() string { +func (*awsAwsjson11_deserializeOpListRecommenders) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListSolutions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListRecommenders) 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) @@ -5722,9 +6060,9 @@ func (m *awsAwsjson11_deserializeOpListSolutions) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListSolutions(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListRecommenders(response, &metadata) } - output := &ListSolutionsOutput{} + output := &ListRecommendersOutput{} out.Result = output var buff [1024]byte @@ -5744,7 +6082,7 @@ func (m *awsAwsjson11_deserializeOpListSolutions) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListSolutionsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListRecommendersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5758,7 +6096,7 @@ func (m *awsAwsjson11_deserializeOpListSolutions) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListSolutions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListRecommenders(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)} @@ -5815,14 +6153,14 @@ func awsAwsjson11_deserializeOpErrorListSolutions(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpListSolutionVersions struct { +type awsAwsjson11_deserializeOpListSchemas struct { } -func (*awsAwsjson11_deserializeOpListSolutionVersions) ID() string { +func (*awsAwsjson11_deserializeOpListSchemas) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListSolutionVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListSchemas) 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) @@ -5836,9 +6174,9 @@ func (m *awsAwsjson11_deserializeOpListSolutionVersions) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListSolutionVersions(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListSchemas(response, &metadata) } - output := &ListSolutionVersionsOutput{} + output := &ListSchemasOutput{} out.Result = output var buff [1024]byte @@ -5858,7 +6196,7 @@ func (m *awsAwsjson11_deserializeOpListSolutionVersions) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListSolutionVersionsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListSchemasOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5872,7 +6210,7 @@ func (m *awsAwsjson11_deserializeOpListSolutionVersions) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListSolutionVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListSchemas(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)} @@ -5913,15 +6251,9 @@ func awsAwsjson11_deserializeOpErrorListSolutionVersions(response *smithyhttp.Re } switch { - case strings.EqualFold("InvalidInputException", errorCode): - return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -5932,14 +6264,14 @@ func awsAwsjson11_deserializeOpErrorListSolutionVersions(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpListTagsForResource struct { +type awsAwsjson11_deserializeOpListSolutions struct { } -func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string { +func (*awsAwsjson11_deserializeOpListSolutions) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListSolutions) 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) @@ -5953,9 +6285,9 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListTagsForResource(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListSolutions(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &ListSolutionsOutput{} out.Result = output var buff [1024]byte @@ -5975,7 +6307,7 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListSolutionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5989,7 +6321,7 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListSolutions(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)} @@ -6033,11 +6365,8 @@ func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Res case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("ResourceInUseException", errorCode): - return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -6049,14 +6378,14 @@ func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpStartRecommender struct { +type awsAwsjson11_deserializeOpListSolutionVersions struct { } -func (*awsAwsjson11_deserializeOpStartRecommender) ID() string { +func (*awsAwsjson11_deserializeOpListSolutionVersions) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartRecommender) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListSolutionVersions) 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) @@ -6070,9 +6399,9 @@ func (m *awsAwsjson11_deserializeOpStartRecommender) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartRecommender(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListSolutionVersions(response, &metadata) } - output := &StartRecommenderOutput{} + output := &ListSolutionVersionsOutput{} out.Result = output var buff [1024]byte @@ -6092,7 +6421,7 @@ func (m *awsAwsjson11_deserializeOpStartRecommender) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartRecommenderOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListSolutionVersionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6106,7 +6435,7 @@ func (m *awsAwsjson11_deserializeOpStartRecommender) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartRecommender(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListSolutionVersions(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)} @@ -6150,8 +6479,8 @@ func awsAwsjson11_deserializeOpErrorStartRecommender(response *smithyhttp.Respon case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("ResourceInUseException", errorCode): - return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) @@ -6166,14 +6495,14 @@ func awsAwsjson11_deserializeOpErrorStartRecommender(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpStopRecommender struct { +type awsAwsjson11_deserializeOpListTagsForResource struct { } -func (*awsAwsjson11_deserializeOpStopRecommender) ID() string { +func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStopRecommender) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListTagsForResource) 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) @@ -6187,9 +6516,9 @@ func (m *awsAwsjson11_deserializeOpStopRecommender) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStopRecommender(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListTagsForResource(response, &metadata) } - output := &StopRecommenderOutput{} + output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte @@ -6209,7 +6538,7 @@ func (m *awsAwsjson11_deserializeOpStopRecommender) HandleDeserialize(ctx contex return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStopRecommenderOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6223,7 +6552,7 @@ func (m *awsAwsjson11_deserializeOpStopRecommender) HandleDeserialize(ctx contex return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStopRecommender(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListTagsForResource(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)} @@ -6283,14 +6612,14 @@ func awsAwsjson11_deserializeOpErrorStopRecommender(response *smithyhttp.Respons } } -type awsAwsjson11_deserializeOpStopSolutionVersionCreation struct { +type awsAwsjson11_deserializeOpStartRecommender struct { } -func (*awsAwsjson11_deserializeOpStopSolutionVersionCreation) ID() string { +func (*awsAwsjson11_deserializeOpStartRecommender) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStopSolutionVersionCreation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartRecommender) 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) @@ -6304,23 +6633,45 @@ func (m *awsAwsjson11_deserializeOpStopSolutionVersionCreation) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStopSolutionVersionCreation(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartRecommender(response, &metadata) } - output := &StopSolutionVersionCreationOutput{} + output := &StartRecommenderOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) -func awsAwsjson11_deserializeOpErrorStopSolutionVersionCreation(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + 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_deserializeOpDocumentStartRecommenderOutput(&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_deserializeOpErrorStartRecommender(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()) @@ -6378,14 +6729,14 @@ func awsAwsjson11_deserializeOpErrorStopSolutionVersionCreation(response *smithy } } -type awsAwsjson11_deserializeOpTagResource struct { +type awsAwsjson11_deserializeOpStopRecommender struct { } -func (*awsAwsjson11_deserializeOpTagResource) ID() string { +func (*awsAwsjson11_deserializeOpStopRecommender) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStopRecommender) 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) @@ -6399,9 +6750,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_deserializeOpErrorStopRecommender(response, &metadata) } - output := &TagResourceOutput{} + output := &StopRecommenderOutput{} out.Result = output var buff [1024]byte @@ -6421,7 +6772,7 @@ func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentTagResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStopRecommenderOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6435,7 +6786,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_deserializeOpErrorStopRecommender(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)} @@ -6479,18 +6830,12 @@ func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, m case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("ResourceInUseException", errorCode): return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("TooManyTagsException", errorCode): - return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6501,14 +6846,14 @@ func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpUntagResource struct { +type awsAwsjson11_deserializeOpStopSolutionVersionCreation struct { } -func (*awsAwsjson11_deserializeOpUntagResource) ID() string { +func (*awsAwsjson11_deserializeOpStopSolutionVersionCreation) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStopSolutionVersionCreation) 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) @@ -6522,43 +6867,21 @@ 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_deserializeOpErrorStopSolutionVersionCreation(response, &metadata) } - output := &UntagResourceOutput{} + output := &StopSolutionVersionCreationOutput{} 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_deserializeOpDocumentUntagResourceOutput(&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(), + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), } - return out, metadata, err } return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStopSolutionVersionCreation(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)} @@ -6608,9 +6931,6 @@ func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("TooManyTagKeysException", errorCode): - return awsAwsjson11_deserializeErrorTooManyTagKeysException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6621,14 +6941,14 @@ func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpUpdateCampaign struct { +type awsAwsjson11_deserializeOpTagResource struct { } -func (*awsAwsjson11_deserializeOpUpdateCampaign) ID() string { +func (*awsAwsjson11_deserializeOpTagResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateCampaign) 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) @@ -6642,9 +6962,9 @@ func (m *awsAwsjson11_deserializeOpUpdateCampaign) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateCampaign(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorTagResource(response, &metadata) } - output := &UpdateCampaignOutput{} + output := &TagResourceOutput{} out.Result = output var buff [1024]byte @@ -6664,7 +6984,7 @@ func (m *awsAwsjson11_deserializeOpUpdateCampaign) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateCampaignOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentTagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6678,7 +6998,7 @@ func (m *awsAwsjson11_deserializeOpUpdateCampaign) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateCampaign(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)} @@ -6722,12 +7042,18 @@ func awsAwsjson11_deserializeOpErrorUpdateCampaign(response *smithyhttp.Response case strings.EqualFold("InvalidInputException", errorCode): return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceInUseException", errorCode): return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("TooManyTagsException", errorCode): + return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6738,14 +7064,14 @@ func awsAwsjson11_deserializeOpErrorUpdateCampaign(response *smithyhttp.Response } } -type awsAwsjson11_deserializeOpUpdateRecommender struct { +type awsAwsjson11_deserializeOpUntagResource struct { } -func (*awsAwsjson11_deserializeOpUpdateRecommender) ID() string { +func (*awsAwsjson11_deserializeOpUntagResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateRecommender) 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) @@ -6759,9 +7085,9 @@ func (m *awsAwsjson11_deserializeOpUpdateRecommender) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateRecommender(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUntagResource(response, &metadata) } - output := &UpdateRecommenderOutput{} + output := &UntagResourceOutput{} out.Result = output var buff [1024]byte @@ -6781,7 +7107,7 @@ func (m *awsAwsjson11_deserializeOpUpdateRecommender) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateRecommenderOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUntagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6795,7 +7121,7 @@ func (m *awsAwsjson11_deserializeOpUpdateRecommender) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateRecommender(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)} @@ -6845,6 +7171,9 @@ func awsAwsjson11_deserializeOpErrorUpdateRecommender(response *smithyhttp.Respo case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("TooManyTagKeysException", errorCode): + return awsAwsjson11_deserializeErrorTooManyTagKeysException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6855,11 +7184,36 @@ func awsAwsjson11_deserializeOpErrorUpdateRecommender(response *smithyhttp.Respo } } -func awsAwsjson11_deserializeErrorInvalidInputException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +type awsAwsjson11_deserializeOpUpdateCampaign struct { +} + +func (*awsAwsjson11_deserializeOpUpdateCampaign) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateCampaign) 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_deserializeOpErrorUpdateCampaign(response, &metadata) + } + output := &UpdateCampaignOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -6870,12 +7224,10 @@ func awsAwsjson11_deserializeErrorInvalidInputException(response *smithyhttp.Res Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.InvalidInputException{} - err := awsAwsjson11_deserializeDocumentInvalidInputException(&output, shape) - + err = awsAwsjson11_deserializeOpDocumentUpdateCampaignOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6883,22 +7235,35 @@ func awsAwsjson11_deserializeErrorInvalidInputException(response *smithyhttp.Res Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson11_deserializeErrorInvalidNextTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeOpErrorUpdateCampaign(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + 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 { + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -6908,28 +7273,64 @@ func awsAwsjson11_deserializeErrorInvalidNextTokenException(response *smithyhttp return err } - output := &types.InvalidNextTokenException{} - err := awsAwsjson11_deserializeDocumentInvalidNextTokenException(&output, shape) + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } - 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(), + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceInUseException", errorCode): + return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - errorBody.Seek(0, io.SeekStart) - return output +type awsAwsjson11_deserializeOpUpdateMetricAttribution struct { } -func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func (*awsAwsjson11_deserializeOpUpdateMetricAttribution) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateMetricAttribution) 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_deserializeOpErrorUpdateMetricAttribution(response, &metadata) + } + output := &UpdateMetricAttributionOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -6940,12 +7341,10 @@ func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Re Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.LimitExceededException{} - err := awsAwsjson11_deserializeDocumentLimitExceededException(&output, shape) - + err = awsAwsjson11_deserializeOpDocumentUpdateMetricAttributionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6953,20 +7352,107 @@ func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Re Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeOpErrorUpdateMetricAttribution(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceAlreadyExistsException", errorCode): + return awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response, errorBody) + + case strings.EqualFold("ResourceInUseException", errorCode): + return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateRecommender struct { +} + +func (*awsAwsjson11_deserializeOpUpdateRecommender) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateRecommender) 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_deserializeOpErrorUpdateRecommender(response, &metadata) + } + output := &UpdateRecommenderOutput{} + 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 @@ -6975,12 +7461,45 @@ func awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response *smith Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.ResourceAlreadyExistsException{} - err := awsAwsjson11_deserializeDocumentResourceAlreadyExistsException(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateRecommenderOutput(&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_deserializeOpErrorUpdateRecommender(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6992,10 +7511,34 @@ func awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response *smith } errorBody.Seek(0, io.SeekStart) - return output + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ResourceInUseException", errorCode): + return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } } -func awsAwsjson11_deserializeErrorResourceInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidInputException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -7013,8 +7556,8 @@ func awsAwsjson11_deserializeErrorResourceInUseException(response *smithyhttp.Re return err } - output := &types.ResourceInUseException{} - err := awsAwsjson11_deserializeDocumentResourceInUseException(&output, shape) + output := &types.InvalidInputException{} + err := awsAwsjson11_deserializeDocumentInvalidInputException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -7030,7 +7573,7 @@ func awsAwsjson11_deserializeErrorResourceInUseException(response *smithyhttp.Re return output } -func awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorInvalidNextTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -7048,8 +7591,8 @@ func awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp return err } - output := &types.ResourceNotFoundException{} - err := awsAwsjson11_deserializeDocumentResourceNotFoundException(&output, shape) + output := &types.InvalidNextTokenException{} + err := awsAwsjson11_deserializeDocumentInvalidNextTokenException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -7065,7 +7608,7 @@ func awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp return output } -func awsAwsjson11_deserializeErrorTooManyTagKeysException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -7083,8 +7626,8 @@ func awsAwsjson11_deserializeErrorTooManyTagKeysException(response *smithyhttp.R return err } - output := &types.TooManyTagKeysException{} - err := awsAwsjson11_deserializeDocumentTooManyTagKeysException(&output, shape) + output := &types.LimitExceededException{} + err := awsAwsjson11_deserializeDocumentLimitExceededException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -7100,7 +7643,7 @@ func awsAwsjson11_deserializeErrorTooManyTagKeysException(response *smithyhttp.R return output } -func awsAwsjson11_deserializeErrorTooManyTagsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorResourceAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -7118,8 +7661,8 @@ func awsAwsjson11_deserializeErrorTooManyTagsException(response *smithyhttp.Resp return err } - output := &types.TooManyTagsException{} - err := awsAwsjson11_deserializeDocumentTooManyTagsException(&output, shape) + output := &types.ResourceAlreadyExistsException{} + err := awsAwsjson11_deserializeDocumentResourceAlreadyExistsException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -7135,57 +7678,197 @@ func awsAwsjson11_deserializeErrorTooManyTagsException(response *smithyhttp.Resp return output } -func awsAwsjson11_deserializeDocumentAlgorithm(v **types.Algorithm, 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) - } +func awsAwsjson11_deserializeErrorResourceInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) - var sv *types.Algorithm - if *v == nil { - sv = &types.Algorithm{} - } else { - sv = *v + 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 } - for key, value := range shape { - switch key { - case "algorithmArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.AlgorithmArn = ptr.String(jtv) - } + output := &types.ResourceInUseException{} + err := awsAwsjson11_deserializeDocumentResourceInUseException(&output, shape) - case "algorithmImage": - if err := awsAwsjson11_deserializeDocumentAlgorithmImage(&sv.AlgorithmImage, value); err != nil { - return err - } + 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 + } - case "creationDateTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreationDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + errorBody.Seek(0, io.SeekStart) + return output +} - default: - return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) +func awsAwsjson11_deserializeErrorResourceNotFoundException(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.ResourceNotFoundException{} + err := awsAwsjson11_deserializeDocumentResourceNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorTooManyTagKeysException(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.TooManyTagKeysException{} + err := awsAwsjson11_deserializeDocumentTooManyTagKeysException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorTooManyTagsException(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.TooManyTagsException{} + err := awsAwsjson11_deserializeDocumentTooManyTagsException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeDocumentAlgorithm(v **types.Algorithm, 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.Algorithm + if *v == nil { + sv = &types.Algorithm{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "algorithmArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.AlgorithmArn = ptr.String(jtv) + } + + case "algorithmImage": + if err := awsAwsjson11_deserializeDocumentAlgorithmImage(&sv.AlgorithmImage, value); err != nil { + return err + } + + case "creationDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } case "defaultHyperParameterRanges": if err := awsAwsjson11_deserializeDocumentDefaultHyperParameterRanges(&sv.DefaultHyperParameterRanges, value); err != nil { @@ -9645,6 +10328,15 @@ func awsAwsjson11_deserializeDocumentDatasetImportJob(v **types.DatasetImportJob } } + case "publishAttributionMetricsToS3": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.PublishAttributionMetricsToS3 = ptr.Bool(jtv) + } + case "roleArn": if value != nil { jtv, ok := value.(string) @@ -10566,11 +11258,419 @@ func awsAwsjson11_deserializeDocumentDefaultIntegerHyperParameterRanges(v *[]typ cv = append(cv, col) } - *v = cv + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentEventTracker(v **types.EventTracker, 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.EventTracker + if *v == nil { + sv = &types.EventTracker{} + } 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 "creationDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "datasetGroupArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.DatasetGroupArn = ptr.String(jtv) + } + + case "eventTrackerArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.EventTrackerArn = ptr.String(jtv) + } + + case "lastUpdatedDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Status to be of type string, got %T instead", value) + } + sv.Status = ptr.String(jtv) + } + + case "trackingId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TrackingId to be of type string, got %T instead", value) + } + sv.TrackingId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentEventTrackers(v *[]types.EventTrackerSummary, 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.EventTrackerSummary + if *v == nil { + cv = []types.EventTrackerSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EventTrackerSummary + destAddr := &col + if err := awsAwsjson11_deserializeDocumentEventTrackerSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentEventTrackerSummary(v **types.EventTrackerSummary, 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.EventTrackerSummary + if *v == nil { + sv = &types.EventTrackerSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "creationDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "eventTrackerArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.EventTrackerArn = ptr.String(jtv) + } + + case "lastUpdatedDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Status to be of type string, got %T instead", value) + } + sv.Status = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentFeatureTransformation(v **types.FeatureTransformation, 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.FeatureTransformation + if *v == nil { + sv = &types.FeatureTransformation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "creationDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "defaultParameters": + if err := awsAwsjson11_deserializeDocumentFeaturizationParameters(&sv.DefaultParameters, value); err != nil { + return err + } + + case "featureTransformationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.FeatureTransformationArn = ptr.String(jtv) + } + + case "lastUpdatedDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Status to be of type string, got %T instead", value) + } + sv.Status = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentFeatureTransformationParameters(v *map[string]string, 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]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParameterValue to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentFeaturizationParameters(v *map[string]string, 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]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ParameterValue to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv return nil } -func awsAwsjson11_deserializeDocumentEventTracker(v **types.EventTracker, value interface{}) error { +func awsAwsjson11_deserializeDocumentFilter(v **types.Filter, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10583,24 +11683,15 @@ func awsAwsjson11_deserializeDocumentEventTracker(v **types.EventTracker, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EventTracker + var sv *types.Filter if *v == nil { - sv = &types.EventTracker{} + sv = &types.Filter{} } 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 "creationDateTime": if value != nil { switch jtv := value.(type) { @@ -10626,13 +11717,31 @@ func awsAwsjson11_deserializeDocumentEventTracker(v **types.EventTracker, value sv.DatasetGroupArn = ptr.String(jtv) } - case "eventTrackerArn": + case "failureReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value) + } + sv.FailureReason = ptr.String(jtv) + } + + case "filterArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.EventTrackerArn = ptr.String(jtv) + sv.FilterArn = ptr.String(jtv) + } + + case "filterExpression": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FilterExpression to be of type string, got %T instead", value) + } + sv.FilterExpression = ptr.String(jtv) } case "lastUpdatedDateTime": @@ -10669,15 +11778,6 @@ func awsAwsjson11_deserializeDocumentEventTracker(v **types.EventTracker, value sv.Status = ptr.String(jtv) } - case "trackingId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TrackingId to be of type string, got %T instead", value) - } - sv.TrackingId = ptr.String(jtv) - } - default: _, _ = key, value @@ -10687,7 +11787,7 @@ func awsAwsjson11_deserializeDocumentEventTracker(v **types.EventTracker, value return nil } -func awsAwsjson11_deserializeDocumentEventTrackers(v *[]types.EventTrackerSummary, value interface{}) error { +func awsAwsjson11_deserializeDocumentFilters(v *[]types.FilterSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10700,17 +11800,17 @@ func awsAwsjson11_deserializeDocumentEventTrackers(v *[]types.EventTrackerSummar return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.EventTrackerSummary + var cv []types.FilterSummary if *v == nil { - cv = []types.EventTrackerSummary{} + cv = []types.FilterSummary{} } else { cv = *v } for _, value := range shape { - var col types.EventTrackerSummary + var col types.FilterSummary destAddr := &col - if err := awsAwsjson11_deserializeDocumentEventTrackerSummary(&destAddr, value); err != nil { + if err := awsAwsjson11_deserializeDocumentFilterSummary(&destAddr, value); err != nil { return err } col = *destAddr @@ -10721,7 +11821,7 @@ func awsAwsjson11_deserializeDocumentEventTrackers(v *[]types.EventTrackerSummar return nil } -func awsAwsjson11_deserializeDocumentEventTrackerSummary(v **types.EventTrackerSummary, value interface{}) error { +func awsAwsjson11_deserializeDocumentFilterSummary(v **types.FilterSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10734,9 +11834,9 @@ func awsAwsjson11_deserializeDocumentEventTrackerSummary(v **types.EventTrackerS return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EventTrackerSummary + var sv *types.FilterSummary if *v == nil { - sv = &types.EventTrackerSummary{} + sv = &types.FilterSummary{} } else { sv = *v } @@ -10759,13 +11859,31 @@ func awsAwsjson11_deserializeDocumentEventTrackerSummary(v **types.EventTrackerS } } - case "eventTrackerArn": + case "datasetGroupArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.EventTrackerArn = ptr.String(jtv) + sv.DatasetGroupArn = ptr.String(jtv) + } + + case "failureReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value) + } + sv.FailureReason = ptr.String(jtv) + } + + case "filterArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.FilterArn = ptr.String(jtv) } case "lastUpdatedDateTime": @@ -10811,7 +11929,7 @@ func awsAwsjson11_deserializeDocumentEventTrackerSummary(v **types.EventTrackerS return nil } -func awsAwsjson11_deserializeDocumentFeatureTransformation(v **types.FeatureTransformation, value interface{}) error { +func awsAwsjson11_deserializeDocumentHPOConfig(v **types.HPOConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10824,77 +11942,135 @@ func awsAwsjson11_deserializeDocumentFeatureTransformation(v **types.FeatureTran return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.FeatureTransformation + var sv *types.HPOConfig if *v == nil { - sv = &types.FeatureTransformation{} + sv = &types.HPOConfig{} } else { sv = *v } for key, value := range shape { switch key { - case "creationDateTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreationDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + case "algorithmHyperParameterRanges": + if err := awsAwsjson11_deserializeDocumentHyperParameterRanges(&sv.AlgorithmHyperParameterRanges, value); err != nil { + return err + } - } + case "hpoObjective": + if err := awsAwsjson11_deserializeDocumentHPOObjective(&sv.HpoObjective, value); err != nil { + return err } - case "defaultParameters": - if err := awsAwsjson11_deserializeDocumentFeaturizationParameters(&sv.DefaultParameters, value); err != nil { + case "hpoResourceConfig": + if err := awsAwsjson11_deserializeDocumentHPOResourceConfig(&sv.HpoResourceConfig, value); err != nil { return err } - case "featureTransformationArn": + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentHPOObjective(v **types.HPOObjective, 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.HPOObjective + if *v == nil { + sv = &types.HPOObjective{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "metricName": 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 MetricName to be of type string, got %T instead", value) } - sv.FeatureTransformationArn = ptr.String(jtv) + sv.MetricName = ptr.String(jtv) } - case "lastUpdatedDateTime": + case "metricRegex": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastUpdatedDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MetricRegex to be of type string, got %T instead", value) + } + sv.MetricRegex = ptr.String(jtv) + } + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected HPOObjectiveType to be of type string, got %T instead", value) } + sv.Type = ptr.String(jtv) } - case "name": + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentHPOResourceConfig(v **types.HPOResourceConfig, 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.HPOResourceConfig + if *v == nil { + sv = &types.HPOResourceConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "maxNumberOfTrainingJobs": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Name to be of type string, got %T instead", value) + return fmt.Errorf("expected HPOResource to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.MaxNumberOfTrainingJobs = ptr.String(jtv) } - case "status": + case "maxParallelTrainingJobs": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Status to be of type string, got %T instead", value) + return fmt.Errorf("expected HPOResource to be of type string, got %T instead", value) } - sv.Status = ptr.String(jtv) + sv.MaxParallelTrainingJobs = ptr.String(jtv) } default: @@ -10906,7 +12082,7 @@ func awsAwsjson11_deserializeDocumentFeatureTransformation(v **types.FeatureTran return nil } -func awsAwsjson11_deserializeDocumentFeatureTransformationParameters(v *map[string]string, value interface{}) error { +func awsAwsjson11_deserializeDocumentHyperParameterRanges(v **types.HyperParameterRanges, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10919,30 +12095,40 @@ func awsAwsjson11_deserializeDocumentFeatureTransformationParameters(v *map[stri return fmt.Errorf("unexpected JSON type %v", value) } - var mv map[string]string + var sv *types.HyperParameterRanges if *v == nil { - mv = map[string]string{} + sv = &types.HyperParameterRanges{} } else { - mv = *v + sv = *v } for key, value := range shape { - var parsedVal string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ParameterValue to be of type string, got %T instead", value) + switch key { + case "categoricalHyperParameterRanges": + if err := awsAwsjson11_deserializeDocumentCategoricalHyperParameterRanges(&sv.CategoricalHyperParameterRanges, value); err != nil { + return err } - parsedVal = jtv - } - mv[key] = parsedVal + case "continuousHyperParameterRanges": + if err := awsAwsjson11_deserializeDocumentContinuousHyperParameterRanges(&sv.ContinuousHyperParameterRanges, value); err != nil { + return err + } + + case "integerHyperParameterRanges": + if err := awsAwsjson11_deserializeDocumentIntegerHyperParameterRanges(&sv.IntegerHyperParameterRanges, value); err != nil { + return err + } + + default: + _, _ = key, value + + } } - *v = mv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentFeaturizationParameters(v *map[string]string, value interface{}) error { +func awsAwsjson11_deserializeDocumentHyperParameters(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10978,7 +12164,7 @@ func awsAwsjson11_deserializeDocumentFeaturizationParameters(v *map[string]strin return nil } -func awsAwsjson11_deserializeDocumentFilter(v **types.Filter, value interface{}) error { +func awsAwsjson11_deserializeDocumentIntegerHyperParameterRange(v **types.IntegerHyperParameterRange, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10991,101 +12177,50 @@ func awsAwsjson11_deserializeDocumentFilter(v **types.Filter, value interface{}) return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Filter + var sv *types.IntegerHyperParameterRange if *v == nil { - sv = &types.Filter{} + sv = &types.IntegerHyperParameterRange{} } else { sv = *v } for key, value := range shape { switch key { - case "creationDateTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreationDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) - - } - } - - case "datasetGroupArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.DatasetGroupArn = ptr.String(jtv) - } - - case "failureReason": + case "maxValue": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value) + return fmt.Errorf("expected IntegerMaxValue to be json.Number, got %T instead", value) } - sv.FailureReason = ptr.String(jtv) - } - - case "filterArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + i64, err := jtv.Int64() + if err != nil { + return err } - sv.FilterArn = ptr.String(jtv) + sv.MaxValue = int32(i64) } - case "filterExpression": + case "minValue": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected FilterExpression to be of type string, got %T instead", value) + return fmt.Errorf("expected IntegerMinValue to be json.Number, got %T instead", value) } - sv.FilterExpression = ptr.String(jtv) - } - - case "lastUpdatedDateTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastUpdatedDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) - + i64, err := jtv.Int64() + if err != nil { + return err } + sv.MinValue = int32(i64) } case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Name to be of type string, got %T instead", value) + return fmt.Errorf("expected ParameterName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } - case "status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Status to be of type string, got %T instead", value) - } - sv.Status = ptr.String(jtv) - } - default: _, _ = key, value @@ -11095,7 +12230,7 @@ func awsAwsjson11_deserializeDocumentFilter(v **types.Filter, value interface{}) return nil } -func awsAwsjson11_deserializeDocumentFilters(v *[]types.FilterSummary, value interface{}) error { +func awsAwsjson11_deserializeDocumentIntegerHyperParameterRanges(v *[]types.IntegerHyperParameterRange, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11108,17 +12243,17 @@ func awsAwsjson11_deserializeDocumentFilters(v *[]types.FilterSummary, value int return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.FilterSummary + var cv []types.IntegerHyperParameterRange if *v == nil { - cv = []types.FilterSummary{} + cv = []types.IntegerHyperParameterRange{} } else { cv = *v } for _, value := range shape { - var col types.FilterSummary + var col types.IntegerHyperParameterRange destAddr := &col - if err := awsAwsjson11_deserializeDocumentFilterSummary(&destAddr, value); err != nil { + if err := awsAwsjson11_deserializeDocumentIntegerHyperParameterRange(&destAddr, value); err != nil { return err } col = *destAddr @@ -11129,7 +12264,7 @@ func awsAwsjson11_deserializeDocumentFilters(v *[]types.FilterSummary, value int return nil } -func awsAwsjson11_deserializeDocumentFilterSummary(v **types.FilterSummary, value interface{}) error { +func awsAwsjson11_deserializeDocumentInvalidInputException(v **types.InvalidInputException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11142,136 +12277,22 @@ func awsAwsjson11_deserializeDocumentFilterSummary(v **types.FilterSummary, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.FilterSummary + var sv *types.InvalidInputException if *v == nil { - sv = &types.FilterSummary{} + sv = &types.InvalidInputException{} } else { sv = *v } for key, value := range shape { switch key { - case "creationDateTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreationDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) - - } - } - - case "datasetGroupArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.DatasetGroupArn = ptr.String(jtv) - } - - case "failureReason": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value) - } - sv.FailureReason = ptr.String(jtv) - } - - case "filterArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.FilterArn = ptr.String(jtv) - } - - case "lastUpdatedDateTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastUpdatedDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) - - } - } - - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Name to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "status": + case "message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Status to be of type string, got %T instead", value) + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } - sv.Status = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentHPOConfig(v **types.HPOConfig, 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.HPOConfig - if *v == nil { - sv = &types.HPOConfig{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "algorithmHyperParameterRanges": - if err := awsAwsjson11_deserializeDocumentHyperParameterRanges(&sv.AlgorithmHyperParameterRanges, value); err != nil { - return err - } - - case "hpoObjective": - if err := awsAwsjson11_deserializeDocumentHPOObjective(&sv.HpoObjective, value); err != nil { - return err - } - - case "hpoResourceConfig": - if err := awsAwsjson11_deserializeDocumentHPOResourceConfig(&sv.HpoResourceConfig, value); err != nil { - return err + sv.Message = ptr.String(jtv) } default: @@ -11283,7 +12304,7 @@ func awsAwsjson11_deserializeDocumentHPOConfig(v **types.HPOConfig, value interf return nil } -func awsAwsjson11_deserializeDocumentHPOObjective(v **types.HPOObjective, value interface{}) error { +func awsAwsjson11_deserializeDocumentInvalidNextTokenException(v **types.InvalidNextTokenException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11296,40 +12317,22 @@ func awsAwsjson11_deserializeDocumentHPOObjective(v **types.HPOObjective, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.HPOObjective + var sv *types.InvalidNextTokenException if *v == nil { - sv = &types.HPOObjective{} + sv = &types.InvalidNextTokenException{} } else { sv = *v } for key, value := range shape { switch key { - case "metricName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MetricName to be of type string, got %T instead", value) - } - sv.MetricName = ptr.String(jtv) - } - - case "metricRegex": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MetricRegex to be of type string, got %T instead", value) - } - sv.MetricRegex = ptr.String(jtv) - } - - case "type": + case "message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected HPOObjectiveType to be of type string, got %T instead", value) + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } - sv.Type = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -11341,7 +12344,7 @@ func awsAwsjson11_deserializeDocumentHPOObjective(v **types.HPOObjective, value return nil } -func awsAwsjson11_deserializeDocumentHPOResourceConfig(v **types.HPOResourceConfig, value interface{}) error { +func awsAwsjson11_deserializeDocumentLimitExceededException(v **types.LimitExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11354,31 +12357,22 @@ func awsAwsjson11_deserializeDocumentHPOResourceConfig(v **types.HPOResourceConf return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.HPOResourceConfig + var sv *types.LimitExceededException if *v == nil { - sv = &types.HPOResourceConfig{} + sv = &types.LimitExceededException{} } else { sv = *v } for key, value := range shape { switch key { - case "maxNumberOfTrainingJobs": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected HPOResource to be of type string, got %T instead", value) - } - sv.MaxNumberOfTrainingJobs = ptr.String(jtv) - } - - case "maxParallelTrainingJobs": + case "message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected HPOResource to be of type string, got %T instead", value) + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } - sv.MaxParallelTrainingJobs = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -11390,7 +12384,7 @@ func awsAwsjson11_deserializeDocumentHPOResourceConfig(v **types.HPOResourceConf return nil } -func awsAwsjson11_deserializeDocumentHyperParameterRanges(v **types.HyperParameterRanges, value interface{}) error { +func awsAwsjson11_deserializeDocumentMetricAttribute(v **types.MetricAttribute, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11403,28 +12397,40 @@ func awsAwsjson11_deserializeDocumentHyperParameterRanges(v **types.HyperParamet return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.HyperParameterRanges + var sv *types.MetricAttribute if *v == nil { - sv = &types.HyperParameterRanges{} + sv = &types.MetricAttribute{} } else { sv = *v } for key, value := range shape { switch key { - case "categoricalHyperParameterRanges": - if err := awsAwsjson11_deserializeDocumentCategoricalHyperParameterRanges(&sv.CategoricalHyperParameterRanges, value); err != nil { - return err + case "eventType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventType to be of type string, got %T instead", value) + } + sv.EventType = ptr.String(jtv) } - case "continuousHyperParameterRanges": - if err := awsAwsjson11_deserializeDocumentContinuousHyperParameterRanges(&sv.ContinuousHyperParameterRanges, value); err != nil { - return err + case "expression": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MetricExpression to be of type string, got %T instead", value) + } + sv.Expression = ptr.String(jtv) } - case "integerHyperParameterRanges": - if err := awsAwsjson11_deserializeDocumentIntegerHyperParameterRanges(&sv.IntegerHyperParameterRanges, value); err != nil { - return err + case "metricName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MetricName to be of type string, got %T instead", value) + } + sv.MetricName = ptr.String(jtv) } default: @@ -11436,7 +12442,7 @@ func awsAwsjson11_deserializeDocumentHyperParameterRanges(v **types.HyperParamet return nil } -func awsAwsjson11_deserializeDocumentHyperParameters(v *map[string]string, value interface{}) error { +func awsAwsjson11_deserializeDocumentMetricAttributes(v *[]types.MetricAttribute, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11444,35 +12450,33 @@ func awsAwsjson11_deserializeDocumentHyperParameters(v *map[string]string, value return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var mv map[string]string + var cv []types.MetricAttribute if *v == nil { - mv = map[string]string{} + cv = []types.MetricAttribute{} } else { - mv = *v + cv = *v } - for key, value := range shape { - var parsedVal string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ParameterValue to be of type string, got %T instead", value) - } - parsedVal = jtv + for _, value := range shape { + var col types.MetricAttribute + destAddr := &col + if err := awsAwsjson11_deserializeDocumentMetricAttribute(&destAddr, value); err != nil { + return err } - mv[key] = parsedVal + col = *destAddr + cv = append(cv, col) } - *v = mv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentIntegerHyperParameterRange(v **types.IntegerHyperParameterRange, value interface{}) error { +func awsAwsjson11_deserializeDocumentMetricAttribution(v **types.MetricAttribution, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11485,50 +12489,97 @@ func awsAwsjson11_deserializeDocumentIntegerHyperParameterRange(v **types.Intege return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.IntegerHyperParameterRange + var sv *types.MetricAttribution if *v == nil { - sv = &types.IntegerHyperParameterRange{} + sv = &types.MetricAttribution{} } else { sv = *v } for key, value := range shape { switch key { - case "maxValue": + case "creationDateTime": if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected IntegerMaxValue to be json.Number, got %T instead", value) + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + } - i64, err := jtv.Int64() - if err != nil { - return err + } + + case "datasetGroupArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.MaxValue = int32(i64) + sv.DatasetGroupArn = ptr.String(jtv) } - case "minValue": + case "failureReason": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected IntegerMinValue to be json.Number, got %T instead", value) + return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value) } - i64, err := jtv.Int64() - if err != nil { - return err + sv.FailureReason = ptr.String(jtv) + } + + case "lastUpdatedDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + } - sv.MinValue = int32(i64) + } + + case "metricAttributionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.MetricAttributionArn = ptr.String(jtv) + } + + case "metricsOutputConfig": + if err := awsAwsjson11_deserializeDocumentMetricAttributionOutput(&sv.MetricsOutputConfig, value); err != nil { + return err } case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ParameterName to be of type string, got %T instead", value) + return fmt.Errorf("expected Name to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Status to be of type string, got %T instead", value) + } + sv.Status = ptr.String(jtv) + } + default: _, _ = key, value @@ -11538,7 +12589,7 @@ func awsAwsjson11_deserializeDocumentIntegerHyperParameterRange(v **types.Intege return nil } -func awsAwsjson11_deserializeDocumentIntegerHyperParameterRanges(v *[]types.IntegerHyperParameterRange, value interface{}) error { +func awsAwsjson11_deserializeDocumentMetricAttributionOutput(v **types.MetricAttributionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11546,33 +12597,44 @@ func awsAwsjson11_deserializeDocumentIntegerHyperParameterRanges(v *[]types.Inte return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.IntegerHyperParameterRange + var sv *types.MetricAttributionOutput if *v == nil { - cv = []types.IntegerHyperParameterRange{} + sv = &types.MetricAttributionOutput{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.IntegerHyperParameterRange - destAddr := &col - if err := awsAwsjson11_deserializeDocumentIntegerHyperParameterRange(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + 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) + } + case "s3DataDestination": + if err := awsAwsjson11_deserializeDocumentS3DataConfig(&sv.S3DataDestination, value); err != nil { + return err + } + + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentInvalidInputException(v **types.InvalidInputException, value interface{}) error { +func awsAwsjson11_deserializeDocumentMetricAttributions(v *[]types.MetricAttributionSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11580,39 +12642,33 @@ func awsAwsjson11_deserializeDocumentInvalidInputException(v **types.InvalidInpu return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidInputException + var cv []types.MetricAttributionSummary if *v == nil { - sv = &types.InvalidInputException{} + cv = []types.MetricAttributionSummary{} } else { - sv = *v + cv = *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 - + for _, value := range shape { + var col types.MetricAttributionSummary + destAddr := &col + if err := awsAwsjson11_deserializeDocumentMetricAttributionSummary(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson11_deserializeDocumentInvalidNextTokenException(v **types.InvalidNextTokenException, value interface{}) error { +func awsAwsjson11_deserializeDocumentMetricAttributionSummary(v **types.MetricAttributionSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11625,62 +12681,81 @@ func awsAwsjson11_deserializeDocumentInvalidNextTokenException(v **types.Invalid return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InvalidNextTokenException + var sv *types.MetricAttributionSummary if *v == nil { - sv = &types.InvalidNextTokenException{} + sv = &types.MetricAttributionSummary{} } else { sv = *v } - for key, value := range shape { - switch key { - case "message": + for key, value := range shape { + switch key { + case "creationDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "failureReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FailureReason to be of type string, got %T instead", value) + } + sv.FailureReason = ptr.String(jtv) + } + + case "lastUpdatedDateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedDateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Date to be a JSON Number, got %T instead", value) + + } + } + + case "metricAttributionArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.MetricAttributionArn = ptr.String(jtv) } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentLimitExceededException(v **types.LimitExceededException, 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.LimitExceededException - if *v == nil { - sv = &types.LimitExceededException{} - } else { - sv = *v - } + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } - for key, value := range shape { - switch key { - case "message": + case "status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected Status to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.Status = ptr.String(jtv) } default: @@ -13026,6 +14101,15 @@ func awsAwsjson11_deserializeDocumentSolutionSummary(v **types.SolutionSummary, sv.Name = ptr.String(jtv) } + case "recipeArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.RecipeArn = ptr.String(jtv) + } + case "solutionArn": if value != nil { jtv, ok := value.(string) @@ -13134,6 +14218,15 @@ func awsAwsjson11_deserializeDocumentSolutionVersion(v **types.SolutionVersion, } } + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + case "performAutoML": if value != nil { jtv, ok := value.(bool) @@ -13951,6 +15044,46 @@ func awsAwsjson11_deserializeOpDocumentCreateFilterOutput(v **CreateFilterOutput return nil } +func awsAwsjson11_deserializeOpDocumentCreateMetricAttributionOutput(v **CreateMetricAttributionOutput, 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 *CreateMetricAttributionOutput + if *v == nil { + sv = &CreateMetricAttributionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "metricAttributionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.MetricAttributionArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentCreateRecommenderOutput(v **CreateRecommenderOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -14507,6 +15640,42 @@ func awsAwsjson11_deserializeOpDocumentDescribeFilterOutput(v **DescribeFilterOu return nil } +func awsAwsjson11_deserializeOpDocumentDescribeMetricAttributionOutput(v **DescribeMetricAttributionOutput, 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 *DescribeMetricAttributionOutput + if *v == nil { + sv = &DescribeMetricAttributionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "metricAttribution": + if err := awsAwsjson11_deserializeDocumentMetricAttribution(&sv.MetricAttribution, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentDescribeRecipeOutput(v **DescribeRecipeOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -15137,6 +16306,96 @@ func awsAwsjson11_deserializeOpDocumentListFiltersOutput(v **ListFiltersOutput, return nil } +func awsAwsjson11_deserializeOpDocumentListMetricAttributionMetricsOutput(v **ListMetricAttributionMetricsOutput, 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 *ListMetricAttributionMetricsOutput + if *v == nil { + sv = &ListMetricAttributionMetricsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "metrics": + if err := awsAwsjson11_deserializeDocumentMetricAttributes(&sv.Metrics, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListMetricAttributionsOutput(v **ListMetricAttributionsOutput, 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 *ListMetricAttributionsOutput + if *v == nil { + sv = &ListMetricAttributionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "metricAttributions": + if err := awsAwsjson11_deserializeDocumentMetricAttributions(&sv.MetricAttributions, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentListRecipesOutput(v **ListRecipesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -15580,6 +16839,46 @@ func awsAwsjson11_deserializeOpDocumentUpdateCampaignOutput(v **UpdateCampaignOu return nil } +func awsAwsjson11_deserializeOpDocumentUpdateMetricAttributionOutput(v **UpdateMetricAttributionOutput, 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 *UpdateMetricAttributionOutput + if *v == nil { + sv = &UpdateMetricAttributionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "metricAttributionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.MetricAttributionArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentUpdateRecommenderOutput(v **UpdateRecommenderOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/personalize/generated.json b/service/personalize/generated.json index 38952a34dc6..d20919cf9a7 100644 --- a/service/personalize/generated.json +++ b/service/personalize/generated.json @@ -17,6 +17,7 @@ "api_op_CreateDatasetImportJob.go", "api_op_CreateEventTracker.go", "api_op_CreateFilter.go", + "api_op_CreateMetricAttribution.go", "api_op_CreateRecommender.go", "api_op_CreateSchema.go", "api_op_CreateSolution.go", @@ -26,6 +27,7 @@ "api_op_DeleteDatasetGroup.go", "api_op_DeleteEventTracker.go", "api_op_DeleteFilter.go", + "api_op_DeleteMetricAttribution.go", "api_op_DeleteRecommender.go", "api_op_DeleteSchema.go", "api_op_DeleteSolution.go", @@ -40,6 +42,7 @@ "api_op_DescribeEventTracker.go", "api_op_DescribeFeatureTransformation.go", "api_op_DescribeFilter.go", + "api_op_DescribeMetricAttribution.go", "api_op_DescribeRecipe.go", "api_op_DescribeRecommender.go", "api_op_DescribeSchema.go", @@ -55,6 +58,8 @@ "api_op_ListDatasets.go", "api_op_ListEventTrackers.go", "api_op_ListFilters.go", + "api_op_ListMetricAttributionMetrics.go", + "api_op_ListMetricAttributions.go", "api_op_ListRecipes.go", "api_op_ListRecommenders.go", "api_op_ListSchemas.go", @@ -67,6 +72,7 @@ "api_op_TagResource.go", "api_op_UntagResource.go", "api_op_UpdateCampaign.go", + "api_op_UpdateMetricAttribution.go", "api_op_UpdateRecommender.go", "deserializers.go", "doc.go", diff --git a/service/personalize/serializers.go b/service/personalize/serializers.go index 7d54604c4f7..11d5a675527 100644 --- a/service/personalize/serializers.go +++ b/service/personalize/serializers.go @@ -511,6 +511,61 @@ func (m *awsAwsjson11_serializeOpCreateFilter) HandleSerialize(ctx context.Conte return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpCreateMetricAttribution struct { +} + +func (*awsAwsjson11_serializeOpCreateMetricAttribution) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateMetricAttribution) 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.(*CreateMetricAttributionInput) + _ = 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("AmazonPersonalize.CreateMetricAttribution") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateMetricAttributionInput(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_serializeOpCreateRecommender struct { } @@ -1006,6 +1061,61 @@ func (m *awsAwsjson11_serializeOpDeleteFilter) HandleSerialize(ctx context.Conte return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDeleteMetricAttribution struct { +} + +func (*awsAwsjson11_serializeOpDeleteMetricAttribution) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteMetricAttribution) 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.(*DeleteMetricAttributionInput) + _ = 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("AmazonPersonalize.DeleteMetricAttribution") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteMetricAttributionInput(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_serializeOpDeleteRecommender struct { } @@ -1776,6 +1886,61 @@ func (m *awsAwsjson11_serializeOpDescribeFilter) HandleSerialize(ctx context.Con return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDescribeMetricAttribution struct { +} + +func (*awsAwsjson11_serializeOpDescribeMetricAttribution) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDescribeMetricAttribution) 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.(*DescribeMetricAttributionInput) + _ = 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("AmazonPersonalize.DescribeMetricAttribution") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDescribeMetricAttributionInput(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_serializeOpDescribeRecipe struct { } @@ -2601,6 +2766,116 @@ func (m *awsAwsjson11_serializeOpListFilters) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpListMetricAttributionMetrics struct { +} + +func (*awsAwsjson11_serializeOpListMetricAttributionMetrics) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListMetricAttributionMetrics) 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.(*ListMetricAttributionMetricsInput) + _ = 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("AmazonPersonalize.ListMetricAttributionMetrics") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListMetricAttributionMetricsInput(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_serializeOpListMetricAttributions struct { +} + +func (*awsAwsjson11_serializeOpListMetricAttributions) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListMetricAttributions) 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.(*ListMetricAttributionsInput) + _ = 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("AmazonPersonalize.ListMetricAttributions") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListMetricAttributionsInput(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_serializeOpListRecipes struct { } @@ -3261,6 +3536,61 @@ func (m *awsAwsjson11_serializeOpUpdateCampaign) HandleSerialize(ctx context.Con return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpUpdateMetricAttribution struct { +} + +func (*awsAwsjson11_serializeOpUpdateMetricAttribution) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateMetricAttribution) 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.(*UpdateMetricAttributionInput) + _ = 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("AmazonPersonalize.UpdateMetricAttribution") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateMetricAttributionInput(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_serializeOpUpdateRecommender struct { } @@ -3711,6 +4041,71 @@ func awsAwsjson11_serializeDocumentIntegerHyperParameterRanges(v []types.Integer return nil } +func awsAwsjson11_serializeDocumentMetricAttribute(v *types.MetricAttribute, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EventType != nil { + ok := object.Key("eventType") + ok.String(*v.EventType) + } + + if v.Expression != nil { + ok := object.Key("expression") + ok.String(*v.Expression) + } + + if v.MetricName != nil { + ok := object.Key("metricName") + ok.String(*v.MetricName) + } + + return nil +} + +func awsAwsjson11_serializeDocumentMetricAttributes(v []types.MetricAttribute, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentMetricAttribute(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentMetricAttributesNamesList(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 awsAwsjson11_serializeDocumentMetricAttributionOutput(v *types.MetricAttributionOutput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RoleArn != nil { + ok := object.Key("roleArn") + ok.String(*v.RoleArn) + } + + if v.S3DataDestination != nil { + ok := object.Key("s3DataDestination") + if err := awsAwsjson11_serializeDocumentS3DataConfig(v.S3DataDestination, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeDocumentOptimizationObjective(v *types.OptimizationObjective, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4102,6 +4497,11 @@ func awsAwsjson11_serializeOpDocumentCreateDatasetImportJobInput(v *CreateDatase ok.String(*v.JobName) } + if v.PublishAttributionMetricsToS3 != nil { + ok := object.Key("publishAttributionMetricsToS3") + ok.Boolean(*v.PublishAttributionMetricsToS3) + } + if v.RoleArn != nil { ok := object.Key("roleArn") ok.String(*v.RoleArn) @@ -4204,6 +4604,37 @@ func awsAwsjson11_serializeOpDocumentCreateFilterInput(v *CreateFilterInput, val return nil } +func awsAwsjson11_serializeOpDocumentCreateMetricAttributionInput(v *CreateMetricAttributionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DatasetGroupArn != nil { + ok := object.Key("datasetGroupArn") + ok.String(*v.DatasetGroupArn) + } + + if v.Metrics != nil { + ok := object.Key("metrics") + if err := awsAwsjson11_serializeDocumentMetricAttributes(v.Metrics, ok); err != nil { + return err + } + } + + if v.MetricsOutputConfig != nil { + ok := object.Key("metricsOutputConfig") + if err := awsAwsjson11_serializeDocumentMetricAttributionOutput(v.MetricsOutputConfig, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentCreateRecommenderInput(v *CreateRecommenderInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4317,6 +4748,11 @@ func awsAwsjson11_serializeOpDocumentCreateSolutionVersionInput(v *CreateSolutio object := value.Object() defer object.Close() + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + if v.SolutionArn != nil { ok := object.Key("solutionArn") ok.String(*v.SolutionArn) @@ -4397,6 +4833,18 @@ func awsAwsjson11_serializeOpDocumentDeleteFilterInput(v *DeleteFilterInput, val return nil } +func awsAwsjson11_serializeOpDocumentDeleteMetricAttributionInput(v *DeleteMetricAttributionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MetricAttributionArn != nil { + ok := object.Key("metricAttributionArn") + ok.String(*v.MetricAttributionArn) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDeleteRecommenderInput(v *DeleteRecommenderInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4565,6 +5013,18 @@ func awsAwsjson11_serializeOpDocumentDescribeFilterInput(v *DescribeFilterInput, return nil } +func awsAwsjson11_serializeOpDocumentDescribeMetricAttributionInput(v *DescribeMetricAttributionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MetricAttributionArn != nil { + ok := object.Key("metricAttributionArn") + ok.String(*v.MetricAttributionArn) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDescribeRecipeInput(v *DescribeRecipeInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4830,6 +5290,50 @@ func awsAwsjson11_serializeOpDocumentListFiltersInput(v *ListFiltersInput, value return nil } +func awsAwsjson11_serializeOpDocumentListMetricAttributionMetricsInput(v *ListMetricAttributionMetricsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.MetricAttributionArn != nil { + ok := object.Key("metricAttributionArn") + ok.String(*v.MetricAttributionArn) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListMetricAttributionsInput(v *ListMetricAttributionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DatasetGroupArn != nil { + ok := object.Key("datasetGroupArn") + ok.String(*v.DatasetGroupArn) + } + + 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 +} + func awsAwsjson11_serializeOpDocumentListRecipesInput(v *ListRecipesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5055,6 +5559,39 @@ func awsAwsjson11_serializeOpDocumentUpdateCampaignInput(v *UpdateCampaignInput, return nil } +func awsAwsjson11_serializeOpDocumentUpdateMetricAttributionInput(v *UpdateMetricAttributionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AddMetrics != nil { + ok := object.Key("addMetrics") + if err := awsAwsjson11_serializeDocumentMetricAttributes(v.AddMetrics, ok); err != nil { + return err + } + } + + if v.MetricAttributionArn != nil { + ok := object.Key("metricAttributionArn") + ok.String(*v.MetricAttributionArn) + } + + if v.MetricsOutputConfig != nil { + ok := object.Key("metricsOutputConfig") + if err := awsAwsjson11_serializeDocumentMetricAttributionOutput(v.MetricsOutputConfig, ok); err != nil { + return err + } + } + + if v.RemoveMetrics != nil { + ok := object.Key("removeMetrics") + if err := awsAwsjson11_serializeDocumentMetricAttributesNamesList(v.RemoveMetrics, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeOpDocumentUpdateRecommenderInput(v *UpdateRecommenderInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/personalize/types/types.go b/service/personalize/types/types.go index 499afd48fd0..cef84e51a00 100644 --- a/service/personalize/types/types.go +++ b/service/personalize/types/types.go @@ -756,6 +756,9 @@ type DatasetImportJob struct { // The date and time (in Unix time) the dataset was last updated. LastUpdatedDateTime *time.Time + // Whether the job publishes metrics to Amazon S3 for a metric attribution. + PublishAttributionMetricsToS3 *bool + // The ARN of the IAM role that has permissions to read from the Amazon S3 data // source. RoleArn *string @@ -1217,6 +1220,109 @@ type IntegerHyperParameterRange struct { noSmithyDocumentSerde } +// Contains information on a metric that a metric attribution reports on. For more +// information, see Measuring impact of recommendations +// (https://docs.aws.amazon.com/personalize/latest/dg/measuring-recommendation-impact.html). +type MetricAttribute struct { + + // The metric's event type. + // + // This member is required. + EventType *string + + // The attribute's expression. Available functions are SUM() or SAMPLECOUNT(). For + // SUM() functions, provide the dataset type (either Interactions or Items) and + // column to sum as a parameter. For example SUM(Items.PRICE). + // + // This member is required. + Expression *string + + // The metric's name. The name helps you identify the metric in Amazon CloudWatch + // or Amazon S3. + // + // This member is required. + MetricName *string + + noSmithyDocumentSerde +} + +// Contains information on a metric attribution. A metric attribution creates +// reports on the data that you import into Amazon Personalize. Depending on how +// you import the data, you can view reports in Amazon CloudWatch or Amazon S3. For +// more information, see Measuring impact of recommendations +// (https://docs.aws.amazon.com/personalize/latest/dg/measuring-recommendation-impact.html). +type MetricAttribution struct { + + // The metric attribution's creation date time. + CreationDateTime *time.Time + + // The metric attribution's dataset group Amazon Resource Name (ARN). + DatasetGroupArn *string + + // The metric attribution's failure reason. + FailureReason *string + + // The metric attribution's last updated date time. + LastUpdatedDateTime *time.Time + + // The metric attribution's Amazon Resource Name (ARN). + MetricAttributionArn *string + + // The metric attribution's output configuration. + MetricsOutputConfig *MetricAttributionOutput + + // The metric attribution's name. + Name *string + + // The metric attribution's status. + Status *string + + noSmithyDocumentSerde +} + +// The output configuration details for a metric attribution. +type MetricAttributionOutput struct { + + // The Amazon Resource Name (ARN) of the IAM service role that has permissions to + // add data to your output Amazon S3 bucket and add metrics to Amazon CloudWatch. + // For more information, see Measuring impact of recommendations + // (https://docs.aws.amazon.com/personalize/latest/dg/measuring-recommendation-impact.html). + // + // This member is required. + RoleArn *string + + // The configuration details of an Amazon S3 input or output bucket. + S3DataDestination *S3DataConfig + + noSmithyDocumentSerde +} + +// Provides a summary of the properties of a metric attribution. For a complete +// listing, call the DescribeMetricAttribution +// (https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeMetricAttribution.html). +type MetricAttributionSummary struct { + + // The metric attribution's creation date time. + CreationDateTime *time.Time + + // The metric attribution's failure reason. + FailureReason *string + + // The metric attribution's last updated date time. + LastUpdatedDateTime *time.Time + + // The metric attribution's Amazon Resource Name (ARN). + MetricAttributionArn *string + + // The name of the metric attribution. + Name *string + + // The metric attribution's status. + Status *string + + noSmithyDocumentSerde +} + // Describes the additional objective for the solution, such as maximizing // streaming minutes or increasing revenue. For more information see Optimizing a // solution @@ -1571,6 +1677,9 @@ type SolutionSummary struct { // The name of the solution. Name *string + // The Amazon Resource Name (ARN) of the recipe used by the solution. + RecipeArn *string + // The Amazon Resource Name (ARN) of the solution. SolutionArn *string @@ -1607,6 +1716,9 @@ type SolutionVersion struct { // The date and time (in Unix time) that the solution was last updated. LastUpdatedDateTime *time.Time + // The name of the solution version. + Name *string + // When true, Amazon Personalize searches for the most optimal recipe according to // the solution configuration. When false (the default), Amazon Personalize uses // recipeArn. diff --git a/service/personalize/validators.go b/service/personalize/validators.go index 25ad18f07d3..75fec3e8a08 100644 --- a/service/personalize/validators.go +++ b/service/personalize/validators.go @@ -190,6 +190,26 @@ func (m *validateOpCreateFilter) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpCreateMetricAttribution struct { +} + +func (*validateOpCreateMetricAttribution) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateMetricAttribution) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateMetricAttributionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateMetricAttributionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateRecommender struct { } @@ -370,6 +390,26 @@ func (m *validateOpDeleteFilter) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpDeleteMetricAttribution struct { +} + +func (*validateOpDeleteMetricAttribution) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteMetricAttribution) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteMetricAttributionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteMetricAttributionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteRecommender struct { } @@ -650,6 +690,26 @@ func (m *validateOpDescribeFilter) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } +type validateOpDescribeMetricAttribution struct { +} + +func (*validateOpDescribeMetricAttribution) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeMetricAttribution) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeMetricAttributionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeMetricAttributionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeRecipe struct { } @@ -910,6 +970,26 @@ func (m *validateOpUpdateCampaign) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } +type validateOpUpdateMetricAttribution struct { +} + +func (*validateOpUpdateMetricAttribution) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateMetricAttribution) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateMetricAttributionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateMetricAttributionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateRecommender struct { } @@ -966,6 +1046,10 @@ func addOpCreateFilterValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateFilter{}, middleware.After) } +func addOpCreateMetricAttributionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateMetricAttribution{}, middleware.After) +} + func addOpCreateRecommenderValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateRecommender{}, middleware.After) } @@ -1002,6 +1086,10 @@ func addOpDeleteFilterValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteFilter{}, middleware.After) } +func addOpDeleteMetricAttributionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteMetricAttribution{}, middleware.After) +} + func addOpDeleteRecommenderValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteRecommender{}, middleware.After) } @@ -1058,6 +1146,10 @@ func addOpDescribeFilterValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeFilter{}, middleware.After) } +func addOpDescribeMetricAttributionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeMetricAttribution{}, middleware.After) +} + func addOpDescribeRecipeValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeRecipe{}, middleware.After) } @@ -1110,6 +1202,10 @@ func addOpUpdateCampaignValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateCampaign{}, middleware.After) } +func addOpUpdateMetricAttributionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateMetricAttribution{}, middleware.After) +} + func addOpUpdateRecommenderValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateRecommender{}, middleware.After) } @@ -1209,6 +1305,64 @@ func validateDatasetExportJobOutput(v *types.DatasetExportJobOutput) error { } } +func validateMetricAttribute(v *types.MetricAttribute) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MetricAttribute"} + if v.EventType == nil { + invalidParams.Add(smithy.NewErrParamRequired("EventType")) + } + if v.MetricName == nil { + invalidParams.Add(smithy.NewErrParamRequired("MetricName")) + } + if v.Expression == nil { + invalidParams.Add(smithy.NewErrParamRequired("Expression")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMetricAttributes(v []types.MetricAttribute) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MetricAttributes"} + for i := range v { + if err := validateMetricAttribute(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMetricAttributionOutput(v *types.MetricAttributionOutput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MetricAttributionOutput"} + if v.S3DataDestination != nil { + if err := validateS3DataConfig(v.S3DataDestination); err != nil { + invalidParams.AddNested("S3DataDestination", err.(smithy.InvalidParamsError)) + } + } + if v.RoleArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateS3DataConfig(v *types.S3DataConfig) error { if v == nil { return nil @@ -1522,6 +1676,38 @@ func validateOpCreateFilterInput(v *CreateFilterInput) error { } } +func validateOpCreateMetricAttributionInput(v *CreateMetricAttributionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateMetricAttributionInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.DatasetGroupArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("DatasetGroupArn")) + } + if v.Metrics == nil { + invalidParams.Add(smithy.NewErrParamRequired("Metrics")) + } else if v.Metrics != nil { + if err := validateMetricAttributes(v.Metrics); err != nil { + invalidParams.AddNested("Metrics", err.(smithy.InvalidParamsError)) + } + } + if v.MetricsOutputConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("MetricsOutputConfig")) + } else if v.MetricsOutputConfig != nil { + if err := validateMetricAttributionOutput(v.MetricsOutputConfig); err != nil { + invalidParams.AddNested("MetricsOutputConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateRecommenderInput(v *CreateRecommenderInput) error { if v == nil { return nil @@ -1684,6 +1870,21 @@ func validateOpDeleteFilterInput(v *DeleteFilterInput) error { } } +func validateOpDeleteMetricAttributionInput(v *DeleteMetricAttributionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteMetricAttributionInput"} + if v.MetricAttributionArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("MetricAttributionArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteRecommenderInput(v *DeleteRecommenderInput) error { if v == nil { return nil @@ -1894,6 +2095,21 @@ func validateOpDescribeFilterInput(v *DescribeFilterInput) error { } } +func validateOpDescribeMetricAttributionInput(v *DescribeMetricAttributionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeMetricAttributionInput"} + if v.MetricAttributionArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("MetricAttributionArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeRecipeInput(v *DescribeRecipeInput) error { if v == nil { return nil @@ -2099,6 +2315,28 @@ func validateOpUpdateCampaignInput(v *UpdateCampaignInput) error { } } +func validateOpUpdateMetricAttributionInput(v *UpdateMetricAttributionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateMetricAttributionInput"} + if v.AddMetrics != nil { + if err := validateMetricAttributes(v.AddMetrics); err != nil { + invalidParams.AddNested("AddMetrics", err.(smithy.InvalidParamsError)) + } + } + if v.MetricsOutputConfig != nil { + if err := validateMetricAttributionOutput(v.MetricsOutputConfig); err != nil { + invalidParams.AddNested("MetricsOutputConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateRecommenderInput(v *UpdateRecommenderInput) error { if v == nil { return nil diff --git a/service/polly/types/enums.go b/service/polly/types/enums.go index 89b859f7d4a..f6a0c80a405 100644 --- a/service/polly/types/enums.go +++ b/service/polly/types/enums.go @@ -76,6 +76,7 @@ const ( LanguageCodeCaEs LanguageCode = "ca-ES" LanguageCodeDeAt LanguageCode = "de-AT" LanguageCodeYueCn LanguageCode = "yue-CN" + LanguageCodeArAe LanguageCode = "ar-AE" ) // Values returns all known values for LanguageCode. Note that this can be expanded @@ -117,6 +118,7 @@ func (LanguageCode) Values() []LanguageCode { "ca-ES", "de-AT", "yue-CN", + "ar-AE", } } @@ -285,6 +287,8 @@ const ( VoiceIdElin VoiceId = "Elin" VoiceIdIda VoiceId = "Ida" VoiceIdSuvi VoiceId = "Suvi" + VoiceIdOla VoiceId = "Ola" + VoiceIdHala VoiceId = "Hala" ) // Values returns all known values for VoiceId. Note that this can be expanded in @@ -369,5 +373,7 @@ func (VoiceId) Values() []VoiceId { "Elin", "Ida", "Suvi", + "Ola", + "Hala", } } diff --git a/service/rum/api_op_CreateAppMonitor.go b/service/rum/api_op_CreateAppMonitor.go index 27b92e72b36..f7e4ec15f72 100644 --- a/service/rum/api_op_CreateAppMonitor.go +++ b/service/rum/api_op_CreateAppMonitor.go @@ -60,6 +60,12 @@ type CreateAppMonitorInput struct { // user sessions. AppMonitorConfiguration *types.AppMonitorConfiguration + // Specifies whether this app monitor allows the web client to define and send + // custom events. If you omit this parameter, custom events are DISABLED. For more + // information about custom events, see Send custom events + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-custom-events.html). + CustomEvents *types.CustomEvents + // Data collected by RUM is kept by RUM for 30 days and then deleted. This // parameter specifies whether RUM sends a copy of this telemetry data to Amazon // CloudWatch Logs in your account. This enables you to keep the telemetry data for diff --git a/service/rum/api_op_UpdateAppMonitor.go b/service/rum/api_op_UpdateAppMonitor.go index 75008aae633..f48bb9a5da6 100644 --- a/service/rum/api_op_UpdateAppMonitor.go +++ b/service/rum/api_op_UpdateAppMonitor.go @@ -54,6 +54,12 @@ type UpdateAppMonitorInput struct { // (https://docs.aws.amazon.com/monitoring/CloudWatch-RUM-get-started-authorization.html). AppMonitorConfiguration *types.AppMonitorConfiguration + // Specifies whether this app monitor allows the web client to define and send + // custom events. The default is for custom events to be DISABLED. For more + // information about custom events, see Send custom events + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-custom-events.html). + CustomEvents *types.CustomEvents + // Data collected by RUM is kept by RUM for 30 days and then deleted. This // parameter specifies whether RUM sends a copy of this telemetry data to Amazon // CloudWatch Logs in your account. This enables you to keep the telemetry data for diff --git a/service/rum/deserializers.go b/service/rum/deserializers.go index 785e96b8796..8c85c2ca7ca 100644 --- a/service/rum/deserializers.go +++ b/service/rum/deserializers.go @@ -2644,6 +2644,11 @@ func awsRestjson1_deserializeDocumentAppMonitor(v **types.AppMonitor, value inte sv.Created = ptr.String(jtv) } + case "CustomEvents": + if err := awsRestjson1_deserializeDocumentCustomEvents(&sv.CustomEvents, value); err != nil { + return err + } + case "DataStorage": if err := awsRestjson1_deserializeDocumentDataStorage(&sv.DataStorage, value); err != nil { return err @@ -3177,6 +3182,46 @@ func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictExcepti return nil } +func awsRestjson1_deserializeDocumentCustomEvents(v **types.CustomEvents, 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.CustomEvents + if *v == nil { + sv = &types.CustomEvents{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CustomEventsStatus to be of type string, got %T instead", value) + } + sv.Status = types.CustomEventsStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentCwLog(v **types.CwLog, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/rum/serializers.go b/service/rum/serializers.go index 68a486fe14a..0ff1c12a6b7 100644 --- a/service/rum/serializers.go +++ b/service/rum/serializers.go @@ -322,6 +322,13 @@ func awsRestjson1_serializeOpDocumentCreateAppMonitorInput(v *CreateAppMonitorIn } } + if v.CustomEvents != nil { + ok := object.Key("CustomEvents") + if err := awsRestjson1_serializeDocumentCustomEvents(v.CustomEvents, ok); err != nil { + return err + } + } + if v.CwLogEnabled != nil { ok := object.Key("CwLogEnabled") ok.Boolean(*v.CwLogEnabled) @@ -1230,6 +1237,13 @@ func awsRestjson1_serializeOpDocumentUpdateAppMonitorInput(v *UpdateAppMonitorIn } } + if v.CustomEvents != nil { + ok := object.Key("CustomEvents") + if err := awsRestjson1_serializeDocumentCustomEvents(v.CustomEvents, ok); err != nil { + return err + } + } + if v.CwLogEnabled != nil { ok := object.Key("CwLogEnabled") ok.Boolean(*v.CwLogEnabled) @@ -1436,6 +1450,18 @@ func awsRestjson1_serializeDocumentAppMonitorDetails(v *types.AppMonitorDetails, return nil } +func awsRestjson1_serializeDocumentCustomEvents(v *types.CustomEvents, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Status) > 0 { + ok := object.Key("Status") + ok.String(string(v.Status)) + } + + return nil +} + func awsRestjson1_serializeDocumentDimensionKeysMap(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/rum/types/enums.go b/service/rum/types/enums.go index 357d24bbb9d..9add291edf4 100644 --- a/service/rum/types/enums.go +++ b/service/rum/types/enums.go @@ -2,6 +2,24 @@ package types +type CustomEventsStatus string + +// Enum values for CustomEventsStatus +const ( + CustomEventsStatusEnabled CustomEventsStatus = "ENABLED" + CustomEventsStatusDisabled CustomEventsStatus = "DISABLED" +) + +// Values returns all known values for CustomEventsStatus. 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 (CustomEventsStatus) Values() []CustomEventsStatus { + return []CustomEventsStatus{ + "ENABLED", + "DISABLED", + } +} + type MetricDestination string // Enum values for MetricDestination diff --git a/service/rum/types/types.go b/service/rum/types/types.go index 5a883eb7353..fa5b9bb6bc6 100644 --- a/service/rum/types/types.go +++ b/service/rum/types/types.go @@ -18,6 +18,11 @@ type AppMonitor struct { // The date and time that this app monitor was created. Created *string + // Specifies whether this app monitor allows the web client to define and send + // custom events. For more information about custom events, see Send custom events + // (https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-RUM-custom-events.html). + CustomEvents *CustomEvents + // A structure that contains information about whether this app monitor stores a // copy of the telemetry data that RUM collects using CloudWatch Logs. DataStorage *DataStorage @@ -193,6 +198,16 @@ type BatchDeleteRumMetricDefinitionsError struct { noSmithyDocumentSerde } +// A structure that contains information about custom events for this app monitor. +type CustomEvents struct { + + // Specifies whether this app monitor allows the web client to define and send + // custom events. The default is for custom events to be DISABLED. + Status CustomEventsStatus + + noSmithyDocumentSerde +} + // A structure that contains the information about whether the app monitor stores // copies of the data that RUM collects in CloudWatch Logs. If it does, this // structure also contains the name of the log group. diff --git a/service/s3control/api_op_GetAccessPoint.go b/service/s3control/api_op_GetAccessPoint.go index 143a76f71e1..4ad91eedad7 100644 --- a/service/s3control/api_op_GetAccessPoint.go +++ b/service/s3control/api_op_GetAccessPoint.go @@ -109,7 +109,8 @@ type GetAccessPointOutput struct { // information about when Amazon S3 considers a bucket or object public, see The // Meaning of "Public" // (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status) - // in the Amazon S3 User Guide. This is not supported for Amazon S3 on Outposts. + // in the Amazon S3 User Guide. This data type is not supported for Amazon S3 on + // Outposts. PublicAccessBlockConfiguration *types.PublicAccessBlockConfiguration // Contains the virtual private cloud (VPC) configuration for the specified access diff --git a/service/s3control/api_op_GetStorageLensConfiguration.go b/service/s3control/api_op_GetStorageLensConfiguration.go index 257cae3ec2e..9e278db231f 100644 --- a/service/s3control/api_op_GetStorageLensConfiguration.go +++ b/service/s3control/api_op_GetStorageLensConfiguration.go @@ -18,9 +18,12 @@ import ( // Gets the Amazon S3 Storage Lens configuration. For more information, see // Assessing your storage activity and usage with Amazon S3 Storage Lens // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage_lens.html) in the -// Amazon S3 User Guide. To use this action, you must have permission to perform -// the s3:GetStorageLensConfiguration action. For more information, see Setting -// permissions to use Amazon S3 Storage Lens +// Amazon S3 User Guide. For a complete list of S3 Storage Lens metrics, see S3 +// Storage Lens metrics glossary +// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage_lens_metrics_glossary.html) +// in the Amazon S3 User Guide. To use this action, you must have permission to +// perform the s3:GetStorageLensConfiguration action. For more information, see +// Setting permissions to use Amazon S3 Storage Lens // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage_lens_iam_permissions.html) // in the Amazon S3 User Guide. func (c *Client) GetStorageLensConfiguration(ctx context.Context, params *GetStorageLensConfigurationInput, optFns ...func(*Options)) (*GetStorageLensConfigurationOutput, error) { diff --git a/service/s3control/api_op_PutStorageLensConfiguration.go b/service/s3control/api_op_PutStorageLensConfiguration.go index a0dae69a225..69f36a90b48 100644 --- a/service/s3control/api_op_PutStorageLensConfiguration.go +++ b/service/s3control/api_op_PutStorageLensConfiguration.go @@ -18,9 +18,12 @@ import ( // Puts an Amazon S3 Storage Lens configuration. For more information about S3 // Storage Lens, see Working with Amazon S3 Storage Lens // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage_lens.html) in the -// Amazon S3 User Guide. To use this action, you must have permission to perform -// the s3:PutStorageLensConfiguration action. For more information, see Setting -// permissions to use Amazon S3 Storage Lens +// Amazon S3 User Guide. For a complete list of S3 Storage Lens metrics, see S3 +// Storage Lens metrics glossary +// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage_lens_metrics_glossary.html) +// in the Amazon S3 User Guide. To use this action, you must have permission to +// perform the s3:PutStorageLensConfiguration action. For more information, see +// Setting permissions to use Amazon S3 Storage Lens // (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage_lens_iam_permissions.html) // in the Amazon S3 User Guide. func (c *Client) PutStorageLensConfiguration(ctx context.Context, params *PutStorageLensConfigurationInput, optFns ...func(*Options)) (*PutStorageLensConfigurationOutput, error) { diff --git a/service/s3control/deserializers.go b/service/s3control/deserializers.go index 440bd819203..6ce30ca9924 100644 --- a/service/s3control/deserializers.go +++ b/service/s3control/deserializers.go @@ -7952,12 +7952,30 @@ func awsRestxml_deserializeDocumentAccountLevel(v **types.AccountLevel, decoder return err } + case strings.EqualFold("AdvancedCostOptimizationMetrics", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentAdvancedCostOptimizationMetrics(&sv.AdvancedCostOptimizationMetrics, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("AdvancedDataProtectionMetrics", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentAdvancedDataProtectionMetrics(&sv.AdvancedDataProtectionMetrics, nodeDecoder); err != nil { + return err + } + case strings.EqualFold("BucketLevel", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsRestxml_deserializeDocumentBucketLevel(&sv.BucketLevel, nodeDecoder); err != nil { return err } + case strings.EqualFold("DetailedStatusCodesMetrics", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDetailedStatusCodesMetrics(&sv.DetailedStatusCodesMetrics, nodeDecoder); err != nil { + return err + } + default: // Do nothing and ignore the unexpected tag element err = decoder.Decoder.Skip() @@ -8024,6 +8042,110 @@ func awsRestxml_deserializeDocumentActivityMetrics(v **types.ActivityMetrics, de return nil } +func awsRestxml_deserializeDocumentAdvancedCostOptimizationMetrics(v **types.AdvancedCostOptimizationMetrics, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.AdvancedCostOptimizationMetrics + if *v == nil { + sv = &types.AdvancedCostOptimizationMetrics{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("IsEnabled", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected IsEnabled to be of type *bool, got %T instead", val) + } + sv.IsEnabled = xtv + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsRestxml_deserializeDocumentAdvancedDataProtectionMetrics(v **types.AdvancedDataProtectionMetrics, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.AdvancedDataProtectionMetrics + if *v == nil { + sv = &types.AdvancedDataProtectionMetrics{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("IsEnabled", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected IsEnabled to be of type *bool, got %T instead", val) + } + sv.IsEnabled = xtv + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsRestxml_deserializeDocumentAsyncErrorDetails(v **types.AsyncErrorDetails, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8529,6 +8651,24 @@ func awsRestxml_deserializeDocumentBucketLevel(v **types.BucketLevel, decoder sm return err } + case strings.EqualFold("AdvancedCostOptimizationMetrics", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentAdvancedCostOptimizationMetrics(&sv.AdvancedCostOptimizationMetrics, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("AdvancedDataProtectionMetrics", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentAdvancedDataProtectionMetrics(&sv.AdvancedDataProtectionMetrics, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("DetailedStatusCodesMetrics", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsRestxml_deserializeDocumentDetailedStatusCodesMetrics(&sv.DetailedStatusCodesMetrics, nodeDecoder); err != nil { + return err + } + case strings.EqualFold("PrefixLevel", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsRestxml_deserializeDocumentPrefixLevel(&sv.PrefixLevel, nodeDecoder); err != nil { @@ -8791,6 +8931,58 @@ func awsRestxml_deserializeDocumentDeleteMultiRegionAccessPointInput(v **types.D return nil } +func awsRestxml_deserializeDocumentDetailedStatusCodesMetrics(v **types.DetailedStatusCodesMetrics, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.DetailedStatusCodesMetrics + if *v == nil { + sv = &types.DetailedStatusCodesMetrics{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("IsEnabled", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected IsEnabled to be of type *bool, got %T instead", val) + } + sv.IsEnabled = xtv + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsRestxml_deserializeDocumentEndpoints(v *map[string]string, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/s3control/serializers.go b/service/s3control/serializers.go index c64d91f56aa..1a5215780a3 100644 --- a/service/s3control/serializers.go +++ b/service/s3control/serializers.go @@ -4522,6 +4522,32 @@ func awsRestxml_serializeDocumentAccountLevel(v *types.AccountLevel, value smith return err } } + if v.AdvancedCostOptimizationMetrics != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "AdvancedCostOptimizationMetrics", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentAdvancedCostOptimizationMetrics(v.AdvancedCostOptimizationMetrics, el); err != nil { + return err + } + } + if v.AdvancedDataProtectionMetrics != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "AdvancedDataProtectionMetrics", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentAdvancedDataProtectionMetrics(v.AdvancedDataProtectionMetrics, el); err != nil { + return err + } + } if v.BucketLevel != nil { rootAttr := []smithyxml.Attr{} root := smithyxml.StartElement{ @@ -4535,6 +4561,19 @@ func awsRestxml_serializeDocumentAccountLevel(v *types.AccountLevel, value smith return err } } + if v.DetailedStatusCodesMetrics != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "DetailedStatusCodesMetrics", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentDetailedStatusCodesMetrics(v.DetailedStatusCodesMetrics, el); err != nil { + return err + } + } return nil } @@ -4554,6 +4593,38 @@ func awsRestxml_serializeDocumentActivityMetrics(v *types.ActivityMetrics, value return nil } +func awsRestxml_serializeDocumentAdvancedCostOptimizationMetrics(v *types.AdvancedCostOptimizationMetrics, value smithyxml.Value) error { + defer value.Close() + if v.IsEnabled { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "IsEnabled", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(v.IsEnabled) + } + return nil +} + +func awsRestxml_serializeDocumentAdvancedDataProtectionMetrics(v *types.AdvancedDataProtectionMetrics, value smithyxml.Value) error { + defer value.Close() + if v.IsEnabled { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "IsEnabled", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(v.IsEnabled) + } + return nil +} + func awsRestxml_serializeDocumentAwsLambdaTransformation(v *types.AwsLambdaTransformation, value smithyxml.Value) error { defer value.Close() if v.FunctionArn != nil { @@ -4596,6 +4667,45 @@ func awsRestxml_serializeDocumentBucketLevel(v *types.BucketLevel, value smithyx return err } } + if v.AdvancedCostOptimizationMetrics != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "AdvancedCostOptimizationMetrics", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentAdvancedCostOptimizationMetrics(v.AdvancedCostOptimizationMetrics, el); err != nil { + return err + } + } + if v.AdvancedDataProtectionMetrics != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "AdvancedDataProtectionMetrics", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentAdvancedDataProtectionMetrics(v.AdvancedDataProtectionMetrics, el); err != nil { + return err + } + } + if v.DetailedStatusCodesMetrics != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "DetailedStatusCodesMetrics", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + if err := awsRestxml_serializeDocumentDetailedStatusCodesMetrics(v.DetailedStatusCodesMetrics, el); err != nil { + return err + } + } if v.PrefixLevel != nil { rootAttr := []smithyxml.Attr{} root := smithyxml.StartElement{ @@ -4722,6 +4832,22 @@ func awsRestxml_serializeDocumentDeleteMultiRegionAccessPointInput(v *types.Dele return nil } +func awsRestxml_serializeDocumentDetailedStatusCodesMetrics(v *types.DetailedStatusCodesMetrics, value smithyxml.Value) error { + defer value.Close() + if v.IsEnabled { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "IsEnabled", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Boolean(v.IsEnabled) + } + return nil +} + func awsRestxml_serializeDocumentExclude(v *types.Exclude, value smithyxml.Value) error { defer value.Close() if v.Buckets != nil { diff --git a/service/s3control/types/types.go b/service/s3control/types/types.go index 2d1e39633cd..9f339ef272d 100644 --- a/service/s3control/types/types.go +++ b/service/s3control/types/types.go @@ -53,7 +53,14 @@ type AccessPoint struct { noSmithyDocumentSerde } -// A container for the account level Amazon S3 Storage Lens configuration. +// A container for the account-level Amazon S3 Storage Lens configuration. For more +// information about S3 Storage Lens, see Assessing your storage activity and usage +// with S3 Storage Lens +// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage_lens.html) in the +// Amazon S3 User Guide. For a complete list of S3 Storage Lens metrics, see S3 +// Storage Lens metrics glossary +// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage_lens_metrics_glossary.html) +// in the Amazon S3 User Guide. type AccountLevel struct { // A container for the S3 Storage Lens bucket-level configuration. @@ -61,16 +68,72 @@ type AccountLevel struct { // This member is required. BucketLevel *BucketLevel - // A container for the S3 Storage Lens activity metrics. + // A container for S3 Storage Lens activity metrics. ActivityMetrics *ActivityMetrics + // A container for S3 Storage Lens advanced cost-optimization metrics. + AdvancedCostOptimizationMetrics *AdvancedCostOptimizationMetrics + + // A container for S3 Storage Lens advanced data-protection metrics. + AdvancedDataProtectionMetrics *AdvancedDataProtectionMetrics + + // A container for detailed status code metrics. + DetailedStatusCodesMetrics *DetailedStatusCodesMetrics + noSmithyDocumentSerde } -// A container for the activity metrics. +// The container element for Amazon S3 Storage Lens activity metrics. Activity +// metrics show details about how your storage is requested, such as requests (for +// example, All requests, Get requests, Put requests), bytes uploaded or +// downloaded, and errors. For more information about S3 Storage Lens, see +// Assessing your storage activity and usage with S3 Storage Lens +// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage_lens.html) in the +// Amazon S3 User Guide. For a complete list of S3 Storage Lens metrics, see S3 +// Storage Lens metrics glossary +// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage_lens_metrics_glossary.html) +// in the Amazon S3 User Guide. type ActivityMetrics struct { - // A container for whether the activity metrics are enabled. + // A container that indicates whether activity metrics are enabled. + IsEnabled bool + + noSmithyDocumentSerde +} + +// The container element for Amazon S3 Storage Lens advanced cost-optimization +// metrics. Advanced cost-optimization metrics provide insights that you can use to +// manage and optimize your storage costs, for example, lifecycle rule counts for +// transitions, expirations, and incomplete multipart uploads. For more information +// about S3 Storage Lens, see Assessing your storage activity and usage with S3 +// Storage Lens +// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage_lens.html) in the +// Amazon S3 User Guide. For a complete list of S3 Storage Lens metrics, see S3 +// Storage Lens metrics glossary +// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage_lens_metrics_glossary.html) +// in the Amazon S3 User Guide. +type AdvancedCostOptimizationMetrics struct { + + // A container that indicates whether advanced cost-optimization metrics are + // enabled. + IsEnabled bool + + noSmithyDocumentSerde +} + +// The container element for Amazon S3 Storage Lens advanced data-protection +// metrics. Advanced data-protection metrics provide insights that you can use to +// perform audits and protect your data, for example replication rule counts within +// and across Regions. For more information about S3 Storage Lens, see Assessing +// your storage activity and usage with S3 Storage Lens +// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage_lens.html) in the +// Amazon S3 User Guide. For a complete list of S3 Storage Lens metrics, see S3 +// Storage Lens metrics glossary +// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage_lens_metrics_glossary.html) +// in the Amazon S3 User Guide. +type AdvancedDataProtectionMetrics struct { + + // A container that indicates whether advanced data-protection metrics are enabled. IsEnabled bool noSmithyDocumentSerde @@ -167,13 +230,28 @@ type AwsLambdaTransformation struct { noSmithyDocumentSerde } -// A container for the bucket-level configuration. +// A container for the bucket-level configuration for Amazon S3 Storage Lens. For +// more information about S3 Storage Lens, see Assessing your storage activity and +// usage with S3 Storage Lens +// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage_lens.html) in the +// Amazon S3 User Guide. type BucketLevel struct { - // A container for the bucket-level activity metrics for Amazon S3 Storage Lens + // A container for the bucket-level activity metrics for S3 Storage Lens. ActivityMetrics *ActivityMetrics - // A container for the bucket-level prefix-level metrics for S3 Storage Lens + // A container for bucket-level advanced cost-optimization metrics for S3 Storage + // Lens. + AdvancedCostOptimizationMetrics *AdvancedCostOptimizationMetrics + + // A container for bucket-level advanced data-protection metrics for S3 Storage + // Lens. + AdvancedDataProtectionMetrics *AdvancedDataProtectionMetrics + + // A container for bucket-level detailed status code metrics for S3 Storage Lens. + DetailedStatusCodesMetrics *DetailedStatusCodesMetrics + + // A container for the prefix-level metrics for S3 Storage Lens. PrefixLevel *PrefixLevel noSmithyDocumentSerde @@ -229,7 +307,8 @@ type CreateMultiRegionAccessPointInput struct { // information about when Amazon S3 considers a bucket or object public, see The // Meaning of "Public" // (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status) - // in the Amazon S3 User Guide. This is not supported for Amazon S3 on Outposts. + // in the Amazon S3 User Guide. This data type is not supported for Amazon S3 on + // Outposts. PublicAccessBlock *PublicAccessBlockConfiguration noSmithyDocumentSerde @@ -248,6 +327,24 @@ type DeleteMultiRegionAccessPointInput struct { noSmithyDocumentSerde } +// The container element for Amazon S3 Storage Lens detailed status code metrics. +// Detailed status code metrics generate metrics for HTTP status codes, such as 200 +// OK, 403 Forbidden, 503 Service Unavailable and others. For more information +// about S3 Storage Lens, see Assessing your storage activity and usage with S3 +// Storage Lens +// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage_lens.html) in the +// Amazon S3 User Guide. For a complete list of S3 Storage Lens metrics, see S3 +// Storage Lens metrics glossary +// (https://docs.aws.amazon.com/AmazonS3/latest/userguide/storage_lens_metrics_glossary.html) +// in the Amazon S3 User Guide. +type DetailedStatusCodesMetrics struct { + + // A container that indicates whether detailed status code metrics are enabled. + IsEnabled bool + + noSmithyDocumentSerde +} + // The last established access control policy for a Multi-Region Access Point. When // you update the policy, the update is first listed as the proposed policy. After // the update is finished and all Regions have been updated, the proposed policy is @@ -536,7 +633,7 @@ type JobOperation struct { // in the manifest. S3InitiateRestoreObject *S3InitiateRestoreObjectOperation - // Directs the specified job to run a PUT Object acl call on every object in the + // Directs the specified job to run a PutObjectAcl call on every object in the // manifest. S3PutObjectAcl *S3SetObjectAclOperation @@ -748,7 +845,7 @@ type LifecycleRuleFilter struct { // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints). Prefix *string - // + // A container for a key-value name pair. Tag *S3Tag noSmithyDocumentSerde @@ -831,7 +928,8 @@ type MultiRegionAccessPointReport struct { // information about when Amazon S3 considers a bucket or object public, see The // Meaning of "Public" // (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status) - // in the Amazon S3 User Guide. This is not supported for Amazon S3 on Outposts. + // in the Amazon S3 User Guide. This data type is not supported for Amazon S3 on + // Outposts. PublicAccessBlock *PublicAccessBlockConfiguration // A collection of the Regions and buckets associated with the Multi-Region Access @@ -1026,15 +1124,16 @@ type ProposedMultiRegionAccessPointPolicy struct { // information about when Amazon S3 considers a bucket or object public, see The // Meaning of "Public" // (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status) -// in the Amazon S3 User Guide. This is not supported for Amazon S3 on Outposts. +// in the Amazon S3 User Guide. This data type is not supported for Amazon S3 on +// Outposts. type PublicAccessBlockConfiguration struct { // Specifies whether Amazon S3 should block public access control lists (ACLs) for // buckets in this account. Setting this element to TRUE causes the following // behavior: // - // * PUT Bucket acl and PUT Object acl calls fail if the specified ACL - // is public. + // * PutBucketAcl and PutObjectAcl calls fail if the specified ACL is + // public. // // * PUT Object calls fail if the request includes a public ACL. // @@ -1042,22 +1141,23 @@ type PublicAccessBlockConfiguration struct { // Bucket calls fail if the request includes a public ACL. // // Enabling this setting - // doesn't affect existing policies or ACLs. This is not supported for Amazon S3 on - // Outposts. + // doesn't affect existing policies or ACLs. This property is not supported for + // Amazon S3 on Outposts. BlockPublicAcls bool // Specifies whether Amazon S3 should block public bucket policies for buckets in // this account. Setting this element to TRUE causes Amazon S3 to reject calls to // PUT Bucket policy if the specified bucket policy allows public access. Enabling - // this setting doesn't affect existing bucket policies. This is not supported for - // Amazon S3 on Outposts. + // this setting doesn't affect existing bucket policies. This property is not + // supported for Amazon S3 on Outposts. BlockPublicPolicy bool // Specifies whether Amazon S3 should ignore public ACLs for buckets in this // account. Setting this element to TRUE causes Amazon S3 to ignore all public ACLs // on buckets in this account and any objects that they contain. Enabling this // setting doesn't affect the persistence of any existing ACLs and doesn't prevent - // new public ACLs from being set. This is not supported for Amazon S3 on Outposts. + // new public ACLs from being set. This property is not supported for Amazon S3 on + // Outposts. IgnorePublicAcls bool // Specifies whether Amazon S3 should restrict public bucket policies for buckets @@ -1066,7 +1166,7 @@ type PublicAccessBlockConfiguration struct { // within this account. Enabling this setting doesn't affect previously stored // bucket policies, except that public and cross-account access within any public // bucket policy, including non-public delegation to specific accounts, is blocked. - // This is not supported for Amazon S3 on Outposts. + // This property is not supported for Amazon S3 on Outposts. RestrictPublicBuckets bool noSmithyDocumentSerde @@ -1269,8 +1369,8 @@ type S3CopyObjectOperation struct { TargetKeyPrefix *string // Specifies the destination bucket ARN for the batch copy operation. For example, - // to copy objects to a bucket named "destinationBucket", set the TargetResource to - // "arn:aws:s3:::destinationBucket". + // to copy objects to a bucket named destinationBucket, set the TargetResource + // property to arn:aws:s3:::destinationBucket. TargetResource *string // @@ -1495,8 +1595,8 @@ type S3Retention struct { } // Contains the configuration parameters for a Set Object ACL operation. S3 Batch -// Operations passes every object to the underlying PUT Object acl API. For more -// information about the parameters for this operation, see PUT Object acl +// Operations passes every object to the underlying PutObjectAcl API. For more +// information about the parameters for this operation, see PutObjectAcl // (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUTacl.html). type S3SetObjectAclOperation struct { @@ -1560,14 +1660,15 @@ type S3SetObjectTaggingOperation struct { noSmithyDocumentSerde } +// A container for a key-value name pair. type S3Tag struct { - // + // Key of the tag // // This member is required. Key *string - // + // Value of the tag // // This member is required. Value *string diff --git a/service/secretsmanager/api_op_DeleteSecret.go b/service/secretsmanager/api_op_DeleteSecret.go index 9255ff596d1..86824a5a352 100644 --- a/service/secretsmanager/api_op_DeleteSecret.go +++ b/service/secretsmanager/api_op_DeleteSecret.go @@ -78,8 +78,8 @@ type DeleteSecretInput struct { // parameter causes the operation to skip the normal recovery window before the // permanent deletion that Secrets Manager would normally impose with the // RecoveryWindowInDays parameter. If you delete a secret with the - // ForceDeleteWithouRecovery parameter, then you have no opportunity to recover the - // secret. You lose the secret permanently. + // ForceDeleteWithoutRecovery parameter, then you have no opportunity to recover + // the secret. You lose the secret permanently. ForceDeleteWithoutRecovery *bool // The number of days from 7 to 30 that Secrets Manager waits before permanently diff --git a/service/secretsmanager/api_op_ListSecrets.go b/service/secretsmanager/api_op_ListSecrets.go index d2d4bd17952..d919fc005ab 100644 --- a/service/secretsmanager/api_op_ListSecrets.go +++ b/service/secretsmanager/api_op_ListSecrets.go @@ -60,7 +60,7 @@ type ListSecretsInput struct { // this value. NextToken *string - // Lists secrets in the requested order. + // Secrets are listed by CreatedDate. SortOrder types.SortOrderType noSmithyDocumentSerde diff --git a/service/secretsmanager/api_op_RotateSecret.go b/service/secretsmanager/api_op_RotateSecret.go index c83fd452c4a..76875ce0ffd 100644 --- a/service/secretsmanager/api_op_RotateSecret.go +++ b/service/secretsmanager/api_op_RotateSecret.go @@ -42,10 +42,14 @@ import ( // the same version as the AWSCURRENT version, or it might not be attached to any // version. If the AWSPENDING staging label is present but not attached to the same // version as AWSCURRENT, then any later invocation of RotateSecret assumes that a -// previous rotation request is still in progress and returns an error. Secrets -// Manager generates a CloudTrail log entry when you call this action. Do not -// include sensitive information in request parameters because it might be logged. -// For more information, see Logging Secrets Manager events with CloudTrail +// previous rotation request is still in progress and returns an error. When +// rotation is unsuccessful, the AWSPENDING staging label might be attached to an +// empty secret version. For more information, see Troubleshoot rotation +// (https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot_rotation.html) +// in the Secrets Manager User Guide. Secrets Manager generates a CloudTrail log +// entry when you call this action. Do not include sensitive information in request +// parameters because it might be logged. For more information, see Logging Secrets +// Manager events with CloudTrail // (https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html). // Required permissions: secretsmanager:RotateSecret. For more information, see // IAM policy actions for Secrets Manager diff --git a/service/secretsmanager/types/types.go b/service/secretsmanager/types/types.go index ea9953d72c1..1dd923de93f 100644 --- a/service/secretsmanager/types/types.go +++ b/service/secretsmanager/types/types.go @@ -83,33 +83,42 @@ type RotationRulesType struct { // how often secrets must be rotated. In DescribeSecret and ListSecrets, this value // is calculated from the rotation schedule after every successful rotation. In // RotateSecret, you can set the rotation schedule in RotationRules with - // AutomaticallyAfterDays or ScheduleExpression, but not both. + // AutomaticallyAfterDays or ScheduleExpression, but not both. To set a rotation + // schedule in hours, use ScheduleExpression. AutomaticallyAfterDays *int64 // The length of the rotation window in hours, for example 3h for a three hour // window. Secrets Manager rotates your secret at any time during this window. The - // window must not go into the next UTC day. If you don't specify this value, the - // window automatically ends at the end of the UTC day. The window begins according - // to the ScheduleExpression. For more information, including examples, see + // window must not extend into the next rotation window or the next UTC day. The + // window starts according to the ScheduleExpression. If you don't specify a + // Duration, for a ScheduleExpression in hours, the window automatically closes + // after one hour. For a ScheduleExpression in days, the window automatically + // closes at the end of the UTC day. For more information, including examples, see // Schedule expressions in Secrets Manager rotation - // (https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_schedule.html). + // (https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_schedule.html) + // in the Secrets Manager Users Guide. Duration *string // A cron() or rate() expression that defines the schedule for rotating your // secret. Secrets Manager rotation schedules use UTC time zone. Secrets Manager - // rate() expressions represent the interval in days that you want to rotate your - // secret, for example rate(10 days). If you use a rate() expression, the rotation - // window opens at midnight, and Secrets Manager rotates your secret any time that - // day after midnight. You can set a Duration to shorten the rotation window. You - // can use a cron() expression to create rotation schedules that are more detailed - // than a rotation interval. For more information, including examples, see Schedule - // expressions in Secrets Manager rotation - // (https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_schedule.html). - // If you use a cron() expression, Secrets Manager rotates your secret any time - // during that day after the window opens. For example, cron(0 8 1 * ? *) - // represents a rotation window that occurs on the first day of every month - // beginning at 8:00 AM UTC. Secrets Manager rotates the secret any time that day - // after 8:00 AM. You can set a Duration to shorten the rotation window. + // rotates your secret any time during a rotation window. Secrets Manager rate() + // expressions represent the interval in hours or days that you want to rotate your + // secret, for example rate(12 hours) or rate(10 days). You can rotate a secret as + // often as every four hours. If you use a rate() expression, the rotation window + // starts at midnight. For a rate in hours, the default rotation window closes + // after one hour. For a rate in days, the default rotation window closes at the + // end of the day. You can set the Duration to change the rotation window. The + // rotation window must not extend into the next UTC day or into the next rotation + // window. You can use a cron() expression to create a rotation schedule that is + // more detailed than a rotation interval. For more information, including + // examples, see Schedule expressions in Secrets Manager rotation + // (https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_schedule.html) + // in the Secrets Manager Users Guide. For a cron expression that represents a + // schedule in hours, the default rotation window closes after one hour. For a cron + // expression that represents a schedule in days, the default rotation window + // closes at the end of the day. You can set the Duration to change the rotation + // window. The rotation window must not extend into the next UTC day or into the + // next rotation window. ScheduleExpression *string noSmithyDocumentSerde diff --git a/service/securityhub/deserializers.go b/service/securityhub/deserializers.go index 6e9bd168580..f99db9b8b33 100644 --- a/service/securityhub/deserializers.go +++ b/service/securityhub/deserializers.go @@ -28793,6 +28793,11 @@ func awsRestjson1_deserializeDocumentAwsLambdaFunctionDetails(v **types.AwsLambd for key, value := range shape { switch key { + case "Architectures": + if err := awsRestjson1_deserializeDocumentNonEmptyStringList(&sv.Architectures, value); err != nil { + return err + } + case "Code": if err := awsRestjson1_deserializeDocumentAwsLambdaFunctionCode(&sv.Code, value); err != nil { return err @@ -28880,6 +28885,15 @@ func awsRestjson1_deserializeDocumentAwsLambdaFunctionDetails(v **types.AwsLambd sv.MemorySize = int32(i64) } + case "PackageType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.PackageType = ptr.String(jtv) + } + case "RevisionId": if value != nil { jtv, ok := value.(string) @@ -48147,6 +48161,24 @@ func awsRestjson1_deserializeDocumentSoftwarePackage(v **types.SoftwarePackage, sv.Remediation = ptr.String(jtv) } + case "SourceLayerArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.SourceLayerArn = ptr.String(jtv) + } + + case "SourceLayerHash": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.SourceLayerHash = ptr.String(jtv) + } + case "Version": if value != nil { jtv, ok := value.(string) diff --git a/service/securityhub/serializers.go b/service/securityhub/serializers.go index 8362590de50..e4e3080af65 100644 --- a/service/securityhub/serializers.go +++ b/service/securityhub/serializers.go @@ -13181,6 +13181,13 @@ func awsRestjson1_serializeDocumentAwsLambdaFunctionDetails(v *types.AwsLambdaFu object := value.Object() defer object.Close() + if v.Architectures != nil { + ok := object.Key("Architectures") + if err := awsRestjson1_serializeDocumentNonEmptyStringList(v.Architectures, ok); err != nil { + return err + } + } + if v.Code != nil { ok := object.Key("Code") if err := awsRestjson1_serializeDocumentAwsLambdaFunctionCode(v.Code, ok); err != nil { @@ -13244,6 +13251,11 @@ func awsRestjson1_serializeDocumentAwsLambdaFunctionDetails(v *types.AwsLambdaFu ok.Integer(v.MemorySize) } + if v.PackageType != nil { + ok := object.Key("PackageType") + ok.String(*v.PackageType) + } + if v.RevisionId != nil { ok := object.Key("RevisionId") ok.String(*v.RevisionId) @@ -22080,6 +22092,16 @@ func awsRestjson1_serializeDocumentSoftwarePackage(v *types.SoftwarePackage, val ok.String(*v.Remediation) } + if v.SourceLayerArn != nil { + ok := object.Key("SourceLayerArn") + ok.String(*v.SourceLayerArn) + } + + if v.SourceLayerHash != nil { + ok := object.Key("SourceLayerHash") + ok.String(*v.SourceLayerHash) + } + if v.Version != nil { ok := object.Key("Version") ok.String(*v.Version) diff --git a/service/securityhub/types/types.go b/service/securityhub/types/types.go index de9ea7d4cd9..7783bae1ba7 100644 --- a/service/securityhub/types/types.go +++ b/service/securityhub/types/types.go @@ -6298,9 +6298,13 @@ type AwsLambdaFunctionDeadLetterConfig struct { noSmithyDocumentSerde } -// Details about a function's configuration. +// Details about an Lambda function's configuration. type AwsLambdaFunctionDetails struct { + // The instruction set architecture that the function uses. Valid values are x86_64 + // or arm64. + Architectures []string + // An AwsLambdaFunctionCode object. Code *AwsLambdaFunctionCode @@ -6339,6 +6343,10 @@ type AwsLambdaFunctionDetails struct { // The memory that is allocated to the function. MemorySize int32 + // The type of deployment package that's used to deploy the function code to + // Lambda. Set to Image for a container image and Zip for a .zip file archive. + PackageType *string + // The latest updated revision of the function or alias. RevisionId *string @@ -12129,6 +12137,12 @@ type SoftwarePackage struct { // software package. Remediation *string + // The Amazon Resource Name (ARN) of the source layer. + SourceLayerArn *string + + // The source layer hash of the vulnerable package. + SourceLayerHash *string + // The version of the software package. Version *string diff --git a/service/servicecatalogappregistry/api_op_GetConfiguration.go b/service/servicecatalogappregistry/api_op_GetConfiguration.go new file mode 100644 index 00000000000..eb72917faae --- /dev/null +++ b/service/servicecatalogappregistry/api_op_GetConfiguration.go @@ -0,0 +1,112 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package servicecatalogappregistry + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves a TagKey configuration from an account. +func (c *Client) GetConfiguration(ctx context.Context, params *GetConfigurationInput, optFns ...func(*Options)) (*GetConfigurationOutput, error) { + if params == nil { + params = &GetConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetConfiguration", params, optFns, c.addOperationGetConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetConfigurationInput struct { + noSmithyDocumentSerde +} + +type GetConfigurationOutput struct { + + // Retrieves TagKey configuration from an account. + Configuration *types.AppRegistryConfiguration + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetConfiguration{}, middleware.After) + if 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); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetConfiguration(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opGetConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "servicecatalog", + OperationName: "GetConfiguration", + } +} diff --git a/service/servicecatalogappregistry/api_op_ListAssociatedResources.go b/service/servicecatalogappregistry/api_op_ListAssociatedResources.go index ec5ce2a5196..1716b00e455 100644 --- a/service/servicecatalogappregistry/api_op_ListAssociatedResources.go +++ b/service/servicecatalogappregistry/api_op_ListAssociatedResources.go @@ -12,8 +12,11 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists all resources that are associated with specified application. Results are -// paginated. +// Lists all of the resources that are associated with the specified application. +// Results are paginated. If you share an application, and a consumer account +// associates a tag query to the application, all of the users who can access the +// application can also view the tag values in all accounts that are associated +// with it using this API. func (c *Client) ListAssociatedResources(ctx context.Context, params *ListAssociatedResourcesInput, optFns ...func(*Options)) (*ListAssociatedResourcesOutput, error) { if params == nil { params = &ListAssociatedResourcesInput{} diff --git a/service/servicecatalogappregistry/api_op_ListAttributeGroupsForApplication.go b/service/servicecatalogappregistry/api_op_ListAttributeGroupsForApplication.go index fa3c4a2ab55..60ccd82b452 100644 --- a/service/servicecatalogappregistry/api_op_ListAttributeGroupsForApplication.go +++ b/service/servicecatalogappregistry/api_op_ListAttributeGroupsForApplication.go @@ -48,7 +48,7 @@ type ListAttributeGroupsForApplicationInput struct { type ListAttributeGroupsForApplicationOutput struct { - // The details related to a specific AttributeGroup. + // The details related to a specific attribute group. AttributeGroupsDetails []types.AttributeGroupDetails // The token to use to get the next page of results after a previous API call. diff --git a/service/servicecatalogappregistry/api_op_PutConfiguration.go b/service/servicecatalogappregistry/api_op_PutConfiguration.go new file mode 100644 index 00000000000..e34bf4f1429 --- /dev/null +++ b/service/servicecatalogappregistry/api_op_PutConfiguration.go @@ -0,0 +1,117 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package servicecatalogappregistry + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Associates a TagKey configuration to an account. +func (c *Client) PutConfiguration(ctx context.Context, params *PutConfigurationInput, optFns ...func(*Options)) (*PutConfigurationOutput, error) { + if params == nil { + params = &PutConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutConfiguration", params, optFns, c.addOperationPutConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutConfigurationInput struct { + + // Associates a TagKey configuration to an account. + // + // This member is required. + Configuration *types.AppRegistryConfiguration + + noSmithyDocumentSerde +} + +type PutConfigurationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpPutConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutConfiguration{}, middleware.After) + if 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); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpPutConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutConfiguration(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opPutConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "servicecatalog", + OperationName: "PutConfiguration", + } +} diff --git a/service/servicecatalogappregistry/deserializers.go b/service/servicecatalogappregistry/deserializers.go index cc51d96a610..47003e3aea1 100644 --- a/service/servicecatalogappregistry/deserializers.go +++ b/service/servicecatalogappregistry/deserializers.go @@ -16,6 +16,7 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "io" + "io/ioutil" "strings" ) @@ -1929,6 +1930,153 @@ func awsRestjson1_deserializeOpDocumentGetAttributeGroupOutput(v **GetAttributeG return nil } +type awsRestjson1_deserializeOpGetConfiguration struct { +} + +func (*awsRestjson1_deserializeOpGetConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetConfiguration) 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_deserializeOpErrorGetConfiguration(response, &metadata) + } + output := &GetConfigurationOutput{} + 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_deserializeOpDocumentGetConfigurationOutput(&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_deserializeOpErrorGetConfiguration(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetConfigurationOutput(v **GetConfigurationOutput, 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 *GetConfigurationOutput + if *v == nil { + sv = &GetConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "configuration": + if err := awsRestjson1_deserializeDocumentAppRegistryConfiguration(&sv.Configuration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpListApplications struct { } @@ -2886,6 +3034,101 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return nil } +type awsRestjson1_deserializeOpPutConfiguration struct { +} + +func (*awsRestjson1_deserializeOpPutConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutConfiguration) 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_deserializeOpErrorPutConfiguration(response, &metadata) + } + output := &PutConfigurationOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPutConfiguration(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpSyncResource struct { } @@ -3956,6 +4199,42 @@ func awsRestjson1_deserializeDocumentApplicationSummary(v **types.ApplicationSum return nil } +func awsRestjson1_deserializeDocumentAppRegistryConfiguration(v **types.AppRegistryConfiguration, 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.AppRegistryConfiguration + if *v == nil { + sv = &types.AppRegistryConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "tagQueryConfiguration": + if err := awsRestjson1_deserializeDocumentTagQueryConfiguration(&sv.TagQueryConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentAttributeGroup(v **types.AttributeGroup, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -4492,6 +4771,46 @@ func awsRestjson1_deserializeDocumentResource(v **types.Resource, value interfac return nil } +func awsRestjson1_deserializeDocumentResourceDetails(v **types.ResourceDetails, 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.ResourceDetails + if *v == nil { + sv = &types.ResourceDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "tagValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) + } + sv.TagValue = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentResourceGroup(v **types.ResourceGroup, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -4576,7 +4895,7 @@ func awsRestjson1_deserializeDocumentResourceInfo(v **types.ResourceInfo, value if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StackArn to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } @@ -4590,6 +4909,20 @@ func awsRestjson1_deserializeDocumentResourceInfo(v **types.ResourceInfo, value sv.Name = ptr.String(jtv) } + case "resourceDetails": + if err := awsRestjson1_deserializeDocumentResourceDetails(&sv.ResourceDetails, value); err != nil { + return err + } + + 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 = types.ResourceType(jtv) + } + default: _, _ = key, value @@ -4749,6 +5082,46 @@ func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.Ser return nil } +func awsRestjson1_deserializeDocumentTagQueryConfiguration(v **types.TagQueryConfiguration, 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.TagQueryConfiguration + if *v == nil { + sv = &types.TagQueryConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "tagKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagKeyConfig to be of type string, got %T instead", value) + } + sv.TagKey = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentTags(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/servicecatalogappregistry/generated.json b/service/servicecatalogappregistry/generated.json index 0de30a056ae..cf8ab5d80a4 100644 --- a/service/servicecatalogappregistry/generated.json +++ b/service/servicecatalogappregistry/generated.json @@ -19,12 +19,14 @@ "api_op_GetApplication.go", "api_op_GetAssociatedResource.go", "api_op_GetAttributeGroup.go", + "api_op_GetConfiguration.go", "api_op_ListApplications.go", "api_op_ListAssociatedAttributeGroups.go", "api_op_ListAssociatedResources.go", "api_op_ListAttributeGroups.go", "api_op_ListAttributeGroupsForApplication.go", "api_op_ListTagsForResource.go", + "api_op_PutConfiguration.go", "api_op_SyncResource.go", "api_op_TagResource.go", "api_op_UntagResource.go", diff --git a/service/servicecatalogappregistry/serializers.go b/service/servicecatalogappregistry/serializers.go index f37cff4c3df..f8c09fafb97 100644 --- a/service/servicecatalogappregistry/serializers.go +++ b/service/servicecatalogappregistry/serializers.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/aws/aws-sdk-go-v2/service/servicecatalogappregistry/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" smithyjson "github.com/aws/smithy-go/encoding/json" @@ -782,6 +783,51 @@ func awsRestjson1_serializeOpHttpBindingsGetAttributeGroupInput(v *GetAttributeG return nil } +type awsRestjson1_serializeOpGetConfiguration struct { +} + +func (*awsRestjson1_serializeOpGetConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetConfiguration) 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.(*GetConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/configuration") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, 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_serializeOpHttpBindingsGetConfigurationInput(v *GetConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + type awsRestjson1_serializeOpListApplications struct { } @@ -1152,6 +1198,76 @@ func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsFor return nil } +type awsRestjson1_serializeOpPutConfiguration struct { +} + +func (*awsRestjson1_serializeOpPutConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPutConfiguration) 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.(*PutConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/configuration") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, 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_serializeOpDocumentPutConfigurationInput(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_serializeOpHttpBindingsPutConfigurationInput(v *PutConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentPutConfigurationInput(v *PutConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Configuration != nil { + ok := object.Key("configuration") + if err := awsRestjson1_serializeDocumentAppRegistryConfiguration(v.Configuration, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpSyncResource struct { } @@ -1543,6 +1659,32 @@ func awsRestjson1_serializeOpDocumentUpdateAttributeGroupInput(v *UpdateAttribut return nil } +func awsRestjson1_serializeDocumentAppRegistryConfiguration(v *types.AppRegistryConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TagQueryConfiguration != nil { + ok := object.Key("tagQueryConfiguration") + if err := awsRestjson1_serializeDocumentTagQueryConfiguration(v.TagQueryConfiguration, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentTagQueryConfiguration(v *types.TagQueryConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TagKey != nil { + ok := object.Key("tagKey") + ok.String(*v.TagKey) + } + + return nil +} + func awsRestjson1_serializeDocumentTags(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/servicecatalogappregistry/types/enums.go b/service/servicecatalogappregistry/types/enums.go index acd0a1f7b12..24a66c159c1 100644 --- a/service/servicecatalogappregistry/types/enums.go +++ b/service/servicecatalogappregistry/types/enums.go @@ -32,7 +32,8 @@ type ResourceType string // Enum values for ResourceType const ( - ResourceTypeCfnStack ResourceType = "CFN_STACK" + ResourceTypeCfnStack ResourceType = "CFN_STACK" + ResourceTypeResourceTagValue ResourceType = "RESOURCE_TAG_VALUE" ) // Values returns all known values for ResourceType. Note that this can be expanded @@ -41,6 +42,7 @@ const ( func (ResourceType) Values() []ResourceType { return []ResourceType{ "CFN_STACK", + "RESOURCE_TAG_VALUE", } } diff --git a/service/servicecatalogappregistry/types/types.go b/service/servicecatalogappregistry/types/types.go index e8e41d896a7..adbb1f83ecd 100644 --- a/service/servicecatalogappregistry/types/types.go +++ b/service/servicecatalogappregistry/types/types.go @@ -63,6 +63,15 @@ type ApplicationSummary struct { noSmithyDocumentSerde } +// Includes all of the Service Catalog AppRegistry settings. +type AppRegistryConfiguration struct { + + // Includes the definition of a tagQuery. + TagQueryConfiguration *TagQueryConfiguration + + noSmithyDocumentSerde +} + // Represents a Amazon Web Services Service Catalog AppRegistry attribute group // that is rich metadata which describes an application and its components. type AttributeGroup struct { @@ -103,7 +112,11 @@ type AttributeGroupDetails struct { // The unique identifier of the attribute group. Id *string - // The name of the attribute group. + // This field is no longer supported. We recommend you don't use the field when + // using ListAttributeGroupsForApplication. The name of the attribute group. + // + // Deprecated: This field is deprecated. We recommend not using the field when + // using ListAttributeGroupsForApplication. Name *string noSmithyDocumentSerde @@ -163,6 +176,15 @@ type Resource struct { noSmithyDocumentSerde } +// The details related to the resource. +type ResourceDetails struct { + + // The value of the tag. + TagValue *string + + noSmithyDocumentSerde +} + // The information about the resource group integration. type ResourceGroup struct { @@ -193,6 +215,12 @@ type ResourceInfo struct { // The name of the resource. Name *string + // The details related to the resource. + ResourceDetails *ResourceDetails + + // Provides information about the Service Catalog App Registry resource type. + ResourceType ResourceType + noSmithyDocumentSerde } @@ -205,4 +233,14 @@ type ResourceIntegrations struct { noSmithyDocumentSerde } +// The definition of tagQuery. Specifies which resources are associated with an +// application. +type TagQueryConfiguration struct { + + // Condition in the IAM policy that associates resources to an application. + TagKey *string + + noSmithyDocumentSerde +} + type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/servicecatalogappregistry/validators.go b/service/servicecatalogappregistry/validators.go index eb5cb2eb6b2..0aab1d409f9 100644 --- a/service/servicecatalogappregistry/validators.go +++ b/service/servicecatalogappregistry/validators.go @@ -309,6 +309,26 @@ func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpPutConfiguration struct { +} + +func (*validateOpPutConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpSyncResource struct { } @@ -469,6 +489,10 @@ func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } +func addOpPutConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutConfiguration{}, middleware.After) +} + func addOpSyncResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpSyncResource{}, middleware.After) } @@ -747,6 +771,21 @@ func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { } } +func validateOpPutConfigurationInput(v *PutConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutConfigurationInput"} + if v.Configuration == nil { + invalidParams.Add(smithy.NewErrParamRequired("Configuration")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpSyncResourceInput(v *SyncResourceInput) error { if v == nil { return nil diff --git a/service/sts/api_op_AssumeRole.go b/service/sts/api_op_AssumeRole.go index 9ae61e72c3c..f4f4f46f442 100644 --- a/service/sts/api_op_AssumeRole.go +++ b/service/sts/api_op_AssumeRole.go @@ -28,16 +28,16 @@ import ( // inline or managed session policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an -// inline session policy. You can also specify up to 10 managed policies to use as -// managed session policies. The plaintext that you use for both inline and managed -// session policies can't exceed 2,048 characters. Passing policies to this -// operation returns new temporary credentials. The resulting session's permissions -// are the intersection of the role's identity-based policy and the session -// policies. You can use the role's temporary credentials in subsequent Amazon Web -// Services API calls to access resources in the account that owns the role. You -// cannot use session policies to grant more permissions than those allowed by the -// identity-based policy of the role that is being assumed. For more information, -// see Session Policies +// inline session policy. You can also specify up to 10 managed policy Amazon +// Resource Names (ARNs) to use as managed session policies. The plaintext that you +// use for both inline and managed session policies can't exceed 2,048 characters. +// Passing policies to this operation returns new temporary credentials. The +// resulting session's permissions are the intersection of the role's +// identity-based policy and the session policies. You can use the role's temporary +// credentials in subsequent Amazon Web Services API calls to access resources in +// the account that owns the role. You cannot use session policies to grant more +// permissions than those allowed by the identity-based policy of the role that is +// being assumed. For more information, see Session Policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. When you create a role, you create two policies: A role // trust policy that specifies who can assume the role and a permissions policy @@ -189,11 +189,11 @@ type AssumeRoleInput struct { // be any ASCII character from the space character to the end of the valid // character list (\u0020 through \u00FF). It can also include the tab (\u0009), // linefeed (\u000A), and carriage return (\u000D) characters. An Amazon Web - // Services conversion compresses the passed session policies and session tags into - // a packed binary format that has a separate limit. Your request can fail for this - // limit even if your plaintext meets the other requirements. The PackedPolicySize - // response element indicates by percentage how close the policies and tags for - // your request are to the upper size limit. + // Services conversion compresses the passed inline session policy, managed policy + // ARNs, and session tags into a packed binary format that has a separate limit. + // Your request can fail for this limit even if your plaintext meets the other + // requirements. The PackedPolicySize response element indicates by percentage how + // close the policies and tags for your request are to the upper size limit. Policy *string // The Amazon Resource Names (ARNs) of the IAM managed policies that you want to @@ -204,18 +204,18 @@ type AssumeRoleInput struct { // Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in // the Amazon Web Services General Reference. An Amazon Web Services conversion - // compresses the passed session policies and session tags into a packed binary - // format that has a separate limit. Your request can fail for this limit even if - // your plaintext meets the other requirements. The PackedPolicySize response - // element indicates by percentage how close the policies and tags for your request - // are to the upper size limit. Passing policies to this operation returns new - // temporary credentials. The resulting session's permissions are the intersection - // of the role's identity-based policy and the session policies. You can use the - // role's temporary credentials in subsequent Amazon Web Services API calls to - // access resources in the account that owns the role. You cannot use session - // policies to grant more permissions than those allowed by the identity-based - // policy of the role that is being assumed. For more information, see Session - // Policies + // compresses the passed inline session policy, managed policy ARNs, and session + // tags into a packed binary format that has a separate limit. Your request can + // fail for this limit even if your plaintext meets the other requirements. The + // PackedPolicySize response element indicates by percentage how close the policies + // and tags for your request are to the upper size limit. Passing policies to this + // operation returns new temporary credentials. The resulting session's permissions + // are the intersection of the role's identity-based policy and the session + // policies. You can use the role's temporary credentials in subsequent Amazon Web + // Services API calls to access resources in the account that owns the role. You + // cannot use session policies to grant more permissions than those allowed by the + // identity-based policy of the role that is being assumed. For more information, + // see Session Policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. PolicyArns []types.PolicyDescriptorType @@ -257,22 +257,23 @@ type AssumeRoleInput struct { // Character Limits // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) // in the IAM User Guide. An Amazon Web Services conversion compresses the passed - // session policies and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates by - // percentage how close the policies and tags for your request are to the upper - // size limit. You can pass a session tag with the same key as a tag that is - // already attached to the role. When you do, session tags override a role tag with - // the same key. Tag key–value pairs are not case sensitive, but case is preserved. - // This means that you cannot have separate Department and department tag keys. - // Assume that the role has the Department=Marketing tag and you pass the - // department=engineering session tag. Department and department are not saved as - // separate tags, and the session tag passed in the request takes precedence over - // the role tag. Additionally, if you used temporary credentials to perform this - // operation, the new session inherits any transitive session tags from the calling - // session. If you pass a session tag with the same key as an inherited tag, the - // operation fails. To view the inherited tags for a session, see the CloudTrail - // logs. For more information, see Viewing Session Tags in CloudTrail + // inline session policy, managed policy ARNs, and session tags into a packed + // binary format that has a separate limit. Your request can fail for this limit + // even if your plaintext meets the other requirements. The PackedPolicySize + // response element indicates by percentage how close the policies and tags for + // your request are to the upper size limit. You can pass a session tag with the + // same key as a tag that is already attached to the role. When you do, session + // tags override a role tag with the same key. Tag key–value pairs are not case + // sensitive, but case is preserved. This means that you cannot have separate + // Department and department tag keys. Assume that the role has the + // Department=Marketing tag and you pass the department=engineering session tag. + // Department and department are not saved as separate tags, and the session tag + // passed in the request takes precedence over the role tag. Additionally, if you + // used temporary credentials to perform this operation, the new session inherits + // any transitive session tags from the calling session. If you pass a session tag + // with the same key as an inherited tag, the operation fails. To view the + // inherited tags for a session, see the CloudTrail logs. For more information, see + // Viewing Session Tags in CloudTrail // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_ctlogs) // in the IAM User Guide. Tags []types.Tag diff --git a/service/sts/api_op_AssumeRoleWithSAML.go b/service/sts/api_op_AssumeRoleWithSAML.go index e12315e4c14..4ed0f5d07f8 100644 --- a/service/sts/api_op_AssumeRoleWithSAML.go +++ b/service/sts/api_op_AssumeRoleWithSAML.go @@ -53,16 +53,16 @@ import ( // pass inline or managed session policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an -// inline session policy. You can also specify up to 10 managed policies to use as -// managed session policies. The plaintext that you use for both inline and managed -// session policies can't exceed 2,048 characters. Passing policies to this -// operation returns new temporary credentials. The resulting session's permissions -// are the intersection of the role's identity-based policy and the session -// policies. You can use the role's temporary credentials in subsequent Amazon Web -// Services API calls to access resources in the account that owns the role. You -// cannot use session policies to grant more permissions than those allowed by the -// identity-based policy of the role that is being assumed. For more information, -// see Session Policies +// inline session policy. You can also specify up to 10 managed policy Amazon +// Resource Names (ARNs) to use as managed session policies. The plaintext that you +// use for both inline and managed session policies can't exceed 2,048 characters. +// Passing policies to this operation returns new temporary credentials. The +// resulting session's permissions are the intersection of the role's +// identity-based policy and the session policies. You can use the role's temporary +// credentials in subsequent Amazon Web Services API calls to access resources in +// the account that owns the role. You cannot use session policies to grant more +// permissions than those allowed by the identity-based policy of the role that is +// being assumed. For more information, see Session Policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. Calling AssumeRoleWithSAML does not require the use of // Amazon Web Services security credentials. The identity of the caller is @@ -82,16 +82,16 @@ import ( // these and additional limits, see IAM and STS Character Limits // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) // in the IAM User Guide. An Amazon Web Services conversion compresses the passed -// session policies and session tags into a packed binary format that has a -// separate limit. Your request can fail for this limit even if your plaintext -// meets the other requirements. The PackedPolicySize response element indicates by -// percentage how close the policies and tags for your request are to the upper -// size limit. You can pass a session tag with the same key as a tag that is -// attached to the role. When you do, session tags override the role's tags with -// the same key. An administrator must grant you the permissions necessary to pass -// session tags. The administrator can also create granular permissions to allow -// you to pass only specific session tags. For more information, see Tutorial: -// Using Tags for Attribute-Based Access Control +// inline session policy, managed policy ARNs, and session tags into a packed +// binary format that has a separate limit. Your request can fail for this limit +// even if your plaintext meets the other requirements. The PackedPolicySize +// response element indicates by percentage how close the policies and tags for +// your request are to the upper size limit. You can pass a session tag with the +// same key as a tag that is attached to the role. When you do, session tags +// override the role's tags with the same key. An administrator must grant you the +// permissions necessary to pass session tags. The administrator can also create +// granular permissions to allow you to pass only specific session tags. For more +// information, see Tutorial: Using Tags for Attribute-Based Access Control // (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html) // in the IAM User Guide. You can set the session tags as transitive. Transitive // tags persist during role chaining. For more information, see Chaining Roles with @@ -194,11 +194,11 @@ type AssumeRoleWithSAMLInput struct { // be any ASCII character from the space character to the end of the valid // character list (\u0020 through \u00FF). It can also include the tab (\u0009), // linefeed (\u000A), and carriage return (\u000D) characters. An Amazon Web - // Services conversion compresses the passed session policies and session tags into - // a packed binary format that has a separate limit. Your request can fail for this - // limit even if your plaintext meets the other requirements. The PackedPolicySize - // response element indicates by percentage how close the policies and tags for - // your request are to the upper size limit. + // Services conversion compresses the passed inline session policy, managed policy + // ARNs, and session tags into a packed binary format that has a separate limit. + // Your request can fail for this limit even if your plaintext meets the other + // requirements. The PackedPolicySize response element indicates by percentage how + // close the policies and tags for your request are to the upper size limit. Policy *string // The Amazon Resource Names (ARNs) of the IAM managed policies that you want to @@ -209,18 +209,18 @@ type AssumeRoleWithSAMLInput struct { // Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in // the Amazon Web Services General Reference. An Amazon Web Services conversion - // compresses the passed session policies and session tags into a packed binary - // format that has a separate limit. Your request can fail for this limit even if - // your plaintext meets the other requirements. The PackedPolicySize response - // element indicates by percentage how close the policies and tags for your request - // are to the upper size limit. Passing policies to this operation returns new - // temporary credentials. The resulting session's permissions are the intersection - // of the role's identity-based policy and the session policies. You can use the - // role's temporary credentials in subsequent Amazon Web Services API calls to - // access resources in the account that owns the role. You cannot use session - // policies to grant more permissions than those allowed by the identity-based - // policy of the role that is being assumed. For more information, see Session - // Policies + // compresses the passed inline session policy, managed policy ARNs, and session + // tags into a packed binary format that has a separate limit. Your request can + // fail for this limit even if your plaintext meets the other requirements. The + // PackedPolicySize response element indicates by percentage how close the policies + // and tags for your request are to the upper size limit. Passing policies to this + // operation returns new temporary credentials. The resulting session's permissions + // are the intersection of the role's identity-based policy and the session + // policies. You can use the role's temporary credentials in subsequent Amazon Web + // Services API calls to access resources in the account that owns the role. You + // cannot use session policies to grant more permissions than those allowed by the + // identity-based policy of the role that is being assumed. For more information, + // see Session Policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. PolicyArns []types.PolicyDescriptorType diff --git a/service/sts/api_op_AssumeRoleWithWebIdentity.go b/service/sts/api_op_AssumeRoleWithWebIdentity.go index 2e8b51c98d5..e2ff4ac62e9 100644 --- a/service/sts/api_op_AssumeRoleWithWebIdentity.go +++ b/service/sts/api_op_AssumeRoleWithWebIdentity.go @@ -63,16 +63,16 @@ import ( // inline or managed session policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an -// inline session policy. You can also specify up to 10 managed policies to use as -// managed session policies. The plaintext that you use for both inline and managed -// session policies can't exceed 2,048 characters. Passing policies to this -// operation returns new temporary credentials. The resulting session's permissions -// are the intersection of the role's identity-based policy and the session -// policies. You can use the role's temporary credentials in subsequent Amazon Web -// Services API calls to access resources in the account that owns the role. You -// cannot use session policies to grant more permissions than those allowed by the -// identity-based policy of the role that is being assumed. For more information, -// see Session Policies +// inline session policy. You can also specify up to 10 managed policy Amazon +// Resource Names (ARNs) to use as managed session policies. The plaintext that you +// use for both inline and managed session policies can't exceed 2,048 characters. +// Passing policies to this operation returns new temporary credentials. The +// resulting session's permissions are the intersection of the role's +// identity-based policy and the session policies. You can use the role's temporary +// credentials in subsequent Amazon Web Services API calls to access resources in +// the account that owns the role. You cannot use session policies to grant more +// permissions than those allowed by the identity-based policy of the role that is +// being assumed. For more information, see Session Policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. Tags (Optional) You can configure your IdP to pass // attributes into your web identity token as session tags. Each session tag @@ -84,16 +84,16 @@ import ( // these and additional limits, see IAM and STS Character Limits // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) // in the IAM User Guide. An Amazon Web Services conversion compresses the passed -// session policies and session tags into a packed binary format that has a -// separate limit. Your request can fail for this limit even if your plaintext -// meets the other requirements. The PackedPolicySize response element indicates by -// percentage how close the policies and tags for your request are to the upper -// size limit. You can pass a session tag with the same key as a tag that is -// attached to the role. When you do, the session tag overrides the role tag with -// the same key. An administrator must grant you the permissions necessary to pass -// session tags. The administrator can also create granular permissions to allow -// you to pass only specific session tags. For more information, see Tutorial: -// Using Tags for Attribute-Based Access Control +// inline session policy, managed policy ARNs, and session tags into a packed +// binary format that has a separate limit. Your request can fail for this limit +// even if your plaintext meets the other requirements. The PackedPolicySize +// response element indicates by percentage how close the policies and tags for +// your request are to the upper size limit. You can pass a session tag with the +// same key as a tag that is attached to the role. When you do, the session tag +// overrides the role tag with the same key. An administrator must grant you the +// permissions necessary to pass session tags. The administrator can also create +// granular permissions to allow you to pass only specific session tags. For more +// information, see Tutorial: Using Tags for Attribute-Based Access Control // (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html) // in the IAM User Guide. You can set the session tags as transitive. Transitive // tags persist during role chaining. For more information, see Chaining Roles with @@ -215,11 +215,11 @@ type AssumeRoleWithWebIdentityInput struct { // be any ASCII character from the space character to the end of the valid // character list (\u0020 through \u00FF). It can also include the tab (\u0009), // linefeed (\u000A), and carriage return (\u000D) characters. An Amazon Web - // Services conversion compresses the passed session policies and session tags into - // a packed binary format that has a separate limit. Your request can fail for this - // limit even if your plaintext meets the other requirements. The PackedPolicySize - // response element indicates by percentage how close the policies and tags for - // your request are to the upper size limit. + // Services conversion compresses the passed inline session policy, managed policy + // ARNs, and session tags into a packed binary format that has a separate limit. + // Your request can fail for this limit even if your plaintext meets the other + // requirements. The PackedPolicySize response element indicates by percentage how + // close the policies and tags for your request are to the upper size limit. Policy *string // The Amazon Resource Names (ARNs) of the IAM managed policies that you want to @@ -230,18 +230,18 @@ type AssumeRoleWithWebIdentityInput struct { // Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in // the Amazon Web Services General Reference. An Amazon Web Services conversion - // compresses the passed session policies and session tags into a packed binary - // format that has a separate limit. Your request can fail for this limit even if - // your plaintext meets the other requirements. The PackedPolicySize response - // element indicates by percentage how close the policies and tags for your request - // are to the upper size limit. Passing policies to this operation returns new - // temporary credentials. The resulting session's permissions are the intersection - // of the role's identity-based policy and the session policies. You can use the - // role's temporary credentials in subsequent Amazon Web Services API calls to - // access resources in the account that owns the role. You cannot use session - // policies to grant more permissions than those allowed by the identity-based - // policy of the role that is being assumed. For more information, see Session - // Policies + // compresses the passed inline session policy, managed policy ARNs, and session + // tags into a packed binary format that has a separate limit. Your request can + // fail for this limit even if your plaintext meets the other requirements. The + // PackedPolicySize response element indicates by percentage how close the policies + // and tags for your request are to the upper size limit. Passing policies to this + // operation returns new temporary credentials. The resulting session's permissions + // are the intersection of the role's identity-based policy and the session + // policies. You can use the role's temporary credentials in subsequent Amazon Web + // Services API calls to access resources in the account that owns the role. You + // cannot use session policies to grant more permissions than those allowed by the + // identity-based policy of the role that is being assumed. For more information, + // see Session Policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. PolicyArns []types.PolicyDescriptorType diff --git a/service/sts/api_op_GetFederationToken.go b/service/sts/api_op_GetFederationToken.go index 01a3d411b2c..60026a13939 100644 --- a/service/sts/api_op_GetFederationToken.go +++ b/service/sts/api_op_GetFederationToken.go @@ -55,16 +55,16 @@ import ( // session policy // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an -// inline session policy. You can also specify up to 10 managed policies to use as -// managed session policies. The plaintext that you use for both inline and managed -// session policies can't exceed 2,048 characters. Though the session policy -// parameters are optional, if you do not pass a policy, then the resulting -// federated user session has no permissions. When you pass session policies, the -// session permissions are the intersection of the IAM user policies and the -// session policies that you pass. This gives you a way to further restrict the -// permissions for a federated user. You cannot use session policies to grant more -// permissions than those that are defined in the permissions policy of the IAM -// user. For more information, see Session Policies +// inline session policy. You can also specify up to 10 managed policy Amazon +// Resource Names (ARNs) to use as managed session policies. The plaintext that you +// use for both inline and managed session policies can't exceed 2,048 characters. +// Though the session policy parameters are optional, if you do not pass a policy, +// then the resulting federated user session has no permissions. When you pass +// session policies, the session permissions are the intersection of the IAM user +// policies and the session policies that you pass. This gives you a way to further +// restrict the permissions for a federated user. You cannot use session policies +// to grant more permissions than those that are defined in the permissions policy +// of the IAM user. For more information, see Session Policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. For information about using GetFederationToken to create // temporary security credentials, see GetFederationToken—Federation Through a @@ -135,15 +135,15 @@ type GetFederationTokenInput struct { // You must pass an inline or managed session policy // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an - // inline session policy. You can also specify up to 10 managed policies to use as - // managed session policies. This parameter is optional. However, if you do not - // pass any session policies, then the resulting federated user session has no - // permissions. When you pass session policies, the session permissions are the - // intersection of the IAM user policies and the session policies that you pass. - // This gives you a way to further restrict the permissions for a federated user. - // You cannot use session policies to grant more permissions than those that are - // defined in the permissions policy of the IAM user. For more information, see - // Session Policies + // inline session policy. You can also specify up to 10 managed policy Amazon + // Resource Names (ARNs) to use as managed session policies. This parameter is + // optional. However, if you do not pass any session policies, then the resulting + // federated user session has no permissions. When you pass session policies, the + // session permissions are the intersection of the IAM user policies and the + // session policies that you pass. This gives you a way to further restrict the + // permissions for a federated user. You cannot use session policies to grant more + // permissions than those that are defined in the permissions policy of the IAM + // user. For more information, see Session Policies // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. The resulting credentials can be used to access a // resource that has a resource-based policy. If that policy specifically @@ -155,11 +155,11 @@ type GetFederationTokenInput struct { // from the space character to the end of the valid character list (\u0020 through // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage // return (\u000D) characters. An Amazon Web Services conversion compresses the - // passed session policies and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates by - // percentage how close the policies and tags for your request are to the upper - // size limit. + // passed inline session policy, managed policy ARNs, and session tags into a + // packed binary format that has a separate limit. Your request can fail for this + // limit even if your plaintext meets the other requirements. The PackedPolicySize + // response element indicates by percentage how close the policies and tags for + // your request are to the upper size limit. Policy *string // The Amazon Resource Names (ARNs) of the IAM managed policies that you want to @@ -168,11 +168,11 @@ type GetFederationTokenInput struct { // managed session policy // (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an - // inline session policy. You can also specify up to 10 managed policies to use as - // managed session policies. The plaintext that you use for both inline and managed - // session policies can't exceed 2,048 characters. You can provide up to 10 managed - // policy ARNs. For more information about ARNs, see Amazon Resource Names (ARNs) - // and Amazon Web Services Service Namespaces + // inline session policy. You can also specify up to 10 managed policy Amazon + // Resource Names (ARNs) to use as managed session policies. The plaintext that you + // use for both inline and managed session policies can't exceed 2,048 characters. + // You can provide up to 10 managed policy ARNs. For more information about ARNs, + // see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in // the Amazon Web Services General Reference. This parameter is optional. However, // if you do not pass any session policies, then the resulting federated user @@ -188,11 +188,12 @@ type GetFederationTokenInput struct { // references the federated user session in the Principal element of the policy, // the session has the permissions allowed by the policy. These permissions are // granted in addition to the permissions that are granted by the session policies. - // An Amazon Web Services conversion compresses the passed session policies and - // session tags into a packed binary format that has a separate limit. Your request - // can fail for this limit even if your plaintext meets the other requirements. The - // PackedPolicySize response element indicates by percentage how close the policies - // and tags for your request are to the upper size limit. + // An Amazon Web Services conversion compresses the passed inline session policy, + // managed policy ARNs, and session tags into a packed binary format that has a + // separate limit. Your request can fail for this limit even if your plaintext + // meets the other requirements. The PackedPolicySize response element indicates by + // percentage how close the policies and tags for your request are to the upper + // size limit. PolicyArns []types.PolicyDescriptorType // A list of session tags. Each session tag consists of a key name and an @@ -205,15 +206,15 @@ type GetFederationTokenInput struct { // Character Limits // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) // in the IAM User Guide. An Amazon Web Services conversion compresses the passed - // session policies and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates by - // percentage how close the policies and tags for your request are to the upper - // size limit. You can pass a session tag with the same key as a tag that is - // already attached to the user you are federating. When you do, session tags - // override a user tag with the same key. Tag key–value pairs are not case - // sensitive, but case is preserved. This means that you cannot have separate - // Department and department tag keys. Assume that the role has the + // inline session policy, managed policy ARNs, and session tags into a packed + // binary format that has a separate limit. Your request can fail for this limit + // even if your plaintext meets the other requirements. The PackedPolicySize + // response element indicates by percentage how close the policies and tags for + // your request are to the upper size limit. You can pass a session tag with the + // same key as a tag that is already attached to the user you are federating. When + // you do, session tags override a user tag with the same key. Tag key–value pairs + // are not case sensitive, but case is preserved. This means that you cannot have + // separate Department and department tag keys. Assume that the role has the // Department=Marketing tag and you pass the department=engineering session tag. // Department and department are not saved as separate tags, and the session tag // passed in the request takes precedence over the role tag. diff --git a/service/textract/api_op_AnalyzeDocument.go b/service/textract/api_op_AnalyzeDocument.go index 1c45bb58957..979ba26a8be 100644 --- a/service/textract/api_op_AnalyzeDocument.go +++ b/service/textract/api_op_AnalyzeDocument.go @@ -29,6 +29,11 @@ import ( // document are returned (including text that doesn't have a relationship with the // value of FeatureTypes). // +// * Signatures. A SIGNATURE Block object contains the +// location information of a signature in a document. If used in conjunction with +// forms or tables, a signature can be given a Key-Value pairing or be detected in +// the cell of a table. +// // * Query. A QUERY Block object contains the query text, // alias and link to the associated Query results block object. // @@ -73,10 +78,12 @@ type AnalyzeDocumentInput struct { // A list of the types of analysis to perform. Add TABLES to the list to return // information about the tables that are detected in the input document. Add FORMS - // to return detected form data. To perform both types of analysis, add TABLES and - // FORMS to FeatureTypes. All lines and words detected in the document are included - // in the response (including text that isn't related to the value of - // FeatureTypes). + // to return detected form data. Add SIGNATURES to return the locations of detected + // signatures. To perform both forms and table analysis, add TABLES and FORMS to + // FeatureTypes. To detect signatures within form data and table data, add + // SIGNATURES to either TABLES or FORMS. All lines and words detected in the + // document are included in the response (including text that isn't related to the + // value of FeatureTypes). // // This member is required. FeatureTypes []types.FeatureType diff --git a/service/textract/types/enums.go b/service/textract/types/enums.go index 762c451e8bd..67689af9979 100644 --- a/service/textract/types/enums.go +++ b/service/textract/types/enums.go @@ -17,6 +17,7 @@ const ( BlockTypeTitle BlockType = "TITLE" BlockTypeQuery BlockType = "QUERY" BlockTypeQueryResult BlockType = "QUERY_RESULT" + BlockTypeSignature BlockType = "SIGNATURE" ) // Values returns all known values for BlockType. Note that this can be expanded in @@ -35,6 +36,7 @@ func (BlockType) Values() []BlockType { "TITLE", "QUERY", "QUERY_RESULT", + "SIGNATURE", } } @@ -80,9 +82,10 @@ type FeatureType string // Enum values for FeatureType const ( - FeatureTypeTables FeatureType = "TABLES" - FeatureTypeForms FeatureType = "FORMS" - FeatureTypeQueries FeatureType = "QUERIES" + FeatureTypeTables FeatureType = "TABLES" + FeatureTypeForms FeatureType = "FORMS" + FeatureTypeQueries FeatureType = "QUERIES" + FeatureTypeSignatures FeatureType = "SIGNATURES" ) // Values returns all known values for FeatureType. Note that this can be expanded @@ -93,6 +96,7 @@ func (FeatureType) Values() []FeatureType { "TABLES", "FORMS", "QUERIES", + "SIGNATURES", } } diff --git a/service/textract/types/types.go b/service/textract/types/types.go index 40f05db56f5..f8b5cbfea52 100644 --- a/service/textract/types/types.go +++ b/service/textract/types/types.go @@ -81,6 +81,10 @@ type Block struct { // or a check box that's detected on a document page. Use the value of // SelectionStatus to determine the status of the selection element. // + // * SIGNATURE - + // The location and confidene score of a signature detected on a document page. Can + // be returned as part of a Key-Value pair or a detected cell. + // // * QUERY - A // question asked during the call of AnalyzeDocument. Contains an alias and an ID // that attaches it to its answer. diff --git a/service/timestreamwrite/internal/endpoints/endpoints.go b/service/timestreamwrite/internal/endpoints/endpoints.go index 18d0f103dab..17e916d13db 100644 --- a/service/timestreamwrite/internal/endpoints/endpoints.go +++ b/service/timestreamwrite/internal/endpoints/endpoints.go @@ -350,5 +350,10 @@ var defaultPartitions = endpoints.Partitions{ }, RegionRegex: partitionRegexp.AwsUsGov, IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "us-gov-west-1", + }: endpoints.Endpoint{}, + }, }, } diff --git a/service/voiceid/internal/endpoints/endpoints.go b/service/voiceid/internal/endpoints/endpoints.go index 868b4940f20..8c48a7f65c9 100644 --- a/service/voiceid/internal/endpoints/endpoints.go +++ b/service/voiceid/internal/endpoints/endpoints.go @@ -153,11 +153,19 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "fips-us-east-1", }: endpoints.Endpoint{ + Hostname: "voiceid-fips.us-east-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-1", + }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "fips-us-west-2", }: endpoints.Endpoint{ + Hostname: "voiceid-fips.us-west-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-west-2", + }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ @@ -166,14 +174,18 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "us-east-1", Variant: endpoints.FIPSVariant, - }: {}, + }: { + Hostname: "voiceid-fips.us-east-1.amazonaws.com", + }, endpoints.EndpointKey{ Region: "us-west-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-west-2", Variant: endpoints.FIPSVariant, - }: {}, + }: { + Hostname: "voiceid-fips.us-west-2.amazonaws.com", + }, }, }, { diff --git a/service/workspaces/api_op_CreateStandbyWorkspaces.go b/service/workspaces/api_op_CreateStandbyWorkspaces.go new file mode 100644 index 00000000000..c040f4c106c --- /dev/null +++ b/service/workspaces/api_op_CreateStandbyWorkspaces.go @@ -0,0 +1,129 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package workspaces + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/workspaces/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a Standby WorkSpace in a secondary region. +func (c *Client) CreateStandbyWorkspaces(ctx context.Context, params *CreateStandbyWorkspacesInput, optFns ...func(*Options)) (*CreateStandbyWorkspacesOutput, error) { + if params == nil { + params = &CreateStandbyWorkspacesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateStandbyWorkspaces", params, optFns, c.addOperationCreateStandbyWorkspacesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateStandbyWorkspacesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateStandbyWorkspacesInput struct { + + // The Region of the primary WorkSpace. + // + // This member is required. + PrimaryRegion *string + + // Information about the Standby WorkSpace to be created. + // + // This member is required. + StandbyWorkspaces []types.StandbyWorkspace + + noSmithyDocumentSerde +} + +type CreateStandbyWorkspacesOutput struct { + + // Information about the Standby WorkSpace that could not be created. + FailedStandbyRequests []types.FailedCreateStandbyWorkspacesRequest + + // Information about the Standby WorkSpace that was created. + PendingStandbyRequests []types.PendingCreateStandbyWorkspacesRequest + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateStandbyWorkspacesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateStandbyWorkspaces{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateStandbyWorkspaces{}, middleware.After) + if 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); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateStandbyWorkspacesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateStandbyWorkspaces(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opCreateStandbyWorkspaces(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "workspaces", + OperationName: "CreateStandbyWorkspaces", + } +} diff --git a/service/workspaces/deserializers.go b/service/workspaces/deserializers.go index dd94fa34c0f..19ba1d7c9c3 100644 --- a/service/workspaces/deserializers.go +++ b/service/workspaces/deserializers.go @@ -895,6 +895,129 @@ func awsAwsjson11_deserializeOpErrorCreateIpGroup(response *smithyhttp.Response, } } +type awsAwsjson11_deserializeOpCreateStandbyWorkspaces struct { +} + +func (*awsAwsjson11_deserializeOpCreateStandbyWorkspaces) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateStandbyWorkspaces) 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_deserializeOpErrorCreateStandbyWorkspaces(response, &metadata) + } + output := &CreateStandbyWorkspacesOutput{} + 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_deserializeOpDocumentCreateStandbyWorkspacesOutput(&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_deserializeOpErrorCreateStandbyWorkspaces(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InvalidParameterValuesException", errorCode): + return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) + + case strings.EqualFold("OperationNotSupportedException", errorCode): + return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) + + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorResourceLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpCreateTags struct { } @@ -6084,6 +6207,9 @@ func awsAwsjson11_deserializeOpErrorModifyWorkspaceState(response *smithyhttp.Re case strings.EqualFold("InvalidResourceStateException", errorCode): return awsAwsjson11_deserializeErrorInvalidResourceStateException(response, errorBody) + case strings.EqualFold("OperationNotSupportedException", errorCode): + return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) @@ -6195,6 +6321,9 @@ func awsAwsjson11_deserializeOpErrorRebootWorkspaces(response *smithyhttp.Respon } switch { + case strings.EqualFold("OperationNotSupportedException", errorCode): + return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6303,6 +6432,9 @@ func awsAwsjson11_deserializeOpErrorRebuildWorkspaces(response *smithyhttp.Respo } switch { + case strings.EqualFold("OperationNotSupportedException", errorCode): + return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6549,6 +6681,9 @@ func awsAwsjson11_deserializeOpErrorRestoreWorkspace(response *smithyhttp.Respon case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) + case strings.EqualFold("OperationNotSupportedException", errorCode): + return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) @@ -7479,6 +7614,9 @@ func awsAwsjson11_deserializeOpErrorUpdateWorkspaceBundle(response *smithyhttp.R case strings.EqualFold("InvalidParameterValuesException", errorCode): return awsAwsjson11_deserializeErrorInvalidParameterValuesException(response, errorBody) + case strings.EqualFold("OperationNotSupportedException", errorCode): + return awsAwsjson11_deserializeErrorOperationNotSupportedException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) @@ -9179,6 +9317,94 @@ func awsAwsjson11_deserializeDocumentDnsIpAddresses(v *[]string, value interface return nil } +func awsAwsjson11_deserializeDocumentFailedCreateStandbyWorkspacesRequest(v **types.FailedCreateStandbyWorkspacesRequest, 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.FailedCreateStandbyWorkspacesRequest + if *v == nil { + sv = &types.FailedCreateStandbyWorkspacesRequest{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkspaceErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode = ptr.String(jtv) + } + + case "ErrorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "StandbyWorkspaceRequest": + if err := awsAwsjson11_deserializeDocumentStandbyWorkspace(&sv.StandbyWorkspaceRequest, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentFailedCreateStandbyWorkspacesRequestList(v *[]types.FailedCreateStandbyWorkspacesRequest, 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.FailedCreateStandbyWorkspacesRequest + if *v == nil { + cv = []types.FailedCreateStandbyWorkspacesRequest{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.FailedCreateStandbyWorkspacesRequest + destAddr := &col + if err := awsAwsjson11_deserializeDocumentFailedCreateStandbyWorkspacesRequest(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentFailedCreateWorkspaceRequest(v **types.FailedCreateWorkspaceRequest, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -10106,6 +10332,107 @@ func awsAwsjson11_deserializeDocumentOperationNotSupportedException(v **types.Op return nil } +func awsAwsjson11_deserializeDocumentPendingCreateStandbyWorkspacesRequest(v **types.PendingCreateStandbyWorkspacesRequest, 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.PendingCreateStandbyWorkspacesRequest + if *v == nil { + sv = &types.PendingCreateStandbyWorkspacesRequest{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DirectoryId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DirectoryId to be of type string, got %T instead", value) + } + sv.DirectoryId = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkspaceState to be of type string, got %T instead", value) + } + sv.State = types.WorkspaceState(jtv) + } + + case "UserName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserName to be of type string, got %T instead", value) + } + sv.UserName = ptr.String(jtv) + } + + case "WorkspaceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkspaceId to be of type string, got %T instead", value) + } + sv.WorkspaceId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentPendingCreateStandbyWorkspacesRequestList(v *[]types.PendingCreateStandbyWorkspacesRequest, 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.PendingCreateStandbyWorkspacesRequest + if *v == nil { + cv = []types.PendingCreateStandbyWorkspacesRequest{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PendingCreateStandbyWorkspacesRequest + destAddr := &col + if err := awsAwsjson11_deserializeDocumentPendingCreateStandbyWorkspacesRequest(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentProtocolList(v *[]types.Protocol, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -10142,6 +10469,107 @@ func awsAwsjson11_deserializeDocumentProtocolList(v *[]types.Protocol, value int return nil } +func awsAwsjson11_deserializeDocumentRelatedWorkspaceProperties(v **types.RelatedWorkspaceProperties, 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.RelatedWorkspaceProperties + if *v == nil { + sv = &types.RelatedWorkspaceProperties{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + 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 "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkspaceState to be of type string, got %T instead", value) + } + sv.State = types.WorkspaceState(jtv) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StandbyWorkspaceRelationshipType to be of type string, got %T instead", value) + } + sv.Type = types.StandbyWorkspaceRelationshipType(jtv) + } + + case "WorkspaceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkspaceId to be of type string, got %T instead", value) + } + sv.WorkspaceId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentRelatedWorkspaces(v *[]types.RelatedWorkspaceProperties, 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.RelatedWorkspaceProperties + if *v == nil { + cv = []types.RelatedWorkspaceProperties{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RelatedWorkspaceProperties + destAddr := &col + if err := awsAwsjson11_deserializeDocumentRelatedWorkspaceProperties(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentResourceAlreadyExistsException(v **types.ResourceAlreadyExistsException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -10655,6 +11083,69 @@ func awsAwsjson11_deserializeDocumentSnapshotList(v *[]types.Snapshot, value int return nil } +func awsAwsjson11_deserializeDocumentStandbyWorkspace(v **types.StandbyWorkspace, 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.StandbyWorkspace + if *v == nil { + sv = &types.StandbyWorkspace{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DirectoryId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DirectoryId to be of type string, got %T instead", value) + } + sv.DirectoryId = ptr.String(jtv) + } + + case "PrimaryWorkspaceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkspaceId to be of type string, got %T instead", value) + } + sv.PrimaryWorkspaceId = ptr.String(jtv) + } + + case "Tags": + if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil { + return err + } + + case "VolumeEncryptionKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VolumeEncryptionKey to be of type string, got %T instead", value) + } + sv.VolumeEncryptionKey = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentSubnetIds(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -11024,6 +11515,11 @@ func awsAwsjson11_deserializeDocumentWorkspace(v **types.Workspace, value interf return err } + case "RelatedWorkspaces": + if err := awsAwsjson11_deserializeDocumentRelatedWorkspaces(&sv.RelatedWorkspaces, value); err != nil { + return err + } + case "RootVolumeEncryptionEnabled": if value != nil { jtv, ok := value.(bool) @@ -11235,6 +11731,15 @@ func awsAwsjson11_deserializeDocumentWorkspaceBundle(v **types.WorkspaceBundle, sv.BundleId = ptr.String(jtv) } + case "BundleType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BundleType to be of type string, got %T instead", value) + } + sv.BundleType = types.BundleType(jtv) + } + case "ComputeType": if err := awsAwsjson11_deserializeDocumentComputeType(&sv.ComputeType, value); err != nil { return err @@ -11313,6 +11818,15 @@ func awsAwsjson11_deserializeDocumentWorkspaceBundle(v **types.WorkspaceBundle, return err } + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkspaceBundleState to be of type string, got %T instead", value) + } + sv.State = types.WorkspaceBundleState(jtv) + } + case "UserStorage": if err := awsAwsjson11_deserializeDocumentUserStorage(&sv.UserStorage, value); err != nil { return err @@ -12387,6 +12901,47 @@ func awsAwsjson11_deserializeOpDocumentCreateIpGroupOutput(v **CreateIpGroupOutp return nil } +func awsAwsjson11_deserializeOpDocumentCreateStandbyWorkspacesOutput(v **CreateStandbyWorkspacesOutput, 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 *CreateStandbyWorkspacesOutput + if *v == nil { + sv = &CreateStandbyWorkspacesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FailedStandbyRequests": + if err := awsAwsjson11_deserializeDocumentFailedCreateStandbyWorkspacesRequestList(&sv.FailedStandbyRequests, value); err != nil { + return err + } + + case "PendingStandbyRequests": + if err := awsAwsjson11_deserializeDocumentPendingCreateStandbyWorkspacesRequestList(&sv.PendingStandbyRequests, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentCreateTagsOutput(v **CreateTagsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/workspaces/generated.json b/service/workspaces/generated.json index 3e697039ca2..1ca99bd250d 100644 --- a/service/workspaces/generated.json +++ b/service/workspaces/generated.json @@ -15,6 +15,7 @@ "api_op_CreateConnectClientAddIn.go", "api_op_CreateConnectionAlias.go", "api_op_CreateIpGroup.go", + "api_op_CreateStandbyWorkspaces.go", "api_op_CreateTags.go", "api_op_CreateUpdatedWorkspaceImage.go", "api_op_CreateWorkspaceBundle.go", diff --git a/service/workspaces/serializers.go b/service/workspaces/serializers.go index a2892eac397..75ffa486cf4 100644 --- a/service/workspaces/serializers.go +++ b/service/workspaces/serializers.go @@ -400,6 +400,61 @@ func (m *awsAwsjson11_serializeOpCreateIpGroup) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpCreateStandbyWorkspaces struct { +} + +func (*awsAwsjson11_serializeOpCreateStandbyWorkspaces) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateStandbyWorkspaces) 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.(*CreateStandbyWorkspacesInput) + _ = 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("WorkspacesService.CreateStandbyWorkspaces") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateStandbyWorkspacesInput(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_serializeOpCreateTags struct { } @@ -3953,6 +4008,48 @@ func awsAwsjson11_serializeDocumentSelfservicePermissions(v *types.SelfservicePe return nil } +func awsAwsjson11_serializeDocumentStandbyWorkspace(v *types.StandbyWorkspace, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DirectoryId != nil { + ok := object.Key("DirectoryId") + ok.String(*v.DirectoryId) + } + + if v.PrimaryWorkspaceId != nil { + ok := object.Key("PrimaryWorkspaceId") + ok.String(*v.PrimaryWorkspaceId) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + if v.VolumeEncryptionKey != nil { + ok := object.Key("VolumeEncryptionKey") + ok.String(*v.VolumeEncryptionKey) + } + + return nil +} + +func awsAwsjson11_serializeDocumentStandbyWorkspacesList(v []types.StandbyWorkspace, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentStandbyWorkspace(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsAwsjson11_serializeDocumentStartRequest(v *types.StartRequest, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4462,6 +4559,25 @@ func awsAwsjson11_serializeOpDocumentCreateIpGroupInput(v *CreateIpGroupInput, v return nil } +func awsAwsjson11_serializeOpDocumentCreateStandbyWorkspacesInput(v *CreateStandbyWorkspacesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.PrimaryRegion != nil { + ok := object.Key("PrimaryRegion") + ok.String(*v.PrimaryRegion) + } + + if v.StandbyWorkspaces != nil { + ok := object.Key("StandbyWorkspaces") + if err := awsAwsjson11_serializeDocumentStandbyWorkspacesList(v.StandbyWorkspaces, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeOpDocumentCreateTagsInput(v *CreateTagsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/workspaces/types/enums.go b/service/workspaces/types/enums.go index 8bec0258307..e5188adc96e 100644 --- a/service/workspaces/types/enums.go +++ b/service/workspaces/types/enums.go @@ -62,6 +62,24 @@ func (AssociationStatus) Values() []AssociationStatus { } } +type BundleType string + +// Enum values for BundleType +const ( + BundleTypeRegular BundleType = "REGULAR" + BundleTypeStandby BundleType = "STANDBY" +) + +// Values returns all known values for BundleType. 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 (BundleType) Values() []BundleType { + return []BundleType{ + "REGULAR", + "STANDBY", + } +} + type CertificateBasedAuthStatusEnum string // Enum values for CertificateBasedAuthStatusEnum @@ -438,6 +456,25 @@ func (SamlStatusEnum) Values() []SamlStatusEnum { } } +type StandbyWorkspaceRelationshipType string + +// Enum values for StandbyWorkspaceRelationshipType +const ( + StandbyWorkspaceRelationshipTypePrimary StandbyWorkspaceRelationshipType = "PRIMARY" + StandbyWorkspaceRelationshipTypeStandby StandbyWorkspaceRelationshipType = "STANDBY" +) + +// Values returns all known values for StandbyWorkspaceRelationshipType. 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 (StandbyWorkspaceRelationshipType) Values() []StandbyWorkspaceRelationshipType { + return []StandbyWorkspaceRelationshipType{ + "PRIMARY", + "STANDBY", + } +} + type TargetWorkspaceState string // Enum values for TargetWorkspaceState @@ -474,6 +511,26 @@ func (Tenancy) Values() []Tenancy { } } +type WorkspaceBundleState string + +// Enum values for WorkspaceBundleState +const ( + WorkspaceBundleStateAvailable WorkspaceBundleState = "AVAILABLE" + WorkspaceBundleStatePending WorkspaceBundleState = "PENDING" + WorkspaceBundleStateError WorkspaceBundleState = "ERROR" +) + +// Values returns all known values for WorkspaceBundleState. 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 (WorkspaceBundleState) Values() []WorkspaceBundleState { + return []WorkspaceBundleState{ + "AVAILABLE", + "PENDING", + "ERROR", + } +} + type WorkspaceDirectoryState string // Enum values for WorkspaceDirectoryState diff --git a/service/workspaces/types/types.go b/service/workspaces/types/types.go index 3f0ae2ad064..ab4dbbd9422 100644 --- a/service/workspaces/types/types.go +++ b/service/workspaces/types/types.go @@ -302,6 +302,22 @@ type DefaultWorkspaceCreationProperties struct { noSmithyDocumentSerde } +// Describes the Standby WorkSpace that could not be created. +type FailedCreateStandbyWorkspacesRequest struct { + + // The error code that is returned if the Standby WorkSpace could not be created. + ErrorCode *string + + // The text of the error message that is returned if the Standby WorkSpace could + // not be created. + ErrorMessage *string + + // Information about the Standby WorkSpace that could not be created. + StandbyWorkspaceRequest *StandbyWorkspace + + noSmithyDocumentSerde +} + // Describes a WorkSpace that cannot be created. type FailedCreateWorkspaceRequest struct { @@ -502,6 +518,28 @@ type OperatingSystem struct { noSmithyDocumentSerde } +// Information about the Standby WorkSpace. +type PendingCreateStandbyWorkspacesRequest struct { + + // The identifier of the directory for the Standby WorkSpace. + DirectoryId *string + + // The operational state of the Standby WorkSpace. + State WorkspaceState + + // Describes the Standby WorkSpace that was created. Because this operation is + // asynchronous, the identifier returned is not immediately available for use with + // other operations. For example, if you call DescribeWorkspaces + // (https://docs.aws.amazon.com/workspaces/latest/api/API_DescribeWorkspaces.html) + // before the WorkSpace is created, the information returned can be incomplete. + UserName *string + + // The identifier of the Standby WorkSpace. + WorkspaceId *string + + noSmithyDocumentSerde +} + // Describes the information used to reboot a WorkSpace. type RebootRequest struct { @@ -524,6 +562,25 @@ type RebuildRequest struct { noSmithyDocumentSerde } +// Describes the related WorkSpace. The related WorkSpace could be a Standby +// WorkSpace or Primary WorkSpace related to the specified WorkSpace. +type RelatedWorkspaceProperties struct { + + // The Region of the related WorkSpace. + Region *string + + // Indicates the state of the WorkSpace. + State WorkspaceState + + // Indicates the type of WorkSpace. + Type StandbyWorkspaceRelationshipType + + // The identifier of the related WorkSpace. + WorkspaceId *string + + noSmithyDocumentSerde +} + // Describes the root volume for a WorkSpace bundle. type RootStorage struct { @@ -607,6 +664,28 @@ type Snapshot struct { noSmithyDocumentSerde } +// Describes a Standby WorkSpace. +type StandbyWorkspace struct { + + // The identifier of the directory for the Standby WorkSpace. + // + // This member is required. + DirectoryId *string + + // The identifier of the Standby WorkSpace. + // + // This member is required. + PrimaryWorkspaceId *string + + // The tags associated with the Standby WorkSpace. + Tags []Tag + + // The volume encryption key of the Standby WorkSpace. + VolumeEncryptionKey *string + + noSmithyDocumentSerde +} + // Information used to start a WorkSpace. type StartRequest struct { @@ -702,6 +781,9 @@ type Workspace struct { // The modification states of the WorkSpace. ModificationStates []ModificationState + // The Standby WorkSpace or Primary WorkSpace related to the specified WorkSpace. + RelatedWorkspaces []RelatedWorkspaceProperties + // Indicates whether the data stored on the root volume is encrypted. RootVolumeEncryptionEnabled *bool @@ -775,6 +857,9 @@ type WorkspaceBundle struct { // The identifier of the bundle. BundleId *string + // The type of WorkSpace bundle. + BundleType BundleType + // The compute type of the bundle. For more information, see Amazon WorkSpaces // Bundles (http://aws.amazon.com/workspaces/details/#Amazon_WorkSpaces_Bundles). ComputeType *ComputeType @@ -801,6 +886,9 @@ type WorkspaceBundle struct { // The size of the root volume. RootStorage *RootStorage + // The state of the WorkSpace bundle. + State WorkspaceBundleState + // The size of the user volume. UserStorage *UserStorage diff --git a/service/workspaces/validators.go b/service/workspaces/validators.go index 6278e0d6dd8..887b0cadd62 100644 --- a/service/workspaces/validators.go +++ b/service/workspaces/validators.go @@ -150,6 +150,26 @@ func (m *validateOpCreateIpGroup) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpCreateStandbyWorkspaces struct { +} + +func (*validateOpCreateStandbyWorkspaces) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateStandbyWorkspaces) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateStandbyWorkspacesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateStandbyWorkspacesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateTags struct { } @@ -1078,6 +1098,10 @@ func addOpCreateIpGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateIpGroup{}, middleware.After) } +func addOpCreateStandbyWorkspacesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateStandbyWorkspaces{}, middleware.After) +} + func addOpCreateTagsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateTags{}, middleware.After) } @@ -1340,6 +1364,46 @@ func validateRebuildWorkspaceRequests(v []types.RebuildRequest) error { } } +func validateStandbyWorkspace(v *types.StandbyWorkspace) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StandbyWorkspace"} + if v.PrimaryWorkspaceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("PrimaryWorkspaceId")) + } + if v.DirectoryId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DirectoryId")) + } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateStandbyWorkspacesList(v []types.StandbyWorkspace) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StandbyWorkspacesList"} + for i := range v { + if err := validateStandbyWorkspace(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateTag(v *types.Tag) error { if v == nil { return nil @@ -1588,6 +1652,28 @@ func validateOpCreateIpGroupInput(v *CreateIpGroupInput) error { } } +func validateOpCreateStandbyWorkspacesInput(v *CreateStandbyWorkspacesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateStandbyWorkspacesInput"} + if v.PrimaryRegion == nil { + invalidParams.Add(smithy.NewErrParamRequired("PrimaryRegion")) + } + if v.StandbyWorkspaces == nil { + invalidParams.Add(smithy.NewErrParamRequired("StandbyWorkspaces")) + } else if v.StandbyWorkspaces != nil { + if err := validateStandbyWorkspacesList(v.StandbyWorkspaces); err != nil { + invalidParams.AddNested("StandbyWorkspaces", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateTagsInput(v *CreateTagsInput) error { if v == nil { return nil