From d8ccbac9ffa7862f654ccb0091fdd6add2d97a75 Mon Sep 17 00:00:00 2001 From: Jason Del Ponte <961963+jasdel@users.noreply.github.com> Date: Fri, 10 Sep 2021 12:11:22 -0700 Subject: [PATCH] Updates SDK to latest version of APIs (#1409) Updates the SDK API clients to be generated off the latest version of API models. --- .../41575353444b40ffbf474f4155544f00.json | 8 + .../8f837f19caba4c6faaf88577e5e9a00e.json | 27 + .../aws-models/amp.2020-08-01.json | 258 +- .../chimesdkidentity.2021-04-20.json | 2 +- .../chimesdkmessaging.2021-05-15.json | 2 +- .../codegurureviewer.2019-09-19.json | 195 +- .../aws-models/eks.2017-11-01.json | 269 +- .../aws-models/elasticache.2015-02-02.json | 18 +- .../aws-models/emr.2009-03-31.json | 65 +- .../aws-models/forecast.2018-06-26.json | 93 +- .../aws-models/frauddetector.2019-11-15.json | 61 + .../aws-models/kafka.2018-11-14.json | 138 + .../lookoutequipment.2020-12-15.json | 73 +- .../aws-models/mediapackage.2017-10-12.json | 2 +- .../aws-models/opensearch.2021-01-01.json | 7058 +++++++++ .../aws-models/outposts.2019-12-03.json | 346 +- .../aws-models/ram.2018-01-04.json | 206 +- .../aws-models/ssmcontacts.2021-05-03.json | 28 +- .../aws-models/xray.2016-04-12.json | 66 +- .../aws/go/codegen/endpoint-prefix.json | 1 + .../smithy/aws/go/codegen/endpoints.json | 20 + service/amp/api_op_CreateWorkspace.go | 6 + service/amp/api_op_ListTagsForResource.go | 120 + service/amp/api_op_TagResource.go | 121 + service/amp/api_op_UntagResource.go | 121 + service/amp/deserializers.go | 400 + service/amp/generated.json | 3 + service/amp/serializers.go | 223 + service/amp/types/types.go | 6 + service/amp/validators.go | 123 + .../braket/internal/endpoints/endpoints.go | 5 + service/chimesdkidentity/doc.go | 3 +- service/chimesdkmessaging/doc.go | 3 +- .../api_op_AssociateRepository.go | 34 +- .../api_op_CreateCodeReview.go | 4 +- .../api_op_DescribeRecommendationFeedback.go | 6 +- .../api_op_ListRecommendationFeedback.go | 11 +- .../api_op_ListRepositoryAssociations.go | 8 +- service/codegurureviewer/deserializers.go | 122 + service/codegurureviewer/doc.go | 2 +- service/codegurureviewer/types/enums.go | 26 + service/codegurureviewer/types/types.go | 165 +- service/eks/api_op_DeregisterCluster.go | 121 + service/eks/api_op_DescribeCluster.go | 17 + service/eks/api_op_ListClusters.go | 4 + service/eks/api_op_RegisterCluster.go | 179 + service/eks/deserializers.go | 406 + service/eks/generated.json | 2 + service/eks/serializers.go | 161 + service/eks/types/enums.go | 34 + service/eks/types/types.go | 45 +- service/eks/validators.go | 103 + service/elasticache/api_op_CreateUserGroup.go | 2 +- service/elasticache/api_op_DeleteUserGroup.go | 2 +- .../api_op_ModifyReplicationGroup.go | 8 +- service/elasticache/api_op_ModifyUserGroup.go | 2 +- service/elasticache/types/errors.go | 2 +- service/elasticache/types/types.go | 10 +- service/emr/api_op_AddTags.go | 20 +- service/emr/api_op_CreateStudio.go | 34 +- .../emr/api_op_CreateStudioSessionMapping.go | 6 +- service/emr/api_op_RemoveTags.go | 17 +- service/emr/api_op_RunJobFlow.go | 4 +- service/emr/deserializers.go | 27 + service/emr/serializers.go | 10 + service/emr/types/types.go | 23 +- service/emr/validators.go | 3 - service/forecast/api_op_CreatePredictor.go | 11 +- service/forecast/api_op_DescribePredictor.go | 11 +- service/forecast/api_op_GetAccuracyMetrics.go | 11 +- service/forecast/deserializers.go | 120 + service/forecast/serializers.go | 5 + service/forecast/types/enums.go | 24 + service/forecast/types/types.go | 16 +- .../api_op_GetEventPrediction.go | 3 + service/frauddetector/deserializers.go | 165 + service/frauddetector/types/types.go | 24 + service/kafka/api_op_UpdateSecurity.go | 138 + service/kafka/deserializers.go | 242 + service/kafka/generated.json | 1 + service/kafka/serializers.go | 119 + service/kafka/types/types.go | 23 + service/kafka/validators.go | 47 + .../lookoutequipment/api_op_CreateDataset.go | 4 +- .../api_op_CreateInferenceScheduler.go | 4 +- .../lookoutequipment/api_op_CreateModel.go | 9 +- .../api_op_DescribeDataset.go | 8 +- .../api_op_DescribeInferenceScheduler.go | 4 +- .../lookoutequipment/api_op_DescribeModel.go | 14 +- .../api_op_UpdateInferenceScheduler.go | 2 +- service/lookoutequipment/deserializers.go | 9 + service/lookoutequipment/serializers.go | 5 + service/lookoutequipment/types/types.go | 8 +- service/mediapackage/types/types.go | 4 +- service/opensearch/LICENSE.txt | 202 + service/opensearch/api_client.go | 262 + .../api_op_AcceptInboundConnection.go | 125 + service/opensearch/api_op_AddTags.go | 128 + service/opensearch/api_op_AssociatePackage.go | 129 + .../api_op_CancelServiceSoftwareUpdate.go | 129 + service/opensearch/api_op_CreateDomain.go | 191 + .../api_op_CreateOutboundConnection.go | 149 + service/opensearch/api_op_CreatePackage.go | 136 + service/opensearch/api_op_DeleteDomain.go | 127 + .../api_op_DeleteInboundConnection.go | 125 + .../api_op_DeleteOutboundConnection.go | 125 + service/opensearch/api_op_DeletePackage.go | 124 + service/opensearch/api_op_DescribeDomain.go | 127 + .../api_op_DescribeDomainAutoTunes.go | 227 + .../opensearch/api_op_DescribeDomainConfig.go | 129 + service/opensearch/api_op_DescribeDomains.go | 128 + .../api_op_DescribeInboundConnections.go | 231 + .../api_op_DescribeInstanceTypeLimits.go | 145 + .../api_op_DescribeOutboundConnections.go | 231 + service/opensearch/api_op_DescribePackages.go | 210 + ...pi_op_DescribeReservedInstanceOfferings.go | 216 + .../api_op_DescribeReservedInstances.go | 215 + .../opensearch/api_op_DissociatePackage.go | 129 + .../api_op_GetCompatibleVersions.go | 123 + .../api_op_GetPackageVersionHistory.go | 219 + .../opensearch/api_op_GetUpgradeHistory.go | 222 + service/opensearch/api_op_GetUpgradeStatus.go | 149 + service/opensearch/api_op_ListDomainNames.go | 114 + .../api_op_ListDomainsForPackage.go | 216 + .../api_op_ListInstanceTypeDetails.go | 219 + .../api_op_ListPackagesForDomain.go | 217 + service/opensearch/api_op_ListTags.go | 124 + service/opensearch/api_op_ListVersions.go | 215 + ...api_op_PurchaseReservedInstanceOffering.go | 133 + .../api_op_RejectInboundConnection.go | 125 + service/opensearch/api_op_RemoveTags.go | 123 + .../api_op_StartServiceSoftwareUpdate.go | 125 + .../opensearch/api_op_UpdateDomainConfig.go | 179 + service/opensearch/api_op_UpdatePackage.go | 136 + service/opensearch/api_op_UpgradeDomain.go | 181 + service/opensearch/deserializers.go | 12267 ++++++++++++++++ service/opensearch/doc.go | 18 + service/opensearch/endpoints.go | 160 + service/opensearch/generated.json | 63 + service/opensearch/go.mod | 10 + service/opensearch/go.sum | 14 + service/opensearch/go_module_metadata.go | 6 + .../internal/endpoints/endpoints.go | 155 + .../internal/endpoints/endpoints_test.go | 11 + service/opensearch/protocol_test.go | 3 + service/opensearch/serializers.go | 3520 +++++ service/opensearch/types/enums.go | 689 + service/opensearch/types/errors.go | 229 + service/opensearch/types/types.go | 1607 ++ service/opensearch/validators.go | 1444 ++ service/outposts/api_op_CreateOrder.go | 134 + service/outposts/deserializers.go | 372 + service/outposts/generated.json | 1 + service/outposts/serializers.go | 116 + service/outposts/types/enums.go | 62 + service/outposts/types/types.go | 58 + service/outposts/validators.go | 45 + .../api_op_AcceptResourceShareInvitation.go | 3 +- service/ram/api_op_AssociateResourceShare.go | 25 +- ...api_op_AssociateResourceSharePermission.go | 4 +- service/ram/api_op_CreateResourceShare.go | 44 +- ..._op_DisassociateResourceSharePermission.go | 5 +- ...api_op_EnableSharingWithAwsOrganization.go | 4 +- service/ram/api_op_GetPermission.go | 4 +- service/ram/api_op_GetResourcePolicies.go | 2 +- service/ram/api_op_GetResourceShares.go | 6 +- service/ram/api_op_ListPermissions.go | 2 +- service/ram/api_op_ListPrincipals.go | 5 +- .../api_op_ListResourceSharePermissions.go | 2 +- service/ram/api_op_ListResourceTypes.go | 4 +- service/ram/api_op_ListResources.go | 7 +- ...p_PromoteResourceShareCreatedFromPolicy.go | 6 +- .../api_op_RejectResourceShareInvitation.go | 3 +- service/ram/api_op_UpdateResourceShare.go | 4 +- service/ram/doc.go | 21 +- service/ram/types/types.go | 75 +- .../sagemaker/internal/endpoints/endpoints.go | 1 + .../internal/endpoints/endpoints.go | 10 + service/ssmcontacts/api_op_CreateContact.go | 3 +- .../api_op_CreateContactChannel.go | 5 +- .../ssmcontacts/api_op_SendActivationCode.go | 5 +- service/ssmcontacts/api_op_StartEngagement.go | 3 +- .../api_op_UpdateContactChannel.go | 2 +- service/ssmcontacts/doc.go | 17 +- service/ssmcontacts/types/errors.go | 7 +- service/ssmcontacts/types/types.go | 2 +- service/xray/api_op_CreateGroup.go | 25 +- service/xray/api_op_CreateSamplingRule.go | 39 +- service/xray/api_op_GetInsightImpactGraph.go | 2 +- service/xray/api_op_GetSamplingTargets.go | 8 +- service/xray/api_op_GetServiceGraph.go | 6 +- service/xray/api_op_GetTraceSummaries.go | 2 +- service/xray/api_op_ListTagsForResource.go | 4 +- service/xray/api_op_PutEncryptionConfig.go | 14 +- service/xray/api_op_PutTelemetryRecords.go | 2 +- service/xray/api_op_PutTraceSegments.go | 32 +- service/xray/api_op_TagResource.go | 11 +- service/xray/api_op_UntagResource.go | 4 +- service/xray/doc.go | 4 +- service/xray/types/types.go | 110 +- 200 files changed, 40385 insertions(+), 624 deletions(-) create mode 100644 .changelog/41575353444b40ffbf474f4155544f00.json create mode 100644 .changelog/8f837f19caba4c6faaf88577e5e9a00e.json create mode 100644 codegen/sdk-codegen/aws-models/opensearch.2021-01-01.json create mode 100644 service/amp/api_op_ListTagsForResource.go create mode 100644 service/amp/api_op_TagResource.go create mode 100644 service/amp/api_op_UntagResource.go create mode 100644 service/eks/api_op_DeregisterCluster.go create mode 100644 service/eks/api_op_RegisterCluster.go create mode 100644 service/kafka/api_op_UpdateSecurity.go create mode 100644 service/opensearch/LICENSE.txt create mode 100644 service/opensearch/api_client.go create mode 100644 service/opensearch/api_op_AcceptInboundConnection.go create mode 100644 service/opensearch/api_op_AddTags.go create mode 100644 service/opensearch/api_op_AssociatePackage.go create mode 100644 service/opensearch/api_op_CancelServiceSoftwareUpdate.go create mode 100644 service/opensearch/api_op_CreateDomain.go create mode 100644 service/opensearch/api_op_CreateOutboundConnection.go create mode 100644 service/opensearch/api_op_CreatePackage.go create mode 100644 service/opensearch/api_op_DeleteDomain.go create mode 100644 service/opensearch/api_op_DeleteInboundConnection.go create mode 100644 service/opensearch/api_op_DeleteOutboundConnection.go create mode 100644 service/opensearch/api_op_DeletePackage.go create mode 100644 service/opensearch/api_op_DescribeDomain.go create mode 100644 service/opensearch/api_op_DescribeDomainAutoTunes.go create mode 100644 service/opensearch/api_op_DescribeDomainConfig.go create mode 100644 service/opensearch/api_op_DescribeDomains.go create mode 100644 service/opensearch/api_op_DescribeInboundConnections.go create mode 100644 service/opensearch/api_op_DescribeInstanceTypeLimits.go create mode 100644 service/opensearch/api_op_DescribeOutboundConnections.go create mode 100644 service/opensearch/api_op_DescribePackages.go create mode 100644 service/opensearch/api_op_DescribeReservedInstanceOfferings.go create mode 100644 service/opensearch/api_op_DescribeReservedInstances.go create mode 100644 service/opensearch/api_op_DissociatePackage.go create mode 100644 service/opensearch/api_op_GetCompatibleVersions.go create mode 100644 service/opensearch/api_op_GetPackageVersionHistory.go create mode 100644 service/opensearch/api_op_GetUpgradeHistory.go create mode 100644 service/opensearch/api_op_GetUpgradeStatus.go create mode 100644 service/opensearch/api_op_ListDomainNames.go create mode 100644 service/opensearch/api_op_ListDomainsForPackage.go create mode 100644 service/opensearch/api_op_ListInstanceTypeDetails.go create mode 100644 service/opensearch/api_op_ListPackagesForDomain.go create mode 100644 service/opensearch/api_op_ListTags.go create mode 100644 service/opensearch/api_op_ListVersions.go create mode 100644 service/opensearch/api_op_PurchaseReservedInstanceOffering.go create mode 100644 service/opensearch/api_op_RejectInboundConnection.go create mode 100644 service/opensearch/api_op_RemoveTags.go create mode 100644 service/opensearch/api_op_StartServiceSoftwareUpdate.go create mode 100644 service/opensearch/api_op_UpdateDomainConfig.go create mode 100644 service/opensearch/api_op_UpdatePackage.go create mode 100644 service/opensearch/api_op_UpgradeDomain.go create mode 100644 service/opensearch/deserializers.go create mode 100644 service/opensearch/doc.go create mode 100644 service/opensearch/endpoints.go create mode 100644 service/opensearch/generated.json create mode 100644 service/opensearch/go.mod create mode 100644 service/opensearch/go.sum create mode 100644 service/opensearch/go_module_metadata.go create mode 100644 service/opensearch/internal/endpoints/endpoints.go create mode 100644 service/opensearch/internal/endpoints/endpoints_test.go create mode 100644 service/opensearch/protocol_test.go create mode 100644 service/opensearch/serializers.go create mode 100644 service/opensearch/types/enums.go create mode 100644 service/opensearch/types/errors.go create mode 100644 service/opensearch/types/types.go create mode 100644 service/opensearch/validators.go create mode 100644 service/outposts/api_op_CreateOrder.go diff --git a/.changelog/41575353444b40ffbf474f4155544f00.json b/.changelog/41575353444b40ffbf474f4155544f00.json new file mode 100644 index 00000000000..8a943419090 --- /dev/null +++ b/.changelog/41575353444b40ffbf474f4155544f00.json @@ -0,0 +1,8 @@ +{ + "id": "41575353-444b-40ff-bf47-4f4155544f00", + "type": "release", + "description": "New AWS service client module", + "modules": [ + "service/opensearch" + ] +} \ No newline at end of file diff --git a/.changelog/8f837f19caba4c6faaf88577e5e9a00e.json b/.changelog/8f837f19caba4c6faaf88577e5e9a00e.json new file mode 100644 index 00000000000..92a2baff293 --- /dev/null +++ b/.changelog/8f837f19caba4c6faaf88577e5e9a00e.json @@ -0,0 +1,27 @@ +{ + "id": "8f837f19-caba-4c6f-aaf8-8577e5e9a00e", + "type": "feature", + "description": "API client updated", + "modules": [ + "service/amp", + "service/braket", + "service/chimesdkidentity", + "service/chimesdkmessaging", + "service/codegurureviewer", + "service/eks", + "service/elasticache", + "service/emr", + "service/forecast", + "service/frauddetector", + "service/kafka", + "service/lookoutequipment", + "service/mediapackage", + "service/opensearch", + "service/outposts", + "service/ram", + "service/sagemaker", + "service/servicediscovery", + "service/ssmcontacts", + "service/xray" + ] +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/amp.2020-08-01.json b/codegen/sdk-codegen/aws-models/amp.2020-08-01.json index cd66167b68b..b9b38326f4b 100644 --- a/codegen/sdk-codegen/aws-models/amp.2020-08-01.json +++ b/codegen/sdk-codegen/aws-models/amp.2020-08-01.json @@ -21,6 +21,17 @@ "com.amazonaws.amp#AmazonPrometheusService": { "type": "service", "version": "2020-08-01", + "operations": [ + { + "target": "com.amazonaws.amp#ListTagsForResource" + }, + { + "target": "com.amazonaws.amp#TagResource" + }, + { + "target": "com.amazonaws.amp#UntagResource" + } + ], "resources": [ { "target": "com.amazonaws.amp#Workspace" @@ -31,7 +42,8 @@ "sdkId": "amp", "arnNamespace": "aps", "cloudFormationName": "AmazonPrometheusService", - "cloudTrailEventSource": "CLOUDTRAIL_PLACEHOLDER_REPLACED_BY_CDK" + "cloudTrailEventSource": "CLOUDTRAIL_PLACEHOLDER_REPLACED_BY_CDK", + "endpointPrefix": "aps" }, "aws.auth#sigv4": { "name": "aps" @@ -148,6 +160,12 @@ "smithy.api#documentation": "Optional, unique, case-sensitive, user-provided identifier to ensure the idempotency of the request.", "smithy.api#idempotencyToken": {} } + }, + "tags": { + "target": "com.amazonaws.amp#TagMap", + "traits": { + "smithy.api#documentation": "Optional, user-provided tags for this workspace." + } } }, "traits": { @@ -177,6 +195,12 @@ "smithy.api#documentation": "The status of the workspace that was just created (usually CREATING).", "smithy.api#required": {} } + }, + "tags": { + "target": "com.amazonaws.amp#TagMap", + "traits": { + "smithy.api#documentation": "The tags of this workspace." + } } }, "traits": { @@ -341,6 +365,62 @@ "smithy.api#retryable": {} } }, + "com.amazonaws.amp#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.amp#ListTagsForResourceRequest" + }, + "output": { + "target": "com.amazonaws.amp#ListTagsForResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amp#AccessDeniedException" + }, + { + "target": "com.amazonaws.amp#InternalServerException" + }, + { + "target": "com.amazonaws.amp#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.amp#ThrottlingException" + }, + { + "target": "com.amazonaws.amp#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Lists the tags you have assigned to the resource.", + "smithy.api#http": { + "method": "GET", + "uri": "/tags/{resourceArn}", + "code": 200 + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.amp#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ARN of the resource.", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.amp#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "tags": { + "target": "com.amazonaws.amp#TagMap" + } + } + }, "com.amazonaws.amp#ListWorkspaces": { "type": "operation", "input": { @@ -515,6 +595,110 @@ "smithy.api#httpError": 402 } }, + "com.amazonaws.amp#TagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$" + } + }, + "com.amazonaws.amp#TagKeys": { + "type": "list", + "member": { + "target": "com.amazonaws.amp#TagKey" + } + }, + "com.amazonaws.amp#TagMap": { + "type": "map", + "key": { + "target": "com.amazonaws.amp#TagKey", + "traits": { + "smithy.api#documentation": "The key of the tag.\n\nConstraints: Tag keys are case-sensitive and accept a maximum of 128 Unicode characters.\nValid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @\nMay not begin with `aws:`.\n" + } + }, + "value": { + "target": "com.amazonaws.amp#TagValue", + "traits": { + "smithy.api#documentation": "The value of the tag.\n\nConstraints: Tag values are case-sensitive and accept a maximum of 256 Unicode characters.\nValid characters are Unicode letters, digits, white space, and any of the following symbols: _ . : / = + - @\n" + } + }, + "traits": { + "smithy.api#documentation": "The list of tags assigned to the resource.", + "smithy.api#length": { + "max": 50 + } + } + }, + "com.amazonaws.amp#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.amp#TagResourceRequest" + }, + "output": { + "target": "com.amazonaws.amp#TagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amp#AccessDeniedException" + }, + { + "target": "com.amazonaws.amp#InternalServerException" + }, + { + "target": "com.amazonaws.amp#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.amp#ThrottlingException" + }, + { + "target": "com.amazonaws.amp#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Creates tags for the specified resource.", + "smithy.api#http": { + "method": "POST", + "uri": "/tags/{resourceArn}", + "code": 200 + } + } + }, + "com.amazonaws.amp#TagResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ARN of the resource.", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.amp#TagMap", + "traits": { + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.amp#TagResourceResponse": { + "type": "structure", + "members": {} + }, + "com.amazonaws.amp#TagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + }, + "smithy.api#pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$" + } + }, "com.amazonaws.amp#ThrottlingException": { "type": "structure", "members": { @@ -552,6 +736,66 @@ "smithy.api#retryable": {} } }, + "com.amazonaws.amp#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.amp#UntagResourceRequest" + }, + "output": { + "target": "com.amazonaws.amp#UntagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.amp#AccessDeniedException" + }, + { + "target": "com.amazonaws.amp#InternalServerException" + }, + { + "target": "com.amazonaws.amp#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.amp#ThrottlingException" + }, + { + "target": "com.amazonaws.amp#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes tags from the specified resource.", + "smithy.api#http": { + "method": "DELETE", + "uri": "/tags/{resourceArn}", + "code": 200 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.amp#UntagResourceRequest": { + "type": "structure", + "members": { + "resourceArn": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "The ARN of the resource.", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "tagKeys": { + "target": "com.amazonaws.amp#TagKeys", + "traits": { + "smithy.api#documentation": "One or more tag keys", + "smithy.api#httpQuery": "tagKeys", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.amp#UntagResourceResponse": { + "type": "structure", + "members": {} + }, "com.amazonaws.amp#UpdateWorkspaceAlias": { "type": "operation", "input": { @@ -808,6 +1052,12 @@ "smithy.api#documentation": "The time when the workspace was created.", "smithy.api#required": {} } + }, + "tags": { + "target": "com.amazonaws.amp#TagMap", + "traits": { + "smithy.api#documentation": "The tags of this workspace." + } } }, "traits": { @@ -914,6 +1164,12 @@ "smithy.api#documentation": "The time when the workspace was created.", "smithy.api#required": {} } + }, + "tags": { + "target": "com.amazonaws.amp#TagMap", + "traits": { + "smithy.api#documentation": "The tags of this workspace." + } } }, "traits": { diff --git a/codegen/sdk-codegen/aws-models/chimesdkidentity.2021-04-20.json b/codegen/sdk-codegen/aws-models/chimesdkidentity.2021-04-20.json index 93ac1615003..7dd7224e1f9 100644 --- a/codegen/sdk-codegen/aws-models/chimesdkidentity.2021-04-20.json +++ b/codegen/sdk-codegen/aws-models/chimesdkidentity.2021-04-20.json @@ -334,7 +334,7 @@ "name": "chime" }, "aws.protocols#restJson1": {}, - "smithy.api#documentation": "

The Amazon Chime SDK Identity APIs in this section allow software developers to create\n and manage unique instances of their messaging applications. These APIs provide the\n overarching framework for creating and sending messages. For more information about the\n identity APIs, refer to .

", + "smithy.api#documentation": "

The Amazon Chime SDK Identity APIs in this section allow software developers to create\n and manage unique instances of their messaging applications. These APIs provide the\n overarching framework for creating and sending messages. For more information about the\n identity APIs, refer to Amazon Chime SDK identity.

", "smithy.api#title": "Amazon Chime SDK Identity" } }, diff --git a/codegen/sdk-codegen/aws-models/chimesdkmessaging.2021-05-15.json b/codegen/sdk-codegen/aws-models/chimesdkmessaging.2021-05-15.json index 0877d8ea9ca..6f8ef575365 100644 --- a/codegen/sdk-codegen/aws-models/chimesdkmessaging.2021-05-15.json +++ b/codegen/sdk-codegen/aws-models/chimesdkmessaging.2021-05-15.json @@ -877,7 +877,7 @@ "name": "chime" }, "aws.protocols#restJson1": {}, - "smithy.api#documentation": "

The Amazon Chime SDK Messaging APIs in this section allow software developers to send\n and receive messages in custom messaging applications. These APIs depend on the frameworks\n provided by the Amazon Chime SDK Identity APIs. For more information about the messaging\n APIs, see .

", + "smithy.api#documentation": "

The Amazon Chime SDK Messaging APIs in this section allow software developers to send\n and receive messages in custom messaging applications. These APIs depend on the frameworks\n provided by the Amazon Chime SDK Identity APIs. For more information about the messaging\n APIs, see Amazon Chime SDK messaging\n

", "smithy.api#title": "Amazon Chime SDK Messaging" } }, diff --git a/codegen/sdk-codegen/aws-models/codegurureviewer.2019-09-19.json b/codegen/sdk-codegen/aws-models/codegurureviewer.2019-09-19.json index 611e59a82e8..3791667bc30 100644 --- a/codegen/sdk-codegen/aws-models/codegurureviewer.2019-09-19.json +++ b/codegen/sdk-codegen/aws-models/codegurureviewer.2019-09-19.json @@ -88,7 +88,7 @@ "name": "codeguru-reviewer" }, "aws.protocols#restJson1": {}, - "smithy.api#documentation": "

This section provides documentation for the Amazon CodeGuru Reviewer API operations. CodeGuru Reviewer is a service\n that uses program analysis and machine learning to detect potential defects that are difficult for developers to find and recommends\n fixes in your Java and Python code.

\n \n

By proactively detecting and providing recommendations for addressing code defects and implementing best practices, CodeGuru Reviewer\n improves the overall quality and maintainability of your code base during the code review stage. For more information about CodeGuru Reviewer, see the \n \n Amazon CodeGuru Reviewer User Guide.\n

\n \n

\n To improve the security of your CodeGuru Reviewer API calls, you can establish a private connection between your VPC and CodeGuru Reviewer by \n creating an interface VPC endpoint. For more information, see \n CodeGuru Reviewer and interface \n VPC endpoints (AWS PrivateLink) in the Amazon CodeGuru Reviewer User Guide.\n

", + "smithy.api#documentation": "

This section provides documentation for the Amazon CodeGuru Reviewer API operations. CodeGuru Reviewer is a service\n that uses program analysis and machine learning to detect potential defects that are difficult for developers to find and recommends\n fixes in your Java and Python code.

\n \n

By proactively detecting and providing recommendations for addressing code defects and implementing best practices, CodeGuru Reviewer\n improves the overall quality and maintainability of your code base during the code review stage. For more information about CodeGuru Reviewer, see the \n \n Amazon CodeGuru Reviewer User Guide.\n

\n \n

\n To improve the security of your CodeGuru Reviewer API calls, you can establish a private connection between your VPC and CodeGuru Reviewer by \n creating an interface VPC endpoint. For more information, see \n CodeGuru Reviewer and interface \n VPC endpoints (Amazon Web Services PrivateLink) in the Amazon CodeGuru Reviewer User Guide.\n

", "smithy.api#title": "Amazon CodeGuru Reviewer" } }, @@ -162,7 +162,7 @@ } ], "traits": { - "smithy.api#documentation": "

\n Use to associate an AWS CodeCommit repository or a repostory managed by \n AWS CodeStar Connections with Amazon CodeGuru Reviewer. When you associate a \n repository, CodeGuru Reviewer reviews source code changes in the repository's pull requests and provides \n automatic recommendations. You can view recommendations using the CodeGuru Reviewer console. For more information, see \n Recommendations in \n Amazon CodeGuru Reviewer in the Amazon CodeGuru Reviewer User Guide. \n

\n \n

If you associate a CodeCommit or S3 repository, it must be in the same \n AWS Region and AWS account where its CodeGuru Reviewer code reviews are configured.

\n \n

Bitbucket and GitHub Enterprise Server repositories are managed by AWS CodeStar\n Connections to connect to CodeGuru Reviewer. For more information, see Associate a repository in\n the Amazon CodeGuru Reviewer User Guide.\n

\n \n \n

\n You cannot use the CodeGuru Reviewer SDK or the AWS CLI to associate a GitHub repository with Amazon CodeGuru Reviewer. To associate \n a GitHub repository, use the console. For more information, see \n Getting \n started with CodeGuru Reviewer in the CodeGuru Reviewer User Guide.\n

\n
", + "smithy.api#documentation": "

\n Use to associate an Amazon Web Services CodeCommit repository or a repostory managed by \n Amazon Web Services CodeStar Connections with Amazon CodeGuru Reviewer. When you associate a \n repository, CodeGuru Reviewer reviews source code changes in the repository's pull requests and provides \n automatic recommendations. You can view recommendations using the CodeGuru Reviewer console. For more information, see \n Recommendations in \n Amazon CodeGuru Reviewer in the Amazon CodeGuru Reviewer User Guide. \n

\n \n

If you associate a CodeCommit or S3 repository, it must be in the same \n Amazon Web Services Region and Amazon Web Services account where its CodeGuru Reviewer code reviews are configured.

\n \n

Bitbucket and GitHub Enterprise Server repositories are managed by Amazon Web Services CodeStar\n Connections to connect to CodeGuru Reviewer. For more information, see Associate a repository in\n the Amazon CodeGuru Reviewer User Guide.\n

\n \n \n

\n You cannot use the CodeGuru Reviewer SDK or the Amazon Web Services CLI to associate a GitHub repository with Amazon CodeGuru Reviewer. To associate \n a GitHub repository, use the console. For more information, see \n Getting \n started with CodeGuru Reviewer in the CodeGuru Reviewer User Guide.\n

\n
", "smithy.api#http": { "method": "POST", "uri": "/associations", @@ -196,7 +196,7 @@ "KMSKeyDetails": { "target": "com.amazonaws.codegurureviewer#KMSKeyDetails", "traits": { - "smithy.api#documentation": "

A KMSKeyDetails object that contains:

\n " + "smithy.api#documentation": "

A KMSKeyDetails object that contains:

\n " } } } @@ -315,13 +315,13 @@ "Name": { "target": "com.amazonaws.codegurureviewer#Name", "traits": { - "smithy.api#documentation": "

The name of the AWS CodeCommit repository. For more information, see \n repositoryName \n in the AWS CodeCommit API Reference.

", + "smithy.api#documentation": "

The name of the Amazon Web Services CodeCommit repository. For more information, see \n repositoryName \n in the Amazon Web Services CodeCommit API Reference.

", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

Information about an AWS CodeCommit repository. The CodeCommit repository must be in the same \n AWS Region and AWS account where its CodeGuru Reviewer code reviews are configured.

" + "smithy.api#documentation": "

Information about an Amazon Web Services CodeCommit repository. The CodeCommit repository must be in the same \n Amazon Web Services Region and Amazon Web Services account where its CodeGuru Reviewer code reviews are configured.

" } }, "com.amazonaws.codegurureviewer#CodeReview": { @@ -348,7 +348,7 @@ "Owner": { "target": "com.amazonaws.codegurureviewer#Owner", "traits": { - "smithy.api#documentation": "

The owner of the repository. For an AWS CodeCommit repository, this is the AWS account ID of the \n account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository.\n For an S3 repository, it can be the username or AWS account ID.

" + "smithy.api#documentation": "

The owner of the repository. For an Amazon Web Services CodeCommit repository, this is the Amazon Web Services account ID of the \n account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository.\n For an S3 repository, it can be the username or Amazon Web Services account ID.

" } }, "ProviderType": { @@ -462,7 +462,7 @@ "Owner": { "target": "com.amazonaws.codegurureviewer#Owner", "traits": { - "smithy.api#documentation": "

The owner of the repository. For an AWS CodeCommit repository, this is the AWS account ID of the \n account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository.\n For an S3 repository, it can be the username or AWS account ID.

" + "smithy.api#documentation": "

The owner of the repository. For an Amazon Web Services CodeCommit repository, this is the Amazon Web Services account ID of the \n account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository.\n For an S3 repository, it can be the username or Amazon Web Services account ID.

" } }, "ProviderType": { @@ -637,7 +637,7 @@ "Name": { "target": "com.amazonaws.codegurureviewer#CodeReviewName", "traits": { - "smithy.api#documentation": "

\n The name of the code review. The name of each code review in your AWS account must be unique.\n

", + "smithy.api#documentation": "

\n The name of the code review. The name of each code review in your Amazon Web Services account must be unique.\n

", "smithy.api#required": {} } }, @@ -814,7 +814,7 @@ "UserId": { "target": "com.amazonaws.codegurureviewer#UserId", "traits": { - "smithy.api#documentation": "

\n Optional parameter to describe the feedback for a given user. If this is not supplied, it defaults to the user making the request.\n

\n

\n The UserId is an IAM principal that can be specified as an AWS account ID or an Amazon Resource Name (ARN). For \n more information, see \n Specifying a Principal in the AWS Identity and Access Management User Guide.\n

", + "smithy.api#documentation": "

\n Optional parameter to describe the feedback for a given user. If this is not supplied, it defaults to the user making the request.\n

\n

\n The UserId is an IAM principal that can be specified as an Amazon Web Services account ID or an Amazon Resource Name (ARN). For \n more information, see \n Specifying a Principal in the Amazon Web Services Identity and Access Management User Guide.\n

", "smithy.api#httpQuery": "UserId" } } @@ -1117,18 +1117,18 @@ "KMSKeyId": { "target": "com.amazonaws.codegurureviewer#KMSKeyId", "traits": { - "smithy.api#documentation": "

The ID of the AWS KMS key that is associated with a respository association.

" + "smithy.api#documentation": "

The ID of the Amazon Web Services KMS key that is associated with a respository association.

" } }, "EncryptionOption": { "target": "com.amazonaws.codegurureviewer#EncryptionOption", "traits": { - "smithy.api#documentation": "

The encryption option for a repository association. It is either owned by AWS \n Key Management Service (KMS) (AWS_OWNED_CMK) or customer managed (CUSTOMER_MANAGED_CMK).

" + "smithy.api#documentation": "

The encryption option for a repository association. It is either owned by Amazon Web Services \n Key Management Service (KMS) (AWS_OWNED_CMK) or customer managed (CUSTOMER_MANAGED_CMK).

" } } }, "traits": { - "smithy.api#documentation": "

An object that contains:

\n " + "smithy.api#documentation": "

An object that contains:

\n " } }, "com.amazonaws.codegurureviewer#KMSKeyId": { @@ -1325,7 +1325,7 @@ "UserIds": { "target": "com.amazonaws.codegurureviewer#UserIds", "traits": { - "smithy.api#documentation": "

\n An AWS user's account ID or Amazon Resource Name (ARN). Use this ID to query the recommendation feedback for a code review from that user.\n

\n

\n The UserId is an IAM principal that can be specified as an AWS account ID or an Amazon Resource Name (ARN). For \n more information, see \n Specifying a Principal in the AWS Identity and Access Management User Guide.\n

", + "smithy.api#documentation": "

\n An Amazon Web Services user's account ID or Amazon Resource Name (ARN). Use this ID to query the recommendation feedback for a code review from that user.\n

\n

\n The UserId is an IAM principal that can be specified as an Amazon Web Services account ID or an Amazon Resource Name (ARN). For \n more information, see \n Specifying a Principal in the Amazon Web Services Identity and Access Management User Guide.\n

", "smithy.api#httpQuery": "UserIds" } }, @@ -1498,7 +1498,7 @@ "Owners": { "target": "com.amazonaws.codegurureviewer#Owners", "traits": { - "smithy.api#documentation": "

List of owners to use as a filter. \n For AWS CodeCommit, it is the name of the CodeCommit account that was\n used to associate the repository. For other repository source providers, such as Bitbucket and GitHub Enterprise Server, this is name of the account \n that was used to associate the repository.

", + "smithy.api#documentation": "

List of owners to use as a filter. \n For Amazon Web Services CodeCommit, it is the name of the CodeCommit account that was\n used to associate the repository. For other repository source providers, such as Bitbucket and GitHub Enterprise Server, this is name of the account \n that was used to associate the repository.

", "smithy.api#httpQuery": "Owner" } }, @@ -1587,6 +1587,16 @@ } } }, + "com.amazonaws.codegurureviewer#LongDescription": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1000 + }, + "smithy.api#pattern": "^\\S(.*\\S)?$" + } + }, "com.amazonaws.codegurureviewer#MaxResults": { "type": "integer", "traits": { @@ -1609,7 +1619,7 @@ "MeteredLinesOfCodeCount": { "target": "com.amazonaws.codegurureviewer#MeteredLinesOfCodeCount", "traits": { - "smithy.api#documentation": "

\n Lines of code metered in the code review. For the initial code review pull request and all subsequent revisions, \n this includes all lines of code in the files added to the pull request. In subsequent revisions, for files that already \n existed in the pull request, this includes only the changed lines of code. In both cases, this does not include non-code lines such as comments \n and import statements. For example, if you submit a pull request containing 5 files, each with 500 lines of code, and in \n a subsequent revision you added a new file with 200 lines of code, and also modified a total of 25 lines across the initial 5 files, \n MeteredLinesOfCodeCount includes the first 5 files (5 * 500 = 2,500 lines), the new file (200 lines) and the 25 changed lines of\n code for a total of 2,725 lines of code.\n

" + "smithy.api#documentation": "

\n MeteredLinesOfCode is the number of lines of code in the repository where the code review happened. \n This does not include non-code lines such as comments and blank lines.\n

" } }, "FindingsCount": { @@ -1891,6 +1901,10 @@ { "value": "SecurityIssues", "name": "SECURITY_ISSUES" + }, + { + "value": "CodeInconsistencies", + "name": "CODE_INCONSISTENCIES" } ] } @@ -1919,7 +1933,7 @@ "UserId": { "target": "com.amazonaws.codegurureviewer#UserId", "traits": { - "smithy.api#documentation": "

\n The ID of the user that made the API call.\n

\n

\n The UserId is an IAM principal that can be specified as an AWS account ID or an Amazon Resource Name (ARN). For \n more information, see \n Specifying a Principal in the AWS Identity and Access Management User Guide.\n

" + "smithy.api#documentation": "

\n The ID of the user that made the API call.\n

\n

\n The UserId is an IAM principal that can be specified as an Amazon Web Services account ID or an Amazon Resource Name (ARN). For \n more information, see \n Specifying a Principal in the Amazon Web Services Identity and Access Management User Guide.\n

" } }, "CreatedTimeStamp": { @@ -1963,7 +1977,7 @@ "UserId": { "target": "com.amazonaws.codegurureviewer#UserId", "traits": { - "smithy.api#documentation": "

\n The ID of the user that gave the feedback.\n

\n

\n The UserId is an IAM principal that can be specified as an AWS account ID or an Amazon Resource Name (ARN). For \n more information, see \n Specifying a Principal in the AWS Identity and Access Management User Guide.\n

" + "smithy.api#documentation": "

\n The ID of the user that gave the feedback.\n

\n

\n The UserId is an IAM principal that can be specified as an Amazon Web Services account ID or an Amazon Resource Name (ARN). For \n more information, see \n Specifying a Principal in the Amazon Web Services Identity and Access Management User Guide.\n

" } } }, @@ -2036,6 +2050,18 @@ "traits": { "smithy.api#documentation": "

The type of a recommendation.

" } + }, + "RuleMetadata": { + "target": "com.amazonaws.codegurureviewer#RuleMetadata", + "traits": { + "smithy.api#documentation": "

Metadata about a rule. Rule metadata includes an ID, a name, a list of tags, and a \n short and long description. CodeGuru Reviewer uses rules to analyze code. A rule's recommendation is \n included in analysis results if code is detected that violates the rule.

" + } + }, + "Severity": { + "target": "com.amazonaws.codegurureviewer#Severity", + "traits": { + "smithy.api#documentation": "

The severity of the issue in the code that generated this recommendation.

" + } } }, "traits": { @@ -2048,7 +2074,7 @@ "CodeCommit": { "target": "com.amazonaws.codegurureviewer#CodeCommitRepository", "traits": { - "smithy.api#documentation": "

Information about an AWS CodeCommit repository.

" + "smithy.api#documentation": "

Information about an Amazon Web Services CodeCommit repository.

" } }, "Bitbucket": { @@ -2068,7 +2094,7 @@ } }, "traits": { - "smithy.api#documentation": "

\n Information about an associated AWS CodeCommit repository or an associated repository that is managed \n by AWS CodeStar Connections (for example, Bitbucket). This Repository object \n is not used if your source code is in an associated GitHub repository.\n

" + "smithy.api#documentation": "

\n Information about an associated Amazon Web Services CodeCommit repository or an associated repository that is managed \n by Amazon Web Services CodeStar Connections (for example, Bitbucket). This Repository object \n is not used if your source code is in an associated GitHub repository.\n

" } }, "com.amazonaws.codegurureviewer#RepositoryAnalysis": { @@ -2106,7 +2132,7 @@ "ConnectionArn": { "target": "com.amazonaws.codegurureviewer#ConnectionArn", "traits": { - "smithy.api#documentation": "

\n The Amazon Resource Name (ARN) of an AWS CodeStar Connections connection. Its format is \n arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id. For more information, see \n \n Connection\n in \n the AWS CodeStar Connections API Reference.\n

" + "smithy.api#documentation": "

\n The Amazon Resource Name (ARN) of an Amazon Web Services CodeStar Connections connection. Its format is \n arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id. For more information, see \n \n Connection\n in \n the Amazon Web Services CodeStar Connections API Reference.\n

" } }, "Name": { @@ -2118,7 +2144,7 @@ "Owner": { "target": "com.amazonaws.codegurureviewer#Owner", "traits": { - "smithy.api#documentation": "

The owner of the repository. For an AWS CodeCommit repository, this is the AWS account ID of the \n account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository.\n For an S3 repository, it can be the username or AWS account ID.

" + "smithy.api#documentation": "

The owner of the repository. For an Amazon Web Services CodeCommit repository, this is the Amazon Web Services account ID of the \n account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository.\n For an S3 repository, it can be the username or Amazon Web Services account ID.

" } }, "ProviderType": { @@ -2154,7 +2180,7 @@ "KMSKeyDetails": { "target": "com.amazonaws.codegurureviewer#KMSKeyDetails", "traits": { - "smithy.api#documentation": "

A KMSKeyDetails object that contains:

\n " + "smithy.api#documentation": "

A KMSKeyDetails object that contains:

\n " } }, "S3RepositoryDetails": { @@ -2222,7 +2248,7 @@ "ConnectionArn": { "target": "com.amazonaws.codegurureviewer#ConnectionArn", "traits": { - "smithy.api#documentation": "

\n The Amazon Resource Name (ARN) of an AWS CodeStar Connections connection. Its format is \n arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id. For more information, see \n \n Connection\n in \n the AWS CodeStar Connections API Reference.\n

" + "smithy.api#documentation": "

\n The Amazon Resource Name (ARN) of an Amazon Web Services CodeStar Connections connection. Its format is \n arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id. For more information, see \n \n Connection\n in \n the Amazon Web Services CodeStar Connections API Reference.\n

" } }, "LastUpdatedTimeStamp": { @@ -2246,7 +2272,7 @@ "Owner": { "target": "com.amazonaws.codegurureviewer#Owner", "traits": { - "smithy.api#documentation": "

The owner of the repository. For an AWS CodeCommit repository, this is the AWS account ID of the \n account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository.\n For an S3 repository, it can be the username or AWS account ID.

" + "smithy.api#documentation": "

The owner of the repository. For an Amazon Web Services CodeCommit repository, this is the Amazon Web Services account ID of the \n account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository.\n For an S3 repository, it can be the username or Amazon Web Services account ID.

" } }, "ProviderType": { @@ -2357,6 +2383,86 @@ "smithy.api#httpError": 404 } }, + "com.amazonaws.codegurureviewer#RuleId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": "^\\S+\\/[a-zA-Z0-9-]+@v\\d+\\.\\d+$" + } + }, + "com.amazonaws.codegurureviewer#RuleMetadata": { + "type": "structure", + "members": { + "RuleId": { + "target": "com.amazonaws.codegurureviewer#RuleId", + "traits": { + "smithy.api#documentation": "

The ID of the rule.

" + } + }, + "RuleName": { + "target": "com.amazonaws.codegurureviewer#RuleName", + "traits": { + "smithy.api#documentation": "

The name of the rule.

" + } + }, + "ShortDescription": { + "target": "com.amazonaws.codegurureviewer#ShortDescription", + "traits": { + "smithy.api#documentation": "

A short description of the rule.

" + } + }, + "LongDescription": { + "target": "com.amazonaws.codegurureviewer#LongDescription", + "traits": { + "smithy.api#documentation": "

A long description of the rule.

" + } + }, + "RuleTags": { + "target": "com.amazonaws.codegurureviewer#RuleTags", + "traits": { + "smithy.api#documentation": "

Tags that are associated with the rule.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Metadata about a rule. Rule metadata includes an ID, a name, a list of tags, and a \n short and long description. CodeGuru Reviewer uses rules to analyze code. A rule's recommendation is \n included in analysis results if code is detected that violates the rule.

" + } + }, + "com.amazonaws.codegurureviewer#RuleName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + }, + "smithy.api#pattern": "^\\S(.*\\S)?$" + } + }, + "com.amazonaws.codegurureviewer#RuleTag": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 50 + }, + "smithy.api#pattern": "^\\S(.*\\S)?$" + } + }, + "com.amazonaws.codegurureviewer#RuleTags": { + "type": "list", + "member": { + "target": "com.amazonaws.codegurureviewer#RuleTag" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 20 + } + } + }, "com.amazonaws.codegurureviewer#S3BucketName": { "type": "string", "traits": { @@ -2430,6 +2536,43 @@ "smithy.api#documentation": "

\n Specifies the name of an S3 bucket and a CodeArtifacts object that contains the S3 \n object keys for a source code .zip file and for a build artifacts .zip file that contains .jar or .class files.\n

" } }, + "com.amazonaws.codegurureviewer#Severity": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "Info", + "name": "INFO" + }, + { + "value": "Low", + "name": "LOW" + }, + { + "value": "Medium", + "name": "MEDIUM" + }, + { + "value": "High", + "name": "HIGH" + }, + { + "value": "Critical", + "name": "CRITICAL" + } + ] + } + }, + "com.amazonaws.codegurureviewer#ShortDescription": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 200 + }, + "smithy.api#pattern": "^\\S(.*\\S)?$" + } + }, "com.amazonaws.codegurureviewer#SourceCodeArtifactsObjectKey": { "type": "string", "traits": { @@ -2603,14 +2746,14 @@ "ConnectionArn": { "target": "com.amazonaws.codegurureviewer#ConnectionArn", "traits": { - "smithy.api#documentation": "

\n The Amazon Resource Name (ARN) of an AWS CodeStar Connections connection. Its format is \n arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id. For more information, see \n \n Connection\n in \n the AWS CodeStar Connections API Reference.\n

", + "smithy.api#documentation": "

\n The Amazon Resource Name (ARN) of an Amazon Web Services CodeStar Connections connection. Its format is \n arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id. For more information, see \n \n Connection\n in \n the Amazon Web Services CodeStar Connections API Reference.\n

", "smithy.api#required": {} } }, "Owner": { "target": "com.amazonaws.codegurureviewer#Owner", "traits": { - "smithy.api#documentation": "

\n The owner of the repository. For a GitHub, GitHub Enterprise, or Bitbucket repository, \n this is the username for the account that owns the repository. For an S3 repository, \n this can be the username or AWS account ID.\n

", + "smithy.api#documentation": "

\n The owner of the repository. For a GitHub, GitHub Enterprise, or Bitbucket repository, \n this is the username for the account that owns the repository. For an S3 repository, \n this can be the username or Amazon Web Services account ID.\n

", "smithy.api#required": {} } } diff --git a/codegen/sdk-codegen/aws-models/eks.2017-11-01.json b/codegen/sdk-codegen/aws-models/eks.2017-11-01.json index 46b1d0b05a4..7f8cc12e57f 100644 --- a/codegen/sdk-codegen/aws-models/eks.2017-11-01.json +++ b/codegen/sdk-codegen/aws-models/eks.2017-11-01.json @@ -86,6 +86,9 @@ { "target": "com.amazonaws.eks#DeleteNodegroup" }, + { + "target": "com.amazonaws.eks#DeregisterCluster" + }, { "target": "com.amazonaws.eks#DescribeAddon" }, @@ -131,6 +134,9 @@ { "target": "com.amazonaws.eks#ListUpdates" }, + { + "target": "com.amazonaws.eks#RegisterCluster" + }, { "target": "com.amazonaws.eks#TagResource" }, @@ -781,7 +787,7 @@ "tags": { "target": "com.amazonaws.eks#TagMap", "traits": { - "smithy.api#documentation": "

The metadata that you apply to the cluster to assist with categorization and\n organization. Each tag consists of a key and an optional value, both of which you\n define. Cluster tags do not propagate to any other resources associated with the\n cluster.

" + "smithy.api#documentation": "

The metadata that you apply to the cluster to assist with categorization and\n organization. Each tag consists of a key and an optional value, both of which you\n define. Cluster tags do not propagate to any other resources associated with the\n cluster.

" } }, "encryptionConfig": { @@ -789,6 +795,12 @@ "traits": { "smithy.api#documentation": "

The encryption configuration for the cluster.

" } + }, + "connectorConfig": { + "target": "com.amazonaws.eks#ConnectorConfigResponse", + "traits": { + "smithy.api#documentation": "

The configuration used to connect to a cluster for registration.

" + } } }, "traits": { @@ -828,6 +840,10 @@ { "value": "UPDATING", "name": "UPDATING" + }, + { + "value": "PENDING", + "name": "PENDING" } ] } @@ -864,6 +880,109 @@ "smithy.api#documentation": "

Compatibility information.

" } }, + "com.amazonaws.eks#ConnectorConfigProvider": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "EKS_ANYWHERE", + "name": "EKS_ANYWHERE" + }, + { + "value": "ANTHOS", + "name": "ANTHOS" + }, + { + "value": "GKE", + "name": "GKE" + }, + { + "value": "AKS", + "name": "AKS" + }, + { + "value": "OPENSHIFT", + "name": "OPENSHIFT" + }, + { + "value": "TANZU", + "name": "TANZU" + }, + { + "value": "RANCHER", + "name": "RANCHER" + }, + { + "value": "EC2", + "name": "EC2" + }, + { + "value": "OTHER", + "name": "OTHER" + } + ] + } + }, + "com.amazonaws.eks#ConnectorConfigRequest": { + "type": "structure", + "members": { + "roleArn": { + "target": "com.amazonaws.eks#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the role that is authorized to request the connector configuration.

", + "smithy.api#required": {} + } + }, + "provider": { + "target": "com.amazonaws.eks#ConnectorConfigProvider", + "traits": { + "smithy.api#documentation": "

The cloud provider for the target cluster to connect.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The configuration sent to a cluster for configuration.

" + } + }, + "com.amazonaws.eks#ConnectorConfigResponse": { + "type": "structure", + "members": { + "activationId": { + "target": "com.amazonaws.eks#String", + "traits": { + "smithy.api#documentation": "

A unique ID associated with the cluster for registration purposes.

" + } + }, + "activationCode": { + "target": "com.amazonaws.eks#String", + "traits": { + "smithy.api#documentation": "

A unique code associated with the cluster for registration purposes.

" + } + }, + "activationExpiry": { + "target": "com.amazonaws.eks#Timestamp", + "traits": { + "smithy.api#documentation": "

The expiration time of the connected cluster. The cluster's YAML file must be applied through the native \n provider.

" + } + }, + "provider": { + "target": "com.amazonaws.eks#String", + "traits": { + "smithy.api#documentation": "

The cluster's cloud service provider.

" + } + }, + "roleArn": { + "target": "com.amazonaws.eks#String", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the role that is used by the EKS connector to communicate with AWS services from the connected Kubernetes cluster.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The full description of your connected cluster.

" + } + }, "com.amazonaws.eks#CreateAddon": { "type": "operation", "input": { @@ -1604,6 +1723,61 @@ } } }, + "com.amazonaws.eks#DeregisterCluster": { + "type": "operation", + "input": { + "target": "com.amazonaws.eks#DeregisterClusterRequest" + }, + "output": { + "target": "com.amazonaws.eks#DeregisterClusterResponse" + }, + "errors": [ + { + "target": "com.amazonaws.eks#ClientException" + }, + { + "target": "com.amazonaws.eks#ResourceInUseException" + }, + { + "target": "com.amazonaws.eks#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.eks#ServerException" + }, + { + "target": "com.amazonaws.eks#ServiceUnavailableException" + } + ], + "traits": { + "smithy.api#documentation": "

Deregisters a connected cluster to remove it from the Amazon EKS control plane.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/cluster-registrations/{name}", + "code": 200 + } + } + }, + "com.amazonaws.eks#DeregisterClusterRequest": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.eks#String", + "traits": { + "smithy.api#documentation": "

The name of the connected cluster to deregister.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.eks#DeregisterClusterResponse": { + "type": "structure", + "members": { + "cluster": { + "target": "com.amazonaws.eks#Cluster" + } + } + }, "com.amazonaws.eks#DescribeAddon": { "type": "operation", "input": { @@ -1906,6 +2080,16 @@ } } }, + { + "state": "failure", + "matcher": { + "output": { + "path": "cluster.status", + "expected": "PENDING", + "comparator": "stringEquals" + } + } + }, { "state": "success", "matcher": { @@ -2701,7 +2885,7 @@ } }, "traits": { - "smithy.api#documentation": "

An object that represents an identity configuration.

" + "smithy.api#documentation": "

The full description of your identity configuration.

" } }, "com.amazonaws.eks#IdentityProviderConfigs": { @@ -2710,6 +2894,12 @@ "target": "com.amazonaws.eks#IdentityProviderConfig" } }, + "com.amazonaws.eks#IncludeClustersList": { + "type": "list", + "member": { + "target": "com.amazonaws.eks#String" + } + }, "com.amazonaws.eks#InvalidParameterException": { "type": "structure", "members": { @@ -3005,6 +3195,13 @@ "smithy.api#documentation": "

The nextToken value returned from a previous paginated\n ListClusters request where maxResults was used and the\n results exceeded the value of that parameter. Pagination continues from the end of the\n previous results that returned the nextToken value.

\n \n

This token should be treated as an opaque identifier that is used only to\n retrieve the next items in a list and not for other programmatic purposes.

\n
", "smithy.api#httpQuery": "nextToken" } + }, + "include": { + "target": "com.amazonaws.eks#IncludeClustersList", + "traits": { + "smithy.api#documentation": "

Indicates whether connected clusters are included in the returned list. Default value is 'ALL'.

", + "smithy.api#httpQuery": "include" + } } } }, @@ -4070,6 +4267,74 @@ "smithy.api#documentation": "

Identifies the Key Management Service (KMS) key used to encrypt the secrets.

" } }, + "com.amazonaws.eks#RegisterCluster": { + "type": "operation", + "input": { + "target": "com.amazonaws.eks#RegisterClusterRequest" + }, + "output": { + "target": "com.amazonaws.eks#RegisterClusterResponse" + }, + "errors": [ + { + "target": "com.amazonaws.eks#ClientException" + }, + { + "target": "com.amazonaws.eks#InvalidParameterException" + }, + { + "target": "com.amazonaws.eks#ResourceLimitExceededException" + }, + { + "target": "com.amazonaws.eks#ServerException" + }, + { + "target": "com.amazonaws.eks#ServiceUnavailableException" + } + ], + "traits": { + "smithy.api#documentation": "

Connects a Kubernetes cluster to the Amazon EKS control plane.

\n

Any Kubernetes cluster can be connected to the Amazon EKS control plane to view current information about the cluster and its nodes.\n

\n

Cluster connection requires two steps. First, send a \n RegisterClusterRequest\n to add it to the Amazon EKS control plane.

\n

Second, a Manifest containing the activationID and activationCode must be applied to the Kubernetes cluster through it's native provider to provide visibility.

\n \n

After the Manifest is updated and applied, then the connected cluster is visible to the Amazon EKS control plane. If the Manifest is not applied within a set amount of time, \n then the connected cluster will no longer be visible and must be deregistered. See DeregisterCluster.

", + "smithy.api#http": { + "method": "POST", + "uri": "/cluster-registrations", + "code": 200 + } + } + }, + "com.amazonaws.eks#RegisterClusterRequest": { + "type": "structure", + "members": { + "name": { + "target": "com.amazonaws.eks#ClusterName", + "traits": { + "smithy.api#documentation": "

Define a unique name for this cluster within your AWS account.

", + "smithy.api#required": {} + } + }, + "connectorConfig": { + "target": "com.amazonaws.eks#ConnectorConfigRequest", + "traits": { + "smithy.api#documentation": "

The configuration settings required to connect the Kubernetes cluster to the Amazon EKS control plane.

", + "smithy.api#required": {} + } + }, + "clientRequestToken": { + "target": "com.amazonaws.eks#String", + "traits": { + "smithy.api#documentation": "

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

", + "smithy.api#idempotencyToken": {} + } + } + } + }, + "com.amazonaws.eks#RegisterClusterResponse": { + "type": "structure", + "members": { + "cluster": { + "target": "com.amazonaws.eks#Cluster" + } + } + }, "com.amazonaws.eks#RemoteAccessConfig": { "type": "structure", "members": { diff --git a/codegen/sdk-codegen/aws-models/elasticache.2015-02-02.json b/codegen/sdk-codegen/aws-models/elasticache.2015-02-02.json index e37ffd0d5e9..dad0334eeed 100644 --- a/codegen/sdk-codegen/aws-models/elasticache.2015-02-02.json +++ b/codegen/sdk-codegen/aws-models/elasticache.2015-02-02.json @@ -3226,7 +3226,7 @@ "code": "DefaultUserAssociatedToUserGroup", "httpResponseCode": 400 }, - "smithy.api#documentation": "

", + "smithy.api#documentation": "

The default user assigned to the user group.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -6936,19 +6936,19 @@ "UserGroupIdsToAdd": { "target": "com.amazonaws.elasticache#UserGroupIdList", "traits": { - "smithy.api#documentation": "

The user group you are associating with the replication group.

" + "smithy.api#documentation": "

The ID of the user group you are associating with the replication group.

" } }, "UserGroupIdsToRemove": { "target": "com.amazonaws.elasticache#UserGroupIdList", "traits": { - "smithy.api#documentation": "

The user group to remove, meaning the users in the group no longer can access the replication group.

" + "smithy.api#documentation": "

The ID of the user group to disassociate from the replication group, meaning the users in the group no longer can access the replication group.

" } }, "RemoveUserGroups": { "target": "com.amazonaws.elasticache#BooleanOptional", "traits": { - "smithy.api#documentation": "

Removes the user groups that can access this replication group.

" + "smithy.api#documentation": "

Removes the user group associated with this replication group.

" } }, "LogDeliveryConfigurations": { @@ -8460,7 +8460,7 @@ "UserGroupIds": { "target": "com.amazonaws.elasticache#UserGroupIdList", "traits": { - "smithy.api#documentation": "

The list of user group IDs that have access to the replication group.

" + "smithy.api#documentation": "

The ID of the user group associated to the replication group.

" } }, "LogDeliveryConfigurations": { @@ -8628,7 +8628,7 @@ "UserGroups": { "target": "com.amazonaws.elasticache#UserGroupsUpdateStatus", "traits": { - "smithy.api#documentation": "

The user groups being modified.

" + "smithy.api#documentation": "

The user group being modified.

" } }, "LogDeliveryConfigurations": { @@ -10333,7 +10333,7 @@ "PendingChanges": { "target": "com.amazonaws.elasticache#UserGroupPendingChanges", "traits": { - "smithy.api#documentation": "

A list of updates being applied to the user groups.

" + "smithy.api#documentation": "

A list of updates being applied to the user group.

" } }, "ReplicationGroups": { @@ -10459,13 +10459,13 @@ "UserGroupIdsToAdd": { "target": "com.amazonaws.elasticache#UserGroupIdList", "traits": { - "smithy.api#documentation": "

The list of user group IDs to add.

" + "smithy.api#documentation": "

The ID of the user group to add.

" } }, "UserGroupIdsToRemove": { "target": "com.amazonaws.elasticache#UserGroupIdList", "traits": { - "smithy.api#documentation": "

The list of user group IDs to remove.

" + "smithy.api#documentation": "

The ID of the user group to remove.

" } } }, diff --git a/codegen/sdk-codegen/aws-models/emr.2009-03-31.json b/codegen/sdk-codegen/aws-models/emr.2009-03-31.json index 50677b7cd5c..c4ce68a9ed1 100644 --- a/codegen/sdk-codegen/aws-models/emr.2009-03-31.json +++ b/codegen/sdk-codegen/aws-models/emr.2009-03-31.json @@ -249,7 +249,7 @@ } ], "traits": { - "smithy.api#documentation": "

Adds tags to an Amazon EMR resource. Tags make it easier to associate clusters in\n various ways, such as grouping clusters to track your Amazon EMR resource allocation costs.\n For more information, see Tag Clusters.

" + "smithy.api#documentation": "

Adds tags to an Amazon EMR resource, such as a cluster or an Amazon EMR Studio. Tags make it easier to associate resources in\n various ways, such as grouping clusters to track your Amazon EMR resource allocation costs.\n For more information, see Tag Clusters.

" } }, "com.amazonaws.emr#AddTagsInput": { @@ -258,20 +258,20 @@ "ResourceId": { "target": "com.amazonaws.emr#ResourceId", "traits": { - "smithy.api#documentation": "

The Amazon EMR resource identifier to which tags will be added. This value must be a\n cluster identifier.

", + "smithy.api#documentation": "

The Amazon EMR resource identifier to which tags will be added. For example, a\n cluster identifier or an Amazon EMR Studio ID.

", "smithy.api#required": {} } }, "Tags": { "target": "com.amazonaws.emr#TagList", "traits": { - "smithy.api#documentation": "

A list of tags to associate with a cluster and propagate to EC2 instances. Tags are\n user-defined key-value pairs that consist of a required key string with a maximum of 128\n characters, and an optional value string with a maximum of 256 characters.

", + "smithy.api#documentation": "

A list of tags to associate with a resource. Tags are\n user-defined key-value pairs that consist of a required key string with a maximum of 128\n characters, and an optional value string with a maximum of 256 characters.

", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

This input identifies a cluster and a list of tags to attach.

" + "smithy.api#documentation": "

This input identifies an Amazon EMR resource and a list of tags to attach.

" } }, "com.amazonaws.emr#AddTagsOutput": { @@ -903,7 +903,7 @@ "ServiceRole": { "target": "com.amazonaws.emr#String", "traits": { - "smithy.api#documentation": "

The IAM role that will be assumed by the Amazon EMR service to access Amazon Web Services resources on\n your behalf.

" + "smithy.api#documentation": "

The IAM role that Amazon EMR assumes in order to access Amazon Web Services resources on\n your behalf.

" } }, "NormalizedInstanceHours": { @@ -1444,7 +1444,7 @@ "AuthMode": { "target": "com.amazonaws.emr#AuthMode", "traits": { - "smithy.api#documentation": "

Specifies whether the Studio authenticates users using single sign-on (SSO) or IAM.\n Amazon EMR Studio currently only supports SSO authentication.

", + "smithy.api#documentation": "

Specifies whether the Studio authenticates users using IAM or Amazon Web Services SSO.

", "smithy.api#required": {} } }, @@ -1465,15 +1465,14 @@ "ServiceRole": { "target": "com.amazonaws.emr#XmlString", "traits": { - "smithy.api#documentation": "

The IAM role that will be assumed by the Amazon EMR Studio. The service role provides a\n way for Amazon EMR Studio to interoperate with other Amazon Web Services services.

", + "smithy.api#documentation": "

The IAM role that the Amazon EMR Studio assumes. The service role provides a\n way for Amazon EMR Studio to interoperate with other Amazon Web Services services.

", "smithy.api#required": {} } }, "UserRole": { "target": "com.amazonaws.emr#XmlString", "traits": { - "smithy.api#documentation": "

The IAM user role that will be assumed by users and groups logged in to an Amazon EMR Studio. The\n permissions attached to this IAM role can be scoped down for each user or group using\n session policies.

", - "smithy.api#required": {} + "smithy.api#documentation": "

The IAM user role that users and groups assume when logged in to an Amazon EMR Studio. Only specify a UserRole when you use Amazon Web Services SSO authentication. The\n permissions attached to the UserRole can be scoped down for each user or group using\n session policies.

" } }, "WorkspaceSecurityGroupId": { @@ -1497,6 +1496,18 @@ "smithy.api#required": {} } }, + "IdpAuthUrl": { + "target": "com.amazonaws.emr#XmlString", + "traits": { + "smithy.api#documentation": "

The authentication endpoint of your identity provider (IdP). Specify this value when you use IAM authentication and want to let federated users log in to a Studio with the Studio URL and credentials from your IdP. Amazon EMR Studio redirects users to this endpoint to enter credentials.

" + } + }, + "IdpRelayStateParameterName": { + "target": "com.amazonaws.emr#XmlStringMaxLen256", + "traits": { + "smithy.api#documentation": "

The name that your identity provider (IdP) uses for its RelayState parameter. For example, RelayState or TargetSource. Specify this value when you use IAM authentication and want to let federated users log in to a Studio using the Studio URL. The RelayState parameter differs by IdP.

" + } + }, "Tags": { "target": "com.amazonaws.emr#TagList", "traits": { @@ -1536,7 +1547,7 @@ } ], "traits": { - "smithy.api#documentation": "

Maps a user or group to the Amazon EMR Studio specified by StudioId, and\n applies a session policy to refine Studio permissions for that user or group.

" + "smithy.api#documentation": "

Maps a user or group to the Amazon EMR Studio specified by StudioId, and\n applies a session policy to refine Studio permissions for that user or group. Use CreateStudioSessionMapping to assign users to a Studio when you use Amazon Web Services SSO authentication. For instructions on how to assign users to a Studio when you use IAM authentication, see Assign a user or group to your EMR Studio.

" } }, "com.amazonaws.emr#CreateStudioSessionMappingInput": { @@ -6317,7 +6328,7 @@ } ], "traits": { - "smithy.api#documentation": "

Removes tags from an Amazon EMR resource. Tags make it easier to associate clusters in\n various ways, such as grouping clusters to track your Amazon EMR resource allocation costs.\n For more information, see Tag Clusters.

\n

The following example removes the stack tag with value Prod from a cluster:

" + "smithy.api#documentation": "

Removes tags from an Amazon EMR resource, such as a cluster or Amazon EMR Studio. Tags make it easier to associate resources in\n various ways, such as grouping clusters to track your Amazon EMR resource allocation costs.\n For more information, see Tag Clusters.

\n

The following example removes the stack tag with value Prod from a cluster:

" } }, "com.amazonaws.emr#RemoveTagsInput": { @@ -6326,27 +6337,27 @@ "ResourceId": { "target": "com.amazonaws.emr#ResourceId", "traits": { - "smithy.api#documentation": "

The Amazon EMR resource identifier from which tags will be removed. This value must be a\n cluster identifier.

", + "smithy.api#documentation": "

The Amazon EMR resource identifier from which tags will be removed. For example, a\n cluster identifier or an Amazon EMR Studio ID.

", "smithy.api#required": {} } }, "TagKeys": { "target": "com.amazonaws.emr#StringList", "traits": { - "smithy.api#documentation": "

A list of tag keys to remove from a resource.

", + "smithy.api#documentation": "

A list of tag keys to remove from the resource.

", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

This input identifies a cluster and a list of tags to remove.

" + "smithy.api#documentation": "

This input identifies an Amazon EMR resource and a list of tags to remove.

" } }, "com.amazonaws.emr#RemoveTagsOutput": { "type": "structure", "members": {}, "traits": { - "smithy.api#documentation": "

This output indicates the result of removing tags from a resource.

" + "smithy.api#documentation": "

This output indicates the result of removing tags from the resource.

" } }, "com.amazonaws.emr#RepoUpgradeOnBoot": { @@ -6482,7 +6493,7 @@ "ServiceRole": { "target": "com.amazonaws.emr#XmlString", "traits": { - "smithy.api#documentation": "

The IAM role that will be assumed by the Amazon EMR service to access Amazon Web Services resources on\n your behalf.

" + "smithy.api#documentation": "

The IAM role that Amazon EMR assumes in order to access Amazon Web Services resources on\n your behalf.

" } }, "Tags": { @@ -7616,7 +7627,7 @@ "AuthMode": { "target": "com.amazonaws.emr#AuthMode", "traits": { - "smithy.api#documentation": "

Specifies whether the Amazon EMR Studio authenticates users using single sign-on (SSO) or\n IAM.

" + "smithy.api#documentation": "

Specifies whether the Amazon EMR Studio authenticates users using IAM or Amazon Web Services SSO.

" } }, "VpcId": { @@ -7640,7 +7651,7 @@ "UserRole": { "target": "com.amazonaws.emr#XmlString", "traits": { - "smithy.api#documentation": "

The name of the IAM role assumed by users logged in to the Amazon EMR Studio.

" + "smithy.api#documentation": "

The name of the IAM role assumed by users logged in to the Amazon EMR Studio. A Studio only requires a UserRole when you use IAM authentication.

" } }, "WorkspaceSecurityGroupId": { @@ -7673,6 +7684,18 @@ "smithy.api#documentation": "

The Amazon S3 location to back up Amazon EMR Studio Workspaces and notebook\n files.

" } }, + "IdpAuthUrl": { + "target": "com.amazonaws.emr#XmlString", + "traits": { + "smithy.api#documentation": "

Your identity provider's authentication endpoint. Amazon EMR Studio redirects federated users to this endpoint for authentication when logging in to a Studio with the Studio URL.

" + } + }, + "IdpRelayStateParameterName": { + "target": "com.amazonaws.emr#XmlStringMaxLen256", + "traits": { + "smithy.api#documentation": "

The name of your identity provider's RelayState parameter.

" + } + }, "Tags": { "target": "com.amazonaws.emr#TagList", "traits": { @@ -7717,6 +7740,12 @@ "smithy.api#documentation": "

The unique access URL of the Amazon EMR Studio.

" } }, + "AuthMode": { + "target": "com.amazonaws.emr#AuthMode", + "traits": { + "smithy.api#documentation": "

Specifies whether the Studio authenticates users using IAM or Amazon Web Services SSO.

" + } + }, "CreationTime": { "target": "com.amazonaws.emr#Date", "traits": { diff --git a/codegen/sdk-codegen/aws-models/forecast.2018-06-26.json b/codegen/sdk-codegen/aws-models/forecast.2018-06-26.json index c0a4c7ef302..4e932c82a36 100644 --- a/codegen/sdk-codegen/aws-models/forecast.2018-06-26.json +++ b/codegen/sdk-codegen/aws-models/forecast.2018-06-26.json @@ -829,7 +829,7 @@ "AutoMLOverrideStrategy": { "target": "com.amazonaws.forecast#AutoMLOverrideStrategy", "traits": { - "smithy.api#documentation": "

Used to overide the default AutoML strategy, which is to optimize predictor accuracy.\n To apply an AutoML strategy that minimizes training time, use\n LatencyOptimized.

\n

This parameter is only valid for predictors trained using AutoML.

" + "smithy.api#documentation": "\n

The LatencyOptimized AutoML override strategy is only available in private beta.\n Contact AWS Support or your account manager to learn more about access privileges.\n

\n
\n

Used to overide the default AutoML strategy, which is to optimize predictor accuracy.\n To apply an AutoML strategy that minimizes training time, use\n LatencyOptimized.

\n

This parameter is only valid for predictors trained using AutoML.

" } }, "PerformHPO": { @@ -881,6 +881,12 @@ "traits": { "smithy.api#documentation": "

The optional metadata that you apply to the predictor to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define.

\n

The following basic restrictions apply to tags:

\n " } + }, + "OptimizationMetric": { + "target": "com.amazonaws.forecast#OptimizationMetric", + "traits": { + "smithy.api#documentation": "

The accuracy metric used to optimize the predictor.

" + } } } }, @@ -2000,7 +2006,7 @@ "AutoMLOverrideStrategy": { "target": "com.amazonaws.forecast#AutoMLOverrideStrategy", "traits": { - "smithy.api#documentation": "

The AutoML strategy used to train the predictor. Unless LatencyOptimized\n is specified, the AutoML strategy optimizes predictor accuracy.

\n

This parameter is only valid for predictors trained using AutoML.

" + "smithy.api#documentation": "\n

The LatencyOptimized AutoML override strategy is only available in private beta.\n Contact AWS Support or your account manager to learn more about access privileges.\n

\n
\n

The AutoML strategy used to train the predictor. Unless LatencyOptimized\n is specified, the AutoML strategy optimizes predictor accuracy.

\n

This parameter is only valid for predictors trained using AutoML.

" } }, "PerformHPO": { @@ -2092,6 +2098,12 @@ "traits": { "smithy.api#documentation": "

The last time the resource was modified. The timestamp depends on the status of the job:

\n " } + }, + "OptimizationMetric": { + "target": "com.amazonaws.forecast#OptimizationMetric", + "traits": { + "smithy.api#documentation": "

The accuracy metric used to optimize the predictor.

" + } } } }, @@ -2167,24 +2179,36 @@ "ForecastType": { "target": "com.amazonaws.forecast#ForecastType", "traits": { - "smithy.api#documentation": "

\n The Forecast type used to compute WAPE and RMSE.\n

" + "smithy.api#documentation": "

The Forecast type used to compute WAPE, MAPE, MASE, and RMSE.

" } }, "WAPE": { "target": "com.amazonaws.forecast#Double", "traits": { - "smithy.api#documentation": "

\n The weighted absolute percentage error (WAPE).\n

" + "smithy.api#documentation": "

The weighted absolute percentage error (WAPE).

" } }, "RMSE": { "target": "com.amazonaws.forecast#Double", "traits": { - "smithy.api#documentation": "

\n The root-mean-square error (RMSE).\n

" + "smithy.api#documentation": "

The root-mean-square error (RMSE).

" + } + }, + "MASE": { + "target": "com.amazonaws.forecast#Double", + "traits": { + "smithy.api#documentation": "

The Mean Absolute Scaled Error (MASE)

" + } + }, + "MAPE": { + "target": "com.amazonaws.forecast#Double", + "traits": { + "smithy.api#documentation": "

The Mean Absolute Percentage Error (MAPE)

" } } }, "traits": { - "smithy.api#documentation": "

\n Provides detailed error metrics to evaluate the performance of a predictor. This object is\n part of the Metrics object.\n

" + "smithy.api#documentation": "

Provides detailed error metrics to evaluate the performance of a predictor. This object\n is part of the Metrics object.

" } }, "com.amazonaws.forecast#ErrorMetrics": { @@ -2225,12 +2249,12 @@ "TestWindows": { "target": "com.amazonaws.forecast#TestWindows", "traits": { - "smithy.api#documentation": "

The array of test windows used for evaluating the algorithm. The\n NumberOfBacktestWindows from the EvaluationParameters\n object determines the number of windows in the array.

" + "smithy.api#documentation": "

The array of test windows used for evaluating the algorithm. The\n NumberOfBacktestWindows from the EvaluationParameters object\n determines the number of windows in the array.

" } } }, "traits": { - "smithy.api#documentation": "

The results of evaluating an algorithm. Returned as part of the\n GetAccuracyMetrics response.

" + "smithy.api#documentation": "

The results of evaluating an algorithm. Returned as part of the GetAccuracyMetrics response.

" } }, "com.amazonaws.forecast#EvaluationType": { @@ -2610,7 +2634,7 @@ } ], "traits": { - "smithy.api#documentation": "

Provides metrics on the accuracy of the models that were trained by the CreatePredictor operation. Use metrics to see how well the model performed and\n to decide whether to use the predictor to generate a forecast. For more information, see\n Predictor\n Metrics.

\n

This operation generates metrics for each backtest window that was evaluated. The number of backtest windows\n (NumberOfBacktestWindows) is specified using the\n EvaluationParameters object, which is optionally\n included in the CreatePredictor request. If\n NumberOfBacktestWindows isn't specified, the number defaults to one.

\n

The parameters of the filling method determine which items contribute to\n the metrics. If you want all items to contribute, specify zero.\n If you want only those items that have complete data in the range being evaluated to\n contribute, specify nan.\n For more information, see FeaturizationMethod.

\n \n \n

Before you can get accuracy metrics, the Status of the predictor must be\n ACTIVE, signifying that training has completed.\n To get the status, use the DescribePredictor operation.

\n
", + "smithy.api#documentation": "

Provides metrics on the accuracy of the models that were trained by the CreatePredictor operation. Use metrics to see how well the model performed and\n to decide whether to use the predictor to generate a forecast. For more information, see\n Predictor\n Metrics.

\n

This operation generates metrics for each backtest window that was evaluated. The number\n of backtest windows (NumberOfBacktestWindows) is specified using the EvaluationParameters object, which is optionally included in the\n CreatePredictor request. If NumberOfBacktestWindows isn't\n specified, the number defaults to one.

\n

The parameters of the filling method determine which items contribute to the\n metrics. If you want all items to contribute, specify zero. If you want only\n those items that have complete data in the range being evaluated to contribute, specify\n nan. For more information, see FeaturizationMethod.

\n \n \n

Before you can get accuracy metrics, the Status of the predictor must be\n ACTIVE, signifying that training has completed. To get the status, use the\n DescribePredictor operation.

\n
", "smithy.api#idempotent": {} } }, @@ -2638,7 +2662,13 @@ "AutoMLOverrideStrategy": { "target": "com.amazonaws.forecast#AutoMLOverrideStrategy", "traits": { - "smithy.api#documentation": "

The AutoML strategy used to train the predictor. Unless LatencyOptimized\n is specified, the AutoML strategy optimizes predictor accuracy.

\n

This parameter is only valid for predictors trained using AutoML.

" + "smithy.api#documentation": "\n

The LatencyOptimized AutoML override strategy is only available in private beta.\n Contact AWS Support or your account manager to learn more about access privileges.\n

\n
\n

The AutoML strategy used to train the predictor. Unless LatencyOptimized\n is specified, the AutoML strategy optimizes predictor accuracy.

\n

This parameter is only valid for predictors trained using AutoML.

" + } + }, + "OptimizationMetric": { + "target": "com.amazonaws.forecast#OptimizationMetric", + "traits": { + "smithy.api#documentation": "

The accuracy metric used to optimize the predictor.

" } } } @@ -3314,12 +3344,18 @@ "ErrorMetrics": { "target": "com.amazonaws.forecast#ErrorMetrics", "traits": { - "smithy.api#documentation": "

\n Provides detailed error metrics on forecast type, root-mean square-error (RMSE), and weighted\n average percentage error (WAPE).\n

" + "smithy.api#documentation": "

Provides detailed error metrics for each forecast type. Metrics include root-mean\n square-error (RMSE), mean absolute percentage error (MAPE), mean absolute scaled error (MASE),\n and weighted average percentage error (WAPE).

" + } + }, + "AverageWeightedQuantileLoss": { + "target": "com.amazonaws.forecast#Double", + "traits": { + "smithy.api#documentation": "

The average value of all weighted quantile losses.

" } } }, "traits": { - "smithy.api#documentation": "

Provides metrics that are used to evaluate the performance of a predictor. This object\n is part of the WindowSummary object.

" + "smithy.api#documentation": "

Provides metrics that are used to evaluate the performance of a predictor. This object is\n part of the WindowSummary object.

" } }, "com.amazonaws.forecast#Name": { @@ -3341,6 +3377,33 @@ } } }, + "com.amazonaws.forecast#OptimizationMetric": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "WAPE", + "name": "WAPE" + }, + { + "value": "RMSE", + "name": "RMSE" + }, + { + "value": "AverageWeightedQuantileLoss", + "name": "AverageWeightedQuantileLoss" + }, + { + "value": "MASE", + "name": "MASE" + }, + { + "value": "MAPE", + "name": "MAPE" + } + ] + } + }, "com.amazonaws.forecast#ParameterKey": { "type": "string", "traits": { @@ -4173,7 +4236,7 @@ "Quantile": { "target": "com.amazonaws.forecast#Double", "traits": { - "smithy.api#documentation": "

The quantile. Quantiles divide a probability distribution into regions of equal\n probability. For example, if the distribution was divided into 5 regions of equal\n probability, the quantiles would be 0.2, 0.4, 0.6, and 0.8.

" + "smithy.api#documentation": "

The quantile. Quantiles divide a probability distribution into regions of equal\n probability. For example, if the distribution was divided into 5 regions of equal probability,\n the quantiles would be 0.2, 0.4, 0.6, and 0.8.

" } }, "LossValue": { @@ -4184,7 +4247,7 @@ } }, "traits": { - "smithy.api#documentation": "

The weighted loss value for a quantile. This object is part of the\n Metrics object.

" + "smithy.api#documentation": "

The weighted loss value for a quantile. This object is part of the Metrics object.

" } }, "com.amazonaws.forecast#WeightedQuantileLosses": { @@ -4228,7 +4291,7 @@ } }, "traits": { - "smithy.api#documentation": "

The metrics for a time range within the evaluation portion of a dataset. This object\n is part of the EvaluationResult object.

\n

The TestWindowStart and TestWindowEnd parameters are\n determined by the BackTestWindowOffset parameter of the\n EvaluationParameters object.

" + "smithy.api#documentation": "

The metrics for a time range within the evaluation portion of a dataset. This object is\n part of the EvaluationResult object.

\n

The TestWindowStart and TestWindowEnd parameters are determined\n by the BackTestWindowOffset parameter of the EvaluationParameters object.

" } } } diff --git a/codegen/sdk-codegen/aws-models/frauddetector.2019-11-15.json b/codegen/sdk-codegen/aws-models/frauddetector.2019-11-15.json index db4607f055f..21a3b87b9ba 100644 --- a/codegen/sdk-codegen/aws-models/frauddetector.2019-11-15.json +++ b/codegen/sdk-codegen/aws-models/frauddetector.2019-11-15.json @@ -2360,6 +2360,55 @@ "target": "com.amazonaws.frauddetector#ExternalModel" } }, + "com.amazonaws.frauddetector#ExternalModelOutputs": { + "type": "structure", + "members": { + "externalModel": { + "target": "com.amazonaws.frauddetector#ExternalModelSummary", + "traits": { + "smithy.api#documentation": "

The Amazon SageMaker model.

" + } + }, + "outputs": { + "target": "com.amazonaws.frauddetector#ExternalModelPredictionMap", + "traits": { + "smithy.api#documentation": "

The fraud prediction scores from Amazon SageMaker model.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The fraud prediction scores from Amazon SageMaker model.

" + } + }, + "com.amazonaws.frauddetector#ExternalModelPredictionMap": { + "type": "map", + "key": { + "target": "com.amazonaws.frauddetector#string" + }, + "value": { + "target": "com.amazonaws.frauddetector#string" + } + }, + "com.amazonaws.frauddetector#ExternalModelSummary": { + "type": "structure", + "members": { + "modelEndpoint": { + "target": "com.amazonaws.frauddetector#string", + "traits": { + "smithy.api#documentation": "

The endpoint of the Amazon SageMaker model.

" + } + }, + "modelSource": { + "target": "com.amazonaws.frauddetector#ModelSource", + "traits": { + "smithy.api#documentation": "

The source of the model.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The Amazon SageMaker model.

" + } + }, "com.amazonaws.frauddetector#ExternalModelsMaxResults": { "type": "integer", "traits": { @@ -2883,6 +2932,12 @@ "traits": { "smithy.api#documentation": "

The results from the rules.

" } + }, + "externalModelOutputs": { + "target": "com.amazonaws.frauddetector#ListOfExternalModelOutputs", + "traits": { + "smithy.api#documentation": "

The model scores for Amazon SageMaker models.

" + } } } }, @@ -3687,6 +3742,12 @@ ] } }, + "com.amazonaws.frauddetector#ListOfExternalModelOutputs": { + "type": "list", + "member": { + "target": "com.amazonaws.frauddetector#ExternalModelOutputs" + } + }, "com.amazonaws.frauddetector#ListOfLogOddsMetrics": { "type": "list", "member": { diff --git a/codegen/sdk-codegen/aws-models/kafka.2018-11-14.json b/codegen/sdk-codegen/aws-models/kafka.2018-11-14.json index 977b12f0d2b..f867573811e 100644 --- a/codegen/sdk-codegen/aws-models/kafka.2018-11-14.json +++ b/codegen/sdk-codegen/aws-models/kafka.2018-11-14.json @@ -418,6 +418,13 @@ "smithy.api#documentation": "

Details for ClientAuthentication using TLS.

", "smithy.api#jsonName": "tls" } + }, + "Unauthenticated": { + "target": "com.amazonaws.kafka#Unauthenticated", + "traits": { + "smithy.api#documentation": "

Contains information about unauthenticated traffic to the cluster.

", + "smithy.api#jsonName": "unauthenticated" + } } }, "traits": { @@ -2131,6 +2138,9 @@ }, { "target": "com.amazonaws.kafka#UpdateMonitoring" + }, + { + "target": "com.amazonaws.kafka#UpdateSecurity" } ], "traits": { @@ -2883,6 +2893,7 @@ "LoggingInfo": { "target": "com.amazonaws.kafka#LoggingInfo", "traits": { + "smithy.api#documentation": "

You can configure your MSK cluster to send broker logs to different destination types. This is a container for the configuration details related to broker logs.

", "smithy.api#jsonName": "loggingInfo" } }, @@ -2892,6 +2903,20 @@ "smithy.api#documentation": "

Information about the Amazon MSK broker type.

", "smithy.api#jsonName": "instanceType" } + }, + "ClientAuthentication": { + "target": "com.amazonaws.kafka#ClientAuthentication", + "traits": { + "smithy.api#documentation": "

Includes all client authentication information.

", + "smithy.api#jsonName": "clientAuthentication" + } + }, + "EncryptionInfo": { + "target": "com.amazonaws.kafka#EncryptionInfo", + "traits": { + "smithy.api#documentation": "

Includes all encryption-related information.

", + "smithy.api#jsonName": "encryptionInfo" + } } }, "traits": { @@ -3347,6 +3372,13 @@ "smithy.api#documentation": "

List of ACM Certificate Authority ARNs.

", "smithy.api#jsonName": "certificateAuthorityArnList" } + }, + "Enabled": { + "target": "com.amazonaws.kafka#__boolean", + "traits": { + "smithy.api#documentation": "

Specifies whether you want to enable or disable TLS authentication.

", + "smithy.api#jsonName": "enabled" + } } }, "traits": { @@ -3377,6 +3409,18 @@ "smithy.api#httpError": 429 } }, + "com.amazonaws.kafka#Unauthenticated": { + "type": "structure", + "members": { + "Enabled": { + "target": "com.amazonaws.kafka#__boolean", + "traits": { + "smithy.api#documentation": "

Specifies whether you want to enable or disable unauthenticated traffic to your cluster.

", + "smithy.api#jsonName": "enabled" + } + } + } + }, "com.amazonaws.kafka#UnauthorizedException": { "type": "structure", "members": { @@ -4089,6 +4133,100 @@ } } }, + "com.amazonaws.kafka#UpdateSecurity": { + "type": "operation", + "input": { + "target": "com.amazonaws.kafka#UpdateSecurityRequest" + }, + "output": { + "target": "com.amazonaws.kafka#UpdateSecurityResponse" + }, + "errors": [ + { + "target": "com.amazonaws.kafka#BadRequestException" + }, + { + "target": "com.amazonaws.kafka#ForbiddenException" + }, + { + "target": "com.amazonaws.kafka#InternalServerErrorException" + }, + { + "target": "com.amazonaws.kafka#NotFoundException" + }, + { + "target": "com.amazonaws.kafka#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.kafka#TooManyRequestsException" + }, + { + "target": "com.amazonaws.kafka#UnauthorizedException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates the security settings for the cluster. You can use this operation to specify encryption and authentication on existing clusters.

", + "smithy.api#http": { + "method": "PATCH", + "uri": "/v1/clusters/{ClusterArn}/security", + "code": 200 + } + } + }, + "com.amazonaws.kafka#UpdateSecurityRequest": { + "type": "structure", + "members": { + "ClientAuthentication": { + "target": "com.amazonaws.kafka#ClientAuthentication", + "traits": { + "smithy.api#documentation": "

Includes all client authentication related information.

", + "smithy.api#jsonName": "clientAuthentication" + } + }, + "ClusterArn": { + "target": "com.amazonaws.kafka#__string", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) that uniquely identifies the cluster.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "CurrentVersion": { + "target": "com.amazonaws.kafka#__string", + "traits": { + "smithy.api#documentation": "

The version of the MSK cluster to update. Cluster versions aren't simple numbers. You can describe an MSK cluster to find its version. When this update operation is successful, it generates a new cluster version.

", + "smithy.api#jsonName": "currentVersion", + "smithy.api#required": {} + } + }, + "EncryptionInfo": { + "target": "com.amazonaws.kafka#EncryptionInfo", + "traits": { + "smithy.api#documentation": "

Includes all encryption-related information.

", + "smithy.api#jsonName": "encryptionInfo" + } + } + } + }, + "com.amazonaws.kafka#UpdateSecurityResponse": { + "type": "structure", + "members": { + "ClusterArn": { + "target": "com.amazonaws.kafka#__string", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the cluster.

", + "smithy.api#jsonName": "clusterArn" + } + }, + "ClusterOperationArn": { + "target": "com.amazonaws.kafka#__string", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the cluster operation.

", + "smithy.api#jsonName": "clusterOperationArn" + } + } + } + }, "com.amazonaws.kafka#ZookeeperNodeInfo": { "type": "structure", "members": { diff --git a/codegen/sdk-codegen/aws-models/lookoutequipment.2020-12-15.json b/codegen/sdk-codegen/aws-models/lookoutequipment.2020-12-15.json index eae5ff175b9..4b3b74ec7a2 100644 --- a/codegen/sdk-codegen/aws-models/lookoutequipment.2020-12-15.json +++ b/codegen/sdk-codegen/aws-models/lookoutequipment.2020-12-15.json @@ -148,7 +148,7 @@ "min": 1, "max": 5000 }, - "smithy.api#pattern": "[\\P{M}\\p{M}]{1,5000}" + "smithy.api#pattern": "^[\\P{M}\\p{M}]{1,5000}$" } }, "com.amazonaws.lookoutequipment#ComponentTimestampDelimiter": { @@ -229,7 +229,7 @@ "ServerSideKmsKeyId": { "target": "com.amazonaws.lookoutequipment#NameOrArn", "traits": { - "smithy.api#documentation": "

Provides the identifier of the AWS KMS customer master key (CMK) used to encrypt dataset data by Amazon Lookout for Equipment.

" + "smithy.api#documentation": "

Provides the identifier of the KMS key used to encrypt dataset data by Amazon Lookout for Equipment.

" } }, "ClientToken": { @@ -326,7 +326,7 @@ "DataDelayOffsetInMinutes": { "target": "com.amazonaws.lookoutequipment#DataDelayOffsetInMinutes", "traits": { - "smithy.api#documentation": "

A period of time (in minutes) by which inference on the data is delayed after the data\n starts. For instance, if you select an offset delay time of five minutes, inference will\n not begin on the data until the first data measurement after the five minute mark. For example, if \n five minutes is selected, the inference scheduler will wake up at the configured frequency with the \n additional five minute delay time to check the customer S3 bucket. The customer can upload data at \n the same frequency and they don't need to stop and restart the scheduler when uploading new data.

" + "smithy.api#documentation": "

A period of time (in minutes) by which inference on the data is delayed after the data\n starts. For instance, if you select an offset delay time of five minutes, inference will\n not begin on the data until the first data measurement after the five minute mark. For example, if \n five minutes is selected, the inference scheduler will wake up at the configured frequency with the \n additional five minute delay time to check the customer S3 bucket. The customer can upload data at \n the same frequency and they don't need to stop and restart the scheduler when uploading new data.

" } }, "DataUploadFrequency": { @@ -360,7 +360,7 @@ "ServerSideKmsKeyId": { "target": "com.amazonaws.lookoutequipment#NameOrArn", "traits": { - "smithy.api#documentation": "

Provides the identifier of the AWS KMS customer master key (CMK) used to encrypt inference scheduler data by Amazon Lookout for Equipment.

" + "smithy.api#documentation": "

Provides the identifier of the KMS key used to encrypt inference scheduler data by Amazon Lookout for Equipment.

" } }, "ClientToken": { @@ -513,7 +513,7 @@ "ServerSideKmsKeyId": { "target": "com.amazonaws.lookoutequipment#NameOrArn", "traits": { - "smithy.api#documentation": "

Provides the identifier of the AWS KMS customer master key (CMK) used to encrypt model data by Amazon Lookout for Equipment.

" + "smithy.api#documentation": "

Provides the identifier of the KMS key used to encrypt model data by Amazon Lookout for Equipment.

" } }, "Tags": { @@ -521,6 +521,12 @@ "traits": { "smithy.api#documentation": "

Any tags associated with the ML model being created.

" } + }, + "OffCondition": { + "target": "com.amazonaws.lookoutequipment#OffCondition", + "traits": { + "smithy.api#documentation": "

Indicates that the asset associated with this sensor has been shut off. As long as this condition is met, Lookout for Equipment will not use data from this asset for training, evaluation, or inference.

" + } } } }, @@ -643,7 +649,7 @@ "min": 20, "max": 2048 }, - "smithy.api#pattern": "arn:aws(-[^:]+)?:lookoutequipment:[a-zA-Z0-9\\-]*:[0-9]{12}:dataset\\/.+" + "smithy.api#pattern": "^arn:aws(-[^:]+)?:lookoutequipment:[a-zA-Z0-9\\-]*:[0-9]{12}:dataset\\/.+$" } }, "com.amazonaws.lookoutequipment#DatasetIdentifier": { @@ -968,7 +974,7 @@ } ], "traits": { - "smithy.api#documentation": "

Provides information on a specified dataset such as the schema location, status, and so\n on.

" + "smithy.api#documentation": "

Provides a JSON description of the data that is in each time series dataset, including names, column names, and data types.

" } }, "com.amazonaws.lookoutequipment#DescribeDatasetRequest": { @@ -1025,7 +1031,7 @@ "ServerSideKmsKeyId": { "target": "com.amazonaws.lookoutequipment#KmsKeyArn", "traits": { - "smithy.api#documentation": "

Provides the identifier of the AWS KMS customer master key (CMK) used to encrypt dataset data by Amazon Lookout for Equipment.

" + "smithy.api#documentation": "

Provides the identifier of the KMS key used to encrypt dataset data by Amazon Lookout for Equipment.

" } }, "IngestionInputConfiguration": { @@ -1155,7 +1161,7 @@ "ServerSideKmsKeyId": { "target": "com.amazonaws.lookoutequipment#KmsKeyArn", "traits": { - "smithy.api#documentation": "

Provides the identifier of the AWS KMS customer master key (CMK) used to encrypt inference scheduler data by Amazon Lookout for Equipment.

" + "smithy.api#documentation": "

Provides the identifier of the KMS key used to encrypt inference scheduler data by Amazon Lookout for Equipment.

" } } } @@ -1186,7 +1192,7 @@ } ], "traits": { - "smithy.api#documentation": "

Provides overall information about a specific ML model, including model name and ARN,\n dataset, training and evaluation information, status, and so on.

" + "smithy.api#documentation": "

Provides a JSON containing the overall information about a specific ML model, including model name and ARN,\n dataset, training and evaluation information, status, and so on.

" } }, "com.amazonaws.lookoutequipment#DescribeModelRequest": { @@ -1321,7 +1327,13 @@ "ServerSideKmsKeyId": { "target": "com.amazonaws.lookoutequipment#KmsKeyArn", "traits": { - "smithy.api#documentation": "

Provides the identifier of the AWS KMS customer master key (CMK) used to encrypt model data by Amazon Lookout for Equipment.

" + "smithy.api#documentation": "

Provides the identifier of the KMS key used to encrypt model data by Amazon Lookout for Equipment.

" + } + }, + "OffCondition": { + "target": "com.amazonaws.lookoutequipment#OffCondition", + "traits": { + "smithy.api#documentation": "

Indicates that the asset associated with this sensor has been shut off. As long as this condition is met, Lookout for Equipment will not use data from this asset for training, evaluation, or inference.

" } } } @@ -1339,7 +1351,7 @@ "min": 20, "max": 2048 }, - "smithy.api#pattern": "arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+" + "smithy.api#pattern": "^arn:aws(-[^:]+)?:iam::[0-9]{12}:role/.+$" } }, "com.amazonaws.lookoutequipment#IdempotenceToken": { @@ -1349,7 +1361,7 @@ "min": 1, "max": 256 }, - "smithy.api#pattern": "\\p{ASCII}{1,256}" + "smithy.api#pattern": "^\\p{ASCII}{1,256}$" } }, "com.amazonaws.lookoutequipment#InferenceExecutionStatus": { @@ -1475,12 +1487,12 @@ "InferenceInputNameConfiguration": { "target": "com.amazonaws.lookoutequipment#InferenceInputNameConfiguration", "traits": { - "smithy.api#documentation": "

> Specifies configuration information for the input data for the inference, including\n timestamp format and delimiter.

" + "smithy.api#documentation": "

Specifies configuration information for the input data for the inference, including\n timestamp format and delimiter.

" } } }, "traits": { - "smithy.api#documentation": "

> Specifies configuration information for the input data for the inference, including S3\n location of input data..

" + "smithy.api#documentation": "

Specifies configuration information for the input data for the inference, including S3\n location of input data..

" } }, "com.amazonaws.lookoutequipment#InferenceInputNameConfiguration": { @@ -1500,7 +1512,7 @@ } }, "traits": { - "smithy.api#documentation": "

>> Specifies configuration information for the input data for the inference, including\n timestamp format and delimiter.

" + "smithy.api#documentation": "

Specifies configuration information for the input data for the inference, including\n timestamp format and delimiter.

" } }, "com.amazonaws.lookoutequipment#InferenceOutputConfiguration": { @@ -1573,7 +1585,7 @@ "min": 20, "max": 2048 }, - "smithy.api#pattern": "arn:aws(-[^:]+)?:lookoutequipment:[a-zA-Z0-9\\-]*:[0-9]{12}:inference-scheduler\\/.+" + "smithy.api#pattern": "^arn:aws(-[^:]+)?:lookoutequipment:[a-zA-Z0-9\\-]*:[0-9]{12}:inference-scheduler\\/.+$" } }, "com.amazonaws.lookoutequipment#InferenceSchedulerIdentifier": { @@ -1661,7 +1673,7 @@ "DataDelayOffsetInMinutes": { "target": "com.amazonaws.lookoutequipment#DataDelayOffsetInMinutes", "traits": { - "smithy.api#documentation": "

> A period of time (in minutes) by which inference on the data is delayed after the data\n starts. For instance, if an offset delay time of five minutes was selected, inference will\n not begin on the data until the first data measurement after the five minute mark. For example, if \n five minutes is selected, the inference scheduler will wake up at the configured frequency with the \n additional five minute delay time to check the customer S3 bucket. The customer can upload data at \n the same frequency and they don't need to stop and restart the scheduler when uploading new data.\n

" + "smithy.api#documentation": "

A period of time (in minutes) by which inference on the data is delayed after the data\n starts. For instance, if an offset delay time of five minutes was selected, inference will\n not begin on the data until the first data measurement after the five minute mark. For example, if \n five minutes is selected, the inference scheduler will wake up at the configured frequency with the \n additional five minute delay time to check the customer S3 bucket. The customer can upload data at \n the same frequency and they don't need to stop and restart the scheduler when uploading new data.\n

" } }, "DataUploadFrequency": { @@ -1697,7 +1709,7 @@ "min": 0, "max": 32 }, - "smithy.api#pattern": "[A-Fa-f0-9]{0,32}" + "smithy.api#pattern": "^[A-Fa-f0-9]{0,32}$" } }, "com.amazonaws.lookoutequipment#IngestionJobStatus": { @@ -1763,7 +1775,7 @@ "min": 1, "max": 1024 }, - "smithy.api#pattern": "arn:aws[a-z\\-]*:kms:[a-z0-9\\-]*:\\d{12}:[\\w\\-\\/]+" + "smithy.api#pattern": "^arn:aws[a-z\\-]*:kms:[a-z0-9\\-]*:\\d{12}:[\\w\\-\\/]+$" } }, "com.amazonaws.lookoutequipment#LabelsInputConfiguration": { @@ -2272,7 +2284,7 @@ "min": 20, "max": 2048 }, - "smithy.api#pattern": "arn:aws(-[^:]+)?:lookoutequipment:[a-zA-Z0-9\\-]*:[0-9]{12}:model\\/.+" + "smithy.api#pattern": "^arn:aws(-[^:]+)?:lookoutequipment:[a-zA-Z0-9\\-]*:[0-9]{12}:model\\/.+$" } }, "com.amazonaws.lookoutequipment#ModelName": { @@ -2371,7 +2383,16 @@ "min": 0, "max": 8192 }, - "smithy.api#pattern": "\\p{ASCII}{0,8192}" + "smithy.api#pattern": "^\\p{ASCII}{0,8192}$" + } + }, + "com.amazonaws.lookoutequipment#OffCondition": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + } } }, "com.amazonaws.lookoutequipment#ResourceNotFoundException": { @@ -2407,7 +2428,7 @@ "min": 1, "max": 1024 }, - "smithy.api#pattern": "[\\P{M}\\p{M}]{1,1024}[^/]$" + "smithy.api#pattern": "^[\\P{M}\\p{M}]{1,1024}[^/]$" } }, "com.amazonaws.lookoutequipment#S3Object": { @@ -2439,7 +2460,7 @@ "min": 0, "max": 1024 }, - "smithy.api#pattern": "(^$)|([\\P{M}\\p{M}]{1,1023}/$)" + "smithy.api#pattern": "^(^$)|([\\P{M}\\p{M}]{1,1023}/$)$" } }, "com.amazonaws.lookoutequipment#ServiceQuotaExceededException": { @@ -2840,7 +2861,7 @@ "min": 0, "max": 256 }, - "smithy.api#pattern": "[\\s\\w+-=\\.:/@]*" + "smithy.api#pattern": "^[\\s\\w+-=\\.:/@]*$" } }, "com.amazonaws.lookoutequipment#TargetSamplingRate": { @@ -3013,7 +3034,7 @@ "DataDelayOffsetInMinutes": { "target": "com.amazonaws.lookoutequipment#DataDelayOffsetInMinutes", "traits": { - "smithy.api#documentation": "

> A period of time (in minutes) by which inference on the data is delayed after the data\n starts. For instance, if you select an offset delay time of five minutes, inference will\n not begin on the data until the first data measurement after the five minute mark. For example, if \n five minutes is selected, the inference scheduler will wake up at the configured frequency with the \n additional five minute delay time to check the customer S3 bucket. The customer can upload data at \n the same frequency and they don't need to stop and restart the scheduler when uploading new data.

" + "smithy.api#documentation": "

A period of time (in minutes) by which inference on the data is delayed after the data\n starts. For instance, if you select an offset delay time of five minutes, inference will\n not begin on the data until the first data measurement after the five minute mark. For example, if \n five minutes is selected, the inference scheduler will wake up at the configured frequency with the \n additional five minute delay time to check the customer S3 bucket. The customer can upload data at \n the same frequency and they don't need to stop and restart the scheduler when uploading new data.

" } }, "DataUploadFrequency": { diff --git a/codegen/sdk-codegen/aws-models/mediapackage.2017-10-12.json b/codegen/sdk-codegen/aws-models/mediapackage.2017-10-12.json index ac8c020243c..b2daafbeb02 100644 --- a/codegen/sdk-codegen/aws-models/mediapackage.2017-10-12.json +++ b/codegen/sdk-codegen/aws-models/mediapackage.2017-10-12.json @@ -1558,7 +1558,7 @@ } }, "traits": { - "smithy.api#documentation": "Use encryptionContractConfiguration to configure one or more content encryption keys for your endpoints that use SPEKE 2.0. \nThe encryption contract defines which content keys are used to encrypt the audio and video tracks in your stream. \nTo configure the encryption contract, specify which audio and video encryption presets to use.\nNote the following considerations when using encryptionContractConfiguration:\nencryptionContractConfiguration can be used for DASH endpoints that use SPEKE 2.0. SPEKE 2.0 relies on the CPIX 2.3 specification.\nYou must disable key rotation for this endpoint by setting keyRotationIntervalSeconds to 0." + "smithy.api#documentation": "Use encryptionContractConfiguration to configure one or more content encryption keys for your endpoints that use SPEKE 2.0. \nThe encryption contract defines which content keys are used to encrypt the audio and video tracks in your stream. \nTo configure the encryption contract, specify which audio and video encryption presets to use.\nNote the following considerations when using encryptionContractConfiguration:\nencryptionContractConfiguration can be used for DASH or CMAF endpoints that use SPEKE 2.0. SPEKE 2.0 relies on the CPIX 2.3 specification.\nYou must disable key rotation for this endpoint by setting keyRotationIntervalSeconds to 0." } }, "com.amazonaws.mediapackage#EncryptionMethod": { diff --git a/codegen/sdk-codegen/aws-models/opensearch.2021-01-01.json b/codegen/sdk-codegen/aws-models/opensearch.2021-01-01.json new file mode 100644 index 00000000000..09ed0c15182 --- /dev/null +++ b/codegen/sdk-codegen/aws-models/opensearch.2021-01-01.json @@ -0,0 +1,7058 @@ +{ + "smithy": "1.0", + "metadata": { + "suppressions": [ + { + "id": "HttpMethodSemantics", + "namespace": "*" + }, + { + "id": "HttpResponseCodeSemantics", + "namespace": "*" + }, + { + "id": "PaginatedTrait", + "namespace": "*" + }, + { + "id": "HttpHeaderTrait", + "namespace": "*" + }, + { + "id": "HttpUriConflict", + "namespace": "*" + }, + { + "id": "Service", + "namespace": "*" + } + ] + }, + "shapes": { + "com.amazonaws.opensearch#ARN": { + "type": "string", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the domain. See Identifiers for IAM Entities\n in Using AWS Identity and Access Management for more information.\n

", + "smithy.api#length": { + "min": 20, + "max": 2048 + }, + "smithy.api#pattern": ".*" + } + }, + "com.amazonaws.opensearch#AWSDomainInformation": { + "type": "structure", + "members": { + "OwnerId": { + "target": "com.amazonaws.opensearch#OwnerId" + }, + "DomainName": { + "target": "com.amazonaws.opensearch#DomainName", + "traits": { + "smithy.api#required": {} + } + }, + "Region": { + "target": "com.amazonaws.opensearch#Region" + } + } + }, + "com.amazonaws.opensearch#AcceptInboundConnection": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#AcceptInboundConnectionRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#AcceptInboundConnectionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#DisabledOperationException" + }, + { + "target": "com.amazonaws.opensearch#LimitExceededException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

Allows the remote domain owner to accept an inbound cross-cluster connection request.

", + "smithy.api#http": { + "method": "PUT", + "uri": "/2021-01-01/opensearch/cc/inboundConnection/{ConnectionId}/accept", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#AcceptInboundConnectionRequest": { + "type": "structure", + "members": { + "ConnectionId": { + "target": "com.amazonaws.opensearch#ConnectionId", + "traits": { + "smithy.api#documentation": "

The ID of the inbound connection you want to accept.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for the parameters to the\n \n AcceptInboundConnection\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#AcceptInboundConnectionResponse": { + "type": "structure", + "members": { + "Connection": { + "target": "com.amazonaws.opensearch#InboundConnection", + "traits": { + "smithy.api#documentation": "

The\n \n InboundConnection\n \n of the accepted inbound connection.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The result of an\n \n AcceptInboundConnection\n \n operation. Contains details about the accepted inbound connection.\n

" + } + }, + "com.amazonaws.opensearch#AccessDeniedException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.opensearch#ErrorMessage", + "traits": { + "smithy.api#documentation": "

A description of the error.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

An error occurred because user does not have permissions to access the resource. Returns HTTP status code 403.

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.opensearch#AccessPoliciesStatus": { + "type": "structure", + "members": { + "Options": { + "target": "com.amazonaws.opensearch#PolicyDocument", + "traits": { + "smithy.api#documentation": "

The access policy configured for the domain. Access policies can be resource-based, IP-based, or\n IAM-based. See \n Configuring access policiesfor more information.\n

", + "smithy.api#required": {} + } + }, + "Status": { + "target": "com.amazonaws.opensearch#OptionStatus", + "traits": { + "smithy.api#documentation": "

The status of the access policy for the domain. See OptionStatus for the status\n information that's included.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The configured access rules for the domain's document and search endpoints, and the current status of those\n rules.\n

" + } + }, + "com.amazonaws.opensearch#AddTags": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#AddTagsRequest" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#LimitExceededException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Attaches tags to an existing domain. Tags are a set of case-sensitive key value pairs. An\n domain can have up to 10 tags. See\n \n Tagging Amazon OpenSearch Service domains for more information.\n

", + "smithy.api#http": { + "method": "POST", + "uri": "/2021-01-01/tags", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#AddTagsRequest": { + "type": "structure", + "members": { + "ARN": { + "target": "com.amazonaws.opensearch#ARN", + "traits": { + "smithy.api#documentation": "

Specify the ARN of the domain you want to add tags to.\n

", + "smithy.api#required": {} + } + }, + "TagList": { + "target": "com.amazonaws.opensearch#TagList", + "traits": { + "smithy.api#documentation": "

List of Tag to add to the domain.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for the parameters to the\n \n AddTags\n \n operation. Specifies the tags to attach to the domain.\n

" + } + }, + "com.amazonaws.opensearch#AdditionalLimit": { + "type": "structure", + "members": { + "LimitName": { + "target": "com.amazonaws.opensearch#LimitName", + "traits": { + "smithy.api#documentation": "

\n Additional limit is specific to a given InstanceType and for each of its\n \n InstanceRole\n \n etc.\n

\n Attributes and their details:\n

\n

\n

" + } + }, + "LimitValues": { + "target": "com.amazonaws.opensearch#LimitValueList", + "traits": { + "smithy.api#documentation": "

\n Value for a given\n \n AdditionalLimit$LimitName\n \n .\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n List of limits that are specific to a given InstanceType and for each of its\n \n InstanceRole\n \n .\n

" + } + }, + "com.amazonaws.opensearch#AdditionalLimitList": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#AdditionalLimit" + } + }, + "com.amazonaws.opensearch#AdvancedOptions": { + "type": "map", + "key": { + "target": "com.amazonaws.opensearch#String" + }, + "value": { + "target": "com.amazonaws.opensearch#String" + }, + "traits": { + "smithy.api#documentation": "

Exposes select native OpenSearch configuration values from opensearch.yml. Currently, the\n following advanced options are available:\n

\n \n

For more information, see \n Advanced cluster parameters.\n

" + } + }, + "com.amazonaws.opensearch#AdvancedOptionsStatus": { + "type": "structure", + "members": { + "Options": { + "target": "com.amazonaws.opensearch#AdvancedOptions", + "traits": { + "smithy.api#documentation": "

The status of advanced options for the specified domain.

", + "smithy.api#required": {} + } + }, + "Status": { + "target": "com.amazonaws.opensearch#OptionStatus", + "traits": { + "smithy.api#documentation": "

The OptionStatus for advanced options for the specified domain.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Status of the advanced options for the specified domain. Currently, the following advanced options\n are available:\n

\n \n

For more information, see \n Advanced cluster parameters.\n

" + } + }, + "com.amazonaws.opensearch#AdvancedSecurityOptions": { + "type": "structure", + "members": { + "Enabled": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

True if advanced security is enabled.

" + } + }, + "InternalUserDatabaseEnabled": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

True if the internal user database is enabled.

" + } + }, + "SAMLOptions": { + "target": "com.amazonaws.opensearch#SAMLOptionsOutput", + "traits": { + "smithy.api#documentation": "

Describes the SAML application configured for a domain.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The advanced security configuration: whether advanced security is enabled, whether the internal\n database option is enabled.\n

" + } + }, + "com.amazonaws.opensearch#AdvancedSecurityOptionsInput": { + "type": "structure", + "members": { + "Enabled": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

True if advanced security is enabled.

" + } + }, + "InternalUserDatabaseEnabled": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

True if the internal user database is enabled.

" + } + }, + "MasterUserOptions": { + "target": "com.amazonaws.opensearch#MasterUserOptions", + "traits": { + "smithy.api#documentation": "

Credentials for the master user: username and password, ARN, or both.

" + } + }, + "SAMLOptions": { + "target": "com.amazonaws.opensearch#SAMLOptionsInput", + "traits": { + "smithy.api#documentation": "

The SAML application configuration for the domain.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The advanced security configuration: whether advanced security is enabled, whether the internal\n database option is enabled, master username and password (if internal database is enabled), and master user ARN\n (if IAM is enabled).\n

" + } + }, + "com.amazonaws.opensearch#AdvancedSecurityOptionsStatus": { + "type": "structure", + "members": { + "Options": { + "target": "com.amazonaws.opensearch#AdvancedSecurityOptions", + "traits": { + "smithy.api#documentation": "

Advanced security options for the specified domain.

", + "smithy.api#required": {} + } + }, + "Status": { + "target": "com.amazonaws.opensearch#OptionStatus", + "traits": { + "smithy.api#documentation": "

Status of the advanced security options for the specified domain.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The status of advanced security options for the specified domain.

" + } + }, + "com.amazonaws.opensearch#AmazonOpenSearchService": { + "type": "service", + "version": "2021-01-01", + "operations": [ + { + "target": "com.amazonaws.opensearch#AcceptInboundConnection" + }, + { + "target": "com.amazonaws.opensearch#AddTags" + }, + { + "target": "com.amazonaws.opensearch#AssociatePackage" + }, + { + "target": "com.amazonaws.opensearch#CancelServiceSoftwareUpdate" + }, + { + "target": "com.amazonaws.opensearch#CreateDomain" + }, + { + "target": "com.amazonaws.opensearch#CreateOutboundConnection" + }, + { + "target": "com.amazonaws.opensearch#CreatePackage" + }, + { + "target": "com.amazonaws.opensearch#DeleteDomain" + }, + { + "target": "com.amazonaws.opensearch#DeleteInboundConnection" + }, + { + "target": "com.amazonaws.opensearch#DeleteOutboundConnection" + }, + { + "target": "com.amazonaws.opensearch#DeletePackage" + }, + { + "target": "com.amazonaws.opensearch#DescribeDomain" + }, + { + "target": "com.amazonaws.opensearch#DescribeDomainAutoTunes" + }, + { + "target": "com.amazonaws.opensearch#DescribeDomainConfig" + }, + { + "target": "com.amazonaws.opensearch#DescribeDomains" + }, + { + "target": "com.amazonaws.opensearch#DescribeInboundConnections" + }, + { + "target": "com.amazonaws.opensearch#DescribeInstanceTypeLimits" + }, + { + "target": "com.amazonaws.opensearch#DescribeOutboundConnections" + }, + { + "target": "com.amazonaws.opensearch#DescribePackages" + }, + { + "target": "com.amazonaws.opensearch#DescribeReservedInstanceOfferings" + }, + { + "target": "com.amazonaws.opensearch#DescribeReservedInstances" + }, + { + "target": "com.amazonaws.opensearch#DissociatePackage" + }, + { + "target": "com.amazonaws.opensearch#GetCompatibleVersions" + }, + { + "target": "com.amazonaws.opensearch#GetPackageVersionHistory" + }, + { + "target": "com.amazonaws.opensearch#GetUpgradeHistory" + }, + { + "target": "com.amazonaws.opensearch#GetUpgradeStatus" + }, + { + "target": "com.amazonaws.opensearch#ListDomainNames" + }, + { + "target": "com.amazonaws.opensearch#ListDomainsForPackage" + }, + { + "target": "com.amazonaws.opensearch#ListInstanceTypeDetails" + }, + { + "target": "com.amazonaws.opensearch#ListPackagesForDomain" + }, + { + "target": "com.amazonaws.opensearch#ListTags" + }, + { + "target": "com.amazonaws.opensearch#ListVersions" + }, + { + "target": "com.amazonaws.opensearch#PurchaseReservedInstanceOffering" + }, + { + "target": "com.amazonaws.opensearch#RejectInboundConnection" + }, + { + "target": "com.amazonaws.opensearch#RemoveTags" + }, + { + "target": "com.amazonaws.opensearch#StartServiceSoftwareUpdate" + }, + { + "target": "com.amazonaws.opensearch#UpdateDomainConfig" + }, + { + "target": "com.amazonaws.opensearch#UpdatePackage" + }, + { + "target": "com.amazonaws.opensearch#UpgradeDomain" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "OpenSearch", + "arnNamespace": "es", + "cloudFormationName": "OpenSearch", + "cloudTrailEventSource": "opensearch.amazonaws.com", + "endpointPrefix": "es" + }, + "aws.auth#sigv4": { + "name": "es" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "Amazon OpenSearch Configuration Service\n

Use the Amazon OpenSearch configuration API to create, configure, and manage Amazon OpenSearch Service domains.

\n

For sample code that uses the configuration API, see the \n Amazon OpenSearch Service Developer Guide.\n The guide also contains \n sample\n code for sending signed HTTP requests to the OpenSearch APIs.\n

\n

The endpoint for configuration service requests is region-specific: es.region.amazonaws.com.\n For example, es.us-east-1.amazonaws.com. For a current list of supported regions and endpoints,\n see Regions and Endpoints.\n

", + "smithy.api#title": "Amazon OpenSearch Service", + "smithy.api#xmlNamespace": { + "uri": "http://es.amazonaws.com/doc/2021-01-01/" + } + } + }, + "com.amazonaws.opensearch#AssociatePackage": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#AssociatePackageRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#AssociatePackageResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#AccessDeniedException" + }, + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#ConflictException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Associates a package with an Amazon OpenSearch Service domain.

", + "smithy.api#http": { + "method": "POST", + "uri": "/2021-01-01/packages/associate/{PackageID}/{DomainName}", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#AssociatePackageRequest": { + "type": "structure", + "members": { + "PackageID": { + "target": "com.amazonaws.opensearch#PackageID", + "traits": { + "smithy.api#documentation": "

Internal ID of the package to associate with a domain. Use DescribePackages to find\n this value.\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "DomainName": { + "target": "com.amazonaws.opensearch#DomainName", + "traits": { + "smithy.api#documentation": "

The name of the domain to associate the package with.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for the request parameters to the\n \n AssociatePackage\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#AssociatePackageResponse": { + "type": "structure", + "members": { + "DomainPackageDetails": { + "target": "com.amazonaws.opensearch#DomainPackageDetails", + "traits": { + "smithy.api#documentation": "

\n DomainPackageDetails\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for the response returned by\n \n AssociatePackage\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#AutoTune": { + "type": "structure", + "members": { + "AutoTuneType": { + "target": "com.amazonaws.opensearch#AutoTuneType", + "traits": { + "smithy.api#documentation": "

Specifies the Auto-Tune type. Valid value is SCHEDULED_ACTION.

" + } + }, + "AutoTuneDetails": { + "target": "com.amazonaws.opensearch#AutoTuneDetails", + "traits": { + "smithy.api#documentation": "

Specifies details about the Auto-Tune action. See \n Auto-Tune for Amazon OpenSearch Service\n for more information.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies the Auto-Tune type and Auto-Tune action details.

" + } + }, + "com.amazonaws.opensearch#AutoTuneDate": { + "type": "timestamp", + "traits": { + "smithy.api#documentation": "

The timestamp of the Auto-Tune action scheduled for the domain.

" + } + }, + "com.amazonaws.opensearch#AutoTuneDesiredState": { + "type": "string", + "traits": { + "smithy.api#documentation": "

The Auto-Tune desired state. Valid values are ENABLED and DISABLED.

", + "smithy.api#enum": [ + { + "value": "ENABLED", + "name": "ENABLED" + }, + { + "value": "DISABLED", + "name": "DISABLED" + } + ] + } + }, + "com.amazonaws.opensearch#AutoTuneDetails": { + "type": "structure", + "members": { + "ScheduledAutoTuneDetails": { + "target": "com.amazonaws.opensearch#ScheduledAutoTuneDetails" + } + }, + "traits": { + "smithy.api#documentation": "

Specifies details about the Auto-Tune action. See \n Auto-Tune for Amazon OpenSearch Service\n for more information.\n

" + } + }, + "com.amazonaws.opensearch#AutoTuneList": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#AutoTune" + } + }, + "com.amazonaws.opensearch#AutoTuneMaintenanceSchedule": { + "type": "structure", + "members": { + "StartAt": { + "target": "com.amazonaws.opensearch#StartAt", + "traits": { + "smithy.api#documentation": "

The timestamp at which the Auto-Tune maintenance schedule starts.

" + } + }, + "Duration": { + "target": "com.amazonaws.opensearch#Duration", + "traits": { + "smithy.api#documentation": "

Specifies maintenance schedule duration: duration value and duration unit. See \n Auto-Tune for Amazon OpenSearch Service\n for more information.\n

" + } + }, + "CronExpressionForRecurrence": { + "target": "com.amazonaws.opensearch#String", + "traits": { + "smithy.api#documentation": "

A cron expression for a recurring maintenance schedule. See \n Auto-Tune for Amazon OpenSearch Service\n for more information.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies the Auto-Tune maintenance schedule. See \n Auto-Tune for Amazon OpenSearch Service\n for more information.\n

" + } + }, + "com.amazonaws.opensearch#AutoTuneMaintenanceScheduleList": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#AutoTuneMaintenanceSchedule" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, + "com.amazonaws.opensearch#AutoTuneOptions": { + "type": "structure", + "members": { + "DesiredState": { + "target": "com.amazonaws.opensearch#AutoTuneDesiredState", + "traits": { + "smithy.api#documentation": "

The Auto-Tune desired state. Valid values are ENABLED and DISABLED.

" + } + }, + "RollbackOnDisable": { + "target": "com.amazonaws.opensearch#RollbackOnDisable", + "traits": { + "smithy.api#documentation": "

The rollback state while disabling Auto-Tune for the domain. Valid values are NO_ROLLBACK and DEFAULT_ROLLBACK.\n

" + } + }, + "MaintenanceSchedules": { + "target": "com.amazonaws.opensearch#AutoTuneMaintenanceScheduleList", + "traits": { + "smithy.api#documentation": "

A list of maintenance schedules. See \n Auto-Tune for Amazon OpenSearch Service\n for more information.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The Auto-Tune options: the Auto-Tune desired state for the domain, rollback state when disabling\n Auto-Tune options and list of maintenance schedules.\n

" + } + }, + "com.amazonaws.opensearch#AutoTuneOptionsInput": { + "type": "structure", + "members": { + "DesiredState": { + "target": "com.amazonaws.opensearch#AutoTuneDesiredState", + "traits": { + "smithy.api#documentation": "

The Auto-Tune desired state. Valid values are ENABLED and DISABLED.

" + } + }, + "MaintenanceSchedules": { + "target": "com.amazonaws.opensearch#AutoTuneMaintenanceScheduleList", + "traits": { + "smithy.api#documentation": "

A list of maintenance schedules. See \n Auto-Tune for Amazon OpenSearch Service\n for more information.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The Auto-Tune options: the Auto-Tune desired state for the domain and list of maintenance schedules.\n

" + } + }, + "com.amazonaws.opensearch#AutoTuneOptionsOutput": { + "type": "structure", + "members": { + "State": { + "target": "com.amazonaws.opensearch#AutoTuneState", + "traits": { + "smithy.api#documentation": "

The AutoTuneState for the domain.\n

" + } + }, + "ErrorMessage": { + "target": "com.amazonaws.opensearch#String", + "traits": { + "smithy.api#documentation": "

The error message while enabling or disabling Auto-Tune.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The Auto-Tune options: the Auto-Tune desired state for the domain and list of maintenance schedules.\n

" + } + }, + "com.amazonaws.opensearch#AutoTuneOptionsStatus": { + "type": "structure", + "members": { + "Options": { + "target": "com.amazonaws.opensearch#AutoTuneOptions", + "traits": { + "smithy.api#documentation": "

Specifies Auto-Tune options for the domain.

" + } + }, + "Status": { + "target": "com.amazonaws.opensearch#AutoTuneStatus", + "traits": { + "smithy.api#documentation": "

The status of the Auto-Tune options for the domain.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The Auto-Tune status for the domain.

" + } + }, + "com.amazonaws.opensearch#AutoTuneState": { + "type": "string", + "traits": { + "smithy.api#documentation": "

The Auto-Tune state for the domain. For valid states see \n Auto-Tune for Amazon OpenSearch Service.\n

", + "smithy.api#enum": [ + { + "value": "ENABLED", + "name": "ENABLED" + }, + { + "value": "DISABLED", + "name": "DISABLED" + }, + { + "value": "ENABLE_IN_PROGRESS", + "name": "ENABLE_IN_PROGRESS" + }, + { + "value": "DISABLE_IN_PROGRESS", + "name": "DISABLE_IN_PROGRESS" + }, + { + "value": "DISABLED_AND_ROLLBACK_SCHEDULED", + "name": "DISABLED_AND_ROLLBACK_SCHEDULED" + }, + { + "value": "DISABLED_AND_ROLLBACK_IN_PROGRESS", + "name": "DISABLED_AND_ROLLBACK_IN_PROGRESS" + }, + { + "value": "DISABLED_AND_ROLLBACK_COMPLETE", + "name": "DISABLED_AND_ROLLBACK_COMPLETE" + }, + { + "value": "DISABLED_AND_ROLLBACK_ERROR", + "name": "DISABLED_AND_ROLLBACK_ERROR" + }, + { + "value": "ERROR", + "name": "ERROR" + } + ] + } + }, + "com.amazonaws.opensearch#AutoTuneStatus": { + "type": "structure", + "members": { + "CreationDate": { + "target": "com.amazonaws.opensearch#UpdateTimestamp", + "traits": { + "smithy.api#documentation": "

The timestamp of the Auto-Tune options creation date.

", + "smithy.api#required": {} + } + }, + "UpdateDate": { + "target": "com.amazonaws.opensearch#UpdateTimestamp", + "traits": { + "smithy.api#documentation": "

The timestamp of when the Auto-Tune options were last updated.

", + "smithy.api#required": {} + } + }, + "UpdateVersion": { + "target": "com.amazonaws.opensearch#UIntValue", + "traits": { + "smithy.api#documentation": "

The latest version of the Auto-Tune options.

" + } + }, + "State": { + "target": "com.amazonaws.opensearch#AutoTuneState", + "traits": { + "smithy.api#documentation": "

The AutoTuneState for the domain.\n

", + "smithy.api#required": {} + } + }, + "ErrorMessage": { + "target": "com.amazonaws.opensearch#String", + "traits": { + "smithy.api#documentation": "

The error message while enabling or disabling Auto-Tune.

" + } + }, + "PendingDeletion": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

Indicates whether the domain is being deleted.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Provides the current Auto-Tune status for the domain.

" + } + }, + "com.amazonaws.opensearch#AutoTuneType": { + "type": "string", + "traits": { + "smithy.api#documentation": "

Specifies the Auto-Tune type. Valid value is SCHEDULED_ACTION.

", + "smithy.api#enum": [ + { + "value": "SCHEDULED_ACTION", + "name": "SCHEDULED_ACTION" + } + ] + } + }, + "com.amazonaws.opensearch#BackendRole": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + } + } + }, + "com.amazonaws.opensearch#BaseException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.opensearch#ErrorMessage", + "traits": { + "smithy.api#documentation": "

A description of the error.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

An error occurred while processing the request.

", + "smithy.api#error": "client" + } + }, + "com.amazonaws.opensearch#Boolean": { + "type": "boolean", + "traits": { + "smithy.api#box": {} + } + }, + "com.amazonaws.opensearch#CancelServiceSoftwareUpdate": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#CancelServiceSoftwareUpdateRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#CancelServiceSoftwareUpdateResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Cancels a scheduled service software update for an Amazon OpenSearch Service domain. You can only perform this operation before\n the AutomatedUpdateDate and when the UpdateStatus is in the PENDING_UPDATE state.\n

", + "smithy.api#http": { + "method": "POST", + "uri": "/2021-01-01/opensearch/serviceSoftwareUpdate/cancel", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#CancelServiceSoftwareUpdateRequest": { + "type": "structure", + "members": { + "DomainName": { + "target": "com.amazonaws.opensearch#DomainName", + "traits": { + "smithy.api#documentation": "

The name of the domain that you want to stop the latest service software update on.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for the parameters to the\n \n CancelServiceSoftwareUpdate\n \n operation. Specifies the name of the domain that you wish to cancel a service software update on.\n

" + } + }, + "com.amazonaws.opensearch#CancelServiceSoftwareUpdateResponse": { + "type": "structure", + "members": { + "ServiceSoftwareOptions": { + "target": "com.amazonaws.opensearch#ServiceSoftwareOptions", + "traits": { + "smithy.api#documentation": "

The current status of the OpenSearch service software update.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The result of a CancelServiceSoftwareUpdate operation. Contains the status of the\n update.\n

" + } + }, + "com.amazonaws.opensearch#CloudWatchLogsLogGroupArn": { + "type": "string", + "traits": { + "smithy.api#documentation": "

ARN of the Cloudwatch log group to publish logs to.

", + "smithy.api#length": { + "min": 20, + "max": 2048 + }, + "smithy.api#pattern": ".*" + } + }, + "com.amazonaws.opensearch#ClusterConfig": { + "type": "structure", + "members": { + "InstanceType": { + "target": "com.amazonaws.opensearch#OpenSearchPartitionInstanceType", + "traits": { + "smithy.api#documentation": "

The instance type for an OpenSearch cluster. UltraWarm instance types are not supported for data instances.\n

" + } + }, + "InstanceCount": { + "target": "com.amazonaws.opensearch#IntegerClass", + "traits": { + "smithy.api#documentation": "

The number of instances in the specified domain cluster.

" + } + }, + "DedicatedMasterEnabled": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

A boolean value to indicate whether a dedicated master node is enabled. See Dedicated master nodes in Amazon OpenSearch Service \n for more information.\n

" + } + }, + "ZoneAwarenessEnabled": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

A boolean value to indicate whether zone awareness is enabled. See Configuring a multi-AZ domain in Amazon OpenSearch Service\n for more information.\n

" + } + }, + "ZoneAwarenessConfig": { + "target": "com.amazonaws.opensearch#ZoneAwarenessConfig", + "traits": { + "smithy.api#documentation": "

The zone awareness configuration for a domain when zone awareness is enabled.

" + } + }, + "DedicatedMasterType": { + "target": "com.amazonaws.opensearch#OpenSearchPartitionInstanceType", + "traits": { + "smithy.api#documentation": "

The instance type for a dedicated master node.

" + } + }, + "DedicatedMasterCount": { + "target": "com.amazonaws.opensearch#IntegerClass", + "traits": { + "smithy.api#documentation": "

Total number of dedicated master nodes, active and on standby, for the cluster.

" + } + }, + "WarmEnabled": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

True to enable UltraWarm storage.

" + } + }, + "WarmType": { + "target": "com.amazonaws.opensearch#OpenSearchWarmPartitionInstanceType", + "traits": { + "smithy.api#documentation": "

The instance type for the OpenSearch cluster's warm nodes.

" + } + }, + "WarmCount": { + "target": "com.amazonaws.opensearch#IntegerClass", + "traits": { + "smithy.api#documentation": "

The number of UltraWarm nodes in the cluster.

" + } + }, + "ColdStorageOptions": { + "target": "com.amazonaws.opensearch#ColdStorageOptions" + } + }, + "traits": { + "smithy.api#documentation": "

The configuration for the domain cluster, such as the type and number of instances.

" + } + }, + "com.amazonaws.opensearch#ClusterConfigStatus": { + "type": "structure", + "members": { + "Options": { + "target": "com.amazonaws.opensearch#ClusterConfig", + "traits": { + "smithy.api#documentation": "

The cluster configuration for the specified domain.

", + "smithy.api#required": {} + } + }, + "Status": { + "target": "com.amazonaws.opensearch#OptionStatus", + "traits": { + "smithy.api#documentation": "

The cluster configuration status for the specified domain.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The configuration status for the specified domain.

" + } + }, + "com.amazonaws.opensearch#CognitoOptions": { + "type": "structure", + "members": { + "Enabled": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

The option to enable Cognito for OpenSearch Dashboards authentication.

" + } + }, + "UserPoolId": { + "target": "com.amazonaws.opensearch#UserPoolId", + "traits": { + "smithy.api#documentation": "

The Cognito user pool ID for OpenSearch Dashboards authentication.

" + } + }, + "IdentityPoolId": { + "target": "com.amazonaws.opensearch#IdentityPoolId", + "traits": { + "smithy.api#documentation": "

The Cognito identity pool ID for OpenSearch Dashboards authentication.

" + } + }, + "RoleArn": { + "target": "com.amazonaws.opensearch#RoleArn", + "traits": { + "smithy.api#documentation": "

The role ARN that provides OpenSearch permissions for accessing Cognito resources.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Options to specify the Cognito user and identity pools for OpenSearch Dashboards authentication. For more information, see Configuring Amazon Cognito authentication for OpenSearch Dashboards.\n

" + } + }, + "com.amazonaws.opensearch#CognitoOptionsStatus": { + "type": "structure", + "members": { + "Options": { + "target": "com.amazonaws.opensearch#CognitoOptions", + "traits": { + "smithy.api#documentation": "

Cognito options for the specified domain.

", + "smithy.api#required": {} + } + }, + "Status": { + "target": "com.amazonaws.opensearch#OptionStatus", + "traits": { + "smithy.api#documentation": "

The status of the Cognito options for the specified domain.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The status of the Cognito options for the specified domain.

" + } + }, + "com.amazonaws.opensearch#ColdStorageOptions": { + "type": "structure", + "members": { + "Enabled": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.opensearch#CommitMessage": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 160 + } + } + }, + "com.amazonaws.opensearch#CompatibleVersionsList": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#CompatibleVersionsMap" + } + }, + "com.amazonaws.opensearch#CompatibleVersionsMap": { + "type": "structure", + "members": { + "SourceVersion": { + "target": "com.amazonaws.opensearch#VersionString", + "traits": { + "smithy.api#documentation": "

The current version of OpenSearch a domain is on.

" + } + }, + "TargetVersions": { + "target": "com.amazonaws.opensearch#VersionList" + } + }, + "traits": { + "smithy.api#documentation": "

\n A map from an\n \n EngineVersion\n \n to a list of compatible\n \n EngineVersion\n \n s to which the domain can be upgraded.\n

" + } + }, + "com.amazonaws.opensearch#ConflictException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.opensearch#ErrorMessage", + "traits": { + "smithy.api#documentation": "

A description of the error.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

An error occurred because the client attempts to remove a resource that is currently in use. Returns HTTP status code 409.

", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.opensearch#ConnectionAlias": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 2, + "max": 100 + }, + "smithy.api#pattern": "^[a-zA-Z][a-zA-Z0-9\\-\\_]+$" + } + }, + "com.amazonaws.opensearch#ConnectionId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 10, + "max": 256 + }, + "smithy.api#pattern": "^[a-z][a-z0-9\\-]+$" + } + }, + "com.amazonaws.opensearch#ConnectionStatusMessage": { + "type": "string" + }, + "com.amazonaws.opensearch#CreateDomain": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#CreateDomainRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#CreateDomainResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#DisabledOperationException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#InvalidTypeException" + }, + { + "target": "com.amazonaws.opensearch#LimitExceededException" + }, + { + "target": "com.amazonaws.opensearch#ResourceAlreadyExistsException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates a new Amazon OpenSearch Service domain. For more information,\n see Creating and managing Amazon OpenSearch Service domains\n in the Amazon OpenSearch Service Developer Guide.\n

", + "smithy.api#http": { + "method": "POST", + "uri": "/2021-01-01/opensearch/domain", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#CreateDomainRequest": { + "type": "structure", + "members": { + "DomainName": { + "target": "com.amazonaws.opensearch#DomainName", + "traits": { + "smithy.api#documentation": "

The name of the Amazon OpenSearch Service domain you're creating. Domain names are unique across the domains owned by\n an account within an AWS region. Domain names must start with a lowercase letter and can contain the following\n characters: a-z (lowercase), 0-9, and - (hyphen).\n

", + "smithy.api#required": {} + } + }, + "EngineVersion": { + "target": "com.amazonaws.opensearch#VersionString", + "traits": { + "smithy.api#documentation": "

String of format Elasticsearch_X.Y or OpenSearch_X.Y to specify the engine version for the Amazon OpenSearch Service domain.\n For example, \"OpenSearch_1.0\" or \"Elasticsearch_7.9\". For more information,\n see Creating and managing Amazon OpenSearch Service domains\n .\n

" + } + }, + "ClusterConfig": { + "target": "com.amazonaws.opensearch#ClusterConfig", + "traits": { + "smithy.api#documentation": "

Configuration options for a domain. Specifies the instance type and number of instances in the\n domain.\n

" + } + }, + "EBSOptions": { + "target": "com.amazonaws.opensearch#EBSOptions", + "traits": { + "smithy.api#documentation": "

Options to enable, disable, and specify the type and size of EBS storage volumes.

" + } + }, + "AccessPolicies": { + "target": "com.amazonaws.opensearch#PolicyDocument", + "traits": { + "smithy.api#documentation": "

IAM access policy as a JSON-formatted string.

" + } + }, + "SnapshotOptions": { + "target": "com.amazonaws.opensearch#SnapshotOptions", + "traits": { + "smithy.api#documentation": "

Option to set time, in UTC format, of the daily automated snapshot. Default value is 0 hours.

" + } + }, + "VPCOptions": { + "target": "com.amazonaws.opensearch#VPCOptions", + "traits": { + "smithy.api#documentation": "

Options to specify the subnets and security groups for a VPC endpoint. For more information, see Launching your Amazon OpenSearch Service domains using a VPC\n .\n

" + } + }, + "CognitoOptions": { + "target": "com.amazonaws.opensearch#CognitoOptions", + "traits": { + "smithy.api#documentation": "

Options to specify the Cognito user and identity pools for OpenSearch Dashboards authentication. For more information, see Configuring Amazon Cognito authentication for OpenSearch Dashboards.\n

" + } + }, + "EncryptionAtRestOptions": { + "target": "com.amazonaws.opensearch#EncryptionAtRestOptions", + "traits": { + "smithy.api#documentation": "

Options for encryption of data at rest.

" + } + }, + "NodeToNodeEncryptionOptions": { + "target": "com.amazonaws.opensearch#NodeToNodeEncryptionOptions", + "traits": { + "smithy.api#documentation": "

Node-to-node encryption options.

" + } + }, + "AdvancedOptions": { + "target": "com.amazonaws.opensearch#AdvancedOptions", + "traits": { + "smithy.api#documentation": "

Option to allow references to indices in an HTTP request body. Must be false when configuring access\n to individual sub-resources. By default, the value is true.\n See Advanced cluster parameters\n for more information.\n

" + } + }, + "LogPublishingOptions": { + "target": "com.amazonaws.opensearch#LogPublishingOptions", + "traits": { + "smithy.api#documentation": "

Map of LogType and LogPublishingOption, each containing options to publish a given type\n of OpenSearch log.\n

" + } + }, + "DomainEndpointOptions": { + "target": "com.amazonaws.opensearch#DomainEndpointOptions", + "traits": { + "smithy.api#documentation": "

Options to specify configurations that will be applied to the domain endpoint.

" + } + }, + "AdvancedSecurityOptions": { + "target": "com.amazonaws.opensearch#AdvancedSecurityOptionsInput", + "traits": { + "smithy.api#documentation": "

Specifies advanced security options.

" + } + }, + "TagList": { + "target": "com.amazonaws.opensearch#TagList", + "traits": { + "smithy.api#documentation": "

A list of Tag added during domain creation.\n

" + } + }, + "AutoTuneOptions": { + "target": "com.amazonaws.opensearch#AutoTuneOptionsInput", + "traits": { + "smithy.api#documentation": "

Specifies Auto-Tune options.

" + } + } + } + }, + "com.amazonaws.opensearch#CreateDomainResponse": { + "type": "structure", + "members": { + "DomainStatus": { + "target": "com.amazonaws.opensearch#DomainStatus", + "traits": { + "smithy.api#documentation": "

The status of the newly created domain.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The result of a CreateDomain operation. Contains the status of the newly created\n Amazon OpenSearch Service domain.\n

" + } + }, + "com.amazonaws.opensearch#CreateOutboundConnection": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#CreateOutboundConnectionRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#CreateOutboundConnectionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#DisabledOperationException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#LimitExceededException" + }, + { + "target": "com.amazonaws.opensearch#ResourceAlreadyExistsException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates a new cross-cluster connection from a local OpenSearch domain to a remote OpenSearch domain.

", + "smithy.api#http": { + "method": "POST", + "uri": "/2021-01-01/opensearch/cc/outboundConnection", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#CreateOutboundConnectionRequest": { + "type": "structure", + "members": { + "LocalDomainInfo": { + "target": "com.amazonaws.opensearch#DomainInformationContainer", + "traits": { + "smithy.api#documentation": "

The\n \n AWSDomainInformation\n \n for the local OpenSearch domain.\n

", + "smithy.api#required": {} + } + }, + "RemoteDomainInfo": { + "target": "com.amazonaws.opensearch#DomainInformationContainer", + "traits": { + "smithy.api#documentation": "

The\n \n AWSDomainInformation\n \n for the remote OpenSearch domain.\n

", + "smithy.api#required": {} + } + }, + "ConnectionAlias": { + "target": "com.amazonaws.opensearch#ConnectionAlias", + "traits": { + "smithy.api#documentation": "

The connection alias used used by the customer for this cross-cluster connection.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for the parameters to the\n \n CreateOutboundConnection\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#CreateOutboundConnectionResponse": { + "type": "structure", + "members": { + "LocalDomainInfo": { + "target": "com.amazonaws.opensearch#DomainInformationContainer", + "traits": { + "smithy.api#documentation": "

The\n \n AWSDomainInformation\n \n for the local OpenSearch domain.\n

" + } + }, + "RemoteDomainInfo": { + "target": "com.amazonaws.opensearch#DomainInformationContainer", + "traits": { + "smithy.api#documentation": "

The\n \n AWSDomainInformation\n \n for the remote OpenSearch domain.\n

" + } + }, + "ConnectionAlias": { + "target": "com.amazonaws.opensearch#ConnectionAlias", + "traits": { + "smithy.api#documentation": "

The connection alias provided during the create connection request.

" + } + }, + "ConnectionStatus": { + "target": "com.amazonaws.opensearch#OutboundConnectionStatus", + "traits": { + "smithy.api#documentation": "

The\n \n OutboundConnectionStatus\n \n for the newly created connection.\n

" + } + }, + "ConnectionId": { + "target": "com.amazonaws.opensearch#ConnectionId", + "traits": { + "smithy.api#documentation": "

The unique ID for the created outbound connection, which is used for subsequent operations on the connection.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The result of a\n \n CreateOutboundConnection\n \n request. Contains the details about the newly created cross-cluster connection.\n

" + } + }, + "com.amazonaws.opensearch#CreatePackage": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#CreatePackageRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#CreatePackageResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#AccessDeniedException" + }, + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#InvalidTypeException" + }, + { + "target": "com.amazonaws.opensearch#LimitExceededException" + }, + { + "target": "com.amazonaws.opensearch#ResourceAlreadyExistsException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Create a package for use with Amazon OpenSearch Service domains.

", + "smithy.api#http": { + "method": "POST", + "uri": "/2021-01-01/packages", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#CreatePackageRequest": { + "type": "structure", + "members": { + "PackageName": { + "target": "com.amazonaws.opensearch#PackageName", + "traits": { + "smithy.api#documentation": "

Unique identifier for the package.

", + "smithy.api#required": {} + } + }, + "PackageType": { + "target": "com.amazonaws.opensearch#PackageType", + "traits": { + "smithy.api#documentation": "

Type of package. Currently supports only TXT-DICTIONARY.

", + "smithy.api#required": {} + } + }, + "PackageDescription": { + "target": "com.amazonaws.opensearch#PackageDescription", + "traits": { + "smithy.api#documentation": "

Description of the package.

" + } + }, + "PackageSource": { + "target": "com.amazonaws.opensearch#PackageSource", + "traits": { + "smithy.api#documentation": "

The Amazon S3 location from which to import the package.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for request parameters to the\n \n CreatePackage\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#CreatePackageResponse": { + "type": "structure", + "members": { + "PackageDetails": { + "target": "com.amazonaws.opensearch#PackageDetails", + "traits": { + "smithy.api#documentation": "

Information about the package.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for the response returned by the\n \n CreatePackage\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#CreatedAt": { + "type": "timestamp" + }, + "com.amazonaws.opensearch#DeleteDomain": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#DeleteDomainRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#DeleteDomainResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Permanently deletes the specified domain and all of its data. Once a domain is deleted, it cannot\n be recovered.\n

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/2021-01-01/opensearch/domain/{DomainName}", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#DeleteDomainRequest": { + "type": "structure", + "members": { + "DomainName": { + "target": "com.amazonaws.opensearch#DomainName", + "traits": { + "smithy.api#documentation": "

The name of the domain you want to permanently delete.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for the parameters to the\n \n DeleteDomain\n \n operation. Specifies the name of the domain you want to delete.\n

" + } + }, + "com.amazonaws.opensearch#DeleteDomainResponse": { + "type": "structure", + "members": { + "DomainStatus": { + "target": "com.amazonaws.opensearch#DomainStatus", + "traits": { + "smithy.api#documentation": "

The status of the domain being deleted.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The result of a DeleteDomain request. Contains the status of the pending deletion, or\n a \"domain not found\" error if the domain and all of its resources have been deleted.\n

" + } + }, + "com.amazonaws.opensearch#DeleteInboundConnection": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#DeleteInboundConnectionRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#DeleteInboundConnectionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#DisabledOperationException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

Allows the remote domain owner to delete an existing inbound cross-cluster connection.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/2021-01-01/opensearch/cc/inboundConnection/{ConnectionId}", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#DeleteInboundConnectionRequest": { + "type": "structure", + "members": { + "ConnectionId": { + "target": "com.amazonaws.opensearch#ConnectionId", + "traits": { + "smithy.api#documentation": "

The ID of the inbound connection to permanently delete.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for the parameters to the\n \n DeleteInboundConnection\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#DeleteInboundConnectionResponse": { + "type": "structure", + "members": { + "Connection": { + "target": "com.amazonaws.opensearch#InboundConnection", + "traits": { + "smithy.api#documentation": "

The\n \n InboundConnection\n \n of the deleted inbound connection.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The result of a\n \n DeleteInboundConnection\n \n operation. Contains details about the deleted inbound connection.\n

" + } + }, + "com.amazonaws.opensearch#DeleteOutboundConnection": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#DeleteOutboundConnectionRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#DeleteOutboundConnectionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#DisabledOperationException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

Allows the local domain owner to delete an existing outbound cross-cluster connection.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/2021-01-01/opensearch/cc/outboundConnection/{ConnectionId}", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#DeleteOutboundConnectionRequest": { + "type": "structure", + "members": { + "ConnectionId": { + "target": "com.amazonaws.opensearch#ConnectionId", + "traits": { + "smithy.api#documentation": "

The ID of the outbound connection you want to permanently delete.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for the parameters to the\n \n DeleteOutboundConnection\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#DeleteOutboundConnectionResponse": { + "type": "structure", + "members": { + "Connection": { + "target": "com.amazonaws.opensearch#OutboundConnection", + "traits": { + "smithy.api#documentation": "

The\n \n OutboundConnection\n \n of the deleted outbound connection.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The result of a\n \n DeleteOutboundConnection\n \n operation. Contains details about the deleted outbound connection.\n

" + } + }, + "com.amazonaws.opensearch#DeletePackage": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#DeletePackageRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#DeletePackageResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#AccessDeniedException" + }, + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#ConflictException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes the package.

", + "smithy.api#http": { + "method": "DELETE", + "uri": "/2021-01-01/packages/{PackageID}", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#DeletePackageRequest": { + "type": "structure", + "members": { + "PackageID": { + "target": "com.amazonaws.opensearch#PackageID", + "traits": { + "smithy.api#documentation": "

The internal ID of the package you want to delete. Use DescribePackages to find this value.\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for the request parameters to the\n \n DeletePackage\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#DeletePackageResponse": { + "type": "structure", + "members": { + "PackageDetails": { + "target": "com.amazonaws.opensearch#PackageDetails", + "traits": { + "smithy.api#documentation": "

\n PackageDetails\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for the response parameters to the\n \n DeletePackage\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#DeploymentCloseDateTimeStamp": { + "type": "timestamp" + }, + "com.amazonaws.opensearch#DeploymentStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PENDING_UPDATE", + "name": "PENDING_UPDATE" + }, + { + "value": "IN_PROGRESS", + "name": "IN_PROGRESS" + }, + { + "value": "COMPLETED", + "name": "COMPLETED" + }, + { + "value": "NOT_ELIGIBLE", + "name": "NOT_ELIGIBLE" + }, + { + "value": "ELIGIBLE", + "name": "ELIGIBLE" + } + ] + } + }, + "com.amazonaws.opensearch#DescribeDomain": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#DescribeDomainRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#DescribeDomainResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns domain configuration information about the specified domain, including the domain ID,\n domain endpoint, and domain ARN.\n

", + "smithy.api#http": { + "method": "GET", + "uri": "/2021-01-01/opensearch/domain/{DomainName}", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#DescribeDomainAutoTunes": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#DescribeDomainAutoTunesRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#DescribeDomainAutoTunesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Provides scheduled Auto-Tune action details for the domain, such as Auto-Tune action type,\n description, severity, and scheduled date.\n

", + "smithy.api#http": { + "method": "GET", + "uri": "/2021-01-01/opensearch/domain/{DomainName}/autoTunes", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.opensearch#DescribeDomainAutoTunesRequest": { + "type": "structure", + "members": { + "DomainName": { + "target": "com.amazonaws.opensearch#DomainName", + "traits": { + "smithy.api#documentation": "

The domain name for which you want Auto-Tune action details.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "MaxResults": { + "target": "com.amazonaws.opensearch#MaxResults", + "traits": { + "smithy.api#documentation": "

Set this value to limit the number of results returned. If not specified, defaults to 100.

" + } + }, + "NextToken": { + "target": "com.amazonaws.opensearch#NextToken", + "traits": { + "smithy.api#documentation": "

NextToken is sent in case the earlier API call results contain the NextToken. Used for pagination.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for the parameters to the DescribeDomainAutoTunes operation.\n

" + } + }, + "com.amazonaws.opensearch#DescribeDomainAutoTunesResponse": { + "type": "structure", + "members": { + "AutoTunes": { + "target": "com.amazonaws.opensearch#AutoTuneList", + "traits": { + "smithy.api#documentation": "

The list of setting adjustments that Auto-Tune has made to the domain. See \n Auto-Tune for Amazon OpenSearch Service\n for more information.\n

" + } + }, + "NextToken": { + "target": "com.amazonaws.opensearch#NextToken", + "traits": { + "smithy.api#documentation": "

An identifier to allow retrieval of paginated results.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The result of a DescribeDomainAutoTunes request. See \n Auto-Tune for Amazon OpenSearch Service\n for more information.\n

" + } + }, + "com.amazonaws.opensearch#DescribeDomainConfig": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#DescribeDomainConfigRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#DescribeDomainConfigResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Provides cluster configuration information about the specified domain, such as the state, creation\n date, update version, and update date for cluster options.\n

", + "smithy.api#http": { + "method": "GET", + "uri": "/2021-01-01/opensearch/domain/{DomainName}/config", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#DescribeDomainConfigRequest": { + "type": "structure", + "members": { + "DomainName": { + "target": "com.amazonaws.opensearch#DomainName", + "traits": { + "smithy.api#documentation": "

The domain you want to get information about.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for the parameters to the DescribeDomainConfig operation. Specifies the\n domain name for which you want configuration information.\n

" + } + }, + "com.amazonaws.opensearch#DescribeDomainConfigResponse": { + "type": "structure", + "members": { + "DomainConfig": { + "target": "com.amazonaws.opensearch#DomainConfig", + "traits": { + "smithy.api#documentation": "

The configuration information of the domain requested in the DescribeDomainConfig request.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The result of a DescribeDomainConfig request. Contains the configuration information of\n the requested domain.\n

" + } + }, + "com.amazonaws.opensearch#DescribeDomainRequest": { + "type": "structure", + "members": { + "DomainName": { + "target": "com.amazonaws.opensearch#DomainName", + "traits": { + "smithy.api#documentation": "

The name of the domain for which you want information.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for the parameters to the\n \n DescribeDomain\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#DescribeDomainResponse": { + "type": "structure", + "members": { + "DomainStatus": { + "target": "com.amazonaws.opensearch#DomainStatus", + "traits": { + "smithy.api#documentation": "

The current status of the domain.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The result of a DescribeDomain request. Contains the status of the domain specified in\n the request.\n

" + } + }, + "com.amazonaws.opensearch#DescribeDomains": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#DescribeDomainsRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#DescribeDomainsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns domain configuration information about the specified domains, including the domain ID,\n domain endpoint, and domain ARN.\n

", + "smithy.api#http": { + "method": "POST", + "uri": "/2021-01-01/opensearch/domain-info", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#DescribeDomainsRequest": { + "type": "structure", + "members": { + "DomainNames": { + "target": "com.amazonaws.opensearch#DomainNameList", + "traits": { + "smithy.api#documentation": "

The domains for which you want information.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for the parameters to the\n \n DescribeDomains\n \n operation. By default, the API returns the status of all domains.\n

" + } + }, + "com.amazonaws.opensearch#DescribeDomainsResponse": { + "type": "structure", + "members": { + "DomainStatusList": { + "target": "com.amazonaws.opensearch#DomainStatusList", + "traits": { + "smithy.api#documentation": "

The status of the domains requested in the DescribeDomains request.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The result of a DescribeDomains request. Contains the status of the specified domains\n or all domains owned by the account.\n

" + } + }, + "com.amazonaws.opensearch#DescribeInboundConnections": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#DescribeInboundConnectionsRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#DescribeInboundConnectionsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#DisabledOperationException" + }, + { + "target": "com.amazonaws.opensearch#InvalidPaginationTokenException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists all the inbound cross-cluster connections for a remote domain.

", + "smithy.api#http": { + "method": "POST", + "uri": "/2021-01-01/opensearch/cc/inboundConnection/search", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.opensearch#DescribeInboundConnectionsRequest": { + "type": "structure", + "members": { + "Filters": { + "target": "com.amazonaws.opensearch#FilterList", + "traits": { + "smithy.api#documentation": "

\n A list of filters used to match properties for inbound cross-cluster connections.\n Available\n \n Filter\n \n values are:\n

\n

" + } + }, + "MaxResults": { + "target": "com.amazonaws.opensearch#MaxResults", + "traits": { + "smithy.api#documentation": "

Set this value to limit the number of results returned. If not specified, defaults to 100.

" + } + }, + "NextToken": { + "target": "com.amazonaws.opensearch#NextToken", + "traits": { + "smithy.api#documentation": "

If more results are available and NextToken is present, make the next request to the same API with the received\n NextToken to paginate the remaining results.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for the parameters to the\n \n DescribeInboundConnections\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#DescribeInboundConnectionsResponse": { + "type": "structure", + "members": { + "Connections": { + "target": "com.amazonaws.opensearch#InboundConnections", + "traits": { + "smithy.api#documentation": "

A list of\n \n InboundConnection\n \n matching the specified filter criteria.\n

" + } + }, + "NextToken": { + "target": "com.amazonaws.opensearch#NextToken", + "traits": { + "smithy.api#documentation": "

If more results are available and NextToken is present, make the next request to the same API with the received\n NextToken to paginate the remaining results.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The result of a\n \n DescribeInboundConnections\n \n request. Contains a list of connections matching the filter criteria.\n

" + } + }, + "com.amazonaws.opensearch#DescribeInstanceTypeLimits": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#DescribeInstanceTypeLimitsRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#DescribeInstanceTypeLimitsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#InvalidTypeException" + }, + { + "target": "com.amazonaws.opensearch#LimitExceededException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

\n Describe the limits for a given instance type and OpenSearch or Elasticsearch version.\n When modifying an existing domain, specify the\n \n DomainName\n \n to see which limits you can modify.\n

", + "smithy.api#http": { + "method": "GET", + "uri": "/2021-01-01/opensearch/instanceTypeLimits/{EngineVersion}/{InstanceType}", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#DescribeInstanceTypeLimitsRequest": { + "type": "structure", + "members": { + "DomainName": { + "target": "com.amazonaws.opensearch#DomainName", + "traits": { + "smithy.api#documentation": "

\n The name of the domain you want to modify. Only include this value if you're\n querying OpenSearch\n \n Limits\n \n for an existing domain.\n

", + "smithy.api#httpQuery": "domainName" + } + }, + "InstanceType": { + "target": "com.amazonaws.opensearch#OpenSearchPartitionInstanceType", + "traits": { + "smithy.api#documentation": "

\n The instance type for an OpenSearch cluster for which OpenSearch\n \n Limits\n \n are needed.\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "EngineVersion": { + "target": "com.amazonaws.opensearch#VersionString", + "traits": { + "smithy.api#documentation": "

\n Version of OpenSearch for which\n \n Limits\n \n are needed.\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for the parameters to the\n \n DescribeInstanceTypeLimits\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#DescribeInstanceTypeLimitsResponse": { + "type": "structure", + "members": { + "LimitsByRole": { + "target": "com.amazonaws.opensearch#LimitsByRole" + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for the parameters received from the\n \n DescribeInstanceTypeLimits\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#DescribeOutboundConnections": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#DescribeOutboundConnectionsRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#DescribeOutboundConnectionsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#DisabledOperationException" + }, + { + "target": "com.amazonaws.opensearch#InvalidPaginationTokenException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists all the outbound cross-cluster connections for a local domain.

", + "smithy.api#http": { + "method": "POST", + "uri": "/2021-01-01/opensearch/cc/outboundConnection/search", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.opensearch#DescribeOutboundConnectionsRequest": { + "type": "structure", + "members": { + "Filters": { + "target": "com.amazonaws.opensearch#FilterList", + "traits": { + "smithy.api#documentation": "

\n A list of filters used to match properties for outbound cross-cluster connections.\n Available\n \n Filter\n \n names for this operation are:\n

\n

" + } + }, + "MaxResults": { + "target": "com.amazonaws.opensearch#MaxResults", + "traits": { + "smithy.api#documentation": "

Set this value to limit the number of results returned. If not specified, defaults to 100.

" + } + }, + "NextToken": { + "target": "com.amazonaws.opensearch#NextToken", + "traits": { + "smithy.api#documentation": "

NextToken is sent in case the earlier API call results contain the NextToken parameter. Used for pagination.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for the parameters to the\n \n DescribeOutboundConnections\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#DescribeOutboundConnectionsResponse": { + "type": "structure", + "members": { + "Connections": { + "target": "com.amazonaws.opensearch#OutboundConnections", + "traits": { + "smithy.api#documentation": "

A list of\n \n OutboundConnection\n \n matching the specified filter criteria.\n

" + } + }, + "NextToken": { + "target": "com.amazonaws.opensearch#NextToken", + "traits": { + "smithy.api#documentation": "

If more results are available and NextToken is present, make the next request to the same API with the received\n NextToken to paginate the remaining results.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The result of a\n \n DescribeOutboundConnections\n \n request. Contains the list of connections matching the filter criteria.\n

" + } + }, + "com.amazonaws.opensearch#DescribePackages": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#DescribePackagesRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#DescribePackagesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#AccessDeniedException" + }, + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Describes all packages available to Amazon OpenSearch Service domains. Includes options for filtering, limiting the number of results,\n and pagination.\n

", + "smithy.api#http": { + "method": "POST", + "uri": "/2021-01-01/packages/describe", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.opensearch#DescribePackagesFilter": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.opensearch#DescribePackagesFilterName", + "traits": { + "smithy.api#documentation": "

Any field from PackageDetails.\n

" + } + }, + "Value": { + "target": "com.amazonaws.opensearch#DescribePackagesFilterValues", + "traits": { + "smithy.api#documentation": "

A list of values for the specified field.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

A filter to apply to the DescribePackage response.\n

" + } + }, + "com.amazonaws.opensearch#DescribePackagesFilterList": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#DescribePackagesFilter" + }, + "traits": { + "smithy.api#documentation": "

A list of DescribePackagesFilter to filter the packages included in a DescribePackages response.\n

" + } + }, + "com.amazonaws.opensearch#DescribePackagesFilterName": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PackageID", + "name": "PackageID" + }, + { + "value": "PackageName", + "name": "PackageName" + }, + { + "value": "PackageStatus", + "name": "PackageStatus" + } + ] + } + }, + "com.amazonaws.opensearch#DescribePackagesFilterValue": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[0-9a-zA-Z\\*\\.\\\\/\\?-]*$" + } + }, + "com.amazonaws.opensearch#DescribePackagesFilterValues": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#DescribePackagesFilterValue" + } + }, + "com.amazonaws.opensearch#DescribePackagesRequest": { + "type": "structure", + "members": { + "Filters": { + "target": "com.amazonaws.opensearch#DescribePackagesFilterList", + "traits": { + "smithy.api#documentation": "

Only returns packages that match the DescribePackagesFilterList values.\n

" + } + }, + "MaxResults": { + "target": "com.amazonaws.opensearch#MaxResults", + "traits": { + "smithy.api#documentation": "

Limits results to a maximum number of packages.

" + } + }, + "NextToken": { + "target": "com.amazonaws.opensearch#NextToken", + "traits": { + "smithy.api#documentation": "

Used for pagination. Only necessary if a previous API call includes a non-null NextToken value. If provided,\n returns results for the next page.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for the request parameters to the\n \n DescribePackage\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#DescribePackagesResponse": { + "type": "structure", + "members": { + "PackageDetailsList": { + "target": "com.amazonaws.opensearch#PackageDetailsList", + "traits": { + "smithy.api#documentation": "

List of PackageDetails objects.\n

" + } + }, + "NextToken": { + "target": "com.amazonaws.opensearch#String" + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for the response returned by the\n \n DescribePackages\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#DescribeReservedInstanceOfferings": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#DescribeReservedInstanceOfferingsRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#DescribeReservedInstanceOfferingsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#DisabledOperationException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists available reserved OpenSearch instance offerings.

", + "smithy.api#http": { + "method": "GET", + "uri": "/2021-01-01/opensearch/reservedInstanceOfferings", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.opensearch#DescribeReservedInstanceOfferingsRequest": { + "type": "structure", + "members": { + "ReservedInstanceOfferingId": { + "target": "com.amazonaws.opensearch#GUID", + "traits": { + "smithy.api#documentation": "

The offering identifier filter value. Use this parameter to show only the available offering that matches the\n specified reservation identifier.\n

", + "smithy.api#httpQuery": "offeringId" + } + }, + "MaxResults": { + "target": "com.amazonaws.opensearch#MaxResults", + "traits": { + "smithy.api#documentation": "

Set this value to limit the number of results returned. If not specified, defaults to 100.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.opensearch#NextToken", + "traits": { + "smithy.api#documentation": "

Provides an identifier to allow retrieval of paginated results.\n

", + "smithy.api#httpQuery": "nextToken" + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for parameters to\n DescribeReservedInstanceOfferings\n

" + } + }, + "com.amazonaws.opensearch#DescribeReservedInstanceOfferingsResponse": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.opensearch#NextToken", + "traits": { + "smithy.api#documentation": "

Provides an identifier to allow retrieval of paginated results.

" + } + }, + "ReservedInstanceOfferings": { + "target": "com.amazonaws.opensearch#ReservedInstanceOfferingList", + "traits": { + "smithy.api#documentation": "

List of reserved OpenSearch instance offerings

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for results from\n DescribeReservedInstanceOfferings\n

" + } + }, + "com.amazonaws.opensearch#DescribeReservedInstances": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#DescribeReservedInstancesRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#DescribeReservedInstancesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#DisabledOperationException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns information about reserved OpenSearch instances for this account.

", + "smithy.api#http": { + "method": "GET", + "uri": "/2021-01-01/opensearch/reservedInstances", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.opensearch#DescribeReservedInstancesRequest": { + "type": "structure", + "members": { + "ReservedInstanceId": { + "target": "com.amazonaws.opensearch#GUID", + "traits": { + "smithy.api#documentation": "

The reserved instance identifier filter value. Use this parameter to show only the reservation that matches the\n specified reserved OpenSearch instance ID.\n

", + "smithy.api#httpQuery": "reservationId" + } + }, + "MaxResults": { + "target": "com.amazonaws.opensearch#MaxResults", + "traits": { + "smithy.api#documentation": "

Set this value to limit the number of results returned. If not specified, defaults to 100.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.opensearch#NextToken", + "traits": { + "smithy.api#documentation": "

Provides an identifier to allow retrieval of paginated results.\n

", + "smithy.api#httpQuery": "nextToken" + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for parameters to\n DescribeReservedInstances\n

" + } + }, + "com.amazonaws.opensearch#DescribeReservedInstancesResponse": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.opensearch#String", + "traits": { + "smithy.api#documentation": "

Provides an identifier to allow retrieval of paginated results.

" + } + }, + "ReservedInstances": { + "target": "com.amazonaws.opensearch#ReservedInstanceList", + "traits": { + "smithy.api#documentation": "

List of reserved OpenSearch instances.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for results from\n DescribeReservedInstances\n

" + } + }, + "com.amazonaws.opensearch#DisabledOperationException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.opensearch#ErrorMessage", + "traits": { + "smithy.api#documentation": "

A description of the error.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

An error occured because the client wanted to access a not supported operation. Gives http status code of 409.

", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.opensearch#DissociatePackage": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#DissociatePackageRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#DissociatePackageResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#AccessDeniedException" + }, + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#ConflictException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Dissociates a package from the Amazon OpenSearch Service domain.

", + "smithy.api#http": { + "method": "POST", + "uri": "/2021-01-01/packages/dissociate/{PackageID}/{DomainName}", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#DissociatePackageRequest": { + "type": "structure", + "members": { + "PackageID": { + "target": "com.amazonaws.opensearch#PackageID", + "traits": { + "smithy.api#documentation": "

The internal ID of the package to associate with a domain. Use DescribePackages to find\n this value.\n

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "DomainName": { + "target": "com.amazonaws.opensearch#DomainName", + "traits": { + "smithy.api#documentation": "

The name of the domain to associate the package with.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for the request parameters to the\n \n DissociatePackage\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#DissociatePackageResponse": { + "type": "structure", + "members": { + "DomainPackageDetails": { + "target": "com.amazonaws.opensearch#DomainPackageDetails", + "traits": { + "smithy.api#documentation": "

\n DomainPackageDetails\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for the response returned by\n \n DissociatePackage\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#DomainConfig": { + "type": "structure", + "members": { + "EngineVersion": { + "target": "com.amazonaws.opensearch#VersionStatus", + "traits": { + "smithy.api#documentation": "

String of format Elasticsearch_X.Y or OpenSearch_X.Y to specify the engine version for the OpenSearch or Elasticsearch domain.

" + } + }, + "ClusterConfig": { + "target": "com.amazonaws.opensearch#ClusterConfigStatus", + "traits": { + "smithy.api#documentation": "

The ClusterConfig for the domain.\n

" + } + }, + "EBSOptions": { + "target": "com.amazonaws.opensearch#EBSOptionsStatus", + "traits": { + "smithy.api#documentation": "

The EBSOptions for the domain.\n

" + } + }, + "AccessPolicies": { + "target": "com.amazonaws.opensearch#AccessPoliciesStatus", + "traits": { + "smithy.api#documentation": "

IAM access policy as a JSON-formatted string.

" + } + }, + "SnapshotOptions": { + "target": "com.amazonaws.opensearch#SnapshotOptionsStatus", + "traits": { + "smithy.api#documentation": "

The SnapshotOptions for the domain.\n

" + } + }, + "VPCOptions": { + "target": "com.amazonaws.opensearch#VPCDerivedInfoStatus", + "traits": { + "smithy.api#documentation": "

The VPCOptions for the specified domain. For more information, see \n Launching your Amazon OpenSearch Service domains using a VPC.\n

" + } + }, + "CognitoOptions": { + "target": "com.amazonaws.opensearch#CognitoOptionsStatus", + "traits": { + "smithy.api#documentation": "

The CognitoOptions for the specified domain. For more information, see Configuring Amazon Cognito authentication for OpenSearch Dashboards.\n

" + } + }, + "EncryptionAtRestOptions": { + "target": "com.amazonaws.opensearch#EncryptionAtRestOptionsStatus", + "traits": { + "smithy.api#documentation": "

The EncryptionAtRestOptions for the domain.\n

" + } + }, + "NodeToNodeEncryptionOptions": { + "target": "com.amazonaws.opensearch#NodeToNodeEncryptionOptionsStatus", + "traits": { + "smithy.api#documentation": "

The NodeToNodeEncryptionOptions for the domain.\n

" + } + }, + "AdvancedOptions": { + "target": "com.amazonaws.opensearch#AdvancedOptionsStatus", + "traits": { + "smithy.api#documentation": "

The AdvancedOptions for the domain. See Advanced options\n for more information.\n

" + } + }, + "LogPublishingOptions": { + "target": "com.amazonaws.opensearch#LogPublishingOptionsStatus", + "traits": { + "smithy.api#documentation": "

Log publishing options for the given domain.

" + } + }, + "DomainEndpointOptions": { + "target": "com.amazonaws.opensearch#DomainEndpointOptionsStatus", + "traits": { + "smithy.api#documentation": "

The DomainEndpointOptions for the domain.\n

" + } + }, + "AdvancedSecurityOptions": { + "target": "com.amazonaws.opensearch#AdvancedSecurityOptionsStatus", + "traits": { + "smithy.api#documentation": "

Specifies AdvancedSecurityOptions for the domain.\n

" + } + }, + "AutoTuneOptions": { + "target": "com.amazonaws.opensearch#AutoTuneOptionsStatus", + "traits": { + "smithy.api#documentation": "

Specifies AutoTuneOptions for the domain.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The configuration of a domain.

" + } + }, + "com.amazonaws.opensearch#DomainEndpointOptions": { + "type": "structure", + "members": { + "EnforceHTTPS": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

Whether only HTTPS endpoint should be enabled for the domain.

" + } + }, + "TLSSecurityPolicy": { + "target": "com.amazonaws.opensearch#TLSSecurityPolicy", + "traits": { + "smithy.api#documentation": "

Specify the TLS security policy to apply to the HTTPS endpoint of the domain.\n

\n Can be one of the following values:\n

\n

" + } + }, + "CustomEndpointEnabled": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

Whether to enable a custom endpoint for the domain.

" + } + }, + "CustomEndpoint": { + "target": "com.amazonaws.opensearch#DomainNameFqdn", + "traits": { + "smithy.api#documentation": "

The fully qualified domain for your custom endpoint.

" + } + }, + "CustomEndpointCertificateArn": { + "target": "com.amazonaws.opensearch#ARN", + "traits": { + "smithy.api#documentation": "

The ACM certificate ARN for your custom endpoint.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Options to configure the endpoint for the domain.

" + } + }, + "com.amazonaws.opensearch#DomainEndpointOptionsStatus": { + "type": "structure", + "members": { + "Options": { + "target": "com.amazonaws.opensearch#DomainEndpointOptions", + "traits": { + "smithy.api#documentation": "

Options to configure the endpoint for the domain.

", + "smithy.api#required": {} + } + }, + "Status": { + "target": "com.amazonaws.opensearch#OptionStatus", + "traits": { + "smithy.api#documentation": "

The status of the endpoint options for the domain. See OptionStatus for the status\n information that's included.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The configured endpoint options for the domain and their current status.

" + } + }, + "com.amazonaws.opensearch#DomainId": { + "type": "string", + "traits": { + "smithy.api#documentation": "

Unique identifier for the domain.

", + "smithy.api#length": { + "min": 1, + "max": 64 + } + } + }, + "com.amazonaws.opensearch#DomainInfo": { + "type": "structure", + "members": { + "DomainName": { + "target": "com.amazonaws.opensearch#DomainName", + "traits": { + "smithy.api#documentation": "

The DomainName.\n

" + } + } + } + }, + "com.amazonaws.opensearch#DomainInfoList": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#DomainInfo" + }, + "traits": { + "smithy.api#documentation": "

Contains the list of domain information.

" + } + }, + "com.amazonaws.opensearch#DomainInformationContainer": { + "type": "structure", + "members": { + "AWSDomainInformation": { + "target": "com.amazonaws.opensearch#AWSDomainInformation" + } + } + }, + "com.amazonaws.opensearch#DomainName": { + "type": "string", + "traits": { + "smithy.api#documentation": "

The name of an domain. Domain names are unique across the domains owned by an account within an AWS\n region. Domain names start with a letter or number and can contain the following characters: a-z (lowercase), 0-9,\n and - (hyphen).\n

", + "smithy.api#length": { + "min": 3, + "max": 28 + }, + "smithy.api#pattern": "^[a-z][a-z0-9\\-]+$" + } + }, + "com.amazonaws.opensearch#DomainNameFqdn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^(((?!-)[A-Za-z0-9-]{0,62}[A-Za-z0-9])\\.)+((?!-)[A-Za-z0-9-]{1,62}[A-Za-z0-9])$" + } + }, + "com.amazonaws.opensearch#DomainNameList": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#DomainName" + }, + "traits": { + "smithy.api#documentation": "

A list of domain names.

" + } + }, + "com.amazonaws.opensearch#DomainPackageDetails": { + "type": "structure", + "members": { + "PackageID": { + "target": "com.amazonaws.opensearch#PackageID", + "traits": { + "smithy.api#documentation": "

The internal ID of the package.

" + } + }, + "PackageName": { + "target": "com.amazonaws.opensearch#PackageName", + "traits": { + "smithy.api#documentation": "

User-specified name of the package.

" + } + }, + "PackageType": { + "target": "com.amazonaws.opensearch#PackageType", + "traits": { + "smithy.api#documentation": "

Currently supports only TXT-DICTIONARY.

" + } + }, + "LastUpdated": { + "target": "com.amazonaws.opensearch#LastUpdated", + "traits": { + "smithy.api#documentation": "

The timestamp of the most recent update to the package association status.

" + } + }, + "DomainName": { + "target": "com.amazonaws.opensearch#DomainName", + "traits": { + "smithy.api#documentation": "

The name of the domain you've associated a package with.

" + } + }, + "DomainPackageStatus": { + "target": "com.amazonaws.opensearch#DomainPackageStatus", + "traits": { + "smithy.api#documentation": "

State of the association. Values are ASSOCIATING, ASSOCIATION_FAILED, ACTIVE, DISSOCIATING, and DISSOCIATION_FAILED.

" + } + }, + "PackageVersion": { + "target": "com.amazonaws.opensearch#PackageVersion" + }, + "ReferencePath": { + "target": "com.amazonaws.opensearch#ReferencePath", + "traits": { + "smithy.api#documentation": "

The relative path on Amazon OpenSearch Service nodes, which can be used as synonym_path when the package is a synonym file.

" + } + }, + "ErrorDetails": { + "target": "com.amazonaws.opensearch#ErrorDetails", + "traits": { + "smithy.api#documentation": "

Additional information if the package is in an error state. Null otherwise.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Information on a package associated with a domain.

" + } + }, + "com.amazonaws.opensearch#DomainPackageDetailsList": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#DomainPackageDetails" + } + }, + "com.amazonaws.opensearch#DomainPackageStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ASSOCIATING", + "name": "ASSOCIATING" + }, + { + "value": "ASSOCIATION_FAILED", + "name": "ASSOCIATION_FAILED" + }, + { + "value": "ACTIVE", + "name": "ACTIVE" + }, + { + "value": "DISSOCIATING", + "name": "DISSOCIATING" + }, + { + "value": "DISSOCIATION_FAILED", + "name": "DISSOCIATION_FAILED" + } + ] + } + }, + "com.amazonaws.opensearch#DomainStatus": { + "type": "structure", + "members": { + "DomainId": { + "target": "com.amazonaws.opensearch#DomainId", + "traits": { + "smithy.api#documentation": "

The unique identifier for the specified domain.

", + "smithy.api#required": {} + } + }, + "DomainName": { + "target": "com.amazonaws.opensearch#DomainName", + "traits": { + "smithy.api#documentation": "

The name of a domain. Domain names are unique across the domains owned by an account within an AWS\n region. Domain names start with a letter or number and can contain the following characters: a-z (lowercase), 0-9,\n and - (hyphen).\n

", + "smithy.api#required": {} + } + }, + "ARN": { + "target": "com.amazonaws.opensearch#ARN", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of a domain. See IAM identifiers\n in the AWS Identity and Access Management User Guide for more information.\n

", + "smithy.api#required": {} + } + }, + "Created": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

The domain creation status. True if the creation of a domain is complete. \n False\n if domain creation is still in progress.\n

" + } + }, + "Deleted": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

The domain deletion status. True if a delete request has been received for the domain but resource\n cleanup is still in progress. False if the domain has not been deleted. Once domain deletion is\n complete, the status of the domain is no longer returned.\n

" + } + }, + "Endpoint": { + "target": "com.amazonaws.opensearch#ServiceUrl", + "traits": { + "smithy.api#documentation": "

The domain endpoint that you use to submit index and search requests.

" + } + }, + "Endpoints": { + "target": "com.amazonaws.opensearch#EndpointsMap", + "traits": { + "smithy.api#documentation": "

Map containing the domain endpoints used to submit index and search requests. Example key,\n value: 'vpc','vpc-endpoint-h2dsd34efgyghrtguk5gt6j2foh4.us-east-1.es.amazonaws.com'.\n

" + } + }, + "Processing": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

The status of the domain configuration. True if Amazon OpenSearch Service is\n processing configuration changes. False if the configuration is active.\n

" + } + }, + "UpgradeProcessing": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

The status of a domain version upgrade. True if Amazon OpenSearch Service is\n undergoing a version upgrade. False if the configuration is active.\n

" + } + }, + "EngineVersion": { + "target": "com.amazonaws.opensearch#VersionString" + }, + "ClusterConfig": { + "target": "com.amazonaws.opensearch#ClusterConfig", + "traits": { + "smithy.api#documentation": "

The type and number of instances in the domain.

", + "smithy.api#required": {} + } + }, + "EBSOptions": { + "target": "com.amazonaws.opensearch#EBSOptions", + "traits": { + "smithy.api#documentation": "

The EBSOptions for the specified domain.\n

" + } + }, + "AccessPolicies": { + "target": "com.amazonaws.opensearch#PolicyDocument", + "traits": { + "smithy.api#documentation": "

IAM access policy as a JSON-formatted string.

" + } + }, + "SnapshotOptions": { + "target": "com.amazonaws.opensearch#SnapshotOptions", + "traits": { + "smithy.api#documentation": "

The status of the\n SnapshotOptions.\n

" + } + }, + "VPCOptions": { + "target": "com.amazonaws.opensearch#VPCDerivedInfo", + "traits": { + "smithy.api#documentation": "

The VPCOptions for the specified domain. For more information, see \n Launching your Amazon OpenSearch Service domains using a VPC.\n

" + } + }, + "CognitoOptions": { + "target": "com.amazonaws.opensearch#CognitoOptions", + "traits": { + "smithy.api#documentation": "

The CognitoOptions for the specified domain. For more information, see Configuring Amazon Cognito authentication for OpenSearch Dashboards.\n

" + } + }, + "EncryptionAtRestOptions": { + "target": "com.amazonaws.opensearch#EncryptionAtRestOptions", + "traits": { + "smithy.api#documentation": "

The status of the EncryptionAtRestOptions.\n

" + } + }, + "NodeToNodeEncryptionOptions": { + "target": "com.amazonaws.opensearch#NodeToNodeEncryptionOptions", + "traits": { + "smithy.api#documentation": "

The status of the NodeToNodeEncryptionOptions.\n

" + } + }, + "AdvancedOptions": { + "target": "com.amazonaws.opensearch#AdvancedOptions", + "traits": { + "smithy.api#documentation": "

The status of the\n AdvancedOptions.\n

" + } + }, + "LogPublishingOptions": { + "target": "com.amazonaws.opensearch#LogPublishingOptions", + "traits": { + "smithy.api#documentation": "

Log publishing options for the given domain.

" + } + }, + "ServiceSoftwareOptions": { + "target": "com.amazonaws.opensearch#ServiceSoftwareOptions", + "traits": { + "smithy.api#documentation": "

The current status of the domain's service software.

" + } + }, + "DomainEndpointOptions": { + "target": "com.amazonaws.opensearch#DomainEndpointOptions", + "traits": { + "smithy.api#documentation": "

The current status of the domain's endpoint options.

" + } + }, + "AdvancedSecurityOptions": { + "target": "com.amazonaws.opensearch#AdvancedSecurityOptions", + "traits": { + "smithy.api#documentation": "

The current status of the domain's advanced security options.

" + } + }, + "AutoTuneOptions": { + "target": "com.amazonaws.opensearch#AutoTuneOptionsOutput", + "traits": { + "smithy.api#documentation": "

The current status of the domain's Auto-Tune options.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The current status of a domain.

" + } + }, + "com.amazonaws.opensearch#DomainStatusList": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#DomainStatus" + }, + "traits": { + "smithy.api#documentation": "

A list that contains the status of each requested domain.

" + } + }, + "com.amazonaws.opensearch#Double": { + "type": "double", + "traits": { + "smithy.api#box": {} + } + }, + "com.amazonaws.opensearch#Duration": { + "type": "structure", + "members": { + "Value": { + "target": "com.amazonaws.opensearch#DurationValue", + "traits": { + "smithy.api#documentation": "

Integer to specify the value of a maintenance schedule duration. See \n Auto-Tune for Amazon OpenSearch Service\n for more information.\n

" + } + }, + "Unit": { + "target": "com.amazonaws.opensearch#TimeUnit", + "traits": { + "smithy.api#documentation": "

The unit of a maintenance schedule duration. Valid value is HOURS. See \n Auto-Tune for Amazon OpenSearch Service\n for more information.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The maintenance schedule duration: duration value and duration unit. See \n Auto-Tune for Amazon OpenSearch Service\n for more information.\n

" + } + }, + "com.amazonaws.opensearch#DurationValue": { + "type": "long", + "traits": { + "smithy.api#documentation": "

Integer to specify the value of a maintenance schedule duration. See \n Auto-Tune for Amazon OpenSearch Service\n for more information.\n

", + "smithy.api#range": { + "min": 1, + "max": 24 + } + } + }, + "com.amazonaws.opensearch#EBSOptions": { + "type": "structure", + "members": { + "EBSEnabled": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

Whether EBS-based storage is enabled.

" + } + }, + "VolumeType": { + "target": "com.amazonaws.opensearch#VolumeType", + "traits": { + "smithy.api#documentation": "

The volume type for EBS-based storage.

" + } + }, + "VolumeSize": { + "target": "com.amazonaws.opensearch#IntegerClass", + "traits": { + "smithy.api#documentation": "

Integer to specify the size of an EBS volume.

" + } + }, + "Iops": { + "target": "com.amazonaws.opensearch#IntegerClass", + "traits": { + "smithy.api#documentation": "

The IOPD for a Provisioned IOPS EBS volume (SSD).

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Options to enable, disable, and specify the properties of EBS storage volumes.

" + } + }, + "com.amazonaws.opensearch#EBSOptionsStatus": { + "type": "structure", + "members": { + "Options": { + "target": "com.amazonaws.opensearch#EBSOptions", + "traits": { + "smithy.api#documentation": "

The EBS options for the specified domain.

", + "smithy.api#required": {} + } + }, + "Status": { + "target": "com.amazonaws.opensearch#OptionStatus", + "traits": { + "smithy.api#documentation": "

The status of the EBS options for the specified domain.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Status of the EBS options for the specified domain.

" + } + }, + "com.amazonaws.opensearch#EncryptionAtRestOptions": { + "type": "structure", + "members": { + "Enabled": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

The option to enable encryption at rest.

" + } + }, + "KmsKeyId": { + "target": "com.amazonaws.opensearch#KmsKeyId", + "traits": { + "smithy.api#documentation": "

The KMS key ID for encryption at rest options.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies encryption at rest options.

" + } + }, + "com.amazonaws.opensearch#EncryptionAtRestOptionsStatus": { + "type": "structure", + "members": { + "Options": { + "target": "com.amazonaws.opensearch#EncryptionAtRestOptions", + "traits": { + "smithy.api#documentation": "

The Encryption At Rest options for the specified domain.

", + "smithy.api#required": {} + } + }, + "Status": { + "target": "com.amazonaws.opensearch#OptionStatus", + "traits": { + "smithy.api#documentation": "

The status of the Encryption At Rest options for the specified domain.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Status of the encryption At Rest options for the specified domain.

" + } + }, + "com.amazonaws.opensearch#EndpointsMap": { + "type": "map", + "key": { + "target": "com.amazonaws.opensearch#String" + }, + "value": { + "target": "com.amazonaws.opensearch#ServiceUrl" + } + }, + "com.amazonaws.opensearch#ErrorDetails": { + "type": "structure", + "members": { + "ErrorType": { + "target": "com.amazonaws.opensearch#ErrorType" + }, + "ErrorMessage": { + "target": "com.amazonaws.opensearch#ErrorMessage" + } + } + }, + "com.amazonaws.opensearch#ErrorMessage": { + "type": "string" + }, + "com.amazonaws.opensearch#ErrorType": { + "type": "string" + }, + "com.amazonaws.opensearch#Filter": { + "type": "structure", + "members": { + "Name": { + "target": "com.amazonaws.opensearch#NonEmptyString", + "traits": { + "smithy.api#documentation": "

\n The name of the filter.\n

" + } + }, + "Values": { + "target": "com.amazonaws.opensearch#ValueStringList", + "traits": { + "smithy.api#documentation": "

\n Contains one or more values for the filter.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n A filter used to limit results when describing inbound or outbound cross-cluster connections.\n Multiple values can be specified per filter.\n A cross-cluster connection must match at least one of the specified values for it to be\n returned from an operation.\n

" + } + }, + "com.amazonaws.opensearch#FilterList": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#Filter" + } + }, + "com.amazonaws.opensearch#GUID": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 36, + "max": 36 + }, + "smithy.api#pattern": "^\\p{XDigit}{8}-\\p{XDigit}{4}-\\p{XDigit}{4}-\\p{XDigit}{4}-\\p{XDigit}{12}$" + } + }, + "com.amazonaws.opensearch#GetCompatibleVersions": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#GetCompatibleVersionsRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#GetCompatibleVersionsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#DisabledOperationException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

\n Returns a list of upgrade-compatible versions of OpenSearch/Elasticsearch.\n You can optionally pass a\n \n DomainName\n \n to get all upgrade-compatible versions of OpenSearch/Elasticsearch for that specific domain.\n

", + "smithy.api#http": { + "method": "GET", + "uri": "/2021-01-01/opensearch/compatibleVersions", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#GetCompatibleVersionsRequest": { + "type": "structure", + "members": { + "DomainName": { + "target": "com.amazonaws.opensearch#DomainName", + "traits": { + "smithy.api#httpQuery": "domainName" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for the request parameters to\n \n GetCompatibleVersions\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#GetCompatibleVersionsResponse": { + "type": "structure", + "members": { + "CompatibleVersions": { + "target": "com.amazonaws.opensearch#CompatibleVersionsList", + "traits": { + "smithy.api#documentation": "

\n A map of compatible OpenSearch versions returned as part of the\n \n GetCompatibleVersions\n \n operation.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for the response returned by the\n \n GetCompatibleVersions\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#GetPackageVersionHistory": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#GetPackageVersionHistoryRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#GetPackageVersionHistoryResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#AccessDeniedException" + }, + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns a list of package versions, along with their creation time and commit message.

", + "smithy.api#http": { + "method": "GET", + "uri": "/2021-01-01/packages/{PackageID}/history", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.opensearch#GetPackageVersionHistoryRequest": { + "type": "structure", + "members": { + "PackageID": { + "target": "com.amazonaws.opensearch#PackageID", + "traits": { + "smithy.api#documentation": "

Returns an audit history of package versions.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "MaxResults": { + "target": "com.amazonaws.opensearch#MaxResults", + "traits": { + "smithy.api#documentation": "

Limits results to a maximum number of package versions.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.opensearch#NextToken", + "traits": { + "smithy.api#documentation": "

Used for pagination. Only necessary if a previous API call includes a non-null NextToken value. If provided,\n returns results for the next page.\n

", + "smithy.api#httpQuery": "nextToken" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for the request parameters to the\n \n GetPackageVersionHistory\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#GetPackageVersionHistoryResponse": { + "type": "structure", + "members": { + "PackageID": { + "target": "com.amazonaws.opensearch#PackageID" + }, + "PackageVersionHistoryList": { + "target": "com.amazonaws.opensearch#PackageVersionHistoryList", + "traits": { + "smithy.api#documentation": "

List of PackageVersionHistory objects.\n

" + } + }, + "NextToken": { + "target": "com.amazonaws.opensearch#String" + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for response returned by\n \n GetPackageVersionHistory\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#GetUpgradeHistory": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#GetUpgradeHistoryRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#GetUpgradeHistoryResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#DisabledOperationException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves the complete history of the last 10 upgrades performed on the domain.

", + "smithy.api#http": { + "method": "GET", + "uri": "/2021-01-01/opensearch/upgradeDomain/{DomainName}/history", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.opensearch#GetUpgradeHistoryRequest": { + "type": "structure", + "members": { + "DomainName": { + "target": "com.amazonaws.opensearch#DomainName", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "MaxResults": { + "target": "com.amazonaws.opensearch#MaxResults", + "traits": { + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.opensearch#NextToken", + "traits": { + "smithy.api#httpQuery": "nextToken" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for the request parameters to the\n \n GetUpgradeHistory\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#GetUpgradeHistoryResponse": { + "type": "structure", + "members": { + "UpgradeHistories": { + "target": "com.amazonaws.opensearch#UpgradeHistoryList", + "traits": { + "smithy.api#documentation": "

\n A list of\n \n UpgradeHistory\n \n objects corresponding to each upgrade or upgrade eligibility check performed on a domain returned as part of the\n \n GetUpgradeHistoryResponse\n \n object.\n

" + } + }, + "NextToken": { + "target": "com.amazonaws.opensearch#String", + "traits": { + "smithy.api#documentation": "

Pagination token that needs to be supplied to the next call to get the next page of results.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for the response returned by the\n \n GetUpgradeHistory\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#GetUpgradeStatus": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#GetUpgradeStatusRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#GetUpgradeStatusResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#DisabledOperationException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves the latest status of the last upgrade or upgrade eligibility check performed on the domain.\n

", + "smithy.api#http": { + "method": "GET", + "uri": "/2021-01-01/opensearch/upgradeDomain/{DomainName}/status", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#GetUpgradeStatusRequest": { + "type": "structure", + "members": { + "DomainName": { + "target": "com.amazonaws.opensearch#DomainName", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for the request parameters to the\n \n GetUpgradeStatus\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#GetUpgradeStatusResponse": { + "type": "structure", + "members": { + "UpgradeStep": { + "target": "com.amazonaws.opensearch#UpgradeStep", + "traits": { + "smithy.api#documentation": "

\n One of three steps an upgrade or upgrade eligibility check goes through:\n

\n

" + } + }, + "StepStatus": { + "target": "com.amazonaws.opensearch#UpgradeStatus", + "traits": { + "smithy.api#documentation": "

\n One of four statuses an upgrade have, returned as part of the\n \n GetUpgradeStatusResponse\n \n object. The status can take one of the following values:\n

\n

" + } + }, + "UpgradeName": { + "target": "com.amazonaws.opensearch#UpgradeName", + "traits": { + "smithy.api#documentation": "

A string that briefly describes the update.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for the response returned by the\n \n GetUpgradeStatus\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#IdentityPoolId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 55 + }, + "smithy.api#pattern": "^[\\w-]+:[0-9a-f-]+$" + } + }, + "com.amazonaws.opensearch#InboundConnection": { + "type": "structure", + "members": { + "LocalDomainInfo": { + "target": "com.amazonaws.opensearch#DomainInformationContainer", + "traits": { + "smithy.api#documentation": "

The\n \n AWSDomainInformation\n \n for the local OpenSearch domain.\n

" + } + }, + "RemoteDomainInfo": { + "target": "com.amazonaws.opensearch#DomainInformationContainer", + "traits": { + "smithy.api#documentation": "

The\n \n AWSDomainInformation\n \n for the remote OpenSearch domain.\n

" + } + }, + "ConnectionId": { + "target": "com.amazonaws.opensearch#ConnectionId", + "traits": { + "smithy.api#documentation": "

The connection ID for the inbound cross-cluster connection.

" + } + }, + "ConnectionStatus": { + "target": "com.amazonaws.opensearch#InboundConnectionStatus", + "traits": { + "smithy.api#documentation": "

The\n \n InboundConnectionStatus\n \n for the outbound connection.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Details of an inbound connection.

" + } + }, + "com.amazonaws.opensearch#InboundConnectionStatus": { + "type": "structure", + "members": { + "StatusCode": { + "target": "com.amazonaws.opensearch#InboundConnectionStatusCode", + "traits": { + "smithy.api#documentation": "

The state code for the inbound connection. Can be one of the following:

\n " + } + }, + "Message": { + "target": "com.amazonaws.opensearch#ConnectionStatusMessage", + "traits": { + "smithy.api#documentation": "

Verbose information for the inbound connection status.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The connection status of an inbound cross-cluster connection.

" + } + }, + "com.amazonaws.opensearch#InboundConnectionStatusCode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PENDING_ACCEPTANCE", + "name": "PENDING_ACCEPTANCE" + }, + { + "value": "APPROVED", + "name": "APPROVED" + }, + { + "value": "PROVISIONING", + "name": "PROVISIONING" + }, + { + "value": "ACTIVE", + "name": "ACTIVE" + }, + { + "value": "REJECTING", + "name": "REJECTING" + }, + { + "value": "REJECTED", + "name": "REJECTED" + }, + { + "value": "DELETING", + "name": "DELETING" + }, + { + "value": "DELETED", + "name": "DELETED" + } + ] + } + }, + "com.amazonaws.opensearch#InboundConnections": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#InboundConnection" + } + }, + "com.amazonaws.opensearch#InstanceCount": { + "type": "integer", + "traits": { + "smithy.api#documentation": "

The number of EC2 instances in the domain.

", + "smithy.api#range": { + "min": 1 + } + } + }, + "com.amazonaws.opensearch#InstanceCountLimits": { + "type": "structure", + "members": { + "MinimumInstanceCount": { + "target": "com.amazonaws.opensearch#MinimumInstanceCount" + }, + "MaximumInstanceCount": { + "target": "com.amazonaws.opensearch#MaximumInstanceCount" + } + }, + "traits": { + "smithy.api#documentation": "

\n InstanceCountLimits represents the limits on the number of instances that can be created in Amazon OpenSearch Service for\n a given InstanceType.\n

" + } + }, + "com.amazonaws.opensearch#InstanceLimits": { + "type": "structure", + "members": { + "InstanceCountLimits": { + "target": "com.amazonaws.opensearch#InstanceCountLimits" + } + }, + "traits": { + "smithy.api#documentation": "

InstanceLimits represents the list of instance-related attributes that are available for a given InstanceType.\n

" + } + }, + "com.amazonaws.opensearch#InstanceRole": { + "type": "string" + }, + "com.amazonaws.opensearch#InstanceRoleList": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#InstanceRole" + } + }, + "com.amazonaws.opensearch#InstanceTypeDetails": { + "type": "structure", + "members": { + "InstanceType": { + "target": "com.amazonaws.opensearch#OpenSearchPartitionInstanceType" + }, + "EncryptionEnabled": { + "target": "com.amazonaws.opensearch#Boolean" + }, + "CognitoEnabled": { + "target": "com.amazonaws.opensearch#Boolean" + }, + "AppLogsEnabled": { + "target": "com.amazonaws.opensearch#Boolean" + }, + "AdvancedSecurityEnabled": { + "target": "com.amazonaws.opensearch#Boolean" + }, + "WarmEnabled": { + "target": "com.amazonaws.opensearch#Boolean" + }, + "InstanceRole": { + "target": "com.amazonaws.opensearch#InstanceRoleList" + } + } + }, + "com.amazonaws.opensearch#InstanceTypeDetailsList": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#InstanceTypeDetails" + } + }, + "com.amazonaws.opensearch#Integer": { + "type": "integer" + }, + "com.amazonaws.opensearch#IntegerClass": { + "type": "integer", + "traits": { + "smithy.api#box": {} + } + }, + "com.amazonaws.opensearch#InternalException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.opensearch#ErrorMessage", + "traits": { + "smithy.api#documentation": "

A description of the error.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The request processing has failed because of an unknown error, exception or failure (the failure is internal to the service) . Gives http status code of 500.

", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.opensearch#InvalidPaginationTokenException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.opensearch#ErrorMessage", + "traits": { + "smithy.api#documentation": "

A description of the error.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The request processing has failed because of invalid pagination token provided by customer. Returns an HTTP status code of 400.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.opensearch#InvalidTypeException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.opensearch#ErrorMessage", + "traits": { + "smithy.api#documentation": "

A description of the error.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

An exception for trying to create or access sub-resource that is either invalid or not supported. Gives http status code of 409.

", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.opensearch#Issue": { + "type": "string" + }, + "com.amazonaws.opensearch#Issues": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#Issue" + } + }, + "com.amazonaws.opensearch#KmsKeyId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 500 + }, + "smithy.api#pattern": ".*" + } + }, + "com.amazonaws.opensearch#LastUpdated": { + "type": "timestamp" + }, + "com.amazonaws.opensearch#LimitExceededException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.opensearch#ErrorMessage", + "traits": { + "smithy.api#documentation": "

A description of the error.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

An exception for trying to create more than allowed resources or sub-resources. Gives http status code of 409.

", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.opensearch#LimitName": { + "type": "string" + }, + "com.amazonaws.opensearch#LimitValue": { + "type": "string" + }, + "com.amazonaws.opensearch#LimitValueList": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#LimitValue" + } + }, + "com.amazonaws.opensearch#Limits": { + "type": "structure", + "members": { + "StorageTypes": { + "target": "com.amazonaws.opensearch#StorageTypeList", + "traits": { + "smithy.api#documentation": "

Storage-related types and attributes\n that are available for a given InstanceType.\n

" + } + }, + "InstanceLimits": { + "target": "com.amazonaws.opensearch#InstanceLimits" + }, + "AdditionalLimits": { + "target": "com.amazonaws.opensearch#AdditionalLimitList", + "traits": { + "smithy.api#documentation": "

\n List of additional limits that are specific to a given InstanceType and for each of its\n \n InstanceRole\n \n .\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Limits for a given InstanceType and for each of its roles.\n

\n Limits contains the following:\n \n StorageTypes\n ,\n \n InstanceLimits\n ,\n and\n \n AdditionalLimits\n \n

" + } + }, + "com.amazonaws.opensearch#LimitsByRole": { + "type": "map", + "key": { + "target": "com.amazonaws.opensearch#InstanceRole" + }, + "value": { + "target": "com.amazonaws.opensearch#Limits" + }, + "traits": { + "smithy.api#documentation": "

\n The role of a given instance and all applicable limits.\n The role performed by a given OpenSearch instance\n can be one of the following:\n

\n

" + } + }, + "com.amazonaws.opensearch#ListDomainNames": { + "type": "operation", + "output": { + "target": "com.amazonaws.opensearch#ListDomainNamesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns the names of all domains owned by the current user's account.

", + "smithy.api#http": { + "method": "GET", + "uri": "/2021-01-01/domain", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#ListDomainNamesResponse": { + "type": "structure", + "members": { + "DomainNames": { + "target": "com.amazonaws.opensearch#DomainInfoList", + "traits": { + "smithy.api#documentation": "

List of domain names.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The result of a ListDomainNames operation. Contains the names of all domains owned by\n this account.\n

" + } + }, + "com.amazonaws.opensearch#ListDomainsForPackage": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#ListDomainsForPackageRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#ListDomainsForPackageResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#AccessDeniedException" + }, + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists all Amazon OpenSearch Service domains associated with the package.

", + "smithy.api#http": { + "method": "GET", + "uri": "/2021-01-01/packages/{PackageID}/domains", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.opensearch#ListDomainsForPackageRequest": { + "type": "structure", + "members": { + "PackageID": { + "target": "com.amazonaws.opensearch#PackageID", + "traits": { + "smithy.api#documentation": "

The package for which to list associated domains.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "MaxResults": { + "target": "com.amazonaws.opensearch#MaxResults", + "traits": { + "smithy.api#documentation": "

Limits the results to a maximum number of domains.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.opensearch#NextToken", + "traits": { + "smithy.api#documentation": "

Used for pagination. Only necessary if a previous API call includes a non-null NextToken value. If provided,\n returns results for the next page.\n

", + "smithy.api#httpQuery": "nextToken" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for the request parameters to the\n \n ListDomainsForPackage\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#ListDomainsForPackageResponse": { + "type": "structure", + "members": { + "DomainPackageDetailsList": { + "target": "com.amazonaws.opensearch#DomainPackageDetailsList", + "traits": { + "smithy.api#documentation": "

List of DomainPackageDetails objects.\n

" + } + }, + "NextToken": { + "target": "com.amazonaws.opensearch#String" + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for the response parameters to the\n \n ListDomainsForPackage\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#ListInstanceTypeDetails": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#ListInstanceTypeDetailsRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#ListInstanceTypeDetailsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#http": { + "method": "GET", + "uri": "/2021-01-01/opensearch/instanceTypeDetails/{EngineVersion}", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.opensearch#ListInstanceTypeDetailsRequest": { + "type": "structure", + "members": { + "EngineVersion": { + "target": "com.amazonaws.opensearch#VersionString", + "traits": { + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "DomainName": { + "target": "com.amazonaws.opensearch#DomainName", + "traits": { + "smithy.api#httpQuery": "domainName" + } + }, + "MaxResults": { + "target": "com.amazonaws.opensearch#MaxResults", + "traits": { + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.opensearch#NextToken", + "traits": { + "smithy.api#httpQuery": "nextToken" + } + } + } + }, + "com.amazonaws.opensearch#ListInstanceTypeDetailsResponse": { + "type": "structure", + "members": { + "InstanceTypeDetails": { + "target": "com.amazonaws.opensearch#InstanceTypeDetailsList" + }, + "NextToken": { + "target": "com.amazonaws.opensearch#NextToken" + } + } + }, + "com.amazonaws.opensearch#ListPackagesForDomain": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#ListPackagesForDomainRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#ListPackagesForDomainResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#AccessDeniedException" + }, + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists all packages associated with the Amazon OpenSearch Service domain.

", + "smithy.api#http": { + "method": "GET", + "uri": "/2021-01-01/domain/{DomainName}/packages", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.opensearch#ListPackagesForDomainRequest": { + "type": "structure", + "members": { + "DomainName": { + "target": "com.amazonaws.opensearch#DomainName", + "traits": { + "smithy.api#documentation": "

The name of the domain for which you want to list associated packages.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "MaxResults": { + "target": "com.amazonaws.opensearch#MaxResults", + "traits": { + "smithy.api#documentation": "

Limits results to a maximum number of packages.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.opensearch#NextToken", + "traits": { + "smithy.api#documentation": "

Used for pagination. Only necessary if a previous API call includes a non-null NextToken value. If provided,\n returns results for the next page.\n

", + "smithy.api#httpQuery": "nextToken" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for the request parameters to the\n \n ListPackagesForDomain\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#ListPackagesForDomainResponse": { + "type": "structure", + "members": { + "DomainPackageDetailsList": { + "target": "com.amazonaws.opensearch#DomainPackageDetailsList", + "traits": { + "smithy.api#documentation": "

List of DomainPackageDetails objects.\n

" + } + }, + "NextToken": { + "target": "com.amazonaws.opensearch#String", + "traits": { + "smithy.api#documentation": "

Pagination token to supply to the next call to get the next page of results.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for the response parameters to the\n \n ListPackagesForDomain\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#ListTags": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#ListTagsRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#ListTagsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns all tags for the given domain.

", + "smithy.api#http": { + "method": "GET", + "uri": "/2021-01-01/tags", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#ListTagsRequest": { + "type": "structure", + "members": { + "ARN": { + "target": "com.amazonaws.opensearch#ARN", + "traits": { + "smithy.api#documentation": "

Specify the ARN of the domain that the tags you want\n to view are attached to.\n

", + "smithy.api#httpQuery": "arn", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for the parameters to the\n \n ListTags\n \n operation. Specify the ARN of the domain that the tags you want\n to view are attached to.\n

" + } + }, + "com.amazonaws.opensearch#ListTagsResponse": { + "type": "structure", + "members": { + "TagList": { + "target": "com.amazonaws.opensearch#TagList", + "traits": { + "smithy.api#documentation": "

List of Tag for the requested domain.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The result of a ListTags operation. Contains tags for all requested domains.\n

" + } + }, + "com.amazonaws.opensearch#ListVersions": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#ListVersionsRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#ListVersionsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

List all supported versions of OpenSearch and Elasticsearch.

", + "smithy.api#http": { + "method": "GET", + "uri": "/2021-01-01/opensearch/versions", + "code": 200 + }, + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.opensearch#ListVersionsRequest": { + "type": "structure", + "members": { + "MaxResults": { + "target": "com.amazonaws.opensearch#MaxResults", + "traits": { + "smithy.api#documentation": "

\n Set this value to limit the number of results returned.\n Value must be greater than 10 or it won't be honored.\n

", + "smithy.api#httpQuery": "maxResults" + } + }, + "NextToken": { + "target": "com.amazonaws.opensearch#NextToken", + "traits": { + "smithy.api#httpQuery": "nextToken" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for the parameters to the\n \n ListVersions\n \n operation.\n

\n Use\n \n MaxResults\n \n to control the maximum number of results to retrieve in a single\n call.\n

\n

\n Use\n \n NextToken\n \n in response to retrieve more results. If the received response does\n not contain a NextToken, there are no more results to retrieve.\n

\n

" + } + }, + "com.amazonaws.opensearch#ListVersionsResponse": { + "type": "structure", + "members": { + "Versions": { + "target": "com.amazonaws.opensearch#VersionList" + }, + "NextToken": { + "target": "com.amazonaws.opensearch#NextToken" + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for the parameters for response received from the\n \n ListVersions\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#LogPublishingOption": { + "type": "structure", + "members": { + "CloudWatchLogsLogGroupArn": { + "target": "com.amazonaws.opensearch#CloudWatchLogsLogGroupArn" + }, + "Enabled": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

Whether the given log publishing option is enabled or not.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Log Publishing option that is set for a given domain.\n

Attributes and their details:\n

\n

" + } + }, + "com.amazonaws.opensearch#LogPublishingOptions": { + "type": "map", + "key": { + "target": "com.amazonaws.opensearch#LogType" + }, + "value": { + "target": "com.amazonaws.opensearch#LogPublishingOption" + } + }, + "com.amazonaws.opensearch#LogPublishingOptionsStatus": { + "type": "structure", + "members": { + "Options": { + "target": "com.amazonaws.opensearch#LogPublishingOptions", + "traits": { + "smithy.api#documentation": "

The log publishing options configured for the domain.

" + } + }, + "Status": { + "target": "com.amazonaws.opensearch#OptionStatus", + "traits": { + "smithy.api#documentation": "

The status of the log publishing options for the domain. See OptionStatus for the\n status information that's included.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The configured log publishing options for the domain and their current status.

" + } + }, + "com.amazonaws.opensearch#LogType": { + "type": "string", + "traits": { + "smithy.api#documentation": "

Type of log file. Can be one of the following:\n

\n

", + "smithy.api#enum": [ + { + "value": "INDEX_SLOW_LOGS", + "name": "INDEX_SLOW_LOGS" + }, + { + "value": "SEARCH_SLOW_LOGS", + "name": "SEARCH_SLOW_LOGS" + }, + { + "value": "ES_APPLICATION_LOGS", + "name": "ES_APPLICATION_LOGS" + }, + { + "value": "AUDIT_LOGS", + "name": "AUDIT_LOGS" + } + ] + } + }, + "com.amazonaws.opensearch#Long": { + "type": "long", + "traits": { + "smithy.api#box": {} + } + }, + "com.amazonaws.opensearch#MasterUserOptions": { + "type": "structure", + "members": { + "MasterUserARN": { + "target": "com.amazonaws.opensearch#ARN", + "traits": { + "smithy.api#documentation": "

ARN for the master user (if IAM is enabled).

" + } + }, + "MasterUserName": { + "target": "com.amazonaws.opensearch#Username", + "traits": { + "smithy.api#documentation": "

The master user's username, which is stored in the Amazon OpenSearch Service domain's internal database.

" + } + }, + "MasterUserPassword": { + "target": "com.amazonaws.opensearch#Password", + "traits": { + "smithy.api#documentation": "

The master user's password, which is stored in the Amazon OpenSearch Service domain's internal database.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Credentials for the master user: username and password, ARN, or both.

" + } + }, + "com.amazonaws.opensearch#MaxResults": { + "type": "integer", + "traits": { + "smithy.api#documentation": "

\n Set this value to limit the number of results returned.\n

", + "smithy.api#range": { + "max": 100 + } + } + }, + "com.amazonaws.opensearch#MaximumInstanceCount": { + "type": "integer", + "traits": { + "smithy.api#documentation": "

\n Maximum number of instances that can be instantiated for a given InstanceType.\n

" + } + }, + "com.amazonaws.opensearch#MinimumInstanceCount": { + "type": "integer", + "traits": { + "smithy.api#documentation": "

\n Minimum number of instances that can be instantiated for a given InstanceType.\n

" + } + }, + "com.amazonaws.opensearch#NextToken": { + "type": "string", + "traits": { + "smithy.api#documentation": "

\n Paginated APIs accept the NextToken input to return the next page of results and provide\n a NextToken output in the response, which you can use to retrieve more results.\n

" + } + }, + "com.amazonaws.opensearch#NodeToNodeEncryptionOptions": { + "type": "structure", + "members": { + "Enabled": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

True to enable node-to-node encryption.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The node-to-node encryption options.

" + } + }, + "com.amazonaws.opensearch#NodeToNodeEncryptionOptionsStatus": { + "type": "structure", + "members": { + "Options": { + "target": "com.amazonaws.opensearch#NodeToNodeEncryptionOptions", + "traits": { + "smithy.api#documentation": "

The node-to-node encryption options for the specified domain.

", + "smithy.api#required": {} + } + }, + "Status": { + "target": "com.amazonaws.opensearch#OptionStatus", + "traits": { + "smithy.api#documentation": "

The status of the node-to-node encryption options for the specified domain.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Status of the node-to-node encryption options for the specified domain.

" + } + }, + "com.amazonaws.opensearch#NonEmptyString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + }, + "smithy.api#pattern": "^[a-zA-Z0-9\\-\\_\\.]+$" + } + }, + "com.amazonaws.opensearch#OpenSearchPartitionInstanceType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "m3.medium.search", + "name": "m3_medium_search" + }, + { + "value": "m3.large.search", + "name": "m3_large_search" + }, + { + "value": "m3.xlarge.search", + "name": "m3_xlarge_search" + }, + { + "value": "m3.2xlarge.search", + "name": "m3_2xlarge_search" + }, + { + "value": "m4.large.search", + "name": "m4_large_search" + }, + { + "value": "m4.xlarge.search", + "name": "m4_xlarge_search" + }, + { + "value": "m4.2xlarge.search", + "name": "m4_2xlarge_search" + }, + { + "value": "m4.4xlarge.search", + "name": "m4_4xlarge_search" + }, + { + "value": "m4.10xlarge.search", + "name": "m4_10xlarge_search" + }, + { + "value": "m5.large.search", + "name": "m5_large_search" + }, + { + "value": "m5.xlarge.search", + "name": "m5_xlarge_search" + }, + { + "value": "m5.2xlarge.search", + "name": "m5_2xlarge_search" + }, + { + "value": "m5.4xlarge.search", + "name": "m5_4xlarge_search" + }, + { + "value": "m5.12xlarge.search", + "name": "m5_12xlarge_search" + }, + { + "value": "m5.24xlarge.search", + "name": "m5_24xlarge_search" + }, + { + "value": "r5.large.search", + "name": "r5_large_search" + }, + { + "value": "r5.xlarge.search", + "name": "r5_xlarge_search" + }, + { + "value": "r5.2xlarge.search", + "name": "r5_2xlarge_search" + }, + { + "value": "r5.4xlarge.search", + "name": "r5_4xlarge_search" + }, + { + "value": "r5.12xlarge.search", + "name": "r5_12xlarge_search" + }, + { + "value": "r5.24xlarge.search", + "name": "r5_24xlarge_search" + }, + { + "value": "c5.large.search", + "name": "c5_large_search" + }, + { + "value": "c5.xlarge.search", + "name": "c5_xlarge_search" + }, + { + "value": "c5.2xlarge.search", + "name": "c5_2xlarge_search" + }, + { + "value": "c5.4xlarge.search", + "name": "c5_4xlarge_search" + }, + { + "value": "c5.9xlarge.search", + "name": "c5_9xlarge_search" + }, + { + "value": "c5.18xlarge.search", + "name": "c5_18xlarge_search" + }, + { + "value": "t3.nano.search", + "name": "t3_nano_search" + }, + { + "value": "t3.micro.search", + "name": "t3_micro_search" + }, + { + "value": "t3.small.search", + "name": "t3_small_search" + }, + { + "value": "t3.medium.search", + "name": "t3_medium_search" + }, + { + "value": "t3.large.search", + "name": "t3_large_search" + }, + { + "value": "t3.xlarge.search", + "name": "t3_xlarge_search" + }, + { + "value": "t3.2xlarge.search", + "name": "t3_2xlarge_search" + }, + { + "value": "ultrawarm1.medium.search", + "name": "ultrawarm1_medium_search" + }, + { + "value": "ultrawarm1.large.search", + "name": "ultrawarm1_large_search" + }, + { + "value": "ultrawarm1.xlarge.search", + "name": "ultrawarm1_xlarge_search" + }, + { + "value": "t2.micro.search", + "name": "t2_micro_search" + }, + { + "value": "t2.small.search", + "name": "t2_small_search" + }, + { + "value": "t2.medium.search", + "name": "t2_medium_search" + }, + { + "value": "r3.large.search", + "name": "r3_large_search" + }, + { + "value": "r3.xlarge.search", + "name": "r3_xlarge_search" + }, + { + "value": "r3.2xlarge.search", + "name": "r3_2xlarge_search" + }, + { + "value": "r3.4xlarge.search", + "name": "r3_4xlarge_search" + }, + { + "value": "r3.8xlarge.search", + "name": "r3_8xlarge_search" + }, + { + "value": "i2.xlarge.search", + "name": "i2_xlarge_search" + }, + { + "value": "i2.2xlarge.search", + "name": "i2_2xlarge_search" + }, + { + "value": "d2.xlarge.search", + "name": "d2_xlarge_search" + }, + { + "value": "d2.2xlarge.search", + "name": "d2_2xlarge_search" + }, + { + "value": "d2.4xlarge.search", + "name": "d2_4xlarge_search" + }, + { + "value": "d2.8xlarge.search", + "name": "d2_8xlarge_search" + }, + { + "value": "c4.large.search", + "name": "c4_large_search" + }, + { + "value": "c4.xlarge.search", + "name": "c4_xlarge_search" + }, + { + "value": "c4.2xlarge.search", + "name": "c4_2xlarge_search" + }, + { + "value": "c4.4xlarge.search", + "name": "c4_4xlarge_search" + }, + { + "value": "c4.8xlarge.search", + "name": "c4_8xlarge_search" + }, + { + "value": "r4.large.search", + "name": "r4_large_search" + }, + { + "value": "r4.xlarge.search", + "name": "r4_xlarge_search" + }, + { + "value": "r4.2xlarge.search", + "name": "r4_2xlarge_search" + }, + { + "value": "r4.4xlarge.search", + "name": "r4_4xlarge_search" + }, + { + "value": "r4.8xlarge.search", + "name": "r4_8xlarge_search" + }, + { + "value": "r4.16xlarge.search", + "name": "r4_16xlarge_search" + }, + { + "value": "i3.large.search", + "name": "i3_large_search" + }, + { + "value": "i3.xlarge.search", + "name": "i3_xlarge_search" + }, + { + "value": "i3.2xlarge.search", + "name": "i3_2xlarge_search" + }, + { + "value": "i3.4xlarge.search", + "name": "i3_4xlarge_search" + }, + { + "value": "i3.8xlarge.search", + "name": "i3_8xlarge_search" + }, + { + "value": "i3.16xlarge.search", + "name": "i3_16xlarge_search" + }, + { + "value": "r6g.large.search", + "name": "r6g_large_search" + }, + { + "value": "r6g.xlarge.search", + "name": "r6g_xlarge_search" + }, + { + "value": "r6g.2xlarge.search", + "name": "r6g_2xlarge_search" + }, + { + "value": "r6g.4xlarge.search", + "name": "r6g_4xlarge_search" + }, + { + "value": "r6g.8xlarge.search", + "name": "r6g_8xlarge_search" + }, + { + "value": "r6g.12xlarge.search", + "name": "r6g_12xlarge_search" + }, + { + "value": "m6g.large.search", + "name": "m6g_large_search" + }, + { + "value": "m6g.xlarge.search", + "name": "m6g_xlarge_search" + }, + { + "value": "m6g.2xlarge.search", + "name": "m6g_2xlarge_search" + }, + { + "value": "m6g.4xlarge.search", + "name": "m6g_4xlarge_search" + }, + { + "value": "m6g.8xlarge.search", + "name": "m6g_8xlarge_search" + }, + { + "value": "m6g.12xlarge.search", + "name": "m6g_12xlarge_search" + }, + { + "value": "c6g.large.search", + "name": "c6g_large_search" + }, + { + "value": "c6g.xlarge.search", + "name": "c6g_xlarge_search" + }, + { + "value": "c6g.2xlarge.search", + "name": "c6g_2xlarge_search" + }, + { + "value": "c6g.4xlarge.search", + "name": "c6g_4xlarge_search" + }, + { + "value": "c6g.8xlarge.search", + "name": "c6g_8xlarge_search" + }, + { + "value": "c6g.12xlarge.search", + "name": "c6g_12xlarge_search" + }, + { + "value": "r6gd.large.search", + "name": "r6gd_large_search" + }, + { + "value": "r6gd.xlarge.search", + "name": "r6gd_xlarge_search" + }, + { + "value": "r6gd.2xlarge.search", + "name": "r6gd_2xlarge_search" + }, + { + "value": "r6gd.4xlarge.search", + "name": "r6gd_4xlarge_search" + }, + { + "value": "r6gd.8xlarge.search", + "name": "r6gd_8xlarge_search" + }, + { + "value": "r6gd.12xlarge.search", + "name": "r6gd_12xlarge_search" + }, + { + "value": "r6gd.16xlarge.search", + "name": "r6gd_16xlarge_search" + }, + { + "value": "t4g.small.search", + "name": "t4g_small_search" + }, + { + "value": "t4g.medium.search", + "name": "t4g_medium_search" + } + ] + } + }, + "com.amazonaws.opensearch#OpenSearchWarmPartitionInstanceType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ultrawarm1.medium.search", + "name": "ultrawarm1_medium_search" + }, + { + "value": "ultrawarm1.large.search", + "name": "ultrawarm1_large_search" + }, + { + "value": "ultrawarm1.xlarge.search", + "name": "ultrawarm1_xlarge_search" + } + ] + } + }, + "com.amazonaws.opensearch#OptionState": { + "type": "string", + "traits": { + "smithy.api#documentation": "

The state of a requested change. One of the following:

\n ", + "smithy.api#enum": [ + { + "value": "RequiresIndexDocuments", + "name": "RequiresIndexDocuments" + }, + { + "value": "Processing", + "name": "Processing" + }, + { + "value": "Active", + "name": "Active" + } + ] + } + }, + "com.amazonaws.opensearch#OptionStatus": { + "type": "structure", + "members": { + "CreationDate": { + "target": "com.amazonaws.opensearch#UpdateTimestamp", + "traits": { + "smithy.api#documentation": "

The timestamp of when the entity was created.

", + "smithy.api#required": {} + } + }, + "UpdateDate": { + "target": "com.amazonaws.opensearch#UpdateTimestamp", + "traits": { + "smithy.api#documentation": "

The timestamp of the last time the entity was updated.

", + "smithy.api#required": {} + } + }, + "UpdateVersion": { + "target": "com.amazonaws.opensearch#UIntValue", + "traits": { + "smithy.api#documentation": "

The latest version of the entity.

" + } + }, + "State": { + "target": "com.amazonaws.opensearch#OptionState", + "traits": { + "smithy.api#documentation": "

Provides the OptionState for the domain.\n

", + "smithy.api#required": {} + } + }, + "PendingDeletion": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

Indicates whether the domain is being deleted.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Provides the current status of the entity.

" + } + }, + "com.amazonaws.opensearch#OutboundConnection": { + "type": "structure", + "members": { + "LocalDomainInfo": { + "target": "com.amazonaws.opensearch#DomainInformationContainer", + "traits": { + "smithy.api#documentation": "

The\n \n DomainInformation\n \n for the local OpenSearch domain.\n

" + } + }, + "RemoteDomainInfo": { + "target": "com.amazonaws.opensearch#DomainInformationContainer", + "traits": { + "smithy.api#documentation": "

The\n \n DomainInformation\n \n for the remote OpenSearch domain.\n

" + } + }, + "ConnectionId": { + "target": "com.amazonaws.opensearch#ConnectionId", + "traits": { + "smithy.api#documentation": "

The connection ID for the outbound cross-cluster connection.

" + } + }, + "ConnectionAlias": { + "target": "com.amazonaws.opensearch#ConnectionAlias", + "traits": { + "smithy.api#documentation": "

The connection alias for the outbound cross-cluster connection.

" + } + }, + "ConnectionStatus": { + "target": "com.amazonaws.opensearch#OutboundConnectionStatus", + "traits": { + "smithy.api#documentation": "

The\n \n OutboundConnectionStatus\n \n for the outbound connection.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies details about an outbound connection.

" + } + }, + "com.amazonaws.opensearch#OutboundConnectionStatus": { + "type": "structure", + "members": { + "StatusCode": { + "target": "com.amazonaws.opensearch#OutboundConnectionStatusCode", + "traits": { + "smithy.api#documentation": "

The state code for the outbound connection. Can be one of the following:

\n " + } + }, + "Message": { + "target": "com.amazonaws.opensearch#ConnectionStatusMessage", + "traits": { + "smithy.api#documentation": "

Verbose information for the outbound connection status.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The connection status of an outbound cross-cluster connection.

" + } + }, + "com.amazonaws.opensearch#OutboundConnectionStatusCode": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "VALIDATING", + "name": "VALIDATING" + }, + { + "value": "VALIDATION_FAILED", + "name": "VALIDATION_FAILED" + }, + { + "value": "PENDING_ACCEPTANCE", + "name": "PENDING_ACCEPTANCE" + }, + { + "value": "APPROVED", + "name": "APPROVED" + }, + { + "value": "PROVISIONING", + "name": "PROVISIONING" + }, + { + "value": "ACTIVE", + "name": "ACTIVE" + }, + { + "value": "REJECTING", + "name": "REJECTING" + }, + { + "value": "REJECTED", + "name": "REJECTED" + }, + { + "value": "DELETING", + "name": "DELETING" + }, + { + "value": "DELETED", + "name": "DELETED" + } + ] + } + }, + "com.amazonaws.opensearch#OutboundConnections": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#OutboundConnection" + } + }, + "com.amazonaws.opensearch#OwnerId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 12, + "max": 12 + }, + "smithy.api#pattern": "^[0-9]+$" + } + }, + "com.amazonaws.opensearch#PackageDescription": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1024 + } + } + }, + "com.amazonaws.opensearch#PackageDetails": { + "type": "structure", + "members": { + "PackageID": { + "target": "com.amazonaws.opensearch#PackageID", + "traits": { + "smithy.api#documentation": "

Internal ID of the package.

" + } + }, + "PackageName": { + "target": "com.amazonaws.opensearch#PackageName", + "traits": { + "smithy.api#documentation": "

User-specified name of the package.

" + } + }, + "PackageType": { + "target": "com.amazonaws.opensearch#PackageType", + "traits": { + "smithy.api#documentation": "

Currently supports only TXT-DICTIONARY.

" + } + }, + "PackageDescription": { + "target": "com.amazonaws.opensearch#PackageDescription", + "traits": { + "smithy.api#documentation": "

User-specified description of the package.

" + } + }, + "PackageStatus": { + "target": "com.amazonaws.opensearch#PackageStatus", + "traits": { + "smithy.api#documentation": "

Current state of the package. Values are COPYING, COPY_FAILED, AVAILABLE, DELETING, and DELETE_FAILED.

" + } + }, + "CreatedAt": { + "target": "com.amazonaws.opensearch#CreatedAt", + "traits": { + "smithy.api#documentation": "

The timestamp of when the package was created.

" + } + }, + "LastUpdatedAt": { + "target": "com.amazonaws.opensearch#LastUpdated" + }, + "AvailablePackageVersion": { + "target": "com.amazonaws.opensearch#PackageVersion" + }, + "ErrorDetails": { + "target": "com.amazonaws.opensearch#ErrorDetails", + "traits": { + "smithy.api#documentation": "

Additional information if the package is in an error state. Null otherwise.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Basic information about a package.

" + } + }, + "com.amazonaws.opensearch#PackageDetailsList": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#PackageDetails" + } + }, + "com.amazonaws.opensearch#PackageID": { + "type": "string" + }, + "com.amazonaws.opensearch#PackageName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 3, + "max": 28 + }, + "smithy.api#pattern": "^[a-z][a-z0-9\\-]+$" + } + }, + "com.amazonaws.opensearch#PackageSource": { + "type": "structure", + "members": { + "S3BucketName": { + "target": "com.amazonaws.opensearch#S3BucketName", + "traits": { + "smithy.api#documentation": "

The name of the Amazon S3 bucket containing the package.

" + } + }, + "S3Key": { + "target": "com.amazonaws.opensearch#S3Key", + "traits": { + "smithy.api#documentation": "

Key (file name) of the package.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The Amazon S3 location for importing the package specified as S3BucketName and\n S3Key\n

" + } + }, + "com.amazonaws.opensearch#PackageStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "COPYING", + "name": "COPYING" + }, + { + "value": "COPY_FAILED", + "name": "COPY_FAILED" + }, + { + "value": "VALIDATING", + "name": "VALIDATING" + }, + { + "value": "VALIDATION_FAILED", + "name": "VALIDATION_FAILED" + }, + { + "value": "AVAILABLE", + "name": "AVAILABLE" + }, + { + "value": "DELETING", + "name": "DELETING" + }, + { + "value": "DELETED", + "name": "DELETED" + }, + { + "value": "DELETE_FAILED", + "name": "DELETE_FAILED" + } + ] + } + }, + "com.amazonaws.opensearch#PackageType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "TXT-DICTIONARY", + "name": "TXT_DICTIONARY" + } + ] + } + }, + "com.amazonaws.opensearch#PackageVersion": { + "type": "string" + }, + "com.amazonaws.opensearch#PackageVersionHistory": { + "type": "structure", + "members": { + "PackageVersion": { + "target": "com.amazonaws.opensearch#PackageVersion", + "traits": { + "smithy.api#documentation": "

The package version.

" + } + }, + "CommitMessage": { + "target": "com.amazonaws.opensearch#CommitMessage", + "traits": { + "smithy.api#documentation": "

A message associated with the package version.

" + } + }, + "CreatedAt": { + "target": "com.amazonaws.opensearch#CreatedAt", + "traits": { + "smithy.api#documentation": "

The timestamp of when the package was created.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Details of a package version.

" + } + }, + "com.amazonaws.opensearch#PackageVersionHistoryList": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#PackageVersionHistory" + } + }, + "com.amazonaws.opensearch#Password": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 8, + "max": 128 + }, + "smithy.api#pattern": ".*", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.opensearch#PolicyDocument": { + "type": "string", + "traits": { + "smithy.api#documentation": "

Access policy rules for a domain service endpoints. For more information, see Configuring access policies\n . The maximum size of a policy document is 100 KB.\n

", + "smithy.api#length": { + "min": 0, + "max": 102400 + }, + "smithy.api#pattern": ".*" + } + }, + "com.amazonaws.opensearch#PurchaseReservedInstanceOffering": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#PurchaseReservedInstanceOfferingRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#PurchaseReservedInstanceOfferingResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#DisabledOperationException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#LimitExceededException" + }, + { + "target": "com.amazonaws.opensearch#ResourceAlreadyExistsException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Allows you to purchase reserved OpenSearch instances.

", + "smithy.api#http": { + "method": "POST", + "uri": "/2021-01-01/opensearch/purchaseReservedInstanceOffering", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#PurchaseReservedInstanceOfferingRequest": { + "type": "structure", + "members": { + "ReservedInstanceOfferingId": { + "target": "com.amazonaws.opensearch#GUID", + "traits": { + "smithy.api#documentation": "

The ID of the reserved OpenSearch instance offering to purchase.

", + "smithy.api#required": {} + } + }, + "ReservationName": { + "target": "com.amazonaws.opensearch#ReservationToken", + "traits": { + "smithy.api#documentation": "

A customer-specified identifier to track this reservation.

", + "smithy.api#required": {} + } + }, + "InstanceCount": { + "target": "com.amazonaws.opensearch#InstanceCount", + "traits": { + "smithy.api#documentation": "

The number of OpenSearch instances to reserve.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for parameters to\n PurchaseReservedInstanceOffering\n

" + } + }, + "com.amazonaws.opensearch#PurchaseReservedInstanceOfferingResponse": { + "type": "structure", + "members": { + "ReservedInstanceId": { + "target": "com.amazonaws.opensearch#GUID", + "traits": { + "smithy.api#documentation": "

Details of the reserved OpenSearch instance which was purchased.

" + } + }, + "ReservationName": { + "target": "com.amazonaws.opensearch#ReservationToken", + "traits": { + "smithy.api#documentation": "

The customer-specified identifier used to track this reservation.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Represents the output of a PurchaseReservedInstanceOffering operation.\n

" + } + }, + "com.amazonaws.opensearch#RecurringCharge": { + "type": "structure", + "members": { + "RecurringChargeAmount": { + "target": "com.amazonaws.opensearch#Double", + "traits": { + "smithy.api#documentation": "

The monetary amount of the recurring charge.

" + } + }, + "RecurringChargeFrequency": { + "target": "com.amazonaws.opensearch#String", + "traits": { + "smithy.api#documentation": "

The frequency of the recurring charge.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains the specific price and frequency of a recurring charges for a reserved OpenSearch instance, or for a\n reserved OpenSearch instance offering.\n

" + } + }, + "com.amazonaws.opensearch#RecurringChargeList": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#RecurringCharge", + "traits": { + "smithy.api#xmlName": "RecurringCharge" + } + } + }, + "com.amazonaws.opensearch#ReferencePath": { + "type": "string" + }, + "com.amazonaws.opensearch#Region": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 5, + "max": 30 + }, + "smithy.api#pattern": "^[a-z][a-z0-9\\-]+$" + } + }, + "com.amazonaws.opensearch#RejectInboundConnection": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#RejectInboundConnectionRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#RejectInboundConnectionResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#DisabledOperationException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

Allows the remote domain owner to reject an inbound cross-cluster connection request.

", + "smithy.api#http": { + "method": "PUT", + "uri": "/2021-01-01/opensearch/cc/inboundConnection/{ConnectionId}/reject", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#RejectInboundConnectionRequest": { + "type": "structure", + "members": { + "ConnectionId": { + "target": "com.amazonaws.opensearch#ConnectionId", + "traits": { + "smithy.api#documentation": "

The ID of the inbound connection to reject.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for the parameters to the\n \n RejectInboundConnection\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#RejectInboundConnectionResponse": { + "type": "structure", + "members": { + "Connection": { + "target": "com.amazonaws.opensearch#InboundConnection", + "traits": { + "smithy.api#documentation": "

The\n \n InboundConnection\n \n of the rejected inbound connection.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The result of a\n \n RejectInboundConnection\n \n operation. Contains details about the rejected inbound connection.\n

" + } + }, + "com.amazonaws.opensearch#RemoveTags": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#RemoveTagsRequest" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Removes the specified set of tags from the given domain.

", + "smithy.api#http": { + "method": "POST", + "uri": "/2021-01-01/tags-removal", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#RemoveTagsRequest": { + "type": "structure", + "members": { + "ARN": { + "target": "com.amazonaws.opensearch#ARN", + "traits": { + "smithy.api#documentation": "

The ARN of the domain from which you want to delete the specified tags.\n

", + "smithy.api#required": {} + } + }, + "TagKeys": { + "target": "com.amazonaws.opensearch#StringList", + "traits": { + "smithy.api#documentation": "

The TagKey list you want to remove from the domain.\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for the parameters to the\n \n RemoveTags\n \n operation. Specify the ARN for the domain from which you want to remove the\n specified TagKey.\n

" + } + }, + "com.amazonaws.opensearch#ReservationToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 5, + "max": 64 + }, + "smithy.api#pattern": ".*" + } + }, + "com.amazonaws.opensearch#ReservedInstance": { + "type": "structure", + "members": { + "ReservationName": { + "target": "com.amazonaws.opensearch#ReservationToken", + "traits": { + "smithy.api#documentation": "

The customer-specified identifier to track this reservation.

" + } + }, + "ReservedInstanceId": { + "target": "com.amazonaws.opensearch#GUID", + "traits": { + "smithy.api#documentation": "

The unique identifier for the reservation.

" + } + }, + "BillingSubscriptionId": { + "target": "com.amazonaws.opensearch#Long" + }, + "ReservedInstanceOfferingId": { + "target": "com.amazonaws.opensearch#String", + "traits": { + "smithy.api#documentation": "

The offering identifier.

" + } + }, + "InstanceType": { + "target": "com.amazonaws.opensearch#OpenSearchPartitionInstanceType", + "traits": { + "smithy.api#documentation": "

The OpenSearch instance type offered by the reserved instance offering.

" + } + }, + "StartTime": { + "target": "com.amazonaws.opensearch#UpdateTimestamp", + "traits": { + "smithy.api#documentation": "

The time the reservation started.

" + } + }, + "Duration": { + "target": "com.amazonaws.opensearch#Integer", + "traits": { + "smithy.api#documentation": "

The duration, in seconds, for which the OpenSearch instance is reserved.

" + } + }, + "FixedPrice": { + "target": "com.amazonaws.opensearch#Double", + "traits": { + "smithy.api#documentation": "

The upfront fixed charge you will paid to purchase the specific reserved OpenSearch instance offering.

" + } + }, + "UsagePrice": { + "target": "com.amazonaws.opensearch#Double", + "traits": { + "smithy.api#documentation": "

The rate you are charged for each hour for the domain that is using this reserved instance.

" + } + }, + "CurrencyCode": { + "target": "com.amazonaws.opensearch#String", + "traits": { + "smithy.api#documentation": "

The currency code for the reserved OpenSearch instance offering.

" + } + }, + "InstanceCount": { + "target": "com.amazonaws.opensearch#Integer", + "traits": { + "smithy.api#documentation": "

The number of OpenSearch instances that have been reserved.

" + } + }, + "State": { + "target": "com.amazonaws.opensearch#String", + "traits": { + "smithy.api#documentation": "

The state of the reserved OpenSearch instance.

" + } + }, + "PaymentOption": { + "target": "com.amazonaws.opensearch#ReservedInstancePaymentOption", + "traits": { + "smithy.api#documentation": "

The payment option as defined in the reserved OpenSearch instance offering.

" + } + }, + "RecurringCharges": { + "target": "com.amazonaws.opensearch#RecurringChargeList", + "traits": { + "smithy.api#documentation": "

The charge to your account regardless of whether you are creating any domains using the instance offering.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Details of a reserved OpenSearch instance.

" + } + }, + "com.amazonaws.opensearch#ReservedInstanceList": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#ReservedInstance" + } + }, + "com.amazonaws.opensearch#ReservedInstanceOffering": { + "type": "structure", + "members": { + "ReservedInstanceOfferingId": { + "target": "com.amazonaws.opensearch#GUID", + "traits": { + "smithy.api#documentation": "

The OpenSearch reserved instance offering identifier.

" + } + }, + "InstanceType": { + "target": "com.amazonaws.opensearch#OpenSearchPartitionInstanceType", + "traits": { + "smithy.api#documentation": "

The OpenSearch instance type offered by the reserved instance offering.

" + } + }, + "Duration": { + "target": "com.amazonaws.opensearch#Integer", + "traits": { + "smithy.api#documentation": "

The duration, in seconds, for which the offering will reserve the OpenSearch instance.

" + } + }, + "FixedPrice": { + "target": "com.amazonaws.opensearch#Double", + "traits": { + "smithy.api#documentation": "

The upfront fixed charge you will pay to purchase the specific reserved OpenSearch instance offering.

" + } + }, + "UsagePrice": { + "target": "com.amazonaws.opensearch#Double", + "traits": { + "smithy.api#documentation": "

The rate you are charged for each hour the domain that is using the offering is running.

" + } + }, + "CurrencyCode": { + "target": "com.amazonaws.opensearch#String", + "traits": { + "smithy.api#documentation": "

The currency code for the reserved OpenSearch instance offering.

" + } + }, + "PaymentOption": { + "target": "com.amazonaws.opensearch#ReservedInstancePaymentOption", + "traits": { + "smithy.api#documentation": "

Payment option for the reserved OpenSearch instance offering

" + } + }, + "RecurringCharges": { + "target": "com.amazonaws.opensearch#RecurringChargeList", + "traits": { + "smithy.api#documentation": "

The charge to your account regardless of whether you are creating any domains using the instance offering.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Details of a reserved OpenSearch instance offering.

" + } + }, + "com.amazonaws.opensearch#ReservedInstanceOfferingList": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#ReservedInstanceOffering", + "traits": { + "smithy.api#xmlName": "ReservedInstanceOffering" + } + } + }, + "com.amazonaws.opensearch#ReservedInstancePaymentOption": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ALL_UPFRONT", + "name": "ALL_UPFRONT" + }, + { + "value": "PARTIAL_UPFRONT", + "name": "PARTIAL_UPFRONT" + }, + { + "value": "NO_UPFRONT", + "name": "NO_UPFRONT" + } + ] + } + }, + "com.amazonaws.opensearch#ResourceAlreadyExistsException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.opensearch#ErrorMessage", + "traits": { + "smithy.api#documentation": "

A description of the error.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

An exception for creating a resource that already exists. Gives http status code of 400.

", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.opensearch#ResourceNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.opensearch#ErrorMessage", + "traits": { + "smithy.api#documentation": "

A description of the error.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

An exception for accessing or deleting a resource that does not exist. Gives http status code of 400.

", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.opensearch#RoleArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 20, + "max": 2048 + }, + "smithy.api#pattern": "^arn:(aws|aws\\-cn|aws\\-us\\-gov|aws\\-iso|aws\\-iso\\-b):iam::[0-9]+:role\\/" + } + }, + "com.amazonaws.opensearch#RollbackOnDisable": { + "type": "string", + "traits": { + "smithy.api#documentation": "

The rollback state while disabling Auto-Tune for the domain. Valid values are NO_ROLLBACK and DEFAULT_ROLLBACK.\n

", + "smithy.api#enum": [ + { + "value": "NO_ROLLBACK", + "name": "NO_ROLLBACK" + }, + { + "value": "DEFAULT_ROLLBACK", + "name": "DEFAULT_ROLLBACK" + } + ] + } + }, + "com.amazonaws.opensearch#S3BucketName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 3, + "max": 63 + } + } + }, + "com.amazonaws.opensearch#S3Key": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + } + } + }, + "com.amazonaws.opensearch#SAMLEntityId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 8, + "max": 512 + } + } + }, + "com.amazonaws.opensearch#SAMLIdp": { + "type": "structure", + "members": { + "MetadataContent": { + "target": "com.amazonaws.opensearch#SAMLMetadata", + "traits": { + "smithy.api#documentation": "

The metadata of the SAML application in XML format.

", + "smithy.api#required": {} + } + }, + "EntityId": { + "target": "com.amazonaws.opensearch#SAMLEntityId", + "traits": { + "smithy.api#documentation": "

The unique entity ID of the application in SAML identity provider.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The SAML identity povider's information.

" + } + }, + "com.amazonaws.opensearch#SAMLMetadata": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1048576 + } + } + }, + "com.amazonaws.opensearch#SAMLOptionsInput": { + "type": "structure", + "members": { + "Enabled": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

True if SAML is enabled.

" + } + }, + "Idp": { + "target": "com.amazonaws.opensearch#SAMLIdp", + "traits": { + "smithy.api#documentation": "

The SAML Identity Provider's information.

" + } + }, + "MasterUserName": { + "target": "com.amazonaws.opensearch#Username", + "traits": { + "smithy.api#documentation": "

The SAML master username, which is stored in the Amazon OpenSearch Service domain's internal database.

" + } + }, + "MasterBackendRole": { + "target": "com.amazonaws.opensearch#BackendRole", + "traits": { + "smithy.api#documentation": "

The backend role that the SAML master user is mapped to.

" + } + }, + "SubjectKey": { + "target": "com.amazonaws.opensearch#String", + "traits": { + "smithy.api#documentation": "

Element of the SAML assertion to use for username. Default is NameID.

" + } + }, + "RolesKey": { + "target": "com.amazonaws.opensearch#String", + "traits": { + "smithy.api#documentation": "

Element of the SAML assertion to use for backend roles. Default is roles.

" + } + }, + "SessionTimeoutMinutes": { + "target": "com.amazonaws.opensearch#IntegerClass", + "traits": { + "smithy.api#documentation": "

The duration, in minutes, after which a user session becomes inactive. Acceptable values are between 1 and 1440,\n and the default value is 60.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The SAML application configuration for the domain.

" + } + }, + "com.amazonaws.opensearch#SAMLOptionsOutput": { + "type": "structure", + "members": { + "Enabled": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

True if SAML is enabled.

" + } + }, + "Idp": { + "target": "com.amazonaws.opensearch#SAMLIdp", + "traits": { + "smithy.api#documentation": "

Describes the SAML identity provider's information.

" + } + }, + "SubjectKey": { + "target": "com.amazonaws.opensearch#String", + "traits": { + "smithy.api#documentation": "

The key used for matching the SAML subject attribute.

" + } + }, + "RolesKey": { + "target": "com.amazonaws.opensearch#String", + "traits": { + "smithy.api#documentation": "

The key used for matching the SAML roles attribute.

" + } + }, + "SessionTimeoutMinutes": { + "target": "com.amazonaws.opensearch#IntegerClass", + "traits": { + "smithy.api#documentation": "

The duration, in minutes, after which a user session becomes inactive.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Describes the SAML application configured for the domain.

" + } + }, + "com.amazonaws.opensearch#ScheduledAutoTuneActionType": { + "type": "string", + "traits": { + "smithy.api#documentation": "

The Auto-Tune action type. Valid values are JVM_HEAP_SIZE_TUNING, and JVM_YOUNG_GEN_TUNING.

", + "smithy.api#enum": [ + { + "value": "JVM_HEAP_SIZE_TUNING", + "name": "JVM_HEAP_SIZE_TUNING" + }, + { + "value": "JVM_YOUNG_GEN_TUNING", + "name": "JVM_YOUNG_GEN_TUNING" + } + ] + } + }, + "com.amazonaws.opensearch#ScheduledAutoTuneDescription": { + "type": "string", + "traits": { + "smithy.api#documentation": "

The Auto-Tune action description.

" + } + }, + "com.amazonaws.opensearch#ScheduledAutoTuneDetails": { + "type": "structure", + "members": { + "Date": { + "target": "com.amazonaws.opensearch#AutoTuneDate", + "traits": { + "smithy.api#documentation": "

The timestamp of the Auto-Tune action scheduled for the domain.

" + } + }, + "ActionType": { + "target": "com.amazonaws.opensearch#ScheduledAutoTuneActionType", + "traits": { + "smithy.api#documentation": "

The Auto-Tune action type. Valid values are JVM_HEAP_SIZE_TUNING and JVM_YOUNG_GEN_TUNING.

" + } + }, + "Action": { + "target": "com.amazonaws.opensearch#ScheduledAutoTuneDescription", + "traits": { + "smithy.api#documentation": "

The Auto-Tune action description.

" + } + }, + "Severity": { + "target": "com.amazonaws.opensearch#ScheduledAutoTuneSeverityType", + "traits": { + "smithy.api#documentation": "

The Auto-Tune action severity. Valid values are LOW, MEDIUM, and HIGH.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Specifies details about the scheduled Auto-Tune action. See \n Auto-Tune for Amazon OpenSearch Service\n for more information.\n

" + } + }, + "com.amazonaws.opensearch#ScheduledAutoTuneSeverityType": { + "type": "string", + "traits": { + "smithy.api#documentation": "

The Auto-Tune action severity. Valid values are LOW, MEDIUM, and HIGH.

", + "smithy.api#enum": [ + { + "value": "LOW", + "name": "LOW" + }, + { + "value": "MEDIUM", + "name": "MEDIUM" + }, + { + "value": "HIGH", + "name": "HIGH" + } + ] + } + }, + "com.amazonaws.opensearch#ServiceSoftwareOptions": { + "type": "structure", + "members": { + "CurrentVersion": { + "target": "com.amazonaws.opensearch#String", + "traits": { + "smithy.api#documentation": "

The current service software version present on the domain.

" + } + }, + "NewVersion": { + "target": "com.amazonaws.opensearch#String", + "traits": { + "smithy.api#documentation": "

The new service software version if one is available.

" + } + }, + "UpdateAvailable": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

\n True\n if you're able to update your service software version. False if you can't update your\n service software version.\n

" + } + }, + "Cancellable": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

\n True\n if you're able to cancel your service software version update. False if you can't cancel\n your service software update.\n

" + } + }, + "UpdateStatus": { + "target": "com.amazonaws.opensearch#DeploymentStatus", + "traits": { + "smithy.api#documentation": "

The status of your service software update. This field can take the following values: \n ELIGIBLE, PENDING_UPDATE, IN_PROGRESS, COMPLETED, and \n NOT_ELIGIBLE.\n

" + } + }, + "Description": { + "target": "com.amazonaws.opensearch#String", + "traits": { + "smithy.api#documentation": "

The description of the UpdateStatus.\n

" + } + }, + "AutomatedUpdateDate": { + "target": "com.amazonaws.opensearch#DeploymentCloseDateTimeStamp", + "traits": { + "smithy.api#documentation": "

The timestamp, in Epoch time, until which you can manually request a service software update. After this date, we\n automatically update your service software.\n

" + } + }, + "OptionalDeployment": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

\n True\n if a service software is never automatically updated. False if a service software is automatically\n updated after AutomatedUpdateDate.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The current options of an domain service software options.

" + } + }, + "com.amazonaws.opensearch#ServiceUrl": { + "type": "string", + "traits": { + "smithy.api#documentation": "

The endpoint to which service requests are submitted. For example, \n search-imdb-movies-oopcnjfn6ugofer3zx5iadxxca.eu-west-1.es.amazonaws.com\n or doc-imdb-movies-oopcnjfn6ugofer3zx5iadxxca.eu-west-1.es.amazonaws.com.\n

" + } + }, + "com.amazonaws.opensearch#SnapshotOptions": { + "type": "structure", + "members": { + "AutomatedSnapshotStartHour": { + "target": "com.amazonaws.opensearch#IntegerClass", + "traits": { + "smithy.api#documentation": "

The time, in UTC format, when the service takes a daily automated snapshot of the specified\n domain. Default is 0 hours.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The time, in UTC format, when the service takes a daily automated snapshot of the specified\n domain. Default is 0 hours.\n

" + } + }, + "com.amazonaws.opensearch#SnapshotOptionsStatus": { + "type": "structure", + "members": { + "Options": { + "target": "com.amazonaws.opensearch#SnapshotOptions", + "traits": { + "smithy.api#documentation": "

The daily snapshot options specified for the domain.

", + "smithy.api#required": {} + } + }, + "Status": { + "target": "com.amazonaws.opensearch#OptionStatus", + "traits": { + "smithy.api#documentation": "

The status of a daily automated snapshot.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Status of a daily automated snapshot.

" + } + }, + "com.amazonaws.opensearch#StartAt": { + "type": "timestamp" + }, + "com.amazonaws.opensearch#StartServiceSoftwareUpdate": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#StartServiceSoftwareUpdateRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#StartServiceSoftwareUpdateResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Schedules a service software update for an Amazon OpenSearch Service domain.

", + "smithy.api#http": { + "method": "POST", + "uri": "/2021-01-01/opensearch/serviceSoftwareUpdate/start", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#StartServiceSoftwareUpdateRequest": { + "type": "structure", + "members": { + "DomainName": { + "target": "com.amazonaws.opensearch#DomainName", + "traits": { + "smithy.api#documentation": "

The name of the domain that you want to update to the latest service software.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for the parameters to the\n \n StartServiceSoftwareUpdate\n \n operation. Specifies the name of the domain to schedule a service software update for.\n

" + } + }, + "com.amazonaws.opensearch#StartServiceSoftwareUpdateResponse": { + "type": "structure", + "members": { + "ServiceSoftwareOptions": { + "target": "com.amazonaws.opensearch#ServiceSoftwareOptions", + "traits": { + "smithy.api#documentation": "

The current status of the OpenSearch service software update.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The result of a StartServiceSoftwareUpdate operation. Contains the status of the\n update.\n

" + } + }, + "com.amazonaws.opensearch#StartTimestamp": { + "type": "timestamp" + }, + "com.amazonaws.opensearch#StorageSubTypeName": { + "type": "string", + "traits": { + "smithy.api#documentation": "

\n Sub-type of the given storage type.\n List of available sub-storage options:\n \"instance\" storageType has no storageSubType.\n \"ebs\" storageType has the following valid storageSubTypes:\n

    \n
  1. standard
  2. \n
  3. gp2
  4. \n
  5. io1
  6. \n
\n See\n \n VolumeType\n \n for more information regarding each EBS storage option.\n

" + } + }, + "com.amazonaws.opensearch#StorageType": { + "type": "structure", + "members": { + "StorageTypeName": { + "target": "com.amazonaws.opensearch#StorageTypeName" + }, + "StorageSubTypeName": { + "target": "com.amazonaws.opensearch#StorageSubTypeName" + }, + "StorageTypeLimits": { + "target": "com.amazonaws.opensearch#StorageTypeLimitList", + "traits": { + "smithy.api#documentation": "

Limits that are applicable for the given storage type.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

StorageTypes represents the list of storage-related types and their attributes\n that are available for a given InstanceType.\n

" + } + }, + "com.amazonaws.opensearch#StorageTypeLimit": { + "type": "structure", + "members": { + "LimitName": { + "target": "com.amazonaws.opensearch#LimitName", + "traits": { + "smithy.api#documentation": "

\n Name of storage limits that are applicable for the given storage type.\n If\n \n StorageType\n \n is \"ebs\", the following storage options are applicable:\n

    \n
  1. MinimumVolumeSize
  2. \n Minimum amount of volume size that is applicable for the given storage type. Can be empty if not applicable.\n
  3. MaximumVolumeSize
  4. \n Maximum amount of volume size that is applicable for the given storage type. Can be empty if not applicable.\n
  5. MaximumIops
  6. \n Maximum amount of Iops that is applicable for given the storage type. Can be empty if not applicable.\n
  7. MinimumIops
  8. \n Minimum amount of Iops that is applicable for given the storage type. Can be empty if not applicable.\n
\n

" + } + }, + "LimitValues": { + "target": "com.amazonaws.opensearch#LimitValueList", + "traits": { + "smithy.api#documentation": "

\n Values for the\n \n StorageTypeLimit$LimitName\n \n .\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Limits that are applicable for the given storage type.\n

" + } + }, + "com.amazonaws.opensearch#StorageTypeLimitList": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#StorageTypeLimit" + } + }, + "com.amazonaws.opensearch#StorageTypeList": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#StorageType" + } + }, + "com.amazonaws.opensearch#StorageTypeName": { + "type": "string", + "traits": { + "smithy.api#documentation": "

\n Type of storage.\n List of available storage options:\n

    \n
  1. instance
  2. \n Built-in storage available for the instance\n
  3. ebs
  4. \n Elastic block storage attached to the instance\n
\n

" + } + }, + "com.amazonaws.opensearch#String": { + "type": "string" + }, + "com.amazonaws.opensearch#StringList": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#String" + } + }, + "com.amazonaws.opensearch#TLSSecurityPolicy": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "Policy-Min-TLS-1-0-2019-07", + "name": "POLICY_MIN_TLS_1_0_2019_07" + }, + { + "value": "Policy-Min-TLS-1-2-2019-07", + "name": "POLICY_MIN_TLS_1_2_2019_07" + } + ] + } + }, + "com.amazonaws.opensearch#Tag": { + "type": "structure", + "members": { + "Key": { + "target": "com.amazonaws.opensearch#TagKey", + "traits": { + "smithy.api#documentation": "

The TagKey, the name of the tag. Tag keys must be unique for the domain to\n which they are attached.\n

", + "smithy.api#required": {} + } + }, + "Value": { + "target": "com.amazonaws.opensearch#TagValue", + "traits": { + "smithy.api#documentation": "

The TagValue, the value assigned to the corresponding tag key. Tag values can be null and\n don't have to be unique in a tag set. For example, you can have a key value\n pair in a tag set of project : Trinity and\n cost-center : Trinity\n

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

A key value pair for a resource tag.

" + } + }, + "com.amazonaws.opensearch#TagKey": { + "type": "string", + "traits": { + "smithy.api#documentation": "

A string of length from 1 to 128 characters that specifies the key for a tag. Tag keys must be unique for the\n domain to which they're attached.\n

", + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": ".*" + } + }, + "com.amazonaws.opensearch#TagList": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#Tag" + }, + "traits": { + "smithy.api#documentation": "

A list of\n Tag.\n

" + } + }, + "com.amazonaws.opensearch#TagValue": { + "type": "string", + "traits": { + "smithy.api#documentation": "

A string of length from 0 to 256 characters that specifies the value for a tag. Tag values can be null and don't\n have to be unique in a tag set.\n

", + "smithy.api#length": { + "min": 0, + "max": 256 + }, + "smithy.api#pattern": ".*" + } + }, + "com.amazonaws.opensearch#TimeUnit": { + "type": "string", + "traits": { + "smithy.api#documentation": "

The unit of a maintenance schedule duration. Valid value is HOUR. See \n Auto-Tune for Amazon OpenSearch Service\n for more information.\n

", + "smithy.api#enum": [ + { + "value": "HOURS", + "name": "HOURS" + } + ] + } + }, + "com.amazonaws.opensearch#UIntValue": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 0 + } + } + }, + "com.amazonaws.opensearch#UpdateDomainConfig": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#UpdateDomainConfigRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#UpdateDomainConfigResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#InvalidTypeException" + }, + { + "target": "com.amazonaws.opensearch#LimitExceededException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Modifies the cluster configuration of the specified domain, such as setting the instance type\n and the number of instances.\n

", + "smithy.api#http": { + "method": "POST", + "uri": "/2021-01-01/opensearch/domain/{DomainName}/config", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#UpdateDomainConfigRequest": { + "type": "structure", + "members": { + "DomainName": { + "target": "com.amazonaws.opensearch#DomainName", + "traits": { + "smithy.api#documentation": "

The name of the domain you're updating.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "ClusterConfig": { + "target": "com.amazonaws.opensearch#ClusterConfig", + "traits": { + "smithy.api#documentation": "

The type and number of instances to instantiate for the domain cluster.

" + } + }, + "EBSOptions": { + "target": "com.amazonaws.opensearch#EBSOptions", + "traits": { + "smithy.api#documentation": "

Specify the type and size of the EBS volume to use.

" + } + }, + "SnapshotOptions": { + "target": "com.amazonaws.opensearch#SnapshotOptions", + "traits": { + "smithy.api#documentation": "

Option to set the time, in UTC format, for the daily automated snapshot. Default value is 0 hours.\n

" + } + }, + "VPCOptions": { + "target": "com.amazonaws.opensearch#VPCOptions", + "traits": { + "smithy.api#documentation": "

Options to specify the subnets and security groups for the VPC endpoint. For more information, see Launching your Amazon OpenSearch Service domains using a VPC\n .\n

" + } + }, + "CognitoOptions": { + "target": "com.amazonaws.opensearch#CognitoOptions", + "traits": { + "smithy.api#documentation": "

Options to specify the Cognito user and identity pools for OpenSearch Dashboards authentication. For more information, see Configuring Amazon Cognito authentication for OpenSearch Dashboards.\n

" + } + }, + "AdvancedOptions": { + "target": "com.amazonaws.opensearch#AdvancedOptions", + "traits": { + "smithy.api#documentation": "

Modifies the advanced option to allow references to indices in an HTTP request body. Must be false when\n configuring access to individual sub-resources. By default, the value is true.\n See Advanced options\n for more information.\n

" + } + }, + "AccessPolicies": { + "target": "com.amazonaws.opensearch#PolicyDocument", + "traits": { + "smithy.api#documentation": "

IAM access policy as a JSON-formatted string.

" + } + }, + "LogPublishingOptions": { + "target": "com.amazonaws.opensearch#LogPublishingOptions", + "traits": { + "smithy.api#documentation": "

Map of LogType and LogPublishingOption, each containing options to publish a given type\n of OpenSearch log.\n

" + } + }, + "EncryptionAtRestOptions": { + "target": "com.amazonaws.opensearch#EncryptionAtRestOptions", + "traits": { + "smithy.api#documentation": "

Specifies encryption of data at rest options.

" + } + }, + "DomainEndpointOptions": { + "target": "com.amazonaws.opensearch#DomainEndpointOptions", + "traits": { + "smithy.api#documentation": "

Options to specify configuration that will be applied to the domain endpoint.

" + } + }, + "NodeToNodeEncryptionOptions": { + "target": "com.amazonaws.opensearch#NodeToNodeEncryptionOptions", + "traits": { + "smithy.api#documentation": "

Specifies node-to-node encryption options.

" + } + }, + "AdvancedSecurityOptions": { + "target": "com.amazonaws.opensearch#AdvancedSecurityOptionsInput", + "traits": { + "smithy.api#documentation": "

Specifies advanced security options.

" + } + }, + "AutoTuneOptions": { + "target": "com.amazonaws.opensearch#AutoTuneOptions", + "traits": { + "smithy.api#documentation": "

Specifies Auto-Tune options.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Container for the parameters to the\n \n UpdateDomain\n \n operation. Specifies the type and number of instances in the domain cluster.\n

" + } + }, + "com.amazonaws.opensearch#UpdateDomainConfigResponse": { + "type": "structure", + "members": { + "DomainConfig": { + "target": "com.amazonaws.opensearch#DomainConfig", + "traits": { + "smithy.api#documentation": "

The status of the updated domain.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The result of an UpdateDomain request. Contains the status of the domain\n being updated.\n

" + } + }, + "com.amazonaws.opensearch#UpdatePackage": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#UpdatePackageRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#UpdatePackageResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#AccessDeniedException" + }, + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#LimitExceededException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Updates a package for use with Amazon OpenSearch Service domains.

", + "smithy.api#http": { + "method": "POST", + "uri": "/2021-01-01/packages/update", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#UpdatePackageRequest": { + "type": "structure", + "members": { + "PackageID": { + "target": "com.amazonaws.opensearch#PackageID", + "traits": { + "smithy.api#documentation": "

The unique identifier for the package.

", + "smithy.api#required": {} + } + }, + "PackageSource": { + "target": "com.amazonaws.opensearch#PackageSource", + "traits": { + "smithy.api#required": {} + } + }, + "PackageDescription": { + "target": "com.amazonaws.opensearch#PackageDescription", + "traits": { + "smithy.api#documentation": "

A new description of the package.

" + } + }, + "CommitMessage": { + "target": "com.amazonaws.opensearch#CommitMessage", + "traits": { + "smithy.api#documentation": "

A commit message for the new version which is shown as part of GetPackageVersionHistoryResponse.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for request parameters to the\n \n UpdatePackage\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#UpdatePackageResponse": { + "type": "structure", + "members": { + "PackageDetails": { + "target": "com.amazonaws.opensearch#PackageDetails", + "traits": { + "smithy.api#documentation": "

Information about the package.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for the response returned by the\n \n UpdatePackage\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#UpdateTimestamp": { + "type": "timestamp" + }, + "com.amazonaws.opensearch#UpgradeDomain": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearch#UpgradeDomainRequest" + }, + "output": { + "target": "com.amazonaws.opensearch#UpgradeDomainResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearch#BaseException" + }, + { + "target": "com.amazonaws.opensearch#DisabledOperationException" + }, + { + "target": "com.amazonaws.opensearch#InternalException" + }, + { + "target": "com.amazonaws.opensearch#ResourceAlreadyExistsException" + }, + { + "target": "com.amazonaws.opensearch#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearch#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Allows you to either upgrade your domain or perform an upgrade eligibility check to a compatible version of OpenSearch or Elasticsearch.\n

", + "smithy.api#http": { + "method": "POST", + "uri": "/2021-01-01/opensearch/upgradeDomain", + "code": 200 + } + } + }, + "com.amazonaws.opensearch#UpgradeDomainRequest": { + "type": "structure", + "members": { + "DomainName": { + "target": "com.amazonaws.opensearch#DomainName", + "traits": { + "smithy.api#required": {} + } + }, + "TargetVersion": { + "target": "com.amazonaws.opensearch#VersionString", + "traits": { + "smithy.api#documentation": "

The version of OpenSearch you intend to upgrade the domain to.

", + "smithy.api#required": {} + } + }, + "PerformCheckOnly": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

\n When true, indicates that an upgrade eligibility check needs to be performed.\n Does not actually perform the upgrade.\n

" + } + }, + "AdvancedOptions": { + "target": "com.amazonaws.opensearch#AdvancedOptions" + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for the request parameters to\n \n UpgradeDomain\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#UpgradeDomainResponse": { + "type": "structure", + "members": { + "UpgradeId": { + "target": "com.amazonaws.opensearch#String" + }, + "DomainName": { + "target": "com.amazonaws.opensearch#DomainName" + }, + "TargetVersion": { + "target": "com.amazonaws.opensearch#VersionString", + "traits": { + "smithy.api#documentation": "

The version of OpenSearch that you intend to upgrade the domain to.

" + } + }, + "PerformCheckOnly": { + "target": "com.amazonaws.opensearch#Boolean", + "traits": { + "smithy.api#documentation": "

\n When true, indicates that an upgrade eligibility check needs to be performed.\n Does not actually perform the upgrade.\n

" + } + }, + "AdvancedOptions": { + "target": "com.amazonaws.opensearch#AdvancedOptions" + } + }, + "traits": { + "smithy.api#documentation": "

\n Container for response returned by\n \n UpgradeDomain\n \n operation.\n

" + } + }, + "com.amazonaws.opensearch#UpgradeHistory": { + "type": "structure", + "members": { + "UpgradeName": { + "target": "com.amazonaws.opensearch#UpgradeName", + "traits": { + "smithy.api#documentation": "

A string that briefly describes the upgrade.

" + } + }, + "StartTimestamp": { + "target": "com.amazonaws.opensearch#StartTimestamp", + "traits": { + "smithy.api#documentation": "

UTC timestamp at which the upgrade API call was made in \"yyyy-MM-ddTHH:mm:ssZ\" format.

" + } + }, + "UpgradeStatus": { + "target": "com.amazonaws.opensearch#UpgradeStatus", + "traits": { + "smithy.api#documentation": "

\n The current status of the upgrade. The status can take one of the following values:\n

\n

" + } + }, + "StepsList": { + "target": "com.amazonaws.opensearch#UpgradeStepsList", + "traits": { + "smithy.api#documentation": "

\n A list of\n \n UpgradeStepItem\n \n s representing information about each step performed as part of a specific upgrade or upgrade eligibility check.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

History of the last 10 upgrades and upgrade eligibility checks.

" + } + }, + "com.amazonaws.opensearch#UpgradeHistoryList": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#UpgradeHistory" + } + }, + "com.amazonaws.opensearch#UpgradeName": { + "type": "string" + }, + "com.amazonaws.opensearch#UpgradeStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "IN_PROGRESS", + "name": "IN_PROGRESS" + }, + { + "value": "SUCCEEDED", + "name": "SUCCEEDED" + }, + { + "value": "SUCCEEDED_WITH_ISSUES", + "name": "SUCCEEDED_WITH_ISSUES" + }, + { + "value": "FAILED", + "name": "FAILED" + } + ] + } + }, + "com.amazonaws.opensearch#UpgradeStep": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "PRE_UPGRADE_CHECK", + "name": "PRE_UPGRADE_CHECK" + }, + { + "value": "SNAPSHOT", + "name": "SNAPSHOT" + }, + { + "value": "UPGRADE", + "name": "UPGRADE" + } + ] + } + }, + "com.amazonaws.opensearch#UpgradeStepItem": { + "type": "structure", + "members": { + "UpgradeStep": { + "target": "com.amazonaws.opensearch#UpgradeStep", + "traits": { + "smithy.api#documentation": "

\n One of three steps an upgrade or upgrade eligibility check goes through:\n

\n

" + } + }, + "UpgradeStepStatus": { + "target": "com.amazonaws.opensearch#UpgradeStatus", + "traits": { + "smithy.api#documentation": "

\n The current status of the upgrade. The status can take one of the following values:\n

\n

" + } + }, + "Issues": { + "target": "com.amazonaws.opensearch#Issues", + "traits": { + "smithy.api#documentation": "

A list of strings containing detailed information about the errors encountered in a particular step.

" + } + }, + "ProgressPercent": { + "target": "com.amazonaws.opensearch#Double", + "traits": { + "smithy.api#documentation": "

The floating point value representing the progress percentage of a particular step.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Represents a single step of the upgrade or upgrade eligibility check workflow.

" + } + }, + "com.amazonaws.opensearch#UpgradeStepsList": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#UpgradeStepItem" + } + }, + "com.amazonaws.opensearch#UserPoolId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 55 + }, + "smithy.api#pattern": "^[\\w-]+_[0-9a-zA-Z]+$" + } + }, + "com.amazonaws.opensearch#Username": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + }, + "smithy.api#pattern": ".*", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.opensearch#VPCDerivedInfo": { + "type": "structure", + "members": { + "VPCId": { + "target": "com.amazonaws.opensearch#String", + "traits": { + "smithy.api#documentation": "

The VPC ID for the domain. Exists only if the domain was created with VPCOptions.

" + } + }, + "SubnetIds": { + "target": "com.amazonaws.opensearch#StringList", + "traits": { + "smithy.api#documentation": "

The subnets for the VPC endpoint.

" + } + }, + "AvailabilityZones": { + "target": "com.amazonaws.opensearch#StringList", + "traits": { + "smithy.api#documentation": "

The Availability Zones for the domain. Exists only if the domain was created with VPCOptions.

" + } + }, + "SecurityGroupIds": { + "target": "com.amazonaws.opensearch#StringList", + "traits": { + "smithy.api#documentation": "

The security groups for the VPC endpoint.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Options to specify the subnets and security groups for the VPC endpoint. For more information, see \n Launching your Amazon OpenSearch Service domains using a VPC.\n

" + } + }, + "com.amazonaws.opensearch#VPCDerivedInfoStatus": { + "type": "structure", + "members": { + "Options": { + "target": "com.amazonaws.opensearch#VPCDerivedInfo", + "traits": { + "smithy.api#documentation": "

The VPC options for the specified domain.

", + "smithy.api#required": {} + } + }, + "Status": { + "target": "com.amazonaws.opensearch#OptionStatus", + "traits": { + "smithy.api#documentation": "

The status of the VPC options for the specified domain.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Status of the VPC options for the specified domain.

" + } + }, + "com.amazonaws.opensearch#VPCOptions": { + "type": "structure", + "members": { + "SubnetIds": { + "target": "com.amazonaws.opensearch#StringList", + "traits": { + "smithy.api#documentation": "

The subnets for the VPC endpoint.

" + } + }, + "SecurityGroupIds": { + "target": "com.amazonaws.opensearch#StringList", + "traits": { + "smithy.api#documentation": "

The security groups for the VPC endpoint.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Options to specify the subnets and security groups for the VPC endpoint. For more information, see \n Launching your Amazon OpenSearch Service domains using a VPC.\n

" + } + }, + "com.amazonaws.opensearch#ValidationException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.opensearch#ErrorMessage", + "traits": { + "smithy.api#documentation": "

A description of the error.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

An exception for missing / invalid input fields. Gives http status code of 400.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.opensearch#ValueStringList": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#NonEmptyString" + }, + "traits": { + "smithy.api#length": { + "min": 1 + } + } + }, + "com.amazonaws.opensearch#VersionList": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearch#VersionString" + }, + "traits": { + "smithy.api#documentation": "

List of supported OpenSearch versions.\n

" + } + }, + "com.amazonaws.opensearch#VersionStatus": { + "type": "structure", + "members": { + "Options": { + "target": "com.amazonaws.opensearch#VersionString", + "traits": { + "smithy.api#documentation": "

The OpenSearch version for the specified OpenSearch domain.

", + "smithy.api#required": {} + } + }, + "Status": { + "target": "com.amazonaws.opensearch#OptionStatus", + "traits": { + "smithy.api#documentation": "

The status of the OpenSearch version options for the specified OpenSearch domain.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

The status of the OpenSearch version options for the specified OpenSearch domain.

" + } + }, + "com.amazonaws.opensearch#VersionString": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 14, + "max": 18 + }, + "smithy.api#pattern": "^Elasticsearch_[0-9]{1}\\.[0-9]{1,2}$|^OpenSearch_[0-9]{1,2}\\.[0-9]{1,2}$" + } + }, + "com.amazonaws.opensearch#VolumeType": { + "type": "string", + "traits": { + "smithy.api#documentation": "

The type of EBS volume, standard, gp2, or io1. See Configuring EBS-based Storage for more information.\n

", + "smithy.api#enum": [ + { + "value": "standard", + "name": "standard" + }, + { + "value": "gp2", + "name": "gp2" + }, + { + "value": "io1", + "name": "io1" + } + ] + } + }, + "com.amazonaws.opensearch#ZoneAwarenessConfig": { + "type": "structure", + "members": { + "AvailabilityZoneCount": { + "target": "com.amazonaws.opensearch#IntegerClass", + "traits": { + "smithy.api#documentation": "

An integer value to indicate the number of availability zones for a domain when zone awareness is enabled. This\n should be equal to number of subnets if VPC endpoints is enabled.\n

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The zone awareness configuration for the domain cluster, such as the number of availability zones.

" + } + } + } +} diff --git a/codegen/sdk-codegen/aws-models/outposts.2019-12-03.json b/codegen/sdk-codegen/aws-models/outposts.2019-12-03.json index 760a367e579..c6fc7f5066c 100644 --- a/codegen/sdk-codegen/aws-models/outposts.2019-12-03.json +++ b/codegen/sdk-codegen/aws-models/outposts.2019-12-03.json @@ -134,6 +134,86 @@ "smithy.api#httpError": 409 } }, + "com.amazonaws.outposts#CreateOrder": { + "type": "operation", + "input": { + "target": "com.amazonaws.outposts#CreateOrderInput" + }, + "output": { + "target": "com.amazonaws.outposts#CreateOrderOutput" + }, + "errors": [ + { + "target": "com.amazonaws.outposts#AccessDeniedException" + }, + { + "target": "com.amazonaws.outposts#ConflictException" + }, + { + "target": "com.amazonaws.outposts#InternalServerException" + }, + { + "target": "com.amazonaws.outposts#NotFoundException" + }, + { + "target": "com.amazonaws.outposts#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.outposts#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates an order for an Outpost.

", + "smithy.api#http": { + "method": "POST", + "uri": "/orders", + "code": 200 + } + } + }, + "com.amazonaws.outposts#CreateOrderInput": { + "type": "structure", + "members": { + "OutpostIdentifier": { + "target": "com.amazonaws.outposts#OutpostIdentifier", + "traits": { + "smithy.api#documentation": "

\n The ID or the Amazon Resource Name (ARN) of the Outpost.\n

", + "smithy.api#required": {} + } + }, + "LineItems": { + "target": "com.amazonaws.outposts#LineItemRequestListDefinition", + "traits": { + "smithy.api#documentation": "

The line items that make up the order.

", + "smithy.api#required": {} + } + }, + "PaymentOption": { + "target": "com.amazonaws.outposts#PaymentOption", + "traits": { + "smithy.api#documentation": "

The payment option for the order.

", + "smithy.api#required": {} + } + }, + "PaymentTerm": { + "target": "com.amazonaws.outposts#PaymentTerm", + "traits": { + "smithy.api#documentation": "

The payment terms for the order.

" + } + } + } + }, + "com.amazonaws.outposts#CreateOrderOutput": { + "type": "structure", + "members": { + "Order": { + "target": "com.amazonaws.outposts#Order", + "traits": { + "smithy.api#documentation": "

Information about this order.

" + } + } + } + }, "com.amazonaws.outposts#CreateOutpost": { "type": "operation", "input": { @@ -251,6 +331,7 @@ "OutpostId": { "target": "com.amazonaws.outposts#OutpostId", "traits": { + "smithy.api#documentation": "

\n The ID of the Outpost.\n

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -358,6 +439,7 @@ "OutpostId": { "target": "com.amazonaws.outposts#OutpostId", "traits": { + "smithy.api#documentation": "

\n The ID of the Outpost.\n

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -401,6 +483,7 @@ "OutpostId": { "target": "com.amazonaws.outposts#OutpostId", "traits": { + "smithy.api#documentation": "

\n The ID of the Outpost.\n

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } @@ -429,7 +512,10 @@ "target": "com.amazonaws.outposts#Token" }, "OutpostId": { - "target": "com.amazonaws.outposts#OutpostId" + "target": "com.amazonaws.outposts#OutpostId", + "traits": { + "smithy.api#documentation": "

\n The ID of the Outpost.\n

" + } }, "OutpostArn": { "target": "com.amazonaws.outposts#OutpostArn" @@ -444,6 +530,9 @@ } } }, + "com.amazonaws.outposts#ISO8601Timestamp": { + "type": "timestamp" + }, "com.amazonaws.outposts#InstanceType": { "type": "string", "traits": { @@ -506,6 +595,91 @@ } } }, + "com.amazonaws.outposts#LineItem": { + "type": "structure", + "members": { + "CatalogItemId": { + "target": "com.amazonaws.outposts#SkuCode", + "traits": { + "smithy.api#documentation": "

\n The ID of the catalog item.\n

" + } + }, + "LineItemId": { + "target": "com.amazonaws.outposts#LineItemId", + "traits": { + "smithy.api#documentation": "

The ID of the line item.

" + } + }, + "Quantity": { + "target": "com.amazonaws.outposts#LineItemQuantity", + "traits": { + "smithy.api#documentation": "

The quantity of the line item.

" + } + }, + "Status": { + "target": "com.amazonaws.outposts#Status", + "traits": { + "smithy.api#documentation": "

The status of the line item.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Information about a line item.

" + } + }, + "com.amazonaws.outposts#LineItemId": { + "type": "string", + "traits": { + "smithy.api#pattern": "^ooi-[a-f0-9]{17}$" + } + }, + "com.amazonaws.outposts#LineItemListDefinition": { + "type": "list", + "member": { + "target": "com.amazonaws.outposts#LineItem" + } + }, + "com.amazonaws.outposts#LineItemQuantity": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 20 + } + } + }, + "com.amazonaws.outposts#LineItemRequest": { + "type": "structure", + "members": { + "CatalogItemId": { + "target": "com.amazonaws.outposts#SkuCode", + "traits": { + "smithy.api#documentation": "

The ID of the catalog item.

" + } + }, + "Quantity": { + "target": "com.amazonaws.outposts#LineItemQuantity", + "traits": { + "smithy.api#documentation": "

The quantity of a line item request.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Information about a line item request.

" + } + }, + "com.amazonaws.outposts#LineItemRequestListDefinition": { + "type": "list", + "member": { + "target": "com.amazonaws.outposts#LineItemRequest" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 20 + } + } + }, "com.amazonaws.outposts#ListOutposts": { "type": "operation", "input": { @@ -725,11 +899,105 @@ "smithy.api#httpError": 404 } }, + "com.amazonaws.outposts#Order": { + "type": "structure", + "members": { + "OutpostId": { + "target": "com.amazonaws.outposts#OutpostIdOnly", + "traits": { + "smithy.api#documentation": "

\n The ID of the Outpost.\n

" + } + }, + "OrderId": { + "target": "com.amazonaws.outposts#OrderId", + "traits": { + "smithy.api#documentation": "

The ID of the order.

" + } + }, + "Status": { + "target": "com.amazonaws.outposts#OrderStatus", + "traits": { + "smithy.api#documentation": "

The status of the order

" + } + }, + "LineItems": { + "target": "com.amazonaws.outposts#LineItemListDefinition", + "traits": { + "smithy.api#documentation": "

The line items for the order

" + } + }, + "PaymentOption": { + "target": "com.amazonaws.outposts#PaymentOption", + "traits": { + "smithy.api#documentation": "

The payment option for the order.

" + } + }, + "OrderSubmissionDate": { + "target": "com.amazonaws.outposts#ISO8601Timestamp", + "traits": { + "smithy.api#documentation": "

The submission date for the order.

" + } + }, + "OrderFulfilledDate": { + "target": "com.amazonaws.outposts#ISO8601Timestamp", + "traits": { + "smithy.api#documentation": "

The fulfillment date of the order.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Information about an order.

" + } + }, + "com.amazonaws.outposts#OrderId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 20 + }, + "smithy.api#pattern": "^oo-[a-f0-9]{17}$" + } + }, + "com.amazonaws.outposts#OrderStatus": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "RECEIVED", + "name": "RECEIVED" + }, + { + "value": "PENDING", + "name": "PENDING" + }, + { + "value": "PROCESSING", + "name": "PROCESSING" + }, + { + "value": "INSTALLING", + "name": "INSTALLING" + }, + { + "value": "FULFILLED", + "name": "FULFILLED" + }, + { + "value": "CANCELLED", + "name": "CANCELLED" + } + ] + } + }, "com.amazonaws.outposts#Outpost": { "type": "structure", "members": { "OutpostId": { - "target": "com.amazonaws.outposts#OutpostId" + "target": "com.amazonaws.outposts#OutpostId", + "traits": { + "smithy.api#documentation": "

\n The ID of the Outpost.\n

" + } }, "OwnerId": { "target": "com.amazonaws.outposts#OwnerId" @@ -794,7 +1062,26 @@ "com.amazonaws.outposts#OutpostId": { "type": "string", "traits": { - "smithy.api#documentation": "

The ID of the Outpost.

", + "smithy.api#length": { + "min": 1, + "max": 180 + }, + "smithy.api#pattern": "^(arn:aws([a-z-]+)?:outposts:[a-z\\d-]+:\\d{12}:outpost/)?op-[a-f0-9]{17}$" + } + }, + "com.amazonaws.outposts#OutpostIdOnly": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 20 + }, + "smithy.api#pattern": "^op-[a-f0-9]{17}$" + } + }, + "com.amazonaws.outposts#OutpostIdentifier": { + "type": "string", + "traits": { "smithy.api#length": { "min": 1, "max": 180 @@ -817,6 +1104,9 @@ "type": "service", "version": "2019-12-03", "operations": [ + { + "target": "com.amazonaws.outposts#CreateOrder" + }, { "target": "com.amazonaws.outposts#CreateOutpost" }, @@ -875,6 +1165,36 @@ "smithy.api#pattern": "^\\d{12}$" } }, + "com.amazonaws.outposts#PaymentOption": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "ALL_UPFRONT", + "name": "ALL_UPFRONT" + }, + { + "value": "NO_UPFRONT", + "name": "NO_UPFRONT" + }, + { + "value": "PARTIAL_UPFRONT", + "name": "PARTIAL_UPFRONT" + } + ] + } + }, + "com.amazonaws.outposts#PaymentTerm": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "THREE_YEARS", + "name": "THREE_YEARS" + } + ] + } + }, "com.amazonaws.outposts#ResourceType": { "type": "string", "traits": { @@ -972,6 +1292,26 @@ "smithy.api#pattern": "^[\\S ]+$" } }, + "com.amazonaws.outposts#SkuCode": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + }, + "smithy.api#pattern": "^OR-[A-Z0-9]{7}$" + } + }, + "com.amazonaws.outposts#Status": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1000 + }, + "smithy.api#pattern": "^[\\S ]+$" + } + }, "com.amazonaws.outposts#String": { "type": "string", "traits": { diff --git a/codegen/sdk-codegen/aws-models/ram.2018-01-04.json b/codegen/sdk-codegen/aws-models/ram.2018-01-04.json index 80377c34c85..e1909d82ad4 100644 --- a/codegen/sdk-codegen/aws-models/ram.2018-01-04.json +++ b/codegen/sdk-codegen/aws-models/ram.2018-01-04.json @@ -70,7 +70,7 @@ } ], "traits": { - "smithy.api#documentation": "

Accepts an invitation to a resource share from another AWS account.

", + "smithy.api#documentation": "

Accepts an invitation to a resource share from another Amazon Web Services account.

", "smithy.api#http": { "method": "POST", "uri": "/acceptresourceshareinvitation", @@ -202,7 +202,7 @@ "name": "ram" }, "aws.protocols#restJson1": {}, - "smithy.api#documentation": "

Use AWS Resource Access Manager to share AWS resources between AWS accounts. To share a resource, you\n create a resource share, associate the resource with the resource share, and specify the principals that\n can access the resources associated with the resource share. The following principals are supported:\n AWS accounts, organizational units (OU) from AWS Organizations, and organizations from\n AWS Organizations.

\n

For more information, see the AWS Resource Access Manager User Guide.

", + "smithy.api#documentation": "

This is the Resource Access Manager API Reference. This documentation provides\n descriptions and syntax for each of the actions and data types in RAM. RAM is a\n service that helps you securely share your Amazon Web Services resources across Amazon Web Services accounts and\n within your organization or organizational units (OUs) in Organizations. For supported\n resource types, you can also share resources with IAM roles and IAM users. If you have\n multiple Amazon Web Services accounts, you can use RAM to share those resources with other\n accounts.

\n\n

To learn more about RAM, see the following resources:

\n\n ", "smithy.api#title": "AWS Resource Access Manager" } }, @@ -308,14 +308,14 @@ "permissionArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the AWS RAM permissions to associate with the resource share.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the RAM permission to associate with the\n resource share.

", "smithy.api#required": {} } }, "replace": { "target": "com.amazonaws.ram#Boolean", "traits": { - "smithy.api#documentation": "

Indicates whether the permission should replace the permissions that are currently \n \tassociated with the resource share. Use true to replace the current permissions. \n \tUse false to add the permission to the current permission.

" + "smithy.api#documentation": "

Indicates whether the permission should replace the permissions that are currently\n associated with the resource share. Use true to replace the current permissions. Use\n false to add the permission to the current permission.

" } }, "clientToken": { @@ -327,7 +327,7 @@ "permissionVersion": { "target": "com.amazonaws.ram#Integer", "traits": { - "smithy.api#documentation": "

The version of the AWS RAM permissions to associate with the resource share.

" + "smithy.api#documentation": "

The version of the RAM permissions to associate with the resource share.

" } } } @@ -362,13 +362,13 @@ "resourceArns": { "target": "com.amazonaws.ram#ResourceArnList", "traits": { - "smithy.api#documentation": "

The Amazon Resource Names (ARN) of the resources.

" + "smithy.api#documentation": "

The Amazon Resource Names (ARNs) of the resources.

" } }, "principals": { "target": "com.amazonaws.ram#PrincipalArnOrIdList", "traits": { - "smithy.api#documentation": "

The principals to associate with the resource share. The possible values are IDs of \n \tAWS accounts, and the ARNs of organizational units (OU) or organizations from AWS \n \tOrganizations.

" + "smithy.api#documentation": "

The principals to associate with the resource share. The possible values are:

\n \n \n

Not all resource types can be shared with IAM roles and IAM users. For more\n information, see Sharing with IAM roles and IAM users in the Resource Access Manager User\n Guide.

\n
" } }, "clientToken": { @@ -446,7 +446,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a resource share.

", + "smithy.api#documentation": "

Creates a resource share. You must provide a list of the Amazon Resource Names (ARNs) for the\n resources you want to share. You must also specify who you want to share the resources\n with, and the permissions that you grant them.

\n \n

Sharing a resource makes it available for use by principals outside of the\n Amazon Web Services account that created the resource. Sharing doesn't change any permissions or\n quotas that apply to the resource in the account that created it.

\n
", "smithy.api#http": { "method": "POST", "uri": "/createresourceshare", @@ -467,13 +467,13 @@ "resourceArns": { "target": "com.amazonaws.ram#ResourceArnList", "traits": { - "smithy.api#documentation": "

The Amazon Resource Names (ARN) of the resources to associate with the resource share.

" + "smithy.api#documentation": "

The ARNs of the resources to associate with the resource share.

" } }, "principals": { "target": "com.amazonaws.ram#PrincipalArnOrIdList", "traits": { - "smithy.api#documentation": "

The principals to associate with the resource share. The possible values are IDs of AWS accounts,\n the ARN of an OU or organization from AWS Organizations.

" + "smithy.api#documentation": "

The principals to associate with the resource share. The possible values are:

\n \n \n

Not all resource types can be shared with IAM roles and IAM users. For more\n information, see Sharing with IAM roles and IAM users in the Resource Access Manager User\n Guide.

\n
" } }, "tags": { @@ -485,7 +485,7 @@ "allowExternalPrincipals": { "target": "com.amazonaws.ram#Boolean", "traits": { - "smithy.api#documentation": "

Indicates whether principals outside your AWS organization can be associated with a resource share.

" + "smithy.api#documentation": "

Indicates whether principals outside your organization in Organizations can be associated\n with a resource share.

" } }, "clientToken": { @@ -497,7 +497,7 @@ "permissionArns": { "target": "com.amazonaws.ram#PermissionArnList", "traits": { - "smithy.api#documentation": "

The ARNs of the permissions to associate with the resource share. If you do not specify an ARN\n\t\t\tfor the permission, AWS RAM automatically attaches the default version of the permission\n\t\t\tfor each resource type.

" + "smithy.api#documentation": "

The Amazon Resource Names (ARNs) of the permissions to associate with the resource share. If you\n do not specify an ARN for the permission, RAM automatically attaches the default\n version of the permission for each resource type. Only one permission can be associated\n with each resource type in a resource share.

" } } } @@ -690,7 +690,7 @@ } ], "traits": { - "smithy.api#documentation": "

Disassociates an AWS RAM permission from a resource share.

", + "smithy.api#documentation": "

Disassociates an RAM permission from a resource share.

", "smithy.api#http": { "method": "POST", "uri": "/disassociateresourcesharepermission", @@ -711,7 +711,7 @@ "permissionArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The ARN of the permission to disassociate from the resource share.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the permission to disassociate from the resource share.

", "smithy.api#required": {} } }, @@ -807,7 +807,7 @@ } ], "traits": { - "smithy.api#documentation": "

Enables resource sharing within your AWS Organization.

\n

The caller must be the master account for the AWS Organization.

", + "smithy.api#documentation": "

Enables resource sharing within your organization in Organizations.

\n

The caller must be the master account for the organization.

", "smithy.api#http": { "method": "POST", "uri": "/enablesharingwithawsorganization", @@ -860,7 +860,7 @@ } ], "traits": { - "smithy.api#documentation": "

Gets the contents of an AWS RAM permission in JSON format.

", + "smithy.api#documentation": "

Gets the contents of an RAM permission in JSON format.

", "smithy.api#http": { "method": "POST", "uri": "/getpermission", @@ -874,7 +874,7 @@ "permissionArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The ARN of the permission.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the permission.

", "smithy.api#required": {} } }, @@ -945,7 +945,7 @@ "resourceArns": { "target": "com.amazonaws.ram#ResourceArnList", "traits": { - "smithy.api#documentation": "

The Amazon Resource Names (ARN) of the resources.

", + "smithy.api#documentation": "

The Amazon Resource Names (ARNs) of the resources.

", "smithy.api#required": {} } }, @@ -1037,7 +1037,7 @@ "associationType": { "target": "com.amazonaws.ram#ResourceShareAssociationType", "traits": { - "smithy.api#documentation": "

The association type. Specify PRINCIPAL to list the principals that are \n \t\tassociated with the specified resource share. Specify RESOURCE to list \n \t\tthe resources that are associated with the specified resource share.

", + "smithy.api#documentation": "

The association type. Specify PRINCIPAL to list the principals that are\n associated with the specified resource share. Specify RESOURCE to list the resources\n that are associated with the specified resource share.

", "smithy.api#required": {} } }, @@ -1050,13 +1050,13 @@ "resourceArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource. You cannot specify this parameter if the \n \tassociation type is PRINCIPAL.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource. You cannot specify this parameter if\n the association type is PRINCIPAL.

" } }, "principal": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The principal. You cannot specify this parameter if the association type is \n \tRESOURCE.

" + "smithy.api#documentation": "

The principal. You cannot specify this parameter if the association type is\n RESOURCE.

" } }, "associationStatus": { @@ -1238,7 +1238,7 @@ "resourceShareArns": { "target": "com.amazonaws.ram#ResourceShareArnList", "traits": { - "smithy.api#documentation": "

The ARNs of the resource shares.

" + "smithy.api#documentation": "

The Amazon Resource Names (ARNs) of the resource shares.

" } }, "resourceShareStatus": { @@ -1281,7 +1281,7 @@ "permissionArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the AWS RAM permission that is associated with the resource share.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the RAM permission that is associated with the\n resource share.

" } } } @@ -1314,7 +1314,11 @@ } }, "traits": { - "smithy.api#documentation": "

A client token input parameter was reused with an operation, but at least one of\n the other input parameters is different from the previous call to the operation.

", + "aws.protocols#awsQueryError": { + "code": "IdempotentParameterMismatch", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

A client token input parameter was reused with an operation, but at least one of the\n other input parameters is different from the previous call to the operation.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -1336,6 +1340,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidClientToken", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

A client token is not valid.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -1352,6 +1360,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidMaxResults", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

The specified value for MaxResults is not valid.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -1368,6 +1380,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidNextToken", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

The specified value for NextToken is not valid.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -1384,6 +1400,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidParameter", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

A parameter is not valid.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -1400,6 +1420,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidResourceType.Unknown", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

The specified resource type is not valid.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -1416,6 +1440,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidStateTransitionException.Unknown", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

The requested state transition is not valid.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -1459,7 +1487,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists the resources in a resource share that is shared with you but that the invitation is still pending for.

", + "smithy.api#documentation": "

Lists the resources in a resource share that is shared with you but that the invitation is still\n pending for.

", "smithy.api#http": { "method": "POST", "uri": "/listpendinginvitationresources", @@ -1539,7 +1567,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists the AWS RAM permissions.

", + "smithy.api#documentation": "

Lists the RAM permissions.

", "smithy.api#http": { "method": "POST", "uri": "/listpermissions", @@ -1558,7 +1586,7 @@ "resourceType": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

Specifies the resource type for which to list permissions. For example, to list only \n\t\tpermissions that apply to EC2 subnets, specify ec2:Subnet.

" + "smithy.api#documentation": "

Specifies the resource type for which to list permissions. For example, to list only\n permissions that apply to EC2 subnets, specify ec2:Subnet.

" } }, "nextToken": { @@ -1621,7 +1649,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists the principals that you have shared resources with or that have shared resources\n\t\t\twith you.

", + "smithy.api#documentation": "

Lists the principals that you have shared resources with or that have shared resources\n with you.

", "smithy.api#http": { "method": "POST", "uri": "/listprincipals", @@ -1659,7 +1687,7 @@ "resourceType": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The resource type.

\n \t

Valid values: acm-pca:CertificateAuthority | appmesh:Mesh | codebuild:Project | codebuild:ReportGroup | ec2:CapacityReservation | ec2:DedicatedHost | ec2:LocalGatewayRouteTable | ec2:PrefixList | ec2:Subnet | ec2:TrafficMirrorTarget | ec2:TransitGateway | imagebuilder:Component | imagebuilder:Image | imagebuilder:ImageRecipe | imagebuilder:ContainerRecipe | glue:Catalog | glue:Database | glue:Table | license-manager:LicenseConfiguration I network-firewall:FirewallPolicy | network-firewall:StatefulRuleGroup | network-firewall:StatelessRuleGroup | outposts:Outpost | resource-groups:Group | rds:Cluster | route53resolver:ResolverQueryLogConfig | route53resolver:ResolverRule\n

" + "smithy.api#documentation": "

The resource type.

\n

Valid values: acm-pca:CertificateAuthority | appmesh:Mesh | codebuild:Project | codebuild:ReportGroup | ec2:CapacityReservation | ec2:DedicatedHost | ec2:LocalGatewayRouteTable | ec2:PrefixList | ec2:Subnet | ec2:TrafficMirrorTarget | ec2:TransitGateway | imagebuilder:Component | imagebuilder:Image | imagebuilder:ImageRecipe | imagebuilder:ContainerRecipe | glue:Catalog | glue:Database | glue:Table | license-manager:LicenseConfiguration I network-firewall:FirewallPolicy | network-firewall:StatefulRuleGroup | network-firewall:StatelessRuleGroup | outposts:Outpost | resource-groups:Group | rds:Cluster | route53resolver:FirewallRuleGroup |route53resolver:ResolverQueryLogConfig | route53resolver:ResolverRule | s3-outposts:Outpost | ssm-contacts:Contact | ssm-incidents:ResponsePlan\n

" } }, "resourceShareArns": { @@ -1731,7 +1759,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists the AWS RAM permissions that are associated with a resource share.

", + "smithy.api#documentation": "

Lists the RAM permissions that are associated with a resource share.

", "smithy.api#http": { "method": "POST", "uri": "/listresourcesharepermissions", @@ -1808,7 +1836,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists the shareable resource types supported by AWS RAM.

", + "smithy.api#documentation": "

Lists the shareable resource types supported by RAM.

", "smithy.api#http": { "method": "POST", "uri": "/listresourcetypes", @@ -1844,7 +1872,7 @@ "resourceTypes": { "target": "com.amazonaws.ram#ServiceNameAndResourceTypeList", "traits": { - "smithy.api#documentation": "

The shareable resource types supported by AWS RAM.

" + "smithy.api#documentation": "

The shareable resource types supported by RAM.

" } }, "nextToken": { @@ -1887,7 +1915,7 @@ } ], "traits": { - "smithy.api#documentation": "

Lists the resources that you added to a resource shares or the resources that are shared with you.

", + "smithy.api#documentation": "

Lists the resources that you added to a resource shares or the resources that are shared with\n you.

", "smithy.api#http": { "method": "POST", "uri": "/listresources", @@ -1919,13 +1947,13 @@ "resourceType": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The resource type.

\n \t

Valid values: acm-pca:CertificateAuthority | appmesh:Mesh | codebuild:Project | codebuild:ReportGroup | ec2:CapacityReservation | ec2:DedicatedHost | ec2:LocalGatewayRouteTable | ec2:PrefixList | ec2:Subnet | ec2:TrafficMirrorTarget | ec2:TransitGateway | imagebuilder:Component | imagebuilder:Image | imagebuilder:ImageRecipe | imagebuilder:ContainerRecipe | glue:Catalog | glue:Database | glue:Table | license-manager:LicenseConfiguration I network-firewall:FirewallPolicy | network-firewall:StatefulRuleGroup | network-firewall:StatelessRuleGroup | outposts:Outpost | resource-groups:Group | rds:Cluster | route53resolver:ResolverQueryLogConfig | route53resolver:ResolverRule\n

" + "smithy.api#documentation": "

The resource type.

\n

Valid values: acm-pca:CertificateAuthority | appmesh:Mesh | codebuild:Project | codebuild:ReportGroup | ec2:CapacityReservation | ec2:DedicatedHost | ec2:LocalGatewayRouteTable | ec2:PrefixList | ec2:Subnet | ec2:TrafficMirrorTarget | ec2:TransitGateway | imagebuilder:Component | imagebuilder:Image | imagebuilder:ImageRecipe | imagebuilder:ContainerRecipe | glue:Catalog | glue:Database | glue:Table | license-manager:LicenseConfiguration I network-firewall:FirewallPolicy | network-firewall:StatefulRuleGroup | network-firewall:StatelessRuleGroup | outposts:Outpost | resource-groups:Group | rds:Cluster | route53resolver:FirewallRuleGroup |route53resolver:ResolverQueryLogConfig | route53resolver:ResolverRule | s3-outposts:Outpost | ssm-contacts:Contact | ssm-incidents:ResponsePlan\n

" } }, "resourceArns": { "target": "com.amazonaws.ram#ResourceArnList", "traits": { - "smithy.api#documentation": "

The Amazon Resource Names (ARN) of the resources.

" + "smithy.api#documentation": "

The Amazon Resource Names (ARNs) of the resources.

" } }, "resourceShareArns": { @@ -1976,6 +2004,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidArn.Malformed", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

The format of an Amazon Resource Name (ARN) is not valid.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -2002,6 +2034,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "MissingRequiredParameter", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

A required input parameter is missing.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -2018,6 +2054,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "OperationNotPermitted", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

The requested operation is not permitted.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -2074,12 +2114,12 @@ "external": { "target": "com.amazonaws.ram#Boolean", "traits": { - "smithy.api#documentation": "

Indicates whether the principal belongs to the same AWS organization as the AWS account that owns the resource share.

" + "smithy.api#documentation": "

Indicates whether the principal belongs to the same organization in Organizations as the\n Amazon Web Services account that owns the resource share.

" } } }, "traits": { - "smithy.api#documentation": "

Describes a principal for use with AWS Resource Access Manager.

" + "smithy.api#documentation": "

Describes a principal for use with Resource Access Manager.

" } }, "com.amazonaws.ram#PrincipalArnOrIdList": { @@ -2135,7 +2175,7 @@ } ], "traits": { - "smithy.api#documentation": "

Resource shares that were created by attaching a policy to a resource are visible only to\n\t\t\tthe resource share owner, and the resource share cannot be modified in AWS RAM.

\n \t\n \t

Use this API action to promote the resource share. When you promote the resource share,\n\t\t\tit becomes:

\n \t ", + "smithy.api#documentation": "

Resource shares that were created by attaching a policy to a resource are visible only\n to the resource share owner, and the resource share cannot be modified in RAM.

\n\n

Use this API action to promote the resource share. When you promote the resource\n share, it becomes:

\n ", "smithy.api#http": { "method": "POST", "uri": "/promoteresourcesharecreatedfrompolicy", @@ -2149,7 +2189,7 @@ "resourceShareArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The ARN of the resource share to promote.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource share to promote.

", "smithy.api#httpQuery": "resourceShareArn", "smithy.api#required": {} } @@ -2209,7 +2249,7 @@ } ], "traits": { - "smithy.api#documentation": "

Rejects an invitation to a resource share from another AWS account.

", + "smithy.api#documentation": "

Rejects an invitation to a resource share from another Amazon Web Services account.

", "smithy.api#http": { "method": "POST", "uri": "/rejectresourceshareinvitation", @@ -2276,7 +2316,7 @@ "resourceGroupArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The ARN of the resource group. This value is returned only if the resource is a resource\n\t\t\tgroup.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource group. This value is returned only if\n the resource is a resource group.

" } }, "status": { @@ -2328,6 +2368,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidResourceArn.NotFound", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

An Amazon Resource Name (ARN) was not found.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -2375,13 +2419,13 @@ "owningAccountId": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The ID of the AWS account that owns the resource share.

" + "smithy.api#documentation": "

The ID of the Amazon Web Services account that owns the resource share.

" } }, "allowExternalPrincipals": { "target": "com.amazonaws.ram#Boolean", "traits": { - "smithy.api#documentation": "

Indicates whether principals outside your AWS organization can be associated with a resource share.

" + "smithy.api#documentation": "

Indicates whether principals outside your organization in Organizations can be associated\n with a resource share.

" } }, "status": { @@ -2417,7 +2461,7 @@ "featureSet": { "target": "com.amazonaws.ram#ResourceShareFeatureSet", "traits": { - "smithy.api#documentation": "

Indicates how the resource share was created. Possible values include:

\n\t " + "smithy.api#documentation": "

Indicates how the resource share was created. Possible values include:

\n " } } }, @@ -2452,7 +2496,7 @@ "associatedEntity": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The associated entity. For resource associations, this is the ARN of the resource.\n For principal associations, this is the ID of an AWS account or the ARN of an OU or\n organization from AWS Organizations.

" + "smithy.api#documentation": "

The associated entity. For resource associations, this is the Amazon Resource Name\n (ARN) of the resource. For principal associations, this is one of the following:

\n " } }, "associationType": { @@ -2488,7 +2532,7 @@ "external": { "target": "com.amazonaws.ram#Boolean", "traits": { - "smithy.api#documentation": "

Indicates whether the principal belongs to the same AWS organization as the AWS account that owns the resource share.

" + "smithy.api#documentation": "

Indicates whether the principal belongs to the same organization in Organizations as the\n Amazon Web Services account that owns the resource share.

" } } }, @@ -2590,13 +2634,13 @@ "senderAccountId": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The ID of the AWS account that sent the invitation.

" + "smithy.api#documentation": "

The ID of the Amazon Web Services account that sent the invitation.

" } }, "receiverAccountId": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The ID of the AWS account that received the invitation.

" + "smithy.api#documentation": "

The ID of the Amazon Web Services account that received the invitation.

" } }, "invitationTimestamp": { @@ -2617,13 +2661,13 @@ "smithy.api#deprecated": { "message": "This member has been deprecated. Use ListPendingInvitationResources." }, - "smithy.api#documentation": "

To view the resources associated with a pending resource share invitation, use \n \t\n \t\tListPendingInvitationResources.

" + "smithy.api#documentation": "

To view the resources associated with a pending resource share invitation, use \n ListPendingInvitationResources.

" } }, "receiverArn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the IAM user or IAM role that received the invitation.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the IAM user or IAM role that received the\n invitation.

" } } }, @@ -2642,6 +2686,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidResourceShareInvitationArn.AlreadyAccepted", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

The invitation was already accepted.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -2658,6 +2706,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidResourceShareInvitationArn.AlreadyRejected", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

The invitation was already rejected.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -2683,6 +2735,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidResourceShareInvitationArn.NotFound", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

The Amazon Resource Name (ARN) for an invitation was not found.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -2699,6 +2755,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidResourceShareInvitationArn.Expired", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

The invitation is expired.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -2747,6 +2807,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "ResourceShareLimitExceeded", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

The requested resource share exceeds the limit for your account.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -2767,7 +2831,7 @@ "arn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The ARN of the permission.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the permission.

" } }, "version": { @@ -2779,7 +2843,7 @@ "defaultVersion": { "target": "com.amazonaws.ram#Boolean", "traits": { - "smithy.api#documentation": "

Specifies whether the version of the permission is set to the default version for this permission.

" + "smithy.api#documentation": "

Specifies whether the version of the permission is set to the default version for this\n permission.

" } }, "name": { @@ -2797,7 +2861,7 @@ "permission": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The permission's effect and actions in JSON format. The effect indicates whether\n\t\t\tthe actions are allowed or denied. The actions list the API actions to\n\t\t\twhich the principal is granted or denied access.

" + "smithy.api#documentation": "

The permission's effect and actions in JSON format. The effect indicates\n whether the actions are allowed or denied. The actions list the API actions\n to which the principal is granted or denied access.

" } }, "creationTime": { @@ -2815,12 +2879,12 @@ "isResourceTypeDefault": { "target": "com.amazonaws.ram#Boolean", "traits": { - "smithy.api#documentation": "

Specifies whether the version of the permission is set to the default version for this resource type.

" + "smithy.api#documentation": "

Specifies whether the version of the permission is set to the default version for this\n resource type.

" } } }, "traits": { - "smithy.api#documentation": "

Information about an AWS RAM permission.

" + "smithy.api#documentation": "

Information about an RAM permission.

" } }, "com.amazonaws.ram#ResourceSharePermissionList": { @@ -2838,7 +2902,7 @@ "arn": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The ARN of the permission.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the permission.

" } }, "version": { @@ -2850,7 +2914,7 @@ "defaultVersion": { "target": "com.amazonaws.ram#Boolean", "traits": { - "smithy.api#documentation": "

Specifies whether the version of the permission is set to the default version for this permission.

" + "smithy.api#documentation": "

Specifies whether the version of the permission is set to the default version for this\n permission.

" } }, "name": { @@ -2886,7 +2950,7 @@ "isResourceTypeDefault": { "target": "com.amazonaws.ram#Boolean", "traits": { - "smithy.api#documentation": "

Specifies whether the version of the permission is set to the default version for this resource type.

" + "smithy.api#documentation": "

Specifies whether the version of the permission is set to the default version for this\n resource type.

" } } }, @@ -2959,6 +3023,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InternalError", + "httpResponseCode": 500 + }, "smithy.api#documentation": "

The service could not respond to the request due to an internal problem.

", "smithy.api#error": "server", "smithy.api#httpError": 500 @@ -2976,12 +3044,12 @@ "serviceName": { "target": "com.amazonaws.ram#String", "traits": { - "smithy.api#documentation": "

The name of the AWS services to which the resources belong.

" + "smithy.api#documentation": "

The name of the Amazon Web Services services to which the resources belong.

" } } }, "traits": { - "smithy.api#documentation": "

Information about the shareable resource types and the AWS services to which they belong.

" + "smithy.api#documentation": "

Information about the shareable resource types and the Amazon Web Services services to which they\n belong.

" } }, "com.amazonaws.ram#ServiceNameAndResourceTypeList": { @@ -3004,6 +3072,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "Unavailable", + "httpResponseCode": 503 + }, "smithy.api#documentation": "

The service is not available.

", "smithy.api#error": "server", "smithy.api#httpError": 503 @@ -3078,6 +3150,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "TagLimitExceeded", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

The requested tags exceed the limit for your account.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -3100,6 +3176,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "TagPolicyViolation", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

The specified tag is a reserved word and cannot be used.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -3191,6 +3271,10 @@ } }, "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidResourceShareArn.NotFound", + "httpResponseCode": 400 + }, "smithy.api#documentation": "

A specified resource was not found.

", "smithy.api#error": "client", "smithy.api#httpError": 400 @@ -3312,7 +3396,7 @@ "allowExternalPrincipals": { "target": "com.amazonaws.ram#Boolean", "traits": { - "smithy.api#documentation": "

Indicates whether principals outside your AWS organization can be associated with a resource share.

" + "smithy.api#documentation": "

Indicates whether principals outside your organization in Organizations can be associated\n with a resource share.

" } }, "clientToken": { diff --git a/codegen/sdk-codegen/aws-models/ssmcontacts.2021-05-03.json b/codegen/sdk-codegen/aws-models/ssmcontacts.2021-05-03.json index d43031c2eab..0279bc0cf73 100644 --- a/codegen/sdk-codegen/aws-models/ssmcontacts.2021-05-03.json +++ b/codegen/sdk-codegen/aws-models/ssmcontacts.2021-05-03.json @@ -122,7 +122,7 @@ "AcceptCodeValidation": { "target": "com.amazonaws.ssmcontacts#AcceptCodeValidation", "traits": { - "smithy.api#documentation": "

An\n optional field that Incident Manager uses to ENFORCE\n AcceptCode validation when acknowledging an page.\n Acknowledgement can occur by replying to a page, or when entering the AcceptCode in the\n console. Enforcing AcceptCode validation causes Incident Manager to verify that the code\n entered by the user matches the code sent by Incident Manager with the page.

\n

Incident Manager can also IGNORE\n AcceptCode validation. Ignoring AcceptCode validation causes\n Incident Manager to accept any value entered for the AcceptCode.

" + "smithy.api#documentation": "

An optional field that Incident Manager uses to ENFORCE\n AcceptCode validation when acknowledging an page. Acknowledgement can occur by\n replying to a page, or when entering the AcceptCode in the console. Enforcing AcceptCode\n validation causes Incident Manager to verify that the code entered by the user matches the\n code sent by Incident Manager with the page.

\n

Incident Manager can also IGNORE\n AcceptCode validation. Ignoring AcceptCode validation causes\n Incident Manager to accept any value entered for the AcceptCode.

" } } } @@ -157,7 +157,7 @@ } }, "traits": { - "smithy.api#documentation": "

You don't have sufficient access to perform this action.

", + "smithy.api#documentation": "

You don't have sufficient access to perform this operation.

", "smithy.api#error": "client", "smithy.api#httpError": 403 } @@ -188,7 +188,7 @@ } ], "traits": { - "smithy.api#documentation": "

Activates a contact's contact channel. Incident Manager can't engage a contact until\n the\n contact channel has been activated.

" + "smithy.api#documentation": "

Activates a contact's contact channel. Incident Manager can't engage a contact until the\n contact channel has been activated.

" } }, "com.amazonaws.ssmcontacts#ActivateContactChannelRequest": { @@ -611,7 +611,7 @@ "IdempotencyToken": { "target": "com.amazonaws.ssmcontacts#IdempotencyToken", "traits": { - "smithy.api#documentation": "

A token ensuring that the action is called only once with the specified details.

", + "smithy.api#documentation": "

A token ensuring that the operation is called only once with the specified\n details.

", "smithy.api#idempotencyToken": {} } } @@ -623,7 +623,7 @@ "ContactChannelArn": { "target": "com.amazonaws.ssmcontacts#SsmContactsArn", "traits": { - "smithy.api#documentation": "

The ARN of the contact channel.

", + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the contact channel.

", "smithy.api#required": {} } } @@ -668,7 +668,7 @@ "IdempotencyToken": { "target": "com.amazonaws.ssmcontacts#IdempotencyToken", "traits": { - "smithy.api#documentation": "

A token ensuring that the action is called only once with the specified details.

", + "smithy.api#documentation": "

A token ensuring that the operation is called only once with the specified\n details.

", "smithy.api#idempotencyToken": {} } } @@ -697,7 +697,7 @@ } }, "traits": { - "smithy.api#documentation": "

The action failed to due an encryption key error.

", + "smithy.api#documentation": "

The operation failed to due an encryption key error.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -2227,7 +2227,7 @@ } }, "traits": { - "smithy.api#documentation": "

Request references a resource that\n doesn't\n exist.

", + "smithy.api#documentation": "

Request references a resource that doesn't exist.

", "smithy.api#error": "client", "smithy.api#httpError": 404 } @@ -2343,7 +2343,7 @@ "name": "ssm-contacts" }, "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "

AWS Systems Manager Incident Manager is an incident management console designed to help\n users mitigate and recover from incidents affecting their AWS-hosted applications. An incident\n is any unplanned interruption or reduction in quality of services.

\n

Incident Manager increases incident resolution by notifying responders of impact,\n highlighting relevant troubleshooting data, and providing collaboration tools to get services\n back up and running. To achieve the primary goal of reducing the time-to-resolution of\n critical incidents, Incident Manager automates response plans and enables responder team\n escalation.

", + "smithy.api#documentation": "

Systems Manager Incident Manager is an incident management console designed to help users\n mitigate and recover from incidents affecting their Amazon Web Services-hosted applications.\n An incident is any unplanned interruption or reduction in quality of services.

\n

Incident Manager increases incident resolution by notifying responders of impact,\n highlighting relevant troubleshooting data, and providing collaboration tools to get\n services back up and running. To achieve the primary goal of reducing the\n time-to-resolution of critical incidents, Incident Manager automates response plans\n and enables responder team escalation.

", "smithy.api#title": "AWS Systems Manager Incident Manager Contacts" } }, @@ -2379,7 +2379,7 @@ } ], "traits": { - "smithy.api#documentation": "

Sends an activation code to a contact channel. The contact can use this code to activate\n the contact channel in the console or with the ActivateChannel action.\n Incident Manager can't engage a contact channel until it has been activated.

" + "smithy.api#documentation": "

Sends an activation code to a contact channel. The contact can use this code to activate\n the contact channel in the console or with the ActivateChannel operation.\n Incident Manager can't engage a contact channel until it has been activated.

" } }, "com.amazonaws.ssmcontacts#SendActivationCodeRequest": { @@ -2591,7 +2591,7 @@ "IdempotencyToken": { "target": "com.amazonaws.ssmcontacts#IdempotencyToken", "traits": { - "smithy.api#documentation": "

A token ensuring that the action is called only once with the specified details.

", + "smithy.api#documentation": "

A token ensuring that the operation is called only once with the specified\n details.

", "smithy.api#idempotencyToken": {} } } @@ -2819,7 +2819,7 @@ } }, "traits": { - "smithy.api#documentation": "

The contact or contact channel that is being engaged.

" + "smithy.api#documentation": "

The contact or contact channel that's being engaged.

" } }, "com.amazonaws.ssmcontacts#TargetsList": { @@ -3018,7 +3018,7 @@ "Name": { "target": "com.amazonaws.ssmcontacts#ChannelName", "traits": { - "smithy.api#documentation": "

The name of the contact channel

" + "smithy.api#documentation": "

The name of the contact channel.

" } }, "DeliveryAddress": { @@ -3084,7 +3084,7 @@ } }, "traits": { - "smithy.api#documentation": "

The input fails to satisfy the constraints specified by an\n AWS\n service.

", + "smithy.api#documentation": "

The input fails to satisfy the constraints specified by an Amazon Web Services\n service.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } diff --git a/codegen/sdk-codegen/aws-models/xray.2016-04-12.json b/codegen/sdk-codegen/aws-models/xray.2016-04-12.json index 17ca42382c2..462332a5258 100644 --- a/codegen/sdk-codegen/aws-models/xray.2016-04-12.json +++ b/codegen/sdk-codegen/aws-models/xray.2016-04-12.json @@ -127,7 +127,7 @@ "name": "xray" }, "aws.protocols#restJson1": {}, - "smithy.api#documentation": "

AWS X-Ray provides APIs for managing debug traces and retrieving service maps\n and other data created by processing those traces.

", + "smithy.api#documentation": "

Amazon Web Services X-Ray provides APIs for managing debug traces and retrieving service maps\n and other data created by processing those traces.

", "smithy.api#title": "AWS X-Ray" } }, @@ -465,7 +465,7 @@ "Tags": { "target": "com.amazonaws.xray#TagList", "traits": { - "smithy.api#documentation": "

A map that contains one or more tag keys and tag values to attach to an X-Ray group.\n For more information about ways to use tags, see Tagging AWS\n resources in the AWS General Reference.

\n

The following restrictions apply to tags:

\n " + "smithy.api#documentation": "

A map that contains one or more tag keys and tag values to attach to an X-Ray group.\n For more information about ways to use tags, see Tagging Amazon Web Services\n resources in the Amazon Web Services General Reference.

\n

The following restrictions apply to tags:

\n " } } } @@ -501,7 +501,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates a rule to control sampling behavior for instrumented applications. Services\n retrieve rules with GetSamplingRules, and evaluate each rule in ascending\n order of priority for each request. If a rule matches, the service\n records a trace, borrowing it from the reservoir size. After 10 seconds, the service\n reports back to X-Ray with GetSamplingTargets to get updated versions of\n each in-use rule. The updated rule contains a trace quota that the service can use instead\n of borrowing from the reservoir.

", + "smithy.api#documentation": "

Creates a rule to control sampling behavior for instrumented applications. Services\n retrieve rules with GetSamplingRules, and evaluate each rule in ascending\n order of priority for each request. If a rule matches, the service\n records a trace, borrowing it from the reservoir size. After 10 seconds, the service\n reports back to X-Ray with GetSamplingTargets to get updated versions of\n each in-use rule. The updated rule contains a trace quota that the service can use instead\n of borrowing from the reservoir.

", "smithy.api#http": { "method": "POST", "uri": "/CreateSamplingRule", @@ -522,7 +522,7 @@ "Tags": { "target": "com.amazonaws.xray#TagList", "traits": { - "smithy.api#documentation": "

A map that contains one or more tag keys and tag values to attach to an X-Ray sampling\n rule. For more information about ways to use tags, see Tagging AWS\n resources in the AWS General Reference.

\n

The following restrictions apply to tags:

\n " + "smithy.api#documentation": "

A map that contains one or more tag keys and tag values to attach to an X-Ray sampling\n rule. For more information about ways to use tags, see Tagging Amazon Web Services\n resources in the Amazon Web Services General Reference.

\n

The following restrictions apply to tags:

\n " } } } @@ -743,7 +743,7 @@ "KeyId": { "target": "com.amazonaws.xray#String", "traits": { - "smithy.api#documentation": "

The ID of the customer master key (CMK) used for encryption, if applicable.

" + "smithy.api#documentation": "

The ID of the KMS key used for encryption, if applicable.

" } }, "Status": { @@ -755,7 +755,7 @@ "Type": { "target": "com.amazonaws.xray#EncryptionType", "traits": { - "smithy.api#documentation": "

The type of encryption. Set to KMS for encryption with CMKs. Set to NONE for\n default encryption.

" + "smithy.api#documentation": "

The type of encryption. Set to KMS for encryption with KMS keys. Set to NONE for\n default encryption.

" } } }, @@ -1470,7 +1470,7 @@ "Services": { "target": "com.amazonaws.xray#InsightImpactGraphServiceList", "traits": { - "smithy.api#documentation": "

The AWS instrumented services related to the insight.

" + "smithy.api#documentation": "

The Amazon Web Services instrumented services related to the insight.

" } }, "NextToken": { @@ -1775,13 +1775,13 @@ "LastRuleModification": { "target": "com.amazonaws.xray#Timestamp", "traits": { - "smithy.api#documentation": "

The last time a user changed the sampling rule configuration. If\n the sampling rule configuration changed since the service last retrieved it, the service\n should call GetSamplingRules to get the latest version.

" + "smithy.api#documentation": "

The last time a user changed the sampling rule configuration. If\n the sampling rule configuration changed since the service last retrieved it, the service\n should call GetSamplingRules to get the latest version.

" } }, "UnprocessedStatistics": { "target": "com.amazonaws.xray#UnprocessedStatisticsList", "traits": { - "smithy.api#documentation": "

Information about SamplingStatisticsDocument that X-Ray could not\n process.

" + "smithy.api#documentation": "

Information about SamplingStatisticsDocument that X-Ray could not\n process.

" } } } @@ -1803,7 +1803,7 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves a document that describes services that process incoming requests, and\n downstream services that they call as a result. Root services process incoming requests and\n make calls to downstream services. Root services are applications that use the AWS X-Ray SDK.\n Downstream services can be other applications, AWS resources, HTTP web APIs, or SQL\n databases.

", + "smithy.api#documentation": "

Retrieves a document that describes services that process incoming requests, and\n downstream services that they call as a result. Root services process incoming requests and\n make calls to downstream services. Root services are applications that use the Amazon Web Services X-Ray SDK.\n Downstream services can be other applications, Amazon Web Services resources, HTTP web APIs, or SQL\n databases.

", "smithy.api#http": { "method": "POST", "uri": "/ServiceGraph", @@ -2078,7 +2078,7 @@ } ], "traits": { - "smithy.api#documentation": "

Retrieves IDs and annotations for traces available for a specified time frame using an\n optional filter. To get the full traces, pass the trace IDs to\n BatchGetTraces.

\n

A filter expression can target traced requests that hit specific service nodes or\n edges, have errors, or come from a known user. For example, the following filter expression\n targets traces that pass through api.example.com:

\n

\n service(\"api.example.com\")\n

\n

This filter expression finds traces that have an annotation named account\n with the value 12345:

\n

\n annotation.account = \"12345\"\n

\n

For a full list of indexed fields and keywords that you can use in filter expressions,\n see Using Filter\n Expressions in the AWS X-Ray Developer Guide.

", + "smithy.api#documentation": "

Retrieves IDs and annotations for traces available for a specified time frame using an\n optional filter. To get the full traces, pass the trace IDs to\n BatchGetTraces.

\n

A filter expression can target traced requests that hit specific service nodes or\n edges, have errors, or come from a known user. For example, the following filter expression\n targets traces that pass through api.example.com:

\n

\n service(\"api.example.com\")\n

\n

This filter expression finds traces that have an annotation named account\n with the value 12345:

\n

\n annotation.account = \"12345\"\n

\n

For a full list of indexed fields and keywords that you can use in filter expressions,\n see Using Filter\n Expressions in the Amazon Web Services X-Ray Developer Guide.

", "smithy.api#http": { "method": "POST", "uri": "/TraceSummaries", @@ -2193,7 +2193,7 @@ "InsightsConfiguration": { "target": "com.amazonaws.xray#InsightsConfiguration", "traits": { - "smithy.api#documentation": "

The structure containing configurations related to insights.

\n " + "smithy.api#documentation": "

The structure containing configurations related to insights.

\n " } } }, @@ -2489,7 +2489,7 @@ "com.amazonaws.xray#InsightId": { "type": "string", "traits": { - "smithy.api#pattern": "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}" + "smithy.api#pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$" } }, "com.amazonaws.xray#InsightImpactGraphEdge": { @@ -2524,7 +2524,7 @@ "Type": { "target": "com.amazonaws.xray#String", "traits": { - "smithy.api#documentation": "

Identifier for the service. Unique within the service map.

\n " + "smithy.api#documentation": "

Identifier for the service. Unique within the service map.

\n " } }, "Name": { @@ -2542,7 +2542,7 @@ "AccountId": { "target": "com.amazonaws.xray#String", "traits": { - "smithy.api#documentation": "

Identifier of the AWS account in which the service runs.

" + "smithy.api#documentation": "

Identifier of the Amazon Web Services account in which the service runs.

" } }, "Edges": { @@ -2750,7 +2750,7 @@ } ], "traits": { - "smithy.api#documentation": "

Returns a list of tags that are applied to the specified AWS X-Ray group or sampling rule.

", + "smithy.api#documentation": "

Returns a list of tags that are applied to the specified Amazon Web Services X-Ray group or sampling rule.

", "smithy.api#http": { "method": "POST", "uri": "/ListTagsForResource", @@ -2857,7 +2857,7 @@ "KeyId": { "target": "com.amazonaws.xray#EncryptionKeyId", "traits": { - "smithy.api#documentation": "

An AWS KMS customer master key (CMK) in one of the following formats:

\n \n

Omit this key if you set Type to NONE.

" + "smithy.api#documentation": "

An Amazon Web Services KMS key in one of the following formats:

\n \n

Omit this key if you set Type to NONE.

" } }, "Type": { @@ -2897,7 +2897,7 @@ } ], "traits": { - "smithy.api#documentation": "

Used by the AWS X-Ray daemon to upload telemetry.

", + "smithy.api#documentation": "

Used by the Amazon Web Services X-Ray daemon to upload telemetry.

", "smithy.api#http": { "method": "POST", "uri": "/TelemetryRecords", @@ -2956,7 +2956,7 @@ } ], "traits": { - "smithy.api#documentation": "

Uploads segment documents to AWS X-Ray. The X-Ray SDK generates segment documents and sends them to the X-Ray daemon, which uploads them in\n batches. A segment document can be a completed segment, an in-progress segment, or an array of\n subsegments.

\n

Segments must include the following fields. For the full segment document schema, see\n AWS X-Ray\n Segment Documents in the AWS X-Ray Developer Guide.

\n

\n Required segment document fields\n

\n \n

A trace_id consists of three numbers separated by hyphens. For example,\n 1-58406520-a006649127e371903a2de979. This includes:

\n

\n Trace ID Format\n

\n ", + "smithy.api#documentation": "

Uploads segment documents to Amazon Web Services X-Ray. The X-Ray SDK generates segment documents and sends them to the X-Ray daemon, which uploads them in\n batches. A segment document can be a completed segment, an in-progress segment, or an array of\n subsegments.

\n

Segments must include the following fields. For the full segment document schema, see\n Amazon Web Services X-Ray\n Segment Documents in the Amazon Web Services X-Ray Developer Guide.

\n

\n Required segment document fields\n

\n \n

A trace_id consists of three numbers separated by hyphens. For example,\n 1-58406520-a006649127e371903a2de979. This includes:

\n

\n Trace ID Format\n

\n ", "smithy.api#http": { "method": "POST", "uri": "/TraceSegments", @@ -3249,7 +3249,7 @@ "ResourceARN": { "target": "com.amazonaws.xray#ResourceARN", "traits": { - "smithy.api#documentation": "

Matches the ARN of the AWS resource on which the service runs.

", + "smithy.api#documentation": "

Matches the ARN of the Amazon Web Services resource on which the service runs.

", "smithy.api#required": {} } }, @@ -3350,7 +3350,7 @@ } }, "traits": { - "smithy.api#documentation": "

A SamplingRule and its metadata.

" + "smithy.api#documentation": "

A SamplingRule and its metadata.

" } }, "com.amazonaws.xray#SamplingRuleRecordList": { @@ -3377,7 +3377,7 @@ "ResourceARN": { "target": "com.amazonaws.xray#ResourceARN", "traits": { - "smithy.api#documentation": "

Matches the ARN of the AWS resource on which the service runs.

" + "smithy.api#documentation": "

Matches the ARN of the Amazon Web Services resource on which the service runs.

" } }, "Priority": { @@ -3529,7 +3529,7 @@ } }, "traits": { - "smithy.api#documentation": "

Request sampling results for a single rule from a service. Results are for the last 10\n seconds unless the service has been assigned a longer reporting interval after a previous call\n to GetSamplingTargets.

" + "smithy.api#documentation": "

Request sampling results for a single rule from a service. Results are for the last 10\n seconds unless the service has been assigned a longer reporting interval after a previous call\n to GetSamplingTargets.

" } }, "com.amazonaws.xray#SamplingStatisticsDocumentList": { @@ -3614,7 +3614,7 @@ } }, "traits": { - "smithy.api#documentation": "

Temporary changes to a sampling rule configuration. To meet the global sampling target for a rule, X-Ray\n calculates a new reservoir for each service based on the recent sampling results of all services that called GetSamplingTargets.

" + "smithy.api#documentation": "

Temporary changes to a sampling rule configuration. To meet the global sampling target for a rule, X-Ray\n calculates a new reservoir for each service based on the recent sampling results of all services that called \n GetSamplingTargets.

" } }, "com.amazonaws.xray#SamplingTargetDocumentList": { @@ -3640,7 +3640,7 @@ } }, "traits": { - "smithy.api#documentation": "

A segment from a trace that has been ingested by the X-Ray service. The segment can be\n compiled from documents uploaded with PutTraceSegments, or an\n inferred segment for a downstream service, generated from a subsegment sent by\n the service that called it.

\n

For the full segment document schema, see AWS X-Ray Segment\n Documents in the AWS X-Ray Developer Guide.

" + "smithy.api#documentation": "

A segment from a trace that has been ingested by the X-Ray service. The segment can be\n compiled from documents uploaded with PutTraceSegments, or an\n inferred segment for a downstream service, generated from a subsegment sent by\n the service that called it.

\n

For the full segment document schema, see Amazon Web Services X-Ray Segment\n Documents in the Amazon Web Services X-Ray Developer Guide.

" } }, "com.amazonaws.xray#SegmentDocument": { @@ -3690,13 +3690,13 @@ "AccountId": { "target": "com.amazonaws.xray#String", "traits": { - "smithy.api#documentation": "

Identifier of the AWS account in which the service runs.

" + "smithy.api#documentation": "

Identifier of the Amazon Web Services account in which the service runs.

" } }, "Type": { "target": "com.amazonaws.xray#String", "traits": { - "smithy.api#documentation": "

The type of service.

\n " + "smithy.api#documentation": "

The type of service.

\n " } }, "State": { @@ -3874,7 +3874,7 @@ } }, "traits": { - "smithy.api#documentation": "

A map that contains tag keys and tag values to attach to an AWS X-Ray group or sampling\n rule. For more information about ways to use tags, see Tagging AWS resources\n in the AWS General Reference.

\n

The following restrictions apply to tags:

\n " + "smithy.api#documentation": "

A map that contains tag keys and tag values to attach to an Amazon Web Services X-Ray group or sampling\n rule. For more information about ways to use tags, see Tagging Amazon Web Services resources\n in the Amazon Web Services General Reference.

\n

The following restrictions apply to tags:

\n " } }, "com.amazonaws.xray#TagKey": { @@ -3933,7 +3933,7 @@ } ], "traits": { - "smithy.api#documentation": "

Applies tags to an existing AWS X-Ray group or sampling rule.

", + "smithy.api#documentation": "

Applies tags to an existing Amazon Web Services X-Ray group or sampling rule.

", "smithy.api#http": { "method": "POST", "uri": "/TagResource", @@ -3954,7 +3954,7 @@ "Tags": { "target": "com.amazonaws.xray#TagList", "traits": { - "smithy.api#documentation": "

A map that contains one or more tag keys and tag values to attach to an X-Ray group or\n sampling rule. For more information about ways to use tags, see Tagging AWS resources\n in the AWS General Reference.

\n

The following restrictions apply to tags:

\n ", + "smithy.api#documentation": "

A map that contains one or more tag keys and tag values to attach to an X-Ray group or\n sampling rule. For more information about ways to use tags, see Tagging Amazon Web Services resources\n in the Amazon Web Services General Reference.

\n

The following restrictions apply to tags:

\n ", "smithy.api#required": {} } } @@ -4136,7 +4136,7 @@ "LimitExceeded": { "target": "com.amazonaws.xray#NullableBoolean", "traits": { - "smithy.api#documentation": "

LimitExceeded is set to true when the trace has exceeded one of the defined quotas. For\n more information about quotas, see AWS X-Ray endpoints and quotas.

" + "smithy.api#documentation": "

LimitExceeded is set to true when the trace has exceeded one of the defined quotas. For\n more information about quotas, see Amazon Web Services X-Ray endpoints and quotas.

" } }, "Segments": { @@ -4390,7 +4390,7 @@ } }, "traits": { - "smithy.api#documentation": "

Sampling statistics from a call to GetSamplingTargets that X-Ray\n could not process.

" + "smithy.api#documentation": "

Sampling statistics from a call to GetSamplingTargets that X-Ray\n could not process.

" } }, "com.amazonaws.xray#UnprocessedStatisticsList": { @@ -4457,7 +4457,7 @@ } ], "traits": { - "smithy.api#documentation": "

Removes tags from an AWS X-Ray group or sampling rule. You cannot edit or delete system\n tags (those with an aws: prefix).

", + "smithy.api#documentation": "

Removes tags from an Amazon Web Services X-Ray group or sampling rule. You cannot edit or delete system\n tags (those with an aws: prefix).

", "smithy.api#http": { "method": "POST", "uri": "/UntagResource", diff --git a/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoint-prefix.json b/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoint-prefix.json index 48806ebf03a..a6d3bb74dcb 100644 --- a/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoint-prefix.json +++ b/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoint-prefix.json @@ -189,6 +189,7 @@ "Network Firewall": "network-firewall", "NetworkManager": "networkmanager", "Nimble": "nimble", + "OpenSearch": "es", "OpsWorks": "opsworks", "OpsWorksCM": "opsworks-cm", "Organizations": "organizations", diff --git a/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoints.json b/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoints.json index 560a972b4b9..66353167575 100644 --- a/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoints.json +++ b/codegen/smithy-aws-go-codegen/src/main/resources/software/amazon/smithy/aws/go/codegen/endpoints.json @@ -626,6 +626,7 @@ "ap-east-1" : { }, "ap-northeast-1" : { }, "ap-northeast-2" : { }, + "ap-northeast-3" : { }, "ap-south-1" : { }, "ap-southeast-1" : { }, "ap-southeast-2" : { }, @@ -1027,6 +1028,13 @@ "us-west-2" : { } } }, + "braket" : { + "endpoints" : { + "us-east-1" : { }, + "us-west-1" : { }, + "us-west-2" : { } + } + }, "budgets" : { "endpoints" : { "aws-global" : { @@ -10040,6 +10048,18 @@ "us-gov-west-1" : { } } }, + "servicediscovery" : { + "endpoints" : { + "servicediscovery-fips" : { + "credentialScope" : { + "region" : "us-gov-west-1" + }, + "hostname" : "servicediscovery-fips.us-gov-west-1.amazonaws.com" + }, + "us-gov-east-1" : { }, + "us-gov-west-1" : { } + } + }, "servicequotas" : { "defaults" : { "protocols" : [ "https" ] diff --git a/service/amp/api_op_CreateWorkspace.go b/service/amp/api_op_CreateWorkspace.go index fb5ca0935c7..222e676d5b0 100644 --- a/service/amp/api_op_CreateWorkspace.go +++ b/service/amp/api_op_CreateWorkspace.go @@ -38,6 +38,9 @@ type CreateWorkspaceInput struct { // idempotency of the request. ClientToken *string + // Optional, user-provided tags for this workspace. + Tags map[string]string + noSmithyDocumentSerde } @@ -59,6 +62,9 @@ type CreateWorkspaceOutput struct { // This member is required. WorkspaceId *string + // The tags of this workspace. + Tags map[string]string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/amp/api_op_ListTagsForResource.go b/service/amp/api_op_ListTagsForResource.go new file mode 100644 index 00000000000..52a36cfc32e --- /dev/null +++ b/service/amp/api_op_ListTagsForResource.go @@ -0,0 +1,120 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package amp + +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" +) + +// Lists the tags you have assigned to the resource. +func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { + if params == nil { + params = &ListTagsForResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTagsForResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListTagsForResourceInput struct { + + // The ARN of the resource. + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + +type ListTagsForResourceOutput struct { + + // The list of tags assigned to the resource. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTagsForResource{}, 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 = addOpListTagsForResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(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_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "aps", + OperationName: "ListTagsForResource", + } +} diff --git a/service/amp/api_op_TagResource.go b/service/amp/api_op_TagResource.go new file mode 100644 index 00000000000..bdc1b88c5c0 --- /dev/null +++ b/service/amp/api_op_TagResource.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package amp + +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" +) + +// Creates tags for the specified resource. +func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { + if params == nil { + params = &TagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TagResourceInput struct { + + // The ARN of the resource. + // + // This member is required. + ResourceArn *string + + // The list of tags assigned to the resource. + // + // This member is required. + Tags map[string]string + + noSmithyDocumentSerde +} + +type TagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTagResource{}, 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 = addOpTagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(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_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "aps", + OperationName: "TagResource", + } +} diff --git a/service/amp/api_op_UntagResource.go b/service/amp/api_op_UntagResource.go new file mode 100644 index 00000000000..d8844fffa42 --- /dev/null +++ b/service/amp/api_op_UntagResource.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package amp + +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 tags from the specified resource. +func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { + if params == nil { + params = &UntagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UntagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UntagResourceInput struct { + + // The ARN of the resource. + // + // This member is required. + ResourceArn *string + + // One or more tag keys + // + // This member is required. + TagKeys []string + + noSmithyDocumentSerde +} + +type UntagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUntagResource{}, 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 = addOpUntagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(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_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "aps", + OperationName: "UntagResource", + } +} diff --git a/service/amp/deserializers.go b/service/amp/deserializers.go index 752f883777c..dd54db1e119 100644 --- a/service/amp/deserializers.go +++ b/service/amp/deserializers.go @@ -183,6 +183,11 @@ func awsRestjson1_deserializeOpDocumentCreateWorkspaceOutput(v **CreateWorkspace return err } + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + case "workspaceId": if value != nil { jtv, ok := value.(string) @@ -461,6 +466,165 @@ func awsRestjson1_deserializeOpDocumentDescribeWorkspaceOutput(v **DescribeWorks return nil } +type awsRestjson1_deserializeOpListTagsForResource struct { +} + +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_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) + 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_deserializeOpErrorListTagsForResource(response, &metadata) + } + output := &ListTagsForResourceOutput{} + 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_deserializeOpDocumentListTagsForResourceOutput(&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_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)} + } + 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("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, 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 *ListTagsForResourceOutput + if *v == nil { + sv = &ListTagsForResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpListWorkspaces struct { } @@ -626,6 +790,196 @@ func awsRestjson1_deserializeOpDocumentListWorkspacesOutput(v **ListWorkspacesOu return nil } +type awsRestjson1_deserializeOpTagResource struct { +} + +func (*awsRestjson1_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_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) + 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_deserializeOpErrorTagResource(response, &metadata) + } + output := &TagResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_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)} + } + 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("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUntagResource struct { +} + +func (*awsRestjson1_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_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) + 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_deserializeOpErrorUntagResource(response, &metadata) + } + output := &UntagResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_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)} + } + 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("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpUpdateWorkspaceAlias struct { } @@ -1310,6 +1664,42 @@ func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.Ser return nil } +func awsRestjson1_deserializeDocumentTagMap(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 TagValue to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + func awsRestjson1_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -1588,6 +1978,11 @@ func awsRestjson1_deserializeDocumentWorkspaceDescription(v **types.WorkspaceDes return err } + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + case "workspaceId": if value != nil { jtv, ok := value.(string) @@ -1707,6 +2102,11 @@ func awsRestjson1_deserializeDocumentWorkspaceSummary(v **types.WorkspaceSummary return err } + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + case "workspaceId": if value != nil { jtv, ok := value.(string) diff --git a/service/amp/generated.json b/service/amp/generated.json index db8abe48ee9..379b3a70449 100644 --- a/service/amp/generated.json +++ b/service/amp/generated.json @@ -8,7 +8,10 @@ "api_op_CreateWorkspace.go", "api_op_DeleteWorkspace.go", "api_op_DescribeWorkspace.go", + "api_op_ListTagsForResource.go", "api_op_ListWorkspaces.go", + "api_op_TagResource.go", + "api_op_UntagResource.go", "api_op_UpdateWorkspaceAlias.go", "deserializers.go", "doc.go", diff --git a/service/amp/serializers.go b/service/amp/serializers.go index 35455e11bff..acac4de45ee 100644 --- a/service/amp/serializers.go +++ b/service/amp/serializers.go @@ -83,6 +83,13 @@ func awsRestjson1_serializeOpDocumentCreateWorkspaceInput(v *CreateWorkspaceInpu ok.String(*v.ClientToken) } + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + return nil } @@ -206,6 +213,64 @@ func awsRestjson1_serializeOpHttpBindingsDescribeWorkspaceInput(v *DescribeWorks return nil } +type awsRestjson1_serializeOpListTagsForResource struct { +} + +func (*awsRestjson1_serializeOpListTagsForResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListTagsForResource) 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.(*ListTagsForResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") + 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 err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpListWorkspaces struct { } @@ -267,6 +332,153 @@ func awsRestjson1_serializeOpHttpBindingsListWorkspacesInput(v *ListWorkspacesIn return nil } +type awsRestjson1_serializeOpTagResource struct { +} + +func (*awsRestjson1_serializeOpTagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpTagResource) 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.(*TagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentTagResourceInput(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_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUntagResource struct { +} + +func (*awsRestjson1_serializeOpUntagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUntagResource) 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.(*UntagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + if v.TagKeys != nil { + for i := range v.TagKeys { + encoder.AddQuery("tagKeys").String(v.TagKeys[i]) + } + } + + return nil +} + type awsRestjson1_serializeOpUpdateWorkspaceAlias struct { } @@ -352,3 +564,14 @@ func awsRestjson1_serializeOpDocumentUpdateWorkspaceAliasInput(v *UpdateWorkspac return nil } + +func awsRestjson1_serializeDocumentTagMap(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} diff --git a/service/amp/types/types.go b/service/amp/types/types.go index d67c9cab899..85afb20df66 100644 --- a/service/amp/types/types.go +++ b/service/amp/types/types.go @@ -53,6 +53,9 @@ type WorkspaceDescription struct { // Prometheus endpoint URI. PrometheusEndpoint *string + // The tags of this workspace. + Tags map[string]string + noSmithyDocumentSerde } @@ -93,6 +96,9 @@ type WorkspaceSummary struct { // Alias of this workspace. Alias *string + // The tags of this workspace. + Tags map[string]string + noSmithyDocumentSerde } diff --git a/service/amp/validators.go b/service/amp/validators.go index b4e0a9295fb..b5adb78cd8f 100644 --- a/service/amp/validators.go +++ b/service/amp/validators.go @@ -49,6 +49,66 @@ func (m *validateOpDescribeWorkspace) HandleInitialize(ctx context.Context, in m return next.HandleInitialize(ctx, in) } +type validateOpListTagsForResource struct { +} + +func (*validateOpListTagsForResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListTagsForResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListTagsForResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpTagResource struct { +} + +func (*validateOpTagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUntagResource struct { +} + +func (*validateOpUntagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UntagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUntagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateWorkspaceAlias struct { } @@ -77,6 +137,18 @@ func addOpDescribeWorkspaceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeWorkspace{}, middleware.After) } +func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) +} + +func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) +} + +func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) +} + func addOpUpdateWorkspaceAliasValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateWorkspaceAlias{}, middleware.After) } @@ -111,6 +183,57 @@ func validateOpDescribeWorkspaceInput(v *DescribeWorkspaceInput) error { } } +func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpTagResourceInput(v *TagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.Tags == nil { + invalidParams.Add(smithy.NewErrParamRequired("Tags")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUntagResourceInput(v *UntagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.TagKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateWorkspaceAliasInput(v *UpdateWorkspaceAliasInput) error { if v == nil { return nil diff --git a/service/braket/internal/endpoints/endpoints.go b/service/braket/internal/endpoints/endpoints.go index 683fc7d3b0e..59e35fe9988 100644 --- a/service/braket/internal/endpoints/endpoints.go +++ b/service/braket/internal/endpoints/endpoints.go @@ -62,6 +62,11 @@ var defaultPartitions = endpoints.Partitions{ }, RegionRegex: partitionRegexp.Aws, IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + "us-east-1": endpoints.Endpoint{}, + "us-west-1": endpoints.Endpoint{}, + "us-west-2": endpoints.Endpoint{}, + }, }, { ID: "aws-cn", diff --git a/service/chimesdkidentity/doc.go b/service/chimesdkidentity/doc.go index 10533835d94..3d9215d4b68 100644 --- a/service/chimesdkidentity/doc.go +++ b/service/chimesdkidentity/doc.go @@ -6,5 +6,6 @@ // The Amazon Chime SDK Identity APIs in this section allow software developers to // create and manage unique instances of their messaging applications. These APIs // provide the overarching framework for creating and sending messages. For more -// information about the identity APIs, refer to . +// information about the identity APIs, refer to Amazon Chime SDK identity +// (https://docs.aws.amazon.com/chime/latest/APIReference/API_Operations_Amazon_Chime_SDK_Identity.html). package chimesdkidentity diff --git a/service/chimesdkmessaging/doc.go b/service/chimesdkmessaging/doc.go index 91e3afb8f10..bede864e660 100644 --- a/service/chimesdkmessaging/doc.go +++ b/service/chimesdkmessaging/doc.go @@ -6,5 +6,6 @@ // The Amazon Chime SDK Messaging APIs in this section allow software developers to // send and receive messages in custom messaging applications. These APIs depend on // the frameworks provided by the Amazon Chime SDK Identity APIs. For more -// information about the messaging APIs, see . +// information about the messaging APIs, see Amazon Chime SDK messaging +// (https://docs.aws.amazon.com/chime/latest/APIReference/API_Operations_Amazon_Chime_SDK_Messaging) package chimesdkmessaging diff --git a/service/codegurureviewer/api_op_AssociateRepository.go b/service/codegurureviewer/api_op_AssociateRepository.go index f1927ab53a5..2720269ae0f 100644 --- a/service/codegurureviewer/api_op_AssociateRepository.go +++ b/service/codegurureviewer/api_op_AssociateRepository.go @@ -12,22 +12,23 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Use to associate an AWS CodeCommit repository or a repostory managed by AWS -// CodeStar Connections with Amazon CodeGuru Reviewer. When you associate a -// repository, CodeGuru Reviewer reviews source code changes in the repository's -// pull requests and provides automatic recommendations. You can view -// recommendations using the CodeGuru Reviewer console. For more information, see -// Recommendations in Amazon CodeGuru Reviewer +// Use to associate an Amazon Web Services CodeCommit repository or a repostory +// managed by Amazon Web Services CodeStar Connections with Amazon CodeGuru +// Reviewer. When you associate a repository, CodeGuru Reviewer reviews source code +// changes in the repository's pull requests and provides automatic +// recommendations. You can view recommendations using the CodeGuru Reviewer +// console. For more information, see Recommendations in Amazon CodeGuru Reviewer // (https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/recommendations.html) // in the Amazon CodeGuru Reviewer User Guide. If you associate a CodeCommit or S3 -// repository, it must be in the same AWS Region and AWS account where its CodeGuru -// Reviewer code reviews are configured. Bitbucket and GitHub Enterprise Server -// repositories are managed by AWS CodeStar Connections to connect to CodeGuru -// Reviewer. For more information, see Associate a repository +// repository, it must be in the same Amazon Web Services Region and Amazon Web +// Services account where its CodeGuru Reviewer code reviews are configured. +// Bitbucket and GitHub Enterprise Server repositories are managed by Amazon Web +// Services CodeStar Connections to connect to CodeGuru Reviewer. For more +// information, see Associate a repository // (https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/getting-started-associate-repository.html) // in the Amazon CodeGuru Reviewer User Guide. You cannot use the CodeGuru Reviewer -// SDK or the AWS CLI to associate a GitHub repository with Amazon CodeGuru -// Reviewer. To associate a GitHub repository, use the console. For more +// SDK or the Amazon Web Services CLI to associate a GitHub repository with Amazon +// CodeGuru Reviewer. To associate a GitHub repository, use the console. For more // information, see Getting started with CodeGuru Reviewer // (https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/getting-started-with-guru.html) // in the CodeGuru Reviewer User Guide. @@ -60,11 +61,12 @@ type AssociateRepositoryInput struct { // A KMSKeyDetails object that contains: // // * The encryption option for this - // repository association. It is either owned by AWS Key Management Service (KMS) - // (AWS_OWNED_CMK) or customer managed (CUSTOMER_MANAGED_CMK). + // repository association. It is either owned by Amazon Web Services Key Management + // Service (KMS) (AWS_OWNED_CMK) or customer managed (CUSTOMER_MANAGED_CMK). // - // * The ID of the AWS - // KMS key that is associated with this respository association. + // * The + // ID of the Amazon Web Services KMS key that is associated with this respository + // association. KMSKeyDetails *types.KMSKeyDetails // An array of key-value pairs used to tag an associated repository. A tag is a diff --git a/service/codegurureviewer/api_op_CreateCodeReview.go b/service/codegurureviewer/api_op_CreateCodeReview.go index f4ac124abd2..641f05e6fe2 100644 --- a/service/codegurureviewer/api_op_CreateCodeReview.go +++ b/service/codegurureviewer/api_op_CreateCodeReview.go @@ -34,8 +34,8 @@ func (c *Client) CreateCodeReview(ctx context.Context, params *CreateCodeReviewI type CreateCodeReviewInput struct { - // The name of the code review. The name of each code review in your AWS account - // must be unique. + // The name of the code review. The name of each code review in your Amazon Web + // Services account must be unique. // // This member is required. Name *string diff --git a/service/codegurureviewer/api_op_DescribeRecommendationFeedback.go b/service/codegurureviewer/api_op_DescribeRecommendationFeedback.go index 75b5bb51f39..ff7dda26281 100644 --- a/service/codegurureviewer/api_op_DescribeRecommendationFeedback.go +++ b/service/codegurureviewer/api_op_DescribeRecommendationFeedback.go @@ -44,10 +44,10 @@ type DescribeRecommendationFeedbackInput struct { // Optional parameter to describe the feedback for a given user. If this is not // supplied, it defaults to the user making the request. The UserId is an IAM - // principal that can be specified as an AWS account ID or an Amazon Resource Name - // (ARN). For more information, see Specifying a Principal + // principal that can be specified as an Amazon Web Services account ID or an + // Amazon Resource Name (ARN). For more information, see Specifying a Principal // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#Principal_specifying) - // in the AWS Identity and Access Management User Guide. + // in the Amazon Web Services Identity and Access Management User Guide. UserId *string noSmithyDocumentSerde diff --git a/service/codegurureviewer/api_op_ListRecommendationFeedback.go b/service/codegurureviewer/api_op_ListRecommendationFeedback.go index 36275803997..8ecc4b4ba67 100644 --- a/service/codegurureviewer/api_op_ListRecommendationFeedback.go +++ b/service/codegurureviewer/api_op_ListRecommendationFeedback.go @@ -52,12 +52,13 @@ type ListRecommendationFeedbackInput struct { // Used to query the recommendation feedback for a given recommendation. RecommendationIds []string - // An AWS user's account ID or Amazon Resource Name (ARN). Use this ID to query the - // recommendation feedback for a code review from that user. The UserId is an IAM - // principal that can be specified as an AWS account ID or an Amazon Resource Name - // (ARN). For more information, see Specifying a Principal + // An Amazon Web Services user's account ID or Amazon Resource Name (ARN). Use this + // ID to query the recommendation feedback for a code review from that user. The + // UserId is an IAM principal that can be specified as an Amazon Web Services + // account ID or an Amazon Resource Name (ARN). For more information, see + // Specifying a Principal // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#Principal_specifying) - // in the AWS Identity and Access Management User Guide. + // in the Amazon Web Services Identity and Access Management User Guide. UserIds []string noSmithyDocumentSerde diff --git a/service/codegurureviewer/api_op_ListRepositoryAssociations.go b/service/codegurureviewer/api_op_ListRepositoryAssociations.go index a4bf4e5e7be..6a06a264519 100644 --- a/service/codegurureviewer/api_op_ListRepositoryAssociations.go +++ b/service/codegurureviewer/api_op_ListRepositoryAssociations.go @@ -61,10 +61,10 @@ type ListRepositoryAssociationsInput struct { // for other programmatic purposes. NextToken *string - // List of owners to use as a filter. For AWS CodeCommit, it is the name of the - // CodeCommit account that was used to associate the repository. For other - // repository source providers, such as Bitbucket and GitHub Enterprise Server, - // this is name of the account that was used to associate the repository. + // List of owners to use as a filter. For Amazon Web Services CodeCommit, it is the + // name of the CodeCommit account that was used to associate the repository. For + // other repository source providers, such as Bitbucket and GitHub Enterprise + // Server, this is name of the account that was used to associate the repository. Owners []string // List of provider types to use as a filter. diff --git a/service/codegurureviewer/deserializers.go b/service/codegurureviewer/deserializers.go index 8978c7283df..81e59eae68e 100644 --- a/service/codegurureviewer/deserializers.go +++ b/service/codegurureviewer/deserializers.go @@ -3570,6 +3570,20 @@ func awsRestjson1_deserializeDocumentRecommendationSummary(v **types.Recommendat sv.RecommendationId = ptr.String(jtv) } + case "RuleMetadata": + if err := awsRestjson1_deserializeDocumentRuleMetadata(&sv.RuleMetadata, value); err != nil { + return err + } + + case "Severity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Severity to be of type string, got %T instead", value) + } + sv.Severity = types.Severity(jtv) + } + case "StartLine": if value != nil { jtv, ok := value.(json.Number) @@ -4024,6 +4038,114 @@ func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.Resourc return nil } +func awsRestjson1_deserializeDocumentRuleMetadata(v **types.RuleMetadata, 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.RuleMetadata + if *v == nil { + sv = &types.RuleMetadata{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LongDescription": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LongDescription to be of type string, got %T instead", value) + } + sv.LongDescription = ptr.String(jtv) + } + + case "RuleId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleId to be of type string, got %T instead", value) + } + sv.RuleId = ptr.String(jtv) + } + + case "RuleName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleName to be of type string, got %T instead", value) + } + sv.RuleName = ptr.String(jtv) + } + + case "RuleTags": + if err := awsRestjson1_deserializeDocumentRuleTags(&sv.RuleTags, value); err != nil { + return err + } + + case "ShortDescription": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortDescription to be of type string, got %T instead", value) + } + sv.ShortDescription = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRuleTags(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 RuleTag to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentS3BucketRepository(v **types.S3BucketRepository, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/codegurureviewer/doc.go b/service/codegurureviewer/doc.go index 0e20746a609..17ae7300078 100644 --- a/service/codegurureviewer/doc.go +++ b/service/codegurureviewer/doc.go @@ -15,7 +15,7 @@ // improve the security of your CodeGuru Reviewer API calls, you can establish a // private connection between your VPC and CodeGuru Reviewer by creating an // interface VPC endpoint. For more information, see CodeGuru Reviewer and -// interface VPC endpoints (AWS PrivateLink) +// interface VPC endpoints (Amazon Web Services PrivateLink) // (https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/vpc-interface-endpoints.html) // in the Amazon CodeGuru Reviewer User Guide. package codegurureviewer diff --git a/service/codegurureviewer/types/enums.go b/service/codegurureviewer/types/enums.go index 96b72e7ff8d..4a00a63a39f 100644 --- a/service/codegurureviewer/types/enums.go +++ b/service/codegurureviewer/types/enums.go @@ -116,6 +116,7 @@ const ( RecommendationCategoryJavaBestPractices RecommendationCategory = "JavaBestPractices" RecommendationCategoryResourceLeaks RecommendationCategory = "ResourceLeaks" RecommendationCategorySecurityIssues RecommendationCategory = "SecurityIssues" + RecommendationCategoryCodeInconsistencies RecommendationCategory = "CodeInconsistencies" ) // Values returns all known values for RecommendationCategory. Note that this can @@ -133,6 +134,7 @@ func (RecommendationCategory) Values() []RecommendationCategory { "JavaBestPractices", "ResourceLeaks", "SecurityIssues", + "CodeInconsistencies", } } @@ -160,6 +162,30 @@ func (RepositoryAssociationState) Values() []RepositoryAssociationState { } } +type Severity string + +// Enum values for Severity +const ( + SeverityInfo Severity = "Info" + SeverityLow Severity = "Low" + SeverityMedium Severity = "Medium" + SeverityHigh Severity = "High" + SeverityCritical Severity = "Critical" +) + +// Values returns all known values for Severity. 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 (Severity) Values() []Severity { + return []Severity{ + "Info", + "Low", + "Medium", + "High", + "Critical", + } +} + type Type string // Enum values for Type diff --git a/service/codegurureviewer/types/types.go b/service/codegurureviewer/types/types.go index 1383659f34f..d4010017dca 100644 --- a/service/codegurureviewer/types/types.go +++ b/service/codegurureviewer/types/types.go @@ -52,15 +52,15 @@ type CodeArtifacts struct { noSmithyDocumentSerde } -// Information about an AWS CodeCommit repository. The CodeCommit repository must -// be in the same AWS Region and AWS account where its CodeGuru Reviewer code -// reviews are configured. +// Information about an Amazon Web Services CodeCommit repository. The CodeCommit +// repository must be in the same Amazon Web Services Region and Amazon Web +// Services account where its CodeGuru Reviewer code reviews are configured. type CodeCommitRepository struct { - // The name of the AWS CodeCommit repository. For more information, see - // repositoryName + // The name of the Amazon Web Services CodeCommit repository. For more information, + // see repositoryName // (https://docs.aws.amazon.com/codecommit/latest/APIReference/API_GetRepository.html#CodeCommit-GetRepository-request-repositoryName) - // in the AWS CodeCommit API Reference. + // in the Amazon Web Services CodeCommit API Reference. // // This member is required. Name *string @@ -101,11 +101,11 @@ type CodeReview struct { // The name of the code review. Name *string - // The owner of the repository. For an AWS CodeCommit repository, this is the AWS - // account ID of the account that owns the repository. For a GitHub, GitHub - // Enterprise Server, or Bitbucket repository, this is the username for the account - // that owns the repository. For an S3 repository, it can be the username or AWS - // account ID. + // The owner of the repository. For an Amazon Web Services CodeCommit repository, + // this is the Amazon Web Services account ID of the account that owns the + // repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, + // this is the username for the account that owns the repository. For an S3 + // repository, it can be the username or Amazon Web Services account ID. Owner *string // The type of repository that contains the reviewed code (for example, GitHub or @@ -164,11 +164,11 @@ type CodeReviewSummary struct { // The name of the code review. Name *string - // The owner of the repository. For an AWS CodeCommit repository, this is the AWS - // account ID of the account that owns the repository. For a GitHub, GitHub - // Enterprise Server, or Bitbucket repository, this is the username for the account - // that owns the repository. For an S3 repository, it can be the username or AWS - // account ID. + // The owner of the repository. For an Amazon Web Services CodeCommit repository, + // this is the Amazon Web Services account ID of the account that owns the + // repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, + // this is the username for the account that owns the repository. For an S3 + // repository, it can be the username or Amazon Web Services account ID. Owner *string // The provider type of the repository association. @@ -268,19 +268,20 @@ type EventInfo struct { // An object that contains: // // * The encryption option for a repository association. -// It is either owned by AWS Key Management Service (KMS) (AWS_OWNED_CMK) or -// customer managed (CUSTOMER_MANAGED_CMK). +// It is either owned by Amazon Web Services Key Management Service (KMS) +// (AWS_OWNED_CMK) or customer managed (CUSTOMER_MANAGED_CMK). // -// * The ID of the AWS KMS key that is -// associated with a respository association. +// * The ID of the +// Amazon Web Services KMS key that is associated with a respository association. type KMSKeyDetails struct { - // The encryption option for a repository association. It is either owned by AWS - // Key Management Service (KMS) (AWS_OWNED_CMK) or customer managed + // The encryption option for a repository association. It is either owned by Amazon + // Web Services Key Management Service (KMS) (AWS_OWNED_CMK) or customer managed // (CUSTOMER_MANAGED_CMK). EncryptionOption EncryptionOption - // The ID of the AWS KMS key that is associated with a respository association. + // The ID of the Amazon Web Services KMS key that is associated with a respository + // association. KMSKeyId *string noSmithyDocumentSerde @@ -292,17 +293,9 @@ type Metrics struct { // Total number of recommendations found in the code review. FindingsCount *int64 - // Lines of code metered in the code review. For the initial code review pull - // request and all subsequent revisions, this includes all lines of code in the - // files added to the pull request. In subsequent revisions, for files that already - // existed in the pull request, this includes only the changed lines of code. In - // both cases, this does not include non-code lines such as comments and import - // statements. For example, if you submit a pull request containing 5 files, each - // with 500 lines of code, and in a subsequent revision you added a new file with - // 200 lines of code, and also modified a total of 25 lines across the initial 5 - // files, MeteredLinesOfCodeCount includes the first 5 files (5 * 500 = 2,500 - // lines), the new file (200 lines) and the 25 changed lines of code for a total of - // 2,725 lines of code. + // MeteredLinesOfCode is the number of lines of code in the repository where the + // code review happened. This does not include non-code lines such as comments and + // blank lines. MeteredLinesOfCodeCount *int64 noSmithyDocumentSerde @@ -353,10 +346,10 @@ type RecommendationFeedback struct { RecommendationId *string // The ID of the user that made the API call. The UserId is an IAM principal that - // can be specified as an AWS account ID or an Amazon Resource Name (ARN). For more - // information, see Specifying a Principal + // can be specified as an Amazon Web Services account ID or an Amazon Resource Name + // (ARN). For more information, see Specifying a Principal // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#Principal_specifying) - // in the AWS Identity and Access Management User Guide. + // in the Amazon Web Services Identity and Access Management User Guide. UserId *string noSmithyDocumentSerde @@ -373,10 +366,10 @@ type RecommendationFeedbackSummary struct { RecommendationId *string // The ID of the user that gave the feedback. The UserId is an IAM principal that - // can be specified as an AWS account ID or an Amazon Resource Name (ARN). For more - // information, see Specifying a Principal + // can be specified as an Amazon Web Services account ID or an Amazon Resource Name + // (ARN). For more information, see Specifying a Principal // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#Principal_specifying) - // in the AWS Identity and Access Management User Guide. + // in the Amazon Web Services Identity and Access Management User Guide. UserId *string noSmithyDocumentSerde @@ -404,6 +397,15 @@ type RecommendationSummary struct { // Later on it can be used to collect the feedback. RecommendationId *string + // Metadata about a rule. Rule metadata includes an ID, a name, a list of tags, and + // a short and long description. CodeGuru Reviewer uses rules to analyze code. A + // rule's recommendation is included in analysis results if code is detected that + // violates the rule. + RuleMetadata *RuleMetadata + + // The severity of the issue in the code that generated this recommendation. + Severity Severity + // Start line from where the recommendation is applicable in the source commit or // source branch. StartLine *int32 @@ -411,16 +413,16 @@ type RecommendationSummary struct { noSmithyDocumentSerde } -// Information about an associated AWS CodeCommit repository or an associated -// repository that is managed by AWS CodeStar Connections (for example, Bitbucket). -// This Repository object is not used if your source code is in an associated -// GitHub repository. +// Information about an associated Amazon Web Services CodeCommit repository or an +// associated repository that is managed by Amazon Web Services CodeStar +// Connections (for example, Bitbucket). This Repository object is not used if your +// source code is in an associated GitHub repository. type Repository struct { // Information about a Bitbucket repository. Bitbucket *ThirdPartySourceRepository - // Information about an AWS CodeCommit repository. + // Information about an Amazon Web Services CodeCommit repository. CodeCommit *CodeCommitRepository // Information about a GitHub Enterprise Server repository. @@ -460,12 +462,12 @@ type RepositoryAssociation struct { // The ID of the repository association. AssociationId *string - // The Amazon Resource Name (ARN) of an AWS CodeStar Connections connection. Its - // format is + // The Amazon Resource Name (ARN) of an Amazon Web Services CodeStar Connections + // connection. Its format is // arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id. // For more information, see Connection // (https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_Connection.html) - // in the AWS CodeStar Connections API Reference. + // in the Amazon Web Services CodeStar Connections API Reference. ConnectionArn *string // The time, in milliseconds since the epoch, when the repository association was @@ -475,11 +477,12 @@ type RepositoryAssociation struct { // A KMSKeyDetails object that contains: // // * The encryption option for this - // repository association. It is either owned by AWS Key Management Service (KMS) - // (AWS_OWNED_CMK) or customer managed (CUSTOMER_MANAGED_CMK). + // repository association. It is either owned by Amazon Web Services Key Management + // Service (KMS) (AWS_OWNED_CMK) or customer managed (CUSTOMER_MANAGED_CMK). // - // * The ID of the AWS - // KMS key that is associated with this respository association. + // * The + // ID of the Amazon Web Services KMS key that is associated with this respository + // association. KMSKeyDetails *KMSKeyDetails // The time, in milliseconds since the epoch, when the repository association was @@ -489,11 +492,11 @@ type RepositoryAssociation struct { // The name of the repository. Name *string - // The owner of the repository. For an AWS CodeCommit repository, this is the AWS - // account ID of the account that owns the repository. For a GitHub, GitHub - // Enterprise Server, or Bitbucket repository, this is the username for the account - // that owns the repository. For an S3 repository, it can be the username or AWS - // account ID. + // The owner of the repository. For an Amazon Web Services CodeCommit repository, + // this is the Amazon Web Services account ID of the account that owns the + // repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, + // this is the username for the account that owns the repository. For an S3 + // repository, it can be the username or Amazon Web Services account ID. Owner *string // The provider type of the repository association. @@ -559,12 +562,12 @@ type RepositoryAssociationSummary struct { // The repository association ID. AssociationId *string - // The Amazon Resource Name (ARN) of an AWS CodeStar Connections connection. Its - // format is + // The Amazon Resource Name (ARN) of an Amazon Web Services CodeStar Connections + // connection. Its format is // arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id. // For more information, see Connection // (https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_Connection.html) - // in the AWS CodeStar Connections API Reference. + // in the Amazon Web Services CodeStar Connections API Reference. ConnectionArn *string // The time, in milliseconds since the epoch, since the repository association was @@ -574,11 +577,11 @@ type RepositoryAssociationSummary struct { // The name of the repository association. Name *string - // The owner of the repository. For an AWS CodeCommit repository, this is the AWS - // account ID of the account that owns the repository. For a GitHub, GitHub - // Enterprise Server, or Bitbucket repository, this is the username for the account - // that owns the repository. For an S3 repository, it can be the username or AWS - // account ID. + // The owner of the repository. For an Amazon Web Services CodeCommit repository, + // this is the Amazon Web Services account ID of the account that owns the + // repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, + // this is the username for the account that owns the repository. For an S3 + // repository, it can be the username or Amazon Web Services account ID. Owner *string // The provider type of the repository association. @@ -662,6 +665,30 @@ type RequestMetadata struct { noSmithyDocumentSerde } +// Metadata about a rule. Rule metadata includes an ID, a name, a list of tags, and +// a short and long description. CodeGuru Reviewer uses rules to analyze code. A +// rule's recommendation is included in analysis results if code is detected that +// violates the rule. +type RuleMetadata struct { + + // A long description of the rule. + LongDescription *string + + // The ID of the rule. + RuleId *string + + // The name of the rule. + RuleName *string + + // Tags that are associated with the rule. + RuleTags []string + + // A short description of the rule. + ShortDescription *string + + noSmithyDocumentSerde +} + // Information about an associated repository in an S3 bucket. The associated // repository contains a source code .zip file and a build artifacts .zip file that // contains .jar or .class files. @@ -756,12 +783,12 @@ type SourceCodeType struct { // Reviewer. type ThirdPartySourceRepository struct { - // The Amazon Resource Name (ARN) of an AWS CodeStar Connections connection. Its - // format is + // The Amazon Resource Name (ARN) of an Amazon Web Services CodeStar Connections + // connection. Its format is // arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id. // For more information, see Connection // (https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_Connection.html) - // in the AWS CodeStar Connections API Reference. + // in the Amazon Web Services CodeStar Connections API Reference. // // This member is required. ConnectionArn *string @@ -773,7 +800,7 @@ type ThirdPartySourceRepository struct { // The owner of the repository. For a GitHub, GitHub Enterprise, or Bitbucket // repository, this is the username for the account that owns the repository. For - // an S3 repository, this can be the username or AWS account ID. + // an S3 repository, this can be the username or Amazon Web Services account ID. // // This member is required. Owner *string diff --git a/service/eks/api_op_DeregisterCluster.go b/service/eks/api_op_DeregisterCluster.go new file mode 100644 index 00000000000..302306f5ca6 --- /dev/null +++ b/service/eks/api_op_DeregisterCluster.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package eks + +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/eks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deregisters a connected cluster to remove it from the Amazon EKS control plane. +func (c *Client) DeregisterCluster(ctx context.Context, params *DeregisterClusterInput, optFns ...func(*Options)) (*DeregisterClusterOutput, error) { + if params == nil { + params = &DeregisterClusterInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeregisterCluster", params, optFns, c.addOperationDeregisterClusterMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeregisterClusterOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeregisterClusterInput struct { + + // The name of the connected cluster to deregister. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type DeregisterClusterOutput struct { + + // An object representing an Amazon EKS cluster. + Cluster *types.Cluster + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeregisterClusterMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeregisterCluster{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeregisterCluster{}, 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 = addOpDeregisterClusterValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterCluster(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_opDeregisterCluster(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "eks", + OperationName: "DeregisterCluster", + } +} diff --git a/service/eks/api_op_DescribeCluster.go b/service/eks/api_op_DescribeCluster.go index f21fcc54ddd..7afd9c575de 100644 --- a/service/eks/api_op_DescribeCluster.go +++ b/service/eks/api_op_DescribeCluster.go @@ -481,6 +481,23 @@ func clusterDeletedStateRetryable(ctx context.Context, input *DescribeClusterInp } } + if err == nil { + pathValue, err := jmespath.Search("cluster.status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "PENDING" + value, ok := pathValue.(types.ClusterStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.ClusterStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return false, fmt.Errorf("waiter state transitioned to Failure") + } + } + if err != nil { var errorType *types.ResourceNotFoundException if errors.As(err, &errorType) { diff --git a/service/eks/api_op_ListClusters.go b/service/eks/api_op_ListClusters.go index 35447dd59d8..5ad0a3ff2e1 100644 --- a/service/eks/api_op_ListClusters.go +++ b/service/eks/api_op_ListClusters.go @@ -30,6 +30,10 @@ func (c *Client) ListClusters(ctx context.Context, params *ListClustersInput, op type ListClustersInput struct { + // Indicates whether connected clusters are included in the returned list. Default + // value is 'ALL'. + Include []string + // The maximum number of cluster results returned by ListClusters in paginated // output. When you use this parameter, ListClusters returns only maxResults // results in a single page along with a nextToken response element. You can see diff --git a/service/eks/api_op_RegisterCluster.go b/service/eks/api_op_RegisterCluster.go new file mode 100644 index 00000000000..f654a9b5316 --- /dev/null +++ b/service/eks/api_op_RegisterCluster.go @@ -0,0 +1,179 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package eks + +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/eks/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Connects a Kubernetes cluster to the Amazon EKS control plane. Any Kubernetes +// cluster can be connected to the Amazon EKS control plane to view current +// information about the cluster and its nodes. Cluster connection requires two +// steps. First, send a RegisterClusterRequest to add it to the Amazon EKS control +// plane. Second, a Manifest +// (https://amazon-eks.s3.us-west-2.amazonaws.com/eks-connector/manifests/eks-connector/latest/eks-connector.yaml) +// containing the activationID and activationCode must be applied to the Kubernetes +// cluster through it's native provider to provide visibility. After the Manifest +// is updated and applied, then the connected cluster is visible to the Amazon EKS +// control plane. If the Manifest is not applied within a set amount of time, then +// the connected cluster will no longer be visible and must be deregistered. See +// DeregisterCluster. +func (c *Client) RegisterCluster(ctx context.Context, params *RegisterClusterInput, optFns ...func(*Options)) (*RegisterClusterOutput, error) { + if params == nil { + params = &RegisterClusterInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RegisterCluster", params, optFns, c.addOperationRegisterClusterMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RegisterClusterOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RegisterClusterInput struct { + + // The configuration settings required to connect the Kubernetes cluster to the + // Amazon EKS control plane. + // + // This member is required. + ConnectorConfig *types.ConnectorConfigRequest + + // Define a unique name for this cluster within your AWS account. + // + // This member is required. + Name *string + + // Unique, case-sensitive identifier that you provide to ensure the idempotency of + // the request. + ClientRequestToken *string + + noSmithyDocumentSerde +} + +type RegisterClusterOutput struct { + + // An object representing an Amazon EKS cluster. + Cluster *types.Cluster + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRegisterClusterMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpRegisterCluster{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRegisterCluster{}, 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 = addIdempotencyToken_opRegisterClusterMiddleware(stack, options); err != nil { + return err + } + if err = addOpRegisterClusterValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterCluster(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 +} + +type idempotencyToken_initializeOpRegisterCluster struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpRegisterCluster) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpRegisterCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*RegisterClusterInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *RegisterClusterInput ") + } + + if input.ClientRequestToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientRequestToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opRegisterClusterMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpRegisterCluster{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opRegisterCluster(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "eks", + OperationName: "RegisterCluster", + } +} diff --git a/service/eks/deserializers.go b/service/eks/deserializers.go index 482a85cad69..c2bf48366f0 100644 --- a/service/eks/deserializers.go +++ b/service/eks/deserializers.go @@ -1638,6 +1638,165 @@ func awsRestjson1_deserializeOpDocumentDeleteNodegroupOutput(v **DeleteNodegroup return nil } +type awsRestjson1_deserializeOpDeregisterCluster struct { +} + +func (*awsRestjson1_deserializeOpDeregisterCluster) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeregisterCluster) 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_deserializeOpErrorDeregisterCluster(response, &metadata) + } + output := &DeregisterClusterOutput{} + 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_deserializeOpDocumentDeregisterClusterOutput(&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_deserializeOpErrorDeregisterCluster(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("ClientException", errorCode): + return awsRestjson1_deserializeErrorClientException(response, errorBody) + + case strings.EqualFold("ResourceInUseException", errorCode): + return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServerException", errorCode): + return awsRestjson1_deserializeErrorServerException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDeregisterClusterOutput(v **DeregisterClusterOutput, 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 *DeregisterClusterOutput + if *v == nil { + sv = &DeregisterClusterOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "cluster": + if err := awsRestjson1_deserializeDocumentCluster(&sv.Cluster, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpDescribeAddon struct { } @@ -4056,6 +4215,165 @@ func awsRestjson1_deserializeOpDocumentListUpdatesOutput(v **ListUpdatesOutput, return nil } +type awsRestjson1_deserializeOpRegisterCluster struct { +} + +func (*awsRestjson1_deserializeOpRegisterCluster) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpRegisterCluster) 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_deserializeOpErrorRegisterCluster(response, &metadata) + } + output := &RegisterClusterOutput{} + 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_deserializeOpDocumentRegisterClusterOutput(&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_deserializeOpErrorRegisterCluster(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("ClientException", errorCode): + return awsRestjson1_deserializeErrorClientException(response, errorBody) + + case strings.EqualFold("InvalidParameterException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterException(response, errorBody) + + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + + case strings.EqualFold("ServerException", errorCode): + return awsRestjson1_deserializeErrorServerException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentRegisterClusterOutput(v **RegisterClusterOutput, 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 *RegisterClusterOutput + if *v == nil { + sv = &RegisterClusterOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "cluster": + if err := awsRestjson1_deserializeDocumentCluster(&sv.Cluster, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpTagResource struct { } @@ -6123,6 +6441,11 @@ func awsRestjson1_deserializeDocumentCluster(v **types.Cluster, value interface{ sv.ClientRequestToken = ptr.String(jtv) } + case "connectorConfig": + if err := awsRestjson1_deserializeDocumentConnectorConfigResponse(&sv.ConnectorConfig, value); err != nil { + return err + } + case "createdAt": if value != nil { switch jtv := value.(type) { @@ -6320,6 +6643,89 @@ func awsRestjson1_deserializeDocumentCompatibility(v **types.Compatibility, valu return nil } +func awsRestjson1_deserializeDocumentConnectorConfigResponse(v **types.ConnectorConfigResponse, 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.ConnectorConfigResponse + if *v == nil { + sv = &types.ConnectorConfigResponse{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "activationCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ActivationCode = ptr.String(jtv) + } + + case "activationExpiry": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ActivationExpiry = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "activationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ActivationId = ptr.String(jtv) + } + + case "provider": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Provider = ptr.String(jtv) + } + + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentEncryptionConfig(v **types.EncryptionConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/eks/generated.json b/service/eks/generated.json index 70dcc48430d..eb9d4cae1d5 100644 --- a/service/eks/generated.json +++ b/service/eks/generated.json @@ -16,6 +16,7 @@ "api_op_DeleteCluster.go", "api_op_DeleteFargateProfile.go", "api_op_DeleteNodegroup.go", + "api_op_DeregisterCluster.go", "api_op_DescribeAddon.go", "api_op_DescribeAddonVersions.go", "api_op_DescribeCluster.go", @@ -31,6 +32,7 @@ "api_op_ListNodegroups.go", "api_op_ListTagsForResource.go", "api_op_ListUpdates.go", + "api_op_RegisterCluster.go", "api_op_TagResource.go", "api_op_UntagResource.go", "api_op_UpdateAddon.go", diff --git a/service/eks/serializers.go b/service/eks/serializers.go index 4a96ac0d03e..4bdf23c5dc5 100644 --- a/service/eks/serializers.go +++ b/service/eks/serializers.go @@ -977,6 +977,64 @@ func awsRestjson1_serializeOpHttpBindingsDeleteNodegroupInput(v *DeleteNodegroup return nil } +type awsRestjson1_serializeOpDeregisterCluster struct { +} + +func (*awsRestjson1_serializeOpDeregisterCluster) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeregisterCluster) 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.(*DeregisterClusterInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/cluster-registrations/{name}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeregisterClusterInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeregisterClusterInput(v *DeregisterClusterInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("name").String(*v.Name); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDescribeAddon struct { } @@ -1659,6 +1717,12 @@ func awsRestjson1_serializeOpHttpBindingsListClustersInput(v *ListClustersInput, return fmt.Errorf("unsupported serialization of nil %T", v) } + if v.Include != nil { + for i := range v.Include { + encoder.AddQuery("include").String(v.Include[i]) + } + } + if v.MaxResults != nil { encoder.SetQuery("maxResults").Integer(*v.MaxResults) } @@ -2000,6 +2064,86 @@ func awsRestjson1_serializeOpHttpBindingsListUpdatesInput(v *ListUpdatesInput, e return nil } +type awsRestjson1_serializeOpRegisterCluster struct { +} + +func (*awsRestjson1_serializeOpRegisterCluster) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpRegisterCluster) 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.(*RegisterClusterInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/cluster-registrations") + 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_serializeOpDocumentRegisterClusterInput(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_serializeOpHttpBindingsRegisterClusterInput(v *RegisterClusterInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentRegisterClusterInput(v *RegisterClusterInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientRequestToken != nil { + ok := object.Key("clientRequestToken") + ok.String(*v.ClientRequestToken) + } + + if v.ConnectorConfig != nil { + ok := object.Key("connectorConfig") + if err := awsRestjson1_serializeDocumentConnectorConfigRequest(v.ConnectorConfig, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + return nil +} + type awsRestjson1_serializeOpTagResource struct { } @@ -2663,6 +2807,23 @@ func awsRestjson1_serializeOpDocumentUpdateNodegroupVersionInput(v *UpdateNodegr return nil } +func awsRestjson1_serializeDocumentConnectorConfigRequest(v *types.ConnectorConfigRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Provider) > 0 { + ok := object.Key("provider") + ok.String(string(v.Provider)) + } + + if v.RoleArn != nil { + ok := object.Key("roleArn") + ok.String(*v.RoleArn) + } + + return nil +} + func awsRestjson1_serializeDocumentEncryptionConfig(v *types.EncryptionConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/eks/types/enums.go b/service/eks/types/enums.go index 3e6b14b0ef9..fdb6a95f49d 100644 --- a/service/eks/types/enums.go +++ b/service/eks/types/enums.go @@ -109,6 +109,7 @@ const ( ClusterStatusDeleting ClusterStatus = "DELETING" ClusterStatusFailed ClusterStatus = "FAILED" ClusterStatusUpdating ClusterStatus = "UPDATING" + ClusterStatusPending ClusterStatus = "PENDING" ) // Values returns all known values for ClusterStatus. Note that this can be @@ -121,6 +122,7 @@ func (ClusterStatus) Values() []ClusterStatus { "DELETING", "FAILED", "UPDATING", + "PENDING", } } @@ -144,6 +146,38 @@ func (ConfigStatus) Values() []ConfigStatus { } } +type ConnectorConfigProvider string + +// Enum values for ConnectorConfigProvider +const ( + ConnectorConfigProviderEksAnywhere ConnectorConfigProvider = "EKS_ANYWHERE" + ConnectorConfigProviderAnthos ConnectorConfigProvider = "ANTHOS" + ConnectorConfigProviderGke ConnectorConfigProvider = "GKE" + ConnectorConfigProviderAks ConnectorConfigProvider = "AKS" + ConnectorConfigProviderOpenshift ConnectorConfigProvider = "OPENSHIFT" + ConnectorConfigProviderTanzu ConnectorConfigProvider = "TANZU" + ConnectorConfigProviderRancher ConnectorConfigProvider = "RANCHER" + ConnectorConfigProviderEc2 ConnectorConfigProvider = "EC2" + ConnectorConfigProviderOther ConnectorConfigProvider = "OTHER" +) + +// Values returns all known values for ConnectorConfigProvider. 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 (ConnectorConfigProvider) Values() []ConnectorConfigProvider { + return []ConnectorConfigProvider{ + "EKS_ANYWHERE", + "ANTHOS", + "GKE", + "AKS", + "OPENSHIFT", + "TANZU", + "RANCHER", + "EC2", + "OTHER", + } +} + type ErrorCode string // Enum values for ErrorCode diff --git a/service/eks/types/types.go b/service/eks/types/types.go index 1e699718e28..30b1bb193b6 100644 --- a/service/eks/types/types.go +++ b/service/eks/types/types.go @@ -136,6 +136,9 @@ type Cluster struct { // the request. ClientRequestToken *string + // The configuration used to connect to a cluster for registration. + ConnectorConfig *ConnectorConfigResponse + // The Unix epoch timestamp in seconds for when the cluster was created. CreatedAt *time.Time @@ -207,6 +210,46 @@ type Compatibility struct { noSmithyDocumentSerde } +// The configuration sent to a cluster for configuration. +type ConnectorConfigRequest struct { + + // The cloud provider for the target cluster to connect. + // + // This member is required. + Provider ConnectorConfigProvider + + // The Amazon Resource Name (ARN) of the role that is authorized to request the + // connector configuration. + // + // This member is required. + RoleArn *string + + noSmithyDocumentSerde +} + +// The full description of your connected cluster. +type ConnectorConfigResponse struct { + + // A unique code associated with the cluster for registration purposes. + ActivationCode *string + + // The expiration time of the connected cluster. The cluster's YAML file must be + // applied through the native provider. + ActivationExpiry *time.Time + + // A unique ID associated with the cluster for registration purposes. + ActivationId *string + + // The cluster's cloud service provider. + Provider *string + + // The Amazon Resource Name (ARN) of the role that is used by the EKS connector to + // communicate with AWS services from the connected Kubernetes cluster. + RoleArn *string + + noSmithyDocumentSerde +} + // The encryption configuration for the cluster. type EncryptionConfig struct { @@ -336,7 +379,7 @@ type IdentityProviderConfig struct { noSmithyDocumentSerde } -// An object that represents an identity configuration. +// The full description of your identity configuration. type IdentityProviderConfigResponse struct { // An object that represents an OpenID Connect (OIDC) identity provider diff --git a/service/eks/validators.go b/service/eks/validators.go index 27dec1be972..824222ad7fd 100644 --- a/service/eks/validators.go +++ b/service/eks/validators.go @@ -210,6 +210,26 @@ func (m *validateOpDeleteNodegroup) HandleInitialize(ctx context.Context, in mid return next.HandleInitialize(ctx, in) } +type validateOpDeregisterCluster struct { +} + +func (*validateOpDeregisterCluster) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeregisterCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeregisterClusterInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeregisterClusterInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeAddon struct { } @@ -470,6 +490,26 @@ func (m *validateOpListUpdates) HandleInitialize(ctx context.Context, in middlew return next.HandleInitialize(ctx, in) } +type validateOpRegisterCluster struct { +} + +func (*validateOpRegisterCluster) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRegisterCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RegisterClusterInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRegisterClusterInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpTagResource struct { } @@ -650,6 +690,10 @@ func addOpDeleteNodegroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteNodegroup{}, middleware.After) } +func addOpDeregisterClusterValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeregisterCluster{}, middleware.After) +} + func addOpDescribeAddonValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeAddon{}, middleware.After) } @@ -702,6 +746,10 @@ func addOpListUpdatesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListUpdates{}, middleware.After) } +func addOpRegisterClusterValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRegisterCluster{}, middleware.After) +} + func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) } @@ -730,6 +778,24 @@ func addOpUpdateNodegroupVersionValidationMiddleware(stack *middleware.Stack) er return stack.Initialize.Add(&validateOpUpdateNodegroupVersion{}, middleware.After) } +func validateConnectorConfigRequest(v *types.ConnectorConfigRequest) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ConnectorConfigRequest"} + if v.RoleArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) + } + if len(v.Provider) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Provider")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateIdentityProviderConfig(v *types.IdentityProviderConfig) error { if v == nil { return nil @@ -962,6 +1028,21 @@ func validateOpDeleteNodegroupInput(v *DeleteNodegroupInput) error { } } +func validateOpDeregisterClusterInput(v *DeregisterClusterInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeregisterClusterInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeAddonInput(v *DescribeAddonInput) error { if v == nil { return nil @@ -1183,6 +1264,28 @@ func validateOpListUpdatesInput(v *ListUpdatesInput) error { } } +func validateOpRegisterClusterInput(v *RegisterClusterInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RegisterClusterInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.ConnectorConfig == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConnectorConfig")) + } else if v.ConnectorConfig != nil { + if err := validateConnectorConfigRequest(v.ConnectorConfig); err != nil { + invalidParams.AddNested("ConnectorConfig", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpTagResourceInput(v *TagResourceInput) error { if v == nil { return nil diff --git a/service/elasticache/api_op_CreateUserGroup.go b/service/elasticache/api_op_CreateUserGroup.go index 68c737a826d..cae3ead8650 100644 --- a/service/elasticache/api_op_CreateUserGroup.go +++ b/service/elasticache/api_op_CreateUserGroup.go @@ -59,7 +59,7 @@ type CreateUserGroupOutput struct { // The current supported value is Redis. Engine *string - // A list of updates being applied to the user groups. + // A list of updates being applied to the user group. PendingChanges *types.UserGroupPendingChanges // A list of replication groups that the user group can access. diff --git a/service/elasticache/api_op_DeleteUserGroup.go b/service/elasticache/api_op_DeleteUserGroup.go index 72c2b9d17cf..00b2e6b4a37 100644 --- a/service/elasticache/api_op_DeleteUserGroup.go +++ b/service/elasticache/api_op_DeleteUserGroup.go @@ -48,7 +48,7 @@ type DeleteUserGroupOutput struct { // The current supported value is Redis. Engine *string - // A list of updates being applied to the user groups. + // A list of updates being applied to the user group. PendingChanges *types.UserGroupPendingChanges // A list of replication groups that the user group can access. diff --git a/service/elasticache/api_op_ModifyReplicationGroup.go b/service/elasticache/api_op_ModifyReplicationGroup.go index 4d1f4ed45a2..ffb8f5075ff 100644 --- a/service/elasticache/api_op_ModifyReplicationGroup.go +++ b/service/elasticache/api_op_ModifyReplicationGroup.go @@ -164,7 +164,7 @@ type ModifyReplicationGroupInput struct { // read replicas. PrimaryClusterId *string - // Removes the user groups that can access this replication group. + // Removes the user group associated with this replication group. RemoveUserGroups *bool // A description for the replication group. Maximum length is 255 characters. @@ -193,11 +193,11 @@ type ModifyReplicationGroupInput struct { // groups. SnapshottingClusterId *string - // The user group you are associating with the replication group. + // The ID of the user group you are associating with the replication group. UserGroupIdsToAdd []string - // The user group to remove, meaning the users in the group no longer can access - // the replication group. + // The ID of the user group to disassociate from the replication group, meaning the + // users in the group no longer can access the replication group. UserGroupIdsToRemove []string noSmithyDocumentSerde diff --git a/service/elasticache/api_op_ModifyUserGroup.go b/service/elasticache/api_op_ModifyUserGroup.go index e6f0308d823..0e60c2d11e7 100644 --- a/service/elasticache/api_op_ModifyUserGroup.go +++ b/service/elasticache/api_op_ModifyUserGroup.go @@ -51,7 +51,7 @@ type ModifyUserGroupOutput struct { // The current supported value is Redis. Engine *string - // A list of updates being applied to the user groups. + // A list of updates being applied to the user group. PendingChanges *types.UserGroupPendingChanges // A list of replication groups that the user group can access. diff --git a/service/elasticache/types/errors.go b/service/elasticache/types/errors.go index 213c2713eb2..02a5f1fbcb5 100644 --- a/service/elasticache/types/errors.go +++ b/service/elasticache/types/errors.go @@ -373,7 +373,7 @@ func (e *ClusterQuotaForCustomerExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// +// The default user assigned to the user group. type DefaultUserAssociatedToUserGroupFault struct { Message *string diff --git a/service/elasticache/types/types.go b/service/elasticache/types/types.go index 613c5915f6c..3bb8980ea2a 100644 --- a/service/elasticache/types/types.go +++ b/service/elasticache/types/types.go @@ -1316,7 +1316,7 @@ type ReplicationGroup struct { // group in an Amazon VPC using redis version 3.2.6, 4.x or later. Default: false TransitEncryptionEnabled *bool - // The list of user group IDs that have access to the replication group. + // The ID of the user group associated to the replication group. UserGroupIds []string noSmithyDocumentSerde @@ -1342,7 +1342,7 @@ type ReplicationGroupPendingModifiedValues struct { // The status of an online resharding operation. Resharding *ReshardingStatus - // The user groups being modified. + // The user group being modified. UserGroups *UserGroupsUpdateStatus noSmithyDocumentSerde @@ -2005,7 +2005,7 @@ type UserGroup struct { // The current supported value is Redis. Engine *string - // A list of updates being applied to the user groups. + // A list of updates being applied to the user group. PendingChanges *UserGroupPendingChanges // A list of replication groups that the user group can access. @@ -2039,10 +2039,10 @@ type UserGroupPendingChanges struct { // The status of the user group update. type UserGroupsUpdateStatus struct { - // The list of user group IDs to add. + // The ID of the user group to add. UserGroupIdsToAdd []string - // The list of user group IDs to remove. + // The ID of the user group to remove. UserGroupIdsToRemove []string noSmithyDocumentSerde diff --git a/service/emr/api_op_AddTags.go b/service/emr/api_op_AddTags.go index 7780ecec538..831b9496e7c 100644 --- a/service/emr/api_op_AddTags.go +++ b/service/emr/api_op_AddTags.go @@ -11,9 +11,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Adds tags to an Amazon EMR resource. Tags make it easier to associate clusters -// in various ways, such as grouping clusters to track your Amazon EMR resource -// allocation costs. For more information, see Tag Clusters +// Adds tags to an Amazon EMR resource, such as a cluster or an Amazon EMR Studio. +// Tags make it easier to associate resources in various ways, such as grouping +// clusters to track your Amazon EMR resource allocation costs. For more +// information, see Tag Clusters // (https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-tags.html). func (c *Client) AddTags(ctx context.Context, params *AddTagsInput, optFns ...func(*Options)) (*AddTagsOutput, error) { if params == nil { @@ -30,19 +31,18 @@ func (c *Client) AddTags(ctx context.Context, params *AddTagsInput, optFns ...fu return out, nil } -// This input identifies a cluster and a list of tags to attach. +// This input identifies an Amazon EMR resource and a list of tags to attach. type AddTagsInput struct { - // The Amazon EMR resource identifier to which tags will be added. This value must - // be a cluster identifier. + // The Amazon EMR resource identifier to which tags will be added. For example, a + // cluster identifier or an Amazon EMR Studio ID. // // This member is required. ResourceId *string - // A list of tags to associate with a cluster and propagate to EC2 instances. Tags - // are user-defined key-value pairs that consist of a required key string with a - // maximum of 128 characters, and an optional value string with a maximum of 256 - // characters. + // A list of tags to associate with a resource. Tags are user-defined key-value + // pairs that consist of a required key string with a maximum of 128 characters, + // and an optional value string with a maximum of 256 characters. // // This member is required. Tags []types.Tag diff --git a/service/emr/api_op_CreateStudio.go b/service/emr/api_op_CreateStudio.go index a20ffd45c42..4370bdadd02 100644 --- a/service/emr/api_op_CreateStudio.go +++ b/service/emr/api_op_CreateStudio.go @@ -29,8 +29,8 @@ func (c *Client) CreateStudio(ctx context.Context, params *CreateStudioInput, op type CreateStudioInput struct { - // Specifies whether the Studio authenticates users using single sign-on (SSO) or - // IAM. Amazon EMR Studio currently only supports SSO authentication. + // Specifies whether the Studio authenticates users using IAM or Amazon Web + // Services SSO. // // This member is required. AuthMode types.AuthMode @@ -53,9 +53,8 @@ type CreateStudioInput struct { // This member is required. Name *string - // The IAM role that will be assumed by the Amazon EMR Studio. The service role - // provides a way for Amazon EMR Studio to interoperate with other Amazon Web - // Services services. + // The IAM role that the Amazon EMR Studio assumes. The service role provides a way + // for Amazon EMR Studio to interoperate with other Amazon Web Services services. // // This member is required. ServiceRole *string @@ -67,13 +66,6 @@ type CreateStudioInput struct { // This member is required. SubnetIds []string - // The IAM user role that will be assumed by users and groups logged in to an - // Amazon EMR Studio. The permissions attached to this IAM role can be scoped down - // for each user or group using session policies. - // - // This member is required. - UserRole *string - // The ID of the Amazon Virtual Private Cloud (Amazon VPC) to associate with the // Studio. // @@ -90,11 +82,29 @@ type CreateStudioInput struct { // A detailed description of the Amazon EMR Studio. Description *string + // The authentication endpoint of your identity provider (IdP). Specify this value + // when you use IAM authentication and want to let federated users log in to a + // Studio with the Studio URL and credentials from your IdP. Amazon EMR Studio + // redirects users to this endpoint to enter credentials. + IdpAuthUrl *string + + // The name that your identity provider (IdP) uses for its RelayState parameter. + // For example, RelayState or TargetSource. Specify this value when you use IAM + // authentication and want to let federated users log in to a Studio using the + // Studio URL. The RelayState parameter differs by IdP. + IdpRelayStateParameterName *string + // A list of tags to associate with the Amazon EMR Studio. Tags are user-defined // key-value pairs that consist of a required key string with a maximum of 128 // characters, and an optional value string with a maximum of 256 characters. Tags []types.Tag + // The IAM user role that users and groups assume when logged in to an Amazon EMR + // Studio. Only specify a UserRole when you use Amazon Web Services SSO + // authentication. The permissions attached to the UserRole can be scoped down for + // each user or group using session policies. + UserRole *string + noSmithyDocumentSerde } diff --git a/service/emr/api_op_CreateStudioSessionMapping.go b/service/emr/api_op_CreateStudioSessionMapping.go index afaa2619986..91f3a1f6624 100644 --- a/service/emr/api_op_CreateStudioSessionMapping.go +++ b/service/emr/api_op_CreateStudioSessionMapping.go @@ -12,7 +12,11 @@ import ( ) // Maps a user or group to the Amazon EMR Studio specified by StudioId, and applies -// a session policy to refine Studio permissions for that user or group. +// a session policy to refine Studio permissions for that user or group. Use +// CreateStudioSessionMapping to assign users to a Studio when you use Amazon Web +// Services SSO authentication. For instructions on how to assign users to a Studio +// when you use IAM authentication, see Assign a user or group to your EMR Studio +// (https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-studio-manage-users.html#emr-studio-assign-users-groups). func (c *Client) CreateStudioSessionMapping(ctx context.Context, params *CreateStudioSessionMappingInput, optFns ...func(*Options)) (*CreateStudioSessionMappingOutput, error) { if params == nil { params = &CreateStudioSessionMappingInput{} diff --git a/service/emr/api_op_RemoveTags.go b/service/emr/api_op_RemoveTags.go index 0174c62ef09..a62a54bf062 100644 --- a/service/emr/api_op_RemoveTags.go +++ b/service/emr/api_op_RemoveTags.go @@ -10,9 +10,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Removes tags from an Amazon EMR resource. Tags make it easier to associate -// clusters in various ways, such as grouping clusters to track your Amazon EMR -// resource allocation costs. For more information, see Tag Clusters +// Removes tags from an Amazon EMR resource, such as a cluster or Amazon EMR +// Studio. Tags make it easier to associate resources in various ways, such as +// grouping clusters to track your Amazon EMR resource allocation costs. For more +// information, see Tag Clusters // (https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-tags.html). The // following example removes the stack tag with value Prod from a cluster: func (c *Client) RemoveTags(ctx context.Context, params *RemoveTagsInput, optFns ...func(*Options)) (*RemoveTagsOutput, error) { @@ -30,16 +31,16 @@ func (c *Client) RemoveTags(ctx context.Context, params *RemoveTagsInput, optFns return out, nil } -// This input identifies a cluster and a list of tags to remove. +// This input identifies an Amazon EMR resource and a list of tags to remove. type RemoveTagsInput struct { - // The Amazon EMR resource identifier from which tags will be removed. This value - // must be a cluster identifier. + // The Amazon EMR resource identifier from which tags will be removed. For example, + // a cluster identifier or an Amazon EMR Studio ID. // // This member is required. ResourceId *string - // A list of tag keys to remove from a resource. + // A list of tag keys to remove from the resource. // // This member is required. TagKeys []string @@ -47,7 +48,7 @@ type RemoveTagsInput struct { noSmithyDocumentSerde } -// This output indicates the result of removing tags from a resource. +// This output indicates the result of removing tags from the resource. type RemoveTagsOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/emr/api_op_RunJobFlow.go b/service/emr/api_op_RunJobFlow.go index 9feea4a3875..db2dc1a22b1 100644 --- a/service/emr/api_op_RunJobFlow.go +++ b/service/emr/api_op_RunJobFlow.go @@ -210,8 +210,8 @@ type RunJobFlowInput struct { // The name of a security configuration to apply to the cluster. SecurityConfiguration *string - // The IAM role that will be assumed by the Amazon EMR service to access Amazon Web - // Services resources on your behalf. + // The IAM role that Amazon EMR assumes in order to access Amazon Web Services + // resources on your behalf. ServiceRole *string // Specifies the number of steps that can be executed concurrently. The default diff --git a/service/emr/deserializers.go b/service/emr/deserializers.go index e2a38c3fa03..7d6ac22b9be 100644 --- a/service/emr/deserializers.go +++ b/service/emr/deserializers.go @@ -12561,6 +12561,24 @@ func awsAwsjson11_deserializeDocumentStudio(v **types.Studio, value interface{}) sv.EngineSecurityGroupId = ptr.String(jtv) } + case "IdpAuthUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected XmlString to be of type string, got %T instead", value) + } + sv.IdpAuthUrl = ptr.String(jtv) + } + + case "IdpRelayStateParameterName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected XmlStringMaxLen256 to be of type string, got %T instead", value) + } + sv.IdpRelayStateParameterName = ptr.String(jtv) + } + case "Name": if value != nil { jtv, ok := value.(string) @@ -12674,6 +12692,15 @@ func awsAwsjson11_deserializeDocumentStudioSummary(v **types.StudioSummary, valu for key, value := range shape { switch key { + case "AuthMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AuthMode to be of type string, got %T instead", value) + } + sv.AuthMode = types.AuthMode(jtv) + } + case "CreationTime": if value != nil { switch jtv := value.(type) { diff --git a/service/emr/serializers.go b/service/emr/serializers.go index e9db61624da..3651dc213e4 100644 --- a/service/emr/serializers.go +++ b/service/emr/serializers.go @@ -4125,6 +4125,16 @@ func awsAwsjson11_serializeOpDocumentCreateStudioInput(v *CreateStudioInput, val ok.String(*v.EngineSecurityGroupId) } + if v.IdpAuthUrl != nil { + ok := object.Key("IdpAuthUrl") + ok.String(*v.IdpAuthUrl) + } + + if v.IdpRelayStateParameterName != nil { + ok := object.Key("IdpRelayStateParameterName") + ok.String(*v.IdpRelayStateParameterName) + } + if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) diff --git a/service/emr/types/types.go b/service/emr/types/types.go index 8e395fa59e9..eee2e4c3aa0 100644 --- a/service/emr/types/types.go +++ b/service/emr/types/types.go @@ -385,8 +385,8 @@ type Cluster struct { // The name of the security configuration applied to the cluster. SecurityConfiguration *string - // The IAM role that will be assumed by the Amazon EMR service to access Amazon Web - // Services resources on your behalf. + // The IAM role that Amazon EMR assumes in order to access Amazon Web Services + // resources on your behalf. ServiceRole *string // The current status details about the cluster. @@ -2563,8 +2563,8 @@ type StepTimeline struct { // Details for an Amazon EMR Studio including ID, creation time, name, and so on. type Studio struct { - // Specifies whether the Amazon EMR Studio authenticates users using single sign-on - // (SSO) or IAM. + // Specifies whether the Amazon EMR Studio authenticates users using IAM or Amazon + // Web Services SSO. AuthMode AuthMode // The time the Amazon EMR Studio was created. @@ -2582,6 +2582,14 @@ type Studio struct { // Workspace security group. EngineSecurityGroupId *string + // Your identity provider's authentication endpoint. Amazon EMR Studio redirects + // federated users to this endpoint for authentication when logging in to a Studio + // with the Studio URL. + IdpAuthUrl *string + + // The name of your identity provider's RelayState parameter. + IdpRelayStateParameterName *string + // The name of the Amazon EMR Studio. Name *string @@ -2603,7 +2611,8 @@ type Studio struct { // The unique access URL of the Amazon EMR Studio. Url *string - // The name of the IAM role assumed by users logged in to the Amazon EMR Studio. + // The name of the IAM role assumed by users logged in to the Amazon EMR Studio. A + // Studio only requires a UserRole when you use IAM authentication. UserRole *string // The ID of the VPC associated with the Amazon EMR Studio. @@ -2622,6 +2631,10 @@ type Studio struct { // with the Studio. type StudioSummary struct { + // Specifies whether the Studio authenticates users using IAM or Amazon Web + // Services SSO. + AuthMode AuthMode + // The time when the Amazon EMR Studio was created. CreationTime *time.Time diff --git a/service/emr/validators.go b/service/emr/validators.go index 69936a51f6e..864a93ec57e 100644 --- a/service/emr/validators.go +++ b/service/emr/validators.go @@ -1931,9 +1931,6 @@ func validateOpCreateStudioInput(v *CreateStudioInput) error { if v.ServiceRole == nil { invalidParams.Add(smithy.NewErrParamRequired("ServiceRole")) } - if v.UserRole == nil { - invalidParams.Add(smithy.NewErrParamRequired("UserRole")) - } if v.WorkspaceSecurityGroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("WorkspaceSecurityGroupId")) } diff --git a/service/forecast/api_op_CreatePredictor.go b/service/forecast/api_op_CreatePredictor.go index 76bce3b8177..03dd2eaf067 100644 --- a/service/forecast/api_op_CreatePredictor.go +++ b/service/forecast/api_op_CreatePredictor.go @@ -109,9 +109,11 @@ type CreatePredictorInput struct { // * arn:aws:forecast:::algorithm/Prophet AlgorithmArn *string - // Used to overide the default AutoML strategy, which is to optimize predictor - // accuracy. To apply an AutoML strategy that minimizes training time, use - // LatencyOptimized. This parameter is only valid for predictors trained using + // The LatencyOptimized AutoML override strategy is only available in private beta. + // Contact AWS Support or your account manager to learn more about access + // privileges. Used to overide the default AutoML strategy, which is to optimize + // predictor accuracy. To apply an AutoML strategy that minimizes training time, + // use LatencyOptimized. This parameter is only valid for predictors trained using // AutoML. AutoMLOverrideStrategy types.AutoMLOverrideStrategy @@ -138,6 +140,9 @@ type CreatePredictorInput struct { // HPOConfig object, you must set PerformHPO to true. HPOConfig *types.HyperParameterTuningJobConfig + // The accuracy metric used to optimize the predictor. + OptimizationMetric types.OptimizationMetric + // Whether to perform AutoML. When Amazon Forecast performs AutoML, it evaluates // the algorithms it provides and chooses the best algorithm and configuration for // your training dataset. The default value is false. In this case, you are diff --git a/service/forecast/api_op_DescribePredictor.go b/service/forecast/api_op_DescribePredictor.go index 283993acbc9..764b3559162 100644 --- a/service/forecast/api_op_DescribePredictor.go +++ b/service/forecast/api_op_DescribePredictor.go @@ -64,9 +64,11 @@ type DescribePredictorOutput struct { // When PerformAutoML is specified, the ARN of the chosen algorithm. AutoMLAlgorithmArns []string - // The AutoML strategy used to train the predictor. Unless LatencyOptimized is - // specified, the AutoML strategy optimizes predictor accuracy. This parameter is - // only valid for predictors trained using AutoML. + // The LatencyOptimized AutoML override strategy is only available in private beta. + // Contact AWS Support or your account manager to learn more about access + // privileges. The AutoML strategy used to train the predictor. Unless + // LatencyOptimized is specified, the AutoML strategy optimizes predictor accuracy. + // This parameter is only valid for predictors trained using AutoML. AutoMLOverrideStrategy types.AutoMLOverrideStrategy // When the model training task was created. @@ -128,6 +130,9 @@ type DescribePredictorOutput struct { // If an error occurred, an informational message about the error. Message *string + // The accuracy metric used to optimize the predictor. + OptimizationMetric types.OptimizationMetric + // Whether the predictor is set to perform AutoML. PerformAutoML *bool diff --git a/service/forecast/api_op_GetAccuracyMetrics.go b/service/forecast/api_op_GetAccuracyMetrics.go index d7b687c6415..aa12b84bc27 100644 --- a/service/forecast/api_op_GetAccuracyMetrics.go +++ b/service/forecast/api_op_GetAccuracyMetrics.go @@ -53,11 +53,16 @@ type GetAccuracyMetricsInput struct { type GetAccuracyMetricsOutput struct { - // The AutoML strategy used to train the predictor. Unless LatencyOptimized is - // specified, the AutoML strategy optimizes predictor accuracy. This parameter is - // only valid for predictors trained using AutoML. + // The LatencyOptimized AutoML override strategy is only available in private beta. + // Contact AWS Support or your account manager to learn more about access + // privileges. The AutoML strategy used to train the predictor. Unless + // LatencyOptimized is specified, the AutoML strategy optimizes predictor accuracy. + // This parameter is only valid for predictors trained using AutoML. AutoMLOverrideStrategy types.AutoMLOverrideStrategy + // The accuracy metric used to optimize the predictor. + OptimizationMetric types.OptimizationMetric + // An array of results from evaluating the predictor. PredictorEvaluationResults []types.EvaluationResult diff --git a/service/forecast/deserializers.go b/service/forecast/deserializers.go index c743acebb53..257ac2c47d1 100644 --- a/service/forecast/deserializers.go +++ b/service/forecast/deserializers.go @@ -4914,6 +4914,74 @@ func awsAwsjson11_deserializeDocumentErrorMetric(v **types.ErrorMetric, value in sv.ForecastType = ptr.String(jtv) } + case "MAPE": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.MAPE = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.MAPE = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + case "MASE": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.MASE = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.MASE = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + case "RMSE": if value != nil { switch jtv := value.(type) { @@ -6099,6 +6167,40 @@ func awsAwsjson11_deserializeDocumentMetrics(v **types.Metrics, value interface{ for key, value := range shape { switch key { + case "AverageWeightedQuantileLoss": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.AverageWeightedQuantileLoss = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.AverageWeightedQuantileLoss = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + case "ErrorMetrics": if err := awsAwsjson11_deserializeDocumentErrorMetrics(&sv.ErrorMetrics, value); err != nil { return err @@ -8975,6 +9077,15 @@ func awsAwsjson11_deserializeOpDocumentDescribePredictorOutput(v **DescribePredi sv.Message = ptr.String(jtv) } + case "OptimizationMetric": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OptimizationMetric to be of type string, got %T instead", value) + } + sv.OptimizationMetric = types.OptimizationMetric(jtv) + } + case "PerformAutoML": if value != nil { jtv, ok := value.(bool) @@ -9070,6 +9181,15 @@ func awsAwsjson11_deserializeOpDocumentGetAccuracyMetricsOutput(v **GetAccuracyM sv.AutoMLOverrideStrategy = types.AutoMLOverrideStrategy(jtv) } + case "OptimizationMetric": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OptimizationMetric to be of type string, got %T instead", value) + } + sv.OptimizationMetric = types.OptimizationMetric(jtv) + } + case "PredictorEvaluationResults": if err := awsAwsjson11_deserializeDocumentPredictorEvaluationResults(&sv.PredictorEvaluationResults, value); err != nil { return err diff --git a/service/forecast/serializers.go b/service/forecast/serializers.go index 080030a8fe7..f276e770deb 100644 --- a/service/forecast/serializers.go +++ b/service/forecast/serializers.go @@ -2532,6 +2532,11 @@ func awsAwsjson11_serializeOpDocumentCreatePredictorInput(v *CreatePredictorInpu } } + if len(v.OptimizationMetric) > 0 { + ok := object.Key("OptimizationMetric") + ok.String(string(v.OptimizationMetric)) + } + if v.PerformAutoML != nil { ok := object.Key("PerformAutoML") ok.Boolean(*v.PerformAutoML) diff --git a/service/forecast/types/enums.go b/service/forecast/types/enums.go index e2b73d95472..609afa3f1c5 100644 --- a/service/forecast/types/enums.go +++ b/service/forecast/types/enums.go @@ -142,6 +142,30 @@ func (FilterConditionString) Values() []FilterConditionString { } } +type OptimizationMetric string + +// Enum values for OptimizationMetric +const ( + OptimizationMetricWape OptimizationMetric = "WAPE" + OptimizationMetricRmse OptimizationMetric = "RMSE" + OptimizationMetricAverageWeightedQuantileLoss OptimizationMetric = "AverageWeightedQuantileLoss" + OptimizationMetricMase OptimizationMetric = "MASE" + OptimizationMetricMape OptimizationMetric = "MAPE" +) + +// Values returns all known values for OptimizationMetric. 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 (OptimizationMetric) Values() []OptimizationMetric { + return []OptimizationMetric{ + "WAPE", + "RMSE", + "AverageWeightedQuantileLoss", + "MASE", + "MAPE", + } +} + type ScalingType string // Enum values for ScalingType diff --git a/service/forecast/types/types.go b/service/forecast/types/types.go index b2e9a780fe5..1d181cffa3c 100644 --- a/service/forecast/types/types.go +++ b/service/forecast/types/types.go @@ -221,9 +221,15 @@ type EncryptionConfig struct { // object is part of the Metrics object. type ErrorMetric struct { - // The Forecast type used to compute WAPE and RMSE. + // The Forecast type used to compute WAPE, MAPE, MASE, and RMSE. ForecastType *string + // The Mean Absolute Percentage Error (MAPE) + MAPE *float64 + + // The Mean Absolute Scaled Error (MASE) + MASE *float64 + // The root-mean-square error (RMSE). RMSE *float64 @@ -619,8 +625,12 @@ type IntegerParameterRange struct { // object is part of the WindowSummary object. type Metrics struct { - // Provides detailed error metrics on forecast type, root-mean square-error (RMSE), - // and weighted average percentage error (WAPE). + // The average value of all weighted quantile losses. + AverageWeightedQuantileLoss *float64 + + // Provides detailed error metrics for each forecast type. Metrics include + // root-mean square-error (RMSE), mean absolute percentage error (MAPE), mean + // absolute scaled error (MASE), and weighted average percentage error (WAPE). ErrorMetrics []ErrorMetric // The root-mean-square error (RMSE). diff --git a/service/frauddetector/api_op_GetEventPrediction.go b/service/frauddetector/api_op_GetEventPrediction.go index dd62d400a83..d3c00096542 100644 --- a/service/frauddetector/api_op_GetEventPrediction.go +++ b/service/frauddetector/api_op_GetEventPrediction.go @@ -93,6 +93,9 @@ type GetEventPredictionInput struct { type GetEventPredictionOutput struct { + // The model scores for Amazon SageMaker models. + ExternalModelOutputs []types.ExternalModelOutputs + // The model scores. Amazon Fraud Detector generates model scores between 0 and // 1000, where 0 is low fraud risk and 1000 is high fraud risk. Model scores are // directly related to the false positive rate (FPR). For example, a score of 600 diff --git a/service/frauddetector/deserializers.go b/service/frauddetector/deserializers.go index f33df35561f..72bfbc086a2 100644 --- a/service/frauddetector/deserializers.go +++ b/service/frauddetector/deserializers.go @@ -8477,6 +8477,132 @@ func awsAwsjson11_deserializeDocumentExternalModelList(v *[]types.ExternalModel, return nil } +func awsAwsjson11_deserializeDocumentExternalModelOutputs(v **types.ExternalModelOutputs, 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.ExternalModelOutputs + if *v == nil { + sv = &types.ExternalModelOutputs{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "externalModel": + if err := awsAwsjson11_deserializeDocumentExternalModelSummary(&sv.ExternalModel, value); err != nil { + return err + } + + case "outputs": + if err := awsAwsjson11_deserializeDocumentExternalModelPredictionMap(&sv.Outputs, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentExternalModelPredictionMap(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 string to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentExternalModelSummary(v **types.ExternalModelSummary, 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.ExternalModelSummary + if *v == nil { + sv = &types.ExternalModelSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "modelEndpoint": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected string to be of type string, got %T instead", value) + } + sv.ModelEndpoint = ptr.String(jtv) + } + + case "modelSource": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ModelSource to be of type string, got %T instead", value) + } + sv.ModelSource = types.ModelSource(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentFieldValidationMessage(v **types.FieldValidationMessage, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8975,6 +9101,40 @@ func awsAwsjson11_deserializeDocumentLabelSchema(v **types.LabelSchema, value in return nil } +func awsAwsjson11_deserializeDocumentListOfExternalModelOutputs(v *[]types.ExternalModelOutputs, 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.ExternalModelOutputs + if *v == nil { + cv = []types.ExternalModelOutputs{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ExternalModelOutputs + destAddr := &col + if err := awsAwsjson11_deserializeDocumentExternalModelOutputs(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentListOfLogOddsMetrics(v *[]types.LogOddsMetric, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12170,6 +12330,11 @@ func awsAwsjson11_deserializeOpDocumentGetEventPredictionOutput(v **GetEventPred for key, value := range shape { switch key { + case "externalModelOutputs": + if err := awsAwsjson11_deserializeDocumentListOfExternalModelOutputs(&sv.ExternalModelOutputs, value); err != nil { + return err + } + case "modelScores": if err := awsAwsjson11_deserializeDocumentListOfModelScores(&sv.ModelScores, value); err != nil { return err diff --git a/service/frauddetector/types/types.go b/service/frauddetector/types/types.go index b20e0492cee..df6844b8413 100644 --- a/service/frauddetector/types/types.go +++ b/service/frauddetector/types/types.go @@ -260,6 +260,30 @@ type ExternalModel struct { noSmithyDocumentSerde } +// The fraud prediction scores from Amazon SageMaker model. +type ExternalModelOutputs struct { + + // The Amazon SageMaker model. + ExternalModel *ExternalModelSummary + + // The fraud prediction scores from Amazon SageMaker model. + Outputs map[string]string + + noSmithyDocumentSerde +} + +// The Amazon SageMaker model. +type ExternalModelSummary struct { + + // The endpoint of the Amazon SageMaker model. + ModelEndpoint *string + + // The source of the model. + ModelSource ModelSource + + noSmithyDocumentSerde +} + // The message details. type FieldValidationMessage struct { diff --git a/service/kafka/api_op_UpdateSecurity.go b/service/kafka/api_op_UpdateSecurity.go new file mode 100644 index 00000000000..bb7c838c7c2 --- /dev/null +++ b/service/kafka/api_op_UpdateSecurity.go @@ -0,0 +1,138 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package kafka + +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/kafka/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the security settings for the cluster. You can use this operation to +// specify encryption and authentication on existing clusters. +func (c *Client) UpdateSecurity(ctx context.Context, params *UpdateSecurityInput, optFns ...func(*Options)) (*UpdateSecurityOutput, error) { + if params == nil { + params = &UpdateSecurityInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateSecurity", params, optFns, c.addOperationUpdateSecurityMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateSecurityOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateSecurityInput struct { + + // The Amazon Resource Name (ARN) that uniquely identifies the cluster. + // + // This member is required. + ClusterArn *string + + // The version of the MSK cluster to update. Cluster versions aren't simple + // numbers. You can describe an MSK cluster to find its version. When this update + // operation is successful, it generates a new cluster version. + // + // This member is required. + CurrentVersion *string + + // Includes all client authentication related information. + ClientAuthentication *types.ClientAuthentication + + // Includes all encryption-related information. + EncryptionInfo *types.EncryptionInfo + + noSmithyDocumentSerde +} + +type UpdateSecurityOutput struct { + + // The Amazon Resource Name (ARN) of the cluster. + ClusterArn *string + + // The Amazon Resource Name (ARN) of the cluster operation. + ClusterOperationArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateSecurityMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateSecurity{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateSecurity{}, 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 = addOpUpdateSecurityValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSecurity(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_opUpdateSecurity(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "kafka", + OperationName: "UpdateSecurity", + } +} diff --git a/service/kafka/deserializers.go b/service/kafka/deserializers.go index b757c0a3f63..30adad8a356 100644 --- a/service/kafka/deserializers.go +++ b/service/kafka/deserializers.go @@ -5115,6 +5115,184 @@ func awsRestjson1_deserializeOpDocumentUpdateMonitoringOutput(v **UpdateMonitori return nil } +type awsRestjson1_deserializeOpUpdateSecurity struct { +} + +func (*awsRestjson1_deserializeOpUpdateSecurity) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateSecurity) 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_deserializeOpErrorUpdateSecurity(response, &metadata) + } + output := &UpdateSecurityOutput{} + 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_deserializeOpDocumentUpdateSecurityOutput(&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_deserializeOpErrorUpdateSecurity(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + case strings.EqualFold("UnauthorizedException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateSecurityOutput(v **UpdateSecurityOutput, 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 *UpdateSecurityOutput + if *v == nil { + sv = &UpdateSecurityOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "clusterArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.ClusterArn = ptr.String(jtv) + } + + case "clusterOperationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.ClusterOperationArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeErrorBadRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.BadRequestException{} var buff [1024]byte @@ -6223,6 +6401,11 @@ func awsRestjson1_deserializeDocumentClientAuthentication(v **types.ClientAuthen return err } + case "unauthenticated": + if err := awsRestjson1_deserializeDocumentUnauthenticated(&sv.Unauthenticated, value); err != nil { + return err + } + default: _, _ = key, value @@ -7522,11 +7705,21 @@ func awsRestjson1_deserializeDocumentMutableClusterInfo(v **types.MutableCluster return err } + case "clientAuthentication": + if err := awsRestjson1_deserializeDocumentClientAuthentication(&sv.ClientAuthentication, value); err != nil { + return err + } + case "configurationInfo": if err := awsRestjson1_deserializeDocumentConfigurationInfo(&sv.ConfigurationInfo, value); err != nil { return err } + case "encryptionInfo": + if err := awsRestjson1_deserializeDocumentEncryptionInfo(&sv.EncryptionInfo, value); err != nil { + return err + } + case "enhancedMonitoring": if value != nil { jtv, ok := value.(string) @@ -8129,6 +8322,15 @@ func awsRestjson1_deserializeDocumentTls(v **types.Tls, value interface{}) error return err } + case "enabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected __boolean to be of type *bool, got %T instead", value) + } + sv.Enabled = jtv + } + default: _, _ = key, value @@ -8187,6 +8389,46 @@ func awsRestjson1_deserializeDocumentTooManyRequestsException(v **types.TooManyR return nil } +func awsRestjson1_deserializeDocumentUnauthenticated(v **types.Unauthenticated, 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.Unauthenticated + if *v == nil { + sv = &types.Unauthenticated{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "enabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected __boolean to be of type *bool, got %T instead", value) + } + sv.Enabled = jtv + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentUnauthorizedException(v **types.UnauthorizedException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/kafka/generated.json b/service/kafka/generated.json index 5104342af3a..9b2d36860a5 100644 --- a/service/kafka/generated.json +++ b/service/kafka/generated.json @@ -35,6 +35,7 @@ "api_op_UpdateClusterKafkaVersion.go", "api_op_UpdateConfiguration.go", "api_op_UpdateMonitoring.go", + "api_op_UpdateSecurity.go", "deserializers.go", "doc.go", "endpoints.go", diff --git a/service/kafka/serializers.go b/service/kafka/serializers.go index fb0a6d7669b..63bb7fb2209 100644 --- a/service/kafka/serializers.go +++ b/service/kafka/serializers.go @@ -2220,6 +2220,101 @@ func awsRestjson1_serializeOpDocumentUpdateMonitoringInput(v *UpdateMonitoringIn return nil } +type awsRestjson1_serializeOpUpdateSecurity struct { +} + +func (*awsRestjson1_serializeOpUpdateSecurity) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateSecurity) 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.(*UpdateSecurityInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/clusters/{ClusterArn}/security") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PATCH" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateSecurityInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateSecurityInput(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_serializeOpHttpBindingsUpdateSecurityInput(v *UpdateSecurityInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ClusterArn == nil || len(*v.ClusterArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ClusterArn must not be empty")} + } + if v.ClusterArn != nil { + if err := encoder.SetURI("ClusterArn").String(*v.ClusterArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateSecurityInput(v *UpdateSecurityInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientAuthentication != nil { + ok := object.Key("clientAuthentication") + if err := awsRestjson1_serializeDocumentClientAuthentication(v.ClientAuthentication, ok); err != nil { + return err + } + } + + if v.CurrentVersion != nil { + ok := object.Key("currentVersion") + ok.String(*v.CurrentVersion) + } + + if v.EncryptionInfo != nil { + ok := object.Key("encryptionInfo") + if err := awsRestjson1_serializeDocumentEncryptionInfo(v.EncryptionInfo, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocument__listOf__string(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -2356,6 +2451,13 @@ func awsRestjson1_serializeDocumentClientAuthentication(v *types.ClientAuthentic } } + if v.Unauthenticated != nil { + ok := object.Key("unauthenticated") + if err := awsRestjson1_serializeDocumentUnauthenticated(v.Unauthenticated, ok); err != nil { + return err + } + } + return nil } @@ -2637,5 +2739,22 @@ func awsRestjson1_serializeDocumentTls(v *types.Tls, value smithyjson.Value) err } } + if v.Enabled { + ok := object.Key("enabled") + ok.Boolean(v.Enabled) + } + + return nil +} + +func awsRestjson1_serializeDocumentUnauthenticated(v *types.Unauthenticated, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Enabled { + ok := object.Key("enabled") + ok.Boolean(v.Enabled) + } + return nil } diff --git a/service/kafka/types/types.go b/service/kafka/types/types.go index 206b8a6e784..43aed1234d2 100644 --- a/service/kafka/types/types.go +++ b/service/kafka/types/types.go @@ -124,6 +124,9 @@ type ClientAuthentication struct { // Details for ClientAuthentication using TLS. Tls *Tls + // Contains information about unauthenticated traffic to the cluster. + Unauthenticated *Unauthenticated + noSmithyDocumentSerde } @@ -482,9 +485,15 @@ type MutableClusterInfo struct { // Specifies the size of the EBS volume and the ID of the associated broker. BrokerEBSVolumeInfo []BrokerEBSVolumeInfo + // Includes all client authentication information. + ClientAuthentication *ClientAuthentication + // Information about the changes in the configuration of the brokers. ConfigurationInfo *ConfigurationInfo + // Includes all encryption-related information. + EncryptionInfo *EncryptionInfo + // Specifies which Apache Kafka metrics Amazon MSK gathers and sends to Amazon // CloudWatch for this cluster. EnhancedMonitoring EnhancedMonitoring @@ -495,6 +504,8 @@ type MutableClusterInfo struct { // The Kafka version. KafkaVersion *string + // You can configure your MSK cluster to send broker logs to different destination + // types. This is a container for the configuration details related to broker logs. LoggingInfo *LoggingInfo // The number of broker nodes in the cluster. @@ -654,6 +665,18 @@ type Tls struct { // List of ACM Certificate Authority ARNs. CertificateAuthorityArnList []string + // Specifies whether you want to enable or disable TLS authentication. + Enabled bool + + noSmithyDocumentSerde +} + +type Unauthenticated struct { + + // Specifies whether you want to enable or disable unauthenticated traffic to your + // cluster. + Enabled bool + noSmithyDocumentSerde } diff --git a/service/kafka/validators.go b/service/kafka/validators.go index f2fd8ab5df6..7fcd904f76f 100644 --- a/service/kafka/validators.go +++ b/service/kafka/validators.go @@ -530,6 +530,26 @@ func (m *validateOpUpdateMonitoring) HandleInitialize(ctx context.Context, in mi return next.HandleInitialize(ctx, in) } +type validateOpUpdateSecurity struct { +} + +func (*validateOpUpdateSecurity) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateSecurity) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateSecurityInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateSecurityInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + func addOpBatchAssociateScramSecretValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpBatchAssociateScramSecret{}, middleware.After) } @@ -634,6 +654,10 @@ func addOpUpdateMonitoringValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateMonitoring{}, middleware.After) } +func addOpUpdateSecurityValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateSecurity{}, middleware.After) +} + func validate__listOfBrokerEBSVolumeInfo(v []types.BrokerEBSVolumeInfo) error { if v == nil { return nil @@ -1371,3 +1395,26 @@ func validateOpUpdateMonitoringInput(v *UpdateMonitoringInput) error { return nil } } + +func validateOpUpdateSecurityInput(v *UpdateSecurityInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateSecurityInput"} + if v.ClusterArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClusterArn")) + } + if v.CurrentVersion == nil { + invalidParams.Add(smithy.NewErrParamRequired("CurrentVersion")) + } + if v.EncryptionInfo != nil { + if err := validateEncryptionInfo(v.EncryptionInfo); err != nil { + invalidParams.AddNested("EncryptionInfo", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/lookoutequipment/api_op_CreateDataset.go b/service/lookoutequipment/api_op_CreateDataset.go index d5889d97fc8..47b5b4ae5b6 100644 --- a/service/lookoutequipment/api_op_CreateDataset.go +++ b/service/lookoutequipment/api_op_CreateDataset.go @@ -51,8 +51,8 @@ type CreateDatasetInput struct { // This member is required. DatasetSchema *types.DatasetSchema - // Provides the identifier of the AWS KMS customer master key (CMK) used to encrypt - // dataset data by Amazon Lookout for Equipment. + // Provides the identifier of the KMS key used to encrypt dataset data by Amazon + // Lookout for Equipment. ServerSideKmsKeyId *string // Any tags associated with the ingested data described in the dataset. diff --git a/service/lookoutequipment/api_op_CreateInferenceScheduler.go b/service/lookoutequipment/api_op_CreateInferenceScheduler.go index 4013ae82188..05f910f3acf 100644 --- a/service/lookoutequipment/api_op_CreateInferenceScheduler.go +++ b/service/lookoutequipment/api_op_CreateInferenceScheduler.go @@ -90,8 +90,8 @@ type CreateInferenceSchedulerInput struct { // when uploading new data. DataDelayOffsetInMinutes *int64 - // Provides the identifier of the AWS KMS customer master key (CMK) used to encrypt - // inference scheduler data by Amazon Lookout for Equipment. + // Provides the identifier of the KMS key used to encrypt inference scheduler data + // by Amazon Lookout for Equipment. ServerSideKmsKeyId *string // Any tags associated with the inference scheduler. diff --git a/service/lookoutequipment/api_op_CreateModel.go b/service/lookoutequipment/api_op_CreateModel.go index ec86fc6f190..9869133e9d8 100644 --- a/service/lookoutequipment/api_op_CreateModel.go +++ b/service/lookoutequipment/api_op_CreateModel.go @@ -80,12 +80,17 @@ type CreateModelInput struct { // created. LabelsInputConfiguration *types.LabelsInputConfiguration + // Indicates that the asset associated with this sensor has been shut off. As long + // as this condition is met, Lookout for Equipment will not use data from this + // asset for training, evaluation, or inference. + OffCondition *string + // The Amazon Resource Name (ARN) of a role with permission to access the data // source being used to create the ML model. RoleArn *string - // Provides the identifier of the AWS KMS customer master key (CMK) used to encrypt - // model data by Amazon Lookout for Equipment. + // Provides the identifier of the KMS key used to encrypt model data by Amazon + // Lookout for Equipment. ServerSideKmsKeyId *string // Any tags associated with the ML model being created. diff --git a/service/lookoutequipment/api_op_DescribeDataset.go b/service/lookoutequipment/api_op_DescribeDataset.go index 457521f9c6b..c2a5c096a29 100644 --- a/service/lookoutequipment/api_op_DescribeDataset.go +++ b/service/lookoutequipment/api_op_DescribeDataset.go @@ -12,8 +12,8 @@ import ( "time" ) -// Provides information on a specified dataset such as the schema location, status, -// and so on. +// Provides a JSON description of the data that is in each time series dataset, +// including names, column names, and data types. func (c *Client) DescribeDataset(ctx context.Context, params *DescribeDatasetInput, optFns ...func(*Options)) (*DescribeDatasetOutput, error) { if params == nil { params = &DescribeDatasetInput{} @@ -63,8 +63,8 @@ type DescribeDatasetOutput struct { // This value conforms to the media type: application/json Schema *string - // Provides the identifier of the AWS KMS customer master key (CMK) used to encrypt - // dataset data by Amazon Lookout for Equipment. + // Provides the identifier of the KMS key used to encrypt dataset data by Amazon + // Lookout for Equipment. ServerSideKmsKeyId *string // Indicates the status of the dataset. diff --git a/service/lookoutequipment/api_op_DescribeInferenceScheduler.go b/service/lookoutequipment/api_op_DescribeInferenceScheduler.go index b215448201c..53f7eb17dcf 100644 --- a/service/lookoutequipment/api_op_DescribeInferenceScheduler.go +++ b/service/lookoutequipment/api_op_DescribeInferenceScheduler.go @@ -87,8 +87,8 @@ type DescribeInferenceSchedulerOutput struct { // source for the inference scheduler being described. RoleArn *string - // Provides the identifier of the AWS KMS customer master key (CMK) used to encrypt - // inference scheduler data by Amazon Lookout for Equipment. + // Provides the identifier of the KMS key used to encrypt inference scheduler data + // by Amazon Lookout for Equipment. ServerSideKmsKeyId *string // Indicates the status of the inference scheduler. diff --git a/service/lookoutequipment/api_op_DescribeModel.go b/service/lookoutequipment/api_op_DescribeModel.go index db6e1043d7c..e3d94a98b04 100644 --- a/service/lookoutequipment/api_op_DescribeModel.go +++ b/service/lookoutequipment/api_op_DescribeModel.go @@ -12,8 +12,9 @@ import ( "time" ) -// Provides overall information about a specific ML model, including model name and -// ARN, dataset, training and evaluation information, status, and so on. +// Provides a JSON containing the overall information about a specific ML model, +// including model name and ARN, dataset, training and evaluation information, +// status, and so on. func (c *Client) DescribeModel(ctx context.Context, params *DescribeModelInput, optFns ...func(*Options)) (*DescribeModelOutput, error) { if params == nil { params = &DescribeModelInput{} @@ -94,6 +95,11 @@ type DescribeModelOutput struct { // The name of the ML model being described. ModelName *string + // Indicates that the asset associated with this sensor has been shut off. As long + // as this condition is met, Lookout for Equipment will not use data from this + // asset for training, evaluation, or inference. + OffCondition *string + // The Amazon Resource Name (ARN) of a role with permission to access the data // source for the ML model being described. RoleArn *string @@ -104,8 +110,8 @@ type DescribeModelOutput struct { // This value conforms to the media type: application/json Schema *string - // Provides the identifier of the AWS KMS customer master key (CMK) used to encrypt - // model data by Amazon Lookout for Equipment. + // Provides the identifier of the KMS key used to encrypt model data by Amazon + // Lookout for Equipment. ServerSideKmsKeyId *string // Specifies the current status of the model being described. Status describes the diff --git a/service/lookoutequipment/api_op_UpdateInferenceScheduler.go b/service/lookoutequipment/api_op_UpdateInferenceScheduler.go index 1c4c52fc865..bf02c51baeb 100644 --- a/service/lookoutequipment/api_op_UpdateInferenceScheduler.go +++ b/service/lookoutequipment/api_op_UpdateInferenceScheduler.go @@ -34,7 +34,7 @@ type UpdateInferenceSchedulerInput struct { // This member is required. InferenceSchedulerName *string - // > A period of time (in minutes) by which inference on the data is delayed after + // A period of time (in minutes) by which inference on the data is delayed after // the data starts. For instance, if you select an offset delay time of five // minutes, inference will not begin on the data until the first data measurement // after the five minute mark. For example, if five minutes is selected, the diff --git a/service/lookoutequipment/deserializers.go b/service/lookoutequipment/deserializers.go index 19b6ab8a209..435ed206e22 100644 --- a/service/lookoutequipment/deserializers.go +++ b/service/lookoutequipment/deserializers.go @@ -5108,6 +5108,15 @@ func awsAwsjson10_deserializeOpDocumentDescribeModelOutput(v **DescribeModelOutp sv.ModelName = ptr.String(jtv) } + case "OffCondition": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OffCondition to be of type string, got %T instead", value) + } + sv.OffCondition = ptr.String(jtv) + } + case "RoleArn": if value != nil { jtv, ok := value.(string) diff --git a/service/lookoutequipment/serializers.go b/service/lookoutequipment/serializers.go index 3afd76f7a21..74f37671ffa 100644 --- a/service/lookoutequipment/serializers.go +++ b/service/lookoutequipment/serializers.go @@ -1420,6 +1420,11 @@ func awsAwsjson10_serializeOpDocumentCreateModelInput(v *CreateModelInput, value ok.String(*v.ModelName) } + if v.OffCondition != nil { + ok := object.Key("OffCondition") + ok.String(*v.OffCondition) + } + if v.RoleArn != nil { ok := object.Key("RoleArn") ok.String(*v.RoleArn) diff --git a/service/lookoutequipment/types/types.go b/service/lookoutequipment/types/types.go index 1dfcd547916..5954035b7fc 100644 --- a/service/lookoutequipment/types/types.go +++ b/service/lookoutequipment/types/types.go @@ -131,11 +131,11 @@ type InferenceExecutionSummary struct { noSmithyDocumentSerde } -// > Specifies configuration information for the input data for the inference, +// Specifies configuration information for the input data for the inference, // including S3 location of input data.. type InferenceInputConfiguration struct { - // > Specifies configuration information for the input data for the inference, + // Specifies configuration information for the input data for the inference, // including timestamp format and delimiter. InferenceInputNameConfiguration *InferenceInputNameConfiguration @@ -149,7 +149,7 @@ type InferenceInputConfiguration struct { noSmithyDocumentSerde } -// >> Specifies configuration information for the input data for the inference, +// Specifies configuration information for the input data for the inference, // including timestamp format and delimiter. type InferenceInputNameConfiguration struct { @@ -213,7 +213,7 @@ type InferenceS3OutputConfiguration struct { // delay offset, model name and ARN, status, and so on. type InferenceSchedulerSummary struct { - // > A period of time (in minutes) by which inference on the data is delayed after + // A period of time (in minutes) by which inference on the data is delayed after // the data starts. For instance, if an offset delay time of five minutes was // selected, inference will not begin on the data until the first data measurement // after the five minute mark. For example, if five minutes is selected, the diff --git a/service/mediapackage/types/types.go b/service/mediapackage/types/types.go index 205694bcbca..246ad9c6daf 100644 --- a/service/mediapackage/types/types.go +++ b/service/mediapackage/types/types.go @@ -228,7 +228,7 @@ type EgressAccessLogs struct { // stream. To configure the encryption contract, specify which audio and video // encryption presets to use. Note the following considerations when using // encryptionContractConfiguration: encryptionContractConfiguration can be used for -// DASH endpoints that use SPEKE 2.0. SPEKE 2.0 relies on the CPIX 2.3 +// DASH or CMAF endpoints that use SPEKE 2.0. SPEKE 2.0 relies on the CPIX 2.3 // specification. You must disable key rotation for this endpoint by setting // keyRotationIntervalSeconds to 0. type EncryptionContractConfiguration struct { @@ -676,7 +676,7 @@ type SpekeKeyProvider struct { // stream. To configure the encryption contract, specify which audio and video // encryption presets to use. Note the following considerations when using // encryptionContractConfiguration: encryptionContractConfiguration can be used for - // DASH endpoints that use SPEKE 2.0. SPEKE 2.0 relies on the CPIX 2.3 + // DASH or CMAF endpoints that use SPEKE 2.0. SPEKE 2.0 relies on the CPIX 2.3 // specification. You must disable key rotation for this endpoint by setting // keyRotationIntervalSeconds to 0. EncryptionContractConfiguration *EncryptionContractConfiguration diff --git a/service/opensearch/LICENSE.txt b/service/opensearch/LICENSE.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/service/opensearch/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/service/opensearch/api_client.go b/service/opensearch/api_client.go new file mode 100644 index 00000000000..a8c75749fd9 --- /dev/null +++ b/service/opensearch/api_client.go @@ -0,0 +1,262 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/retry" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + smithy "github.com/aws/smithy-go" + smithydocument "github.com/aws/smithy-go/document" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/http" + "time" +) + +const ServiceID = "OpenSearch" +const ServiceAPIVersion = "2021-01-01" + +// Client provides the API client to make operations call for Amazon OpenSearch +// Service. +type Client struct { + options Options +} + +// New returns an initialized Client based on the functional options. Provide +// additional functional options to further configure the behavior of the client, +// such as changing the client's endpoint or adding custom middleware behavior. +func New(options Options, optFns ...func(*Options)) *Client { + options = options.Copy() + + resolveDefaultLogger(&options) + + resolveRetryer(&options) + + resolveHTTPClient(&options) + + resolveHTTPSignerV4(&options) + + resolveDefaultEndpointConfiguration(&options) + + for _, fn := range optFns { + fn(&options) + } + + client := &Client{ + options: options, + } + + return client +} + +type Options struct { + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + APIOptions []func(*middleware.Stack) error + + // Configures the events that will be sent to the configured logger. + ClientLogMode aws.ClientLogMode + + // The credentials object to use when signing requests. + Credentials aws.CredentialsProvider + + // The endpoint options to be used when attempting to resolve an endpoint. + EndpointOptions EndpointResolverOptions + + // The service endpoint resolver. + EndpointResolver EndpointResolver + + // Signature Version 4 (SigV4) Signer + HTTPSignerV4 HTTPSignerV4 + + // The logger writer interface to write logging messages to. + Logger logging.Logger + + // The region to send requests to. (Required) + Region string + + // Retryer guides how HTTP requests should be retried in case of recoverable + // failures. When nil the API client will use a default retryer. + Retryer aws.Retryer + + // The HTTP client to invoke API calls with. Defaults to client's default HTTP + // implementation if nil. + HTTPClient HTTPClient +} + +// WithAPIOptions returns a functional option for setting the Client's APIOptions +// option. +func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { + return func(o *Options) { + o.APIOptions = append(o.APIOptions, optFns...) + } +} + +// WithEndpointResolver returns a functional option for setting the Client's +// EndpointResolver option. +func WithEndpointResolver(v EndpointResolver) func(*Options) { + return func(o *Options) { + o.EndpointResolver = v + } +} + +type HTTPClient interface { + Do(*http.Request) (*http.Response, error) +} + +// Copy creates a clone where the APIOptions list is deep copied. +func (o Options) Copy() Options { + to := o + to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) + copy(to.APIOptions, o.APIOptions) + return to +} +func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { + ctx = middleware.ClearStackValues(ctx) + stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) + options := c.options.Copy() + for _, fn := range optFns { + fn(&options) + } + + for _, fn := range stackFns { + if err := fn(stack, options); err != nil { + return nil, metadata, err + } + } + + for _, fn := range options.APIOptions { + if err := fn(stack); err != nil { + return nil, metadata, err + } + } + + handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) + result, metadata, err = handler.Handle(ctx, params) + if err != nil { + err = &smithy.OperationError{ + ServiceID: ServiceID, + OperationName: opID, + Err: err, + } + } + return result, metadata, err +} + +type noSmithyDocumentSerde = smithydocument.NoSerde + +func resolveDefaultLogger(o *Options) { + if o.Logger != nil { + return + } + o.Logger = logging.Nop{} +} + +func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { + return middleware.AddSetLoggerMiddleware(stack, o.Logger) +} + +// NewFromConfig returns a new client from the provided config. +func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { + opts := Options{ + Region: cfg.Region, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + } + resolveAWSRetryerProvider(cfg, &opts) + resolveAWSEndpointResolver(cfg, &opts) + return New(opts, optFns...) +} + +func resolveHTTPClient(o *Options) { + if o.HTTPClient != nil { + return + } + o.HTTPClient = awshttp.NewBuildableClient() +} + +func resolveRetryer(o *Options) { + if o.Retryer != nil { + return + } + o.Retryer = retry.NewStandard() +} + +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + +func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { + if cfg.EndpointResolver == nil { + return + } + o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, NewDefaultEndpointResolver()) +} + +func addClientUserAgent(stack *middleware.Stack) error { + return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "opensearch", goModuleVersion)(stack) +} + +func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error { + mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{ + CredentialsProvider: o.Credentials, + Signer: o.HTTPSignerV4, + LogSigning: o.ClientLogMode.IsSigning(), + }) + return stack.Finalize.Add(mw, middleware.After) +} + +type HTTPSignerV4 interface { + SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error +} + +func resolveHTTPSignerV4(o *Options) { + if o.HTTPSignerV4 != nil { + return + } + o.HTTPSignerV4 = newDefaultV4Signer(*o) +} + +func newDefaultV4Signer(o Options) *v4.Signer { + return v4.NewSigner(func(so *v4.SignerOptions) { + so.Logger = o.Logger + so.LogSigning = o.ClientLogMode.IsSigning() + }) +} + +func addRetryMiddlewares(stack *middleware.Stack, o Options) error { + mo := retry.AddRetryMiddlewaresOptions{ + Retryer: o.Retryer, + LogRetryAttempts: o.ClientLogMode.IsRetries(), + } + return retry.AddRetryMiddlewares(stack, mo) +} + +func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { + return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) +} + +func addResponseErrorMiddleware(stack *middleware.Stack) error { + return awshttp.AddResponseErrorMiddleware(stack) +} + +func addRequestResponseLogging(stack *middleware.Stack, o Options) error { + return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ + LogRequest: o.ClientLogMode.IsRequest(), + LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), + LogResponse: o.ClientLogMode.IsResponse(), + LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), + }, middleware.After) +} diff --git a/service/opensearch/api_op_AcceptInboundConnection.go b/service/opensearch/api_op_AcceptInboundConnection.go new file mode 100644 index 00000000000..6341d63ac01 --- /dev/null +++ b/service/opensearch/api_op_AcceptInboundConnection.go @@ -0,0 +1,125 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Allows the remote domain owner to accept an inbound cross-cluster connection +// request. +func (c *Client) AcceptInboundConnection(ctx context.Context, params *AcceptInboundConnectionInput, optFns ...func(*Options)) (*AcceptInboundConnectionOutput, error) { + if params == nil { + params = &AcceptInboundConnectionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AcceptInboundConnection", params, optFns, c.addOperationAcceptInboundConnectionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AcceptInboundConnectionOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the parameters to the AcceptInboundConnection operation. +type AcceptInboundConnectionInput struct { + + // The ID of the inbound connection you want to accept. + // + // This member is required. + ConnectionId *string + + noSmithyDocumentSerde +} + +// The result of an AcceptInboundConnection operation. Contains details about the +// accepted inbound connection. +type AcceptInboundConnectionOutput struct { + + // The InboundConnection of the accepted inbound connection. + Connection *types.InboundConnection + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAcceptInboundConnectionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpAcceptInboundConnection{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAcceptInboundConnection{}, 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 = addOpAcceptInboundConnectionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAcceptInboundConnection(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_opAcceptInboundConnection(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "AcceptInboundConnection", + } +} diff --git a/service/opensearch/api_op_AddTags.go b/service/opensearch/api_op_AddTags.go new file mode 100644 index 00000000000..08a4da019d8 --- /dev/null +++ b/service/opensearch/api_op_AddTags.go @@ -0,0 +1,128 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Attaches tags to an existing domain. Tags are a set of case-sensitive key value +// pairs. An domain can have up to 10 tags. See Tagging Amazon OpenSearch Service +// domains +// (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/managedomains.html#managedomains-awsresorcetagging) +// for more information. +func (c *Client) AddTags(ctx context.Context, params *AddTagsInput, optFns ...func(*Options)) (*AddTagsOutput, error) { + if params == nil { + params = &AddTagsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AddTags", params, optFns, c.addOperationAddTagsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AddTagsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the parameters to the AddTags operation. Specifies the tags to +// attach to the domain. +type AddTagsInput struct { + + // Specify the ARN of the domain you want to add tags to. + // + // This member is required. + ARN *string + + // List of Tag to add to the domain. + // + // This member is required. + TagList []types.Tag + + noSmithyDocumentSerde +} + +type AddTagsOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAddTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpAddTags{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAddTags{}, 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 = addOpAddTagsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAddTags(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_opAddTags(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "AddTags", + } +} diff --git a/service/opensearch/api_op_AssociatePackage.go b/service/opensearch/api_op_AssociatePackage.go new file mode 100644 index 00000000000..4939d46710c --- /dev/null +++ b/service/opensearch/api_op_AssociatePackage.go @@ -0,0 +1,129 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Associates a package with an Amazon OpenSearch Service domain. +func (c *Client) AssociatePackage(ctx context.Context, params *AssociatePackageInput, optFns ...func(*Options)) (*AssociatePackageOutput, error) { + if params == nil { + params = &AssociatePackageInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AssociatePackage", params, optFns, c.addOperationAssociatePackageMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AssociatePackageOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the request parameters to the AssociatePackage operation. +type AssociatePackageInput struct { + + // The name of the domain to associate the package with. + // + // This member is required. + DomainName *string + + // Internal ID of the package to associate with a domain. Use DescribePackages to + // find this value. + // + // This member is required. + PackageID *string + + noSmithyDocumentSerde +} + +// Container for the response returned by AssociatePackage operation. +type AssociatePackageOutput struct { + + // DomainPackageDetails + DomainPackageDetails *types.DomainPackageDetails + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAssociatePackageMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpAssociatePackage{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAssociatePackage{}, 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 = addOpAssociatePackageValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociatePackage(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_opAssociatePackage(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "AssociatePackage", + } +} diff --git a/service/opensearch/api_op_CancelServiceSoftwareUpdate.go b/service/opensearch/api_op_CancelServiceSoftwareUpdate.go new file mode 100644 index 00000000000..bd60db64a7a --- /dev/null +++ b/service/opensearch/api_op_CancelServiceSoftwareUpdate.go @@ -0,0 +1,129 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Cancels a scheduled service software update for an Amazon OpenSearch Service +// domain. You can only perform this operation before the AutomatedUpdateDate and +// when the UpdateStatus is in the PENDING_UPDATE state. +func (c *Client) CancelServiceSoftwareUpdate(ctx context.Context, params *CancelServiceSoftwareUpdateInput, optFns ...func(*Options)) (*CancelServiceSoftwareUpdateOutput, error) { + if params == nil { + params = &CancelServiceSoftwareUpdateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CancelServiceSoftwareUpdate", params, optFns, c.addOperationCancelServiceSoftwareUpdateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CancelServiceSoftwareUpdateOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the parameters to the CancelServiceSoftwareUpdate operation. +// Specifies the name of the domain that you wish to cancel a service software +// update on. +type CancelServiceSoftwareUpdateInput struct { + + // The name of the domain that you want to stop the latest service software update + // on. + // + // This member is required. + DomainName *string + + noSmithyDocumentSerde +} + +// The result of a CancelServiceSoftwareUpdate operation. Contains the status of +// the update. +type CancelServiceSoftwareUpdateOutput struct { + + // The current status of the OpenSearch service software update. + ServiceSoftwareOptions *types.ServiceSoftwareOptions + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCancelServiceSoftwareUpdateMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCancelServiceSoftwareUpdate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCancelServiceSoftwareUpdate{}, 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 = addOpCancelServiceSoftwareUpdateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelServiceSoftwareUpdate(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_opCancelServiceSoftwareUpdate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "CancelServiceSoftwareUpdate", + } +} diff --git a/service/opensearch/api_op_CreateDomain.go b/service/opensearch/api_op_CreateDomain.go new file mode 100644 index 00000000000..4425b099e86 --- /dev/null +++ b/service/opensearch/api_op_CreateDomain.go @@ -0,0 +1,191 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new Amazon OpenSearch Service domain. For more information, see +// Creating and managing Amazon OpenSearch Service domains +// (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html) +// in the Amazon OpenSearch Service Developer Guide. +func (c *Client) CreateDomain(ctx context.Context, params *CreateDomainInput, optFns ...func(*Options)) (*CreateDomainOutput, error) { + if params == nil { + params = &CreateDomainInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateDomain", params, optFns, c.addOperationCreateDomainMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateDomainOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateDomainInput struct { + + // The name of the Amazon OpenSearch Service domain you're creating. Domain names + // are unique across the domains owned by an account within an AWS region. Domain + // names must start with a lowercase letter and can contain the following + // characters: a-z (lowercase), 0-9, and - (hyphen). + // + // This member is required. + DomainName *string + + // IAM access policy as a JSON-formatted string. + AccessPolicies *string + + // Option to allow references to indices in an HTTP request body. Must be false + // when configuring access to individual sub-resources. By default, the value is + // true. See Advanced cluster parameters + // (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html#createdomain-configure-advanced-options) + // for more information. + AdvancedOptions map[string]string + + // Specifies advanced security options. + AdvancedSecurityOptions *types.AdvancedSecurityOptionsInput + + // Specifies Auto-Tune options. + AutoTuneOptions *types.AutoTuneOptionsInput + + // Configuration options for a domain. Specifies the instance type and number of + // instances in the domain. + ClusterConfig *types.ClusterConfig + + // Options to specify the Cognito user and identity pools for OpenSearch Dashboards + // authentication. For more information, see Configuring Amazon Cognito + // authentication for OpenSearch Dashboards + // (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/cognito-auth.html). + CognitoOptions *types.CognitoOptions + + // Options to specify configurations that will be applied to the domain endpoint. + DomainEndpointOptions *types.DomainEndpointOptions + + // Options to enable, disable, and specify the type and size of EBS storage + // volumes. + EBSOptions *types.EBSOptions + + // Options for encryption of data at rest. + EncryptionAtRestOptions *types.EncryptionAtRestOptions + + // String of format Elasticsearch_X.Y or OpenSearch_X.Y to specify the engine + // version for the Amazon OpenSearch Service domain. For example, "OpenSearch_1.0" + // or "Elasticsearch_7.9". For more information, see Creating and managing Amazon + // OpenSearch Service domains + // (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html#createdomains). + EngineVersion *string + + // Map of LogType and LogPublishingOption, each containing options to publish a + // given type of OpenSearch log. + LogPublishingOptions map[string]types.LogPublishingOption + + // Node-to-node encryption options. + NodeToNodeEncryptionOptions *types.NodeToNodeEncryptionOptions + + // Option to set time, in UTC format, of the daily automated snapshot. Default + // value is 0 hours. + SnapshotOptions *types.SnapshotOptions + + // A list of Tag added during domain creation. + TagList []types.Tag + + // Options to specify the subnets and security groups for a VPC endpoint. For more + // information, see Launching your Amazon OpenSearch Service domains using a VPC + // (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/vpc.html). + VPCOptions *types.VPCOptions + + noSmithyDocumentSerde +} + +// The result of a CreateDomain operation. Contains the status of the newly created +// Amazon OpenSearch Service domain. +type CreateDomainOutput struct { + + // The status of the newly created domain. + DomainStatus *types.DomainStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateDomainMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateDomain{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateDomain{}, 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 = addOpCreateDomainValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateDomain(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_opCreateDomain(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "CreateDomain", + } +} diff --git a/service/opensearch/api_op_CreateOutboundConnection.go b/service/opensearch/api_op_CreateOutboundConnection.go new file mode 100644 index 00000000000..fc4fbaa1a48 --- /dev/null +++ b/service/opensearch/api_op_CreateOutboundConnection.go @@ -0,0 +1,149 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new cross-cluster connection from a local OpenSearch domain to a +// remote OpenSearch domain. +func (c *Client) CreateOutboundConnection(ctx context.Context, params *CreateOutboundConnectionInput, optFns ...func(*Options)) (*CreateOutboundConnectionOutput, error) { + if params == nil { + params = &CreateOutboundConnectionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateOutboundConnection", params, optFns, c.addOperationCreateOutboundConnectionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateOutboundConnectionOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the parameters to the CreateOutboundConnection operation. +type CreateOutboundConnectionInput struct { + + // The connection alias used used by the customer for this cross-cluster + // connection. + // + // This member is required. + ConnectionAlias *string + + // The AWSDomainInformation for the local OpenSearch domain. + // + // This member is required. + LocalDomainInfo *types.DomainInformationContainer + + // The AWSDomainInformation for the remote OpenSearch domain. + // + // This member is required. + RemoteDomainInfo *types.DomainInformationContainer + + noSmithyDocumentSerde +} + +// The result of a CreateOutboundConnection request. Contains the details about the +// newly created cross-cluster connection. +type CreateOutboundConnectionOutput struct { + + // The connection alias provided during the create connection request. + ConnectionAlias *string + + // The unique ID for the created outbound connection, which is used for subsequent + // operations on the connection. + ConnectionId *string + + // The OutboundConnectionStatus for the newly created connection. + ConnectionStatus *types.OutboundConnectionStatus + + // The AWSDomainInformation for the local OpenSearch domain. + LocalDomainInfo *types.DomainInformationContainer + + // The AWSDomainInformation for the remote OpenSearch domain. + RemoteDomainInfo *types.DomainInformationContainer + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateOutboundConnectionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateOutboundConnection{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateOutboundConnection{}, 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 = addOpCreateOutboundConnectionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateOutboundConnection(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_opCreateOutboundConnection(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "CreateOutboundConnection", + } +} diff --git a/service/opensearch/api_op_CreatePackage.go b/service/opensearch/api_op_CreatePackage.go new file mode 100644 index 00000000000..16b4086b835 --- /dev/null +++ b/service/opensearch/api_op_CreatePackage.go @@ -0,0 +1,136 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Create a package for use with Amazon OpenSearch Service domains. +func (c *Client) CreatePackage(ctx context.Context, params *CreatePackageInput, optFns ...func(*Options)) (*CreatePackageOutput, error) { + if params == nil { + params = &CreatePackageInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreatePackage", params, optFns, c.addOperationCreatePackageMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreatePackageOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for request parameters to the CreatePackage operation. +type CreatePackageInput struct { + + // Unique identifier for the package. + // + // This member is required. + PackageName *string + + // The Amazon S3 location from which to import the package. + // + // This member is required. + PackageSource *types.PackageSource + + // Type of package. Currently supports only TXT-DICTIONARY. + // + // This member is required. + PackageType types.PackageType + + // Description of the package. + PackageDescription *string + + noSmithyDocumentSerde +} + +// Container for the response returned by the CreatePackage operation. +type CreatePackageOutput struct { + + // Information about the package. + PackageDetails *types.PackageDetails + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreatePackageMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreatePackage{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreatePackage{}, 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 = addOpCreatePackageValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreatePackage(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_opCreatePackage(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "CreatePackage", + } +} diff --git a/service/opensearch/api_op_DeleteDomain.go b/service/opensearch/api_op_DeleteDomain.go new file mode 100644 index 00000000000..4679e28fd14 --- /dev/null +++ b/service/opensearch/api_op_DeleteDomain.go @@ -0,0 +1,127 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Permanently deletes the specified domain and all of its data. Once a domain is +// deleted, it cannot be recovered. +func (c *Client) DeleteDomain(ctx context.Context, params *DeleteDomainInput, optFns ...func(*Options)) (*DeleteDomainOutput, error) { + if params == nil { + params = &DeleteDomainInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteDomain", params, optFns, c.addOperationDeleteDomainMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteDomainOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the parameters to the DeleteDomain operation. Specifies the name +// of the domain you want to delete. +type DeleteDomainInput struct { + + // The name of the domain you want to permanently delete. + // + // This member is required. + DomainName *string + + noSmithyDocumentSerde +} + +// The result of a DeleteDomain request. Contains the status of the pending +// deletion, or a "domain not found" error if the domain and all of its resources +// have been deleted. +type DeleteDomainOutput struct { + + // The status of the domain being deleted. + DomainStatus *types.DomainStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteDomainMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteDomain{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteDomain{}, 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 = addOpDeleteDomainValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteDomain(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_opDeleteDomain(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "DeleteDomain", + } +} diff --git a/service/opensearch/api_op_DeleteInboundConnection.go b/service/opensearch/api_op_DeleteInboundConnection.go new file mode 100644 index 00000000000..01ae3228a7b --- /dev/null +++ b/service/opensearch/api_op_DeleteInboundConnection.go @@ -0,0 +1,125 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Allows the remote domain owner to delete an existing inbound cross-cluster +// connection. +func (c *Client) DeleteInboundConnection(ctx context.Context, params *DeleteInboundConnectionInput, optFns ...func(*Options)) (*DeleteInboundConnectionOutput, error) { + if params == nil { + params = &DeleteInboundConnectionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteInboundConnection", params, optFns, c.addOperationDeleteInboundConnectionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteInboundConnectionOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the parameters to the DeleteInboundConnection operation. +type DeleteInboundConnectionInput struct { + + // The ID of the inbound connection to permanently delete. + // + // This member is required. + ConnectionId *string + + noSmithyDocumentSerde +} + +// The result of a DeleteInboundConnection operation. Contains details about the +// deleted inbound connection. +type DeleteInboundConnectionOutput struct { + + // The InboundConnection of the deleted inbound connection. + Connection *types.InboundConnection + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteInboundConnectionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteInboundConnection{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteInboundConnection{}, 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 = addOpDeleteInboundConnectionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteInboundConnection(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_opDeleteInboundConnection(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "DeleteInboundConnection", + } +} diff --git a/service/opensearch/api_op_DeleteOutboundConnection.go b/service/opensearch/api_op_DeleteOutboundConnection.go new file mode 100644 index 00000000000..08de2a84f0f --- /dev/null +++ b/service/opensearch/api_op_DeleteOutboundConnection.go @@ -0,0 +1,125 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Allows the local domain owner to delete an existing outbound cross-cluster +// connection. +func (c *Client) DeleteOutboundConnection(ctx context.Context, params *DeleteOutboundConnectionInput, optFns ...func(*Options)) (*DeleteOutboundConnectionOutput, error) { + if params == nil { + params = &DeleteOutboundConnectionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteOutboundConnection", params, optFns, c.addOperationDeleteOutboundConnectionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteOutboundConnectionOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the parameters to the DeleteOutboundConnection operation. +type DeleteOutboundConnectionInput struct { + + // The ID of the outbound connection you want to permanently delete. + // + // This member is required. + ConnectionId *string + + noSmithyDocumentSerde +} + +// The result of a DeleteOutboundConnection operation. Contains details about the +// deleted outbound connection. +type DeleteOutboundConnectionOutput struct { + + // The OutboundConnection of the deleted outbound connection. + Connection *types.OutboundConnection + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteOutboundConnectionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteOutboundConnection{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteOutboundConnection{}, 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 = addOpDeleteOutboundConnectionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteOutboundConnection(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_opDeleteOutboundConnection(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "DeleteOutboundConnection", + } +} diff --git a/service/opensearch/api_op_DeletePackage.go b/service/opensearch/api_op_DeletePackage.go new file mode 100644 index 00000000000..cf5be29d525 --- /dev/null +++ b/service/opensearch/api_op_DeletePackage.go @@ -0,0 +1,124 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the package. +func (c *Client) DeletePackage(ctx context.Context, params *DeletePackageInput, optFns ...func(*Options)) (*DeletePackageOutput, error) { + if params == nil { + params = &DeletePackageInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeletePackage", params, optFns, c.addOperationDeletePackageMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeletePackageOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the request parameters to the DeletePackage operation. +type DeletePackageInput struct { + + // The internal ID of the package you want to delete. Use DescribePackages to find + // this value. + // + // This member is required. + PackageID *string + + noSmithyDocumentSerde +} + +// Container for the response parameters to the DeletePackage operation. +type DeletePackageOutput struct { + + // PackageDetails + PackageDetails *types.PackageDetails + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeletePackageMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeletePackage{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeletePackage{}, 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 = addOpDeletePackageValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePackage(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_opDeletePackage(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "DeletePackage", + } +} diff --git a/service/opensearch/api_op_DescribeDomain.go b/service/opensearch/api_op_DescribeDomain.go new file mode 100644 index 00000000000..79ea32dc0fa --- /dev/null +++ b/service/opensearch/api_op_DescribeDomain.go @@ -0,0 +1,127 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns domain configuration information about the specified domain, including +// the domain ID, domain endpoint, and domain ARN. +func (c *Client) DescribeDomain(ctx context.Context, params *DescribeDomainInput, optFns ...func(*Options)) (*DescribeDomainOutput, error) { + if params == nil { + params = &DescribeDomainInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeDomain", params, optFns, c.addOperationDescribeDomainMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeDomainOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the parameters to the DescribeDomain operation. +type DescribeDomainInput struct { + + // The name of the domain for which you want information. + // + // This member is required. + DomainName *string + + noSmithyDocumentSerde +} + +// The result of a DescribeDomain request. Contains the status of the domain +// specified in the request. +type DescribeDomainOutput struct { + + // The current status of the domain. + // + // This member is required. + DomainStatus *types.DomainStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeDomainMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeDomain{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeDomain{}, 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 = addOpDescribeDomainValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDomain(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_opDescribeDomain(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "DescribeDomain", + } +} diff --git a/service/opensearch/api_op_DescribeDomainAutoTunes.go b/service/opensearch/api_op_DescribeDomainAutoTunes.go new file mode 100644 index 00000000000..bc8695346ce --- /dev/null +++ b/service/opensearch/api_op_DescribeDomainAutoTunes.go @@ -0,0 +1,227 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Provides scheduled Auto-Tune action details for the domain, such as Auto-Tune +// action type, description, severity, and scheduled date. +func (c *Client) DescribeDomainAutoTunes(ctx context.Context, params *DescribeDomainAutoTunesInput, optFns ...func(*Options)) (*DescribeDomainAutoTunesOutput, error) { + if params == nil { + params = &DescribeDomainAutoTunesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeDomainAutoTunes", params, optFns, c.addOperationDescribeDomainAutoTunesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeDomainAutoTunesOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the parameters to the DescribeDomainAutoTunes operation. +type DescribeDomainAutoTunesInput struct { + + // The domain name for which you want Auto-Tune action details. + // + // This member is required. + DomainName *string + + // Set this value to limit the number of results returned. If not specified, + // defaults to 100. + MaxResults int32 + + // NextToken is sent in case the earlier API call results contain the NextToken. + // Used for pagination. + NextToken *string + + noSmithyDocumentSerde +} + +// The result of a DescribeDomainAutoTunes request. See Auto-Tune for Amazon +// OpenSearch Service +// (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html) +// for more information. +type DescribeDomainAutoTunesOutput struct { + + // The list of setting adjustments that Auto-Tune has made to the domain. See + // Auto-Tune for Amazon OpenSearch Service + // (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html) + // for more information. + AutoTunes []types.AutoTune + + // An identifier to allow retrieval of paginated results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeDomainAutoTunesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeDomainAutoTunes{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeDomainAutoTunes{}, 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 = addOpDescribeDomainAutoTunesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDomainAutoTunes(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 +} + +// DescribeDomainAutoTunesAPIClient is a client that implements the +// DescribeDomainAutoTunes operation. +type DescribeDomainAutoTunesAPIClient interface { + DescribeDomainAutoTunes(context.Context, *DescribeDomainAutoTunesInput, ...func(*Options)) (*DescribeDomainAutoTunesOutput, error) +} + +var _ DescribeDomainAutoTunesAPIClient = (*Client)(nil) + +// DescribeDomainAutoTunesPaginatorOptions is the paginator options for +// DescribeDomainAutoTunes +type DescribeDomainAutoTunesPaginatorOptions struct { + // Set this value to limit the number of results returned. If not specified, + // defaults to 100. + 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 +} + +// DescribeDomainAutoTunesPaginator is a paginator for DescribeDomainAutoTunes +type DescribeDomainAutoTunesPaginator struct { + options DescribeDomainAutoTunesPaginatorOptions + client DescribeDomainAutoTunesAPIClient + params *DescribeDomainAutoTunesInput + nextToken *string + firstPage bool +} + +// NewDescribeDomainAutoTunesPaginator returns a new +// DescribeDomainAutoTunesPaginator +func NewDescribeDomainAutoTunesPaginator(client DescribeDomainAutoTunesAPIClient, params *DescribeDomainAutoTunesInput, optFns ...func(*DescribeDomainAutoTunesPaginatorOptions)) *DescribeDomainAutoTunesPaginator { + if params == nil { + params = &DescribeDomainAutoTunesInput{} + } + + options := DescribeDomainAutoTunesPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeDomainAutoTunesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeDomainAutoTunesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribeDomainAutoTunes page. +func (p *DescribeDomainAutoTunesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDomainAutoTunesOutput, 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.DescribeDomainAutoTunes(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_opDescribeDomainAutoTunes(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "DescribeDomainAutoTunes", + } +} diff --git a/service/opensearch/api_op_DescribeDomainConfig.go b/service/opensearch/api_op_DescribeDomainConfig.go new file mode 100644 index 00000000000..da46c468a0d --- /dev/null +++ b/service/opensearch/api_op_DescribeDomainConfig.go @@ -0,0 +1,129 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Provides cluster configuration information about the specified domain, such as +// the state, creation date, update version, and update date for cluster options. +func (c *Client) DescribeDomainConfig(ctx context.Context, params *DescribeDomainConfigInput, optFns ...func(*Options)) (*DescribeDomainConfigOutput, error) { + if params == nil { + params = &DescribeDomainConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeDomainConfig", params, optFns, c.addOperationDescribeDomainConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeDomainConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the parameters to the DescribeDomainConfig operation. Specifies +// the domain name for which you want configuration information. +type DescribeDomainConfigInput struct { + + // The domain you want to get information about. + // + // This member is required. + DomainName *string + + noSmithyDocumentSerde +} + +// The result of a DescribeDomainConfig request. Contains the configuration +// information of the requested domain. +type DescribeDomainConfigOutput struct { + + // The configuration information of the domain requested in the + // DescribeDomainConfig request. + // + // This member is required. + DomainConfig *types.DomainConfig + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeDomainConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeDomainConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeDomainConfig{}, 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 = addOpDescribeDomainConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDomainConfig(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_opDescribeDomainConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "DescribeDomainConfig", + } +} diff --git a/service/opensearch/api_op_DescribeDomains.go b/service/opensearch/api_op_DescribeDomains.go new file mode 100644 index 00000000000..5eb23db8527 --- /dev/null +++ b/service/opensearch/api_op_DescribeDomains.go @@ -0,0 +1,128 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns domain configuration information about the specified domains, including +// the domain ID, domain endpoint, and domain ARN. +func (c *Client) DescribeDomains(ctx context.Context, params *DescribeDomainsInput, optFns ...func(*Options)) (*DescribeDomainsOutput, error) { + if params == nil { + params = &DescribeDomainsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeDomains", params, optFns, c.addOperationDescribeDomainsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeDomainsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the parameters to the DescribeDomains operation. By default, the +// API returns the status of all domains. +type DescribeDomainsInput struct { + + // The domains for which you want information. + // + // This member is required. + DomainNames []string + + noSmithyDocumentSerde +} + +// The result of a DescribeDomains request. Contains the status of the specified +// domains or all domains owned by the account. +type DescribeDomainsOutput struct { + + // The status of the domains requested in the DescribeDomains request. + // + // This member is required. + DomainStatusList []types.DomainStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeDomainsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeDomains{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeDomains{}, 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 = addOpDescribeDomainsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDomains(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_opDescribeDomains(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "DescribeDomains", + } +} diff --git a/service/opensearch/api_op_DescribeInboundConnections.go b/service/opensearch/api_op_DescribeInboundConnections.go new file mode 100644 index 00000000000..71af000be1d --- /dev/null +++ b/service/opensearch/api_op_DescribeInboundConnections.go @@ -0,0 +1,231 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all the inbound cross-cluster connections for a remote domain. +func (c *Client) DescribeInboundConnections(ctx context.Context, params *DescribeInboundConnectionsInput, optFns ...func(*Options)) (*DescribeInboundConnectionsOutput, error) { + if params == nil { + params = &DescribeInboundConnectionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeInboundConnections", params, optFns, c.addOperationDescribeInboundConnectionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeInboundConnectionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the parameters to the DescribeInboundConnections operation. +type DescribeInboundConnectionsInput struct { + + // A list of filters used to match properties for inbound cross-cluster + // connections. Available Filter values are: + // + // * connection-id + // + // * + // local-domain-info.domain-name + // + // * local-domain-info.owner-id + // + // * + // local-domain-info.region + // + // * remote-domain-info.domain-name + Filters []types.Filter + + // Set this value to limit the number of results returned. If not specified, + // defaults to 100. + MaxResults int32 + + // If more results are available and NextToken is present, make the next request to + // the same API with the received NextToken to paginate the remaining results. + NextToken *string + + noSmithyDocumentSerde +} + +// The result of a DescribeInboundConnections request. Contains a list of +// connections matching the filter criteria. +type DescribeInboundConnectionsOutput struct { + + // A list of InboundConnection matching the specified filter criteria. + Connections []types.InboundConnection + + // If more results are available and NextToken is present, make the next request to + // the same API with the received NextToken to paginate the remaining results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeInboundConnectionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeInboundConnections{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeInboundConnections{}, 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_opDescribeInboundConnections(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 +} + +// DescribeInboundConnectionsAPIClient is a client that implements the +// DescribeInboundConnections operation. +type DescribeInboundConnectionsAPIClient interface { + DescribeInboundConnections(context.Context, *DescribeInboundConnectionsInput, ...func(*Options)) (*DescribeInboundConnectionsOutput, error) +} + +var _ DescribeInboundConnectionsAPIClient = (*Client)(nil) + +// DescribeInboundConnectionsPaginatorOptions is the paginator options for +// DescribeInboundConnections +type DescribeInboundConnectionsPaginatorOptions struct { + // Set this value to limit the number of results returned. If not specified, + // defaults to 100. + 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 +} + +// DescribeInboundConnectionsPaginator is a paginator for +// DescribeInboundConnections +type DescribeInboundConnectionsPaginator struct { + options DescribeInboundConnectionsPaginatorOptions + client DescribeInboundConnectionsAPIClient + params *DescribeInboundConnectionsInput + nextToken *string + firstPage bool +} + +// NewDescribeInboundConnectionsPaginator returns a new +// DescribeInboundConnectionsPaginator +func NewDescribeInboundConnectionsPaginator(client DescribeInboundConnectionsAPIClient, params *DescribeInboundConnectionsInput, optFns ...func(*DescribeInboundConnectionsPaginatorOptions)) *DescribeInboundConnectionsPaginator { + if params == nil { + params = &DescribeInboundConnectionsInput{} + } + + options := DescribeInboundConnectionsPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeInboundConnectionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeInboundConnectionsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribeInboundConnections page. +func (p *DescribeInboundConnectionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInboundConnectionsOutput, 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.DescribeInboundConnections(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_opDescribeInboundConnections(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "DescribeInboundConnections", + } +} diff --git a/service/opensearch/api_op_DescribeInstanceTypeLimits.go b/service/opensearch/api_op_DescribeInstanceTypeLimits.go new file mode 100644 index 00000000000..71643f2e6a2 --- /dev/null +++ b/service/opensearch/api_op_DescribeInstanceTypeLimits.go @@ -0,0 +1,145 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Describe the limits for a given instance type and OpenSearch or Elasticsearch +// version. When modifying an existing domain, specify the DomainName to see which +// limits you can modify. +func (c *Client) DescribeInstanceTypeLimits(ctx context.Context, params *DescribeInstanceTypeLimitsInput, optFns ...func(*Options)) (*DescribeInstanceTypeLimitsOutput, error) { + if params == nil { + params = &DescribeInstanceTypeLimitsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeInstanceTypeLimits", params, optFns, c.addOperationDescribeInstanceTypeLimitsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeInstanceTypeLimitsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the parameters to the DescribeInstanceTypeLimits operation. +type DescribeInstanceTypeLimitsInput struct { + + // Version of OpenSearch for which Limits are needed. + // + // This member is required. + EngineVersion *string + + // The instance type for an OpenSearch cluster for which OpenSearch Limits are + // needed. + // + // This member is required. + InstanceType types.OpenSearchPartitionInstanceType + + // The name of the domain you want to modify. Only include this value if you're + // querying OpenSearch Limits for an existing domain. + DomainName *string + + noSmithyDocumentSerde +} + +// Container for the parameters received from the DescribeInstanceTypeLimits +// operation. +type DescribeInstanceTypeLimitsOutput struct { + + // The role of a given instance and all applicable limits. The role performed by a + // given OpenSearch instance can be one of the following: + // + // * data: If the given + // InstanceType is used as a data node + // + // * master: If the given InstanceType is used + // as a master node + // + // * ultra_warm: If the given InstanceType is used as a warm node + LimitsByRole map[string]types.Limits + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeInstanceTypeLimitsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeInstanceTypeLimits{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeInstanceTypeLimits{}, 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 = addOpDescribeInstanceTypeLimitsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstanceTypeLimits(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_opDescribeInstanceTypeLimits(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "DescribeInstanceTypeLimits", + } +} diff --git a/service/opensearch/api_op_DescribeOutboundConnections.go b/service/opensearch/api_op_DescribeOutboundConnections.go new file mode 100644 index 00000000000..b34e1ce1511 --- /dev/null +++ b/service/opensearch/api_op_DescribeOutboundConnections.go @@ -0,0 +1,231 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all the outbound cross-cluster connections for a local domain. +func (c *Client) DescribeOutboundConnections(ctx context.Context, params *DescribeOutboundConnectionsInput, optFns ...func(*Options)) (*DescribeOutboundConnectionsOutput, error) { + if params == nil { + params = &DescribeOutboundConnectionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeOutboundConnections", params, optFns, c.addOperationDescribeOutboundConnectionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeOutboundConnectionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the parameters to the DescribeOutboundConnections operation. +type DescribeOutboundConnectionsInput struct { + + // A list of filters used to match properties for outbound cross-cluster + // connections. Available Filter names for this operation are: + // + // * connection-id + // + // * + // remote-domain-info.domain-name + // + // * remote-domain-info.owner-id + // + // * + // remote-domain-info.region + // + // * local-domain-info.domain-name + Filters []types.Filter + + // Set this value to limit the number of results returned. If not specified, + // defaults to 100. + MaxResults int32 + + // NextToken is sent in case the earlier API call results contain the NextToken + // parameter. Used for pagination. + NextToken *string + + noSmithyDocumentSerde +} + +// The result of a DescribeOutboundConnections request. Contains the list of +// connections matching the filter criteria. +type DescribeOutboundConnectionsOutput struct { + + // A list of OutboundConnection matching the specified filter criteria. + Connections []types.OutboundConnection + + // If more results are available and NextToken is present, make the next request to + // the same API with the received NextToken to paginate the remaining results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeOutboundConnectionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeOutboundConnections{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeOutboundConnections{}, 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_opDescribeOutboundConnections(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 +} + +// DescribeOutboundConnectionsAPIClient is a client that implements the +// DescribeOutboundConnections operation. +type DescribeOutboundConnectionsAPIClient interface { + DescribeOutboundConnections(context.Context, *DescribeOutboundConnectionsInput, ...func(*Options)) (*DescribeOutboundConnectionsOutput, error) +} + +var _ DescribeOutboundConnectionsAPIClient = (*Client)(nil) + +// DescribeOutboundConnectionsPaginatorOptions is the paginator options for +// DescribeOutboundConnections +type DescribeOutboundConnectionsPaginatorOptions struct { + // Set this value to limit the number of results returned. If not specified, + // defaults to 100. + 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 +} + +// DescribeOutboundConnectionsPaginator is a paginator for +// DescribeOutboundConnections +type DescribeOutboundConnectionsPaginator struct { + options DescribeOutboundConnectionsPaginatorOptions + client DescribeOutboundConnectionsAPIClient + params *DescribeOutboundConnectionsInput + nextToken *string + firstPage bool +} + +// NewDescribeOutboundConnectionsPaginator returns a new +// DescribeOutboundConnectionsPaginator +func NewDescribeOutboundConnectionsPaginator(client DescribeOutboundConnectionsAPIClient, params *DescribeOutboundConnectionsInput, optFns ...func(*DescribeOutboundConnectionsPaginatorOptions)) *DescribeOutboundConnectionsPaginator { + if params == nil { + params = &DescribeOutboundConnectionsInput{} + } + + options := DescribeOutboundConnectionsPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeOutboundConnectionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeOutboundConnectionsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribeOutboundConnections page. +func (p *DescribeOutboundConnectionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeOutboundConnectionsOutput, 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.DescribeOutboundConnections(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_opDescribeOutboundConnections(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "DescribeOutboundConnections", + } +} diff --git a/service/opensearch/api_op_DescribePackages.go b/service/opensearch/api_op_DescribePackages.go new file mode 100644 index 00000000000..d5517ac5491 --- /dev/null +++ b/service/opensearch/api_op_DescribePackages.go @@ -0,0 +1,210 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Describes all packages available to Amazon OpenSearch Service domains. Includes +// options for filtering, limiting the number of results, and pagination. +func (c *Client) DescribePackages(ctx context.Context, params *DescribePackagesInput, optFns ...func(*Options)) (*DescribePackagesOutput, error) { + if params == nil { + params = &DescribePackagesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribePackages", params, optFns, c.addOperationDescribePackagesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribePackagesOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the request parameters to the DescribePackage operation. +type DescribePackagesInput struct { + + // Only returns packages that match the DescribePackagesFilterList values. + Filters []types.DescribePackagesFilter + + // Limits results to a maximum number of packages. + MaxResults int32 + + // Used for pagination. Only necessary if a previous API call includes a non-null + // NextToken value. If provided, returns results for the next page. + NextToken *string + + noSmithyDocumentSerde +} + +// Container for the response returned by the DescribePackages operation. +type DescribePackagesOutput struct { + NextToken *string + + // List of PackageDetails objects. + PackageDetailsList []types.PackageDetails + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribePackagesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribePackages{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribePackages{}, 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_opDescribePackages(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 +} + +// DescribePackagesAPIClient is a client that implements the DescribePackages +// operation. +type DescribePackagesAPIClient interface { + DescribePackages(context.Context, *DescribePackagesInput, ...func(*Options)) (*DescribePackagesOutput, error) +} + +var _ DescribePackagesAPIClient = (*Client)(nil) + +// DescribePackagesPaginatorOptions is the paginator options for DescribePackages +type DescribePackagesPaginatorOptions struct { + // Limits results to a maximum number of packages. + 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 +} + +// DescribePackagesPaginator is a paginator for DescribePackages +type DescribePackagesPaginator struct { + options DescribePackagesPaginatorOptions + client DescribePackagesAPIClient + params *DescribePackagesInput + nextToken *string + firstPage bool +} + +// NewDescribePackagesPaginator returns a new DescribePackagesPaginator +func NewDescribePackagesPaginator(client DescribePackagesAPIClient, params *DescribePackagesInput, optFns ...func(*DescribePackagesPaginatorOptions)) *DescribePackagesPaginator { + if params == nil { + params = &DescribePackagesInput{} + } + + options := DescribePackagesPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribePackagesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribePackagesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribePackages page. +func (p *DescribePackagesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribePackagesOutput, 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.DescribePackages(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_opDescribePackages(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "DescribePackages", + } +} diff --git a/service/opensearch/api_op_DescribeReservedInstanceOfferings.go b/service/opensearch/api_op_DescribeReservedInstanceOfferings.go new file mode 100644 index 00000000000..e3edebb4380 --- /dev/null +++ b/service/opensearch/api_op_DescribeReservedInstanceOfferings.go @@ -0,0 +1,216 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists available reserved OpenSearch instance offerings. +func (c *Client) DescribeReservedInstanceOfferings(ctx context.Context, params *DescribeReservedInstanceOfferingsInput, optFns ...func(*Options)) (*DescribeReservedInstanceOfferingsOutput, error) { + if params == nil { + params = &DescribeReservedInstanceOfferingsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeReservedInstanceOfferings", params, optFns, c.addOperationDescribeReservedInstanceOfferingsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeReservedInstanceOfferingsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for parameters to DescribeReservedInstanceOfferings +type DescribeReservedInstanceOfferingsInput struct { + + // Set this value to limit the number of results returned. If not specified, + // defaults to 100. + MaxResults int32 + + // Provides an identifier to allow retrieval of paginated results. + NextToken *string + + // The offering identifier filter value. Use this parameter to show only the + // available offering that matches the specified reservation identifier. + ReservedInstanceOfferingId *string + + noSmithyDocumentSerde +} + +// Container for results from DescribeReservedInstanceOfferings +type DescribeReservedInstanceOfferingsOutput struct { + + // Provides an identifier to allow retrieval of paginated results. + NextToken *string + + // List of reserved OpenSearch instance offerings + ReservedInstanceOfferings []types.ReservedInstanceOffering + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeReservedInstanceOfferingsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeReservedInstanceOfferings{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeReservedInstanceOfferings{}, 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_opDescribeReservedInstanceOfferings(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 +} + +// DescribeReservedInstanceOfferingsAPIClient is a client that implements the +// DescribeReservedInstanceOfferings operation. +type DescribeReservedInstanceOfferingsAPIClient interface { + DescribeReservedInstanceOfferings(context.Context, *DescribeReservedInstanceOfferingsInput, ...func(*Options)) (*DescribeReservedInstanceOfferingsOutput, error) +} + +var _ DescribeReservedInstanceOfferingsAPIClient = (*Client)(nil) + +// DescribeReservedInstanceOfferingsPaginatorOptions is the paginator options for +// DescribeReservedInstanceOfferings +type DescribeReservedInstanceOfferingsPaginatorOptions struct { + // Set this value to limit the number of results returned. If not specified, + // defaults to 100. + 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 +} + +// DescribeReservedInstanceOfferingsPaginator is a paginator for +// DescribeReservedInstanceOfferings +type DescribeReservedInstanceOfferingsPaginator struct { + options DescribeReservedInstanceOfferingsPaginatorOptions + client DescribeReservedInstanceOfferingsAPIClient + params *DescribeReservedInstanceOfferingsInput + nextToken *string + firstPage bool +} + +// NewDescribeReservedInstanceOfferingsPaginator returns a new +// DescribeReservedInstanceOfferingsPaginator +func NewDescribeReservedInstanceOfferingsPaginator(client DescribeReservedInstanceOfferingsAPIClient, params *DescribeReservedInstanceOfferingsInput, optFns ...func(*DescribeReservedInstanceOfferingsPaginatorOptions)) *DescribeReservedInstanceOfferingsPaginator { + if params == nil { + params = &DescribeReservedInstanceOfferingsInput{} + } + + options := DescribeReservedInstanceOfferingsPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeReservedInstanceOfferingsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeReservedInstanceOfferingsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribeReservedInstanceOfferings page. +func (p *DescribeReservedInstanceOfferingsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeReservedInstanceOfferingsOutput, 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.DescribeReservedInstanceOfferings(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_opDescribeReservedInstanceOfferings(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "DescribeReservedInstanceOfferings", + } +} diff --git a/service/opensearch/api_op_DescribeReservedInstances.go b/service/opensearch/api_op_DescribeReservedInstances.go new file mode 100644 index 00000000000..468f03bed9f --- /dev/null +++ b/service/opensearch/api_op_DescribeReservedInstances.go @@ -0,0 +1,215 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns information about reserved OpenSearch instances for this account. +func (c *Client) DescribeReservedInstances(ctx context.Context, params *DescribeReservedInstancesInput, optFns ...func(*Options)) (*DescribeReservedInstancesOutput, error) { + if params == nil { + params = &DescribeReservedInstancesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeReservedInstances", params, optFns, c.addOperationDescribeReservedInstancesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeReservedInstancesOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for parameters to DescribeReservedInstances +type DescribeReservedInstancesInput struct { + + // Set this value to limit the number of results returned. If not specified, + // defaults to 100. + MaxResults int32 + + // Provides an identifier to allow retrieval of paginated results. + NextToken *string + + // The reserved instance identifier filter value. Use this parameter to show only + // the reservation that matches the specified reserved OpenSearch instance ID. + ReservedInstanceId *string + + noSmithyDocumentSerde +} + +// Container for results from DescribeReservedInstances +type DescribeReservedInstancesOutput struct { + + // Provides an identifier to allow retrieval of paginated results. + NextToken *string + + // List of reserved OpenSearch instances. + ReservedInstances []types.ReservedInstance + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeReservedInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeReservedInstances{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeReservedInstances{}, 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_opDescribeReservedInstances(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 +} + +// DescribeReservedInstancesAPIClient is a client that implements the +// DescribeReservedInstances operation. +type DescribeReservedInstancesAPIClient interface { + DescribeReservedInstances(context.Context, *DescribeReservedInstancesInput, ...func(*Options)) (*DescribeReservedInstancesOutput, error) +} + +var _ DescribeReservedInstancesAPIClient = (*Client)(nil) + +// DescribeReservedInstancesPaginatorOptions is the paginator options for +// DescribeReservedInstances +type DescribeReservedInstancesPaginatorOptions struct { + // Set this value to limit the number of results returned. If not specified, + // defaults to 100. + 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 +} + +// DescribeReservedInstancesPaginator is a paginator for DescribeReservedInstances +type DescribeReservedInstancesPaginator struct { + options DescribeReservedInstancesPaginatorOptions + client DescribeReservedInstancesAPIClient + params *DescribeReservedInstancesInput + nextToken *string + firstPage bool +} + +// NewDescribeReservedInstancesPaginator returns a new +// DescribeReservedInstancesPaginator +func NewDescribeReservedInstancesPaginator(client DescribeReservedInstancesAPIClient, params *DescribeReservedInstancesInput, optFns ...func(*DescribeReservedInstancesPaginatorOptions)) *DescribeReservedInstancesPaginator { + if params == nil { + params = &DescribeReservedInstancesInput{} + } + + options := DescribeReservedInstancesPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeReservedInstancesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeReservedInstancesPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next DescribeReservedInstances page. +func (p *DescribeReservedInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeReservedInstancesOutput, 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.DescribeReservedInstances(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_opDescribeReservedInstances(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "DescribeReservedInstances", + } +} diff --git a/service/opensearch/api_op_DissociatePackage.go b/service/opensearch/api_op_DissociatePackage.go new file mode 100644 index 00000000000..47b72126e59 --- /dev/null +++ b/service/opensearch/api_op_DissociatePackage.go @@ -0,0 +1,129 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Dissociates a package from the Amazon OpenSearch Service domain. +func (c *Client) DissociatePackage(ctx context.Context, params *DissociatePackageInput, optFns ...func(*Options)) (*DissociatePackageOutput, error) { + if params == nil { + params = &DissociatePackageInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DissociatePackage", params, optFns, c.addOperationDissociatePackageMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DissociatePackageOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the request parameters to the DissociatePackage operation. +type DissociatePackageInput struct { + + // The name of the domain to associate the package with. + // + // This member is required. + DomainName *string + + // The internal ID of the package to associate with a domain. Use DescribePackages + // to find this value. + // + // This member is required. + PackageID *string + + noSmithyDocumentSerde +} + +// Container for the response returned by DissociatePackage operation. +type DissociatePackageOutput struct { + + // DomainPackageDetails + DomainPackageDetails *types.DomainPackageDetails + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDissociatePackageMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDissociatePackage{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDissociatePackage{}, 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 = addOpDissociatePackageValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDissociatePackage(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_opDissociatePackage(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "DissociatePackage", + } +} diff --git a/service/opensearch/api_op_GetCompatibleVersions.go b/service/opensearch/api_op_GetCompatibleVersions.go new file mode 100644 index 00000000000..bf815e4088a --- /dev/null +++ b/service/opensearch/api_op_GetCompatibleVersions.go @@ -0,0 +1,123 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of upgrade-compatible versions of OpenSearch/Elasticsearch. You +// can optionally pass a DomainName to get all upgrade-compatible versions of +// OpenSearch/Elasticsearch for that specific domain. +func (c *Client) GetCompatibleVersions(ctx context.Context, params *GetCompatibleVersionsInput, optFns ...func(*Options)) (*GetCompatibleVersionsOutput, error) { + if params == nil { + params = &GetCompatibleVersionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetCompatibleVersions", params, optFns, c.addOperationGetCompatibleVersionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetCompatibleVersionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the request parameters to GetCompatibleVersions operation. +type GetCompatibleVersionsInput struct { + + // The name of an domain. Domain names are unique across the domains owned by an + // account within an AWS region. Domain names start with a letter or number and can + // contain the following characters: a-z (lowercase), 0-9, and - (hyphen). + DomainName *string + + noSmithyDocumentSerde +} + +// Container for the response returned by the GetCompatibleVersions operation. +type GetCompatibleVersionsOutput struct { + + // A map of compatible OpenSearch versions returned as part of the + // GetCompatibleVersions operation. + CompatibleVersions []types.CompatibleVersionsMap + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetCompatibleVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetCompatibleVersions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetCompatibleVersions{}, 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_opGetCompatibleVersions(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_opGetCompatibleVersions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "GetCompatibleVersions", + } +} diff --git a/service/opensearch/api_op_GetPackageVersionHistory.go b/service/opensearch/api_op_GetPackageVersionHistory.go new file mode 100644 index 00000000000..82ebe6d831b --- /dev/null +++ b/service/opensearch/api_op_GetPackageVersionHistory.go @@ -0,0 +1,219 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of package versions, along with their creation time and commit +// message. +func (c *Client) GetPackageVersionHistory(ctx context.Context, params *GetPackageVersionHistoryInput, optFns ...func(*Options)) (*GetPackageVersionHistoryOutput, error) { + if params == nil { + params = &GetPackageVersionHistoryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetPackageVersionHistory", params, optFns, c.addOperationGetPackageVersionHistoryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetPackageVersionHistoryOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the request parameters to the GetPackageVersionHistory operation. +type GetPackageVersionHistoryInput struct { + + // Returns an audit history of package versions. + // + // This member is required. + PackageID *string + + // Limits results to a maximum number of package versions. + MaxResults int32 + + // Used for pagination. Only necessary if a previous API call includes a non-null + // NextToken value. If provided, returns results for the next page. + NextToken *string + + noSmithyDocumentSerde +} + +// Container for response returned by GetPackageVersionHistory operation. +type GetPackageVersionHistoryOutput struct { + NextToken *string + + PackageID *string + + // List of PackageVersionHistory objects. + PackageVersionHistoryList []types.PackageVersionHistory + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetPackageVersionHistoryMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetPackageVersionHistory{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetPackageVersionHistory{}, 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 = addOpGetPackageVersionHistoryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPackageVersionHistory(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 +} + +// GetPackageVersionHistoryAPIClient is a client that implements the +// GetPackageVersionHistory operation. +type GetPackageVersionHistoryAPIClient interface { + GetPackageVersionHistory(context.Context, *GetPackageVersionHistoryInput, ...func(*Options)) (*GetPackageVersionHistoryOutput, error) +} + +var _ GetPackageVersionHistoryAPIClient = (*Client)(nil) + +// GetPackageVersionHistoryPaginatorOptions is the paginator options for +// GetPackageVersionHistory +type GetPackageVersionHistoryPaginatorOptions struct { + // Limits results to a maximum number of package versions. + 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 +} + +// GetPackageVersionHistoryPaginator is a paginator for GetPackageVersionHistory +type GetPackageVersionHistoryPaginator struct { + options GetPackageVersionHistoryPaginatorOptions + client GetPackageVersionHistoryAPIClient + params *GetPackageVersionHistoryInput + nextToken *string + firstPage bool +} + +// NewGetPackageVersionHistoryPaginator returns a new +// GetPackageVersionHistoryPaginator +func NewGetPackageVersionHistoryPaginator(client GetPackageVersionHistoryAPIClient, params *GetPackageVersionHistoryInput, optFns ...func(*GetPackageVersionHistoryPaginatorOptions)) *GetPackageVersionHistoryPaginator { + if params == nil { + params = &GetPackageVersionHistoryInput{} + } + + options := GetPackageVersionHistoryPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetPackageVersionHistoryPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetPackageVersionHistoryPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next GetPackageVersionHistory page. +func (p *GetPackageVersionHistoryPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetPackageVersionHistoryOutput, 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.GetPackageVersionHistory(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_opGetPackageVersionHistory(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "GetPackageVersionHistory", + } +} diff --git a/service/opensearch/api_op_GetUpgradeHistory.go b/service/opensearch/api_op_GetUpgradeHistory.go new file mode 100644 index 00000000000..90b425ceaa2 --- /dev/null +++ b/service/opensearch/api_op_GetUpgradeHistory.go @@ -0,0 +1,222 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the complete history of the last 10 upgrades performed on the domain. +func (c *Client) GetUpgradeHistory(ctx context.Context, params *GetUpgradeHistoryInput, optFns ...func(*Options)) (*GetUpgradeHistoryOutput, error) { + if params == nil { + params = &GetUpgradeHistoryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetUpgradeHistory", params, optFns, c.addOperationGetUpgradeHistoryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetUpgradeHistoryOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the request parameters to the GetUpgradeHistory operation. +type GetUpgradeHistoryInput struct { + + // The name of an domain. Domain names are unique across the domains owned by an + // account within an AWS region. Domain names start with a letter or number and can + // contain the following characters: a-z (lowercase), 0-9, and - (hyphen). + // + // This member is required. + DomainName *string + + // Set this value to limit the number of results returned. + MaxResults int32 + + // Paginated APIs accept the NextToken input to return the next page of results and + // provide a NextToken output in the response, which you can use to retrieve more + // results. + NextToken *string + + noSmithyDocumentSerde +} + +// Container for the response returned by the GetUpgradeHistory operation. +type GetUpgradeHistoryOutput struct { + + // Pagination token that needs to be supplied to the next call to get the next page + // of results. + NextToken *string + + // A list of UpgradeHistory objects corresponding to each upgrade or upgrade + // eligibility check performed on a domain returned as part of the + // GetUpgradeHistoryResponse object. + UpgradeHistories []types.UpgradeHistory + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetUpgradeHistoryMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetUpgradeHistory{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetUpgradeHistory{}, 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 = addOpGetUpgradeHistoryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetUpgradeHistory(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 +} + +// GetUpgradeHistoryAPIClient is a client that implements the GetUpgradeHistory +// operation. +type GetUpgradeHistoryAPIClient interface { + GetUpgradeHistory(context.Context, *GetUpgradeHistoryInput, ...func(*Options)) (*GetUpgradeHistoryOutput, error) +} + +var _ GetUpgradeHistoryAPIClient = (*Client)(nil) + +// GetUpgradeHistoryPaginatorOptions is the paginator options for GetUpgradeHistory +type GetUpgradeHistoryPaginatorOptions struct { + // Set this value to limit the number of results returned. + 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 +} + +// GetUpgradeHistoryPaginator is a paginator for GetUpgradeHistory +type GetUpgradeHistoryPaginator struct { + options GetUpgradeHistoryPaginatorOptions + client GetUpgradeHistoryAPIClient + params *GetUpgradeHistoryInput + nextToken *string + firstPage bool +} + +// NewGetUpgradeHistoryPaginator returns a new GetUpgradeHistoryPaginator +func NewGetUpgradeHistoryPaginator(client GetUpgradeHistoryAPIClient, params *GetUpgradeHistoryInput, optFns ...func(*GetUpgradeHistoryPaginatorOptions)) *GetUpgradeHistoryPaginator { + if params == nil { + params = &GetUpgradeHistoryInput{} + } + + options := GetUpgradeHistoryPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetUpgradeHistoryPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetUpgradeHistoryPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next GetUpgradeHistory page. +func (p *GetUpgradeHistoryPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetUpgradeHistoryOutput, 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.GetUpgradeHistory(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_opGetUpgradeHistory(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "GetUpgradeHistory", + } +} diff --git a/service/opensearch/api_op_GetUpgradeStatus.go b/service/opensearch/api_op_GetUpgradeStatus.go new file mode 100644 index 00000000000..bc0878adc0f --- /dev/null +++ b/service/opensearch/api_op_GetUpgradeStatus.go @@ -0,0 +1,149 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the latest status of the last upgrade or upgrade eligibility check +// performed on the domain. +func (c *Client) GetUpgradeStatus(ctx context.Context, params *GetUpgradeStatusInput, optFns ...func(*Options)) (*GetUpgradeStatusOutput, error) { + if params == nil { + params = &GetUpgradeStatusInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetUpgradeStatus", params, optFns, c.addOperationGetUpgradeStatusMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetUpgradeStatusOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the request parameters to the GetUpgradeStatus operation. +type GetUpgradeStatusInput struct { + + // The name of an domain. Domain names are unique across the domains owned by an + // account within an AWS region. Domain names start with a letter or number and can + // contain the following characters: a-z (lowercase), 0-9, and - (hyphen). + // + // This member is required. + DomainName *string + + noSmithyDocumentSerde +} + +// Container for the response returned by the GetUpgradeStatus operation. +type GetUpgradeStatusOutput struct { + + // One of four statuses an upgrade have, returned as part of the + // GetUpgradeStatusResponse object. The status can take one of the following + // values: + // + // * In Progress + // + // * Succeeded + // + // * Succeeded with Issues + // + // * Failed + StepStatus types.UpgradeStatus + + // A string that briefly describes the update. + UpgradeName *string + + // One of three steps an upgrade or upgrade eligibility check goes through: + // + // * + // PreUpgradeCheck + // + // * Snapshot + // + // * Upgrade + UpgradeStep types.UpgradeStep + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetUpgradeStatusMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetUpgradeStatus{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetUpgradeStatus{}, 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 = addOpGetUpgradeStatusValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetUpgradeStatus(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_opGetUpgradeStatus(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "GetUpgradeStatus", + } +} diff --git a/service/opensearch/api_op_ListDomainNames.go b/service/opensearch/api_op_ListDomainNames.go new file mode 100644 index 00000000000..61caeddac7e --- /dev/null +++ b/service/opensearch/api_op_ListDomainNames.go @@ -0,0 +1,114 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the names of all domains owned by the current user's account. +func (c *Client) ListDomainNames(ctx context.Context, params *ListDomainNamesInput, optFns ...func(*Options)) (*ListDomainNamesOutput, error) { + if params == nil { + params = &ListDomainNamesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListDomainNames", params, optFns, c.addOperationListDomainNamesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListDomainNamesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListDomainNamesInput struct { + noSmithyDocumentSerde +} + +// The result of a ListDomainNames operation. Contains the names of all domains +// owned by this account. +type ListDomainNamesOutput struct { + + // List of domain names. + DomainNames []types.DomainInfo + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListDomainNamesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListDomainNames{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListDomainNames{}, 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_opListDomainNames(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_opListDomainNames(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "ListDomainNames", + } +} diff --git a/service/opensearch/api_op_ListDomainsForPackage.go b/service/opensearch/api_op_ListDomainsForPackage.go new file mode 100644 index 00000000000..5a533c5698c --- /dev/null +++ b/service/opensearch/api_op_ListDomainsForPackage.go @@ -0,0 +1,216 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all Amazon OpenSearch Service domains associated with the package. +func (c *Client) ListDomainsForPackage(ctx context.Context, params *ListDomainsForPackageInput, optFns ...func(*Options)) (*ListDomainsForPackageOutput, error) { + if params == nil { + params = &ListDomainsForPackageInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListDomainsForPackage", params, optFns, c.addOperationListDomainsForPackageMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListDomainsForPackageOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the request parameters to the ListDomainsForPackage operation. +type ListDomainsForPackageInput struct { + + // The package for which to list associated domains. + // + // This member is required. + PackageID *string + + // Limits the results to a maximum number of domains. + MaxResults int32 + + // Used for pagination. Only necessary if a previous API call includes a non-null + // NextToken value. If provided, returns results for the next page. + NextToken *string + + noSmithyDocumentSerde +} + +// Container for the response parameters to the ListDomainsForPackage operation. +type ListDomainsForPackageOutput struct { + + // List of DomainPackageDetails objects. + DomainPackageDetailsList []types.DomainPackageDetails + + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListDomainsForPackageMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListDomainsForPackage{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListDomainsForPackage{}, 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 = addOpListDomainsForPackageValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDomainsForPackage(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 +} + +// ListDomainsForPackageAPIClient is a client that implements the +// ListDomainsForPackage operation. +type ListDomainsForPackageAPIClient interface { + ListDomainsForPackage(context.Context, *ListDomainsForPackageInput, ...func(*Options)) (*ListDomainsForPackageOutput, error) +} + +var _ ListDomainsForPackageAPIClient = (*Client)(nil) + +// ListDomainsForPackagePaginatorOptions is the paginator options for +// ListDomainsForPackage +type ListDomainsForPackagePaginatorOptions struct { + // Limits the results to a maximum number of domains. + 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 +} + +// ListDomainsForPackagePaginator is a paginator for ListDomainsForPackage +type ListDomainsForPackagePaginator struct { + options ListDomainsForPackagePaginatorOptions + client ListDomainsForPackageAPIClient + params *ListDomainsForPackageInput + nextToken *string + firstPage bool +} + +// NewListDomainsForPackagePaginator returns a new ListDomainsForPackagePaginator +func NewListDomainsForPackagePaginator(client ListDomainsForPackageAPIClient, params *ListDomainsForPackageInput, optFns ...func(*ListDomainsForPackagePaginatorOptions)) *ListDomainsForPackagePaginator { + if params == nil { + params = &ListDomainsForPackageInput{} + } + + options := ListDomainsForPackagePaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListDomainsForPackagePaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListDomainsForPackagePaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListDomainsForPackage page. +func (p *ListDomainsForPackagePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListDomainsForPackageOutput, 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.ListDomainsForPackage(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_opListDomainsForPackage(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "ListDomainsForPackage", + } +} diff --git a/service/opensearch/api_op_ListInstanceTypeDetails.go b/service/opensearch/api_op_ListInstanceTypeDetails.go new file mode 100644 index 00000000000..9b749c8b00d --- /dev/null +++ b/service/opensearch/api_op_ListInstanceTypeDetails.go @@ -0,0 +1,219 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +func (c *Client) ListInstanceTypeDetails(ctx context.Context, params *ListInstanceTypeDetailsInput, optFns ...func(*Options)) (*ListInstanceTypeDetailsOutput, error) { + if params == nil { + params = &ListInstanceTypeDetailsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListInstanceTypeDetails", params, optFns, c.addOperationListInstanceTypeDetailsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListInstanceTypeDetailsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListInstanceTypeDetailsInput struct { + + // This member is required. + EngineVersion *string + + // The name of an domain. Domain names are unique across the domains owned by an + // account within an AWS region. Domain names start with a letter or number and can + // contain the following characters: a-z (lowercase), 0-9, and - (hyphen). + DomainName *string + + // Set this value to limit the number of results returned. + MaxResults int32 + + // Paginated APIs accept the NextToken input to return the next page of results and + // provide a NextToken output in the response, which you can use to retrieve more + // results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListInstanceTypeDetailsOutput struct { + InstanceTypeDetails []types.InstanceTypeDetails + + // Paginated APIs accept the NextToken input to return the next page of results and + // provide a NextToken output in the response, which you can use to retrieve more + // results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListInstanceTypeDetailsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListInstanceTypeDetails{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListInstanceTypeDetails{}, 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 = addOpListInstanceTypeDetailsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInstanceTypeDetails(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 +} + +// ListInstanceTypeDetailsAPIClient is a client that implements the +// ListInstanceTypeDetails operation. +type ListInstanceTypeDetailsAPIClient interface { + ListInstanceTypeDetails(context.Context, *ListInstanceTypeDetailsInput, ...func(*Options)) (*ListInstanceTypeDetailsOutput, error) +} + +var _ ListInstanceTypeDetailsAPIClient = (*Client)(nil) + +// ListInstanceTypeDetailsPaginatorOptions is the paginator options for +// ListInstanceTypeDetails +type ListInstanceTypeDetailsPaginatorOptions struct { + // Set this value to limit the number of results returned. + 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 +} + +// ListInstanceTypeDetailsPaginator is a paginator for ListInstanceTypeDetails +type ListInstanceTypeDetailsPaginator struct { + options ListInstanceTypeDetailsPaginatorOptions + client ListInstanceTypeDetailsAPIClient + params *ListInstanceTypeDetailsInput + nextToken *string + firstPage bool +} + +// NewListInstanceTypeDetailsPaginator returns a new +// ListInstanceTypeDetailsPaginator +func NewListInstanceTypeDetailsPaginator(client ListInstanceTypeDetailsAPIClient, params *ListInstanceTypeDetailsInput, optFns ...func(*ListInstanceTypeDetailsPaginatorOptions)) *ListInstanceTypeDetailsPaginator { + if params == nil { + params = &ListInstanceTypeDetailsInput{} + } + + options := ListInstanceTypeDetailsPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListInstanceTypeDetailsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListInstanceTypeDetailsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListInstanceTypeDetails page. +func (p *ListInstanceTypeDetailsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListInstanceTypeDetailsOutput, 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.ListInstanceTypeDetails(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_opListInstanceTypeDetails(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "ListInstanceTypeDetails", + } +} diff --git a/service/opensearch/api_op_ListPackagesForDomain.go b/service/opensearch/api_op_ListPackagesForDomain.go new file mode 100644 index 00000000000..f50b48f1699 --- /dev/null +++ b/service/opensearch/api_op_ListPackagesForDomain.go @@ -0,0 +1,217 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all packages associated with the Amazon OpenSearch Service domain. +func (c *Client) ListPackagesForDomain(ctx context.Context, params *ListPackagesForDomainInput, optFns ...func(*Options)) (*ListPackagesForDomainOutput, error) { + if params == nil { + params = &ListPackagesForDomainInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListPackagesForDomain", params, optFns, c.addOperationListPackagesForDomainMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListPackagesForDomainOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the request parameters to the ListPackagesForDomain operation. +type ListPackagesForDomainInput struct { + + // The name of the domain for which you want to list associated packages. + // + // This member is required. + DomainName *string + + // Limits results to a maximum number of packages. + MaxResults int32 + + // Used for pagination. Only necessary if a previous API call includes a non-null + // NextToken value. If provided, returns results for the next page. + NextToken *string + + noSmithyDocumentSerde +} + +// Container for the response parameters to the ListPackagesForDomain operation. +type ListPackagesForDomainOutput struct { + + // List of DomainPackageDetails objects. + DomainPackageDetailsList []types.DomainPackageDetails + + // Pagination token to supply to the next call to get the next page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListPackagesForDomainMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListPackagesForDomain{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListPackagesForDomain{}, 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 = addOpListPackagesForDomainValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPackagesForDomain(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 +} + +// ListPackagesForDomainAPIClient is a client that implements the +// ListPackagesForDomain operation. +type ListPackagesForDomainAPIClient interface { + ListPackagesForDomain(context.Context, *ListPackagesForDomainInput, ...func(*Options)) (*ListPackagesForDomainOutput, error) +} + +var _ ListPackagesForDomainAPIClient = (*Client)(nil) + +// ListPackagesForDomainPaginatorOptions is the paginator options for +// ListPackagesForDomain +type ListPackagesForDomainPaginatorOptions struct { + // Limits results to a maximum number of packages. + 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 +} + +// ListPackagesForDomainPaginator is a paginator for ListPackagesForDomain +type ListPackagesForDomainPaginator struct { + options ListPackagesForDomainPaginatorOptions + client ListPackagesForDomainAPIClient + params *ListPackagesForDomainInput + nextToken *string + firstPage bool +} + +// NewListPackagesForDomainPaginator returns a new ListPackagesForDomainPaginator +func NewListPackagesForDomainPaginator(client ListPackagesForDomainAPIClient, params *ListPackagesForDomainInput, optFns ...func(*ListPackagesForDomainPaginatorOptions)) *ListPackagesForDomainPaginator { + if params == nil { + params = &ListPackagesForDomainInput{} + } + + options := ListPackagesForDomainPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListPackagesForDomainPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListPackagesForDomainPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListPackagesForDomain page. +func (p *ListPackagesForDomainPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListPackagesForDomainOutput, 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.ListPackagesForDomain(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_opListPackagesForDomain(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "ListPackagesForDomain", + } +} diff --git a/service/opensearch/api_op_ListTags.go b/service/opensearch/api_op_ListTags.go new file mode 100644 index 00000000000..e3f04405539 --- /dev/null +++ b/service/opensearch/api_op_ListTags.go @@ -0,0 +1,124 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns all tags for the given domain. +func (c *Client) ListTags(ctx context.Context, params *ListTagsInput, optFns ...func(*Options)) (*ListTagsOutput, error) { + if params == nil { + params = &ListTagsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTags", params, optFns, c.addOperationListTagsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTagsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the parameters to the ListTags operation. Specify the ARN of the +// domain that the tags you want to view are attached to. +type ListTagsInput struct { + + // Specify the ARN of the domain that the tags you want to view are attached to. + // + // This member is required. + ARN *string + + noSmithyDocumentSerde +} + +// The result of a ListTags operation. Contains tags for all requested domains. +type ListTagsOutput struct { + + // List of Tag for the requested domain. + TagList []types.Tag + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListTags{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTags{}, 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 = addOpListTagsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTags(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_opListTags(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "ListTags", + } +} diff --git a/service/opensearch/api_op_ListVersions.go b/service/opensearch/api_op_ListVersions.go new file mode 100644 index 00000000000..77deb23d209 --- /dev/null +++ b/service/opensearch/api_op_ListVersions.go @@ -0,0 +1,215 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List all supported versions of OpenSearch and Elasticsearch. +func (c *Client) ListVersions(ctx context.Context, params *ListVersionsInput, optFns ...func(*Options)) (*ListVersionsOutput, error) { + if params == nil { + params = &ListVersionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListVersions", params, optFns, c.addOperationListVersionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListVersionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the parameters to the ListVersions operation. Use MaxResults to +// control the maximum number of results to retrieve in a single call. Use +// NextToken in response to retrieve more results. If the received response does +// not contain a NextToken, there are no more results to retrieve. +type ListVersionsInput struct { + + // Set this value to limit the number of results returned. Value must be greater + // than 10 or it won't be honored. + MaxResults int32 + + // Paginated APIs accept the NextToken input to return the next page of results and + // provide a NextToken output in the response, which you can use to retrieve more + // results. + NextToken *string + + noSmithyDocumentSerde +} + +// Container for the parameters for response received from the ListVersions +// operation. +type ListVersionsOutput struct { + + // Paginated APIs accept the NextToken input to return the next page of results and + // provide a NextToken output in the response, which you can use to retrieve more + // results. + NextToken *string + + // List of supported OpenSearch versions. + Versions []string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListVersions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListVersions{}, 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_opListVersions(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 +} + +// ListVersionsAPIClient is a client that implements the ListVersions operation. +type ListVersionsAPIClient interface { + ListVersions(context.Context, *ListVersionsInput, ...func(*Options)) (*ListVersionsOutput, error) +} + +var _ ListVersionsAPIClient = (*Client)(nil) + +// ListVersionsPaginatorOptions is the paginator options for ListVersions +type ListVersionsPaginatorOptions struct { + // Set this value to limit the number of results returned. Value must be greater + // than 10 or it won't be honored. + 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 +} + +// ListVersionsPaginator is a paginator for ListVersions +type ListVersionsPaginator struct { + options ListVersionsPaginatorOptions + client ListVersionsAPIClient + params *ListVersionsInput + nextToken *string + firstPage bool +} + +// NewListVersionsPaginator returns a new ListVersionsPaginator +func NewListVersionsPaginator(client ListVersionsAPIClient, params *ListVersionsInput, optFns ...func(*ListVersionsPaginatorOptions)) *ListVersionsPaginator { + if params == nil { + params = &ListVersionsInput{} + } + + options := ListVersionsPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListVersionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListVersionsPaginator) HasMorePages() bool { + return p.firstPage || p.nextToken != nil +} + +// NextPage retrieves the next ListVersions page. +func (p *ListVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListVersionsOutput, 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.ListVersions(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_opListVersions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "ListVersions", + } +} diff --git a/service/opensearch/api_op_PurchaseReservedInstanceOffering.go b/service/opensearch/api_op_PurchaseReservedInstanceOffering.go new file mode 100644 index 00000000000..0c26517ef80 --- /dev/null +++ b/service/opensearch/api_op_PurchaseReservedInstanceOffering.go @@ -0,0 +1,133 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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" +) + +// Allows you to purchase reserved OpenSearch instances. +func (c *Client) PurchaseReservedInstanceOffering(ctx context.Context, params *PurchaseReservedInstanceOfferingInput, optFns ...func(*Options)) (*PurchaseReservedInstanceOfferingOutput, error) { + if params == nil { + params = &PurchaseReservedInstanceOfferingInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PurchaseReservedInstanceOffering", params, optFns, c.addOperationPurchaseReservedInstanceOfferingMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PurchaseReservedInstanceOfferingOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for parameters to PurchaseReservedInstanceOffering +type PurchaseReservedInstanceOfferingInput struct { + + // A customer-specified identifier to track this reservation. + // + // This member is required. + ReservationName *string + + // The ID of the reserved OpenSearch instance offering to purchase. + // + // This member is required. + ReservedInstanceOfferingId *string + + // The number of OpenSearch instances to reserve. + InstanceCount int32 + + noSmithyDocumentSerde +} + +// Represents the output of a PurchaseReservedInstanceOffering operation. +type PurchaseReservedInstanceOfferingOutput struct { + + // The customer-specified identifier used to track this reservation. + ReservationName *string + + // Details of the reserved OpenSearch instance which was purchased. + ReservedInstanceId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPurchaseReservedInstanceOfferingMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpPurchaseReservedInstanceOffering{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPurchaseReservedInstanceOffering{}, 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 = addOpPurchaseReservedInstanceOfferingValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPurchaseReservedInstanceOffering(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_opPurchaseReservedInstanceOffering(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "PurchaseReservedInstanceOffering", + } +} diff --git a/service/opensearch/api_op_RejectInboundConnection.go b/service/opensearch/api_op_RejectInboundConnection.go new file mode 100644 index 00000000000..128cf443b3a --- /dev/null +++ b/service/opensearch/api_op_RejectInboundConnection.go @@ -0,0 +1,125 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Allows the remote domain owner to reject an inbound cross-cluster connection +// request. +func (c *Client) RejectInboundConnection(ctx context.Context, params *RejectInboundConnectionInput, optFns ...func(*Options)) (*RejectInboundConnectionOutput, error) { + if params == nil { + params = &RejectInboundConnectionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RejectInboundConnection", params, optFns, c.addOperationRejectInboundConnectionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RejectInboundConnectionOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the parameters to the RejectInboundConnection operation. +type RejectInboundConnectionInput struct { + + // The ID of the inbound connection to reject. + // + // This member is required. + ConnectionId *string + + noSmithyDocumentSerde +} + +// The result of a RejectInboundConnection operation. Contains details about the +// rejected inbound connection. +type RejectInboundConnectionOutput struct { + + // The InboundConnection of the rejected inbound connection. + Connection *types.InboundConnection + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRejectInboundConnectionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpRejectInboundConnection{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRejectInboundConnection{}, 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 = addOpRejectInboundConnectionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRejectInboundConnection(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_opRejectInboundConnection(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "RejectInboundConnection", + } +} diff --git a/service/opensearch/api_op_RemoveTags.go b/service/opensearch/api_op_RemoveTags.go new file mode 100644 index 00000000000..31624b43627 --- /dev/null +++ b/service/opensearch/api_op_RemoveTags.go @@ -0,0 +1,123 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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" +) + +// Removes the specified set of tags from the given domain. +func (c *Client) RemoveTags(ctx context.Context, params *RemoveTagsInput, optFns ...func(*Options)) (*RemoveTagsOutput, error) { + if params == nil { + params = &RemoveTagsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RemoveTags", params, optFns, c.addOperationRemoveTagsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RemoveTagsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the parameters to the RemoveTags operation. Specify the ARN for +// the domain from which you want to remove the specified TagKey. +type RemoveTagsInput struct { + + // The ARN of the domain from which you want to delete the specified tags. + // + // This member is required. + ARN *string + + // The TagKey list you want to remove from the domain. + // + // This member is required. + TagKeys []string + + noSmithyDocumentSerde +} + +type RemoveTagsOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRemoveTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpRemoveTags{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRemoveTags{}, 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 = addOpRemoveTagsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveTags(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_opRemoveTags(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "RemoveTags", + } +} diff --git a/service/opensearch/api_op_StartServiceSoftwareUpdate.go b/service/opensearch/api_op_StartServiceSoftwareUpdate.go new file mode 100644 index 00000000000..ef72917aec2 --- /dev/null +++ b/service/opensearch/api_op_StartServiceSoftwareUpdate.go @@ -0,0 +1,125 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Schedules a service software update for an Amazon OpenSearch Service domain. +func (c *Client) StartServiceSoftwareUpdate(ctx context.Context, params *StartServiceSoftwareUpdateInput, optFns ...func(*Options)) (*StartServiceSoftwareUpdateOutput, error) { + if params == nil { + params = &StartServiceSoftwareUpdateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartServiceSoftwareUpdate", params, optFns, c.addOperationStartServiceSoftwareUpdateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartServiceSoftwareUpdateOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the parameters to the StartServiceSoftwareUpdate operation. +// Specifies the name of the domain to schedule a service software update for. +type StartServiceSoftwareUpdateInput struct { + + // The name of the domain that you want to update to the latest service software. + // + // This member is required. + DomainName *string + + noSmithyDocumentSerde +} + +// The result of a StartServiceSoftwareUpdate operation. Contains the status of the +// update. +type StartServiceSoftwareUpdateOutput struct { + + // The current status of the OpenSearch service software update. + ServiceSoftwareOptions *types.ServiceSoftwareOptions + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartServiceSoftwareUpdateMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpStartServiceSoftwareUpdate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartServiceSoftwareUpdate{}, 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 = addOpStartServiceSoftwareUpdateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartServiceSoftwareUpdate(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_opStartServiceSoftwareUpdate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "StartServiceSoftwareUpdate", + } +} diff --git a/service/opensearch/api_op_UpdateDomainConfig.go b/service/opensearch/api_op_UpdateDomainConfig.go new file mode 100644 index 00000000000..290521c619d --- /dev/null +++ b/service/opensearch/api_op_UpdateDomainConfig.go @@ -0,0 +1,179 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Modifies the cluster configuration of the specified domain, such as setting the +// instance type and the number of instances. +func (c *Client) UpdateDomainConfig(ctx context.Context, params *UpdateDomainConfigInput, optFns ...func(*Options)) (*UpdateDomainConfigOutput, error) { + if params == nil { + params = &UpdateDomainConfigInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateDomainConfig", params, optFns, c.addOperationUpdateDomainConfigMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateDomainConfigOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the parameters to the UpdateDomain operation. Specifies the type +// and number of instances in the domain cluster. +type UpdateDomainConfigInput struct { + + // The name of the domain you're updating. + // + // This member is required. + DomainName *string + + // IAM access policy as a JSON-formatted string. + AccessPolicies *string + + // Modifies the advanced option to allow references to indices in an HTTP request + // body. Must be false when configuring access to individual sub-resources. By + // default, the value is true. See Advanced options + // (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html#createdomain-configure-advanced-options) + // for more information. + AdvancedOptions map[string]string + + // Specifies advanced security options. + AdvancedSecurityOptions *types.AdvancedSecurityOptionsInput + + // Specifies Auto-Tune options. + AutoTuneOptions *types.AutoTuneOptions + + // The type and number of instances to instantiate for the domain cluster. + ClusterConfig *types.ClusterConfig + + // Options to specify the Cognito user and identity pools for OpenSearch Dashboards + // authentication. For more information, see Configuring Amazon Cognito + // authentication for OpenSearch Dashboards + // (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/cognito-auth.html). + CognitoOptions *types.CognitoOptions + + // Options to specify configuration that will be applied to the domain endpoint. + DomainEndpointOptions *types.DomainEndpointOptions + + // Specify the type and size of the EBS volume to use. + EBSOptions *types.EBSOptions + + // Specifies encryption of data at rest options. + EncryptionAtRestOptions *types.EncryptionAtRestOptions + + // Map of LogType and LogPublishingOption, each containing options to publish a + // given type of OpenSearch log. + LogPublishingOptions map[string]types.LogPublishingOption + + // Specifies node-to-node encryption options. + NodeToNodeEncryptionOptions *types.NodeToNodeEncryptionOptions + + // Option to set the time, in UTC format, for the daily automated snapshot. Default + // value is 0 hours. + SnapshotOptions *types.SnapshotOptions + + // Options to specify the subnets and security groups for the VPC endpoint. For + // more information, see Launching your Amazon OpenSearch Service domains using a + // VPC + // (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/vpc.html). + VPCOptions *types.VPCOptions + + noSmithyDocumentSerde +} + +// The result of an UpdateDomain request. Contains the status of the domain being +// updated. +type UpdateDomainConfigOutput struct { + + // The status of the updated domain. + // + // This member is required. + DomainConfig *types.DomainConfig + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateDomainConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateDomainConfig{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateDomainConfig{}, 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 = addOpUpdateDomainConfigValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateDomainConfig(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_opUpdateDomainConfig(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "UpdateDomainConfig", + } +} diff --git a/service/opensearch/api_op_UpdatePackage.go b/service/opensearch/api_op_UpdatePackage.go new file mode 100644 index 00000000000..ef3ef651f6a --- /dev/null +++ b/service/opensearch/api_op_UpdatePackage.go @@ -0,0 +1,136 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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/opensearch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates a package for use with Amazon OpenSearch Service domains. +func (c *Client) UpdatePackage(ctx context.Context, params *UpdatePackageInput, optFns ...func(*Options)) (*UpdatePackageOutput, error) { + if params == nil { + params = &UpdatePackageInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdatePackage", params, optFns, c.addOperationUpdatePackageMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdatePackageOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for request parameters to the UpdatePackage operation. +type UpdatePackageInput struct { + + // The unique identifier for the package. + // + // This member is required. + PackageID *string + + // The Amazon S3 location for importing the package specified as S3BucketName and + // S3Key + // + // This member is required. + PackageSource *types.PackageSource + + // A commit message for the new version which is shown as part of + // GetPackageVersionHistoryResponse. + CommitMessage *string + + // A new description of the package. + PackageDescription *string + + noSmithyDocumentSerde +} + +// Container for the response returned by the UpdatePackage operation. +type UpdatePackageOutput struct { + + // Information about the package. + PackageDetails *types.PackageDetails + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdatePackageMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdatePackage{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdatePackage{}, 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 = addOpUpdatePackageValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdatePackage(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_opUpdatePackage(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "UpdatePackage", + } +} diff --git a/service/opensearch/api_op_UpgradeDomain.go b/service/opensearch/api_op_UpgradeDomain.go new file mode 100644 index 00000000000..43e83368788 --- /dev/null +++ b/service/opensearch/api_op_UpgradeDomain.go @@ -0,0 +1,181 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +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" +) + +// Allows you to either upgrade your domain or perform an upgrade eligibility check +// to a compatible version of OpenSearch or Elasticsearch. +func (c *Client) UpgradeDomain(ctx context.Context, params *UpgradeDomainInput, optFns ...func(*Options)) (*UpgradeDomainOutput, error) { + if params == nil { + params = &UpgradeDomainInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpgradeDomain", params, optFns, c.addOperationUpgradeDomainMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpgradeDomainOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Container for the request parameters to UpgradeDomain operation. +type UpgradeDomainInput struct { + + // The name of an domain. Domain names are unique across the domains owned by an + // account within an AWS region. Domain names start with a letter or number and can + // contain the following characters: a-z (lowercase), 0-9, and - (hyphen). + // + // This member is required. + DomainName *string + + // The version of OpenSearch you intend to upgrade the domain to. + // + // This member is required. + TargetVersion *string + + // Exposes select native OpenSearch configuration values from opensearch.yml. + // Currently, the following advanced options are available: + // + // * Option to allow + // references to indices in an HTTP request body. Must be false when configuring + // access to individual sub-resources. By default, the value is true. See Advanced + // cluster parameters + // (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html#createdomain-configure-advanced-options) + // for more information. + // + // * Option to specify the percentage of heap space + // allocated to field data. By default, this setting is unbounded. + // + // For more + // information, see Advanced cluster parameters + // (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html#createdomain-configure-advanced-options). + AdvancedOptions map[string]string + + // When true, indicates that an upgrade eligibility check needs to be performed. + // Does not actually perform the upgrade. + PerformCheckOnly *bool + + noSmithyDocumentSerde +} + +// Container for response returned by UpgradeDomain operation. +type UpgradeDomainOutput struct { + + // Exposes select native OpenSearch configuration values from opensearch.yml. + // Currently, the following advanced options are available: + // + // * Option to allow + // references to indices in an HTTP request body. Must be false when configuring + // access to individual sub-resources. By default, the value is true. See Advanced + // cluster parameters + // (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html#createdomain-configure-advanced-options) + // for more information. + // + // * Option to specify the percentage of heap space + // allocated to field data. By default, this setting is unbounded. + // + // For more + // information, see Advanced cluster parameters + // (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html#createdomain-configure-advanced-options). + AdvancedOptions map[string]string + + // The name of an domain. Domain names are unique across the domains owned by an + // account within an AWS region. Domain names start with a letter or number and can + // contain the following characters: a-z (lowercase), 0-9, and - (hyphen). + DomainName *string + + // When true, indicates that an upgrade eligibility check needs to be performed. + // Does not actually perform the upgrade. + PerformCheckOnly *bool + + // The version of OpenSearch that you intend to upgrade the domain to. + TargetVersion *string + + UpgradeId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpgradeDomainMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpgradeDomain{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpgradeDomain{}, 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 = addOpUpgradeDomainValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpgradeDomain(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_opUpgradeDomain(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "es", + OperationName: "UpgradeDomain", + } +} diff --git a/service/opensearch/deserializers.go b/service/opensearch/deserializers.go new file mode 100644 index 00000000000..21df170e358 --- /dev/null +++ b/service/opensearch/deserializers.go @@ -0,0 +1,12267 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/opensearch/types" + smithy "github.com/aws/smithy-go" + smithyio "github.com/aws/smithy-go/io" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" + "io/ioutil" + "math" + "strings" +) + +type awsRestjson1_deserializeOpAcceptInboundConnection struct { +} + +func (*awsRestjson1_deserializeOpAcceptInboundConnection) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpAcceptInboundConnection) 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_deserializeOpErrorAcceptInboundConnection(response, &metadata) + } + output := &AcceptInboundConnectionOutput{} + 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_deserializeOpDocumentAcceptInboundConnectionOutput(&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_deserializeOpErrorAcceptInboundConnection(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("DisabledOperationException", errorCode): + return awsRestjson1_deserializeErrorDisabledOperationException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentAcceptInboundConnectionOutput(v **AcceptInboundConnectionOutput, 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 *AcceptInboundConnectionOutput + if *v == nil { + sv = &AcceptInboundConnectionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Connection": + if err := awsRestjson1_deserializeDocumentInboundConnection(&sv.Connection, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpAddTags struct { +} + +func (*awsRestjson1_deserializeOpAddTags) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpAddTags) 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_deserializeOpErrorAddTags(response, &metadata) + } + output := &AddTagsOutput{} + 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_deserializeOpErrorAddTags(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpAssociatePackage struct { +} + +func (*awsRestjson1_deserializeOpAssociatePackage) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpAssociatePackage) 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_deserializeOpErrorAssociatePackage(response, &metadata) + } + output := &AssociatePackageOutput{} + 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_deserializeOpDocumentAssociatePackageOutput(&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_deserializeOpErrorAssociatePackage(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(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_deserializeOpDocumentAssociatePackageOutput(v **AssociatePackageOutput, 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 *AssociatePackageOutput + if *v == nil { + sv = &AssociatePackageOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DomainPackageDetails": + if err := awsRestjson1_deserializeDocumentDomainPackageDetails(&sv.DomainPackageDetails, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCancelServiceSoftwareUpdate struct { +} + +func (*awsRestjson1_deserializeOpCancelServiceSoftwareUpdate) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCancelServiceSoftwareUpdate) 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_deserializeOpErrorCancelServiceSoftwareUpdate(response, &metadata) + } + output := &CancelServiceSoftwareUpdateOutput{} + 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_deserializeOpDocumentCancelServiceSoftwareUpdateOutput(&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_deserializeOpErrorCancelServiceSoftwareUpdate(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(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_deserializeOpDocumentCancelServiceSoftwareUpdateOutput(v **CancelServiceSoftwareUpdateOutput, 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 *CancelServiceSoftwareUpdateOutput + if *v == nil { + sv = &CancelServiceSoftwareUpdateOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ServiceSoftwareOptions": + if err := awsRestjson1_deserializeDocumentServiceSoftwareOptions(&sv.ServiceSoftwareOptions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateDomain struct { +} + +func (*awsRestjson1_deserializeOpCreateDomain) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateDomain) 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_deserializeOpErrorCreateDomain(response, &metadata) + } + output := &CreateDomainOutput{} + 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_deserializeOpDocumentCreateDomainOutput(&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_deserializeOpErrorCreateDomain(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("DisabledOperationException", errorCode): + return awsRestjson1_deserializeErrorDisabledOperationException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(response, errorBody) + + case strings.EqualFold("InvalidTypeException", errorCode): + return awsRestjson1_deserializeErrorInvalidTypeException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceAlreadyExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceAlreadyExistsException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateDomainOutput(v **CreateDomainOutput, 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 *CreateDomainOutput + if *v == nil { + sv = &CreateDomainOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DomainStatus": + if err := awsRestjson1_deserializeDocumentDomainStatus(&sv.DomainStatus, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateOutboundConnection struct { +} + +func (*awsRestjson1_deserializeOpCreateOutboundConnection) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateOutboundConnection) 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_deserializeOpErrorCreateOutboundConnection(response, &metadata) + } + output := &CreateOutboundConnectionOutput{} + 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_deserializeOpDocumentCreateOutboundConnectionOutput(&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_deserializeOpErrorCreateOutboundConnection(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("DisabledOperationException", errorCode): + return awsRestjson1_deserializeErrorDisabledOperationException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceAlreadyExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceAlreadyExistsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateOutboundConnectionOutput(v **CreateOutboundConnectionOutput, 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 *CreateOutboundConnectionOutput + if *v == nil { + sv = &CreateOutboundConnectionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ConnectionAlias": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConnectionAlias to be of type string, got %T instead", value) + } + sv.ConnectionAlias = ptr.String(jtv) + } + + case "ConnectionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConnectionId to be of type string, got %T instead", value) + } + sv.ConnectionId = ptr.String(jtv) + } + + case "ConnectionStatus": + if err := awsRestjson1_deserializeDocumentOutboundConnectionStatus(&sv.ConnectionStatus, value); err != nil { + return err + } + + case "LocalDomainInfo": + if err := awsRestjson1_deserializeDocumentDomainInformationContainer(&sv.LocalDomainInfo, value); err != nil { + return err + } + + case "RemoteDomainInfo": + if err := awsRestjson1_deserializeDocumentDomainInformationContainer(&sv.RemoteDomainInfo, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreatePackage struct { +} + +func (*awsRestjson1_deserializeOpCreatePackage) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreatePackage) 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_deserializeOpErrorCreatePackage(response, &metadata) + } + output := &CreatePackageOutput{} + 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_deserializeOpDocumentCreatePackageOutput(&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_deserializeOpErrorCreatePackage(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(response, errorBody) + + case strings.EqualFold("InvalidTypeException", errorCode): + return awsRestjson1_deserializeErrorInvalidTypeException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceAlreadyExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceAlreadyExistsException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreatePackageOutput(v **CreatePackageOutput, 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 *CreatePackageOutput + if *v == nil { + sv = &CreatePackageOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "PackageDetails": + if err := awsRestjson1_deserializeDocumentPackageDetails(&sv.PackageDetails, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteDomain struct { +} + +func (*awsRestjson1_deserializeOpDeleteDomain) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteDomain) 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_deserializeOpErrorDeleteDomain(response, &metadata) + } + output := &DeleteDomainOutput{} + 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_deserializeOpDocumentDeleteDomainOutput(&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_deserializeOpErrorDeleteDomain(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(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_deserializeOpDocumentDeleteDomainOutput(v **DeleteDomainOutput, 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 *DeleteDomainOutput + if *v == nil { + sv = &DeleteDomainOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DomainStatus": + if err := awsRestjson1_deserializeDocumentDomainStatus(&sv.DomainStatus, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteInboundConnection struct { +} + +func (*awsRestjson1_deserializeOpDeleteInboundConnection) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteInboundConnection) 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_deserializeOpErrorDeleteInboundConnection(response, &metadata) + } + output := &DeleteInboundConnectionOutput{} + 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_deserializeOpDocumentDeleteInboundConnectionOutput(&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_deserializeOpErrorDeleteInboundConnection(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("DisabledOperationException", errorCode): + return awsRestjson1_deserializeErrorDisabledOperationException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDeleteInboundConnectionOutput(v **DeleteInboundConnectionOutput, 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 *DeleteInboundConnectionOutput + if *v == nil { + sv = &DeleteInboundConnectionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Connection": + if err := awsRestjson1_deserializeDocumentInboundConnection(&sv.Connection, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteOutboundConnection struct { +} + +func (*awsRestjson1_deserializeOpDeleteOutboundConnection) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteOutboundConnection) 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_deserializeOpErrorDeleteOutboundConnection(response, &metadata) + } + output := &DeleteOutboundConnectionOutput{} + 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_deserializeOpDocumentDeleteOutboundConnectionOutput(&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_deserializeOpErrorDeleteOutboundConnection(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("DisabledOperationException", errorCode): + return awsRestjson1_deserializeErrorDisabledOperationException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDeleteOutboundConnectionOutput(v **DeleteOutboundConnectionOutput, 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 *DeleteOutboundConnectionOutput + if *v == nil { + sv = &DeleteOutboundConnectionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Connection": + if err := awsRestjson1_deserializeDocumentOutboundConnection(&sv.Connection, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeletePackage struct { +} + +func (*awsRestjson1_deserializeOpDeletePackage) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeletePackage) 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_deserializeOpErrorDeletePackage(response, &metadata) + } + output := &DeletePackageOutput{} + 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_deserializeOpDocumentDeletePackageOutput(&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_deserializeOpErrorDeletePackage(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(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_deserializeOpDocumentDeletePackageOutput(v **DeletePackageOutput, 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 *DeletePackageOutput + if *v == nil { + sv = &DeletePackageOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "PackageDetails": + if err := awsRestjson1_deserializeDocumentPackageDetails(&sv.PackageDetails, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeDomain struct { +} + +func (*awsRestjson1_deserializeOpDescribeDomain) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeDomain) 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_deserializeOpErrorDescribeDomain(response, &metadata) + } + output := &DescribeDomainOutput{} + 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_deserializeOpDocumentDescribeDomainOutput(&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_deserializeOpErrorDescribeDomain(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(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_deserializeOpDocumentDescribeDomainOutput(v **DescribeDomainOutput, 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 *DescribeDomainOutput + if *v == nil { + sv = &DescribeDomainOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DomainStatus": + if err := awsRestjson1_deserializeDocumentDomainStatus(&sv.DomainStatus, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeDomainAutoTunes struct { +} + +func (*awsRestjson1_deserializeOpDescribeDomainAutoTunes) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeDomainAutoTunes) 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_deserializeOpErrorDescribeDomainAutoTunes(response, &metadata) + } + output := &DescribeDomainAutoTunesOutput{} + 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_deserializeOpDocumentDescribeDomainAutoTunesOutput(&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_deserializeOpErrorDescribeDomainAutoTunes(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(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_deserializeOpDocumentDescribeDomainAutoTunesOutput(v **DescribeDomainAutoTunesOutput, 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 *DescribeDomainAutoTunesOutput + if *v == nil { + sv = &DescribeDomainAutoTunesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AutoTunes": + if err := awsRestjson1_deserializeDocumentAutoTuneList(&sv.AutoTunes, 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 +} + +type awsRestjson1_deserializeOpDescribeDomainConfig struct { +} + +func (*awsRestjson1_deserializeOpDescribeDomainConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeDomainConfig) 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_deserializeOpErrorDescribeDomainConfig(response, &metadata) + } + output := &DescribeDomainConfigOutput{} + 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_deserializeOpDocumentDescribeDomainConfigOutput(&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_deserializeOpErrorDescribeDomainConfig(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(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_deserializeOpDocumentDescribeDomainConfigOutput(v **DescribeDomainConfigOutput, 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 *DescribeDomainConfigOutput + if *v == nil { + sv = &DescribeDomainConfigOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DomainConfig": + if err := awsRestjson1_deserializeDocumentDomainConfig(&sv.DomainConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeDomains struct { +} + +func (*awsRestjson1_deserializeOpDescribeDomains) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeDomains) 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_deserializeOpErrorDescribeDomains(response, &metadata) + } + output := &DescribeDomainsOutput{} + 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_deserializeOpDocumentDescribeDomainsOutput(&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_deserializeOpErrorDescribeDomains(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeDomainsOutput(v **DescribeDomainsOutput, 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 *DescribeDomainsOutput + if *v == nil { + sv = &DescribeDomainsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DomainStatusList": + if err := awsRestjson1_deserializeDocumentDomainStatusList(&sv.DomainStatusList, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeInboundConnections struct { +} + +func (*awsRestjson1_deserializeOpDescribeInboundConnections) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeInboundConnections) 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_deserializeOpErrorDescribeInboundConnections(response, &metadata) + } + output := &DescribeInboundConnectionsOutput{} + 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_deserializeOpDocumentDescribeInboundConnectionsOutput(&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_deserializeOpErrorDescribeInboundConnections(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("DisabledOperationException", errorCode): + return awsRestjson1_deserializeErrorDisabledOperationException(response, errorBody) + + case strings.EqualFold("InvalidPaginationTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidPaginationTokenException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeInboundConnectionsOutput(v **DescribeInboundConnectionsOutput, 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 *DescribeInboundConnectionsOutput + if *v == nil { + sv = &DescribeInboundConnectionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Connections": + if err := awsRestjson1_deserializeDocumentInboundConnections(&sv.Connections, 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 +} + +type awsRestjson1_deserializeOpDescribeInstanceTypeLimits struct { +} + +func (*awsRestjson1_deserializeOpDescribeInstanceTypeLimits) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeInstanceTypeLimits) 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_deserializeOpErrorDescribeInstanceTypeLimits(response, &metadata) + } + output := &DescribeInstanceTypeLimitsOutput{} + 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_deserializeOpDocumentDescribeInstanceTypeLimitsOutput(&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_deserializeOpErrorDescribeInstanceTypeLimits(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(response, errorBody) + + case strings.EqualFold("InvalidTypeException", errorCode): + return awsRestjson1_deserializeErrorInvalidTypeException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(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_deserializeOpDocumentDescribeInstanceTypeLimitsOutput(v **DescribeInstanceTypeLimitsOutput, 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 *DescribeInstanceTypeLimitsOutput + if *v == nil { + sv = &DescribeInstanceTypeLimitsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LimitsByRole": + if err := awsRestjson1_deserializeDocumentLimitsByRole(&sv.LimitsByRole, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeOutboundConnections struct { +} + +func (*awsRestjson1_deserializeOpDescribeOutboundConnections) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeOutboundConnections) 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_deserializeOpErrorDescribeOutboundConnections(response, &metadata) + } + output := &DescribeOutboundConnectionsOutput{} + 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_deserializeOpDocumentDescribeOutboundConnectionsOutput(&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_deserializeOpErrorDescribeOutboundConnections(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("DisabledOperationException", errorCode): + return awsRestjson1_deserializeErrorDisabledOperationException(response, errorBody) + + case strings.EqualFold("InvalidPaginationTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidPaginationTokenException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeOutboundConnectionsOutput(v **DescribeOutboundConnectionsOutput, 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 *DescribeOutboundConnectionsOutput + if *v == nil { + sv = &DescribeOutboundConnectionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Connections": + if err := awsRestjson1_deserializeDocumentOutboundConnections(&sv.Connections, 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 +} + +type awsRestjson1_deserializeOpDescribePackages struct { +} + +func (*awsRestjson1_deserializeOpDescribePackages) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribePackages) 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_deserializeOpErrorDescribePackages(response, &metadata) + } + output := &DescribePackagesOutput{} + 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_deserializeOpDocumentDescribePackagesOutput(&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_deserializeOpErrorDescribePackages(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(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_deserializeOpDocumentDescribePackagesOutput(v **DescribePackagesOutput, 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 *DescribePackagesOutput + if *v == nil { + sv = &DescribePackagesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "PackageDetailsList": + if err := awsRestjson1_deserializeDocumentPackageDetailsList(&sv.PackageDetailsList, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeReservedInstanceOfferings struct { +} + +func (*awsRestjson1_deserializeOpDescribeReservedInstanceOfferings) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeReservedInstanceOfferings) 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_deserializeOpErrorDescribeReservedInstanceOfferings(response, &metadata) + } + output := &DescribeReservedInstanceOfferingsOutput{} + 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_deserializeOpDocumentDescribeReservedInstanceOfferingsOutput(&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_deserializeOpErrorDescribeReservedInstanceOfferings(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("DisabledOperationException", errorCode): + return awsRestjson1_deserializeErrorDisabledOperationException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(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_deserializeOpDocumentDescribeReservedInstanceOfferingsOutput(v **DescribeReservedInstanceOfferingsOutput, 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 *DescribeReservedInstanceOfferingsOutput + if *v == nil { + sv = &DescribeReservedInstanceOfferingsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "ReservedInstanceOfferings": + if err := awsRestjson1_deserializeDocumentReservedInstanceOfferingList(&sv.ReservedInstanceOfferings, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeReservedInstances struct { +} + +func (*awsRestjson1_deserializeOpDescribeReservedInstances) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeReservedInstances) 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_deserializeOpErrorDescribeReservedInstances(response, &metadata) + } + output := &DescribeReservedInstancesOutput{} + 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_deserializeOpDocumentDescribeReservedInstancesOutput(&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_deserializeOpErrorDescribeReservedInstances(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("DisabledOperationException", errorCode): + return awsRestjson1_deserializeErrorDisabledOperationException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(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_deserializeOpDocumentDescribeReservedInstancesOutput(v **DescribeReservedInstancesOutput, 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 *DescribeReservedInstancesOutput + if *v == nil { + sv = &DescribeReservedInstancesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "ReservedInstances": + if err := awsRestjson1_deserializeDocumentReservedInstanceList(&sv.ReservedInstances, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDissociatePackage struct { +} + +func (*awsRestjson1_deserializeOpDissociatePackage) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDissociatePackage) 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_deserializeOpErrorDissociatePackage(response, &metadata) + } + output := &DissociatePackageOutput{} + 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_deserializeOpDocumentDissociatePackageOutput(&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_deserializeOpErrorDissociatePackage(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(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_deserializeOpDocumentDissociatePackageOutput(v **DissociatePackageOutput, 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 *DissociatePackageOutput + if *v == nil { + sv = &DissociatePackageOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DomainPackageDetails": + if err := awsRestjson1_deserializeDocumentDomainPackageDetails(&sv.DomainPackageDetails, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetCompatibleVersions struct { +} + +func (*awsRestjson1_deserializeOpGetCompatibleVersions) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetCompatibleVersions) 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_deserializeOpErrorGetCompatibleVersions(response, &metadata) + } + output := &GetCompatibleVersionsOutput{} + 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_deserializeOpDocumentGetCompatibleVersionsOutput(&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_deserializeOpErrorGetCompatibleVersions(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("DisabledOperationException", errorCode): + return awsRestjson1_deserializeErrorDisabledOperationException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(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_deserializeOpDocumentGetCompatibleVersionsOutput(v **GetCompatibleVersionsOutput, 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 *GetCompatibleVersionsOutput + if *v == nil { + sv = &GetCompatibleVersionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CompatibleVersions": + if err := awsRestjson1_deserializeDocumentCompatibleVersionsList(&sv.CompatibleVersions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetPackageVersionHistory struct { +} + +func (*awsRestjson1_deserializeOpGetPackageVersionHistory) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetPackageVersionHistory) 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_deserializeOpErrorGetPackageVersionHistory(response, &metadata) + } + output := &GetPackageVersionHistoryOutput{} + 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_deserializeOpDocumentGetPackageVersionHistoryOutput(&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_deserializeOpErrorGetPackageVersionHistory(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(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_deserializeOpDocumentGetPackageVersionHistoryOutput(v **GetPackageVersionHistoryOutput, 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 *GetPackageVersionHistoryOutput + if *v == nil { + sv = &GetPackageVersionHistoryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "PackageID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageID to be of type string, got %T instead", value) + } + sv.PackageID = ptr.String(jtv) + } + + case "PackageVersionHistoryList": + if err := awsRestjson1_deserializeDocumentPackageVersionHistoryList(&sv.PackageVersionHistoryList, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetUpgradeHistory struct { +} + +func (*awsRestjson1_deserializeOpGetUpgradeHistory) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetUpgradeHistory) 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_deserializeOpErrorGetUpgradeHistory(response, &metadata) + } + output := &GetUpgradeHistoryOutput{} + 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_deserializeOpDocumentGetUpgradeHistoryOutput(&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_deserializeOpErrorGetUpgradeHistory(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("DisabledOperationException", errorCode): + return awsRestjson1_deserializeErrorDisabledOperationException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(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_deserializeOpDocumentGetUpgradeHistoryOutput(v **GetUpgradeHistoryOutput, 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 *GetUpgradeHistoryOutput + if *v == nil { + sv = &GetUpgradeHistoryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "UpgradeHistories": + if err := awsRestjson1_deserializeDocumentUpgradeHistoryList(&sv.UpgradeHistories, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetUpgradeStatus struct { +} + +func (*awsRestjson1_deserializeOpGetUpgradeStatus) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetUpgradeStatus) 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_deserializeOpErrorGetUpgradeStatus(response, &metadata) + } + output := &GetUpgradeStatusOutput{} + 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_deserializeOpDocumentGetUpgradeStatusOutput(&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_deserializeOpErrorGetUpgradeStatus(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("DisabledOperationException", errorCode): + return awsRestjson1_deserializeErrorDisabledOperationException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(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_deserializeOpDocumentGetUpgradeStatusOutput(v **GetUpgradeStatusOutput, 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 *GetUpgradeStatusOutput + if *v == nil { + sv = &GetUpgradeStatusOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "StepStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UpgradeStatus to be of type string, got %T instead", value) + } + sv.StepStatus = types.UpgradeStatus(jtv) + } + + case "UpgradeName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UpgradeName to be of type string, got %T instead", value) + } + sv.UpgradeName = ptr.String(jtv) + } + + case "UpgradeStep": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UpgradeStep to be of type string, got %T instead", value) + } + sv.UpgradeStep = types.UpgradeStep(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListDomainNames struct { +} + +func (*awsRestjson1_deserializeOpListDomainNames) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListDomainNames) 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_deserializeOpErrorListDomainNames(response, &metadata) + } + output := &ListDomainNamesOutput{} + 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_deserializeOpDocumentListDomainNamesOutput(&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_deserializeOpErrorListDomainNames(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListDomainNamesOutput(v **ListDomainNamesOutput, 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 *ListDomainNamesOutput + if *v == nil { + sv = &ListDomainNamesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DomainNames": + if err := awsRestjson1_deserializeDocumentDomainInfoList(&sv.DomainNames, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListDomainsForPackage struct { +} + +func (*awsRestjson1_deserializeOpListDomainsForPackage) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListDomainsForPackage) 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_deserializeOpErrorListDomainsForPackage(response, &metadata) + } + output := &ListDomainsForPackageOutput{} + 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_deserializeOpDocumentListDomainsForPackageOutput(&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_deserializeOpErrorListDomainsForPackage(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(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_deserializeOpDocumentListDomainsForPackageOutput(v **ListDomainsForPackageOutput, 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 *ListDomainsForPackageOutput + if *v == nil { + sv = &ListDomainsForPackageOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DomainPackageDetailsList": + if err := awsRestjson1_deserializeDocumentDomainPackageDetailsList(&sv.DomainPackageDetailsList, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListInstanceTypeDetails struct { +} + +func (*awsRestjson1_deserializeOpListInstanceTypeDetails) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListInstanceTypeDetails) 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_deserializeOpErrorListInstanceTypeDetails(response, &metadata) + } + output := &ListInstanceTypeDetailsOutput{} + 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_deserializeOpDocumentListInstanceTypeDetailsOutput(&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_deserializeOpErrorListInstanceTypeDetails(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(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_deserializeOpDocumentListInstanceTypeDetailsOutput(v **ListInstanceTypeDetailsOutput, 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 *ListInstanceTypeDetailsOutput + if *v == nil { + sv = &ListInstanceTypeDetailsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "InstanceTypeDetails": + if err := awsRestjson1_deserializeDocumentInstanceTypeDetailsList(&sv.InstanceTypeDetails, 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 +} + +type awsRestjson1_deserializeOpListPackagesForDomain struct { +} + +func (*awsRestjson1_deserializeOpListPackagesForDomain) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListPackagesForDomain) 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_deserializeOpErrorListPackagesForDomain(response, &metadata) + } + output := &ListPackagesForDomainOutput{} + 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_deserializeOpDocumentListPackagesForDomainOutput(&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_deserializeOpErrorListPackagesForDomain(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(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_deserializeOpDocumentListPackagesForDomainOutput(v **ListPackagesForDomainOutput, 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 *ListPackagesForDomainOutput + if *v == nil { + sv = &ListPackagesForDomainOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DomainPackageDetailsList": + if err := awsRestjson1_deserializeDocumentDomainPackageDetailsList(&sv.DomainPackageDetailsList, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListTags struct { +} + +func (*awsRestjson1_deserializeOpListTags) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListTags) 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_deserializeOpErrorListTags(response, &metadata) + } + output := &ListTagsOutput{} + 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_deserializeOpDocumentListTagsOutput(&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_deserializeOpErrorListTags(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(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_deserializeOpDocumentListTagsOutput(v **ListTagsOutput, 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 *ListTagsOutput + if *v == nil { + sv = &ListTagsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "TagList": + if err := awsRestjson1_deserializeDocumentTagList(&sv.TagList, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListVersions struct { +} + +func (*awsRestjson1_deserializeOpListVersions) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListVersions) 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_deserializeOpErrorListVersions(response, &metadata) + } + output := &ListVersionsOutput{} + 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_deserializeOpDocumentListVersionsOutput(&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_deserializeOpErrorListVersions(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(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_deserializeOpDocumentListVersionsOutput(v **ListVersionsOutput, 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 *ListVersionsOutput + if *v == nil { + sv = &ListVersionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Versions": + if err := awsRestjson1_deserializeDocumentVersionList(&sv.Versions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPurchaseReservedInstanceOffering struct { +} + +func (*awsRestjson1_deserializeOpPurchaseReservedInstanceOffering) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPurchaseReservedInstanceOffering) 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_deserializeOpErrorPurchaseReservedInstanceOffering(response, &metadata) + } + output := &PurchaseReservedInstanceOfferingOutput{} + 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_deserializeOpDocumentPurchaseReservedInstanceOfferingOutput(&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_deserializeOpErrorPurchaseReservedInstanceOffering(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("DisabledOperationException", errorCode): + return awsRestjson1_deserializeErrorDisabledOperationException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ResourceAlreadyExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceAlreadyExistsException(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_deserializeOpDocumentPurchaseReservedInstanceOfferingOutput(v **PurchaseReservedInstanceOfferingOutput, 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 *PurchaseReservedInstanceOfferingOutput + if *v == nil { + sv = &PurchaseReservedInstanceOfferingOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ReservationName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReservationToken to be of type string, got %T instead", value) + } + sv.ReservationName = ptr.String(jtv) + } + + case "ReservedInstanceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GUID to be of type string, got %T instead", value) + } + sv.ReservedInstanceId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpRejectInboundConnection struct { +} + +func (*awsRestjson1_deserializeOpRejectInboundConnection) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpRejectInboundConnection) 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_deserializeOpErrorRejectInboundConnection(response, &metadata) + } + output := &RejectInboundConnectionOutput{} + 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_deserializeOpDocumentRejectInboundConnectionOutput(&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_deserializeOpErrorRejectInboundConnection(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("DisabledOperationException", errorCode): + return awsRestjson1_deserializeErrorDisabledOperationException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentRejectInboundConnectionOutput(v **RejectInboundConnectionOutput, 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 *RejectInboundConnectionOutput + if *v == nil { + sv = &RejectInboundConnectionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Connection": + if err := awsRestjson1_deserializeDocumentInboundConnection(&sv.Connection, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpRemoveTags struct { +} + +func (*awsRestjson1_deserializeOpRemoveTags) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpRemoveTags) 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_deserializeOpErrorRemoveTags(response, &metadata) + } + output := &RemoveTagsOutput{} + 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_deserializeOpErrorRemoveTags(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpStartServiceSoftwareUpdate struct { +} + +func (*awsRestjson1_deserializeOpStartServiceSoftwareUpdate) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpStartServiceSoftwareUpdate) 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_deserializeOpErrorStartServiceSoftwareUpdate(response, &metadata) + } + output := &StartServiceSoftwareUpdateOutput{} + 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_deserializeOpDocumentStartServiceSoftwareUpdateOutput(&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_deserializeOpErrorStartServiceSoftwareUpdate(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(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_deserializeOpDocumentStartServiceSoftwareUpdateOutput(v **StartServiceSoftwareUpdateOutput, 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 *StartServiceSoftwareUpdateOutput + if *v == nil { + sv = &StartServiceSoftwareUpdateOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ServiceSoftwareOptions": + if err := awsRestjson1_deserializeDocumentServiceSoftwareOptions(&sv.ServiceSoftwareOptions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateDomainConfig struct { +} + +func (*awsRestjson1_deserializeOpUpdateDomainConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateDomainConfig) 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_deserializeOpErrorUpdateDomainConfig(response, &metadata) + } + output := &UpdateDomainConfigOutput{} + 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_deserializeOpDocumentUpdateDomainConfigOutput(&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_deserializeOpErrorUpdateDomainConfig(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(response, errorBody) + + case strings.EqualFold("InvalidTypeException", errorCode): + return awsRestjson1_deserializeErrorInvalidTypeException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(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_deserializeOpDocumentUpdateDomainConfigOutput(v **UpdateDomainConfigOutput, 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 *UpdateDomainConfigOutput + if *v == nil { + sv = &UpdateDomainConfigOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DomainConfig": + if err := awsRestjson1_deserializeDocumentDomainConfig(&sv.DomainConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdatePackage struct { +} + +func (*awsRestjson1_deserializeOpUpdatePackage) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdatePackage) 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_deserializeOpErrorUpdatePackage(response, &metadata) + } + output := &UpdatePackageOutput{} + 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_deserializeOpDocumentUpdatePackageOutput(&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_deserializeOpErrorUpdatePackage(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(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_deserializeOpDocumentUpdatePackageOutput(v **UpdatePackageOutput, 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 *UpdatePackageOutput + if *v == nil { + sv = &UpdatePackageOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "PackageDetails": + if err := awsRestjson1_deserializeDocumentPackageDetails(&sv.PackageDetails, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpgradeDomain struct { +} + +func (*awsRestjson1_deserializeOpUpgradeDomain) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpgradeDomain) 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_deserializeOpErrorUpgradeDomain(response, &metadata) + } + output := &UpgradeDomainOutput{} + 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_deserializeOpDocumentUpgradeDomainOutput(&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_deserializeOpErrorUpgradeDomain(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("BaseException", errorCode): + return awsRestjson1_deserializeErrorBaseException(response, errorBody) + + case strings.EqualFold("DisabledOperationException", errorCode): + return awsRestjson1_deserializeErrorDisabledOperationException(response, errorBody) + + case strings.EqualFold("InternalException", errorCode): + return awsRestjson1_deserializeErrorInternalException(response, errorBody) + + case strings.EqualFold("ResourceAlreadyExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceAlreadyExistsException(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_deserializeOpDocumentUpgradeDomainOutput(v **UpgradeDomainOutput, 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 *UpgradeDomainOutput + if *v == nil { + sv = &UpgradeDomainOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AdvancedOptions": + if err := awsRestjson1_deserializeDocumentAdvancedOptions(&sv.AdvancedOptions, value); err != nil { + return err + } + + case "DomainName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainName to be of type string, got %T instead", value) + } + sv.DomainName = ptr.String(jtv) + } + + case "PerformCheckOnly": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.PerformCheckOnly = ptr.Bool(jtv) + } + + case "TargetVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VersionString to be of type string, got %T instead", value) + } + sv.TargetVersion = ptr.String(jtv) + } + + case "UpgradeId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.UpgradeId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDeniedException{} + 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 + } + + err := awsRestjson1_deserializeDocumentAccessDeniedException(&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 awsRestjson1_deserializeErrorBaseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.BaseException{} + 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 + } + + err := awsRestjson1_deserializeDocumentBaseException(&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 awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ConflictException{} + 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 + } + + err := awsRestjson1_deserializeDocumentConflictException(&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 awsRestjson1_deserializeErrorDisabledOperationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DisabledOperationException{} + 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 + } + + err := awsRestjson1_deserializeDocumentDisabledOperationException(&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 awsRestjson1_deserializeErrorInternalException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalException{} + 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 + } + + err := awsRestjson1_deserializeDocumentInternalException(&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 awsRestjson1_deserializeErrorInvalidPaginationTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidPaginationTokenException{} + 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 + } + + err := awsRestjson1_deserializeDocumentInvalidPaginationTokenException(&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 awsRestjson1_deserializeErrorInvalidTypeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidTypeException{} + 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 + } + + err := awsRestjson1_deserializeDocumentInvalidTypeException(&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 awsRestjson1_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.LimitExceededException{} + 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 + } + + err := awsRestjson1_deserializeDocumentLimitExceededException(&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 awsRestjson1_deserializeErrorResourceAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceAlreadyExistsException{} + 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 + } + + err := awsRestjson1_deserializeDocumentResourceAlreadyExistsException(&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 awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceNotFoundException{} + 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 + } + + err := awsRestjson1_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 awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ValidationException{} + 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 + } + + err := awsRestjson1_deserializeDocumentValidationException(&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 awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, 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.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_deserializeDocumentAccessPoliciesStatus(v **types.AccessPoliciesStatus, 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.AccessPoliciesStatus + if *v == nil { + sv = &types.AccessPoliciesStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Options": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyDocument to be of type string, got %T instead", value) + } + sv.Options = ptr.String(jtv) + } + + case "Status": + if err := awsRestjson1_deserializeDocumentOptionStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAdditionalLimit(v **types.AdditionalLimit, 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.AdditionalLimit + if *v == nil { + sv = &types.AdditionalLimit{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LimitName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LimitName to be of type string, got %T instead", value) + } + sv.LimitName = ptr.String(jtv) + } + + case "LimitValues": + if err := awsRestjson1_deserializeDocumentLimitValueList(&sv.LimitValues, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAdditionalLimitList(v *[]types.AdditionalLimit, 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.AdditionalLimit + if *v == nil { + cv = []types.AdditionalLimit{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AdditionalLimit + destAddr := &col + if err := awsRestjson1_deserializeDocumentAdditionalLimit(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAdvancedOptions(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 String to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentAdvancedOptionsStatus(v **types.AdvancedOptionsStatus, 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.AdvancedOptionsStatus + if *v == nil { + sv = &types.AdvancedOptionsStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Options": + if err := awsRestjson1_deserializeDocumentAdvancedOptions(&sv.Options, value); err != nil { + return err + } + + case "Status": + if err := awsRestjson1_deserializeDocumentOptionStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAdvancedSecurityOptions(v **types.AdvancedSecurityOptions, 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.AdvancedSecurityOptions + if *v == nil { + sv = &types.AdvancedSecurityOptions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Enabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Enabled = ptr.Bool(jtv) + } + + case "InternalUserDatabaseEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.InternalUserDatabaseEnabled = ptr.Bool(jtv) + } + + case "SAMLOptions": + if err := awsRestjson1_deserializeDocumentSAMLOptionsOutput(&sv.SAMLOptions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAdvancedSecurityOptionsStatus(v **types.AdvancedSecurityOptionsStatus, 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.AdvancedSecurityOptionsStatus + if *v == nil { + sv = &types.AdvancedSecurityOptionsStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Options": + if err := awsRestjson1_deserializeDocumentAdvancedSecurityOptions(&sv.Options, value); err != nil { + return err + } + + case "Status": + if err := awsRestjson1_deserializeDocumentOptionStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAutoTune(v **types.AutoTune, 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.AutoTune + if *v == nil { + sv = &types.AutoTune{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AutoTuneDetails": + if err := awsRestjson1_deserializeDocumentAutoTuneDetails(&sv.AutoTuneDetails, value); err != nil { + return err + } + + case "AutoTuneType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutoTuneType to be of type string, got %T instead", value) + } + sv.AutoTuneType = types.AutoTuneType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAutoTuneDetails(v **types.AutoTuneDetails, 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.AutoTuneDetails + if *v == nil { + sv = &types.AutoTuneDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ScheduledAutoTuneDetails": + if err := awsRestjson1_deserializeDocumentScheduledAutoTuneDetails(&sv.ScheduledAutoTuneDetails, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAutoTuneList(v *[]types.AutoTune, 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.AutoTune + if *v == nil { + cv = []types.AutoTune{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AutoTune + destAddr := &col + if err := awsRestjson1_deserializeDocumentAutoTune(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAutoTuneMaintenanceSchedule(v **types.AutoTuneMaintenanceSchedule, 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.AutoTuneMaintenanceSchedule + if *v == nil { + sv = &types.AutoTuneMaintenanceSchedule{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CronExpressionForRecurrence": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CronExpressionForRecurrence = ptr.String(jtv) + } + + case "Duration": + if err := awsRestjson1_deserializeDocumentDuration(&sv.Duration, value); err != nil { + return err + } + + case "StartAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected StartAt to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAutoTuneMaintenanceScheduleList(v *[]types.AutoTuneMaintenanceSchedule, 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.AutoTuneMaintenanceSchedule + if *v == nil { + cv = []types.AutoTuneMaintenanceSchedule{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AutoTuneMaintenanceSchedule + destAddr := &col + if err := awsRestjson1_deserializeDocumentAutoTuneMaintenanceSchedule(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAutoTuneOptions(v **types.AutoTuneOptions, 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.AutoTuneOptions + if *v == nil { + sv = &types.AutoTuneOptions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DesiredState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutoTuneDesiredState to be of type string, got %T instead", value) + } + sv.DesiredState = types.AutoTuneDesiredState(jtv) + } + + case "MaintenanceSchedules": + if err := awsRestjson1_deserializeDocumentAutoTuneMaintenanceScheduleList(&sv.MaintenanceSchedules, value); err != nil { + return err + } + + case "RollbackOnDisable": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RollbackOnDisable to be of type string, got %T instead", value) + } + sv.RollbackOnDisable = types.RollbackOnDisable(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAutoTuneOptionsOutput(v **types.AutoTuneOptionsOutput, 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.AutoTuneOptionsOutput + if *v == nil { + sv = &types.AutoTuneOptionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutoTuneState to be of type string, got %T instead", value) + } + sv.State = types.AutoTuneState(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAutoTuneOptionsStatus(v **types.AutoTuneOptionsStatus, 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.AutoTuneOptionsStatus + if *v == nil { + sv = &types.AutoTuneOptionsStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Options": + if err := awsRestjson1_deserializeDocumentAutoTuneOptions(&sv.Options, value); err != nil { + return err + } + + case "Status": + if err := awsRestjson1_deserializeDocumentAutoTuneStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAutoTuneStatus(v **types.AutoTuneStatus, 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.AutoTuneStatus + if *v == nil { + sv = &types.AutoTuneStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CreationDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected UpdateTimestamp to be a JSON Number, got %T instead", value) + + } + } + + case "ErrorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "PendingDeletion": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.PendingDeletion = ptr.Bool(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AutoTuneState to be of type string, got %T instead", value) + } + sv.State = types.AutoTuneState(jtv) + } + + case "UpdateDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdateDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected UpdateTimestamp to be a JSON Number, got %T instead", value) + + } + } + + case "UpdateVersion": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected UIntValue to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.UpdateVersion = int32(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAWSDomainInformation(v **types.AWSDomainInformation, 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.AWSDomainInformation + if *v == nil { + sv = &types.AWSDomainInformation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DomainName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainName to be of type string, got %T instead", value) + } + sv.DomainName = ptr.String(jtv) + } + + case "OwnerId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OwnerId to be of type string, got %T instead", value) + } + sv.OwnerId = ptr.String(jtv) + } + + case "Region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Region to be of type string, got %T instead", value) + } + sv.Region = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentBaseException(v **types.BaseException, 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.BaseException + if *v == nil { + sv = &types.BaseException{} + } 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_deserializeDocumentClusterConfig(v **types.ClusterConfig, 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.ClusterConfig + if *v == nil { + sv = &types.ClusterConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ColdStorageOptions": + if err := awsRestjson1_deserializeDocumentColdStorageOptions(&sv.ColdStorageOptions, value); err != nil { + return err + } + + case "DedicatedMasterCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected IntegerClass to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DedicatedMasterCount = ptr.Int32(int32(i64)) + } + + case "DedicatedMasterEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.DedicatedMasterEnabled = ptr.Bool(jtv) + } + + case "DedicatedMasterType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpenSearchPartitionInstanceType to be of type string, got %T instead", value) + } + sv.DedicatedMasterType = types.OpenSearchPartitionInstanceType(jtv) + } + + case "InstanceCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected IntegerClass to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.InstanceCount = ptr.Int32(int32(i64)) + } + + case "InstanceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpenSearchPartitionInstanceType to be of type string, got %T instead", value) + } + sv.InstanceType = types.OpenSearchPartitionInstanceType(jtv) + } + + case "WarmCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected IntegerClass to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.WarmCount = ptr.Int32(int32(i64)) + } + + case "WarmEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.WarmEnabled = ptr.Bool(jtv) + } + + case "WarmType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpenSearchWarmPartitionInstanceType to be of type string, got %T instead", value) + } + sv.WarmType = types.OpenSearchWarmPartitionInstanceType(jtv) + } + + case "ZoneAwarenessConfig": + if err := awsRestjson1_deserializeDocumentZoneAwarenessConfig(&sv.ZoneAwarenessConfig, value); err != nil { + return err + } + + case "ZoneAwarenessEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.ZoneAwarenessEnabled = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentClusterConfigStatus(v **types.ClusterConfigStatus, 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.ClusterConfigStatus + if *v == nil { + sv = &types.ClusterConfigStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Options": + if err := awsRestjson1_deserializeDocumentClusterConfig(&sv.Options, value); err != nil { + return err + } + + case "Status": + if err := awsRestjson1_deserializeDocumentOptionStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCognitoOptions(v **types.CognitoOptions, 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.CognitoOptions + if *v == nil { + sv = &types.CognitoOptions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Enabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Enabled = ptr.Bool(jtv) + } + + case "IdentityPoolId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IdentityPoolId to be of type string, got %T instead", value) + } + sv.IdentityPoolId = ptr.String(jtv) + } + + case "RoleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + case "UserPoolId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserPoolId to be of type string, got %T instead", value) + } + sv.UserPoolId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCognitoOptionsStatus(v **types.CognitoOptionsStatus, 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.CognitoOptionsStatus + if *v == nil { + sv = &types.CognitoOptionsStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Options": + if err := awsRestjson1_deserializeDocumentCognitoOptions(&sv.Options, value); err != nil { + return err + } + + case "Status": + if err := awsRestjson1_deserializeDocumentOptionStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentColdStorageOptions(v **types.ColdStorageOptions, 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.ColdStorageOptions + if *v == nil { + sv = &types.ColdStorageOptions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Enabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Enabled = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCompatibleVersionsList(v *[]types.CompatibleVersionsMap, 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.CompatibleVersionsMap + if *v == nil { + cv = []types.CompatibleVersionsMap{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CompatibleVersionsMap + destAddr := &col + if err := awsRestjson1_deserializeDocumentCompatibleVersionsMap(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentCompatibleVersionsMap(v **types.CompatibleVersionsMap, 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.CompatibleVersionsMap + if *v == nil { + sv = &types.CompatibleVersionsMap{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "SourceVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VersionString to be of type string, got %T instead", value) + } + sv.SourceVersion = ptr.String(jtv) + } + + case "TargetVersions": + if err := awsRestjson1_deserializeDocumentVersionList(&sv.TargetVersions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConflictException + if *v == nil { + sv = &types.ConflictException{} + } 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_deserializeDocumentDisabledOperationException(v **types.DisabledOperationException, 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.DisabledOperationException + if *v == nil { + sv = &types.DisabledOperationException{} + } 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_deserializeDocumentDomainConfig(v **types.DomainConfig, 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.DomainConfig + if *v == nil { + sv = &types.DomainConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccessPolicies": + if err := awsRestjson1_deserializeDocumentAccessPoliciesStatus(&sv.AccessPolicies, value); err != nil { + return err + } + + case "AdvancedOptions": + if err := awsRestjson1_deserializeDocumentAdvancedOptionsStatus(&sv.AdvancedOptions, value); err != nil { + return err + } + + case "AdvancedSecurityOptions": + if err := awsRestjson1_deserializeDocumentAdvancedSecurityOptionsStatus(&sv.AdvancedSecurityOptions, value); err != nil { + return err + } + + case "AutoTuneOptions": + if err := awsRestjson1_deserializeDocumentAutoTuneOptionsStatus(&sv.AutoTuneOptions, value); err != nil { + return err + } + + case "ClusterConfig": + if err := awsRestjson1_deserializeDocumentClusterConfigStatus(&sv.ClusterConfig, value); err != nil { + return err + } + + case "CognitoOptions": + if err := awsRestjson1_deserializeDocumentCognitoOptionsStatus(&sv.CognitoOptions, value); err != nil { + return err + } + + case "DomainEndpointOptions": + if err := awsRestjson1_deserializeDocumentDomainEndpointOptionsStatus(&sv.DomainEndpointOptions, value); err != nil { + return err + } + + case "EBSOptions": + if err := awsRestjson1_deserializeDocumentEBSOptionsStatus(&sv.EBSOptions, value); err != nil { + return err + } + + case "EncryptionAtRestOptions": + if err := awsRestjson1_deserializeDocumentEncryptionAtRestOptionsStatus(&sv.EncryptionAtRestOptions, value); err != nil { + return err + } + + case "EngineVersion": + if err := awsRestjson1_deserializeDocumentVersionStatus(&sv.EngineVersion, value); err != nil { + return err + } + + case "LogPublishingOptions": + if err := awsRestjson1_deserializeDocumentLogPublishingOptionsStatus(&sv.LogPublishingOptions, value); err != nil { + return err + } + + case "NodeToNodeEncryptionOptions": + if err := awsRestjson1_deserializeDocumentNodeToNodeEncryptionOptionsStatus(&sv.NodeToNodeEncryptionOptions, value); err != nil { + return err + } + + case "SnapshotOptions": + if err := awsRestjson1_deserializeDocumentSnapshotOptionsStatus(&sv.SnapshotOptions, value); err != nil { + return err + } + + case "VPCOptions": + if err := awsRestjson1_deserializeDocumentVPCDerivedInfoStatus(&sv.VPCOptions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDomainEndpointOptions(v **types.DomainEndpointOptions, 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.DomainEndpointOptions + if *v == nil { + sv = &types.DomainEndpointOptions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CustomEndpoint": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainNameFqdn to be of type string, got %T instead", value) + } + sv.CustomEndpoint = ptr.String(jtv) + } + + case "CustomEndpointCertificateArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.CustomEndpointCertificateArn = ptr.String(jtv) + } + + case "CustomEndpointEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.CustomEndpointEnabled = ptr.Bool(jtv) + } + + case "EnforceHTTPS": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.EnforceHTTPS = ptr.Bool(jtv) + } + + case "TLSSecurityPolicy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TLSSecurityPolicy to be of type string, got %T instead", value) + } + sv.TLSSecurityPolicy = types.TLSSecurityPolicy(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDomainEndpointOptionsStatus(v **types.DomainEndpointOptionsStatus, 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.DomainEndpointOptionsStatus + if *v == nil { + sv = &types.DomainEndpointOptionsStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Options": + if err := awsRestjson1_deserializeDocumentDomainEndpointOptions(&sv.Options, value); err != nil { + return err + } + + case "Status": + if err := awsRestjson1_deserializeDocumentOptionStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDomainInfo(v **types.DomainInfo, 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.DomainInfo + if *v == nil { + sv = &types.DomainInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DomainName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainName to be of type string, got %T instead", value) + } + sv.DomainName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDomainInfoList(v *[]types.DomainInfo, 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.DomainInfo + if *v == nil { + cv = []types.DomainInfo{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DomainInfo + destAddr := &col + if err := awsRestjson1_deserializeDocumentDomainInfo(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentDomainInformationContainer(v **types.DomainInformationContainer, 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.DomainInformationContainer + if *v == nil { + sv = &types.DomainInformationContainer{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AWSDomainInformation": + if err := awsRestjson1_deserializeDocumentAWSDomainInformation(&sv.AWSDomainInformation, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDomainPackageDetails(v **types.DomainPackageDetails, 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.DomainPackageDetails + if *v == nil { + sv = &types.DomainPackageDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DomainName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainName to be of type string, got %T instead", value) + } + sv.DomainName = ptr.String(jtv) + } + + case "DomainPackageStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainPackageStatus to be of type string, got %T instead", value) + } + sv.DomainPackageStatus = types.DomainPackageStatus(jtv) + } + + case "ErrorDetails": + if err := awsRestjson1_deserializeDocumentErrorDetails(&sv.ErrorDetails, value); err != nil { + return err + } + + case "LastUpdated": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdated = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected LastUpdated to be a JSON Number, got %T instead", value) + + } + } + + case "PackageID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageID to be of type string, got %T instead", value) + } + sv.PackageID = ptr.String(jtv) + } + + case "PackageName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageName to be of type string, got %T instead", value) + } + sv.PackageName = ptr.String(jtv) + } + + case "PackageType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageType to be of type string, got %T instead", value) + } + sv.PackageType = types.PackageType(jtv) + } + + case "PackageVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageVersion to be of type string, got %T instead", value) + } + sv.PackageVersion = ptr.String(jtv) + } + + case "ReferencePath": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReferencePath to be of type string, got %T instead", value) + } + sv.ReferencePath = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDomainPackageDetailsList(v *[]types.DomainPackageDetails, 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.DomainPackageDetails + if *v == nil { + cv = []types.DomainPackageDetails{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DomainPackageDetails + destAddr := &col + if err := awsRestjson1_deserializeDocumentDomainPackageDetails(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentDomainStatus(v **types.DomainStatus, 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.DomainStatus + if *v == nil { + sv = &types.DomainStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccessPolicies": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyDocument to be of type string, got %T instead", value) + } + sv.AccessPolicies = ptr.String(jtv) + } + + case "AdvancedOptions": + if err := awsRestjson1_deserializeDocumentAdvancedOptions(&sv.AdvancedOptions, value); err != nil { + return err + } + + case "AdvancedSecurityOptions": + if err := awsRestjson1_deserializeDocumentAdvancedSecurityOptions(&sv.AdvancedSecurityOptions, value); err != nil { + return err + } + + case "ARN": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.ARN = ptr.String(jtv) + } + + case "AutoTuneOptions": + if err := awsRestjson1_deserializeDocumentAutoTuneOptionsOutput(&sv.AutoTuneOptions, value); err != nil { + return err + } + + case "ClusterConfig": + if err := awsRestjson1_deserializeDocumentClusterConfig(&sv.ClusterConfig, value); err != nil { + return err + } + + case "CognitoOptions": + if err := awsRestjson1_deserializeDocumentCognitoOptions(&sv.CognitoOptions, value); err != nil { + return err + } + + case "Created": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Created = ptr.Bool(jtv) + } + + case "Deleted": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Deleted = ptr.Bool(jtv) + } + + case "DomainEndpointOptions": + if err := awsRestjson1_deserializeDocumentDomainEndpointOptions(&sv.DomainEndpointOptions, value); err != nil { + return err + } + + case "DomainId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainId to be of type string, got %T instead", value) + } + sv.DomainId = ptr.String(jtv) + } + + case "DomainName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DomainName to be of type string, got %T instead", value) + } + sv.DomainName = ptr.String(jtv) + } + + case "EBSOptions": + if err := awsRestjson1_deserializeDocumentEBSOptions(&sv.EBSOptions, value); err != nil { + return err + } + + case "EncryptionAtRestOptions": + if err := awsRestjson1_deserializeDocumentEncryptionAtRestOptions(&sv.EncryptionAtRestOptions, value); err != nil { + return err + } + + case "Endpoint": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServiceUrl to be of type string, got %T instead", value) + } + sv.Endpoint = ptr.String(jtv) + } + + case "Endpoints": + if err := awsRestjson1_deserializeDocumentEndpointsMap(&sv.Endpoints, value); err != nil { + return err + } + + case "EngineVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VersionString to be of type string, got %T instead", value) + } + sv.EngineVersion = ptr.String(jtv) + } + + case "LogPublishingOptions": + if err := awsRestjson1_deserializeDocumentLogPublishingOptions(&sv.LogPublishingOptions, value); err != nil { + return err + } + + case "NodeToNodeEncryptionOptions": + if err := awsRestjson1_deserializeDocumentNodeToNodeEncryptionOptions(&sv.NodeToNodeEncryptionOptions, value); err != nil { + return err + } + + case "Processing": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Processing = ptr.Bool(jtv) + } + + case "ServiceSoftwareOptions": + if err := awsRestjson1_deserializeDocumentServiceSoftwareOptions(&sv.ServiceSoftwareOptions, value); err != nil { + return err + } + + case "SnapshotOptions": + if err := awsRestjson1_deserializeDocumentSnapshotOptions(&sv.SnapshotOptions, value); err != nil { + return err + } + + case "UpgradeProcessing": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.UpgradeProcessing = ptr.Bool(jtv) + } + + case "VPCOptions": + if err := awsRestjson1_deserializeDocumentVPCDerivedInfo(&sv.VPCOptions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDomainStatusList(v *[]types.DomainStatus, 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.DomainStatus + if *v == nil { + cv = []types.DomainStatus{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DomainStatus + destAddr := &col + if err := awsRestjson1_deserializeDocumentDomainStatus(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentDuration(v **types.Duration, 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.Duration + if *v == nil { + sv = &types.Duration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Unit": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TimeUnit to be of type string, got %T instead", value) + } + sv.Unit = types.TimeUnit(jtv) + } + + case "Value": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected DurationValue to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Value = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEBSOptions(v **types.EBSOptions, 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.EBSOptions + if *v == nil { + sv = &types.EBSOptions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EBSEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.EBSEnabled = ptr.Bool(jtv) + } + + case "Iops": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected IntegerClass to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Iops = ptr.Int32(int32(i64)) + } + + case "VolumeSize": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected IntegerClass to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.VolumeSize = ptr.Int32(int32(i64)) + } + + case "VolumeType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VolumeType to be of type string, got %T instead", value) + } + sv.VolumeType = types.VolumeType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEBSOptionsStatus(v **types.EBSOptionsStatus, 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.EBSOptionsStatus + if *v == nil { + sv = &types.EBSOptionsStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Options": + if err := awsRestjson1_deserializeDocumentEBSOptions(&sv.Options, value); err != nil { + return err + } + + case "Status": + if err := awsRestjson1_deserializeDocumentOptionStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEncryptionAtRestOptions(v **types.EncryptionAtRestOptions, 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.EncryptionAtRestOptions + if *v == nil { + sv = &types.EncryptionAtRestOptions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Enabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Enabled = ptr.Bool(jtv) + } + + case "KmsKeyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value) + } + sv.KmsKeyId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEncryptionAtRestOptionsStatus(v **types.EncryptionAtRestOptionsStatus, 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.EncryptionAtRestOptionsStatus + if *v == nil { + sv = &types.EncryptionAtRestOptionsStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Options": + if err := awsRestjson1_deserializeDocumentEncryptionAtRestOptions(&sv.Options, value); err != nil { + return err + } + + case "Status": + if err := awsRestjson1_deserializeDocumentOptionStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEndpointsMap(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 ServiceUrl to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentErrorDetails(v **types.ErrorDetails, 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.ErrorDetails + if *v == nil { + sv = &types.ErrorDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "ErrorType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorType to be of type string, got %T instead", value) + } + sv.ErrorType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInboundConnection(v **types.InboundConnection, 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.InboundConnection + if *v == nil { + sv = &types.InboundConnection{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ConnectionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConnectionId to be of type string, got %T instead", value) + } + sv.ConnectionId = ptr.String(jtv) + } + + case "ConnectionStatus": + if err := awsRestjson1_deserializeDocumentInboundConnectionStatus(&sv.ConnectionStatus, value); err != nil { + return err + } + + case "LocalDomainInfo": + if err := awsRestjson1_deserializeDocumentDomainInformationContainer(&sv.LocalDomainInfo, value); err != nil { + return err + } + + case "RemoteDomainInfo": + if err := awsRestjson1_deserializeDocumentDomainInformationContainer(&sv.RemoteDomainInfo, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInboundConnections(v *[]types.InboundConnection, 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.InboundConnection + if *v == nil { + cv = []types.InboundConnection{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.InboundConnection + destAddr := &col + if err := awsRestjson1_deserializeDocumentInboundConnection(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentInboundConnectionStatus(v **types.InboundConnectionStatus, 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.InboundConnectionStatus + if *v == nil { + sv = &types.InboundConnectionStatus{} + } 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 ConnectionStatusMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "StatusCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InboundConnectionStatusCode to be of type string, got %T instead", value) + } + sv.StatusCode = types.InboundConnectionStatusCode(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInstanceCountLimits(v **types.InstanceCountLimits, 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.InstanceCountLimits + if *v == nil { + sv = &types.InstanceCountLimits{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "MaximumInstanceCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumInstanceCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumInstanceCount = int32(i64) + } + + case "MinimumInstanceCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MinimumInstanceCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MinimumInstanceCount = int32(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInstanceLimits(v **types.InstanceLimits, 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.InstanceLimits + if *v == nil { + sv = &types.InstanceLimits{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "InstanceCountLimits": + if err := awsRestjson1_deserializeDocumentInstanceCountLimits(&sv.InstanceCountLimits, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInstanceRoleList(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 InstanceRole to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentInstanceTypeDetails(v **types.InstanceTypeDetails, 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.InstanceTypeDetails + if *v == nil { + sv = &types.InstanceTypeDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AdvancedSecurityEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.AdvancedSecurityEnabled = ptr.Bool(jtv) + } + + case "AppLogsEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.AppLogsEnabled = ptr.Bool(jtv) + } + + case "CognitoEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.CognitoEnabled = ptr.Bool(jtv) + } + + case "EncryptionEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.EncryptionEnabled = ptr.Bool(jtv) + } + + case "InstanceRole": + if err := awsRestjson1_deserializeDocumentInstanceRoleList(&sv.InstanceRole, value); err != nil { + return err + } + + case "InstanceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpenSearchPartitionInstanceType to be of type string, got %T instead", value) + } + sv.InstanceType = types.OpenSearchPartitionInstanceType(jtv) + } + + case "WarmEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.WarmEnabled = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInstanceTypeDetailsList(v *[]types.InstanceTypeDetails, 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.InstanceTypeDetails + if *v == nil { + cv = []types.InstanceTypeDetails{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.InstanceTypeDetails + destAddr := &col + if err := awsRestjson1_deserializeDocumentInstanceTypeDetails(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentInternalException(v **types.InternalException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InternalException + if *v == nil { + sv = &types.InternalException{} + } 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_deserializeDocumentInvalidPaginationTokenException(v **types.InvalidPaginationTokenException, 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.InvalidPaginationTokenException + if *v == nil { + sv = &types.InvalidPaginationTokenException{} + } 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_deserializeDocumentInvalidTypeException(v **types.InvalidTypeException, 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.InvalidTypeException + if *v == nil { + sv = &types.InvalidTypeException{} + } 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_deserializeDocumentIssues(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 Issue to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_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 + } + + 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_deserializeDocumentLimits(v **types.Limits, 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.Limits + if *v == nil { + sv = &types.Limits{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AdditionalLimits": + if err := awsRestjson1_deserializeDocumentAdditionalLimitList(&sv.AdditionalLimits, value); err != nil { + return err + } + + case "InstanceLimits": + if err := awsRestjson1_deserializeDocumentInstanceLimits(&sv.InstanceLimits, value); err != nil { + return err + } + + case "StorageTypes": + if err := awsRestjson1_deserializeDocumentStorageTypeList(&sv.StorageTypes, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentLimitsByRole(v *map[string]types.Limits, 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]types.Limits + if *v == nil { + mv = map[string]types.Limits{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.Limits + mapVar := parsedVal + destAddr := &mapVar + if err := awsRestjson1_deserializeDocumentLimits(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentLimitValueList(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 LimitValue to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentLogPublishingOption(v **types.LogPublishingOption, 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.LogPublishingOption + if *v == nil { + sv = &types.LogPublishingOption{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CloudWatchLogsLogGroupArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CloudWatchLogsLogGroupArn to be of type string, got %T instead", value) + } + sv.CloudWatchLogsLogGroupArn = ptr.String(jtv) + } + + case "Enabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Enabled = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentLogPublishingOptions(v *map[string]types.LogPublishingOption, 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]types.LogPublishingOption + if *v == nil { + mv = map[string]types.LogPublishingOption{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.LogPublishingOption + mapVar := parsedVal + destAddr := &mapVar + if err := awsRestjson1_deserializeDocumentLogPublishingOption(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentLogPublishingOptionsStatus(v **types.LogPublishingOptionsStatus, 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.LogPublishingOptionsStatus + if *v == nil { + sv = &types.LogPublishingOptionsStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Options": + if err := awsRestjson1_deserializeDocumentLogPublishingOptions(&sv.Options, value); err != nil { + return err + } + + case "Status": + if err := awsRestjson1_deserializeDocumentOptionStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentNodeToNodeEncryptionOptions(v **types.NodeToNodeEncryptionOptions, 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.NodeToNodeEncryptionOptions + if *v == nil { + sv = &types.NodeToNodeEncryptionOptions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Enabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Enabled = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentNodeToNodeEncryptionOptionsStatus(v **types.NodeToNodeEncryptionOptionsStatus, 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.NodeToNodeEncryptionOptionsStatus + if *v == nil { + sv = &types.NodeToNodeEncryptionOptionsStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Options": + if err := awsRestjson1_deserializeDocumentNodeToNodeEncryptionOptions(&sv.Options, value); err != nil { + return err + } + + case "Status": + if err := awsRestjson1_deserializeDocumentOptionStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentOptionStatus(v **types.OptionStatus, 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.OptionStatus + if *v == nil { + sv = &types.OptionStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CreationDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected UpdateTimestamp to be a JSON Number, got %T instead", value) + + } + } + + case "PendingDeletion": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.PendingDeletion = ptr.Bool(jtv) + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OptionState to be of type string, got %T instead", value) + } + sv.State = types.OptionState(jtv) + } + + case "UpdateDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UpdateDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected UpdateTimestamp to be a JSON Number, got %T instead", value) + + } + } + + case "UpdateVersion": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected UIntValue to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.UpdateVersion = int32(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentOutboundConnection(v **types.OutboundConnection, 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.OutboundConnection + if *v == nil { + sv = &types.OutboundConnection{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ConnectionAlias": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConnectionAlias to be of type string, got %T instead", value) + } + sv.ConnectionAlias = ptr.String(jtv) + } + + case "ConnectionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConnectionId to be of type string, got %T instead", value) + } + sv.ConnectionId = ptr.String(jtv) + } + + case "ConnectionStatus": + if err := awsRestjson1_deserializeDocumentOutboundConnectionStatus(&sv.ConnectionStatus, value); err != nil { + return err + } + + case "LocalDomainInfo": + if err := awsRestjson1_deserializeDocumentDomainInformationContainer(&sv.LocalDomainInfo, value); err != nil { + return err + } + + case "RemoteDomainInfo": + if err := awsRestjson1_deserializeDocumentDomainInformationContainer(&sv.RemoteDomainInfo, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentOutboundConnections(v *[]types.OutboundConnection, 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.OutboundConnection + if *v == nil { + cv = []types.OutboundConnection{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.OutboundConnection + destAddr := &col + if err := awsRestjson1_deserializeDocumentOutboundConnection(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentOutboundConnectionStatus(v **types.OutboundConnectionStatus, 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.OutboundConnectionStatus + if *v == nil { + sv = &types.OutboundConnectionStatus{} + } 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 ConnectionStatusMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "StatusCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OutboundConnectionStatusCode to be of type string, got %T instead", value) + } + sv.StatusCode = types.OutboundConnectionStatusCode(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPackageDetails(v **types.PackageDetails, 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.PackageDetails + if *v == nil { + sv = &types.PackageDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AvailablePackageVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageVersion to be of type string, got %T instead", value) + } + sv.AvailablePackageVersion = ptr.String(jtv) + } + + case "CreatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected CreatedAt to be a JSON Number, got %T instead", value) + + } + } + + case "ErrorDetails": + if err := awsRestjson1_deserializeDocumentErrorDetails(&sv.ErrorDetails, value); err != nil { + return err + } + + case "LastUpdatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected LastUpdated to be a JSON Number, got %T instead", value) + + } + } + + case "PackageDescription": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageDescription to be of type string, got %T instead", value) + } + sv.PackageDescription = ptr.String(jtv) + } + + case "PackageID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageID to be of type string, got %T instead", value) + } + sv.PackageID = ptr.String(jtv) + } + + case "PackageName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageName to be of type string, got %T instead", value) + } + sv.PackageName = ptr.String(jtv) + } + + case "PackageStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageStatus to be of type string, got %T instead", value) + } + sv.PackageStatus = types.PackageStatus(jtv) + } + + case "PackageType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageType to be of type string, got %T instead", value) + } + sv.PackageType = types.PackageType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPackageDetailsList(v *[]types.PackageDetails, 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.PackageDetails + if *v == nil { + cv = []types.PackageDetails{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PackageDetails + destAddr := &col + if err := awsRestjson1_deserializeDocumentPackageDetails(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentPackageVersionHistory(v **types.PackageVersionHistory, 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.PackageVersionHistory + if *v == nil { + sv = &types.PackageVersionHistory{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CommitMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CommitMessage to be of type string, got %T instead", value) + } + sv.CommitMessage = ptr.String(jtv) + } + + case "CreatedAt": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected CreatedAt to be a JSON Number, got %T instead", value) + + } + } + + case "PackageVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PackageVersion to be of type string, got %T instead", value) + } + sv.PackageVersion = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPackageVersionHistoryList(v *[]types.PackageVersionHistory, 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.PackageVersionHistory + if *v == nil { + cv = []types.PackageVersionHistory{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PackageVersionHistory + destAddr := &col + if err := awsRestjson1_deserializeDocumentPackageVersionHistory(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRecurringCharge(v **types.RecurringCharge, 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.RecurringCharge + if *v == nil { + sv = &types.RecurringCharge{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "RecurringChargeAmount": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.RecurringChargeAmount = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.RecurringChargeAmount = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + case "RecurringChargeFrequency": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RecurringChargeFrequency = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentRecurringChargeList(v *[]types.RecurringCharge, 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.RecurringCharge + if *v == nil { + cv = []types.RecurringCharge{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RecurringCharge + destAddr := &col + if err := awsRestjson1_deserializeDocumentRecurringCharge(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentReservedInstance(v **types.ReservedInstance, 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.ReservedInstance + if *v == nil { + sv = &types.ReservedInstance{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BillingSubscriptionId": + 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.BillingSubscriptionId = ptr.Int64(i64) + } + + case "CurrencyCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CurrencyCode = ptr.String(jtv) + } + + case "Duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = int32(i64) + } + + case "FixedPrice": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.FixedPrice = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.FixedPrice = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + case "InstanceCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.InstanceCount = int32(i64) + } + + case "InstanceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpenSearchPartitionInstanceType to be of type string, got %T instead", value) + } + sv.InstanceType = types.OpenSearchPartitionInstanceType(jtv) + } + + case "PaymentOption": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReservedInstancePaymentOption to be of type string, got %T instead", value) + } + sv.PaymentOption = types.ReservedInstancePaymentOption(jtv) + } + + case "RecurringCharges": + if err := awsRestjson1_deserializeDocumentRecurringChargeList(&sv.RecurringCharges, value); err != nil { + return err + } + + case "ReservationName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReservationToken to be of type string, got %T instead", value) + } + sv.ReservationName = ptr.String(jtv) + } + + case "ReservedInstanceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GUID to be of type string, got %T instead", value) + } + sv.ReservedInstanceId = ptr.String(jtv) + } + + case "ReservedInstanceOfferingId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ReservedInstanceOfferingId = ptr.String(jtv) + } + + case "StartTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected UpdateTimestamp to be a JSON Number, got %T instead", value) + + } + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.State = ptr.String(jtv) + } + + case "UsagePrice": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UsagePrice = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.UsagePrice = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentReservedInstanceList(v *[]types.ReservedInstance, 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.ReservedInstance + if *v == nil { + cv = []types.ReservedInstance{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ReservedInstance + destAddr := &col + if err := awsRestjson1_deserializeDocumentReservedInstance(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentReservedInstanceOffering(v **types.ReservedInstanceOffering, 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.ReservedInstanceOffering + if *v == nil { + sv = &types.ReservedInstanceOffering{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CurrencyCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CurrencyCode = ptr.String(jtv) + } + + case "Duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = int32(i64) + } + + case "FixedPrice": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.FixedPrice = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.FixedPrice = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + case "InstanceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OpenSearchPartitionInstanceType to be of type string, got %T instead", value) + } + sv.InstanceType = types.OpenSearchPartitionInstanceType(jtv) + } + + case "PaymentOption": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReservedInstancePaymentOption to be of type string, got %T instead", value) + } + sv.PaymentOption = types.ReservedInstancePaymentOption(jtv) + } + + case "RecurringCharges": + if err := awsRestjson1_deserializeDocumentRecurringChargeList(&sv.RecurringCharges, value); err != nil { + return err + } + + case "ReservedInstanceOfferingId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GUID to be of type string, got %T instead", value) + } + sv.ReservedInstanceOfferingId = ptr.String(jtv) + } + + case "UsagePrice": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UsagePrice = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.UsagePrice = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentReservedInstanceOfferingList(v *[]types.ReservedInstanceOffering, 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.ReservedInstanceOffering + if *v == nil { + cv = []types.ReservedInstanceOffering{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ReservedInstanceOffering + destAddr := &col + if err := awsRestjson1_deserializeDocumentReservedInstanceOffering(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentResourceAlreadyExistsException(v **types.ResourceAlreadyExistsException, 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.ResourceAlreadyExistsException + if *v == nil { + sv = &types.ResourceAlreadyExistsException{} + } 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_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, 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.ResourceNotFoundException + if *v == nil { + sv = &types.ResourceNotFoundException{} + } 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_deserializeDocumentSAMLIdp(v **types.SAMLIdp, 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.SAMLIdp + if *v == nil { + sv = &types.SAMLIdp{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EntityId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SAMLEntityId to be of type string, got %T instead", value) + } + sv.EntityId = ptr.String(jtv) + } + + case "MetadataContent": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SAMLMetadata to be of type string, got %T instead", value) + } + sv.MetadataContent = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSAMLOptionsOutput(v **types.SAMLOptionsOutput, 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.SAMLOptionsOutput + if *v == nil { + sv = &types.SAMLOptionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Enabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Enabled = ptr.Bool(jtv) + } + + case "Idp": + if err := awsRestjson1_deserializeDocumentSAMLIdp(&sv.Idp, value); err != nil { + return err + } + + case "RolesKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RolesKey = ptr.String(jtv) + } + + case "SessionTimeoutMinutes": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected IntegerClass to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.SessionTimeoutMinutes = ptr.Int32(int32(i64)) + } + + case "SubjectKey": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SubjectKey = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentScheduledAutoTuneDetails(v **types.ScheduledAutoTuneDetails, 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.ScheduledAutoTuneDetails + if *v == nil { + sv = &types.ScheduledAutoTuneDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Action": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduledAutoTuneDescription to be of type string, got %T instead", value) + } + sv.Action = ptr.String(jtv) + } + + case "ActionType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduledAutoTuneActionType to be of type string, got %T instead", value) + } + sv.ActionType = types.ScheduledAutoTuneActionType(jtv) + } + + case "Date": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Date = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected AutoTuneDate to be a JSON Number, got %T instead", value) + + } + } + + case "Severity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ScheduledAutoTuneSeverityType to be of type string, got %T instead", value) + } + sv.Severity = types.ScheduledAutoTuneSeverityType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentServiceSoftwareOptions(v **types.ServiceSoftwareOptions, 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.ServiceSoftwareOptions + if *v == nil { + sv = &types.ServiceSoftwareOptions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AutomatedUpdateDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.AutomatedUpdateDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected DeploymentCloseDateTimeStamp to be a JSON Number, got %T instead", value) + + } + } + + case "Cancellable": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Cancellable = ptr.Bool(jtv) + } + + case "CurrentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CurrentVersion = ptr.String(jtv) + } + + case "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "NewVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NewVersion = ptr.String(jtv) + } + + case "OptionalDeployment": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.OptionalDeployment = ptr.Bool(jtv) + } + + case "UpdateAvailable": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.UpdateAvailable = ptr.Bool(jtv) + } + + case "UpdateStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeploymentStatus to be of type string, got %T instead", value) + } + sv.UpdateStatus = types.DeploymentStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSnapshotOptions(v **types.SnapshotOptions, 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.SnapshotOptions + if *v == nil { + sv = &types.SnapshotOptions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AutomatedSnapshotStartHour": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected IntegerClass to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AutomatedSnapshotStartHour = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSnapshotOptionsStatus(v **types.SnapshotOptionsStatus, 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.SnapshotOptionsStatus + if *v == nil { + sv = &types.SnapshotOptionsStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Options": + if err := awsRestjson1_deserializeDocumentSnapshotOptions(&sv.Options, value); err != nil { + return err + } + + case "Status": + if err := awsRestjson1_deserializeDocumentOptionStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentStorageType(v **types.StorageType, 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.StorageType + if *v == nil { + sv = &types.StorageType{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "StorageSubTypeName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StorageSubTypeName to be of type string, got %T instead", value) + } + sv.StorageSubTypeName = ptr.String(jtv) + } + + case "StorageTypeLimits": + if err := awsRestjson1_deserializeDocumentStorageTypeLimitList(&sv.StorageTypeLimits, value); err != nil { + return err + } + + case "StorageTypeName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StorageTypeName to be of type string, got %T instead", value) + } + sv.StorageTypeName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentStorageTypeLimit(v **types.StorageTypeLimit, 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.StorageTypeLimit + if *v == nil { + sv = &types.StorageTypeLimit{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LimitName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LimitName to be of type string, got %T instead", value) + } + sv.LimitName = ptr.String(jtv) + } + + case "LimitValues": + if err := awsRestjson1_deserializeDocumentLimitValueList(&sv.LimitValues, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentStorageTypeLimitList(v *[]types.StorageTypeLimit, 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.StorageTypeLimit + if *v == nil { + cv = []types.StorageTypeLimit{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.StorageTypeLimit + destAddr := &col + if err := awsRestjson1_deserializeDocumentStorageTypeLimit(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentStorageTypeList(v *[]types.StorageType, 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.StorageType + if *v == nil { + cv = []types.StorageType{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.StorageType + destAddr := &col + if err := awsRestjson1_deserializeDocumentStorageType(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentStringList(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_deserializeDocumentTag(v **types.Tag, 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.Tag + if *v == nil { + sv = &types.Tag{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagKey to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + case "Value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTagList(v *[]types.Tag, 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.Tag + if *v == nil { + cv = []types.Tag{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Tag + destAddr := &col + if err := awsRestjson1_deserializeDocumentTag(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentUpgradeHistory(v **types.UpgradeHistory, 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.UpgradeHistory + if *v == nil { + sv = &types.UpgradeHistory{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "StartTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected StartTimestamp to be a JSON Number, got %T instead", value) + + } + } + + case "StepsList": + if err := awsRestjson1_deserializeDocumentUpgradeStepsList(&sv.StepsList, value); err != nil { + return err + } + + case "UpgradeName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UpgradeName to be of type string, got %T instead", value) + } + sv.UpgradeName = ptr.String(jtv) + } + + case "UpgradeStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UpgradeStatus to be of type string, got %T instead", value) + } + sv.UpgradeStatus = types.UpgradeStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentUpgradeHistoryList(v *[]types.UpgradeHistory, 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.UpgradeHistory + if *v == nil { + cv = []types.UpgradeHistory{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.UpgradeHistory + destAddr := &col + if err := awsRestjson1_deserializeDocumentUpgradeHistory(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentUpgradeStepItem(v **types.UpgradeStepItem, 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.UpgradeStepItem + if *v == nil { + sv = &types.UpgradeStepItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Issues": + if err := awsRestjson1_deserializeDocumentIssues(&sv.Issues, value); err != nil { + return err + } + + case "ProgressPercent": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ProgressPercent = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.ProgressPercent = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + case "UpgradeStep": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UpgradeStep to be of type string, got %T instead", value) + } + sv.UpgradeStep = types.UpgradeStep(jtv) + } + + case "UpgradeStepStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UpgradeStatus to be of type string, got %T instead", value) + } + sv.UpgradeStepStatus = types.UpgradeStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentUpgradeStepsList(v *[]types.UpgradeStepItem, 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.UpgradeStepItem + if *v == nil { + cv = []types.UpgradeStepItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.UpgradeStepItem + destAddr := &col + if err := awsRestjson1_deserializeDocumentUpgradeStepItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentValidationException(v **types.ValidationException, 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.ValidationException + if *v == nil { + sv = &types.ValidationException{} + } 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_deserializeDocumentVersionList(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 VersionString to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentVersionStatus(v **types.VersionStatus, 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.VersionStatus + if *v == nil { + sv = &types.VersionStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Options": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VersionString to be of type string, got %T instead", value) + } + sv.Options = ptr.String(jtv) + } + + case "Status": + if err := awsRestjson1_deserializeDocumentOptionStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentVPCDerivedInfo(v **types.VPCDerivedInfo, 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.VPCDerivedInfo + if *v == nil { + sv = &types.VPCDerivedInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AvailabilityZones": + if err := awsRestjson1_deserializeDocumentStringList(&sv.AvailabilityZones, value); err != nil { + return err + } + + case "SecurityGroupIds": + if err := awsRestjson1_deserializeDocumentStringList(&sv.SecurityGroupIds, value); err != nil { + return err + } + + case "SubnetIds": + if err := awsRestjson1_deserializeDocumentStringList(&sv.SubnetIds, value); err != nil { + return err + } + + case "VPCId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.VPCId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentVPCDerivedInfoStatus(v **types.VPCDerivedInfoStatus, 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.VPCDerivedInfoStatus + if *v == nil { + sv = &types.VPCDerivedInfoStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Options": + if err := awsRestjson1_deserializeDocumentVPCDerivedInfo(&sv.Options, value); err != nil { + return err + } + + case "Status": + if err := awsRestjson1_deserializeDocumentOptionStatus(&sv.Status, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentZoneAwarenessConfig(v **types.ZoneAwarenessConfig, 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.ZoneAwarenessConfig + if *v == nil { + sv = &types.ZoneAwarenessConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AvailabilityZoneCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected IntegerClass to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AvailabilityZoneCount = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} diff --git a/service/opensearch/doc.go b/service/opensearch/doc.go new file mode 100644 index 00000000000..558e0262afd --- /dev/null +++ b/service/opensearch/doc.go @@ -0,0 +1,18 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package opensearch provides the API client, operations, and parameter types for +// Amazon OpenSearch Service. +// +// Amazon OpenSearch Configuration Service Use the Amazon OpenSearch configuration +// API to create, configure, and manage Amazon OpenSearch Service domains. For +// sample code that uses the configuration API, see the Amazon OpenSearch Service +// Developer Guide +// (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/opensearch-configuration-samples.html). +// The guide also contains sample code for sending signed HTTP requests to the +// OpenSearch APIs +// (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/request-signing.html). +// The endpoint for configuration service requests is region-specific: +// es.region.amazonaws.com. For example, es.us-east-1.amazonaws.com. For a current +// list of supported regions and endpoints, see Regions and Endpoints +// (http://docs.aws.amazon.com/general/latest/gr/rande.html#service-regions). +package opensearch diff --git a/service/opensearch/endpoints.go b/service/opensearch/endpoints.go new file mode 100644 index 00000000000..58e91c8ae97 --- /dev/null +++ b/service/opensearch/endpoints.go @@ -0,0 +1,160 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + internalendpoints "github.com/aws/aws-sdk-go-v2/service/opensearch/internal/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/url" +) + +// EndpointResolverOptions is the service endpoint resolver options +type EndpointResolverOptions = internalendpoints.Options + +// EndpointResolver interface for resolving service endpoints. +type EndpointResolver interface { + ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) +} + +var _ EndpointResolver = &internalendpoints.Resolver{} + +// NewDefaultEndpointResolver constructs a new service endpoint resolver +func NewDefaultEndpointResolver() *internalendpoints.Resolver { + return internalendpoints.New() +} + +// EndpointResolverFunc is a helper utility that wraps a function so it satisfies +// the EndpointResolver interface. This is useful when you want to add additional +// endpoint resolving logic, or stub out specific endpoints with custom values. +type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) + +func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + return fn(region, options) +} + +func resolveDefaultEndpointConfiguration(o *Options) { + if o.EndpointResolver != nil { + return + } + o.EndpointResolver = NewDefaultEndpointResolver() +} + +// EndpointResolverFromURL returns an EndpointResolver configured using the +// provided endpoint url. By default, the resolved endpoint resolver uses the +// client region as signing region, and the endpoint source is set to +// EndpointSourceCustom.You can provide functional options to configure endpoint +// values for the resolved endpoint. +func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { + e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} + for _, fn := range optFns { + fn(&e) + } + + return EndpointResolverFunc( + func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { + if len(e.SigningRegion) == 0 { + e.SigningRegion = region + } + return e, nil + }, + ) +} + +type ResolveEndpoint struct { + Resolver EndpointResolver + Options EndpointResolverOptions +} + +func (*ResolveEndpoint) ID() string { + return "ResolveEndpoint" +} + +func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.Resolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + var endpoint aws.Endpoint + endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), m.Options) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL, err = url.Parse(endpoint.URL) + if err != nil { + return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) + } + + if len(awsmiddleware.GetSigningName(ctx)) == 0 { + signingName := endpoint.SigningName + if len(signingName) == 0 { + signingName = "es" + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + } + ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) + ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) + ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) + ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) + return next.HandleSerialize(ctx, in) +} +func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { + return stack.Serialize.Insert(&ResolveEndpoint{ + Resolver: o.EndpointResolver, + Options: o.EndpointOptions, + }, "OperationSerializer", middleware.Before) +} + +func removeResolveEndpointMiddleware(stack *middleware.Stack) error { + _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) + return err +} + +type wrappedEndpointResolver struct { + awsResolver aws.EndpointResolver + resolver EndpointResolver +} + +func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + if w.awsResolver == nil { + goto fallback + } + endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region) + if err == nil { + return endpoint, nil + } + + if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) { + return endpoint, err + } + +fallback: + if w.resolver == nil { + return endpoint, fmt.Errorf("default endpoint resolver provided was nil") + } + return w.resolver.ResolveEndpoint(region, options) +} + +// withEndpointResolver returns an EndpointResolver that first delegates endpoint +// resolution to the awsResolver. If awsResolver returns aws.EndpointNotFoundError +// error, the resolver will use the the provided fallbackResolver for resolution. +// awsResolver and fallbackResolver must not be nil +func withEndpointResolver(awsResolver aws.EndpointResolver, fallbackResolver EndpointResolver) EndpointResolver { + return &wrappedEndpointResolver{ + awsResolver: awsResolver, + resolver: fallbackResolver, + } +} diff --git a/service/opensearch/generated.json b/service/opensearch/generated.json new file mode 100644 index 00000000000..85ea0908039 --- /dev/null +++ b/service/opensearch/generated.json @@ -0,0 +1,63 @@ +{ + "dependencies": { + "github.com/aws/aws-sdk-go-v2": "v1.4.0", + "github.com/aws/smithy-go": "v1.4.0" + }, + "files": [ + "api_client.go", + "api_op_AcceptInboundConnection.go", + "api_op_AddTags.go", + "api_op_AssociatePackage.go", + "api_op_CancelServiceSoftwareUpdate.go", + "api_op_CreateDomain.go", + "api_op_CreateOutboundConnection.go", + "api_op_CreatePackage.go", + "api_op_DeleteDomain.go", + "api_op_DeleteInboundConnection.go", + "api_op_DeleteOutboundConnection.go", + "api_op_DeletePackage.go", + "api_op_DescribeDomain.go", + "api_op_DescribeDomainAutoTunes.go", + "api_op_DescribeDomainConfig.go", + "api_op_DescribeDomains.go", + "api_op_DescribeInboundConnections.go", + "api_op_DescribeInstanceTypeLimits.go", + "api_op_DescribeOutboundConnections.go", + "api_op_DescribePackages.go", + "api_op_DescribeReservedInstanceOfferings.go", + "api_op_DescribeReservedInstances.go", + "api_op_DissociatePackage.go", + "api_op_GetCompatibleVersions.go", + "api_op_GetPackageVersionHistory.go", + "api_op_GetUpgradeHistory.go", + "api_op_GetUpgradeStatus.go", + "api_op_ListDomainNames.go", + "api_op_ListDomainsForPackage.go", + "api_op_ListInstanceTypeDetails.go", + "api_op_ListPackagesForDomain.go", + "api_op_ListTags.go", + "api_op_ListVersions.go", + "api_op_PurchaseReservedInstanceOffering.go", + "api_op_RejectInboundConnection.go", + "api_op_RemoveTags.go", + "api_op_StartServiceSoftwareUpdate.go", + "api_op_UpdateDomainConfig.go", + "api_op_UpdatePackage.go", + "api_op_UpgradeDomain.go", + "deserializers.go", + "doc.go", + "endpoints.go", + "generated.json", + "internal/endpoints/endpoints.go", + "internal/endpoints/endpoints_test.go", + "protocol_test.go", + "serializers.go", + "types/enums.go", + "types/errors.go", + "types/types.go", + "validators.go" + ], + "go": "1.15", + "module": "github.com/aws/aws-sdk-go-v2/service/opensearch", + "unstable": false +} diff --git a/service/opensearch/go.mod b/service/opensearch/go.mod new file mode 100644 index 00000000000..225a5b9dc77 --- /dev/null +++ b/service/opensearch/go.mod @@ -0,0 +1,10 @@ +module github.com/aws/aws-sdk-go-v2/service/opensearch + +go 1.15 + +require ( + github.com/aws/aws-sdk-go-v2 v1.9.0 + github.com/aws/smithy-go v1.8.0 +) + +replace github.com/aws/aws-sdk-go-v2 => ../../ diff --git a/service/opensearch/go.sum b/service/opensearch/go.sum new file mode 100644 index 00000000000..779915f8ab7 --- /dev/null +++ b/service/opensearch/go.sum @@ -0,0 +1,14 @@ +github.com/aws/smithy-go v1.8.0 h1:AEwwwXQZtUwP5Mz506FeXXrKBe0jA8gVM+1gEcSRooc= +github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/service/opensearch/go_module_metadata.go b/service/opensearch/go_module_metadata.go new file mode 100644 index 00000000000..788c89fcb8f --- /dev/null +++ b/service/opensearch/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package opensearch + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "tip" diff --git a/service/opensearch/internal/endpoints/endpoints.go b/service/opensearch/internal/endpoints/endpoints.go new file mode 100644 index 00000000000..700277e30c2 --- /dev/null +++ b/service/opensearch/internal/endpoints/endpoints.go @@ -0,0 +1,155 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/internal/endpoints" + "regexp" +) + +// Options is the endpoint resolver configuration options +type Options struct { + DisableHTTPS bool +} + +// Resolver OpenSearch endpoint resolver +type Resolver struct { + partitions endpoints.Partitions +} + +// ResolveEndpoint resolves the service endpoint for the given region and options +func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { + if len(region) == 0 { + return endpoint, &aws.MissingRegionError{} + } + + opt := endpoints.Options{ + DisableHTTPS: options.DisableHTTPS, + } + return r.partitions.ResolveEndpoint(region, opt) +} + +// New returns a new Resolver +func New() *Resolver { + return &Resolver{ + partitions: defaultPartitions, + } +} + +var partitionRegexp = struct { + Aws *regexp.Regexp + AwsCn *regexp.Regexp + AwsIso *regexp.Regexp + AwsIsoB *regexp.Regexp + AwsUsGov *regexp.Regexp +}{ + + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"), + AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), + AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), + AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), + AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), +} + +var defaultPartitions = endpoints.Partitions{ + { + ID: "aws", + Defaults: endpoints.Endpoint{ + Hostname: "es.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + "af-south-1": endpoints.Endpoint{}, + "ap-east-1": endpoints.Endpoint{}, + "ap-northeast-1": endpoints.Endpoint{}, + "ap-northeast-2": endpoints.Endpoint{}, + "ap-northeast-3": endpoints.Endpoint{}, + "ap-south-1": endpoints.Endpoint{}, + "ap-southeast-1": endpoints.Endpoint{}, + "ap-southeast-2": endpoints.Endpoint{}, + "ca-central-1": endpoints.Endpoint{}, + "eu-central-1": endpoints.Endpoint{}, + "eu-north-1": endpoints.Endpoint{}, + "eu-south-1": endpoints.Endpoint{}, + "eu-west-1": endpoints.Endpoint{}, + "eu-west-2": endpoints.Endpoint{}, + "eu-west-3": endpoints.Endpoint{}, + "fips": endpoints.Endpoint{ + Hostname: "es-fips.us-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-west-1", + }, + }, + "me-south-1": endpoints.Endpoint{}, + "sa-east-1": endpoints.Endpoint{}, + "us-east-1": endpoints.Endpoint{}, + "us-east-2": endpoints.Endpoint{}, + "us-west-1": endpoints.Endpoint{}, + "us-west-2": endpoints.Endpoint{}, + }, + }, + { + ID: "aws-cn", + Defaults: endpoints.Endpoint{ + Hostname: "es.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsCn, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + "cn-north-1": endpoints.Endpoint{}, + "cn-northwest-1": endpoints.Endpoint{}, + }, + }, + { + ID: "aws-iso", + Defaults: endpoints.Endpoint{ + Hostname: "es.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsIso, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + "us-iso-east-1": endpoints.Endpoint{}, + }, + }, + { + ID: "aws-iso-b", + Defaults: endpoints.Endpoint{ + Hostname: "es.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsIsoB, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + "us-isob-east-1": endpoints.Endpoint{}, + }, + }, + { + ID: "aws-us-gov", + Defaults: endpoints.Endpoint{ + Hostname: "es.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + "fips": endpoints.Endpoint{ + Hostname: "es-fips.us-gov-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-west-1", + }, + }, + "us-gov-east-1": endpoints.Endpoint{}, + "us-gov-west-1": endpoints.Endpoint{}, + }, + }, +} diff --git a/service/opensearch/internal/endpoints/endpoints_test.go b/service/opensearch/internal/endpoints/endpoints_test.go new file mode 100644 index 00000000000..08e5da2d833 --- /dev/null +++ b/service/opensearch/internal/endpoints/endpoints_test.go @@ -0,0 +1,11 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "testing" +) + +func TestRegexCompile(t *testing.T) { + _ = defaultPartitions +} diff --git a/service/opensearch/protocol_test.go b/service/opensearch/protocol_test.go new file mode 100644 index 00000000000..1cc16033738 --- /dev/null +++ b/service/opensearch/protocol_test.go @@ -0,0 +1,3 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch diff --git a/service/opensearch/serializers.go b/service/opensearch/serializers.go new file mode 100644 index 00000000000..06c22fa2066 --- /dev/null +++ b/service/opensearch/serializers.go @@ -0,0 +1,3520 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +import ( + "bytes" + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/opensearch/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/encoding/httpbinding" + smithyjson "github.com/aws/smithy-go/encoding/json" + "github.com/aws/smithy-go/middleware" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +type awsRestjson1_serializeOpAcceptInboundConnection struct { +} + +func (*awsRestjson1_serializeOpAcceptInboundConnection) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpAcceptInboundConnection) 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.(*AcceptInboundConnectionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/cc/inboundConnection/{ConnectionId}/accept") + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsAcceptInboundConnectionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsAcceptInboundConnectionInput(v *AcceptInboundConnectionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ConnectionId == nil || len(*v.ConnectionId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ConnectionId must not be empty")} + } + if v.ConnectionId != nil { + if err := encoder.SetURI("ConnectionId").String(*v.ConnectionId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpAddTags struct { +} + +func (*awsRestjson1_serializeOpAddTags) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpAddTags) 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.(*AddTagsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/tags") + 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_serializeOpDocumentAddTagsInput(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_serializeOpHttpBindingsAddTagsInput(v *AddTagsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentAddTagsInput(v *AddTagsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ARN != nil { + ok := object.Key("ARN") + ok.String(*v.ARN) + } + + if v.TagList != nil { + ok := object.Key("TagList") + if err := awsRestjson1_serializeDocumentTagList(v.TagList, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpAssociatePackage struct { +} + +func (*awsRestjson1_serializeOpAssociatePackage) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpAssociatePackage) 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.(*AssociatePackageInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/packages/associate/{PackageID}/{DomainName}") + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsAssociatePackageInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsAssociatePackageInput(v *AssociatePackageInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainName == nil || len(*v.DomainName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DomainName must not be empty")} + } + if v.DomainName != nil { + if err := encoder.SetURI("DomainName").String(*v.DomainName); err != nil { + return err + } + } + + if v.PackageID == nil || len(*v.PackageID) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member PackageID must not be empty")} + } + if v.PackageID != nil { + if err := encoder.SetURI("PackageID").String(*v.PackageID); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCancelServiceSoftwareUpdate struct { +} + +func (*awsRestjson1_serializeOpCancelServiceSoftwareUpdate) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCancelServiceSoftwareUpdate) 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.(*CancelServiceSoftwareUpdateInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/serviceSoftwareUpdate/cancel") + 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_serializeOpDocumentCancelServiceSoftwareUpdateInput(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_serializeOpHttpBindingsCancelServiceSoftwareUpdateInput(v *CancelServiceSoftwareUpdateInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCancelServiceSoftwareUpdateInput(v *CancelServiceSoftwareUpdateInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DomainName != nil { + ok := object.Key("DomainName") + ok.String(*v.DomainName) + } + + return nil +} + +type awsRestjson1_serializeOpCreateDomain struct { +} + +func (*awsRestjson1_serializeOpCreateDomain) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateDomain) 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.(*CreateDomainInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/domain") + 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_serializeOpDocumentCreateDomainInput(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_serializeOpHttpBindingsCreateDomainInput(v *CreateDomainInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateDomainInput(v *CreateDomainInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccessPolicies != nil { + ok := object.Key("AccessPolicies") + ok.String(*v.AccessPolicies) + } + + if v.AdvancedOptions != nil { + ok := object.Key("AdvancedOptions") + if err := awsRestjson1_serializeDocumentAdvancedOptions(v.AdvancedOptions, ok); err != nil { + return err + } + } + + if v.AdvancedSecurityOptions != nil { + ok := object.Key("AdvancedSecurityOptions") + if err := awsRestjson1_serializeDocumentAdvancedSecurityOptionsInput(v.AdvancedSecurityOptions, ok); err != nil { + return err + } + } + + if v.AutoTuneOptions != nil { + ok := object.Key("AutoTuneOptions") + if err := awsRestjson1_serializeDocumentAutoTuneOptionsInput(v.AutoTuneOptions, ok); err != nil { + return err + } + } + + if v.ClusterConfig != nil { + ok := object.Key("ClusterConfig") + if err := awsRestjson1_serializeDocumentClusterConfig(v.ClusterConfig, ok); err != nil { + return err + } + } + + if v.CognitoOptions != nil { + ok := object.Key("CognitoOptions") + if err := awsRestjson1_serializeDocumentCognitoOptions(v.CognitoOptions, ok); err != nil { + return err + } + } + + if v.DomainEndpointOptions != nil { + ok := object.Key("DomainEndpointOptions") + if err := awsRestjson1_serializeDocumentDomainEndpointOptions(v.DomainEndpointOptions, ok); err != nil { + return err + } + } + + if v.DomainName != nil { + ok := object.Key("DomainName") + ok.String(*v.DomainName) + } + + if v.EBSOptions != nil { + ok := object.Key("EBSOptions") + if err := awsRestjson1_serializeDocumentEBSOptions(v.EBSOptions, ok); err != nil { + return err + } + } + + if v.EncryptionAtRestOptions != nil { + ok := object.Key("EncryptionAtRestOptions") + if err := awsRestjson1_serializeDocumentEncryptionAtRestOptions(v.EncryptionAtRestOptions, ok); err != nil { + return err + } + } + + if v.EngineVersion != nil { + ok := object.Key("EngineVersion") + ok.String(*v.EngineVersion) + } + + if v.LogPublishingOptions != nil { + ok := object.Key("LogPublishingOptions") + if err := awsRestjson1_serializeDocumentLogPublishingOptions(v.LogPublishingOptions, ok); err != nil { + return err + } + } + + if v.NodeToNodeEncryptionOptions != nil { + ok := object.Key("NodeToNodeEncryptionOptions") + if err := awsRestjson1_serializeDocumentNodeToNodeEncryptionOptions(v.NodeToNodeEncryptionOptions, ok); err != nil { + return err + } + } + + if v.SnapshotOptions != nil { + ok := object.Key("SnapshotOptions") + if err := awsRestjson1_serializeDocumentSnapshotOptions(v.SnapshotOptions, ok); err != nil { + return err + } + } + + if v.TagList != nil { + ok := object.Key("TagList") + if err := awsRestjson1_serializeDocumentTagList(v.TagList, ok); err != nil { + return err + } + } + + if v.VPCOptions != nil { + ok := object.Key("VPCOptions") + if err := awsRestjson1_serializeDocumentVPCOptions(v.VPCOptions, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCreateOutboundConnection struct { +} + +func (*awsRestjson1_serializeOpCreateOutboundConnection) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateOutboundConnection) 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.(*CreateOutboundConnectionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/cc/outboundConnection") + 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_serializeOpDocumentCreateOutboundConnectionInput(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_serializeOpHttpBindingsCreateOutboundConnectionInput(v *CreateOutboundConnectionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateOutboundConnectionInput(v *CreateOutboundConnectionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ConnectionAlias != nil { + ok := object.Key("ConnectionAlias") + ok.String(*v.ConnectionAlias) + } + + if v.LocalDomainInfo != nil { + ok := object.Key("LocalDomainInfo") + if err := awsRestjson1_serializeDocumentDomainInformationContainer(v.LocalDomainInfo, ok); err != nil { + return err + } + } + + if v.RemoteDomainInfo != nil { + ok := object.Key("RemoteDomainInfo") + if err := awsRestjson1_serializeDocumentDomainInformationContainer(v.RemoteDomainInfo, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCreatePackage struct { +} + +func (*awsRestjson1_serializeOpCreatePackage) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreatePackage) 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.(*CreatePackageInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/packages") + 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_serializeOpDocumentCreatePackageInput(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_serializeOpHttpBindingsCreatePackageInput(v *CreatePackageInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreatePackageInput(v *CreatePackageInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.PackageDescription != nil { + ok := object.Key("PackageDescription") + ok.String(*v.PackageDescription) + } + + if v.PackageName != nil { + ok := object.Key("PackageName") + ok.String(*v.PackageName) + } + + if v.PackageSource != nil { + ok := object.Key("PackageSource") + if err := awsRestjson1_serializeDocumentPackageSource(v.PackageSource, ok); err != nil { + return err + } + } + + if len(v.PackageType) > 0 { + ok := object.Key("PackageType") + ok.String(string(v.PackageType)) + } + + return nil +} + +type awsRestjson1_serializeOpDeleteDomain struct { +} + +func (*awsRestjson1_serializeOpDeleteDomain) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteDomain) 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.(*DeleteDomainInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/domain/{DomainName}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteDomainInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteDomainInput(v *DeleteDomainInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainName == nil || len(*v.DomainName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DomainName must not be empty")} + } + if v.DomainName != nil { + if err := encoder.SetURI("DomainName").String(*v.DomainName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteInboundConnection struct { +} + +func (*awsRestjson1_serializeOpDeleteInboundConnection) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteInboundConnection) 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.(*DeleteInboundConnectionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/cc/inboundConnection/{ConnectionId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteInboundConnectionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteInboundConnectionInput(v *DeleteInboundConnectionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ConnectionId == nil || len(*v.ConnectionId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ConnectionId must not be empty")} + } + if v.ConnectionId != nil { + if err := encoder.SetURI("ConnectionId").String(*v.ConnectionId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteOutboundConnection struct { +} + +func (*awsRestjson1_serializeOpDeleteOutboundConnection) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteOutboundConnection) 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.(*DeleteOutboundConnectionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/cc/outboundConnection/{ConnectionId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteOutboundConnectionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteOutboundConnectionInput(v *DeleteOutboundConnectionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ConnectionId == nil || len(*v.ConnectionId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ConnectionId must not be empty")} + } + if v.ConnectionId != nil { + if err := encoder.SetURI("ConnectionId").String(*v.ConnectionId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeletePackage struct { +} + +func (*awsRestjson1_serializeOpDeletePackage) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeletePackage) 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.(*DeletePackageInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/packages/{PackageID}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeletePackageInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeletePackageInput(v *DeletePackageInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.PackageID == nil || len(*v.PackageID) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member PackageID must not be empty")} + } + if v.PackageID != nil { + if err := encoder.SetURI("PackageID").String(*v.PackageID); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeDomain struct { +} + +func (*awsRestjson1_serializeOpDescribeDomain) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeDomain) 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.(*DescribeDomainInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/domain/{DomainName}") + 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 err := awsRestjson1_serializeOpHttpBindingsDescribeDomainInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeDomainInput(v *DescribeDomainInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainName == nil || len(*v.DomainName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DomainName must not be empty")} + } + if v.DomainName != nil { + if err := encoder.SetURI("DomainName").String(*v.DomainName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeDomainAutoTunes struct { +} + +func (*awsRestjson1_serializeOpDescribeDomainAutoTunes) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeDomainAutoTunes) 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.(*DescribeDomainAutoTunesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/domain/{DomainName}/autoTunes") + 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 err := awsRestjson1_serializeOpHttpBindingsDescribeDomainAutoTunesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentDescribeDomainAutoTunesInput(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_serializeOpHttpBindingsDescribeDomainAutoTunesInput(v *DescribeDomainAutoTunesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainName == nil || len(*v.DomainName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DomainName must not be empty")} + } + if v.DomainName != nil { + if err := encoder.SetURI("DomainName").String(*v.DomainName); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDescribeDomainAutoTunesInput(v *DescribeDomainAutoTunesInput, 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_serializeOpDescribeDomainConfig struct { +} + +func (*awsRestjson1_serializeOpDescribeDomainConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeDomainConfig) 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.(*DescribeDomainConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/domain/{DomainName}/config") + 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 err := awsRestjson1_serializeOpHttpBindingsDescribeDomainConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeDomainConfigInput(v *DescribeDomainConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainName == nil || len(*v.DomainName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DomainName must not be empty")} + } + if v.DomainName != nil { + if err := encoder.SetURI("DomainName").String(*v.DomainName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeDomains struct { +} + +func (*awsRestjson1_serializeOpDescribeDomains) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeDomains) 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.(*DescribeDomainsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/domain-info") + 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_serializeOpDocumentDescribeDomainsInput(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_serializeOpHttpBindingsDescribeDomainsInput(v *DescribeDomainsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDescribeDomainsInput(v *DescribeDomainsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DomainNames != nil { + ok := object.Key("DomainNames") + if err := awsRestjson1_serializeDocumentDomainNameList(v.DomainNames, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeInboundConnections struct { +} + +func (*awsRestjson1_serializeOpDescribeInboundConnections) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeInboundConnections) 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.(*DescribeInboundConnectionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/cc/inboundConnection/search") + 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_serializeOpDocumentDescribeInboundConnectionsInput(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_serializeOpHttpBindingsDescribeInboundConnectionsInput(v *DescribeInboundConnectionsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDescribeInboundConnectionsInput(v *DescribeInboundConnectionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsRestjson1_serializeDocumentFilterList(v.Filters, ok); err != nil { + return err + } + } + + 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_serializeOpDescribeInstanceTypeLimits struct { +} + +func (*awsRestjson1_serializeOpDescribeInstanceTypeLimits) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeInstanceTypeLimits) 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.(*DescribeInstanceTypeLimitsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/instanceTypeLimits/{EngineVersion}/{InstanceType}") + 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 err := awsRestjson1_serializeOpHttpBindingsDescribeInstanceTypeLimitsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeInstanceTypeLimitsInput(v *DescribeInstanceTypeLimitsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainName != nil { + encoder.SetQuery("domainName").String(*v.DomainName) + } + + if v.EngineVersion == nil || len(*v.EngineVersion) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member EngineVersion must not be empty")} + } + if v.EngineVersion != nil { + if err := encoder.SetURI("EngineVersion").String(*v.EngineVersion); err != nil { + return err + } + } + + if len(v.InstanceType) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InstanceType must not be empty")} + } + if len(v.InstanceType) > 0 { + if err := encoder.SetURI("InstanceType").String(string(v.InstanceType)); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeOutboundConnections struct { +} + +func (*awsRestjson1_serializeOpDescribeOutboundConnections) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeOutboundConnections) 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.(*DescribeOutboundConnectionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/cc/outboundConnection/search") + 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_serializeOpDocumentDescribeOutboundConnectionsInput(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_serializeOpHttpBindingsDescribeOutboundConnectionsInput(v *DescribeOutboundConnectionsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDescribeOutboundConnectionsInput(v *DescribeOutboundConnectionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsRestjson1_serializeDocumentFilterList(v.Filters, ok); err != nil { + return err + } + } + + 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_serializeOpDescribePackages struct { +} + +func (*awsRestjson1_serializeOpDescribePackages) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribePackages) 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.(*DescribePackagesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/packages/describe") + 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_serializeOpDocumentDescribePackagesInput(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_serializeOpHttpBindingsDescribePackagesInput(v *DescribePackagesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDescribePackagesInput(v *DescribePackagesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsRestjson1_serializeDocumentDescribePackagesFilterList(v.Filters, ok); err != nil { + return err + } + } + + 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_serializeOpDescribeReservedInstanceOfferings struct { +} + +func (*awsRestjson1_serializeOpDescribeReservedInstanceOfferings) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeReservedInstanceOfferings) 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.(*DescribeReservedInstanceOfferingsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/reservedInstanceOfferings") + 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 err := awsRestjson1_serializeOpHttpBindingsDescribeReservedInstanceOfferingsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeReservedInstanceOfferingsInput(v *DescribeReservedInstanceOfferingsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != 0 { + encoder.SetQuery("maxResults").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if v.ReservedInstanceOfferingId != nil { + encoder.SetQuery("offeringId").String(*v.ReservedInstanceOfferingId) + } + + return nil +} + +type awsRestjson1_serializeOpDescribeReservedInstances struct { +} + +func (*awsRestjson1_serializeOpDescribeReservedInstances) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeReservedInstances) 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.(*DescribeReservedInstancesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/reservedInstances") + 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 err := awsRestjson1_serializeOpHttpBindingsDescribeReservedInstancesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeReservedInstancesInput(v *DescribeReservedInstancesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != 0 { + encoder.SetQuery("maxResults").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if v.ReservedInstanceId != nil { + encoder.SetQuery("reservationId").String(*v.ReservedInstanceId) + } + + return nil +} + +type awsRestjson1_serializeOpDissociatePackage struct { +} + +func (*awsRestjson1_serializeOpDissociatePackage) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDissociatePackage) 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.(*DissociatePackageInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/packages/dissociate/{PackageID}/{DomainName}") + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsDissociatePackageInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDissociatePackageInput(v *DissociatePackageInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainName == nil || len(*v.DomainName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DomainName must not be empty")} + } + if v.DomainName != nil { + if err := encoder.SetURI("DomainName").String(*v.DomainName); err != nil { + return err + } + } + + if v.PackageID == nil || len(*v.PackageID) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member PackageID must not be empty")} + } + if v.PackageID != nil { + if err := encoder.SetURI("PackageID").String(*v.PackageID); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetCompatibleVersions struct { +} + +func (*awsRestjson1_serializeOpGetCompatibleVersions) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetCompatibleVersions) 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.(*GetCompatibleVersionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/compatibleVersions") + 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 err := awsRestjson1_serializeOpHttpBindingsGetCompatibleVersionsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetCompatibleVersionsInput(v *GetCompatibleVersionsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainName != nil { + encoder.SetQuery("domainName").String(*v.DomainName) + } + + return nil +} + +type awsRestjson1_serializeOpGetPackageVersionHistory struct { +} + +func (*awsRestjson1_serializeOpGetPackageVersionHistory) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetPackageVersionHistory) 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.(*GetPackageVersionHistoryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/packages/{PackageID}/history") + 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 err := awsRestjson1_serializeOpHttpBindingsGetPackageVersionHistoryInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetPackageVersionHistoryInput(v *GetPackageVersionHistoryInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != 0 { + encoder.SetQuery("maxResults").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if v.PackageID == nil || len(*v.PackageID) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member PackageID must not be empty")} + } + if v.PackageID != nil { + if err := encoder.SetURI("PackageID").String(*v.PackageID); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetUpgradeHistory struct { +} + +func (*awsRestjson1_serializeOpGetUpgradeHistory) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetUpgradeHistory) 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.(*GetUpgradeHistoryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/upgradeDomain/{DomainName}/history") + 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 err := awsRestjson1_serializeOpHttpBindingsGetUpgradeHistoryInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetUpgradeHistoryInput(v *GetUpgradeHistoryInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainName == nil || len(*v.DomainName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DomainName must not be empty")} + } + if v.DomainName != nil { + if err := encoder.SetURI("DomainName").String(*v.DomainName); err != nil { + return err + } + } + + if v.MaxResults != 0 { + encoder.SetQuery("maxResults").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpGetUpgradeStatus struct { +} + +func (*awsRestjson1_serializeOpGetUpgradeStatus) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetUpgradeStatus) 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.(*GetUpgradeStatusInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/upgradeDomain/{DomainName}/status") + 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 err := awsRestjson1_serializeOpHttpBindingsGetUpgradeStatusInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetUpgradeStatusInput(v *GetUpgradeStatusInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainName == nil || len(*v.DomainName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DomainName must not be empty")} + } + if v.DomainName != nil { + if err := encoder.SetURI("DomainName").String(*v.DomainName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpListDomainNames struct { +} + +func (*awsRestjson1_serializeOpListDomainNames) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListDomainNames) 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.(*ListDomainNamesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/domain") + 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_serializeOpHttpBindingsListDomainNamesInput(v *ListDomainNamesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestjson1_serializeOpListDomainsForPackage struct { +} + +func (*awsRestjson1_serializeOpListDomainsForPackage) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListDomainsForPackage) 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.(*ListDomainsForPackageInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/packages/{PackageID}/domains") + 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 err := awsRestjson1_serializeOpHttpBindingsListDomainsForPackageInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListDomainsForPackageInput(v *ListDomainsForPackageInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != 0 { + encoder.SetQuery("maxResults").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if v.PackageID == nil || len(*v.PackageID) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member PackageID must not be empty")} + } + if v.PackageID != nil { + if err := encoder.SetURI("PackageID").String(*v.PackageID); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpListInstanceTypeDetails struct { +} + +func (*awsRestjson1_serializeOpListInstanceTypeDetails) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListInstanceTypeDetails) 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.(*ListInstanceTypeDetailsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/instanceTypeDetails/{EngineVersion}") + 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 err := awsRestjson1_serializeOpHttpBindingsListInstanceTypeDetailsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListInstanceTypeDetailsInput(v *ListInstanceTypeDetailsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainName != nil { + encoder.SetQuery("domainName").String(*v.DomainName) + } + + if v.EngineVersion == nil || len(*v.EngineVersion) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member EngineVersion must not be empty")} + } + if v.EngineVersion != nil { + if err := encoder.SetURI("EngineVersion").String(*v.EngineVersion); err != nil { + return err + } + } + + if v.MaxResults != 0 { + encoder.SetQuery("maxResults").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListPackagesForDomain struct { +} + +func (*awsRestjson1_serializeOpListPackagesForDomain) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListPackagesForDomain) 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.(*ListPackagesForDomainInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/domain/{DomainName}/packages") + 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 err := awsRestjson1_serializeOpHttpBindingsListPackagesForDomainInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListPackagesForDomainInput(v *ListPackagesForDomainInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainName == nil || len(*v.DomainName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DomainName must not be empty")} + } + if v.DomainName != nil { + if err := encoder.SetURI("DomainName").String(*v.DomainName); err != nil { + return err + } + } + + if v.MaxResults != 0 { + encoder.SetQuery("maxResults").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListTags struct { +} + +func (*awsRestjson1_serializeOpListTags) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListTags) 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.(*ListTagsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/tags") + 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 err := awsRestjson1_serializeOpHttpBindingsListTagsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListTagsInput(v *ListTagsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ARN != nil { + encoder.SetQuery("arn").String(*v.ARN) + } + + return nil +} + +type awsRestjson1_serializeOpListVersions struct { +} + +func (*awsRestjson1_serializeOpListVersions) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListVersions) 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.(*ListVersionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/versions") + 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 err := awsRestjson1_serializeOpHttpBindingsListVersionsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListVersionsInput(v *ListVersionsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != 0 { + encoder.SetQuery("maxResults").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpPurchaseReservedInstanceOffering struct { +} + +func (*awsRestjson1_serializeOpPurchaseReservedInstanceOffering) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPurchaseReservedInstanceOffering) 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.(*PurchaseReservedInstanceOfferingInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/purchaseReservedInstanceOffering") + 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_serializeOpDocumentPurchaseReservedInstanceOfferingInput(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_serializeOpHttpBindingsPurchaseReservedInstanceOfferingInput(v *PurchaseReservedInstanceOfferingInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentPurchaseReservedInstanceOfferingInput(v *PurchaseReservedInstanceOfferingInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.InstanceCount != 0 { + ok := object.Key("InstanceCount") + ok.Integer(v.InstanceCount) + } + + if v.ReservationName != nil { + ok := object.Key("ReservationName") + ok.String(*v.ReservationName) + } + + if v.ReservedInstanceOfferingId != nil { + ok := object.Key("ReservedInstanceOfferingId") + ok.String(*v.ReservedInstanceOfferingId) + } + + return nil +} + +type awsRestjson1_serializeOpRejectInboundConnection struct { +} + +func (*awsRestjson1_serializeOpRejectInboundConnection) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpRejectInboundConnection) 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.(*RejectInboundConnectionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/cc/inboundConnection/{ConnectionId}/reject") + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsRejectInboundConnectionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsRejectInboundConnectionInput(v *RejectInboundConnectionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ConnectionId == nil || len(*v.ConnectionId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ConnectionId must not be empty")} + } + if v.ConnectionId != nil { + if err := encoder.SetURI("ConnectionId").String(*v.ConnectionId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpRemoveTags struct { +} + +func (*awsRestjson1_serializeOpRemoveTags) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpRemoveTags) 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.(*RemoveTagsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/tags-removal") + 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_serializeOpDocumentRemoveTagsInput(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_serializeOpHttpBindingsRemoveTagsInput(v *RemoveTagsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentRemoveTagsInput(v *RemoveTagsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ARN != nil { + ok := object.Key("ARN") + ok.String(*v.ARN) + } + + if v.TagKeys != nil { + ok := object.Key("TagKeys") + if err := awsRestjson1_serializeDocumentStringList(v.TagKeys, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpStartServiceSoftwareUpdate struct { +} + +func (*awsRestjson1_serializeOpStartServiceSoftwareUpdate) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStartServiceSoftwareUpdate) 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.(*StartServiceSoftwareUpdateInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/serviceSoftwareUpdate/start") + 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_serializeOpDocumentStartServiceSoftwareUpdateInput(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_serializeOpHttpBindingsStartServiceSoftwareUpdateInput(v *StartServiceSoftwareUpdateInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentStartServiceSoftwareUpdateInput(v *StartServiceSoftwareUpdateInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DomainName != nil { + ok := object.Key("DomainName") + ok.String(*v.DomainName) + } + + return nil +} + +type awsRestjson1_serializeOpUpdateDomainConfig struct { +} + +func (*awsRestjson1_serializeOpUpdateDomainConfig) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateDomainConfig) 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.(*UpdateDomainConfigInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/domain/{DomainName}/config") + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateDomainConfigInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateDomainConfigInput(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_serializeOpHttpBindingsUpdateDomainConfigInput(v *UpdateDomainConfigInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.DomainName == nil || len(*v.DomainName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DomainName must not be empty")} + } + if v.DomainName != nil { + if err := encoder.SetURI("DomainName").String(*v.DomainName); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateDomainConfigInput(v *UpdateDomainConfigInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccessPolicies != nil { + ok := object.Key("AccessPolicies") + ok.String(*v.AccessPolicies) + } + + if v.AdvancedOptions != nil { + ok := object.Key("AdvancedOptions") + if err := awsRestjson1_serializeDocumentAdvancedOptions(v.AdvancedOptions, ok); err != nil { + return err + } + } + + if v.AdvancedSecurityOptions != nil { + ok := object.Key("AdvancedSecurityOptions") + if err := awsRestjson1_serializeDocumentAdvancedSecurityOptionsInput(v.AdvancedSecurityOptions, ok); err != nil { + return err + } + } + + if v.AutoTuneOptions != nil { + ok := object.Key("AutoTuneOptions") + if err := awsRestjson1_serializeDocumentAutoTuneOptions(v.AutoTuneOptions, ok); err != nil { + return err + } + } + + if v.ClusterConfig != nil { + ok := object.Key("ClusterConfig") + if err := awsRestjson1_serializeDocumentClusterConfig(v.ClusterConfig, ok); err != nil { + return err + } + } + + if v.CognitoOptions != nil { + ok := object.Key("CognitoOptions") + if err := awsRestjson1_serializeDocumentCognitoOptions(v.CognitoOptions, ok); err != nil { + return err + } + } + + if v.DomainEndpointOptions != nil { + ok := object.Key("DomainEndpointOptions") + if err := awsRestjson1_serializeDocumentDomainEndpointOptions(v.DomainEndpointOptions, ok); err != nil { + return err + } + } + + if v.EBSOptions != nil { + ok := object.Key("EBSOptions") + if err := awsRestjson1_serializeDocumentEBSOptions(v.EBSOptions, ok); err != nil { + return err + } + } + + if v.EncryptionAtRestOptions != nil { + ok := object.Key("EncryptionAtRestOptions") + if err := awsRestjson1_serializeDocumentEncryptionAtRestOptions(v.EncryptionAtRestOptions, ok); err != nil { + return err + } + } + + if v.LogPublishingOptions != nil { + ok := object.Key("LogPublishingOptions") + if err := awsRestjson1_serializeDocumentLogPublishingOptions(v.LogPublishingOptions, ok); err != nil { + return err + } + } + + if v.NodeToNodeEncryptionOptions != nil { + ok := object.Key("NodeToNodeEncryptionOptions") + if err := awsRestjson1_serializeDocumentNodeToNodeEncryptionOptions(v.NodeToNodeEncryptionOptions, ok); err != nil { + return err + } + } + + if v.SnapshotOptions != nil { + ok := object.Key("SnapshotOptions") + if err := awsRestjson1_serializeDocumentSnapshotOptions(v.SnapshotOptions, ok); err != nil { + return err + } + } + + if v.VPCOptions != nil { + ok := object.Key("VPCOptions") + if err := awsRestjson1_serializeDocumentVPCOptions(v.VPCOptions, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUpdatePackage struct { +} + +func (*awsRestjson1_serializeOpUpdatePackage) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdatePackage) 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.(*UpdatePackageInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/packages/update") + 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_serializeOpDocumentUpdatePackageInput(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_serializeOpHttpBindingsUpdatePackageInput(v *UpdatePackageInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdatePackageInput(v *UpdatePackageInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CommitMessage != nil { + ok := object.Key("CommitMessage") + ok.String(*v.CommitMessage) + } + + if v.PackageDescription != nil { + ok := object.Key("PackageDescription") + ok.String(*v.PackageDescription) + } + + if v.PackageID != nil { + ok := object.Key("PackageID") + ok.String(*v.PackageID) + } + + if v.PackageSource != nil { + ok := object.Key("PackageSource") + if err := awsRestjson1_serializeDocumentPackageSource(v.PackageSource, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUpgradeDomain struct { +} + +func (*awsRestjson1_serializeOpUpgradeDomain) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpgradeDomain) 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.(*UpgradeDomainInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2021-01-01/opensearch/upgradeDomain") + 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_serializeOpDocumentUpgradeDomainInput(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_serializeOpHttpBindingsUpgradeDomainInput(v *UpgradeDomainInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpgradeDomainInput(v *UpgradeDomainInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AdvancedOptions != nil { + ok := object.Key("AdvancedOptions") + if err := awsRestjson1_serializeDocumentAdvancedOptions(v.AdvancedOptions, ok); err != nil { + return err + } + } + + if v.DomainName != nil { + ok := object.Key("DomainName") + ok.String(*v.DomainName) + } + + if v.PerformCheckOnly != nil { + ok := object.Key("PerformCheckOnly") + ok.Boolean(*v.PerformCheckOnly) + } + + if v.TargetVersion != nil { + ok := object.Key("TargetVersion") + ok.String(*v.TargetVersion) + } + + return nil +} + +func awsRestjson1_serializeDocumentAdvancedOptions(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + +func awsRestjson1_serializeDocumentAdvancedSecurityOptionsInput(v *types.AdvancedSecurityOptionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Enabled != nil { + ok := object.Key("Enabled") + ok.Boolean(*v.Enabled) + } + + if v.InternalUserDatabaseEnabled != nil { + ok := object.Key("InternalUserDatabaseEnabled") + ok.Boolean(*v.InternalUserDatabaseEnabled) + } + + if v.MasterUserOptions != nil { + ok := object.Key("MasterUserOptions") + if err := awsRestjson1_serializeDocumentMasterUserOptions(v.MasterUserOptions, ok); err != nil { + return err + } + } + + if v.SAMLOptions != nil { + ok := object.Key("SAMLOptions") + if err := awsRestjson1_serializeDocumentSAMLOptionsInput(v.SAMLOptions, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentAutoTuneMaintenanceSchedule(v *types.AutoTuneMaintenanceSchedule, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CronExpressionForRecurrence != nil { + ok := object.Key("CronExpressionForRecurrence") + ok.String(*v.CronExpressionForRecurrence) + } + + if v.Duration != nil { + ok := object.Key("Duration") + if err := awsRestjson1_serializeDocumentDuration(v.Duration, ok); err != nil { + return err + } + } + + if v.StartAt != nil { + ok := object.Key("StartAt") + ok.Double(smithytime.FormatEpochSeconds(*v.StartAt)) + } + + return nil +} + +func awsRestjson1_serializeDocumentAutoTuneMaintenanceScheduleList(v []types.AutoTuneMaintenanceSchedule, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentAutoTuneMaintenanceSchedule(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentAutoTuneOptions(v *types.AutoTuneOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.DesiredState) > 0 { + ok := object.Key("DesiredState") + ok.String(string(v.DesiredState)) + } + + if v.MaintenanceSchedules != nil { + ok := object.Key("MaintenanceSchedules") + if err := awsRestjson1_serializeDocumentAutoTuneMaintenanceScheduleList(v.MaintenanceSchedules, ok); err != nil { + return err + } + } + + if len(v.RollbackOnDisable) > 0 { + ok := object.Key("RollbackOnDisable") + ok.String(string(v.RollbackOnDisable)) + } + + return nil +} + +func awsRestjson1_serializeDocumentAutoTuneOptionsInput(v *types.AutoTuneOptionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.DesiredState) > 0 { + ok := object.Key("DesiredState") + ok.String(string(v.DesiredState)) + } + + if v.MaintenanceSchedules != nil { + ok := object.Key("MaintenanceSchedules") + if err := awsRestjson1_serializeDocumentAutoTuneMaintenanceScheduleList(v.MaintenanceSchedules, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentAWSDomainInformation(v *types.AWSDomainInformation, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DomainName != nil { + ok := object.Key("DomainName") + ok.String(*v.DomainName) + } + + if v.OwnerId != nil { + ok := object.Key("OwnerId") + ok.String(*v.OwnerId) + } + + if v.Region != nil { + ok := object.Key("Region") + ok.String(*v.Region) + } + + return nil +} + +func awsRestjson1_serializeDocumentClusterConfig(v *types.ClusterConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ColdStorageOptions != nil { + ok := object.Key("ColdStorageOptions") + if err := awsRestjson1_serializeDocumentColdStorageOptions(v.ColdStorageOptions, ok); err != nil { + return err + } + } + + if v.DedicatedMasterCount != nil { + ok := object.Key("DedicatedMasterCount") + ok.Integer(*v.DedicatedMasterCount) + } + + if v.DedicatedMasterEnabled != nil { + ok := object.Key("DedicatedMasterEnabled") + ok.Boolean(*v.DedicatedMasterEnabled) + } + + if len(v.DedicatedMasterType) > 0 { + ok := object.Key("DedicatedMasterType") + ok.String(string(v.DedicatedMasterType)) + } + + if v.InstanceCount != nil { + ok := object.Key("InstanceCount") + ok.Integer(*v.InstanceCount) + } + + if len(v.InstanceType) > 0 { + ok := object.Key("InstanceType") + ok.String(string(v.InstanceType)) + } + + if v.WarmCount != nil { + ok := object.Key("WarmCount") + ok.Integer(*v.WarmCount) + } + + if v.WarmEnabled != nil { + ok := object.Key("WarmEnabled") + ok.Boolean(*v.WarmEnabled) + } + + if len(v.WarmType) > 0 { + ok := object.Key("WarmType") + ok.String(string(v.WarmType)) + } + + if v.ZoneAwarenessConfig != nil { + ok := object.Key("ZoneAwarenessConfig") + if err := awsRestjson1_serializeDocumentZoneAwarenessConfig(v.ZoneAwarenessConfig, ok); err != nil { + return err + } + } + + if v.ZoneAwarenessEnabled != nil { + ok := object.Key("ZoneAwarenessEnabled") + ok.Boolean(*v.ZoneAwarenessEnabled) + } + + return nil +} + +func awsRestjson1_serializeDocumentCognitoOptions(v *types.CognitoOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Enabled != nil { + ok := object.Key("Enabled") + ok.Boolean(*v.Enabled) + } + + if v.IdentityPoolId != nil { + ok := object.Key("IdentityPoolId") + ok.String(*v.IdentityPoolId) + } + + if v.RoleArn != nil { + ok := object.Key("RoleArn") + ok.String(*v.RoleArn) + } + + if v.UserPoolId != nil { + ok := object.Key("UserPoolId") + ok.String(*v.UserPoolId) + } + + return nil +} + +func awsRestjson1_serializeDocumentColdStorageOptions(v *types.ColdStorageOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Enabled != nil { + ok := object.Key("Enabled") + ok.Boolean(*v.Enabled) + } + + return nil +} + +func awsRestjson1_serializeDocumentDescribePackagesFilter(v *types.DescribePackagesFilter, 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.Value != nil { + ok := object.Key("Value") + if err := awsRestjson1_serializeDocumentDescribePackagesFilterValues(v.Value, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentDescribePackagesFilterList(v []types.DescribePackagesFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentDescribePackagesFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentDescribePackagesFilterValues(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_serializeDocumentDomainEndpointOptions(v *types.DomainEndpointOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CustomEndpoint != nil { + ok := object.Key("CustomEndpoint") + ok.String(*v.CustomEndpoint) + } + + if v.CustomEndpointCertificateArn != nil { + ok := object.Key("CustomEndpointCertificateArn") + ok.String(*v.CustomEndpointCertificateArn) + } + + if v.CustomEndpointEnabled != nil { + ok := object.Key("CustomEndpointEnabled") + ok.Boolean(*v.CustomEndpointEnabled) + } + + if v.EnforceHTTPS != nil { + ok := object.Key("EnforceHTTPS") + ok.Boolean(*v.EnforceHTTPS) + } + + if len(v.TLSSecurityPolicy) > 0 { + ok := object.Key("TLSSecurityPolicy") + ok.String(string(v.TLSSecurityPolicy)) + } + + return nil +} + +func awsRestjson1_serializeDocumentDomainInformationContainer(v *types.DomainInformationContainer, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AWSDomainInformation != nil { + ok := object.Key("AWSDomainInformation") + if err := awsRestjson1_serializeDocumentAWSDomainInformation(v.AWSDomainInformation, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentDomainNameList(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_serializeDocumentDuration(v *types.Duration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Unit) > 0 { + ok := object.Key("Unit") + ok.String(string(v.Unit)) + } + + if v.Value != 0 { + ok := object.Key("Value") + ok.Long(v.Value) + } + + return nil +} + +func awsRestjson1_serializeDocumentEBSOptions(v *types.EBSOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EBSEnabled != nil { + ok := object.Key("EBSEnabled") + ok.Boolean(*v.EBSEnabled) + } + + if v.Iops != nil { + ok := object.Key("Iops") + ok.Integer(*v.Iops) + } + + if v.VolumeSize != nil { + ok := object.Key("VolumeSize") + ok.Integer(*v.VolumeSize) + } + + if len(v.VolumeType) > 0 { + ok := object.Key("VolumeType") + ok.String(string(v.VolumeType)) + } + + return nil +} + +func awsRestjson1_serializeDocumentEncryptionAtRestOptions(v *types.EncryptionAtRestOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Enabled != nil { + ok := object.Key("Enabled") + ok.Boolean(*v.Enabled) + } + + if v.KmsKeyId != nil { + ok := object.Key("KmsKeyId") + ok.String(*v.KmsKeyId) + } + + return nil +} + +func awsRestjson1_serializeDocumentFilter(v *types.Filter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.Values != nil { + ok := object.Key("Values") + if err := awsRestjson1_serializeDocumentValueStringList(v.Values, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentFilterList(v []types.Filter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentLogPublishingOption(v *types.LogPublishingOption, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CloudWatchLogsLogGroupArn != nil { + ok := object.Key("CloudWatchLogsLogGroupArn") + ok.String(*v.CloudWatchLogsLogGroupArn) + } + + if v.Enabled != nil { + ok := object.Key("Enabled") + ok.Boolean(*v.Enabled) + } + + return nil +} + +func awsRestjson1_serializeDocumentLogPublishingOptions(v map[string]types.LogPublishingOption, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + mapVar := v[key] + if err := awsRestjson1_serializeDocumentLogPublishingOption(&mapVar, om); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentMasterUserOptions(v *types.MasterUserOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MasterUserARN != nil { + ok := object.Key("MasterUserARN") + ok.String(*v.MasterUserARN) + } + + if v.MasterUserName != nil { + ok := object.Key("MasterUserName") + ok.String(*v.MasterUserName) + } + + if v.MasterUserPassword != nil { + ok := object.Key("MasterUserPassword") + ok.String(*v.MasterUserPassword) + } + + return nil +} + +func awsRestjson1_serializeDocumentNodeToNodeEncryptionOptions(v *types.NodeToNodeEncryptionOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Enabled != nil { + ok := object.Key("Enabled") + ok.Boolean(*v.Enabled) + } + + return nil +} + +func awsRestjson1_serializeDocumentPackageSource(v *types.PackageSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.S3BucketName != nil { + ok := object.Key("S3BucketName") + ok.String(*v.S3BucketName) + } + + if v.S3Key != nil { + ok := object.Key("S3Key") + ok.String(*v.S3Key) + } + + return nil +} + +func awsRestjson1_serializeDocumentSAMLIdp(v *types.SAMLIdp, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EntityId != nil { + ok := object.Key("EntityId") + ok.String(*v.EntityId) + } + + if v.MetadataContent != nil { + ok := object.Key("MetadataContent") + ok.String(*v.MetadataContent) + } + + return nil +} + +func awsRestjson1_serializeDocumentSAMLOptionsInput(v *types.SAMLOptionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Enabled != nil { + ok := object.Key("Enabled") + ok.Boolean(*v.Enabled) + } + + if v.Idp != nil { + ok := object.Key("Idp") + if err := awsRestjson1_serializeDocumentSAMLIdp(v.Idp, ok); err != nil { + return err + } + } + + if v.MasterBackendRole != nil { + ok := object.Key("MasterBackendRole") + ok.String(*v.MasterBackendRole) + } + + if v.MasterUserName != nil { + ok := object.Key("MasterUserName") + ok.String(*v.MasterUserName) + } + + if v.RolesKey != nil { + ok := object.Key("RolesKey") + ok.String(*v.RolesKey) + } + + if v.SessionTimeoutMinutes != nil { + ok := object.Key("SessionTimeoutMinutes") + ok.Integer(*v.SessionTimeoutMinutes) + } + + if v.SubjectKey != nil { + ok := object.Key("SubjectKey") + ok.String(*v.SubjectKey) + } + + return nil +} + +func awsRestjson1_serializeDocumentSnapshotOptions(v *types.SnapshotOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AutomatedSnapshotStartHour != nil { + ok := object.Key("AutomatedSnapshotStartHour") + ok.Integer(*v.AutomatedSnapshotStartHour) + } + + return nil +} + +func awsRestjson1_serializeDocumentStringList(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_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("Key") + ok.String(*v.Key) + } + + if v.Value != nil { + ok := object.Key("Value") + ok.String(*v.Value) + } + + return nil +} + +func awsRestjson1_serializeDocumentTagList(v []types.Tag, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentTag(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentValueStringList(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_serializeDocumentVPCOptions(v *types.VPCOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SecurityGroupIds != nil { + ok := object.Key("SecurityGroupIds") + if err := awsRestjson1_serializeDocumentStringList(v.SecurityGroupIds, ok); err != nil { + return err + } + } + + if v.SubnetIds != nil { + ok := object.Key("SubnetIds") + if err := awsRestjson1_serializeDocumentStringList(v.SubnetIds, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentZoneAwarenessConfig(v *types.ZoneAwarenessConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AvailabilityZoneCount != nil { + ok := object.Key("AvailabilityZoneCount") + ok.Integer(*v.AvailabilityZoneCount) + } + + return nil +} diff --git a/service/opensearch/types/enums.go b/service/opensearch/types/enums.go new file mode 100644 index 00000000000..58bc4b956dd --- /dev/null +++ b/service/opensearch/types/enums.go @@ -0,0 +1,689 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type AutoTuneDesiredState string + +// Enum values for AutoTuneDesiredState +const ( + AutoTuneDesiredStateEnabled AutoTuneDesiredState = "ENABLED" + AutoTuneDesiredStateDisabled AutoTuneDesiredState = "DISABLED" +) + +// Values returns all known values for AutoTuneDesiredState. 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 (AutoTuneDesiredState) Values() []AutoTuneDesiredState { + return []AutoTuneDesiredState{ + "ENABLED", + "DISABLED", + } +} + +type AutoTuneState string + +// Enum values for AutoTuneState +const ( + AutoTuneStateEnabled AutoTuneState = "ENABLED" + AutoTuneStateDisabled AutoTuneState = "DISABLED" + AutoTuneStateEnableInProgress AutoTuneState = "ENABLE_IN_PROGRESS" + AutoTuneStateDisableInProgress AutoTuneState = "DISABLE_IN_PROGRESS" + AutoTuneStateDisabledAndRollbackScheduled AutoTuneState = "DISABLED_AND_ROLLBACK_SCHEDULED" + AutoTuneStateDisabledAndRollbackInProgress AutoTuneState = "DISABLED_AND_ROLLBACK_IN_PROGRESS" + AutoTuneStateDisabledAndRollbackComplete AutoTuneState = "DISABLED_AND_ROLLBACK_COMPLETE" + AutoTuneStateDisabledAndRollbackError AutoTuneState = "DISABLED_AND_ROLLBACK_ERROR" + AutoTuneStateError AutoTuneState = "ERROR" +) + +// Values returns all known values for AutoTuneState. 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 (AutoTuneState) Values() []AutoTuneState { + return []AutoTuneState{ + "ENABLED", + "DISABLED", + "ENABLE_IN_PROGRESS", + "DISABLE_IN_PROGRESS", + "DISABLED_AND_ROLLBACK_SCHEDULED", + "DISABLED_AND_ROLLBACK_IN_PROGRESS", + "DISABLED_AND_ROLLBACK_COMPLETE", + "DISABLED_AND_ROLLBACK_ERROR", + "ERROR", + } +} + +type AutoTuneType string + +// Enum values for AutoTuneType +const ( + AutoTuneTypeScheduledAction AutoTuneType = "SCHEDULED_ACTION" +) + +// Values returns all known values for AutoTuneType. 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 (AutoTuneType) Values() []AutoTuneType { + return []AutoTuneType{ + "SCHEDULED_ACTION", + } +} + +type DeploymentStatus string + +// Enum values for DeploymentStatus +const ( + DeploymentStatusPendingUpdate DeploymentStatus = "PENDING_UPDATE" + DeploymentStatusInProgress DeploymentStatus = "IN_PROGRESS" + DeploymentStatusCompleted DeploymentStatus = "COMPLETED" + DeploymentStatusNotEligible DeploymentStatus = "NOT_ELIGIBLE" + DeploymentStatusEligible DeploymentStatus = "ELIGIBLE" +) + +// Values returns all known values for DeploymentStatus. 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 (DeploymentStatus) Values() []DeploymentStatus { + return []DeploymentStatus{ + "PENDING_UPDATE", + "IN_PROGRESS", + "COMPLETED", + "NOT_ELIGIBLE", + "ELIGIBLE", + } +} + +type DescribePackagesFilterName string + +// Enum values for DescribePackagesFilterName +const ( + DescribePackagesFilterNamePackageID DescribePackagesFilterName = "PackageID" + DescribePackagesFilterNamePackageName DescribePackagesFilterName = "PackageName" + DescribePackagesFilterNamePackageStatus DescribePackagesFilterName = "PackageStatus" +) + +// Values returns all known values for DescribePackagesFilterName. 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 (DescribePackagesFilterName) Values() []DescribePackagesFilterName { + return []DescribePackagesFilterName{ + "PackageID", + "PackageName", + "PackageStatus", + } +} + +type DomainPackageStatus string + +// Enum values for DomainPackageStatus +const ( + DomainPackageStatusAssociating DomainPackageStatus = "ASSOCIATING" + DomainPackageStatusAssociationFailed DomainPackageStatus = "ASSOCIATION_FAILED" + DomainPackageStatusActive DomainPackageStatus = "ACTIVE" + DomainPackageStatusDissociating DomainPackageStatus = "DISSOCIATING" + DomainPackageStatusDissociationFailed DomainPackageStatus = "DISSOCIATION_FAILED" +) + +// Values returns all known values for DomainPackageStatus. 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 (DomainPackageStatus) Values() []DomainPackageStatus { + return []DomainPackageStatus{ + "ASSOCIATING", + "ASSOCIATION_FAILED", + "ACTIVE", + "DISSOCIATING", + "DISSOCIATION_FAILED", + } +} + +type InboundConnectionStatusCode string + +// Enum values for InboundConnectionStatusCode +const ( + InboundConnectionStatusCodePendingAcceptance InboundConnectionStatusCode = "PENDING_ACCEPTANCE" + InboundConnectionStatusCodeApproved InboundConnectionStatusCode = "APPROVED" + InboundConnectionStatusCodeProvisioning InboundConnectionStatusCode = "PROVISIONING" + InboundConnectionStatusCodeActive InboundConnectionStatusCode = "ACTIVE" + InboundConnectionStatusCodeRejecting InboundConnectionStatusCode = "REJECTING" + InboundConnectionStatusCodeRejected InboundConnectionStatusCode = "REJECTED" + InboundConnectionStatusCodeDeleting InboundConnectionStatusCode = "DELETING" + InboundConnectionStatusCodeDeleted InboundConnectionStatusCode = "DELETED" +) + +// Values returns all known values for InboundConnectionStatusCode. 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 (InboundConnectionStatusCode) Values() []InboundConnectionStatusCode { + return []InboundConnectionStatusCode{ + "PENDING_ACCEPTANCE", + "APPROVED", + "PROVISIONING", + "ACTIVE", + "REJECTING", + "REJECTED", + "DELETING", + "DELETED", + } +} + +type LogType string + +// Enum values for LogType +const ( + LogTypeIndexSlowLogs LogType = "INDEX_SLOW_LOGS" + LogTypeSearchSlowLogs LogType = "SEARCH_SLOW_LOGS" + LogTypeEsApplicationLogs LogType = "ES_APPLICATION_LOGS" + LogTypeAuditLogs LogType = "AUDIT_LOGS" +) + +// Values returns all known values for LogType. 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 (LogType) Values() []LogType { + return []LogType{ + "INDEX_SLOW_LOGS", + "SEARCH_SLOW_LOGS", + "ES_APPLICATION_LOGS", + "AUDIT_LOGS", + } +} + +type OpenSearchPartitionInstanceType string + +// Enum values for OpenSearchPartitionInstanceType +const ( + OpenSearchPartitionInstanceTypeM3MediumSearch OpenSearchPartitionInstanceType = "m3.medium.search" + OpenSearchPartitionInstanceTypeM3LargeSearch OpenSearchPartitionInstanceType = "m3.large.search" + OpenSearchPartitionInstanceTypeM3XlargeSearch OpenSearchPartitionInstanceType = "m3.xlarge.search" + OpenSearchPartitionInstanceTypeM32xlargeSearch OpenSearchPartitionInstanceType = "m3.2xlarge.search" + OpenSearchPartitionInstanceTypeM4LargeSearch OpenSearchPartitionInstanceType = "m4.large.search" + OpenSearchPartitionInstanceTypeM4XlargeSearch OpenSearchPartitionInstanceType = "m4.xlarge.search" + OpenSearchPartitionInstanceTypeM42xlargeSearch OpenSearchPartitionInstanceType = "m4.2xlarge.search" + OpenSearchPartitionInstanceTypeM44xlargeSearch OpenSearchPartitionInstanceType = "m4.4xlarge.search" + OpenSearchPartitionInstanceTypeM410xlargeSearch OpenSearchPartitionInstanceType = "m4.10xlarge.search" + OpenSearchPartitionInstanceTypeM5LargeSearch OpenSearchPartitionInstanceType = "m5.large.search" + OpenSearchPartitionInstanceTypeM5XlargeSearch OpenSearchPartitionInstanceType = "m5.xlarge.search" + OpenSearchPartitionInstanceTypeM52xlargeSearch OpenSearchPartitionInstanceType = "m5.2xlarge.search" + OpenSearchPartitionInstanceTypeM54xlargeSearch OpenSearchPartitionInstanceType = "m5.4xlarge.search" + OpenSearchPartitionInstanceTypeM512xlargeSearch OpenSearchPartitionInstanceType = "m5.12xlarge.search" + OpenSearchPartitionInstanceTypeM524xlargeSearch OpenSearchPartitionInstanceType = "m5.24xlarge.search" + OpenSearchPartitionInstanceTypeR5LargeSearch OpenSearchPartitionInstanceType = "r5.large.search" + OpenSearchPartitionInstanceTypeR5XlargeSearch OpenSearchPartitionInstanceType = "r5.xlarge.search" + OpenSearchPartitionInstanceTypeR52xlargeSearch OpenSearchPartitionInstanceType = "r5.2xlarge.search" + OpenSearchPartitionInstanceTypeR54xlargeSearch OpenSearchPartitionInstanceType = "r5.4xlarge.search" + OpenSearchPartitionInstanceTypeR512xlargeSearch OpenSearchPartitionInstanceType = "r5.12xlarge.search" + OpenSearchPartitionInstanceTypeR524xlargeSearch OpenSearchPartitionInstanceType = "r5.24xlarge.search" + OpenSearchPartitionInstanceTypeC5LargeSearch OpenSearchPartitionInstanceType = "c5.large.search" + OpenSearchPartitionInstanceTypeC5XlargeSearch OpenSearchPartitionInstanceType = "c5.xlarge.search" + OpenSearchPartitionInstanceTypeC52xlargeSearch OpenSearchPartitionInstanceType = "c5.2xlarge.search" + OpenSearchPartitionInstanceTypeC54xlargeSearch OpenSearchPartitionInstanceType = "c5.4xlarge.search" + OpenSearchPartitionInstanceTypeC59xlargeSearch OpenSearchPartitionInstanceType = "c5.9xlarge.search" + OpenSearchPartitionInstanceTypeC518xlargeSearch OpenSearchPartitionInstanceType = "c5.18xlarge.search" + OpenSearchPartitionInstanceTypeT3NanoSearch OpenSearchPartitionInstanceType = "t3.nano.search" + OpenSearchPartitionInstanceTypeT3MicroSearch OpenSearchPartitionInstanceType = "t3.micro.search" + OpenSearchPartitionInstanceTypeT3SmallSearch OpenSearchPartitionInstanceType = "t3.small.search" + OpenSearchPartitionInstanceTypeT3MediumSearch OpenSearchPartitionInstanceType = "t3.medium.search" + OpenSearchPartitionInstanceTypeT3LargeSearch OpenSearchPartitionInstanceType = "t3.large.search" + OpenSearchPartitionInstanceTypeT3XlargeSearch OpenSearchPartitionInstanceType = "t3.xlarge.search" + OpenSearchPartitionInstanceTypeT32xlargeSearch OpenSearchPartitionInstanceType = "t3.2xlarge.search" + OpenSearchPartitionInstanceTypeUltrawarm1MediumSearch OpenSearchPartitionInstanceType = "ultrawarm1.medium.search" + OpenSearchPartitionInstanceTypeUltrawarm1LargeSearch OpenSearchPartitionInstanceType = "ultrawarm1.large.search" + OpenSearchPartitionInstanceTypeUltrawarm1XlargeSearch OpenSearchPartitionInstanceType = "ultrawarm1.xlarge.search" + OpenSearchPartitionInstanceTypeT2MicroSearch OpenSearchPartitionInstanceType = "t2.micro.search" + OpenSearchPartitionInstanceTypeT2SmallSearch OpenSearchPartitionInstanceType = "t2.small.search" + OpenSearchPartitionInstanceTypeT2MediumSearch OpenSearchPartitionInstanceType = "t2.medium.search" + OpenSearchPartitionInstanceTypeR3LargeSearch OpenSearchPartitionInstanceType = "r3.large.search" + OpenSearchPartitionInstanceTypeR3XlargeSearch OpenSearchPartitionInstanceType = "r3.xlarge.search" + OpenSearchPartitionInstanceTypeR32xlargeSearch OpenSearchPartitionInstanceType = "r3.2xlarge.search" + OpenSearchPartitionInstanceTypeR34xlargeSearch OpenSearchPartitionInstanceType = "r3.4xlarge.search" + OpenSearchPartitionInstanceTypeR38xlargeSearch OpenSearchPartitionInstanceType = "r3.8xlarge.search" + OpenSearchPartitionInstanceTypeI2XlargeSearch OpenSearchPartitionInstanceType = "i2.xlarge.search" + OpenSearchPartitionInstanceTypeI22xlargeSearch OpenSearchPartitionInstanceType = "i2.2xlarge.search" + OpenSearchPartitionInstanceTypeD2XlargeSearch OpenSearchPartitionInstanceType = "d2.xlarge.search" + OpenSearchPartitionInstanceTypeD22xlargeSearch OpenSearchPartitionInstanceType = "d2.2xlarge.search" + OpenSearchPartitionInstanceTypeD24xlargeSearch OpenSearchPartitionInstanceType = "d2.4xlarge.search" + OpenSearchPartitionInstanceTypeD28xlargeSearch OpenSearchPartitionInstanceType = "d2.8xlarge.search" + OpenSearchPartitionInstanceTypeC4LargeSearch OpenSearchPartitionInstanceType = "c4.large.search" + OpenSearchPartitionInstanceTypeC4XlargeSearch OpenSearchPartitionInstanceType = "c4.xlarge.search" + OpenSearchPartitionInstanceTypeC42xlargeSearch OpenSearchPartitionInstanceType = "c4.2xlarge.search" + OpenSearchPartitionInstanceTypeC44xlargeSearch OpenSearchPartitionInstanceType = "c4.4xlarge.search" + OpenSearchPartitionInstanceTypeC48xlargeSearch OpenSearchPartitionInstanceType = "c4.8xlarge.search" + OpenSearchPartitionInstanceTypeR4LargeSearch OpenSearchPartitionInstanceType = "r4.large.search" + OpenSearchPartitionInstanceTypeR4XlargeSearch OpenSearchPartitionInstanceType = "r4.xlarge.search" + OpenSearchPartitionInstanceTypeR42xlargeSearch OpenSearchPartitionInstanceType = "r4.2xlarge.search" + OpenSearchPartitionInstanceTypeR44xlargeSearch OpenSearchPartitionInstanceType = "r4.4xlarge.search" + OpenSearchPartitionInstanceTypeR48xlargeSearch OpenSearchPartitionInstanceType = "r4.8xlarge.search" + OpenSearchPartitionInstanceTypeR416xlargeSearch OpenSearchPartitionInstanceType = "r4.16xlarge.search" + OpenSearchPartitionInstanceTypeI3LargeSearch OpenSearchPartitionInstanceType = "i3.large.search" + OpenSearchPartitionInstanceTypeI3XlargeSearch OpenSearchPartitionInstanceType = "i3.xlarge.search" + OpenSearchPartitionInstanceTypeI32xlargeSearch OpenSearchPartitionInstanceType = "i3.2xlarge.search" + OpenSearchPartitionInstanceTypeI34xlargeSearch OpenSearchPartitionInstanceType = "i3.4xlarge.search" + OpenSearchPartitionInstanceTypeI38xlargeSearch OpenSearchPartitionInstanceType = "i3.8xlarge.search" + OpenSearchPartitionInstanceTypeI316xlargeSearch OpenSearchPartitionInstanceType = "i3.16xlarge.search" + OpenSearchPartitionInstanceTypeR6gLargeSearch OpenSearchPartitionInstanceType = "r6g.large.search" + OpenSearchPartitionInstanceTypeR6gXlargeSearch OpenSearchPartitionInstanceType = "r6g.xlarge.search" + OpenSearchPartitionInstanceTypeR6g2xlargeSearch OpenSearchPartitionInstanceType = "r6g.2xlarge.search" + OpenSearchPartitionInstanceTypeR6g4xlargeSearch OpenSearchPartitionInstanceType = "r6g.4xlarge.search" + OpenSearchPartitionInstanceTypeR6g8xlargeSearch OpenSearchPartitionInstanceType = "r6g.8xlarge.search" + OpenSearchPartitionInstanceTypeR6g12xlargeSearch OpenSearchPartitionInstanceType = "r6g.12xlarge.search" + OpenSearchPartitionInstanceTypeM6gLargeSearch OpenSearchPartitionInstanceType = "m6g.large.search" + OpenSearchPartitionInstanceTypeM6gXlargeSearch OpenSearchPartitionInstanceType = "m6g.xlarge.search" + OpenSearchPartitionInstanceTypeM6g2xlargeSearch OpenSearchPartitionInstanceType = "m6g.2xlarge.search" + OpenSearchPartitionInstanceTypeM6g4xlargeSearch OpenSearchPartitionInstanceType = "m6g.4xlarge.search" + OpenSearchPartitionInstanceTypeM6g8xlargeSearch OpenSearchPartitionInstanceType = "m6g.8xlarge.search" + OpenSearchPartitionInstanceTypeM6g12xlargeSearch OpenSearchPartitionInstanceType = "m6g.12xlarge.search" + OpenSearchPartitionInstanceTypeC6gLargeSearch OpenSearchPartitionInstanceType = "c6g.large.search" + OpenSearchPartitionInstanceTypeC6gXlargeSearch OpenSearchPartitionInstanceType = "c6g.xlarge.search" + OpenSearchPartitionInstanceTypeC6g2xlargeSearch OpenSearchPartitionInstanceType = "c6g.2xlarge.search" + OpenSearchPartitionInstanceTypeC6g4xlargeSearch OpenSearchPartitionInstanceType = "c6g.4xlarge.search" + OpenSearchPartitionInstanceTypeC6g8xlargeSearch OpenSearchPartitionInstanceType = "c6g.8xlarge.search" + OpenSearchPartitionInstanceTypeC6g12xlargeSearch OpenSearchPartitionInstanceType = "c6g.12xlarge.search" + OpenSearchPartitionInstanceTypeR6gdLargeSearch OpenSearchPartitionInstanceType = "r6gd.large.search" + OpenSearchPartitionInstanceTypeR6gdXlargeSearch OpenSearchPartitionInstanceType = "r6gd.xlarge.search" + OpenSearchPartitionInstanceTypeR6gd2xlargeSearch OpenSearchPartitionInstanceType = "r6gd.2xlarge.search" + OpenSearchPartitionInstanceTypeR6gd4xlargeSearch OpenSearchPartitionInstanceType = "r6gd.4xlarge.search" + OpenSearchPartitionInstanceTypeR6gd8xlargeSearch OpenSearchPartitionInstanceType = "r6gd.8xlarge.search" + OpenSearchPartitionInstanceTypeR6gd12xlargeSearch OpenSearchPartitionInstanceType = "r6gd.12xlarge.search" + OpenSearchPartitionInstanceTypeR6gd16xlargeSearch OpenSearchPartitionInstanceType = "r6gd.16xlarge.search" + OpenSearchPartitionInstanceTypeT4gSmallSearch OpenSearchPartitionInstanceType = "t4g.small.search" + OpenSearchPartitionInstanceTypeT4gMediumSearch OpenSearchPartitionInstanceType = "t4g.medium.search" +) + +// Values returns all known values for OpenSearchPartitionInstanceType. 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 (OpenSearchPartitionInstanceType) Values() []OpenSearchPartitionInstanceType { + return []OpenSearchPartitionInstanceType{ + "m3.medium.search", + "m3.large.search", + "m3.xlarge.search", + "m3.2xlarge.search", + "m4.large.search", + "m4.xlarge.search", + "m4.2xlarge.search", + "m4.4xlarge.search", + "m4.10xlarge.search", + "m5.large.search", + "m5.xlarge.search", + "m5.2xlarge.search", + "m5.4xlarge.search", + "m5.12xlarge.search", + "m5.24xlarge.search", + "r5.large.search", + "r5.xlarge.search", + "r5.2xlarge.search", + "r5.4xlarge.search", + "r5.12xlarge.search", + "r5.24xlarge.search", + "c5.large.search", + "c5.xlarge.search", + "c5.2xlarge.search", + "c5.4xlarge.search", + "c5.9xlarge.search", + "c5.18xlarge.search", + "t3.nano.search", + "t3.micro.search", + "t3.small.search", + "t3.medium.search", + "t3.large.search", + "t3.xlarge.search", + "t3.2xlarge.search", + "ultrawarm1.medium.search", + "ultrawarm1.large.search", + "ultrawarm1.xlarge.search", + "t2.micro.search", + "t2.small.search", + "t2.medium.search", + "r3.large.search", + "r3.xlarge.search", + "r3.2xlarge.search", + "r3.4xlarge.search", + "r3.8xlarge.search", + "i2.xlarge.search", + "i2.2xlarge.search", + "d2.xlarge.search", + "d2.2xlarge.search", + "d2.4xlarge.search", + "d2.8xlarge.search", + "c4.large.search", + "c4.xlarge.search", + "c4.2xlarge.search", + "c4.4xlarge.search", + "c4.8xlarge.search", + "r4.large.search", + "r4.xlarge.search", + "r4.2xlarge.search", + "r4.4xlarge.search", + "r4.8xlarge.search", + "r4.16xlarge.search", + "i3.large.search", + "i3.xlarge.search", + "i3.2xlarge.search", + "i3.4xlarge.search", + "i3.8xlarge.search", + "i3.16xlarge.search", + "r6g.large.search", + "r6g.xlarge.search", + "r6g.2xlarge.search", + "r6g.4xlarge.search", + "r6g.8xlarge.search", + "r6g.12xlarge.search", + "m6g.large.search", + "m6g.xlarge.search", + "m6g.2xlarge.search", + "m6g.4xlarge.search", + "m6g.8xlarge.search", + "m6g.12xlarge.search", + "c6g.large.search", + "c6g.xlarge.search", + "c6g.2xlarge.search", + "c6g.4xlarge.search", + "c6g.8xlarge.search", + "c6g.12xlarge.search", + "r6gd.large.search", + "r6gd.xlarge.search", + "r6gd.2xlarge.search", + "r6gd.4xlarge.search", + "r6gd.8xlarge.search", + "r6gd.12xlarge.search", + "r6gd.16xlarge.search", + "t4g.small.search", + "t4g.medium.search", + } +} + +type OpenSearchWarmPartitionInstanceType string + +// Enum values for OpenSearchWarmPartitionInstanceType +const ( + OpenSearchWarmPartitionInstanceTypeUltrawarm1MediumSearch OpenSearchWarmPartitionInstanceType = "ultrawarm1.medium.search" + OpenSearchWarmPartitionInstanceTypeUltrawarm1LargeSearch OpenSearchWarmPartitionInstanceType = "ultrawarm1.large.search" + OpenSearchWarmPartitionInstanceTypeUltrawarm1XlargeSearch OpenSearchWarmPartitionInstanceType = "ultrawarm1.xlarge.search" +) + +// Values returns all known values for OpenSearchWarmPartitionInstanceType. 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 (OpenSearchWarmPartitionInstanceType) Values() []OpenSearchWarmPartitionInstanceType { + return []OpenSearchWarmPartitionInstanceType{ + "ultrawarm1.medium.search", + "ultrawarm1.large.search", + "ultrawarm1.xlarge.search", + } +} + +type OptionState string + +// Enum values for OptionState +const ( + OptionStateRequiresIndexDocuments OptionState = "RequiresIndexDocuments" + OptionStateProcessing OptionState = "Processing" + OptionStateActive OptionState = "Active" +) + +// Values returns all known values for OptionState. 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 (OptionState) Values() []OptionState { + return []OptionState{ + "RequiresIndexDocuments", + "Processing", + "Active", + } +} + +type OutboundConnectionStatusCode string + +// Enum values for OutboundConnectionStatusCode +const ( + OutboundConnectionStatusCodeValidating OutboundConnectionStatusCode = "VALIDATING" + OutboundConnectionStatusCodeValidationFailed OutboundConnectionStatusCode = "VALIDATION_FAILED" + OutboundConnectionStatusCodePendingAcceptance OutboundConnectionStatusCode = "PENDING_ACCEPTANCE" + OutboundConnectionStatusCodeApproved OutboundConnectionStatusCode = "APPROVED" + OutboundConnectionStatusCodeProvisioning OutboundConnectionStatusCode = "PROVISIONING" + OutboundConnectionStatusCodeActive OutboundConnectionStatusCode = "ACTIVE" + OutboundConnectionStatusCodeRejecting OutboundConnectionStatusCode = "REJECTING" + OutboundConnectionStatusCodeRejected OutboundConnectionStatusCode = "REJECTED" + OutboundConnectionStatusCodeDeleting OutboundConnectionStatusCode = "DELETING" + OutboundConnectionStatusCodeDeleted OutboundConnectionStatusCode = "DELETED" +) + +// Values returns all known values for OutboundConnectionStatusCode. 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 (OutboundConnectionStatusCode) Values() []OutboundConnectionStatusCode { + return []OutboundConnectionStatusCode{ + "VALIDATING", + "VALIDATION_FAILED", + "PENDING_ACCEPTANCE", + "APPROVED", + "PROVISIONING", + "ACTIVE", + "REJECTING", + "REJECTED", + "DELETING", + "DELETED", + } +} + +type PackageStatus string + +// Enum values for PackageStatus +const ( + PackageStatusCopying PackageStatus = "COPYING" + PackageStatusCopyFailed PackageStatus = "COPY_FAILED" + PackageStatusValidating PackageStatus = "VALIDATING" + PackageStatusValidationFailed PackageStatus = "VALIDATION_FAILED" + PackageStatusAvailable PackageStatus = "AVAILABLE" + PackageStatusDeleting PackageStatus = "DELETING" + PackageStatusDeleted PackageStatus = "DELETED" + PackageStatusDeleteFailed PackageStatus = "DELETE_FAILED" +) + +// Values returns all known values for PackageStatus. 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 (PackageStatus) Values() []PackageStatus { + return []PackageStatus{ + "COPYING", + "COPY_FAILED", + "VALIDATING", + "VALIDATION_FAILED", + "AVAILABLE", + "DELETING", + "DELETED", + "DELETE_FAILED", + } +} + +type PackageType string + +// Enum values for PackageType +const ( + PackageTypeTxtDictionary PackageType = "TXT-DICTIONARY" +) + +// Values returns all known values for PackageType. 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 (PackageType) Values() []PackageType { + return []PackageType{ + "TXT-DICTIONARY", + } +} + +type ReservedInstancePaymentOption string + +// Enum values for ReservedInstancePaymentOption +const ( + ReservedInstancePaymentOptionAllUpfront ReservedInstancePaymentOption = "ALL_UPFRONT" + ReservedInstancePaymentOptionPartialUpfront ReservedInstancePaymentOption = "PARTIAL_UPFRONT" + ReservedInstancePaymentOptionNoUpfront ReservedInstancePaymentOption = "NO_UPFRONT" +) + +// Values returns all known values for ReservedInstancePaymentOption. 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 (ReservedInstancePaymentOption) Values() []ReservedInstancePaymentOption { + return []ReservedInstancePaymentOption{ + "ALL_UPFRONT", + "PARTIAL_UPFRONT", + "NO_UPFRONT", + } +} + +type RollbackOnDisable string + +// Enum values for RollbackOnDisable +const ( + RollbackOnDisableNoRollback RollbackOnDisable = "NO_ROLLBACK" + RollbackOnDisableDefaultRollback RollbackOnDisable = "DEFAULT_ROLLBACK" +) + +// Values returns all known values for RollbackOnDisable. 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 (RollbackOnDisable) Values() []RollbackOnDisable { + return []RollbackOnDisable{ + "NO_ROLLBACK", + "DEFAULT_ROLLBACK", + } +} + +type ScheduledAutoTuneActionType string + +// Enum values for ScheduledAutoTuneActionType +const ( + ScheduledAutoTuneActionTypeJvmHeapSizeTuning ScheduledAutoTuneActionType = "JVM_HEAP_SIZE_TUNING" + ScheduledAutoTuneActionTypeJvmYoungGenTuning ScheduledAutoTuneActionType = "JVM_YOUNG_GEN_TUNING" +) + +// Values returns all known values for ScheduledAutoTuneActionType. 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 (ScheduledAutoTuneActionType) Values() []ScheduledAutoTuneActionType { + return []ScheduledAutoTuneActionType{ + "JVM_HEAP_SIZE_TUNING", + "JVM_YOUNG_GEN_TUNING", + } +} + +type ScheduledAutoTuneSeverityType string + +// Enum values for ScheduledAutoTuneSeverityType +const ( + ScheduledAutoTuneSeverityTypeLow ScheduledAutoTuneSeverityType = "LOW" + ScheduledAutoTuneSeverityTypeMedium ScheduledAutoTuneSeverityType = "MEDIUM" + ScheduledAutoTuneSeverityTypeHigh ScheduledAutoTuneSeverityType = "HIGH" +) + +// Values returns all known values for ScheduledAutoTuneSeverityType. 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 (ScheduledAutoTuneSeverityType) Values() []ScheduledAutoTuneSeverityType { + return []ScheduledAutoTuneSeverityType{ + "LOW", + "MEDIUM", + "HIGH", + } +} + +type TimeUnit string + +// Enum values for TimeUnit +const ( + TimeUnitHours TimeUnit = "HOURS" +) + +// Values returns all known values for TimeUnit. 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 (TimeUnit) Values() []TimeUnit { + return []TimeUnit{ + "HOURS", + } +} + +type TLSSecurityPolicy string + +// Enum values for TLSSecurityPolicy +const ( + TLSSecurityPolicyPolicyMinTls10201907 TLSSecurityPolicy = "Policy-Min-TLS-1-0-2019-07" + TLSSecurityPolicyPolicyMinTls12201907 TLSSecurityPolicy = "Policy-Min-TLS-1-2-2019-07" +) + +// Values returns all known values for TLSSecurityPolicy. 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 (TLSSecurityPolicy) Values() []TLSSecurityPolicy { + return []TLSSecurityPolicy{ + "Policy-Min-TLS-1-0-2019-07", + "Policy-Min-TLS-1-2-2019-07", + } +} + +type UpgradeStatus string + +// Enum values for UpgradeStatus +const ( + UpgradeStatusInProgress UpgradeStatus = "IN_PROGRESS" + UpgradeStatusSucceeded UpgradeStatus = "SUCCEEDED" + UpgradeStatusSucceededWithIssues UpgradeStatus = "SUCCEEDED_WITH_ISSUES" + UpgradeStatusFailed UpgradeStatus = "FAILED" +) + +// Values returns all known values for UpgradeStatus. 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 (UpgradeStatus) Values() []UpgradeStatus { + return []UpgradeStatus{ + "IN_PROGRESS", + "SUCCEEDED", + "SUCCEEDED_WITH_ISSUES", + "FAILED", + } +} + +type UpgradeStep string + +// Enum values for UpgradeStep +const ( + UpgradeStepPreUpgradeCheck UpgradeStep = "PRE_UPGRADE_CHECK" + UpgradeStepSnapshot UpgradeStep = "SNAPSHOT" + UpgradeStepUpgrade UpgradeStep = "UPGRADE" +) + +// Values returns all known values for UpgradeStep. 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 (UpgradeStep) Values() []UpgradeStep { + return []UpgradeStep{ + "PRE_UPGRADE_CHECK", + "SNAPSHOT", + "UPGRADE", + } +} + +type VolumeType string + +// Enum values for VolumeType +const ( + VolumeTypeStandard VolumeType = "standard" + VolumeTypeGp2 VolumeType = "gp2" + VolumeTypeIo1 VolumeType = "io1" +) + +// Values returns all known values for VolumeType. 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 (VolumeType) Values() []VolumeType { + return []VolumeType{ + "standard", + "gp2", + "io1", + } +} diff --git a/service/opensearch/types/errors.go b/service/opensearch/types/errors.go new file mode 100644 index 00000000000..518cd6bbe66 --- /dev/null +++ b/service/opensearch/types/errors.go @@ -0,0 +1,229 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "fmt" + smithy "github.com/aws/smithy-go" +) + +// An error occurred because user does not have permissions to access the resource. +// Returns HTTP status code 403. +type AccessDeniedException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *AccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AccessDeniedException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AccessDeniedException) ErrorCode() string { return "AccessDeniedException" } +func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// An error occurred while processing the request. +type BaseException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *BaseException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *BaseException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *BaseException) ErrorCode() string { return "BaseException" } +func (e *BaseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// An error occurred because the client attempts to remove a resource that is +// currently in use. Returns HTTP status code 409. +type ConflictException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *ConflictException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ConflictException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ConflictException) ErrorCode() string { return "ConflictException" } +func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// An error occured because the client wanted to access a not supported operation. +// Gives http status code of 409. +type DisabledOperationException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *DisabledOperationException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *DisabledOperationException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *DisabledOperationException) ErrorCode() string { return "DisabledOperationException" } +func (e *DisabledOperationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The request processing has failed because of an unknown error, exception or +// failure (the failure is internal to the service) . Gives http status code of +// 500. +type InternalException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *InternalException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InternalException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InternalException) ErrorCode() string { return "InternalException" } +func (e *InternalException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// The request processing has failed because of invalid pagination token provided +// by customer. Returns an HTTP status code of 400. +type InvalidPaginationTokenException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *InvalidPaginationTokenException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidPaginationTokenException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidPaginationTokenException) ErrorCode() string { + return "InvalidPaginationTokenException" +} +func (e *InvalidPaginationTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// An exception for trying to create or access sub-resource that is either invalid +// or not supported. Gives http status code of 409. +type InvalidTypeException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *InvalidTypeException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidTypeException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidTypeException) ErrorCode() string { return "InvalidTypeException" } +func (e *InvalidTypeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// An exception for trying to create more than allowed resources or sub-resources. +// Gives http status code of 409. +type LimitExceededException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *LimitExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *LimitExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *LimitExceededException) ErrorCode() string { return "LimitExceededException" } +func (e *LimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// An exception for creating a resource that already exists. Gives http status code +// of 400. +type ResourceAlreadyExistsException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *ResourceAlreadyExistsException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceAlreadyExistsException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceAlreadyExistsException) ErrorCode() string { return "ResourceAlreadyExistsException" } +func (e *ResourceAlreadyExistsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// An exception for accessing or deleting a resource that does not exist. Gives +// http status code of 400. +type ResourceNotFoundException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *ResourceNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ResourceNotFoundException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ResourceNotFoundException) ErrorCode() string { return "ResourceNotFoundException" } +func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// An exception for missing / invalid input fields. Gives http status code of 400. +type ValidationException struct { + Message *string + + noSmithyDocumentSerde +} + +func (e *ValidationException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ValidationException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ValidationException) ErrorCode() string { return "ValidationException" } +func (e *ValidationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/service/opensearch/types/types.go b/service/opensearch/types/types.go new file mode 100644 index 00000000000..cc7c47b7da5 --- /dev/null +++ b/service/opensearch/types/types.go @@ -0,0 +1,1607 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + smithydocument "github.com/aws/smithy-go/document" + "time" +) + +// The configured access rules for the domain's document and search endpoints, and +// the current status of those rules. +type AccessPoliciesStatus struct { + + // The access policy configured for the domain. Access policies can be + // resource-based, IP-based, or IAM-based. See Configuring access policies + // (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html#createdomain-configure-access-policies)for + // more information. + // + // This member is required. + Options *string + + // The status of the access policy for the domain. See OptionStatus for the status + // information that's included. + // + // This member is required. + Status *OptionStatus + + noSmithyDocumentSerde +} + +// List of limits that are specific to a given InstanceType and for each of its +// InstanceRole . +type AdditionalLimit struct { + + // Additional limit is specific to a given InstanceType and for each of its + // InstanceRole etc. + // + // Attributes and their details: + // + // * + // MaximumNumberOfDataNodesSupported + // This attribute is present on the master node + // only to specify how much data nodes up to which given ESPartitionInstanceType + // can support as master node. + // * MaximumNumberOfDataNodesWithoutMasterNode + // This + // attribute is present on data node only to specify how much data nodes of given + // ESPartitionInstanceType up to which you don't need any master nodes to govern + // them. + LimitName *string + + // Value for a given AdditionalLimit$LimitName . + LimitValues []string + + noSmithyDocumentSerde +} + +// Status of the advanced options for the specified domain. Currently, the +// following advanced options are available: +// +// * Option to allow references to +// indices in an HTTP request body. Must be false when configuring access to +// individual sub-resources. By default, the value is true. See Advanced cluster +// parameters +// (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html#createdomain-configure-advanced-options) +// for more information. +// +// * Option to specify the percentage of heap space +// allocated to field data. By default, this setting is unbounded. +// +// For more +// information, see Advanced cluster parameters +// (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html#createdomain-configure-advanced-options). +type AdvancedOptionsStatus struct { + + // The status of advanced options for the specified domain. + // + // This member is required. + Options map[string]string + + // The OptionStatus for advanced options for the specified domain. + // + // This member is required. + Status *OptionStatus + + noSmithyDocumentSerde +} + +// The advanced security configuration: whether advanced security is enabled, +// whether the internal database option is enabled. +type AdvancedSecurityOptions struct { + + // True if advanced security is enabled. + Enabled *bool + + // True if the internal user database is enabled. + InternalUserDatabaseEnabled *bool + + // Describes the SAML application configured for a domain. + SAMLOptions *SAMLOptionsOutput + + noSmithyDocumentSerde +} + +// The advanced security configuration: whether advanced security is enabled, +// whether the internal database option is enabled, master username and password +// (if internal database is enabled), and master user ARN (if IAM is enabled). +type AdvancedSecurityOptionsInput struct { + + // True if advanced security is enabled. + Enabled *bool + + // True if the internal user database is enabled. + InternalUserDatabaseEnabled *bool + + // Credentials for the master user: username and password, ARN, or both. + MasterUserOptions *MasterUserOptions + + // The SAML application configuration for the domain. + SAMLOptions *SAMLOptionsInput + + noSmithyDocumentSerde +} + +// The status of advanced security options for the specified domain. +type AdvancedSecurityOptionsStatus struct { + + // Advanced security options for the specified domain. + // + // This member is required. + Options *AdvancedSecurityOptions + + // Status of the advanced security options for the specified domain. + // + // This member is required. + Status *OptionStatus + + noSmithyDocumentSerde +} + +// Specifies the Auto-Tune type and Auto-Tune action details. +type AutoTune struct { + + // Specifies details about the Auto-Tune action. See Auto-Tune for Amazon + // OpenSearch Service + // (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html) + // for more information. + AutoTuneDetails *AutoTuneDetails + + // Specifies the Auto-Tune type. Valid value is SCHEDULED_ACTION. + AutoTuneType AutoTuneType + + noSmithyDocumentSerde +} + +// Specifies details about the Auto-Tune action. See Auto-Tune for Amazon +// OpenSearch Service +// (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html) +// for more information. +type AutoTuneDetails struct { + + // Specifies details about the scheduled Auto-Tune action. See Auto-Tune for + // Amazon OpenSearch Service + // (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html) + // for more information. + ScheduledAutoTuneDetails *ScheduledAutoTuneDetails + + noSmithyDocumentSerde +} + +// Specifies the Auto-Tune maintenance schedule. See Auto-Tune for Amazon +// OpenSearch Service +// (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html) +// for more information. +type AutoTuneMaintenanceSchedule struct { + + // A cron expression for a recurring maintenance schedule. See Auto-Tune for + // Amazon OpenSearch Service + // (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html) + // for more information. + CronExpressionForRecurrence *string + + // Specifies maintenance schedule duration: duration value and duration unit. See + // Auto-Tune for Amazon OpenSearch Service + // (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html) + // for more information. + Duration *Duration + + // The timestamp at which the Auto-Tune maintenance schedule starts. + StartAt *time.Time + + noSmithyDocumentSerde +} + +// The Auto-Tune options: the Auto-Tune desired state for the domain, rollback +// state when disabling Auto-Tune options and list of maintenance schedules. +type AutoTuneOptions struct { + + // The Auto-Tune desired state. Valid values are ENABLED and DISABLED. + DesiredState AutoTuneDesiredState + + // A list of maintenance schedules. See Auto-Tune for Amazon OpenSearch Service + // (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html) + // for more information. + MaintenanceSchedules []AutoTuneMaintenanceSchedule + + // The rollback state while disabling Auto-Tune for the domain. Valid values are + // NO_ROLLBACK and DEFAULT_ROLLBACK. + RollbackOnDisable RollbackOnDisable + + noSmithyDocumentSerde +} + +// The Auto-Tune options: the Auto-Tune desired state for the domain and list of +// maintenance schedules. +type AutoTuneOptionsInput struct { + + // The Auto-Tune desired state. Valid values are ENABLED and DISABLED. + DesiredState AutoTuneDesiredState + + // A list of maintenance schedules. See Auto-Tune for Amazon OpenSearch Service + // (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html) + // for more information. + MaintenanceSchedules []AutoTuneMaintenanceSchedule + + noSmithyDocumentSerde +} + +// The Auto-Tune options: the Auto-Tune desired state for the domain and list of +// maintenance schedules. +type AutoTuneOptionsOutput struct { + + // The error message while enabling or disabling Auto-Tune. + ErrorMessage *string + + // The AutoTuneState for the domain. + State AutoTuneState + + noSmithyDocumentSerde +} + +// The Auto-Tune status for the domain. +type AutoTuneOptionsStatus struct { + + // Specifies Auto-Tune options for the domain. + Options *AutoTuneOptions + + // The status of the Auto-Tune options for the domain. + Status *AutoTuneStatus + + noSmithyDocumentSerde +} + +// Provides the current Auto-Tune status for the domain. +type AutoTuneStatus struct { + + // The timestamp of the Auto-Tune options creation date. + // + // This member is required. + CreationDate *time.Time + + // The AutoTuneState for the domain. + // + // This member is required. + State AutoTuneState + + // The timestamp of when the Auto-Tune options were last updated. + // + // This member is required. + UpdateDate *time.Time + + // The error message while enabling or disabling Auto-Tune. + ErrorMessage *string + + // Indicates whether the domain is being deleted. + PendingDeletion *bool + + // The latest version of the Auto-Tune options. + UpdateVersion int32 + + noSmithyDocumentSerde +} + +type AWSDomainInformation struct { + + // The name of an domain. Domain names are unique across the domains owned by an + // account within an AWS region. Domain names start with a letter or number and can + // contain the following characters: a-z (lowercase), 0-9, and - (hyphen). + // + // This member is required. + DomainName *string + + OwnerId *string + + Region *string + + noSmithyDocumentSerde +} + +// The configuration for the domain cluster, such as the type and number of +// instances. +type ClusterConfig struct { + ColdStorageOptions *ColdStorageOptions + + // Total number of dedicated master nodes, active and on standby, for the cluster. + DedicatedMasterCount *int32 + + // A boolean value to indicate whether a dedicated master node is enabled. See + // Dedicated master nodes in Amazon OpenSearch Service + // (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/managedomains.html#managedomains-dedicatedmasternodes) + // for more information. + DedicatedMasterEnabled *bool + + // The instance type for a dedicated master node. + DedicatedMasterType OpenSearchPartitionInstanceType + + // The number of instances in the specified domain cluster. + InstanceCount *int32 + + // The instance type for an OpenSearch cluster. UltraWarm instance types are not + // supported for data instances. + InstanceType OpenSearchPartitionInstanceType + + // The number of UltraWarm nodes in the cluster. + WarmCount *int32 + + // True to enable UltraWarm storage. + WarmEnabled *bool + + // The instance type for the OpenSearch cluster's warm nodes. + WarmType OpenSearchWarmPartitionInstanceType + + // The zone awareness configuration for a domain when zone awareness is enabled. + ZoneAwarenessConfig *ZoneAwarenessConfig + + // A boolean value to indicate whether zone awareness is enabled. See Configuring a + // multi-AZ domain in Amazon OpenSearch Service + // (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/managedomains-multiaz.html) + // for more information. + ZoneAwarenessEnabled *bool + + noSmithyDocumentSerde +} + +// The configuration status for the specified domain. +type ClusterConfigStatus struct { + + // The cluster configuration for the specified domain. + // + // This member is required. + Options *ClusterConfig + + // The cluster configuration status for the specified domain. + // + // This member is required. + Status *OptionStatus + + noSmithyDocumentSerde +} + +// Options to specify the Cognito user and identity pools for OpenSearch Dashboards +// authentication. For more information, see Configuring Amazon Cognito +// authentication for OpenSearch Dashboards +// (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/cognito-auth.html). +type CognitoOptions struct { + + // The option to enable Cognito for OpenSearch Dashboards authentication. + Enabled *bool + + // The Cognito identity pool ID for OpenSearch Dashboards authentication. + IdentityPoolId *string + + // The role ARN that provides OpenSearch permissions for accessing Cognito + // resources. + RoleArn *string + + // The Cognito user pool ID for OpenSearch Dashboards authentication. + UserPoolId *string + + noSmithyDocumentSerde +} + +// The status of the Cognito options for the specified domain. +type CognitoOptionsStatus struct { + + // Cognito options for the specified domain. + // + // This member is required. + Options *CognitoOptions + + // The status of the Cognito options for the specified domain. + // + // This member is required. + Status *OptionStatus + + noSmithyDocumentSerde +} + +type ColdStorageOptions struct { + + // This member is required. + Enabled *bool + + noSmithyDocumentSerde +} + +// A map from an EngineVersion to a list of compatible EngineVersion s to which the +// domain can be upgraded. +type CompatibleVersionsMap struct { + + // The current version of OpenSearch a domain is on. + SourceVersion *string + + // List of supported OpenSearch versions. + TargetVersions []string + + noSmithyDocumentSerde +} + +// A filter to apply to the DescribePackage response. +type DescribePackagesFilter struct { + + // Any field from PackageDetails. + Name DescribePackagesFilterName + + // A list of values for the specified field. + Value []string + + noSmithyDocumentSerde +} + +// The configuration of a domain. +type DomainConfig struct { + + // IAM access policy as a JSON-formatted string. + AccessPolicies *AccessPoliciesStatus + + // The AdvancedOptions for the domain. See Advanced options + // (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/createupdatedomains.html#createdomain-configure-advanced-options) + // for more information. + AdvancedOptions *AdvancedOptionsStatus + + // Specifies AdvancedSecurityOptions for the domain. + AdvancedSecurityOptions *AdvancedSecurityOptionsStatus + + // Specifies AutoTuneOptions for the domain. + AutoTuneOptions *AutoTuneOptionsStatus + + // The ClusterConfig for the domain. + ClusterConfig *ClusterConfigStatus + + // The CognitoOptions for the specified domain. For more information, see + // Configuring Amazon Cognito authentication for OpenSearch Dashboards + // (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/cognito-auth.html). + CognitoOptions *CognitoOptionsStatus + + // The DomainEndpointOptions for the domain. + DomainEndpointOptions *DomainEndpointOptionsStatus + + // The EBSOptions for the domain. + EBSOptions *EBSOptionsStatus + + // The EncryptionAtRestOptions for the domain. + EncryptionAtRestOptions *EncryptionAtRestOptionsStatus + + // String of format Elasticsearch_X.Y or OpenSearch_X.Y to specify the engine + // version for the OpenSearch or Elasticsearch domain. + EngineVersion *VersionStatus + + // Log publishing options for the given domain. + LogPublishingOptions *LogPublishingOptionsStatus + + // The NodeToNodeEncryptionOptions for the domain. + NodeToNodeEncryptionOptions *NodeToNodeEncryptionOptionsStatus + + // The SnapshotOptions for the domain. + SnapshotOptions *SnapshotOptionsStatus + + // The VPCOptions for the specified domain. For more information, see Launching + // your Amazon OpenSearch Service domains using a VPC + // (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/vpc.html). + VPCOptions *VPCDerivedInfoStatus + + noSmithyDocumentSerde +} + +// Options to configure the endpoint for the domain. +type DomainEndpointOptions struct { + + // The fully qualified domain for your custom endpoint. + CustomEndpoint *string + + // The ACM certificate ARN for your custom endpoint. + CustomEndpointCertificateArn *string + + // Whether to enable a custom endpoint for the domain. + CustomEndpointEnabled *bool + + // Whether only HTTPS endpoint should be enabled for the domain. + EnforceHTTPS *bool + + // Specify the TLS security policy to apply to the HTTPS endpoint of the + // domain. + // + // Can be one of the following values: + // + // * Policy-Min-TLS-1-0-2019-07: TLS + // security policy which supports TLSv1.0 and higher. + // + // * + // Policy-Min-TLS-1-2-2019-07: TLS security policy which supports only TLSv1.2 + TLSSecurityPolicy TLSSecurityPolicy + + noSmithyDocumentSerde +} + +// The configured endpoint options for the domain and their current status. +type DomainEndpointOptionsStatus struct { + + // Options to configure the endpoint for the domain. + // + // This member is required. + Options *DomainEndpointOptions + + // The status of the endpoint options for the domain. See OptionStatus for the + // status information that's included. + // + // This member is required. + Status *OptionStatus + + noSmithyDocumentSerde +} + +type DomainInfo struct { + + // The DomainName. + DomainName *string + + noSmithyDocumentSerde +} + +type DomainInformationContainer struct { + AWSDomainInformation *AWSDomainInformation + + noSmithyDocumentSerde +} + +// Information on a package associated with a domain. +type DomainPackageDetails struct { + + // The name of the domain you've associated a package with. + DomainName *string + + // State of the association. Values are ASSOCIATING, ASSOCIATION_FAILED, ACTIVE, + // DISSOCIATING, and DISSOCIATION_FAILED. + DomainPackageStatus DomainPackageStatus + + // Additional information if the package is in an error state. Null otherwise. + ErrorDetails *ErrorDetails + + // The timestamp of the most recent update to the package association status. + LastUpdated *time.Time + + // The internal ID of the package. + PackageID *string + + // User-specified name of the package. + PackageName *string + + // Currently supports only TXT-DICTIONARY. + PackageType PackageType + + PackageVersion *string + + // The relative path on Amazon OpenSearch Service nodes, which can be used as + // synonym_path when the package is a synonym file. + ReferencePath *string + + noSmithyDocumentSerde +} + +// The current status of a domain. +type DomainStatus struct { + + // The Amazon Resource Name (ARN) of a domain. See IAM identifiers + // (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html) in + // the AWS Identity and Access Management User Guide for more information. + // + // This member is required. + ARN *string + + // The type and number of instances in the domain. + // + // This member is required. + ClusterConfig *ClusterConfig + + // The unique identifier for the specified domain. + // + // This member is required. + DomainId *string + + // The name of a domain. Domain names are unique across the domains owned by an + // account within an AWS region. Domain names start with a letter or number and can + // contain the following characters: a-z (lowercase), 0-9, and - (hyphen). + // + // This member is required. + DomainName *string + + // IAM access policy as a JSON-formatted string. + AccessPolicies *string + + // The status of the AdvancedOptions. + AdvancedOptions map[string]string + + // The current status of the domain's advanced security options. + AdvancedSecurityOptions *AdvancedSecurityOptions + + // The current status of the domain's Auto-Tune options. + AutoTuneOptions *AutoTuneOptionsOutput + + // The CognitoOptions for the specified domain. For more information, see + // Configuring Amazon Cognito authentication for OpenSearch Dashboards + // (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/cognito-auth.html). + CognitoOptions *CognitoOptions + + // The domain creation status. True if the creation of a domain is complete. False + // if domain creation is still in progress. + Created *bool + + // The domain deletion status. True if a delete request has been received for the + // domain but resource cleanup is still in progress. False if the domain has not + // been deleted. Once domain deletion is complete, the status of the domain is no + // longer returned. + Deleted *bool + + // The current status of the domain's endpoint options. + DomainEndpointOptions *DomainEndpointOptions + + // The EBSOptions for the specified domain. + EBSOptions *EBSOptions + + // The status of the EncryptionAtRestOptions. + EncryptionAtRestOptions *EncryptionAtRestOptions + + // The domain endpoint that you use to submit index and search requests. + Endpoint *string + + // Map containing the domain endpoints used to submit index and search requests. + // Example key, value: + // 'vpc','vpc-endpoint-h2dsd34efgyghrtguk5gt6j2foh4.us-east-1.es.amazonaws.com'. + Endpoints map[string]string + + EngineVersion *string + + // Log publishing options for the given domain. + LogPublishingOptions map[string]LogPublishingOption + + // The status of the NodeToNodeEncryptionOptions. + NodeToNodeEncryptionOptions *NodeToNodeEncryptionOptions + + // The status of the domain configuration. True if Amazon OpenSearch Service is + // processing configuration changes. False if the configuration is active. + Processing *bool + + // The current status of the domain's service software. + ServiceSoftwareOptions *ServiceSoftwareOptions + + // The status of the SnapshotOptions. + SnapshotOptions *SnapshotOptions + + // The status of a domain version upgrade. True if Amazon OpenSearch Service is + // undergoing a version upgrade. False if the configuration is active. + UpgradeProcessing *bool + + // The VPCOptions for the specified domain. For more information, see Launching + // your Amazon OpenSearch Service domains using a VPC + // (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/vpc.html). + VPCOptions *VPCDerivedInfo + + noSmithyDocumentSerde +} + +// The maintenance schedule duration: duration value and duration unit. See +// Auto-Tune for Amazon OpenSearch Service +// (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html) +// for more information. +type Duration struct { + + // The unit of a maintenance schedule duration. Valid value is HOURS. See + // Auto-Tune for Amazon OpenSearch Service + // (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html) + // for more information. + Unit TimeUnit + + // Integer to specify the value of a maintenance schedule duration. See Auto-Tune + // for Amazon OpenSearch Service + // (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html) + // for more information. + Value int64 + + noSmithyDocumentSerde +} + +// Options to enable, disable, and specify the properties of EBS storage volumes. +type EBSOptions struct { + + // Whether EBS-based storage is enabled. + EBSEnabled *bool + + // The IOPD for a Provisioned IOPS EBS volume (SSD). + Iops *int32 + + // Integer to specify the size of an EBS volume. + VolumeSize *int32 + + // The volume type for EBS-based storage. + VolumeType VolumeType + + noSmithyDocumentSerde +} + +// Status of the EBS options for the specified domain. +type EBSOptionsStatus struct { + + // The EBS options for the specified domain. + // + // This member is required. + Options *EBSOptions + + // The status of the EBS options for the specified domain. + // + // This member is required. + Status *OptionStatus + + noSmithyDocumentSerde +} + +// Specifies encryption at rest options. +type EncryptionAtRestOptions struct { + + // The option to enable encryption at rest. + Enabled *bool + + // The KMS key ID for encryption at rest options. + KmsKeyId *string + + noSmithyDocumentSerde +} + +// Status of the encryption At Rest options for the specified domain. +type EncryptionAtRestOptionsStatus struct { + + // The Encryption At Rest options for the specified domain. + // + // This member is required. + Options *EncryptionAtRestOptions + + // The status of the Encryption At Rest options for the specified domain. + // + // This member is required. + Status *OptionStatus + + noSmithyDocumentSerde +} + +type ErrorDetails struct { + ErrorMessage *string + + ErrorType *string + + noSmithyDocumentSerde +} + +// A filter used to limit results when describing inbound or outbound cross-cluster +// connections. Multiple values can be specified per filter. A cross-cluster +// connection must match at least one of the specified values for it to be returned +// from an operation. +type Filter struct { + + // The name of the filter. + Name *string + + // Contains one or more values for the filter. + Values []string + + noSmithyDocumentSerde +} + +// Details of an inbound connection. +type InboundConnection struct { + + // The connection ID for the inbound cross-cluster connection. + ConnectionId *string + + // The InboundConnectionStatus for the outbound connection. + ConnectionStatus *InboundConnectionStatus + + // The AWSDomainInformation for the local OpenSearch domain. + LocalDomainInfo *DomainInformationContainer + + // The AWSDomainInformation for the remote OpenSearch domain. + RemoteDomainInfo *DomainInformationContainer + + noSmithyDocumentSerde +} + +// The connection status of an inbound cross-cluster connection. +type InboundConnectionStatus struct { + + // Verbose information for the inbound connection status. + Message *string + + // The state code for the inbound connection. Can be one of the following: + // + // * + // PENDING_ACCEPTANCE: Inbound connection is not yet accepted by the remote domain + // owner. + // + // * APPROVED: Inbound connection is pending acceptance by the remote + // domain owner. + // + // * PROVISIONING: Inbound connection provisioning is in + // progress. + // + // * ACTIVE: Inbound connection is active and ready to use. + // + // * + // REJECTING: Inbound connection rejection is in process. + // + // * REJECTED: Inbound + // connection is rejected. + // + // * DELETING: Inbound connection deletion is in + // progress. + // + // * DELETED: Inbound connection is deleted and can no longer be used. + StatusCode InboundConnectionStatusCode + + noSmithyDocumentSerde +} + +// InstanceCountLimits represents the limits on the number of instances that can be +// created in Amazon OpenSearch Service for a given InstanceType. +type InstanceCountLimits struct { + + // Maximum number of instances that can be instantiated for a given InstanceType. + MaximumInstanceCount int32 + + // Minimum number of instances that can be instantiated for a given InstanceType. + MinimumInstanceCount int32 + + noSmithyDocumentSerde +} + +// InstanceLimits represents the list of instance-related attributes that are +// available for a given InstanceType. +type InstanceLimits struct { + + // InstanceCountLimits represents the limits on the number of instances that can be + // created in Amazon OpenSearch Service for a given InstanceType. + InstanceCountLimits *InstanceCountLimits + + noSmithyDocumentSerde +} + +type InstanceTypeDetails struct { + AdvancedSecurityEnabled *bool + + AppLogsEnabled *bool + + CognitoEnabled *bool + + EncryptionEnabled *bool + + InstanceRole []string + + InstanceType OpenSearchPartitionInstanceType + + WarmEnabled *bool + + noSmithyDocumentSerde +} + +// Limits for a given InstanceType and for each of its roles. +// +// Limits contains the +// following: StorageTypes, InstanceLimits, and AdditionalLimits +type Limits struct { + + // List of additional limits that are specific to a given InstanceType and for each + // of its InstanceRole . + AdditionalLimits []AdditionalLimit + + // InstanceLimits represents the list of instance-related attributes that are + // available for a given InstanceType. + InstanceLimits *InstanceLimits + + // Storage-related types and attributes that are available for a given + // InstanceType. + StorageTypes []StorageType + + noSmithyDocumentSerde +} + +// Log Publishing option that is set for a given domain. +// +// Attributes and their +// details: +// +// * CloudWatchLogsLogGroupArn: ARN of the Cloudwatch log group to +// publish logs to. +// +// * Enabled: Whether the log publishing for a given log type is +// enabled or not. +type LogPublishingOption struct { + + // ARN of the Cloudwatch log group to publish logs to. + CloudWatchLogsLogGroupArn *string + + // Whether the given log publishing option is enabled or not. + Enabled *bool + + noSmithyDocumentSerde +} + +// The configured log publishing options for the domain and their current status. +type LogPublishingOptionsStatus struct { + + // The log publishing options configured for the domain. + Options map[string]LogPublishingOption + + // The status of the log publishing options for the domain. See OptionStatus for + // the status information that's included. + Status *OptionStatus + + noSmithyDocumentSerde +} + +// Credentials for the master user: username and password, ARN, or both. +type MasterUserOptions struct { + + // ARN for the master user (if IAM is enabled). + MasterUserARN *string + + // The master user's username, which is stored in the Amazon OpenSearch Service + // domain's internal database. + MasterUserName *string + + // The master user's password, which is stored in the Amazon OpenSearch Service + // domain's internal database. + MasterUserPassword *string + + noSmithyDocumentSerde +} + +// The node-to-node encryption options. +type NodeToNodeEncryptionOptions struct { + + // True to enable node-to-node encryption. + Enabled *bool + + noSmithyDocumentSerde +} + +// Status of the node-to-node encryption options for the specified domain. +type NodeToNodeEncryptionOptionsStatus struct { + + // The node-to-node encryption options for the specified domain. + // + // This member is required. + Options *NodeToNodeEncryptionOptions + + // The status of the node-to-node encryption options for the specified domain. + // + // This member is required. + Status *OptionStatus + + noSmithyDocumentSerde +} + +// Provides the current status of the entity. +type OptionStatus struct { + + // The timestamp of when the entity was created. + // + // This member is required. + CreationDate *time.Time + + // Provides the OptionState for the domain. + // + // This member is required. + State OptionState + + // The timestamp of the last time the entity was updated. + // + // This member is required. + UpdateDate *time.Time + + // Indicates whether the domain is being deleted. + PendingDeletion *bool + + // The latest version of the entity. + UpdateVersion int32 + + noSmithyDocumentSerde +} + +// Specifies details about an outbound connection. +type OutboundConnection struct { + + // The connection alias for the outbound cross-cluster connection. + ConnectionAlias *string + + // The connection ID for the outbound cross-cluster connection. + ConnectionId *string + + // The OutboundConnectionStatus for the outbound connection. + ConnectionStatus *OutboundConnectionStatus + + // The DomainInformation for the local OpenSearch domain. + LocalDomainInfo *DomainInformationContainer + + // The DomainInformation for the remote OpenSearch domain. + RemoteDomainInfo *DomainInformationContainer + + noSmithyDocumentSerde +} + +// The connection status of an outbound cross-cluster connection. +type OutboundConnectionStatus struct { + + // Verbose information for the outbound connection status. + Message *string + + // The state code for the outbound connection. Can be one of the following: + // + // * + // VALIDATING: The outbound connection request is being validated. + // + // * + // VALIDATION_FAILED: Validation failed for the connection request. + // + // * + // PENDING_ACCEPTANCE: Outbound connection request is validated and is not yet + // accepted by the remote domain owner. + // + // * APPROVED: Outbound connection has been + // approved by the remote domain owner for getting provisioned. + // + // * PROVISIONING: + // Outbound connection request is in process. + // + // * ACTIVE: Outbound connection is + // active and ready to use. + // + // * REJECTING: Outbound connection rejection by remote + // domain owner is in progress. + // + // * REJECTED: Outbound connection request is + // rejected by remote domain owner. + // + // * DELETING: Outbound connection deletion is in + // progress. + // + // * DELETED: Outbound connection is deleted and can no longer be used. + StatusCode OutboundConnectionStatusCode + + noSmithyDocumentSerde +} + +// Basic information about a package. +type PackageDetails struct { + AvailablePackageVersion *string + + // The timestamp of when the package was created. + CreatedAt *time.Time + + // Additional information if the package is in an error state. Null otherwise. + ErrorDetails *ErrorDetails + + LastUpdatedAt *time.Time + + // User-specified description of the package. + PackageDescription *string + + // Internal ID of the package. + PackageID *string + + // User-specified name of the package. + PackageName *string + + // Current state of the package. Values are COPYING, COPY_FAILED, AVAILABLE, + // DELETING, and DELETE_FAILED. + PackageStatus PackageStatus + + // Currently supports only TXT-DICTIONARY. + PackageType PackageType + + noSmithyDocumentSerde +} + +// The Amazon S3 location for importing the package specified as S3BucketName and +// S3Key +type PackageSource struct { + + // The name of the Amazon S3 bucket containing the package. + S3BucketName *string + + // Key (file name) of the package. + S3Key *string + + noSmithyDocumentSerde +} + +// Details of a package version. +type PackageVersionHistory struct { + + // A message associated with the package version. + CommitMessage *string + + // The timestamp of when the package was created. + CreatedAt *time.Time + + // The package version. + PackageVersion *string + + noSmithyDocumentSerde +} + +// Contains the specific price and frequency of a recurring charges for a reserved +// OpenSearch instance, or for a reserved OpenSearch instance offering. +type RecurringCharge struct { + + // The monetary amount of the recurring charge. + RecurringChargeAmount *float64 + + // The frequency of the recurring charge. + RecurringChargeFrequency *string + + noSmithyDocumentSerde +} + +// Details of a reserved OpenSearch instance. +type ReservedInstance struct { + BillingSubscriptionId *int64 + + // The currency code for the reserved OpenSearch instance offering. + CurrencyCode *string + + // The duration, in seconds, for which the OpenSearch instance is reserved. + Duration int32 + + // The upfront fixed charge you will paid to purchase the specific reserved + // OpenSearch instance offering. + FixedPrice *float64 + + // The number of OpenSearch instances that have been reserved. + InstanceCount int32 + + // The OpenSearch instance type offered by the reserved instance offering. + InstanceType OpenSearchPartitionInstanceType + + // The payment option as defined in the reserved OpenSearch instance offering. + PaymentOption ReservedInstancePaymentOption + + // The charge to your account regardless of whether you are creating any domains + // using the instance offering. + RecurringCharges []RecurringCharge + + // The customer-specified identifier to track this reservation. + ReservationName *string + + // The unique identifier for the reservation. + ReservedInstanceId *string + + // The offering identifier. + ReservedInstanceOfferingId *string + + // The time the reservation started. + StartTime *time.Time + + // The state of the reserved OpenSearch instance. + State *string + + // The rate you are charged for each hour for the domain that is using this + // reserved instance. + UsagePrice *float64 + + noSmithyDocumentSerde +} + +// Details of a reserved OpenSearch instance offering. +type ReservedInstanceOffering struct { + + // The currency code for the reserved OpenSearch instance offering. + CurrencyCode *string + + // The duration, in seconds, for which the offering will reserve the OpenSearch + // instance. + Duration int32 + + // The upfront fixed charge you will pay to purchase the specific reserved + // OpenSearch instance offering. + FixedPrice *float64 + + // The OpenSearch instance type offered by the reserved instance offering. + InstanceType OpenSearchPartitionInstanceType + + // Payment option for the reserved OpenSearch instance offering + PaymentOption ReservedInstancePaymentOption + + // The charge to your account regardless of whether you are creating any domains + // using the instance offering. + RecurringCharges []RecurringCharge + + // The OpenSearch reserved instance offering identifier. + ReservedInstanceOfferingId *string + + // The rate you are charged for each hour the domain that is using the offering is + // running. + UsagePrice *float64 + + noSmithyDocumentSerde +} + +// The SAML identity povider's information. +type SAMLIdp struct { + + // The unique entity ID of the application in SAML identity provider. + // + // This member is required. + EntityId *string + + // The metadata of the SAML application in XML format. + // + // This member is required. + MetadataContent *string + + noSmithyDocumentSerde +} + +// The SAML application configuration for the domain. +type SAMLOptionsInput struct { + + // True if SAML is enabled. + Enabled *bool + + // The SAML Identity Provider's information. + Idp *SAMLIdp + + // The backend role that the SAML master user is mapped to. + MasterBackendRole *string + + // The SAML master username, which is stored in the Amazon OpenSearch Service + // domain's internal database. + MasterUserName *string + + // Element of the SAML assertion to use for backend roles. Default is roles. + RolesKey *string + + // The duration, in minutes, after which a user session becomes inactive. + // Acceptable values are between 1 and 1440, and the default value is 60. + SessionTimeoutMinutes *int32 + + // Element of the SAML assertion to use for username. Default is NameID. + SubjectKey *string + + noSmithyDocumentSerde +} + +// Describes the SAML application configured for the domain. +type SAMLOptionsOutput struct { + + // True if SAML is enabled. + Enabled *bool + + // Describes the SAML identity provider's information. + Idp *SAMLIdp + + // The key used for matching the SAML roles attribute. + RolesKey *string + + // The duration, in minutes, after which a user session becomes inactive. + SessionTimeoutMinutes *int32 + + // The key used for matching the SAML subject attribute. + SubjectKey *string + + noSmithyDocumentSerde +} + +// Specifies details about the scheduled Auto-Tune action. See Auto-Tune for +// Amazon OpenSearch Service +// (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/auto-tune.html) +// for more information. +type ScheduledAutoTuneDetails struct { + + // The Auto-Tune action description. + Action *string + + // The Auto-Tune action type. Valid values are JVM_HEAP_SIZE_TUNING and + // JVM_YOUNG_GEN_TUNING. + ActionType ScheduledAutoTuneActionType + + // The timestamp of the Auto-Tune action scheduled for the domain. + Date *time.Time + + // The Auto-Tune action severity. Valid values are LOW, MEDIUM, and HIGH. + Severity ScheduledAutoTuneSeverityType + + noSmithyDocumentSerde +} + +// The current options of an domain service software options. +type ServiceSoftwareOptions struct { + + // The timestamp, in Epoch time, until which you can manually request a service + // software update. After this date, we automatically update your service software. + AutomatedUpdateDate *time.Time + + // True if you're able to cancel your service software version update. False if you + // can't cancel your service software update. + Cancellable *bool + + // The current service software version present on the domain. + CurrentVersion *string + + // The description of the UpdateStatus. + Description *string + + // The new service software version if one is available. + NewVersion *string + + // True if a service software is never automatically updated. False if a service + // software is automatically updated after AutomatedUpdateDate. + OptionalDeployment *bool + + // True if you're able to update your service software version. False if you can't + // update your service software version. + UpdateAvailable *bool + + // The status of your service software update. This field can take the following + // values: ELIGIBLE, PENDING_UPDATE, IN_PROGRESS, COMPLETED, and NOT_ELIGIBLE. + UpdateStatus DeploymentStatus + + noSmithyDocumentSerde +} + +// The time, in UTC format, when the service takes a daily automated snapshot of +// the specified domain. Default is 0 hours. +type SnapshotOptions struct { + + // The time, in UTC format, when the service takes a daily automated snapshot of + // the specified domain. Default is 0 hours. + AutomatedSnapshotStartHour *int32 + + noSmithyDocumentSerde +} + +// Status of a daily automated snapshot. +type SnapshotOptionsStatus struct { + + // The daily snapshot options specified for the domain. + // + // This member is required. + Options *SnapshotOptions + + // The status of a daily automated snapshot. + // + // This member is required. + Status *OptionStatus + + noSmithyDocumentSerde +} + +// StorageTypes represents the list of storage-related types and their attributes +// that are available for a given InstanceType. +type StorageType struct { + + // Sub-type of the given storage type. List of available sub-storage options: + // "instance" storageType has no storageSubType. "ebs" storageType has the + // following valid storageSubTypes: + // + // * standard + // + // * gp2 + // + // * io1 + // + // See VolumeType for + // more information regarding each EBS storage option. + StorageSubTypeName *string + + // Limits that are applicable for the given storage type. + StorageTypeLimits []StorageTypeLimit + + // Type of storage. List of available storage options: + // + // * instance + // Built-in + // storage available for the instance + // * ebs + // Elastic block storage attached to the + // instance + StorageTypeName *string + + noSmithyDocumentSerde +} + +// Limits that are applicable for the given storage type. +type StorageTypeLimit struct { + + // Name of storage limits that are applicable for the given storage type. If + // StorageType is "ebs", the following storage options are applicable: + // + // * + // MinimumVolumeSize + // Minimum amount of volume size that is applicable for the + // given storage type. Can be empty if not applicable. + // * MaximumVolumeSize + // Maximum + // amount of volume size that is applicable for the given storage type. Can be + // empty if not applicable. + // * MaximumIops + // Maximum amount of Iops that is + // applicable for given the storage type. Can be empty if not applicable. + // * + // MinimumIops + // Minimum amount of Iops that is applicable for given the storage + // type. Can be empty if not applicable. + LimitName *string + + // Values for the StorageTypeLimit$LimitName . + LimitValues []string + + noSmithyDocumentSerde +} + +// A key value pair for a resource tag. +type Tag struct { + + // The TagKey, the name of the tag. Tag keys must be unique for the domain to which + // they are attached. + // + // This member is required. + Key *string + + // The TagValue, the value assigned to the corresponding tag key. Tag values can be + // null and don't have to be unique in a tag set. For example, you can have a key + // value pair in a tag set of project : Trinity and cost-center : Trinity + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + +// History of the last 10 upgrades and upgrade eligibility checks. +type UpgradeHistory struct { + + // UTC timestamp at which the upgrade API call was made in "yyyy-MM-ddTHH:mm:ssZ" + // format. + StartTimestamp *time.Time + + // A list of UpgradeStepItem s representing information about each step performed + // as part of a specific upgrade or upgrade eligibility check. + StepsList []UpgradeStepItem + + // A string that briefly describes the upgrade. + UpgradeName *string + + // The current status of the upgrade. The status can take one of the following + // values: + // + // * In Progress + // + // * Succeeded + // + // * Succeeded with Issues + // + // * Failed + UpgradeStatus UpgradeStatus + + noSmithyDocumentSerde +} + +// Represents a single step of the upgrade or upgrade eligibility check workflow. +type UpgradeStepItem struct { + + // A list of strings containing detailed information about the errors encountered + // in a particular step. + Issues []string + + // The floating point value representing the progress percentage of a particular + // step. + ProgressPercent *float64 + + // One of three steps an upgrade or upgrade eligibility check goes through: + // + // * + // PreUpgradeCheck + // + // * Snapshot + // + // * Upgrade + UpgradeStep UpgradeStep + + // The current status of the upgrade. The status can take one of the following + // values: + // + // * In Progress + // + // * Succeeded + // + // * Succeeded with Issues + // + // * Failed + UpgradeStepStatus UpgradeStatus + + noSmithyDocumentSerde +} + +// The status of the OpenSearch version options for the specified OpenSearch +// domain. +type VersionStatus struct { + + // The OpenSearch version for the specified OpenSearch domain. + // + // This member is required. + Options *string + + // The status of the OpenSearch version options for the specified OpenSearch + // domain. + // + // This member is required. + Status *OptionStatus + + noSmithyDocumentSerde +} + +// Options to specify the subnets and security groups for the VPC endpoint. For +// more information, see Launching your Amazon OpenSearch Service domains using a +// VPC +// (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/vpc.html). +type VPCDerivedInfo struct { + + // The Availability Zones for the domain. Exists only if the domain was created + // with VPCOptions. + AvailabilityZones []string + + // The security groups for the VPC endpoint. + SecurityGroupIds []string + + // The subnets for the VPC endpoint. + SubnetIds []string + + // The VPC ID for the domain. Exists only if the domain was created with + // VPCOptions. + VPCId *string + + noSmithyDocumentSerde +} + +// Status of the VPC options for the specified domain. +type VPCDerivedInfoStatus struct { + + // The VPC options for the specified domain. + // + // This member is required. + Options *VPCDerivedInfo + + // The status of the VPC options for the specified domain. + // + // This member is required. + Status *OptionStatus + + noSmithyDocumentSerde +} + +// Options to specify the subnets and security groups for the VPC endpoint. For +// more information, see Launching your Amazon OpenSearch Service domains using a +// VPC +// (http://docs.aws.amazon.com/opensearch-service/latest/developerguide/vpc.html). +type VPCOptions struct { + + // The security groups for the VPC endpoint. + SecurityGroupIds []string + + // The subnets for the VPC endpoint. + SubnetIds []string + + noSmithyDocumentSerde +} + +// The zone awareness configuration for the domain cluster, such as the number of +// availability zones. +type ZoneAwarenessConfig struct { + + // An integer value to indicate the number of availability zones for a domain when + // zone awareness is enabled. This should be equal to number of subnets if VPC + // endpoints is enabled. + AvailabilityZoneCount *int32 + + noSmithyDocumentSerde +} + +type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/opensearch/validators.go b/service/opensearch/validators.go new file mode 100644 index 00000000000..5ce0e1088e0 --- /dev/null +++ b/service/opensearch/validators.go @@ -0,0 +1,1444 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearch + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/opensearch/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpAcceptInboundConnection struct { +} + +func (*validateOpAcceptInboundConnection) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAcceptInboundConnection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AcceptInboundConnectionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAcceptInboundConnectionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpAddTags struct { +} + +func (*validateOpAddTags) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAddTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AddTagsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAddTagsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpAssociatePackage struct { +} + +func (*validateOpAssociatePackage) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAssociatePackage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AssociatePackageInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAssociatePackageInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCancelServiceSoftwareUpdate struct { +} + +func (*validateOpCancelServiceSoftwareUpdate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCancelServiceSoftwareUpdate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CancelServiceSoftwareUpdateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCancelServiceSoftwareUpdateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateDomain struct { +} + +func (*validateOpCreateDomain) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateDomain) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateDomainInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateDomainInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateOutboundConnection struct { +} + +func (*validateOpCreateOutboundConnection) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateOutboundConnection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateOutboundConnectionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateOutboundConnectionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreatePackage struct { +} + +func (*validateOpCreatePackage) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreatePackage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreatePackageInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreatePackageInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteDomain struct { +} + +func (*validateOpDeleteDomain) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteDomain) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteDomainInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteDomainInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteInboundConnection struct { +} + +func (*validateOpDeleteInboundConnection) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteInboundConnection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteInboundConnectionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteInboundConnectionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteOutboundConnection struct { +} + +func (*validateOpDeleteOutboundConnection) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteOutboundConnection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteOutboundConnectionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteOutboundConnectionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeletePackage struct { +} + +func (*validateOpDeletePackage) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeletePackage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeletePackageInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeletePackageInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeDomainAutoTunes struct { +} + +func (*validateOpDescribeDomainAutoTunes) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeDomainAutoTunes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeDomainAutoTunesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeDomainAutoTunesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeDomainConfig struct { +} + +func (*validateOpDescribeDomainConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeDomainConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeDomainConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeDomainConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeDomain struct { +} + +func (*validateOpDescribeDomain) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeDomain) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeDomainInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeDomainInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeDomains struct { +} + +func (*validateOpDescribeDomains) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeDomains) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeDomainsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeDomainsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeInstanceTypeLimits struct { +} + +func (*validateOpDescribeInstanceTypeLimits) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeInstanceTypeLimits) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeInstanceTypeLimitsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeInstanceTypeLimitsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDissociatePackage struct { +} + +func (*validateOpDissociatePackage) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDissociatePackage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DissociatePackageInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDissociatePackageInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetPackageVersionHistory struct { +} + +func (*validateOpGetPackageVersionHistory) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetPackageVersionHistory) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetPackageVersionHistoryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetPackageVersionHistoryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetUpgradeHistory struct { +} + +func (*validateOpGetUpgradeHistory) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetUpgradeHistory) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetUpgradeHistoryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetUpgradeHistoryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetUpgradeStatus struct { +} + +func (*validateOpGetUpgradeStatus) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetUpgradeStatus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetUpgradeStatusInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetUpgradeStatusInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListDomainsForPackage struct { +} + +func (*validateOpListDomainsForPackage) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListDomainsForPackage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListDomainsForPackageInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListDomainsForPackageInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListInstanceTypeDetails struct { +} + +func (*validateOpListInstanceTypeDetails) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListInstanceTypeDetails) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListInstanceTypeDetailsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListInstanceTypeDetailsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListPackagesForDomain struct { +} + +func (*validateOpListPackagesForDomain) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListPackagesForDomain) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListPackagesForDomainInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListPackagesForDomainInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListTags struct { +} + +func (*validateOpListTags) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListTagsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListTagsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPurchaseReservedInstanceOffering struct { +} + +func (*validateOpPurchaseReservedInstanceOffering) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPurchaseReservedInstanceOffering) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PurchaseReservedInstanceOfferingInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPurchaseReservedInstanceOfferingInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpRejectInboundConnection struct { +} + +func (*validateOpRejectInboundConnection) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRejectInboundConnection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RejectInboundConnectionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRejectInboundConnectionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpRemoveTags struct { +} + +func (*validateOpRemoveTags) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRemoveTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RemoveTagsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRemoveTagsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStartServiceSoftwareUpdate struct { +} + +func (*validateOpStartServiceSoftwareUpdate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartServiceSoftwareUpdate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartServiceSoftwareUpdateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartServiceSoftwareUpdateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateDomainConfig struct { +} + +func (*validateOpUpdateDomainConfig) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateDomainConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateDomainConfigInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateDomainConfigInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdatePackage struct { +} + +func (*validateOpUpdatePackage) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdatePackage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdatePackageInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdatePackageInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpgradeDomain struct { +} + +func (*validateOpUpgradeDomain) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpgradeDomain) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpgradeDomainInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpgradeDomainInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpAcceptInboundConnectionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAcceptInboundConnection{}, middleware.After) +} + +func addOpAddTagsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAddTags{}, middleware.After) +} + +func addOpAssociatePackageValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssociatePackage{}, middleware.After) +} + +func addOpCancelServiceSoftwareUpdateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCancelServiceSoftwareUpdate{}, middleware.After) +} + +func addOpCreateDomainValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateDomain{}, middleware.After) +} + +func addOpCreateOutboundConnectionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateOutboundConnection{}, middleware.After) +} + +func addOpCreatePackageValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreatePackage{}, middleware.After) +} + +func addOpDeleteDomainValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteDomain{}, middleware.After) +} + +func addOpDeleteInboundConnectionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteInboundConnection{}, middleware.After) +} + +func addOpDeleteOutboundConnectionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteOutboundConnection{}, middleware.After) +} + +func addOpDeletePackageValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeletePackage{}, middleware.After) +} + +func addOpDescribeDomainAutoTunesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeDomainAutoTunes{}, middleware.After) +} + +func addOpDescribeDomainConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeDomainConfig{}, middleware.After) +} + +func addOpDescribeDomainValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeDomain{}, middleware.After) +} + +func addOpDescribeDomainsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeDomains{}, middleware.After) +} + +func addOpDescribeInstanceTypeLimitsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeInstanceTypeLimits{}, middleware.After) +} + +func addOpDissociatePackageValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDissociatePackage{}, middleware.After) +} + +func addOpGetPackageVersionHistoryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetPackageVersionHistory{}, middleware.After) +} + +func addOpGetUpgradeHistoryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetUpgradeHistory{}, middleware.After) +} + +func addOpGetUpgradeStatusValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetUpgradeStatus{}, middleware.After) +} + +func addOpListDomainsForPackageValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListDomainsForPackage{}, middleware.After) +} + +func addOpListInstanceTypeDetailsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListInstanceTypeDetails{}, middleware.After) +} + +func addOpListPackagesForDomainValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListPackagesForDomain{}, middleware.After) +} + +func addOpListTagsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTags{}, middleware.After) +} + +func addOpPurchaseReservedInstanceOfferingValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPurchaseReservedInstanceOffering{}, middleware.After) +} + +func addOpRejectInboundConnectionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRejectInboundConnection{}, middleware.After) +} + +func addOpRemoveTagsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRemoveTags{}, middleware.After) +} + +func addOpStartServiceSoftwareUpdateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartServiceSoftwareUpdate{}, middleware.After) +} + +func addOpUpdateDomainConfigValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateDomainConfig{}, middleware.After) +} + +func addOpUpdatePackageValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdatePackage{}, middleware.After) +} + +func addOpUpgradeDomainValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpgradeDomain{}, middleware.After) +} + +func validateAdvancedSecurityOptionsInput(v *types.AdvancedSecurityOptionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AdvancedSecurityOptionsInput"} + if v.SAMLOptions != nil { + if err := validateSAMLOptionsInput(v.SAMLOptions); err != nil { + invalidParams.AddNested("SAMLOptions", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAWSDomainInformation(v *types.AWSDomainInformation) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AWSDomainInformation"} + if v.DomainName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateClusterConfig(v *types.ClusterConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ClusterConfig"} + if v.ColdStorageOptions != nil { + if err := validateColdStorageOptions(v.ColdStorageOptions); err != nil { + invalidParams.AddNested("ColdStorageOptions", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateColdStorageOptions(v *types.ColdStorageOptions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ColdStorageOptions"} + if v.Enabled == nil { + invalidParams.Add(smithy.NewErrParamRequired("Enabled")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateDomainInformationContainer(v *types.DomainInformationContainer) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DomainInformationContainer"} + if v.AWSDomainInformation != nil { + if err := validateAWSDomainInformation(v.AWSDomainInformation); err != nil { + invalidParams.AddNested("AWSDomainInformation", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSAMLIdp(v *types.SAMLIdp) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SAMLIdp"} + if v.MetadataContent == nil { + invalidParams.Add(smithy.NewErrParamRequired("MetadataContent")) + } + if v.EntityId == nil { + invalidParams.Add(smithy.NewErrParamRequired("EntityId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSAMLOptionsInput(v *types.SAMLOptionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SAMLOptionsInput"} + if v.Idp != nil { + if err := validateSAMLIdp(v.Idp); err != nil { + invalidParams.AddNested("Idp", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTag(v *types.Tag) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Tag"} + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTagList(v []types.Tag) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagList"} + for i := range v { + if err := validateTag(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpAcceptInboundConnectionInput(v *AcceptInboundConnectionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AcceptInboundConnectionInput"} + if v.ConnectionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConnectionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpAddTagsInput(v *AddTagsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AddTagsInput"} + if v.ARN == nil { + invalidParams.Add(smithy.NewErrParamRequired("ARN")) + } + if v.TagList == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagList")) + } else if v.TagList != nil { + if err := validateTagList(v.TagList); err != nil { + invalidParams.AddNested("TagList", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpAssociatePackageInput(v *AssociatePackageInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AssociatePackageInput"} + if v.PackageID == nil { + invalidParams.Add(smithy.NewErrParamRequired("PackageID")) + } + if v.DomainName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCancelServiceSoftwareUpdateInput(v *CancelServiceSoftwareUpdateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CancelServiceSoftwareUpdateInput"} + if v.DomainName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateDomainInput(v *CreateDomainInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateDomainInput"} + if v.DomainName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainName")) + } + if v.ClusterConfig != nil { + if err := validateClusterConfig(v.ClusterConfig); err != nil { + invalidParams.AddNested("ClusterConfig", err.(smithy.InvalidParamsError)) + } + } + if v.AdvancedSecurityOptions != nil { + if err := validateAdvancedSecurityOptionsInput(v.AdvancedSecurityOptions); err != nil { + invalidParams.AddNested("AdvancedSecurityOptions", err.(smithy.InvalidParamsError)) + } + } + if v.TagList != nil { + if err := validateTagList(v.TagList); err != nil { + invalidParams.AddNested("TagList", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateOutboundConnectionInput(v *CreateOutboundConnectionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateOutboundConnectionInput"} + if v.LocalDomainInfo == nil { + invalidParams.Add(smithy.NewErrParamRequired("LocalDomainInfo")) + } else if v.LocalDomainInfo != nil { + if err := validateDomainInformationContainer(v.LocalDomainInfo); err != nil { + invalidParams.AddNested("LocalDomainInfo", err.(smithy.InvalidParamsError)) + } + } + if v.RemoteDomainInfo == nil { + invalidParams.Add(smithy.NewErrParamRequired("RemoteDomainInfo")) + } else if v.RemoteDomainInfo != nil { + if err := validateDomainInformationContainer(v.RemoteDomainInfo); err != nil { + invalidParams.AddNested("RemoteDomainInfo", err.(smithy.InvalidParamsError)) + } + } + if v.ConnectionAlias == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConnectionAlias")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreatePackageInput(v *CreatePackageInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreatePackageInput"} + if v.PackageName == nil { + invalidParams.Add(smithy.NewErrParamRequired("PackageName")) + } + if len(v.PackageType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("PackageType")) + } + if v.PackageSource == nil { + invalidParams.Add(smithy.NewErrParamRequired("PackageSource")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteDomainInput(v *DeleteDomainInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteDomainInput"} + if v.DomainName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteInboundConnectionInput(v *DeleteInboundConnectionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteInboundConnectionInput"} + if v.ConnectionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConnectionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteOutboundConnectionInput(v *DeleteOutboundConnectionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteOutboundConnectionInput"} + if v.ConnectionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConnectionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeletePackageInput(v *DeletePackageInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeletePackageInput"} + if v.PackageID == nil { + invalidParams.Add(smithy.NewErrParamRequired("PackageID")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeDomainAutoTunesInput(v *DescribeDomainAutoTunesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeDomainAutoTunesInput"} + if v.DomainName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeDomainConfigInput(v *DescribeDomainConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeDomainConfigInput"} + if v.DomainName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeDomainInput(v *DescribeDomainInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeDomainInput"} + if v.DomainName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeDomainsInput(v *DescribeDomainsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeDomainsInput"} + if v.DomainNames == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainNames")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeInstanceTypeLimitsInput(v *DescribeInstanceTypeLimitsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeInstanceTypeLimitsInput"} + if len(v.InstanceType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("InstanceType")) + } + if v.EngineVersion == nil { + invalidParams.Add(smithy.NewErrParamRequired("EngineVersion")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDissociatePackageInput(v *DissociatePackageInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DissociatePackageInput"} + if v.PackageID == nil { + invalidParams.Add(smithy.NewErrParamRequired("PackageID")) + } + if v.DomainName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetPackageVersionHistoryInput(v *GetPackageVersionHistoryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetPackageVersionHistoryInput"} + if v.PackageID == nil { + invalidParams.Add(smithy.NewErrParamRequired("PackageID")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetUpgradeHistoryInput(v *GetUpgradeHistoryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetUpgradeHistoryInput"} + if v.DomainName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetUpgradeStatusInput(v *GetUpgradeStatusInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetUpgradeStatusInput"} + if v.DomainName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListDomainsForPackageInput(v *ListDomainsForPackageInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListDomainsForPackageInput"} + if v.PackageID == nil { + invalidParams.Add(smithy.NewErrParamRequired("PackageID")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListInstanceTypeDetailsInput(v *ListInstanceTypeDetailsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListInstanceTypeDetailsInput"} + if v.EngineVersion == nil { + invalidParams.Add(smithy.NewErrParamRequired("EngineVersion")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListPackagesForDomainInput(v *ListPackagesForDomainInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListPackagesForDomainInput"} + if v.DomainName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListTagsInput(v *ListTagsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListTagsInput"} + if v.ARN == nil { + invalidParams.Add(smithy.NewErrParamRequired("ARN")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPurchaseReservedInstanceOfferingInput(v *PurchaseReservedInstanceOfferingInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PurchaseReservedInstanceOfferingInput"} + if v.ReservedInstanceOfferingId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ReservedInstanceOfferingId")) + } + if v.ReservationName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ReservationName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpRejectInboundConnectionInput(v *RejectInboundConnectionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RejectInboundConnectionInput"} + if v.ConnectionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConnectionId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpRemoveTagsInput(v *RemoveTagsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RemoveTagsInput"} + if v.ARN == nil { + invalidParams.Add(smithy.NewErrParamRequired("ARN")) + } + if v.TagKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStartServiceSoftwareUpdateInput(v *StartServiceSoftwareUpdateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartServiceSoftwareUpdateInput"} + if v.DomainName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateDomainConfigInput(v *UpdateDomainConfigInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateDomainConfigInput"} + if v.DomainName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainName")) + } + if v.ClusterConfig != nil { + if err := validateClusterConfig(v.ClusterConfig); err != nil { + invalidParams.AddNested("ClusterConfig", err.(smithy.InvalidParamsError)) + } + } + if v.AdvancedSecurityOptions != nil { + if err := validateAdvancedSecurityOptionsInput(v.AdvancedSecurityOptions); err != nil { + invalidParams.AddNested("AdvancedSecurityOptions", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdatePackageInput(v *UpdatePackageInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdatePackageInput"} + if v.PackageID == nil { + invalidParams.Add(smithy.NewErrParamRequired("PackageID")) + } + if v.PackageSource == nil { + invalidParams.Add(smithy.NewErrParamRequired("PackageSource")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpgradeDomainInput(v *UpgradeDomainInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpgradeDomainInput"} + if v.DomainName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DomainName")) + } + if v.TargetVersion == nil { + invalidParams.Add(smithy.NewErrParamRequired("TargetVersion")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/outposts/api_op_CreateOrder.go b/service/outposts/api_op_CreateOrder.go new file mode 100644 index 00000000000..dd948820f93 --- /dev/null +++ b/service/outposts/api_op_CreateOrder.go @@ -0,0 +1,134 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package outposts + +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/outposts/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an order for an Outpost. +func (c *Client) CreateOrder(ctx context.Context, params *CreateOrderInput, optFns ...func(*Options)) (*CreateOrderOutput, error) { + if params == nil { + params = &CreateOrderInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateOrder", params, optFns, c.addOperationCreateOrderMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateOrderOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateOrderInput struct { + + // The line items that make up the order. + // + // This member is required. + LineItems []types.LineItemRequest + + // The ID or the Amazon Resource Name (ARN) of the Outpost. + // + // This member is required. + OutpostIdentifier *string + + // The payment option for the order. + // + // This member is required. + PaymentOption types.PaymentOption + + // The payment terms for the order. + PaymentTerm types.PaymentTerm + + noSmithyDocumentSerde +} + +type CreateOrderOutput struct { + + // Information about this order. + Order *types.Order + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateOrderMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateOrder{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateOrder{}, 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 = addOpCreateOrderValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateOrder(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_opCreateOrder(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "outposts", + OperationName: "CreateOrder", + } +} diff --git a/service/outposts/deserializers.go b/service/outposts/deserializers.go index 92d2227b866..a37ef5e73e8 100644 --- a/service/outposts/deserializers.go +++ b/service/outposts/deserializers.go @@ -13,11 +13,174 @@ import ( smithyio "github.com/aws/smithy-go/io" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" + smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "strings" ) +type awsRestjson1_deserializeOpCreateOrder struct { +} + +func (*awsRestjson1_deserializeOpCreateOrder) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateOrder) 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_deserializeOpErrorCreateOrder(response, &metadata) + } + output := &CreateOrderOutput{} + 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_deserializeOpDocumentCreateOrderOutput(&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_deserializeOpErrorCreateOrder(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("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateOrderOutput(v **CreateOrderOutput, 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 *CreateOrderOutput + if *v == nil { + sv = &CreateOrderOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Order": + if err := awsRestjson1_deserializeDocumentOrder(&sv.Order, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpCreateOutpost struct { } @@ -1792,6 +1955,111 @@ func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalS return nil } +func awsRestjson1_deserializeDocumentLineItem(v **types.LineItem, 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.LineItem + if *v == nil { + sv = &types.LineItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CatalogItemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SkuCode to be of type string, got %T instead", value) + } + sv.CatalogItemId = ptr.String(jtv) + } + + case "LineItemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LineItemId to be of type string, got %T instead", value) + } + sv.LineItemId = ptr.String(jtv) + } + + case "Quantity": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected LineItemQuantity to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Quantity = int32(i64) + } + + 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 awsRestjson1_deserializeDocumentLineItemListDefinition(v *[]types.LineItem, 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.LineItem + if *v == nil { + cv = []types.LineItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.LineItem + destAddr := &col + if err := awsRestjson1_deserializeDocumentLineItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentNotFoundException(v **types.NotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -1832,6 +2100,110 @@ func awsRestjson1_deserializeDocumentNotFoundException(v **types.NotFoundExcepti return nil } +func awsRestjson1_deserializeDocumentOrder(v **types.Order, 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.Order + if *v == nil { + sv = &types.Order{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LineItems": + if err := awsRestjson1_deserializeDocumentLineItemListDefinition(&sv.LineItems, value); err != nil { + return err + } + + case "OrderFulfilledDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.OrderFulfilledDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected ISO8601Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "OrderId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OrderId to be of type string, got %T instead", value) + } + sv.OrderId = ptr.String(jtv) + } + + case "OrderSubmissionDate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.OrderSubmissionDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected ISO8601Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "OutpostId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OutpostIdOnly to be of type string, got %T instead", value) + } + sv.OutpostId = ptr.String(jtv) + } + + case "PaymentOption": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaymentOption to be of type string, got %T instead", value) + } + sv.PaymentOption = types.PaymentOption(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OrderStatus to be of type string, got %T instead", value) + } + sv.Status = types.OrderStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentOutpost(v **types.Outpost, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/outposts/generated.json b/service/outposts/generated.json index 879426ae50a..cb625eef57a 100644 --- a/service/outposts/generated.json +++ b/service/outposts/generated.json @@ -5,6 +5,7 @@ }, "files": [ "api_client.go", + "api_op_CreateOrder.go", "api_op_CreateOutpost.go", "api_op_DeleteOutpost.go", "api_op_DeleteSite.go", diff --git a/service/outposts/serializers.go b/service/outposts/serializers.go index 693761c2597..b68119f5d59 100644 --- a/service/outposts/serializers.go +++ b/service/outposts/serializers.go @@ -6,6 +6,7 @@ import ( "bytes" "context" "fmt" + "github.com/aws/aws-sdk-go-v2/service/outposts/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" smithyjson "github.com/aws/smithy-go/encoding/json" @@ -13,6 +14,91 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) +type awsRestjson1_serializeOpCreateOrder struct { +} + +func (*awsRestjson1_serializeOpCreateOrder) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateOrder) 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.(*CreateOrderInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/orders") + 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_serializeOpDocumentCreateOrderInput(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_serializeOpHttpBindingsCreateOrderInput(v *CreateOrderInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateOrderInput(v *CreateOrderInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LineItems != nil { + ok := object.Key("LineItems") + if err := awsRestjson1_serializeDocumentLineItemRequestListDefinition(v.LineItems, ok); err != nil { + return err + } + } + + if v.OutpostIdentifier != nil { + ok := object.Key("OutpostIdentifier") + ok.String(*v.OutpostIdentifier) + } + + if len(v.PaymentOption) > 0 { + ok := object.Key("PaymentOption") + ok.String(string(v.PaymentOption)) + } + + if len(v.PaymentTerm) > 0 { + ok := object.Key("PaymentTerm") + ok.String(string(v.PaymentTerm)) + } + + return nil +} + type awsRestjson1_serializeOpCreateOutpost struct { } @@ -685,6 +771,36 @@ func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInpu return nil } +func awsRestjson1_serializeDocumentLineItemRequest(v *types.LineItemRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CatalogItemId != nil { + ok := object.Key("CatalogItemId") + ok.String(*v.CatalogItemId) + } + + if v.Quantity != 0 { + ok := object.Key("Quantity") + ok.Integer(v.Quantity) + } + + return nil +} + +func awsRestjson1_serializeDocumentLineItemRequestListDefinition(v []types.LineItemRequest, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentLineItemRequest(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentTagMap(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/outposts/types/enums.go b/service/outposts/types/enums.go index ae557a058bb..898fd74fb02 100644 --- a/service/outposts/types/enums.go +++ b/service/outposts/types/enums.go @@ -2,6 +2,68 @@ package types +type OrderStatus string + +// Enum values for OrderStatus +const ( + OrderStatusReceived OrderStatus = "RECEIVED" + OrderStatusPending OrderStatus = "PENDING" + OrderStatusProcessing OrderStatus = "PROCESSING" + OrderStatusInstalling OrderStatus = "INSTALLING" + OrderStatusFulfilled OrderStatus = "FULFILLED" + OrderStatusCancelled OrderStatus = "CANCELLED" +) + +// Values returns all known values for OrderStatus. 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 (OrderStatus) Values() []OrderStatus { + return []OrderStatus{ + "RECEIVED", + "PENDING", + "PROCESSING", + "INSTALLING", + "FULFILLED", + "CANCELLED", + } +} + +type PaymentOption string + +// Enum values for PaymentOption +const ( + PaymentOptionAllUpfront PaymentOption = "ALL_UPFRONT" + PaymentOptionNoUpfront PaymentOption = "NO_UPFRONT" + PaymentOptionPartialUpfront PaymentOption = "PARTIAL_UPFRONT" +) + +// Values returns all known values for PaymentOption. 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 (PaymentOption) Values() []PaymentOption { + return []PaymentOption{ + "ALL_UPFRONT", + "NO_UPFRONT", + "PARTIAL_UPFRONT", + } +} + +type PaymentTerm string + +// Enum values for PaymentTerm +const ( + PaymentTermThreeYears PaymentTerm = "THREE_YEARS" +) + +// Values returns all known values for PaymentTerm. 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 (PaymentTerm) Values() []PaymentTerm { + return []PaymentTerm{ + "THREE_YEARS", + } +} + type ResourceType string // Enum values for ResourceType diff --git a/service/outposts/types/types.go b/service/outposts/types/types.go index 36f7fd840c5..c21f23272ca 100644 --- a/service/outposts/types/types.go +++ b/service/outposts/types/types.go @@ -4,6 +4,7 @@ package types import ( smithydocument "github.com/aws/smithy-go/document" + "time" ) // Information about an instance type. @@ -15,6 +16,63 @@ type InstanceTypeItem struct { noSmithyDocumentSerde } +// Information about a line item. +type LineItem struct { + + // The ID of the catalog item. + CatalogItemId *string + + // The ID of the line item. + LineItemId *string + + // The quantity of the line item. + Quantity int32 + + // The status of the line item. + Status *string + + noSmithyDocumentSerde +} + +// Information about a line item request. +type LineItemRequest struct { + + // The ID of the catalog item. + CatalogItemId *string + + // The quantity of a line item request. + Quantity int32 + + noSmithyDocumentSerde +} + +// Information about an order. +type Order struct { + + // The line items for the order + LineItems []LineItem + + // The fulfillment date of the order. + OrderFulfilledDate *time.Time + + // The ID of the order. + OrderId *string + + // The submission date for the order. + OrderSubmissionDate *time.Time + + // The ID of the Outpost. + OutpostId *string + + // The payment option for the order. + PaymentOption PaymentOption + + // The status of the order + Status OrderStatus + + noSmithyDocumentSerde +} + // Information about an Outpost. type Outpost struct { diff --git a/service/outposts/validators.go b/service/outposts/validators.go index 2ed8706d44e..8c11dd86fdd 100644 --- a/service/outposts/validators.go +++ b/service/outposts/validators.go @@ -9,6 +9,26 @@ import ( "github.com/aws/smithy-go/middleware" ) +type validateOpCreateOrder struct { +} + +func (*validateOpCreateOrder) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateOrder) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateOrderInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateOrderInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateOutpost struct { } @@ -169,6 +189,10 @@ func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +func addOpCreateOrderValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateOrder{}, middleware.After) +} + func addOpCreateOutpostValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateOutpost{}, middleware.After) } @@ -201,6 +225,27 @@ func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) } +func validateOpCreateOrderInput(v *CreateOrderInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateOrderInput"} + if v.OutpostIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("OutpostIdentifier")) + } + if v.LineItems == nil { + invalidParams.Add(smithy.NewErrParamRequired("LineItems")) + } + if len(v.PaymentOption) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("PaymentOption")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateOutpostInput(v *CreateOutpostInput) error { if v == nil { return nil diff --git a/service/ram/api_op_AcceptResourceShareInvitation.go b/service/ram/api_op_AcceptResourceShareInvitation.go index 2583a3ad251..c1b19e53f15 100644 --- a/service/ram/api_op_AcceptResourceShareInvitation.go +++ b/service/ram/api_op_AcceptResourceShareInvitation.go @@ -11,7 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Accepts an invitation to a resource share from another AWS account. +// Accepts an invitation to a resource share from another Amazon Web Services +// account. func (c *Client) AcceptResourceShareInvitation(ctx context.Context, params *AcceptResourceShareInvitationInput, optFns ...func(*Options)) (*AcceptResourceShareInvitationOutput, error) { if params == nil { params = &AcceptResourceShareInvitationInput{} diff --git a/service/ram/api_op_AssociateResourceShare.go b/service/ram/api_op_AssociateResourceShare.go index 607e1a612f7..934b6ce9c8e 100644 --- a/service/ram/api_op_AssociateResourceShare.go +++ b/service/ram/api_op_AssociateResourceShare.go @@ -39,12 +39,29 @@ type AssociateResourceShareInput struct { // of the request. ClientToken *string - // The principals to associate with the resource share. The possible values are IDs - // of AWS accounts, and the ARNs of organizational units (OU) or organizations from - // AWS Organizations. + // The principals to associate with the resource share. The possible values are: + // + // * + // An Amazon Web Services account ID + // + // * An Amazon Resource Name (ARN) of an + // organization in Organizations + // + // * An ARN of an organizational unit (OU) in + // Organizations + // + // * An ARN of an IAM role + // + // * An ARN of an IAM user + // + // Not all + // resource types can be shared with IAM roles and IAM users. For more information, + // see Sharing with IAM roles and IAM users + // (https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types) + // in the Resource Access Manager User Guide. Principals []string - // The Amazon Resource Names (ARN) of the resources. + // The Amazon Resource Names (ARNs) of the resources. ResourceArns []string noSmithyDocumentSerde diff --git a/service/ram/api_op_AssociateResourceSharePermission.go b/service/ram/api_op_AssociateResourceSharePermission.go index 9cc86fcfb35..5d815fbfecd 100644 --- a/service/ram/api_op_AssociateResourceSharePermission.go +++ b/service/ram/api_op_AssociateResourceSharePermission.go @@ -28,7 +28,7 @@ func (c *Client) AssociateResourceSharePermission(ctx context.Context, params *A type AssociateResourceSharePermissionInput struct { - // The Amazon Resource Name (ARN) of the AWS RAM permissions to associate with the + // The Amazon Resource Name (ARN) of the RAM permission to associate with the // resource share. // // This member is required. @@ -43,7 +43,7 @@ type AssociateResourceSharePermissionInput struct { // of the request. ClientToken *string - // The version of the AWS RAM permissions to associate with the resource share. + // The version of the RAM permissions to associate with the resource share. PermissionVersion *int32 // Indicates whether the permission should replace the permissions that are diff --git a/service/ram/api_op_CreateResourceShare.go b/service/ram/api_op_CreateResourceShare.go index e3174372ccb..a52b066f7ae 100644 --- a/service/ram/api_op_CreateResourceShare.go +++ b/service/ram/api_op_CreateResourceShare.go @@ -11,7 +11,12 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Creates a resource share. +// Creates a resource share. You must provide a list of the Amazon Resource Names +// (ARNs) for the resources you want to share. You must also specify who you want +// to share the resources with, and the permissions that you grant them. Sharing a +// resource makes it available for use by principals outside of the Amazon Web +// Services account that created the resource. Sharing doesn't change any +// permissions or quotas that apply to the resource in the account that created it. func (c *Client) CreateResourceShare(ctx context.Context, params *CreateResourceShareInput, optFns ...func(*Options)) (*CreateResourceShareOutput, error) { if params == nil { params = &CreateResourceShareInput{} @@ -34,25 +39,44 @@ type CreateResourceShareInput struct { // This member is required. Name *string - // Indicates whether principals outside your AWS organization can be associated - // with a resource share. + // Indicates whether principals outside your organization in Organizations can be + // associated with a resource share. AllowExternalPrincipals *bool // A unique, case-sensitive identifier that you provide to ensure the idempotency // of the request. ClientToken *string - // The ARNs of the permissions to associate with the resource share. If you do not - // specify an ARN for the permission, AWS RAM automatically attaches the default - // version of the permission for each resource type. + // The Amazon Resource Names (ARNs) of the permissions to associate with the + // resource share. If you do not specify an ARN for the permission, RAM + // automatically attaches the default version of the permission for each resource + // type. Only one permission can be associated with each resource type in a + // resource share. PermissionArns []string - // The principals to associate with the resource share. The possible values are IDs - // of AWS accounts, the ARN of an OU or organization from AWS Organizations. + // The principals to associate with the resource share. The possible values are: + // + // * + // An Amazon Web Services account ID + // + // * An Amazon Resource Name (ARN) of an + // organization in Organizations + // + // * An ARN of an organizational unit (OU) in + // Organizations + // + // * An ARN of an IAM role + // + // * An ARN of an IAM user + // + // Not all + // resource types can be shared with IAM roles and IAM users. For more information, + // see Sharing with IAM roles and IAM users + // (https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types) + // in the Resource Access Manager User Guide. Principals []string - // The Amazon Resource Names (ARN) of the resources to associate with the resource - // share. + // The ARNs of the resources to associate with the resource share. ResourceArns []string // One or more tags. diff --git a/service/ram/api_op_DisassociateResourceSharePermission.go b/service/ram/api_op_DisassociateResourceSharePermission.go index 85cf59e3223..6851da9f020 100644 --- a/service/ram/api_op_DisassociateResourceSharePermission.go +++ b/service/ram/api_op_DisassociateResourceSharePermission.go @@ -10,7 +10,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Disassociates an AWS RAM permission from a resource share. +// Disassociates an RAM permission from a resource share. func (c *Client) DisassociateResourceSharePermission(ctx context.Context, params *DisassociateResourceSharePermissionInput, optFns ...func(*Options)) (*DisassociateResourceSharePermissionOutput, error) { if params == nil { params = &DisassociateResourceSharePermissionInput{} @@ -28,7 +28,8 @@ func (c *Client) DisassociateResourceSharePermission(ctx context.Context, params type DisassociateResourceSharePermissionInput struct { - // The ARN of the permission to disassociate from the resource share. + // The Amazon Resource Name (ARN) of the permission to disassociate from the + // resource share. // // This member is required. PermissionArn *string diff --git a/service/ram/api_op_EnableSharingWithAwsOrganization.go b/service/ram/api_op_EnableSharingWithAwsOrganization.go index 915a9d56632..beb58e708bb 100644 --- a/service/ram/api_op_EnableSharingWithAwsOrganization.go +++ b/service/ram/api_op_EnableSharingWithAwsOrganization.go @@ -10,8 +10,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Enables resource sharing within your AWS Organization. The caller must be the -// master account for the AWS Organization. +// Enables resource sharing within your organization in Organizations. The caller +// must be the master account for the organization. func (c *Client) EnableSharingWithAwsOrganization(ctx context.Context, params *EnableSharingWithAwsOrganizationInput, optFns ...func(*Options)) (*EnableSharingWithAwsOrganizationOutput, error) { if params == nil { params = &EnableSharingWithAwsOrganizationInput{} diff --git a/service/ram/api_op_GetPermission.go b/service/ram/api_op_GetPermission.go index 99e01dedd91..f24357ba7c8 100644 --- a/service/ram/api_op_GetPermission.go +++ b/service/ram/api_op_GetPermission.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Gets the contents of an AWS RAM permission in JSON format. +// Gets the contents of an RAM permission in JSON format. func (c *Client) GetPermission(ctx context.Context, params *GetPermissionInput, optFns ...func(*Options)) (*GetPermissionOutput, error) { if params == nil { params = &GetPermissionInput{} @@ -29,7 +29,7 @@ func (c *Client) GetPermission(ctx context.Context, params *GetPermissionInput, type GetPermissionInput struct { - // The ARN of the permission. + // The Amazon Resource Name (ARN) of the permission. // // This member is required. PermissionArn *string diff --git a/service/ram/api_op_GetResourcePolicies.go b/service/ram/api_op_GetResourcePolicies.go index e6ede0204e7..3376a8c02f6 100644 --- a/service/ram/api_op_GetResourcePolicies.go +++ b/service/ram/api_op_GetResourcePolicies.go @@ -29,7 +29,7 @@ func (c *Client) GetResourcePolicies(ctx context.Context, params *GetResourcePol type GetResourcePoliciesInput struct { - // The Amazon Resource Names (ARN) of the resources. + // The Amazon Resource Names (ARNs) of the resources. // // This member is required. ResourceArns []string diff --git a/service/ram/api_op_GetResourceShares.go b/service/ram/api_op_GetResourceShares.go index 071cd34326c..cc4c44ba21e 100644 --- a/service/ram/api_op_GetResourceShares.go +++ b/service/ram/api_op_GetResourceShares.go @@ -46,11 +46,11 @@ type GetResourceSharesInput struct { // The token for the next page of results. NextToken *string - // The Amazon Resource Name (ARN) of the AWS RAM permission that is associated with - // the resource share. + // The Amazon Resource Name (ARN) of the RAM permission that is associated with the + // resource share. PermissionArn *string - // The ARNs of the resource shares. + // The Amazon Resource Names (ARNs) of the resource shares. ResourceShareArns []string // The status of the resource share. diff --git a/service/ram/api_op_ListPermissions.go b/service/ram/api_op_ListPermissions.go index d8b99d88003..e692cfa8947 100644 --- a/service/ram/api_op_ListPermissions.go +++ b/service/ram/api_op_ListPermissions.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists the AWS RAM permissions. +// Lists the RAM permissions. func (c *Client) ListPermissions(ctx context.Context, params *ListPermissionsInput, optFns ...func(*Options)) (*ListPermissionsOutput, error) { if params == nil { params = &ListPermissionsInput{} diff --git a/service/ram/api_op_ListPrincipals.go b/service/ram/api_op_ListPrincipals.go index 553430d7c04..c4e8057e0b7 100644 --- a/service/ram/api_op_ListPrincipals.go +++ b/service/ram/api_op_ListPrincipals.go @@ -60,8 +60,9 @@ type ListPrincipalsInput struct { // glue:Catalog | glue:Database | glue:Table | license-manager:LicenseConfiguration // I network-firewall:FirewallPolicy | network-firewall:StatefulRuleGroup | // network-firewall:StatelessRuleGroup | outposts:Outpost | resource-groups:Group | - // rds:Cluster | route53resolver:ResolverQueryLogConfig | - // route53resolver:ResolverRule + // rds:Cluster | route53resolver:FirewallRuleGroup + // |route53resolver:ResolverQueryLogConfig | route53resolver:ResolverRule | + // s3-outposts:Outpost | ssm-contacts:Contact | ssm-incidents:ResponsePlan ResourceType *string noSmithyDocumentSerde diff --git a/service/ram/api_op_ListResourceSharePermissions.go b/service/ram/api_op_ListResourceSharePermissions.go index e7fb5ae64e4..61476c85416 100644 --- a/service/ram/api_op_ListResourceSharePermissions.go +++ b/service/ram/api_op_ListResourceSharePermissions.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists the AWS RAM permissions that are associated with a resource share. +// Lists the RAM permissions that are associated with a resource share. func (c *Client) ListResourceSharePermissions(ctx context.Context, params *ListResourceSharePermissionsInput, optFns ...func(*Options)) (*ListResourceSharePermissionsOutput, error) { if params == nil { params = &ListResourceSharePermissionsInput{} diff --git a/service/ram/api_op_ListResourceTypes.go b/service/ram/api_op_ListResourceTypes.go index 600f48c40d2..238bd2f1d85 100644 --- a/service/ram/api_op_ListResourceTypes.go +++ b/service/ram/api_op_ListResourceTypes.go @@ -12,7 +12,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists the shareable resource types supported by AWS RAM. +// Lists the shareable resource types supported by RAM. func (c *Client) ListResourceTypes(ctx context.Context, params *ListResourceTypesInput, optFns ...func(*Options)) (*ListResourceTypesOutput, error) { if params == nil { params = &ListResourceTypesInput{} @@ -46,7 +46,7 @@ type ListResourceTypesOutput struct { // there are no more results to return. NextToken *string - // The shareable resource types supported by AWS RAM. + // The shareable resource types supported by RAM. ResourceTypes []types.ServiceNameAndResourceType // Metadata pertaining to the operation's result. diff --git a/service/ram/api_op_ListResources.go b/service/ram/api_op_ListResources.go index 67d43fafee0..a6842996c4d 100644 --- a/service/ram/api_op_ListResources.go +++ b/service/ram/api_op_ListResources.go @@ -46,7 +46,7 @@ type ListResourcesInput struct { // The principal. Principal *string - // The Amazon Resource Names (ARN) of the resources. + // The Amazon Resource Names (ARNs) of the resources. ResourceArns []string // The Amazon Resource Names (ARN) of the resource shares. @@ -60,8 +60,9 @@ type ListResourcesInput struct { // glue:Catalog | glue:Database | glue:Table | license-manager:LicenseConfiguration // I network-firewall:FirewallPolicy | network-firewall:StatefulRuleGroup | // network-firewall:StatelessRuleGroup | outposts:Outpost | resource-groups:Group | - // rds:Cluster | route53resolver:ResolverQueryLogConfig | - // route53resolver:ResolverRule + // rds:Cluster | route53resolver:FirewallRuleGroup + // |route53resolver:ResolverQueryLogConfig | route53resolver:ResolverRule | + // s3-outposts:Outpost | ssm-contacts:Contact | ssm-incidents:ResponsePlan ResourceType *string noSmithyDocumentSerde diff --git a/service/ram/api_op_PromoteResourceShareCreatedFromPolicy.go b/service/ram/api_op_PromoteResourceShareCreatedFromPolicy.go index 9f2d9e0ca59..698619cdfdd 100644 --- a/service/ram/api_op_PromoteResourceShareCreatedFromPolicy.go +++ b/service/ram/api_op_PromoteResourceShareCreatedFromPolicy.go @@ -12,13 +12,13 @@ import ( // Resource shares that were created by attaching a policy to a resource are // visible only to the resource share owner, and the resource share cannot be -// modified in AWS RAM. Use this API action to promote the resource share. When you +// modified in RAM. Use this API action to promote the resource share. When you // promote the resource share, it becomes: // // * Visible to all principals that it is // shared with. // -// * Modifiable in AWS RAM. +// * Modifiable in RAM. func (c *Client) PromoteResourceShareCreatedFromPolicy(ctx context.Context, params *PromoteResourceShareCreatedFromPolicyInput, optFns ...func(*Options)) (*PromoteResourceShareCreatedFromPolicyOutput, error) { if params == nil { params = &PromoteResourceShareCreatedFromPolicyInput{} @@ -36,7 +36,7 @@ func (c *Client) PromoteResourceShareCreatedFromPolicy(ctx context.Context, para type PromoteResourceShareCreatedFromPolicyInput struct { - // The ARN of the resource share to promote. + // The Amazon Resource Name (ARN) of the resource share to promote. // // This member is required. ResourceShareArn *string diff --git a/service/ram/api_op_RejectResourceShareInvitation.go b/service/ram/api_op_RejectResourceShareInvitation.go index a235c968ac5..247f1807d4f 100644 --- a/service/ram/api_op_RejectResourceShareInvitation.go +++ b/service/ram/api_op_RejectResourceShareInvitation.go @@ -11,7 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Rejects an invitation to a resource share from another AWS account. +// Rejects an invitation to a resource share from another Amazon Web Services +// account. func (c *Client) RejectResourceShareInvitation(ctx context.Context, params *RejectResourceShareInvitationInput, optFns ...func(*Options)) (*RejectResourceShareInvitationOutput, error) { if params == nil { params = &RejectResourceShareInvitationInput{} diff --git a/service/ram/api_op_UpdateResourceShare.go b/service/ram/api_op_UpdateResourceShare.go index f750fc1990d..c7d65b3818f 100644 --- a/service/ram/api_op_UpdateResourceShare.go +++ b/service/ram/api_op_UpdateResourceShare.go @@ -34,8 +34,8 @@ type UpdateResourceShareInput struct { // This member is required. ResourceShareArn *string - // Indicates whether principals outside your AWS organization can be associated - // with a resource share. + // Indicates whether principals outside your organization in Organizations can be + // associated with a resource share. AllowExternalPrincipals *bool // A unique, case-sensitive identifier that you provide to ensure the idempotency diff --git a/service/ram/doc.go b/service/ram/doc.go index 6bd3b0168fb..3de049a7932 100644 --- a/service/ram/doc.go +++ b/service/ram/doc.go @@ -3,11 +3,18 @@ // Package ram provides the API client, operations, and parameter types for AWS // Resource Access Manager. // -// Use AWS Resource Access Manager to share AWS resources between AWS accounts. To -// share a resource, you create a resource share, associate the resource with the -// resource share, and specify the principals that can access the resources -// associated with the resource share. The following principals are supported: AWS -// accounts, organizational units (OU) from AWS Organizations, and organizations -// from AWS Organizations. For more information, see the AWS Resource Access -// Manager User Guide (https://docs.aws.amazon.com/ram/latest/userguide/). +// This is the Resource Access Manager API Reference. This documentation provides +// descriptions and syntax for each of the actions and data types in RAM. RAM is a +// service that helps you securely share your Amazon Web Services resources across +// Amazon Web Services accounts and within your organization or organizational +// units (OUs) in Organizations. For supported resource types, you can also share +// resources with IAM roles and IAM users. If you have multiple Amazon Web Services +// accounts, you can use RAM to share those resources with other accounts. To learn +// more about RAM, see the following resources: +// +// * Resource Access Manager product +// page (http://aws.amazon.com/ram) +// +// * Resource Access Manager User Guide +// (https://docs.aws.amazon.com/ram/latest/userguide/) package ram diff --git a/service/ram/types/types.go b/service/ram/types/types.go index 35ba9f20a16..18b7dd38737 100644 --- a/service/ram/types/types.go +++ b/service/ram/types/types.go @@ -7,14 +7,14 @@ import ( "time" ) -// Describes a principal for use with AWS Resource Access Manager. +// Describes a principal for use with Resource Access Manager. type Principal struct { // The time when the principal was associated with the resource share. CreationTime *time.Time - // Indicates whether the principal belongs to the same AWS organization as the AWS - // account that owns the resource share. + // Indicates whether the principal belongs to the same organization in + // Organizations as the Amazon Web Services account that owns the resource share. External *bool // The ID of the principal. @@ -41,8 +41,8 @@ type Resource struct { // The time when the association was last updated. LastUpdatedTime *time.Time - // The ARN of the resource group. This value is returned only if the resource is a - // resource group. + // The Amazon Resource Name (ARN) of the resource group. This value is returned + // only if the resource is a resource group. ResourceGroupArn *string // The Amazon Resource Name (ARN) of the resource share. @@ -63,8 +63,8 @@ type Resource struct { // Describes a resource share. type ResourceShare struct { - // Indicates whether principals outside your AWS organization can be associated - // with a resource share. + // Indicates whether principals outside your organization in Organizations can be + // associated with a resource share. AllowExternalPrincipals *bool // The time when the resource share was created. @@ -73,18 +73,19 @@ type ResourceShare struct { // Indicates how the resource share was created. Possible values include: // // * - // CREATED_FROM_POLICY - Indicates that the resource share was created from an AWS - // Identity and Access Management (AWS IAM) policy attached to a resource. These - // resource shares are visible only to the AWS account that created it. They cannot - // be modified in AWS RAM. + // CREATED_FROM_POLICY - Indicates that the resource share was created from an + // Amazon Web Services Identity and Access Management (Amazon Web Services IAM) + // policy attached to a resource. These resource shares are visible only to the + // Amazon Web Services account that created it. They cannot be modified in RAM. // - // * PROMOTING_TO_STANDARD - The resource share is in the - // process of being promoted. For more information, see - // PromoteResourceShareCreatedFromPolicy. + // * + // PROMOTING_TO_STANDARD - The resource share is in the process of being promoted. + // For more information, see PromoteResourceShareCreatedFromPolicy. // - // * STANDARD - Indicates that the resource - // share was created in AWS RAM using the console or APIs. These resource shares - // are visible to all principals. They can be modified in AWS RAM. + // * STANDARD - + // Indicates that the resource share was created in RAM using the console or APIs. + // These resource shares are visible to all principals. They can be modified in + // RAM. FeatureSet ResourceShareFeatureSet // The time when the resource share was last updated. @@ -93,7 +94,7 @@ type ResourceShare struct { // The name of the resource share. Name *string - // The ID of the AWS account that owns the resource share. + // The ID of the Amazon Web Services account that owns the resource share. OwningAccountId *string // The Amazon Resource Name (ARN) of the resource share. @@ -114,9 +115,21 @@ type ResourceShare struct { // Describes an association with a resource share. type ResourceShareAssociation struct { - // The associated entity. For resource associations, this is the ARN of the - // resource. For principal associations, this is the ID of an AWS account or the - // ARN of an OU or organization from AWS Organizations. + // The associated entity. For resource associations, this is the Amazon Resource + // Name (ARN) of the resource. For principal associations, this is one of the + // following: + // + // * An Amazon Web Services account ID + // + // * An ARN of an organization in + // Organizations + // + // * An ARN of an organizational unit (OU) in Organizations + // + // * An + // ARN of an IAM role + // + // * An ARN of an IAM user AssociatedEntity *string // The association type. @@ -125,8 +138,8 @@ type ResourceShareAssociation struct { // The time when the association was created. CreationTime *time.Time - // Indicates whether the principal belongs to the same AWS organization as the AWS - // account that owns the resource share. + // Indicates whether the principal belongs to the same organization in + // Organizations as the Amazon Web Services account that owns the resource share. External *bool // The time when the association was last updated. @@ -153,7 +166,7 @@ type ResourceShareInvitation struct { // The date and time when the invitation was sent. InvitationTimestamp *time.Time - // The ID of the AWS account that received the invitation. + // The ID of the Amazon Web Services account that received the invitation. ReceiverAccountId *string // The Amazon Resource Name (ARN) of the IAM user or IAM role that received the @@ -176,7 +189,7 @@ type ResourceShareInvitation struct { // The name of the resource share. ResourceShareName *string - // The ID of the AWS account that sent the invitation. + // The ID of the Amazon Web Services account that sent the invitation. SenderAccountId *string // The status of the invitation. @@ -185,10 +198,10 @@ type ResourceShareInvitation struct { noSmithyDocumentSerde } -// Information about an AWS RAM permission. +// Information about an RAM permission. type ResourceSharePermissionDetail struct { - // The ARN of the permission. + // The Amazon Resource Name (ARN) of the permission. Arn *string // The date and time when the permission was created. @@ -225,7 +238,7 @@ type ResourceSharePermissionDetail struct { // Information about a permission that is associated with a resource share. type ResourceSharePermissionSummary struct { - // The ARN of the permission. + // The Amazon Resource Name (ARN) of the permission. Arn *string // The date and time when the permission was created. @@ -257,14 +270,14 @@ type ResourceSharePermissionSummary struct { noSmithyDocumentSerde } -// Information about the shareable resource types and the AWS services to which -// they belong. +// Information about the shareable resource types and the Amazon Web Services +// services to which they belong. type ServiceNameAndResourceType struct { // The shareable resource types. ResourceType *string - // The name of the AWS services to which the resources belong. + // The name of the Amazon Web Services services to which the resources belong. ServiceName *string noSmithyDocumentSerde diff --git a/service/sagemaker/internal/endpoints/endpoints.go b/service/sagemaker/internal/endpoints/endpoints.go index 0322494588d..dedb5bbba69 100644 --- a/service/sagemaker/internal/endpoints/endpoints.go +++ b/service/sagemaker/internal/endpoints/endpoints.go @@ -67,6 +67,7 @@ var defaultPartitions = endpoints.Partitions{ "ap-east-1": endpoints.Endpoint{}, "ap-northeast-1": endpoints.Endpoint{}, "ap-northeast-2": endpoints.Endpoint{}, + "ap-northeast-3": endpoints.Endpoint{}, "ap-south-1": endpoints.Endpoint{}, "ap-southeast-1": endpoints.Endpoint{}, "ap-southeast-2": endpoints.Endpoint{}, diff --git a/service/servicediscovery/internal/endpoints/endpoints.go b/service/servicediscovery/internal/endpoints/endpoints.go index b08232968f0..2b4ea4d8aa5 100644 --- a/service/servicediscovery/internal/endpoints/endpoints.go +++ b/service/servicediscovery/internal/endpoints/endpoints.go @@ -134,5 +134,15 @@ var defaultPartitions = endpoints.Partitions{ }, RegionRegex: partitionRegexp.AwsUsGov, IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + "servicediscovery-fips": endpoints.Endpoint{ + Hostname: "servicediscovery-fips.us-gov-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-west-1", + }, + }, + "us-gov-east-1": endpoints.Endpoint{}, + "us-gov-west-1": endpoints.Endpoint{}, + }, }, } diff --git a/service/ssmcontacts/api_op_CreateContact.go b/service/ssmcontacts/api_op_CreateContact.go index 945978dcc90..245333d2b65 100644 --- a/service/ssmcontacts/api_op_CreateContact.go +++ b/service/ssmcontacts/api_op_CreateContact.go @@ -53,7 +53,8 @@ type CreateContactInput struct { // The full name of the contact or escalation plan. DisplayName *string - // A token ensuring that the action is called only once with the specified details. + // A token ensuring that the operation is called only once with the specified + // details. IdempotencyToken *string // Adds a tag to the target. You can only tag resources created in the first Region diff --git a/service/ssmcontacts/api_op_CreateContactChannel.go b/service/ssmcontacts/api_op_CreateContactChannel.go index 22569483f3f..43fe9b340cb 100644 --- a/service/ssmcontacts/api_op_CreateContactChannel.go +++ b/service/ssmcontacts/api_op_CreateContactChannel.go @@ -74,7 +74,8 @@ type CreateContactChannelInput struct { // activated. DeferActivation *bool - // A token ensuring that the action is called only once with the specified details. + // A token ensuring that the operation is called only once with the specified + // details. IdempotencyToken *string noSmithyDocumentSerde @@ -82,7 +83,7 @@ type CreateContactChannelInput struct { type CreateContactChannelOutput struct { - // The ARN of the contact channel. + // The Amazon Resource Name (ARN) of the contact channel. // // This member is required. ContactChannelArn *string diff --git a/service/ssmcontacts/api_op_SendActivationCode.go b/service/ssmcontacts/api_op_SendActivationCode.go index b164369232d..6efb4e2fc8d 100644 --- a/service/ssmcontacts/api_op_SendActivationCode.go +++ b/service/ssmcontacts/api_op_SendActivationCode.go @@ -11,8 +11,9 @@ import ( ) // Sends an activation code to a contact channel. The contact can use this code to -// activate the contact channel in the console or with the ActivateChannel action. -// Incident Manager can't engage a contact channel until it has been activated. +// activate the contact channel in the console or with the ActivateChannel +// operation. Incident Manager can't engage a contact channel until it has been +// activated. func (c *Client) SendActivationCode(ctx context.Context, params *SendActivationCodeInput, optFns ...func(*Options)) (*SendActivationCodeOutput, error) { if params == nil { params = &SendActivationCodeInput{} diff --git a/service/ssmcontacts/api_op_StartEngagement.go b/service/ssmcontacts/api_op_StartEngagement.go index 0b787851d34..8afadfdabb0 100644 --- a/service/ssmcontacts/api_op_StartEngagement.go +++ b/service/ssmcontacts/api_op_StartEngagement.go @@ -52,7 +52,8 @@ type StartEngagementInput struct { // This member is required. Subject *string - // A token ensuring that the action is called only once with the specified details. + // A token ensuring that the operation is called only once with the specified + // details. IdempotencyToken *string // The ARN of the incident that the engagement is part of. diff --git a/service/ssmcontacts/api_op_UpdateContactChannel.go b/service/ssmcontacts/api_op_UpdateContactChannel.go index a0aaaaa1d93..6f68788b94d 100644 --- a/service/ssmcontacts/api_op_UpdateContactChannel.go +++ b/service/ssmcontacts/api_op_UpdateContactChannel.go @@ -38,7 +38,7 @@ type UpdateContactChannelInput struct { // channel. DeliveryAddress *types.ContactChannelAddress - // The name of the contact channel + // The name of the contact channel. Name *string noSmithyDocumentSerde diff --git a/service/ssmcontacts/doc.go b/service/ssmcontacts/doc.go index b56d4c6d756..bb26eb9075d 100644 --- a/service/ssmcontacts/doc.go +++ b/service/ssmcontacts/doc.go @@ -3,12 +3,13 @@ // Package ssmcontacts provides the API client, operations, and parameter types for // AWS Systems Manager Incident Manager Contacts. // -// AWS Systems Manager Incident Manager is an incident management console designed -// to help users mitigate and recover from incidents affecting their AWS-hosted -// applications. An incident is any unplanned interruption or reduction in quality -// of services. Incident Manager increases incident resolution by notifying -// responders of impact, highlighting relevant troubleshooting data, and providing -// collaboration tools to get services back up and running. To achieve the primary -// goal of reducing the time-to-resolution of critical incidents, Incident Manager -// automates response plans and enables responder team escalation. +// Systems Manager Incident Manager is an incident management console designed to +// help users mitigate and recover from incidents affecting their Amazon Web +// Services-hosted applications. An incident is any unplanned interruption or +// reduction in quality of services. Incident Manager increases incident resolution +// by notifying responders of impact, highlighting relevant troubleshooting data, +// and providing collaboration tools to get services back up and running. To +// achieve the primary goal of reducing the time-to-resolution of critical +// incidents, Incident Manager automates response plans and enables responder team +// escalation. package ssmcontacts diff --git a/service/ssmcontacts/types/errors.go b/service/ssmcontacts/types/errors.go index 5af4078e74c..c48cc3d6b28 100644 --- a/service/ssmcontacts/types/errors.go +++ b/service/ssmcontacts/types/errors.go @@ -7,7 +7,7 @@ import ( smithy "github.com/aws/smithy-go" ) -// You don't have sufficient access to perform this action. +// You don't have sufficient access to perform this operation. type AccessDeniedException struct { Message *string @@ -48,7 +48,7 @@ func (e *ConflictException) ErrorMessage() string { func (e *ConflictException) ErrorCode() string { return "ConflictException" } func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The action failed to due an encryption key error. +// The operation failed to due an encryption key error. type DataEncryptionException struct { Message *string @@ -157,7 +157,8 @@ func (e *ThrottlingException) ErrorMessage() string { func (e *ThrottlingException) ErrorCode() string { return "ThrottlingException" } func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The input fails to satisfy the constraints specified by an AWS service. +// The input fails to satisfy the constraints specified by an Amazon Web Services +// service. type ValidationException struct { Message *string diff --git a/service/ssmcontacts/types/types.go b/service/ssmcontacts/types/types.go index a862533330b..12df38b090b 100644 --- a/service/ssmcontacts/types/types.go +++ b/service/ssmcontacts/types/types.go @@ -262,7 +262,7 @@ type Tag struct { noSmithyDocumentSerde } -// The contact or contact channel that is being engaged. +// The contact or contact channel that's being engaged. type Target struct { // Information about the contact channel Incident Manager is engaging. diff --git a/service/xray/api_op_CreateGroup.go b/service/xray/api_op_CreateGroup.go index f2e5bb15459..11dcb20b0d5 100644 --- a/service/xray/api_op_CreateGroup.go +++ b/service/xray/api_op_CreateGroup.go @@ -50,26 +50,27 @@ type CreateGroupInput struct { InsightsConfiguration *types.InsightsConfiguration // A map that contains one or more tag keys and tag values to attach to an X-Ray - // group. For more information about ways to use tags, see Tagging AWS resources - // (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) in the AWS - // General Reference. The following restrictions apply to tags: + // group. For more information about ways to use tags, see Tagging Amazon Web + // Services resources + // (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) in the Amazon + // Web Services General Reference. The following restrictions apply to tags: // - // * Maximum number - // of user-applied tags per resource: 50 + // * + // Maximum number of user-applied tags per resource: 50 // - // * Maximum tag key length: 128 Unicode - // characters + // * Maximum tag key length: + // 128 Unicode characters // // * Maximum tag value length: 256 Unicode characters // - // * Valid values - // for key and value: a-z, A-Z, 0-9, space, and the following characters: _ . : / = - // + - and @ + // * + // Valid values for key and value: a-z, A-Z, 0-9, space, and the following + // characters: _ . : / = + - and @ // // * Tag keys and values are case sensitive. // - // * Don't use aws: as a - // prefix for keys; it's reserved for AWS use. + // * + // Don't use aws: as a prefix for keys; it's reserved for Amazon Web Services use. Tags []types.Tag noSmithyDocumentSerde diff --git a/service/xray/api_op_CreateSamplingRule.go b/service/xray/api_op_CreateSamplingRule.go index 5b9c090074f..be0c89eb154 100644 --- a/service/xray/api_op_CreateSamplingRule.go +++ b/service/xray/api_op_CreateSamplingRule.go @@ -12,12 +12,14 @@ import ( ) // Creates a rule to control sampling behavior for instrumented applications. -// Services retrieve rules with GetSamplingRules, and evaluate each rule in -// ascending order of priority for each request. If a rule matches, the service -// records a trace, borrowing it from the reservoir size. After 10 seconds, the -// service reports back to X-Ray with GetSamplingTargets to get updated versions of -// each in-use rule. The updated rule contains a trace quota that the service can -// use instead of borrowing from the reservoir. +// Services retrieve rules with GetSamplingRules +// (https://docs.aws.amazon.com/xray/latest/api/API_GetSamplingRules.html), and +// evaluate each rule in ascending order of priority for each request. If a rule +// matches, the service records a trace, borrowing it from the reservoir size. +// After 10 seconds, the service reports back to X-Ray with GetSamplingTargets +// (https://docs.aws.amazon.com/xray/latest/api/API_GetSamplingTargets.html) to get +// updated versions of each in-use rule. The updated rule contains a trace quota +// that the service can use instead of borrowing from the reservoir. func (c *Client) CreateSamplingRule(ctx context.Context, params *CreateSamplingRuleInput, optFns ...func(*Options)) (*CreateSamplingRuleOutput, error) { if params == nil { params = &CreateSamplingRuleInput{} @@ -41,26 +43,27 @@ type CreateSamplingRuleInput struct { SamplingRule *types.SamplingRule // A map that contains one or more tag keys and tag values to attach to an X-Ray - // sampling rule. For more information about ways to use tags, see Tagging AWS - // resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) in - // the AWS General Reference. The following restrictions apply to tags: + // sampling rule. For more information about ways to use tags, see Tagging Amazon + // Web Services resources + // (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) in the Amazon + // Web Services General Reference. The following restrictions apply to tags: // - // * Maximum - // number of user-applied tags per resource: 50 + // * + // Maximum number of user-applied tags per resource: 50 // - // * Maximum tag key length: 128 - // Unicode characters + // * Maximum tag key length: + // 128 Unicode characters // // * Maximum tag value length: 256 Unicode characters // - // * Valid - // values for key and value: a-z, A-Z, 0-9, space, and the following characters: _ - // . : / = + - and @ + // * + // Valid values for key and value: a-z, A-Z, 0-9, space, and the following + // characters: _ . : / = + - and @ // // * Tag keys and values are case sensitive. // - // * Don't use aws: - // as a prefix for keys; it's reserved for AWS use. + // * + // Don't use aws: as a prefix for keys; it's reserved for Amazon Web Services use. Tags []types.Tag noSmithyDocumentSerde diff --git a/service/xray/api_op_GetInsightImpactGraph.go b/service/xray/api_op_GetInsightImpactGraph.go index e6004c1eae0..b85bd2bb6d8 100644 --- a/service/xray/api_op_GetInsightImpactGraph.go +++ b/service/xray/api_op_GetInsightImpactGraph.go @@ -75,7 +75,7 @@ type GetInsightImpactGraphOutput struct { // The time, in Unix seconds, at which the service graph started. ServiceGraphStartTime *time.Time - // The AWS instrumented services related to the insight. + // The Amazon Web Services instrumented services related to the insight. Services []types.InsightImpactGraphService // The provided start time. diff --git a/service/xray/api_op_GetSamplingTargets.go b/service/xray/api_op_GetSamplingTargets.go index afd3dfcbaad..a29dd7414ef 100644 --- a/service/xray/api_op_GetSamplingTargets.go +++ b/service/xray/api_op_GetSamplingTargets.go @@ -43,13 +43,17 @@ type GetSamplingTargetsOutput struct { // The last time a user changed the sampling rule configuration. If the sampling // rule configuration changed since the service last retrieved it, the service - // should call GetSamplingRules to get the latest version. + // should call GetSamplingRules + // (https://docs.aws.amazon.com/xray/latest/api/API_GetSamplingRules.html) to get + // the latest version. LastRuleModification *time.Time // Updated rules that the service should use to sample requests. SamplingTargetDocuments []types.SamplingTargetDocument - // Information about SamplingStatisticsDocument that X-Ray could not process. + // Information about SamplingStatisticsDocument + // (https://docs.aws.amazon.com/xray/latest/api/API_SamplingStatisticsDocument.html) + // that X-Ray could not process. UnprocessedStatistics []types.UnprocessedStatistics // Metadata pertaining to the operation's result. diff --git a/service/xray/api_op_GetServiceGraph.go b/service/xray/api_op_GetServiceGraph.go index 29a35bac36e..d7e1c35fb75 100644 --- a/service/xray/api_op_GetServiceGraph.go +++ b/service/xray/api_op_GetServiceGraph.go @@ -16,9 +16,9 @@ import ( // Retrieves a document that describes services that process incoming requests, and // downstream services that they call as a result. Root services process incoming // requests and make calls to downstream services. Root services are applications -// that use the AWS X-Ray SDK (https://docs.aws.amazon.com/xray/index.html). -// Downstream services can be other applications, AWS resources, HTTP web APIs, or -// SQL databases. +// that use the Amazon Web Services X-Ray SDK +// (https://docs.aws.amazon.com/xray/index.html). Downstream services can be other +// applications, Amazon Web Services resources, HTTP web APIs, or SQL databases. func (c *Client) GetServiceGraph(ctx context.Context, params *GetServiceGraphInput, optFns ...func(*Options)) (*GetServiceGraphOutput, error) { if params == nil { params = &GetServiceGraphInput{} diff --git a/service/xray/api_op_GetTraceSummaries.go b/service/xray/api_op_GetTraceSummaries.go index a6f0293411d..8259f7de7f5 100644 --- a/service/xray/api_op_GetTraceSummaries.go +++ b/service/xray/api_op_GetTraceSummaries.go @@ -23,7 +23,7 @@ import ( // a full list of indexed fields and keywords that you can use in filter // expressions, see Using Filter Expressions // (https://docs.aws.amazon.com/xray/latest/devguide/xray-console-filters.html) in -// the AWS X-Ray Developer Guide. +// the Amazon Web Services X-Ray Developer Guide. func (c *Client) GetTraceSummaries(ctx context.Context, params *GetTraceSummariesInput, optFns ...func(*Options)) (*GetTraceSummariesOutput, error) { if params == nil { params = &GetTraceSummariesInput{} diff --git a/service/xray/api_op_ListTagsForResource.go b/service/xray/api_op_ListTagsForResource.go index c3f15f2a6cd..4f48418be0d 100644 --- a/service/xray/api_op_ListTagsForResource.go +++ b/service/xray/api_op_ListTagsForResource.go @@ -11,8 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Returns a list of tags that are applied to the specified AWS X-Ray group or -// sampling rule. +// Returns a list of tags that are applied to the specified Amazon Web Services +// X-Ray group or sampling rule. func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { if params == nil { params = &ListTagsForResourceInput{} diff --git a/service/xray/api_op_PutEncryptionConfig.go b/service/xray/api_op_PutEncryptionConfig.go index 8492ef346b1..a86897eb229 100644 --- a/service/xray/api_op_PutEncryptionConfig.go +++ b/service/xray/api_op_PutEncryptionConfig.go @@ -35,17 +35,17 @@ type PutEncryptionConfigInput struct { // This member is required. Type types.EncryptionType - // An AWS KMS customer master key (CMK) in one of the following formats: + // An Amazon Web Services KMS key in one of the following formats: // - // * Alias - - // The name of the key. For example, alias/MyKey. + // * Alias - The + // name of the key. For example, alias/MyKey. // // * Key ID - The KMS key ID of the - // key. For example, ae4aa6d49-a4d8-9df9-a475-4ff6d7898456. AWS X-Ray does not - // support asymmetric CMKs. + // key. For example, ae4aa6d49-a4d8-9df9-a475-4ff6d7898456. Amazon Web Services + // X-Ray does not support asymmetric KMS keys. // - // * ARN - The full Amazon Resource Name of the key ID or - // alias. For example, + // * ARN - The full Amazon Resource + // Name of the key ID or alias. For example, // arn:aws:kms:us-east-2:123456789012:key/ae4aa6d49-a4d8-9df9-a475-4ff6d7898456. // Use this format to specify a key in a different account. // diff --git a/service/xray/api_op_PutTelemetryRecords.go b/service/xray/api_op_PutTelemetryRecords.go index 509d16b9df4..bd742eb7592 100644 --- a/service/xray/api_op_PutTelemetryRecords.go +++ b/service/xray/api_op_PutTelemetryRecords.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Used by the AWS X-Ray daemon to upload telemetry. +// Used by the Amazon Web Services X-Ray daemon to upload telemetry. func (c *Client) PutTelemetryRecords(ctx context.Context, params *PutTelemetryRecordsInput, optFns ...func(*Options)) (*PutTelemetryRecordsOutput, error) { if params == nil { params = &PutTelemetryRecordsInput{} diff --git a/service/xray/api_op_PutTraceSegments.go b/service/xray/api_op_PutTraceSegments.go index 501675cbcc5..95d0f818b1f 100644 --- a/service/xray/api_op_PutTraceSegments.go +++ b/service/xray/api_op_PutTraceSegments.go @@ -11,32 +11,32 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Uploads segment documents to AWS X-Ray. The X-Ray SDK +// Uploads segment documents to Amazon Web Services X-Ray. The X-Ray SDK // (https://docs.aws.amazon.com/xray/index.html) generates segment documents and // sends them to the X-Ray daemon, which uploads them in batches. A segment // document can be a completed segment, an in-progress segment, or an array of // subsegments. Segments must include the following fields. For the full segment -// document schema, see AWS X-Ray Segment Documents +// document schema, see Amazon Web Services X-Ray Segment Documents // (https://docs.aws.amazon.com/xray/latest/devguide/xray-api-segmentdocuments.html) -// in the AWS X-Ray Developer Guide. Required segment document fields +// in the Amazon Web Services X-Ray Developer Guide. Required segment document +// fields // -// * name - The -// name of the service that handled the request. +// * name - The name of the service that handled the request. // -// * id - A 64-bit identifier for -// the segment, unique among segments in the same trace, in 16 hexadecimal -// digits. +// * id - A +// 64-bit identifier for the segment, unique among segments in the same trace, in +// 16 hexadecimal digits. // -// * trace_id - A unique identifier that connects all segments and -// subsegments originating from a single client request. +// * trace_id - A unique identifier that connects all +// segments and subsegments originating from a single client request. // -// * start_time - Time the -// segment or subsegment was created, in floating point seconds in epoch time, -// accurate to milliseconds. For example, 1480615200.010 or 1.480615200010E9. +// * start_time +// - Time the segment or subsegment was created, in floating point seconds in epoch +// time, accurate to milliseconds. For example, 1480615200.010 or +// 1.480615200010E9. // -// * -// end_time - Time the segment or subsegment was closed. For example, -// 1480615200.090 or 1.480615200090E9. Specify either an end_time or +// * end_time - Time the segment or subsegment was closed. For +// example, 1480615200.090 or 1.480615200090E9. Specify either an end_time or // in_progress. // // * in_progress - Set to true instead of specifying an end_time to diff --git a/service/xray/api_op_TagResource.go b/service/xray/api_op_TagResource.go index 5ec26816fb7..9d0534a1c4e 100644 --- a/service/xray/api_op_TagResource.go +++ b/service/xray/api_op_TagResource.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Applies tags to an existing AWS X-Ray group or sampling rule. +// Applies tags to an existing Amazon Web Services X-Ray group or sampling rule. func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { if params == nil { params = &TagResourceInput{} @@ -36,8 +36,9 @@ type TagResourceInput struct { // A map that contains one or more tag keys and tag values to attach to an X-Ray // group or sampling rule. For more information about ways to use tags, see Tagging - // AWS resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) - // in the AWS General Reference. The following restrictions apply to tags: + // Amazon Web Services resources + // (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) in the Amazon + // Web Services General Reference. The following restrictions apply to tags: // // * // Maximum number of user-applied tags per resource: 50 @@ -54,8 +55,8 @@ type TagResourceInput struct { // * Tag keys and values are case sensitive. // // * - // Don't use aws: as a prefix for keys; it's reserved for AWS use. You cannot edit - // or delete system tags. + // Don't use aws: as a prefix for keys; it's reserved for Amazon Web Services use. + // You cannot edit or delete system tags. // // This member is required. Tags []types.Tag diff --git a/service/xray/api_op_UntagResource.go b/service/xray/api_op_UntagResource.go index 4080787740b..8f9409a3948 100644 --- a/service/xray/api_op_UntagResource.go +++ b/service/xray/api_op_UntagResource.go @@ -10,8 +10,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Removes tags from an AWS X-Ray group or sampling rule. You cannot edit or delete -// system tags (those with an aws: prefix). +// Removes tags from an Amazon Web Services X-Ray group or sampling rule. You +// cannot edit or delete system tags (those with an aws: prefix). func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { if params == nil { params = &UntagResourceInput{} diff --git a/service/xray/doc.go b/service/xray/doc.go index 2239d96e5dd..6c2b947c231 100644 --- a/service/xray/doc.go +++ b/service/xray/doc.go @@ -3,6 +3,6 @@ // Package xray provides the API client, operations, and parameter types for AWS // X-Ray. // -// AWS X-Ray provides APIs for managing debug traces and retrieving service maps -// and other data created by processing those traces. +// Amazon Web Services X-Ray provides APIs for managing debug traces and retrieving +// service maps and other data created by processing those traces. package xray diff --git a/service/xray/types/types.go b/service/xray/types/types.go index 36d47a03473..121f835cf97 100644 --- a/service/xray/types/types.go +++ b/service/xray/types/types.go @@ -150,14 +150,14 @@ type EdgeStatistics struct { // A configuration document that specifies encryption configuration settings. type EncryptionConfig struct { - // The ID of the customer master key (CMK) used for encryption, if applicable. + // The ID of the KMS key used for encryption, if applicable. KeyId *string // The encryption status. While the status is UPDATING, X-Ray may encrypt data with // a combination of the new and old settings. Status EncryptionStatus - // The type of encryption. Set to KMS for encryption with CMKs. Set to NONE for + // The type of encryption. Set to KMS for encryption with KMS keys. Set to NONE for // default encryption. Type EncryptionType @@ -328,7 +328,7 @@ type Group struct { // InsightsEnabled boolean can be set to true to enable insights for the group or // false to disable insights for the group. // - // * The NotifcationsEnabled boolean can + // * The NotificationsEnabled boolean can // be set to true to enable insights notifications through Amazon EventBridge for // the group. InsightsConfiguration *InsightsConfiguration @@ -480,7 +480,7 @@ type InsightImpactGraphEdge struct { // application used. type InsightImpactGraphService struct { - // Identifier of the AWS account in which the service runs. + // Identifier of the Amazon Web Services account in which the service runs. AccountId *string // Connections to downstream services. @@ -497,20 +497,22 @@ type InsightImpactGraphService struct { // Identifier for the service. Unique within the service map. // - // * AWS Resource - The - // type of an AWS resource. For example, AWS::EC2::Instance for an application - // running on Amazon EC2 or AWS::DynamoDB::Table for an Amazon DynamoDB table that - // the application used. + // * Amazon Web + // Services Resource - The type of an Amazon Web Services resource. For example, + // AWS::EC2::Instance for an application running on Amazon EC2 or + // AWS::DynamoDB::Table for an Amazon DynamoDB table that the application used. // - // * AWS Service - The type of an AWS service. For example, - // AWS::DynamoDB for downstream calls to Amazon DynamoDB that didn't target a - // specific table. + // * + // Amazon Web Services Service - The type of an Amazon Web Services service. For + // example, AWS::DynamoDB for downstream calls to Amazon DynamoDB that didn't + // target a specific table. // - // * AWS Service - The type of an AWS service. For example, - // AWS::DynamoDB for downstream calls to Amazon DynamoDB that didn't target a - // specific table. + // * Amazon Web Services Service - The type of an Amazon + // Web Services service. For example, AWS::DynamoDB for downstream calls to Amazon + // DynamoDB that didn't target a specific table. // - // * remote - A downstream service of indeterminate type. + // * remote - A downstream service + // of indeterminate type. Type *string noSmithyDocumentSerde @@ -708,7 +710,7 @@ type SamplingRule struct { // This member is required. ReservoirSize int32 - // Matches the ARN of the AWS resource on which the service runs. + // Matches the ARN of the Amazon Web Services resource on which the service runs. // // This member is required. ResourceARN *string @@ -747,7 +749,9 @@ type SamplingRule struct { noSmithyDocumentSerde } -// A SamplingRule and its metadata. +// A SamplingRule +// (https://docs.aws.amazon.com/xray/latest/api/API_SamplingRule.html) and its +// metadata. type SamplingRuleRecord struct { // When the rule was created. @@ -786,7 +790,7 @@ type SamplingRuleUpdate struct { // all services using the rule collectively. ReservoirSize *int32 - // Matches the ARN of the AWS resource on which the service runs. + // Matches the ARN of the Amazon Web Services resource on which the service runs. ResourceARN *string // The ARN of the sampling rule. Specify a rule by either name or ARN, but not @@ -811,7 +815,8 @@ type SamplingRuleUpdate struct { // Request sampling results for a single rule from a service. Results are for the // last 10 seconds unless the service has been assigned a longer reporting interval -// after a previous call to GetSamplingTargets. +// after a previous call to GetSamplingTargets +// (https://docs.aws.amazon.com/xray/latest/api/API_GetSamplingTargets.html). type SamplingStatisticsDocument struct { // A unique identifier for the service in hexadecimal. @@ -881,7 +886,8 @@ type SamplingStrategy struct { // Temporary changes to a sampling rule configuration. To meet the global sampling // target for a rule, X-Ray calculates a new reservoir for each service based on -// the recent sampling results of all services that called GetSamplingTargets. +// the recent sampling results of all services that called GetSamplingTargets +// (https://docs.aws.amazon.com/xray/latest/api/API_GetSamplingTargets.html). type SamplingTargetDocument struct { // The percentage of matching requests to instrument, after the reservoir is @@ -905,12 +911,13 @@ type SamplingTargetDocument struct { } // A segment from a trace that has been ingested by the X-Ray service. The segment -// can be compiled from documents uploaded with PutTraceSegments, or an inferred -// segment for a downstream service, generated from a subsegment sent by the -// service that called it. For the full segment document schema, see AWS X-Ray -// Segment Documents +// can be compiled from documents uploaded with PutTraceSegments +// (https://docs.aws.amazon.com/xray/latest/api/API_PutTraceSegments.html), or an +// inferred segment for a downstream service, generated from a subsegment sent by +// the service that called it. For the full segment document schema, see Amazon Web +// Services X-Ray Segment Documents // (https://docs.aws.amazon.com/xray/latest/devguide/xray-api-segmentdocuments.html) -// in the AWS X-Ray Developer Guide. +// in the Amazon Web Services X-Ray Developer Guide. type Segment struct { // The segment document. @@ -927,7 +934,7 @@ type Segment struct { // application used. type Service struct { - // Identifier of the AWS account in which the service runs. + // Identifier of the Amazon Web Services account in which the service runs. AccountId *string // A histogram that maps the spread of service durations. @@ -965,19 +972,20 @@ type Service struct { // The type of service. // - // * AWS Resource - The type of an AWS resource. For example, - // AWS::EC2::Instance for an application running on Amazon EC2 or - // AWS::DynamoDB::Table for an Amazon DynamoDB table that the application used. + // * Amazon Web Services Resource - The type of an Amazon Web + // Services resource. For example, AWS::EC2::Instance for an application running on + // Amazon EC2 or AWS::DynamoDB::Table for an Amazon DynamoDB table that the + // application used. // - // * - // AWS Service - The type of an AWS service. For example, AWS::DynamoDB for - // downstream calls to Amazon DynamoDB that didn't target a specific table. + // * Amazon Web Services Service - The type of an Amazon Web + // Services service. For example, AWS::DynamoDB for downstream calls to Amazon + // DynamoDB that didn't target a specific table. // - // * - // client - Represents the clients that sent requests to a root service. + // * client - Represents the clients + // that sent requests to a root service. // - // * remote - // - A downstream service of indeterminate type. + // * remote - A downstream service of + // indeterminate type. Type *string noSmithyDocumentSerde @@ -1022,19 +1030,20 @@ type ServiceStatistics struct { noSmithyDocumentSerde } -// A map that contains tag keys and tag values to attach to an AWS X-Ray group or -// sampling rule. For more information about ways to use tags, see Tagging AWS -// resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) in -// the AWS General Reference. The following restrictions apply to tags: +// A map that contains tag keys and tag values to attach to an Amazon Web Services +// X-Ray group or sampling rule. For more information about ways to use tags, see +// Tagging Amazon Web Services resources +// (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) in the Amazon +// Web Services General Reference. The following restrictions apply to tags: // -// * Maximum -// number of user-applied tags per resource: 50 +// * +// Maximum number of user-applied tags per resource: 50 // -// * Tag keys and values are case -// sensitive. +// * Tag keys and values are +// case sensitive. // -// * Don't use aws: as a prefix for keys; it's reserved for AWS use. -// You cannot edit or delete system tags. +// * Don't use aws: as a prefix for keys; it's reserved for Amazon +// Web Services use. You cannot edit or delete system tags. type Tag struct { // A tag key, such as Stage or Name. A tag key cannot be empty. The key can be a @@ -1113,8 +1122,8 @@ type Trace struct { Id *string // LimitExceeded is set to true when the trace has exceeded one of the defined - // quotas. For more information about quotas, see AWS X-Ray endpoints and quotas - // (https://docs.aws.amazon.com/general/latest/gr/xray.html). + // quotas. For more information about quotas, see Amazon Web Services X-Ray + // endpoints and quotas (https://docs.aws.amazon.com/general/latest/gr/xray.html). LimitExceeded *bool // Segment documents for the segments and subsegments that comprise the trace. @@ -1207,8 +1216,9 @@ type TraceUser struct { noSmithyDocumentSerde } -// Sampling statistics from a call to GetSamplingTargets that X-Ray could not -// process. +// Sampling statistics from a call to GetSamplingTargets +// (https://docs.aws.amazon.com/xray/latest/api/API_GetSamplingTargets.html) that +// X-Ray could not process. type UnprocessedStatistics struct { // The error code.