From f101561a07cb8ca904c5e8d5e7d89ffd1ca82865 Mon Sep 17 00:00:00 2001 From: George Fu Date: Mon, 30 Oct 2023 20:27:27 +0000 Subject: [PATCH 1/5] chore(client-sqs): use query-compat model --- codegen/sdk-codegen/aws-models/sqs.json | 7161 +++++++++++++---------- 1 file changed, 3915 insertions(+), 3246 deletions(-) diff --git a/codegen/sdk-codegen/aws-models/sqs.json b/codegen/sdk-codegen/aws-models/sqs.json index ec1dcbacce355..b4332746c59e4 100644 --- a/codegen/sdk-codegen/aws-models/sqs.json +++ b/codegen/sdk-codegen/aws-models/sqs.json @@ -1,3536 +1,4205 @@ { "smithy": "2.0", "metadata": { - "suppressions": [ - { - "id": "HttpMethodSemantics", - "namespace": "*" - }, - { - "id": "HttpResponseCodeSemantics", - "namespace": "*" - }, - { - "id": "PaginatedTrait", - "namespace": "*" - }, - { - "id": "HttpHeaderTrait", - "namespace": "*" - }, - { - "id": "HttpUriConflict", - "namespace": "*" - }, - { - "id": "Service", - "namespace": "*" - } - ] + "suppressions": [ + { + "id": "HttpMethodSemantics", + "namespace": "*" + }, + { + "id": "HttpResponseCodeSemantics", + "namespace": "*" + }, + { + "id": "PaginatedTrait", + "namespace": "*" + }, + { + "id": "HttpHeaderTrait", + "namespace": "*" + }, + { + "id": "HttpUriConflict", + "namespace": "*" + }, + { + "id": "Service", + "namespace": "*" + } + ] }, "shapes": { - "com.amazonaws.sqs#AWSAccountIdList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#String" - } - }, - "com.amazonaws.sqs#ActionNameList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#String" - } - }, - "com.amazonaws.sqs#AddPermission": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#AddPermissionRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#OverLimit" - } - ], - "traits": { - "smithy.api#documentation": "

Adds a permission to a queue for a specific principal. This allows sharing\n access to the queue.

\n

When you create a queue, you have full control access rights for the queue. Only you,\n the owner of the queue, can grant or deny permissions to the queue. For more information\n about these permissions, see Allow Developers to Write Messages to a Shared Queue in the Amazon SQS\n Developer Guide.

\n \n \n \n \n

Cross-account permissions don't apply to this action. For more information, \nsee Grant \ncross-account permissions to a role and a username in the Amazon SQS Developer Guide.

\n
" - } - }, - "com.amazonaws.sqs#AddPermissionRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

The URL of the Amazon SQS queue to which permissions are added.

\n

Queue URLs and names are case-sensitive.

", - "smithy.api#required": {} - } - }, - "Label": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

The unique identification of the permission you're setting (for example,\n AliceSendMessage). Maximum 80 characters. Allowed characters include\n alphanumeric characters, hyphens (-), and underscores\n (_).

", - "smithy.api#required": {} - } - }, - "AWSAccountIds": { - "target": "com.amazonaws.sqs#AWSAccountIdList", - "traits": { - "smithy.api#documentation": "

The Amazon Web Services account numbers of the principals who are to receive\n permission. For information about locating the Amazon Web Services account identification, see Your Amazon Web Services Identifiers in the Amazon SQS Developer\n Guide.

", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "AWSAccountId" - } - }, - "Actions": { - "target": "com.amazonaws.sqs#ActionNameList", - "traits": { - "smithy.api#documentation": "

The action the client wants to allow for the specified principal. Valid values: the\n name of any action or *.

\n

For more information about these actions, see Overview of Managing Access Permissions to Your Amazon Simple Queue Service\n Resource in the Amazon SQS Developer Guide.

\n

Specifying SendMessage, DeleteMessage, or\n ChangeMessageVisibility for ActionName.n also grants\n permissions for the corresponding batch versions of those actions:\n SendMessageBatch, DeleteMessageBatch, and\n ChangeMessageVisibilityBatch.

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

", - "smithy.api#input": {} - } - }, - "com.amazonaws.sqs#AmazonSQS": { - "type": "service", - "version": "2012-11-05", - "operations": [ - { - "target": "com.amazonaws.sqs#AddPermission" - }, - { - "target": "com.amazonaws.sqs#CancelMessageMoveTask" - }, - { - "target": "com.amazonaws.sqs#ChangeMessageVisibility" - }, - { - "target": "com.amazonaws.sqs#ChangeMessageVisibilityBatch" - }, - { - "target": "com.amazonaws.sqs#CreateQueue" - }, - { - "target": "com.amazonaws.sqs#DeleteMessage" - }, - { - "target": "com.amazonaws.sqs#DeleteMessageBatch" - }, - { - "target": "com.amazonaws.sqs#DeleteQueue" - }, - { - "target": "com.amazonaws.sqs#GetQueueAttributes" - }, - { - "target": "com.amazonaws.sqs#GetQueueUrl" - }, - { - "target": "com.amazonaws.sqs#ListDeadLetterSourceQueues" - }, - { - "target": "com.amazonaws.sqs#ListMessageMoveTasks" - }, - { - "target": "com.amazonaws.sqs#ListQueues" - }, - { - "target": "com.amazonaws.sqs#ListQueueTags" - }, - { - "target": "com.amazonaws.sqs#PurgeQueue" - }, - { - "target": "com.amazonaws.sqs#ReceiveMessage" - }, - { - "target": "com.amazonaws.sqs#RemovePermission" - }, - { - "target": "com.amazonaws.sqs#SendMessage" - }, - { - "target": "com.amazonaws.sqs#SendMessageBatch" - }, - { - "target": "com.amazonaws.sqs#SetQueueAttributes" - }, - { - "target": "com.amazonaws.sqs#StartMessageMoveTask" - }, - { - "target": "com.amazonaws.sqs#TagQueue" - }, - { - "target": "com.amazonaws.sqs#UntagQueue" - } - ], - "traits": { - "aws.api#service": { - "sdkId": "SQS", - "arnNamespace": "sqs", - "cloudFormationName": "SQS", - "cloudTrailEventSource": "sqs.amazonaws.com", - "endpointPrefix": "sqs" - }, - "aws.auth#sigv4": { - "name": "sqs" - }, - "aws.protocols#awsQuery": {}, - "smithy.api#documentation": "

Welcome to the Amazon SQS API Reference.

\n

Amazon SQS is a reliable, highly-scalable hosted queue for storing messages as they travel\n between applications or microservices. Amazon SQS moves data between distributed application\n components and helps you decouple these components.

\n

For information on the permissions you need to use this API, see Identity and access management in the Amazon SQS Developer\n Guide.\n

\n

You can use Amazon Web Services SDKs to access\n Amazon SQS using your favorite programming language. The SDKs perform tasks such as the\n following automatically:

\n \n

\n Additional information\n

\n ", - "smithy.api#title": "Amazon Simple Queue Service", - "smithy.api#xmlNamespace": { - "uri": "http://queue.amazonaws.com/doc/2012-11-05/" - }, - "smithy.rules#endpointRuleSet": { - "version": "1.0", - "parameters": { - "Region": { - "builtIn": "AWS::Region", - "required": false, - "documentation": "The AWS region used to dispatch the request.", - "type": "String" - }, - "UseDualStack": { - "builtIn": "AWS::UseDualStack", - "required": true, - "default": false, - "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", - "type": "Boolean" - }, - "UseFIPS": { - "builtIn": "AWS::UseFIPS", - "required": true, - "default": false, - "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", - "type": "Boolean" - }, - "Endpoint": { - "builtIn": "SDK::Endpoint", - "required": false, - "documentation": "Override the endpoint used to send this request", - "type": "String" - } - }, - "rules": [ - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "error": "Invalid Configuration: FIPS and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" - }, - "properties": {}, - "headers": {} + "com.amazonaws.sqs#AWSAccountIdList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#String" + } + }, + "com.amazonaws.sqs#ActionNameList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#String" + } + }, + "com.amazonaws.sqs#AddPermission": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#AddPermissionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#InvalidAddress" + }, + { + "target": "com.amazonaws.sqs#InvalidSecurity" + }, + { + "target": "com.amazonaws.sqs#OverLimit" + }, + { + "target": "com.amazonaws.sqs#QueueDoesNotExist" + }, + { + "target": "com.amazonaws.sqs#RequestThrottled" + }, + { + "target": "com.amazonaws.sqs#UnsupportedOperation" + } + ], + "traits": { + "smithy.api#documentation": "

Adds a permission to a queue for a specific principal. This allows sharing\n access to the queue.

\n

When you create a queue, you have full control access rights for the queue. Only you,\n the owner of the queue, can grant or deny permissions to the queue. For more information\n about these permissions, see Allow Developers to Write Messages to a Shared Queue in the\n Amazon SQS Developer Guide.

\n \n \n \n \n

Cross-account permissions don't apply to this action. For more information, see\n Grant cross-account permissions to a role and a username in the\n Amazon SQS Developer Guide.

\n
" + } + }, + "com.amazonaws.sqs#AddPermissionRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

The URL of the Amazon SQS queue to which permissions are added.

\n

Queue URLs and names are case-sensitive.

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

The unique identification of the permission you're setting (for example,\n AliceSendMessage). Maximum 80 characters. Allowed characters include\n alphanumeric characters, hyphens (-), and underscores\n (_).

", + "smithy.api#required": {} + } + }, + "AWSAccountIds": { + "target": "com.amazonaws.sqs#AWSAccountIdList", + "traits": { + "smithy.api#documentation": "

The Amazon Web\n Services account numbers of the principals who are to receive\n permission. For information about locating the Amazon Web Services\n account identification, see Your Amazon Web\n Services Identifiers in the Amazon SQS Developer\n Guide.

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "AWSAccountId" + } + }, + "Actions": { + "target": "com.amazonaws.sqs#ActionNameList", + "traits": { + "smithy.api#documentation": "

The action the client wants to allow for the specified principal. Valid values: the\n name of any action or *.

\n

For more information about these actions, see Overview of Managing Access Permissions to Your Amazon Simple Queue Service\n Resource in the Amazon SQS Developer Guide.

\n

Specifying SendMessage, DeleteMessage, or\n ChangeMessageVisibility for ActionName.n also grants\n permissions for the corresponding batch versions of those actions:\n SendMessageBatch, DeleteMessageBatch, and\n ChangeMessageVisibilityBatch.

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

", + "smithy.api#input": {} + } + }, + "com.amazonaws.sqs#AmazonSQS": { + "type": "service", + "version": "2012-11-05", + "operations": [ + { + "target": "com.amazonaws.sqs#AddPermission" + }, + { + "target": "com.amazonaws.sqs#CancelMessageMoveTask" + }, + { + "target": "com.amazonaws.sqs#ChangeMessageVisibility" + }, + { + "target": "com.amazonaws.sqs#ChangeMessageVisibilityBatch" + }, + { + "target": "com.amazonaws.sqs#CreateQueue" + }, + { + "target": "com.amazonaws.sqs#DeleteMessage" + }, + { + "target": "com.amazonaws.sqs#DeleteMessageBatch" + }, + { + "target": "com.amazonaws.sqs#DeleteQueue" + }, + { + "target": "com.amazonaws.sqs#GetQueueAttributes" + }, + { + "target": "com.amazonaws.sqs#GetQueueUrl" + }, + { + "target": "com.amazonaws.sqs#ListDeadLetterSourceQueues" + }, + { + "target": "com.amazonaws.sqs#ListMessageMoveTasks" + }, + { + "target": "com.amazonaws.sqs#ListQueues" + }, + { + "target": "com.amazonaws.sqs#ListQueueTags" + }, + { + "target": "com.amazonaws.sqs#PurgeQueue" + }, + { + "target": "com.amazonaws.sqs#ReceiveMessage" + }, + { + "target": "com.amazonaws.sqs#RemovePermission" + }, + { + "target": "com.amazonaws.sqs#SendMessage" + }, + { + "target": "com.amazonaws.sqs#SendMessageBatch" + }, + { + "target": "com.amazonaws.sqs#SetQueueAttributes" + }, + { + "target": "com.amazonaws.sqs#StartMessageMoveTask" + }, + { + "target": "com.amazonaws.sqs#TagQueue" + }, + { + "target": "com.amazonaws.sqs#UntagQueue" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "SQS", + "arnNamespace": "sqs", + "cloudFormationName": "SQS", + "cloudTrailEventSource": "sqs.amazonaws.com", + "endpointPrefix": "sqs" + }, + "aws.auth#sigv4": { + "name": "sqs" + }, + "aws.protocols#awsJson1_0": {}, + "aws.protocols#awsQueryCompatible": {}, + "smithy.api#documentation": "

Welcome to the Amazon SQS API Reference.

\n

Amazon SQS is a reliable, highly-scalable hosted queue for storing messages as they\n travel between applications or microservices. Amazon SQS moves data between distributed\n application components and helps you decouple these components.

\n

For information on the permissions you need to use this API, see Identity and access management in the Amazon SQS Developer\n Guide.\n

\n

You can use Amazon Web Services\n SDKs to access Amazon SQS using your favorite programming language. The SDKs\n perform tasks such as the following automatically:

\n \n

\n Additional information\n

\n ", + "smithy.api#title": "Amazon Simple Queue Service", + "smithy.rules#endpointRuleSet": { + "version": "1.0", + "parameters": { + "Region": { + "builtIn": "AWS::Region", + "required": false, + "documentation": "The AWS region used to dispatch the request.", + "type": "String" + }, + "UseDualStack": { + "builtIn": "AWS::UseDualStack", + "required": true, + "default": false, + "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", + "type": "Boolean" + }, + "UseFIPS": { + "builtIn": "AWS::UseFIPS", + "required": true, + "default": false, + "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", + "type": "Boolean" + }, + "Endpoint": { + "builtIn": "SDK::Endpoint", + "required": false, + "documentation": "Override the endpoint used to send this request", + "type": "String" + } }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Region" - } - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "aws.partition", - "argv": [ - { - "ref": "Region" - } - ], - "assign": "PartitionResult" - } - ], "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "rules": [ - { + { "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", + { + "fn": "isSet", "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" + { + "ref": "Endpoint" + } ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } + } ], "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://sqs-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "error": "Invalid Configuration: FIPS and custom endpoint are not supported", + "type": "error" }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - }, - "aws-us-gov" - ] - } - ], - "endpoint": { - "url": "https://sqs.{Region}.amazonaws.com", - "properties": {}, - "headers": {} + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://sqs-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } ], "type": "tree" - }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "rules": [ - { + }, + { "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", + { + "fn": "isSet", "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" + { + "ref": "Region" + } ] - } - ] - } + } ], "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://sqs.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "PartitionResult" + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://sqs-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws-us-gov" + ] + } + ], + "endpoint": { + "url": "https://sqs.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://sqs-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://sqs.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "endpoint": { + "url": "https://sqs.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + } ], "type": "tree" - }, - { + }, + { "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", + "error": "Invalid Configuration: Missing Region", "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [], - "endpoint": { - "url": "https://sqs.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} + } + ] + }, + "smithy.rules#endpointTests": { + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.ap-southeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } }, - "type": "endpoint" - } + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sqs-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sqs.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sqs-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sqs.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sqs-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sqs.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.us-iso-west-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } ], - "type": "tree" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" - } - ] - }, - "smithy.rules#endpointTests": { - "testCases": [ - { - "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.af-south-1.amazonaws.com" - } - }, - "params": { - "Region": "af-south-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.ap-east-1.amazonaws.com" - } - }, - "params": { - "Region": "ap-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.ap-northeast-1.amazonaws.com" - } - }, - "params": { - "Region": "ap-northeast-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.ap-northeast-2.amazonaws.com" - } - }, - "params": { - "Region": "ap-northeast-2", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.ap-northeast-3.amazonaws.com" - } - }, - "params": { - "Region": "ap-northeast-3", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.ap-south-1.amazonaws.com" - } - }, - "params": { - "Region": "ap-south-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.ap-southeast-1.amazonaws.com" - } - }, - "params": { - "Region": "ap-southeast-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.ap-southeast-2.amazonaws.com" - } - }, - "params": { - "Region": "ap-southeast-2", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ap-southeast-3 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.ap-southeast-3.amazonaws.com" - } - }, - "params": { - "Region": "ap-southeast-3", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.ca-central-1.amazonaws.com" - } - }, - "params": { - "Region": "ca-central-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.eu-central-1.amazonaws.com" - } - }, - "params": { - "Region": "eu-central-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.eu-north-1.amazonaws.com" - } - }, - "params": { - "Region": "eu-north-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.eu-south-1.amazonaws.com" - } - }, - "params": { - "Region": "eu-south-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.eu-west-1.amazonaws.com" - } - }, - "params": { - "Region": "eu-west-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.eu-west-2.amazonaws.com" - } - }, - "params": { - "Region": "eu-west-2", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.eu-west-3.amazonaws.com" - } - }, - "params": { - "Region": "eu-west-3", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.me-south-1.amazonaws.com" - } - }, - "params": { - "Region": "me-south-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.sa-east-1.amazonaws.com" - } - }, - "params": { - "Region": "sa-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.us-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs-fips.us-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.us-east-2.amazonaws.com" - } - }, - "params": { - "Region": "us-east-2", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs-fips.us-east-2.amazonaws.com" - } - }, - "params": { - "Region": "us-east-2", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.us-west-1.amazonaws.com" - } - }, - "params": { - "Region": "us-west-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs-fips.us-west-1.amazonaws.com" - } - }, - "params": { - "Region": "us-west-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.us-west-2.amazonaws.com" - } - }, - "params": { - "Region": "us-west-2", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs-fips.us-west-2.amazonaws.com" - } - }, - "params": { - "Region": "us-west-2", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://sqs-fips.us-east-1.api.aws" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://sqs.us-east-1.api.aws" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.cn-north-1.amazonaws.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.cn-northwest-1.amazonaws.com.cn" - } - }, - "params": { - "Region": "cn-northwest-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://sqs-fips.cn-north-1.api.amazonwebservices.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs-fips.cn-north-1.amazonaws.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://sqs.cn-north-1.api.amazonwebservices.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.us-gov-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.us-gov-west-1.amazonaws.com" - } - }, - "params": { - "Region": "us-gov-west-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://sqs-fips.us-gov-east-1.api.aws" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.us-gov-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://sqs.us-gov-east-1.api.aws" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.us-iso-east-1.c2s.ic.gov" - } - }, - "params": { - "Region": "us-iso-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-iso-west-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.us-iso-west-1.c2s.ic.gov" - } - }, - "params": { - "Region": "us-iso-west-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", - "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" - }, - "params": { - "Region": "us-iso-east-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs-fips.us-iso-east-1.c2s.ic.gov" - } - }, - "params": { - "Region": "us-iso-east-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" - }, - "params": { - "Region": "us-iso-east-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.us-isob-east-1.sc2s.sgov.gov" - } - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", - "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs-fips.us-isob-east-1.sc2s.sgov.gov" - } - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", - "expect": { - "endpoint": { - "url": "https://example.com" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": false, - "Endpoint": "https://example.com" - } - }, - { - "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", - "expect": { - "endpoint": { - "url": "https://example.com" - } - }, - "params": { - "UseFIPS": false, - "UseDualStack": false, - "Endpoint": "https://example.com" - } - }, - { - "documentation": "For custom endpoint with fips enabled and dualstack disabled", - "expect": { - "error": "Invalid Configuration: FIPS and custom endpoint are not supported" - }, - "params": { - "Region": "us-east-1", - "UseFIPS": true, - "UseDualStack": false, - "Endpoint": "https://example.com" - } - }, - { - "documentation": "For custom endpoint with fips disabled and dualstack enabled", - "expect": { - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": true, - "Endpoint": "https://example.com" - } - }, - { - "documentation": "Missing region", - "expect": { - "error": "Invalid Configuration: Missing Region" - } - } - ], - "version": "1.0" - } - } - }, - "com.amazonaws.sqs#AttributeNameList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#QueueAttributeName" - } - }, - "com.amazonaws.sqs#BatchEntryIdsNotDistinct": { - "type": "structure", - "members": {}, - "traits": { - "aws.protocols#awsQueryError": { - "code": "AWS.SimpleQueueService.BatchEntryIdsNotDistinct", - "httpResponseCode": 400 - }, - "smithy.api#documentation": "

Two or more batch entries in the request have the same Id.

", - "smithy.api#error": "client", - "smithy.api#httpError": 400 - } - }, - "com.amazonaws.sqs#BatchRequestTooLong": { - "type": "structure", - "members": {}, - "traits": { - "aws.protocols#awsQueryError": { - "code": "AWS.SimpleQueueService.BatchRequestTooLong", - "httpResponseCode": 400 - }, - "smithy.api#documentation": "

The length of all the messages put together is more than the limit.

", - "smithy.api#error": "client", - "smithy.api#httpError": 400 - } - }, - "com.amazonaws.sqs#BatchResultErrorEntry": { - "type": "structure", - "members": { - "Id": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

The Id of an entry in a batch request.

", - "smithy.api#required": {} - } - }, - "SenderFault": { - "target": "com.amazonaws.sqs#Boolean", - "traits": { - "smithy.api#default": false, - "smithy.api#documentation": "

Specifies whether the error happened due to the caller of the batch API action.

", - "smithy.api#required": {} - } - }, - "Code": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

An error code representing why the action failed on this entry.

", - "smithy.api#required": {} - } - }, - "Message": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

A message explaining why the action failed on this entry.

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

Gives a detailed description of the result of an action on each entry in the\n request.

" - } - }, - "com.amazonaws.sqs#BatchResultErrorEntryList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#BatchResultErrorEntry" - } - }, - "com.amazonaws.sqs#Binary": { - "type": "blob" - }, - "com.amazonaws.sqs#BinaryList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#Binary", - "traits": { - "smithy.api#xmlName": "BinaryListValue" - } - } - }, - "com.amazonaws.sqs#Boolean": { - "type": "boolean", - "traits": { - "smithy.api#default": false - } - }, - "com.amazonaws.sqs#BoxedInteger": { - "type": "integer" - }, - "com.amazonaws.sqs#CancelMessageMoveTask": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#CancelMessageMoveTaskRequest" - }, - "output": { - "target": "com.amazonaws.sqs#CancelMessageMoveTaskResult" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.sqs#UnsupportedOperation" - } - ], - "traits": { - "smithy.api#documentation": "

Cancels a specified message movement task. A message movement can only be cancelled\n when the current status is RUNNING. Cancelling a message movement task does not revert\n the messages that have already been moved. It can only stop the messages that have not\n been moved yet.

\n \n \n " - } - }, - "com.amazonaws.sqs#CancelMessageMoveTaskRequest": { - "type": "structure", - "members": { - "TaskHandle": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

An identifier associated with a message movement task.

", - "smithy.api#required": {} + "com.amazonaws.sqs#AttributeNameList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#QueueAttributeName" } - } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.sqs#CancelMessageMoveTaskResult": { - "type": "structure", - "members": { - "ApproximateNumberOfMessagesMoved": { - "target": "com.amazonaws.sqs#Long", + "com.amazonaws.sqs#BatchEntryIdsNotDistinct": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "

The approximate number of messages already moved to the destination queue.

" + "aws.protocols#awsQueryError": { + "code": "AWS.SimpleQueueService.BatchEntryIdsNotDistinct", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

Two or more batch entries in the request have the same Id.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 } - } }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.sqs#ChangeMessageVisibility": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#ChangeMessageVisibilityRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#MessageNotInflight" - }, - { - "target": "com.amazonaws.sqs#ReceiptHandleIsInvalid" - } - ], - "traits": { - "smithy.api#documentation": "

Changes the visibility timeout of a specified message in a queue to a new value. The\n default visibility timeout for a message is 30 seconds. The minimum is 0 seconds. The\n maximum is 12 hours. For more information, see Visibility Timeout in the Amazon SQS Developer\n Guide.

\n

For example, if the default timeout for a queue is 60 seconds, 15 seconds have elapsed\n since you received the message, and you send a ChangeMessageVisibility call with\n VisibilityTimeout set to 10 seconds, the 10 seconds begin to count from\n the time that you make the ChangeMessageVisibility call. Thus, any attempt\n to change the visibility timeout or to delete that message 10 seconds after you\n initially change the visibility timeout (a total of 25 seconds) might result in an\n error.

\n

An Amazon SQS message has three basic states:

\n
    \n
  1. \n

    Sent to a queue by a producer.

    \n
  2. \n
  3. \n

    Received from the queue by a consumer.

    \n
  4. \n
  5. \n

    Deleted from the queue.

    \n
  6. \n
\n

A message is considered to be stored after it is sent to a queue by a producer, but not yet received from the queue by a consumer (that is, between states 1 and 2). There is no limit to the number of stored messages.\n A message is considered to be in flight after it is received from a queue by a consumer, but not yet deleted from the queue (that is, between states 2 and 3). There is a limit to the number of in flight messages.

\n

Limits that apply to in flight messages are unrelated to the unlimited number of stored messages.

\n

For most standard queues (depending on queue traffic and message backlog), there can be a maximum of approximately 120,000 in flight messages (received from a queue by a consumer, but not yet deleted from the queue). \n If you reach this limit, Amazon SQS returns the OverLimit error message.\n To avoid reaching the limit, you should delete messages from the queue after they're processed. You can also increase the number of queues you use to process your messages.\n To request a limit increase, file a support request.

\n

For FIFO queues, there can be a maximum of 20,000 in flight messages (received from a queue by a consumer, but not yet deleted from the queue). If you reach this limit, Amazon SQS returns no error messages.

\n \n

If you attempt to set the VisibilityTimeout to a value greater than\n the maximum time left, Amazon SQS returns an error. Amazon SQS doesn't automatically\n recalculate and increase the timeout to the maximum remaining time.

\n

Unlike with a queue, when you change the visibility timeout for a specific message\n the timeout value is applied immediately but isn't saved in memory for that message.\n If you don't delete a message after it is received, the visibility timeout for the\n message reverts to the original timeout value (not to the value you set using the\n ChangeMessageVisibility action) the next time the message is\n received.

\n
" - } - }, - "com.amazonaws.sqs#ChangeMessageVisibilityBatch": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#ChangeMessageVisibilityBatchRequest" - }, - "output": { - "target": "com.amazonaws.sqs#ChangeMessageVisibilityBatchResult" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#BatchEntryIdsNotDistinct" - }, - { - "target": "com.amazonaws.sqs#EmptyBatchRequest" - }, - { - "target": "com.amazonaws.sqs#InvalidBatchEntryId" - }, - { - "target": "com.amazonaws.sqs#TooManyEntriesInBatchRequest" - } - ], - "traits": { - "smithy.api#documentation": "

Changes the visibility timeout of multiple messages. This is a batch version of\n \n ChangeMessageVisibility. The result of the action\n on each message is reported individually in the response. You can send up to 10\n \n ChangeMessageVisibility\n requests with each\n ChangeMessageVisibilityBatch action.

\n \n

Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.

\n
" - } - }, - "com.amazonaws.sqs#ChangeMessageVisibilityBatchRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

The URL of the Amazon SQS queue whose messages' visibility is changed.

\n

Queue URLs and names are case-sensitive.

", - "smithy.api#required": {} - } - }, - "Entries": { - "target": "com.amazonaws.sqs#ChangeMessageVisibilityBatchRequestEntryList", - "traits": { - "smithy.api#documentation": "

Lists the receipt handles of the messages for which the visibility timeout must be\n changed.

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

", - "smithy.api#input": {} - } - }, - "com.amazonaws.sqs#ChangeMessageVisibilityBatchRequestEntry": { - "type": "structure", - "members": { - "Id": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

An identifier for this particular receipt handle used to communicate the\n result.

\n \n

The Ids of a batch request need to be unique within a request.

\n

This identifier can have up to 80 characters. The following characters are accepted: alphanumeric characters, hyphens(-), and underscores (_).

\n
", - "smithy.api#required": {} - } - }, - "ReceiptHandle": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

A receipt handle.

", - "smithy.api#required": {} - } - }, - "VisibilityTimeout": { - "target": "com.amazonaws.sqs#Integer", + "com.amazonaws.sqs#BatchRequestTooLong": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "

The new value (in seconds) for the message's visibility timeout.

" + "aws.protocols#awsQueryError": { + "code": "AWS.SimpleQueueService.BatchRequestTooLong", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

The length of all the messages put together is more than the limit.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 } - } }, - "traits": { - "smithy.api#documentation": "

Encloses a receipt handle and an entry ID for each message in \n ChangeMessageVisibilityBatch.\n

" - } - }, - "com.amazonaws.sqs#ChangeMessageVisibilityBatchRequestEntryList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#ChangeMessageVisibilityBatchRequestEntry" - } - }, - "com.amazonaws.sqs#ChangeMessageVisibilityBatchResult": { - "type": "structure", - "members": { - "Successful": { - "target": "com.amazonaws.sqs#ChangeMessageVisibilityBatchResultEntryList", - "traits": { - "smithy.api#documentation": "

A list of \n ChangeMessageVisibilityBatchResultEntry\n \n items.

", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "ChangeMessageVisibilityBatchResultEntry" - } - }, - "Failed": { - "target": "com.amazonaws.sqs#BatchResultErrorEntryList", - "traits": { - "smithy.api#documentation": "

A list of \n BatchResultErrorEntry\n items.

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

For each message in the batch, the response contains a \n ChangeMessageVisibilityBatchResultEntry\n tag if the message\n succeeds or a \n BatchResultErrorEntry\n tag if the message\n fails.

", - "smithy.api#output": {} - } - }, - "com.amazonaws.sqs#ChangeMessageVisibilityBatchResultEntry": { - "type": "structure", - "members": { - "Id": { - "target": "com.amazonaws.sqs#String", + "com.amazonaws.sqs#BatchResultErrorEntry": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

The Id of an entry in a batch request.

", + "smithy.api#required": {} + } + }, + "SenderFault": { + "target": "com.amazonaws.sqs#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Specifies whether the error happened due to the caller of the batch API action.

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

An error code representing why the action failed on this entry.

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

A message explaining why the action failed on this entry.

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

Represents a message whose visibility timeout has been changed successfully.

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

Gives a detailed description of the result of an action on each entry in the\n request.

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

Encloses the Id of an entry in \n ChangeMessageVisibilityBatch.\n

" - } - }, - "com.amazonaws.sqs#ChangeMessageVisibilityBatchResultEntryList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#ChangeMessageVisibilityBatchResultEntry" - } - }, - "com.amazonaws.sqs#ChangeMessageVisibilityRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

The URL of the Amazon SQS queue whose message's visibility is changed.

\n

Queue URLs and names are case-sensitive.

", - "smithy.api#required": {} - } - }, - "ReceiptHandle": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

The receipt handle associated with the message, whose visibility timeout is changed.\n This parameter is returned by the \n ReceiveMessage\n \n action.

", - "smithy.api#required": {} - } - }, - "VisibilityTimeout": { - "target": "com.amazonaws.sqs#Integer", - "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "

The new value for the message's visibility timeout (in seconds). Values range:\n 0 to 43200. Maximum: 12 hours.

", - "smithy.api#required": {} + "com.amazonaws.sqs#BatchResultErrorEntryList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#BatchResultErrorEntry" } - } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.sqs#CreateQueue": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#CreateQueueRequest" - }, - "output": { - "target": "com.amazonaws.sqs#CreateQueueResult" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#QueueDeletedRecently" - }, - { - "target": "com.amazonaws.sqs#QueueNameExists" - } - ], - "traits": { - "smithy.api#documentation": "

Creates a new standard or FIFO queue. You can pass one or more attributes in\n the request. Keep the following in mind:

\n \n

To successfully create a new queue, you must provide a queue name that adheres to the\n limits\n related to queues and is unique within the scope of your queues.

\n \n

After you create a queue, you must wait at least one second after the queue is\n created to be able to use the queue.

\n
\n

To get the queue URL, use the \n GetQueueUrl\n action.\n \n GetQueueUrl\n requires only the\n QueueName parameter. be aware of existing queue names:

\n \n \n

Cross-account permissions don't apply to this action. For more information, \nsee Grant \ncross-account permissions to a role and a username in the Amazon SQS Developer Guide.

\n
" - } - }, - "com.amazonaws.sqs#CreateQueueRequest": { - "type": "structure", - "members": { - "QueueName": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

The name of the new queue. The following limits apply to this name:

\n \n

Queue URLs and names are case-sensitive.

", - "smithy.api#required": {} - } - }, - "tags": { - "target": "com.amazonaws.sqs#TagMap", - "traits": { - "smithy.api#documentation": "

Add cost allocation tags to the specified Amazon SQS queue. For an overview, see Tagging \nYour Amazon SQS Queues in the Amazon SQS Developer Guide.

\n

When you use queue tags, keep the following guidelines in mind:

\n \n

For a full list of tag restrictions, see \nQuotas related to queues \nin the Amazon SQS Developer Guide.

\n \n

To be able to tag a queue on creation, you must have the\n sqs:CreateQueue and sqs:TagQueue permissions.

\n

Cross-account permissions don't apply to this action. For more information, \nsee Grant \ncross-account permissions to a role and a username in the Amazon SQS Developer Guide.

\n
", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Tag" - } - }, - "Attributes": { - "target": "com.amazonaws.sqs#QueueAttributeMap", - "traits": { - "smithy.api#documentation": "

A map of attributes with their corresponding values.

\n

The following lists the names, descriptions, and values of the special request\n parameters that the CreateQueue action uses:

\n \n

The following attributes apply only to dead-letter queues:\n

\n \n \n

The dead-letter queue of a \n FIFO queue must also be a FIFO queue. Similarly, the dead-letter \n queue of a standard queue must also be a standard queue.

\n
\n

The following attributes apply only to server-side-encryption:

\n \n

The following attributes apply only to FIFO (first-in-first-out)\n queues:

\n \n

The following attributes apply only to \nhigh throughput\nfor FIFO queues:

\n \n

To enable high throughput for FIFO queues, do the following:

\n \n

If you set these attributes to anything other than the values shown for enabling high\n throughput, normal throughput is in effect and deduplication occurs as specified.

\n

For information on throughput quotas, \n see Quotas related to messages \n in the Amazon SQS Developer Guide.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Attribute" - } - } + "com.amazonaws.sqs#Binary": { + "type": "blob" }, - "traits": { - "smithy.api#documentation": "

", - "smithy.api#input": {} - } - }, - "com.amazonaws.sqs#CreateQueueResult": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

The URL of the created Amazon SQS queue.

" + "com.amazonaws.sqs#BinaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#Binary", + "traits": { + "smithy.api#xmlName": "BinaryListValue" + } } - } }, - "traits": { - "smithy.api#documentation": "

Returns the QueueUrl attribute of the created queue.

", - "smithy.api#output": {} - } - }, - "com.amazonaws.sqs#DeleteMessage": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#DeleteMessageRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#InvalidIdFormat" - }, - { - "target": "com.amazonaws.sqs#ReceiptHandleIsInvalid" - } - ], - "traits": { - "smithy.api#documentation": "

Deletes the specified message from the specified queue. To select the message to\n delete, use the ReceiptHandle of the message (not the\n MessageId which you receive when you send the message). Amazon SQS can\n delete a message from a queue even if a visibility timeout setting causes the message to\n be locked by another consumer. Amazon SQS automatically deletes messages left in a queue\n longer than the retention period configured for the queue.

\n \n

The ReceiptHandle is associated with a specific\n instance of receiving a message. If you receive a message more than\n once, the ReceiptHandle is different each time you receive a message.\n When you use the DeleteMessage action, you must provide the most\n recently received ReceiptHandle for the message (otherwise, the request\n succeeds, but the message will not be deleted).

\n

For standard queues, it is possible to receive a message even after you\n delete it. This might happen on rare occasions if one of the servers which stores a\n copy of the message is unavailable when you send the request to delete the message.\n The copy remains on the server and might be returned to you during a subsequent\n receive request. You should ensure that your application is idempotent, so that\n receiving a message more than once does not cause issues.

\n
" - } - }, - "com.amazonaws.sqs#DeleteMessageBatch": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#DeleteMessageBatchRequest" - }, - "output": { - "target": "com.amazonaws.sqs#DeleteMessageBatchResult" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#BatchEntryIdsNotDistinct" - }, - { - "target": "com.amazonaws.sqs#EmptyBatchRequest" - }, - { - "target": "com.amazonaws.sqs#InvalidBatchEntryId" - }, - { - "target": "com.amazonaws.sqs#TooManyEntriesInBatchRequest" - } - ], - "traits": { - "smithy.api#documentation": "

Deletes up to ten messages from the specified queue. This is a batch version of\n \n DeleteMessage. The result of the action on each\n message is reported individually in the response.

\n \n

Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.

\n
" - } - }, - "com.amazonaws.sqs#DeleteMessageBatchRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

The URL of the Amazon SQS queue from which messages are deleted.

\n

Queue URLs and names are case-sensitive.

", - "smithy.api#required": {} - } - }, - "Entries": { - "target": "com.amazonaws.sqs#DeleteMessageBatchRequestEntryList", - "traits": { - "smithy.api#documentation": "

Lists the receipt handles for the messages to be deleted.

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

", - "smithy.api#input": {} - } - }, - "com.amazonaws.sqs#DeleteMessageBatchRequestEntry": { - "type": "structure", - "members": { - "Id": { - "target": "com.amazonaws.sqs#String", + "com.amazonaws.sqs#Boolean": { + "type": "boolean", "traits": { - "smithy.api#documentation": "

The identifier for this particular receipt handle. This is used to communicate the\n result.

\n \n

The Ids of a batch request need to be unique within a request.

\n

This identifier can have up to 80 characters. The following characters are accepted: alphanumeric characters, hyphens(-), and underscores (_).

\n
", - "smithy.api#required": {} + "smithy.api#default": false } - }, - "ReceiptHandle": { - "target": "com.amazonaws.sqs#String", + }, + "com.amazonaws.sqs#BoxedInteger": { + "type": "integer" + }, + "com.amazonaws.sqs#CancelMessageMoveTask": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#CancelMessageMoveTaskRequest" + }, + "output": { + "target": "com.amazonaws.sqs#CancelMessageMoveTaskResult" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#InvalidAddress" + }, + { + "target": "com.amazonaws.sqs#InvalidSecurity" + }, + { + "target": "com.amazonaws.sqs#RequestThrottled" + }, + { + "target": "com.amazonaws.sqs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.sqs#UnsupportedOperation" + } + ], "traits": { - "smithy.api#documentation": "

A receipt handle.

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

Cancels a specified message movement task. A message movement can only be cancelled\n when the current status is RUNNING. Cancelling a message movement task does not revert\n the messages that have already been moved. It can only stop the messages that have not\n been moved yet.

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

Encloses a receipt handle and an identifier for it.

" - } - }, - "com.amazonaws.sqs#DeleteMessageBatchRequestEntryList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#DeleteMessageBatchRequestEntry" - } - }, - "com.amazonaws.sqs#DeleteMessageBatchResult": { - "type": "structure", - "members": { - "Successful": { - "target": "com.amazonaws.sqs#DeleteMessageBatchResultEntryList", - "traits": { - "smithy.api#documentation": "

A list of \n DeleteMessageBatchResultEntry\n items.

", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "DeleteMessageBatchResultEntry" - } - }, - "Failed": { - "target": "com.amazonaws.sqs#BatchResultErrorEntryList", - "traits": { - "smithy.api#documentation": "

A list of \n BatchResultErrorEntry\n items.

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

For each message in the batch, the response contains a \n DeleteMessageBatchResultEntry\n tag if the message is deleted\n or a \n BatchResultErrorEntry\n tag if the message can't be\n deleted.

", - "smithy.api#output": {} - } - }, - "com.amazonaws.sqs#DeleteMessageBatchResultEntry": { - "type": "structure", - "members": { - "Id": { - "target": "com.amazonaws.sqs#String", + "com.amazonaws.sqs#CancelMessageMoveTaskRequest": { + "type": "structure", + "members": { + "TaskHandle": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

An identifier associated with a message movement task.

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

Represents a successfully deleted message.

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

Encloses the Id of an entry in \n DeleteMessageBatch.\n

" - } - }, - "com.amazonaws.sqs#DeleteMessageBatchResultEntryList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#DeleteMessageBatchResultEntry" - } - }, - "com.amazonaws.sqs#DeleteMessageRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", + "com.amazonaws.sqs#CancelMessageMoveTaskResult": { + "type": "structure", + "members": { + "ApproximateNumberOfMessagesMoved": { + "target": "com.amazonaws.sqs#Long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The approximate number of messages already moved to the destination queue.

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

The URL of the Amazon SQS queue from which messages are deleted.

\n

Queue URLs and names are case-sensitive.

", - "smithy.api#required": {} + "smithy.api#output": {} } - }, - "ReceiptHandle": { - "target": "com.amazonaws.sqs#String", + }, + "com.amazonaws.sqs#ChangeMessageVisibility": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#ChangeMessageVisibilityRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#InvalidAddress" + }, + { + "target": "com.amazonaws.sqs#InvalidSecurity" + }, + { + "target": "com.amazonaws.sqs#MessageNotInflight" + }, + { + "target": "com.amazonaws.sqs#QueueDoesNotExist" + }, + { + "target": "com.amazonaws.sqs#ReceiptHandleIsInvalid" + }, + { + "target": "com.amazonaws.sqs#RequestThrottled" + }, + { + "target": "com.amazonaws.sqs#UnsupportedOperation" + } + ], "traits": { - "smithy.api#documentation": "

The receipt handle associated with the message to delete.

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

Changes the visibility timeout of a specified message in a queue to a new value. The\n default visibility timeout for a message is 30 seconds. The minimum is 0 seconds. The\n maximum is 12 hours. For more information, see Visibility Timeout in the Amazon SQS Developer\n Guide.

\n

For example, if the default timeout for a queue is 60 seconds, 15 seconds have elapsed\n since you received the message, and you send a ChangeMessageVisibility call with\n VisibilityTimeout set to 10 seconds, the 10 seconds begin to count from\n the time that you make the ChangeMessageVisibility call. Thus, any attempt\n to change the visibility timeout or to delete that message 10 seconds after you\n initially change the visibility timeout (a total of 25 seconds) might result in an\n error.

\n

An Amazon SQS message has three basic states:

\n
    \n
  1. \n

    Sent to a queue by a producer.

    \n
  2. \n
  3. \n

    Received from the queue by a consumer.

    \n
  4. \n
  5. \n

    Deleted from the queue.

    \n
  6. \n
\n

A message is considered to be stored after it is sent to a queue\n by a producer, but not yet received from the queue by a consumer (that is, between\n states 1 and 2). There is no limit to the number of stored messages. A message is\n considered to be in flight after it is received from a queue by a\n consumer, but not yet deleted from the queue (that is, between states 2 and 3). There is\n a limit to the number of in flight messages.

\n

Limits that apply to in flight messages are unrelated to the\n unlimited number of stored messages.

\n

For most standard queues (depending on queue traffic and message backlog), there can\n be a maximum of approximately 120,000 in flight messages (received from a queue by a\n consumer, but not yet deleted from the queue). If you reach this limit, Amazon SQS\n returns the OverLimit error message. To avoid reaching the limit, you\n should delete messages from the queue after they're processed. You can also increase the\n number of queues you use to process your messages. To request a limit increase, file a support request.

\n

For FIFO queues, there can be a maximum of 20,000 in flight messages (received from a\n queue by a consumer, but not yet deleted from the queue). If you reach this limit,\n Amazon SQS returns no error messages.

\n \n

If you attempt to set the VisibilityTimeout to a value greater than\n the maximum time left, Amazon SQS returns an error. Amazon SQS doesn't automatically\n recalculate and increase the timeout to the maximum remaining time.

\n

Unlike with a queue, when you change the visibility timeout for a specific message\n the timeout value is applied immediately but isn't saved in memory for that message.\n If you don't delete a message after it is received, the visibility timeout for the\n message reverts to the original timeout value (not to the value you set using the\n ChangeMessageVisibility action) the next time the message is\n received.

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

", - "smithy.api#input": {} - } - }, - "com.amazonaws.sqs#DeleteQueue": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#DeleteQueueRequest" }, - "output": { - "target": "smithy.api#Unit" - }, - "traits": { - "smithy.api#documentation": "

Deletes the queue specified by the QueueUrl, regardless of the queue's\n contents.

\n \n

Be careful with the DeleteQueue action: When you delete a queue, any\n messages in the queue are no longer available.

\n
\n

When you delete a queue, the deletion process takes up to 60 seconds. Requests you\n send involving that queue during the 60 seconds might succeed. For example, a\n \n SendMessage\n request might succeed, but after 60\n seconds the queue and the message you sent no longer exist.

\n

When you delete a queue, you must wait at least 60 seconds before creating a queue\n with the same name.

\n \n

Cross-account permissions don't apply to this action. For more information, \nsee Grant \ncross-account permissions to a role and a username in the Amazon SQS Developer Guide.

\n

The delete operation uses the HTTP GET verb.

\n
" - } - }, - "com.amazonaws.sqs#DeleteQueueRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", + "com.amazonaws.sqs#ChangeMessageVisibilityBatch": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#ChangeMessageVisibilityBatchRequest" + }, + "output": { + "target": "com.amazonaws.sqs#ChangeMessageVisibilityBatchResult" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#BatchEntryIdsNotDistinct" + }, + { + "target": "com.amazonaws.sqs#EmptyBatchRequest" + }, + { + "target": "com.amazonaws.sqs#InvalidAddress" + }, + { + "target": "com.amazonaws.sqs#InvalidBatchEntryId" + }, + { + "target": "com.amazonaws.sqs#InvalidSecurity" + }, + { + "target": "com.amazonaws.sqs#QueueDoesNotExist" + }, + { + "target": "com.amazonaws.sqs#RequestThrottled" + }, + { + "target": "com.amazonaws.sqs#TooManyEntriesInBatchRequest" + }, + { + "target": "com.amazonaws.sqs#UnsupportedOperation" + } + ], "traits": { - "smithy.api#documentation": "

The URL of the Amazon SQS queue to delete.

\n

Queue URLs and names are case-sensitive.

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

Changes the visibility timeout of multiple messages. This is a batch version of\n \n ChangeMessageVisibility. The result of the action\n on each message is reported individually in the response. You can send up to 10\n \n ChangeMessageVisibility\n requests with each\n ChangeMessageVisibilityBatch action.

\n \n

Because the batch request can result in a combination of successful and\n unsuccessful actions, you should check for batch errors even when the call returns\n an HTTP status code of 200.

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

", - "smithy.api#input": {} - } - }, - "com.amazonaws.sqs#EmptyBatchRequest": { - "type": "structure", - "members": {}, - "traits": { - "aws.protocols#awsQueryError": { - "code": "AWS.SimpleQueueService.EmptyBatchRequest", - "httpResponseCode": 400 - }, - "smithy.api#documentation": "

The batch request doesn't contain any entries.

", - "smithy.api#error": "client", - "smithy.api#httpError": 400 - } - }, - "com.amazonaws.sqs#GetQueueAttributes": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#GetQueueAttributesRequest" - }, - "output": { - "target": "com.amazonaws.sqs#GetQueueAttributesResult" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#InvalidAttributeName" - } - ], - "traits": { - "smithy.api#documentation": "

Gets attributes for the specified queue.

\n \n

To determine whether a queue is FIFO, you can check whether QueueName ends with the .fifo suffix.

\n
" - } - }, - "com.amazonaws.sqs#GetQueueAttributesRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", + "com.amazonaws.sqs#ChangeMessageVisibilityBatchRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

The URL of the Amazon SQS queue whose messages' visibility is changed.

\n

Queue URLs and names are case-sensitive.

", + "smithy.api#required": {} + } + }, + "Entries": { + "target": "com.amazonaws.sqs#ChangeMessageVisibilityBatchRequestEntryList", + "traits": { + "smithy.api#documentation": "

Lists the receipt handles of the messages for which the visibility timeout must be\n changed.

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "ChangeMessageVisibilityBatchRequestEntry" + } + } + }, "traits": { - "smithy.api#documentation": "

The URL of the Amazon SQS queue whose attribute information is retrieved.

\n

Queue URLs and names are case-sensitive.

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

", + "smithy.api#input": {} } - }, - "AttributeNames": { - "target": "com.amazonaws.sqs#AttributeNameList", + }, + "com.amazonaws.sqs#ChangeMessageVisibilityBatchRequestEntry": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

An identifier for this particular receipt handle used to communicate the\n result.

\n \n

The Ids of a batch request need to be unique within a request.

\n

This identifier can have up to 80 characters. The following characters are\n accepted: alphanumeric characters, hyphens(-), and underscores (_).

\n
", + "smithy.api#required": {} + } + }, + "ReceiptHandle": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

A receipt handle.

", + "smithy.api#required": {} + } + }, + "VisibilityTimeout": { + "target": "com.amazonaws.sqs#NullableInteger", + "traits": { + "smithy.api#documentation": "

The new value (in seconds) for the message's visibility timeout.

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

A list of attributes for which to retrieve information.

\n

The AttributeNames parameter is optional, but if you don't specify values\n for this parameter, the request returns empty results.

\n \n

In the future, new attributes might be added. If you write code that calls this action, we recommend that you structure your code so that it can handle new attributes gracefully.

\n
\n

The following attributes are supported:

\n \n

The ApproximateNumberOfMessagesDelayed,\n ApproximateNumberOfMessagesNotVisible, and\n ApproximateNumberOfMessages metrics may not achieve consistency\n until at least 1 minute after the producers stop sending messages. This period is\n required for the queue metadata to reach eventual consistency.

\n
\n \n

The following attributes apply only to dead-letter queues:\n

\n \n \n

The dead-letter queue of a \n FIFO queue must also be a FIFO queue. Similarly, the dead-letter \n queue of a standard queue must also be a standard queue.

\n
\n

The following attributes apply only to server-side-encryption:

\n \n

The following attributes apply only to FIFO (first-in-first-out)\n queues:

\n \n

The following attributes apply only to \nhigh throughput\nfor FIFO queues:

\n \n

To enable high throughput for FIFO queues, do the following:

\n \n

If you set these attributes to anything other than the values shown for enabling high\n throughput, normal throughput is in effect and deduplication occurs as specified.

\n

For information on throughput quotas, \n see Quotas related to messages \n in the Amazon SQS Developer Guide.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "AttributeName" + "smithy.api#documentation": "

Encloses a receipt handle and an entry ID for each message in \n ChangeMessageVisibilityBatch.\n

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

", - "smithy.api#input": {} - } - }, - "com.amazonaws.sqs#GetQueueAttributesResult": { - "type": "structure", - "members": { - "Attributes": { - "target": "com.amazonaws.sqs#QueueAttributeMap", - "traits": { - "smithy.api#documentation": "

A map of attributes to their respective values.

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

A list of returned queue attributes.

", - "smithy.api#output": {} - } - }, - "com.amazonaws.sqs#GetQueueUrl": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#GetQueueUrlRequest" - }, - "output": { - "target": "com.amazonaws.sqs#GetQueueUrlResult" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#QueueDoesNotExist" - } - ], - "traits": { - "smithy.api#documentation": "

Returns the URL of an existing Amazon SQS queue.

\n

To access a queue that belongs to another AWS account, use the\n QueueOwnerAWSAccountId parameter to specify the account ID of the\n queue's owner. The queue's owner must grant you permission to access the queue. For more\n information about shared queue access, see \n AddPermission\n \n or see Allow Developers to Write Messages to a Shared Queue in the Amazon SQS\n Developer Guide.

" - } - }, - "com.amazonaws.sqs#GetQueueUrlRequest": { - "type": "structure", - "members": { - "QueueName": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

The name of the queue whose URL must be fetched. Maximum 80 characters. Valid values:\n alphanumeric characters, hyphens (-), and underscores\n (_).

\n

Queue URLs and names are case-sensitive.

", - "smithy.api#required": {} + "com.amazonaws.sqs#ChangeMessageVisibilityBatchRequestEntryList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#ChangeMessageVisibilityBatchRequestEntry" } - }, - "QueueOwnerAWSAccountId": { - "target": "com.amazonaws.sqs#String", + }, + "com.amazonaws.sqs#ChangeMessageVisibilityBatchResult": { + "type": "structure", + "members": { + "Successful": { + "target": "com.amazonaws.sqs#ChangeMessageVisibilityBatchResultEntryList", + "traits": { + "smithy.api#documentation": "

A list of \n ChangeMessageVisibilityBatchResultEntry\n \n items.

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "ChangeMessageVisibilityBatchResultEntry" + } + }, + "Failed": { + "target": "com.amazonaws.sqs#BatchResultErrorEntryList", + "traits": { + "smithy.api#documentation": "

A list of \n BatchResultErrorEntry\n items.

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "BatchResultErrorEntry" + } + } + }, "traits": { - "smithy.api#documentation": "

The Amazon Web Services account ID of the account that created the queue.

" + "smithy.api#documentation": "

For each message in the batch, the response contains a \n ChangeMessageVisibilityBatchResultEntry\n tag if the message\n succeeds or a \n BatchResultErrorEntry\n tag if the message\n fails.

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

", - "smithy.api#input": {} - } - }, - "com.amazonaws.sqs#GetQueueUrlResult": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", + "com.amazonaws.sqs#ChangeMessageVisibilityBatchResultEntry": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

Represents a message whose visibility timeout has been changed successfully.

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

The URL of the queue.

" + "smithy.api#documentation": "

Encloses the Id of an entry in \n ChangeMessageVisibilityBatch.\n

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

For more information, see Interpreting Responses in the Amazon SQS Developer\n Guide.

", - "smithy.api#output": {} - } - }, - "com.amazonaws.sqs#Integer": { - "type": "integer", - "traits": { - "smithy.api#default": 0 - } - }, - "com.amazonaws.sqs#InvalidAttributeName": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#documentation": "

The specified attribute doesn't exist.

", - "smithy.api#error": "client" - } - }, - "com.amazonaws.sqs#InvalidBatchEntryId": { - "type": "structure", - "members": {}, - "traits": { - "aws.protocols#awsQueryError": { - "code": "AWS.SimpleQueueService.InvalidBatchEntryId", - "httpResponseCode": 400 - }, - "smithy.api#documentation": "

The Id of a batch entry in a batch request doesn't abide by the\n specification.

", - "smithy.api#error": "client", - "smithy.api#httpError": 400 - } - }, - "com.amazonaws.sqs#InvalidIdFormat": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#documentation": "

The specified receipt handle isn't valid for the current version.

", - "smithy.api#error": "client" - } - }, - "com.amazonaws.sqs#InvalidMessageContents": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#documentation": "

The message contains characters outside the allowed set.

", - "smithy.api#error": "client" - } - }, - "com.amazonaws.sqs#ListDeadLetterSourceQueues": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#ListDeadLetterSourceQueuesRequest" - }, - "output": { - "target": "com.amazonaws.sqs#ListDeadLetterSourceQueuesResult" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#QueueDoesNotExist" - } - ], - "traits": { - "smithy.api#documentation": "

Returns a list of your queues that have the RedrivePolicy queue attribute\n configured with a dead-letter queue.

\n

The ListDeadLetterSourceQueues methods supports pagination. Set\n parameter MaxResults in the request to specify the maximum number of\n results to be returned in the response. If you do not set MaxResults, the\n response includes a maximum of 1,000 results. If you set MaxResults and\n there are additional results to display, the response includes a value for\n NextToken. Use NextToken as a parameter in your next\n request to ListDeadLetterSourceQueues to receive the next page of results.

\n

For more information about using dead-letter queues, see Using Amazon SQS Dead-Letter Queues in the Amazon SQS Developer\n Guide.

", - "smithy.api#paginated": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "items": "queueUrls", - "pageSize": "MaxResults" - } - } - }, - "com.amazonaws.sqs#ListDeadLetterSourceQueuesRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

The URL of a dead-letter queue.

\n

Queue URLs and names are case-sensitive.

", - "smithy.api#required": {} + "com.amazonaws.sqs#ChangeMessageVisibilityBatchResultEntryList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#ChangeMessageVisibilityBatchResultEntry" } - }, - "NextToken": { - "target": "com.amazonaws.sqs#Token", + }, + "com.amazonaws.sqs#ChangeMessageVisibilityRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

The URL of the Amazon SQS queue whose message's visibility is changed.

\n

Queue URLs and names are case-sensitive.

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

The receipt handle associated with the message, whose visibility timeout is changed.\n This parameter is returned by the \n ReceiveMessage\n \n action.

", + "smithy.api#required": {} + } + }, + "VisibilityTimeout": { + "target": "com.amazonaws.sqs#NullableInteger", + "traits": { + "smithy.api#documentation": "

The new value for the message's visibility timeout (in seconds). Values range:\n 0 to 43200. Maximum: 12 hours.

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

Pagination token to request the next set of results.

" + "smithy.api#input": {} } - }, - "MaxResults": { - "target": "com.amazonaws.sqs#BoxedInteger", + }, + "com.amazonaws.sqs#CreateQueue": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#CreateQueueRequest" + }, + "output": { + "target": "com.amazonaws.sqs#CreateQueueResult" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#InvalidAddress" + }, + { + "target": "com.amazonaws.sqs#InvalidAttributeName" + }, + { + "target": "com.amazonaws.sqs#InvalidAttributeValue" + }, + { + "target": "com.amazonaws.sqs#InvalidSecurity" + }, + { + "target": "com.amazonaws.sqs#QueueDeletedRecently" + }, + { + "target": "com.amazonaws.sqs#QueueNameExists" + }, + { + "target": "com.amazonaws.sqs#RequestThrottled" + }, + { + "target": "com.amazonaws.sqs#UnsupportedOperation" + } + ], "traits": { - "smithy.api#documentation": "

Maximum number of results to include in the response. Value range is 1 to 1000. You\n must set MaxResults to receive a value for NextToken in the\n response.

" + "smithy.api#documentation": "

Creates a new standard or FIFO queue. You can pass one or more attributes in the\n request. Keep the following in mind:

\n \n

To successfully create a new queue, you must provide a queue name that adheres to the\n limits\n related to queues and is unique within the scope of your queues.

\n \n

After you create a queue, you must wait at least one second after the queue is\n created to be able to use the queue.

\n
\n

To get the queue URL, use the \n GetQueueUrl\n action.\n \n GetQueueUrl\n requires only the\n QueueName parameter. be aware of existing queue names:

\n \n \n

Cross-account permissions don't apply to this action. For more information, see\n Grant cross-account permissions to a role and a username in the\n Amazon SQS Developer Guide.

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

", - "smithy.api#input": {} - } - }, - "com.amazonaws.sqs#ListDeadLetterSourceQueuesResult": { - "type": "structure", - "members": { - "queueUrls": { - "target": "com.amazonaws.sqs#QueueUrlList", + "com.amazonaws.sqs#CreateQueueRequest": { + "type": "structure", + "members": { + "QueueName": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

The name of the new queue. The following limits apply to this name:

\n \n

Queue URLs and names are case-sensitive.

", + "smithy.api#required": {} + } + }, + "Attributes": { + "target": "com.amazonaws.sqs#QueueAttributeMap", + "traits": { + "smithy.api#documentation": "

A map of attributes with their corresponding values.

\n

The following lists the names, descriptions, and values of the special request\n parameters that the CreateQueue action uses:

\n \n

The following attributes apply only to dead-letter queues:\n

\n \n \n

The dead-letter queue of a FIFO queue must also be a FIFO queue. Similarly, the\n dead-letter queue of a standard queue must also be a standard queue.

\n
\n

The following attributes apply only to server-side-encryption:

\n \n

The following attributes apply only to FIFO\n (first-in-first-out) queues:

\n \n

The following attributes apply only to high\n throughput for FIFO queues:

\n \n

To enable high throughput for FIFO queues, do the following:

\n \n

If you set these attributes to anything other than the values shown for enabling high\n throughput, normal throughput is in effect and deduplication occurs as specified.

\n

For information on throughput quotas, see Quotas\n related to messages in the Amazon SQS Developer\n Guide.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Attribute" + } + }, + "tags": { + "target": "com.amazonaws.sqs#TagMap", + "traits": { + "smithy.api#documentation": "

Add cost allocation tags to the specified Amazon SQS queue. For an overview, see\n Tagging\n Your Amazon SQS Queues in the Amazon SQS Developer\n Guide.

\n

When you use queue tags, keep the following guidelines in mind:

\n \n

For a full list of tag restrictions, see Quotas related to queues in the Amazon SQS Developer\n Guide.

\n \n

To be able to tag a queue on creation, you must have the\n sqs:CreateQueue and sqs:TagQueue permissions.

\n

Cross-account permissions don't apply to this action. For more information, see\n Grant cross-account permissions to a role and a username in the\n Amazon SQS Developer Guide.

\n
", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Tag" + } + } + }, "traits": { - "smithy.api#documentation": "

A list of source queue URLs that have the RedrivePolicy queue attribute\n configured with a dead-letter queue.

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

", + "smithy.api#input": {} } - }, - "NextToken": { - "target": "com.amazonaws.sqs#Token", + }, + "com.amazonaws.sqs#CreateQueueResult": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

The URL of the created Amazon SQS queue.

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

Pagination token to include in the next request. Token value is null if\n there are no additional results to request, or if you did not set\n MaxResults in the request.

" + "smithy.api#documentation": "

Returns the QueueUrl attribute of the created queue.

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

A list of your dead letter source queues.

", - "smithy.api#output": {} - } - }, - "com.amazonaws.sqs#ListMessageMoveTasks": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#ListMessageMoveTasksRequest" - }, - "output": { - "target": "com.amazonaws.sqs#ListMessageMoveTasksResult" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.sqs#UnsupportedOperation" - } - ], - "traits": { - "smithy.api#documentation": "

Gets the most recent message movement tasks (up to 10) under a specific source\n queue.

\n \n \n " - } - }, - "com.amazonaws.sqs#ListMessageMoveTasksRequest": { - "type": "structure", - "members": { - "SourceArn": { - "target": "com.amazonaws.sqs#String", + "com.amazonaws.sqs#DeleteMessage": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#DeleteMessageRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#InvalidAddress" + }, + { + "target": "com.amazonaws.sqs#InvalidIdFormat" + }, + { + "target": "com.amazonaws.sqs#InvalidSecurity" + }, + { + "target": "com.amazonaws.sqs#QueueDoesNotExist" + }, + { + "target": "com.amazonaws.sqs#ReceiptHandleIsInvalid" + }, + { + "target": "com.amazonaws.sqs#RequestThrottled" + }, + { + "target": "com.amazonaws.sqs#UnsupportedOperation" + } + ], "traits": { - "smithy.api#documentation": "

The ARN of the queue whose message movement tasks are to be listed.

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

Deletes the specified message from the specified queue. To select the message to\n delete, use the ReceiptHandle of the message (not the\n MessageId which you receive when you send the message). Amazon SQS can\n delete a message from a queue even if a visibility timeout setting causes the message to\n be locked by another consumer. Amazon SQS automatically deletes messages left in a queue\n longer than the retention period configured for the queue.

\n \n

The ReceiptHandle is associated with a specific\n instance of receiving a message. If you receive a message more than\n once, the ReceiptHandle is different each time you receive a message.\n When you use the DeleteMessage action, you must provide the most\n recently received ReceiptHandle for the message (otherwise, the request\n succeeds, but the message will not be deleted).

\n

For standard queues, it is possible to receive a message even after you delete it.\n This might happen on rare occasions if one of the servers which stores a copy of the\n message is unavailable when you send the request to delete the message. The copy\n remains on the server and might be returned to you during a subsequent receive\n request. You should ensure that your application is idempotent, so that receiving a\n message more than once does not cause issues.

\n
" } - }, - "MaxResults": { - "target": "com.amazonaws.sqs#Integer", + }, + "com.amazonaws.sqs#DeleteMessageBatch": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#DeleteMessageBatchRequest" + }, + "output": { + "target": "com.amazonaws.sqs#DeleteMessageBatchResult" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#BatchEntryIdsNotDistinct" + }, + { + "target": "com.amazonaws.sqs#EmptyBatchRequest" + }, + { + "target": "com.amazonaws.sqs#InvalidAddress" + }, + { + "target": "com.amazonaws.sqs#InvalidBatchEntryId" + }, + { + "target": "com.amazonaws.sqs#InvalidSecurity" + }, + { + "target": "com.amazonaws.sqs#QueueDoesNotExist" + }, + { + "target": "com.amazonaws.sqs#RequestThrottled" + }, + { + "target": "com.amazonaws.sqs#TooManyEntriesInBatchRequest" + }, + { + "target": "com.amazonaws.sqs#UnsupportedOperation" + } + ], "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "

The maximum number of results to include in the response. The default is 1, which\n provides the most recent message movement task. The upper limit is 10.

" + "smithy.api#documentation": "

Deletes up to ten messages from the specified queue. This is a batch version of\n \n DeleteMessage. The result of the action on each\n message is reported individually in the response.

\n \n

Because the batch request can result in a combination of successful and\n unsuccessful actions, you should check for batch errors even when the call returns\n an HTTP status code of 200.

\n
" } - } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.sqs#ListMessageMoveTasksResult": { - "type": "structure", - "members": { - "Results": { - "target": "com.amazonaws.sqs#ListMessageMoveTasksResultEntryList", + "com.amazonaws.sqs#DeleteMessageBatchRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

The URL of the Amazon SQS queue from which messages are deleted.

\n

Queue URLs and names are case-sensitive.

", + "smithy.api#required": {} + } + }, + "Entries": { + "target": "com.amazonaws.sqs#DeleteMessageBatchRequestEntryList", + "traits": { + "smithy.api#documentation": "

Lists the receipt handles for the messages to be deleted.

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "DeleteMessageBatchRequestEntry" + } + } + }, "traits": { - "smithy.api#documentation": "

A list of message movement tasks and their attributes.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "ListMessageMoveTasksResultEntry" + "smithy.api#documentation": "

", + "smithy.api#input": {} } - } }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.sqs#ListMessageMoveTasksResultEntry": { - "type": "structure", - "members": { - "TaskHandle": { - "target": "com.amazonaws.sqs#String", + "com.amazonaws.sqs#DeleteMessageBatchRequestEntry": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

The identifier for this particular receipt handle. This is used to communicate the\n result.

\n \n

The Ids of a batch request need to be unique within a request.

\n

This identifier can have up to 80 characters. The following characters are\n accepted: alphanumeric characters, hyphens(-), and underscores (_).

\n
", + "smithy.api#required": {} + } + }, + "ReceiptHandle": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

A receipt handle.

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

An identifier associated with a message movement task. When this field is returned in\n the response of the ListMessageMoveTasks action, it is only populated for\n tasks that are in RUNNING status.

" + "smithy.api#documentation": "

Encloses a receipt handle and an identifier for it.

" } - }, - "Status": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

The status of the message movement task. Possible values are: RUNNING, COMPLETED,\n CANCELLING, CANCELLED, and FAILED.

" + }, + "com.amazonaws.sqs#DeleteMessageBatchRequestEntryList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#DeleteMessageBatchRequestEntry" } - }, - "SourceArn": { - "target": "com.amazonaws.sqs#String", + }, + "com.amazonaws.sqs#DeleteMessageBatchResult": { + "type": "structure", + "members": { + "Successful": { + "target": "com.amazonaws.sqs#DeleteMessageBatchResultEntryList", + "traits": { + "smithy.api#documentation": "

A list of \n DeleteMessageBatchResultEntry\n items.

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "DeleteMessageBatchResultEntry" + } + }, + "Failed": { + "target": "com.amazonaws.sqs#BatchResultErrorEntryList", + "traits": { + "smithy.api#documentation": "

A list of \n BatchResultErrorEntry\n items.

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "BatchResultErrorEntry" + } + } + }, "traits": { - "smithy.api#documentation": "

The ARN of the queue that contains the messages to be moved to another queue.

" + "smithy.api#documentation": "

For each message in the batch, the response contains a \n DeleteMessageBatchResultEntry\n tag if the message is deleted\n or a \n BatchResultErrorEntry\n tag if the message can't be\n deleted.

", + "smithy.api#output": {} } - }, - "DestinationArn": { - "target": "com.amazonaws.sqs#String", + }, + "com.amazonaws.sqs#DeleteMessageBatchResultEntry": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

Represents a successfully deleted message.

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

The ARN of the destination queue if it has been specified in the\n StartMessageMoveTask request. If a DestinationArn has not\n been specified in the StartMessageMoveTask request, this field value will\n be NULL.

" + "smithy.api#documentation": "

Encloses the Id of an entry in \n DeleteMessageBatch.\n

" } - }, - "MaxNumberOfMessagesPerSecond": { - "target": "com.amazonaws.sqs#Integer", - "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "

The number of messages to be moved per second (the message movement rate), if it has\n been specified in the StartMessageMoveTask request. If a\n MaxNumberOfMessagesPerSecond has not been specified in the\n StartMessageMoveTask request, this field value will be NULL.

" + }, + "com.amazonaws.sqs#DeleteMessageBatchResultEntryList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#DeleteMessageBatchResultEntry" } - }, - "ApproximateNumberOfMessagesMoved": { - "target": "com.amazonaws.sqs#Long", + }, + "com.amazonaws.sqs#DeleteMessageRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

The URL of the Amazon SQS queue from which messages are deleted.

\n

Queue URLs and names are case-sensitive.

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

The receipt handle associated with the message to delete.

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

The approximate number of messages already moved to the destination queue.

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } - }, - "ApproximateNumberOfMessagesToMove": { - "target": "com.amazonaws.sqs#Long", + }, + "com.amazonaws.sqs#DeleteQueue": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#DeleteQueueRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#InvalidAddress" + }, + { + "target": "com.amazonaws.sqs#InvalidSecurity" + }, + { + "target": "com.amazonaws.sqs#QueueDoesNotExist" + }, + { + "target": "com.amazonaws.sqs#RequestThrottled" + }, + { + "target": "com.amazonaws.sqs#UnsupportedOperation" + } + ], "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "

The number of messages to be moved from the source queue. This number is obtained at\n the time of starting the message movement task.

" + "smithy.api#documentation": "

Deletes the queue specified by the QueueUrl, regardless of the queue's\n contents.

\n \n

Be careful with the DeleteQueue action: When you delete a queue, any\n messages in the queue are no longer available.

\n
\n

When you delete a queue, the deletion process takes up to 60 seconds. Requests you\n send involving that queue during the 60 seconds might succeed. For example, a\n \n SendMessage\n request might succeed, but after 60\n seconds the queue and the message you sent no longer exist.

\n

When you delete a queue, you must wait at least 60 seconds before creating a queue\n with the same name.

\n \n

Cross-account permissions don't apply to this action. For more information, see\n Grant cross-account permissions to a role and a username in the\n Amazon SQS Developer Guide.

\n

The delete operation uses the HTTP GET verb.

\n
" } - }, - "FailureReason": { - "target": "com.amazonaws.sqs#String", + }, + "com.amazonaws.sqs#DeleteQueueRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

The URL of the Amazon SQS queue to delete.

\n

Queue URLs and names are case-sensitive.

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

The task failure reason (only included if the task status is FAILED).

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } - }, - "StartedTimestamp": { - "target": "com.amazonaws.sqs#Long", + }, + "com.amazonaws.sqs#EmptyBatchRequest": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "

The timestamp of starting the message movement task.

" + "aws.protocols#awsQueryError": { + "code": "AWS.SimpleQueueService.EmptyBatchRequest", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

The batch request doesn't contain any entries.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 } - } - }, - "traits": { - "smithy.api#documentation": "

Contains the details of a message movement task.

" - } - }, - "com.amazonaws.sqs#ListMessageMoveTasksResultEntryList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#ListMessageMoveTasksResultEntry" - } - }, - "com.amazonaws.sqs#ListQueueTags": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#ListQueueTagsRequest" }, - "output": { - "target": "com.amazonaws.sqs#ListQueueTagsResult" + "com.amazonaws.sqs#ExceptionMessage": { + "type": "string" }, - "traits": { - "smithy.api#documentation": "

List all cost allocation tags added to the specified Amazon SQS queue.\n For an overview, see Tagging \nYour Amazon SQS Queues in the Amazon SQS Developer Guide.

\n \n

Cross-account permissions don't apply to this action. For more information, \nsee Grant \ncross-account permissions to a role and a username in the Amazon SQS Developer Guide.

\n
" - } - }, - "com.amazonaws.sqs#ListQueueTagsRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", + "com.amazonaws.sqs#GetQueueAttributes": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#GetQueueAttributesRequest" + }, + "output": { + "target": "com.amazonaws.sqs#GetQueueAttributesResult" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#InvalidAddress" + }, + { + "target": "com.amazonaws.sqs#InvalidAttributeName" + }, + { + "target": "com.amazonaws.sqs#InvalidSecurity" + }, + { + "target": "com.amazonaws.sqs#QueueDoesNotExist" + }, + { + "target": "com.amazonaws.sqs#RequestThrottled" + }, + { + "target": "com.amazonaws.sqs#UnsupportedOperation" + } + ], "traits": { - "smithy.api#documentation": "

The URL of the queue.

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

Gets attributes for the specified queue.

\n \n

To determine whether a queue is FIFO, you can check whether QueueName ends with the\n .fifo suffix.

\n
" } - } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.sqs#ListQueueTagsResult": { - "type": "structure", - "members": { - "Tags": { - "target": "com.amazonaws.sqs#TagMap", + "com.amazonaws.sqs#GetQueueAttributesRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

The URL of the Amazon SQS queue whose attribute information is retrieved.

\n

Queue URLs and names are case-sensitive.

", + "smithy.api#required": {} + } + }, + "AttributeNames": { + "target": "com.amazonaws.sqs#AttributeNameList", + "traits": { + "smithy.api#documentation": "

A list of attributes for which to retrieve information.

\n

The AttributeNames parameter is optional, but if you don't specify values\n for this parameter, the request returns empty results.

\n \n

In the future, new attributes might be added. If you write code that calls this\n action, we recommend that you structure your code so that it can handle new\n attributes gracefully.

\n
\n

The following attributes are supported:

\n \n

The ApproximateNumberOfMessagesDelayed,\n ApproximateNumberOfMessagesNotVisible, and\n ApproximateNumberOfMessages metrics may not achieve consistency\n until at least 1 minute after the producers stop sending messages. This period is\n required for the queue metadata to reach eventual consistency.

\n
\n \n

The following attributes apply only to dead-letter queues:\n

\n \n \n

The dead-letter queue of a FIFO queue must also be a FIFO queue. Similarly, the\n dead-letter queue of a standard queue must also be a standard queue.

\n
\n

The following attributes apply only to server-side-encryption:

\n \n

The following attributes apply only to FIFO\n (first-in-first-out) queues:

\n \n

The following attributes apply only to high\n throughput for FIFO queues:

\n \n

To enable high throughput for FIFO queues, do the following:

\n \n

If you set these attributes to anything other than the values shown for enabling high\n throughput, normal throughput is in effect and deduplication occurs as specified.

\n

For information on throughput quotas, see Quotas\n related to messages in the Amazon SQS Developer\n Guide.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "AttributeName" + } + } + }, "traits": { - "smithy.api#documentation": "

The list of all tags added to the specified queue.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Tag" + "smithy.api#documentation": "

", + "smithy.api#input": {} } - } }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.sqs#ListQueues": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#ListQueuesRequest" - }, - "output": { - "target": "com.amazonaws.sqs#ListQueuesResult" - }, - "traits": { - "smithy.api#documentation": "

Returns a list of your queues in the current region. The response includes a maximum\n of 1,000 results. If you specify a value for the optional QueueNamePrefix\n parameter, only queues with a name that begins with the specified value are\n returned.

\n

The listQueues methods supports pagination. Set parameter\n MaxResults in the request to specify the maximum number of results to\n be returned in the response. If you do not set MaxResults, the response\n includes a maximum of 1,000 results. If you set MaxResults and there are\n additional results to display, the response includes a value for NextToken.\n Use NextToken as a parameter in your next request to\n listQueues to receive the next page of results.

\n \n

Cross-account permissions don't apply to this action. For more information, \nsee Grant \ncross-account permissions to a role and a username in the Amazon SQS Developer Guide.

\n
", - "smithy.api#paginated": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "items": "QueueUrls", - "pageSize": "MaxResults" - } - } - }, - "com.amazonaws.sqs#ListQueuesRequest": { - "type": "structure", - "members": { - "QueueNamePrefix": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

A string to use for filtering the list results. Only those queues whose name begins\n with the specified string are returned.

\n

Queue URLs and names are case-sensitive.

" - } - }, - "NextToken": { - "target": "com.amazonaws.sqs#Token", - "traits": { - "smithy.api#documentation": "

Pagination token to request the next set of results.

" - } - }, - "MaxResults": { - "target": "com.amazonaws.sqs#BoxedInteger", + "com.amazonaws.sqs#GetQueueAttributesResult": { + "type": "structure", + "members": { + "Attributes": { + "target": "com.amazonaws.sqs#QueueAttributeMap", + "traits": { + "smithy.api#documentation": "

A map of attributes to their respective values.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Attribute" + } + } + }, "traits": { - "smithy.api#documentation": "

Maximum number of results to include in the response. Value range is 1 to 1000. You\n must set MaxResults to receive a value for NextToken in the\n response.

" + "smithy.api#documentation": "

A list of returned queue attributes.

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

", - "smithy.api#input": {} - } - }, - "com.amazonaws.sqs#ListQueuesResult": { - "type": "structure", - "members": { - "NextToken": { - "target": "com.amazonaws.sqs#Token", - "traits": { - "smithy.api#documentation": "

Pagination token to include in the next request. Token value is null if\n there are no additional results to request, or if you did not set\n MaxResults in the request.

" - } - }, - "QueueUrls": { - "target": "com.amazonaws.sqs#QueueUrlList", + "com.amazonaws.sqs#GetQueueUrl": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#GetQueueUrlRequest" + }, + "output": { + "target": "com.amazonaws.sqs#GetQueueUrlResult" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#InvalidAddress" + }, + { + "target": "com.amazonaws.sqs#InvalidSecurity" + }, + { + "target": "com.amazonaws.sqs#QueueDoesNotExist" + }, + { + "target": "com.amazonaws.sqs#RequestThrottled" + }, + { + "target": "com.amazonaws.sqs#UnsupportedOperation" + } + ], "traits": { - "smithy.api#documentation": "

A list of queue URLs, up to 1,000 entries, or the value of MaxResults\n that you sent in the request.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "QueueUrl" + "smithy.api#documentation": "

Returns the URL of an existing Amazon SQS queue.

\n

To access a queue that belongs to another AWS account, use the\n QueueOwnerAWSAccountId parameter to specify the account ID of the\n queue's owner. The queue's owner must grant you permission to access the queue. For more\n information about shared queue access, see \n AddPermission\n \n or see Allow Developers to Write Messages to a Shared Queue in the\n Amazon SQS Developer Guide.

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

A list of your queues.

", - "smithy.api#output": {} - } - }, - "com.amazonaws.sqs#Long": { - "type": "long", - "traits": { - "smithy.api#default": 0 - } - }, - "com.amazonaws.sqs#Message": { - "type": "structure", - "members": { - "MessageId": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

A unique identifier for the message. A MessageIdis considered unique\n across all Amazon Web Services accounts for an extended period of time.

" - } - }, - "ReceiptHandle": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

An identifier associated with the act of receiving the message. A new receipt handle\n is returned every time you receive a message. When deleting a message, you provide the\n last received receipt handle to delete the message.

" - } - }, - "MD5OfBody": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

An MD5 digest of the non-URL-encoded message body string.

" - } - }, - "Body": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

The message's contents (not URL-encoded).

" - } - }, - "Attributes": { - "target": "com.amazonaws.sqs#MessageSystemAttributeMap", - "traits": { - "smithy.api#documentation": "

A map of the attributes requested in \n ReceiveMessage\n to\n their respective values. Supported attributes:

\n \n

\n ApproximateFirstReceiveTimestamp and SentTimestamp are each\n returned as an integer representing the epoch time in\n milliseconds.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Attribute" - } - }, - "MD5OfMessageAttributes": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

An MD5 digest of the non-URL-encoded message attribute string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see RFC1321.

" - } - }, - "MessageAttributes": { - "target": "com.amazonaws.sqs#MessageBodyAttributeMap", + "com.amazonaws.sqs#GetQueueUrlRequest": { + "type": "structure", + "members": { + "QueueName": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

The name of the queue whose URL must be fetched. Maximum 80 characters. Valid values:\n alphanumeric characters, hyphens (-), and underscores\n (_).

\n

Queue URLs and names are case-sensitive.

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

The Amazon Web\n Services account ID of the account that created the queue.

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

Each message attribute consists of a Name, Type, \nand Value. For more information, see \nAmazon SQS \nmessage attributes in the Amazon SQS Developer Guide.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "MessageAttribute" + "smithy.api#documentation": "

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

An Amazon SQS message.

" - } - }, - "com.amazonaws.sqs#MessageAttributeName": { - "type": "string" - }, - "com.amazonaws.sqs#MessageAttributeNameList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#MessageAttributeName" - } - }, - "com.amazonaws.sqs#MessageAttributeValue": { - "type": "structure", - "members": { - "StringValue": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

Strings are Unicode with UTF-8 binary encoding. For a list of code values, see ASCII Printable\n Characters.

" - } - }, - "BinaryValue": { - "target": "com.amazonaws.sqs#Binary", - "traits": { - "smithy.api#documentation": "

Binary type attributes can store any binary data, such as compressed data, encrypted\n data, or images.

" - } - }, - "StringListValues": { - "target": "com.amazonaws.sqs#StringList", - "traits": { - "smithy.api#documentation": "

Not implemented. Reserved for future use.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "StringListValue" - } - }, - "BinaryListValues": { - "target": "com.amazonaws.sqs#BinaryList", - "traits": { - "smithy.api#documentation": "

Not implemented. Reserved for future use.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "BinaryListValue" - } - }, - "DataType": { - "target": "com.amazonaws.sqs#String", + "com.amazonaws.sqs#GetQueueUrlResult": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

The URL of the queue.

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

Amazon SQS supports the following logical data types: String,\n Number, and Binary. For the Number data type,\n you must use StringValue.

\n

You can also append custom labels. For more information, see Amazon SQS Message Attributes in the Amazon SQS Developer\n Guide.

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

For more information, see Interpreting Responses in the Amazon SQS Developer\n Guide.

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

The user-specified message attribute value. For string data types, the\n Value attribute has the same restrictions on the content as the message\n body. For more information, see \n SendMessage.\n

\n

\n Name, type, value and the message body must not\n be empty or null. All parts of the message attribute, including Name,\n Type, and Value, are part of the message size restriction\n (256 KiB or 262,144 bytes).

" - } - }, - "com.amazonaws.sqs#MessageBodyAttributeMap": { - "type": "map", - "key": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#xmlName": "Name" - } - }, - "value": { - "target": "com.amazonaws.sqs#MessageAttributeValue", - "traits": { - "smithy.api#xmlName": "Value" - } - } - }, - "com.amazonaws.sqs#MessageBodySystemAttributeMap": { - "type": "map", - "key": { - "target": "com.amazonaws.sqs#MessageSystemAttributeNameForSends", - "traits": { - "smithy.api#xmlName": "Name" - } - }, - "value": { - "target": "com.amazonaws.sqs#MessageSystemAttributeValue", - "traits": { - "smithy.api#xmlName": "Value" - } - } - }, - "com.amazonaws.sqs#MessageList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#Message" - } - }, - "com.amazonaws.sqs#MessageNotInflight": { - "type": "structure", - "members": {}, - "traits": { - "aws.protocols#awsQueryError": { - "code": "AWS.SimpleQueueService.MessageNotInflight", - "httpResponseCode": 400 - }, - "smithy.api#documentation": "

The specified message isn't in flight.

", - "smithy.api#error": "client", - "smithy.api#httpError": 400 - } - }, - "com.amazonaws.sqs#MessageSystemAttributeMap": { - "type": "map", - "key": { - "target": "com.amazonaws.sqs#MessageSystemAttributeName", - "traits": { - "smithy.api#xmlName": "Name" - } - }, - "value": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#xmlName": "Value" - } - } - }, - "com.amazonaws.sqs#MessageSystemAttributeName": { - "type": "enum", - "members": { - "SenderId": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "SenderId" - } - }, - "SentTimestamp": { - "target": "smithy.api#Unit", + "com.amazonaws.sqs#InvalidAddress": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { - "smithy.api#enumValue": "SentTimestamp" + "aws.protocols#awsQueryError": { + "code": "InvalidAddress", + "httpResponseCode": 404 + }, + "smithy.api#documentation": "

The accountId is invalid.

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 } - }, - "ApproximateReceiveCount": { - "target": "smithy.api#Unit", + }, + "com.amazonaws.sqs#InvalidAttributeName": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { - "smithy.api#enumValue": "ApproximateReceiveCount" + "smithy.api#documentation": "

The specified attribute doesn't exist.

", + "smithy.api#error": "client" } - }, - "ApproximateFirstReceiveTimestamp": { - "target": "smithy.api#Unit", + }, + "com.amazonaws.sqs#InvalidAttributeValue": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { - "smithy.api#enumValue": "ApproximateFirstReceiveTimestamp" + "smithy.api#documentation": "

A queue attribute value is invalid.

", + "smithy.api#error": "client" } - }, - "SequenceNumber": { - "target": "smithy.api#Unit", + }, + "com.amazonaws.sqs#InvalidBatchEntryId": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { - "smithy.api#enumValue": "SequenceNumber" + "aws.protocols#awsQueryError": { + "code": "AWS.SimpleQueueService.InvalidBatchEntryId", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

The Id of a batch entry in a batch request doesn't abide by the\n specification.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 } - }, - "MessageDeduplicationId": { - "target": "smithy.api#Unit", + }, + "com.amazonaws.sqs#InvalidIdFormat": { + "type": "structure", + "members": {}, "traits": { - "smithy.api#enumValue": "MessageDeduplicationId" + "smithy.api#deprecated": { + "message": "exception has been included in ReceiptHandleIsInvalid" + }, + "smithy.api#documentation": "

The specified receipt handle isn't valid for the current version.

", + "smithy.api#error": "client" } - }, - "MessageGroupId": { - "target": "smithy.api#Unit", + }, + "com.amazonaws.sqs#InvalidMessageContents": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { - "smithy.api#enumValue": "MessageGroupId" + "smithy.api#documentation": "

The message contains characters outside the allowed set.

", + "smithy.api#error": "client" } - }, - "AWSTraceHeader": { - "target": "smithy.api#Unit", + }, + "com.amazonaws.sqs#InvalidSecurity": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { - "smithy.api#enumValue": "AWSTraceHeader" + "aws.protocols#awsQueryError": { + "code": "InvalidSecurity", + "httpResponseCode": 403 + }, + "smithy.api#documentation": "

When the request to a queue is not HTTPS and SigV4.

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 } - }, - "DeadLetterQueueSourceArn": { - "target": "smithy.api#Unit", + }, + "com.amazonaws.sqs#KmsAccessDenied": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { - "smithy.api#enumValue": "DeadLetterQueueSourceArn" + "aws.protocols#awsQueryError": { + "code": "KMS.AccessDeniedException", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

The caller doesn't have the required KMS access.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 } - } - } - }, - "com.amazonaws.sqs#MessageSystemAttributeNameForSends": { - "type": "enum", - "members": { - "AWSTraceHeader": { - "target": "smithy.api#Unit", + }, + "com.amazonaws.sqs#KmsDisabled": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { - "smithy.api#enumValue": "AWSTraceHeader" + "aws.protocols#awsQueryError": { + "code": "KMS.DisabledException", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

The request was denied due to request throttling.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 } - } - } - }, - "com.amazonaws.sqs#MessageSystemAttributeValue": { - "type": "structure", - "members": { - "StringValue": { - "target": "com.amazonaws.sqs#String", + }, + "com.amazonaws.sqs#KmsInvalidKeyUsage": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { - "smithy.api#documentation": "

Strings are Unicode with UTF-8 binary encoding. For a list of code values, see ASCII Printable\n Characters.

" + "aws.protocols#awsQueryError": { + "code": "KMS.InvalidKeyUsageException", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

The request was rejected for one of the following reasons:

\n ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 } - }, - "BinaryValue": { - "target": "com.amazonaws.sqs#Binary", + }, + "com.amazonaws.sqs#KmsInvalidState": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { - "smithy.api#documentation": "

Binary type attributes can store any binary data, such as compressed data, encrypted\n data, or images.

" + "aws.protocols#awsQueryError": { + "code": "KMS.InvalidStateException", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

The request was rejected because the state of the specified resource is not valid for\n this request.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 } - }, - "StringListValues": { - "target": "com.amazonaws.sqs#StringList", + }, + "com.amazonaws.sqs#KmsNotFound": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { - "smithy.api#documentation": "

Not implemented. Reserved for future use.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "StringListValue" + "aws.protocols#awsQueryError": { + "code": "KMS.NotFoundException", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

The request was rejected because the specified entity or resource could not be found.\n

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 } - }, - "BinaryListValues": { - "target": "com.amazonaws.sqs#BinaryList", + }, + "com.amazonaws.sqs#KmsOptInRequired": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { - "smithy.api#documentation": "

Not implemented. Reserved for future use.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "BinaryListValue" + "aws.protocols#awsQueryError": { + "code": "KMS.OptInRequired", + "httpResponseCode": 403 + }, + "smithy.api#documentation": "

The request was rejected because the specified key policy isn't syntactically or\n semantically correct.

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 } - }, - "DataType": { - "target": "com.amazonaws.sqs#String", + }, + "com.amazonaws.sqs#KmsThrottled": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { - "smithy.api#documentation": "

Amazon SQS supports the following logical data types: String,\n Number, and Binary. For the Number data type,\n you must use StringValue.

\n

You can also append custom labels. For more information, see Amazon SQS Message Attributes in the Amazon SQS Developer\n Guide.

", - "smithy.api#required": {} + "aws.protocols#awsQueryError": { + "code": "KMS.ThrottlingException", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

Amazon Web Services KMS throttles requests for the following conditions.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 } - } }, - "traits": { - "smithy.api#documentation": "

The user-specified message system attribute value. For string data types, the\n Value attribute has the same restrictions on the content as the message\n body. For more information, see \n SendMessage.\n

\n

\n Name, type, value and the message body must not\n be empty or null.

" - } - }, - "com.amazonaws.sqs#OverLimit": { - "type": "structure", - "members": {}, - "traits": { - "aws.protocols#awsQueryError": { - "code": "OverLimit", - "httpResponseCode": 403 - }, - "smithy.api#documentation": "

The specified action violates a limit. For example, ReceiveMessage\n returns this error if the maximum number of in flight messages is reached and\n AddPermission returns this error if the maximum number of permissions\n for the queue is reached.

", - "smithy.api#error": "client", - "smithy.api#httpError": 403 - } - }, - "com.amazonaws.sqs#PurgeQueue": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#PurgeQueueRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#PurgeQueueInProgress" - }, - { - "target": "com.amazonaws.sqs#QueueDoesNotExist" - } - ], - "traits": { - "smithy.api#documentation": "

Deletes available messages in a queue (including in-flight messages) specified by the\n QueueURL parameter.

\n \n

When you use the PurgeQueue action, you can't retrieve any messages\n deleted from a queue.

\n

The message deletion process takes up to 60 seconds. We recommend waiting for 60\n seconds regardless of your queue's size.

\n
\n

Messages sent to the queue before you call\n PurgeQueue might be received but are deleted within the next\n minute.

\n

Messages sent to the queue after you call PurgeQueue\n might be deleted while the queue is being purged.

" - } - }, - "com.amazonaws.sqs#PurgeQueueInProgress": { - "type": "structure", - "members": {}, - "traits": { - "aws.protocols#awsQueryError": { - "code": "AWS.SimpleQueueService.PurgeQueueInProgress", - "httpResponseCode": 403 - }, - "smithy.api#documentation": "

Indicates that the specified queue previously received a PurgeQueue\n request within the last 60 seconds (the time it can take to delete the messages in the\n queue).

", - "smithy.api#error": "client", - "smithy.api#httpError": 403 - } - }, - "com.amazonaws.sqs#PurgeQueueRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", + "com.amazonaws.sqs#ListDeadLetterSourceQueues": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#ListDeadLetterSourceQueuesRequest" + }, + "output": { + "target": "com.amazonaws.sqs#ListDeadLetterSourceQueuesResult" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#InvalidAddress" + }, + { + "target": "com.amazonaws.sqs#InvalidSecurity" + }, + { + "target": "com.amazonaws.sqs#QueueDoesNotExist" + }, + { + "target": "com.amazonaws.sqs#RequestThrottled" + }, + { + "target": "com.amazonaws.sqs#UnsupportedOperation" + } + ], "traits": { - "smithy.api#documentation": "

The URL of the queue from which the PurgeQueue action deletes\n messages.

\n

Queue URLs and names are case-sensitive.

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

Returns a list of your queues that have the RedrivePolicy queue attribute\n configured with a dead-letter queue.

\n

The ListDeadLetterSourceQueues methods supports pagination. Set\n parameter MaxResults in the request to specify the maximum number of\n results to be returned in the response. If you do not set MaxResults, the\n response includes a maximum of 1,000 results. If you set MaxResults and\n there are additional results to display, the response includes a value for\n NextToken. Use NextToken as a parameter in your next\n request to ListDeadLetterSourceQueues to receive the next page of results.

\n

For more information about using dead-letter queues, see Using Amazon SQS Dead-Letter Queues in the Amazon SQS Developer\n Guide.

", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "queueUrls", + "pageSize": "MaxResults" + } } - } }, - "traits": { - "smithy.api#documentation": "

", - "smithy.api#input": {} - } - }, - "com.amazonaws.sqs#QueueAttributeMap": { - "type": "map", - "key": { - "target": "com.amazonaws.sqs#QueueAttributeName", - "traits": { - "smithy.api#xmlName": "Name" - } - }, - "value": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#xmlName": "Value" - } - } - }, - "com.amazonaws.sqs#QueueAttributeName": { - "type": "enum", - "members": { - "All": { - "target": "smithy.api#Unit", + "com.amazonaws.sqs#ListDeadLetterSourceQueuesRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

The URL of a dead-letter queue.

\n

Queue URLs and names are case-sensitive.

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

Pagination token to request the next set of results.

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

Maximum number of results to include in the response. Value range is 1 to 1000. You\n must set MaxResults to receive a value for NextToken in the\n response.

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

", + "smithy.api#input": {} } - }, - "Policy": { - "target": "smithy.api#Unit", + }, + "com.amazonaws.sqs#ListDeadLetterSourceQueuesResult": { + "type": "structure", + "members": { + "queueUrls": { + "target": "com.amazonaws.sqs#QueueUrlList", + "traits": { + "smithy.api#documentation": "

A list of source queue URLs that have the RedrivePolicy queue attribute\n configured with a dead-letter queue.

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "QueueUrl" + } + }, + "NextToken": { + "target": "com.amazonaws.sqs#Token", + "traits": { + "smithy.api#documentation": "

Pagination token to include in the next request. Token value is null if\n there are no additional results to request, or if you did not set\n MaxResults in the request.

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

A list of your dead letter source queues.

", + "smithy.api#output": {} } - }, - "VisibilityTimeout": { - "target": "smithy.api#Unit", + }, + "com.amazonaws.sqs#ListMessageMoveTasks": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#ListMessageMoveTasksRequest" + }, + "output": { + "target": "com.amazonaws.sqs#ListMessageMoveTasksResult" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#InvalidAddress" + }, + { + "target": "com.amazonaws.sqs#InvalidSecurity" + }, + { + "target": "com.amazonaws.sqs#RequestThrottled" + }, + { + "target": "com.amazonaws.sqs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.sqs#UnsupportedOperation" + } + ], "traits": { - "smithy.api#enumValue": "VisibilityTimeout" + "smithy.api#documentation": "

Gets the most recent message movement tasks (up to 10) under a specific source\n queue.

\n \n \n " } - }, - "MaximumMessageSize": { - "target": "smithy.api#Unit", + }, + "com.amazonaws.sqs#ListMessageMoveTasksRequest": { + "type": "structure", + "members": { + "SourceArn": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

The ARN of the queue whose message movement tasks are to be listed.

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

The maximum number of results to include in the response. The default is 1, which\n provides the most recent message movement task. The upper limit is 10.

" + } + } + }, "traits": { - "smithy.api#enumValue": "MaximumMessageSize" + "smithy.api#input": {} } - }, - "MessageRetentionPeriod": { - "target": "smithy.api#Unit", + }, + "com.amazonaws.sqs#ListMessageMoveTasksResult": { + "type": "structure", + "members": { + "Results": { + "target": "com.amazonaws.sqs#ListMessageMoveTasksResultEntryList", + "traits": { + "smithy.api#documentation": "

A list of message movement tasks and their attributes.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "ListMessageMoveTasksResultEntry" + } + } + }, "traits": { - "smithy.api#enumValue": "MessageRetentionPeriod" + "smithy.api#output": {}, + "smithy.api#xmlName": "ListMessageMoveTasksResult" } - }, - "ApproximateNumberOfMessages": { - "target": "smithy.api#Unit", + }, + "com.amazonaws.sqs#ListMessageMoveTasksResultEntry": { + "type": "structure", + "members": { + "TaskHandle": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

An identifier associated with a message movement task. When this field is returned in\n the response of the ListMessageMoveTasks action, it is only populated for\n tasks that are in RUNNING status.

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

The status of the message movement task. Possible values are: RUNNING, COMPLETED,\n CANCELLING, CANCELLED, and FAILED.

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

The ARN of the queue that contains the messages to be moved to another queue.

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

The ARN of the destination queue if it has been specified in the\n StartMessageMoveTask request. If a DestinationArn has not\n been specified in the StartMessageMoveTask request, this field value will\n be NULL.

" + } + }, + "MaxNumberOfMessagesPerSecond": { + "target": "com.amazonaws.sqs#NullableInteger", + "traits": { + "smithy.api#documentation": "

The number of messages to be moved per second (the message movement rate), if it has\n been specified in the StartMessageMoveTask request. If a\n MaxNumberOfMessagesPerSecond has not been specified in the\n StartMessageMoveTask request, this field value will be NULL.

" + } + }, + "ApproximateNumberOfMessagesMoved": { + "target": "com.amazonaws.sqs#Long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The approximate number of messages already moved to the destination queue.

" + } + }, + "ApproximateNumberOfMessagesToMove": { + "target": "com.amazonaws.sqs#NullableLong", + "traits": { + "smithy.api#documentation": "

The number of messages to be moved from the source queue. This number is obtained at\n the time of starting the message movement task.

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

The task failure reason (only included if the task status is FAILED).

" + } + }, + "StartedTimestamp": { + "target": "com.amazonaws.sqs#Long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The timestamp of starting the message movement task.

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

Contains the details of a message movement task.

" } - }, - "ApproximateNumberOfMessagesNotVisible": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ApproximateNumberOfMessagesNotVisible" + }, + "com.amazonaws.sqs#ListMessageMoveTasksResultEntryList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#ListMessageMoveTasksResultEntry" } - }, - "CreatedTimestamp": { - "target": "smithy.api#Unit", + }, + "com.amazonaws.sqs#ListQueueTags": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#ListQueueTagsRequest" + }, + "output": { + "target": "com.amazonaws.sqs#ListQueueTagsResult" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#InvalidAddress" + }, + { + "target": "com.amazonaws.sqs#InvalidSecurity" + }, + { + "target": "com.amazonaws.sqs#QueueDoesNotExist" + }, + { + "target": "com.amazonaws.sqs#RequestThrottled" + }, + { + "target": "com.amazonaws.sqs#UnsupportedOperation" + } + ], "traits": { - "smithy.api#enumValue": "CreatedTimestamp" + "smithy.api#documentation": "

List all cost allocation tags added to the specified Amazon SQS queue. For an\n overview, see Tagging\n Your Amazon SQS Queues in the Amazon SQS Developer\n Guide.

\n \n

Cross-account permissions don't apply to this action. For more information, see\n Grant cross-account permissions to a role and a username in the\n Amazon SQS Developer Guide.

\n
" } - }, - "LastModifiedTimestamp": { - "target": "smithy.api#Unit", + }, + "com.amazonaws.sqs#ListQueueTagsRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

The URL of the queue.

", + "smithy.api#required": {} + } + } + }, "traits": { - "smithy.api#enumValue": "LastModifiedTimestamp" + "smithy.api#input": {} } - }, - "QueueArn": { - "target": "smithy.api#Unit", + }, + "com.amazonaws.sqs#ListQueueTagsResult": { + "type": "structure", + "members": { + "Tags": { + "target": "com.amazonaws.sqs#TagMap", + "traits": { + "smithy.api#documentation": "

The list of all tags added to the specified queue.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Tag" + } + } + }, "traits": { - "smithy.api#enumValue": "QueueArn" + "smithy.api#output": {} } - }, - "ApproximateNumberOfMessagesDelayed": { - "target": "smithy.api#Unit", + }, + "com.amazonaws.sqs#ListQueues": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#ListQueuesRequest" + }, + "output": { + "target": "com.amazonaws.sqs#ListQueuesResult" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#InvalidAddress" + }, + { + "target": "com.amazonaws.sqs#InvalidSecurity" + }, + { + "target": "com.amazonaws.sqs#RequestThrottled" + }, + { + "target": "com.amazonaws.sqs#UnsupportedOperation" + } + ], "traits": { - "smithy.api#enumValue": "ApproximateNumberOfMessagesDelayed" + "smithy.api#documentation": "

Returns a list of your queues in the current region. The response includes a maximum\n of 1,000 results. If you specify a value for the optional QueueNamePrefix\n parameter, only queues with a name that begins with the specified value are\n returned.

\n

The listQueues methods supports pagination. Set parameter\n MaxResults in the request to specify the maximum number of results to\n be returned in the response. If you do not set MaxResults, the response\n includes a maximum of 1,000 results. If you set MaxResults and there are\n additional results to display, the response includes a value for NextToken.\n Use NextToken as a parameter in your next request to\n listQueues to receive the next page of results.

\n \n

Cross-account permissions don't apply to this action. For more information, see\n Grant cross-account permissions to a role and a username in the\n Amazon SQS Developer Guide.

\n
", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "QueueUrls", + "pageSize": "MaxResults" + } } - }, - "DelaySeconds": { - "target": "smithy.api#Unit", + }, + "com.amazonaws.sqs#ListQueuesRequest": { + "type": "structure", + "members": { + "QueueNamePrefix": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

A string to use for filtering the list results. Only those queues whose name begins\n with the specified string are returned.

\n

Queue URLs and names are case-sensitive.

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

Pagination token to request the next set of results.

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

Maximum number of results to include in the response. Value range is 1 to 1000. You\n must set MaxResults to receive a value for NextToken in the\n response.

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

", + "smithy.api#input": {} } - }, - "ReceiveMessageWaitTimeSeconds": { - "target": "smithy.api#Unit", + }, + "com.amazonaws.sqs#ListQueuesResult": { + "type": "structure", + "members": { + "QueueUrls": { + "target": "com.amazonaws.sqs#QueueUrlList", + "traits": { + "smithy.api#documentation": "

A list of queue URLs, up to 1,000 entries, or the value of MaxResults\n that you sent in the request.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "QueueUrl" + } + }, + "NextToken": { + "target": "com.amazonaws.sqs#Token", + "traits": { + "smithy.api#documentation": "

Pagination token to include in the next request. Token value is null if\n there are no additional results to request, or if you did not set\n MaxResults in the request.

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

A list of your queues.

", + "smithy.api#output": {} } - }, - "RedrivePolicy": { - "target": "smithy.api#Unit", + }, + "com.amazonaws.sqs#Long": { + "type": "long", "traits": { - "smithy.api#enumValue": "RedrivePolicy" + "smithy.api#default": 0 } - }, - "FifoQueue": { - "target": "smithy.api#Unit", + }, + "com.amazonaws.sqs#Message": { + "type": "structure", + "members": { + "MessageId": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

A unique identifier for the message. A MessageIdis considered unique\n across all Amazon Web Services accounts for an extended period of time.

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

An identifier associated with the act of receiving the message. A new receipt handle\n is returned every time you receive a message. When deleting a message, you provide the\n last received receipt handle to delete the message.

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

An MD5 digest of the non-URL-encoded message body string.

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

The message's contents (not URL-encoded).

" + } + }, + "Attributes": { + "target": "com.amazonaws.sqs#MessageSystemAttributeMap", + "traits": { + "smithy.api#documentation": "

A map of the attributes requested in \n ReceiveMessage\n to\n their respective values. Supported attributes:

\n \n

\n ApproximateFirstReceiveTimestamp and SentTimestamp are each\n returned as an integer representing the epoch time in\n milliseconds.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Attribute" + } + }, + "MD5OfMessageAttributes": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

An MD5 digest of the non-URL-encoded message attribute string. You can use this\n attribute to verify that Amazon SQS received the message correctly. Amazon SQS\n URL-decodes the message before creating the MD5 digest. For information about MD5, see\n RFC1321.

" + } + }, + "MessageAttributes": { + "target": "com.amazonaws.sqs#MessageBodyAttributeMap", + "traits": { + "smithy.api#documentation": "

Each message attribute consists of a Name, Type, and\n Value. For more information, see Amazon SQS message attributes in the Amazon SQS Developer\n Guide.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "MessageAttribute" + } + } + }, "traits": { - "smithy.api#enumValue": "FifoQueue" + "smithy.api#documentation": "

An Amazon SQS message.

" } - }, - "ContentBasedDeduplication": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ContentBasedDeduplication" + }, + "com.amazonaws.sqs#MessageAttributeName": { + "type": "string" + }, + "com.amazonaws.sqs#MessageAttributeNameList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#MessageAttributeName" } - }, - "KmsMasterKeyId": { - "target": "smithy.api#Unit", + }, + "com.amazonaws.sqs#MessageAttributeValue": { + "type": "structure", + "members": { + "StringValue": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

Strings are Unicode with UTF-8 binary encoding. For a list of code values, see ASCII Printable\n Characters.

" + } + }, + "BinaryValue": { + "target": "com.amazonaws.sqs#Binary", + "traits": { + "smithy.api#documentation": "

Binary type attributes can store any binary data, such as compressed data, encrypted\n data, or images.

" + } + }, + "StringListValues": { + "target": "com.amazonaws.sqs#StringList", + "traits": { + "smithy.api#documentation": "

Not implemented. Reserved for future use.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "StringListValue" + } + }, + "BinaryListValues": { + "target": "com.amazonaws.sqs#BinaryList", + "traits": { + "smithy.api#documentation": "

Not implemented. Reserved for future use.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "BinaryListValue" + } + }, + "DataType": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

Amazon SQS supports the following logical data types: String,\n Number, and Binary. For the Number data type,\n you must use StringValue.

\n

You can also append custom labels. For more information, see Amazon SQS Message Attributes in the Amazon SQS Developer\n Guide.

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

The user-specified message attribute value. For string data types, the\n Value attribute has the same restrictions on the content as the message\n body. For more information, see \n SendMessage.\n

\n

\n Name, type, value and the message body must not\n be empty or null. All parts of the message attribute, including Name,\n Type, and Value, are part of the message size restriction\n (256 KiB or 262,144 bytes).

" } - }, - "KmsDataKeyReusePeriodSeconds": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "KmsDataKeyReusePeriodSeconds" + }, + "com.amazonaws.sqs#MessageBodyAttributeMap": { + "type": "map", + "key": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#xmlName": "Name" + } + }, + "value": { + "target": "com.amazonaws.sqs#MessageAttributeValue", + "traits": { + "smithy.api#xmlName": "Value" + } } - }, - "DeduplicationScope": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DeduplicationScope" + }, + "com.amazonaws.sqs#MessageBodySystemAttributeMap": { + "type": "map", + "key": { + "target": "com.amazonaws.sqs#MessageSystemAttributeNameForSends", + "traits": { + "smithy.api#xmlName": "Name" + } + }, + "value": { + "target": "com.amazonaws.sqs#MessageSystemAttributeValue", + "traits": { + "smithy.api#xmlName": "Value" + } } - }, - "FifoThroughputLimit": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "FifoThroughputLimit" + }, + "com.amazonaws.sqs#MessageList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#Message" } - }, - "RedriveAllowPolicy": { - "target": "smithy.api#Unit", + }, + "com.amazonaws.sqs#MessageNotInflight": { + "type": "structure", + "members": {}, "traits": { - "smithy.api#enumValue": "RedriveAllowPolicy" + "aws.protocols#awsQueryError": { + "code": "AWS.SimpleQueueService.MessageNotInflight", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

The specified message isn't in flight.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 } - }, - "SqsManagedSseEnabled": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "SqsManagedSseEnabled" + }, + "com.amazonaws.sqs#MessageSystemAttributeMap": { + "type": "map", + "key": { + "target": "com.amazonaws.sqs#MessageSystemAttributeName", + "traits": { + "smithy.api#xmlName": "Name" + } + }, + "value": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#xmlName": "Value" + } } - } - } - }, - "com.amazonaws.sqs#QueueDeletedRecently": { - "type": "structure", - "members": {}, - "traits": { - "aws.protocols#awsQueryError": { - "code": "AWS.SimpleQueueService.QueueDeletedRecently", - "httpResponseCode": 400 - }, - "smithy.api#documentation": "

You must wait 60 seconds after deleting a queue before you can create another queue\n with the same name.

", - "smithy.api#error": "client", - "smithy.api#httpError": 400 - } - }, - "com.amazonaws.sqs#QueueDoesNotExist": { - "type": "structure", - "members": {}, - "traits": { - "aws.protocols#awsQueryError": { - "code": "AWS.SimpleQueueService.NonExistentQueue", - "httpResponseCode": 400 - }, - "smithy.api#documentation": "

The specified queue doesn't exist.

", - "smithy.api#error": "client", - "smithy.api#httpError": 400 - } - }, - "com.amazonaws.sqs#QueueNameExists": { - "type": "structure", - "members": {}, - "traits": { - "aws.protocols#awsQueryError": { - "code": "QueueAlreadyExists", - "httpResponseCode": 400 - }, - "smithy.api#documentation": "

A queue with this name already exists. Amazon SQS returns this error only if the request\n includes attributes whose values differ from those of the existing queue.

", - "smithy.api#error": "client", - "smithy.api#httpError": 400 - } - }, - "com.amazonaws.sqs#QueueUrlList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#String" - } - }, - "com.amazonaws.sqs#ReceiptHandleIsInvalid": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#documentation": "

The specified receipt handle isn't valid.

", - "smithy.api#error": "client" - } - }, - "com.amazonaws.sqs#ReceiveMessage": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#ReceiveMessageRequest" - }, - "output": { - "target": "com.amazonaws.sqs#ReceiveMessageResult" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#OverLimit" - } - ], - "traits": { - "smithy.api#documentation": "

Retrieves one or more messages (up to 10), from the specified queue. Using the\n WaitTimeSeconds parameter enables long-poll support. For more\n information, see Amazon SQS\n Long Polling in the Amazon SQS Developer Guide.

\n

Short poll is the default behavior where a weighted random set of machines is sampled\n on a ReceiveMessage call. Thus, only the messages on the sampled machines\n are returned. If the number of messages in the queue is small (fewer than 1,000), you\n most likely get fewer messages than you requested per ReceiveMessage call.\n If the number of messages in the queue is extremely small, you might not receive any\n messages in a particular ReceiveMessage response. If this happens, repeat\n the request.

\n

For each message returned, the response includes the following:

\n \n

The receipt handle is the identifier you must provide when deleting the message. For\n more information, see Queue and Message Identifiers in the Amazon SQS Developer\n Guide.

\n

You can provide the VisibilityTimeout parameter in your request. The\n parameter is applied to the messages that Amazon SQS returns in the response. If you don't\n include the parameter, the overall visibility timeout for the queue is used for the\n returned messages. For more information, see Visibility Timeout in the Amazon SQS Developer\n Guide.

\n

A message that isn't deleted or a message whose visibility isn't extended before the\n visibility timeout expires counts as a failed receive. Depending on the configuration of\n the queue, the message might be sent to the dead-letter queue.

\n \n

In the future, new attributes might be added. If you write code that calls this action, we recommend that you structure your code so that it can handle new attributes gracefully.

\n
" - } - }, - "com.amazonaws.sqs#ReceiveMessageRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

The URL of the Amazon SQS queue from which messages are received.

\n

Queue URLs and names are case-sensitive.

", - "smithy.api#required": {} + }, + "com.amazonaws.sqs#MessageSystemAttributeName": { + "type": "enum", + "members": { + "SenderId": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SenderId" + } + }, + "SentTimestamp": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SentTimestamp" + } + }, + "ApproximateReceiveCount": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ApproximateReceiveCount" + } + }, + "ApproximateFirstReceiveTimestamp": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ApproximateFirstReceiveTimestamp" + } + }, + "SequenceNumber": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SequenceNumber" + } + }, + "MessageDeduplicationId": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MessageDeduplicationId" + } + }, + "MessageGroupId": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MessageGroupId" + } + }, + "AWSTraceHeader": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AWSTraceHeader" + } + }, + "DeadLetterQueueSourceArn": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DeadLetterQueueSourceArn" + } + } } - }, - "AttributeNames": { - "target": "com.amazonaws.sqs#AttributeNameList", - "traits": { - "smithy.api#documentation": "

A list of attributes that need to be returned along with each message. These\n attributes include:

\n ", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "AttributeName" + }, + "com.amazonaws.sqs#MessageSystemAttributeNameForSends": { + "type": "enum", + "members": { + "AWSTraceHeader": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "AWSTraceHeader" + } + } } - }, - "MessageAttributeNames": { - "target": "com.amazonaws.sqs#MessageAttributeNameList", + }, + "com.amazonaws.sqs#MessageSystemAttributeValue": { + "type": "structure", + "members": { + "StringValue": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

Strings are Unicode with UTF-8 binary encoding. For a list of code values, see ASCII Printable\n Characters.

" + } + }, + "BinaryValue": { + "target": "com.amazonaws.sqs#Binary", + "traits": { + "smithy.api#documentation": "

Binary type attributes can store any binary data, such as compressed data, encrypted\n data, or images.

" + } + }, + "StringListValues": { + "target": "com.amazonaws.sqs#StringList", + "traits": { + "smithy.api#documentation": "

Not implemented. Reserved for future use.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "StringListValue" + } + }, + "BinaryListValues": { + "target": "com.amazonaws.sqs#BinaryList", + "traits": { + "smithy.api#documentation": "

Not implemented. Reserved for future use.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "BinaryListValue" + } + }, + "DataType": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

Amazon SQS supports the following logical data types: String,\n Number, and Binary. For the Number data type,\n you must use StringValue.

\n

You can also append custom labels. For more information, see Amazon SQS Message Attributes in the Amazon SQS Developer\n Guide.

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

The name of the message attribute, where N is the index.

\n \n

When using ReceiveMessage, you can send a list of attribute names to\n receive, or you can return all of the attributes by specifying All or\n .* in your request. You can also use all message attributes starting\n with a prefix, for example bar.*.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "MessageAttributeName" + "smithy.api#documentation": "

The user-specified message system attribute value. For string data types, the\n Value attribute has the same restrictions on the content as the message\n body. For more information, see \n SendMessage.\n

\n

\n Name, type, value and the message body must not\n be empty or null.

" } - }, - "MaxNumberOfMessages": { - "target": "com.amazonaws.sqs#Integer", + }, + "com.amazonaws.sqs#NullableInteger": { + "type": "integer" + }, + "com.amazonaws.sqs#NullableLong": { + "type": "long" + }, + "com.amazonaws.sqs#OverLimit": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "

The maximum number of messages to return. Amazon SQS never returns more messages than this\n value (however, fewer messages might be returned). Valid values: 1 to 10. Default:\n 1.

" + "aws.protocols#awsQueryError": { + "code": "OverLimit", + "httpResponseCode": 403 + }, + "smithy.api#documentation": "

The specified action violates a limit. For example, ReceiveMessage\n returns this error if the maximum number of in flight messages is reached and\n AddPermission returns this error if the maximum number of permissions\n for the queue is reached.

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 } - }, - "VisibilityTimeout": { - "target": "com.amazonaws.sqs#Integer", + }, + "com.amazonaws.sqs#PurgeQueue": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#PurgeQueueRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#InvalidAddress" + }, + { + "target": "com.amazonaws.sqs#InvalidSecurity" + }, + { + "target": "com.amazonaws.sqs#PurgeQueueInProgress" + }, + { + "target": "com.amazonaws.sqs#QueueDoesNotExist" + }, + { + "target": "com.amazonaws.sqs#RequestThrottled" + }, + { + "target": "com.amazonaws.sqs#UnsupportedOperation" + } + ], "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "

The duration (in seconds) that the received messages are hidden from subsequent\n retrieve requests after being retrieved by a ReceiveMessage request.

" + "smithy.api#documentation": "

Deletes available messages in a queue (including in-flight messages) specified by the\n QueueURL parameter.

\n \n

When you use the PurgeQueue action, you can't retrieve any messages\n deleted from a queue.

\n

The message deletion process takes up to 60 seconds. We recommend waiting for 60\n seconds regardless of your queue's size.

\n
\n

Messages sent to the queue before you call\n PurgeQueue might be received but are deleted within the next\n minute.

\n

Messages sent to the queue after you call PurgeQueue\n might be deleted while the queue is being purged.

" } - }, - "WaitTimeSeconds": { - "target": "com.amazonaws.sqs#Integer", + }, + "com.amazonaws.sqs#PurgeQueueInProgress": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "

The duration (in seconds) for which the call waits for a message to arrive in the\n queue before returning. If a message is available, the call returns sooner than\n WaitTimeSeconds. If no messages are available and the wait time\n expires, the call returns successfully with an empty list of messages.

\n \n

To avoid HTTP errors, ensure that the HTTP response timeout for\n ReceiveMessage requests is longer than the\n WaitTimeSeconds parameter. For example, with the Java SDK, you can\n set HTTP transport settings using the NettyNioAsyncHttpClient for asynchronous clients, or the ApacheHttpClient for synchronous clients.

\n
" + "aws.protocols#awsQueryError": { + "code": "AWS.SimpleQueueService.PurgeQueueInProgress", + "httpResponseCode": 403 + }, + "smithy.api#documentation": "

Indicates that the specified queue previously received a PurgeQueue\n request within the last 60 seconds (the time it can take to delete the messages in the\n queue).

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 } - }, - "ReceiveRequestAttemptId": { - "target": "com.amazonaws.sqs#String", + }, + "com.amazonaws.sqs#PurgeQueueRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

The URL of the queue from which the PurgeQueue action deletes\n messages.

\n

Queue URLs and names are case-sensitive.

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

This parameter applies only to FIFO (first-in-first-out) queues.

\n

The token used for deduplication of ReceiveMessage calls. If a networking\n issue occurs after a ReceiveMessage action, and instead of a response you\n receive a generic error, it is possible to retry the same action with an identical\n ReceiveRequestAttemptId to retrieve the same set of messages, even if\n their visibility timeout has not yet expired.

\n \n

The maximum length of ReceiveRequestAttemptId is 128 characters.\n ReceiveRequestAttemptId can contain alphanumeric characters\n (a-z, A-Z, 0-9) and punctuation\n (!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~).

\n

For best practices of using ReceiveRequestAttemptId, see Using the ReceiveRequestAttemptId Request Parameter in the Amazon SQS\n Developer Guide.

" + "smithy.api#documentation": "

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

", - "smithy.api#input": {} - } - }, - "com.amazonaws.sqs#ReceiveMessageResult": { - "type": "structure", - "members": { - "Messages": { - "target": "com.amazonaws.sqs#MessageList", - "traits": { - "smithy.api#documentation": "

A list of messages.

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

A list of received messages.

", - "smithy.api#output": {} - } - }, - "com.amazonaws.sqs#RemovePermission": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#RemovePermissionRequest" + "com.amazonaws.sqs#QueueAttributeMap": { + "type": "map", + "key": { + "target": "com.amazonaws.sqs#QueueAttributeName", + "traits": { + "smithy.api#xmlName": "Name" + } + }, + "value": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#xmlName": "Value" + } + } }, - "output": { - "target": "smithy.api#Unit" + "com.amazonaws.sqs#QueueAttributeName": { + "type": "enum", + "members": { + "All": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "All" + } + }, + "Policy": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Policy" + } + }, + "VisibilityTimeout": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "VisibilityTimeout" + } + }, + "MaximumMessageSize": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MaximumMessageSize" + } + }, + "MessageRetentionPeriod": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "MessageRetentionPeriod" + } + }, + "ApproximateNumberOfMessages": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ApproximateNumberOfMessages" + } + }, + "ApproximateNumberOfMessagesNotVisible": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ApproximateNumberOfMessagesNotVisible" + } + }, + "CreatedTimestamp": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CreatedTimestamp" + } + }, + "LastModifiedTimestamp": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "LastModifiedTimestamp" + } + }, + "QueueArn": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "QueueArn" + } + }, + "ApproximateNumberOfMessagesDelayed": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ApproximateNumberOfMessagesDelayed" + } + }, + "DelaySeconds": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DelaySeconds" + } + }, + "ReceiveMessageWaitTimeSeconds": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ReceiveMessageWaitTimeSeconds" + } + }, + "RedrivePolicy": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RedrivePolicy" + } + }, + "FifoQueue": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FifoQueue" + } + }, + "ContentBasedDeduplication": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ContentBasedDeduplication" + } + }, + "KmsMasterKeyId": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "KmsMasterKeyId" + } + }, + "KmsDataKeyReusePeriodSeconds": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "KmsDataKeyReusePeriodSeconds" + } + }, + "DeduplicationScope": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DeduplicationScope" + } + }, + "FifoThroughputLimit": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FifoThroughputLimit" + } + }, + "RedriveAllowPolicy": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RedriveAllowPolicy" + } + }, + "SqsManagedSseEnabled": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SqsManagedSseEnabled" + } + } + } }, - "traits": { - "smithy.api#documentation": "

Revokes any permissions in the queue policy that matches the specified\n Label parameter.

\n \n \n " - } - }, - "com.amazonaws.sqs#RemovePermissionRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", + "com.amazonaws.sqs#QueueDeletedRecently": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { - "smithy.api#documentation": "

The URL of the Amazon SQS queue from which permissions are removed.

\n

Queue URLs and names are case-sensitive.

", - "smithy.api#required": {} + "aws.protocols#awsQueryError": { + "code": "AWS.SimpleQueueService.QueueDeletedRecently", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

You must wait 60 seconds after deleting a queue before you can create another queue\n with the same name.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 } - }, - "Label": { - "target": "com.amazonaws.sqs#String", + }, + "com.amazonaws.sqs#QueueDoesNotExist": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { - "smithy.api#documentation": "

The identification of the permission to remove. This is the label added using the\n \n AddPermission\n action.

", - "smithy.api#required": {} + "aws.protocols#awsQueryError": { + "code": "AWS.SimpleQueueService.NonExistentQueue", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

The specified queue doesn't exist.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 } - } }, - "traits": { - "smithy.api#documentation": "

", - "smithy.api#input": {} - } - }, - "com.amazonaws.sqs#ResourceNotFoundException": { - "type": "structure", - "members": {}, - "traits": { - "aws.protocols#awsQueryError": { - "code": "ResourceNotFoundException", - "httpResponseCode": 404 - }, - "smithy.api#documentation": "

One or more specified resources don't exist.

", - "smithy.api#error": "client", - "smithy.api#httpError": 404 - } - }, - "com.amazonaws.sqs#SendMessage": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#SendMessageRequest" - }, - "output": { - "target": "com.amazonaws.sqs#SendMessageResult" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#InvalidMessageContents" - }, - { - "target": "com.amazonaws.sqs#UnsupportedOperation" - } - ], - "traits": { - "smithy.api#documentation": "

Delivers a message to the specified queue.

\n \n

A message can include only XML, JSON, and unformatted text. The following Unicode characters are allowed:

\n

\n #x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF\n

\n

Any characters not included in this list will be rejected. For more information, see the W3C specification for characters.

\n
" - } - }, - "com.amazonaws.sqs#SendMessageBatch": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#SendMessageBatchRequest" - }, - "output": { - "target": "com.amazonaws.sqs#SendMessageBatchResult" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#BatchEntryIdsNotDistinct" - }, - { - "target": "com.amazonaws.sqs#BatchRequestTooLong" - }, - { - "target": "com.amazonaws.sqs#EmptyBatchRequest" - }, - { - "target": "com.amazonaws.sqs#InvalidBatchEntryId" - }, - { - "target": "com.amazonaws.sqs#TooManyEntriesInBatchRequest" - }, - { - "target": "com.amazonaws.sqs#UnsupportedOperation" - } - ], - "traits": { - "smithy.api#documentation": "

You can use SendMessageBatch to send up to 10 messages to the specified\n queue by assigning either identical or different values to each message (or by not\n assigning values at all). This is a batch version of \n SendMessage. For a FIFO queue, multiple messages within a single batch are enqueued\n in the order they are sent.

\n

The result of sending each message is reported individually in the response.\n Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.

\n

The maximum allowed individual message size and the maximum total payload size (the\n sum of the individual lengths of all of the batched messages) are both 256 KiB (262,144\n bytes).

\n \n

A message can include only XML, JSON, and unformatted text. The following Unicode characters are allowed:

\n

\n #x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF\n

\n

Any characters not included in this list will be rejected. For more information, see the W3C specification for characters.

\n
\n

If you don't specify the DelaySeconds parameter for an entry, Amazon SQS uses\n the default value for the queue.

" - } - }, - "com.amazonaws.sqs#SendMessageBatchRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

The URL of the Amazon SQS queue to which batched messages are sent.

\n

Queue URLs and names are case-sensitive.

", - "smithy.api#required": {} - } - }, - "Entries": { - "target": "com.amazonaws.sqs#SendMessageBatchRequestEntryList", - "traits": { - "smithy.api#documentation": "

A list of \n SendMessageBatchRequestEntry\n items.

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

", - "smithy.api#input": {} - } - }, - "com.amazonaws.sqs#SendMessageBatchRequestEntry": { - "type": "structure", - "members": { - "Id": { - "target": "com.amazonaws.sqs#String", + "com.amazonaws.sqs#QueueNameExists": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { - "smithy.api#documentation": "

An identifier for a message in this batch used to communicate the result.

\n \n

The Ids of a batch request need to be unique within a request.

\n

This identifier can have up to 80 characters. The following characters are accepted: alphanumeric characters, hyphens(-), and underscores (_).

\n
", - "smithy.api#required": {} + "aws.protocols#awsQueryError": { + "code": "QueueAlreadyExists", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

A queue with this name already exists. Amazon SQS returns this error only if the\n request includes attributes whose values differ from those of the existing queue.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 } - }, - "MessageBody": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

The body of the message.

", - "smithy.api#required": {} + }, + "com.amazonaws.sqs#QueueUrlList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#String" } - }, - "DelaySeconds": { - "target": "com.amazonaws.sqs#Integer", + }, + "com.amazonaws.sqs#ReceiptHandleIsInvalid": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "

The length of time, in seconds, for which a specific message is delayed. Valid values:\n 0 to 900. Maximum: 15 minutes. Messages with a positive DelaySeconds value\n become available for processing after the delay period is finished. If you don't specify\n a value, the default value for the queue is applied.

\n \n

When you set FifoQueue, you can't set DelaySeconds per message. You can set this parameter only on a queue level.

\n
" + "aws.protocols#awsQueryError": { + "code": "ReceiptHandleIsInvalid", + "httpResponseCode": 404 + }, + "smithy.api#documentation": "

The specified receipt handle isn't valid.

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 } - }, - "MessageAttributes": { - "target": "com.amazonaws.sqs#MessageBodyAttributeMap", + }, + "com.amazonaws.sqs#ReceiveMessage": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#ReceiveMessageRequest" + }, + "output": { + "target": "com.amazonaws.sqs#ReceiveMessageResult" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#InvalidAddress" + }, + { + "target": "com.amazonaws.sqs#InvalidSecurity" + }, + { + "target": "com.amazonaws.sqs#KmsAccessDenied" + }, + { + "target": "com.amazonaws.sqs#KmsDisabled" + }, + { + "target": "com.amazonaws.sqs#KmsInvalidKeyUsage" + }, + { + "target": "com.amazonaws.sqs#KmsInvalidState" + }, + { + "target": "com.amazonaws.sqs#KmsNotFound" + }, + { + "target": "com.amazonaws.sqs#KmsOptInRequired" + }, + { + "target": "com.amazonaws.sqs#KmsThrottled" + }, + { + "target": "com.amazonaws.sqs#OverLimit" + }, + { + "target": "com.amazonaws.sqs#QueueDoesNotExist" + }, + { + "target": "com.amazonaws.sqs#RequestThrottled" + }, + { + "target": "com.amazonaws.sqs#UnsupportedOperation" + } + ], "traits": { - "smithy.api#documentation": "

Each message attribute consists of a Name, Type, \nand Value. For more information, see \nAmazon SQS \nmessage attributes in the Amazon SQS Developer Guide.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "MessageAttribute" + "smithy.api#documentation": "

Retrieves one or more messages (up to 10), from the specified queue. Using the\n WaitTimeSeconds parameter enables long-poll support. For more\n information, see Amazon\n SQS Long Polling in the Amazon SQS Developer Guide.

\n

Short poll is the default behavior where a weighted random set of machines is sampled\n on a ReceiveMessage call. Thus, only the messages on the sampled machines\n are returned. If the number of messages in the queue is small (fewer than 1,000), you\n most likely get fewer messages than you requested per ReceiveMessage call.\n If the number of messages in the queue is extremely small, you might not receive any\n messages in a particular ReceiveMessage response. If this happens, repeat\n the request.

\n

For each message returned, the response includes the following:

\n \n

The receipt handle is the identifier you must provide when deleting the message. For\n more information, see Queue and Message Identifiers in the Amazon SQS Developer\n Guide.

\n

You can provide the VisibilityTimeout parameter in your request. The\n parameter is applied to the messages that Amazon SQS returns in the response. If you\n don't include the parameter, the overall visibility timeout for the queue is used for\n the returned messages. For more information, see Visibility Timeout in the Amazon SQS Developer\n Guide.

\n

A message that isn't deleted or a message whose visibility isn't extended before the\n visibility timeout expires counts as a failed receive. Depending on the configuration of\n the queue, the message might be sent to the dead-letter queue.

\n \n

In the future, new attributes might be added. If you write code that calls this\n action, we recommend that you structure your code so that it can handle new\n attributes gracefully.

\n
" } - }, - "MessageSystemAttributes": { - "target": "com.amazonaws.sqs#MessageBodySystemAttributeMap", + }, + "com.amazonaws.sqs#ReceiveMessageRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

The URL of the Amazon SQS queue from which messages are received.

\n

Queue URLs and names are case-sensitive.

", + "smithy.api#required": {} + } + }, + "AttributeNames": { + "target": "com.amazonaws.sqs#AttributeNameList", + "traits": { + "smithy.api#documentation": "

A list of attributes that need to be returned along with each message. These\n attributes include:

\n ", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "AttributeName" + } + }, + "MessageAttributeNames": { + "target": "com.amazonaws.sqs#MessageAttributeNameList", + "traits": { + "smithy.api#documentation": "

The name of the message attribute, where N is the index.

\n \n

When using ReceiveMessage, you can send a list of attribute names to\n receive, or you can return all of the attributes by specifying All or\n .* in your request. You can also use all message attributes starting\n with a prefix, for example bar.*.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "MessageAttributeName" + } + }, + "MaxNumberOfMessages": { + "target": "com.amazonaws.sqs#NullableInteger", + "traits": { + "smithy.api#documentation": "

The maximum number of messages to return. Amazon SQS never returns more messages than\n this value (however, fewer messages might be returned). Valid values: 1 to 10. Default:\n 1.

" + } + }, + "VisibilityTimeout": { + "target": "com.amazonaws.sqs#NullableInteger", + "traits": { + "smithy.api#documentation": "

The duration (in seconds) that the received messages are hidden from subsequent\n retrieve requests after being retrieved by a ReceiveMessage request.

" + } + }, + "WaitTimeSeconds": { + "target": "com.amazonaws.sqs#NullableInteger", + "traits": { + "smithy.api#documentation": "

The duration (in seconds) for which the call waits for a message to arrive in the\n queue before returning. If a message is available, the call returns sooner than\n WaitTimeSeconds. If no messages are available and the wait time\n expires, the call returns successfully with an empty list of messages.

\n \n

To avoid HTTP errors, ensure that the HTTP response timeout for\n ReceiveMessage requests is longer than the\n WaitTimeSeconds parameter. For example, with the Java SDK, you can\n set HTTP transport settings using the NettyNioAsyncHttpClient for asynchronous clients, or the ApacheHttpClient for synchronous clients.

\n
" + } + }, + "ReceiveRequestAttemptId": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

This parameter applies only to FIFO (first-in-first-out) queues.

\n

The token used for deduplication of ReceiveMessage calls. If a networking\n issue occurs after a ReceiveMessage action, and instead of a response you\n receive a generic error, it is possible to retry the same action with an identical\n ReceiveRequestAttemptId to retrieve the same set of messages, even if\n their visibility timeout has not yet expired.

\n \n

The maximum length of ReceiveRequestAttemptId is 128 characters.\n ReceiveRequestAttemptId can contain alphanumeric characters\n (a-z, A-Z, 0-9) and punctuation\n (!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~).

\n

For best practices of using ReceiveRequestAttemptId, see Using the ReceiveRequestAttemptId Request Parameter in the Amazon\n SQS Developer Guide.

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

The message system attribute to send Each message system attribute consists of a Name, Type, and Value.

\n \n \n ", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "MessageSystemAttribute" + "smithy.api#documentation": "

", + "smithy.api#input": {} } - }, - "MessageDeduplicationId": { - "target": "com.amazonaws.sqs#String", + }, + "com.amazonaws.sqs#ReceiveMessageResult": { + "type": "structure", + "members": { + "Messages": { + "target": "com.amazonaws.sqs#MessageList", + "traits": { + "smithy.api#documentation": "

A list of messages.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Message" + } + } + }, "traits": { - "smithy.api#documentation": "

This parameter applies only to FIFO (first-in-first-out) queues.

\n

The token used for deduplication of messages within a 5-minute minimum deduplication\n interval. If a message with a particular MessageDeduplicationId is sent\n successfully, subsequent messages with the same MessageDeduplicationId are\n accepted successfully but aren't delivered. For more information, see Exactly-once processing in the Amazon SQS Developer\n Guide.

\n \n \n

The MessageDeduplicationId is available to the consumer of the\n message (this can be useful for troubleshooting delivery issues).

\n

If a message is sent successfully but the acknowledgement is lost and the message\n is resent with the same MessageDeduplicationId after the deduplication\n interval, Amazon SQS can't detect duplicate messages.

\n

Amazon SQS continues to keep track of the message deduplication ID even after the message is received and deleted.

\n
\n

The length of MessageDeduplicationId is 128 characters.\n MessageDeduplicationId can contain alphanumeric characters\n (a-z, A-Z, 0-9) and punctuation\n (!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~).

\n

For best practices of using MessageDeduplicationId, see Using the MessageDeduplicationId Property in the Amazon SQS Developer\n Guide.

" + "smithy.api#documentation": "

A list of received messages.

", + "smithy.api#output": {} } - }, - "MessageGroupId": { - "target": "com.amazonaws.sqs#String", + }, + "com.amazonaws.sqs#RemovePermission": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#RemovePermissionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#InvalidAddress" + }, + { + "target": "com.amazonaws.sqs#InvalidSecurity" + }, + { + "target": "com.amazonaws.sqs#QueueDoesNotExist" + }, + { + "target": "com.amazonaws.sqs#RequestThrottled" + }, + { + "target": "com.amazonaws.sqs#UnsupportedOperation" + } + ], "traits": { - "smithy.api#documentation": "

This parameter applies only to FIFO (first-in-first-out) queues.

\n

The tag that specifies that a message belongs to a specific message group. Messages\n that belong to the same message group are processed in a FIFO manner (however,\n messages in different message groups might be processed out of order). To interleave\n multiple ordered streams within a single queue, use MessageGroupId values\n (for example, session data for multiple users). In this scenario, multiple consumers can\n process the queue, but the session data of each user is processed in a FIFO\n fashion.

\n \n

The length of MessageGroupId is 128 characters. Valid values:\n alphanumeric characters and punctuation\n (!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~).

\n

For best practices of using MessageGroupId, see Using the MessageGroupId Property in the Amazon SQS Developer\n Guide.

\n \n

\n MessageGroupId is required for FIFO queues. You can't use it for\n Standard queues.

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

Revokes any permissions in the queue policy that matches the specified\n Label parameter.

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

Contains the details of a single Amazon SQS message along with an Id.

" - } - }, - "com.amazonaws.sqs#SendMessageBatchRequestEntryList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#SendMessageBatchRequestEntry" - } - }, - "com.amazonaws.sqs#SendMessageBatchResult": { - "type": "structure", - "members": { - "Successful": { - "target": "com.amazonaws.sqs#SendMessageBatchResultEntryList", - "traits": { - "smithy.api#documentation": "

A list of \n SendMessageBatchResultEntry\n items.

", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "SendMessageBatchResultEntry" - } - }, - "Failed": { - "target": "com.amazonaws.sqs#BatchResultErrorEntryList", - "traits": { - "smithy.api#documentation": "

A list of \n BatchResultErrorEntry\n items with error\n details about each message that can't be enqueued.

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

For each message in the batch, the response contains a \n SendMessageBatchResultEntry\n tag if the message succeeds or a\n \n BatchResultErrorEntry\n tag if the message\n fails.

", - "smithy.api#output": {} - } - }, - "com.amazonaws.sqs#SendMessageBatchResultEntry": { - "type": "structure", - "members": { - "Id": { - "target": "com.amazonaws.sqs#String", + "com.amazonaws.sqs#RemovePermissionRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

The URL of the Amazon SQS queue from which permissions are removed.

\n

Queue URLs and names are case-sensitive.

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

The identification of the permission to remove. This is the label added using the\n \n AddPermission\n action.

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

An identifier for the message in this batch.

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

", + "smithy.api#input": {} } - }, - "MessageId": { - "target": "com.amazonaws.sqs#String", + }, + "com.amazonaws.sqs#RequestThrottled": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { - "smithy.api#documentation": "

An identifier for the message.

", - "smithy.api#required": {} + "aws.protocols#awsQueryError": { + "code": "RequestThrottled", + "httpResponseCode": 403 + }, + "smithy.api#documentation": "

The request was denied due to request throttling.

\n ", + "smithy.api#error": "client", + "smithy.api#httpError": 403 } - }, - "MD5OfMessageBody": { - "target": "com.amazonaws.sqs#String", + }, + "com.amazonaws.sqs#ResourceNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { - "smithy.api#documentation": "

An MD5 digest of the non-URL-encoded message body string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see RFC1321.

", - "smithy.api#required": {} + "aws.protocols#awsQueryError": { + "code": "ResourceNotFoundException", + "httpResponseCode": 404 + }, + "smithy.api#documentation": "

One or more specified resources don't exist.

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 } - }, - "MD5OfMessageAttributes": { - "target": "com.amazonaws.sqs#String", + }, + "com.amazonaws.sqs#SendMessage": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#SendMessageRequest" + }, + "output": { + "target": "com.amazonaws.sqs#SendMessageResult" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#InvalidAddress" + }, + { + "target": "com.amazonaws.sqs#InvalidMessageContents" + }, + { + "target": "com.amazonaws.sqs#InvalidSecurity" + }, + { + "target": "com.amazonaws.sqs#KmsAccessDenied" + }, + { + "target": "com.amazonaws.sqs#KmsDisabled" + }, + { + "target": "com.amazonaws.sqs#KmsInvalidKeyUsage" + }, + { + "target": "com.amazonaws.sqs#KmsInvalidState" + }, + { + "target": "com.amazonaws.sqs#KmsNotFound" + }, + { + "target": "com.amazonaws.sqs#KmsOptInRequired" + }, + { + "target": "com.amazonaws.sqs#KmsThrottled" + }, + { + "target": "com.amazonaws.sqs#QueueDoesNotExist" + }, + { + "target": "com.amazonaws.sqs#RequestThrottled" + }, + { + "target": "com.amazonaws.sqs#UnsupportedOperation" + } + ], "traits": { - "smithy.api#documentation": "

An MD5 digest of the non-URL-encoded message attribute string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see RFC1321.

" + "smithy.api#documentation": "

Delivers a message to the specified queue.

\n \n

A message can include only XML, JSON, and unformatted text. The following Unicode\n characters are allowed:

\n

\n #x9 | #xA | #xD | #x20 to\n #xD7FF | #xE000 to #xFFFD |\n #x10000 to #x10FFFF\n

\n

Any characters not included in this list will be rejected. For more information,\n see the W3C specification for\n characters.

\n
" } - }, - "MD5OfMessageSystemAttributes": { - "target": "com.amazonaws.sqs#String", + }, + "com.amazonaws.sqs#SendMessageBatch": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#SendMessageBatchRequest" + }, + "output": { + "target": "com.amazonaws.sqs#SendMessageBatchResult" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#BatchEntryIdsNotDistinct" + }, + { + "target": "com.amazonaws.sqs#BatchRequestTooLong" + }, + { + "target": "com.amazonaws.sqs#EmptyBatchRequest" + }, + { + "target": "com.amazonaws.sqs#InvalidAddress" + }, + { + "target": "com.amazonaws.sqs#InvalidBatchEntryId" + }, + { + "target": "com.amazonaws.sqs#InvalidSecurity" + }, + { + "target": "com.amazonaws.sqs#KmsAccessDenied" + }, + { + "target": "com.amazonaws.sqs#KmsDisabled" + }, + { + "target": "com.amazonaws.sqs#KmsInvalidKeyUsage" + }, + { + "target": "com.amazonaws.sqs#KmsInvalidState" + }, + { + "target": "com.amazonaws.sqs#KmsNotFound" + }, + { + "target": "com.amazonaws.sqs#KmsOptInRequired" + }, + { + "target": "com.amazonaws.sqs#KmsThrottled" + }, + { + "target": "com.amazonaws.sqs#QueueDoesNotExist" + }, + { + "target": "com.amazonaws.sqs#RequestThrottled" + }, + { + "target": "com.amazonaws.sqs#TooManyEntriesInBatchRequest" + }, + { + "target": "com.amazonaws.sqs#UnsupportedOperation" + } + ], "traits": { - "smithy.api#documentation": "

An MD5 digest of the non-URL-encoded message system attribute string. You can use this \nattribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see RFC1321.

" + "smithy.api#documentation": "

You can use SendMessageBatch to send up to 10 messages to the specified\n queue by assigning either identical or different values to each message (or by not\n assigning values at all). This is a batch version of \n SendMessage. For a FIFO queue, multiple messages within a single batch are enqueued in\n the order they are sent.

\n

The result of sending each message is reported individually in the response. Because\n the batch request can result in a combination of successful and unsuccessful actions,\n you should check for batch errors even when the call returns an HTTP status code of\n 200.

\n

The maximum allowed individual message size and the maximum total payload size (the\n sum of the individual lengths of all of the batched messages) are both 256 KiB (262,144\n bytes).

\n \n

A message can include only XML, JSON, and unformatted text. The following Unicode\n characters are allowed:

\n

\n #x9 | #xA | #xD | #x20 to\n #xD7FF | #xE000 to #xFFFD |\n #x10000 to #x10FFFF\n

\n

Any characters not included in this list will be rejected. For more information,\n see the W3C specification for\n characters.

\n
\n

If you don't specify the DelaySeconds parameter for an entry, Amazon SQS\n uses the default value for the queue.

" } - }, - "SequenceNumber": { - "target": "com.amazonaws.sqs#String", + }, + "com.amazonaws.sqs#SendMessageBatchRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

The URL of the Amazon SQS queue to which batched messages are sent.

\n

Queue URLs and names are case-sensitive.

", + "smithy.api#required": {} + } + }, + "Entries": { + "target": "com.amazonaws.sqs#SendMessageBatchRequestEntryList", + "traits": { + "smithy.api#documentation": "

A list of \n SendMessageBatchRequestEntry\n items.

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "SendMessageBatchRequestEntry" + } + } + }, "traits": { - "smithy.api#documentation": "

This parameter applies only to FIFO (first-in-first-out) queues.

\n

The large, non-consecutive number that Amazon SQS assigns to each message.

\n

The length of SequenceNumber is 128 bits. As SequenceNumber\n continues to increase for a particular MessageGroupId.

" + "smithy.api#documentation": "

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

Encloses a MessageId for a successfully-enqueued message in a \n SendMessageBatch.\n

" - } - }, - "com.amazonaws.sqs#SendMessageBatchResultEntryList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#SendMessageBatchResultEntry" - } - }, - "com.amazonaws.sqs#SendMessageRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", + "com.amazonaws.sqs#SendMessageBatchRequestEntry": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

An identifier for a message in this batch used to communicate the result.

\n \n

The Ids of a batch request need to be unique within a request.

\n

This identifier can have up to 80 characters. The following characters are\n accepted: alphanumeric characters, hyphens(-), and underscores (_).

\n
", + "smithy.api#required": {} + } + }, + "MessageBody": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

The body of the message.

", + "smithy.api#required": {} + } + }, + "DelaySeconds": { + "target": "com.amazonaws.sqs#NullableInteger", + "traits": { + "smithy.api#documentation": "

The length of time, in seconds, for which a specific message is delayed. Valid values:\n 0 to 900. Maximum: 15 minutes. Messages with a positive DelaySeconds value\n become available for processing after the delay period is finished. If you don't specify\n a value, the default value for the queue is applied.

\n \n

When you set FifoQueue, you can't set DelaySeconds per\n message. You can set this parameter only on a queue level.

\n
" + } + }, + "MessageAttributes": { + "target": "com.amazonaws.sqs#MessageBodyAttributeMap", + "traits": { + "smithy.api#documentation": "

Each message attribute consists of a Name, Type, and\n Value. For more information, see Amazon SQS message attributes in the Amazon SQS Developer\n Guide.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "MessageAttribute" + } + }, + "MessageSystemAttributes": { + "target": "com.amazonaws.sqs#MessageBodySystemAttributeMap", + "traits": { + "smithy.api#documentation": "

The message system attribute to send Each message system attribute consists of a\n Name, Type, and Value.

\n \n \n ", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "MessageSystemAttribute" + } + }, + "MessageDeduplicationId": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

This parameter applies only to FIFO (first-in-first-out) queues.

\n

The token used for deduplication of messages within a 5-minute minimum deduplication\n interval. If a message with a particular MessageDeduplicationId is sent\n successfully, subsequent messages with the same MessageDeduplicationId are\n accepted successfully but aren't delivered. For more information, see Exactly-once processing in the Amazon SQS Developer\n Guide.

\n \n \n

The MessageDeduplicationId is available to the consumer of the\n message (this can be useful for troubleshooting delivery issues).

\n

If a message is sent successfully but the acknowledgement is lost and the message\n is resent with the same MessageDeduplicationId after the deduplication\n interval, Amazon SQS can't detect duplicate messages.

\n

Amazon SQS continues to keep track of the message deduplication ID even after the\n message is received and deleted.

\n
\n

The length of MessageDeduplicationId is 128 characters.\n MessageDeduplicationId can contain alphanumeric characters\n (a-z, A-Z, 0-9) and punctuation\n (!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~).

\n

For best practices of using MessageDeduplicationId, see Using the MessageDeduplicationId Property in the Amazon SQS\n Developer Guide.

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

This parameter applies only to FIFO (first-in-first-out) queues.

\n

The tag that specifies that a message belongs to a specific message group. Messages\n that belong to the same message group are processed in a FIFO manner (however, messages\n in different message groups might be processed out of order). To interleave multiple\n ordered streams within a single queue, use MessageGroupId values (for\n example, session data for multiple users). In this scenario, multiple consumers can\n process the queue, but the session data of each user is processed in a FIFO\n fashion.

\n \n

The length of MessageGroupId is 128 characters. Valid values:\n alphanumeric characters and punctuation\n (!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~).

\n

For best practices of using MessageGroupId, see Using the MessageGroupId Property in the Amazon SQS Developer\n Guide.

\n \n

\n MessageGroupId is required for FIFO queues. You can't use it for\n Standard queues.

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

The URL of the Amazon SQS queue to which a message is sent.

\n

Queue URLs and names are case-sensitive.

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

Contains the details of a single Amazon SQS message along with an\n Id.

" } - }, - "MessageBody": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

The message to send. The minimum size is one character. The maximum size is 256\n KiB.

\n \n

A message can include only XML, JSON, and unformatted text. The following Unicode characters are allowed:

\n

\n #x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF\n

\n

Any characters not included in this list will be rejected. For more information, see the W3C specification for characters.

\n
", - "smithy.api#required": {} + }, + "com.amazonaws.sqs#SendMessageBatchRequestEntryList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#SendMessageBatchRequestEntry" } - }, - "DelaySeconds": { - "target": "com.amazonaws.sqs#Integer", + }, + "com.amazonaws.sqs#SendMessageBatchResult": { + "type": "structure", + "members": { + "Successful": { + "target": "com.amazonaws.sqs#SendMessageBatchResultEntryList", + "traits": { + "smithy.api#documentation": "

A list of \n SendMessageBatchResultEntry\n items.

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "SendMessageBatchResultEntry" + } + }, + "Failed": { + "target": "com.amazonaws.sqs#BatchResultErrorEntryList", + "traits": { + "smithy.api#documentation": "

A list of \n BatchResultErrorEntry\n items with error\n details about each message that can't be enqueued.

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "BatchResultErrorEntry" + } + } + }, "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "

The length of time, in seconds, for which to delay a specific message. Valid values:\n 0 to 900. Maximum: 15 minutes. Messages with a positive DelaySeconds value\n become available for processing after the delay period is finished. If you don't specify\n a value, the default value for the queue applies.

\n \n

When you set FifoQueue, you can't set DelaySeconds per message. You can set this parameter only on a queue level.

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

For each message in the batch, the response contains a \n SendMessageBatchResultEntry\n tag if the message succeeds or a\n \n BatchResultErrorEntry\n tag if the message\n fails.

", + "smithy.api#output": {} } - }, - "MessageAttributes": { - "target": "com.amazonaws.sqs#MessageBodyAttributeMap", + }, + "com.amazonaws.sqs#SendMessageBatchResultEntry": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

An identifier for the message in this batch.

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

An identifier for the message.

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

An MD5 digest of the non-URL-encoded message body string. You can use this attribute\n to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the\n message before creating the MD5 digest. For information about MD5, see RFC1321.

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

An MD5 digest of the non-URL-encoded message attribute string. You can use this\n attribute to verify that Amazon SQS received the message correctly. Amazon SQS\n URL-decodes the message before creating the MD5 digest. For information about MD5, see\n RFC1321.

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

An MD5 digest of the non-URL-encoded message system attribute string. You can use this\n attribute to verify that Amazon SQS received the message correctly. Amazon SQS\n URL-decodes the message before creating the MD5 digest. For information about MD5, see\n RFC1321.

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

This parameter applies only to FIFO (first-in-first-out) queues.

\n

The large, non-consecutive number that Amazon SQS assigns to each message.

\n

The length of SequenceNumber is 128 bits. As SequenceNumber\n continues to increase for a particular MessageGroupId.

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

Each message attribute consists of a Name, Type, \nand Value. For more information, see \nAmazon SQS \nmessage attributes in the Amazon SQS Developer Guide.

", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "MessageAttribute" + "smithy.api#documentation": "

Encloses a MessageId for a successfully-enqueued message in a \n SendMessageBatch.\n

" } - }, - "MessageSystemAttributes": { - "target": "com.amazonaws.sqs#MessageBodySystemAttributeMap", - "traits": { - "smithy.api#documentation": "

The message system attribute to send. Each message system attribute consists of a Name, Type, and Value.

\n \n \n ", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "MessageSystemAttribute" + }, + "com.amazonaws.sqs#SendMessageBatchResultEntryList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#SendMessageBatchResultEntry" } - }, - "MessageDeduplicationId": { - "target": "com.amazonaws.sqs#String", + }, + "com.amazonaws.sqs#SendMessageRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

The URL of the Amazon SQS queue to which a message is sent.

\n

Queue URLs and names are case-sensitive.

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

The message to send. The minimum size is one character. The maximum size is 256\n KiB.

\n \n

A message can include only XML, JSON, and unformatted text. The following Unicode\n characters are allowed:

\n

\n #x9 | #xA | #xD | #x20 to\n #xD7FF | #xE000 to #xFFFD |\n #x10000 to #x10FFFF\n

\n

Any characters not included in this list will be rejected. For more information,\n see the W3C specification for\n characters.

\n
", + "smithy.api#required": {} + } + }, + "DelaySeconds": { + "target": "com.amazonaws.sqs#NullableInteger", + "traits": { + "smithy.api#documentation": "

The length of time, in seconds, for which to delay a specific message. Valid values:\n 0 to 900. Maximum: 15 minutes. Messages with a positive DelaySeconds value\n become available for processing after the delay period is finished. If you don't specify\n a value, the default value for the queue applies.

\n \n

When you set FifoQueue, you can't set DelaySeconds per\n message. You can set this parameter only on a queue level.

\n
" + } + }, + "MessageAttributes": { + "target": "com.amazonaws.sqs#MessageBodyAttributeMap", + "traits": { + "smithy.api#documentation": "

Each message attribute consists of a Name, Type, and\n Value. For more information, see Amazon SQS message attributes in the Amazon SQS Developer\n Guide.

", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "MessageAttribute" + } + }, + "MessageSystemAttributes": { + "target": "com.amazonaws.sqs#MessageBodySystemAttributeMap", + "traits": { + "smithy.api#documentation": "

The message system attribute to send. Each message system attribute consists of a\n Name, Type, and Value.

\n \n \n ", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "MessageSystemAttribute" + } + }, + "MessageDeduplicationId": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

This parameter applies only to FIFO (first-in-first-out) queues.

\n

The token used for deduplication of sent messages. If a message with a particular\n MessageDeduplicationId is sent successfully, any messages sent with the\n same MessageDeduplicationId are accepted successfully but aren't delivered\n during the 5-minute deduplication interval. For more information, see Exactly-once processing in the Amazon SQS Developer\n Guide.

\n \n \n

The MessageDeduplicationId is available to the consumer of the\n message (this can be useful for troubleshooting delivery issues).

\n

If a message is sent successfully but the acknowledgement is lost and the message\n is resent with the same MessageDeduplicationId after the deduplication\n interval, Amazon SQS can't detect duplicate messages.

\n

Amazon SQS continues to keep track of the message deduplication ID even after the\n message is received and deleted.

\n
\n

The maximum length of MessageDeduplicationId is 128 characters.\n MessageDeduplicationId can contain alphanumeric characters\n (a-z, A-Z, 0-9) and punctuation\n (!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~).

\n

For best practices of using MessageDeduplicationId, see Using the MessageDeduplicationId Property in the Amazon SQS\n Developer Guide.

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

This parameter applies only to FIFO (first-in-first-out) queues.

\n

The tag that specifies that a message belongs to a specific message group. Messages\n that belong to the same message group are processed in a FIFO manner (however, messages\n in different message groups might be processed out of order). To interleave multiple\n ordered streams within a single queue, use MessageGroupId values (for\n example, session data for multiple users). In this scenario, multiple consumers can\n process the queue, but the session data of each user is processed in a FIFO\n fashion.

\n \n

The length of MessageGroupId is 128 characters. Valid values:\n alphanumeric characters and punctuation\n (!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~).

\n

For best practices of using MessageGroupId, see Using the MessageGroupId Property in the Amazon SQS Developer\n Guide.

\n \n

\n MessageGroupId is required for FIFO queues. You can't use it for\n Standard queues.

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

This parameter applies only to FIFO (first-in-first-out) queues.

\n

The token used for deduplication of sent messages. If a message with a particular\n MessageDeduplicationId is sent successfully, any messages sent with the\n same MessageDeduplicationId are accepted successfully but aren't delivered\n during the 5-minute deduplication interval. For more information, see Exactly-once processing in the Amazon SQS Developer\n Guide.

\n \n \n

The MessageDeduplicationId is available to the consumer of the\n message (this can be useful for troubleshooting delivery issues).

\n

If a message is sent successfully but the acknowledgement is lost and the message\n is resent with the same MessageDeduplicationId after the deduplication\n interval, Amazon SQS can't detect duplicate messages.

\n

Amazon SQS continues to keep track of the message deduplication ID even after the message is received and deleted.

\n
\n

The maximum length of MessageDeduplicationId is 128 characters.\n MessageDeduplicationId can contain alphanumeric characters\n (a-z, A-Z, 0-9) and punctuation\n (!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~).

\n

For best practices of using MessageDeduplicationId, see Using the MessageDeduplicationId Property in the Amazon SQS Developer\n Guide.

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } - }, - "MessageGroupId": { - "target": "com.amazonaws.sqs#String", + }, + "com.amazonaws.sqs#SendMessageResult": { + "type": "structure", + "members": { + "MD5OfMessageBody": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

An MD5 digest of the non-URL-encoded message body string. You can use this attribute\n to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the\n message before creating the MD5 digest. For information about MD5, see RFC1321.

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

An MD5 digest of the non-URL-encoded message attribute string. You can use this\n attribute to verify that Amazon SQS received the message correctly. Amazon SQS\n URL-decodes the message before creating the MD5 digest. For information about MD5, see\n RFC1321.

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

An MD5 digest of the non-URL-encoded message system attribute string. You can use this\n attribute to verify that Amazon SQS received the message correctly. Amazon SQS\n URL-decodes the message before creating the MD5 digest.

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

An attribute containing the MessageId of the message sent to the queue.\n For more information, see Queue and Message Identifiers in the Amazon SQS Developer\n Guide.

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

This parameter applies only to FIFO (first-in-first-out) queues.

\n

The large, non-consecutive number that Amazon SQS assigns to each message.

\n

The length of SequenceNumber is 128 bits. SequenceNumber\n continues to increase for a particular MessageGroupId.

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

This parameter applies only to FIFO (first-in-first-out) queues.

\n

The tag that specifies that a message belongs to a specific message group. Messages\n that belong to the same message group are processed in a FIFO manner (however,\n messages in different message groups might be processed out of order). To interleave\n multiple ordered streams within a single queue, use MessageGroupId values\n (for example, session data for multiple users). In this scenario, multiple consumers can\n process the queue, but the session data of each user is processed in a FIFO\n fashion.

\n \n

The length of MessageGroupId is 128 characters. Valid values:\n alphanumeric characters and punctuation\n (!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~).

\n

For best practices of using MessageGroupId, see Using the MessageGroupId Property in the Amazon SQS Developer\n Guide.

\n \n

\n MessageGroupId is required for FIFO queues. You can't use it for\n Standard queues.

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

The MD5OfMessageBody and MessageId elements.

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

", - "smithy.api#input": {} - } - }, - "com.amazonaws.sqs#SendMessageResult": { - "type": "structure", - "members": { - "MD5OfMessageBody": { - "target": "com.amazonaws.sqs#String", + "com.amazonaws.sqs#SetQueueAttributes": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#SetQueueAttributesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#InvalidAddress" + }, + { + "target": "com.amazonaws.sqs#InvalidAttributeName" + }, + { + "target": "com.amazonaws.sqs#InvalidAttributeValue" + }, + { + "target": "com.amazonaws.sqs#InvalidSecurity" + }, + { + "target": "com.amazonaws.sqs#OverLimit" + }, + { + "target": "com.amazonaws.sqs#QueueDoesNotExist" + }, + { + "target": "com.amazonaws.sqs#RequestThrottled" + }, + { + "target": "com.amazonaws.sqs#UnsupportedOperation" + } + ], "traits": { - "smithy.api#documentation": "

An MD5 digest of the non-URL-encoded message body string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see RFC1321.

" + "smithy.api#documentation": "

Sets the value of one or more queue attributes. When you change a queue's attributes,\n the change can take up to 60 seconds for most of the attributes to propagate throughout\n the Amazon SQS system. Changes made to the MessageRetentionPeriod attribute\n can take up to 15 minutes and will impact existing messages in the queue potentially\n causing them to be expired and deleted if the MessageRetentionPeriod is\n reduced below the age of existing messages.

\n \n \n " } - }, - "MD5OfMessageAttributes": { - "target": "com.amazonaws.sqs#String", + }, + "com.amazonaws.sqs#SetQueueAttributesRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

The URL of the Amazon SQS queue whose attributes are set.

\n

Queue URLs and names are case-sensitive.

", + "smithy.api#required": {} + } + }, + "Attributes": { + "target": "com.amazonaws.sqs#QueueAttributeMap", + "traits": { + "smithy.api#documentation": "

A map of attributes to set.

\n

The following lists the names, descriptions, and values of the special request\n parameters that the SetQueueAttributes action uses:

\n \n

The following attributes apply only to dead-letter queues:\n

\n \n \n

The dead-letter queue of a FIFO queue must also be a FIFO queue. Similarly, the\n dead-letter queue of a standard queue must also be a standard queue.

\n
\n

The following attributes apply only to server-side-encryption:

\n \n

The following attribute applies only to FIFO\n (first-in-first-out) queues:

\n \n

The following attributes apply only to high\n throughput for FIFO queues:

\n \n

To enable high throughput for FIFO queues, do the following:

\n \n

If you set these attributes to anything other than the values shown for enabling high\n throughput, normal throughput is in effect and deduplication occurs as specified.

\n

For information on throughput quotas, see Quotas\n related to messages in the Amazon SQS Developer\n Guide.

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Attribute" + } + } + }, "traits": { - "smithy.api#documentation": "

An MD5 digest of the non-URL-encoded message attribute string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see RFC1321.

" + "smithy.api#documentation": "

", + "smithy.api#input": {} } - }, - "MD5OfMessageSystemAttributes": { - "target": "com.amazonaws.sqs#String", + }, + "com.amazonaws.sqs#StartMessageMoveTask": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#StartMessageMoveTaskRequest" + }, + "output": { + "target": "com.amazonaws.sqs#StartMessageMoveTaskResult" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#InvalidAddress" + }, + { + "target": "com.amazonaws.sqs#InvalidSecurity" + }, + { + "target": "com.amazonaws.sqs#RequestThrottled" + }, + { + "target": "com.amazonaws.sqs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.sqs#UnsupportedOperation" + } + ], "traits": { - "smithy.api#documentation": "

An MD5 digest of the non-URL-encoded message system attribute string. You can use this \nattribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest.

" + "smithy.api#documentation": "

Starts an asynchronous task to move messages from a specified source queue to a\n specified destination queue.

\n \n \n " } - }, - "MessageId": { - "target": "com.amazonaws.sqs#String", + }, + "com.amazonaws.sqs#StartMessageMoveTaskRequest": { + "type": "structure", + "members": { + "SourceArn": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

The ARN of the queue that contains the messages to be moved to another queue.\n Currently, only ARNs of dead-letter queues (DLQs) whose sources are other Amazon SQS queues\n are accepted. DLQs whose sources are non-SQS queues, such as Lambda or Amazon SNS topics, are\n not currently supported.

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

The ARN of the queue that receives the moved messages. You can use this field to\n specify the destination queue where you would like to redrive messages. If this field is\n left blank, the messages will be redriven back to their respective original source\n queues.

" + } + }, + "MaxNumberOfMessagesPerSecond": { + "target": "com.amazonaws.sqs#NullableInteger", + "traits": { + "smithy.api#documentation": "

The number of messages to be moved per second (the message movement rate). You can use\n this field to define a fixed message movement rate. The maximum value for messages per\n second is 500. If this field is left blank, the system will optimize the rate based on\n the queue message backlog size, which may vary throughout the duration of the message\n movement task.

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

An attribute containing the MessageId of the message sent to the queue.\n For more information, see Queue and Message Identifiers in the Amazon SQS Developer\n Guide.

" + "smithy.api#input": {} } - }, - "SequenceNumber": { - "target": "com.amazonaws.sqs#String", + }, + "com.amazonaws.sqs#StartMessageMoveTaskResult": { + "type": "structure", + "members": { + "TaskHandle": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

An identifier associated with a message movement task. You can use this identifier to\n cancel a specified message movement task using the CancelMessageMoveTask\n action.

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

This parameter applies only to FIFO (first-in-first-out) queues.

\n

The large, non-consecutive number that Amazon SQS assigns to each message.

\n

The length of SequenceNumber is 128 bits. SequenceNumber\n continues to increase for a particular MessageGroupId.

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

The MD5OfMessageBody and MessageId elements.

", - "smithy.api#output": {} - } - }, - "com.amazonaws.sqs#SetQueueAttributes": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#SetQueueAttributesRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#InvalidAttributeName" - } - ], - "traits": { - "smithy.api#documentation": "

Sets the value of one or more queue attributes. When you change a queue's attributes,\n the change can take up to 60 seconds for most of the attributes to propagate throughout\n the Amazon SQS system. Changes made to the MessageRetentionPeriod attribute can\n take up to 15 minutes and will impact existing messages in the queue potentially causing\n them to be expired and deleted if the MessageRetentionPeriod is reduced\n below the age of existing messages.

\n \n \n " - } - }, - "com.amazonaws.sqs#SetQueueAttributesRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

The URL of the Amazon SQS queue whose attributes are set.

\n

Queue URLs and names are case-sensitive.

", - "smithy.api#required": {} - } - }, - "Attributes": { - "target": "com.amazonaws.sqs#QueueAttributeMap", - "traits": { - "smithy.api#documentation": "

A map of attributes to set.

\n

The following lists the names, descriptions, and values of the special request\n parameters that the SetQueueAttributes action uses:

\n \n

The following attributes apply only to dead-letter queues:\n

\n \n \n

The dead-letter queue of a \n FIFO queue must also be a FIFO queue. Similarly, the dead-letter \n queue of a standard queue must also be a standard queue.

\n
\n

The following attributes apply only to server-side-encryption:

\n \n

The following attribute applies only to FIFO (first-in-first-out)\n queues:

\n \n

The following attributes apply only to \nhigh throughput\nfor FIFO queues:

\n \n

To enable high throughput for FIFO queues, do the following:

\n \n

If you set these attributes to anything other than the values shown for enabling high\n throughput, normal throughput is in effect and deduplication occurs as specified.

\n

For information on throughput quotas, \n see Quotas related to messages \n in the Amazon SQS Developer Guide.

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

", - "smithy.api#input": {} - } - }, - "com.amazonaws.sqs#StartMessageMoveTask": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#StartMessageMoveTaskRequest" - }, - "output": { - "target": "com.amazonaws.sqs#StartMessageMoveTaskResult" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.sqs#UnsupportedOperation" - } - ], - "traits": { - "smithy.api#documentation": "

Starts an asynchronous task to move messages from a specified source queue to a\n specified destination queue.

\n \n \n " - } - }, - "com.amazonaws.sqs#StartMessageMoveTaskRequest": { - "type": "structure", - "members": { - "SourceArn": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

The ARN of the queue that contains the messages to be moved to another queue.\n Currently, only ARNs of dead-letter queues (DLQs) whose sources are other Amazon SQS queues\n are accepted. DLQs whose sources are non-SQS queues, such as Lambda or Amazon SNS topics, are\n not currently supported.

", - "smithy.api#required": {} + "com.amazonaws.sqs#String": { + "type": "string" + }, + "com.amazonaws.sqs#StringList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#xmlName": "StringListValue" + } } - }, - "DestinationArn": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

The ARN of the queue that receives the moved messages. You can use this field to\n specify the destination queue where you would like to redrive messages. If this field is\n left blank, the messages will be redriven back to their respective original source\n queues.

" + }, + "com.amazonaws.sqs#TagKey": { + "type": "string" + }, + "com.amazonaws.sqs#TagKeyList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#TagKey" } - }, - "MaxNumberOfMessagesPerSecond": { - "target": "com.amazonaws.sqs#Integer", + }, + "com.amazonaws.sqs#TagMap": { + "type": "map", + "key": { + "target": "com.amazonaws.sqs#TagKey", + "traits": { + "smithy.api#xmlName": "Key" + } + }, + "value": { + "target": "com.amazonaws.sqs#TagValue", + "traits": { + "smithy.api#xmlName": "Value" + } + } + }, + "com.amazonaws.sqs#TagQueue": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#TagQueueRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#InvalidAddress" + }, + { + "target": "com.amazonaws.sqs#InvalidSecurity" + }, + { + "target": "com.amazonaws.sqs#QueueDoesNotExist" + }, + { + "target": "com.amazonaws.sqs#RequestThrottled" + }, + { + "target": "com.amazonaws.sqs#UnsupportedOperation" + } + ], "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "

The number of messages to be moved per second (the message movement rate). You can use\n this field to define a fixed message movement rate. The maximum value for messages per\n second is 500. If this field is left blank, the system will optimize the rate based on\n the queue message backlog size, which may vary throughout the duration of the message\n movement task.

" + "smithy.api#documentation": "

Add cost allocation tags to the specified Amazon SQS queue. For an overview, see\n Tagging\n Your Amazon SQS Queues in the Amazon SQS Developer\n Guide.

\n

When you use queue tags, keep the following guidelines in mind:

\n \n

For a full list of tag restrictions, see Quotas related to queues in the Amazon SQS Developer\n Guide.

\n \n

Cross-account permissions don't apply to this action. For more information, see\n Grant cross-account permissions to a role and a username in the\n Amazon SQS Developer Guide.

\n
" } - } }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.sqs#StartMessageMoveTaskResult": { - "type": "structure", - "members": { - "TaskHandle": { - "target": "com.amazonaws.sqs#String", + "com.amazonaws.sqs#TagQueueRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

The URL of the queue.

", + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.sqs#TagMap", + "traits": { + "smithy.api#documentation": "

The list of tags to be added to the specified queue.

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Tag" + } + } + }, "traits": { - "smithy.api#documentation": "

An identifier associated with a message movement task. You can use this identifier to\n cancel a specified message movement task using the CancelMessageMoveTask\n action.

" + "smithy.api#input": {} } - } }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.sqs#String": { - "type": "string" - }, - "com.amazonaws.sqs#StringList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#xmlName": "StringListValue" - } - } - }, - "com.amazonaws.sqs#TagKey": { - "type": "string" - }, - "com.amazonaws.sqs#TagKeyList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#TagKey" - } - }, - "com.amazonaws.sqs#TagMap": { - "type": "map", - "key": { - "target": "com.amazonaws.sqs#TagKey", - "traits": { - "smithy.api#xmlName": "Key" - } - }, - "value": { - "target": "com.amazonaws.sqs#TagValue", - "traits": { - "smithy.api#xmlName": "Value" - } - } - }, - "com.amazonaws.sqs#TagQueue": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#TagQueueRequest" + "com.amazonaws.sqs#TagValue": { + "type": "string" + }, + "com.amazonaws.sqs#TaskStatus": { + "type": "enum", + "members": { + "RUNNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RUNNING" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FAILED" + } + }, + "CANCELLING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CANCELLING" + } + }, + "CANCELLED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CANCELLED" + } + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "COMPLETED" + } + } + } }, - "output": { - "target": "smithy.api#Unit" + "com.amazonaws.sqs#Token": { + "type": "string" }, - "traits": { - "smithy.api#documentation": "

Add cost allocation tags to the specified Amazon SQS queue. For an overview, see Tagging \nYour Amazon SQS Queues in the Amazon SQS Developer Guide.

\n

When you use queue tags, keep the following guidelines in mind:

\n \n

For a full list of tag restrictions, see \nQuotas related to queues \nin the Amazon SQS Developer Guide.

\n \n

Cross-account permissions don't apply to this action. For more information, \nsee Grant \ncross-account permissions to a role and a username in the Amazon SQS Developer Guide.

\n
" - } - }, - "com.amazonaws.sqs#TagQueueRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", + "com.amazonaws.sqs#TooManyEntriesInBatchRequest": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { - "smithy.api#documentation": "

The URL of the queue.

", - "smithy.api#required": {} + "aws.protocols#awsQueryError": { + "code": "AWS.SimpleQueueService.TooManyEntriesInBatchRequest", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

The batch request contains more entries than permissible.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 } - }, - "Tags": { - "target": "com.amazonaws.sqs#TagMap", + }, + "com.amazonaws.sqs#UnsupportedOperation": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { - "smithy.api#documentation": "

The list of tags to be added to the specified queue.

", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Tag" + "aws.protocols#awsQueryError": { + "code": "AWS.SimpleQueueService.UnsupportedOperation", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

Error code 400. Unsupported operation.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.sqs#TagValue": { - "type": "string" - }, - "com.amazonaws.sqs#Token": { - "type": "string" - }, - "com.amazonaws.sqs#TooManyEntriesInBatchRequest": { - "type": "structure", - "members": {}, - "traits": { - "aws.protocols#awsQueryError": { - "code": "AWS.SimpleQueueService.TooManyEntriesInBatchRequest", - "httpResponseCode": 400 - }, - "smithy.api#documentation": "

The batch request contains more entries than permissible.

", - "smithy.api#error": "client", - "smithy.api#httpError": 400 - } - }, - "com.amazonaws.sqs#UnsupportedOperation": { - "type": "structure", - "members": {}, - "traits": { - "aws.protocols#awsQueryError": { - "code": "AWS.SimpleQueueService.UnsupportedOperation", - "httpResponseCode": 400 - }, - "smithy.api#documentation": "

Error code 400. Unsupported operation.

", - "smithy.api#error": "client", - "smithy.api#httpError": 400 - } - }, - "com.amazonaws.sqs#UntagQueue": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#UntagQueueRequest" - }, - "output": { - "target": "smithy.api#Unit" }, - "traits": { - "smithy.api#documentation": "

Remove cost allocation tags from the specified Amazon SQS queue. For an overview, see Tagging \nYour Amazon SQS Queues in the Amazon SQS Developer Guide.

\n \n

Cross-account permissions don't apply to this action. For more information, \nsee Grant \ncross-account permissions to a role and a username in the Amazon SQS Developer Guide.

\n
" - } - }, - "com.amazonaws.sqs#UntagQueueRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", + "com.amazonaws.sqs#UntagQueue": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#UntagQueueRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#InvalidAddress" + }, + { + "target": "com.amazonaws.sqs#InvalidSecurity" + }, + { + "target": "com.amazonaws.sqs#QueueDoesNotExist" + }, + { + "target": "com.amazonaws.sqs#RequestThrottled" + }, + { + "target": "com.amazonaws.sqs#UnsupportedOperation" + } + ], "traits": { - "smithy.api#documentation": "

The URL of the queue.

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

Remove cost allocation tags from the specified Amazon SQS queue. For an overview, see\n Tagging\n Your Amazon SQS Queues in the Amazon SQS Developer\n Guide.

\n \n

Cross-account permissions don't apply to this action. For more information, see\n Grant cross-account permissions to a role and a username in the\n Amazon SQS Developer Guide.

\n
" } - }, - "TagKeys": { - "target": "com.amazonaws.sqs#TagKeyList", + }, + "com.amazonaws.sqs#UntagQueueRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

The URL of the queue.

", + "smithy.api#required": {} + } + }, + "TagKeys": { + "target": "com.amazonaws.sqs#TagKeyList", + "traits": { + "smithy.api#documentation": "

The list of tags to be removed from the specified queue.

", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "TagKey" + } + } + }, "traits": { - "smithy.api#documentation": "

The list of tags to be removed from the specified queue.

", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "TagKey" + "smithy.api#input": {} } - } - }, - "traits": { - "smithy.api#input": {} } - } } -} +} \ No newline at end of file From 012a082b8aa32b2a15793be20638b9ffb579340f Mon Sep 17 00:00:00 2001 From: George Fu Date: Mon, 30 Oct 2023 20:39:10 +0000 Subject: [PATCH 2/5] chore(client-sqs): generate as JSON protocol --- clients/client-sqs/README.md | 15 +- clients/client-sqs/package.json | 1 - clients/client-sqs/src/SQS.ts | 15 +- clients/client-sqs/src/SQSClient.ts | 15 +- .../src/commands/AddPermissionCommand.ts | 59 +- .../commands/CancelMessageMoveTaskCommand.ts | 27 +- .../ChangeMessageVisibilityBatchCommand.ts | 40 +- .../ChangeMessageVisibilityCommand.ts | 58 +- .../src/commands/CreateQueueCommand.ts | 57 +- .../src/commands/DeleteMessageBatchCommand.ts | 37 +- .../src/commands/DeleteMessageCommand.ts | 45 +- .../src/commands/DeleteQueueCommand.ts | 39 +- .../src/commands/GetQueueAttributesCommand.ts | 36 +- .../src/commands/GetQueueUrlCommand.ts | 34 +- .../ListDeadLetterSourceQueuesCommand.ts | 30 +- .../commands/ListMessageMoveTasksCommand.ts | 29 +- .../src/commands/ListQueueTagsCommand.ts | 46 +- .../src/commands/ListQueuesCommand.ts | 38 +- .../src/commands/PurgeQueueCommand.ts | 30 +- .../src/commands/ReceiveMessageCommand.ts | 81 +- .../src/commands/RemovePermissionCommand.ts | 43 +- .../src/commands/SendMessageBatchCommand.ts | 89 +- .../src/commands/SendMessageCommand.ts | 75 +- .../src/commands/SetQueueAttributesCommand.ts | 64 +- .../commands/StartMessageMoveTaskCommand.ts | 27 +- .../src/commands/TagQueueCommand.ts | 56 +- .../src/commands/UntagQueueCommand.ts | 45 +- clients/client-sqs/src/index.ts | 15 +- clients/client-sqs/src/models/models_0.ts | 1149 ++++-- .../client-sqs/src/protocols/Aws_json1_0.ts | 2764 +++++++++++++ clients/client-sqs/src/protocols/Aws_query.ts | 3455 ----------------- .../codegen/AddAwsRuntimeConfig.java | 11 + packages/core/src/protocols/index.ts | 1 + 33 files changed, 4519 insertions(+), 4007 deletions(-) create mode 100644 clients/client-sqs/src/protocols/Aws_json1_0.ts delete mode 100644 clients/client-sqs/src/protocols/Aws_query.ts diff --git a/clients/client-sqs/README.md b/clients/client-sqs/README.md index 0b5ec94826441..20f7297a1336a 100644 --- a/clients/client-sqs/README.md +++ b/clients/client-sqs/README.md @@ -7,15 +7,15 @@ AWS SDK for JavaScript SQS Client for Node.js, Browser and React Native.

Welcome to the Amazon SQS API Reference.

-

Amazon SQS is a reliable, highly-scalable hosted queue for storing messages as they travel -between applications or microservices. Amazon SQS moves data between distributed application -components and helps you decouple these components.

+

Amazon SQS is a reliable, highly-scalable hosted queue for storing messages as they +travel between applications or microservices. Amazon SQS moves data between distributed +application components and helps you decouple these components.

For information on the permissions you need to use this API, see Identity and access management in the Amazon SQS Developer Guide.

-

You can use Amazon Web Services SDKs to access -Amazon SQS using your favorite programming language. The SDKs perform tasks such as the -following automatically:

+

You can use Amazon Web Services +SDKs to access Amazon SQS using your favorite programming language. The SDKs +perform tasks such as the following automatically:

*

If you set these attributes to anything other than the values shown for enabling high - * throughput, normal throughput is in effect and deduplication occurs as specified.

- *

For information on throughput quotas, - * see Quotas related to messages - * in the Amazon SQS Developer Guide.

+ * throughput, normal throughput is in effect and deduplication occurs as specified.

+ *

For information on throughput quotas, see Quotas + * related to messages in the Amazon SQS Developer + * Guide.

*/ AttributeNames?: QueueAttributeName[]; } @@ -1190,26 +1367,6 @@ export interface GetQueueAttributesResult { Attributes?: Partial>; } -/** - * @public - *

The specified attribute doesn't exist.

- */ -export class InvalidAttributeName extends __BaseException { - readonly name: "InvalidAttributeName" = "InvalidAttributeName"; - readonly $fault: "client" = "client"; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "InvalidAttributeName", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, InvalidAttributeName.prototype); - } -} - /** * @public *

@@ -1226,7 +1383,8 @@ export interface GetQueueUrlRequest { /** * @public - *

The Amazon Web Services account ID of the account that created the queue.

+ *

The Amazon Web + * Services account ID of the account that created the queue.

*/ QueueOwnerAWSAccountId?: string; } @@ -1234,7 +1392,7 @@ export interface GetQueueUrlRequest { /** * @public *

For more information, see Interpreting Responses in the Amazon SQS Developer - * Guide.

+ * Guide
.

*/ export interface GetQueueUrlResult { /** @@ -1244,26 +1402,6 @@ export interface GetQueueUrlResult { QueueUrl?: string; } -/** - * @public - *

The specified queue doesn't exist.

- */ -export class QueueDoesNotExist extends __BaseException { - readonly name: "QueueDoesNotExist" = "QueueDoesNotExist"; - readonly $fault: "client" = "client"; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "QueueDoesNotExist", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, QueueDoesNotExist.prototype); - } -} - /** * @public *

@@ -1330,6 +1468,23 @@ export interface ListMessageMoveTasksRequest { MaxResults?: number; } +/** + * @public + * @enum + */ +export const TaskStatus = { + CANCELLED: "CANCELLED", + CANCELLING: "CANCELLING", + COMPLETED: "COMPLETED", + FAILED: "FAILED", + RUNNING: "RUNNING", +} as const; + +/** + * @public + */ +export type TaskStatus = (typeof TaskStatus)[keyof typeof TaskStatus]; + /** * @public *

Contains the details of a message movement task.

@@ -1348,7 +1503,7 @@ export interface ListMessageMoveTasksResultEntry { *

The status of the message movement task. Possible values are: RUNNING, COMPLETED, * CANCELLING, CANCELLED, and FAILED.

*/ - Status?: string; + Status?: TaskStatus; /** * @public @@ -1446,18 +1601,18 @@ export interface ListQueuesRequest { export interface ListQueuesResult { /** * @public - *

Pagination token to include in the next request. Token value is null if - * there are no additional results to request, or if you did not set - * MaxResults in the request.

+ *

A list of queue URLs, up to 1,000 entries, or the value of MaxResults + * that you sent in the request.

*/ - NextToken?: string; + QueueUrls?: string[]; /** * @public - *

A list of queue URLs, up to 1,000 entries, or the value of MaxResults - * that you sent in the request.

+ *

Pagination token to include in the next request. Token value is null if + * there are no additional results to request, or if you did not set + * MaxResults in the request.

*/ - QueueUrls?: string[]; + NextToken?: string; } /** @@ -1518,6 +1673,159 @@ export interface PurgeQueueRequest { QueueUrl: string | undefined; } +/** + * @public + *

The caller doesn't have the required KMS access.

+ */ +export class KmsAccessDenied extends __BaseException { + readonly name: "KmsAccessDenied" = "KmsAccessDenied"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "KmsAccessDenied", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, KmsAccessDenied.prototype); + } +} + +/** + * @public + *

The request was denied due to request throttling.

+ */ +export class KmsDisabled extends __BaseException { + readonly name: "KmsDisabled" = "KmsDisabled"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "KmsDisabled", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, KmsDisabled.prototype); + } +} + +/** + * @public + *

The request was rejected for one of the following reasons:

+ *
    + *
  • + *

    The KeyUsage value of the KMS key is incompatible with the API + * operation.

    + *
  • + *
  • + *

    The encryption algorithm or signing algorithm specified for the operation is + * incompatible with the type of key material in the KMS key (KeySpec).

    + *
  • + *
+ */ +export class KmsInvalidKeyUsage extends __BaseException { + readonly name: "KmsInvalidKeyUsage" = "KmsInvalidKeyUsage"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "KmsInvalidKeyUsage", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, KmsInvalidKeyUsage.prototype); + } +} + +/** + * @public + *

The request was rejected because the state of the specified resource is not valid for + * this request.

+ */ +export class KmsInvalidState extends __BaseException { + readonly name: "KmsInvalidState" = "KmsInvalidState"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "KmsInvalidState", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, KmsInvalidState.prototype); + } +} + +/** + * @public + *

The request was rejected because the specified entity or resource could not be found. + *

+ */ +export class KmsNotFound extends __BaseException { + readonly name: "KmsNotFound" = "KmsNotFound"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "KmsNotFound", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, KmsNotFound.prototype); + } +} + +/** + * @public + *

The request was rejected because the specified key policy isn't syntactically or + * semantically correct.

+ */ +export class KmsOptInRequired extends __BaseException { + readonly name: "KmsOptInRequired" = "KmsOptInRequired"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "KmsOptInRequired", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, KmsOptInRequired.prototype); + } +} + +/** + * @public + *

Amazon Web Services KMS throttles requests for the following conditions.

+ */ +export class KmsThrottled extends __BaseException { + readonly name: "KmsThrottled" = "KmsThrottled"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "KmsThrottled", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, KmsThrottled.prototype); + } +} + /** * @public *

@@ -1541,19 +1849,19 @@ export interface ReceiveMessageRequest { * *
  • *

    - * ApproximateFirstReceiveTimestamp – Returns the time the - * message was first received from the queue (epoch time in + * ApproximateFirstReceiveTimestamp – Returns the time the message was + * first received from the queue (epoch time in * milliseconds).

    *
  • *
  • *

    - * ApproximateReceiveCount – Returns the number of times a - * message has been received across all queues but not deleted.

    + * ApproximateReceiveCount – Returns the number of times a message has + * been received across all queues but not deleted.

    *
  • *
  • *

    - * AWSTraceHeader – Returns the X-Ray trace - * header string.

    + * AWSTraceHeader – Returns the X-Ray trace header + * string.

    *
  • *
  • *

    @@ -1572,15 +1880,15 @@ export interface ReceiveMessageRequest { *

  • *
  • *

    - * SentTimestamp – Returns the time the message was sent to the - * queue (epoch time in + * SentTimestamp – Returns the time the message was sent to the queue + * (epoch time in * milliseconds).

    *
  • *
  • *

    - * SqsManagedSseEnabled – Enables server-side queue encryption - * using SQS owned encryption keys. Only one server-side encryption option is - * supported per queue (for example, SSE-KMS or SSE-SQS).

    + * SqsManagedSseEnabled – Enables server-side queue encryption using + * SQS owned encryption keys. Only one server-side encryption option is supported + * per queue (for example, SSE-KMS or SSE-SQS).

    *
  • *
  • *

    @@ -1592,17 +1900,15 @@ export interface ReceiveMessageRequest { *

  • *
  • *

    - * MessageGroupId – Returns the value provided by the - * producer that calls the + * MessageGroupId – Returns the value provided by the producer that + * calls the * SendMessage - * action. - * Messages with the same MessageGroupId are returned in - * sequence.

    + * action. Messages with the + * same MessageGroupId are returned in sequence.

    *
  • *
  • *

    - * SequenceNumber – Returns the value provided by - * Amazon SQS.

    + * SequenceNumber – Returns the value provided by Amazon SQS.

    *
  • * */ @@ -1642,8 +1948,8 @@ export interface ReceiveMessageRequest { /** * @public - *

    The maximum number of messages to return. Amazon SQS never returns more messages than this - * value (however, fewer messages might be returned). Valid values: 1 to 10. Default: + *

    The maximum number of messages to return. Amazon SQS never returns more messages than + * this value (however, fewer messages might be returned). Valid values: 1 to 10. Default: * 1.

    */ MaxNumberOfMessages?: number; @@ -1733,8 +2039,8 @@ export interface ReceiveMessageRequest { * ReceiveRequestAttemptId can contain alphanumeric characters * (a-z, A-Z, 0-9) and punctuation * (!"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~).

    - *

    For best practices of using ReceiveRequestAttemptId, see Using the ReceiveRequestAttemptId Request Parameter in the Amazon SQS - * Developer Guide.

    + *

    For best practices of using ReceiveRequestAttemptId, see Using the ReceiveRequestAttemptId Request Parameter in the Amazon + * SQS Developer Guide.

    */ ReceiveRequestAttemptId?: string; } @@ -1806,7 +2112,7 @@ export interface MessageAttributeValue { * Number, and Binary. For the Number data type, * you must use StringValue.

    *

    You can also append custom labels. For more information, see Amazon SQS Message Attributes in the Amazon SQS Developer - * Guide.

    + * Guide.

    */ DataType: string | undefined; } @@ -1895,16 +2201,18 @@ export interface Message { /** * @public - *

    An MD5 digest of the non-URL-encoded message attribute string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see RFC1321.

    + *

    An MD5 digest of the non-URL-encoded message attribute string. You can use this + * attribute to verify that Amazon SQS received the message correctly. Amazon SQS + * URL-decodes the message before creating the MD5 digest. For information about MD5, see + * RFC1321.

    */ MD5OfMessageAttributes?: string; /** * @public - *

    Each message attribute consists of a Name, Type, - * and Value. For more information, see - * Amazon SQS - * message attributes in the Amazon SQS Developer Guide.

    + *

    Each message attribute consists of a Name, Type, and + * Value. For more information, see Amazon SQS message attributes in the Amazon SQS Developer + * Guide.

    */ MessageAttributes?: Record; } @@ -2021,7 +2329,7 @@ export interface MessageSystemAttributeValue { * Number, and Binary. For the Number data type, * you must use StringValue.

    *

    You can also append custom labels. For more information, see Amazon SQS Message Attributes in the Amazon SQS Developer - * Guide.

    + * Guide.

    */ DataType: string | undefined; } @@ -2043,11 +2351,16 @@ export interface SendMessageRequest { *

    The message to send. The minimum size is one character. The maximum size is 256 * KiB.

    * - *

    A message can include only XML, JSON, and unformatted text. The following Unicode characters are allowed:

    + *

    A message can include only XML, JSON, and unformatted text. The following Unicode + * characters are allowed:

    *

    - * #x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF + * #x9 | #xA | #xD | #x20 to + * #xD7FF | #xE000 to #xFFFD | + * #x10000 to #x10FFFF *

    - *

    Any characters not included in this list will be rejected. For more information, see the W3C specification for characters.

    + *

    Any characters not included in this list will be rejected. For more information, + * see the W3C specification for + * characters.

    *
    */ MessageBody: string | undefined; @@ -2059,32 +2372,35 @@ export interface SendMessageRequest { * become available for processing after the delay period is finished. If you don't specify * a value, the default value for the queue applies.

    * - *

    When you set FifoQueue, you can't set DelaySeconds per message. You can set this parameter only on a queue level.

    + *

    When you set FifoQueue, you can't set DelaySeconds per + * message. You can set this parameter only on a queue level.

    *
    */ DelaySeconds?: number; /** * @public - *

    Each message attribute consists of a Name, Type, - * and Value. For more information, see - * Amazon SQS - * message attributes in the Amazon SQS Developer Guide.

    + *

    Each message attribute consists of a Name, Type, and + * Value. For more information, see Amazon SQS message attributes in the Amazon SQS Developer + * Guide.

    */ MessageAttributes?: Record; /** * @public - *

    The message system attribute to send. Each message system attribute consists of a Name, Type, and Value.

    + *

    The message system attribute to send. Each message system attribute consists of a + * Name, Type, and Value.

    * *
      *
    • - *

      Currently, the only supported message system attribute is AWSTraceHeader. - * Its type must be String and its value must be a correctly formatted - * X-Ray trace header string.

      + *

      Currently, the only supported message system attribute is + * AWSTraceHeader. Its type must be String and + * its value must be a correctly formatted X-Ray trace + * header string.

      *
    • *
    • - *

      The size of a message system attribute doesn't count towards the total size of a message.

      + *

      The size of a message system attribute doesn't count towards the total + * size of a message.

      *
    • *
    *
    @@ -2098,7 +2414,7 @@ export interface SendMessageRequest { * MessageDeduplicationId is sent successfully, any messages sent with the * same MessageDeduplicationId are accepted successfully but aren't delivered * during the 5-minute deduplication interval. For more information, see Exactly-once processing in the Amazon SQS Developer - * Guide.

    + * Guide.

    *
      *
    • *

      Every message must have a unique MessageDeduplicationId,

      @@ -2145,14 +2461,15 @@ export interface SendMessageRequest { *

      If a message is sent successfully but the acknowledgement is lost and the message * is resent with the same MessageDeduplicationId after the deduplication * interval, Amazon SQS can't detect duplicate messages.

      - *

      Amazon SQS continues to keep track of the message deduplication ID even after the message is received and deleted.

      + *

      Amazon SQS continues to keep track of the message deduplication ID even after the + * message is received and deleted.

      * *

      The maximum length of MessageDeduplicationId is 128 characters. * MessageDeduplicationId can contain alphanumeric characters * (a-z, A-Z, 0-9) and punctuation * (!"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~).

      - *

      For best practices of using MessageDeduplicationId, see Using the MessageDeduplicationId Property in the Amazon SQS Developer - * Guide.

      + *

      For best practices of using MessageDeduplicationId, see Using the MessageDeduplicationId Property in the Amazon SQS + * Developer Guide.

      */ MessageDeduplicationId?: string; @@ -2160,10 +2477,10 @@ export interface SendMessageRequest { * @public *

      This parameter applies only to FIFO (first-in-first-out) queues.

      *

      The tag that specifies that a message belongs to a specific message group. Messages - * that belong to the same message group are processed in a FIFO manner (however, - * messages in different message groups might be processed out of order). To interleave - * multiple ordered streams within a single queue, use MessageGroupId values - * (for example, session data for multiple users). In this scenario, multiple consumers can + * that belong to the same message group are processed in a FIFO manner (however, messages + * in different message groups might be processed out of order). To interleave multiple + * ordered streams within a single queue, use MessageGroupId values (for + * example, session data for multiple users). In this scenario, multiple consumers can * process the queue, but the session data of each user is processed in a FIFO * fashion.

      *
        @@ -2200,20 +2517,26 @@ export interface SendMessageRequest { export interface SendMessageResult { /** * @public - *

        An MD5 digest of the non-URL-encoded message body string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see RFC1321.

        + *

        An MD5 digest of the non-URL-encoded message body string. You can use this attribute + * to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the + * message before creating the MD5 digest. For information about MD5, see RFC1321.

        */ MD5OfMessageBody?: string; /** * @public - *

        An MD5 digest of the non-URL-encoded message attribute string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see RFC1321.

        + *

        An MD5 digest of the non-URL-encoded message attribute string. You can use this + * attribute to verify that Amazon SQS received the message correctly. Amazon SQS + * URL-decodes the message before creating the MD5 digest. For information about MD5, see + * RFC1321.

        */ MD5OfMessageAttributes?: string; /** * @public *

        An MD5 digest of the non-URL-encoded message system attribute string. You can use this - * attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest.

        + * attribute to verify that Amazon SQS received the message correctly. Amazon SQS + * URL-decodes the message before creating the MD5 digest.

        */ MD5OfMessageSystemAttributes?: string; @@ -2257,7 +2580,8 @@ export class BatchRequestTooLong extends __BaseException { /** * @public - *

        Contains the details of a single Amazon SQS message along with an Id.

        + *

        Contains the details of a single Amazon SQS message along with an + * Id.

        */ export interface SendMessageBatchRequestEntry { /** @@ -2265,7 +2589,8 @@ export interface SendMessageBatchRequestEntry { *

        An identifier for a message in this batch used to communicate the result.

        * *

        The Ids of a batch request need to be unique within a request.

        - *

        This identifier can have up to 80 characters. The following characters are accepted: alphanumeric characters, hyphens(-), and underscores (_).

        + *

        This identifier can have up to 80 characters. The following characters are + * accepted: alphanumeric characters, hyphens(-), and underscores (_).

        *
        */ Id: string | undefined; @@ -2283,32 +2608,35 @@ export interface SendMessageBatchRequestEntry { * become available for processing after the delay period is finished. If you don't specify * a value, the default value for the queue is applied.

        * - *

        When you set FifoQueue, you can't set DelaySeconds per message. You can set this parameter only on a queue level.

        + *

        When you set FifoQueue, you can't set DelaySeconds per + * message. You can set this parameter only on a queue level.

        *
        */ DelaySeconds?: number; /** * @public - *

        Each message attribute consists of a Name, Type, - * and Value. For more information, see - * Amazon SQS - * message attributes in the Amazon SQS Developer Guide.

        + *

        Each message attribute consists of a Name, Type, and + * Value. For more information, see Amazon SQS message attributes in the Amazon SQS Developer + * Guide.

        */ MessageAttributes?: Record; /** * @public - *

        The message system attribute to send Each message system attribute consists of a Name, Type, and Value.

        + *

        The message system attribute to send Each message system attribute consists of a + * Name, Type, and Value.

        * *
          *
        • - *

          Currently, the only supported message system attribute is AWSTraceHeader. - * Its type must be String and its value must be a correctly formatted - * X-Ray trace header string.

          + *

          Currently, the only supported message system attribute is + * AWSTraceHeader. Its type must be String and + * its value must be a correctly formatted X-Ray trace + * header string.

          *
        • *
        • - *

          The size of a message system attribute doesn't count towards the total size of a message.

          + *

          The size of a message system attribute doesn't count towards the total + * size of a message.

          *
        • *
        *
        @@ -2322,7 +2650,7 @@ export interface SendMessageBatchRequestEntry { * interval. If a message with a particular MessageDeduplicationId is sent * successfully, subsequent messages with the same MessageDeduplicationId are * accepted successfully but aren't delivered. For more information, see Exactly-once processing in the Amazon SQS Developer - * Guide.

        + * Guide.

        *
          *
        • *

          Every message must have a unique MessageDeduplicationId,

          @@ -2369,14 +2697,15 @@ export interface SendMessageBatchRequestEntry { *

          If a message is sent successfully but the acknowledgement is lost and the message * is resent with the same MessageDeduplicationId after the deduplication * interval, Amazon SQS can't detect duplicate messages.

          - *

          Amazon SQS continues to keep track of the message deduplication ID even after the message is received and deleted.

          + *

          Amazon SQS continues to keep track of the message deduplication ID even after the + * message is received and deleted.

          * *

          The length of MessageDeduplicationId is 128 characters. * MessageDeduplicationId can contain alphanumeric characters * (a-z, A-Z, 0-9) and punctuation * (!"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~).

          - *

          For best practices of using MessageDeduplicationId, see Using the MessageDeduplicationId Property in the Amazon SQS Developer - * Guide.

          + *

          For best practices of using MessageDeduplicationId, see Using the MessageDeduplicationId Property in the Amazon SQS + * Developer Guide.

          */ MessageDeduplicationId?: string; @@ -2384,10 +2713,10 @@ export interface SendMessageBatchRequestEntry { * @public *

          This parameter applies only to FIFO (first-in-first-out) queues.

          *

          The tag that specifies that a message belongs to a specific message group. Messages - * that belong to the same message group are processed in a FIFO manner (however, - * messages in different message groups might be processed out of order). To interleave - * multiple ordered streams within a single queue, use MessageGroupId values - * (for example, session data for multiple users). In this scenario, multiple consumers can + * that belong to the same message group are processed in a FIFO manner (however, messages + * in different message groups might be processed out of order). To interleave multiple + * ordered streams within a single queue, use MessageGroupId values (for + * example, session data for multiple users). In this scenario, multiple consumers can * process the queue, but the session data of each user is processed in a FIFO * fashion.

          *
            @@ -2459,20 +2788,27 @@ export interface SendMessageBatchResultEntry { /** * @public - *

            An MD5 digest of the non-URL-encoded message body string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see RFC1321.

            + *

            An MD5 digest of the non-URL-encoded message body string. You can use this attribute + * to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the + * message before creating the MD5 digest. For information about MD5, see RFC1321.

            */ MD5OfMessageBody: string | undefined; /** * @public - *

            An MD5 digest of the non-URL-encoded message attribute string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see RFC1321.

            + *

            An MD5 digest of the non-URL-encoded message attribute string. You can use this + * attribute to verify that Amazon SQS received the message correctly. Amazon SQS + * URL-decodes the message before creating the MD5 digest. For information about MD5, see + * RFC1321.

            */ MD5OfMessageAttributes?: string; /** * @public *

            An MD5 digest of the non-URL-encoded message system attribute string. You can use this - * attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see RFC1321.

            + * attribute to verify that Amazon SQS received the message correctly. Amazon SQS + * URL-decodes the message before creating the MD5 digest. For information about MD5, see + * RFC1321.

            */ MD5OfMessageSystemAttributes?: string; @@ -2541,37 +2877,36 @@ export interface SetQueueAttributesRequest { * *
          • *

            - * MaximumMessageSize – The limit of how many bytes a message - * can contain before Amazon SQS rejects it. Valid values: An integer from 1,024 bytes + * MaximumMessageSize – The limit of how many bytes a message can + * contain before Amazon SQS rejects it. Valid values: An integer from 1,024 bytes * (1 KiB) up to 262,144 bytes (256 KiB). Default: 262,144 (256 KiB).

            *
          • *
          • *

            - * MessageRetentionPeriod – The length of time, in seconds, for - * which Amazon SQS retains a message. Valid values: An integer representing seconds, + * MessageRetentionPeriod – The length of time, in seconds, for which + * Amazon SQS retains a message. Valid values: An integer representing seconds, * from 60 (1 minute) to 1,209,600 (14 days). Default: 345,600 (4 days). When you * change a queue's attributes, the change can take up to 60 seconds for most of - * the attributes to propagate throughout the Amazon SQS system. Changes made to the - * MessageRetentionPeriod attribute can take up to 15 minutes and + * the attributes to propagate throughout the Amazon SQS system. Changes made to + * the MessageRetentionPeriod attribute can take up to 15 minutes and * will impact existing messages in the queue potentially causing them to be * expired and deleted if the MessageRetentionPeriod is reduced below * the age of existing messages.

            *
          • *
          • *

            - * Policy – The queue's policy. A valid Amazon Web Services policy. For more - * information about policy structure, see Overview of Amazon Web Services IAM - * Policies in the Identity and Access Management User - * Guide.

            + * Policy – The queue's policy. A valid Amazon Web Services + * policy. For more information about policy structure, see Overview of Amazon Web Services IAM Policies in the + * Identity and Access Management User Guide. + *

            *
          • *
          • *

            - * ReceiveMessageWaitTimeSeconds – The length of time, in - * seconds, for which a + * ReceiveMessageWaitTimeSeconds – The length of time, in seconds, for + * which a * ReceiveMessage - * action waits - * for a message to arrive. Valid values: An integer from 0 to 20 (seconds). - * Default: 0.

            + * action waits for a message + * to arrive. Valid values: An integer from 0 to 20 (seconds). Default: 0.

            *
          • *
          • *

            @@ -2586,71 +2921,83 @@ export interface SetQueueAttributesRequest { *

              *
            • *

              - * RedrivePolicy – The string that includes the parameters for the dead-letter queue functionality - * of the source queue as a JSON object. The parameters are as follows:

              + * RedrivePolicy – The string that includes the parameters for the + * dead-letter queue functionality of the source queue as a JSON object. The + * parameters are as follows:

              *
                *
              • *

                - * deadLetterTargetArn – The Amazon Resource Name (ARN) of the dead-letter queue to - * which Amazon SQS moves messages after the value of maxReceiveCount is exceeded.

                + * deadLetterTargetArn – The Amazon Resource Name (ARN) of + * the dead-letter queue to which Amazon SQS moves messages after the value + * of maxReceiveCount is exceeded.

                *
              • *
              • *

                - * maxReceiveCount – The number of times a message is delivered to the source queue before being - * moved to the dead-letter queue. Default: 10. When the ReceiveCount for a message exceeds the maxReceiveCount - * for a queue, Amazon SQS moves the message to the dead-letter-queue.

                + * maxReceiveCount – The number of times a message is + * delivered to the source queue before being moved to the dead-letter + * queue. Default: 10. When the ReceiveCount for a message + * exceeds the maxReceiveCount for a queue, Amazon SQS moves + * the message to the dead-letter-queue.

                *
              • *
              *
            • *
            • *

              - * RedriveAllowPolicy – The string that includes the parameters for the permissions for the dead-letter - * queue redrive permission and which source queues can specify dead-letter queues as a JSON object. The parameters are as follows:

              + * RedriveAllowPolicy – The string that includes the parameters for + * the permissions for the dead-letter queue redrive permission and which source + * queues can specify dead-letter queues as a JSON object. The parameters are as + * follows:

              *
                *
              • *

                - * redrivePermission – The permission type that defines which source queues can - * specify the current queue as the dead-letter queue. Valid values are:

                + * redrivePermission – The permission type that defines + * which source queues can specify the current queue as the dead-letter + * queue. Valid values are:

                *
                  *
                • *

                  - * allowAll – (Default) Any source queues in this Amazon Web Services account in the same Region can - * specify this queue as the dead-letter queue.

                  + * allowAll – (Default) Any source queues in this + * Amazon Web Services account in the same + * Region can specify this queue as the dead-letter queue.

                  *
                • *
                • *

                  - * denyAll – No source queues can specify this queue as the dead-letter - * queue.

                  + * denyAll – No source queues can specify this queue + * as the dead-letter queue.

                  *
                • *
                • *

                  - * byQueue – Only queues specified by the sourceQueueArns parameter can specify - * this queue as the dead-letter queue.

                  + * byQueue – Only queues specified by the + * sourceQueueArns parameter can specify this + * queue as the dead-letter queue.

                  *
                • *
                *
              • *
              • *

                - * sourceQueueArns – The Amazon Resource Names (ARN)s of the source queues that can specify - * this queue as the dead-letter queue and redrive messages. You can specify this parameter only when the - * redrivePermission parameter is set to byQueue. You can specify up to 10 source queue ARNs. - * To allow more than 10 source queues to specify dead-letter queues, set the redrivePermission parameter - * to allowAll.

                + * sourceQueueArns – The Amazon Resource Names (ARN)s of the + * source queues that can specify this queue as the dead-letter queue and + * redrive messages. You can specify this parameter only when the + * redrivePermission parameter is set to + * byQueue. You can specify up to 10 source queue ARNs. To + * allow more than 10 source queues to specify dead-letter queues, set the + * redrivePermission parameter to + * allowAll.

                *
              • *
              *
            • *
            * - *

            The dead-letter queue of a - * FIFO queue must also be a FIFO queue. Similarly, the dead-letter - * queue of a standard queue must also be a standard queue.

            + *

            The dead-letter queue of a FIFO queue must also be a FIFO queue. Similarly, the + * dead-letter queue of a standard queue must also be a standard queue.

            *
            *

            The following attributes apply only to server-side-encryption:

            *
              *
            • *

              - * KmsMasterKeyId – The ID of an Amazon Web Services managed customer master - * key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms. While the alias of the AWS-managed CMK for Amazon SQS is + * KmsMasterKeyId – The ID of an Amazon Web Services managed customer + * master key (CMK) for Amazon SQS or a custom CMK. For more information, see + * Key Terms. While the alias of the AWS-managed CMK for Amazon SQS is * always alias/aws/sqs, the alias of a custom CMK can, for example, * be alias/MyAlias * . For more examples, see @@ -2659,28 +3006,28 @@ export interface SetQueueAttributesRequest { *

            • *
            • *

              - * KmsDataKeyReusePeriodSeconds – The length of time, in - * seconds, for which Amazon SQS can reuse a data key to - * encrypt or decrypt messages before calling KMS again. An integer - * representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 - * hours). Default: 300 (5 minutes). A shorter time period provides better security - * but results in more calls to KMS which might incur charges after Free Tier. For - * more information, see How Does the Data Key Reuse Period Work?.

              + * KmsDataKeyReusePeriodSeconds – The length of time, in seconds, for + * which Amazon SQS can reuse a data key to + * encrypt or decrypt messages before calling KMS again. An integer representing + * seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). Default: + * 300 (5 minutes). A shorter time period provides better security but results in + * more calls to KMS which might incur charges after Free Tier. For more + * information, see How Does the Data Key Reuse Period Work?.

              *
            • *
            • *

              - * SqsManagedSseEnabled – Enables server-side queue encryption - * using SQS owned encryption keys. Only one server-side encryption option is - * supported per queue (for example, SSE-KMS or SSE-SQS).

              + * SqsManagedSseEnabled – Enables server-side queue encryption using + * SQS owned encryption keys. Only one server-side encryption option is supported + * per queue (for example, SSE-KMS or SSE-SQS).

              *
            • *
            - *

            The following attribute applies only to FIFO (first-in-first-out) - * queues:

            + *

            The following attribute applies only to FIFO + * (first-in-first-out) queues:

            *
              *
            • *

              - * ContentBasedDeduplication – Enables content-based - * deduplication. For more information, see Exactly-once processing in the Amazon SQS Developer + * ContentBasedDeduplication – Enables content-based deduplication. + * For more information, see Exactly-once processing in the Amazon SQS Developer * Guide. Note the following:

              *
                *
              • @@ -2694,8 +3041,8 @@ export interface SetQueueAttributesRequest { *
              • *

                If you aren't able to provide a * MessageDeduplicationId and you enable - * ContentBasedDeduplication for your queue, Amazon SQS - * uses a SHA-256 hash to generate the + * ContentBasedDeduplication for your queue, + * Amazon SQS uses a SHA-256 hash to generate the * MessageDeduplicationId using the body of the * message (but not the attributes of the message).

                *
              • @@ -2728,20 +3075,22 @@ export interface SetQueueAttributesRequest { *
              *
            • *
            - *

            The following attributes apply only to - * high throughput - * for FIFO queues:

            + *

            The following attributes apply only to high + * throughput for FIFO queues:

            *
              *
            • *

              - * DeduplicationScope – Specifies whether message deduplication occurs at the - * message group or queue level. Valid values are messageGroup and queue.

              + * DeduplicationScope – Specifies whether message deduplication + * occurs at the message group or queue level. Valid values are + * messageGroup and queue.

              *
            • *
            • *

              * FifoThroughputLimit – Specifies whether the FIFO queue throughput - * quota applies to the entire queue or per message group. Valid values are perQueue and perMessageGroupId. - * The perMessageGroupId value is allowed only when the value for DeduplicationScope is messageGroup.

              + * quota applies to the entire queue or per message group. Valid values are + * perQueue and perMessageGroupId. The + * perMessageGroupId value is allowed only when the value for + * DeduplicationScope is messageGroup.

              *
            • *
            *

            To enable high throughput for FIFO queues, do the following:

            @@ -2754,10 +3103,10 @@ export interface SetQueueAttributesRequest { *
          • *
          *

          If you set these attributes to anything other than the values shown for enabling high - * throughput, normal throughput is in effect and deduplication occurs as specified.

          - *

          For information on throughput quotas, - * see Quotas related to messages - * in the Amazon SQS Developer Guide.

          + * throughput, normal throughput is in effect and deduplication occurs as specified.

          + *

          For information on throughput quotas, see Quotas + * related to messages in the Amazon SQS Developer + * Guide.

          */ Attributes: Partial> | undefined; } diff --git a/clients/client-sqs/src/protocols/Aws_json1_0.ts b/clients/client-sqs/src/protocols/Aws_json1_0.ts new file mode 100644 index 0000000000000..d4942220ce1ec --- /dev/null +++ b/clients/client-sqs/src/protocols/Aws_json1_0.ts @@ -0,0 +1,2764 @@ +// smithy-typescript generated code +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { + _json, + collectBody, + decorateServiceException as __decorateServiceException, + expectString as __expectString, + take, + withBaseException, +} from "@smithy/smithy-client"; +import { + Endpoint as __Endpoint, + HeaderBag as __HeaderBag, + ResponseMetadata as __ResponseMetadata, + SerdeContext as __SerdeContext, +} from "@smithy/types"; + +import { AddPermissionCommandInput, AddPermissionCommandOutput } from "../commands/AddPermissionCommand"; +import { + CancelMessageMoveTaskCommandInput, + CancelMessageMoveTaskCommandOutput, +} from "../commands/CancelMessageMoveTaskCommand"; +import { + ChangeMessageVisibilityBatchCommandInput, + ChangeMessageVisibilityBatchCommandOutput, +} from "../commands/ChangeMessageVisibilityBatchCommand"; +import { + ChangeMessageVisibilityCommandInput, + ChangeMessageVisibilityCommandOutput, +} from "../commands/ChangeMessageVisibilityCommand"; +import { CreateQueueCommandInput, CreateQueueCommandOutput } from "../commands/CreateQueueCommand"; +import { DeleteMessageBatchCommandInput, DeleteMessageBatchCommandOutput } from "../commands/DeleteMessageBatchCommand"; +import { DeleteMessageCommandInput, DeleteMessageCommandOutput } from "../commands/DeleteMessageCommand"; +import { DeleteQueueCommandInput, DeleteQueueCommandOutput } from "../commands/DeleteQueueCommand"; +import { GetQueueAttributesCommandInput, GetQueueAttributesCommandOutput } from "../commands/GetQueueAttributesCommand"; +import { GetQueueUrlCommandInput, GetQueueUrlCommandOutput } from "../commands/GetQueueUrlCommand"; +import { + ListDeadLetterSourceQueuesCommandInput, + ListDeadLetterSourceQueuesCommandOutput, +} from "../commands/ListDeadLetterSourceQueuesCommand"; +import { + ListMessageMoveTasksCommandInput, + ListMessageMoveTasksCommandOutput, +} from "../commands/ListMessageMoveTasksCommand"; +import { ListQueuesCommandInput, ListQueuesCommandOutput } from "../commands/ListQueuesCommand"; +import { ListQueueTagsCommandInput, ListQueueTagsCommandOutput } from "../commands/ListQueueTagsCommand"; +import { PurgeQueueCommandInput, PurgeQueueCommandOutput } from "../commands/PurgeQueueCommand"; +import { ReceiveMessageCommandInput, ReceiveMessageCommandOutput } from "../commands/ReceiveMessageCommand"; +import { RemovePermissionCommandInput, RemovePermissionCommandOutput } from "../commands/RemovePermissionCommand"; +import { SendMessageBatchCommandInput, SendMessageBatchCommandOutput } from "../commands/SendMessageBatchCommand"; +import { SendMessageCommandInput, SendMessageCommandOutput } from "../commands/SendMessageCommand"; +import { SetQueueAttributesCommandInput, SetQueueAttributesCommandOutput } from "../commands/SetQueueAttributesCommand"; +import { + StartMessageMoveTaskCommandInput, + StartMessageMoveTaskCommandOutput, +} from "../commands/StartMessageMoveTaskCommand"; +import { TagQueueCommandInput, TagQueueCommandOutput } from "../commands/TagQueueCommand"; +import { UntagQueueCommandInput, UntagQueueCommandOutput } from "../commands/UntagQueueCommand"; +import { + AddPermissionRequest, + BatchEntryIdsNotDistinct, + BatchRequestTooLong, + CancelMessageMoveTaskRequest, + ChangeMessageVisibilityBatchRequest, + ChangeMessageVisibilityBatchRequestEntry, + ChangeMessageVisibilityRequest, + CreateQueueRequest, + DeleteMessageBatchRequest, + DeleteMessageBatchRequestEntry, + DeleteMessageRequest, + DeleteQueueRequest, + EmptyBatchRequest, + GetQueueAttributesRequest, + GetQueueUrlRequest, + InvalidAddress, + InvalidAttributeName, + InvalidAttributeValue, + InvalidBatchEntryId, + InvalidIdFormat, + InvalidMessageContents, + InvalidSecurity, + KmsAccessDenied, + KmsDisabled, + KmsInvalidKeyUsage, + KmsInvalidState, + KmsNotFound, + KmsOptInRequired, + KmsThrottled, + ListDeadLetterSourceQueuesRequest, + ListMessageMoveTasksRequest, + ListQueuesRequest, + ListQueueTagsRequest, + Message, + MessageAttributeValue, + MessageNotInflight, + MessageSystemAttributeNameForSends, + MessageSystemAttributeValue, + OverLimit, + PurgeQueueInProgress, + PurgeQueueRequest, + QueueAttributeName, + QueueDeletedRecently, + QueueDoesNotExist, + QueueNameExists, + ReceiptHandleIsInvalid, + ReceiveMessageRequest, + ReceiveMessageResult, + RemovePermissionRequest, + RequestThrottled, + ResourceNotFoundException, + SendMessageBatchRequest, + SendMessageBatchRequestEntry, + SendMessageRequest, + SetQueueAttributesRequest, + StartMessageMoveTaskRequest, + TagQueueRequest, + TooManyEntriesInBatchRequest, + UnsupportedOperation, + UntagQueueRequest, +} from "../models/models_0"; +import { SQSServiceException as __BaseException } from "../models/SQSServiceException"; + +/** + * serializeAws_json1_0AddPermissionCommand + */ +export const se_AddPermissionCommand = async ( + input: AddPermissionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("AddPermission"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0CancelMessageMoveTaskCommand + */ +export const se_CancelMessageMoveTaskCommand = async ( + input: CancelMessageMoveTaskCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("CancelMessageMoveTask"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0ChangeMessageVisibilityCommand + */ +export const se_ChangeMessageVisibilityCommand = async ( + input: ChangeMessageVisibilityCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ChangeMessageVisibility"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0ChangeMessageVisibilityBatchCommand + */ +export const se_ChangeMessageVisibilityBatchCommand = async ( + input: ChangeMessageVisibilityBatchCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ChangeMessageVisibilityBatch"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0CreateQueueCommand + */ +export const se_CreateQueueCommand = async ( + input: CreateQueueCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("CreateQueue"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0DeleteMessageCommand + */ +export const se_DeleteMessageCommand = async ( + input: DeleteMessageCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("DeleteMessage"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0DeleteMessageBatchCommand + */ +export const se_DeleteMessageBatchCommand = async ( + input: DeleteMessageBatchCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("DeleteMessageBatch"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0DeleteQueueCommand + */ +export const se_DeleteQueueCommand = async ( + input: DeleteQueueCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("DeleteQueue"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0GetQueueAttributesCommand + */ +export const se_GetQueueAttributesCommand = async ( + input: GetQueueAttributesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("GetQueueAttributes"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0GetQueueUrlCommand + */ +export const se_GetQueueUrlCommand = async ( + input: GetQueueUrlCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("GetQueueUrl"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0ListDeadLetterSourceQueuesCommand + */ +export const se_ListDeadLetterSourceQueuesCommand = async ( + input: ListDeadLetterSourceQueuesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ListDeadLetterSourceQueues"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0ListMessageMoveTasksCommand + */ +export const se_ListMessageMoveTasksCommand = async ( + input: ListMessageMoveTasksCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ListMessageMoveTasks"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0ListQueuesCommand + */ +export const se_ListQueuesCommand = async ( + input: ListQueuesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ListQueues"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0ListQueueTagsCommand + */ +export const se_ListQueueTagsCommand = async ( + input: ListQueueTagsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ListQueueTags"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0PurgeQueueCommand + */ +export const se_PurgeQueueCommand = async ( + input: PurgeQueueCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("PurgeQueue"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0ReceiveMessageCommand + */ +export const se_ReceiveMessageCommand = async ( + input: ReceiveMessageCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("ReceiveMessage"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0RemovePermissionCommand + */ +export const se_RemovePermissionCommand = async ( + input: RemovePermissionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("RemovePermission"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0SendMessageCommand + */ +export const se_SendMessageCommand = async ( + input: SendMessageCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("SendMessage"); + let body: any; + body = JSON.stringify(se_SendMessageRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0SendMessageBatchCommand + */ +export const se_SendMessageBatchCommand = async ( + input: SendMessageBatchCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("SendMessageBatch"); + let body: any; + body = JSON.stringify(se_SendMessageBatchRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0SetQueueAttributesCommand + */ +export const se_SetQueueAttributesCommand = async ( + input: SetQueueAttributesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("SetQueueAttributes"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0StartMessageMoveTaskCommand + */ +export const se_StartMessageMoveTaskCommand = async ( + input: StartMessageMoveTaskCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("StartMessageMoveTask"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0TagQueueCommand + */ +export const se_TagQueueCommand = async ( + input: TagQueueCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("TagQueue"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_json1_0UntagQueueCommand + */ +export const se_UntagQueueCommand = async ( + input: UntagQueueCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("UntagQueue"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * deserializeAws_json1_0AddPermissionCommand + */ +export const de_AddPermissionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_AddPermissionCommandError(output, context); + } + await collectBody(output.body, context); + const response: AddPermissionCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeAws_json1_0AddPermissionCommandError + */ +const de_AddPermissionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + populateBodyWithQueryCompatibility(parsedOutput, output.headers); + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidAddress": + case "com.amazonaws.sqs#InvalidAddress": + throw await de_InvalidAddressRes(parsedOutput, context); + case "InvalidSecurity": + case "com.amazonaws.sqs#InvalidSecurity": + throw await de_InvalidSecurityRes(parsedOutput, context); + case "OverLimit": + case "com.amazonaws.sqs#OverLimit": + throw await de_OverLimitRes(parsedOutput, context); + case "QueueDoesNotExist": + case "com.amazonaws.sqs#QueueDoesNotExist": + throw await de_QueueDoesNotExistRes(parsedOutput, context); + case "RequestThrottled": + case "com.amazonaws.sqs#RequestThrottled": + throw await de_RequestThrottledRes(parsedOutput, context); + case "UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + throw await de_UnsupportedOperationRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_0CancelMessageMoveTaskCommand + */ +export const de_CancelMessageMoveTaskCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CancelMessageMoveTaskCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: CancelMessageMoveTaskCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0CancelMessageMoveTaskCommandError + */ +const de_CancelMessageMoveTaskCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + populateBodyWithQueryCompatibility(parsedOutput, output.headers); + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidAddress": + case "com.amazonaws.sqs#InvalidAddress": + throw await de_InvalidAddressRes(parsedOutput, context); + case "InvalidSecurity": + case "com.amazonaws.sqs#InvalidSecurity": + throw await de_InvalidSecurityRes(parsedOutput, context); + case "RequestThrottled": + case "com.amazonaws.sqs#RequestThrottled": + throw await de_RequestThrottledRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.sqs#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + throw await de_UnsupportedOperationRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_0ChangeMessageVisibilityCommand + */ +export const de_ChangeMessageVisibilityCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_ChangeMessageVisibilityCommandError(output, context); + } + await collectBody(output.body, context); + const response: ChangeMessageVisibilityCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeAws_json1_0ChangeMessageVisibilityCommandError + */ +const de_ChangeMessageVisibilityCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + populateBodyWithQueryCompatibility(parsedOutput, output.headers); + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidAddress": + case "com.amazonaws.sqs#InvalidAddress": + throw await de_InvalidAddressRes(parsedOutput, context); + case "InvalidSecurity": + case "com.amazonaws.sqs#InvalidSecurity": + throw await de_InvalidSecurityRes(parsedOutput, context); + case "MessageNotInflight": + case "com.amazonaws.sqs#MessageNotInflight": + throw await de_MessageNotInflightRes(parsedOutput, context); + case "QueueDoesNotExist": + case "com.amazonaws.sqs#QueueDoesNotExist": + throw await de_QueueDoesNotExistRes(parsedOutput, context); + case "ReceiptHandleIsInvalid": + case "com.amazonaws.sqs#ReceiptHandleIsInvalid": + throw await de_ReceiptHandleIsInvalidRes(parsedOutput, context); + case "RequestThrottled": + case "com.amazonaws.sqs#RequestThrottled": + throw await de_RequestThrottledRes(parsedOutput, context); + case "UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + throw await de_UnsupportedOperationRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_0ChangeMessageVisibilityBatchCommand + */ +export const de_ChangeMessageVisibilityBatchCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_ChangeMessageVisibilityBatchCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: ChangeMessageVisibilityBatchCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0ChangeMessageVisibilityBatchCommandError + */ +const de_ChangeMessageVisibilityBatchCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + populateBodyWithQueryCompatibility(parsedOutput, output.headers); + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BatchEntryIdsNotDistinct": + case "com.amazonaws.sqs#BatchEntryIdsNotDistinct": + throw await de_BatchEntryIdsNotDistinctRes(parsedOutput, context); + case "EmptyBatchRequest": + case "com.amazonaws.sqs#EmptyBatchRequest": + throw await de_EmptyBatchRequestRes(parsedOutput, context); + case "InvalidAddress": + case "com.amazonaws.sqs#InvalidAddress": + throw await de_InvalidAddressRes(parsedOutput, context); + case "InvalidBatchEntryId": + case "com.amazonaws.sqs#InvalidBatchEntryId": + throw await de_InvalidBatchEntryIdRes(parsedOutput, context); + case "InvalidSecurity": + case "com.amazonaws.sqs#InvalidSecurity": + throw await de_InvalidSecurityRes(parsedOutput, context); + case "QueueDoesNotExist": + case "com.amazonaws.sqs#QueueDoesNotExist": + throw await de_QueueDoesNotExistRes(parsedOutput, context); + case "RequestThrottled": + case "com.amazonaws.sqs#RequestThrottled": + throw await de_RequestThrottledRes(parsedOutput, context); + case "TooManyEntriesInBatchRequest": + case "com.amazonaws.sqs#TooManyEntriesInBatchRequest": + throw await de_TooManyEntriesInBatchRequestRes(parsedOutput, context); + case "UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + throw await de_UnsupportedOperationRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_0CreateQueueCommand + */ +export const de_CreateQueueCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CreateQueueCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: CreateQueueCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0CreateQueueCommandError + */ +const de_CreateQueueCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + populateBodyWithQueryCompatibility(parsedOutput, output.headers); + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidAddress": + case "com.amazonaws.sqs#InvalidAddress": + throw await de_InvalidAddressRes(parsedOutput, context); + case "InvalidAttributeName": + case "com.amazonaws.sqs#InvalidAttributeName": + throw await de_InvalidAttributeNameRes(parsedOutput, context); + case "InvalidAttributeValue": + case "com.amazonaws.sqs#InvalidAttributeValue": + throw await de_InvalidAttributeValueRes(parsedOutput, context); + case "InvalidSecurity": + case "com.amazonaws.sqs#InvalidSecurity": + throw await de_InvalidSecurityRes(parsedOutput, context); + case "QueueDeletedRecently": + case "com.amazonaws.sqs#QueueDeletedRecently": + throw await de_QueueDeletedRecentlyRes(parsedOutput, context); + case "QueueNameExists": + case "com.amazonaws.sqs#QueueNameExists": + throw await de_QueueNameExistsRes(parsedOutput, context); + case "RequestThrottled": + case "com.amazonaws.sqs#RequestThrottled": + throw await de_RequestThrottledRes(parsedOutput, context); + case "UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + throw await de_UnsupportedOperationRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_0DeleteMessageCommand + */ +export const de_DeleteMessageCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_DeleteMessageCommandError(output, context); + } + await collectBody(output.body, context); + const response: DeleteMessageCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeAws_json1_0DeleteMessageCommandError + */ +const de_DeleteMessageCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + populateBodyWithQueryCompatibility(parsedOutput, output.headers); + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidAddress": + case "com.amazonaws.sqs#InvalidAddress": + throw await de_InvalidAddressRes(parsedOutput, context); + case "InvalidIdFormat": + case "com.amazonaws.sqs#InvalidIdFormat": + throw await de_InvalidIdFormatRes(parsedOutput, context); + case "InvalidSecurity": + case "com.amazonaws.sqs#InvalidSecurity": + throw await de_InvalidSecurityRes(parsedOutput, context); + case "QueueDoesNotExist": + case "com.amazonaws.sqs#QueueDoesNotExist": + throw await de_QueueDoesNotExistRes(parsedOutput, context); + case "ReceiptHandleIsInvalid": + case "com.amazonaws.sqs#ReceiptHandleIsInvalid": + throw await de_ReceiptHandleIsInvalidRes(parsedOutput, context); + case "RequestThrottled": + case "com.amazonaws.sqs#RequestThrottled": + throw await de_RequestThrottledRes(parsedOutput, context); + case "UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + throw await de_UnsupportedOperationRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_0DeleteMessageBatchCommand + */ +export const de_DeleteMessageBatchCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_DeleteMessageBatchCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: DeleteMessageBatchCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0DeleteMessageBatchCommandError + */ +const de_DeleteMessageBatchCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + populateBodyWithQueryCompatibility(parsedOutput, output.headers); + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BatchEntryIdsNotDistinct": + case "com.amazonaws.sqs#BatchEntryIdsNotDistinct": + throw await de_BatchEntryIdsNotDistinctRes(parsedOutput, context); + case "EmptyBatchRequest": + case "com.amazonaws.sqs#EmptyBatchRequest": + throw await de_EmptyBatchRequestRes(parsedOutput, context); + case "InvalidAddress": + case "com.amazonaws.sqs#InvalidAddress": + throw await de_InvalidAddressRes(parsedOutput, context); + case "InvalidBatchEntryId": + case "com.amazonaws.sqs#InvalidBatchEntryId": + throw await de_InvalidBatchEntryIdRes(parsedOutput, context); + case "InvalidSecurity": + case "com.amazonaws.sqs#InvalidSecurity": + throw await de_InvalidSecurityRes(parsedOutput, context); + case "QueueDoesNotExist": + case "com.amazonaws.sqs#QueueDoesNotExist": + throw await de_QueueDoesNotExistRes(parsedOutput, context); + case "RequestThrottled": + case "com.amazonaws.sqs#RequestThrottled": + throw await de_RequestThrottledRes(parsedOutput, context); + case "TooManyEntriesInBatchRequest": + case "com.amazonaws.sqs#TooManyEntriesInBatchRequest": + throw await de_TooManyEntriesInBatchRequestRes(parsedOutput, context); + case "UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + throw await de_UnsupportedOperationRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_0DeleteQueueCommand + */ +export const de_DeleteQueueCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_DeleteQueueCommandError(output, context); + } + await collectBody(output.body, context); + const response: DeleteQueueCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeAws_json1_0DeleteQueueCommandError + */ +const de_DeleteQueueCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + populateBodyWithQueryCompatibility(parsedOutput, output.headers); + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidAddress": + case "com.amazonaws.sqs#InvalidAddress": + throw await de_InvalidAddressRes(parsedOutput, context); + case "InvalidSecurity": + case "com.amazonaws.sqs#InvalidSecurity": + throw await de_InvalidSecurityRes(parsedOutput, context); + case "QueueDoesNotExist": + case "com.amazonaws.sqs#QueueDoesNotExist": + throw await de_QueueDoesNotExistRes(parsedOutput, context); + case "RequestThrottled": + case "com.amazonaws.sqs#RequestThrottled": + throw await de_RequestThrottledRes(parsedOutput, context); + case "UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + throw await de_UnsupportedOperationRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_0GetQueueAttributesCommand + */ +export const de_GetQueueAttributesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_GetQueueAttributesCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: GetQueueAttributesCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0GetQueueAttributesCommandError + */ +const de_GetQueueAttributesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + populateBodyWithQueryCompatibility(parsedOutput, output.headers); + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidAddress": + case "com.amazonaws.sqs#InvalidAddress": + throw await de_InvalidAddressRes(parsedOutput, context); + case "InvalidAttributeName": + case "com.amazonaws.sqs#InvalidAttributeName": + throw await de_InvalidAttributeNameRes(parsedOutput, context); + case "InvalidSecurity": + case "com.amazonaws.sqs#InvalidSecurity": + throw await de_InvalidSecurityRes(parsedOutput, context); + case "QueueDoesNotExist": + case "com.amazonaws.sqs#QueueDoesNotExist": + throw await de_QueueDoesNotExistRes(parsedOutput, context); + case "RequestThrottled": + case "com.amazonaws.sqs#RequestThrottled": + throw await de_RequestThrottledRes(parsedOutput, context); + case "UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + throw await de_UnsupportedOperationRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_0GetQueueUrlCommand + */ +export const de_GetQueueUrlCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_GetQueueUrlCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: GetQueueUrlCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0GetQueueUrlCommandError + */ +const de_GetQueueUrlCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + populateBodyWithQueryCompatibility(parsedOutput, output.headers); + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidAddress": + case "com.amazonaws.sqs#InvalidAddress": + throw await de_InvalidAddressRes(parsedOutput, context); + case "InvalidSecurity": + case "com.amazonaws.sqs#InvalidSecurity": + throw await de_InvalidSecurityRes(parsedOutput, context); + case "QueueDoesNotExist": + case "com.amazonaws.sqs#QueueDoesNotExist": + throw await de_QueueDoesNotExistRes(parsedOutput, context); + case "RequestThrottled": + case "com.amazonaws.sqs#RequestThrottled": + throw await de_RequestThrottledRes(parsedOutput, context); + case "UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + throw await de_UnsupportedOperationRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_0ListDeadLetterSourceQueuesCommand + */ +export const de_ListDeadLetterSourceQueuesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_ListDeadLetterSourceQueuesCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: ListDeadLetterSourceQueuesCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0ListDeadLetterSourceQueuesCommandError + */ +const de_ListDeadLetterSourceQueuesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + populateBodyWithQueryCompatibility(parsedOutput, output.headers); + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidAddress": + case "com.amazonaws.sqs#InvalidAddress": + throw await de_InvalidAddressRes(parsedOutput, context); + case "InvalidSecurity": + case "com.amazonaws.sqs#InvalidSecurity": + throw await de_InvalidSecurityRes(parsedOutput, context); + case "QueueDoesNotExist": + case "com.amazonaws.sqs#QueueDoesNotExist": + throw await de_QueueDoesNotExistRes(parsedOutput, context); + case "RequestThrottled": + case "com.amazonaws.sqs#RequestThrottled": + throw await de_RequestThrottledRes(parsedOutput, context); + case "UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + throw await de_UnsupportedOperationRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_0ListMessageMoveTasksCommand + */ +export const de_ListMessageMoveTasksCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_ListMessageMoveTasksCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: ListMessageMoveTasksCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0ListMessageMoveTasksCommandError + */ +const de_ListMessageMoveTasksCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + populateBodyWithQueryCompatibility(parsedOutput, output.headers); + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidAddress": + case "com.amazonaws.sqs#InvalidAddress": + throw await de_InvalidAddressRes(parsedOutput, context); + case "InvalidSecurity": + case "com.amazonaws.sqs#InvalidSecurity": + throw await de_InvalidSecurityRes(parsedOutput, context); + case "RequestThrottled": + case "com.amazonaws.sqs#RequestThrottled": + throw await de_RequestThrottledRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.sqs#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + throw await de_UnsupportedOperationRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_0ListQueuesCommand + */ +export const de_ListQueuesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_ListQueuesCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: ListQueuesCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0ListQueuesCommandError + */ +const de_ListQueuesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + populateBodyWithQueryCompatibility(parsedOutput, output.headers); + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidAddress": + case "com.amazonaws.sqs#InvalidAddress": + throw await de_InvalidAddressRes(parsedOutput, context); + case "InvalidSecurity": + case "com.amazonaws.sqs#InvalidSecurity": + throw await de_InvalidSecurityRes(parsedOutput, context); + case "RequestThrottled": + case "com.amazonaws.sqs#RequestThrottled": + throw await de_RequestThrottledRes(parsedOutput, context); + case "UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + throw await de_UnsupportedOperationRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_0ListQueueTagsCommand + */ +export const de_ListQueueTagsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_ListQueueTagsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: ListQueueTagsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0ListQueueTagsCommandError + */ +const de_ListQueueTagsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + populateBodyWithQueryCompatibility(parsedOutput, output.headers); + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidAddress": + case "com.amazonaws.sqs#InvalidAddress": + throw await de_InvalidAddressRes(parsedOutput, context); + case "InvalidSecurity": + case "com.amazonaws.sqs#InvalidSecurity": + throw await de_InvalidSecurityRes(parsedOutput, context); + case "QueueDoesNotExist": + case "com.amazonaws.sqs#QueueDoesNotExist": + throw await de_QueueDoesNotExistRes(parsedOutput, context); + case "RequestThrottled": + case "com.amazonaws.sqs#RequestThrottled": + throw await de_RequestThrottledRes(parsedOutput, context); + case "UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + throw await de_UnsupportedOperationRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_0PurgeQueueCommand + */ +export const de_PurgeQueueCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_PurgeQueueCommandError(output, context); + } + await collectBody(output.body, context); + const response: PurgeQueueCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeAws_json1_0PurgeQueueCommandError + */ +const de_PurgeQueueCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + populateBodyWithQueryCompatibility(parsedOutput, output.headers); + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidAddress": + case "com.amazonaws.sqs#InvalidAddress": + throw await de_InvalidAddressRes(parsedOutput, context); + case "InvalidSecurity": + case "com.amazonaws.sqs#InvalidSecurity": + throw await de_InvalidSecurityRes(parsedOutput, context); + case "PurgeQueueInProgress": + case "com.amazonaws.sqs#PurgeQueueInProgress": + throw await de_PurgeQueueInProgressRes(parsedOutput, context); + case "QueueDoesNotExist": + case "com.amazonaws.sqs#QueueDoesNotExist": + throw await de_QueueDoesNotExistRes(parsedOutput, context); + case "RequestThrottled": + case "com.amazonaws.sqs#RequestThrottled": + throw await de_RequestThrottledRes(parsedOutput, context); + case "UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + throw await de_UnsupportedOperationRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_0ReceiveMessageCommand + */ +export const de_ReceiveMessageCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_ReceiveMessageCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_ReceiveMessageResult(data, context); + const response: ReceiveMessageCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0ReceiveMessageCommandError + */ +const de_ReceiveMessageCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + populateBodyWithQueryCompatibility(parsedOutput, output.headers); + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidAddress": + case "com.amazonaws.sqs#InvalidAddress": + throw await de_InvalidAddressRes(parsedOutput, context); + case "InvalidSecurity": + case "com.amazonaws.sqs#InvalidSecurity": + throw await de_InvalidSecurityRes(parsedOutput, context); + case "KmsAccessDenied": + case "com.amazonaws.sqs#KmsAccessDenied": + throw await de_KmsAccessDeniedRes(parsedOutput, context); + case "KmsDisabled": + case "com.amazonaws.sqs#KmsDisabled": + throw await de_KmsDisabledRes(parsedOutput, context); + case "KmsInvalidKeyUsage": + case "com.amazonaws.sqs#KmsInvalidKeyUsage": + throw await de_KmsInvalidKeyUsageRes(parsedOutput, context); + case "KmsInvalidState": + case "com.amazonaws.sqs#KmsInvalidState": + throw await de_KmsInvalidStateRes(parsedOutput, context); + case "KmsNotFound": + case "com.amazonaws.sqs#KmsNotFound": + throw await de_KmsNotFoundRes(parsedOutput, context); + case "KmsOptInRequired": + case "com.amazonaws.sqs#KmsOptInRequired": + throw await de_KmsOptInRequiredRes(parsedOutput, context); + case "KmsThrottled": + case "com.amazonaws.sqs#KmsThrottled": + throw await de_KmsThrottledRes(parsedOutput, context); + case "OverLimit": + case "com.amazonaws.sqs#OverLimit": + throw await de_OverLimitRes(parsedOutput, context); + case "QueueDoesNotExist": + case "com.amazonaws.sqs#QueueDoesNotExist": + throw await de_QueueDoesNotExistRes(parsedOutput, context); + case "RequestThrottled": + case "com.amazonaws.sqs#RequestThrottled": + throw await de_RequestThrottledRes(parsedOutput, context); + case "UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + throw await de_UnsupportedOperationRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_0RemovePermissionCommand + */ +export const de_RemovePermissionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_RemovePermissionCommandError(output, context); + } + await collectBody(output.body, context); + const response: RemovePermissionCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeAws_json1_0RemovePermissionCommandError + */ +const de_RemovePermissionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + populateBodyWithQueryCompatibility(parsedOutput, output.headers); + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidAddress": + case "com.amazonaws.sqs#InvalidAddress": + throw await de_InvalidAddressRes(parsedOutput, context); + case "InvalidSecurity": + case "com.amazonaws.sqs#InvalidSecurity": + throw await de_InvalidSecurityRes(parsedOutput, context); + case "QueueDoesNotExist": + case "com.amazonaws.sqs#QueueDoesNotExist": + throw await de_QueueDoesNotExistRes(parsedOutput, context); + case "RequestThrottled": + case "com.amazonaws.sqs#RequestThrottled": + throw await de_RequestThrottledRes(parsedOutput, context); + case "UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + throw await de_UnsupportedOperationRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_0SendMessageCommand + */ +export const de_SendMessageCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_SendMessageCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: SendMessageCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0SendMessageCommandError + */ +const de_SendMessageCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + populateBodyWithQueryCompatibility(parsedOutput, output.headers); + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidAddress": + case "com.amazonaws.sqs#InvalidAddress": + throw await de_InvalidAddressRes(parsedOutput, context); + case "InvalidMessageContents": + case "com.amazonaws.sqs#InvalidMessageContents": + throw await de_InvalidMessageContentsRes(parsedOutput, context); + case "InvalidSecurity": + case "com.amazonaws.sqs#InvalidSecurity": + throw await de_InvalidSecurityRes(parsedOutput, context); + case "KmsAccessDenied": + case "com.amazonaws.sqs#KmsAccessDenied": + throw await de_KmsAccessDeniedRes(parsedOutput, context); + case "KmsDisabled": + case "com.amazonaws.sqs#KmsDisabled": + throw await de_KmsDisabledRes(parsedOutput, context); + case "KmsInvalidKeyUsage": + case "com.amazonaws.sqs#KmsInvalidKeyUsage": + throw await de_KmsInvalidKeyUsageRes(parsedOutput, context); + case "KmsInvalidState": + case "com.amazonaws.sqs#KmsInvalidState": + throw await de_KmsInvalidStateRes(parsedOutput, context); + case "KmsNotFound": + case "com.amazonaws.sqs#KmsNotFound": + throw await de_KmsNotFoundRes(parsedOutput, context); + case "KmsOptInRequired": + case "com.amazonaws.sqs#KmsOptInRequired": + throw await de_KmsOptInRequiredRes(parsedOutput, context); + case "KmsThrottled": + case "com.amazonaws.sqs#KmsThrottled": + throw await de_KmsThrottledRes(parsedOutput, context); + case "QueueDoesNotExist": + case "com.amazonaws.sqs#QueueDoesNotExist": + throw await de_QueueDoesNotExistRes(parsedOutput, context); + case "RequestThrottled": + case "com.amazonaws.sqs#RequestThrottled": + throw await de_RequestThrottledRes(parsedOutput, context); + case "UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + throw await de_UnsupportedOperationRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_0SendMessageBatchCommand + */ +export const de_SendMessageBatchCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_SendMessageBatchCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: SendMessageBatchCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0SendMessageBatchCommandError + */ +const de_SendMessageBatchCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + populateBodyWithQueryCompatibility(parsedOutput, output.headers); + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "BatchEntryIdsNotDistinct": + case "com.amazonaws.sqs#BatchEntryIdsNotDistinct": + throw await de_BatchEntryIdsNotDistinctRes(parsedOutput, context); + case "BatchRequestTooLong": + case "com.amazonaws.sqs#BatchRequestTooLong": + throw await de_BatchRequestTooLongRes(parsedOutput, context); + case "EmptyBatchRequest": + case "com.amazonaws.sqs#EmptyBatchRequest": + throw await de_EmptyBatchRequestRes(parsedOutput, context); + case "InvalidAddress": + case "com.amazonaws.sqs#InvalidAddress": + throw await de_InvalidAddressRes(parsedOutput, context); + case "InvalidBatchEntryId": + case "com.amazonaws.sqs#InvalidBatchEntryId": + throw await de_InvalidBatchEntryIdRes(parsedOutput, context); + case "InvalidSecurity": + case "com.amazonaws.sqs#InvalidSecurity": + throw await de_InvalidSecurityRes(parsedOutput, context); + case "KmsAccessDenied": + case "com.amazonaws.sqs#KmsAccessDenied": + throw await de_KmsAccessDeniedRes(parsedOutput, context); + case "KmsDisabled": + case "com.amazonaws.sqs#KmsDisabled": + throw await de_KmsDisabledRes(parsedOutput, context); + case "KmsInvalidKeyUsage": + case "com.amazonaws.sqs#KmsInvalidKeyUsage": + throw await de_KmsInvalidKeyUsageRes(parsedOutput, context); + case "KmsInvalidState": + case "com.amazonaws.sqs#KmsInvalidState": + throw await de_KmsInvalidStateRes(parsedOutput, context); + case "KmsNotFound": + case "com.amazonaws.sqs#KmsNotFound": + throw await de_KmsNotFoundRes(parsedOutput, context); + case "KmsOptInRequired": + case "com.amazonaws.sqs#KmsOptInRequired": + throw await de_KmsOptInRequiredRes(parsedOutput, context); + case "KmsThrottled": + case "com.amazonaws.sqs#KmsThrottled": + throw await de_KmsThrottledRes(parsedOutput, context); + case "QueueDoesNotExist": + case "com.amazonaws.sqs#QueueDoesNotExist": + throw await de_QueueDoesNotExistRes(parsedOutput, context); + case "RequestThrottled": + case "com.amazonaws.sqs#RequestThrottled": + throw await de_RequestThrottledRes(parsedOutput, context); + case "TooManyEntriesInBatchRequest": + case "com.amazonaws.sqs#TooManyEntriesInBatchRequest": + throw await de_TooManyEntriesInBatchRequestRes(parsedOutput, context); + case "UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + throw await de_UnsupportedOperationRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_0SetQueueAttributesCommand + */ +export const de_SetQueueAttributesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_SetQueueAttributesCommandError(output, context); + } + await collectBody(output.body, context); + const response: SetQueueAttributesCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeAws_json1_0SetQueueAttributesCommandError + */ +const de_SetQueueAttributesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + populateBodyWithQueryCompatibility(parsedOutput, output.headers); + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidAddress": + case "com.amazonaws.sqs#InvalidAddress": + throw await de_InvalidAddressRes(parsedOutput, context); + case "InvalidAttributeName": + case "com.amazonaws.sqs#InvalidAttributeName": + throw await de_InvalidAttributeNameRes(parsedOutput, context); + case "InvalidAttributeValue": + case "com.amazonaws.sqs#InvalidAttributeValue": + throw await de_InvalidAttributeValueRes(parsedOutput, context); + case "InvalidSecurity": + case "com.amazonaws.sqs#InvalidSecurity": + throw await de_InvalidSecurityRes(parsedOutput, context); + case "OverLimit": + case "com.amazonaws.sqs#OverLimit": + throw await de_OverLimitRes(parsedOutput, context); + case "QueueDoesNotExist": + case "com.amazonaws.sqs#QueueDoesNotExist": + throw await de_QueueDoesNotExistRes(parsedOutput, context); + case "RequestThrottled": + case "com.amazonaws.sqs#RequestThrottled": + throw await de_RequestThrottledRes(parsedOutput, context); + case "UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + throw await de_UnsupportedOperationRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_0StartMessageMoveTaskCommand + */ +export const de_StartMessageMoveTaskCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_StartMessageMoveTaskCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = _json(data); + const response: StartMessageMoveTaskCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_json1_0StartMessageMoveTaskCommandError + */ +const de_StartMessageMoveTaskCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + populateBodyWithQueryCompatibility(parsedOutput, output.headers); + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidAddress": + case "com.amazonaws.sqs#InvalidAddress": + throw await de_InvalidAddressRes(parsedOutput, context); + case "InvalidSecurity": + case "com.amazonaws.sqs#InvalidSecurity": + throw await de_InvalidSecurityRes(parsedOutput, context); + case "RequestThrottled": + case "com.amazonaws.sqs#RequestThrottled": + throw await de_RequestThrottledRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.sqs#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + throw await de_UnsupportedOperationRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_0TagQueueCommand + */ +export const de_TagQueueCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_TagQueueCommandError(output, context); + } + await collectBody(output.body, context); + const response: TagQueueCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeAws_json1_0TagQueueCommandError + */ +const de_TagQueueCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + populateBodyWithQueryCompatibility(parsedOutput, output.headers); + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidAddress": + case "com.amazonaws.sqs#InvalidAddress": + throw await de_InvalidAddressRes(parsedOutput, context); + case "InvalidSecurity": + case "com.amazonaws.sqs#InvalidSecurity": + throw await de_InvalidSecurityRes(parsedOutput, context); + case "QueueDoesNotExist": + case "com.amazonaws.sqs#QueueDoesNotExist": + throw await de_QueueDoesNotExistRes(parsedOutput, context); + case "RequestThrottled": + case "com.amazonaws.sqs#RequestThrottled": + throw await de_RequestThrottledRes(parsedOutput, context); + case "UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + throw await de_UnsupportedOperationRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_0UntagQueueCommand + */ +export const de_UntagQueueCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_UntagQueueCommandError(output, context); + } + await collectBody(output.body, context); + const response: UntagQueueCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeAws_json1_0UntagQueueCommandError + */ +const de_UntagQueueCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + populateBodyWithQueryCompatibility(parsedOutput, output.headers); + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidAddress": + case "com.amazonaws.sqs#InvalidAddress": + throw await de_InvalidAddressRes(parsedOutput, context); + case "InvalidSecurity": + case "com.amazonaws.sqs#InvalidSecurity": + throw await de_InvalidSecurityRes(parsedOutput, context); + case "QueueDoesNotExist": + case "com.amazonaws.sqs#QueueDoesNotExist": + throw await de_QueueDoesNotExistRes(parsedOutput, context); + case "RequestThrottled": + case "com.amazonaws.sqs#RequestThrottled": + throw await de_RequestThrottledRes(parsedOutput, context); + case "UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + throw await de_UnsupportedOperationRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + +/** + * deserializeAws_json1_0BatchEntryIdsNotDistinctRes + */ +const de_BatchEntryIdsNotDistinctRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new BatchEntryIdsNotDistinct({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0BatchRequestTooLongRes + */ +const de_BatchRequestTooLongRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new BatchRequestTooLong({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0EmptyBatchRequestRes + */ +const de_EmptyBatchRequestRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new EmptyBatchRequest({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0InvalidAddressRes + */ +const de_InvalidAddressRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new InvalidAddress({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0InvalidAttributeNameRes + */ +const de_InvalidAttributeNameRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new InvalidAttributeName({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0InvalidAttributeValueRes + */ +const de_InvalidAttributeValueRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new InvalidAttributeValue({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0InvalidBatchEntryIdRes + */ +const de_InvalidBatchEntryIdRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new InvalidBatchEntryId({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0InvalidIdFormatRes + */ +const de_InvalidIdFormatRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new InvalidIdFormat({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0InvalidMessageContentsRes + */ +const de_InvalidMessageContentsRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new InvalidMessageContents({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0InvalidSecurityRes + */ +const de_InvalidSecurityRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new InvalidSecurity({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0KmsAccessDeniedRes + */ +const de_KmsAccessDeniedRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new KmsAccessDenied({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0KmsDisabledRes + */ +const de_KmsDisabledRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new KmsDisabled({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0KmsInvalidKeyUsageRes + */ +const de_KmsInvalidKeyUsageRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new KmsInvalidKeyUsage({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0KmsInvalidStateRes + */ +const de_KmsInvalidStateRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new KmsInvalidState({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0KmsNotFoundRes + */ +const de_KmsNotFoundRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new KmsNotFound({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0KmsOptInRequiredRes + */ +const de_KmsOptInRequiredRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new KmsOptInRequired({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0KmsThrottledRes + */ +const de_KmsThrottledRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new KmsThrottled({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0MessageNotInflightRes + */ +const de_MessageNotInflightRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new MessageNotInflight({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0OverLimitRes + */ +const de_OverLimitRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new OverLimit({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0PurgeQueueInProgressRes + */ +const de_PurgeQueueInProgressRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new PurgeQueueInProgress({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0QueueDeletedRecentlyRes + */ +const de_QueueDeletedRecentlyRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new QueueDeletedRecently({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0QueueDoesNotExistRes + */ +const de_QueueDoesNotExistRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new QueueDoesNotExist({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0QueueNameExistsRes + */ +const de_QueueNameExistsRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new QueueNameExists({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0ReceiptHandleIsInvalidRes + */ +const de_ReceiptHandleIsInvalidRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new ReceiptHandleIsInvalid({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0RequestThrottledRes + */ +const de_RequestThrottledRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new RequestThrottled({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0ResourceNotFoundExceptionRes + */ +const de_ResourceNotFoundExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new ResourceNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0TooManyEntriesInBatchRequestRes + */ +const de_TooManyEntriesInBatchRequestRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new TooManyEntriesInBatchRequest({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_json1_0UnsupportedOperationRes + */ +const de_UnsupportedOperationRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = _json(body); + const exception = new UnsupportedOperation({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +// se_ActionNameList omitted. + +// se_AddPermissionRequest omitted. + +// se_AttributeNameList omitted. + +// se_AWSAccountIdList omitted. + +/** + * serializeAws_json1_0BinaryList + */ +const se_BinaryList = (input: Uint8Array[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return context.base64Encoder(entry); + }); +}; + +// se_CancelMessageMoveTaskRequest omitted. + +// se_ChangeMessageVisibilityBatchRequest omitted. + +// se_ChangeMessageVisibilityBatchRequestEntry omitted. + +// se_ChangeMessageVisibilityBatchRequestEntryList omitted. + +// se_ChangeMessageVisibilityRequest omitted. + +// se_CreateQueueRequest omitted. + +// se_DeleteMessageBatchRequest omitted. + +// se_DeleteMessageBatchRequestEntry omitted. + +// se_DeleteMessageBatchRequestEntryList omitted. + +// se_DeleteMessageRequest omitted. + +// se_DeleteQueueRequest omitted. + +// se_GetQueueAttributesRequest omitted. + +// se_GetQueueUrlRequest omitted. + +// se_ListDeadLetterSourceQueuesRequest omitted. + +// se_ListMessageMoveTasksRequest omitted. + +// se_ListQueuesRequest omitted. + +// se_ListQueueTagsRequest omitted. + +// se_MessageAttributeNameList omitted. + +/** + * serializeAws_json1_0MessageAttributeValue + */ +const se_MessageAttributeValue = (input: MessageAttributeValue, context: __SerdeContext): any => { + return take(input, { + BinaryListValues: (_) => se_BinaryList(_, context), + BinaryValue: context.base64Encoder, + DataType: [], + StringListValues: _json, + StringValue: [], + }); +}; + +/** + * serializeAws_json1_0MessageBodyAttributeMap + */ +const se_MessageBodyAttributeMap = (input: Record, context: __SerdeContext): any => { + return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + acc[key] = se_MessageAttributeValue(value, context); + return acc; + }, {}); +}; + +/** + * serializeAws_json1_0MessageBodySystemAttributeMap + */ +const se_MessageBodySystemAttributeMap = ( + input: Partial>, + context: __SerdeContext +): any => { + return Object.entries(input).reduce( + (acc: Record, [key, value]: [MessageSystemAttributeNameForSends | string, any]) => { + if (value === null) { + return acc; + } + acc[key] = se_MessageSystemAttributeValue(value, context); + return acc; + }, + {} + ); +}; + +/** + * serializeAws_json1_0MessageSystemAttributeValue + */ +const se_MessageSystemAttributeValue = (input: MessageSystemAttributeValue, context: __SerdeContext): any => { + return take(input, { + BinaryListValues: (_) => se_BinaryList(_, context), + BinaryValue: context.base64Encoder, + DataType: [], + StringListValues: _json, + StringValue: [], + }); +}; + +// se_PurgeQueueRequest omitted. + +// se_QueueAttributeMap omitted. + +// se_ReceiveMessageRequest omitted. + +// se_RemovePermissionRequest omitted. + +/** + * serializeAws_json1_0SendMessageBatchRequest + */ +const se_SendMessageBatchRequest = (input: SendMessageBatchRequest, context: __SerdeContext): any => { + return take(input, { + Entries: (_) => se_SendMessageBatchRequestEntryList(_, context), + QueueUrl: [], + }); +}; + +/** + * serializeAws_json1_0SendMessageBatchRequestEntry + */ +const se_SendMessageBatchRequestEntry = (input: SendMessageBatchRequestEntry, context: __SerdeContext): any => { + return take(input, { + DelaySeconds: [], + Id: [], + MessageAttributes: (_) => se_MessageBodyAttributeMap(_, context), + MessageBody: [], + MessageDeduplicationId: [], + MessageGroupId: [], + MessageSystemAttributes: (_) => se_MessageBodySystemAttributeMap(_, context), + }); +}; + +/** + * serializeAws_json1_0SendMessageBatchRequestEntryList + */ +const se_SendMessageBatchRequestEntryList = (input: SendMessageBatchRequestEntry[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_SendMessageBatchRequestEntry(entry, context); + }); +}; + +/** + * serializeAws_json1_0SendMessageRequest + */ +const se_SendMessageRequest = (input: SendMessageRequest, context: __SerdeContext): any => { + return take(input, { + DelaySeconds: [], + MessageAttributes: (_) => se_MessageBodyAttributeMap(_, context), + MessageBody: [], + MessageDeduplicationId: [], + MessageGroupId: [], + MessageSystemAttributes: (_) => se_MessageBodySystemAttributeMap(_, context), + QueueUrl: [], + }); +}; + +// se_SetQueueAttributesRequest omitted. + +// se_StartMessageMoveTaskRequest omitted. + +// se_StringList omitted. + +// se_TagKeyList omitted. + +// se_TagMap omitted. + +// se_TagQueueRequest omitted. + +// se_UntagQueueRequest omitted. + +// de_BatchEntryIdsNotDistinct omitted. + +// de_BatchRequestTooLong omitted. + +// de_BatchResultErrorEntry omitted. + +// de_BatchResultErrorEntryList omitted. + +/** + * deserializeAws_json1_0BinaryList + */ +const de_BinaryList = (output: any, context: __SerdeContext): Uint8Array[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return context.base64Decoder(entry); + }); + return retVal; +}; + +// de_CancelMessageMoveTaskResult omitted. + +// de_ChangeMessageVisibilityBatchResult omitted. + +// de_ChangeMessageVisibilityBatchResultEntry omitted. + +// de_ChangeMessageVisibilityBatchResultEntryList omitted. + +// de_CreateQueueResult omitted. + +// de_DeleteMessageBatchResult omitted. + +// de_DeleteMessageBatchResultEntry omitted. + +// de_DeleteMessageBatchResultEntryList omitted. + +// de_EmptyBatchRequest omitted. + +// de_GetQueueAttributesResult omitted. + +// de_GetQueueUrlResult omitted. + +// de_InvalidAddress omitted. + +// de_InvalidAttributeName omitted. + +// de_InvalidAttributeValue omitted. + +// de_InvalidBatchEntryId omitted. + +// de_InvalidIdFormat omitted. + +// de_InvalidMessageContents omitted. + +// de_InvalidSecurity omitted. + +// de_KmsAccessDenied omitted. + +// de_KmsDisabled omitted. + +// de_KmsInvalidKeyUsage omitted. + +// de_KmsInvalidState omitted. + +// de_KmsNotFound omitted. + +// de_KmsOptInRequired omitted. + +// de_KmsThrottled omitted. + +// de_ListDeadLetterSourceQueuesResult omitted. + +// de_ListMessageMoveTasksResult omitted. + +// de_ListMessageMoveTasksResultEntry omitted. + +// de_ListMessageMoveTasksResultEntryList omitted. + +// de_ListQueuesResult omitted. + +// de_ListQueueTagsResult omitted. + +/** + * deserializeAws_json1_0Message + */ +const de_Message = (output: any, context: __SerdeContext): Message => { + return take(output, { + Attributes: _json, + Body: __expectString, + MD5OfBody: __expectString, + MD5OfMessageAttributes: __expectString, + MessageAttributes: (_: any) => de_MessageBodyAttributeMap(_, context), + MessageId: __expectString, + ReceiptHandle: __expectString, + }) as any; +}; + +/** + * deserializeAws_json1_0MessageAttributeValue + */ +const de_MessageAttributeValue = (output: any, context: __SerdeContext): MessageAttributeValue => { + return take(output, { + BinaryListValues: (_: any) => de_BinaryList(_, context), + BinaryValue: context.base64Decoder, + DataType: __expectString, + StringListValues: _json, + StringValue: __expectString, + }) as any; +}; + +/** + * deserializeAws_json1_0MessageBodyAttributeMap + */ +const de_MessageBodyAttributeMap = (output: any, context: __SerdeContext): Record => { + return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + acc[key as string] = de_MessageAttributeValue(value, context); + return acc; + }, {} as Record); +}; + +/** + * deserializeAws_json1_0MessageList + */ +const de_MessageList = (output: any, context: __SerdeContext): Message[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_Message(entry, context); + }); + return retVal; +}; + +// de_MessageNotInflight omitted. + +// de_MessageSystemAttributeMap omitted. + +// de_OverLimit omitted. + +// de_PurgeQueueInProgress omitted. + +// de_QueueAttributeMap omitted. + +// de_QueueDeletedRecently omitted. + +// de_QueueDoesNotExist omitted. + +// de_QueueNameExists omitted. + +// de_QueueUrlList omitted. + +// de_ReceiptHandleIsInvalid omitted. + +/** + * deserializeAws_json1_0ReceiveMessageResult + */ +const de_ReceiveMessageResult = (output: any, context: __SerdeContext): ReceiveMessageResult => { + return take(output, { + Messages: (_: any) => de_MessageList(_, context), + }) as any; +}; + +// de_RequestThrottled omitted. + +// de_ResourceNotFoundException omitted. + +// de_SendMessageBatchResult omitted. + +// de_SendMessageBatchResultEntry omitted. + +// de_SendMessageBatchResultEntryList omitted. + +// de_SendMessageResult omitted. + +// de_StartMessageMoveTaskResult omitted. + +// de_StringList omitted. + +// de_TagMap omitted. + +// de_TooManyEntriesInBatchRequest omitted. + +// de_UnsupportedOperation omitted. + +const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ + httpStatusCode: output.statusCode, + requestId: + output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], +}); + +// Encode Uint8Array data into string with utf-8. +const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => + collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); + +const throwDefaultError = withBaseException(__BaseException); +const buildHttpRpcRequest = async ( + context: __SerdeContext, + headers: __HeaderBag, + path: string, + resolvedHostname: string | undefined, + body: any +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const contents: any = { + protocol, + hostname, + port, + method: "POST", + path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, + headers, + }; + if (resolvedHostname !== undefined) { + contents.hostname = resolvedHostname; + } + if (body !== undefined) { + contents.body = body; + } + return new __HttpRequest(contents); +}; +function sharedHeaders(operation: string): __HeaderBag { + return { + "content-type": "application/x-amz-json-1.0", + "x-amz-target": `AmazonSQS.${operation}`, + }; +} + +const parseBody = (streamBody: any, context: __SerdeContext): any => + collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + return JSON.parse(encoded); + } + return {}; + }); + +const parseErrorBody = async (errorBody: any, context: __SerdeContext) => { + const value = await parseBody(errorBody, context); + value.message = value.message ?? value.Message; + return value; +}; + +/** + * Load an error code for the aws.rest-json-1.1 protocol. + */ +const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string | undefined => { + const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()); + + const sanitizeErrorCode = (rawValue: string | number): string => { + let cleanValue = rawValue; + if (typeof cleanValue === "number") { + cleanValue = cleanValue.toString(); + } + if (cleanValue.indexOf(",") >= 0) { + cleanValue = cleanValue.split(",")[0]; + } + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; + } + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; + } + return cleanValue; + }; + + const headerKey = findKey(output.headers, "x-amzn-errortype"); + if (headerKey !== undefined) { + return sanitizeErrorCode(output.headers[headerKey]); + } + + if (data.code !== undefined) { + return sanitizeErrorCode(data.code); + } + + if (data["__type"] !== undefined) { + return sanitizeErrorCode(data["__type"]); + } +}; + +const populateBodyWithQueryCompatibility = (parsedOutput: any, headers: __HeaderBag) => { + const queryErrorHeader = headers["x-amzn-query-error"]; + if (parsedOutput.body !== undefined && queryErrorHeader != null) { + const codeAndType = queryErrorHeader.split(";"); + parsedOutput.body.Code = codeAndType[0]; + parsedOutput.body.Type = codeAndType[1]; + } +}; diff --git a/clients/client-sqs/src/protocols/Aws_query.ts b/clients/client-sqs/src/protocols/Aws_query.ts deleted file mode 100644 index f46f15c45c73a..0000000000000 --- a/clients/client-sqs/src/protocols/Aws_query.ts +++ /dev/null @@ -1,3455 +0,0 @@ -// smithy-typescript generated code -import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; -import { - collectBody, - decorateServiceException as __decorateServiceException, - expectString as __expectString, - extendedEncodeURIComponent as __extendedEncodeURIComponent, - getArrayIfSingleItem as __getArrayIfSingleItem, - getValueFromTextNode as __getValueFromTextNode, - parseBoolean as __parseBoolean, - strictParseInt32 as __strictParseInt32, - strictParseLong as __strictParseLong, - withBaseException, -} from "@smithy/smithy-client"; -import { - Endpoint as __Endpoint, - HeaderBag as __HeaderBag, - ResponseMetadata as __ResponseMetadata, - SerdeContext as __SerdeContext, -} from "@smithy/types"; -import { XMLParser } from "fast-xml-parser"; - -import { AddPermissionCommandInput, AddPermissionCommandOutput } from "../commands/AddPermissionCommand"; -import { - CancelMessageMoveTaskCommandInput, - CancelMessageMoveTaskCommandOutput, -} from "../commands/CancelMessageMoveTaskCommand"; -import { - ChangeMessageVisibilityBatchCommandInput, - ChangeMessageVisibilityBatchCommandOutput, -} from "../commands/ChangeMessageVisibilityBatchCommand"; -import { - ChangeMessageVisibilityCommandInput, - ChangeMessageVisibilityCommandOutput, -} from "../commands/ChangeMessageVisibilityCommand"; -import { CreateQueueCommandInput, CreateQueueCommandOutput } from "../commands/CreateQueueCommand"; -import { DeleteMessageBatchCommandInput, DeleteMessageBatchCommandOutput } from "../commands/DeleteMessageBatchCommand"; -import { DeleteMessageCommandInput, DeleteMessageCommandOutput } from "../commands/DeleteMessageCommand"; -import { DeleteQueueCommandInput, DeleteQueueCommandOutput } from "../commands/DeleteQueueCommand"; -import { GetQueueAttributesCommandInput, GetQueueAttributesCommandOutput } from "../commands/GetQueueAttributesCommand"; -import { GetQueueUrlCommandInput, GetQueueUrlCommandOutput } from "../commands/GetQueueUrlCommand"; -import { - ListDeadLetterSourceQueuesCommandInput, - ListDeadLetterSourceQueuesCommandOutput, -} from "../commands/ListDeadLetterSourceQueuesCommand"; -import { - ListMessageMoveTasksCommandInput, - ListMessageMoveTasksCommandOutput, -} from "../commands/ListMessageMoveTasksCommand"; -import { ListQueuesCommandInput, ListQueuesCommandOutput } from "../commands/ListQueuesCommand"; -import { ListQueueTagsCommandInput, ListQueueTagsCommandOutput } from "../commands/ListQueueTagsCommand"; -import { PurgeQueueCommandInput, PurgeQueueCommandOutput } from "../commands/PurgeQueueCommand"; -import { ReceiveMessageCommandInput, ReceiveMessageCommandOutput } from "../commands/ReceiveMessageCommand"; -import { RemovePermissionCommandInput, RemovePermissionCommandOutput } from "../commands/RemovePermissionCommand"; -import { SendMessageBatchCommandInput, SendMessageBatchCommandOutput } from "../commands/SendMessageBatchCommand"; -import { SendMessageCommandInput, SendMessageCommandOutput } from "../commands/SendMessageCommand"; -import { SetQueueAttributesCommandInput, SetQueueAttributesCommandOutput } from "../commands/SetQueueAttributesCommand"; -import { - StartMessageMoveTaskCommandInput, - StartMessageMoveTaskCommandOutput, -} from "../commands/StartMessageMoveTaskCommand"; -import { TagQueueCommandInput, TagQueueCommandOutput } from "../commands/TagQueueCommand"; -import { UntagQueueCommandInput, UntagQueueCommandOutput } from "../commands/UntagQueueCommand"; -import { - AddPermissionRequest, - BatchEntryIdsNotDistinct, - BatchRequestTooLong, - BatchResultErrorEntry, - CancelMessageMoveTaskRequest, - CancelMessageMoveTaskResult, - ChangeMessageVisibilityBatchRequest, - ChangeMessageVisibilityBatchRequestEntry, - ChangeMessageVisibilityBatchResult, - ChangeMessageVisibilityBatchResultEntry, - ChangeMessageVisibilityRequest, - CreateQueueRequest, - CreateQueueResult, - DeleteMessageBatchRequest, - DeleteMessageBatchRequestEntry, - DeleteMessageBatchResult, - DeleteMessageBatchResultEntry, - DeleteMessageRequest, - DeleteQueueRequest, - EmptyBatchRequest, - GetQueueAttributesRequest, - GetQueueAttributesResult, - GetQueueUrlRequest, - GetQueueUrlResult, - InvalidAttributeName, - InvalidBatchEntryId, - InvalidIdFormat, - InvalidMessageContents, - ListDeadLetterSourceQueuesRequest, - ListDeadLetterSourceQueuesResult, - ListMessageMoveTasksRequest, - ListMessageMoveTasksResult, - ListMessageMoveTasksResultEntry, - ListQueuesRequest, - ListQueuesResult, - ListQueueTagsRequest, - ListQueueTagsResult, - Message, - MessageAttributeValue, - MessageNotInflight, - MessageSystemAttributeName, - MessageSystemAttributeNameForSends, - MessageSystemAttributeValue, - OverLimit, - PurgeQueueInProgress, - PurgeQueueRequest, - QueueAttributeName, - QueueDeletedRecently, - QueueDoesNotExist, - QueueNameExists, - ReceiptHandleIsInvalid, - ReceiveMessageRequest, - ReceiveMessageResult, - RemovePermissionRequest, - ResourceNotFoundException, - SendMessageBatchRequest, - SendMessageBatchRequestEntry, - SendMessageBatchResult, - SendMessageBatchResultEntry, - SendMessageRequest, - SendMessageResult, - SetQueueAttributesRequest, - StartMessageMoveTaskRequest, - StartMessageMoveTaskResult, - TagQueueRequest, - TooManyEntriesInBatchRequest, - UnsupportedOperation, - UntagQueueRequest, -} from "../models/models_0"; -import { SQSServiceException as __BaseException } from "../models/SQSServiceException"; - -/** - * serializeAws_queryAddPermissionCommand - */ -export const se_AddPermissionCommand = async ( - input: AddPermissionCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_AddPermissionRequest(input, context), - Action: "AddPermission", - Version: "2012-11-05", - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryCancelMessageMoveTaskCommand - */ -export const se_CancelMessageMoveTaskCommand = async ( - input: CancelMessageMoveTaskCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_CancelMessageMoveTaskRequest(input, context), - Action: "CancelMessageMoveTask", - Version: "2012-11-05", - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryChangeMessageVisibilityCommand - */ -export const se_ChangeMessageVisibilityCommand = async ( - input: ChangeMessageVisibilityCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_ChangeMessageVisibilityRequest(input, context), - Action: "ChangeMessageVisibility", - Version: "2012-11-05", - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryChangeMessageVisibilityBatchCommand - */ -export const se_ChangeMessageVisibilityBatchCommand = async ( - input: ChangeMessageVisibilityBatchCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_ChangeMessageVisibilityBatchRequest(input, context), - Action: "ChangeMessageVisibilityBatch", - Version: "2012-11-05", - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryCreateQueueCommand - */ -export const se_CreateQueueCommand = async ( - input: CreateQueueCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_CreateQueueRequest(input, context), - Action: "CreateQueue", - Version: "2012-11-05", - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryDeleteMessageCommand - */ -export const se_DeleteMessageCommand = async ( - input: DeleteMessageCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_DeleteMessageRequest(input, context), - Action: "DeleteMessage", - Version: "2012-11-05", - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryDeleteMessageBatchCommand - */ -export const se_DeleteMessageBatchCommand = async ( - input: DeleteMessageBatchCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_DeleteMessageBatchRequest(input, context), - Action: "DeleteMessageBatch", - Version: "2012-11-05", - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryDeleteQueueCommand - */ -export const se_DeleteQueueCommand = async ( - input: DeleteQueueCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_DeleteQueueRequest(input, context), - Action: "DeleteQueue", - Version: "2012-11-05", - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryGetQueueAttributesCommand - */ -export const se_GetQueueAttributesCommand = async ( - input: GetQueueAttributesCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_GetQueueAttributesRequest(input, context), - Action: "GetQueueAttributes", - Version: "2012-11-05", - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryGetQueueUrlCommand - */ -export const se_GetQueueUrlCommand = async ( - input: GetQueueUrlCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_GetQueueUrlRequest(input, context), - Action: "GetQueueUrl", - Version: "2012-11-05", - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryListDeadLetterSourceQueuesCommand - */ -export const se_ListDeadLetterSourceQueuesCommand = async ( - input: ListDeadLetterSourceQueuesCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_ListDeadLetterSourceQueuesRequest(input, context), - Action: "ListDeadLetterSourceQueues", - Version: "2012-11-05", - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryListMessageMoveTasksCommand - */ -export const se_ListMessageMoveTasksCommand = async ( - input: ListMessageMoveTasksCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_ListMessageMoveTasksRequest(input, context), - Action: "ListMessageMoveTasks", - Version: "2012-11-05", - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryListQueuesCommand - */ -export const se_ListQueuesCommand = async ( - input: ListQueuesCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_ListQueuesRequest(input, context), - Action: "ListQueues", - Version: "2012-11-05", - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryListQueueTagsCommand - */ -export const se_ListQueueTagsCommand = async ( - input: ListQueueTagsCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_ListQueueTagsRequest(input, context), - Action: "ListQueueTags", - Version: "2012-11-05", - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryPurgeQueueCommand - */ -export const se_PurgeQueueCommand = async ( - input: PurgeQueueCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_PurgeQueueRequest(input, context), - Action: "PurgeQueue", - Version: "2012-11-05", - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryReceiveMessageCommand - */ -export const se_ReceiveMessageCommand = async ( - input: ReceiveMessageCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_ReceiveMessageRequest(input, context), - Action: "ReceiveMessage", - Version: "2012-11-05", - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryRemovePermissionCommand - */ -export const se_RemovePermissionCommand = async ( - input: RemovePermissionCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_RemovePermissionRequest(input, context), - Action: "RemovePermission", - Version: "2012-11-05", - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_querySendMessageCommand - */ -export const se_SendMessageCommand = async ( - input: SendMessageCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_SendMessageRequest(input, context), - Action: "SendMessage", - Version: "2012-11-05", - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_querySendMessageBatchCommand - */ -export const se_SendMessageBatchCommand = async ( - input: SendMessageBatchCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_SendMessageBatchRequest(input, context), - Action: "SendMessageBatch", - Version: "2012-11-05", - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_querySetQueueAttributesCommand - */ -export const se_SetQueueAttributesCommand = async ( - input: SetQueueAttributesCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_SetQueueAttributesRequest(input, context), - Action: "SetQueueAttributes", - Version: "2012-11-05", - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryStartMessageMoveTaskCommand - */ -export const se_StartMessageMoveTaskCommand = async ( - input: StartMessageMoveTaskCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_StartMessageMoveTaskRequest(input, context), - Action: "StartMessageMoveTask", - Version: "2012-11-05", - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryTagQueueCommand - */ -export const se_TagQueueCommand = async ( - input: TagQueueCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_TagQueueRequest(input, context), - Action: "TagQueue", - Version: "2012-11-05", - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_queryUntagQueueCommand - */ -export const se_UntagQueueCommand = async ( - input: UntagQueueCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = SHARED_HEADERS; - let body: any; - body = buildFormUrlencodedString({ - ...se_UntagQueueRequest(input, context), - Action: "UntagQueue", - Version: "2012-11-05", - }); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * deserializeAws_queryAddPermissionCommand - */ -export const de_AddPermissionCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_AddPermissionCommandError(output, context); - } - await collectBody(output.body, context); - const response: AddPermissionCommandOutput = { - $metadata: deserializeMetadata(output), - }; - return response; -}; - -/** - * deserializeAws_queryAddPermissionCommandError - */ -const de_AddPermissionCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "OverLimit": - case "com.amazonaws.sqs#OverLimit": - throw await de_OverLimitRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode, - }); - } -}; - -/** - * deserializeAws_queryCancelMessageMoveTaskCommand - */ -export const de_CancelMessageMoveTaskCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CancelMessageMoveTaskCommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_CancelMessageMoveTaskResult(data.CancelMessageMoveTaskResult, context); - const response: CancelMessageMoveTaskCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryCancelMessageMoveTaskCommandError - */ -const de_CancelMessageMoveTaskCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "AWS.SimpleQueueService.UnsupportedOperation": - case "com.amazonaws.sqs#UnsupportedOperation": - throw await de_UnsupportedOperationRes(parsedOutput, context); - case "ResourceNotFoundException": - case "com.amazonaws.sqs#ResourceNotFoundException": - throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode, - }); - } -}; - -/** - * deserializeAws_queryChangeMessageVisibilityCommand - */ -export const de_ChangeMessageVisibilityCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_ChangeMessageVisibilityCommandError(output, context); - } - await collectBody(output.body, context); - const response: ChangeMessageVisibilityCommandOutput = { - $metadata: deserializeMetadata(output), - }; - return response; -}; - -/** - * deserializeAws_queryChangeMessageVisibilityCommandError - */ -const de_ChangeMessageVisibilityCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "AWS.SimpleQueueService.MessageNotInflight": - case "com.amazonaws.sqs#MessageNotInflight": - throw await de_MessageNotInflightRes(parsedOutput, context); - case "ReceiptHandleIsInvalid": - case "com.amazonaws.sqs#ReceiptHandleIsInvalid": - throw await de_ReceiptHandleIsInvalidRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode, - }); - } -}; - -/** - * deserializeAws_queryChangeMessageVisibilityBatchCommand - */ -export const de_ChangeMessageVisibilityBatchCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_ChangeMessageVisibilityBatchCommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_ChangeMessageVisibilityBatchResult(data.ChangeMessageVisibilityBatchResult, context); - const response: ChangeMessageVisibilityBatchCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryChangeMessageVisibilityBatchCommandError - */ -const de_ChangeMessageVisibilityBatchCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "AWS.SimpleQueueService.BatchEntryIdsNotDistinct": - case "com.amazonaws.sqs#BatchEntryIdsNotDistinct": - throw await de_BatchEntryIdsNotDistinctRes(parsedOutput, context); - case "AWS.SimpleQueueService.EmptyBatchRequest": - case "com.amazonaws.sqs#EmptyBatchRequest": - throw await de_EmptyBatchRequestRes(parsedOutput, context); - case "AWS.SimpleQueueService.InvalidBatchEntryId": - case "com.amazonaws.sqs#InvalidBatchEntryId": - throw await de_InvalidBatchEntryIdRes(parsedOutput, context); - case "AWS.SimpleQueueService.TooManyEntriesInBatchRequest": - case "com.amazonaws.sqs#TooManyEntriesInBatchRequest": - throw await de_TooManyEntriesInBatchRequestRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode, - }); - } -}; - -/** - * deserializeAws_queryCreateQueueCommand - */ -export const de_CreateQueueCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CreateQueueCommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_CreateQueueResult(data.CreateQueueResult, context); - const response: CreateQueueCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryCreateQueueCommandError - */ -const de_CreateQueueCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "AWS.SimpleQueueService.QueueDeletedRecently": - case "com.amazonaws.sqs#QueueDeletedRecently": - throw await de_QueueDeletedRecentlyRes(parsedOutput, context); - case "QueueAlreadyExists": - case "com.amazonaws.sqs#QueueNameExists": - throw await de_QueueNameExistsRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode, - }); - } -}; - -/** - * deserializeAws_queryDeleteMessageCommand - */ -export const de_DeleteMessageCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_DeleteMessageCommandError(output, context); - } - await collectBody(output.body, context); - const response: DeleteMessageCommandOutput = { - $metadata: deserializeMetadata(output), - }; - return response; -}; - -/** - * deserializeAws_queryDeleteMessageCommandError - */ -const de_DeleteMessageCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidIdFormat": - case "com.amazonaws.sqs#InvalidIdFormat": - throw await de_InvalidIdFormatRes(parsedOutput, context); - case "ReceiptHandleIsInvalid": - case "com.amazonaws.sqs#ReceiptHandleIsInvalid": - throw await de_ReceiptHandleIsInvalidRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode, - }); - } -}; - -/** - * deserializeAws_queryDeleteMessageBatchCommand - */ -export const de_DeleteMessageBatchCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_DeleteMessageBatchCommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_DeleteMessageBatchResult(data.DeleteMessageBatchResult, context); - const response: DeleteMessageBatchCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryDeleteMessageBatchCommandError - */ -const de_DeleteMessageBatchCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "AWS.SimpleQueueService.BatchEntryIdsNotDistinct": - case "com.amazonaws.sqs#BatchEntryIdsNotDistinct": - throw await de_BatchEntryIdsNotDistinctRes(parsedOutput, context); - case "AWS.SimpleQueueService.EmptyBatchRequest": - case "com.amazonaws.sqs#EmptyBatchRequest": - throw await de_EmptyBatchRequestRes(parsedOutput, context); - case "AWS.SimpleQueueService.InvalidBatchEntryId": - case "com.amazonaws.sqs#InvalidBatchEntryId": - throw await de_InvalidBatchEntryIdRes(parsedOutput, context); - case "AWS.SimpleQueueService.TooManyEntriesInBatchRequest": - case "com.amazonaws.sqs#TooManyEntriesInBatchRequest": - throw await de_TooManyEntriesInBatchRequestRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode, - }); - } -}; - -/** - * deserializeAws_queryDeleteQueueCommand - */ -export const de_DeleteQueueCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_DeleteQueueCommandError(output, context); - } - await collectBody(output.body, context); - const response: DeleteQueueCommandOutput = { - $metadata: deserializeMetadata(output), - }; - return response; -}; - -/** - * deserializeAws_queryDeleteQueueCommandError - */ -const de_DeleteQueueCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode, - }); -}; - -/** - * deserializeAws_queryGetQueueAttributesCommand - */ -export const de_GetQueueAttributesCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_GetQueueAttributesCommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_GetQueueAttributesResult(data.GetQueueAttributesResult, context); - const response: GetQueueAttributesCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryGetQueueAttributesCommandError - */ -const de_GetQueueAttributesCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidAttributeName": - case "com.amazonaws.sqs#InvalidAttributeName": - throw await de_InvalidAttributeNameRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode, - }); - } -}; - -/** - * deserializeAws_queryGetQueueUrlCommand - */ -export const de_GetQueueUrlCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_GetQueueUrlCommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_GetQueueUrlResult(data.GetQueueUrlResult, context); - const response: GetQueueUrlCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryGetQueueUrlCommandError - */ -const de_GetQueueUrlCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "AWS.SimpleQueueService.NonExistentQueue": - case "com.amazonaws.sqs#QueueDoesNotExist": - throw await de_QueueDoesNotExistRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode, - }); - } -}; - -/** - * deserializeAws_queryListDeadLetterSourceQueuesCommand - */ -export const de_ListDeadLetterSourceQueuesCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_ListDeadLetterSourceQueuesCommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_ListDeadLetterSourceQueuesResult(data.ListDeadLetterSourceQueuesResult, context); - const response: ListDeadLetterSourceQueuesCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryListDeadLetterSourceQueuesCommandError - */ -const de_ListDeadLetterSourceQueuesCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "AWS.SimpleQueueService.NonExistentQueue": - case "com.amazonaws.sqs#QueueDoesNotExist": - throw await de_QueueDoesNotExistRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode, - }); - } -}; - -/** - * deserializeAws_queryListMessageMoveTasksCommand - */ -export const de_ListMessageMoveTasksCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_ListMessageMoveTasksCommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_ListMessageMoveTasksResult(data.ListMessageMoveTasksResult, context); - const response: ListMessageMoveTasksCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryListMessageMoveTasksCommandError - */ -const de_ListMessageMoveTasksCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "AWS.SimpleQueueService.UnsupportedOperation": - case "com.amazonaws.sqs#UnsupportedOperation": - throw await de_UnsupportedOperationRes(parsedOutput, context); - case "ResourceNotFoundException": - case "com.amazonaws.sqs#ResourceNotFoundException": - throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode, - }); - } -}; - -/** - * deserializeAws_queryListQueuesCommand - */ -export const de_ListQueuesCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_ListQueuesCommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_ListQueuesResult(data.ListQueuesResult, context); - const response: ListQueuesCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryListQueuesCommandError - */ -const de_ListQueuesCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode, - }); -}; - -/** - * deserializeAws_queryListQueueTagsCommand - */ -export const de_ListQueueTagsCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_ListQueueTagsCommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_ListQueueTagsResult(data.ListQueueTagsResult, context); - const response: ListQueueTagsCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryListQueueTagsCommandError - */ -const de_ListQueueTagsCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode, - }); -}; - -/** - * deserializeAws_queryPurgeQueueCommand - */ -export const de_PurgeQueueCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_PurgeQueueCommandError(output, context); - } - await collectBody(output.body, context); - const response: PurgeQueueCommandOutput = { - $metadata: deserializeMetadata(output), - }; - return response; -}; - -/** - * deserializeAws_queryPurgeQueueCommandError - */ -const de_PurgeQueueCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "AWS.SimpleQueueService.NonExistentQueue": - case "com.amazonaws.sqs#QueueDoesNotExist": - throw await de_QueueDoesNotExistRes(parsedOutput, context); - case "AWS.SimpleQueueService.PurgeQueueInProgress": - case "com.amazonaws.sqs#PurgeQueueInProgress": - throw await de_PurgeQueueInProgressRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode, - }); - } -}; - -/** - * deserializeAws_queryReceiveMessageCommand - */ -export const de_ReceiveMessageCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_ReceiveMessageCommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_ReceiveMessageResult(data.ReceiveMessageResult, context); - const response: ReceiveMessageCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryReceiveMessageCommandError - */ -const de_ReceiveMessageCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "OverLimit": - case "com.amazonaws.sqs#OverLimit": - throw await de_OverLimitRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode, - }); - } -}; - -/** - * deserializeAws_queryRemovePermissionCommand - */ -export const de_RemovePermissionCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_RemovePermissionCommandError(output, context); - } - await collectBody(output.body, context); - const response: RemovePermissionCommandOutput = { - $metadata: deserializeMetadata(output), - }; - return response; -}; - -/** - * deserializeAws_queryRemovePermissionCommandError - */ -const de_RemovePermissionCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode, - }); -}; - -/** - * deserializeAws_querySendMessageCommand - */ -export const de_SendMessageCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_SendMessageCommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_SendMessageResult(data.SendMessageResult, context); - const response: SendMessageCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_querySendMessageCommandError - */ -const de_SendMessageCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "AWS.SimpleQueueService.UnsupportedOperation": - case "com.amazonaws.sqs#UnsupportedOperation": - throw await de_UnsupportedOperationRes(parsedOutput, context); - case "InvalidMessageContents": - case "com.amazonaws.sqs#InvalidMessageContents": - throw await de_InvalidMessageContentsRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode, - }); - } -}; - -/** - * deserializeAws_querySendMessageBatchCommand - */ -export const de_SendMessageBatchCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_SendMessageBatchCommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_SendMessageBatchResult(data.SendMessageBatchResult, context); - const response: SendMessageBatchCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_querySendMessageBatchCommandError - */ -const de_SendMessageBatchCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "AWS.SimpleQueueService.BatchEntryIdsNotDistinct": - case "com.amazonaws.sqs#BatchEntryIdsNotDistinct": - throw await de_BatchEntryIdsNotDistinctRes(parsedOutput, context); - case "AWS.SimpleQueueService.BatchRequestTooLong": - case "com.amazonaws.sqs#BatchRequestTooLong": - throw await de_BatchRequestTooLongRes(parsedOutput, context); - case "AWS.SimpleQueueService.EmptyBatchRequest": - case "com.amazonaws.sqs#EmptyBatchRequest": - throw await de_EmptyBatchRequestRes(parsedOutput, context); - case "AWS.SimpleQueueService.InvalidBatchEntryId": - case "com.amazonaws.sqs#InvalidBatchEntryId": - throw await de_InvalidBatchEntryIdRes(parsedOutput, context); - case "AWS.SimpleQueueService.TooManyEntriesInBatchRequest": - case "com.amazonaws.sqs#TooManyEntriesInBatchRequest": - throw await de_TooManyEntriesInBatchRequestRes(parsedOutput, context); - case "AWS.SimpleQueueService.UnsupportedOperation": - case "com.amazonaws.sqs#UnsupportedOperation": - throw await de_UnsupportedOperationRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode, - }); - } -}; - -/** - * deserializeAws_querySetQueueAttributesCommand - */ -export const de_SetQueueAttributesCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_SetQueueAttributesCommandError(output, context); - } - await collectBody(output.body, context); - const response: SetQueueAttributesCommandOutput = { - $metadata: deserializeMetadata(output), - }; - return response; -}; - -/** - * deserializeAws_querySetQueueAttributesCommandError - */ -const de_SetQueueAttributesCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidAttributeName": - case "com.amazonaws.sqs#InvalidAttributeName": - throw await de_InvalidAttributeNameRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode, - }); - } -}; - -/** - * deserializeAws_queryStartMessageMoveTaskCommand - */ -export const de_StartMessageMoveTaskCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_StartMessageMoveTaskCommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_StartMessageMoveTaskResult(data.StartMessageMoveTaskResult, context); - const response: StartMessageMoveTaskCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_queryStartMessageMoveTaskCommandError - */ -const de_StartMessageMoveTaskCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "AWS.SimpleQueueService.UnsupportedOperation": - case "com.amazonaws.sqs#UnsupportedOperation": - throw await de_UnsupportedOperationRes(parsedOutput, context); - case "ResourceNotFoundException": - case "com.amazonaws.sqs#ResourceNotFoundException": - throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode, - }); - } -}; - -/** - * deserializeAws_queryTagQueueCommand - */ -export const de_TagQueueCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_TagQueueCommandError(output, context); - } - await collectBody(output.body, context); - const response: TagQueueCommandOutput = { - $metadata: deserializeMetadata(output), - }; - return response; -}; - -/** - * deserializeAws_queryTagQueueCommandError - */ -const de_TagQueueCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode, - }); -}; - -/** - * deserializeAws_queryUntagQueueCommand - */ -export const de_UntagQueueCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_UntagQueueCommandError(output, context); - } - await collectBody(output.body, context); - const response: UntagQueueCommandOutput = { - $metadata: deserializeMetadata(output), - }; - return response; -}; - -/** - * deserializeAws_queryUntagQueueCommandError - */ -const de_UntagQueueCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - const errorCode = loadQueryErrorCode(output, parsedOutput.body); - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody: parsedBody.Error, - errorCode, - }); -}; - -/** - * deserializeAws_queryBatchEntryIdsNotDistinctRes - */ -const de_BatchEntryIdsNotDistinctRes = async ( - parsedOutput: any, - context: __SerdeContext -): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_BatchEntryIdsNotDistinct(body.Error, context); - const exception = new BatchEntryIdsNotDistinct({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_queryBatchRequestTooLongRes - */ -const de_BatchRequestTooLongRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_BatchRequestTooLong(body.Error, context); - const exception = new BatchRequestTooLong({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_queryEmptyBatchRequestRes - */ -const de_EmptyBatchRequestRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_EmptyBatchRequest(body.Error, context); - const exception = new EmptyBatchRequest({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_queryInvalidAttributeNameRes - */ -const de_InvalidAttributeNameRes = async ( - parsedOutput: any, - context: __SerdeContext -): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_InvalidAttributeName(body.Error, context); - const exception = new InvalidAttributeName({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_queryInvalidBatchEntryIdRes - */ -const de_InvalidBatchEntryIdRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_InvalidBatchEntryId(body.Error, context); - const exception = new InvalidBatchEntryId({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_queryInvalidIdFormatRes - */ -const de_InvalidIdFormatRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_InvalidIdFormat(body.Error, context); - const exception = new InvalidIdFormat({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_queryInvalidMessageContentsRes - */ -const de_InvalidMessageContentsRes = async ( - parsedOutput: any, - context: __SerdeContext -): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_InvalidMessageContents(body.Error, context); - const exception = new InvalidMessageContents({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_queryMessageNotInflightRes - */ -const de_MessageNotInflightRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_MessageNotInflight(body.Error, context); - const exception = new MessageNotInflight({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_queryOverLimitRes - */ -const de_OverLimitRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_OverLimit(body.Error, context); - const exception = new OverLimit({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_queryPurgeQueueInProgressRes - */ -const de_PurgeQueueInProgressRes = async ( - parsedOutput: any, - context: __SerdeContext -): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_PurgeQueueInProgress(body.Error, context); - const exception = new PurgeQueueInProgress({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_queryQueueDeletedRecentlyRes - */ -const de_QueueDeletedRecentlyRes = async ( - parsedOutput: any, - context: __SerdeContext -): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_QueueDeletedRecently(body.Error, context); - const exception = new QueueDeletedRecently({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_queryQueueDoesNotExistRes - */ -const de_QueueDoesNotExistRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_QueueDoesNotExist(body.Error, context); - const exception = new QueueDoesNotExist({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_queryQueueNameExistsRes - */ -const de_QueueNameExistsRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_QueueNameExists(body.Error, context); - const exception = new QueueNameExists({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_queryReceiptHandleIsInvalidRes - */ -const de_ReceiptHandleIsInvalidRes = async ( - parsedOutput: any, - context: __SerdeContext -): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_ReceiptHandleIsInvalid(body.Error, context); - const exception = new ReceiptHandleIsInvalid({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_queryResourceNotFoundExceptionRes - */ -const de_ResourceNotFoundExceptionRes = async ( - parsedOutput: any, - context: __SerdeContext -): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_ResourceNotFoundException(body.Error, context); - const exception = new ResourceNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_queryTooManyEntriesInBatchRequestRes - */ -const de_TooManyEntriesInBatchRequestRes = async ( - parsedOutput: any, - context: __SerdeContext -): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_TooManyEntriesInBatchRequest(body.Error, context); - const exception = new TooManyEntriesInBatchRequest({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_queryUnsupportedOperationRes - */ -const de_UnsupportedOperationRes = async ( - parsedOutput: any, - context: __SerdeContext -): Promise => { - const body = parsedOutput.body; - const deserialized: any = de_UnsupportedOperation(body.Error, context); - const exception = new UnsupportedOperation({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * serializeAws_queryActionNameList - */ -const se_ActionNameList = (input: string[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}; - -/** - * serializeAws_queryAddPermissionRequest - */ -const se_AddPermissionRequest = (input: AddPermissionRequest, context: __SerdeContext): any => { - const entries: any = {}; - if (input.QueueUrl != null) { - entries["QueueUrl"] = input.QueueUrl; - } - if (input.Label != null) { - entries["Label"] = input.Label; - } - if (input.AWSAccountIds != null) { - const memberEntries = se_AWSAccountIdList(input.AWSAccountIds, context); - if (input.AWSAccountIds?.length === 0) { - entries.AWSAccountId = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `AWSAccountId.${key.substring(key.indexOf(".") + 1)}`; - entries[loc] = value; - }); - } - if (input.Actions != null) { - const memberEntries = se_ActionNameList(input.Actions, context); - if (input.Actions?.length === 0) { - entries.ActionName = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `ActionName.${key.substring(key.indexOf(".") + 1)}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryAttributeNameList - */ -const se_AttributeNameList = (input: QueueAttributeName[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}; - -/** - * serializeAws_queryAWSAccountIdList - */ -const se_AWSAccountIdList = (input: string[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}; - -/** - * serializeAws_queryBinaryList - */ -const se_BinaryList = (input: Uint8Array[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`BinaryListValue.${counter}`] = context.base64Encoder(entry); - counter++; - } - return entries; -}; - -/** - * serializeAws_queryCancelMessageMoveTaskRequest - */ -const se_CancelMessageMoveTaskRequest = (input: CancelMessageMoveTaskRequest, context: __SerdeContext): any => { - const entries: any = {}; - if (input.TaskHandle != null) { - entries["TaskHandle"] = input.TaskHandle; - } - return entries; -}; - -/** - * serializeAws_queryChangeMessageVisibilityBatchRequest - */ -const se_ChangeMessageVisibilityBatchRequest = ( - input: ChangeMessageVisibilityBatchRequest, - context: __SerdeContext -): any => { - const entries: any = {}; - if (input.QueueUrl != null) { - entries["QueueUrl"] = input.QueueUrl; - } - if (input.Entries != null) { - const memberEntries = se_ChangeMessageVisibilityBatchRequestEntryList(input.Entries, context); - if (input.Entries?.length === 0) { - entries.ChangeMessageVisibilityBatchRequestEntry = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `ChangeMessageVisibilityBatchRequestEntry.${key.substring(key.indexOf(".") + 1)}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryChangeMessageVisibilityBatchRequestEntry - */ -const se_ChangeMessageVisibilityBatchRequestEntry = ( - input: ChangeMessageVisibilityBatchRequestEntry, - context: __SerdeContext -): any => { - const entries: any = {}; - if (input.Id != null) { - entries["Id"] = input.Id; - } - if (input.ReceiptHandle != null) { - entries["ReceiptHandle"] = input.ReceiptHandle; - } - if (input.VisibilityTimeout != null) { - entries["VisibilityTimeout"] = input.VisibilityTimeout; - } - return entries; -}; - -/** - * serializeAws_queryChangeMessageVisibilityBatchRequestEntryList - */ -const se_ChangeMessageVisibilityBatchRequestEntryList = ( - input: ChangeMessageVisibilityBatchRequestEntry[], - context: __SerdeContext -): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_ChangeMessageVisibilityBatchRequestEntry(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}; - -/** - * serializeAws_queryChangeMessageVisibilityRequest - */ -const se_ChangeMessageVisibilityRequest = (input: ChangeMessageVisibilityRequest, context: __SerdeContext): any => { - const entries: any = {}; - if (input.QueueUrl != null) { - entries["QueueUrl"] = input.QueueUrl; - } - if (input.ReceiptHandle != null) { - entries["ReceiptHandle"] = input.ReceiptHandle; - } - if (input.VisibilityTimeout != null) { - entries["VisibilityTimeout"] = input.VisibilityTimeout; - } - return entries; -}; - -/** - * serializeAws_queryCreateQueueRequest - */ -const se_CreateQueueRequest = (input: CreateQueueRequest, context: __SerdeContext): any => { - const entries: any = {}; - if (input.QueueName != null) { - entries["QueueName"] = input.QueueName; - } - if (input.tags != null) { - const memberEntries = se_TagMap(input.tags, context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Tag.${key.substring(key.indexOf(".") + 1)}`; - entries[loc] = value; - }); - } - if (input.Attributes != null) { - const memberEntries = se_QueueAttributeMap(input.Attributes, context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Attribute.${key.substring(key.indexOf(".") + 1)}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryDeleteMessageBatchRequest - */ -const se_DeleteMessageBatchRequest = (input: DeleteMessageBatchRequest, context: __SerdeContext): any => { - const entries: any = {}; - if (input.QueueUrl != null) { - entries["QueueUrl"] = input.QueueUrl; - } - if (input.Entries != null) { - const memberEntries = se_DeleteMessageBatchRequestEntryList(input.Entries, context); - if (input.Entries?.length === 0) { - entries.DeleteMessageBatchRequestEntry = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `DeleteMessageBatchRequestEntry.${key.substring(key.indexOf(".") + 1)}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryDeleteMessageBatchRequestEntry - */ -const se_DeleteMessageBatchRequestEntry = (input: DeleteMessageBatchRequestEntry, context: __SerdeContext): any => { - const entries: any = {}; - if (input.Id != null) { - entries["Id"] = input.Id; - } - if (input.ReceiptHandle != null) { - entries["ReceiptHandle"] = input.ReceiptHandle; - } - return entries; -}; - -/** - * serializeAws_queryDeleteMessageBatchRequestEntryList - */ -const se_DeleteMessageBatchRequestEntryList = ( - input: DeleteMessageBatchRequestEntry[], - context: __SerdeContext -): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_DeleteMessageBatchRequestEntry(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}; - -/** - * serializeAws_queryDeleteMessageRequest - */ -const se_DeleteMessageRequest = (input: DeleteMessageRequest, context: __SerdeContext): any => { - const entries: any = {}; - if (input.QueueUrl != null) { - entries["QueueUrl"] = input.QueueUrl; - } - if (input.ReceiptHandle != null) { - entries["ReceiptHandle"] = input.ReceiptHandle; - } - return entries; -}; - -/** - * serializeAws_queryDeleteQueueRequest - */ -const se_DeleteQueueRequest = (input: DeleteQueueRequest, context: __SerdeContext): any => { - const entries: any = {}; - if (input.QueueUrl != null) { - entries["QueueUrl"] = input.QueueUrl; - } - return entries; -}; - -/** - * serializeAws_queryGetQueueAttributesRequest - */ -const se_GetQueueAttributesRequest = (input: GetQueueAttributesRequest, context: __SerdeContext): any => { - const entries: any = {}; - if (input.QueueUrl != null) { - entries["QueueUrl"] = input.QueueUrl; - } - if (input.AttributeNames != null) { - const memberEntries = se_AttributeNameList(input.AttributeNames, context); - if (input.AttributeNames?.length === 0) { - entries.AttributeName = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `AttributeName.${key.substring(key.indexOf(".") + 1)}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryGetQueueUrlRequest - */ -const se_GetQueueUrlRequest = (input: GetQueueUrlRequest, context: __SerdeContext): any => { - const entries: any = {}; - if (input.QueueName != null) { - entries["QueueName"] = input.QueueName; - } - if (input.QueueOwnerAWSAccountId != null) { - entries["QueueOwnerAWSAccountId"] = input.QueueOwnerAWSAccountId; - } - return entries; -}; - -/** - * serializeAws_queryListDeadLetterSourceQueuesRequest - */ -const se_ListDeadLetterSourceQueuesRequest = ( - input: ListDeadLetterSourceQueuesRequest, - context: __SerdeContext -): any => { - const entries: any = {}; - if (input.QueueUrl != null) { - entries["QueueUrl"] = input.QueueUrl; - } - if (input.NextToken != null) { - entries["NextToken"] = input.NextToken; - } - if (input.MaxResults != null) { - entries["MaxResults"] = input.MaxResults; - } - return entries; -}; - -/** - * serializeAws_queryListMessageMoveTasksRequest - */ -const se_ListMessageMoveTasksRequest = (input: ListMessageMoveTasksRequest, context: __SerdeContext): any => { - const entries: any = {}; - if (input.SourceArn != null) { - entries["SourceArn"] = input.SourceArn; - } - if (input.MaxResults != null) { - entries["MaxResults"] = input.MaxResults; - } - return entries; -}; - -/** - * serializeAws_queryListQueuesRequest - */ -const se_ListQueuesRequest = (input: ListQueuesRequest, context: __SerdeContext): any => { - const entries: any = {}; - if (input.QueueNamePrefix != null) { - entries["QueueNamePrefix"] = input.QueueNamePrefix; - } - if (input.NextToken != null) { - entries["NextToken"] = input.NextToken; - } - if (input.MaxResults != null) { - entries["MaxResults"] = input.MaxResults; - } - return entries; -}; - -/** - * serializeAws_queryListQueueTagsRequest - */ -const se_ListQueueTagsRequest = (input: ListQueueTagsRequest, context: __SerdeContext): any => { - const entries: any = {}; - if (input.QueueUrl != null) { - entries["QueueUrl"] = input.QueueUrl; - } - return entries; -}; - -/** - * serializeAws_queryMessageAttributeNameList - */ -const se_MessageAttributeNameList = (input: string[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}; - -/** - * serializeAws_queryMessageAttributeValue - */ -const se_MessageAttributeValue = (input: MessageAttributeValue, context: __SerdeContext): any => { - const entries: any = {}; - if (input.StringValue != null) { - entries["StringValue"] = input.StringValue; - } - if (input.BinaryValue != null) { - entries["BinaryValue"] = context.base64Encoder(input.BinaryValue); - } - if (input.StringListValues != null) { - const memberEntries = se_StringList(input.StringListValues, context); - if (input.StringListValues?.length === 0) { - entries.StringListValue = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `StringListValue.${key.substring(key.indexOf(".") + 1)}`; - entries[loc] = value; - }); - } - if (input.BinaryListValues != null) { - const memberEntries = se_BinaryList(input.BinaryListValues, context); - if (input.BinaryListValues?.length === 0) { - entries.BinaryListValue = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `BinaryListValue.${key.substring(key.indexOf(".") + 1)}`; - entries[loc] = value; - }); - } - if (input.DataType != null) { - entries["DataType"] = input.DataType; - } - return entries; -}; - -/** - * serializeAws_queryMessageBodyAttributeMap - */ -const se_MessageBodyAttributeMap = (input: Record, context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - Object.keys(input) - .filter((key) => input[key as keyof typeof input] != null) - .forEach((key) => { - entries[`entry.${counter}.Name`] = key; - const memberEntries = se_MessageAttributeValue(input[key as keyof typeof input]!, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`entry.${counter}.Value.${key}`] = value; - }); - counter++; - }); - return entries; -}; - -/** - * serializeAws_queryMessageBodySystemAttributeMap - */ -const se_MessageBodySystemAttributeMap = ( - input: Partial>, - context: __SerdeContext -): any => { - const entries: any = {}; - let counter = 1; - Object.keys(input) - .filter((key) => input[key as keyof typeof input] != null) - .forEach((key) => { - entries[`entry.${counter}.Name`] = key; - const memberEntries = se_MessageSystemAttributeValue(input[key as keyof typeof input]!, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`entry.${counter}.Value.${key}`] = value; - }); - counter++; - }); - return entries; -}; - -/** - * serializeAws_queryMessageSystemAttributeValue - */ -const se_MessageSystemAttributeValue = (input: MessageSystemAttributeValue, context: __SerdeContext): any => { - const entries: any = {}; - if (input.StringValue != null) { - entries["StringValue"] = input.StringValue; - } - if (input.BinaryValue != null) { - entries["BinaryValue"] = context.base64Encoder(input.BinaryValue); - } - if (input.StringListValues != null) { - const memberEntries = se_StringList(input.StringListValues, context); - if (input.StringListValues?.length === 0) { - entries.StringListValue = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `StringListValue.${key.substring(key.indexOf(".") + 1)}`; - entries[loc] = value; - }); - } - if (input.BinaryListValues != null) { - const memberEntries = se_BinaryList(input.BinaryListValues, context); - if (input.BinaryListValues?.length === 0) { - entries.BinaryListValue = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `BinaryListValue.${key.substring(key.indexOf(".") + 1)}`; - entries[loc] = value; - }); - } - if (input.DataType != null) { - entries["DataType"] = input.DataType; - } - return entries; -}; - -/** - * serializeAws_queryPurgeQueueRequest - */ -const se_PurgeQueueRequest = (input: PurgeQueueRequest, context: __SerdeContext): any => { - const entries: any = {}; - if (input.QueueUrl != null) { - entries["QueueUrl"] = input.QueueUrl; - } - return entries; -}; - -/** - * serializeAws_queryQueueAttributeMap - */ -const se_QueueAttributeMap = (input: Partial>, context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - Object.keys(input) - .filter((key) => input[key as keyof typeof input] != null) - .forEach((key) => { - entries[`entry.${counter}.Name`] = key; - entries[`entry.${counter}.Value`] = input[key as keyof typeof input]!; - counter++; - }); - return entries; -}; - -/** - * serializeAws_queryReceiveMessageRequest - */ -const se_ReceiveMessageRequest = (input: ReceiveMessageRequest, context: __SerdeContext): any => { - const entries: any = {}; - if (input.QueueUrl != null) { - entries["QueueUrl"] = input.QueueUrl; - } - if (input.AttributeNames != null) { - const memberEntries = se_AttributeNameList(input.AttributeNames, context); - if (input.AttributeNames?.length === 0) { - entries.AttributeName = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `AttributeName.${key.substring(key.indexOf(".") + 1)}`; - entries[loc] = value; - }); - } - if (input.MessageAttributeNames != null) { - const memberEntries = se_MessageAttributeNameList(input.MessageAttributeNames, context); - if (input.MessageAttributeNames?.length === 0) { - entries.MessageAttributeName = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `MessageAttributeName.${key.substring(key.indexOf(".") + 1)}`; - entries[loc] = value; - }); - } - if (input.MaxNumberOfMessages != null) { - entries["MaxNumberOfMessages"] = input.MaxNumberOfMessages; - } - if (input.VisibilityTimeout != null) { - entries["VisibilityTimeout"] = input.VisibilityTimeout; - } - if (input.WaitTimeSeconds != null) { - entries["WaitTimeSeconds"] = input.WaitTimeSeconds; - } - if (input.ReceiveRequestAttemptId != null) { - entries["ReceiveRequestAttemptId"] = input.ReceiveRequestAttemptId; - } - return entries; -}; - -/** - * serializeAws_queryRemovePermissionRequest - */ -const se_RemovePermissionRequest = (input: RemovePermissionRequest, context: __SerdeContext): any => { - const entries: any = {}; - if (input.QueueUrl != null) { - entries["QueueUrl"] = input.QueueUrl; - } - if (input.Label != null) { - entries["Label"] = input.Label; - } - return entries; -}; - -/** - * serializeAws_querySendMessageBatchRequest - */ -const se_SendMessageBatchRequest = (input: SendMessageBatchRequest, context: __SerdeContext): any => { - const entries: any = {}; - if (input.QueueUrl != null) { - entries["QueueUrl"] = input.QueueUrl; - } - if (input.Entries != null) { - const memberEntries = se_SendMessageBatchRequestEntryList(input.Entries, context); - if (input.Entries?.length === 0) { - entries.SendMessageBatchRequestEntry = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `SendMessageBatchRequestEntry.${key.substring(key.indexOf(".") + 1)}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_querySendMessageBatchRequestEntry - */ -const se_SendMessageBatchRequestEntry = (input: SendMessageBatchRequestEntry, context: __SerdeContext): any => { - const entries: any = {}; - if (input.Id != null) { - entries["Id"] = input.Id; - } - if (input.MessageBody != null) { - entries["MessageBody"] = input.MessageBody; - } - if (input.DelaySeconds != null) { - entries["DelaySeconds"] = input.DelaySeconds; - } - if (input.MessageAttributes != null) { - const memberEntries = se_MessageBodyAttributeMap(input.MessageAttributes, context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `MessageAttribute.${key.substring(key.indexOf(".") + 1)}`; - entries[loc] = value; - }); - } - if (input.MessageSystemAttributes != null) { - const memberEntries = se_MessageBodySystemAttributeMap(input.MessageSystemAttributes, context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `MessageSystemAttribute.${key.substring(key.indexOf(".") + 1)}`; - entries[loc] = value; - }); - } - if (input.MessageDeduplicationId != null) { - entries["MessageDeduplicationId"] = input.MessageDeduplicationId; - } - if (input.MessageGroupId != null) { - entries["MessageGroupId"] = input.MessageGroupId; - } - return entries; -}; - -/** - * serializeAws_querySendMessageBatchRequestEntryList - */ -const se_SendMessageBatchRequestEntryList = (input: SendMessageBatchRequestEntry[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - const memberEntries = se_SendMessageBatchRequestEntry(entry, context); - Object.entries(memberEntries).forEach(([key, value]) => { - entries[`member.${counter}.${key}`] = value; - }); - counter++; - } - return entries; -}; - -/** - * serializeAws_querySendMessageRequest - */ -const se_SendMessageRequest = (input: SendMessageRequest, context: __SerdeContext): any => { - const entries: any = {}; - if (input.QueueUrl != null) { - entries["QueueUrl"] = input.QueueUrl; - } - if (input.MessageBody != null) { - entries["MessageBody"] = input.MessageBody; - } - if (input.DelaySeconds != null) { - entries["DelaySeconds"] = input.DelaySeconds; - } - if (input.MessageAttributes != null) { - const memberEntries = se_MessageBodyAttributeMap(input.MessageAttributes, context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `MessageAttribute.${key.substring(key.indexOf(".") + 1)}`; - entries[loc] = value; - }); - } - if (input.MessageSystemAttributes != null) { - const memberEntries = se_MessageBodySystemAttributeMap(input.MessageSystemAttributes, context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `MessageSystemAttribute.${key.substring(key.indexOf(".") + 1)}`; - entries[loc] = value; - }); - } - if (input.MessageDeduplicationId != null) { - entries["MessageDeduplicationId"] = input.MessageDeduplicationId; - } - if (input.MessageGroupId != null) { - entries["MessageGroupId"] = input.MessageGroupId; - } - return entries; -}; - -/** - * serializeAws_querySetQueueAttributesRequest - */ -const se_SetQueueAttributesRequest = (input: SetQueueAttributesRequest, context: __SerdeContext): any => { - const entries: any = {}; - if (input.QueueUrl != null) { - entries["QueueUrl"] = input.QueueUrl; - } - if (input.Attributes != null) { - const memberEntries = se_QueueAttributeMap(input.Attributes, context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Attribute.${key.substring(key.indexOf(".") + 1)}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryStartMessageMoveTaskRequest - */ -const se_StartMessageMoveTaskRequest = (input: StartMessageMoveTaskRequest, context: __SerdeContext): any => { - const entries: any = {}; - if (input.SourceArn != null) { - entries["SourceArn"] = input.SourceArn; - } - if (input.DestinationArn != null) { - entries["DestinationArn"] = input.DestinationArn; - } - if (input.MaxNumberOfMessagesPerSecond != null) { - entries["MaxNumberOfMessagesPerSecond"] = input.MaxNumberOfMessagesPerSecond; - } - return entries; -}; - -/** - * serializeAws_queryStringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`StringListValue.${counter}`] = entry; - counter++; - } - return entries; -}; - -/** - * serializeAws_queryTagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - for (const entry of input) { - if (entry === null) { - continue; - } - entries[`member.${counter}`] = entry; - counter++; - } - return entries; -}; - -/** - * serializeAws_queryTagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - const entries: any = {}; - let counter = 1; - Object.keys(input) - .filter((key) => input[key as keyof typeof input] != null) - .forEach((key) => { - entries[`entry.${counter}.Key`] = key; - entries[`entry.${counter}.Value`] = input[key as keyof typeof input]!; - counter++; - }); - return entries; -}; - -/** - * serializeAws_queryTagQueueRequest - */ -const se_TagQueueRequest = (input: TagQueueRequest, context: __SerdeContext): any => { - const entries: any = {}; - if (input.QueueUrl != null) { - entries["QueueUrl"] = input.QueueUrl; - } - if (input.Tags != null) { - const memberEntries = se_TagMap(input.Tags, context); - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `Tag.${key.substring(key.indexOf(".") + 1)}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * serializeAws_queryUntagQueueRequest - */ -const se_UntagQueueRequest = (input: UntagQueueRequest, context: __SerdeContext): any => { - const entries: any = {}; - if (input.QueueUrl != null) { - entries["QueueUrl"] = input.QueueUrl; - } - if (input.TagKeys != null) { - const memberEntries = se_TagKeyList(input.TagKeys, context); - if (input.TagKeys?.length === 0) { - entries.TagKey = []; - } - Object.entries(memberEntries).forEach(([key, value]) => { - const loc = `TagKey.${key.substring(key.indexOf(".") + 1)}`; - entries[loc] = value; - }); - } - return entries; -}; - -/** - * deserializeAws_queryBatchEntryIdsNotDistinct - */ -const de_BatchEntryIdsNotDistinct = (output: any, context: __SerdeContext): BatchEntryIdsNotDistinct => { - const contents: any = {}; - return contents; -}; - -/** - * deserializeAws_queryBatchRequestTooLong - */ -const de_BatchRequestTooLong = (output: any, context: __SerdeContext): BatchRequestTooLong => { - const contents: any = {}; - return contents; -}; - -/** - * deserializeAws_queryBatchResultErrorEntry - */ -const de_BatchResultErrorEntry = (output: any, context: __SerdeContext): BatchResultErrorEntry => { - const contents: any = {}; - if (output["Id"] !== undefined) { - contents.Id = __expectString(output["Id"]); - } - if (output["SenderFault"] !== undefined) { - contents.SenderFault = __parseBoolean(output["SenderFault"]); - } - if (output["Code"] !== undefined) { - contents.Code = __expectString(output["Code"]); - } - if (output["Message"] !== undefined) { - contents.Message = __expectString(output["Message"]); - } - return contents; -}; - -/** - * deserializeAws_queryBatchResultErrorEntryList - */ -const de_BatchResultErrorEntryList = (output: any, context: __SerdeContext): BatchResultErrorEntry[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_BatchResultErrorEntry(entry, context); - }); -}; - -/** - * deserializeAws_queryBinaryList - */ -const de_BinaryList = (output: any, context: __SerdeContext): Uint8Array[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return context.base64Decoder(entry); - }); -}; - -/** - * deserializeAws_queryCancelMessageMoveTaskResult - */ -const de_CancelMessageMoveTaskResult = (output: any, context: __SerdeContext): CancelMessageMoveTaskResult => { - const contents: any = {}; - if (output["ApproximateNumberOfMessagesMoved"] !== undefined) { - contents.ApproximateNumberOfMessagesMoved = __strictParseLong(output["ApproximateNumberOfMessagesMoved"]) as number; - } - return contents; -}; - -/** - * deserializeAws_queryChangeMessageVisibilityBatchResult - */ -const de_ChangeMessageVisibilityBatchResult = ( - output: any, - context: __SerdeContext -): ChangeMessageVisibilityBatchResult => { - const contents: any = {}; - if (output.ChangeMessageVisibilityBatchResultEntry === "") { - contents.Successful = []; - } else if (output["ChangeMessageVisibilityBatchResultEntry"] !== undefined) { - contents.Successful = de_ChangeMessageVisibilityBatchResultEntryList( - __getArrayIfSingleItem(output["ChangeMessageVisibilityBatchResultEntry"]), - context - ); - } - if (output.BatchResultErrorEntry === "") { - contents.Failed = []; - } else if (output["BatchResultErrorEntry"] !== undefined) { - contents.Failed = de_BatchResultErrorEntryList(__getArrayIfSingleItem(output["BatchResultErrorEntry"]), context); - } - return contents; -}; - -/** - * deserializeAws_queryChangeMessageVisibilityBatchResultEntry - */ -const de_ChangeMessageVisibilityBatchResultEntry = ( - output: any, - context: __SerdeContext -): ChangeMessageVisibilityBatchResultEntry => { - const contents: any = {}; - if (output["Id"] !== undefined) { - contents.Id = __expectString(output["Id"]); - } - return contents; -}; - -/** - * deserializeAws_queryChangeMessageVisibilityBatchResultEntryList - */ -const de_ChangeMessageVisibilityBatchResultEntryList = ( - output: any, - context: __SerdeContext -): ChangeMessageVisibilityBatchResultEntry[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_ChangeMessageVisibilityBatchResultEntry(entry, context); - }); -}; - -/** - * deserializeAws_queryCreateQueueResult - */ -const de_CreateQueueResult = (output: any, context: __SerdeContext): CreateQueueResult => { - const contents: any = {}; - if (output["QueueUrl"] !== undefined) { - contents.QueueUrl = __expectString(output["QueueUrl"]); - } - return contents; -}; - -/** - * deserializeAws_queryDeleteMessageBatchResult - */ -const de_DeleteMessageBatchResult = (output: any, context: __SerdeContext): DeleteMessageBatchResult => { - const contents: any = {}; - if (output.DeleteMessageBatchResultEntry === "") { - contents.Successful = []; - } else if (output["DeleteMessageBatchResultEntry"] !== undefined) { - contents.Successful = de_DeleteMessageBatchResultEntryList( - __getArrayIfSingleItem(output["DeleteMessageBatchResultEntry"]), - context - ); - } - if (output.BatchResultErrorEntry === "") { - contents.Failed = []; - } else if (output["BatchResultErrorEntry"] !== undefined) { - contents.Failed = de_BatchResultErrorEntryList(__getArrayIfSingleItem(output["BatchResultErrorEntry"]), context); - } - return contents; -}; - -/** - * deserializeAws_queryDeleteMessageBatchResultEntry - */ -const de_DeleteMessageBatchResultEntry = (output: any, context: __SerdeContext): DeleteMessageBatchResultEntry => { - const contents: any = {}; - if (output["Id"] !== undefined) { - contents.Id = __expectString(output["Id"]); - } - return contents; -}; - -/** - * deserializeAws_queryDeleteMessageBatchResultEntryList - */ -const de_DeleteMessageBatchResultEntryList = ( - output: any, - context: __SerdeContext -): DeleteMessageBatchResultEntry[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_DeleteMessageBatchResultEntry(entry, context); - }); -}; - -/** - * deserializeAws_queryEmptyBatchRequest - */ -const de_EmptyBatchRequest = (output: any, context: __SerdeContext): EmptyBatchRequest => { - const contents: any = {}; - return contents; -}; - -/** - * deserializeAws_queryGetQueueAttributesResult - */ -const de_GetQueueAttributesResult = (output: any, context: __SerdeContext): GetQueueAttributesResult => { - const contents: any = {}; - if (output.Attribute === "") { - contents.Attributes = {}; - } else if (output["Attribute"] !== undefined) { - contents.Attributes = de_QueueAttributeMap(__getArrayIfSingleItem(output["Attribute"]), context); - } - return contents; -}; - -/** - * deserializeAws_queryGetQueueUrlResult - */ -const de_GetQueueUrlResult = (output: any, context: __SerdeContext): GetQueueUrlResult => { - const contents: any = {}; - if (output["QueueUrl"] !== undefined) { - contents.QueueUrl = __expectString(output["QueueUrl"]); - } - return contents; -}; - -/** - * deserializeAws_queryInvalidAttributeName - */ -const de_InvalidAttributeName = (output: any, context: __SerdeContext): InvalidAttributeName => { - const contents: any = {}; - return contents; -}; - -/** - * deserializeAws_queryInvalidBatchEntryId - */ -const de_InvalidBatchEntryId = (output: any, context: __SerdeContext): InvalidBatchEntryId => { - const contents: any = {}; - return contents; -}; - -/** - * deserializeAws_queryInvalidIdFormat - */ -const de_InvalidIdFormat = (output: any, context: __SerdeContext): InvalidIdFormat => { - const contents: any = {}; - return contents; -}; - -/** - * deserializeAws_queryInvalidMessageContents - */ -const de_InvalidMessageContents = (output: any, context: __SerdeContext): InvalidMessageContents => { - const contents: any = {}; - return contents; -}; - -/** - * deserializeAws_queryListDeadLetterSourceQueuesResult - */ -const de_ListDeadLetterSourceQueuesResult = ( - output: any, - context: __SerdeContext -): ListDeadLetterSourceQueuesResult => { - const contents: any = {}; - if (output.QueueUrl === "") { - contents.queueUrls = []; - } else if (output["QueueUrl"] !== undefined) { - contents.queueUrls = de_QueueUrlList(__getArrayIfSingleItem(output["QueueUrl"]), context); - } - if (output["NextToken"] !== undefined) { - contents.NextToken = __expectString(output["NextToken"]); - } - return contents; -}; - -/** - * deserializeAws_queryListMessageMoveTasksResult - */ -const de_ListMessageMoveTasksResult = (output: any, context: __SerdeContext): ListMessageMoveTasksResult => { - const contents: any = {}; - if (output.ListMessageMoveTasksResultEntry === "") { - contents.Results = []; - } else if (output["ListMessageMoveTasksResultEntry"] !== undefined) { - contents.Results = de_ListMessageMoveTasksResultEntryList( - __getArrayIfSingleItem(output["ListMessageMoveTasksResultEntry"]), - context - ); - } - return contents; -}; - -/** - * deserializeAws_queryListMessageMoveTasksResultEntry - */ -const de_ListMessageMoveTasksResultEntry = (output: any, context: __SerdeContext): ListMessageMoveTasksResultEntry => { - const contents: any = {}; - if (output["TaskHandle"] !== undefined) { - contents.TaskHandle = __expectString(output["TaskHandle"]); - } - if (output["Status"] !== undefined) { - contents.Status = __expectString(output["Status"]); - } - if (output["SourceArn"] !== undefined) { - contents.SourceArn = __expectString(output["SourceArn"]); - } - if (output["DestinationArn"] !== undefined) { - contents.DestinationArn = __expectString(output["DestinationArn"]); - } - if (output["MaxNumberOfMessagesPerSecond"] !== undefined) { - contents.MaxNumberOfMessagesPerSecond = __strictParseInt32(output["MaxNumberOfMessagesPerSecond"]) as number; - } - if (output["ApproximateNumberOfMessagesMoved"] !== undefined) { - contents.ApproximateNumberOfMessagesMoved = __strictParseLong(output["ApproximateNumberOfMessagesMoved"]) as number; - } - if (output["ApproximateNumberOfMessagesToMove"] !== undefined) { - contents.ApproximateNumberOfMessagesToMove = __strictParseLong( - output["ApproximateNumberOfMessagesToMove"] - ) as number; - } - if (output["FailureReason"] !== undefined) { - contents.FailureReason = __expectString(output["FailureReason"]); - } - if (output["StartedTimestamp"] !== undefined) { - contents.StartedTimestamp = __strictParseLong(output["StartedTimestamp"]) as number; - } - return contents; -}; - -/** - * deserializeAws_queryListMessageMoveTasksResultEntryList - */ -const de_ListMessageMoveTasksResultEntryList = ( - output: any, - context: __SerdeContext -): ListMessageMoveTasksResultEntry[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_ListMessageMoveTasksResultEntry(entry, context); - }); -}; - -/** - * deserializeAws_queryListQueuesResult - */ -const de_ListQueuesResult = (output: any, context: __SerdeContext): ListQueuesResult => { - const contents: any = {}; - if (output["NextToken"] !== undefined) { - contents.NextToken = __expectString(output["NextToken"]); - } - if (output.QueueUrl === "") { - contents.QueueUrls = []; - } else if (output["QueueUrl"] !== undefined) { - contents.QueueUrls = de_QueueUrlList(__getArrayIfSingleItem(output["QueueUrl"]), context); - } - return contents; -}; - -/** - * deserializeAws_queryListQueueTagsResult - */ -const de_ListQueueTagsResult = (output: any, context: __SerdeContext): ListQueueTagsResult => { - const contents: any = {}; - if (output.Tag === "") { - contents.Tags = {}; - } else if (output["Tag"] !== undefined) { - contents.Tags = de_TagMap(__getArrayIfSingleItem(output["Tag"]), context); - } - return contents; -}; - -/** - * deserializeAws_queryMessage - */ -const de_Message = (output: any, context: __SerdeContext): Message => { - const contents: any = {}; - if (output["MessageId"] !== undefined) { - contents.MessageId = __expectString(output["MessageId"]); - } - if (output["ReceiptHandle"] !== undefined) { - contents.ReceiptHandle = __expectString(output["ReceiptHandle"]); - } - if (output["MD5OfBody"] !== undefined) { - contents.MD5OfBody = __expectString(output["MD5OfBody"]); - } - if (output["Body"] !== undefined) { - contents.Body = __expectString(output["Body"]); - } - if (output.Attribute === "") { - contents.Attributes = {}; - } else if (output["Attribute"] !== undefined) { - contents.Attributes = de_MessageSystemAttributeMap(__getArrayIfSingleItem(output["Attribute"]), context); - } - if (output["MD5OfMessageAttributes"] !== undefined) { - contents.MD5OfMessageAttributes = __expectString(output["MD5OfMessageAttributes"]); - } - if (output.MessageAttribute === "") { - contents.MessageAttributes = {}; - } else if (output["MessageAttribute"] !== undefined) { - contents.MessageAttributes = de_MessageBodyAttributeMap( - __getArrayIfSingleItem(output["MessageAttribute"]), - context - ); - } - return contents; -}; - -/** - * deserializeAws_queryMessageAttributeValue - */ -const de_MessageAttributeValue = (output: any, context: __SerdeContext): MessageAttributeValue => { - const contents: any = {}; - if (output["StringValue"] !== undefined) { - contents.StringValue = __expectString(output["StringValue"]); - } - if (output["BinaryValue"] !== undefined) { - contents.BinaryValue = context.base64Decoder(output["BinaryValue"]); - } - if (output.StringListValue === "") { - contents.StringListValues = []; - } else if (output["StringListValue"] !== undefined) { - contents.StringListValues = de_StringList(__getArrayIfSingleItem(output["StringListValue"]), context); - } - if (output.BinaryListValue === "") { - contents.BinaryListValues = []; - } else if (output["BinaryListValue"] !== undefined) { - contents.BinaryListValues = de_BinaryList(__getArrayIfSingleItem(output["BinaryListValue"]), context); - } - if (output["DataType"] !== undefined) { - contents.DataType = __expectString(output["DataType"]); - } - return contents; -}; - -/** - * deserializeAws_queryMessageBodyAttributeMap - */ -const de_MessageBodyAttributeMap = (output: any, context: __SerdeContext): Record => { - return output.reduce((acc: any, pair: any) => { - if (pair["Value"] === null) { - return acc; - } - acc[pair["Name"]] = de_MessageAttributeValue(pair["Value"], context); - return acc; - }, {}); -}; - -/** - * deserializeAws_queryMessageList - */ -const de_MessageList = (output: any, context: __SerdeContext): Message[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_Message(entry, context); - }); -}; - -/** - * deserializeAws_queryMessageNotInflight - */ -const de_MessageNotInflight = (output: any, context: __SerdeContext): MessageNotInflight => { - const contents: any = {}; - return contents; -}; - -/** - * deserializeAws_queryMessageSystemAttributeMap - */ -const de_MessageSystemAttributeMap = ( - output: any, - context: __SerdeContext -): Partial> => { - return output.reduce((acc: any, pair: any) => { - if (pair["Value"] === null) { - return acc; - } - acc[pair["Name"]] = __expectString(pair["Value"]) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_queryOverLimit - */ -const de_OverLimit = (output: any, context: __SerdeContext): OverLimit => { - const contents: any = {}; - return contents; -}; - -/** - * deserializeAws_queryPurgeQueueInProgress - */ -const de_PurgeQueueInProgress = (output: any, context: __SerdeContext): PurgeQueueInProgress => { - const contents: any = {}; - return contents; -}; - -/** - * deserializeAws_queryQueueAttributeMap - */ -const de_QueueAttributeMap = (output: any, context: __SerdeContext): Partial> => { - return output.reduce((acc: any, pair: any) => { - if (pair["Value"] === null) { - return acc; - } - acc[pair["Name"]] = __expectString(pair["Value"]) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_queryQueueDeletedRecently - */ -const de_QueueDeletedRecently = (output: any, context: __SerdeContext): QueueDeletedRecently => { - const contents: any = {}; - return contents; -}; - -/** - * deserializeAws_queryQueueDoesNotExist - */ -const de_QueueDoesNotExist = (output: any, context: __SerdeContext): QueueDoesNotExist => { - const contents: any = {}; - return contents; -}; - -/** - * deserializeAws_queryQueueNameExists - */ -const de_QueueNameExists = (output: any, context: __SerdeContext): QueueNameExists => { - const contents: any = {}; - return contents; -}; - -/** - * deserializeAws_queryQueueUrlList - */ -const de_QueueUrlList = (output: any, context: __SerdeContext): string[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return __expectString(entry) as any; - }); -}; - -/** - * deserializeAws_queryReceiptHandleIsInvalid - */ -const de_ReceiptHandleIsInvalid = (output: any, context: __SerdeContext): ReceiptHandleIsInvalid => { - const contents: any = {}; - return contents; -}; - -/** - * deserializeAws_queryReceiveMessageResult - */ -const de_ReceiveMessageResult = (output: any, context: __SerdeContext): ReceiveMessageResult => { - const contents: any = {}; - if (output.Message === "") { - contents.Messages = []; - } else if (output["Message"] !== undefined) { - contents.Messages = de_MessageList(__getArrayIfSingleItem(output["Message"]), context); - } - return contents; -}; - -/** - * deserializeAws_queryResourceNotFoundException - */ -const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { - const contents: any = {}; - return contents; -}; - -/** - * deserializeAws_querySendMessageBatchResult - */ -const de_SendMessageBatchResult = (output: any, context: __SerdeContext): SendMessageBatchResult => { - const contents: any = {}; - if (output.SendMessageBatchResultEntry === "") { - contents.Successful = []; - } else if (output["SendMessageBatchResultEntry"] !== undefined) { - contents.Successful = de_SendMessageBatchResultEntryList( - __getArrayIfSingleItem(output["SendMessageBatchResultEntry"]), - context - ); - } - if (output.BatchResultErrorEntry === "") { - contents.Failed = []; - } else if (output["BatchResultErrorEntry"] !== undefined) { - contents.Failed = de_BatchResultErrorEntryList(__getArrayIfSingleItem(output["BatchResultErrorEntry"]), context); - } - return contents; -}; - -/** - * deserializeAws_querySendMessageBatchResultEntry - */ -const de_SendMessageBatchResultEntry = (output: any, context: __SerdeContext): SendMessageBatchResultEntry => { - const contents: any = {}; - if (output["Id"] !== undefined) { - contents.Id = __expectString(output["Id"]); - } - if (output["MessageId"] !== undefined) { - contents.MessageId = __expectString(output["MessageId"]); - } - if (output["MD5OfMessageBody"] !== undefined) { - contents.MD5OfMessageBody = __expectString(output["MD5OfMessageBody"]); - } - if (output["MD5OfMessageAttributes"] !== undefined) { - contents.MD5OfMessageAttributes = __expectString(output["MD5OfMessageAttributes"]); - } - if (output["MD5OfMessageSystemAttributes"] !== undefined) { - contents.MD5OfMessageSystemAttributes = __expectString(output["MD5OfMessageSystemAttributes"]); - } - if (output["SequenceNumber"] !== undefined) { - contents.SequenceNumber = __expectString(output["SequenceNumber"]); - } - return contents; -}; - -/** - * deserializeAws_querySendMessageBatchResultEntryList - */ -const de_SendMessageBatchResultEntryList = (output: any, context: __SerdeContext): SendMessageBatchResultEntry[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_SendMessageBatchResultEntry(entry, context); - }); -}; - -/** - * deserializeAws_querySendMessageResult - */ -const de_SendMessageResult = (output: any, context: __SerdeContext): SendMessageResult => { - const contents: any = {}; - if (output["MD5OfMessageBody"] !== undefined) { - contents.MD5OfMessageBody = __expectString(output["MD5OfMessageBody"]); - } - if (output["MD5OfMessageAttributes"] !== undefined) { - contents.MD5OfMessageAttributes = __expectString(output["MD5OfMessageAttributes"]); - } - if (output["MD5OfMessageSystemAttributes"] !== undefined) { - contents.MD5OfMessageSystemAttributes = __expectString(output["MD5OfMessageSystemAttributes"]); - } - if (output["MessageId"] !== undefined) { - contents.MessageId = __expectString(output["MessageId"]); - } - if (output["SequenceNumber"] !== undefined) { - contents.SequenceNumber = __expectString(output["SequenceNumber"]); - } - return contents; -}; - -/** - * deserializeAws_queryStartMessageMoveTaskResult - */ -const de_StartMessageMoveTaskResult = (output: any, context: __SerdeContext): StartMessageMoveTaskResult => { - const contents: any = {}; - if (output["TaskHandle"] !== undefined) { - contents.TaskHandle = __expectString(output["TaskHandle"]); - } - return contents; -}; - -/** - * deserializeAws_queryStringList - */ -const de_StringList = (output: any, context: __SerdeContext): string[] => { - return (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return __expectString(entry) as any; - }); -}; - -/** - * deserializeAws_queryTagMap - */ -const de_TagMap = (output: any, context: __SerdeContext): Record => { - return output.reduce((acc: any, pair: any) => { - if (pair["Value"] === null) { - return acc; - } - acc[pair["Key"]] = __expectString(pair["Value"]) as any; - return acc; - }, {}); -}; - -/** - * deserializeAws_queryTooManyEntriesInBatchRequest - */ -const de_TooManyEntriesInBatchRequest = (output: any, context: __SerdeContext): TooManyEntriesInBatchRequest => { - const contents: any = {}; - return contents; -}; - -/** - * deserializeAws_queryUnsupportedOperation - */ -const de_UnsupportedOperation = (output: any, context: __SerdeContext): UnsupportedOperation => { - const contents: any = {}; - return contents; -}; - -const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ - httpStatusCode: output.statusCode, - requestId: - output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], - extendedRequestId: output.headers["x-amz-id-2"], - cfId: output.headers["x-amz-cf-id"], -}); - -// Encode Uint8Array data into string with utf-8. -const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => - collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); - -const throwDefaultError = withBaseException(__BaseException); -const buildHttpRpcRequest = async ( - context: __SerdeContext, - headers: __HeaderBag, - path: string, - resolvedHostname: string | undefined, - body: any -): Promise<__HttpRequest> => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const contents: any = { - protocol, - hostname, - port, - method: "POST", - path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, - headers, - }; - if (resolvedHostname !== undefined) { - contents.hostname = resolvedHostname; - } - if (body !== undefined) { - contents.body = body; - } - return new __HttpRequest(contents); -}; -const SHARED_HEADERS: __HeaderBag = { - "content-type": "application/x-www-form-urlencoded", -}; - -const parseBody = (streamBody: any, context: __SerdeContext): any => - collectBodyString(streamBody, context).then((encoded) => { - if (encoded.length) { - const parser = new XMLParser({ - attributeNamePrefix: "", - htmlEntities: true, - ignoreAttributes: false, - ignoreDeclaration: true, - parseTagValue: false, - trimValues: false, - tagValueProcessor: (_: any, val: any) => (val.trim() === "" && val.includes("\n") ? "" : undefined), - }); - parser.addEntity("#xD", "\r"); - parser.addEntity("#10", "\n"); - const parsedObj = parser.parse(encoded); - const textNodeName = "#text"; - const key = Object.keys(parsedObj)[0]; - const parsedObjToReturn = parsedObj[key]; - if (parsedObjToReturn[textNodeName]) { - parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; - delete parsedObjToReturn[textNodeName]; - } - return __getValueFromTextNode(parsedObjToReturn); - } - return {}; - }); - -const parseErrorBody = async (errorBody: any, context: __SerdeContext) => { - const value = await parseBody(errorBody, context); - if (value.Error) { - value.Error.message = value.Error.message ?? value.Error.Message; - } - return value; -}; - -const buildFormUrlencodedString = (formEntries: Record): string => - Object.entries(formEntries) - .map(([key, value]) => __extendedEncodeURIComponent(key) + "=" + __extendedEncodeURIComponent(value)) - .join("&"); - -const loadQueryErrorCode = (output: __HttpResponse, data: any): string | undefined => { - if (data.Error?.Code !== undefined) { - return data.Error.Code; - } - if (output.statusCode == 404) { - return "NotFound"; - } -}; diff --git a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddAwsRuntimeConfig.java b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddAwsRuntimeConfig.java index a592498c92e59..22346473bad31 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddAwsRuntimeConfig.java +++ b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddAwsRuntimeConfig.java @@ -133,6 +133,17 @@ public Map> getRuntimeConfigWriters( return runtimeConfigs; } + @Override + public List getClientPlugins() { + return List.of( + RuntimeClientPlugin.builder() + .withConventions(AwsDependency.AWS_SDK_CORE.dependency, "AwsQueryCompatible", + HAS_MIDDLEWARE) + .servicePredicate((m, s) -> s.getTrait) + .build() + ); + } + @Override public List getExtensionConfigurationInterfaces() { return List.of(new AwsRegionExtensionConfiguration()); diff --git a/packages/core/src/protocols/index.ts b/packages/core/src/protocols/index.ts index a7355be28f66c..f35c6f32f1c53 100644 --- a/packages/core/src/protocols/index.ts +++ b/packages/core/src/protocols/index.ts @@ -1 +1,2 @@ export * from "./json/awsExpectUnion"; +export * from "./json/awsQueryCompatibleMiddleware"; From e95c4330254e94f63df6daaf849ad1d2549b50a6 Mon Sep 17 00:00:00 2001 From: George Fu Date: Tue, 31 Oct 2023 18:27:28 +0000 Subject: [PATCH 3/5] chore(client-sqs): create coercing serializers for awsQueryCompat --- .../client-sqs/src/protocols/Aws_json1_0.ts | 445 +++++++++++++++--- .../codegen/AddAwsRuntimeConfig.java | 11 - .../codegen/JsonMemberSerVisitor.java | 84 +++- .../codegen/JsonRpcProtocolGenerator.java | 20 +- .../codegen/JsonShapeSerVisitor.java | 27 ++ .../codegen/RestJsonProtocolGenerator.java | 5 +- .../protocols/coercing-serializers.spec.ts | 76 +++ .../src/protocols/coercing-serializers.ts | 69 +++ packages/core/src/protocols/index.ts | 2 +- 9 files changed, 649 insertions(+), 90 deletions(-) create mode 100644 packages/core/src/protocols/coercing-serializers.spec.ts create mode 100644 packages/core/src/protocols/coercing-serializers.ts diff --git a/clients/client-sqs/src/protocols/Aws_json1_0.ts b/clients/client-sqs/src/protocols/Aws_json1_0.ts index d4942220ce1ec..d07f7ea05c2bc 100644 --- a/clients/client-sqs/src/protocols/Aws_json1_0.ts +++ b/clients/client-sqs/src/protocols/Aws_json1_0.ts @@ -1,4 +1,5 @@ // smithy-typescript generated code +import { _toBool, _toNum, _toStr } from "@aws-sdk/core"; import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; import { _json, @@ -129,7 +130,7 @@ export const se_AddPermissionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("AddPermission"); let body: any; - body = JSON.stringify(_json(input)); + body = JSON.stringify(se_AddPermissionRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -142,7 +143,7 @@ export const se_CancelMessageMoveTaskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CancelMessageMoveTask"); let body: any; - body = JSON.stringify(_json(input)); + body = JSON.stringify(se_CancelMessageMoveTaskRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -155,7 +156,7 @@ export const se_ChangeMessageVisibilityCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ChangeMessageVisibility"); let body: any; - body = JSON.stringify(_json(input)); + body = JSON.stringify(se_ChangeMessageVisibilityRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -168,7 +169,7 @@ export const se_ChangeMessageVisibilityBatchCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ChangeMessageVisibilityBatch"); let body: any; - body = JSON.stringify(_json(input)); + body = JSON.stringify(se_ChangeMessageVisibilityBatchRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -181,7 +182,7 @@ export const se_CreateQueueCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("CreateQueue"); let body: any; - body = JSON.stringify(_json(input)); + body = JSON.stringify(se_CreateQueueRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -194,7 +195,7 @@ export const se_DeleteMessageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteMessage"); let body: any; - body = JSON.stringify(_json(input)); + body = JSON.stringify(se_DeleteMessageRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -207,7 +208,7 @@ export const se_DeleteMessageBatchCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteMessageBatch"); let body: any; - body = JSON.stringify(_json(input)); + body = JSON.stringify(se_DeleteMessageBatchRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -220,7 +221,7 @@ export const se_DeleteQueueCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("DeleteQueue"); let body: any; - body = JSON.stringify(_json(input)); + body = JSON.stringify(se_DeleteQueueRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -233,7 +234,7 @@ export const se_GetQueueAttributesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetQueueAttributes"); let body: any; - body = JSON.stringify(_json(input)); + body = JSON.stringify(se_GetQueueAttributesRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -246,7 +247,7 @@ export const se_GetQueueUrlCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("GetQueueUrl"); let body: any; - body = JSON.stringify(_json(input)); + body = JSON.stringify(se_GetQueueUrlRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -259,7 +260,7 @@ export const se_ListDeadLetterSourceQueuesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListDeadLetterSourceQueues"); let body: any; - body = JSON.stringify(_json(input)); + body = JSON.stringify(se_ListDeadLetterSourceQueuesRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -272,7 +273,7 @@ export const se_ListMessageMoveTasksCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListMessageMoveTasks"); let body: any; - body = JSON.stringify(_json(input)); + body = JSON.stringify(se_ListMessageMoveTasksRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -285,7 +286,7 @@ export const se_ListQueuesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListQueues"); let body: any; - body = JSON.stringify(_json(input)); + body = JSON.stringify(se_ListQueuesRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -298,7 +299,7 @@ export const se_ListQueueTagsCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ListQueueTags"); let body: any; - body = JSON.stringify(_json(input)); + body = JSON.stringify(se_ListQueueTagsRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -311,7 +312,7 @@ export const se_PurgeQueueCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("PurgeQueue"); let body: any; - body = JSON.stringify(_json(input)); + body = JSON.stringify(se_PurgeQueueRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -324,7 +325,7 @@ export const se_ReceiveMessageCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("ReceiveMessage"); let body: any; - body = JSON.stringify(_json(input)); + body = JSON.stringify(se_ReceiveMessageRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -337,7 +338,7 @@ export const se_RemovePermissionCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("RemovePermission"); let body: any; - body = JSON.stringify(_json(input)); + body = JSON.stringify(se_RemovePermissionRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -376,7 +377,7 @@ export const se_SetQueueAttributesCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("SetQueueAttributes"); let body: any; - body = JSON.stringify(_json(input)); + body = JSON.stringify(se_SetQueueAttributesRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -389,7 +390,7 @@ export const se_StartMessageMoveTaskCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("StartMessageMoveTask"); let body: any; - body = JSON.stringify(_json(input)); + body = JSON.stringify(se_StartMessageMoveTaskRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -402,7 +403,7 @@ export const se_TagQueueCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("TagQueue"); let body: any; - body = JSON.stringify(_json(input)); + body = JSON.stringify(se_TagQueueRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -415,7 +416,7 @@ export const se_UntagQueueCommand = async ( ): Promise<__HttpRequest> => { const headers: __HeaderBag = sharedHeaders("UntagQueue"); let body: any; - body = JSON.stringify(_json(input)); + body = JSON.stringify(se_UntagQueueRequest(input, context)); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; @@ -2287,13 +2288,50 @@ const de_UnsupportedOperationRes = async ( return __decorateServiceException(exception, body); }; -// se_ActionNameList omitted. +/** + * serializeAws_json1_0ActionNameList + */ +const se_ActionNameList = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return _toStr(entry); + }); +}; -// se_AddPermissionRequest omitted. +/** + * serializeAws_json1_0AddPermissionRequest + */ +const se_AddPermissionRequest = (input: AddPermissionRequest, context: __SerdeContext): any => { + return take(input, { + AWSAccountIds: (_) => se_AWSAccountIdList(_, context), + Actions: (_) => se_ActionNameList(_, context), + Label: _toStr, + QueueUrl: _toStr, + }); +}; -// se_AttributeNameList omitted. +/** + * serializeAws_json1_0AttributeNameList + */ +const se_AttributeNameList = (input: QueueAttributeName[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return _toStr(entry); + }); +}; -// se_AWSAccountIdList omitted. +/** + * serializeAws_json1_0AWSAccountIdList + */ +const se_AWSAccountIdList = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return _toStr(entry); + }); +}; /** * serializeAws_json1_0BinaryList @@ -2306,41 +2344,205 @@ const se_BinaryList = (input: Uint8Array[], context: __SerdeContext): any => { }); }; -// se_CancelMessageMoveTaskRequest omitted. +/** + * serializeAws_json1_0CancelMessageMoveTaskRequest + */ +const se_CancelMessageMoveTaskRequest = (input: CancelMessageMoveTaskRequest, context: __SerdeContext): any => { + return take(input, { + TaskHandle: _toStr, + }); +}; -// se_ChangeMessageVisibilityBatchRequest omitted. +/** + * serializeAws_json1_0ChangeMessageVisibilityBatchRequest + */ +const se_ChangeMessageVisibilityBatchRequest = ( + input: ChangeMessageVisibilityBatchRequest, + context: __SerdeContext +): any => { + return take(input, { + Entries: (_) => se_ChangeMessageVisibilityBatchRequestEntryList(_, context), + QueueUrl: _toStr, + }); +}; -// se_ChangeMessageVisibilityBatchRequestEntry omitted. +/** + * serializeAws_json1_0ChangeMessageVisibilityBatchRequestEntry + */ +const se_ChangeMessageVisibilityBatchRequestEntry = ( + input: ChangeMessageVisibilityBatchRequestEntry, + context: __SerdeContext +): any => { + return take(input, { + Id: _toStr, + ReceiptHandle: _toStr, + VisibilityTimeout: _toNum, + }); +}; -// se_ChangeMessageVisibilityBatchRequestEntryList omitted. +/** + * serializeAws_json1_0ChangeMessageVisibilityBatchRequestEntryList + */ +const se_ChangeMessageVisibilityBatchRequestEntryList = ( + input: ChangeMessageVisibilityBatchRequestEntry[], + context: __SerdeContext +): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_ChangeMessageVisibilityBatchRequestEntry(entry, context); + }); +}; -// se_ChangeMessageVisibilityRequest omitted. +/** + * serializeAws_json1_0ChangeMessageVisibilityRequest + */ +const se_ChangeMessageVisibilityRequest = (input: ChangeMessageVisibilityRequest, context: __SerdeContext): any => { + return take(input, { + QueueUrl: _toStr, + ReceiptHandle: _toStr, + VisibilityTimeout: _toNum, + }); +}; -// se_CreateQueueRequest omitted. +/** + * serializeAws_json1_0CreateQueueRequest + */ +const se_CreateQueueRequest = (input: CreateQueueRequest, context: __SerdeContext): any => { + return take(input, { + Attributes: (_) => se_QueueAttributeMap(_, context), + QueueName: _toStr, + tags: (_) => se_TagMap(_, context), + }); +}; -// se_DeleteMessageBatchRequest omitted. +/** + * serializeAws_json1_0DeleteMessageBatchRequest + */ +const se_DeleteMessageBatchRequest = (input: DeleteMessageBatchRequest, context: __SerdeContext): any => { + return take(input, { + Entries: (_) => se_DeleteMessageBatchRequestEntryList(_, context), + QueueUrl: _toStr, + }); +}; -// se_DeleteMessageBatchRequestEntry omitted. +/** + * serializeAws_json1_0DeleteMessageBatchRequestEntry + */ +const se_DeleteMessageBatchRequestEntry = (input: DeleteMessageBatchRequestEntry, context: __SerdeContext): any => { + return take(input, { + Id: _toStr, + ReceiptHandle: _toStr, + }); +}; -// se_DeleteMessageBatchRequestEntryList omitted. +/** + * serializeAws_json1_0DeleteMessageBatchRequestEntryList + */ +const se_DeleteMessageBatchRequestEntryList = ( + input: DeleteMessageBatchRequestEntry[], + context: __SerdeContext +): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return se_DeleteMessageBatchRequestEntry(entry, context); + }); +}; -// se_DeleteMessageRequest omitted. +/** + * serializeAws_json1_0DeleteMessageRequest + */ +const se_DeleteMessageRequest = (input: DeleteMessageRequest, context: __SerdeContext): any => { + return take(input, { + QueueUrl: _toStr, + ReceiptHandle: _toStr, + }); +}; -// se_DeleteQueueRequest omitted. +/** + * serializeAws_json1_0DeleteQueueRequest + */ +const se_DeleteQueueRequest = (input: DeleteQueueRequest, context: __SerdeContext): any => { + return take(input, { + QueueUrl: _toStr, + }); +}; -// se_GetQueueAttributesRequest omitted. +/** + * serializeAws_json1_0GetQueueAttributesRequest + */ +const se_GetQueueAttributesRequest = (input: GetQueueAttributesRequest, context: __SerdeContext): any => { + return take(input, { + AttributeNames: (_) => se_AttributeNameList(_, context), + QueueUrl: _toStr, + }); +}; -// se_GetQueueUrlRequest omitted. +/** + * serializeAws_json1_0GetQueueUrlRequest + */ +const se_GetQueueUrlRequest = (input: GetQueueUrlRequest, context: __SerdeContext): any => { + return take(input, { + QueueName: _toStr, + QueueOwnerAWSAccountId: _toStr, + }); +}; -// se_ListDeadLetterSourceQueuesRequest omitted. +/** + * serializeAws_json1_0ListDeadLetterSourceQueuesRequest + */ +const se_ListDeadLetterSourceQueuesRequest = ( + input: ListDeadLetterSourceQueuesRequest, + context: __SerdeContext +): any => { + return take(input, { + MaxResults: _toNum, + NextToken: _toStr, + QueueUrl: _toStr, + }); +}; -// se_ListMessageMoveTasksRequest omitted. +/** + * serializeAws_json1_0ListMessageMoveTasksRequest + */ +const se_ListMessageMoveTasksRequest = (input: ListMessageMoveTasksRequest, context: __SerdeContext): any => { + return take(input, { + MaxResults: _toNum, + SourceArn: _toStr, + }); +}; -// se_ListQueuesRequest omitted. +/** + * serializeAws_json1_0ListQueuesRequest + */ +const se_ListQueuesRequest = (input: ListQueuesRequest, context: __SerdeContext): any => { + return take(input, { + MaxResults: _toNum, + NextToken: _toStr, + QueueNamePrefix: _toStr, + }); +}; -// se_ListQueueTagsRequest omitted. +/** + * serializeAws_json1_0ListQueueTagsRequest + */ +const se_ListQueueTagsRequest = (input: ListQueueTagsRequest, context: __SerdeContext): any => { + return take(input, { + QueueUrl: _toStr, + }); +}; -// se_MessageAttributeNameList omitted. +/** + * serializeAws_json1_0MessageAttributeNameList + */ +const se_MessageAttributeNameList = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return _toStr(entry); + }); +}; /** * serializeAws_json1_0MessageAttributeValue @@ -2349,9 +2551,9 @@ const se_MessageAttributeValue = (input: MessageAttributeValue, context: __Serde return take(input, { BinaryListValues: (_) => se_BinaryList(_, context), BinaryValue: context.base64Encoder, - DataType: [], - StringListValues: _json, - StringValue: [], + DataType: _toStr, + StringListValues: (_) => se_StringList(_, context), + StringValue: _toStr, }); }; @@ -2394,19 +2596,58 @@ const se_MessageSystemAttributeValue = (input: MessageSystemAttributeValue, cont return take(input, { BinaryListValues: (_) => se_BinaryList(_, context), BinaryValue: context.base64Encoder, - DataType: [], - StringListValues: _json, - StringValue: [], + DataType: _toStr, + StringListValues: (_) => se_StringList(_, context), + StringValue: _toStr, }); }; -// se_PurgeQueueRequest omitted. +/** + * serializeAws_json1_0PurgeQueueRequest + */ +const se_PurgeQueueRequest = (input: PurgeQueueRequest, context: __SerdeContext): any => { + return take(input, { + QueueUrl: _toStr, + }); +}; -// se_QueueAttributeMap omitted. +/** + * serializeAws_json1_0QueueAttributeMap + */ +const se_QueueAttributeMap = (input: Partial>, context: __SerdeContext): any => { + return Object.entries(input).reduce((acc: Record, [key, value]: [QueueAttributeName | string, any]) => { + if (value === null) { + return acc; + } + acc[key] = _toStr(value); + return acc; + }, {}); +}; -// se_ReceiveMessageRequest omitted. +/** + * serializeAws_json1_0ReceiveMessageRequest + */ +const se_ReceiveMessageRequest = (input: ReceiveMessageRequest, context: __SerdeContext): any => { + return take(input, { + AttributeNames: (_) => se_AttributeNameList(_, context), + MaxNumberOfMessages: _toNum, + MessageAttributeNames: (_) => se_MessageAttributeNameList(_, context), + QueueUrl: _toStr, + ReceiveRequestAttemptId: _toStr, + VisibilityTimeout: _toNum, + WaitTimeSeconds: _toNum, + }); +}; -// se_RemovePermissionRequest omitted. +/** + * serializeAws_json1_0RemovePermissionRequest + */ +const se_RemovePermissionRequest = (input: RemovePermissionRequest, context: __SerdeContext): any => { + return take(input, { + Label: _toStr, + QueueUrl: _toStr, + }); +}; /** * serializeAws_json1_0SendMessageBatchRequest @@ -2414,7 +2655,7 @@ const se_MessageSystemAttributeValue = (input: MessageSystemAttributeValue, cont const se_SendMessageBatchRequest = (input: SendMessageBatchRequest, context: __SerdeContext): any => { return take(input, { Entries: (_) => se_SendMessageBatchRequestEntryList(_, context), - QueueUrl: [], + QueueUrl: _toStr, }); }; @@ -2423,12 +2664,12 @@ const se_SendMessageBatchRequest = (input: SendMessageBatchRequest, context: __S */ const se_SendMessageBatchRequestEntry = (input: SendMessageBatchRequestEntry, context: __SerdeContext): any => { return take(input, { - DelaySeconds: [], - Id: [], + DelaySeconds: _toNum, + Id: _toStr, MessageAttributes: (_) => se_MessageBodyAttributeMap(_, context), - MessageBody: [], - MessageDeduplicationId: [], - MessageGroupId: [], + MessageBody: _toStr, + MessageDeduplicationId: _toStr, + MessageGroupId: _toStr, MessageSystemAttributes: (_) => se_MessageBodySystemAttributeMap(_, context), }); }; @@ -2449,29 +2690,91 @@ const se_SendMessageBatchRequestEntryList = (input: SendMessageBatchRequestEntry */ const se_SendMessageRequest = (input: SendMessageRequest, context: __SerdeContext): any => { return take(input, { - DelaySeconds: [], + DelaySeconds: _toNum, MessageAttributes: (_) => se_MessageBodyAttributeMap(_, context), - MessageBody: [], - MessageDeduplicationId: [], - MessageGroupId: [], + MessageBody: _toStr, + MessageDeduplicationId: _toStr, + MessageGroupId: _toStr, MessageSystemAttributes: (_) => se_MessageBodySystemAttributeMap(_, context), - QueueUrl: [], + QueueUrl: _toStr, }); }; -// se_SetQueueAttributesRequest omitted. +/** + * serializeAws_json1_0SetQueueAttributesRequest + */ +const se_SetQueueAttributesRequest = (input: SetQueueAttributesRequest, context: __SerdeContext): any => { + return take(input, { + Attributes: (_) => se_QueueAttributeMap(_, context), + QueueUrl: _toStr, + }); +}; -// se_StartMessageMoveTaskRequest omitted. +/** + * serializeAws_json1_0StartMessageMoveTaskRequest + */ +const se_StartMessageMoveTaskRequest = (input: StartMessageMoveTaskRequest, context: __SerdeContext): any => { + return take(input, { + DestinationArn: _toStr, + MaxNumberOfMessagesPerSecond: _toNum, + SourceArn: _toStr, + }); +}; -// se_StringList omitted. +/** + * serializeAws_json1_0StringList + */ +const se_StringList = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return _toStr(entry); + }); +}; -// se_TagKeyList omitted. +/** + * serializeAws_json1_0TagKeyList + */ +const se_TagKeyList = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return _toStr(entry); + }); +}; -// se_TagMap omitted. +/** + * serializeAws_json1_0TagMap + */ +const se_TagMap = (input: Record, context: __SerdeContext): any => { + return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + acc[key] = _toStr(value); + return acc; + }, {}); +}; -// se_TagQueueRequest omitted. +/** + * serializeAws_json1_0TagQueueRequest + */ +const se_TagQueueRequest = (input: TagQueueRequest, context: __SerdeContext): any => { + return take(input, { + QueueUrl: _toStr, + Tags: (_) => se_TagMap(_, context), + }); +}; -// se_UntagQueueRequest omitted. +/** + * serializeAws_json1_0UntagQueueRequest + */ +const se_UntagQueueRequest = (input: UntagQueueRequest, context: __SerdeContext): any => { + return take(input, { + QueueUrl: _toStr, + TagKeys: (_) => se_TagKeyList(_, context), + }); +}; // de_BatchEntryIdsNotDistinct omitted. diff --git a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddAwsRuntimeConfig.java b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddAwsRuntimeConfig.java index 22346473bad31..a592498c92e59 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddAwsRuntimeConfig.java +++ b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/AddAwsRuntimeConfig.java @@ -133,17 +133,6 @@ public Map> getRuntimeConfigWriters( return runtimeConfigs; } - @Override - public List getClientPlugins() { - return List.of( - RuntimeClientPlugin.builder() - .withConventions(AwsDependency.AWS_SDK_CORE.dependency, "AwsQueryCompatible", - HAS_MIDDLEWARE) - .servicePredicate((m, s) -> s.getTrait) - .build() - ); - } - @Override public List getExtensionConfigurationInterfaces() { return List.of(new AwsRegionExtensionConfiguration()); diff --git a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonMemberSerVisitor.java b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonMemberSerVisitor.java index fdc4b94ba970d..b0ef737cdbf57 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonMemberSerVisitor.java +++ b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonMemberSerVisitor.java @@ -15,12 +15,21 @@ package software.amazon.smithy.aws.typescript.codegen; +import software.amazon.smithy.aws.traits.protocols.AwsQueryCompatibleTrait; import software.amazon.smithy.codegen.core.CodegenException; import software.amazon.smithy.model.shapes.BigDecimalShape; import software.amazon.smithy.model.shapes.BigIntegerShape; +import software.amazon.smithy.model.shapes.BooleanShape; +import software.amazon.smithy.model.shapes.DoubleShape; +import software.amazon.smithy.model.shapes.FloatShape; +import software.amazon.smithy.model.shapes.IntegerShape; +import software.amazon.smithy.model.shapes.LongShape; import software.amazon.smithy.model.shapes.Shape; +import software.amazon.smithy.model.shapes.ShortShape; +import software.amazon.smithy.model.shapes.StringShape; import software.amazon.smithy.model.traits.TimestampFormatTrait.Format; import software.amazon.smithy.typescript.codegen.TypeScriptDependency; +import software.amazon.smithy.typescript.codegen.TypeScriptWriter; import software.amazon.smithy.typescript.codegen.integration.DocumentMemberSerVisitor; import software.amazon.smithy.typescript.codegen.integration.ProtocolGenerator.GenerationContext; import software.amazon.smithy.utils.SmithyInternalApi; @@ -33,14 +42,22 @@ */ @SmithyInternalApi final class JsonMemberSerVisitor extends DocumentMemberSerVisitor { + private final boolean isAwsQueryCompat; /** * @inheritDoc */ JsonMemberSerVisitor(GenerationContext context, String dataSource, Format defaultTimestampFormat) { super(context, dataSource, defaultTimestampFormat); - context.getWriter().addImport("_json", null, TypeScriptDependency.AWS_SMITHY_CLIENT); - this.serdeElisionEnabled = !context.getSettings().generateServerSdk(); + TypeScriptWriter writer = context.getWriter(); + writer.addImport("_json", null, TypeScriptDependency.AWS_SMITHY_CLIENT); + this.isAwsQueryCompat = context.getService().hasTrait(AwsQueryCompatibleTrait.class); + this.serdeElisionEnabled = !this.isAwsQueryCompat && !context.getSettings().generateServerSdk(); + if (isAwsQueryCompat) { + writer.addImport("_toStr", null, AwsDependency.AWS_SDK_CORE); + writer.addImport("_toNum", null, AwsDependency.AWS_SDK_CORE); + writer.addImport("_toBool", null, AwsDependency.AWS_SDK_CORE); + } } @Override @@ -55,6 +72,69 @@ public String bigIntegerShape(BigIntegerShape shape) { return unsupportedShape(shape); } + @Override + public String shortShape(ShortShape shape) { + String base = super.shortShape(shape); + if (isAwsQueryCompat) { + return "_toNum(" + base + ")"; + } + return base; + } + + @Override + public String integerShape(IntegerShape shape) { + String base = super.integerShape(shape); + if (isAwsQueryCompat) { + return "_toNum(" + base + ")"; + } + return base; + } + + @Override + public String longShape(LongShape shape) { + String base = super.longShape(shape); + if (isAwsQueryCompat) { + return "_toNum(" + base + ")"; + } + return base; + } + + @Override + public String floatShape(FloatShape shape) { + String base = super.floatShape(shape); + if (isAwsQueryCompat) { + return "_toNum(" + base + ")"; + } + return base; + } + + @Override + public String doubleShape(DoubleShape shape) { + String base = super.doubleShape(shape); + if (isAwsQueryCompat) { + return "_toNum(" + base + ")"; + } + return base; + } + + @Override + public String booleanShape(BooleanShape shape) { + String base = super.booleanShape(shape); + if (isAwsQueryCompat) { + return "_toBool(" + base + ")"; + } + return base; + } + + @Override + public String stringShape(StringShape shape) { + String base = super.stringShape(shape); + if (isAwsQueryCompat) { + return "_toStr(" + base + ")"; + } + return base; + } + private String unsupportedShape(Shape shape) { throw new CodegenException(String.format("Cannot serialize shape type %s on protocol, shape: %s.", shape.getType(), shape.getId())); diff --git a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonRpcProtocolGenerator.java b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonRpcProtocolGenerator.java index d70c5db3091b2..c962225d717d9 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonRpcProtocolGenerator.java +++ b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonRpcProtocolGenerator.java @@ -66,16 +66,28 @@ protected Format getDocumentTimestampFormat() { @Override protected void generateDocumentBodyShapeSerializers(GenerationContext context, Set shapes) { + boolean isAwsQueryCompat = context.getService().hasTrait(AwsQueryCompatibleTrait.class); + AwsProtocolUtils.generateDocumentBodyShapeSerde(context, shapes, - // AWS JSON does not support jsonName - new JsonShapeSerVisitor(context, (shape, name) -> name, enableSerdeElision())); + // AWS JSON does not support jsonName + new JsonShapeSerVisitor( + context, + (shape, name) -> name, + !isAwsQueryCompat && enableSerdeElision() + ) + ); } @Override protected void generateDocumentBodyShapeDeserializers(GenerationContext context, Set shapes) { AwsProtocolUtils.generateDocumentBodyShapeSerde(context, shapes, - // AWS JSON does not support jsonName - new JsonShapeDeserVisitor(context, (shape, name) -> name, enableSerdeElision())); + // AWS JSON does not support jsonName + new JsonShapeDeserVisitor( + context, + (shape, name) -> name, + enableSerdeElision() + ) + ); } @Override diff --git a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonShapeSerVisitor.java b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonShapeSerVisitor.java index 06d17bc7ce22f..949f87d5e1078 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonShapeSerVisitor.java +++ b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonShapeSerVisitor.java @@ -15,9 +15,12 @@ package software.amazon.smithy.aws.typescript.codegen; +import java.lang.reflect.Member; import java.util.Map; import java.util.TreeMap; import java.util.function.BiFunction; + +import software.amazon.smithy.aws.traits.protocols.AwsQueryCompatibleTrait; import software.amazon.smithy.aws.typescript.codegen.validation.UnaryFunctionCall; import software.amazon.smithy.codegen.core.Symbol; import software.amazon.smithy.codegen.core.SymbolProvider; @@ -166,6 +169,11 @@ public void serializeStructure(GenerationContext context, StructureShape shape) TIMESTAMP_FORMAT, "_") : target.accept(getMemberVisitor("_"))); String valueProvider = "_ => " + valueExpression; + + if (context.getService().hasTrait(AwsQueryCompatibleTrait.class)) { + + } + boolean isUnaryCall = UnaryFunctionCall.check(valueExpression); if (hasJsonName) { @@ -219,4 +227,23 @@ public void serializeUnion(GenerationContext context, UnionShape shape) { writer.write("_: (name, value) => ({ name: value } as any)"); }); } + + private boolean isNumeric(Shape target) { + return target.isIntegerShape() || + target.isFloatShape() || + target.isBigIntegerShape() || + target.isBigDecimalShape() || + target.isIntEnumShape() || + target.isDoubleShape() || + target.isShortShape() || + target.isLongShape(); + } + + private boolean isString(Shape target) { + return target.isStringShape(); + } + + private boolean isBoolean(Shape target) { + return target.isBooleanShape(); + } } diff --git a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/RestJsonProtocolGenerator.java b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/RestJsonProtocolGenerator.java index 46bd394480612..59d3b094fd063 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/RestJsonProtocolGenerator.java +++ b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/RestJsonProtocolGenerator.java @@ -17,6 +17,8 @@ import java.util.List; import java.util.Set; + +import software.amazon.smithy.aws.traits.protocols.AwsQueryCompatibleTrait; import software.amazon.smithy.aws.typescript.codegen.validation.UnaryFunctionCall; import software.amazon.smithy.codegen.core.SymbolProvider; import software.amazon.smithy.model.knowledge.HttpBinding; @@ -69,8 +71,9 @@ protected TimestampFormatTrait.Format getDocumentTimestampFormat() { @Override protected void generateDocumentBodyShapeSerializers(GenerationContext context, Set shapes) { + boolean isAwsQueryCompat = context.getService().hasTrait(AwsQueryCompatibleTrait.class); AwsProtocolUtils.generateDocumentBodyShapeSerde(context, shapes, new JsonShapeSerVisitor(context, - (!context.getSettings().generateServerSdk() && enableSerdeElision()))); + (!context.getSettings().generateServerSdk() && !isAwsQueryCompat && enableSerdeElision()))); } @Override diff --git a/packages/core/src/protocols/coercing-serializers.spec.ts b/packages/core/src/protocols/coercing-serializers.spec.ts new file mode 100644 index 0000000000000..05210d28c0194 --- /dev/null +++ b/packages/core/src/protocols/coercing-serializers.spec.ts @@ -0,0 +1,76 @@ +import { _toBool, _toNum, _toStr } from "./coercing-serializers"; + +const consoleWarn = console.warn; + +beforeAll(() => { + console.warn = () => {}; +}); + +afterAll(() => { + console.warn = consoleWarn; +}); + +describe(_toBool.name, () => { + it("ignores nullish", () => { + expect(_toBool(null)).toBe(null); + expect(_toBool(undefined)).toBe(undefined); + }); + + it("converts strings", () => { + expect(_toBool("false")).toEqual(false); + expect(_toBool("true")).toEqual(true); + + expect(_toBool("False")).toEqual(false); + expect(_toBool("True")).toEqual(true); + + expect(_toBool("")).toEqual(false); + expect(_toBool("a")).toEqual(true); // warns + }); + + it("does not convert numbers", () => { + expect(_toBool(0)).toEqual(0); + expect(_toBool(1)).toEqual(1); + }); +}); + +describe(_toStr.name, () => { + it("ignores nullish", () => { + expect(_toStr(null)).toBe(null); + expect(_toStr(undefined)).toBe(undefined); + }); + + it("converts numbers", () => { + expect(_toStr(0)).toEqual("0"); + expect(_toStr(1)).toEqual("1"); + }); + + it("converts booleans", () => { + expect(_toStr(false)).toEqual("false"); + expect(_toStr(true)).toEqual("true"); + }); +}); + +describe(_toNum.name, () => { + it("ignores nullish", () => { + expect(_toNum(null)).toBe(null); + expect(_toNum(undefined)).toBe(undefined); + }); + + it("converts numeric strings", () => { + expect(_toNum("1234")).toEqual(1234); + expect(_toNum("1234.56")).toEqual(1234.56); + }); + + it("does not convert prefix-numeric strings", () => { + expect(_toNum("1234abc")).toEqual("1234abc"); + expect(_toNum("1234.56abc")).toEqual("1234.56abc"); + }); + + it("does not convert non-numeric strings", () => { + expect(_toNum("abcdef")).toEqual("abcdef"); + }); + it("does not convert bools", () => { + expect(_toNum(false)).toEqual(false); + expect(_toNum(true)).toEqual(true); + }); +}); diff --git a/packages/core/src/protocols/coercing-serializers.ts b/packages/core/src/protocols/coercing-serializers.ts new file mode 100644 index 0000000000000..bab6f24267854 --- /dev/null +++ b/packages/core/src/protocols/coercing-serializers.ts @@ -0,0 +1,69 @@ +/** + * @internal + * + * Used for awsQueryCompatibility trait. + */ +export const _toStr = (val: unknown): string | undefined => { + if (val == null) { + return val as undefined; + } + if (typeof val === "number" || typeof val === "bigint") { + return String(val); + } + if (typeof val === "boolean") { + const warning = new Error(`Received boolean ${val} where a string was expected.`); + warning.name = "Warning"; + console.warn(warning); + return String(val); + } + return val as string; +}; + +/** + * @internal + * + * Used for awsQueryCompatibility trait. + */ +export const _toBool = (val: unknown): boolean | undefined => { + if (val == null) { + return val as undefined; + } + if (typeof val === "number") { + // transmit to service to be rejected. + } + if (typeof val === "string") { + const lowercase = val.toLowerCase(); + if (val !== "" && lowercase !== "false" && lowercase !== "true") { + const warning = new Error(`Received string "${val}" where a boolean was expected.`); + warning.name = "Warning"; + console.warn(warning); + } + return val !== "" && lowercase !== "false"; + } + return val as boolean; +}; + +/** + * @internal + * + * Used for awsQueryCompatibility trait. + */ +export const _toNum = (val: unknown): number | undefined => { + if (val == null) { + return val as undefined; + } + if (typeof val === "boolean") { + // transmit to service to be rejected. + } + if (typeof val === "string") { + const num = Number(val); + if (num.toString() !== val) { + const warning = new Error(`Received string "${val}" where a number was expected.`); + warning.name = "Warning"; + console.warn(warning); + return val as unknown as undefined; + } + return num; + } + return val as number; +}; diff --git a/packages/core/src/protocols/index.ts b/packages/core/src/protocols/index.ts index f35c6f32f1c53..c3a1b7cf5d769 100644 --- a/packages/core/src/protocols/index.ts +++ b/packages/core/src/protocols/index.ts @@ -1,2 +1,2 @@ +export * from "./coercing-serializers"; export * from "./json/awsExpectUnion"; -export * from "./json/awsQueryCompatibleMiddleware"; From 312761590ad5cd115080ba5df37112106089b598 Mon Sep 17 00:00:00 2001 From: George Fu Date: Tue, 31 Oct 2023 18:28:04 +0000 Subject: [PATCH 4/5] chore(client-sqs): restore default model --- codegen/sdk-codegen/aws-models/sqs.json | 7161 ++++++++++------------- 1 file changed, 3246 insertions(+), 3915 deletions(-) diff --git a/codegen/sdk-codegen/aws-models/sqs.json b/codegen/sdk-codegen/aws-models/sqs.json index b4332746c59e4..ec1dcbacce355 100644 --- a/codegen/sdk-codegen/aws-models/sqs.json +++ b/codegen/sdk-codegen/aws-models/sqs.json @@ -1,4205 +1,3536 @@ { "smithy": "2.0", "metadata": { - "suppressions": [ - { - "id": "HttpMethodSemantics", - "namespace": "*" - }, - { - "id": "HttpResponseCodeSemantics", - "namespace": "*" - }, - { - "id": "PaginatedTrait", - "namespace": "*" - }, - { - "id": "HttpHeaderTrait", - "namespace": "*" - }, - { - "id": "HttpUriConflict", - "namespace": "*" - }, - { - "id": "Service", - "namespace": "*" - } - ] + "suppressions": [ + { + "id": "HttpMethodSemantics", + "namespace": "*" + }, + { + "id": "HttpResponseCodeSemantics", + "namespace": "*" + }, + { + "id": "PaginatedTrait", + "namespace": "*" + }, + { + "id": "HttpHeaderTrait", + "namespace": "*" + }, + { + "id": "HttpUriConflict", + "namespace": "*" + }, + { + "id": "Service", + "namespace": "*" + } + ] }, "shapes": { - "com.amazonaws.sqs#AWSAccountIdList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#String" - } - }, - "com.amazonaws.sqs#ActionNameList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#String" - } - }, - "com.amazonaws.sqs#AddPermission": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#AddPermissionRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#InvalidAddress" - }, - { - "target": "com.amazonaws.sqs#InvalidSecurity" - }, - { - "target": "com.amazonaws.sqs#OverLimit" - }, - { - "target": "com.amazonaws.sqs#QueueDoesNotExist" - }, - { - "target": "com.amazonaws.sqs#RequestThrottled" - }, - { - "target": "com.amazonaws.sqs#UnsupportedOperation" - } - ], - "traits": { - "smithy.api#documentation": "

          Adds a permission to a queue for a specific principal. This allows sharing\n access to the queue.

          \n

          When you create a queue, you have full control access rights for the queue. Only you,\n the owner of the queue, can grant or deny permissions to the queue. For more information\n about these permissions, see Allow Developers to Write Messages to a Shared Queue in the\n Amazon SQS Developer Guide.

          \n \n
            \n
          • \n

            \n AddPermission generates a policy for you. You can use\n \n SetQueueAttributes\n to upload your\n policy. For more information, see Using Custom Policies with the Amazon SQS Access Policy\n Language in the Amazon SQS Developer\n Guide.

            \n
          • \n
          • \n

            An Amazon SQS policy can have a maximum of seven actions per\n statement.

            \n
          • \n
          • \n

            To remove the ability to change queue permissions, you must deny\n permission to the AddPermission, RemovePermission,\n and SetQueueAttributes actions in your IAM policy.

            \n
          • \n
          • \n

            Amazon SQS AddPermission does not support adding a\n non-account principal.

            \n
          • \n
          \n
          \n \n

          Cross-account permissions don't apply to this action. For more information, see\n Grant cross-account permissions to a role and a username in the\n Amazon SQS Developer Guide.

          \n
          " - } - }, - "com.amazonaws.sqs#AddPermissionRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The URL of the Amazon SQS queue to which permissions are added.

          \n

          Queue URLs and names are case-sensitive.

          ", - "smithy.api#required": {} - } - }, - "Label": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The unique identification of the permission you're setting (for example,\n AliceSendMessage). Maximum 80 characters. Allowed characters include\n alphanumeric characters, hyphens (-), and underscores\n (_).

          ", - "smithy.api#required": {} - } - }, - "AWSAccountIds": { - "target": "com.amazonaws.sqs#AWSAccountIdList", - "traits": { - "smithy.api#documentation": "

          The Amazon Web\n Services account numbers of the principals who are to receive\n permission. For information about locating the Amazon Web Services\n account identification, see Your Amazon Web\n Services Identifiers in the Amazon SQS Developer\n Guide.

          ", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "AWSAccountId" - } - }, - "Actions": { - "target": "com.amazonaws.sqs#ActionNameList", - "traits": { - "smithy.api#documentation": "

          The action the client wants to allow for the specified principal. Valid values: the\n name of any action or *.

          \n

          For more information about these actions, see Overview of Managing Access Permissions to Your Amazon Simple Queue Service\n Resource in the Amazon SQS Developer Guide.

          \n

          Specifying SendMessage, DeleteMessage, or\n ChangeMessageVisibility for ActionName.n also grants\n permissions for the corresponding batch versions of those actions:\n SendMessageBatch, DeleteMessageBatch, and\n ChangeMessageVisibilityBatch.

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

          ", - "smithy.api#input": {} - } - }, - "com.amazonaws.sqs#AmazonSQS": { - "type": "service", - "version": "2012-11-05", - "operations": [ - { - "target": "com.amazonaws.sqs#AddPermission" - }, - { - "target": "com.amazonaws.sqs#CancelMessageMoveTask" - }, - { - "target": "com.amazonaws.sqs#ChangeMessageVisibility" - }, - { - "target": "com.amazonaws.sqs#ChangeMessageVisibilityBatch" - }, - { - "target": "com.amazonaws.sqs#CreateQueue" - }, - { - "target": "com.amazonaws.sqs#DeleteMessage" - }, - { - "target": "com.amazonaws.sqs#DeleteMessageBatch" - }, - { - "target": "com.amazonaws.sqs#DeleteQueue" - }, - { - "target": "com.amazonaws.sqs#GetQueueAttributes" - }, - { - "target": "com.amazonaws.sqs#GetQueueUrl" - }, - { - "target": "com.amazonaws.sqs#ListDeadLetterSourceQueues" - }, - { - "target": "com.amazonaws.sqs#ListMessageMoveTasks" - }, - { - "target": "com.amazonaws.sqs#ListQueues" - }, - { - "target": "com.amazonaws.sqs#ListQueueTags" - }, - { - "target": "com.amazonaws.sqs#PurgeQueue" - }, - { - "target": "com.amazonaws.sqs#ReceiveMessage" - }, - { - "target": "com.amazonaws.sqs#RemovePermission" - }, - { - "target": "com.amazonaws.sqs#SendMessage" - }, - { - "target": "com.amazonaws.sqs#SendMessageBatch" - }, - { - "target": "com.amazonaws.sqs#SetQueueAttributes" - }, - { - "target": "com.amazonaws.sqs#StartMessageMoveTask" - }, - { - "target": "com.amazonaws.sqs#TagQueue" - }, - { - "target": "com.amazonaws.sqs#UntagQueue" - } - ], - "traits": { - "aws.api#service": { - "sdkId": "SQS", - "arnNamespace": "sqs", - "cloudFormationName": "SQS", - "cloudTrailEventSource": "sqs.amazonaws.com", - "endpointPrefix": "sqs" - }, - "aws.auth#sigv4": { - "name": "sqs" - }, - "aws.protocols#awsJson1_0": {}, - "aws.protocols#awsQueryCompatible": {}, - "smithy.api#documentation": "

          Welcome to the Amazon SQS API Reference.

          \n

          Amazon SQS is a reliable, highly-scalable hosted queue for storing messages as they\n travel between applications or microservices. Amazon SQS moves data between distributed\n application components and helps you decouple these components.

          \n

          For information on the permissions you need to use this API, see Identity and access management in the Amazon SQS Developer\n Guide.\n

          \n

          You can use Amazon Web Services\n SDKs to access Amazon SQS using your favorite programming language. The SDKs\n perform tasks such as the following automatically:

          \n
            \n
          • \n

            Cryptographically sign your service requests

            \n
          • \n
          • \n

            Retry requests

            \n
          • \n
          • \n

            Handle error responses

            \n
          • \n
          \n

          \n Additional information\n

          \n ", - "smithy.api#title": "Amazon Simple Queue Service", - "smithy.rules#endpointRuleSet": { - "version": "1.0", - "parameters": { - "Region": { - "builtIn": "AWS::Region", - "required": false, - "documentation": "The AWS region used to dispatch the request.", - "type": "String" - }, - "UseDualStack": { - "builtIn": "AWS::UseDualStack", - "required": true, - "default": false, - "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", - "type": "Boolean" - }, - "UseFIPS": { - "builtIn": "AWS::UseFIPS", - "required": true, - "default": false, - "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", - "type": "Boolean" - }, - "Endpoint": { - "builtIn": "SDK::Endpoint", - "required": false, - "documentation": "Override the endpoint used to send this request", - "type": "String" - } + "com.amazonaws.sqs#AWSAccountIdList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#String" + } + }, + "com.amazonaws.sqs#ActionNameList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#String" + } + }, + "com.amazonaws.sqs#AddPermission": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#AddPermissionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#OverLimit" + } + ], + "traits": { + "smithy.api#documentation": "

          Adds a permission to a queue for a specific principal. This allows sharing\n access to the queue.

          \n

          When you create a queue, you have full control access rights for the queue. Only you,\n the owner of the queue, can grant or deny permissions to the queue. For more information\n about these permissions, see Allow Developers to Write Messages to a Shared Queue in the Amazon SQS\n Developer Guide.

          \n \n
            \n
          • \n

            \n AddPermission generates a policy for you. You can use\n \n SetQueueAttributes\n to upload your\n policy. For more information, see Using Custom Policies with the Amazon SQS Access Policy Language in\n the Amazon SQS Developer Guide.

            \n
          • \n
          • \n

            An Amazon SQS policy can have a maximum of seven actions per statement.

            \n
          • \n
          • \n

            To remove the ability to change queue permissions, you must deny permission to the AddPermission, RemovePermission, and SetQueueAttributes actions in your IAM policy.

            \n
          • \n
          • \n

            Amazon SQS AddPermission does not support adding a non-account\n principal.

            \n
          • \n
          \n
          \n \n

          Cross-account permissions don't apply to this action. For more information, \nsee Grant \ncross-account permissions to a role and a username in the Amazon SQS Developer Guide.

          \n
          " + } + }, + "com.amazonaws.sqs#AddPermissionRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

          The URL of the Amazon SQS queue to which permissions are added.

          \n

          Queue URLs and names are case-sensitive.

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

          The unique identification of the permission you're setting (for example,\n AliceSendMessage). Maximum 80 characters. Allowed characters include\n alphanumeric characters, hyphens (-), and underscores\n (_).

          ", + "smithy.api#required": {} + } + }, + "AWSAccountIds": { + "target": "com.amazonaws.sqs#AWSAccountIdList", + "traits": { + "smithy.api#documentation": "

          The Amazon Web Services account numbers of the principals who are to receive\n permission. For information about locating the Amazon Web Services account identification, see Your Amazon Web Services Identifiers in the Amazon SQS Developer\n Guide.

          ", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "AWSAccountId" + } + }, + "Actions": { + "target": "com.amazonaws.sqs#ActionNameList", + "traits": { + "smithy.api#documentation": "

          The action the client wants to allow for the specified principal. Valid values: the\n name of any action or *.

          \n

          For more information about these actions, see Overview of Managing Access Permissions to Your Amazon Simple Queue Service\n Resource in the Amazon SQS Developer Guide.

          \n

          Specifying SendMessage, DeleteMessage, or\n ChangeMessageVisibility for ActionName.n also grants\n permissions for the corresponding batch versions of those actions:\n SendMessageBatch, DeleteMessageBatch, and\n ChangeMessageVisibilityBatch.

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

          ", + "smithy.api#input": {} + } + }, + "com.amazonaws.sqs#AmazonSQS": { + "type": "service", + "version": "2012-11-05", + "operations": [ + { + "target": "com.amazonaws.sqs#AddPermission" + }, + { + "target": "com.amazonaws.sqs#CancelMessageMoveTask" + }, + { + "target": "com.amazonaws.sqs#ChangeMessageVisibility" + }, + { + "target": "com.amazonaws.sqs#ChangeMessageVisibilityBatch" + }, + { + "target": "com.amazonaws.sqs#CreateQueue" + }, + { + "target": "com.amazonaws.sqs#DeleteMessage" + }, + { + "target": "com.amazonaws.sqs#DeleteMessageBatch" + }, + { + "target": "com.amazonaws.sqs#DeleteQueue" + }, + { + "target": "com.amazonaws.sqs#GetQueueAttributes" + }, + { + "target": "com.amazonaws.sqs#GetQueueUrl" + }, + { + "target": "com.amazonaws.sqs#ListDeadLetterSourceQueues" + }, + { + "target": "com.amazonaws.sqs#ListMessageMoveTasks" + }, + { + "target": "com.amazonaws.sqs#ListQueues" + }, + { + "target": "com.amazonaws.sqs#ListQueueTags" + }, + { + "target": "com.amazonaws.sqs#PurgeQueue" + }, + { + "target": "com.amazonaws.sqs#ReceiveMessage" + }, + { + "target": "com.amazonaws.sqs#RemovePermission" + }, + { + "target": "com.amazonaws.sqs#SendMessage" + }, + { + "target": "com.amazonaws.sqs#SendMessageBatch" + }, + { + "target": "com.amazonaws.sqs#SetQueueAttributes" + }, + { + "target": "com.amazonaws.sqs#StartMessageMoveTask" + }, + { + "target": "com.amazonaws.sqs#TagQueue" + }, + { + "target": "com.amazonaws.sqs#UntagQueue" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "SQS", + "arnNamespace": "sqs", + "cloudFormationName": "SQS", + "cloudTrailEventSource": "sqs.amazonaws.com", + "endpointPrefix": "sqs" + }, + "aws.auth#sigv4": { + "name": "sqs" + }, + "aws.protocols#awsQuery": {}, + "smithy.api#documentation": "

          Welcome to the Amazon SQS API Reference.

          \n

          Amazon SQS is a reliable, highly-scalable hosted queue for storing messages as they travel\n between applications or microservices. Amazon SQS moves data between distributed application\n components and helps you decouple these components.

          \n

          For information on the permissions you need to use this API, see Identity and access management in the Amazon SQS Developer\n Guide.\n

          \n

          You can use Amazon Web Services SDKs to access\n Amazon SQS using your favorite programming language. The SDKs perform tasks such as the\n following automatically:

          \n
            \n
          • \n

            Cryptographically sign your service requests

            \n
          • \n
          • \n

            Retry requests

            \n
          • \n
          • \n

            Handle error responses

            \n
          • \n
          \n

          \n Additional information\n

          \n ", + "smithy.api#title": "Amazon Simple Queue Service", + "smithy.api#xmlNamespace": { + "uri": "http://queue.amazonaws.com/doc/2012-11-05/" + }, + "smithy.rules#endpointRuleSet": { + "version": "1.0", + "parameters": { + "Region": { + "builtIn": "AWS::Region", + "required": false, + "documentation": "The AWS region used to dispatch the request.", + "type": "String" + }, + "UseDualStack": { + "builtIn": "AWS::UseDualStack", + "required": true, + "default": false, + "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", + "type": "Boolean" + }, + "UseFIPS": { + "builtIn": "AWS::UseFIPS", + "required": true, + "default": false, + "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", + "type": "Boolean" + }, + "Endpoint": { + "builtIn": "SDK::Endpoint", + "required": false, + "documentation": "Override the endpoint used to send this request", + "type": "String" + } + }, + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "error": "Invalid Configuration: FIPS and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "PartitionResult" + } + ], "rules": [ - { + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "rules": [ + { "conditions": [ - { - "fn": "isSet", + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", "argv": [ - { - "ref": "Endpoint" - } + { + "ref": "PartitionResult" + }, + "supportsFIPS" ] - } + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } ], "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "error": "Invalid Configuration: FIPS and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" + { + "conditions": [], + "endpoint": { + "url": "https://sqs-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" - }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "type": "endpoint" + } ], "type": "tree" - }, - { + }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "rules": [ + { "conditions": [ - { - "fn": "isSet", + { + "fn": "booleanEquals", + "argv": [ + { + "fn": "getAttr", "argv": [ - { - "ref": "Region" - } + { + "ref": "PartitionResult" + }, + "supportsFIPS" ] - } + }, + true + ] + } ], "rules": [ - { - "conditions": [ - { - "fn": "aws.partition", - "argv": [ - { - "ref": "Region" - } - ], - "assign": "PartitionResult" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://sqs-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "stringEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "name" - ] - }, - "aws-us-gov" - ] - } - ], - "endpoint": { - "url": "https://sqs.{Region}.amazonaws.com", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - }, - { - "conditions": [], - "endpoint": { - "url": "https://sqs-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://sqs.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [], - "endpoint": { - "url": "https://sqs.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - } + { + "conditions": [ + { + "fn": "stringEquals", + "argv": [ + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "name" + ] + }, + "aws-us-gov" + ] + } + ], + "endpoint": { + "url": "https://sqs.{Region}.amazonaws.com", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + }, + { + "conditions": [], + "endpoint": { + "url": "https://sqs-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } ], "type": "tree" - }, - { + }, + { "conditions": [], - "error": "Invalid Configuration: Missing Region", + "error": "FIPS is enabled but this partition does not support FIPS", "type": "error" - } - ] - }, - "smithy.rules#endpointTests": { - "testCases": [ - { - "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.af-south-1.amazonaws.com" - } - }, - "params": { - "Region": "af-south-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.ap-east-1.amazonaws.com" - } - }, - "params": { - "Region": "ap-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.ap-northeast-1.amazonaws.com" - } - }, - "params": { - "Region": "ap-northeast-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.ap-northeast-2.amazonaws.com" - } - }, - "params": { - "Region": "ap-northeast-2", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.ap-northeast-3.amazonaws.com" - } - }, - "params": { - "Region": "ap-northeast-3", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.ap-south-1.amazonaws.com" - } - }, - "params": { - "Region": "ap-south-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.ap-southeast-1.amazonaws.com" - } - }, - "params": { - "Region": "ap-southeast-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.ap-southeast-2.amazonaws.com" - } - }, - "params": { - "Region": "ap-southeast-2", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ap-southeast-3 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.ap-southeast-3.amazonaws.com" - } - }, - "params": { - "Region": "ap-southeast-3", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.ca-central-1.amazonaws.com" - } - }, - "params": { - "Region": "ca-central-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.eu-central-1.amazonaws.com" - } - }, - "params": { - "Region": "eu-central-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.eu-north-1.amazonaws.com" - } - }, - "params": { - "Region": "eu-north-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.eu-south-1.amazonaws.com" - } - }, - "params": { - "Region": "eu-south-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.eu-west-1.amazonaws.com" - } - }, - "params": { - "Region": "eu-west-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.eu-west-2.amazonaws.com" - } - }, - "params": { - "Region": "eu-west-2", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.eu-west-3.amazonaws.com" - } - }, - "params": { - "Region": "eu-west-3", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.me-south-1.amazonaws.com" - } - }, - "params": { - "Region": "me-south-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.sa-east-1.amazonaws.com" - } - }, - "params": { - "Region": "sa-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.us-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs-fips.us-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.us-east-2.amazonaws.com" - } - }, - "params": { - "Region": "us-east-2", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs-fips.us-east-2.amazonaws.com" - } - }, - "params": { - "Region": "us-east-2", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.us-west-1.amazonaws.com" - } - }, - "params": { - "Region": "us-west-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs-fips.us-west-1.amazonaws.com" - } - }, - "params": { - "Region": "us-west-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.us-west-2.amazonaws.com" - } - }, - "params": { - "Region": "us-west-2", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs-fips.us-west-2.amazonaws.com" - } - }, - "params": { - "Region": "us-west-2", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://sqs-fips.us-east-1.api.aws" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://sqs.us-east-1.api.aws" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.cn-north-1.amazonaws.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.cn-northwest-1.amazonaws.com.cn" - } - }, - "params": { - "Region": "cn-northwest-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://sqs-fips.cn-north-1.api.amazonwebservices.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs-fips.cn-north-1.amazonaws.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://sqs.cn-north-1.api.amazonwebservices.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.us-gov-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.us-gov-west-1.amazonaws.com" - } - }, - "params": { - "Region": "us-gov-west-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://sqs-fips.us-gov-east-1.api.aws" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.us-gov-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://sqs.us-gov-east-1.api.aws" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.us-iso-east-1.c2s.ic.gov" - } - }, - "params": { - "Region": "us-iso-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-iso-west-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.us-iso-west-1.c2s.ic.gov" - } - }, - "params": { - "Region": "us-iso-west-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", - "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" - }, - "params": { - "Region": "us-iso-east-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs-fips.us-iso-east-1.c2s.ic.gov" - } - }, - "params": { - "Region": "us-iso-east-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" - }, - "params": { - "Region": "us-iso-east-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs.us-isob-east-1.sc2s.sgov.gov" - } - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", - "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://sqs-fips.us-isob-east-1.sc2s.sgov.gov" - } - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", - "expect": { - "endpoint": { - "url": "https://example.com" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": false, - "Endpoint": "https://example.com" - } - }, - { - "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", - "expect": { + } + ], + "type": "tree" + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "rules": [ + { + "conditions": [], "endpoint": { - "url": "https://example.com" - } - }, - "params": { - "UseFIPS": false, - "UseDualStack": false, - "Endpoint": "https://example.com" - } - }, - { - "documentation": "For custom endpoint with fips enabled and dualstack disabled", - "expect": { - "error": "Invalid Configuration: FIPS and custom endpoint are not supported" - }, - "params": { - "Region": "us-east-1", - "UseFIPS": true, - "UseDualStack": false, - "Endpoint": "https://example.com" - } - }, - { - "documentation": "For custom endpoint with fips disabled and dualstack enabled", - "expect": { - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": true, - "Endpoint": "https://example.com" - } + "url": "https://sqs.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" + } + ], + "type": "tree" + }, + { + "conditions": [], + "endpoint": { + "url": "https://sqs.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} }, - { - "documentation": "Missing region", - "expect": { - "error": "Invalid Configuration: Missing Region" - } - } + "type": "endpoint" + } ], - "version": "1.0" - } + "type": "tree" + } + ], + "type": "tree" + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" + } + ] + }, + "smithy.rules#endpointTests": { + "testCases": [ + { + "documentation": "For region af-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.af-south-1.amazonaws.com" + } + }, + "params": { + "Region": "af-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.ap-east-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.ap-northeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.ap-northeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-northeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.ap-northeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-northeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.ap-south-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.ap-southeast-1.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.ap-southeast-2.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ap-southeast-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.ap-southeast-3.amazonaws.com" + } + }, + "params": { + "Region": "ap-southeast-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.ca-central-1.amazonaws.com" + } + }, + "params": { + "Region": "ca-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.eu-central-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-central-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.eu-north-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.eu-south-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.eu-west-1.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.eu-west-2.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region eu-west-3 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.eu-west-3.amazonaws.com" + } + }, + "params": { + "Region": "eu-west-3", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region me-south-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.me-south-1.amazonaws.com" + } + }, + "params": { + "Region": "me-south-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region sa-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.sa-east-1.amazonaws.com" + } + }, + "params": { + "Region": "sa-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs-fips.us-east-2.amazonaws.com" + } + }, + "params": { + "Region": "us-east-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs-fips.us-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-west-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-west-2 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs-fips.us-west-2.amazonaws.com" + } + }, + "params": { + "Region": "us-west-2", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sqs-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sqs.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-northwest-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.cn-northwest-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-northwest-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sqs-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sqs.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.us-gov-west-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sqs-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://sqs.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-west-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.us-iso-west-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-west-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://sqs-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" + } + } + }, + "com.amazonaws.sqs#AttributeNameList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#QueueAttributeName" + } + }, + "com.amazonaws.sqs#BatchEntryIdsNotDistinct": { + "type": "structure", + "members": {}, + "traits": { + "aws.protocols#awsQueryError": { + "code": "AWS.SimpleQueueService.BatchEntryIdsNotDistinct", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

          Two or more batch entries in the request have the same Id.

          ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.sqs#BatchRequestTooLong": { + "type": "structure", + "members": {}, + "traits": { + "aws.protocols#awsQueryError": { + "code": "AWS.SimpleQueueService.BatchRequestTooLong", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

          The length of all the messages put together is more than the limit.

          ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.sqs#BatchResultErrorEntry": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

          The Id of an entry in a batch request.

          ", + "smithy.api#required": {} } - }, - "com.amazonaws.sqs#AttributeNameList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#QueueAttributeName" + }, + "SenderFault": { + "target": "com.amazonaws.sqs#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

          Specifies whether the error happened due to the caller of the batch API action.

          ", + "smithy.api#required": {} } - }, - "com.amazonaws.sqs#BatchEntryIdsNotDistinct": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.sqs#ExceptionMessage" - } - }, + }, + "Code": { + "target": "com.amazonaws.sqs#String", "traits": { - "aws.protocols#awsQueryError": { - "code": "AWS.SimpleQueueService.BatchEntryIdsNotDistinct", - "httpResponseCode": 400 - }, - "smithy.api#documentation": "

          Two or more batch entries in the request have the same Id.

          ", - "smithy.api#error": "client", - "smithy.api#httpError": 400 + "smithy.api#documentation": "

          An error code representing why the action failed on this entry.

          ", + "smithy.api#required": {} } - }, - "com.amazonaws.sqs#BatchRequestTooLong": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.sqs#ExceptionMessage" - } - }, + }, + "Message": { + "target": "com.amazonaws.sqs#String", "traits": { - "aws.protocols#awsQueryError": { - "code": "AWS.SimpleQueueService.BatchRequestTooLong", - "httpResponseCode": 400 - }, - "smithy.api#documentation": "

          The length of all the messages put together is more than the limit.

          ", - "smithy.api#error": "client", - "smithy.api#httpError": 400 + "smithy.api#documentation": "

          A message explaining why the action failed on this entry.

          " } + } }, - "com.amazonaws.sqs#BatchResultErrorEntry": { - "type": "structure", - "members": { - "Id": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The Id of an entry in a batch request.

          ", - "smithy.api#required": {} - } - }, - "SenderFault": { - "target": "com.amazonaws.sqs#Boolean", - "traits": { - "smithy.api#default": false, - "smithy.api#documentation": "

          Specifies whether the error happened due to the caller of the batch API action.

          ", - "smithy.api#required": {} - } - }, - "Code": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          An error code representing why the action failed on this entry.

          ", - "smithy.api#required": {} - } - }, - "Message": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          A message explaining why the action failed on this entry.

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

          Gives a detailed description of the result of an action on each entry in the\n request.

          " + } + }, + "com.amazonaws.sqs#BatchResultErrorEntryList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#BatchResultErrorEntry" + } + }, + "com.amazonaws.sqs#Binary": { + "type": "blob" + }, + "com.amazonaws.sqs#BinaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#Binary", + "traits": { + "smithy.api#xmlName": "BinaryListValue" + } + } + }, + "com.amazonaws.sqs#Boolean": { + "type": "boolean", + "traits": { + "smithy.api#default": false + } + }, + "com.amazonaws.sqs#BoxedInteger": { + "type": "integer" + }, + "com.amazonaws.sqs#CancelMessageMoveTask": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#CancelMessageMoveTaskRequest" + }, + "output": { + "target": "com.amazonaws.sqs#CancelMessageMoveTaskResult" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.sqs#UnsupportedOperation" + } + ], + "traits": { + "smithy.api#documentation": "

          Cancels a specified message movement task. A message movement can only be cancelled\n when the current status is RUNNING. Cancelling a message movement task does not revert\n the messages that have already been moved. It can only stop the messages that have not\n been moved yet.

          \n \n
            \n
          • \n

            This action is currently limited to supporting message redrive from dead-letter queues (DLQs) only. In this context, the source\n queue is the dead-letter queue (DLQ), while the destination queue can be the\n original source queue (from which the messages were driven to the\n dead-letter-queue), or a custom destination queue.

            \n
          • \n
          • \n

            Currently, only standard queues are supported.

            \n
          • \n
          • \n

            Only one active message movement task is supported per queue at any given\n time.

            \n
          • \n
          \n
          " + } + }, + "com.amazonaws.sqs#CancelMessageMoveTaskRequest": { + "type": "structure", + "members": { + "TaskHandle": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

          Gives a detailed description of the result of an action on each entry in the\n request.

          " + "smithy.api#documentation": "

          An identifier associated with a message movement task.

          ", + "smithy.api#required": {} } + } }, - "com.amazonaws.sqs#BatchResultErrorEntryList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#BatchResultErrorEntry" + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.sqs#CancelMessageMoveTaskResult": { + "type": "structure", + "members": { + "ApproximateNumberOfMessagesMoved": { + "target": "com.amazonaws.sqs#Long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

          The approximate number of messages already moved to the destination queue.

          " } + } }, - "com.amazonaws.sqs#Binary": { - "type": "blob" - }, - "com.amazonaws.sqs#BinaryList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#Binary", - "traits": { - "smithy.api#xmlName": "BinaryListValue" - } + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.sqs#ChangeMessageVisibility": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#ChangeMessageVisibilityRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#MessageNotInflight" + }, + { + "target": "com.amazonaws.sqs#ReceiptHandleIsInvalid" + } + ], + "traits": { + "smithy.api#documentation": "

          Changes the visibility timeout of a specified message in a queue to a new value. The\n default visibility timeout for a message is 30 seconds. The minimum is 0 seconds. The\n maximum is 12 hours. For more information, see Visibility Timeout in the Amazon SQS Developer\n Guide.

          \n

          For example, if the default timeout for a queue is 60 seconds, 15 seconds have elapsed\n since you received the message, and you send a ChangeMessageVisibility call with\n VisibilityTimeout set to 10 seconds, the 10 seconds begin to count from\n the time that you make the ChangeMessageVisibility call. Thus, any attempt\n to change the visibility timeout or to delete that message 10 seconds after you\n initially change the visibility timeout (a total of 25 seconds) might result in an\n error.

          \n

          An Amazon SQS message has three basic states:

          \n
            \n
          1. \n

            Sent to a queue by a producer.

            \n
          2. \n
          3. \n

            Received from the queue by a consumer.

            \n
          4. \n
          5. \n

            Deleted from the queue.

            \n
          6. \n
          \n

          A message is considered to be stored after it is sent to a queue by a producer, but not yet received from the queue by a consumer (that is, between states 1 and 2). There is no limit to the number of stored messages.\n A message is considered to be in flight after it is received from a queue by a consumer, but not yet deleted from the queue (that is, between states 2 and 3). There is a limit to the number of in flight messages.

          \n

          Limits that apply to in flight messages are unrelated to the unlimited number of stored messages.

          \n

          For most standard queues (depending on queue traffic and message backlog), there can be a maximum of approximately 120,000 in flight messages (received from a queue by a consumer, but not yet deleted from the queue). \n If you reach this limit, Amazon SQS returns the OverLimit error message.\n To avoid reaching the limit, you should delete messages from the queue after they're processed. You can also increase the number of queues you use to process your messages.\n To request a limit increase, file a support request.

          \n

          For FIFO queues, there can be a maximum of 20,000 in flight messages (received from a queue by a consumer, but not yet deleted from the queue). If you reach this limit, Amazon SQS returns no error messages.

          \n \n

          If you attempt to set the VisibilityTimeout to a value greater than\n the maximum time left, Amazon SQS returns an error. Amazon SQS doesn't automatically\n recalculate and increase the timeout to the maximum remaining time.

          \n

          Unlike with a queue, when you change the visibility timeout for a specific message\n the timeout value is applied immediately but isn't saved in memory for that message.\n If you don't delete a message after it is received, the visibility timeout for the\n message reverts to the original timeout value (not to the value you set using the\n ChangeMessageVisibility action) the next time the message is\n received.

          \n
          " + } + }, + "com.amazonaws.sqs#ChangeMessageVisibilityBatch": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#ChangeMessageVisibilityBatchRequest" + }, + "output": { + "target": "com.amazonaws.sqs#ChangeMessageVisibilityBatchResult" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#BatchEntryIdsNotDistinct" + }, + { + "target": "com.amazonaws.sqs#EmptyBatchRequest" + }, + { + "target": "com.amazonaws.sqs#InvalidBatchEntryId" + }, + { + "target": "com.amazonaws.sqs#TooManyEntriesInBatchRequest" + } + ], + "traits": { + "smithy.api#documentation": "

          Changes the visibility timeout of multiple messages. This is a batch version of\n \n ChangeMessageVisibility. The result of the action\n on each message is reported individually in the response. You can send up to 10\n \n ChangeMessageVisibility\n requests with each\n ChangeMessageVisibilityBatch action.

          \n \n

          Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.

          \n
          " + } + }, + "com.amazonaws.sqs#ChangeMessageVisibilityBatchRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

          The URL of the Amazon SQS queue whose messages' visibility is changed.

          \n

          Queue URLs and names are case-sensitive.

          ", + "smithy.api#required": {} + } + }, + "Entries": { + "target": "com.amazonaws.sqs#ChangeMessageVisibilityBatchRequestEntryList", + "traits": { + "smithy.api#documentation": "

          Lists the receipt handles of the messages for which the visibility timeout must be\n changed.

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

          ", + "smithy.api#input": {} + } + }, + "com.amazonaws.sqs#ChangeMessageVisibilityBatchRequestEntry": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

          An identifier for this particular receipt handle used to communicate the\n result.

          \n \n

          The Ids of a batch request need to be unique within a request.

          \n

          This identifier can have up to 80 characters. The following characters are accepted: alphanumeric characters, hyphens(-), and underscores (_).

          \n
          ", + "smithy.api#required": {} } - }, - "com.amazonaws.sqs#Boolean": { - "type": "boolean", + }, + "ReceiptHandle": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#default": false + "smithy.api#documentation": "

          A receipt handle.

          ", + "smithy.api#required": {} } - }, - "com.amazonaws.sqs#BoxedInteger": { - "type": "integer" - }, - "com.amazonaws.sqs#CancelMessageMoveTask": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#CancelMessageMoveTaskRequest" - }, - "output": { - "target": "com.amazonaws.sqs#CancelMessageMoveTaskResult" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#InvalidAddress" - }, - { - "target": "com.amazonaws.sqs#InvalidSecurity" - }, - { - "target": "com.amazonaws.sqs#RequestThrottled" - }, - { - "target": "com.amazonaws.sqs#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.sqs#UnsupportedOperation" - } - ], + }, + "VisibilityTimeout": { + "target": "com.amazonaws.sqs#Integer", "traits": { - "smithy.api#documentation": "

          Cancels a specified message movement task. A message movement can only be cancelled\n when the current status is RUNNING. Cancelling a message movement task does not revert\n the messages that have already been moved. It can only stop the messages that have not\n been moved yet.

          \n \n
            \n
          • \n

            This action is currently limited to supporting message redrive from dead-letter queues (DLQs) only. In this context, the source\n queue is the dead-letter queue (DLQ), while the destination queue can be the\n original source queue (from which the messages were driven to the\n dead-letter-queue), or a custom destination queue.

            \n
          • \n
          • \n

            Currently, only standard queues are supported.

            \n
          • \n
          • \n

            Only one active message movement task is supported per queue at any given\n time.

            \n
          • \n
          \n
          " + "smithy.api#default": 0, + "smithy.api#documentation": "

          The new value (in seconds) for the message's visibility timeout.

          " } + } }, - "com.amazonaws.sqs#CancelMessageMoveTaskRequest": { - "type": "structure", - "members": { - "TaskHandle": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          An identifier associated with a message movement task.

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

          Encloses a receipt handle and an entry ID for each message in \n ChangeMessageVisibilityBatch.\n

          " + } + }, + "com.amazonaws.sqs#ChangeMessageVisibilityBatchRequestEntryList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#ChangeMessageVisibilityBatchRequestEntry" + } + }, + "com.amazonaws.sqs#ChangeMessageVisibilityBatchResult": { + "type": "structure", + "members": { + "Successful": { + "target": "com.amazonaws.sqs#ChangeMessageVisibilityBatchResultEntryList", + "traits": { + "smithy.api#documentation": "

          A list of \n ChangeMessageVisibilityBatchResultEntry\n \n items.

          ", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "ChangeMessageVisibilityBatchResultEntry" + } + }, + "Failed": { + "target": "com.amazonaws.sqs#BatchResultErrorEntryList", + "traits": { + "smithy.api#documentation": "

          A list of \n BatchResultErrorEntry\n items.

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

          For each message in the batch, the response contains a \n ChangeMessageVisibilityBatchResultEntry\n tag if the message\n succeeds or a \n BatchResultErrorEntry\n tag if the message\n fails.

          ", + "smithy.api#output": {} + } + }, + "com.amazonaws.sqs#ChangeMessageVisibilityBatchResultEntry": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#input": {} + "smithy.api#documentation": "

          Represents a message whose visibility timeout has been changed successfully.

          ", + "smithy.api#required": {} } + } }, - "com.amazonaws.sqs#CancelMessageMoveTaskResult": { - "type": "structure", - "members": { - "ApproximateNumberOfMessagesMoved": { - "target": "com.amazonaws.sqs#Long", - "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "

          The approximate number of messages already moved to the destination queue.

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

          Encloses the Id of an entry in \n ChangeMessageVisibilityBatch.\n

          " + } + }, + "com.amazonaws.sqs#ChangeMessageVisibilityBatchResultEntryList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#ChangeMessageVisibilityBatchResultEntry" + } + }, + "com.amazonaws.sqs#ChangeMessageVisibilityRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#output": {} + "smithy.api#documentation": "

          The URL of the Amazon SQS queue whose message's visibility is changed.

          \n

          Queue URLs and names are case-sensitive.

          ", + "smithy.api#required": {} } - }, - "com.amazonaws.sqs#ChangeMessageVisibility": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#ChangeMessageVisibilityRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#InvalidAddress" - }, - { - "target": "com.amazonaws.sqs#InvalidSecurity" - }, - { - "target": "com.amazonaws.sqs#MessageNotInflight" - }, - { - "target": "com.amazonaws.sqs#QueueDoesNotExist" - }, - { - "target": "com.amazonaws.sqs#ReceiptHandleIsInvalid" - }, - { - "target": "com.amazonaws.sqs#RequestThrottled" - }, - { - "target": "com.amazonaws.sqs#UnsupportedOperation" - } - ], + }, + "ReceiptHandle": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

          Changes the visibility timeout of a specified message in a queue to a new value. The\n default visibility timeout for a message is 30 seconds. The minimum is 0 seconds. The\n maximum is 12 hours. For more information, see Visibility Timeout in the Amazon SQS Developer\n Guide.

          \n

          For example, if the default timeout for a queue is 60 seconds, 15 seconds have elapsed\n since you received the message, and you send a ChangeMessageVisibility call with\n VisibilityTimeout set to 10 seconds, the 10 seconds begin to count from\n the time that you make the ChangeMessageVisibility call. Thus, any attempt\n to change the visibility timeout or to delete that message 10 seconds after you\n initially change the visibility timeout (a total of 25 seconds) might result in an\n error.

          \n

          An Amazon SQS message has three basic states:

          \n
            \n
          1. \n

            Sent to a queue by a producer.

            \n
          2. \n
          3. \n

            Received from the queue by a consumer.

            \n
          4. \n
          5. \n

            Deleted from the queue.

            \n
          6. \n
          \n

          A message is considered to be stored after it is sent to a queue\n by a producer, but not yet received from the queue by a consumer (that is, between\n states 1 and 2). There is no limit to the number of stored messages. A message is\n considered to be in flight after it is received from a queue by a\n consumer, but not yet deleted from the queue (that is, between states 2 and 3). There is\n a limit to the number of in flight messages.

          \n

          Limits that apply to in flight messages are unrelated to the\n unlimited number of stored messages.

          \n

          For most standard queues (depending on queue traffic and message backlog), there can\n be a maximum of approximately 120,000 in flight messages (received from a queue by a\n consumer, but not yet deleted from the queue). If you reach this limit, Amazon SQS\n returns the OverLimit error message. To avoid reaching the limit, you\n should delete messages from the queue after they're processed. You can also increase the\n number of queues you use to process your messages. To request a limit increase, file a support request.

          \n

          For FIFO queues, there can be a maximum of 20,000 in flight messages (received from a\n queue by a consumer, but not yet deleted from the queue). If you reach this limit,\n Amazon SQS returns no error messages.

          \n \n

          If you attempt to set the VisibilityTimeout to a value greater than\n the maximum time left, Amazon SQS returns an error. Amazon SQS doesn't automatically\n recalculate and increase the timeout to the maximum remaining time.

          \n

          Unlike with a queue, when you change the visibility timeout for a specific message\n the timeout value is applied immediately but isn't saved in memory for that message.\n If you don't delete a message after it is received, the visibility timeout for the\n message reverts to the original timeout value (not to the value you set using the\n ChangeMessageVisibility action) the next time the message is\n received.

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

          The receipt handle associated with the message, whose visibility timeout is changed.\n This parameter is returned by the \n ReceiveMessage\n \n action.

          ", + "smithy.api#required": {} } - }, - "com.amazonaws.sqs#ChangeMessageVisibilityBatch": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#ChangeMessageVisibilityBatchRequest" - }, - "output": { - "target": "com.amazonaws.sqs#ChangeMessageVisibilityBatchResult" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#BatchEntryIdsNotDistinct" - }, - { - "target": "com.amazonaws.sqs#EmptyBatchRequest" - }, - { - "target": "com.amazonaws.sqs#InvalidAddress" - }, - { - "target": "com.amazonaws.sqs#InvalidBatchEntryId" - }, - { - "target": "com.amazonaws.sqs#InvalidSecurity" - }, - { - "target": "com.amazonaws.sqs#QueueDoesNotExist" - }, - { - "target": "com.amazonaws.sqs#RequestThrottled" - }, - { - "target": "com.amazonaws.sqs#TooManyEntriesInBatchRequest" - }, - { - "target": "com.amazonaws.sqs#UnsupportedOperation" - } - ], + }, + "VisibilityTimeout": { + "target": "com.amazonaws.sqs#Integer", "traits": { - "smithy.api#documentation": "

          Changes the visibility timeout of multiple messages. This is a batch version of\n \n ChangeMessageVisibility. The result of the action\n on each message is reported individually in the response. You can send up to 10\n \n ChangeMessageVisibility\n requests with each\n ChangeMessageVisibilityBatch action.

          \n \n

          Because the batch request can result in a combination of successful and\n unsuccessful actions, you should check for batch errors even when the call returns\n an HTTP status code of 200.

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

          The new value for the message's visibility timeout (in seconds). Values range:\n 0 to 43200. Maximum: 12 hours.

          ", + "smithy.api#required": {} } + } }, - "com.amazonaws.sqs#ChangeMessageVisibilityBatchRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The URL of the Amazon SQS queue whose messages' visibility is changed.

          \n

          Queue URLs and names are case-sensitive.

          ", - "smithy.api#required": {} - } - }, - "Entries": { - "target": "com.amazonaws.sqs#ChangeMessageVisibilityBatchRequestEntryList", - "traits": { - "smithy.api#documentation": "

          Lists the receipt handles of the messages for which the visibility timeout must be\n changed.

          ", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "ChangeMessageVisibilityBatchRequestEntry" - } - } - }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.sqs#CreateQueue": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#CreateQueueRequest" + }, + "output": { + "target": "com.amazonaws.sqs#CreateQueueResult" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#QueueDeletedRecently" + }, + { + "target": "com.amazonaws.sqs#QueueNameExists" + } + ], + "traits": { + "smithy.api#documentation": "

          Creates a new standard or FIFO queue. You can pass one or more attributes in\n the request. Keep the following in mind:

          \n
            \n
          • \n

            If you don't specify the FifoQueue attribute, Amazon SQS creates a standard queue.

            \n \n

            You can't change the queue type after you create it and you can't convert\n an existing standard queue into a FIFO queue. You must either create a new\n FIFO queue for your application or delete your existing standard queue and\n recreate it as a FIFO queue. For more information, see Moving From a Standard Queue to a FIFO Queue in the\n Amazon SQS Developer Guide.

            \n
            \n
          • \n
          • \n

            If you don't provide a value for an attribute, the queue is created with the\n default value for the attribute.

            \n
          • \n
          • \n

            If you delete a queue, you must wait at least 60 seconds before creating a\n queue with the same name.

            \n
          • \n
          \n

          To successfully create a new queue, you must provide a queue name that adheres to the\n limits\n related to queues and is unique within the scope of your queues.

          \n \n

          After you create a queue, you must wait at least one second after the queue is\n created to be able to use the queue.

          \n
          \n

          To get the queue URL, use the \n GetQueueUrl\n action.\n \n GetQueueUrl\n requires only the\n QueueName parameter. be aware of existing queue names:

          \n
            \n
          • \n

            If you provide the name of an existing queue along with the exact names and\n values of all the queue's attributes, CreateQueue returns the queue\n URL for the existing queue.

            \n
          • \n
          • \n

            If the queue name, attribute names, or attribute values don't match an\n existing queue, CreateQueue returns an error.

            \n
          • \n
          \n \n

          Cross-account permissions don't apply to this action. For more information, \nsee Grant \ncross-account permissions to a role and a username in the Amazon SQS Developer Guide.

          \n
          " + } + }, + "com.amazonaws.sqs#CreateQueueRequest": { + "type": "structure", + "members": { + "QueueName": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

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

          The name of the new queue. The following limits apply to this name:

          \n
            \n
          • \n

            A queue name can have up to 80 characters.

            \n
          • \n
          • \n

            Valid values: alphanumeric characters, hyphens (-), and\n underscores (_).

            \n
          • \n
          • \n

            A FIFO queue name must end with the .fifo suffix.

            \n
          • \n
          \n

          Queue URLs and names are case-sensitive.

          ", + "smithy.api#required": {} } - }, - "com.amazonaws.sqs#ChangeMessageVisibilityBatchRequestEntry": { - "type": "structure", - "members": { - "Id": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          An identifier for this particular receipt handle used to communicate the\n result.

          \n \n

          The Ids of a batch request need to be unique within a request.

          \n

          This identifier can have up to 80 characters. The following characters are\n accepted: alphanumeric characters, hyphens(-), and underscores (_).

          \n
          ", - "smithy.api#required": {} - } - }, - "ReceiptHandle": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          A receipt handle.

          ", - "smithy.api#required": {} - } - }, - "VisibilityTimeout": { - "target": "com.amazonaws.sqs#NullableInteger", - "traits": { - "smithy.api#documentation": "

          The new value (in seconds) for the message's visibility timeout.

          " - } - } - }, + }, + "tags": { + "target": "com.amazonaws.sqs#TagMap", "traits": { - "smithy.api#documentation": "

          Encloses a receipt handle and an entry ID for each message in \n ChangeMessageVisibilityBatch.\n

          " + "smithy.api#documentation": "

          Add cost allocation tags to the specified Amazon SQS queue. For an overview, see Tagging \nYour Amazon SQS Queues in the Amazon SQS Developer Guide.

          \n

          When you use queue tags, keep the following guidelines in mind:

          \n
            \n
          • \n

            Adding more than 50 tags to a queue isn't recommended.

            \n
          • \n
          • \n

            Tags don't have any semantic meaning. Amazon SQS interprets tags as character strings.

            \n
          • \n
          • \n

            Tags are case-sensitive.

            \n
          • \n
          • \n

            A new tag with a key identical to that of an existing tag overwrites the existing tag.

            \n
          • \n
          \n

          For a full list of tag restrictions, see \nQuotas related to queues \nin the Amazon SQS Developer Guide.

          \n \n

          To be able to tag a queue on creation, you must have the\n sqs:CreateQueue and sqs:TagQueue permissions.

          \n

          Cross-account permissions don't apply to this action. For more information, \nsee Grant \ncross-account permissions to a role and a username in the Amazon SQS Developer Guide.

          \n
          ", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Tag" } - }, - "com.amazonaws.sqs#ChangeMessageVisibilityBatchRequestEntryList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#ChangeMessageVisibilityBatchRequestEntry" + }, + "Attributes": { + "target": "com.amazonaws.sqs#QueueAttributeMap", + "traits": { + "smithy.api#documentation": "

          A map of attributes with their corresponding values.

          \n

          The following lists the names, descriptions, and values of the special request\n parameters that the CreateQueue action uses:

          \n
            \n
          • \n

            \n DelaySeconds – The length of time, in seconds, for which the\n delivery of all messages in the queue is delayed. Valid values: An integer from\n 0 to 900 seconds (15 minutes). Default: 0.

            \n
          • \n
          • \n

            \n MaximumMessageSize – The limit of how many bytes a message\n can contain before Amazon SQS rejects it. Valid values: An integer from 1,024 bytes\n (1 KiB) to 262,144 bytes (256 KiB). Default: 262,144 (256 KiB).

            \n
          • \n
          • \n

            \n MessageRetentionPeriod – The length of time, in seconds, for\n which Amazon SQS retains a message. Valid values: An integer from 60 seconds (1\n minute) to 1,209,600 seconds (14 days). Default: 345,600 (4 days). When you\n change a queue's attributes, the change can take up to 60 seconds for most of\n the attributes to propagate throughout the Amazon SQS system. Changes made to the\n MessageRetentionPeriod attribute can take up to 15 minutes and\n will impact existing messages in the queue potentially causing them to be\n expired and deleted if the MessageRetentionPeriod is reduced below\n the age of existing messages.

            \n
          • \n
          • \n

            \n Policy – The queue's policy. A valid Amazon Web Services policy. For more\n information about policy structure, see Overview of Amazon Web Services IAM\n Policies in the IAM User Guide.

            \n
          • \n
          • \n

            \n ReceiveMessageWaitTimeSeconds – The length of time, in\n seconds, for which a \n ReceiveMessage\n action waits\n for a message to arrive. Valid values: An integer from 0 to 20 (seconds).\n Default: 0.

            \n
          • \n
          • \n

            \n VisibilityTimeout – The visibility timeout for the queue, in\n seconds. Valid values: An integer from 0 to 43,200 (12 hours). Default: 30. For\n more information about the visibility timeout, see Visibility Timeout in the Amazon SQS Developer\n Guide.

            \n
          • \n
          \n

          The following attributes apply only to dead-letter queues:\n

          \n
            \n
          • \n

            \n RedrivePolicy – The string that includes the parameters for the dead-letter queue functionality \n of the source queue as a JSON object. The parameters are as follows:

            \n
              \n
            • \n

              \n deadLetterTargetArn – The Amazon Resource Name (ARN) of the dead-letter queue to \n which Amazon SQS moves messages after the value of maxReceiveCount is exceeded.

              \n
            • \n
            • \n

              \n maxReceiveCount – The number of times a message is delivered to the source queue before being \n moved to the dead-letter queue. Default: 10. When the ReceiveCount for a message exceeds the maxReceiveCount \n for a queue, Amazon SQS moves the message to the dead-letter-queue.

              \n
            • \n
            \n
          • \n
          • \n

            \n RedriveAllowPolicy – The string that includes the parameters for the permissions for the dead-letter\n queue redrive permission and which source queues can specify dead-letter queues as a JSON object. The parameters are as follows:

            \n
              \n
            • \n

              \n redrivePermission – The permission type that defines which source queues can \n specify the current queue as the dead-letter queue. Valid values are:

              \n
                \n
              • \n

                \n allowAll – (Default) Any source queues in this Amazon Web Services account in the same Region can \n specify this queue as the dead-letter queue.

                \n
              • \n
              • \n

                \n denyAll – No source queues can specify this queue as the dead-letter\n queue.

                \n
              • \n
              • \n

                \n byQueue – Only queues specified by the sourceQueueArns parameter can specify \n this queue as the dead-letter queue.

                \n
              • \n
              \n
            • \n
            • \n

              \n sourceQueueArns – The Amazon Resource Names (ARN)s of the source queues that can specify \n this queue as the dead-letter queue and redrive messages. You can specify this parameter only when the \n redrivePermission parameter is set to byQueue. You can specify up to 10 source queue ARNs. \n To allow more than 10 source queues to specify dead-letter queues, set the redrivePermission parameter\n to allowAll.

              \n
            • \n
            \n
          • \n
          \n \n

          The dead-letter queue of a \n FIFO queue must also be a FIFO queue. Similarly, the dead-letter \n queue of a standard queue must also be a standard queue.

          \n
          \n

          The following attributes apply only to server-side-encryption:

          \n
            \n
          • \n

            \n KmsMasterKeyId – The ID of an Amazon Web Services managed customer master\n key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms. While the alias of the Amazon Web Services managed CMK for Amazon SQS is\n always alias/aws/sqs, the alias of a custom CMK can, for example,\n be alias/MyAlias\n . For more examples, see\n KeyId in the Key Management Service API\n Reference.

            \n
          • \n
          • \n

            \n KmsDataKeyReusePeriodSeconds – The length of time, in\n seconds, for which Amazon SQS can reuse a data key to\n encrypt or decrypt messages before calling KMS again. An integer\n representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24\n hours). Default: 300 (5 minutes). A shorter time period provides better security\n but results in more calls to KMS which might incur charges after Free Tier. For\n more information, see How Does the Data Key Reuse Period Work?\n

            \n
          • \n
          • \n

            \n SqsManagedSseEnabled – Enables server-side queue encryption\n using SQS owned encryption keys. Only one server-side encryption option is\n supported per queue (for example, SSE-KMS or SSE-SQS).

            \n
          • \n
          \n

          The following attributes apply only to FIFO (first-in-first-out)\n queues:

          \n
            \n
          • \n

            \n FifoQueue – Designates a queue as FIFO. Valid values are\n true and false. If you don't specify the FifoQueue attribute, Amazon SQS creates a standard queue. You\n can provide this attribute only during queue creation. You can't change it for\n an existing queue. When you set this attribute, you must also provide the\n MessageGroupId for your messages explicitly.

            \n

            For more information, see FIFO queue logic in the Amazon SQS Developer\n Guide.

            \n
          • \n
          • \n

            \n ContentBasedDeduplication – Enables content-based\n deduplication. Valid values are true and false. For\n more information, see Exactly-once processing in the Amazon SQS Developer\n Guide. Note the following:

            \n
              \n
            • \n

              Every message must have a unique\n MessageDeduplicationId.

              \n
                \n
              • \n

                You may provide a MessageDeduplicationId\n explicitly.

                \n
              • \n
              • \n

                If you aren't able to provide a\n MessageDeduplicationId and you enable\n ContentBasedDeduplication for your queue, Amazon SQS\n uses a SHA-256 hash to generate the\n MessageDeduplicationId using the body of the\n message (but not the attributes of the message).

                \n
              • \n
              • \n

                If you don't provide a MessageDeduplicationId and\n the queue doesn't have ContentBasedDeduplication\n set, the action fails with an error.

                \n
              • \n
              • \n

                If the queue has ContentBasedDeduplication set,\n your MessageDeduplicationId overrides the generated\n one.

                \n
              • \n
              \n
            • \n
            • \n

              When ContentBasedDeduplication is in effect, messages\n with identical content sent within the deduplication interval are\n treated as duplicates and only one copy of the message is\n delivered.

              \n
            • \n
            • \n

              If you send one message with ContentBasedDeduplication\n enabled and then another message with a\n MessageDeduplicationId that is the same as the one\n generated for the first MessageDeduplicationId, the two\n messages are treated as duplicates and only one copy of the message is\n delivered.

              \n
            • \n
            \n
          • \n
          \n

          The following attributes apply only to \nhigh throughput\nfor FIFO queues:

          \n
            \n
          • \n

            \n DeduplicationScope – Specifies whether message deduplication occurs at the \n message group or queue level. Valid values are messageGroup and queue.

            \n
          • \n
          • \n

            \n FifoThroughputLimit – Specifies whether the FIFO queue throughput \n quota applies to the entire queue or per message group. Valid values are perQueue and perMessageGroupId. \n The perMessageGroupId value is allowed only when the value for DeduplicationScope is messageGroup.

            \n
          • \n
          \n

          To enable high throughput for FIFO queues, do the following:

          \n
            \n
          • \n

            Set DeduplicationScope to messageGroup.

            \n
          • \n
          • \n

            Set FifoThroughputLimit to perMessageGroupId.

            \n
          • \n
          \n

          If you set these attributes to anything other than the values shown for enabling high\n throughput, normal throughput is in effect and deduplication occurs as specified.

          \n

          For information on throughput quotas, \n see Quotas related to messages \n in the Amazon SQS Developer Guide.

          ", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Attribute" } + } }, - "com.amazonaws.sqs#ChangeMessageVisibilityBatchResult": { - "type": "structure", - "members": { - "Successful": { - "target": "com.amazonaws.sqs#ChangeMessageVisibilityBatchResultEntryList", - "traits": { - "smithy.api#documentation": "

          A list of \n ChangeMessageVisibilityBatchResultEntry\n \n items.

          ", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "ChangeMessageVisibilityBatchResultEntry" - } - }, - "Failed": { - "target": "com.amazonaws.sqs#BatchResultErrorEntryList", - "traits": { - "smithy.api#documentation": "

          A list of \n BatchResultErrorEntry\n items.

          ", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "BatchResultErrorEntry" - } - } - }, + "traits": { + "smithy.api#documentation": "

          ", + "smithy.api#input": {} + } + }, + "com.amazonaws.sqs#CreateQueueResult": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

          For each message in the batch, the response contains a \n ChangeMessageVisibilityBatchResultEntry\n tag if the message\n succeeds or a \n BatchResultErrorEntry\n tag if the message\n fails.

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

          The URL of the created Amazon SQS queue.

          " } + } }, - "com.amazonaws.sqs#ChangeMessageVisibilityBatchResultEntry": { - "type": "structure", - "members": { - "Id": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          Represents a message whose visibility timeout has been changed successfully.

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

          Returns the QueueUrl attribute of the created queue.

          ", + "smithy.api#output": {} + } + }, + "com.amazonaws.sqs#DeleteMessage": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#DeleteMessageRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#InvalidIdFormat" + }, + { + "target": "com.amazonaws.sqs#ReceiptHandleIsInvalid" + } + ], + "traits": { + "smithy.api#documentation": "

          Deletes the specified message from the specified queue. To select the message to\n delete, use the ReceiptHandle of the message (not the\n MessageId which you receive when you send the message). Amazon SQS can\n delete a message from a queue even if a visibility timeout setting causes the message to\n be locked by another consumer. Amazon SQS automatically deletes messages left in a queue\n longer than the retention period configured for the queue.

          \n \n

          The ReceiptHandle is associated with a specific\n instance of receiving a message. If you receive a message more than\n once, the ReceiptHandle is different each time you receive a message.\n When you use the DeleteMessage action, you must provide the most\n recently received ReceiptHandle for the message (otherwise, the request\n succeeds, but the message will not be deleted).

          \n

          For standard queues, it is possible to receive a message even after you\n delete it. This might happen on rare occasions if one of the servers which stores a\n copy of the message is unavailable when you send the request to delete the message.\n The copy remains on the server and might be returned to you during a subsequent\n receive request. You should ensure that your application is idempotent, so that\n receiving a message more than once does not cause issues.

          \n
          " + } + }, + "com.amazonaws.sqs#DeleteMessageBatch": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#DeleteMessageBatchRequest" + }, + "output": { + "target": "com.amazonaws.sqs#DeleteMessageBatchResult" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#BatchEntryIdsNotDistinct" + }, + { + "target": "com.amazonaws.sqs#EmptyBatchRequest" + }, + { + "target": "com.amazonaws.sqs#InvalidBatchEntryId" + }, + { + "target": "com.amazonaws.sqs#TooManyEntriesInBatchRequest" + } + ], + "traits": { + "smithy.api#documentation": "

          Deletes up to ten messages from the specified queue. This is a batch version of\n \n DeleteMessage. The result of the action on each\n message is reported individually in the response.

          \n \n

          Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.

          \n
          " + } + }, + "com.amazonaws.sqs#DeleteMessageBatchRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

          The URL of the Amazon SQS queue from which messages are deleted.

          \n

          Queue URLs and names are case-sensitive.

          ", + "smithy.api#required": {} + } + }, + "Entries": { + "target": "com.amazonaws.sqs#DeleteMessageBatchRequestEntryList", + "traits": { + "smithy.api#documentation": "

          Lists the receipt handles for the messages to be deleted.

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

          ", + "smithy.api#input": {} + } + }, + "com.amazonaws.sqs#DeleteMessageBatchRequestEntry": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

          Encloses the Id of an entry in \n ChangeMessageVisibilityBatch.\n

          " + "smithy.api#documentation": "

          The identifier for this particular receipt handle. This is used to communicate the\n result.

          \n \n

          The Ids of a batch request need to be unique within a request.

          \n

          This identifier can have up to 80 characters. The following characters are accepted: alphanumeric characters, hyphens(-), and underscores (_).

          \n
          ", + "smithy.api#required": {} } - }, - "com.amazonaws.sqs#ChangeMessageVisibilityBatchResultEntryList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#ChangeMessageVisibilityBatchResultEntry" + }, + "ReceiptHandle": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

          A receipt handle.

          ", + "smithy.api#required": {} } + } }, - "com.amazonaws.sqs#ChangeMessageVisibilityRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The URL of the Amazon SQS queue whose message's visibility is changed.

          \n

          Queue URLs and names are case-sensitive.

          ", - "smithy.api#required": {} - } - }, - "ReceiptHandle": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The receipt handle associated with the message, whose visibility timeout is changed.\n This parameter is returned by the \n ReceiveMessage\n \n action.

          ", - "smithy.api#required": {} - } - }, - "VisibilityTimeout": { - "target": "com.amazonaws.sqs#NullableInteger", - "traits": { - "smithy.api#documentation": "

          The new value for the message's visibility timeout (in seconds). Values range:\n 0 to 43200. Maximum: 12 hours.

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

          Encloses a receipt handle and an identifier for it.

          " + } + }, + "com.amazonaws.sqs#DeleteMessageBatchRequestEntryList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#DeleteMessageBatchRequestEntry" + } + }, + "com.amazonaws.sqs#DeleteMessageBatchResult": { + "type": "structure", + "members": { + "Successful": { + "target": "com.amazonaws.sqs#DeleteMessageBatchResultEntryList", + "traits": { + "smithy.api#documentation": "

          A list of \n DeleteMessageBatchResultEntry\n items.

          ", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "DeleteMessageBatchResultEntry" + } + }, + "Failed": { + "target": "com.amazonaws.sqs#BatchResultErrorEntryList", + "traits": { + "smithy.api#documentation": "

          A list of \n BatchResultErrorEntry\n items.

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

          For each message in the batch, the response contains a \n DeleteMessageBatchResultEntry\n tag if the message is deleted\n or a \n BatchResultErrorEntry\n tag if the message can't be\n deleted.

          ", + "smithy.api#output": {} + } + }, + "com.amazonaws.sqs#DeleteMessageBatchResultEntry": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#input": {} + "smithy.api#documentation": "

          Represents a successfully deleted message.

          ", + "smithy.api#required": {} } + } }, - "com.amazonaws.sqs#CreateQueue": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#CreateQueueRequest" - }, - "output": { - "target": "com.amazonaws.sqs#CreateQueueResult" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#InvalidAddress" - }, - { - "target": "com.amazonaws.sqs#InvalidAttributeName" - }, - { - "target": "com.amazonaws.sqs#InvalidAttributeValue" - }, - { - "target": "com.amazonaws.sqs#InvalidSecurity" - }, - { - "target": "com.amazonaws.sqs#QueueDeletedRecently" - }, - { - "target": "com.amazonaws.sqs#QueueNameExists" - }, - { - "target": "com.amazonaws.sqs#RequestThrottled" - }, - { - "target": "com.amazonaws.sqs#UnsupportedOperation" - } - ], + "traits": { + "smithy.api#documentation": "

          Encloses the Id of an entry in \n DeleteMessageBatch.\n

          " + } + }, + "com.amazonaws.sqs#DeleteMessageBatchResultEntryList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#DeleteMessageBatchResultEntry" + } + }, + "com.amazonaws.sqs#DeleteMessageRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

          Creates a new standard or FIFO queue. You can pass one or more attributes in the\n request. Keep the following in mind:

          \n
            \n
          • \n

            If you don't specify the FifoQueue attribute, Amazon SQS creates\n a standard queue.

            \n \n

            You can't change the queue type after you create it and you can't convert\n an existing standard queue into a FIFO queue. You must either create a new\n FIFO queue for your application or delete your existing standard queue and\n recreate it as a FIFO queue. For more information, see Moving From a Standard Queue to a FIFO Queue in the\n Amazon SQS Developer Guide.

            \n
            \n
          • \n
          • \n

            If you don't provide a value for an attribute, the queue is created with the\n default value for the attribute.

            \n
          • \n
          • \n

            If you delete a queue, you must wait at least 60 seconds before creating a\n queue with the same name.

            \n
          • \n
          \n

          To successfully create a new queue, you must provide a queue name that adheres to the\n limits\n related to queues and is unique within the scope of your queues.

          \n \n

          After you create a queue, you must wait at least one second after the queue is\n created to be able to use the queue.

          \n
          \n

          To get the queue URL, use the \n GetQueueUrl\n action.\n \n GetQueueUrl\n requires only the\n QueueName parameter. be aware of existing queue names:

          \n
            \n
          • \n

            If you provide the name of an existing queue along with the exact names and\n values of all the queue's attributes, CreateQueue returns the queue\n URL for the existing queue.

            \n
          • \n
          • \n

            If the queue name, attribute names, or attribute values don't match an\n existing queue, CreateQueue returns an error.

            \n
          • \n
          \n \n

          Cross-account permissions don't apply to this action. For more information, see\n Grant cross-account permissions to a role and a username in the\n Amazon SQS Developer Guide.

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

          The URL of the Amazon SQS queue from which messages are deleted.

          \n

          Queue URLs and names are case-sensitive.

          ", + "smithy.api#required": {} } - }, - "com.amazonaws.sqs#CreateQueueRequest": { - "type": "structure", - "members": { - "QueueName": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The name of the new queue. The following limits apply to this name:

          \n
            \n
          • \n

            A queue name can have up to 80 characters.

            \n
          • \n
          • \n

            Valid values: alphanumeric characters, hyphens (-), and\n underscores (_).

            \n
          • \n
          • \n

            A FIFO queue name must end with the .fifo suffix.

            \n
          • \n
          \n

          Queue URLs and names are case-sensitive.

          ", - "smithy.api#required": {} - } - }, - "Attributes": { - "target": "com.amazonaws.sqs#QueueAttributeMap", - "traits": { - "smithy.api#documentation": "

          A map of attributes with their corresponding values.

          \n

          The following lists the names, descriptions, and values of the special request\n parameters that the CreateQueue action uses:

          \n
            \n
          • \n

            \n DelaySeconds – The length of time, in seconds, for which the\n delivery of all messages in the queue is delayed. Valid values: An integer from\n 0 to 900 seconds (15 minutes). Default: 0.

            \n
          • \n
          • \n

            \n MaximumMessageSize – The limit of how many bytes a message can\n contain before Amazon SQS rejects it. Valid values: An integer from 1,024 bytes\n (1 KiB) to 262,144 bytes (256 KiB). Default: 262,144 (256 KiB).

            \n
          • \n
          • \n

            \n MessageRetentionPeriod – The length of time, in seconds, for which\n Amazon SQS retains a message. Valid values: An integer from 60 seconds (1\n minute) to 1,209,600 seconds (14 days). Default: 345,600 (4 days). When you\n change a queue's attributes, the change can take up to 60 seconds for most of\n the attributes to propagate throughout the Amazon SQS system. Changes made to\n the MessageRetentionPeriod attribute can take up to 15 minutes and\n will impact existing messages in the queue potentially causing them to be\n expired and deleted if the MessageRetentionPeriod is reduced below\n the age of existing messages.

            \n
          • \n
          • \n

            \n Policy – The queue's policy. A valid Amazon Web Services\n policy. For more information about policy structure, see Overview of Amazon Web Services IAM Policies in the IAM\n User Guide.

            \n
          • \n
          • \n

            \n ReceiveMessageWaitTimeSeconds – The length of time, in seconds, for\n which a \n ReceiveMessage\n action waits for a message\n to arrive. Valid values: An integer from 0 to 20 (seconds). Default: 0.

            \n
          • \n
          • \n

            \n VisibilityTimeout – The visibility timeout for the queue, in\n seconds. Valid values: An integer from 0 to 43,200 (12 hours). Default: 30. For\n more information about the visibility timeout, see Visibility Timeout in the Amazon SQS Developer\n Guide.

            \n
          • \n
          \n

          The following attributes apply only to dead-letter queues:\n

          \n
            \n
          • \n

            \n RedrivePolicy – The string that includes the parameters for the\n dead-letter queue functionality of the source queue as a JSON object. The\n parameters are as follows:

            \n
              \n
            • \n

              \n deadLetterTargetArn – The Amazon Resource Name (ARN) of\n the dead-letter queue to which Amazon SQS moves messages after the value\n of maxReceiveCount is exceeded.

              \n
            • \n
            • \n

              \n maxReceiveCount – The number of times a message is\n delivered to the source queue before being moved to the dead-letter\n queue. Default: 10. When the ReceiveCount for a message\n exceeds the maxReceiveCount for a queue, Amazon SQS moves\n the message to the dead-letter-queue.

              \n
            • \n
            \n
          • \n
          • \n

            \n RedriveAllowPolicy – The string that includes the parameters for\n the permissions for the dead-letter queue redrive permission and which source\n queues can specify dead-letter queues as a JSON object. The parameters are as\n follows:

            \n
              \n
            • \n

              \n redrivePermission – The permission type that defines\n which source queues can specify the current queue as the dead-letter\n queue. Valid values are:

              \n
                \n
              • \n

                \n allowAll – (Default) Any source queues in this\n Amazon Web Services account in the same\n Region can specify this queue as the dead-letter queue.

                \n
              • \n
              • \n

                \n denyAll – No source queues can specify this queue\n as the dead-letter queue.

                \n
              • \n
              • \n

                \n byQueue – Only queues specified by the\n sourceQueueArns parameter can specify this\n queue as the dead-letter queue.

                \n
              • \n
              \n
            • \n
            • \n

              \n sourceQueueArns – The Amazon Resource Names (ARN)s of the\n source queues that can specify this queue as the dead-letter queue and\n redrive messages. You can specify this parameter only when the\n redrivePermission parameter is set to\n byQueue. You can specify up to 10 source queue ARNs. To\n allow more than 10 source queues to specify dead-letter queues, set the\n redrivePermission parameter to\n allowAll.

              \n
            • \n
            \n
          • \n
          \n \n

          The dead-letter queue of a FIFO queue must also be a FIFO queue. Similarly, the\n dead-letter queue of a standard queue must also be a standard queue.

          \n
          \n

          The following attributes apply only to server-side-encryption:

          \n
            \n
          • \n

            \n KmsMasterKeyId – The ID of an Amazon Web Services managed customer\n master key (CMK) for Amazon SQS or a custom CMK. For more information, see\n Key Terms. While the alias of the Amazon Web Services\n managed CMK for Amazon SQS is always alias/aws/sqs, the alias of a\n custom CMK can, for example, be alias/MyAlias\n .\n For more examples, see KeyId in the Key Management Service API\n Reference.

            \n
          • \n
          • \n

            \n KmsDataKeyReusePeriodSeconds – The length of time, in seconds, for\n which Amazon SQS can reuse a data key to\n encrypt or decrypt messages before calling KMS again. An integer representing\n seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). Default:\n 300 (5 minutes). A shorter time period provides better security but results in\n more calls to KMS which might incur charges after Free Tier. For more\n information, see How Does the Data Key Reuse Period Work?\n

            \n
          • \n
          • \n

            \n SqsManagedSseEnabled – Enables server-side queue encryption using\n SQS owned encryption keys. Only one server-side encryption option is supported\n per queue (for example, SSE-KMS or SSE-SQS).

            \n
          • \n
          \n

          The following attributes apply only to FIFO\n (first-in-first-out) queues:

          \n
            \n
          • \n

            \n FifoQueue – Designates a queue as FIFO. Valid values are\n true and false. If you don't specify the\n FifoQueue attribute, Amazon SQS creates a standard queue. You\n can provide this attribute only during queue creation. You can't change it for\n an existing queue. When you set this attribute, you must also provide the\n MessageGroupId for your messages explicitly.

            \n

            For more information, see FIFO queue logic in the Amazon SQS Developer\n Guide.

            \n
          • \n
          • \n

            \n ContentBasedDeduplication – Enables content-based deduplication.\n Valid values are true and false. For more information,\n see Exactly-once processing in the Amazon SQS Developer\n Guide. Note the following:

            \n
              \n
            • \n

              Every message must have a unique\n MessageDeduplicationId.

              \n
                \n
              • \n

                You may provide a MessageDeduplicationId\n explicitly.

                \n
              • \n
              • \n

                If you aren't able to provide a\n MessageDeduplicationId and you enable\n ContentBasedDeduplication for your queue,\n Amazon SQS uses a SHA-256 hash to generate the\n MessageDeduplicationId using the body of the\n message (but not the attributes of the message).

                \n
              • \n
              • \n

                If you don't provide a MessageDeduplicationId and\n the queue doesn't have ContentBasedDeduplication\n set, the action fails with an error.

                \n
              • \n
              • \n

                If the queue has ContentBasedDeduplication set,\n your MessageDeduplicationId overrides the generated\n one.

                \n
              • \n
              \n
            • \n
            • \n

              When ContentBasedDeduplication is in effect, messages\n with identical content sent within the deduplication interval are\n treated as duplicates and only one copy of the message is\n delivered.

              \n
            • \n
            • \n

              If you send one message with ContentBasedDeduplication\n enabled and then another message with a\n MessageDeduplicationId that is the same as the one\n generated for the first MessageDeduplicationId, the two\n messages are treated as duplicates and only one copy of the message is\n delivered.

              \n
            • \n
            \n
          • \n
          \n

          The following attributes apply only to high\n throughput for FIFO queues:

          \n
            \n
          • \n

            \n DeduplicationScope – Specifies whether message deduplication\n occurs at the message group or queue level. Valid values are\n messageGroup and queue.

            \n
          • \n
          • \n

            \n FifoThroughputLimit – Specifies whether the FIFO queue throughput\n quota applies to the entire queue or per message group. Valid values are\n perQueue and perMessageGroupId. The\n perMessageGroupId value is allowed only when the value for\n DeduplicationScope is messageGroup.

            \n
          • \n
          \n

          To enable high throughput for FIFO queues, do the following:

          \n
            \n
          • \n

            Set DeduplicationScope to messageGroup.

            \n
          • \n
          • \n

            Set FifoThroughputLimit to perMessageGroupId.

            \n
          • \n
          \n

          If you set these attributes to anything other than the values shown for enabling high\n throughput, normal throughput is in effect and deduplication occurs as specified.

          \n

          For information on throughput quotas, see Quotas\n related to messages in the Amazon SQS Developer\n Guide.

          ", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Attribute" - } - }, - "tags": { - "target": "com.amazonaws.sqs#TagMap", - "traits": { - "smithy.api#documentation": "

          Add cost allocation tags to the specified Amazon SQS queue. For an overview, see\n Tagging\n Your Amazon SQS Queues in the Amazon SQS Developer\n Guide.

          \n

          When you use queue tags, keep the following guidelines in mind:

          \n
            \n
          • \n

            Adding more than 50 tags to a queue isn't recommended.

            \n
          • \n
          • \n

            Tags don't have any semantic meaning. Amazon SQS interprets tags as character\n strings.

            \n
          • \n
          • \n

            Tags are case-sensitive.

            \n
          • \n
          • \n

            A new tag with a key identical to that of an existing tag overwrites the\n existing tag.

            \n
          • \n
          \n

          For a full list of tag restrictions, see Quotas related to queues in the Amazon SQS Developer\n Guide.

          \n \n

          To be able to tag a queue on creation, you must have the\n sqs:CreateQueue and sqs:TagQueue permissions.

          \n

          Cross-account permissions don't apply to this action. For more information, see\n Grant cross-account permissions to a role and a username in the\n Amazon SQS Developer Guide.

          \n
          ", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Tag" - } - } - }, + }, + "ReceiptHandle": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

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

          The receipt handle associated with the message to delete.

          ", + "smithy.api#required": {} } + } }, - "com.amazonaws.sqs#CreateQueueResult": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The URL of the created Amazon SQS queue.

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

          ", + "smithy.api#input": {} + } + }, + "com.amazonaws.sqs#DeleteQueue": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#DeleteQueueRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "

          Deletes the queue specified by the QueueUrl, regardless of the queue's\n contents.

          \n \n

          Be careful with the DeleteQueue action: When you delete a queue, any\n messages in the queue are no longer available.

          \n
          \n

          When you delete a queue, the deletion process takes up to 60 seconds. Requests you\n send involving that queue during the 60 seconds might succeed. For example, a\n \n SendMessage\n request might succeed, but after 60\n seconds the queue and the message you sent no longer exist.

          \n

          When you delete a queue, you must wait at least 60 seconds before creating a queue\n with the same name.

          \n \n

          Cross-account permissions don't apply to this action. For more information, \nsee Grant \ncross-account permissions to a role and a username in the Amazon SQS Developer Guide.

          \n

          The delete operation uses the HTTP GET verb.

          \n
          " + } + }, + "com.amazonaws.sqs#DeleteQueueRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

          Returns the QueueUrl attribute of the created queue.

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

          The URL of the Amazon SQS queue to delete.

          \n

          Queue URLs and names are case-sensitive.

          ", + "smithy.api#required": {} } + } }, - "com.amazonaws.sqs#DeleteMessage": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#DeleteMessageRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#InvalidAddress" - }, - { - "target": "com.amazonaws.sqs#InvalidIdFormat" - }, - { - "target": "com.amazonaws.sqs#InvalidSecurity" - }, - { - "target": "com.amazonaws.sqs#QueueDoesNotExist" - }, - { - "target": "com.amazonaws.sqs#ReceiptHandleIsInvalid" - }, - { - "target": "com.amazonaws.sqs#RequestThrottled" - }, - { - "target": "com.amazonaws.sqs#UnsupportedOperation" - } - ], + "traits": { + "smithy.api#documentation": "

          ", + "smithy.api#input": {} + } + }, + "com.amazonaws.sqs#EmptyBatchRequest": { + "type": "structure", + "members": {}, + "traits": { + "aws.protocols#awsQueryError": { + "code": "AWS.SimpleQueueService.EmptyBatchRequest", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

          The batch request doesn't contain any entries.

          ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.sqs#GetQueueAttributes": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#GetQueueAttributesRequest" + }, + "output": { + "target": "com.amazonaws.sqs#GetQueueAttributesResult" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#InvalidAttributeName" + } + ], + "traits": { + "smithy.api#documentation": "

          Gets attributes for the specified queue.

          \n \n

          To determine whether a queue is FIFO, you can check whether QueueName ends with the .fifo suffix.

          \n
          " + } + }, + "com.amazonaws.sqs#GetQueueAttributesRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

          Deletes the specified message from the specified queue. To select the message to\n delete, use the ReceiptHandle of the message (not the\n MessageId which you receive when you send the message). Amazon SQS can\n delete a message from a queue even if a visibility timeout setting causes the message to\n be locked by another consumer. Amazon SQS automatically deletes messages left in a queue\n longer than the retention period configured for the queue.

          \n \n

          The ReceiptHandle is associated with a specific\n instance of receiving a message. If you receive a message more than\n once, the ReceiptHandle is different each time you receive a message.\n When you use the DeleteMessage action, you must provide the most\n recently received ReceiptHandle for the message (otherwise, the request\n succeeds, but the message will not be deleted).

          \n

          For standard queues, it is possible to receive a message even after you delete it.\n This might happen on rare occasions if one of the servers which stores a copy of the\n message is unavailable when you send the request to delete the message. The copy\n remains on the server and might be returned to you during a subsequent receive\n request. You should ensure that your application is idempotent, so that receiving a\n message more than once does not cause issues.

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

          The URL of the Amazon SQS queue whose attribute information is retrieved.

          \n

          Queue URLs and names are case-sensitive.

          ", + "smithy.api#required": {} } - }, - "com.amazonaws.sqs#DeleteMessageBatch": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#DeleteMessageBatchRequest" - }, - "output": { - "target": "com.amazonaws.sqs#DeleteMessageBatchResult" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#BatchEntryIdsNotDistinct" - }, - { - "target": "com.amazonaws.sqs#EmptyBatchRequest" - }, - { - "target": "com.amazonaws.sqs#InvalidAddress" - }, - { - "target": "com.amazonaws.sqs#InvalidBatchEntryId" - }, - { - "target": "com.amazonaws.sqs#InvalidSecurity" - }, - { - "target": "com.amazonaws.sqs#QueueDoesNotExist" - }, - { - "target": "com.amazonaws.sqs#RequestThrottled" - }, - { - "target": "com.amazonaws.sqs#TooManyEntriesInBatchRequest" - }, - { - "target": "com.amazonaws.sqs#UnsupportedOperation" - } - ], + }, + "AttributeNames": { + "target": "com.amazonaws.sqs#AttributeNameList", "traits": { - "smithy.api#documentation": "

          Deletes up to ten messages from the specified queue. This is a batch version of\n \n DeleteMessage. The result of the action on each\n message is reported individually in the response.

          \n \n

          Because the batch request can result in a combination of successful and\n unsuccessful actions, you should check for batch errors even when the call returns\n an HTTP status code of 200.

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

          A list of attributes for which to retrieve information.

          \n

          The AttributeNames parameter is optional, but if you don't specify values\n for this parameter, the request returns empty results.

          \n \n

          In the future, new attributes might be added. If you write code that calls this action, we recommend that you structure your code so that it can handle new attributes gracefully.

          \n
          \n

          The following attributes are supported:

          \n \n

          The ApproximateNumberOfMessagesDelayed,\n ApproximateNumberOfMessagesNotVisible, and\n ApproximateNumberOfMessages metrics may not achieve consistency\n until at least 1 minute after the producers stop sending messages. This period is\n required for the queue metadata to reach eventual consistency.

          \n
          \n
            \n
          • \n

            \n All – Returns all values.

            \n
          • \n
          • \n

            \n ApproximateNumberOfMessages – Returns the approximate\n number of messages available for retrieval from the queue.

            \n
          • \n
          • \n

            \n ApproximateNumberOfMessagesDelayed – Returns the\n approximate number of messages in the queue that are delayed and not available\n for reading immediately. This can happen when the queue is configured as a delay\n queue or when a message has been sent with a delay parameter.

            \n
          • \n
          • \n

            \n ApproximateNumberOfMessagesNotVisible – Returns the\n approximate number of messages that are in flight. Messages are considered to be\n in flight if they have been sent to a client but have\n not yet been deleted or have not yet reached the end of their visibility window.\n

            \n
          • \n
          • \n

            \n CreatedTimestamp – Returns the time when the queue was\n created in seconds (epoch\n time).

            \n
          • \n
          • \n

            \n DelaySeconds – Returns the default delay on the queue in\n seconds.

            \n
          • \n
          • \n

            \n LastModifiedTimestamp – Returns the time when the queue\n was last changed in seconds (epoch time).

            \n
          • \n
          • \n

            \n MaximumMessageSize – Returns the limit of how many bytes a\n message can contain before Amazon SQS rejects it.

            \n
          • \n
          • \n

            \n MessageRetentionPeriod – Returns the length of time, in\n seconds, for which Amazon SQS retains a message. When you change a queue's\n attributes, the change can take up to 60 seconds for most of the attributes to\n propagate throughout the Amazon SQS system. Changes made to the\n MessageRetentionPeriod attribute can take up to 15 minutes and\n will impact existing messages in the queue potentially causing them to be\n expired and deleted if the MessageRetentionPeriod is reduced below\n the age of existing messages.

            \n
          • \n
          • \n

            \n Policy – Returns the policy of the queue.

            \n
          • \n
          • \n

            \n QueueArn – Returns the Amazon resource name (ARN) of the\n queue.

            \n
          • \n
          • \n

            \n ReceiveMessageWaitTimeSeconds – Returns the length of\n time, in seconds, for which the ReceiveMessage action waits for a\n message to arrive.

            \n
          • \n
          • \n

            \n VisibilityTimeout – Returns the visibility timeout for the\n queue. For more information about the visibility timeout, see Visibility Timeout in the Amazon SQS Developer\n Guide.

            \n
          • \n
          \n

          The following attributes apply only to dead-letter queues:\n

          \n
            \n
          • \n

            \n RedrivePolicy – The string that includes the parameters for the dead-letter queue functionality \n of the source queue as a JSON object. The parameters are as follows:

            \n
              \n
            • \n

              \n deadLetterTargetArn – The Amazon Resource Name (ARN) of the dead-letter queue to \n which Amazon SQS moves messages after the value of maxReceiveCount is exceeded.

              \n
            • \n
            • \n

              \n maxReceiveCount – The number of times a message is delivered to the source queue before being \n moved to the dead-letter queue. Default: 10. When the ReceiveCount for a message exceeds the maxReceiveCount \n for a queue, Amazon SQS moves the message to the dead-letter-queue.

              \n
            • \n
            \n
          • \n
          • \n

            \n RedriveAllowPolicy – The string that includes the parameters for the permissions for the dead-letter\n queue redrive permission and which source queues can specify dead-letter queues as a JSON object. The parameters are as follows:

            \n
              \n
            • \n

              \n redrivePermission – The permission type that defines which source queues can \n specify the current queue as the dead-letter queue. Valid values are:

              \n
                \n
              • \n

                \n allowAll – (Default) Any source queues in this Amazon Web Services account in the same Region can \n specify this queue as the dead-letter queue.

                \n
              • \n
              • \n

                \n denyAll – No source queues can specify this queue as the dead-letter\n queue.

                \n
              • \n
              • \n

                \n byQueue – Only queues specified by the sourceQueueArns parameter can specify \n this queue as the dead-letter queue.

                \n
              • \n
              \n
            • \n
            • \n

              \n sourceQueueArns – The Amazon Resource Names (ARN)s of the source queues that can specify \n this queue as the dead-letter queue and redrive messages. You can specify this parameter only when the \n redrivePermission parameter is set to byQueue. You can specify up to 10 source queue ARNs. \n To allow more than 10 source queues to specify dead-letter queues, set the redrivePermission parameter\n to allowAll.

              \n
            • \n
            \n
          • \n
          \n \n

          The dead-letter queue of a \n FIFO queue must also be a FIFO queue. Similarly, the dead-letter \n queue of a standard queue must also be a standard queue.

          \n
          \n

          The following attributes apply only to server-side-encryption:

          \n
            \n
          • \n

            \n KmsMasterKeyId – Returns the ID of an Amazon Web Services managed customer\n master key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms.

            \n
          • \n
          • \n

            \n KmsDataKeyReusePeriodSeconds – Returns the length of time,\n in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt\n messages before calling KMS again. For more information, see\n How Does the Data Key Reuse Period Work?.

            \n
          • \n
          • \n

            \n SqsManagedSseEnabled – Returns information about whether the\n queue is using SSE-SQS encryption using SQS owned encryption keys. Only one\n server-side encryption option is supported per queue (for example, SSE-KMS or SSE-SQS).

            \n
          • \n
          \n

          The following attributes apply only to FIFO (first-in-first-out)\n queues:

          \n
            \n
          • \n

            \n FifoQueue – Returns information about whether the queue is\n FIFO. For more information, see FIFO queue logic in the Amazon SQS Developer\n Guide.

            \n \n

            To determine whether a queue is FIFO, you can check whether QueueName ends with the .fifo suffix.

            \n
            \n
          • \n
          • \n

            \n ContentBasedDeduplication – Returns whether content-based\n deduplication is enabled for the queue. For more information, see Exactly-once processing in the Amazon SQS Developer\n Guide.

            \n
          • \n
          \n

          The following attributes apply only to \nhigh throughput\nfor FIFO queues:

          \n
            \n
          • \n

            \n DeduplicationScope – Specifies whether message deduplication occurs at the \n message group or queue level. Valid values are messageGroup and queue.

            \n
          • \n
          • \n

            \n FifoThroughputLimit – Specifies whether the FIFO queue throughput \n quota applies to the entire queue or per message group. Valid values are perQueue and perMessageGroupId. \n The perMessageGroupId value is allowed only when the value for DeduplicationScope is messageGroup.

            \n
          • \n
          \n

          To enable high throughput for FIFO queues, do the following:

          \n
            \n
          • \n

            Set DeduplicationScope to messageGroup.

            \n
          • \n
          • \n

            Set FifoThroughputLimit to perMessageGroupId.

            \n
          • \n
          \n

          If you set these attributes to anything other than the values shown for enabling high\n throughput, normal throughput is in effect and deduplication occurs as specified.

          \n

          For information on throughput quotas, \n see Quotas related to messages \n in the Amazon SQS Developer Guide.

          ", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "AttributeName" } + } }, - "com.amazonaws.sqs#DeleteMessageBatchRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The URL of the Amazon SQS queue from which messages are deleted.

          \n

          Queue URLs and names are case-sensitive.

          ", - "smithy.api#required": {} - } - }, - "Entries": { - "target": "com.amazonaws.sqs#DeleteMessageBatchRequestEntryList", - "traits": { - "smithy.api#documentation": "

          Lists the receipt handles for the messages to be deleted.

          ", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "DeleteMessageBatchRequestEntry" - } - } - }, + "traits": { + "smithy.api#documentation": "

          ", + "smithy.api#input": {} + } + }, + "com.amazonaws.sqs#GetQueueAttributesResult": { + "type": "structure", + "members": { + "Attributes": { + "target": "com.amazonaws.sqs#QueueAttributeMap", + "traits": { + "smithy.api#documentation": "

          A map of attributes to their respective values.

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

          A list of returned queue attributes.

          ", + "smithy.api#output": {} + } + }, + "com.amazonaws.sqs#GetQueueUrl": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#GetQueueUrlRequest" + }, + "output": { + "target": "com.amazonaws.sqs#GetQueueUrlResult" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#QueueDoesNotExist" + } + ], + "traits": { + "smithy.api#documentation": "

          Returns the URL of an existing Amazon SQS queue.

          \n

          To access a queue that belongs to another AWS account, use the\n QueueOwnerAWSAccountId parameter to specify the account ID of the\n queue's owner. The queue's owner must grant you permission to access the queue. For more\n information about shared queue access, see \n AddPermission\n \n or see Allow Developers to Write Messages to a Shared Queue in the Amazon SQS\n Developer Guide.

          " + } + }, + "com.amazonaws.sqs#GetQueueUrlRequest": { + "type": "structure", + "members": { + "QueueName": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

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

          The name of the queue whose URL must be fetched. Maximum 80 characters. Valid values:\n alphanumeric characters, hyphens (-), and underscores\n (_).

          \n

          Queue URLs and names are case-sensitive.

          ", + "smithy.api#required": {} } - }, - "com.amazonaws.sqs#DeleteMessageBatchRequestEntry": { - "type": "structure", - "members": { - "Id": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The identifier for this particular receipt handle. This is used to communicate the\n result.

          \n \n

          The Ids of a batch request need to be unique within a request.

          \n

          This identifier can have up to 80 characters. The following characters are\n accepted: alphanumeric characters, hyphens(-), and underscores (_).

          \n
          ", - "smithy.api#required": {} - } - }, - "ReceiptHandle": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          A receipt handle.

          ", - "smithy.api#required": {} - } - } - }, + }, + "QueueOwnerAWSAccountId": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

          Encloses a receipt handle and an identifier for it.

          " + "smithy.api#documentation": "

          The Amazon Web Services account ID of the account that created the queue.

          " } + } }, - "com.amazonaws.sqs#DeleteMessageBatchRequestEntryList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#DeleteMessageBatchRequestEntry" + "traits": { + "smithy.api#documentation": "

          ", + "smithy.api#input": {} + } + }, + "com.amazonaws.sqs#GetQueueUrlResult": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

          The URL of the queue.

          " } + } }, - "com.amazonaws.sqs#DeleteMessageBatchResult": { - "type": "structure", - "members": { - "Successful": { - "target": "com.amazonaws.sqs#DeleteMessageBatchResultEntryList", - "traits": { - "smithy.api#documentation": "

          A list of \n DeleteMessageBatchResultEntry\n items.

          ", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "DeleteMessageBatchResultEntry" - } - }, - "Failed": { - "target": "com.amazonaws.sqs#BatchResultErrorEntryList", - "traits": { - "smithy.api#documentation": "

          A list of \n BatchResultErrorEntry\n items.

          ", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "BatchResultErrorEntry" - } - } - }, + "traits": { + "smithy.api#documentation": "

          For more information, see Interpreting Responses in the Amazon SQS Developer\n Guide.

          ", + "smithy.api#output": {} + } + }, + "com.amazonaws.sqs#Integer": { + "type": "integer", + "traits": { + "smithy.api#default": 0 + } + }, + "com.amazonaws.sqs#InvalidAttributeName": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

          The specified attribute doesn't exist.

          ", + "smithy.api#error": "client" + } + }, + "com.amazonaws.sqs#InvalidBatchEntryId": { + "type": "structure", + "members": {}, + "traits": { + "aws.protocols#awsQueryError": { + "code": "AWS.SimpleQueueService.InvalidBatchEntryId", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

          The Id of a batch entry in a batch request doesn't abide by the\n specification.

          ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.sqs#InvalidIdFormat": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

          The specified receipt handle isn't valid for the current version.

          ", + "smithy.api#error": "client" + } + }, + "com.amazonaws.sqs#InvalidMessageContents": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

          The message contains characters outside the allowed set.

          ", + "smithy.api#error": "client" + } + }, + "com.amazonaws.sqs#ListDeadLetterSourceQueues": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#ListDeadLetterSourceQueuesRequest" + }, + "output": { + "target": "com.amazonaws.sqs#ListDeadLetterSourceQueuesResult" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#QueueDoesNotExist" + } + ], + "traits": { + "smithy.api#documentation": "

          Returns a list of your queues that have the RedrivePolicy queue attribute\n configured with a dead-letter queue.

          \n

          The ListDeadLetterSourceQueues methods supports pagination. Set\n parameter MaxResults in the request to specify the maximum number of\n results to be returned in the response. If you do not set MaxResults, the\n response includes a maximum of 1,000 results. If you set MaxResults and\n there are additional results to display, the response includes a value for\n NextToken. Use NextToken as a parameter in your next\n request to ListDeadLetterSourceQueues to receive the next page of results.

          \n

          For more information about using dead-letter queues, see Using Amazon SQS Dead-Letter Queues in the Amazon SQS Developer\n Guide.

          ", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "queueUrls", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.sqs#ListDeadLetterSourceQueuesRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

          For each message in the batch, the response contains a \n DeleteMessageBatchResultEntry\n tag if the message is deleted\n or a \n BatchResultErrorEntry\n tag if the message can't be\n deleted.

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

          The URL of a dead-letter queue.

          \n

          Queue URLs and names are case-sensitive.

          ", + "smithy.api#required": {} } - }, - "com.amazonaws.sqs#DeleteMessageBatchResultEntry": { - "type": "structure", - "members": { - "Id": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          Represents a successfully deleted message.

          ", - "smithy.api#required": {} - } - } - }, + }, + "NextToken": { + "target": "com.amazonaws.sqs#Token", "traits": { - "smithy.api#documentation": "

          Encloses the Id of an entry in \n DeleteMessageBatch.\n

          " + "smithy.api#documentation": "

          Pagination token to request the next set of results.

          " } - }, - "com.amazonaws.sqs#DeleteMessageBatchResultEntryList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#DeleteMessageBatchResultEntry" + }, + "MaxResults": { + "target": "com.amazonaws.sqs#BoxedInteger", + "traits": { + "smithy.api#documentation": "

          Maximum number of results to include in the response. Value range is 1 to 1000. You\n must set MaxResults to receive a value for NextToken in the\n response.

          " } + } }, - "com.amazonaws.sqs#DeleteMessageRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The URL of the Amazon SQS queue from which messages are deleted.

          \n

          Queue URLs and names are case-sensitive.

          ", - "smithy.api#required": {} - } - }, - "ReceiptHandle": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The receipt handle associated with the message to delete.

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

          ", + "smithy.api#input": {} + } + }, + "com.amazonaws.sqs#ListDeadLetterSourceQueuesResult": { + "type": "structure", + "members": { + "queueUrls": { + "target": "com.amazonaws.sqs#QueueUrlList", "traits": { - "smithy.api#documentation": "

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

          A list of source queue URLs that have the RedrivePolicy queue attribute\n configured with a dead-letter queue.

          ", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "QueueUrl" } + }, + "NextToken": { + "target": "com.amazonaws.sqs#Token", + "traits": { + "smithy.api#documentation": "

          Pagination token to include in the next request. Token value is null if\n there are no additional results to request, or if you did not set\n MaxResults in the request.

          " + } + } }, - "com.amazonaws.sqs#DeleteQueue": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#DeleteQueueRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#InvalidAddress" - }, - { - "target": "com.amazonaws.sqs#InvalidSecurity" - }, - { - "target": "com.amazonaws.sqs#QueueDoesNotExist" - }, - { - "target": "com.amazonaws.sqs#RequestThrottled" - }, - { - "target": "com.amazonaws.sqs#UnsupportedOperation" - } - ], + "traits": { + "smithy.api#documentation": "

          A list of your dead letter source queues.

          ", + "smithy.api#output": {} + } + }, + "com.amazonaws.sqs#ListMessageMoveTasks": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#ListMessageMoveTasksRequest" + }, + "output": { + "target": "com.amazonaws.sqs#ListMessageMoveTasksResult" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.sqs#UnsupportedOperation" + } + ], + "traits": { + "smithy.api#documentation": "

          Gets the most recent message movement tasks (up to 10) under a specific source\n queue.

          \n \n
            \n
          • \n

            This action is currently limited to supporting message redrive from dead-letter queues (DLQs) only. In this context, the source\n queue is the dead-letter queue (DLQ), while the destination queue can be the\n original source queue (from which the messages were driven to the\n dead-letter-queue), or a custom destination queue.

            \n
          • \n
          • \n

            Currently, only standard queues are supported.

            \n
          • \n
          • \n

            Only one active message movement task is supported per queue at any given\n time.

            \n
          • \n
          \n
          " + } + }, + "com.amazonaws.sqs#ListMessageMoveTasksRequest": { + "type": "structure", + "members": { + "SourceArn": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

          Deletes the queue specified by the QueueUrl, regardless of the queue's\n contents.

          \n \n

          Be careful with the DeleteQueue action: When you delete a queue, any\n messages in the queue are no longer available.

          \n
          \n

          When you delete a queue, the deletion process takes up to 60 seconds. Requests you\n send involving that queue during the 60 seconds might succeed. For example, a\n \n SendMessage\n request might succeed, but after 60\n seconds the queue and the message you sent no longer exist.

          \n

          When you delete a queue, you must wait at least 60 seconds before creating a queue\n with the same name.

          \n \n

          Cross-account permissions don't apply to this action. For more information, see\n Grant cross-account permissions to a role and a username in the\n Amazon SQS Developer Guide.

          \n

          The delete operation uses the HTTP GET verb.

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

          The ARN of the queue whose message movement tasks are to be listed.

          ", + "smithy.api#required": {} } + }, + "MaxResults": { + "target": "com.amazonaws.sqs#Integer", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

          The maximum number of results to include in the response. The default is 1, which\n provides the most recent message movement task. The upper limit is 10.

          " + } + } }, - "com.amazonaws.sqs#DeleteQueueRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The URL of the Amazon SQS queue to delete.

          \n

          Queue URLs and names are case-sensitive.

          ", - "smithy.api#required": {} - } - } - }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.sqs#ListMessageMoveTasksResult": { + "type": "structure", + "members": { + "Results": { + "target": "com.amazonaws.sqs#ListMessageMoveTasksResultEntryList", "traits": { - "smithy.api#documentation": "

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

          A list of message movement tasks and their attributes.

          ", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "ListMessageMoveTasksResultEntry" } + } }, - "com.amazonaws.sqs#EmptyBatchRequest": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.sqs#ExceptionMessage" - } - }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.sqs#ListMessageMoveTasksResultEntry": { + "type": "structure", + "members": { + "TaskHandle": { + "target": "com.amazonaws.sqs#String", "traits": { - "aws.protocols#awsQueryError": { - "code": "AWS.SimpleQueueService.EmptyBatchRequest", - "httpResponseCode": 400 - }, - "smithy.api#documentation": "

          The batch request doesn't contain any entries.

          ", - "smithy.api#error": "client", - "smithy.api#httpError": 400 + "smithy.api#documentation": "

          An identifier associated with a message movement task. When this field is returned in\n the response of the ListMessageMoveTasks action, it is only populated for\n tasks that are in RUNNING status.

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

          The status of the message movement task. Possible values are: RUNNING, COMPLETED,\n CANCELLING, CANCELLED, and FAILED.

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

          The ARN of the queue that contains the messages to be moved to another queue.

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

          The ARN of the destination queue if it has been specified in the\n StartMessageMoveTask request. If a DestinationArn has not\n been specified in the StartMessageMoveTask request, this field value will\n be NULL.

          " + } + }, + "MaxNumberOfMessagesPerSecond": { + "target": "com.amazonaws.sqs#Integer", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

          The number of messages to be moved per second (the message movement rate), if it has\n been specified in the StartMessageMoveTask request. If a\n MaxNumberOfMessagesPerSecond has not been specified in the\n StartMessageMoveTask request, this field value will be NULL.

          " + } + }, + "ApproximateNumberOfMessagesMoved": { + "target": "com.amazonaws.sqs#Long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

          The approximate number of messages already moved to the destination queue.

          " + } + }, + "ApproximateNumberOfMessagesToMove": { + "target": "com.amazonaws.sqs#Long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

          The number of messages to be moved from the source queue. This number is obtained at\n the time of starting the message movement task.

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

          The task failure reason (only included if the task status is FAILED).

          " } + }, + "StartedTimestamp": { + "target": "com.amazonaws.sqs#Long", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

          The timestamp of starting the message movement task.

          " + } + } }, - "com.amazonaws.sqs#ExceptionMessage": { - "type": "string" + "traits": { + "smithy.api#documentation": "

          Contains the details of a message movement task.

          " + } + }, + "com.amazonaws.sqs#ListMessageMoveTasksResultEntryList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#ListMessageMoveTasksResultEntry" + } + }, + "com.amazonaws.sqs#ListQueueTags": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#ListQueueTagsRequest" }, - "com.amazonaws.sqs#GetQueueAttributes": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#GetQueueAttributesRequest" - }, - "output": { - "target": "com.amazonaws.sqs#GetQueueAttributesResult" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#InvalidAddress" - }, - { - "target": "com.amazonaws.sqs#InvalidAttributeName" - }, - { - "target": "com.amazonaws.sqs#InvalidSecurity" - }, - { - "target": "com.amazonaws.sqs#QueueDoesNotExist" - }, - { - "target": "com.amazonaws.sqs#RequestThrottled" - }, - { - "target": "com.amazonaws.sqs#UnsupportedOperation" - } - ], + "output": { + "target": "com.amazonaws.sqs#ListQueueTagsResult" + }, + "traits": { + "smithy.api#documentation": "

          List all cost allocation tags added to the specified Amazon SQS queue.\n For an overview, see Tagging \nYour Amazon SQS Queues in the Amazon SQS Developer Guide.

          \n \n

          Cross-account permissions don't apply to this action. For more information, \nsee Grant \ncross-account permissions to a role and a username in the Amazon SQS Developer Guide.

          \n
          " + } + }, + "com.amazonaws.sqs#ListQueueTagsRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

          Gets attributes for the specified queue.

          \n \n

          To determine whether a queue is FIFO, you can check whether QueueName ends with the\n .fifo suffix.

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

          The URL of the queue.

          ", + "smithy.api#required": {} } + } }, - "com.amazonaws.sqs#GetQueueAttributesRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The URL of the Amazon SQS queue whose attribute information is retrieved.

          \n

          Queue URLs and names are case-sensitive.

          ", - "smithy.api#required": {} - } - }, - "AttributeNames": { - "target": "com.amazonaws.sqs#AttributeNameList", - "traits": { - "smithy.api#documentation": "

          A list of attributes for which to retrieve information.

          \n

          The AttributeNames parameter is optional, but if you don't specify values\n for this parameter, the request returns empty results.

          \n \n

          In the future, new attributes might be added. If you write code that calls this\n action, we recommend that you structure your code so that it can handle new\n attributes gracefully.

          \n
          \n

          The following attributes are supported:

          \n \n

          The ApproximateNumberOfMessagesDelayed,\n ApproximateNumberOfMessagesNotVisible, and\n ApproximateNumberOfMessages metrics may not achieve consistency\n until at least 1 minute after the producers stop sending messages. This period is\n required for the queue metadata to reach eventual consistency.

          \n
          \n
            \n
          • \n

            \n All – Returns all values.

            \n
          • \n
          • \n

            \n ApproximateNumberOfMessages – Returns the approximate number of\n messages available for retrieval from the queue.

            \n
          • \n
          • \n

            \n ApproximateNumberOfMessagesDelayed – Returns the approximate\n number of messages in the queue that are delayed and not available for reading\n immediately. This can happen when the queue is configured as a delay queue or\n when a message has been sent with a delay parameter.

            \n
          • \n
          • \n

            \n ApproximateNumberOfMessagesNotVisible – Returns the approximate\n number of messages that are in flight. Messages are considered to be\n in flight if they have been sent to a client but have\n not yet been deleted or have not yet reached the end of their visibility window.\n

            \n
          • \n
          • \n

            \n CreatedTimestamp – Returns the time when the queue was created in\n seconds (epoch\n time).

            \n
          • \n
          • \n

            \n DelaySeconds – Returns the default delay on the queue in\n seconds.

            \n
          • \n
          • \n

            \n LastModifiedTimestamp – Returns the time when the queue was last\n changed in seconds (epoch\n time).

            \n
          • \n
          • \n

            \n MaximumMessageSize – Returns the limit of how many bytes a\n message can contain before Amazon SQS rejects it.

            \n
          • \n
          • \n

            \n MessageRetentionPeriod – Returns the length of time, in seconds,\n for which Amazon SQS retains a message. When you change a queue's attributes,\n the change can take up to 60 seconds for most of the attributes to propagate\n throughout the Amazon SQS system. Changes made to the\n MessageRetentionPeriod attribute can take up to 15 minutes and\n will impact existing messages in the queue potentially causing them to be\n expired and deleted if the MessageRetentionPeriod is reduced below\n the age of existing messages.

            \n
          • \n
          • \n

            \n Policy – Returns the policy of the queue.

            \n
          • \n
          • \n

            \n QueueArn – Returns the Amazon resource name (ARN) of the\n queue.

            \n
          • \n
          • \n

            \n ReceiveMessageWaitTimeSeconds – Returns the length of time, in\n seconds, for which the ReceiveMessage action waits for a message to\n arrive.

            \n
          • \n
          • \n

            \n VisibilityTimeout – Returns the visibility timeout for the queue.\n For more information about the visibility timeout, see Visibility Timeout in the Amazon SQS Developer\n Guide.

            \n
          • \n
          \n

          The following attributes apply only to dead-letter queues:\n

          \n
            \n
          • \n

            \n RedrivePolicy – The string that includes the parameters for the\n dead-letter queue functionality of the source queue as a JSON object. The\n parameters are as follows:

            \n
              \n
            • \n

              \n deadLetterTargetArn – The Amazon Resource Name (ARN) of\n the dead-letter queue to which Amazon SQS moves messages after the value\n of maxReceiveCount is exceeded.

              \n
            • \n
            • \n

              \n maxReceiveCount – The number of times a message is\n delivered to the source queue before being moved to the dead-letter\n queue. Default: 10. When the ReceiveCount for a message\n exceeds the maxReceiveCount for a queue, Amazon SQS moves\n the message to the dead-letter-queue.

              \n
            • \n
            \n
          • \n
          • \n

            \n RedriveAllowPolicy – The string that includes the parameters for\n the permissions for the dead-letter queue redrive permission and which source\n queues can specify dead-letter queues as a JSON object. The parameters are as\n follows:

            \n
              \n
            • \n

              \n redrivePermission – The permission type that defines\n which source queues can specify the current queue as the dead-letter\n queue. Valid values are:

              \n
                \n
              • \n

                \n allowAll – (Default) Any source queues in this\n Amazon Web Services account in the same\n Region can specify this queue as the dead-letter queue.

                \n
              • \n
              • \n

                \n denyAll – No source queues can specify this queue\n as the dead-letter queue.

                \n
              • \n
              • \n

                \n byQueue – Only queues specified by the\n sourceQueueArns parameter can specify this\n queue as the dead-letter queue.

                \n
              • \n
              \n
            • \n
            • \n

              \n sourceQueueArns – The Amazon Resource Names (ARN)s of the\n source queues that can specify this queue as the dead-letter queue and\n redrive messages. You can specify this parameter only when the\n redrivePermission parameter is set to\n byQueue. You can specify up to 10 source queue ARNs. To\n allow more than 10 source queues to specify dead-letter queues, set the\n redrivePermission parameter to\n allowAll.

              \n
            • \n
            \n
          • \n
          \n \n

          The dead-letter queue of a FIFO queue must also be a FIFO queue. Similarly, the\n dead-letter queue of a standard queue must also be a standard queue.

          \n
          \n

          The following attributes apply only to server-side-encryption:

          \n
            \n
          • \n

            \n KmsMasterKeyId – Returns the ID of an Amazon Web Services\n managed customer master key (CMK) for Amazon SQS or a custom CMK. For more\n information, see Key Terms.

            \n
          • \n
          • \n

            \n KmsDataKeyReusePeriodSeconds – Returns the length of time, in\n seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt\n messages before calling KMS again. For more information, see How Does the Data Key Reuse Period Work?.

            \n
          • \n
          • \n

            \n SqsManagedSseEnabled – Returns information about whether the queue\n is using SSE-SQS encryption using SQS owned encryption keys. Only one\n server-side encryption option is supported per queue (for example, SSE-KMS or SSE-SQS).

            \n
          • \n
          \n

          The following attributes apply only to FIFO\n (first-in-first-out) queues:

          \n
            \n
          • \n

            \n FifoQueue – Returns information about whether the queue is FIFO.\n For more information, see FIFO queue logic in the Amazon SQS Developer\n Guide.

            \n \n

            To determine whether a queue is FIFO, you can check whether QueueName ends with\n the .fifo suffix.

            \n
            \n
          • \n
          • \n

            \n ContentBasedDeduplication – Returns whether content-based\n deduplication is enabled for the queue. For more information, see Exactly-once processing in the Amazon SQS Developer\n Guide.

            \n
          • \n
          \n

          The following attributes apply only to high\n throughput for FIFO queues:

          \n
            \n
          • \n

            \n DeduplicationScope – Specifies whether message deduplication\n occurs at the message group or queue level. Valid values are\n messageGroup and queue.

            \n
          • \n
          • \n

            \n FifoThroughputLimit – Specifies whether the FIFO queue throughput\n quota applies to the entire queue or per message group. Valid values are\n perQueue and perMessageGroupId. The\n perMessageGroupId value is allowed only when the value for\n DeduplicationScope is messageGroup.

            \n
          • \n
          \n

          To enable high throughput for FIFO queues, do the following:

          \n
            \n
          • \n

            Set DeduplicationScope to messageGroup.

            \n
          • \n
          • \n

            Set FifoThroughputLimit to perMessageGroupId.

            \n
          • \n
          \n

          If you set these attributes to anything other than the values shown for enabling high\n throughput, normal throughput is in effect and deduplication occurs as specified.

          \n

          For information on throughput quotas, see Quotas\n related to messages in the Amazon SQS Developer\n Guide.

          ", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "AttributeName" - } - } - }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.sqs#ListQueueTagsResult": { + "type": "structure", + "members": { + "Tags": { + "target": "com.amazonaws.sqs#TagMap", "traits": { - "smithy.api#documentation": "

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

          The list of all tags added to the specified queue.

          ", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Tag" } + } }, - "com.amazonaws.sqs#GetQueueAttributesResult": { - "type": "structure", - "members": { - "Attributes": { - "target": "com.amazonaws.sqs#QueueAttributeMap", - "traits": { - "smithy.api#documentation": "

          A map of attributes to their respective values.

          ", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Attribute" - } - } - }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.sqs#ListQueues": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#ListQueuesRequest" + }, + "output": { + "target": "com.amazonaws.sqs#ListQueuesResult" + }, + "traits": { + "smithy.api#documentation": "

          Returns a list of your queues in the current region. The response includes a maximum\n of 1,000 results. If you specify a value for the optional QueueNamePrefix\n parameter, only queues with a name that begins with the specified value are\n returned.

          \n

          The listQueues methods supports pagination. Set parameter\n MaxResults in the request to specify the maximum number of results to\n be returned in the response. If you do not set MaxResults, the response\n includes a maximum of 1,000 results. If you set MaxResults and there are\n additional results to display, the response includes a value for NextToken.\n Use NextToken as a parameter in your next request to\n listQueues to receive the next page of results.

          \n \n

          Cross-account permissions don't apply to this action. For more information, \nsee Grant \ncross-account permissions to a role and a username in the Amazon SQS Developer Guide.

          \n
          ", + "smithy.api#paginated": { + "inputToken": "NextToken", + "outputToken": "NextToken", + "items": "QueueUrls", + "pageSize": "MaxResults" + } + } + }, + "com.amazonaws.sqs#ListQueuesRequest": { + "type": "structure", + "members": { + "QueueNamePrefix": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

          A list of returned queue attributes.

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

          A string to use for filtering the list results. Only those queues whose name begins\n with the specified string are returned.

          \n

          Queue URLs and names are case-sensitive.

          " } - }, - "com.amazonaws.sqs#GetQueueUrl": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#GetQueueUrlRequest" - }, - "output": { - "target": "com.amazonaws.sqs#GetQueueUrlResult" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#InvalidAddress" - }, - { - "target": "com.amazonaws.sqs#InvalidSecurity" - }, - { - "target": "com.amazonaws.sqs#QueueDoesNotExist" - }, - { - "target": "com.amazonaws.sqs#RequestThrottled" - }, - { - "target": "com.amazonaws.sqs#UnsupportedOperation" - } - ], + }, + "NextToken": { + "target": "com.amazonaws.sqs#Token", "traits": { - "smithy.api#documentation": "

          Returns the URL of an existing Amazon SQS queue.

          \n

          To access a queue that belongs to another AWS account, use the\n QueueOwnerAWSAccountId parameter to specify the account ID of the\n queue's owner. The queue's owner must grant you permission to access the queue. For more\n information about shared queue access, see \n AddPermission\n \n or see Allow Developers to Write Messages to a Shared Queue in the\n Amazon SQS Developer Guide.

          " + "smithy.api#documentation": "

          Pagination token to request the next set of results.

          " } - }, - "com.amazonaws.sqs#GetQueueUrlRequest": { - "type": "structure", - "members": { - "QueueName": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The name of the queue whose URL must be fetched. Maximum 80 characters. Valid values:\n alphanumeric characters, hyphens (-), and underscores\n (_).

          \n

          Queue URLs and names are case-sensitive.

          ", - "smithy.api#required": {} - } - }, - "QueueOwnerAWSAccountId": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The Amazon Web\n Services account ID of the account that created the queue.

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

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

          Maximum number of results to include in the response. Value range is 1 to 1000. You\n must set MaxResults to receive a value for NextToken in the\n response.

          " } + } }, - "com.amazonaws.sqs#GetQueueUrlResult": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The URL of the queue.

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

          ", + "smithy.api#input": {} + } + }, + "com.amazonaws.sqs#ListQueuesResult": { + "type": "structure", + "members": { + "NextToken": { + "target": "com.amazonaws.sqs#Token", "traits": { - "smithy.api#documentation": "

          For more information, see Interpreting Responses in the Amazon SQS Developer\n Guide.

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

          Pagination token to include in the next request. Token value is null if\n there are no additional results to request, or if you did not set\n MaxResults in the request.

          " } + }, + "QueueUrls": { + "target": "com.amazonaws.sqs#QueueUrlList", + "traits": { + "smithy.api#documentation": "

          A list of queue URLs, up to 1,000 entries, or the value of MaxResults\n that you sent in the request.

          ", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "QueueUrl" + } + } }, - "com.amazonaws.sqs#InvalidAddress": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.sqs#ExceptionMessage" - } - }, + "traits": { + "smithy.api#documentation": "

          A list of your queues.

          ", + "smithy.api#output": {} + } + }, + "com.amazonaws.sqs#Long": { + "type": "long", + "traits": { + "smithy.api#default": 0 + } + }, + "com.amazonaws.sqs#Message": { + "type": "structure", + "members": { + "MessageId": { + "target": "com.amazonaws.sqs#String", "traits": { - "aws.protocols#awsQueryError": { - "code": "InvalidAddress", - "httpResponseCode": 404 - }, - "smithy.api#documentation": "

          The accountId is invalid.

          ", - "smithy.api#error": "client", - "smithy.api#httpError": 404 + "smithy.api#documentation": "

          A unique identifier for the message. A MessageIdis considered unique\n across all Amazon Web Services accounts for an extended period of time.

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

          An identifier associated with the act of receiving the message. A new receipt handle\n is returned every time you receive a message. When deleting a message, you provide the\n last received receipt handle to delete the message.

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

          An MD5 digest of the non-URL-encoded message body string.

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

          The message's contents (not URL-encoded).

          " + } + }, + "Attributes": { + "target": "com.amazonaws.sqs#MessageSystemAttributeMap", + "traits": { + "smithy.api#documentation": "

          A map of the attributes requested in \n ReceiveMessage\n to\n their respective values. Supported attributes:

          \n
            \n
          • \n

            \n ApproximateReceiveCount\n

            \n
          • \n
          • \n

            \n ApproximateFirstReceiveTimestamp\n

            \n
          • \n
          • \n

            \n MessageDeduplicationId\n

            \n
          • \n
          • \n

            \n MessageGroupId\n

            \n
          • \n
          • \n

            \n SenderId\n

            \n
          • \n
          • \n

            \n SentTimestamp\n

            \n
          • \n
          • \n

            \n SequenceNumber\n

            \n
          • \n
          \n

          \n ApproximateFirstReceiveTimestamp and SentTimestamp are each\n returned as an integer representing the epoch time in\n milliseconds.

          ", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Attribute" + } + }, + "MD5OfMessageAttributes": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

          An MD5 digest of the non-URL-encoded message attribute string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see RFC1321.

          " + } + }, + "MessageAttributes": { + "target": "com.amazonaws.sqs#MessageBodyAttributeMap", + "traits": { + "smithy.api#documentation": "

          Each message attribute consists of a Name, Type, \nand Value. For more information, see \nAmazon SQS \nmessage attributes in the Amazon SQS Developer Guide.

          ", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "MessageAttribute" + } + } }, - "com.amazonaws.sqs#InvalidAttributeName": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.sqs#ExceptionMessage" - } - }, + "traits": { + "smithy.api#documentation": "

          An Amazon SQS message.

          " + } + }, + "com.amazonaws.sqs#MessageAttributeName": { + "type": "string" + }, + "com.amazonaws.sqs#MessageAttributeNameList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#MessageAttributeName" + } + }, + "com.amazonaws.sqs#MessageAttributeValue": { + "type": "structure", + "members": { + "StringValue": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

          Strings are Unicode with UTF-8 binary encoding. For a list of code values, see ASCII Printable\n Characters.

          " + } + }, + "BinaryValue": { + "target": "com.amazonaws.sqs#Binary", + "traits": { + "smithy.api#documentation": "

          Binary type attributes can store any binary data, such as compressed data, encrypted\n data, or images.

          " + } + }, + "StringListValues": { + "target": "com.amazonaws.sqs#StringList", + "traits": { + "smithy.api#documentation": "

          Not implemented. Reserved for future use.

          ", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "StringListValue" + } + }, + "BinaryListValues": { + "target": "com.amazonaws.sqs#BinaryList", "traits": { - "smithy.api#documentation": "

          The specified attribute doesn't exist.

          ", - "smithy.api#error": "client" + "smithy.api#documentation": "

          Not implemented. Reserved for future use.

          ", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "BinaryListValue" } + }, + "DataType": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

          Amazon SQS supports the following logical data types: String,\n Number, and Binary. For the Number data type,\n you must use StringValue.

          \n

          You can also append custom labels. For more information, see Amazon SQS Message Attributes in the Amazon SQS Developer\n Guide.

          ", + "smithy.api#required": {} + } + } }, - "com.amazonaws.sqs#InvalidAttributeValue": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.sqs#ExceptionMessage" - } - }, + "traits": { + "smithy.api#documentation": "

          The user-specified message attribute value. For string data types, the\n Value attribute has the same restrictions on the content as the message\n body. For more information, see \n SendMessage.\n

          \n

          \n Name, type, value and the message body must not\n be empty or null. All parts of the message attribute, including Name,\n Type, and Value, are part of the message size restriction\n (256 KiB or 262,144 bytes).

          " + } + }, + "com.amazonaws.sqs#MessageBodyAttributeMap": { + "type": "map", + "key": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#xmlName": "Name" + } + }, + "value": { + "target": "com.amazonaws.sqs#MessageAttributeValue", + "traits": { + "smithy.api#xmlName": "Value" + } + } + }, + "com.amazonaws.sqs#MessageBodySystemAttributeMap": { + "type": "map", + "key": { + "target": "com.amazonaws.sqs#MessageSystemAttributeNameForSends", + "traits": { + "smithy.api#xmlName": "Name" + } + }, + "value": { + "target": "com.amazonaws.sqs#MessageSystemAttributeValue", + "traits": { + "smithy.api#xmlName": "Value" + } + } + }, + "com.amazonaws.sqs#MessageList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#Message" + } + }, + "com.amazonaws.sqs#MessageNotInflight": { + "type": "structure", + "members": {}, + "traits": { + "aws.protocols#awsQueryError": { + "code": "AWS.SimpleQueueService.MessageNotInflight", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

          The specified message isn't in flight.

          ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.sqs#MessageSystemAttributeMap": { + "type": "map", + "key": { + "target": "com.amazonaws.sqs#MessageSystemAttributeName", + "traits": { + "smithy.api#xmlName": "Name" + } + }, + "value": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#xmlName": "Value" + } + } + }, + "com.amazonaws.sqs#MessageSystemAttributeName": { + "type": "enum", + "members": { + "SenderId": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

          A queue attribute value is invalid.

          ", - "smithy.api#error": "client" + "smithy.api#enumValue": "SenderId" } - }, - "com.amazonaws.sqs#InvalidBatchEntryId": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.sqs#ExceptionMessage" - } - }, + }, + "SentTimestamp": { + "target": "smithy.api#Unit", "traits": { - "aws.protocols#awsQueryError": { - "code": "AWS.SimpleQueueService.InvalidBatchEntryId", - "httpResponseCode": 400 - }, - "smithy.api#documentation": "

          The Id of a batch entry in a batch request doesn't abide by the\n specification.

          ", - "smithy.api#error": "client", - "smithy.api#httpError": 400 + "smithy.api#enumValue": "SentTimestamp" } - }, - "com.amazonaws.sqs#InvalidIdFormat": { - "type": "structure", - "members": {}, + }, + "ApproximateReceiveCount": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#deprecated": { - "message": "exception has been included in ReceiptHandleIsInvalid" - }, - "smithy.api#documentation": "

          The specified receipt handle isn't valid for the current version.

          ", - "smithy.api#error": "client" + "smithy.api#enumValue": "ApproximateReceiveCount" } - }, - "com.amazonaws.sqs#InvalidMessageContents": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.sqs#ExceptionMessage" - } - }, + }, + "ApproximateFirstReceiveTimestamp": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

          The message contains characters outside the allowed set.

          ", - "smithy.api#error": "client" + "smithy.api#enumValue": "ApproximateFirstReceiveTimestamp" } - }, - "com.amazonaws.sqs#InvalidSecurity": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.sqs#ExceptionMessage" - } - }, + }, + "SequenceNumber": { + "target": "smithy.api#Unit", "traits": { - "aws.protocols#awsQueryError": { - "code": "InvalidSecurity", - "httpResponseCode": 403 - }, - "smithy.api#documentation": "

          When the request to a queue is not HTTPS and SigV4.

          ", - "smithy.api#error": "client", - "smithy.api#httpError": 403 + "smithy.api#enumValue": "SequenceNumber" } - }, - "com.amazonaws.sqs#KmsAccessDenied": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.sqs#ExceptionMessage" - } - }, + }, + "MessageDeduplicationId": { + "target": "smithy.api#Unit", "traits": { - "aws.protocols#awsQueryError": { - "code": "KMS.AccessDeniedException", - "httpResponseCode": 400 - }, - "smithy.api#documentation": "

          The caller doesn't have the required KMS access.

          ", - "smithy.api#error": "client", - "smithy.api#httpError": 400 + "smithy.api#enumValue": "MessageDeduplicationId" } - }, - "com.amazonaws.sqs#KmsDisabled": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.sqs#ExceptionMessage" - } - }, + }, + "MessageGroupId": { + "target": "smithy.api#Unit", "traits": { - "aws.protocols#awsQueryError": { - "code": "KMS.DisabledException", - "httpResponseCode": 400 - }, - "smithy.api#documentation": "

          The request was denied due to request throttling.

          ", - "smithy.api#error": "client", - "smithy.api#httpError": 400 + "smithy.api#enumValue": "MessageGroupId" } - }, - "com.amazonaws.sqs#KmsInvalidKeyUsage": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.sqs#ExceptionMessage" - } - }, + }, + "AWSTraceHeader": { + "target": "smithy.api#Unit", "traits": { - "aws.protocols#awsQueryError": { - "code": "KMS.InvalidKeyUsageException", - "httpResponseCode": 400 - }, - "smithy.api#documentation": "

          The request was rejected for one of the following reasons:

          \n
            \n
          • \n

            The KeyUsage value of the KMS key is incompatible with the API\n operation.

            \n
          • \n
          • \n

            The encryption algorithm or signing algorithm specified for the operation is\n incompatible with the type of key material in the KMS key (KeySpec).

            \n
          • \n
          ", - "smithy.api#error": "client", - "smithy.api#httpError": 400 + "smithy.api#enumValue": "AWSTraceHeader" } - }, - "com.amazonaws.sqs#KmsInvalidState": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.sqs#ExceptionMessage" - } - }, + }, + "DeadLetterQueueSourceArn": { + "target": "smithy.api#Unit", "traits": { - "aws.protocols#awsQueryError": { - "code": "KMS.InvalidStateException", - "httpResponseCode": 400 - }, - "smithy.api#documentation": "

          The request was rejected because the state of the specified resource is not valid for\n this request.

          ", - "smithy.api#error": "client", - "smithy.api#httpError": 400 + "smithy.api#enumValue": "DeadLetterQueueSourceArn" } - }, - "com.amazonaws.sqs#KmsNotFound": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.sqs#ExceptionMessage" - } - }, + } + } + }, + "com.amazonaws.sqs#MessageSystemAttributeNameForSends": { + "type": "enum", + "members": { + "AWSTraceHeader": { + "target": "smithy.api#Unit", "traits": { - "aws.protocols#awsQueryError": { - "code": "KMS.NotFoundException", - "httpResponseCode": 400 - }, - "smithy.api#documentation": "

          The request was rejected because the specified entity or resource could not be found.\n

          ", - "smithy.api#error": "client", - "smithy.api#httpError": 400 + "smithy.api#enumValue": "AWSTraceHeader" } - }, - "com.amazonaws.sqs#KmsOptInRequired": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.sqs#ExceptionMessage" - } - }, + } + } + }, + "com.amazonaws.sqs#MessageSystemAttributeValue": { + "type": "structure", + "members": { + "StringValue": { + "target": "com.amazonaws.sqs#String", "traits": { - "aws.protocols#awsQueryError": { - "code": "KMS.OptInRequired", - "httpResponseCode": 403 - }, - "smithy.api#documentation": "

          The request was rejected because the specified key policy isn't syntactically or\n semantically correct.

          ", - "smithy.api#error": "client", - "smithy.api#httpError": 403 + "smithy.api#documentation": "

          Strings are Unicode with UTF-8 binary encoding. For a list of code values, see ASCII Printable\n Characters.

          " } - }, - "com.amazonaws.sqs#KmsThrottled": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.sqs#ExceptionMessage" - } - }, + }, + "BinaryValue": { + "target": "com.amazonaws.sqs#Binary", "traits": { - "aws.protocols#awsQueryError": { - "code": "KMS.ThrottlingException", - "httpResponseCode": 400 - }, - "smithy.api#documentation": "

          Amazon Web Services KMS throttles requests for the following conditions.

          ", - "smithy.api#error": "client", - "smithy.api#httpError": 400 + "smithy.api#documentation": "

          Binary type attributes can store any binary data, such as compressed data, encrypted\n data, or images.

          " } - }, - "com.amazonaws.sqs#ListDeadLetterSourceQueues": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#ListDeadLetterSourceQueuesRequest" - }, - "output": { - "target": "com.amazonaws.sqs#ListDeadLetterSourceQueuesResult" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#InvalidAddress" - }, - { - "target": "com.amazonaws.sqs#InvalidSecurity" - }, - { - "target": "com.amazonaws.sqs#QueueDoesNotExist" - }, - { - "target": "com.amazonaws.sqs#RequestThrottled" - }, - { - "target": "com.amazonaws.sqs#UnsupportedOperation" - } - ], + }, + "StringListValues": { + "target": "com.amazonaws.sqs#StringList", "traits": { - "smithy.api#documentation": "

          Returns a list of your queues that have the RedrivePolicy queue attribute\n configured with a dead-letter queue.

          \n

          The ListDeadLetterSourceQueues methods supports pagination. Set\n parameter MaxResults in the request to specify the maximum number of\n results to be returned in the response. If you do not set MaxResults, the\n response includes a maximum of 1,000 results. If you set MaxResults and\n there are additional results to display, the response includes a value for\n NextToken. Use NextToken as a parameter in your next\n request to ListDeadLetterSourceQueues to receive the next page of results.

          \n

          For more information about using dead-letter queues, see Using Amazon SQS Dead-Letter Queues in the Amazon SQS Developer\n Guide.

          ", - "smithy.api#paginated": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "items": "queueUrls", - "pageSize": "MaxResults" - } + "smithy.api#documentation": "

          Not implemented. Reserved for future use.

          ", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "StringListValue" } - }, - "com.amazonaws.sqs#ListDeadLetterSourceQueuesRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The URL of a dead-letter queue.

          \n

          Queue URLs and names are case-sensitive.

          ", - "smithy.api#required": {} - } - }, - "NextToken": { - "target": "com.amazonaws.sqs#Token", - "traits": { - "smithy.api#documentation": "

          Pagination token to request the next set of results.

          " - } - }, - "MaxResults": { - "target": "com.amazonaws.sqs#BoxedInteger", - "traits": { - "smithy.api#documentation": "

          Maximum number of results to include in the response. Value range is 1 to 1000. You\n must set MaxResults to receive a value for NextToken in the\n response.

          " - } - } - }, + }, + "BinaryListValues": { + "target": "com.amazonaws.sqs#BinaryList", "traits": { - "smithy.api#documentation": "

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

          Not implemented. Reserved for future use.

          ", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "BinaryListValue" } - }, - "com.amazonaws.sqs#ListDeadLetterSourceQueuesResult": { - "type": "structure", - "members": { - "queueUrls": { - "target": "com.amazonaws.sqs#QueueUrlList", - "traits": { - "smithy.api#documentation": "

          A list of source queue URLs that have the RedrivePolicy queue attribute\n configured with a dead-letter queue.

          ", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "QueueUrl" - } - }, - "NextToken": { - "target": "com.amazonaws.sqs#Token", - "traits": { - "smithy.api#documentation": "

          Pagination token to include in the next request. Token value is null if\n there are no additional results to request, or if you did not set\n MaxResults in the request.

          " - } - } - }, + }, + "DataType": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

          A list of your dead letter source queues.

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

          Amazon SQS supports the following logical data types: String,\n Number, and Binary. For the Number data type,\n you must use StringValue.

          \n

          You can also append custom labels. For more information, see Amazon SQS Message Attributes in the Amazon SQS Developer\n Guide.

          ", + "smithy.api#required": {} } + } }, - "com.amazonaws.sqs#ListMessageMoveTasks": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#ListMessageMoveTasksRequest" - }, - "output": { - "target": "com.amazonaws.sqs#ListMessageMoveTasksResult" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#InvalidAddress" - }, - { - "target": "com.amazonaws.sqs#InvalidSecurity" - }, - { - "target": "com.amazonaws.sqs#RequestThrottled" - }, - { - "target": "com.amazonaws.sqs#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.sqs#UnsupportedOperation" - } - ], + "traits": { + "smithy.api#documentation": "

          The user-specified message system attribute value. For string data types, the\n Value attribute has the same restrictions on the content as the message\n body. For more information, see \n SendMessage.\n

          \n

          \n Name, type, value and the message body must not\n be empty or null.

          " + } + }, + "com.amazonaws.sqs#OverLimit": { + "type": "structure", + "members": {}, + "traits": { + "aws.protocols#awsQueryError": { + "code": "OverLimit", + "httpResponseCode": 403 + }, + "smithy.api#documentation": "

          The specified action violates a limit. For example, ReceiveMessage\n returns this error if the maximum number of in flight messages is reached and\n AddPermission returns this error if the maximum number of permissions\n for the queue is reached.

          ", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.sqs#PurgeQueue": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#PurgeQueueRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#PurgeQueueInProgress" + }, + { + "target": "com.amazonaws.sqs#QueueDoesNotExist" + } + ], + "traits": { + "smithy.api#documentation": "

          Deletes available messages in a queue (including in-flight messages) specified by the\n QueueURL parameter.

          \n \n

          When you use the PurgeQueue action, you can't retrieve any messages\n deleted from a queue.

          \n

          The message deletion process takes up to 60 seconds. We recommend waiting for 60\n seconds regardless of your queue's size.

          \n
          \n

          Messages sent to the queue before you call\n PurgeQueue might be received but are deleted within the next\n minute.

          \n

          Messages sent to the queue after you call PurgeQueue\n might be deleted while the queue is being purged.

          " + } + }, + "com.amazonaws.sqs#PurgeQueueInProgress": { + "type": "structure", + "members": {}, + "traits": { + "aws.protocols#awsQueryError": { + "code": "AWS.SimpleQueueService.PurgeQueueInProgress", + "httpResponseCode": 403 + }, + "smithy.api#documentation": "

          Indicates that the specified queue previously received a PurgeQueue\n request within the last 60 seconds (the time it can take to delete the messages in the\n queue).

          ", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.sqs#PurgeQueueRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

          Gets the most recent message movement tasks (up to 10) under a specific source\n queue.

          \n \n
            \n
          • \n

            This action is currently limited to supporting message redrive from dead-letter queues (DLQs) only. In this context, the source\n queue is the dead-letter queue (DLQ), while the destination queue can be the\n original source queue (from which the messages were driven to the\n dead-letter-queue), or a custom destination queue.

            \n
          • \n
          • \n

            Currently, only standard queues are supported.

            \n
          • \n
          • \n

            Only one active message movement task is supported per queue at any given\n time.

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

          The URL of the queue from which the PurgeQueue action deletes\n messages.

          \n

          Queue URLs and names are case-sensitive.

          ", + "smithy.api#required": {} } + } }, - "com.amazonaws.sqs#ListMessageMoveTasksRequest": { - "type": "structure", - "members": { - "SourceArn": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The ARN of the queue whose message movement tasks are to be listed.

          ", - "smithy.api#required": {} - } - }, - "MaxResults": { - "target": "com.amazonaws.sqs#NullableInteger", - "traits": { - "smithy.api#documentation": "

          The maximum number of results to include in the response. The default is 1, which\n provides the most recent message movement task. The upper limit is 10.

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

          ", + "smithy.api#input": {} + } + }, + "com.amazonaws.sqs#QueueAttributeMap": { + "type": "map", + "key": { + "target": "com.amazonaws.sqs#QueueAttributeName", + "traits": { + "smithy.api#xmlName": "Name" + } + }, + "value": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#xmlName": "Value" + } + } + }, + "com.amazonaws.sqs#QueueAttributeName": { + "type": "enum", + "members": { + "All": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#input": {} + "smithy.api#enumValue": "All" } - }, - "com.amazonaws.sqs#ListMessageMoveTasksResult": { - "type": "structure", - "members": { - "Results": { - "target": "com.amazonaws.sqs#ListMessageMoveTasksResultEntryList", - "traits": { - "smithy.api#documentation": "

          A list of message movement tasks and their attributes.

          ", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "ListMessageMoveTasksResultEntry" - } - } - }, + }, + "Policy": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#output": {}, - "smithy.api#xmlName": "ListMessageMoveTasksResult" + "smithy.api#enumValue": "Policy" } - }, - "com.amazonaws.sqs#ListMessageMoveTasksResultEntry": { - "type": "structure", - "members": { - "TaskHandle": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          An identifier associated with a message movement task. When this field is returned in\n the response of the ListMessageMoveTasks action, it is only populated for\n tasks that are in RUNNING status.

          " - } - }, - "Status": { - "target": "com.amazonaws.sqs#TaskStatus", - "traits": { - "smithy.api#documentation": "

          The status of the message movement task. Possible values are: RUNNING, COMPLETED,\n CANCELLING, CANCELLED, and FAILED.

          " - } - }, - "SourceArn": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The ARN of the queue that contains the messages to be moved to another queue.

          " - } - }, - "DestinationArn": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The ARN of the destination queue if it has been specified in the\n StartMessageMoveTask request. If a DestinationArn has not\n been specified in the StartMessageMoveTask request, this field value will\n be NULL.

          " - } - }, - "MaxNumberOfMessagesPerSecond": { - "target": "com.amazonaws.sqs#NullableInteger", - "traits": { - "smithy.api#documentation": "

          The number of messages to be moved per second (the message movement rate), if it has\n been specified in the StartMessageMoveTask request. If a\n MaxNumberOfMessagesPerSecond has not been specified in the\n StartMessageMoveTask request, this field value will be NULL.

          " - } - }, - "ApproximateNumberOfMessagesMoved": { - "target": "com.amazonaws.sqs#Long", - "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "

          The approximate number of messages already moved to the destination queue.

          " - } - }, - "ApproximateNumberOfMessagesToMove": { - "target": "com.amazonaws.sqs#NullableLong", - "traits": { - "smithy.api#documentation": "

          The number of messages to be moved from the source queue. This number is obtained at\n the time of starting the message movement task.

          " - } - }, - "FailureReason": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The task failure reason (only included if the task status is FAILED).

          " - } - }, - "StartedTimestamp": { - "target": "com.amazonaws.sqs#Long", - "traits": { - "smithy.api#default": 0, - "smithy.api#documentation": "

          The timestamp of starting the message movement task.

          " - } - } - }, + }, + "VisibilityTimeout": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

          Contains the details of a message movement task.

          " - } - }, - "com.amazonaws.sqs#ListMessageMoveTasksResultEntryList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#ListMessageMoveTasksResultEntry" + "smithy.api#enumValue": "VisibilityTimeout" } - }, - "com.amazonaws.sqs#ListQueueTags": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#ListQueueTagsRequest" - }, - "output": { - "target": "com.amazonaws.sqs#ListQueueTagsResult" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#InvalidAddress" - }, - { - "target": "com.amazonaws.sqs#InvalidSecurity" - }, - { - "target": "com.amazonaws.sqs#QueueDoesNotExist" - }, - { - "target": "com.amazonaws.sqs#RequestThrottled" - }, - { - "target": "com.amazonaws.sqs#UnsupportedOperation" - } - ], + }, + "MaximumMessageSize": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

          List all cost allocation tags added to the specified Amazon SQS queue. For an\n overview, see Tagging\n Your Amazon SQS Queues in the Amazon SQS Developer\n Guide.

          \n \n

          Cross-account permissions don't apply to this action. For more information, see\n Grant cross-account permissions to a role and a username in the\n Amazon SQS Developer Guide.

          \n
          " + "smithy.api#enumValue": "MaximumMessageSize" } - }, - "com.amazonaws.sqs#ListQueueTagsRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The URL of the queue.

          ", - "smithy.api#required": {} - } - } - }, + }, + "MessageRetentionPeriod": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#input": {} + "smithy.api#enumValue": "MessageRetentionPeriod" } - }, - "com.amazonaws.sqs#ListQueueTagsResult": { - "type": "structure", - "members": { - "Tags": { - "target": "com.amazonaws.sqs#TagMap", - "traits": { - "smithy.api#documentation": "

          The list of all tags added to the specified queue.

          ", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Tag" - } - } - }, + }, + "ApproximateNumberOfMessages": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#output": {} + "smithy.api#enumValue": "ApproximateNumberOfMessages" } - }, - "com.amazonaws.sqs#ListQueues": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#ListQueuesRequest" - }, - "output": { - "target": "com.amazonaws.sqs#ListQueuesResult" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#InvalidAddress" - }, - { - "target": "com.amazonaws.sqs#InvalidSecurity" - }, - { - "target": "com.amazonaws.sqs#RequestThrottled" - }, - { - "target": "com.amazonaws.sqs#UnsupportedOperation" - } - ], + }, + "ApproximateNumberOfMessagesNotVisible": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

          Returns a list of your queues in the current region. The response includes a maximum\n of 1,000 results. If you specify a value for the optional QueueNamePrefix\n parameter, only queues with a name that begins with the specified value are\n returned.

          \n

          The listQueues methods supports pagination. Set parameter\n MaxResults in the request to specify the maximum number of results to\n be returned in the response. If you do not set MaxResults, the response\n includes a maximum of 1,000 results. If you set MaxResults and there are\n additional results to display, the response includes a value for NextToken.\n Use NextToken as a parameter in your next request to\n listQueues to receive the next page of results.

          \n \n

          Cross-account permissions don't apply to this action. For more information, see\n Grant cross-account permissions to a role and a username in the\n Amazon SQS Developer Guide.

          \n
          ", - "smithy.api#paginated": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "items": "QueueUrls", - "pageSize": "MaxResults" - } + "smithy.api#enumValue": "ApproximateNumberOfMessagesNotVisible" } - }, - "com.amazonaws.sqs#ListQueuesRequest": { - "type": "structure", - "members": { - "QueueNamePrefix": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          A string to use for filtering the list results. Only those queues whose name begins\n with the specified string are returned.

          \n

          Queue URLs and names are case-sensitive.

          " - } - }, - "NextToken": { - "target": "com.amazonaws.sqs#Token", - "traits": { - "smithy.api#documentation": "

          Pagination token to request the next set of results.

          " - } - }, - "MaxResults": { - "target": "com.amazonaws.sqs#BoxedInteger", - "traits": { - "smithy.api#documentation": "

          Maximum number of results to include in the response. Value range is 1 to 1000. You\n must set MaxResults to receive a value for NextToken in the\n response.

          " - } - } - }, + }, + "CreatedTimestamp": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

          ", - "smithy.api#input": {} + "smithy.api#enumValue": "CreatedTimestamp" } - }, - "com.amazonaws.sqs#ListQueuesResult": { - "type": "structure", - "members": { - "QueueUrls": { - "target": "com.amazonaws.sqs#QueueUrlList", - "traits": { - "smithy.api#documentation": "

          A list of queue URLs, up to 1,000 entries, or the value of MaxResults\n that you sent in the request.

          ", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "QueueUrl" - } - }, - "NextToken": { - "target": "com.amazonaws.sqs#Token", - "traits": { - "smithy.api#documentation": "

          Pagination token to include in the next request. Token value is null if\n there are no additional results to request, or if you did not set\n MaxResults in the request.

          " - } - } - }, + }, + "LastModifiedTimestamp": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

          A list of your queues.

          ", - "smithy.api#output": {} + "smithy.api#enumValue": "LastModifiedTimestamp" } - }, - "com.amazonaws.sqs#Long": { - "type": "long", + }, + "QueueArn": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#default": 0 + "smithy.api#enumValue": "QueueArn" } - }, - "com.amazonaws.sqs#Message": { - "type": "structure", - "members": { - "MessageId": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          A unique identifier for the message. A MessageIdis considered unique\n across all Amazon Web Services accounts for an extended period of time.

          " - } - }, - "ReceiptHandle": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          An identifier associated with the act of receiving the message. A new receipt handle\n is returned every time you receive a message. When deleting a message, you provide the\n last received receipt handle to delete the message.

          " - } - }, - "MD5OfBody": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          An MD5 digest of the non-URL-encoded message body string.

          " - } - }, - "Body": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The message's contents (not URL-encoded).

          " - } - }, - "Attributes": { - "target": "com.amazonaws.sqs#MessageSystemAttributeMap", - "traits": { - "smithy.api#documentation": "

          A map of the attributes requested in \n ReceiveMessage\n to\n their respective values. Supported attributes:

          \n
            \n
          • \n

            \n ApproximateReceiveCount\n

            \n
          • \n
          • \n

            \n ApproximateFirstReceiveTimestamp\n

            \n
          • \n
          • \n

            \n MessageDeduplicationId\n

            \n
          • \n
          • \n

            \n MessageGroupId\n

            \n
          • \n
          • \n

            \n SenderId\n

            \n
          • \n
          • \n

            \n SentTimestamp\n

            \n
          • \n
          • \n

            \n SequenceNumber\n

            \n
          • \n
          \n

          \n ApproximateFirstReceiveTimestamp and SentTimestamp are each\n returned as an integer representing the epoch time in\n milliseconds.

          ", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Attribute" - } - }, - "MD5OfMessageAttributes": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          An MD5 digest of the non-URL-encoded message attribute string. You can use this\n attribute to verify that Amazon SQS received the message correctly. Amazon SQS\n URL-decodes the message before creating the MD5 digest. For information about MD5, see\n RFC1321.

          " - } - }, - "MessageAttributes": { - "target": "com.amazonaws.sqs#MessageBodyAttributeMap", - "traits": { - "smithy.api#documentation": "

          Each message attribute consists of a Name, Type, and\n Value. For more information, see Amazon SQS message attributes in the Amazon SQS Developer\n Guide.

          ", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "MessageAttribute" - } - } - }, + }, + "ApproximateNumberOfMessagesDelayed": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

          An Amazon SQS message.

          " + "smithy.api#enumValue": "ApproximateNumberOfMessagesDelayed" } - }, - "com.amazonaws.sqs#MessageAttributeName": { - "type": "string" - }, - "com.amazonaws.sqs#MessageAttributeNameList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#MessageAttributeName" + }, + "DelaySeconds": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DelaySeconds" } - }, - "com.amazonaws.sqs#MessageAttributeValue": { - "type": "structure", - "members": { - "StringValue": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          Strings are Unicode with UTF-8 binary encoding. For a list of code values, see ASCII Printable\n Characters.

          " - } - }, - "BinaryValue": { - "target": "com.amazonaws.sqs#Binary", - "traits": { - "smithy.api#documentation": "

          Binary type attributes can store any binary data, such as compressed data, encrypted\n data, or images.

          " - } - }, - "StringListValues": { - "target": "com.amazonaws.sqs#StringList", - "traits": { - "smithy.api#documentation": "

          Not implemented. Reserved for future use.

          ", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "StringListValue" - } - }, - "BinaryListValues": { - "target": "com.amazonaws.sqs#BinaryList", - "traits": { - "smithy.api#documentation": "

          Not implemented. Reserved for future use.

          ", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "BinaryListValue" - } - }, - "DataType": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          Amazon SQS supports the following logical data types: String,\n Number, and Binary. For the Number data type,\n you must use StringValue.

          \n

          You can also append custom labels. For more information, see Amazon SQS Message Attributes in the Amazon SQS Developer\n Guide.

          ", - "smithy.api#required": {} - } - } - }, + }, + "ReceiveMessageWaitTimeSeconds": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

          The user-specified message attribute value. For string data types, the\n Value attribute has the same restrictions on the content as the message\n body. For more information, see \n SendMessage.\n

          \n

          \n Name, type, value and the message body must not\n be empty or null. All parts of the message attribute, including Name,\n Type, and Value, are part of the message size restriction\n (256 KiB or 262,144 bytes).

          " + "smithy.api#enumValue": "ReceiveMessageWaitTimeSeconds" } - }, - "com.amazonaws.sqs#MessageBodyAttributeMap": { - "type": "map", - "key": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#xmlName": "Name" - } - }, - "value": { - "target": "com.amazonaws.sqs#MessageAttributeValue", - "traits": { - "smithy.api#xmlName": "Value" - } + }, + "RedrivePolicy": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RedrivePolicy" } - }, - "com.amazonaws.sqs#MessageBodySystemAttributeMap": { - "type": "map", - "key": { - "target": "com.amazonaws.sqs#MessageSystemAttributeNameForSends", - "traits": { - "smithy.api#xmlName": "Name" - } - }, - "value": { - "target": "com.amazonaws.sqs#MessageSystemAttributeValue", - "traits": { - "smithy.api#xmlName": "Value" - } + }, + "FifoQueue": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FifoQueue" } - }, - "com.amazonaws.sqs#MessageList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#Message" + }, + "ContentBasedDeduplication": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ContentBasedDeduplication" } - }, - "com.amazonaws.sqs#MessageNotInflight": { - "type": "structure", - "members": {}, + }, + "KmsMasterKeyId": { + "target": "smithy.api#Unit", "traits": { - "aws.protocols#awsQueryError": { - "code": "AWS.SimpleQueueService.MessageNotInflight", - "httpResponseCode": 400 - }, - "smithy.api#documentation": "

          The specified message isn't in flight.

          ", - "smithy.api#error": "client", - "smithy.api#httpError": 400 + "smithy.api#enumValue": "KmsMasterKeyId" } - }, - "com.amazonaws.sqs#MessageSystemAttributeMap": { - "type": "map", - "key": { - "target": "com.amazonaws.sqs#MessageSystemAttributeName", - "traits": { - "smithy.api#xmlName": "Name" - } - }, - "value": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#xmlName": "Value" - } + }, + "KmsDataKeyReusePeriodSeconds": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "KmsDataKeyReusePeriodSeconds" } - }, - "com.amazonaws.sqs#MessageSystemAttributeName": { - "type": "enum", - "members": { - "SenderId": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "SenderId" - } - }, - "SentTimestamp": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "SentTimestamp" - } - }, - "ApproximateReceiveCount": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ApproximateReceiveCount" - } - }, - "ApproximateFirstReceiveTimestamp": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ApproximateFirstReceiveTimestamp" - } - }, - "SequenceNumber": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "SequenceNumber" - } - }, - "MessageDeduplicationId": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "MessageDeduplicationId" - } - }, - "MessageGroupId": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "MessageGroupId" - } - }, - "AWSTraceHeader": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "AWSTraceHeader" - } - }, - "DeadLetterQueueSourceArn": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DeadLetterQueueSourceArn" - } - } + }, + "DeduplicationScope": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DeduplicationScope" } - }, - "com.amazonaws.sqs#MessageSystemAttributeNameForSends": { - "type": "enum", - "members": { - "AWSTraceHeader": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "AWSTraceHeader" - } - } + }, + "FifoThroughputLimit": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FifoThroughputLimit" } - }, - "com.amazonaws.sqs#MessageSystemAttributeValue": { - "type": "structure", - "members": { - "StringValue": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          Strings are Unicode with UTF-8 binary encoding. For a list of code values, see ASCII Printable\n Characters.

          " - } - }, - "BinaryValue": { - "target": "com.amazonaws.sqs#Binary", - "traits": { - "smithy.api#documentation": "

          Binary type attributes can store any binary data, such as compressed data, encrypted\n data, or images.

          " - } - }, - "StringListValues": { - "target": "com.amazonaws.sqs#StringList", - "traits": { - "smithy.api#documentation": "

          Not implemented. Reserved for future use.

          ", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "StringListValue" - } - }, - "BinaryListValues": { - "target": "com.amazonaws.sqs#BinaryList", - "traits": { - "smithy.api#documentation": "

          Not implemented. Reserved for future use.

          ", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "BinaryListValue" - } - }, - "DataType": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          Amazon SQS supports the following logical data types: String,\n Number, and Binary. For the Number data type,\n you must use StringValue.

          \n

          You can also append custom labels. For more information, see Amazon SQS Message Attributes in the Amazon SQS Developer\n Guide.

          ", - "smithy.api#required": {} - } - } - }, + }, + "RedriveAllowPolicy": { + "target": "smithy.api#Unit", "traits": { - "smithy.api#documentation": "

          The user-specified message system attribute value. For string data types, the\n Value attribute has the same restrictions on the content as the message\n body. For more information, see \n SendMessage.\n

          \n

          \n Name, type, value and the message body must not\n be empty or null.

          " + "smithy.api#enumValue": "RedriveAllowPolicy" } - }, - "com.amazonaws.sqs#NullableInteger": { - "type": "integer" - }, - "com.amazonaws.sqs#NullableLong": { - "type": "long" - }, - "com.amazonaws.sqs#OverLimit": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.sqs#ExceptionMessage" - } - }, + }, + "SqsManagedSseEnabled": { + "target": "smithy.api#Unit", "traits": { - "aws.protocols#awsQueryError": { - "code": "OverLimit", - "httpResponseCode": 403 - }, - "smithy.api#documentation": "

          The specified action violates a limit. For example, ReceiveMessage\n returns this error if the maximum number of in flight messages is reached and\n AddPermission returns this error if the maximum number of permissions\n for the queue is reached.

          ", - "smithy.api#error": "client", - "smithy.api#httpError": 403 + "smithy.api#enumValue": "SqsManagedSseEnabled" } - }, - "com.amazonaws.sqs#PurgeQueue": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#PurgeQueueRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#InvalidAddress" - }, - { - "target": "com.amazonaws.sqs#InvalidSecurity" - }, - { - "target": "com.amazonaws.sqs#PurgeQueueInProgress" - }, - { - "target": "com.amazonaws.sqs#QueueDoesNotExist" - }, - { - "target": "com.amazonaws.sqs#RequestThrottled" - }, - { - "target": "com.amazonaws.sqs#UnsupportedOperation" - } - ], + } + } + }, + "com.amazonaws.sqs#QueueDeletedRecently": { + "type": "structure", + "members": {}, + "traits": { + "aws.protocols#awsQueryError": { + "code": "AWS.SimpleQueueService.QueueDeletedRecently", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

          You must wait 60 seconds after deleting a queue before you can create another queue\n with the same name.

          ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.sqs#QueueDoesNotExist": { + "type": "structure", + "members": {}, + "traits": { + "aws.protocols#awsQueryError": { + "code": "AWS.SimpleQueueService.NonExistentQueue", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

          The specified queue doesn't exist.

          ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.sqs#QueueNameExists": { + "type": "structure", + "members": {}, + "traits": { + "aws.protocols#awsQueryError": { + "code": "QueueAlreadyExists", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

          A queue with this name already exists. Amazon SQS returns this error only if the request\n includes attributes whose values differ from those of the existing queue.

          ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.sqs#QueueUrlList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#String" + } + }, + "com.amazonaws.sqs#ReceiptHandleIsInvalid": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#documentation": "

          The specified receipt handle isn't valid.

          ", + "smithy.api#error": "client" + } + }, + "com.amazonaws.sqs#ReceiveMessage": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#ReceiveMessageRequest" + }, + "output": { + "target": "com.amazonaws.sqs#ReceiveMessageResult" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#OverLimit" + } + ], + "traits": { + "smithy.api#documentation": "

          Retrieves one or more messages (up to 10), from the specified queue. Using the\n WaitTimeSeconds parameter enables long-poll support. For more\n information, see Amazon SQS\n Long Polling in the Amazon SQS Developer Guide.

          \n

          Short poll is the default behavior where a weighted random set of machines is sampled\n on a ReceiveMessage call. Thus, only the messages on the sampled machines\n are returned. If the number of messages in the queue is small (fewer than 1,000), you\n most likely get fewer messages than you requested per ReceiveMessage call.\n If the number of messages in the queue is extremely small, you might not receive any\n messages in a particular ReceiveMessage response. If this happens, repeat\n the request.

          \n

          For each message returned, the response includes the following:

          \n
            \n
          • \n

            The message body.

            \n
          • \n
          • \n

            An MD5 digest of the message body. For information about MD5, see RFC1321.

            \n
          • \n
          • \n

            The MessageId you received when you sent the message to the\n queue.

            \n
          • \n
          • \n

            The receipt handle.

            \n
          • \n
          • \n

            The message attributes.

            \n
          • \n
          • \n

            An MD5 digest of the message attributes.

            \n
          • \n
          \n

          The receipt handle is the identifier you must provide when deleting the message. For\n more information, see Queue and Message Identifiers in the Amazon SQS Developer\n Guide.

          \n

          You can provide the VisibilityTimeout parameter in your request. The\n parameter is applied to the messages that Amazon SQS returns in the response. If you don't\n include the parameter, the overall visibility timeout for the queue is used for the\n returned messages. For more information, see Visibility Timeout in the Amazon SQS Developer\n Guide.

          \n

          A message that isn't deleted or a message whose visibility isn't extended before the\n visibility timeout expires counts as a failed receive. Depending on the configuration of\n the queue, the message might be sent to the dead-letter queue.

          \n \n

          In the future, new attributes might be added. If you write code that calls this action, we recommend that you structure your code so that it can handle new attributes gracefully.

          \n
          " + } + }, + "com.amazonaws.sqs#ReceiveMessageRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

          Deletes available messages in a queue (including in-flight messages) specified by the\n QueueURL parameter.

          \n \n

          When you use the PurgeQueue action, you can't retrieve any messages\n deleted from a queue.

          \n

          The message deletion process takes up to 60 seconds. We recommend waiting for 60\n seconds regardless of your queue's size.

          \n
          \n

          Messages sent to the queue before you call\n PurgeQueue might be received but are deleted within the next\n minute.

          \n

          Messages sent to the queue after you call PurgeQueue\n might be deleted while the queue is being purged.

          " + "smithy.api#documentation": "

          The URL of the Amazon SQS queue from which messages are received.

          \n

          Queue URLs and names are case-sensitive.

          ", + "smithy.api#required": {} } - }, - "com.amazonaws.sqs#PurgeQueueInProgress": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.sqs#ExceptionMessage" - } - }, + }, + "AttributeNames": { + "target": "com.amazonaws.sqs#AttributeNameList", "traits": { - "aws.protocols#awsQueryError": { - "code": "AWS.SimpleQueueService.PurgeQueueInProgress", - "httpResponseCode": 403 - }, - "smithy.api#documentation": "

          Indicates that the specified queue previously received a PurgeQueue\n request within the last 60 seconds (the time it can take to delete the messages in the\n queue).

          ", - "smithy.api#error": "client", - "smithy.api#httpError": 403 + "smithy.api#documentation": "

          A list of attributes that need to be returned along with each message. These\n attributes include:

          \n
            \n
          • \n

            \n All – Returns all values.

            \n
          • \n
          • \n

            \n ApproximateFirstReceiveTimestamp – Returns the time the\n message was first received from the queue (epoch time in\n milliseconds).

            \n
          • \n
          • \n

            \n ApproximateReceiveCount – Returns the number of times a\n message has been received across all queues but not deleted.

            \n
          • \n
          • \n

            \n AWSTraceHeader – Returns the X-Ray trace\n header string.

            \n
          • \n
          • \n

            \n SenderId\n

            \n
              \n
            • \n

              For a user, returns the user ID, for example\n ABCDEFGHI1JKLMNOPQ23R.

              \n
            • \n
            • \n

              For an IAM role, returns the IAM role ID, for example\n ABCDE1F2GH3I4JK5LMNOP:i-a123b456.

              \n
            • \n
            \n
          • \n
          • \n

            \n SentTimestamp – Returns the time the message was sent to the\n queue (epoch time in\n milliseconds).

            \n
          • \n
          • \n

            \n SqsManagedSseEnabled – Enables server-side queue encryption\n using SQS owned encryption keys. Only one server-side encryption option is\n supported per queue (for example, SSE-KMS or SSE-SQS).

            \n
          • \n
          • \n

            \n MessageDeduplicationId – Returns the value provided by the\n producer that calls the \n SendMessage\n \n action.

            \n
          • \n
          • \n

            \n MessageGroupId – Returns the value provided by the\n producer that calls the \n SendMessage\n action.\n Messages with the same MessageGroupId are returned in\n sequence.

            \n
          • \n
          • \n

            \n SequenceNumber – Returns the value provided by\n Amazon SQS.

            \n
          • \n
          ", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "AttributeName" } - }, - "com.amazonaws.sqs#PurgeQueueRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The URL of the queue from which the PurgeQueue action deletes\n messages.

          \n

          Queue URLs and names are case-sensitive.

          ", - "smithy.api#required": {} - } - } - }, + }, + "MessageAttributeNames": { + "target": "com.amazonaws.sqs#MessageAttributeNameList", "traits": { - "smithy.api#documentation": "

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

          The name of the message attribute, where N is the index.

          \n
            \n
          • \n

            The name can contain alphanumeric characters and the underscore\n (_), hyphen (-), and period\n (.).

            \n
          • \n
          • \n

            The name is case-sensitive and must be unique among all attribute names for\n the message.

            \n
          • \n
          • \n

            The name must not start with AWS-reserved prefixes such as AWS.\n or Amazon. (or any casing variants).

            \n
          • \n
          • \n

            The name must not start or end with a period (.), and it should\n not have periods in succession (..).

            \n
          • \n
          • \n

            The name can be up to 256 characters long.

            \n
          • \n
          \n

          When using ReceiveMessage, you can send a list of attribute names to\n receive, or you can return all of the attributes by specifying All or\n .* in your request. You can also use all message attributes starting\n with a prefix, for example bar.*.

          ", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "MessageAttributeName" } - }, - "com.amazonaws.sqs#QueueAttributeMap": { - "type": "map", - "key": { - "target": "com.amazonaws.sqs#QueueAttributeName", - "traits": { - "smithy.api#xmlName": "Name" - } - }, - "value": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#xmlName": "Value" - } + }, + "MaxNumberOfMessages": { + "target": "com.amazonaws.sqs#Integer", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

          The maximum number of messages to return. Amazon SQS never returns more messages than this\n value (however, fewer messages might be returned). Valid values: 1 to 10. Default:\n 1.

          " } - }, - "com.amazonaws.sqs#QueueAttributeName": { - "type": "enum", - "members": { - "All": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "All" - } - }, - "Policy": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "Policy" - } - }, - "VisibilityTimeout": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "VisibilityTimeout" - } - }, - "MaximumMessageSize": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "MaximumMessageSize" - } - }, - "MessageRetentionPeriod": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "MessageRetentionPeriod" - } - }, - "ApproximateNumberOfMessages": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ApproximateNumberOfMessages" - } - }, - "ApproximateNumberOfMessagesNotVisible": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ApproximateNumberOfMessagesNotVisible" - } - }, - "CreatedTimestamp": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "CreatedTimestamp" - } - }, - "LastModifiedTimestamp": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "LastModifiedTimestamp" - } - }, - "QueueArn": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "QueueArn" - } - }, - "ApproximateNumberOfMessagesDelayed": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ApproximateNumberOfMessagesDelayed" - } - }, - "DelaySeconds": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DelaySeconds" - } - }, - "ReceiveMessageWaitTimeSeconds": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ReceiveMessageWaitTimeSeconds" - } - }, - "RedrivePolicy": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "RedrivePolicy" - } - }, - "FifoQueue": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "FifoQueue" - } - }, - "ContentBasedDeduplication": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "ContentBasedDeduplication" - } - }, - "KmsMasterKeyId": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "KmsMasterKeyId" - } - }, - "KmsDataKeyReusePeriodSeconds": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "KmsDataKeyReusePeriodSeconds" - } - }, - "DeduplicationScope": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "DeduplicationScope" - } - }, - "FifoThroughputLimit": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "FifoThroughputLimit" - } - }, - "RedriveAllowPolicy": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "RedriveAllowPolicy" - } - }, - "SqsManagedSseEnabled": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "SqsManagedSseEnabled" - } - } + }, + "VisibilityTimeout": { + "target": "com.amazonaws.sqs#Integer", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

          The duration (in seconds) that the received messages are hidden from subsequent\n retrieve requests after being retrieved by a ReceiveMessage request.

          " } - }, - "com.amazonaws.sqs#QueueDeletedRecently": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.sqs#ExceptionMessage" - } - }, + }, + "WaitTimeSeconds": { + "target": "com.amazonaws.sqs#Integer", "traits": { - "aws.protocols#awsQueryError": { - "code": "AWS.SimpleQueueService.QueueDeletedRecently", - "httpResponseCode": 400 - }, - "smithy.api#documentation": "

          You must wait 60 seconds after deleting a queue before you can create another queue\n with the same name.

          ", - "smithy.api#error": "client", - "smithy.api#httpError": 400 + "smithy.api#default": 0, + "smithy.api#documentation": "

          The duration (in seconds) for which the call waits for a message to arrive in the\n queue before returning. If a message is available, the call returns sooner than\n WaitTimeSeconds. If no messages are available and the wait time\n expires, the call returns successfully with an empty list of messages.

          \n \n

          To avoid HTTP errors, ensure that the HTTP response timeout for\n ReceiveMessage requests is longer than the\n WaitTimeSeconds parameter. For example, with the Java SDK, you can\n set HTTP transport settings using the NettyNioAsyncHttpClient for asynchronous clients, or the ApacheHttpClient for synchronous clients.

          \n
          " } - }, - "com.amazonaws.sqs#QueueDoesNotExist": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.sqs#ExceptionMessage" - } - }, + }, + "ReceiveRequestAttemptId": { + "target": "com.amazonaws.sqs#String", "traits": { - "aws.protocols#awsQueryError": { - "code": "AWS.SimpleQueueService.NonExistentQueue", - "httpResponseCode": 400 - }, - "smithy.api#documentation": "

          The specified queue doesn't exist.

          ", - "smithy.api#error": "client", - "smithy.api#httpError": 400 + "smithy.api#documentation": "

          This parameter applies only to FIFO (first-in-first-out) queues.

          \n

          The token used for deduplication of ReceiveMessage calls. If a networking\n issue occurs after a ReceiveMessage action, and instead of a response you\n receive a generic error, it is possible to retry the same action with an identical\n ReceiveRequestAttemptId to retrieve the same set of messages, even if\n their visibility timeout has not yet expired.

          \n
            \n
          • \n

            You can use ReceiveRequestAttemptId only for 5 minutes after a\n ReceiveMessage action.

            \n
          • \n
          • \n

            When you set FifoQueue, a caller of the\n ReceiveMessage action can provide a\n ReceiveRequestAttemptId explicitly.

            \n
          • \n
          • \n

            If a caller of the ReceiveMessage action doesn't provide a\n ReceiveRequestAttemptId, Amazon SQS generates a\n ReceiveRequestAttemptId.

            \n
          • \n
          • \n

            It is possible to retry the ReceiveMessage action with the same\n ReceiveRequestAttemptId if none of the messages have been\n modified (deleted or had their visibility changes).

            \n
          • \n
          • \n

            During a visibility timeout, subsequent calls with the same\n ReceiveRequestAttemptId return the same messages and receipt\n handles. If a retry occurs within the deduplication interval, it resets the\n visibility timeout. For more information, see Visibility Timeout in the Amazon SQS Developer\n Guide.

            \n \n

            If a caller of the ReceiveMessage action still processes\n messages when the visibility timeout expires and messages become visible,\n another worker consuming from the same queue can receive the same messages\n and therefore process duplicates. Also, if a consumer whose message\n processing time is longer than the visibility timeout tries to delete the\n processed messages, the action fails with an error.

            \n

            To mitigate this effect, ensure that your application observes a safe\n threshold before the visibility timeout expires and extend the visibility\n timeout as necessary.

            \n
            \n
          • \n
          • \n

            While messages with a particular MessageGroupId are invisible, no\n more messages belonging to the same MessageGroupId are returned\n until the visibility timeout expires. You can still receive messages with\n another MessageGroupId as long as it is also visible.

            \n
          • \n
          • \n

            If a caller of ReceiveMessage can't track the\n ReceiveRequestAttemptId, no retries work until the original\n visibility timeout expires. As a result, delays might occur but the messages in\n the queue remain in a strict order.

            \n
          • \n
          \n

          The maximum length of ReceiveRequestAttemptId is 128 characters.\n ReceiveRequestAttemptId can contain alphanumeric characters\n (a-z, A-Z, 0-9) and punctuation\n (!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~).

          \n

          For best practices of using ReceiveRequestAttemptId, see Using the ReceiveRequestAttemptId Request Parameter in the Amazon SQS\n Developer Guide.

          " } + } }, - "com.amazonaws.sqs#QueueNameExists": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.sqs#ExceptionMessage" - } - }, + "traits": { + "smithy.api#documentation": "

          ", + "smithy.api#input": {} + } + }, + "com.amazonaws.sqs#ReceiveMessageResult": { + "type": "structure", + "members": { + "Messages": { + "target": "com.amazonaws.sqs#MessageList", + "traits": { + "smithy.api#documentation": "

          A list of messages.

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

          A list of received messages.

          ", + "smithy.api#output": {} + } + }, + "com.amazonaws.sqs#RemovePermission": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#RemovePermissionRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "

          Revokes any permissions in the queue policy that matches the specified\n Label parameter.

          \n \n
            \n
          • \n

            Only the owner of a queue can remove permissions from it.

            \n
          • \n
          • \n

            Cross-account permissions don't apply to this action. For more information, \nsee Grant \ncross-account permissions to a role and a username in the Amazon SQS Developer Guide.

            \n
          • \n
          • \n

            To remove the ability to change queue permissions, you must deny permission to the AddPermission, RemovePermission, and SetQueueAttributes actions in your IAM policy.

            \n
          • \n
          \n
          " + } + }, + "com.amazonaws.sqs#RemovePermissionRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", "traits": { - "aws.protocols#awsQueryError": { - "code": "QueueAlreadyExists", - "httpResponseCode": 400 - }, - "smithy.api#documentation": "

          A queue with this name already exists. Amazon SQS returns this error only if the\n request includes attributes whose values differ from those of the existing queue.

          ", - "smithy.api#error": "client", - "smithy.api#httpError": 400 + "smithy.api#documentation": "

          The URL of the Amazon SQS queue from which permissions are removed.

          \n

          Queue URLs and names are case-sensitive.

          ", + "smithy.api#required": {} } - }, - "com.amazonaws.sqs#QueueUrlList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#String" + }, + "Label": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

          The identification of the permission to remove. This is the label added using the\n \n AddPermission\n action.

          ", + "smithy.api#required": {} } + } }, - "com.amazonaws.sqs#ReceiptHandleIsInvalid": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.sqs#ExceptionMessage" - } - }, + "traits": { + "smithy.api#documentation": "

          ", + "smithy.api#input": {} + } + }, + "com.amazonaws.sqs#ResourceNotFoundException": { + "type": "structure", + "members": {}, + "traits": { + "aws.protocols#awsQueryError": { + "code": "ResourceNotFoundException", + "httpResponseCode": 404 + }, + "smithy.api#documentation": "

          One or more specified resources don't exist.

          ", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.sqs#SendMessage": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#SendMessageRequest" + }, + "output": { + "target": "com.amazonaws.sqs#SendMessageResult" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#InvalidMessageContents" + }, + { + "target": "com.amazonaws.sqs#UnsupportedOperation" + } + ], + "traits": { + "smithy.api#documentation": "

          Delivers a message to the specified queue.

          \n \n

          A message can include only XML, JSON, and unformatted text. The following Unicode characters are allowed:

          \n

          \n #x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF\n

          \n

          Any characters not included in this list will be rejected. For more information, see the W3C specification for characters.

          \n
          " + } + }, + "com.amazonaws.sqs#SendMessageBatch": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#SendMessageBatchRequest" + }, + "output": { + "target": "com.amazonaws.sqs#SendMessageBatchResult" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#BatchEntryIdsNotDistinct" + }, + { + "target": "com.amazonaws.sqs#BatchRequestTooLong" + }, + { + "target": "com.amazonaws.sqs#EmptyBatchRequest" + }, + { + "target": "com.amazonaws.sqs#InvalidBatchEntryId" + }, + { + "target": "com.amazonaws.sqs#TooManyEntriesInBatchRequest" + }, + { + "target": "com.amazonaws.sqs#UnsupportedOperation" + } + ], + "traits": { + "smithy.api#documentation": "

          You can use SendMessageBatch to send up to 10 messages to the specified\n queue by assigning either identical or different values to each message (or by not\n assigning values at all). This is a batch version of \n SendMessage. For a FIFO queue, multiple messages within a single batch are enqueued\n in the order they are sent.

          \n

          The result of sending each message is reported individually in the response.\n Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.

          \n

          The maximum allowed individual message size and the maximum total payload size (the\n sum of the individual lengths of all of the batched messages) are both 256 KiB (262,144\n bytes).

          \n \n

          A message can include only XML, JSON, and unformatted text. The following Unicode characters are allowed:

          \n

          \n #x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF\n

          \n

          Any characters not included in this list will be rejected. For more information, see the W3C specification for characters.

          \n
          \n

          If you don't specify the DelaySeconds parameter for an entry, Amazon SQS uses\n the default value for the queue.

          " + } + }, + "com.amazonaws.sqs#SendMessageBatchRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

          The URL of the Amazon SQS queue to which batched messages are sent.

          \n

          Queue URLs and names are case-sensitive.

          ", + "smithy.api#required": {} + } + }, + "Entries": { + "target": "com.amazonaws.sqs#SendMessageBatchRequestEntryList", + "traits": { + "smithy.api#documentation": "

          A list of \n SendMessageBatchRequestEntry\n items.

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

          ", + "smithy.api#input": {} + } + }, + "com.amazonaws.sqs#SendMessageBatchRequestEntry": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.sqs#String", "traits": { - "aws.protocols#awsQueryError": { - "code": "ReceiptHandleIsInvalid", - "httpResponseCode": 404 - }, - "smithy.api#documentation": "

          The specified receipt handle isn't valid.

          ", - "smithy.api#error": "client", - "smithy.api#httpError": 404 + "smithy.api#documentation": "

          An identifier for a message in this batch used to communicate the result.

          \n \n

          The Ids of a batch request need to be unique within a request.

          \n

          This identifier can have up to 80 characters. The following characters are accepted: alphanumeric characters, hyphens(-), and underscores (_).

          \n
          ", + "smithy.api#required": {} } - }, - "com.amazonaws.sqs#ReceiveMessage": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#ReceiveMessageRequest" - }, - "output": { - "target": "com.amazonaws.sqs#ReceiveMessageResult" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#InvalidAddress" - }, - { - "target": "com.amazonaws.sqs#InvalidSecurity" - }, - { - "target": "com.amazonaws.sqs#KmsAccessDenied" - }, - { - "target": "com.amazonaws.sqs#KmsDisabled" - }, - { - "target": "com.amazonaws.sqs#KmsInvalidKeyUsage" - }, - { - "target": "com.amazonaws.sqs#KmsInvalidState" - }, - { - "target": "com.amazonaws.sqs#KmsNotFound" - }, - { - "target": "com.amazonaws.sqs#KmsOptInRequired" - }, - { - "target": "com.amazonaws.sqs#KmsThrottled" - }, - { - "target": "com.amazonaws.sqs#OverLimit" - }, - { - "target": "com.amazonaws.sqs#QueueDoesNotExist" - }, - { - "target": "com.amazonaws.sqs#RequestThrottled" - }, - { - "target": "com.amazonaws.sqs#UnsupportedOperation" - } - ], + }, + "MessageBody": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

          Retrieves one or more messages (up to 10), from the specified queue. Using the\n WaitTimeSeconds parameter enables long-poll support. For more\n information, see Amazon\n SQS Long Polling in the Amazon SQS Developer Guide.

          \n

          Short poll is the default behavior where a weighted random set of machines is sampled\n on a ReceiveMessage call. Thus, only the messages on the sampled machines\n are returned. If the number of messages in the queue is small (fewer than 1,000), you\n most likely get fewer messages than you requested per ReceiveMessage call.\n If the number of messages in the queue is extremely small, you might not receive any\n messages in a particular ReceiveMessage response. If this happens, repeat\n the request.

          \n

          For each message returned, the response includes the following:

          \n
            \n
          • \n

            The message body.

            \n
          • \n
          • \n

            An MD5 digest of the message body. For information about MD5, see RFC1321.

            \n
          • \n
          • \n

            The MessageId you received when you sent the message to the\n queue.

            \n
          • \n
          • \n

            The receipt handle.

            \n
          • \n
          • \n

            The message attributes.

            \n
          • \n
          • \n

            An MD5 digest of the message attributes.

            \n
          • \n
          \n

          The receipt handle is the identifier you must provide when deleting the message. For\n more information, see Queue and Message Identifiers in the Amazon SQS Developer\n Guide.

          \n

          You can provide the VisibilityTimeout parameter in your request. The\n parameter is applied to the messages that Amazon SQS returns in the response. If you\n don't include the parameter, the overall visibility timeout for the queue is used for\n the returned messages. For more information, see Visibility Timeout in the Amazon SQS Developer\n Guide.

          \n

          A message that isn't deleted or a message whose visibility isn't extended before the\n visibility timeout expires counts as a failed receive. Depending on the configuration of\n the queue, the message might be sent to the dead-letter queue.

          \n \n

          In the future, new attributes might be added. If you write code that calls this\n action, we recommend that you structure your code so that it can handle new\n attributes gracefully.

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

          The body of the message.

          ", + "smithy.api#required": {} } - }, - "com.amazonaws.sqs#ReceiveMessageRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The URL of the Amazon SQS queue from which messages are received.

          \n

          Queue URLs and names are case-sensitive.

          ", - "smithy.api#required": {} - } - }, - "AttributeNames": { - "target": "com.amazonaws.sqs#AttributeNameList", - "traits": { - "smithy.api#documentation": "

          A list of attributes that need to be returned along with each message. These\n attributes include:

          \n
            \n
          • \n

            \n All – Returns all values.

            \n
          • \n
          • \n

            \n ApproximateFirstReceiveTimestamp – Returns the time the message was\n first received from the queue (epoch time in\n milliseconds).

            \n
          • \n
          • \n

            \n ApproximateReceiveCount – Returns the number of times a message has\n been received across all queues but not deleted.

            \n
          • \n
          • \n

            \n AWSTraceHeader – Returns the X-Ray trace header\n string.

            \n
          • \n
          • \n

            \n SenderId\n

            \n
              \n
            • \n

              For a user, returns the user ID, for example\n ABCDEFGHI1JKLMNOPQ23R.

              \n
            • \n
            • \n

              For an IAM role, returns the IAM role ID, for example\n ABCDE1F2GH3I4JK5LMNOP:i-a123b456.

              \n
            • \n
            \n
          • \n
          • \n

            \n SentTimestamp – Returns the time the message was sent to the queue\n (epoch time in\n milliseconds).

            \n
          • \n
          • \n

            \n SqsManagedSseEnabled – Enables server-side queue encryption using\n SQS owned encryption keys. Only one server-side encryption option is supported\n per queue (for example, SSE-KMS or SSE-SQS).

            \n
          • \n
          • \n

            \n MessageDeduplicationId – Returns the value provided by the\n producer that calls the \n SendMessage\n \n action.

            \n
          • \n
          • \n

            \n MessageGroupId – Returns the value provided by the producer that\n calls the \n SendMessage\n action. Messages with the\n same MessageGroupId are returned in sequence.

            \n
          • \n
          • \n

            \n SequenceNumber – Returns the value provided by Amazon SQS.

            \n
          • \n
          ", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "AttributeName" - } - }, - "MessageAttributeNames": { - "target": "com.amazonaws.sqs#MessageAttributeNameList", - "traits": { - "smithy.api#documentation": "

          The name of the message attribute, where N is the index.

          \n
            \n
          • \n

            The name can contain alphanumeric characters and the underscore\n (_), hyphen (-), and period\n (.).

            \n
          • \n
          • \n

            The name is case-sensitive and must be unique among all attribute names for\n the message.

            \n
          • \n
          • \n

            The name must not start with AWS-reserved prefixes such as AWS.\n or Amazon. (or any casing variants).

            \n
          • \n
          • \n

            The name must not start or end with a period (.), and it should\n not have periods in succession (..).

            \n
          • \n
          • \n

            The name can be up to 256 characters long.

            \n
          • \n
          \n

          When using ReceiveMessage, you can send a list of attribute names to\n receive, or you can return all of the attributes by specifying All or\n .* in your request. You can also use all message attributes starting\n with a prefix, for example bar.*.

          ", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "MessageAttributeName" - } - }, - "MaxNumberOfMessages": { - "target": "com.amazonaws.sqs#NullableInteger", - "traits": { - "smithy.api#documentation": "

          The maximum number of messages to return. Amazon SQS never returns more messages than\n this value (however, fewer messages might be returned). Valid values: 1 to 10. Default:\n 1.

          " - } - }, - "VisibilityTimeout": { - "target": "com.amazonaws.sqs#NullableInteger", - "traits": { - "smithy.api#documentation": "

          The duration (in seconds) that the received messages are hidden from subsequent\n retrieve requests after being retrieved by a ReceiveMessage request.

          " - } - }, - "WaitTimeSeconds": { - "target": "com.amazonaws.sqs#NullableInteger", - "traits": { - "smithy.api#documentation": "

          The duration (in seconds) for which the call waits for a message to arrive in the\n queue before returning. If a message is available, the call returns sooner than\n WaitTimeSeconds. If no messages are available and the wait time\n expires, the call returns successfully with an empty list of messages.

          \n \n

          To avoid HTTP errors, ensure that the HTTP response timeout for\n ReceiveMessage requests is longer than the\n WaitTimeSeconds parameter. For example, with the Java SDK, you can\n set HTTP transport settings using the NettyNioAsyncHttpClient for asynchronous clients, or the ApacheHttpClient for synchronous clients.

          \n
          " - } - }, - "ReceiveRequestAttemptId": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          This parameter applies only to FIFO (first-in-first-out) queues.

          \n

          The token used for deduplication of ReceiveMessage calls. If a networking\n issue occurs after a ReceiveMessage action, and instead of a response you\n receive a generic error, it is possible to retry the same action with an identical\n ReceiveRequestAttemptId to retrieve the same set of messages, even if\n their visibility timeout has not yet expired.

          \n
            \n
          • \n

            You can use ReceiveRequestAttemptId only for 5 minutes after a\n ReceiveMessage action.

            \n
          • \n
          • \n

            When you set FifoQueue, a caller of the\n ReceiveMessage action can provide a\n ReceiveRequestAttemptId explicitly.

            \n
          • \n
          • \n

            If a caller of the ReceiveMessage action doesn't provide a\n ReceiveRequestAttemptId, Amazon SQS generates a\n ReceiveRequestAttemptId.

            \n
          • \n
          • \n

            It is possible to retry the ReceiveMessage action with the same\n ReceiveRequestAttemptId if none of the messages have been\n modified (deleted or had their visibility changes).

            \n
          • \n
          • \n

            During a visibility timeout, subsequent calls with the same\n ReceiveRequestAttemptId return the same messages and receipt\n handles. If a retry occurs within the deduplication interval, it resets the\n visibility timeout. For more information, see Visibility Timeout in the Amazon SQS Developer\n Guide.

            \n \n

            If a caller of the ReceiveMessage action still processes\n messages when the visibility timeout expires and messages become visible,\n another worker consuming from the same queue can receive the same messages\n and therefore process duplicates. Also, if a consumer whose message\n processing time is longer than the visibility timeout tries to delete the\n processed messages, the action fails with an error.

            \n

            To mitigate this effect, ensure that your application observes a safe\n threshold before the visibility timeout expires and extend the visibility\n timeout as necessary.

            \n
            \n
          • \n
          • \n

            While messages with a particular MessageGroupId are invisible, no\n more messages belonging to the same MessageGroupId are returned\n until the visibility timeout expires. You can still receive messages with\n another MessageGroupId as long as it is also visible.

            \n
          • \n
          • \n

            If a caller of ReceiveMessage can't track the\n ReceiveRequestAttemptId, no retries work until the original\n visibility timeout expires. As a result, delays might occur but the messages in\n the queue remain in a strict order.

            \n
          • \n
          \n

          The maximum length of ReceiveRequestAttemptId is 128 characters.\n ReceiveRequestAttemptId can contain alphanumeric characters\n (a-z, A-Z, 0-9) and punctuation\n (!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~).

          \n

          For best practices of using ReceiveRequestAttemptId, see Using the ReceiveRequestAttemptId Request Parameter in the Amazon\n SQS Developer Guide.

          " - } - } - }, + }, + "DelaySeconds": { + "target": "com.amazonaws.sqs#Integer", "traits": { - "smithy.api#documentation": "

          ", - "smithy.api#input": {} + "smithy.api#default": 0, + "smithy.api#documentation": "

          The length of time, in seconds, for which a specific message is delayed. Valid values:\n 0 to 900. Maximum: 15 minutes. Messages with a positive DelaySeconds value\n become available for processing after the delay period is finished. If you don't specify\n a value, the default value for the queue is applied.

          \n \n

          When you set FifoQueue, you can't set DelaySeconds per message. You can set this parameter only on a queue level.

          \n
          " } - }, - "com.amazonaws.sqs#ReceiveMessageResult": { - "type": "structure", - "members": { - "Messages": { - "target": "com.amazonaws.sqs#MessageList", - "traits": { - "smithy.api#documentation": "

          A list of messages.

          ", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Message" - } - } - }, + }, + "MessageAttributes": { + "target": "com.amazonaws.sqs#MessageBodyAttributeMap", "traits": { - "smithy.api#documentation": "

          A list of received messages.

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

          Each message attribute consists of a Name, Type, \nand Value. For more information, see \nAmazon SQS \nmessage attributes in the Amazon SQS Developer Guide.

          ", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "MessageAttribute" } - }, - "com.amazonaws.sqs#RemovePermission": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#RemovePermissionRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#InvalidAddress" - }, - { - "target": "com.amazonaws.sqs#InvalidSecurity" - }, - { - "target": "com.amazonaws.sqs#QueueDoesNotExist" - }, - { - "target": "com.amazonaws.sqs#RequestThrottled" - }, - { - "target": "com.amazonaws.sqs#UnsupportedOperation" - } - ], + }, + "MessageSystemAttributes": { + "target": "com.amazonaws.sqs#MessageBodySystemAttributeMap", "traits": { - "smithy.api#documentation": "

          Revokes any permissions in the queue policy that matches the specified\n Label parameter.

          \n \n
            \n
          • \n

            Only the owner of a queue can remove permissions from it.

            \n
          • \n
          • \n

            Cross-account permissions don't apply to this action. For more\n information, see Grant cross-account permissions to a role and a username in the\n Amazon SQS Developer Guide.

            \n
          • \n
          • \n

            To remove the ability to change queue permissions, you must deny\n permission to the AddPermission, RemovePermission,\n and SetQueueAttributes actions in your IAM policy.

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

          The message system attribute to send Each message system attribute consists of a Name, Type, and Value.

          \n \n
            \n
          • \n

            Currently, the only supported message system attribute is AWSTraceHeader.\n Its type must be String and its value must be a correctly formatted\n X-Ray trace header string.

            \n
          • \n
          • \n

            The size of a message system attribute doesn't count towards the total size of a message.

            \n
          • \n
          \n
          ", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "MessageSystemAttribute" } - }, - "com.amazonaws.sqs#RemovePermissionRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The URL of the Amazon SQS queue from which permissions are removed.

          \n

          Queue URLs and names are case-sensitive.

          ", - "smithy.api#required": {} - } - }, - "Label": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The identification of the permission to remove. This is the label added using the\n \n AddPermission\n action.

          ", - "smithy.api#required": {} - } - } - }, + }, + "MessageDeduplicationId": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

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

          This parameter applies only to FIFO (first-in-first-out) queues.

          \n

          The token used for deduplication of messages within a 5-minute minimum deduplication\n interval. If a message with a particular MessageDeduplicationId is sent\n successfully, subsequent messages with the same MessageDeduplicationId are\n accepted successfully but aren't delivered. For more information, see Exactly-once processing in the Amazon SQS Developer\n Guide.

          \n
            \n
          • \n

            Every message must have a unique MessageDeduplicationId,

            \n
              \n
            • \n

              You may provide a MessageDeduplicationId\n explicitly.

              \n
            • \n
            • \n

              If you aren't able to provide a MessageDeduplicationId\n and you enable ContentBasedDeduplication for your queue,\n Amazon SQS uses a SHA-256 hash to generate the\n MessageDeduplicationId using the body of the message\n (but not the attributes of the message).

              \n
            • \n
            • \n

              If you don't provide a MessageDeduplicationId and the\n queue doesn't have ContentBasedDeduplication set, the\n action fails with an error.

              \n
            • \n
            • \n

              If the queue has ContentBasedDeduplication set, your\n MessageDeduplicationId overrides the generated\n one.

              \n
            • \n
            \n
          • \n
          • \n

            When ContentBasedDeduplication is in effect, messages with\n identical content sent within the deduplication interval are treated as\n duplicates and only one copy of the message is delivered.

            \n
          • \n
          • \n

            If you send one message with ContentBasedDeduplication enabled\n and then another message with a MessageDeduplicationId that is the\n same as the one generated for the first MessageDeduplicationId, the\n two messages are treated as duplicates and only one copy of the message is\n delivered.

            \n
          • \n
          \n \n

          The MessageDeduplicationId is available to the consumer of the\n message (this can be useful for troubleshooting delivery issues).

          \n

          If a message is sent successfully but the acknowledgement is lost and the message\n is resent with the same MessageDeduplicationId after the deduplication\n interval, Amazon SQS can't detect duplicate messages.

          \n

          Amazon SQS continues to keep track of the message deduplication ID even after the message is received and deleted.

          \n
          \n

          The length of MessageDeduplicationId is 128 characters.\n MessageDeduplicationId can contain alphanumeric characters\n (a-z, A-Z, 0-9) and punctuation\n (!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~).

          \n

          For best practices of using MessageDeduplicationId, see Using the MessageDeduplicationId Property in the Amazon SQS Developer\n Guide.

          " } - }, - "com.amazonaws.sqs#RequestThrottled": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.sqs#ExceptionMessage" - } - }, + }, + "MessageGroupId": { + "target": "com.amazonaws.sqs#String", "traits": { - "aws.protocols#awsQueryError": { - "code": "RequestThrottled", - "httpResponseCode": 403 - }, - "smithy.api#documentation": "

          The request was denied due to request throttling.

          \n
            \n
          • \n

            The rate of requests per second exceeds the Amazon Web Services KMS request quota for an\n account and Region.

            \n
          • \n
          • \n

            A burst or sustained high rate of requests to change the state of the same KMS\n key. This condition is often known as a \"hot key.\"

            \n
          • \n
          • \n

            Requests for operations on KMS keys in a Amazon Web Services CloudHSM key store\n might be throttled at a lower-than-expected rate when the Amazon Web Services\n CloudHSM cluster associated with the Amazon Web Services CloudHSM key store is\n processing numerous commands, including those unrelated to the Amazon Web Services CloudHSM key store.

            \n
          • \n
          ", - "smithy.api#error": "client", - "smithy.api#httpError": 403 + "smithy.api#documentation": "

          This parameter applies only to FIFO (first-in-first-out) queues.

          \n

          The tag that specifies that a message belongs to a specific message group. Messages\n that belong to the same message group are processed in a FIFO manner (however,\n messages in different message groups might be processed out of order). To interleave\n multiple ordered streams within a single queue, use MessageGroupId values\n (for example, session data for multiple users). In this scenario, multiple consumers can\n process the queue, but the session data of each user is processed in a FIFO\n fashion.

          \n
            \n
          • \n

            You must associate a non-empty MessageGroupId with a message. If\n you don't provide a MessageGroupId, the action fails.

            \n
          • \n
          • \n

            \n ReceiveMessage might return messages with multiple\n MessageGroupId values. For each MessageGroupId,\n the messages are sorted by time sent. The caller can't specify a\n MessageGroupId.

            \n
          • \n
          \n

          The length of MessageGroupId is 128 characters. Valid values:\n alphanumeric characters and punctuation\n (!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~).

          \n

          For best practices of using MessageGroupId, see Using the MessageGroupId Property in the Amazon SQS Developer\n Guide.

          \n \n

          \n MessageGroupId is required for FIFO queues. You can't use it for\n Standard queues.

          \n
          " } + } }, - "com.amazonaws.sqs#ResourceNotFoundException": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.sqs#ExceptionMessage" - } - }, + "traits": { + "smithy.api#documentation": "

          Contains the details of a single Amazon SQS message along with an Id.

          " + } + }, + "com.amazonaws.sqs#SendMessageBatchRequestEntryList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#SendMessageBatchRequestEntry" + } + }, + "com.amazonaws.sqs#SendMessageBatchResult": { + "type": "structure", + "members": { + "Successful": { + "target": "com.amazonaws.sqs#SendMessageBatchResultEntryList", + "traits": { + "smithy.api#documentation": "

          A list of \n SendMessageBatchResultEntry\n items.

          ", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "SendMessageBatchResultEntry" + } + }, + "Failed": { + "target": "com.amazonaws.sqs#BatchResultErrorEntryList", + "traits": { + "smithy.api#documentation": "

          A list of \n BatchResultErrorEntry\n items with error\n details about each message that can't be enqueued.

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

          For each message in the batch, the response contains a \n SendMessageBatchResultEntry\n tag if the message succeeds or a\n \n BatchResultErrorEntry\n tag if the message\n fails.

          ", + "smithy.api#output": {} + } + }, + "com.amazonaws.sqs#SendMessageBatchResultEntry": { + "type": "structure", + "members": { + "Id": { + "target": "com.amazonaws.sqs#String", "traits": { - "aws.protocols#awsQueryError": { - "code": "ResourceNotFoundException", - "httpResponseCode": 404 - }, - "smithy.api#documentation": "

          One or more specified resources don't exist.

          ", - "smithy.api#error": "client", - "smithy.api#httpError": 404 + "smithy.api#documentation": "

          An identifier for the message in this batch.

          ", + "smithy.api#required": {} } - }, - "com.amazonaws.sqs#SendMessage": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#SendMessageRequest" - }, - "output": { - "target": "com.amazonaws.sqs#SendMessageResult" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#InvalidAddress" - }, - { - "target": "com.amazonaws.sqs#InvalidMessageContents" - }, - { - "target": "com.amazonaws.sqs#InvalidSecurity" - }, - { - "target": "com.amazonaws.sqs#KmsAccessDenied" - }, - { - "target": "com.amazonaws.sqs#KmsDisabled" - }, - { - "target": "com.amazonaws.sqs#KmsInvalidKeyUsage" - }, - { - "target": "com.amazonaws.sqs#KmsInvalidState" - }, - { - "target": "com.amazonaws.sqs#KmsNotFound" - }, - { - "target": "com.amazonaws.sqs#KmsOptInRequired" - }, - { - "target": "com.amazonaws.sqs#KmsThrottled" - }, - { - "target": "com.amazonaws.sqs#QueueDoesNotExist" - }, - { - "target": "com.amazonaws.sqs#RequestThrottled" - }, - { - "target": "com.amazonaws.sqs#UnsupportedOperation" - } - ], + }, + "MessageId": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

          Delivers a message to the specified queue.

          \n \n

          A message can include only XML, JSON, and unformatted text. The following Unicode\n characters are allowed:

          \n

          \n #x9 | #xA | #xD | #x20 to\n #xD7FF | #xE000 to #xFFFD |\n #x10000 to #x10FFFF\n

          \n

          Any characters not included in this list will be rejected. For more information,\n see the W3C specification for\n characters.

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

          An identifier for the message.

          ", + "smithy.api#required": {} } - }, - "com.amazonaws.sqs#SendMessageBatch": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#SendMessageBatchRequest" - }, - "output": { - "target": "com.amazonaws.sqs#SendMessageBatchResult" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#BatchEntryIdsNotDistinct" - }, - { - "target": "com.amazonaws.sqs#BatchRequestTooLong" - }, - { - "target": "com.amazonaws.sqs#EmptyBatchRequest" - }, - { - "target": "com.amazonaws.sqs#InvalidAddress" - }, - { - "target": "com.amazonaws.sqs#InvalidBatchEntryId" - }, - { - "target": "com.amazonaws.sqs#InvalidSecurity" - }, - { - "target": "com.amazonaws.sqs#KmsAccessDenied" - }, - { - "target": "com.amazonaws.sqs#KmsDisabled" - }, - { - "target": "com.amazonaws.sqs#KmsInvalidKeyUsage" - }, - { - "target": "com.amazonaws.sqs#KmsInvalidState" - }, - { - "target": "com.amazonaws.sqs#KmsNotFound" - }, - { - "target": "com.amazonaws.sqs#KmsOptInRequired" - }, - { - "target": "com.amazonaws.sqs#KmsThrottled" - }, - { - "target": "com.amazonaws.sqs#QueueDoesNotExist" - }, - { - "target": "com.amazonaws.sqs#RequestThrottled" - }, - { - "target": "com.amazonaws.sqs#TooManyEntriesInBatchRequest" - }, - { - "target": "com.amazonaws.sqs#UnsupportedOperation" - } - ], + }, + "MD5OfMessageBody": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

          You can use SendMessageBatch to send up to 10 messages to the specified\n queue by assigning either identical or different values to each message (or by not\n assigning values at all). This is a batch version of \n SendMessage. For a FIFO queue, multiple messages within a single batch are enqueued in\n the order they are sent.

          \n

          The result of sending each message is reported individually in the response. Because\n the batch request can result in a combination of successful and unsuccessful actions,\n you should check for batch errors even when the call returns an HTTP status code of\n 200.

          \n

          The maximum allowed individual message size and the maximum total payload size (the\n sum of the individual lengths of all of the batched messages) are both 256 KiB (262,144\n bytes).

          \n \n

          A message can include only XML, JSON, and unformatted text. The following Unicode\n characters are allowed:

          \n

          \n #x9 | #xA | #xD | #x20 to\n #xD7FF | #xE000 to #xFFFD |\n #x10000 to #x10FFFF\n

          \n

          Any characters not included in this list will be rejected. For more information,\n see the W3C specification for\n characters.

          \n
          \n

          If you don't specify the DelaySeconds parameter for an entry, Amazon SQS\n uses the default value for the queue.

          " + "smithy.api#documentation": "

          An MD5 digest of the non-URL-encoded message body string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see RFC1321.

          ", + "smithy.api#required": {} } - }, - "com.amazonaws.sqs#SendMessageBatchRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The URL of the Amazon SQS queue to which batched messages are sent.

          \n

          Queue URLs and names are case-sensitive.

          ", - "smithy.api#required": {} - } - }, - "Entries": { - "target": "com.amazonaws.sqs#SendMessageBatchRequestEntryList", - "traits": { - "smithy.api#documentation": "

          A list of \n SendMessageBatchRequestEntry\n items.

          ", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "SendMessageBatchRequestEntry" - } - } - }, + }, + "MD5OfMessageAttributes": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

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

          An MD5 digest of the non-URL-encoded message attribute string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see RFC1321.

          " } - }, - "com.amazonaws.sqs#SendMessageBatchRequestEntry": { - "type": "structure", - "members": { - "Id": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          An identifier for a message in this batch used to communicate the result.

          \n \n

          The Ids of a batch request need to be unique within a request.

          \n

          This identifier can have up to 80 characters. The following characters are\n accepted: alphanumeric characters, hyphens(-), and underscores (_).

          \n
          ", - "smithy.api#required": {} - } - }, - "MessageBody": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The body of the message.

          ", - "smithy.api#required": {} - } - }, - "DelaySeconds": { - "target": "com.amazonaws.sqs#NullableInteger", - "traits": { - "smithy.api#documentation": "

          The length of time, in seconds, for which a specific message is delayed. Valid values:\n 0 to 900. Maximum: 15 minutes. Messages with a positive DelaySeconds value\n become available for processing after the delay period is finished. If you don't specify\n a value, the default value for the queue is applied.

          \n \n

          When you set FifoQueue, you can't set DelaySeconds per\n message. You can set this parameter only on a queue level.

          \n
          " - } - }, - "MessageAttributes": { - "target": "com.amazonaws.sqs#MessageBodyAttributeMap", - "traits": { - "smithy.api#documentation": "

          Each message attribute consists of a Name, Type, and\n Value. For more information, see Amazon SQS message attributes in the Amazon SQS Developer\n Guide.

          ", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "MessageAttribute" - } - }, - "MessageSystemAttributes": { - "target": "com.amazonaws.sqs#MessageBodySystemAttributeMap", - "traits": { - "smithy.api#documentation": "

          The message system attribute to send Each message system attribute consists of a\n Name, Type, and Value.

          \n \n
            \n
          • \n

            Currently, the only supported message system attribute is\n AWSTraceHeader. Its type must be String and\n its value must be a correctly formatted X-Ray trace\n header string.

            \n
          • \n
          • \n

            The size of a message system attribute doesn't count towards the total\n size of a message.

            \n
          • \n
          \n
          ", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "MessageSystemAttribute" - } - }, - "MessageDeduplicationId": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          This parameter applies only to FIFO (first-in-first-out) queues.

          \n

          The token used for deduplication of messages within a 5-minute minimum deduplication\n interval. If a message with a particular MessageDeduplicationId is sent\n successfully, subsequent messages with the same MessageDeduplicationId are\n accepted successfully but aren't delivered. For more information, see Exactly-once processing in the Amazon SQS Developer\n Guide.

          \n
            \n
          • \n

            Every message must have a unique MessageDeduplicationId,

            \n
              \n
            • \n

              You may provide a MessageDeduplicationId\n explicitly.

              \n
            • \n
            • \n

              If you aren't able to provide a MessageDeduplicationId\n and you enable ContentBasedDeduplication for your queue,\n Amazon SQS uses a SHA-256 hash to generate the\n MessageDeduplicationId using the body of the message\n (but not the attributes of the message).

              \n
            • \n
            • \n

              If you don't provide a MessageDeduplicationId and the\n queue doesn't have ContentBasedDeduplication set, the\n action fails with an error.

              \n
            • \n
            • \n

              If the queue has ContentBasedDeduplication set, your\n MessageDeduplicationId overrides the generated\n one.

              \n
            • \n
            \n
          • \n
          • \n

            When ContentBasedDeduplication is in effect, messages with\n identical content sent within the deduplication interval are treated as\n duplicates and only one copy of the message is delivered.

            \n
          • \n
          • \n

            If you send one message with ContentBasedDeduplication enabled\n and then another message with a MessageDeduplicationId that is the\n same as the one generated for the first MessageDeduplicationId, the\n two messages are treated as duplicates and only one copy of the message is\n delivered.

            \n
          • \n
          \n \n

          The MessageDeduplicationId is available to the consumer of the\n message (this can be useful for troubleshooting delivery issues).

          \n

          If a message is sent successfully but the acknowledgement is lost and the message\n is resent with the same MessageDeduplicationId after the deduplication\n interval, Amazon SQS can't detect duplicate messages.

          \n

          Amazon SQS continues to keep track of the message deduplication ID even after the\n message is received and deleted.

          \n
          \n

          The length of MessageDeduplicationId is 128 characters.\n MessageDeduplicationId can contain alphanumeric characters\n (a-z, A-Z, 0-9) and punctuation\n (!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~).

          \n

          For best practices of using MessageDeduplicationId, see Using the MessageDeduplicationId Property in the Amazon SQS\n Developer Guide.

          " - } - }, - "MessageGroupId": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          This parameter applies only to FIFO (first-in-first-out) queues.

          \n

          The tag that specifies that a message belongs to a specific message group. Messages\n that belong to the same message group are processed in a FIFO manner (however, messages\n in different message groups might be processed out of order). To interleave multiple\n ordered streams within a single queue, use MessageGroupId values (for\n example, session data for multiple users). In this scenario, multiple consumers can\n process the queue, but the session data of each user is processed in a FIFO\n fashion.

          \n
            \n
          • \n

            You must associate a non-empty MessageGroupId with a message. If\n you don't provide a MessageGroupId, the action fails.

            \n
          • \n
          • \n

            \n ReceiveMessage might return messages with multiple\n MessageGroupId values. For each MessageGroupId,\n the messages are sorted by time sent. The caller can't specify a\n MessageGroupId.

            \n
          • \n
          \n

          The length of MessageGroupId is 128 characters. Valid values:\n alphanumeric characters and punctuation\n (!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~).

          \n

          For best practices of using MessageGroupId, see Using the MessageGroupId Property in the Amazon SQS Developer\n Guide.

          \n \n

          \n MessageGroupId is required for FIFO queues. You can't use it for\n Standard queues.

          \n
          " - } - } - }, + }, + "MD5OfMessageSystemAttributes": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

          Contains the details of a single Amazon SQS message along with an\n Id.

          " + "smithy.api#documentation": "

          An MD5 digest of the non-URL-encoded message system attribute string. You can use this \nattribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see RFC1321.

          " } - }, - "com.amazonaws.sqs#SendMessageBatchRequestEntryList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#SendMessageBatchRequestEntry" + }, + "SequenceNumber": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

          This parameter applies only to FIFO (first-in-first-out) queues.

          \n

          The large, non-consecutive number that Amazon SQS assigns to each message.

          \n

          The length of SequenceNumber is 128 bits. As SequenceNumber\n continues to increase for a particular MessageGroupId.

          " } + } }, - "com.amazonaws.sqs#SendMessageBatchResult": { - "type": "structure", - "members": { - "Successful": { - "target": "com.amazonaws.sqs#SendMessageBatchResultEntryList", - "traits": { - "smithy.api#documentation": "

          A list of \n SendMessageBatchResultEntry\n items.

          ", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "SendMessageBatchResultEntry" - } - }, - "Failed": { - "target": "com.amazonaws.sqs#BatchResultErrorEntryList", - "traits": { - "smithy.api#documentation": "

          A list of \n BatchResultErrorEntry\n items with error\n details about each message that can't be enqueued.

          ", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "BatchResultErrorEntry" - } - } - }, + "traits": { + "smithy.api#documentation": "

          Encloses a MessageId for a successfully-enqueued message in a \n SendMessageBatch.\n

          " + } + }, + "com.amazonaws.sqs#SendMessageBatchResultEntryList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#SendMessageBatchResultEntry" + } + }, + "com.amazonaws.sqs#SendMessageRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

          For each message in the batch, the response contains a \n SendMessageBatchResultEntry\n tag if the message succeeds or a\n \n BatchResultErrorEntry\n tag if the message\n fails.

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

          The URL of the Amazon SQS queue to which a message is sent.

          \n

          Queue URLs and names are case-sensitive.

          ", + "smithy.api#required": {} } - }, - "com.amazonaws.sqs#SendMessageBatchResultEntry": { - "type": "structure", - "members": { - "Id": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          An identifier for the message in this batch.

          ", - "smithy.api#required": {} - } - }, - "MessageId": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          An identifier for the message.

          ", - "smithy.api#required": {} - } - }, - "MD5OfMessageBody": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          An MD5 digest of the non-URL-encoded message body string. You can use this attribute\n to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the\n message before creating the MD5 digest. For information about MD5, see RFC1321.

          ", - "smithy.api#required": {} - } - }, - "MD5OfMessageAttributes": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          An MD5 digest of the non-URL-encoded message attribute string. You can use this\n attribute to verify that Amazon SQS received the message correctly. Amazon SQS\n URL-decodes the message before creating the MD5 digest. For information about MD5, see\n RFC1321.

          " - } - }, - "MD5OfMessageSystemAttributes": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          An MD5 digest of the non-URL-encoded message system attribute string. You can use this\n attribute to verify that Amazon SQS received the message correctly. Amazon SQS\n URL-decodes the message before creating the MD5 digest. For information about MD5, see\n RFC1321.

          " - } - }, - "SequenceNumber": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          This parameter applies only to FIFO (first-in-first-out) queues.

          \n

          The large, non-consecutive number that Amazon SQS assigns to each message.

          \n

          The length of SequenceNumber is 128 bits. As SequenceNumber\n continues to increase for a particular MessageGroupId.

          " - } - } - }, + }, + "MessageBody": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

          Encloses a MessageId for a successfully-enqueued message in a \n SendMessageBatch.\n

          " + "smithy.api#documentation": "

          The message to send. The minimum size is one character. The maximum size is 256\n KiB.

          \n \n

          A message can include only XML, JSON, and unformatted text. The following Unicode characters are allowed:

          \n

          \n #x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF\n

          \n

          Any characters not included in this list will be rejected. For more information, see the W3C specification for characters.

          \n
          ", + "smithy.api#required": {} } - }, - "com.amazonaws.sqs#SendMessageBatchResultEntryList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#SendMessageBatchResultEntry" + }, + "DelaySeconds": { + "target": "com.amazonaws.sqs#Integer", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

          The length of time, in seconds, for which to delay a specific message. Valid values:\n 0 to 900. Maximum: 15 minutes. Messages with a positive DelaySeconds value\n become available for processing after the delay period is finished. If you don't specify\n a value, the default value for the queue applies.

          \n \n

          When you set FifoQueue, you can't set DelaySeconds per message. You can set this parameter only on a queue level.

          \n
          " } - }, - "com.amazonaws.sqs#SendMessageRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The URL of the Amazon SQS queue to which a message is sent.

          \n

          Queue URLs and names are case-sensitive.

          ", - "smithy.api#required": {} - } - }, - "MessageBody": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The message to send. The minimum size is one character. The maximum size is 256\n KiB.

          \n \n

          A message can include only XML, JSON, and unformatted text. The following Unicode\n characters are allowed:

          \n

          \n #x9 | #xA | #xD | #x20 to\n #xD7FF | #xE000 to #xFFFD |\n #x10000 to #x10FFFF\n

          \n

          Any characters not included in this list will be rejected. For more information,\n see the W3C specification for\n characters.

          \n
          ", - "smithy.api#required": {} - } - }, - "DelaySeconds": { - "target": "com.amazonaws.sqs#NullableInteger", - "traits": { - "smithy.api#documentation": "

          The length of time, in seconds, for which to delay a specific message. Valid values:\n 0 to 900. Maximum: 15 minutes. Messages with a positive DelaySeconds value\n become available for processing after the delay period is finished. If you don't specify\n a value, the default value for the queue applies.

          \n \n

          When you set FifoQueue, you can't set DelaySeconds per\n message. You can set this parameter only on a queue level.

          \n
          " - } - }, - "MessageAttributes": { - "target": "com.amazonaws.sqs#MessageBodyAttributeMap", - "traits": { - "smithy.api#documentation": "

          Each message attribute consists of a Name, Type, and\n Value. For more information, see Amazon SQS message attributes in the Amazon SQS Developer\n Guide.

          ", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "MessageAttribute" - } - }, - "MessageSystemAttributes": { - "target": "com.amazonaws.sqs#MessageBodySystemAttributeMap", - "traits": { - "smithy.api#documentation": "

          The message system attribute to send. Each message system attribute consists of a\n Name, Type, and Value.

          \n \n
            \n
          • \n

            Currently, the only supported message system attribute is\n AWSTraceHeader. Its type must be String and\n its value must be a correctly formatted X-Ray trace\n header string.

            \n
          • \n
          • \n

            The size of a message system attribute doesn't count towards the total\n size of a message.

            \n
          • \n
          \n
          ", - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "MessageSystemAttribute" - } - }, - "MessageDeduplicationId": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          This parameter applies only to FIFO (first-in-first-out) queues.

          \n

          The token used for deduplication of sent messages. If a message with a particular\n MessageDeduplicationId is sent successfully, any messages sent with the\n same MessageDeduplicationId are accepted successfully but aren't delivered\n during the 5-minute deduplication interval. For more information, see Exactly-once processing in the Amazon SQS Developer\n Guide.

          \n
            \n
          • \n

            Every message must have a unique MessageDeduplicationId,

            \n
              \n
            • \n

              You may provide a MessageDeduplicationId\n explicitly.

              \n
            • \n
            • \n

              If you aren't able to provide a MessageDeduplicationId\n and you enable ContentBasedDeduplication for your queue,\n Amazon SQS uses a SHA-256 hash to generate the\n MessageDeduplicationId using the body of the message\n (but not the attributes of the message).

              \n
            • \n
            • \n

              If you don't provide a MessageDeduplicationId and the\n queue doesn't have ContentBasedDeduplication set, the\n action fails with an error.

              \n
            • \n
            • \n

              If the queue has ContentBasedDeduplication set, your\n MessageDeduplicationId overrides the generated\n one.

              \n
            • \n
            \n
          • \n
          • \n

            When ContentBasedDeduplication is in effect, messages with\n identical content sent within the deduplication interval are treated as\n duplicates and only one copy of the message is delivered.

            \n
          • \n
          • \n

            If you send one message with ContentBasedDeduplication enabled\n and then another message with a MessageDeduplicationId that is the\n same as the one generated for the first MessageDeduplicationId, the\n two messages are treated as duplicates and only one copy of the message is\n delivered.

            \n
          • \n
          \n \n

          The MessageDeduplicationId is available to the consumer of the\n message (this can be useful for troubleshooting delivery issues).

          \n

          If a message is sent successfully but the acknowledgement is lost and the message\n is resent with the same MessageDeduplicationId after the deduplication\n interval, Amazon SQS can't detect duplicate messages.

          \n

          Amazon SQS continues to keep track of the message deduplication ID even after the\n message is received and deleted.

          \n
          \n

          The maximum length of MessageDeduplicationId is 128 characters.\n MessageDeduplicationId can contain alphanumeric characters\n (a-z, A-Z, 0-9) and punctuation\n (!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~).

          \n

          For best practices of using MessageDeduplicationId, see Using the MessageDeduplicationId Property in the Amazon SQS\n Developer Guide.

          " - } - }, - "MessageGroupId": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          This parameter applies only to FIFO (first-in-first-out) queues.

          \n

          The tag that specifies that a message belongs to a specific message group. Messages\n that belong to the same message group are processed in a FIFO manner (however, messages\n in different message groups might be processed out of order). To interleave multiple\n ordered streams within a single queue, use MessageGroupId values (for\n example, session data for multiple users). In this scenario, multiple consumers can\n process the queue, but the session data of each user is processed in a FIFO\n fashion.

          \n
            \n
          • \n

            You must associate a non-empty MessageGroupId with a message. If\n you don't provide a MessageGroupId, the action fails.

            \n
          • \n
          • \n

            \n ReceiveMessage might return messages with multiple\n MessageGroupId values. For each MessageGroupId,\n the messages are sorted by time sent. The caller can't specify a\n MessageGroupId.

            \n
          • \n
          \n

          The length of MessageGroupId is 128 characters. Valid values:\n alphanumeric characters and punctuation\n (!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~).

          \n

          For best practices of using MessageGroupId, see Using the MessageGroupId Property in the Amazon SQS Developer\n Guide.

          \n \n

          \n MessageGroupId is required for FIFO queues. You can't use it for\n Standard queues.

          \n
          " - } - } - }, + }, + "MessageAttributes": { + "target": "com.amazonaws.sqs#MessageBodyAttributeMap", "traits": { - "smithy.api#documentation": "

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

          Each message attribute consists of a Name, Type, \nand Value. For more information, see \nAmazon SQS \nmessage attributes in the Amazon SQS Developer Guide.

          ", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "MessageAttribute" } - }, - "com.amazonaws.sqs#SendMessageResult": { - "type": "structure", - "members": { - "MD5OfMessageBody": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          An MD5 digest of the non-URL-encoded message body string. You can use this attribute\n to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the\n message before creating the MD5 digest. For information about MD5, see RFC1321.

          " - } - }, - "MD5OfMessageAttributes": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          An MD5 digest of the non-URL-encoded message attribute string. You can use this\n attribute to verify that Amazon SQS received the message correctly. Amazon SQS\n URL-decodes the message before creating the MD5 digest. For information about MD5, see\n RFC1321.

          " - } - }, - "MD5OfMessageSystemAttributes": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          An MD5 digest of the non-URL-encoded message system attribute string. You can use this\n attribute to verify that Amazon SQS received the message correctly. Amazon SQS\n URL-decodes the message before creating the MD5 digest.

          " - } - }, - "MessageId": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          An attribute containing the MessageId of the message sent to the queue.\n For more information, see Queue and Message Identifiers in the Amazon SQS Developer\n Guide.

          " - } - }, - "SequenceNumber": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          This parameter applies only to FIFO (first-in-first-out) queues.

          \n

          The large, non-consecutive number that Amazon SQS assigns to each message.

          \n

          The length of SequenceNumber is 128 bits. SequenceNumber\n continues to increase for a particular MessageGroupId.

          " - } - } - }, + }, + "MessageSystemAttributes": { + "target": "com.amazonaws.sqs#MessageBodySystemAttributeMap", "traits": { - "smithy.api#documentation": "

          The MD5OfMessageBody and MessageId elements.

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

          The message system attribute to send. Each message system attribute consists of a Name, Type, and Value.

          \n \n
            \n
          • \n

            Currently, the only supported message system attribute is AWSTraceHeader.\n Its type must be String and its value must be a correctly formatted\n X-Ray trace header string.

            \n
          • \n
          • \n

            The size of a message system attribute doesn't count towards the total size of a message.

            \n
          • \n
          \n
          ", + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "MessageSystemAttribute" } - }, - "com.amazonaws.sqs#SetQueueAttributes": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#SetQueueAttributesRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#InvalidAddress" - }, - { - "target": "com.amazonaws.sqs#InvalidAttributeName" - }, - { - "target": "com.amazonaws.sqs#InvalidAttributeValue" - }, - { - "target": "com.amazonaws.sqs#InvalidSecurity" - }, - { - "target": "com.amazonaws.sqs#OverLimit" - }, - { - "target": "com.amazonaws.sqs#QueueDoesNotExist" - }, - { - "target": "com.amazonaws.sqs#RequestThrottled" - }, - { - "target": "com.amazonaws.sqs#UnsupportedOperation" - } - ], + }, + "MessageDeduplicationId": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

          Sets the value of one or more queue attributes. When you change a queue's attributes,\n the change can take up to 60 seconds for most of the attributes to propagate throughout\n the Amazon SQS system. Changes made to the MessageRetentionPeriod attribute\n can take up to 15 minutes and will impact existing messages in the queue potentially\n causing them to be expired and deleted if the MessageRetentionPeriod is\n reduced below the age of existing messages.

          \n \n
            \n
          • \n

            In the future, new attributes might be added. If you write code that calls\n this action, we recommend that you structure your code so that it can handle\n new attributes gracefully.

            \n
          • \n
          • \n

            Cross-account permissions don't apply to this action. For more\n information, see Grant cross-account permissions to a role and a username in the\n Amazon SQS Developer Guide.

            \n
          • \n
          • \n

            To remove the ability to change queue permissions, you must deny\n permission to the AddPermission, RemovePermission,\n and SetQueueAttributes actions in your IAM policy.

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

          This parameter applies only to FIFO (first-in-first-out) queues.

          \n

          The token used for deduplication of sent messages. If a message with a particular\n MessageDeduplicationId is sent successfully, any messages sent with the\n same MessageDeduplicationId are accepted successfully but aren't delivered\n during the 5-minute deduplication interval. For more information, see Exactly-once processing in the Amazon SQS Developer\n Guide.

          \n
            \n
          • \n

            Every message must have a unique MessageDeduplicationId,

            \n
              \n
            • \n

              You may provide a MessageDeduplicationId\n explicitly.

              \n
            • \n
            • \n

              If you aren't able to provide a MessageDeduplicationId\n and you enable ContentBasedDeduplication for your queue,\n Amazon SQS uses a SHA-256 hash to generate the\n MessageDeduplicationId using the body of the message\n (but not the attributes of the message).

              \n
            • \n
            • \n

              If you don't provide a MessageDeduplicationId and the\n queue doesn't have ContentBasedDeduplication set, the\n action fails with an error.

              \n
            • \n
            • \n

              If the queue has ContentBasedDeduplication set, your\n MessageDeduplicationId overrides the generated\n one.

              \n
            • \n
            \n
          • \n
          • \n

            When ContentBasedDeduplication is in effect, messages with\n identical content sent within the deduplication interval are treated as\n duplicates and only one copy of the message is delivered.

            \n
          • \n
          • \n

            If you send one message with ContentBasedDeduplication enabled\n and then another message with a MessageDeduplicationId that is the\n same as the one generated for the first MessageDeduplicationId, the\n two messages are treated as duplicates and only one copy of the message is\n delivered.

            \n
          • \n
          \n \n

          The MessageDeduplicationId is available to the consumer of the\n message (this can be useful for troubleshooting delivery issues).

          \n

          If a message is sent successfully but the acknowledgement is lost and the message\n is resent with the same MessageDeduplicationId after the deduplication\n interval, Amazon SQS can't detect duplicate messages.

          \n

          Amazon SQS continues to keep track of the message deduplication ID even after the message is received and deleted.

          \n
          \n

          The maximum length of MessageDeduplicationId is 128 characters.\n MessageDeduplicationId can contain alphanumeric characters\n (a-z, A-Z, 0-9) and punctuation\n (!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~).

          \n

          For best practices of using MessageDeduplicationId, see Using the MessageDeduplicationId Property in the Amazon SQS Developer\n Guide.

          " } - }, - "com.amazonaws.sqs#SetQueueAttributesRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The URL of the Amazon SQS queue whose attributes are set.

          \n

          Queue URLs and names are case-sensitive.

          ", - "smithy.api#required": {} - } - }, - "Attributes": { - "target": "com.amazonaws.sqs#QueueAttributeMap", - "traits": { - "smithy.api#documentation": "

          A map of attributes to set.

          \n

          The following lists the names, descriptions, and values of the special request\n parameters that the SetQueueAttributes action uses:

          \n
            \n
          • \n

            \n DelaySeconds – The length of time, in seconds, for which the\n delivery of all messages in the queue is delayed. Valid values: An integer from\n 0 to 900 (15 minutes). Default: 0.

            \n
          • \n
          • \n

            \n MaximumMessageSize – The limit of how many bytes a message can\n contain before Amazon SQS rejects it. Valid values: An integer from 1,024 bytes\n (1 KiB) up to 262,144 bytes (256 KiB). Default: 262,144 (256 KiB).

            \n
          • \n
          • \n

            \n MessageRetentionPeriod – The length of time, in seconds, for which\n Amazon SQS retains a message. Valid values: An integer representing seconds,\n from 60 (1 minute) to 1,209,600 (14 days). Default: 345,600 (4 days). When you\n change a queue's attributes, the change can take up to 60 seconds for most of\n the attributes to propagate throughout the Amazon SQS system. Changes made to\n the MessageRetentionPeriod attribute can take up to 15 minutes and\n will impact existing messages in the queue potentially causing them to be\n expired and deleted if the MessageRetentionPeriod is reduced below\n the age of existing messages.

            \n
          • \n
          • \n

            \n Policy – The queue's policy. A valid Amazon Web Services\n policy. For more information about policy structure, see Overview of Amazon Web Services IAM Policies in the\n Identity and Access Management User Guide.\n

            \n
          • \n
          • \n

            \n ReceiveMessageWaitTimeSeconds – The length of time, in seconds, for\n which a \n ReceiveMessage\n action waits for a message\n to arrive. Valid values: An integer from 0 to 20 (seconds). Default: 0.

            \n
          • \n
          • \n

            \n VisibilityTimeout – The visibility timeout for the queue, in\n seconds. Valid values: An integer from 0 to 43,200 (12 hours). Default: 30. For\n more information about the visibility timeout, see Visibility Timeout in the Amazon SQS Developer\n Guide.

            \n
          • \n
          \n

          The following attributes apply only to dead-letter queues:\n

          \n
            \n
          • \n

            \n RedrivePolicy – The string that includes the parameters for the\n dead-letter queue functionality of the source queue as a JSON object. The\n parameters are as follows:

            \n
              \n
            • \n

              \n deadLetterTargetArn – The Amazon Resource Name (ARN) of\n the dead-letter queue to which Amazon SQS moves messages after the value\n of maxReceiveCount is exceeded.

              \n
            • \n
            • \n

              \n maxReceiveCount – The number of times a message is\n delivered to the source queue before being moved to the dead-letter\n queue. Default: 10. When the ReceiveCount for a message\n exceeds the maxReceiveCount for a queue, Amazon SQS moves\n the message to the dead-letter-queue.

              \n
            • \n
            \n
          • \n
          • \n

            \n RedriveAllowPolicy – The string that includes the parameters for\n the permissions for the dead-letter queue redrive permission and which source\n queues can specify dead-letter queues as a JSON object. The parameters are as\n follows:

            \n
              \n
            • \n

              \n redrivePermission – The permission type that defines\n which source queues can specify the current queue as the dead-letter\n queue. Valid values are:

              \n
                \n
              • \n

                \n allowAll – (Default) Any source queues in this\n Amazon Web Services account in the same\n Region can specify this queue as the dead-letter queue.

                \n
              • \n
              • \n

                \n denyAll – No source queues can specify this queue\n as the dead-letter queue.

                \n
              • \n
              • \n

                \n byQueue – Only queues specified by the\n sourceQueueArns parameter can specify this\n queue as the dead-letter queue.

                \n
              • \n
              \n
            • \n
            • \n

              \n sourceQueueArns – The Amazon Resource Names (ARN)s of the\n source queues that can specify this queue as the dead-letter queue and\n redrive messages. You can specify this parameter only when the\n redrivePermission parameter is set to\n byQueue. You can specify up to 10 source queue ARNs. To\n allow more than 10 source queues to specify dead-letter queues, set the\n redrivePermission parameter to\n allowAll.

              \n
            • \n
            \n
          • \n
          \n \n

          The dead-letter queue of a FIFO queue must also be a FIFO queue. Similarly, the\n dead-letter queue of a standard queue must also be a standard queue.

          \n
          \n

          The following attributes apply only to server-side-encryption:

          \n
            \n
          • \n

            \n KmsMasterKeyId – The ID of an Amazon Web Services managed customer\n master key (CMK) for Amazon SQS or a custom CMK. For more information, see\n Key Terms. While the alias of the AWS-managed CMK for Amazon SQS is\n always alias/aws/sqs, the alias of a custom CMK can, for example,\n be alias/MyAlias\n . For more examples, see\n KeyId in the Key Management Service API\n Reference.

            \n
          • \n
          • \n

            \n KmsDataKeyReusePeriodSeconds – The length of time, in seconds, for\n which Amazon SQS can reuse a data key to\n encrypt or decrypt messages before calling KMS again. An integer representing\n seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). Default:\n 300 (5 minutes). A shorter time period provides better security but results in\n more calls to KMS which might incur charges after Free Tier. For more\n information, see How Does the Data Key Reuse Period Work?.

            \n
          • \n
          • \n

            \n SqsManagedSseEnabled – Enables server-side queue encryption using\n SQS owned encryption keys. Only one server-side encryption option is supported\n per queue (for example, SSE-KMS or SSE-SQS).

            \n
          • \n
          \n

          The following attribute applies only to FIFO\n (first-in-first-out) queues:

          \n
            \n
          • \n

            \n ContentBasedDeduplication – Enables content-based deduplication.\n For more information, see Exactly-once processing in the Amazon SQS Developer\n Guide. Note the following:

            \n
              \n
            • \n

              Every message must have a unique\n MessageDeduplicationId.

              \n
                \n
              • \n

                You may provide a MessageDeduplicationId\n explicitly.

                \n
              • \n
              • \n

                If you aren't able to provide a\n MessageDeduplicationId and you enable\n ContentBasedDeduplication for your queue,\n Amazon SQS uses a SHA-256 hash to generate the\n MessageDeduplicationId using the body of the\n message (but not the attributes of the message).

                \n
              • \n
              • \n

                If you don't provide a MessageDeduplicationId and\n the queue doesn't have ContentBasedDeduplication\n set, the action fails with an error.

                \n
              • \n
              • \n

                If the queue has ContentBasedDeduplication set,\n your MessageDeduplicationId overrides the generated\n one.

                \n
              • \n
              \n
            • \n
            • \n

              When ContentBasedDeduplication is in effect, messages\n with identical content sent within the deduplication interval are\n treated as duplicates and only one copy of the message is\n delivered.

              \n
            • \n
            • \n

              If you send one message with ContentBasedDeduplication\n enabled and then another message with a\n MessageDeduplicationId that is the same as the one\n generated for the first MessageDeduplicationId, the two\n messages are treated as duplicates and only one copy of the message is\n delivered.

              \n
            • \n
            \n
          • \n
          \n

          The following attributes apply only to high\n throughput for FIFO queues:

          \n
            \n
          • \n

            \n DeduplicationScope – Specifies whether message deduplication\n occurs at the message group or queue level. Valid values are\n messageGroup and queue.

            \n
          • \n
          • \n

            \n FifoThroughputLimit – Specifies whether the FIFO queue throughput\n quota applies to the entire queue or per message group. Valid values are\n perQueue and perMessageGroupId. The\n perMessageGroupId value is allowed only when the value for\n DeduplicationScope is messageGroup.

            \n
          • \n
          \n

          To enable high throughput for FIFO queues, do the following:

          \n
            \n
          • \n

            Set DeduplicationScope to messageGroup.

            \n
          • \n
          • \n

            Set FifoThroughputLimit to perMessageGroupId.

            \n
          • \n
          \n

          If you set these attributes to anything other than the values shown for enabling high\n throughput, normal throughput is in effect and deduplication occurs as specified.

          \n

          For information on throughput quotas, see Quotas\n related to messages in the Amazon SQS Developer\n Guide.

          ", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Attribute" - } - } - }, + }, + "MessageGroupId": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

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

          This parameter applies only to FIFO (first-in-first-out) queues.

          \n

          The tag that specifies that a message belongs to a specific message group. Messages\n that belong to the same message group are processed in a FIFO manner (however,\n messages in different message groups might be processed out of order). To interleave\n multiple ordered streams within a single queue, use MessageGroupId values\n (for example, session data for multiple users). In this scenario, multiple consumers can\n process the queue, but the session data of each user is processed in a FIFO\n fashion.

          \n
            \n
          • \n

            You must associate a non-empty MessageGroupId with a message. If\n you don't provide a MessageGroupId, the action fails.

            \n
          • \n
          • \n

            \n ReceiveMessage might return messages with multiple\n MessageGroupId values. For each MessageGroupId,\n the messages are sorted by time sent. The caller can't specify a\n MessageGroupId.

            \n
          • \n
          \n

          The length of MessageGroupId is 128 characters. Valid values:\n alphanumeric characters and punctuation\n (!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~).

          \n

          For best practices of using MessageGroupId, see Using the MessageGroupId Property in the Amazon SQS Developer\n Guide.

          \n \n

          \n MessageGroupId is required for FIFO queues. You can't use it for\n Standard queues.

          \n
          " } + } }, - "com.amazonaws.sqs#StartMessageMoveTask": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#StartMessageMoveTaskRequest" - }, - "output": { - "target": "com.amazonaws.sqs#StartMessageMoveTaskResult" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#InvalidAddress" - }, - { - "target": "com.amazonaws.sqs#InvalidSecurity" - }, - { - "target": "com.amazonaws.sqs#RequestThrottled" - }, - { - "target": "com.amazonaws.sqs#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.sqs#UnsupportedOperation" - } - ], + "traits": { + "smithy.api#documentation": "

          ", + "smithy.api#input": {} + } + }, + "com.amazonaws.sqs#SendMessageResult": { + "type": "structure", + "members": { + "MD5OfMessageBody": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

          Starts an asynchronous task to move messages from a specified source queue to a\n specified destination queue.

          \n \n
            \n
          • \n

            This action is currently limited to supporting message redrive from queues\n that are configured as dead-letter queues (DLQs) of other Amazon SQS queues only. Non-SQS\n queue sources of dead-letter queues, such as Lambda or Amazon SNS topics, are\n currently not supported.

            \n
          • \n
          • \n

            In dead-letter queues redrive context, the\n StartMessageMoveTask the source queue is the DLQ, while the\n destination queue can be the original source queue (from which the messages\n were driven to the dead-letter-queue), or a custom destination queue.

            \n
          • \n
          • \n

            Currently, only standard queues support redrive. FIFO queues don't support\n redrive.

            \n
          • \n
          • \n

            Only one active message movement task is supported per queue at any given\n time.

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

          An MD5 digest of the non-URL-encoded message body string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see RFC1321.

          " } - }, - "com.amazonaws.sqs#StartMessageMoveTaskRequest": { - "type": "structure", - "members": { - "SourceArn": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The ARN of the queue that contains the messages to be moved to another queue.\n Currently, only ARNs of dead-letter queues (DLQs) whose sources are other Amazon SQS queues\n are accepted. DLQs whose sources are non-SQS queues, such as Lambda or Amazon SNS topics, are\n not currently supported.

          ", - "smithy.api#required": {} - } - }, - "DestinationArn": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The ARN of the queue that receives the moved messages. You can use this field to\n specify the destination queue where you would like to redrive messages. If this field is\n left blank, the messages will be redriven back to their respective original source\n queues.

          " - } - }, - "MaxNumberOfMessagesPerSecond": { - "target": "com.amazonaws.sqs#NullableInteger", - "traits": { - "smithy.api#documentation": "

          The number of messages to be moved per second (the message movement rate). You can use\n this field to define a fixed message movement rate. The maximum value for messages per\n second is 500. If this field is left blank, the system will optimize the rate based on\n the queue message backlog size, which may vary throughout the duration of the message\n movement task.

          " - } - } - }, + }, + "MD5OfMessageAttributes": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#input": {} + "smithy.api#documentation": "

          An MD5 digest of the non-URL-encoded message attribute string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see RFC1321.

          " } - }, - "com.amazonaws.sqs#StartMessageMoveTaskResult": { - "type": "structure", - "members": { - "TaskHandle": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          An identifier associated with a message movement task. You can use this identifier to\n cancel a specified message movement task using the CancelMessageMoveTask\n action.

          " - } - } - }, + }, + "MD5OfMessageSystemAttributes": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#output": {} + "smithy.api#documentation": "

          An MD5 digest of the non-URL-encoded message system attribute string. You can use this \nattribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest.

          " } - }, - "com.amazonaws.sqs#String": { - "type": "string" - }, - "com.amazonaws.sqs#StringList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#xmlName": "StringListValue" - } + }, + "MessageId": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

          An attribute containing the MessageId of the message sent to the queue.\n For more information, see Queue and Message Identifiers in the Amazon SQS Developer\n Guide.

          " } - }, - "com.amazonaws.sqs#TagKey": { - "type": "string" - }, - "com.amazonaws.sqs#TagKeyList": { - "type": "list", - "member": { - "target": "com.amazonaws.sqs#TagKey" + }, + "SequenceNumber": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

          This parameter applies only to FIFO (first-in-first-out) queues.

          \n

          The large, non-consecutive number that Amazon SQS assigns to each message.

          \n

          The length of SequenceNumber is 128 bits. SequenceNumber\n continues to increase for a particular MessageGroupId.

          " } + } }, - "com.amazonaws.sqs#TagMap": { - "type": "map", - "key": { - "target": "com.amazonaws.sqs#TagKey", - "traits": { - "smithy.api#xmlName": "Key" - } - }, - "value": { - "target": "com.amazonaws.sqs#TagValue", - "traits": { - "smithy.api#xmlName": "Value" - } + "traits": { + "smithy.api#documentation": "

          The MD5OfMessageBody and MessageId elements.

          ", + "smithy.api#output": {} + } + }, + "com.amazonaws.sqs#SetQueueAttributes": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#SetQueueAttributesRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#InvalidAttributeName" + } + ], + "traits": { + "smithy.api#documentation": "

          Sets the value of one or more queue attributes. When you change a queue's attributes,\n the change can take up to 60 seconds for most of the attributes to propagate throughout\n the Amazon SQS system. Changes made to the MessageRetentionPeriod attribute can\n take up to 15 minutes and will impact existing messages in the queue potentially causing\n them to be expired and deleted if the MessageRetentionPeriod is reduced\n below the age of existing messages.

          \n \n
            \n
          • \n

            In the future, new attributes might be added. If you write code that calls this action, we recommend that you structure your code so that it can handle new attributes gracefully.

            \n
          • \n
          • \n

            Cross-account permissions don't apply to this action. For more information, \nsee Grant \ncross-account permissions to a role and a username in the Amazon SQS Developer Guide.

            \n
          • \n
          • \n

            To remove the ability to change queue permissions, you must deny permission to the AddPermission, RemovePermission, and SetQueueAttributes actions in your IAM policy.

            \n
          • \n
          \n
          " + } + }, + "com.amazonaws.sqs#SetQueueAttributesRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

          The URL of the Amazon SQS queue whose attributes are set.

          \n

          Queue URLs and names are case-sensitive.

          ", + "smithy.api#required": {} + } + }, + "Attributes": { + "target": "com.amazonaws.sqs#QueueAttributeMap", + "traits": { + "smithy.api#documentation": "

          A map of attributes to set.

          \n

          The following lists the names, descriptions, and values of the special request\n parameters that the SetQueueAttributes action uses:

          \n
            \n
          • \n

            \n DelaySeconds – The length of time, in seconds, for which the\n delivery of all messages in the queue is delayed. Valid values: An integer from\n 0 to 900 (15 minutes). Default: 0.

            \n
          • \n
          • \n

            \n MaximumMessageSize – The limit of how many bytes a message\n can contain before Amazon SQS rejects it. Valid values: An integer from 1,024 bytes\n (1 KiB) up to 262,144 bytes (256 KiB). Default: 262,144 (256 KiB).

            \n
          • \n
          • \n

            \n MessageRetentionPeriod – The length of time, in seconds, for\n which Amazon SQS retains a message. Valid values: An integer representing seconds,\n from 60 (1 minute) to 1,209,600 (14 days). Default: 345,600 (4 days). When you\n change a queue's attributes, the change can take up to 60 seconds for most of\n the attributes to propagate throughout the Amazon SQS system. Changes made to the\n MessageRetentionPeriod attribute can take up to 15 minutes and\n will impact existing messages in the queue potentially causing them to be\n expired and deleted if the MessageRetentionPeriod is reduced below\n the age of existing messages.

            \n
          • \n
          • \n

            \n Policy – The queue's policy. A valid Amazon Web Services policy. For more\n information about policy structure, see Overview of Amazon Web Services IAM\n Policies in the Identity and Access Management User\n Guide.

            \n
          • \n
          • \n

            \n ReceiveMessageWaitTimeSeconds – The length of time, in\n seconds, for which a \n ReceiveMessage\n action waits\n for a message to arrive. Valid values: An integer from 0 to 20 (seconds).\n Default: 0.

            \n
          • \n
          • \n

            \n VisibilityTimeout – The visibility timeout for the queue, in\n seconds. Valid values: An integer from 0 to 43,200 (12 hours). Default: 30. For\n more information about the visibility timeout, see Visibility Timeout in the Amazon SQS Developer\n Guide.

            \n
          • \n
          \n

          The following attributes apply only to dead-letter queues:\n

          \n
            \n
          • \n

            \n RedrivePolicy – The string that includes the parameters for the dead-letter queue functionality \n of the source queue as a JSON object. The parameters are as follows:

            \n
              \n
            • \n

              \n deadLetterTargetArn – The Amazon Resource Name (ARN) of the dead-letter queue to \n which Amazon SQS moves messages after the value of maxReceiveCount is exceeded.

              \n
            • \n
            • \n

              \n maxReceiveCount – The number of times a message is delivered to the source queue before being \n moved to the dead-letter queue. Default: 10. When the ReceiveCount for a message exceeds the maxReceiveCount \n for a queue, Amazon SQS moves the message to the dead-letter-queue.

              \n
            • \n
            \n
          • \n
          • \n

            \n RedriveAllowPolicy – The string that includes the parameters for the permissions for the dead-letter\n queue redrive permission and which source queues can specify dead-letter queues as a JSON object. The parameters are as follows:

            \n
              \n
            • \n

              \n redrivePermission – The permission type that defines which source queues can \n specify the current queue as the dead-letter queue. Valid values are:

              \n
                \n
              • \n

                \n allowAll – (Default) Any source queues in this Amazon Web Services account in the same Region can \n specify this queue as the dead-letter queue.

                \n
              • \n
              • \n

                \n denyAll – No source queues can specify this queue as the dead-letter\n queue.

                \n
              • \n
              • \n

                \n byQueue – Only queues specified by the sourceQueueArns parameter can specify \n this queue as the dead-letter queue.

                \n
              • \n
              \n
            • \n
            • \n

              \n sourceQueueArns – The Amazon Resource Names (ARN)s of the source queues that can specify \n this queue as the dead-letter queue and redrive messages. You can specify this parameter only when the \n redrivePermission parameter is set to byQueue. You can specify up to 10 source queue ARNs. \n To allow more than 10 source queues to specify dead-letter queues, set the redrivePermission parameter\n to allowAll.

              \n
            • \n
            \n
          • \n
          \n \n

          The dead-letter queue of a \n FIFO queue must also be a FIFO queue. Similarly, the dead-letter \n queue of a standard queue must also be a standard queue.

          \n
          \n

          The following attributes apply only to server-side-encryption:

          \n
            \n
          • \n

            \n KmsMasterKeyId – The ID of an Amazon Web Services managed customer master\n key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms. While the alias of the AWS-managed CMK for Amazon SQS is\n always alias/aws/sqs, the alias of a custom CMK can, for example,\n be alias/MyAlias\n . For more examples, see\n KeyId in the Key Management Service API\n Reference.

            \n
          • \n
          • \n

            \n KmsDataKeyReusePeriodSeconds – The length of time, in\n seconds, for which Amazon SQS can reuse a data key to\n encrypt or decrypt messages before calling KMS again. An integer\n representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24\n hours). Default: 300 (5 minutes). A shorter time period provides better security\n but results in more calls to KMS which might incur charges after Free Tier. For\n more information, see How Does the Data Key Reuse Period Work?.

            \n
          • \n
          • \n

            \n SqsManagedSseEnabled – Enables server-side queue encryption\n using SQS owned encryption keys. Only one server-side encryption option is\n supported per queue (for example, SSE-KMS or SSE-SQS).

            \n
          • \n
          \n

          The following attribute applies only to FIFO (first-in-first-out)\n queues:

          \n
            \n
          • \n

            \n ContentBasedDeduplication – Enables content-based\n deduplication. For more information, see Exactly-once processing in the Amazon SQS Developer\n Guide. Note the following:

            \n
              \n
            • \n

              Every message must have a unique\n MessageDeduplicationId.

              \n
                \n
              • \n

                You may provide a MessageDeduplicationId\n explicitly.

                \n
              • \n
              • \n

                If you aren't able to provide a\n MessageDeduplicationId and you enable\n ContentBasedDeduplication for your queue, Amazon SQS\n uses a SHA-256 hash to generate the\n MessageDeduplicationId using the body of the\n message (but not the attributes of the message).

                \n
              • \n
              • \n

                If you don't provide a MessageDeduplicationId and\n the queue doesn't have ContentBasedDeduplication\n set, the action fails with an error.

                \n
              • \n
              • \n

                If the queue has ContentBasedDeduplication set,\n your MessageDeduplicationId overrides the generated\n one.

                \n
              • \n
              \n
            • \n
            • \n

              When ContentBasedDeduplication is in effect, messages\n with identical content sent within the deduplication interval are\n treated as duplicates and only one copy of the message is\n delivered.

              \n
            • \n
            • \n

              If you send one message with ContentBasedDeduplication\n enabled and then another message with a\n MessageDeduplicationId that is the same as the one\n generated for the first MessageDeduplicationId, the two\n messages are treated as duplicates and only one copy of the message is\n delivered.

              \n
            • \n
            \n
          • \n
          \n

          The following attributes apply only to \nhigh throughput\nfor FIFO queues:

          \n
            \n
          • \n

            \n DeduplicationScope – Specifies whether message deduplication occurs at the \n message group or queue level. Valid values are messageGroup and queue.

            \n
          • \n
          • \n

            \n FifoThroughputLimit – Specifies whether the FIFO queue throughput \n quota applies to the entire queue or per message group. Valid values are perQueue and perMessageGroupId. \n The perMessageGroupId value is allowed only when the value for DeduplicationScope is messageGroup.

            \n
          • \n
          \n

          To enable high throughput for FIFO queues, do the following:

          \n
            \n
          • \n

            Set DeduplicationScope to messageGroup.

            \n
          • \n
          • \n

            Set FifoThroughputLimit to perMessageGroupId.

            \n
          • \n
          \n

          If you set these attributes to anything other than the values shown for enabling high\n throughput, normal throughput is in effect and deduplication occurs as specified.

          \n

          For information on throughput quotas, \n see Quotas related to messages \n in the Amazon SQS Developer Guide.

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

          ", + "smithy.api#input": {} + } + }, + "com.amazonaws.sqs#StartMessageMoveTask": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#StartMessageMoveTaskRequest" + }, + "output": { + "target": "com.amazonaws.sqs#StartMessageMoveTaskResult" + }, + "errors": [ + { + "target": "com.amazonaws.sqs#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.sqs#UnsupportedOperation" + } + ], + "traits": { + "smithy.api#documentation": "

          Starts an asynchronous task to move messages from a specified source queue to a\n specified destination queue.

          \n \n
            \n
          • \n

            This action is currently limited to supporting message redrive from queues\n that are configured as dead-letter queues (DLQs) of other Amazon SQS queues only. Non-SQS\n queue sources of dead-letter queues, such as Lambda or Amazon SNS topics, are\n currently not supported.

            \n
          • \n
          • \n

            In dead-letter queues redrive context, the\n StartMessageMoveTask the source queue is the DLQ, while the\n destination queue can be the original source queue (from which the messages\n were driven to the dead-letter-queue), or a custom destination queue.

            \n
          • \n
          • \n

            Currently, only standard queues support redrive. FIFO queues don't support\n redrive.

            \n
          • \n
          • \n

            Only one active message movement task is supported per queue at any given\n time.

            \n
          • \n
          \n
          " + } + }, + "com.amazonaws.sqs#StartMessageMoveTaskRequest": { + "type": "structure", + "members": { + "SourceArn": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

          The ARN of the queue that contains the messages to be moved to another queue.\n Currently, only ARNs of dead-letter queues (DLQs) whose sources are other Amazon SQS queues\n are accepted. DLQs whose sources are non-SQS queues, such as Lambda or Amazon SNS topics, are\n not currently supported.

          ", + "smithy.api#required": {} } - }, - "com.amazonaws.sqs#TagQueue": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#TagQueueRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#InvalidAddress" - }, - { - "target": "com.amazonaws.sqs#InvalidSecurity" - }, - { - "target": "com.amazonaws.sqs#QueueDoesNotExist" - }, - { - "target": "com.amazonaws.sqs#RequestThrottled" - }, - { - "target": "com.amazonaws.sqs#UnsupportedOperation" - } - ], + }, + "DestinationArn": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

          Add cost allocation tags to the specified Amazon SQS queue. For an overview, see\n Tagging\n Your Amazon SQS Queues in the Amazon SQS Developer\n Guide.

          \n

          When you use queue tags, keep the following guidelines in mind:

          \n
            \n
          • \n

            Adding more than 50 tags to a queue isn't recommended.

            \n
          • \n
          • \n

            Tags don't have any semantic meaning. Amazon SQS interprets tags as character\n strings.

            \n
          • \n
          • \n

            Tags are case-sensitive.

            \n
          • \n
          • \n

            A new tag with a key identical to that of an existing tag overwrites the\n existing tag.

            \n
          • \n
          \n

          For a full list of tag restrictions, see Quotas related to queues in the Amazon SQS Developer\n Guide.

          \n \n

          Cross-account permissions don't apply to this action. For more information, see\n Grant cross-account permissions to a role and a username in the\n Amazon SQS Developer Guide.

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

          The ARN of the queue that receives the moved messages. You can use this field to\n specify the destination queue where you would like to redrive messages. If this field is\n left blank, the messages will be redriven back to their respective original source\n queues.

          " } - }, - "com.amazonaws.sqs#TagQueueRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The URL of the queue.

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

          The list of tags to be added to the specified queue.

          ", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "Tag" - } - } - }, + }, + "MaxNumberOfMessagesPerSecond": { + "target": "com.amazonaws.sqs#Integer", "traits": { - "smithy.api#input": {} + "smithy.api#default": 0, + "smithy.api#documentation": "

          The number of messages to be moved per second (the message movement rate). You can use\n this field to define a fixed message movement rate. The maximum value for messages per\n second is 500. If this field is left blank, the system will optimize the rate based on\n the queue message backlog size, which may vary throughout the duration of the message\n movement task.

          " } + } }, - "com.amazonaws.sqs#TagValue": { - "type": "string" - }, - "com.amazonaws.sqs#TaskStatus": { - "type": "enum", - "members": { - "RUNNING": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "RUNNING" - } - }, - "FAILED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "FAILED" - } - }, - "CANCELLING": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "CANCELLING" - } - }, - "CANCELLED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "CANCELLED" - } - }, - "COMPLETED": { - "target": "smithy.api#Unit", - "traits": { - "smithy.api#enumValue": "COMPLETED" - } - } + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.sqs#StartMessageMoveTaskResult": { + "type": "structure", + "members": { + "TaskHandle": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#documentation": "

          An identifier associated with a message movement task. You can use this identifier to\n cancel a specified message movement task using the CancelMessageMoveTask\n action.

          " } + } }, - "com.amazonaws.sqs#Token": { - "type": "string" + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.sqs#String": { + "type": "string" + }, + "com.amazonaws.sqs#StringList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#String", + "traits": { + "smithy.api#xmlName": "StringListValue" + } + } + }, + "com.amazonaws.sqs#TagKey": { + "type": "string" + }, + "com.amazonaws.sqs#TagKeyList": { + "type": "list", + "member": { + "target": "com.amazonaws.sqs#TagKey" + } + }, + "com.amazonaws.sqs#TagMap": { + "type": "map", + "key": { + "target": "com.amazonaws.sqs#TagKey", + "traits": { + "smithy.api#xmlName": "Key" + } + }, + "value": { + "target": "com.amazonaws.sqs#TagValue", + "traits": { + "smithy.api#xmlName": "Value" + } + } + }, + "com.amazonaws.sqs#TagQueue": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#TagQueueRequest" }, - "com.amazonaws.sqs#TooManyEntriesInBatchRequest": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.sqs#ExceptionMessage" - } - }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "

          Add cost allocation tags to the specified Amazon SQS queue. For an overview, see Tagging \nYour Amazon SQS Queues in the Amazon SQS Developer Guide.

          \n

          When you use queue tags, keep the following guidelines in mind:

          \n
            \n
          • \n

            Adding more than 50 tags to a queue isn't recommended.

            \n
          • \n
          • \n

            Tags don't have any semantic meaning. Amazon SQS interprets tags as character strings.

            \n
          • \n
          • \n

            Tags are case-sensitive.

            \n
          • \n
          • \n

            A new tag with a key identical to that of an existing tag overwrites the existing tag.

            \n
          • \n
          \n

          For a full list of tag restrictions, see \nQuotas related to queues \nin the Amazon SQS Developer Guide.

          \n \n

          Cross-account permissions don't apply to this action. For more information, \nsee Grant \ncross-account permissions to a role and a username in the Amazon SQS Developer Guide.

          \n
          " + } + }, + "com.amazonaws.sqs#TagQueueRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", "traits": { - "aws.protocols#awsQueryError": { - "code": "AWS.SimpleQueueService.TooManyEntriesInBatchRequest", - "httpResponseCode": 400 - }, - "smithy.api#documentation": "

          The batch request contains more entries than permissible.

          ", - "smithy.api#error": "client", - "smithy.api#httpError": 400 + "smithy.api#documentation": "

          The URL of the queue.

          ", + "smithy.api#required": {} } - }, - "com.amazonaws.sqs#UnsupportedOperation": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.sqs#ExceptionMessage" - } - }, + }, + "Tags": { + "target": "com.amazonaws.sqs#TagMap", "traits": { - "aws.protocols#awsQueryError": { - "code": "AWS.SimpleQueueService.UnsupportedOperation", - "httpResponseCode": 400 - }, - "smithy.api#documentation": "

          Error code 400. Unsupported operation.

          ", - "smithy.api#error": "client", - "smithy.api#httpError": 400 + "smithy.api#documentation": "

          The list of tags to be added to the specified queue.

          ", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "Tag" } + } }, - "com.amazonaws.sqs#UntagQueue": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#UntagQueueRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "errors": [ - { - "target": "com.amazonaws.sqs#InvalidAddress" - }, - { - "target": "com.amazonaws.sqs#InvalidSecurity" - }, - { - "target": "com.amazonaws.sqs#QueueDoesNotExist" - }, - { - "target": "com.amazonaws.sqs#RequestThrottled" - }, - { - "target": "com.amazonaws.sqs#UnsupportedOperation" - } - ], + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.sqs#TagValue": { + "type": "string" + }, + "com.amazonaws.sqs#Token": { + "type": "string" + }, + "com.amazonaws.sqs#TooManyEntriesInBatchRequest": { + "type": "structure", + "members": {}, + "traits": { + "aws.protocols#awsQueryError": { + "code": "AWS.SimpleQueueService.TooManyEntriesInBatchRequest", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

          The batch request contains more entries than permissible.

          ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.sqs#UnsupportedOperation": { + "type": "structure", + "members": {}, + "traits": { + "aws.protocols#awsQueryError": { + "code": "AWS.SimpleQueueService.UnsupportedOperation", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

          Error code 400. Unsupported operation.

          ", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.sqs#UntagQueue": { + "type": "operation", + "input": { + "target": "com.amazonaws.sqs#UntagQueueRequest" + }, + "output": { + "target": "smithy.api#Unit" + }, + "traits": { + "smithy.api#documentation": "

          Remove cost allocation tags from the specified Amazon SQS queue. For an overview, see Tagging \nYour Amazon SQS Queues in the Amazon SQS Developer Guide.

          \n \n

          Cross-account permissions don't apply to this action. For more information, \nsee Grant \ncross-account permissions to a role and a username in the Amazon SQS Developer Guide.

          \n
          " + } + }, + "com.amazonaws.sqs#UntagQueueRequest": { + "type": "structure", + "members": { + "QueueUrl": { + "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

          Remove cost allocation tags from the specified Amazon SQS queue. For an overview, see\n Tagging\n Your Amazon SQS Queues in the Amazon SQS Developer\n Guide.

          \n \n

          Cross-account permissions don't apply to this action. For more information, see\n Grant cross-account permissions to a role and a username in the\n Amazon SQS Developer Guide.

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

          The URL of the queue.

          ", + "smithy.api#required": {} } - }, - "com.amazonaws.sqs#UntagQueueRequest": { - "type": "structure", - "members": { - "QueueUrl": { - "target": "com.amazonaws.sqs#String", - "traits": { - "smithy.api#documentation": "

          The URL of the queue.

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

          The list of tags to be removed from the specified queue.

          ", - "smithy.api#required": {}, - "smithy.api#xmlFlattened": {}, - "smithy.api#xmlName": "TagKey" - } - } - }, + }, + "TagKeys": { + "target": "com.amazonaws.sqs#TagKeyList", "traits": { - "smithy.api#input": {} + "smithy.api#documentation": "

          The list of tags to be removed from the specified queue.

          ", + "smithy.api#required": {}, + "smithy.api#xmlFlattened": {}, + "smithy.api#xmlName": "TagKey" } + } + }, + "traits": { + "smithy.api#input": {} } + } } -} \ No newline at end of file +} From f068d1abff9307379a47bb24f8aeb0782642d7ea Mon Sep 17 00:00:00 2001 From: George Fu Date: Tue, 31 Oct 2023 18:29:05 +0000 Subject: [PATCH 5/5] chore(client-sqs): restore default client sqs --- clients/client-sqs/README.md | 15 +- clients/client-sqs/package.json | 1 + clients/client-sqs/src/SQS.ts | 15 +- clients/client-sqs/src/SQSClient.ts | 15 +- .../src/commands/AddPermissionCommand.ts | 59 +- .../commands/CancelMessageMoveTaskCommand.ts | 27 +- .../ChangeMessageVisibilityBatchCommand.ts | 40 +- .../ChangeMessageVisibilityCommand.ts | 58 +- .../src/commands/CreateQueueCommand.ts | 57 +- .../src/commands/DeleteMessageBatchCommand.ts | 37 +- .../src/commands/DeleteMessageCommand.ts | 45 +- .../src/commands/DeleteQueueCommand.ts | 39 +- .../src/commands/GetQueueAttributesCommand.ts | 36 +- .../src/commands/GetQueueUrlCommand.ts | 34 +- .../ListDeadLetterSourceQueuesCommand.ts | 30 +- .../commands/ListMessageMoveTasksCommand.ts | 29 +- .../src/commands/ListQueueTagsCommand.ts | 46 +- .../src/commands/ListQueuesCommand.ts | 38 +- .../src/commands/PurgeQueueCommand.ts | 30 +- .../src/commands/ReceiveMessageCommand.ts | 81 +- .../src/commands/RemovePermissionCommand.ts | 43 +- .../src/commands/SendMessageBatchCommand.ts | 89 +- .../src/commands/SendMessageCommand.ts | 75 +- .../src/commands/SetQueueAttributesCommand.ts | 64 +- .../commands/StartMessageMoveTaskCommand.ts | 27 +- .../src/commands/TagQueueCommand.ts | 56 +- .../src/commands/UntagQueueCommand.ts | 45 +- clients/client-sqs/src/index.ts | 15 +- clients/client-sqs/src/models/models_0.ts | 1149 ++---- .../client-sqs/src/protocols/Aws_json1_0.ts | 3067 --------------- clients/client-sqs/src/protocols/Aws_query.ts | 3455 +++++++++++++++++ .../codegen/JsonShapeSerVisitor.java | 27 - .../codegen/RestJsonProtocolGenerator.java | 1 - .../src/protocols/coercing-serializers.ts | 3 + 34 files changed, 4010 insertions(+), 4838 deletions(-) delete mode 100644 clients/client-sqs/src/protocols/Aws_json1_0.ts create mode 100644 clients/client-sqs/src/protocols/Aws_query.ts diff --git a/clients/client-sqs/README.md b/clients/client-sqs/README.md index 20f7297a1336a..0b5ec94826441 100644 --- a/clients/client-sqs/README.md +++ b/clients/client-sqs/README.md @@ -7,15 +7,15 @@ AWS SDK for JavaScript SQS Client for Node.js, Browser and React Native.

          Welcome to the Amazon SQS API Reference.

          -

          Amazon SQS is a reliable, highly-scalable hosted queue for storing messages as they -travel between applications or microservices. Amazon SQS moves data between distributed -application components and helps you decouple these components.

          +

          Amazon SQS is a reliable, highly-scalable hosted queue for storing messages as they travel +between applications or microservices. Amazon SQS moves data between distributed application +components and helps you decouple these components.

          For information on the permissions you need to use this API, see Identity and access management in the Amazon SQS Developer Guide.

          -

          You can use Amazon Web Services -SDKs to access Amazon SQS using your favorite programming language. The SDKs -perform tasks such as the following automatically:

          +

          You can use Amazon Web Services SDKs to access +Amazon SQS using your favorite programming language. The SDKs perform tasks such as the +following automatically:

          • Cryptographically sign your service requests

            @@ -60,8 +60,7 @@ perform tasks such as the following automatically:

          • -Amazon SQS in the Command Line -Interface +Amazon SQS in the Command Line Interface

          • diff --git a/clients/client-sqs/package.json b/clients/client-sqs/package.json index 805097d9490d9..799a7de8f1275 100644 --- a/clients/client-sqs/package.json +++ b/clients/client-sqs/package.json @@ -59,6 +59,7 @@ "@smithy/util-endpoints": "^1.0.2", "@smithy/util-retry": "^2.0.5", "@smithy/util-utf8": "^2.0.0", + "fast-xml-parser": "4.2.5", "tslib": "^2.5.0" }, "devDependencies": { diff --git a/clients/client-sqs/src/SQS.ts b/clients/client-sqs/src/SQS.ts index 60d9dca251efa..62ff73a7da0ae 100644 --- a/clients/client-sqs/src/SQS.ts +++ b/clients/client-sqs/src/SQS.ts @@ -440,15 +440,15 @@ export interface SQS { /** * @public *

            Welcome to the Amazon SQS API Reference.

            - *

            Amazon SQS is a reliable, highly-scalable hosted queue for storing messages as they - * travel between applications or microservices. Amazon SQS moves data between distributed - * application components and helps you decouple these components.

            + *

            Amazon SQS is a reliable, highly-scalable hosted queue for storing messages as they travel + * between applications or microservices. Amazon SQS moves data between distributed application + * components and helps you decouple these components.

            *

            For information on the permissions you need to use this API, see Identity and access management in the Amazon SQS Developer * Guide. *

            - *

            You can use Amazon Web Services - * SDKs to access Amazon SQS using your favorite programming language. The SDKs - * perform tasks such as the following automatically:

            + *

            You can use Amazon Web Services SDKs to access + * Amazon SQS using your favorite programming language. The SDKs perform tasks such as the + * following automatically:

            *
              *
            • *

              Cryptographically sign your service requests

              @@ -493,8 +493,7 @@ export interface SQS { *
            • *
            • *

              - * Amazon SQS in the Command Line - * Interface + * Amazon SQS in the Command Line Interface * *

              *
            • diff --git a/clients/client-sqs/src/SQSClient.ts b/clients/client-sqs/src/SQSClient.ts index 457f3d4a2decd..81e6769823545 100644 --- a/clients/client-sqs/src/SQSClient.ts +++ b/clients/client-sqs/src/SQSClient.ts @@ -338,15 +338,15 @@ export interface SQSClientResolvedConfig extends SQSClientResolvedConfigType {} /** * @public *

              Welcome to the Amazon SQS API Reference.

              - *

              Amazon SQS is a reliable, highly-scalable hosted queue for storing messages as they - * travel between applications or microservices. Amazon SQS moves data between distributed - * application components and helps you decouple these components.

              + *

              Amazon SQS is a reliable, highly-scalable hosted queue for storing messages as they travel + * between applications or microservices. Amazon SQS moves data between distributed application + * components and helps you decouple these components.

              *

              For information on the permissions you need to use this API, see Identity and access management in the Amazon SQS Developer * Guide. *

              - *

              You can use Amazon Web Services - * SDKs to access Amazon SQS using your favorite programming language. The SDKs - * perform tasks such as the following automatically:

              + *

              You can use Amazon Web Services SDKs to access + * Amazon SQS using your favorite programming language. The SDKs perform tasks such as the + * following automatically:

              *
                *
              • *

                Cryptographically sign your service requests

                @@ -391,8 +391,7 @@ export interface SQSClientResolvedConfig extends SQSClientResolvedConfigType {} *
              • *
              • *

                - * Amazon SQS in the Command Line - * Interface + * Amazon SQS in the Command Line Interface * *

                *
              • diff --git a/clients/client-sqs/src/commands/AddPermissionCommand.ts b/clients/client-sqs/src/commands/AddPermissionCommand.ts index 169da64dc4d9b..1ad8c9e6c261d 100644 --- a/clients/client-sqs/src/commands/AddPermissionCommand.ts +++ b/clients/client-sqs/src/commands/AddPermissionCommand.ts @@ -15,7 +15,7 @@ import { } from "@smithy/types"; import { AddPermissionRequest } from "../models/models_0"; -import { de_AddPermissionCommand, se_AddPermissionCommand } from "../protocols/Aws_json1_0"; +import { de_AddPermissionCommand, se_AddPermissionCommand } from "../protocols/Aws_query"; import { ServiceInputTypes, ServiceOutputTypes, SQSClientResolvedConfig } from "../SQSClient"; /** @@ -41,8 +41,8 @@ export interface AddPermissionCommandOutput extends __MetadataBearer {} * access to the queue.

                *

                When you create a queue, you have full control access rights for the queue. Only you, * the owner of the queue, can grant or deny permissions to the queue. For more information - * about these permissions, see Allow Developers to Write Messages to a Shared Queue in the - * Amazon SQS Developer Guide.

                + * about these permissions, see Allow Developers to Write Messages to a Shared Queue in the Amazon SQS + * Developer Guide.

                * *
                  *
                • @@ -51,29 +51,25 @@ export interface AddPermissionCommandOutput extends __MetadataBearer {} * * SetQueueAttributes * to upload your - * policy. For more information, see Using Custom Policies with the Amazon SQS Access Policy - * Language in the Amazon SQS Developer - * Guide.

                  + * policy. For more information, see Using Custom Policies with the Amazon SQS Access Policy Language in + * the Amazon SQS Developer Guide.

                  *
                • *
                • - *

                  An Amazon SQS policy can have a maximum of seven actions per - * statement.

                  + *

                  An Amazon SQS policy can have a maximum of seven actions per statement.

                  *
                • *
                • - *

                  To remove the ability to change queue permissions, you must deny - * permission to the AddPermission, RemovePermission, - * and SetQueueAttributes actions in your IAM policy.

                  + *

                  To remove the ability to change queue permissions, you must deny permission to the AddPermission, RemovePermission, and SetQueueAttributes actions in your IAM policy.

                  *
                • *
                • - *

                  Amazon SQS AddPermission does not support adding a - * non-account principal.

                  + *

                  Amazon SQS AddPermission does not support adding a non-account + * principal.

                  *
                • *
                *
                * - *

                Cross-account permissions don't apply to this action. For more information, see - * Grant cross-account permissions to a role and a username in the - * Amazon SQS Developer Guide.

                + *

                Cross-account permissions don't apply to this action. For more information, + * see Grant + * cross-account permissions to a role and a username in the Amazon SQS Developer Guide.

                *
                * @example * Use a bare-bones client and the command you need to make an API call. @@ -103,43 +99,12 @@ export interface AddPermissionCommandOutput extends __MetadataBearer {} * @see {@link AddPermissionCommandOutput} for command's `response` shape. * @see {@link SQSClientResolvedConfig | config} for SQSClient's `config` shape. * - * @throws {@link InvalidAddress} (client fault) - *

                The accountId is invalid.

                - * - * @throws {@link InvalidSecurity} (client fault) - *

                When the request to a queue is not HTTPS and SigV4.

                - * * @throws {@link OverLimit} (client fault) *

                The specified action violates a limit. For example, ReceiveMessage * returns this error if the maximum number of in flight messages is reached and * AddPermission returns this error if the maximum number of permissions * for the queue is reached.

                * - * @throws {@link QueueDoesNotExist} (client fault) - *

                The specified queue doesn't exist.

                - * - * @throws {@link RequestThrottled} (client fault) - *

                The request was denied due to request throttling.

                - *
                  - *
                • - *

                  The rate of requests per second exceeds the Amazon Web Services KMS request quota for an - * account and Region.

                  - *
                • - *
                • - *

                  A burst or sustained high rate of requests to change the state of the same KMS - * key. This condition is often known as a "hot key."

                  - *
                • - *
                • - *

                  Requests for operations on KMS keys in a Amazon Web Services CloudHSM key store - * might be throttled at a lower-than-expected rate when the Amazon Web Services - * CloudHSM cluster associated with the Amazon Web Services CloudHSM key store is - * processing numerous commands, including those unrelated to the Amazon Web Services CloudHSM key store.

                  - *
                • - *
                - * - * @throws {@link UnsupportedOperation} (client fault) - *

                Error code 400. Unsupported operation.

                - * * @throws {@link SQSServiceException} *

                Base exception class for all service exceptions from SQS service.

                * diff --git a/clients/client-sqs/src/commands/CancelMessageMoveTaskCommand.ts b/clients/client-sqs/src/commands/CancelMessageMoveTaskCommand.ts index 60bcb167db684..f54d1420e169b 100644 --- a/clients/client-sqs/src/commands/CancelMessageMoveTaskCommand.ts +++ b/clients/client-sqs/src/commands/CancelMessageMoveTaskCommand.ts @@ -15,7 +15,7 @@ import { } from "@smithy/types"; import { CancelMessageMoveTaskRequest, CancelMessageMoveTaskResult } from "../models/models_0"; -import { de_CancelMessageMoveTaskCommand, se_CancelMessageMoveTaskCommand } from "../protocols/Aws_json1_0"; +import { de_CancelMessageMoveTaskCommand, se_CancelMessageMoveTaskCommand } from "../protocols/Aws_query"; import { ServiceInputTypes, ServiceOutputTypes, SQSClientResolvedConfig } from "../SQSClient"; /** @@ -81,31 +81,6 @@ export interface CancelMessageMoveTaskCommandOutput extends CancelMessageMoveTas * @see {@link CancelMessageMoveTaskCommandOutput} for command's `response` shape. * @see {@link SQSClientResolvedConfig | config} for SQSClient's `config` shape. * - * @throws {@link InvalidAddress} (client fault) - *

                The accountId is invalid.

                - * - * @throws {@link InvalidSecurity} (client fault) - *

                When the request to a queue is not HTTPS and SigV4.

                - * - * @throws {@link RequestThrottled} (client fault) - *

                The request was denied due to request throttling.

                - *
                  - *
                • - *

                  The rate of requests per second exceeds the Amazon Web Services KMS request quota for an - * account and Region.

                  - *
                • - *
                • - *

                  A burst or sustained high rate of requests to change the state of the same KMS - * key. This condition is often known as a "hot key."

                  - *
                • - *
                • - *

                  Requests for operations on KMS keys in a Amazon Web Services CloudHSM key store - * might be throttled at a lower-than-expected rate when the Amazon Web Services - * CloudHSM cluster associated with the Amazon Web Services CloudHSM key store is - * processing numerous commands, including those unrelated to the Amazon Web Services CloudHSM key store.

                  - *
                • - *
                - * * @throws {@link ResourceNotFoundException} (client fault) *

                One or more specified resources don't exist.

                * diff --git a/clients/client-sqs/src/commands/ChangeMessageVisibilityBatchCommand.ts b/clients/client-sqs/src/commands/ChangeMessageVisibilityBatchCommand.ts index 80692a3bf288d..554412f981518 100644 --- a/clients/client-sqs/src/commands/ChangeMessageVisibilityBatchCommand.ts +++ b/clients/client-sqs/src/commands/ChangeMessageVisibilityBatchCommand.ts @@ -15,10 +15,7 @@ import { } from "@smithy/types"; import { ChangeMessageVisibilityBatchRequest, ChangeMessageVisibilityBatchResult } from "../models/models_0"; -import { - de_ChangeMessageVisibilityBatchCommand, - se_ChangeMessageVisibilityBatchCommand, -} from "../protocols/Aws_json1_0"; +import { de_ChangeMessageVisibilityBatchCommand, se_ChangeMessageVisibilityBatchCommand } from "../protocols/Aws_query"; import { ServiceInputTypes, ServiceOutputTypes, SQSClientResolvedConfig } from "../SQSClient"; /** @@ -51,9 +48,7 @@ export interface ChangeMessageVisibilityBatchCommandOutput * requests with each * ChangeMessageVisibilityBatch action.

                * - *

                Because the batch request can result in a combination of successful and - * unsuccessful actions, you should check for batch errors even when the call returns - * an HTTP status code of 200.

                + *

                Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.

                *
                * @example * Use a bare-bones client and the command you need to make an API call. @@ -103,44 +98,13 @@ export interface ChangeMessageVisibilityBatchCommandOutput * @throws {@link EmptyBatchRequest} (client fault) *

                The batch request doesn't contain any entries.

                * - * @throws {@link InvalidAddress} (client fault) - *

                The accountId is invalid.

                - * * @throws {@link InvalidBatchEntryId} (client fault) *

                The Id of a batch entry in a batch request doesn't abide by the * specification.

                * - * @throws {@link InvalidSecurity} (client fault) - *

                When the request to a queue is not HTTPS and SigV4.

                - * - * @throws {@link QueueDoesNotExist} (client fault) - *

                The specified queue doesn't exist.

                - * - * @throws {@link RequestThrottled} (client fault) - *

                The request was denied due to request throttling.

                - *
                  - *
                • - *

                  The rate of requests per second exceeds the Amazon Web Services KMS request quota for an - * account and Region.

                  - *
                • - *
                • - *

                  A burst or sustained high rate of requests to change the state of the same KMS - * key. This condition is often known as a "hot key."

                  - *
                • - *
                • - *

                  Requests for operations on KMS keys in a Amazon Web Services CloudHSM key store - * might be throttled at a lower-than-expected rate when the Amazon Web Services - * CloudHSM cluster associated with the Amazon Web Services CloudHSM key store is - * processing numerous commands, including those unrelated to the Amazon Web Services CloudHSM key store.

                  - *
                • - *
                - * * @throws {@link TooManyEntriesInBatchRequest} (client fault) *

                The batch request contains more entries than permissible.

                * - * @throws {@link UnsupportedOperation} (client fault) - *

                Error code 400. Unsupported operation.

                - * * @throws {@link SQSServiceException} *

                Base exception class for all service exceptions from SQS service.

                * diff --git a/clients/client-sqs/src/commands/ChangeMessageVisibilityCommand.ts b/clients/client-sqs/src/commands/ChangeMessageVisibilityCommand.ts index 6b5387bc4e4b6..be14f0c923564 100644 --- a/clients/client-sqs/src/commands/ChangeMessageVisibilityCommand.ts +++ b/clients/client-sqs/src/commands/ChangeMessageVisibilityCommand.ts @@ -15,7 +15,7 @@ import { } from "@smithy/types"; import { ChangeMessageVisibilityRequest } from "../models/models_0"; -import { de_ChangeMessageVisibilityCommand, se_ChangeMessageVisibilityCommand } from "../protocols/Aws_json1_0"; +import { de_ChangeMessageVisibilityCommand, se_ChangeMessageVisibilityCommand } from "../protocols/Aws_query"; import { ServiceInputTypes, ServiceOutputTypes, SQSClientResolvedConfig } from "../SQSClient"; /** @@ -60,23 +60,14 @@ export interface ChangeMessageVisibilityCommandOutput extends __MetadataBearer { *

                Deleted from the queue.

                * * - *

                A message is considered to be stored after it is sent to a queue - * by a producer, but not yet received from the queue by a consumer (that is, between - * states 1 and 2). There is no limit to the number of stored messages. A message is - * considered to be in flight after it is received from a queue by a - * consumer, but not yet deleted from the queue (that is, between states 2 and 3). There is - * a limit to the number of in flight messages.

                - *

                Limits that apply to in flight messages are unrelated to the - * unlimited number of stored messages.

                - *

                For most standard queues (depending on queue traffic and message backlog), there can - * be a maximum of approximately 120,000 in flight messages (received from a queue by a - * consumer, but not yet deleted from the queue). If you reach this limit, Amazon SQS - * returns the OverLimit error message. To avoid reaching the limit, you - * should delete messages from the queue after they're processed. You can also increase the - * number of queues you use to process your messages. To request a limit increase, file a support request.

                - *

                For FIFO queues, there can be a maximum of 20,000 in flight messages (received from a - * queue by a consumer, but not yet deleted from the queue). If you reach this limit, - * Amazon SQS returns no error messages.

                + *

                A message is considered to be stored after it is sent to a queue by a producer, but not yet received from the queue by a consumer (that is, between states 1 and 2). There is no limit to the number of stored messages. + * A message is considered to be in flight after it is received from a queue by a consumer, but not yet deleted from the queue (that is, between states 2 and 3). There is a limit to the number of in flight messages.

                + *

                Limits that apply to in flight messages are unrelated to the unlimited number of stored messages.

                + *

                For most standard queues (depending on queue traffic and message backlog), there can be a maximum of approximately 120,000 in flight messages (received from a queue by a consumer, but not yet deleted from the queue). + * If you reach this limit, Amazon SQS returns the OverLimit error message. + * To avoid reaching the limit, you should delete messages from the queue after they're processed. You can also increase the number of queues you use to process your messages. + * To request a limit increase, file a support request.

                + *

                For FIFO queues, there can be a maximum of 20,000 in flight messages (received from a queue by a consumer, but not yet deleted from the queue). If you reach this limit, Amazon SQS returns no error messages.

                * *

                If you attempt to set the VisibilityTimeout to a value greater than * the maximum time left, Amazon SQS returns an error. Amazon SQS doesn't automatically @@ -111,43 +102,12 @@ export interface ChangeMessageVisibilityCommandOutput extends __MetadataBearer { * @see {@link ChangeMessageVisibilityCommandOutput} for command's `response` shape. * @see {@link SQSClientResolvedConfig | config} for SQSClient's `config` shape. * - * @throws {@link InvalidAddress} (client fault) - *

                The accountId is invalid.

                - * - * @throws {@link InvalidSecurity} (client fault) - *

                When the request to a queue is not HTTPS and SigV4.

                - * * @throws {@link MessageNotInflight} (client fault) *

                The specified message isn't in flight.

                * - * @throws {@link QueueDoesNotExist} (client fault) - *

                The specified queue doesn't exist.

                - * * @throws {@link ReceiptHandleIsInvalid} (client fault) *

                The specified receipt handle isn't valid.

                * - * @throws {@link RequestThrottled} (client fault) - *

                The request was denied due to request throttling.

                - *
                  - *
                • - *

                  The rate of requests per second exceeds the Amazon Web Services KMS request quota for an - * account and Region.

                  - *
                • - *
                • - *

                  A burst or sustained high rate of requests to change the state of the same KMS - * key. This condition is often known as a "hot key."

                  - *
                • - *
                • - *

                  Requests for operations on KMS keys in a Amazon Web Services CloudHSM key store - * might be throttled at a lower-than-expected rate when the Amazon Web Services - * CloudHSM cluster associated with the Amazon Web Services CloudHSM key store is - * processing numerous commands, including those unrelated to the Amazon Web Services CloudHSM key store.

                  - *
                • - *
                - * - * @throws {@link UnsupportedOperation} (client fault) - *

                Error code 400. Unsupported operation.

                - * * @throws {@link SQSServiceException} *

                Base exception class for all service exceptions from SQS service.

                * diff --git a/clients/client-sqs/src/commands/CreateQueueCommand.ts b/clients/client-sqs/src/commands/CreateQueueCommand.ts index f5f67442a7205..db5b5019a5d66 100644 --- a/clients/client-sqs/src/commands/CreateQueueCommand.ts +++ b/clients/client-sqs/src/commands/CreateQueueCommand.ts @@ -15,7 +15,7 @@ import { } from "@smithy/types"; import { CreateQueueRequest, CreateQueueResult } from "../models/models_0"; -import { de_CreateQueueCommand, se_CreateQueueCommand } from "../protocols/Aws_json1_0"; +import { de_CreateQueueCommand, se_CreateQueueCommand } from "../protocols/Aws_query"; import { ServiceInputTypes, ServiceOutputTypes, SQSClientResolvedConfig } from "../SQSClient"; /** @@ -37,12 +37,11 @@ export interface CreateQueueCommandOutput extends CreateQueueResult, __MetadataB /** * @public - *

                Creates a new standard or FIFO queue. You can pass one or more attributes in the - * request. Keep the following in mind:

                + *

                Creates a new standard or FIFO queue. You can pass one or more attributes in + * the request. Keep the following in mind:

                *
                  *
                • - *

                  If you don't specify the FifoQueue attribute, Amazon SQS creates - * a standard queue.

                  + *

                  If you don't specify the FifoQueue attribute, Amazon SQS creates a standard queue.

                  * *

                  You can't change the queue type after you create it and you can't convert * an existing standard queue into a FIFO queue. You must either create a new @@ -86,9 +85,9 @@ export interface CreateQueueCommandOutput extends CreateQueueResult, __MetadataB *

                • *
                * - *

                Cross-account permissions don't apply to this action. For more information, see - * Grant cross-account permissions to a role and a username in the - * Amazon SQS Developer Guide.

                + *

                Cross-account permissions don't apply to this action. For more information, + * see Grant + * cross-account permissions to a role and a username in the Amazon SQS Developer Guide.

                *
                * @example * Use a bare-bones client and the command you need to make an API call. @@ -98,10 +97,10 @@ export interface CreateQueueCommandOutput extends CreateQueueResult, __MetadataB * const client = new SQSClient(config); * const input = { // CreateQueueRequest * QueueName: "STRING_VALUE", // required - * Attributes: { // QueueAttributeMap + * tags: { // TagMap * "": "STRING_VALUE", * }, - * tags: { // TagMap + * Attributes: { // QueueAttributeMap * "": "STRING_VALUE", * }, * }; @@ -119,47 +118,13 @@ export interface CreateQueueCommandOutput extends CreateQueueResult, __MetadataB * @see {@link CreateQueueCommandOutput} for command's `response` shape. * @see {@link SQSClientResolvedConfig | config} for SQSClient's `config` shape. * - * @throws {@link InvalidAddress} (client fault) - *

                The accountId is invalid.

                - * - * @throws {@link InvalidAttributeName} (client fault) - *

                The specified attribute doesn't exist.

                - * - * @throws {@link InvalidAttributeValue} (client fault) - *

                A queue attribute value is invalid.

                - * - * @throws {@link InvalidSecurity} (client fault) - *

                When the request to a queue is not HTTPS and SigV4.

                - * * @throws {@link QueueDeletedRecently} (client fault) *

                You must wait 60 seconds after deleting a queue before you can create another queue * with the same name.

                * * @throws {@link QueueNameExists} (client fault) - *

                A queue with this name already exists. Amazon SQS returns this error only if the - * request includes attributes whose values differ from those of the existing queue.

                - * - * @throws {@link RequestThrottled} (client fault) - *

                The request was denied due to request throttling.

                - *
                  - *
                • - *

                  The rate of requests per second exceeds the Amazon Web Services KMS request quota for an - * account and Region.

                  - *
                • - *
                • - *

                  A burst or sustained high rate of requests to change the state of the same KMS - * key. This condition is often known as a "hot key."

                  - *
                • - *
                • - *

                  Requests for operations on KMS keys in a Amazon Web Services CloudHSM key store - * might be throttled at a lower-than-expected rate when the Amazon Web Services - * CloudHSM cluster associated with the Amazon Web Services CloudHSM key store is - * processing numerous commands, including those unrelated to the Amazon Web Services CloudHSM key store.

                  - *
                • - *
                - * - * @throws {@link UnsupportedOperation} (client fault) - *

                Error code 400. Unsupported operation.

                + *

                A queue with this name already exists. Amazon SQS returns this error only if the request + * includes attributes whose values differ from those of the existing queue.

                * * @throws {@link SQSServiceException} *

                Base exception class for all service exceptions from SQS service.

                diff --git a/clients/client-sqs/src/commands/DeleteMessageBatchCommand.ts b/clients/client-sqs/src/commands/DeleteMessageBatchCommand.ts index 7ab2e70faf2f6..d8b5168f4ea77 100644 --- a/clients/client-sqs/src/commands/DeleteMessageBatchCommand.ts +++ b/clients/client-sqs/src/commands/DeleteMessageBatchCommand.ts @@ -15,7 +15,7 @@ import { } from "@smithy/types"; import { DeleteMessageBatchRequest, DeleteMessageBatchResult } from "../models/models_0"; -import { de_DeleteMessageBatchCommand, se_DeleteMessageBatchCommand } from "../protocols/Aws_json1_0"; +import { de_DeleteMessageBatchCommand, se_DeleteMessageBatchCommand } from "../protocols/Aws_query"; import { ServiceInputTypes, ServiceOutputTypes, SQSClientResolvedConfig } from "../SQSClient"; /** @@ -42,9 +42,7 @@ export interface DeleteMessageBatchCommandOutput extends DeleteMessageBatchResul * DeleteMessage. The result of the action on each * message is reported individually in the response.

                * - *

                Because the batch request can result in a combination of successful and - * unsuccessful actions, you should check for batch errors even when the call returns - * an HTTP status code of 200.

                + *

                Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.

                *
                * @example * Use a bare-bones client and the command you need to make an API call. @@ -93,44 +91,13 @@ export interface DeleteMessageBatchCommandOutput extends DeleteMessageBatchResul * @throws {@link EmptyBatchRequest} (client fault) *

                The batch request doesn't contain any entries.

                * - * @throws {@link InvalidAddress} (client fault) - *

                The accountId is invalid.

                - * * @throws {@link InvalidBatchEntryId} (client fault) *

                The Id of a batch entry in a batch request doesn't abide by the * specification.

                * - * @throws {@link InvalidSecurity} (client fault) - *

                When the request to a queue is not HTTPS and SigV4.

                - * - * @throws {@link QueueDoesNotExist} (client fault) - *

                The specified queue doesn't exist.

                - * - * @throws {@link RequestThrottled} (client fault) - *

                The request was denied due to request throttling.

                - *
                  - *
                • - *

                  The rate of requests per second exceeds the Amazon Web Services KMS request quota for an - * account and Region.

                  - *
                • - *
                • - *

                  A burst or sustained high rate of requests to change the state of the same KMS - * key. This condition is often known as a "hot key."

                  - *
                • - *
                • - *

                  Requests for operations on KMS keys in a Amazon Web Services CloudHSM key store - * might be throttled at a lower-than-expected rate when the Amazon Web Services - * CloudHSM cluster associated with the Amazon Web Services CloudHSM key store is - * processing numerous commands, including those unrelated to the Amazon Web Services CloudHSM key store.

                  - *
                • - *
                - * * @throws {@link TooManyEntriesInBatchRequest} (client fault) *

                The batch request contains more entries than permissible.

                * - * @throws {@link UnsupportedOperation} (client fault) - *

                Error code 400. Unsupported operation.

                - * * @throws {@link SQSServiceException} *

                Base exception class for all service exceptions from SQS service.

                * diff --git a/clients/client-sqs/src/commands/DeleteMessageCommand.ts b/clients/client-sqs/src/commands/DeleteMessageCommand.ts index 0113931564cd3..e8e087a8c5c3a 100644 --- a/clients/client-sqs/src/commands/DeleteMessageCommand.ts +++ b/clients/client-sqs/src/commands/DeleteMessageCommand.ts @@ -15,7 +15,7 @@ import { } from "@smithy/types"; import { DeleteMessageRequest } from "../models/models_0"; -import { de_DeleteMessageCommand, se_DeleteMessageCommand } from "../protocols/Aws_json1_0"; +import { de_DeleteMessageCommand, se_DeleteMessageCommand } from "../protocols/Aws_query"; import { ServiceInputTypes, ServiceOutputTypes, SQSClientResolvedConfig } from "../SQSClient"; /** @@ -50,12 +50,12 @@ export interface DeleteMessageCommandOutput extends __MetadataBearer {} * When you use the DeleteMessage action, you must provide the most * recently received ReceiptHandle for the message (otherwise, the request * succeeds, but the message will not be deleted).

                - *

                For standard queues, it is possible to receive a message even after you delete it. - * This might happen on rare occasions if one of the servers which stores a copy of the - * message is unavailable when you send the request to delete the message. The copy - * remains on the server and might be returned to you during a subsequent receive - * request. You should ensure that your application is idempotent, so that receiving a - * message more than once does not cause issues.

                + *

                For standard queues, it is possible to receive a message even after you + * delete it. This might happen on rare occasions if one of the servers which stores a + * copy of the message is unavailable when you send the request to delete the message. + * The copy remains on the server and might be returned to you during a subsequent + * receive request. You should ensure that your application is idempotent, so that + * receiving a message more than once does not cause issues.

                * * @example * Use a bare-bones client and the command you need to make an API call. @@ -79,43 +79,12 @@ export interface DeleteMessageCommandOutput extends __MetadataBearer {} * @see {@link DeleteMessageCommandOutput} for command's `response` shape. * @see {@link SQSClientResolvedConfig | config} for SQSClient's `config` shape. * - * @throws {@link InvalidAddress} (client fault) - *

                The accountId is invalid.

                - * * @throws {@link InvalidIdFormat} (client fault) *

                The specified receipt handle isn't valid for the current version.

                * - * @throws {@link InvalidSecurity} (client fault) - *

                When the request to a queue is not HTTPS and SigV4.

                - * - * @throws {@link QueueDoesNotExist} (client fault) - *

                The specified queue doesn't exist.

                - * * @throws {@link ReceiptHandleIsInvalid} (client fault) *

                The specified receipt handle isn't valid.

                * - * @throws {@link RequestThrottled} (client fault) - *

                The request was denied due to request throttling.

                - *
                  - *
                • - *

                  The rate of requests per second exceeds the Amazon Web Services KMS request quota for an - * account and Region.

                  - *
                • - *
                • - *

                  A burst or sustained high rate of requests to change the state of the same KMS - * key. This condition is often known as a "hot key."

                  - *
                • - *
                • - *

                  Requests for operations on KMS keys in a Amazon Web Services CloudHSM key store - * might be throttled at a lower-than-expected rate when the Amazon Web Services - * CloudHSM cluster associated with the Amazon Web Services CloudHSM key store is - * processing numerous commands, including those unrelated to the Amazon Web Services CloudHSM key store.

                  - *
                • - *
                - * - * @throws {@link UnsupportedOperation} (client fault) - *

                Error code 400. Unsupported operation.

                - * * @throws {@link SQSServiceException} *

                Base exception class for all service exceptions from SQS service.

                * diff --git a/clients/client-sqs/src/commands/DeleteQueueCommand.ts b/clients/client-sqs/src/commands/DeleteQueueCommand.ts index 57bcba925930d..460c893aeeab0 100644 --- a/clients/client-sqs/src/commands/DeleteQueueCommand.ts +++ b/clients/client-sqs/src/commands/DeleteQueueCommand.ts @@ -15,7 +15,7 @@ import { } from "@smithy/types"; import { DeleteQueueRequest } from "../models/models_0"; -import { de_DeleteQueueCommand, se_DeleteQueueCommand } from "../protocols/Aws_json1_0"; +import { de_DeleteQueueCommand, se_DeleteQueueCommand } from "../protocols/Aws_query"; import { ServiceInputTypes, ServiceOutputTypes, SQSClientResolvedConfig } from "../SQSClient"; /** @@ -52,9 +52,9 @@ export interface DeleteQueueCommandOutput extends __MetadataBearer {} *

                When you delete a queue, you must wait at least 60 seconds before creating a queue * with the same name.

                * - *

                Cross-account permissions don't apply to this action. For more information, see - * Grant cross-account permissions to a role and a username in the - * Amazon SQS Developer Guide.

                + *

                Cross-account permissions don't apply to this action. For more information, + * see Grant + * cross-account permissions to a role and a username in the Amazon SQS Developer Guide.

                *

                The delete operation uses the HTTP GET verb.

                *
                * @example @@ -78,37 +78,6 @@ export interface DeleteQueueCommandOutput extends __MetadataBearer {} * @see {@link DeleteQueueCommandOutput} for command's `response` shape. * @see {@link SQSClientResolvedConfig | config} for SQSClient's `config` shape. * - * @throws {@link InvalidAddress} (client fault) - *

                The accountId is invalid.

                - * - * @throws {@link InvalidSecurity} (client fault) - *

                When the request to a queue is not HTTPS and SigV4.

                - * - * @throws {@link QueueDoesNotExist} (client fault) - *

                The specified queue doesn't exist.

                - * - * @throws {@link RequestThrottled} (client fault) - *

                The request was denied due to request throttling.

                - *
                  - *
                • - *

                  The rate of requests per second exceeds the Amazon Web Services KMS request quota for an - * account and Region.

                  - *
                • - *
                • - *

                  A burst or sustained high rate of requests to change the state of the same KMS - * key. This condition is often known as a "hot key."

                  - *
                • - *
                • - *

                  Requests for operations on KMS keys in a Amazon Web Services CloudHSM key store - * might be throttled at a lower-than-expected rate when the Amazon Web Services - * CloudHSM cluster associated with the Amazon Web Services CloudHSM key store is - * processing numerous commands, including those unrelated to the Amazon Web Services CloudHSM key store.

                  - *
                • - *
                - * - * @throws {@link UnsupportedOperation} (client fault) - *

                Error code 400. Unsupported operation.

                - * * @throws {@link SQSServiceException} *

                Base exception class for all service exceptions from SQS service.

                * diff --git a/clients/client-sqs/src/commands/GetQueueAttributesCommand.ts b/clients/client-sqs/src/commands/GetQueueAttributesCommand.ts index bd4a671697d57..cfc898af3634d 100644 --- a/clients/client-sqs/src/commands/GetQueueAttributesCommand.ts +++ b/clients/client-sqs/src/commands/GetQueueAttributesCommand.ts @@ -15,7 +15,7 @@ import { } from "@smithy/types"; import { GetQueueAttributesRequest, GetQueueAttributesResult } from "../models/models_0"; -import { de_GetQueueAttributesCommand, se_GetQueueAttributesCommand } from "../protocols/Aws_json1_0"; +import { de_GetQueueAttributesCommand, se_GetQueueAttributesCommand } from "../protocols/Aws_query"; import { ServiceInputTypes, ServiceOutputTypes, SQSClientResolvedConfig } from "../SQSClient"; /** @@ -39,8 +39,7 @@ export interface GetQueueAttributesCommandOutput extends GetQueueAttributesResul * @public *

                Gets attributes for the specified queue.

                * - *

                To determine whether a queue is FIFO, you can check whether QueueName ends with the - * .fifo suffix.

                + *

                To determine whether a queue is FIFO, you can check whether QueueName ends with the .fifo suffix.

                *
                * @example * Use a bare-bones client and the command you need to make an API call. @@ -70,40 +69,9 @@ export interface GetQueueAttributesCommandOutput extends GetQueueAttributesResul * @see {@link GetQueueAttributesCommandOutput} for command's `response` shape. * @see {@link SQSClientResolvedConfig | config} for SQSClient's `config` shape. * - * @throws {@link InvalidAddress} (client fault) - *

                The accountId is invalid.

                - * * @throws {@link InvalidAttributeName} (client fault) *

                The specified attribute doesn't exist.

                * - * @throws {@link InvalidSecurity} (client fault) - *

                When the request to a queue is not HTTPS and SigV4.

                - * - * @throws {@link QueueDoesNotExist} (client fault) - *

                The specified queue doesn't exist.

                - * - * @throws {@link RequestThrottled} (client fault) - *

                The request was denied due to request throttling.

                - *
                  - *
                • - *

                  The rate of requests per second exceeds the Amazon Web Services KMS request quota for an - * account and Region.

                  - *
                • - *
                • - *

                  A burst or sustained high rate of requests to change the state of the same KMS - * key. This condition is often known as a "hot key."

                  - *
                • - *
                • - *

                  Requests for operations on KMS keys in a Amazon Web Services CloudHSM key store - * might be throttled at a lower-than-expected rate when the Amazon Web Services - * CloudHSM cluster associated with the Amazon Web Services CloudHSM key store is - * processing numerous commands, including those unrelated to the Amazon Web Services CloudHSM key store.

                  - *
                • - *
                - * - * @throws {@link UnsupportedOperation} (client fault) - *

                Error code 400. Unsupported operation.

                - * * @throws {@link SQSServiceException} *

                Base exception class for all service exceptions from SQS service.

                * diff --git a/clients/client-sqs/src/commands/GetQueueUrlCommand.ts b/clients/client-sqs/src/commands/GetQueueUrlCommand.ts index d52faa4771256..923cbac1c8de5 100644 --- a/clients/client-sqs/src/commands/GetQueueUrlCommand.ts +++ b/clients/client-sqs/src/commands/GetQueueUrlCommand.ts @@ -15,7 +15,7 @@ import { } from "@smithy/types"; import { GetQueueUrlRequest, GetQueueUrlResult } from "../models/models_0"; -import { de_GetQueueUrlCommand, se_GetQueueUrlCommand } from "../protocols/Aws_json1_0"; +import { de_GetQueueUrlCommand, se_GetQueueUrlCommand } from "../protocols/Aws_query"; import { ServiceInputTypes, ServiceOutputTypes, SQSClientResolvedConfig } from "../SQSClient"; /** @@ -44,8 +44,8 @@ export interface GetQueueUrlCommandOutput extends GetQueueUrlResult, __MetadataB * information about shared queue access, see * AddPermission * - * or see Allow Developers to Write Messages to a Shared Queue in the - * Amazon SQS Developer Guide.

                + * or see Allow Developers to Write Messages to a Shared Queue in the Amazon SQS + * Developer Guide.

                * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript @@ -70,37 +70,9 @@ export interface GetQueueUrlCommandOutput extends GetQueueUrlResult, __MetadataB * @see {@link GetQueueUrlCommandOutput} for command's `response` shape. * @see {@link SQSClientResolvedConfig | config} for SQSClient's `config` shape. * - * @throws {@link InvalidAddress} (client fault) - *

                The accountId is invalid.

                - * - * @throws {@link InvalidSecurity} (client fault) - *

                When the request to a queue is not HTTPS and SigV4.

                - * * @throws {@link QueueDoesNotExist} (client fault) *

                The specified queue doesn't exist.

                * - * @throws {@link RequestThrottled} (client fault) - *

                The request was denied due to request throttling.

                - *
                  - *
                • - *

                  The rate of requests per second exceeds the Amazon Web Services KMS request quota for an - * account and Region.

                  - *
                • - *
                • - *

                  A burst or sustained high rate of requests to change the state of the same KMS - * key. This condition is often known as a "hot key."

                  - *
                • - *
                • - *

                  Requests for operations on KMS keys in a Amazon Web Services CloudHSM key store - * might be throttled at a lower-than-expected rate when the Amazon Web Services - * CloudHSM cluster associated with the Amazon Web Services CloudHSM key store is - * processing numerous commands, including those unrelated to the Amazon Web Services CloudHSM key store.

                  - *
                • - *
                - * - * @throws {@link UnsupportedOperation} (client fault) - *

                Error code 400. Unsupported operation.

                - * * @throws {@link SQSServiceException} *

                Base exception class for all service exceptions from SQS service.

                * diff --git a/clients/client-sqs/src/commands/ListDeadLetterSourceQueuesCommand.ts b/clients/client-sqs/src/commands/ListDeadLetterSourceQueuesCommand.ts index 9af021df909ee..5921dab2e0a47 100644 --- a/clients/client-sqs/src/commands/ListDeadLetterSourceQueuesCommand.ts +++ b/clients/client-sqs/src/commands/ListDeadLetterSourceQueuesCommand.ts @@ -15,7 +15,7 @@ import { } from "@smithy/types"; import { ListDeadLetterSourceQueuesRequest, ListDeadLetterSourceQueuesResult } from "../models/models_0"; -import { de_ListDeadLetterSourceQueuesCommand, se_ListDeadLetterSourceQueuesCommand } from "../protocols/Aws_json1_0"; +import { de_ListDeadLetterSourceQueuesCommand, se_ListDeadLetterSourceQueuesCommand } from "../protocols/Aws_query"; import { ServiceInputTypes, ServiceOutputTypes, SQSClientResolvedConfig } from "../SQSClient"; /** @@ -76,37 +76,9 @@ export interface ListDeadLetterSourceQueuesCommandOutput extends ListDeadLetterS * @see {@link ListDeadLetterSourceQueuesCommandOutput} for command's `response` shape. * @see {@link SQSClientResolvedConfig | config} for SQSClient's `config` shape. * - * @throws {@link InvalidAddress} (client fault) - *

                The accountId is invalid.

                - * - * @throws {@link InvalidSecurity} (client fault) - *

                When the request to a queue is not HTTPS and SigV4.

                - * * @throws {@link QueueDoesNotExist} (client fault) *

                The specified queue doesn't exist.

                * - * @throws {@link RequestThrottled} (client fault) - *

                The request was denied due to request throttling.

                - *
                  - *
                • - *

                  The rate of requests per second exceeds the Amazon Web Services KMS request quota for an - * account and Region.

                  - *
                • - *
                • - *

                  A burst or sustained high rate of requests to change the state of the same KMS - * key. This condition is often known as a "hot key."

                  - *
                • - *
                • - *

                  Requests for operations on KMS keys in a Amazon Web Services CloudHSM key store - * might be throttled at a lower-than-expected rate when the Amazon Web Services - * CloudHSM cluster associated with the Amazon Web Services CloudHSM key store is - * processing numerous commands, including those unrelated to the Amazon Web Services CloudHSM key store.

                  - *
                • - *
                - * - * @throws {@link UnsupportedOperation} (client fault) - *

                Error code 400. Unsupported operation.

                - * * @throws {@link SQSServiceException} *

                Base exception class for all service exceptions from SQS service.

                * diff --git a/clients/client-sqs/src/commands/ListMessageMoveTasksCommand.ts b/clients/client-sqs/src/commands/ListMessageMoveTasksCommand.ts index b480ead1d2de7..5bdbf1cc4d553 100644 --- a/clients/client-sqs/src/commands/ListMessageMoveTasksCommand.ts +++ b/clients/client-sqs/src/commands/ListMessageMoveTasksCommand.ts @@ -15,7 +15,7 @@ import { } from "@smithy/types"; import { ListMessageMoveTasksRequest, ListMessageMoveTasksResult } from "../models/models_0"; -import { de_ListMessageMoveTasksCommand, se_ListMessageMoveTasksCommand } from "../protocols/Aws_json1_0"; +import { de_ListMessageMoveTasksCommand, se_ListMessageMoveTasksCommand } from "../protocols/Aws_query"; import { ServiceInputTypes, ServiceOutputTypes, SQSClientResolvedConfig } from "../SQSClient"; /** @@ -72,7 +72,7 @@ export interface ListMessageMoveTasksCommandOutput extends ListMessageMoveTasksR * // Results: [ // ListMessageMoveTasksResultEntryList * // { // ListMessageMoveTasksResultEntry * // TaskHandle: "STRING_VALUE", - * // Status: "RUNNING" || "FAILED" || "CANCELLING" || "CANCELLED" || "COMPLETED", + * // Status: "STRING_VALUE", * // SourceArn: "STRING_VALUE", * // DestinationArn: "STRING_VALUE", * // MaxNumberOfMessagesPerSecond: Number("int"), @@ -92,31 +92,6 @@ export interface ListMessageMoveTasksCommandOutput extends ListMessageMoveTasksR * @see {@link ListMessageMoveTasksCommandOutput} for command's `response` shape. * @see {@link SQSClientResolvedConfig | config} for SQSClient's `config` shape. * - * @throws {@link InvalidAddress} (client fault) - *

                The accountId is invalid.

                - * - * @throws {@link InvalidSecurity} (client fault) - *

                When the request to a queue is not HTTPS and SigV4.

                - * - * @throws {@link RequestThrottled} (client fault) - *

                The request was denied due to request throttling.

                - *
                  - *
                • - *

                  The rate of requests per second exceeds the Amazon Web Services KMS request quota for an - * account and Region.

                  - *
                • - *
                • - *

                  A burst or sustained high rate of requests to change the state of the same KMS - * key. This condition is often known as a "hot key."

                  - *
                • - *
                • - *

                  Requests for operations on KMS keys in a Amazon Web Services CloudHSM key store - * might be throttled at a lower-than-expected rate when the Amazon Web Services - * CloudHSM cluster associated with the Amazon Web Services CloudHSM key store is - * processing numerous commands, including those unrelated to the Amazon Web Services CloudHSM key store.

                  - *
                • - *
                - * * @throws {@link ResourceNotFoundException} (client fault) *

                One or more specified resources don't exist.

                * diff --git a/clients/client-sqs/src/commands/ListQueueTagsCommand.ts b/clients/client-sqs/src/commands/ListQueueTagsCommand.ts index 442df30953c6c..771f6757bc2bb 100644 --- a/clients/client-sqs/src/commands/ListQueueTagsCommand.ts +++ b/clients/client-sqs/src/commands/ListQueueTagsCommand.ts @@ -15,7 +15,7 @@ import { } from "@smithy/types"; import { ListQueueTagsRequest, ListQueueTagsResult } from "../models/models_0"; -import { de_ListQueueTagsCommand, se_ListQueueTagsCommand } from "../protocols/Aws_json1_0"; +import { de_ListQueueTagsCommand, se_ListQueueTagsCommand } from "../protocols/Aws_query"; import { ServiceInputTypes, ServiceOutputTypes, SQSClientResolvedConfig } from "../SQSClient"; /** @@ -37,14 +37,13 @@ export interface ListQueueTagsCommandOutput extends ListQueueTagsResult, __Metad /** * @public - *

                List all cost allocation tags added to the specified Amazon SQS queue. For an - * overview, see Tagging - * Your Amazon SQS Queues in the Amazon SQS Developer - * Guide.

                + *

                List all cost allocation tags added to the specified Amazon SQS queue. + * For an overview, see Tagging + * Your Amazon SQS Queues in the Amazon SQS Developer Guide.

                * - *

                Cross-account permissions don't apply to this action. For more information, see - * Grant cross-account permissions to a role and a username in the - * Amazon SQS Developer Guide.

                + *

                Cross-account permissions don't apply to this action. For more information, + * see Grant + * cross-account permissions to a role and a username in the Amazon SQS Developer Guide.

                *
                * @example * Use a bare-bones client and the command you need to make an API call. @@ -71,37 +70,6 @@ export interface ListQueueTagsCommandOutput extends ListQueueTagsResult, __Metad * @see {@link ListQueueTagsCommandOutput} for command's `response` shape. * @see {@link SQSClientResolvedConfig | config} for SQSClient's `config` shape. * - * @throws {@link InvalidAddress} (client fault) - *

                The accountId is invalid.

                - * - * @throws {@link InvalidSecurity} (client fault) - *

                When the request to a queue is not HTTPS and SigV4.

                - * - * @throws {@link QueueDoesNotExist} (client fault) - *

                The specified queue doesn't exist.

                - * - * @throws {@link RequestThrottled} (client fault) - *

                The request was denied due to request throttling.

                - *
                  - *
                • - *

                  The rate of requests per second exceeds the Amazon Web Services KMS request quota for an - * account and Region.

                  - *
                • - *
                • - *

                  A burst or sustained high rate of requests to change the state of the same KMS - * key. This condition is often known as a "hot key."

                  - *
                • - *
                • - *

                  Requests for operations on KMS keys in a Amazon Web Services CloudHSM key store - * might be throttled at a lower-than-expected rate when the Amazon Web Services - * CloudHSM cluster associated with the Amazon Web Services CloudHSM key store is - * processing numerous commands, including those unrelated to the Amazon Web Services CloudHSM key store.

                  - *
                • - *
                - * - * @throws {@link UnsupportedOperation} (client fault) - *

                Error code 400. Unsupported operation.

                - * * @throws {@link SQSServiceException} *

                Base exception class for all service exceptions from SQS service.

                * diff --git a/clients/client-sqs/src/commands/ListQueuesCommand.ts b/clients/client-sqs/src/commands/ListQueuesCommand.ts index a7bae57c1ffa8..c0ce110a55eba 100644 --- a/clients/client-sqs/src/commands/ListQueuesCommand.ts +++ b/clients/client-sqs/src/commands/ListQueuesCommand.ts @@ -15,7 +15,7 @@ import { } from "@smithy/types"; import { ListQueuesRequest, ListQueuesResult } from "../models/models_0"; -import { de_ListQueuesCommand, se_ListQueuesCommand } from "../protocols/Aws_json1_0"; +import { de_ListQueuesCommand, se_ListQueuesCommand } from "../protocols/Aws_query"; import { ServiceInputTypes, ServiceOutputTypes, SQSClientResolvedConfig } from "../SQSClient"; /** @@ -49,9 +49,9 @@ export interface ListQueuesCommandOutput extends ListQueuesResult, __MetadataBea * Use NextToken as a parameter in your next request to * listQueues to receive the next page of results.

                * - *

                Cross-account permissions don't apply to this action. For more information, see - * Grant cross-account permissions to a role and a username in the - * Amazon SQS Developer Guide.

                + *

                Cross-account permissions don't apply to this action. For more information, + * see Grant + * cross-account permissions to a role and a username in the Amazon SQS Developer Guide.

                *
                * @example * Use a bare-bones client and the command you need to make an API call. @@ -67,10 +67,10 @@ export interface ListQueuesCommandOutput extends ListQueuesResult, __MetadataBea * const command = new ListQueuesCommand(input); * const response = await client.send(command); * // { // ListQueuesResult + * // NextToken: "STRING_VALUE", * // QueueUrls: [ // QueueUrlList * // "STRING_VALUE", * // ], - * // NextToken: "STRING_VALUE", * // }; * * ``` @@ -81,34 +81,6 @@ export interface ListQueuesCommandOutput extends ListQueuesResult, __MetadataBea * @see {@link ListQueuesCommandOutput} for command's `response` shape. * @see {@link SQSClientResolvedConfig | config} for SQSClient's `config` shape. * - * @throws {@link InvalidAddress} (client fault) - *

                The accountId is invalid.

                - * - * @throws {@link InvalidSecurity} (client fault) - *

                When the request to a queue is not HTTPS and SigV4.

                - * - * @throws {@link RequestThrottled} (client fault) - *

                The request was denied due to request throttling.

                - *
                  - *
                • - *

                  The rate of requests per second exceeds the Amazon Web Services KMS request quota for an - * account and Region.

                  - *
                • - *
                • - *

                  A burst or sustained high rate of requests to change the state of the same KMS - * key. This condition is often known as a "hot key."

                  - *
                • - *
                • - *

                  Requests for operations on KMS keys in a Amazon Web Services CloudHSM key store - * might be throttled at a lower-than-expected rate when the Amazon Web Services - * CloudHSM cluster associated with the Amazon Web Services CloudHSM key store is - * processing numerous commands, including those unrelated to the Amazon Web Services CloudHSM key store.

                  - *
                • - *
                - * - * @throws {@link UnsupportedOperation} (client fault) - *

                Error code 400. Unsupported operation.

                - * * @throws {@link SQSServiceException} *

                Base exception class for all service exceptions from SQS service.

                * diff --git a/clients/client-sqs/src/commands/PurgeQueueCommand.ts b/clients/client-sqs/src/commands/PurgeQueueCommand.ts index e9a08bd26c19f..a9fba13147c6c 100644 --- a/clients/client-sqs/src/commands/PurgeQueueCommand.ts +++ b/clients/client-sqs/src/commands/PurgeQueueCommand.ts @@ -15,7 +15,7 @@ import { } from "@smithy/types"; import { PurgeQueueRequest } from "../models/models_0"; -import { de_PurgeQueueCommand, se_PurgeQueueCommand } from "../protocols/Aws_json1_0"; +import { de_PurgeQueueCommand, se_PurgeQueueCommand } from "../protocols/Aws_query"; import { ServiceInputTypes, ServiceOutputTypes, SQSClientResolvedConfig } from "../SQSClient"; /** @@ -71,12 +71,6 @@ export interface PurgeQueueCommandOutput extends __MetadataBearer {} * @see {@link PurgeQueueCommandOutput} for command's `response` shape. * @see {@link SQSClientResolvedConfig | config} for SQSClient's `config` shape. * - * @throws {@link InvalidAddress} (client fault) - *

                The accountId is invalid.

                - * - * @throws {@link InvalidSecurity} (client fault) - *

                When the request to a queue is not HTTPS and SigV4.

                - * * @throws {@link PurgeQueueInProgress} (client fault) *

                Indicates that the specified queue previously received a PurgeQueue * request within the last 60 seconds (the time it can take to delete the messages in the @@ -85,28 +79,6 @@ export interface PurgeQueueCommandOutput extends __MetadataBearer {} * @throws {@link QueueDoesNotExist} (client fault) *

                The specified queue doesn't exist.

                * - * @throws {@link RequestThrottled} (client fault) - *

                The request was denied due to request throttling.

                - *
                  - *
                • - *

                  The rate of requests per second exceeds the Amazon Web Services KMS request quota for an - * account and Region.

                  - *
                • - *
                • - *

                  A burst or sustained high rate of requests to change the state of the same KMS - * key. This condition is often known as a "hot key."

                  - *
                • - *
                • - *

                  Requests for operations on KMS keys in a Amazon Web Services CloudHSM key store - * might be throttled at a lower-than-expected rate when the Amazon Web Services - * CloudHSM cluster associated with the Amazon Web Services CloudHSM key store is - * processing numerous commands, including those unrelated to the Amazon Web Services CloudHSM key store.

                  - *
                • - *
                - * - * @throws {@link UnsupportedOperation} (client fault) - *

                Error code 400. Unsupported operation.

                - * * @throws {@link SQSServiceException} *

                Base exception class for all service exceptions from SQS service.

                * diff --git a/clients/client-sqs/src/commands/ReceiveMessageCommand.ts b/clients/client-sqs/src/commands/ReceiveMessageCommand.ts index f4281554c95ce..46e5a979f50ce 100644 --- a/clients/client-sqs/src/commands/ReceiveMessageCommand.ts +++ b/clients/client-sqs/src/commands/ReceiveMessageCommand.ts @@ -16,7 +16,7 @@ import { } from "@smithy/types"; import { ReceiveMessageRequest, ReceiveMessageResult } from "../models/models_0"; -import { de_ReceiveMessageCommand, se_ReceiveMessageCommand } from "../protocols/Aws_json1_0"; +import { de_ReceiveMessageCommand, se_ReceiveMessageCommand } from "../protocols/Aws_query"; import { ServiceInputTypes, ServiceOutputTypes, SQSClientResolvedConfig } from "../SQSClient"; /** @@ -40,8 +40,8 @@ export interface ReceiveMessageCommandOutput extends ReceiveMessageResult, __Met * @public *

                Retrieves one or more messages (up to 10), from the specified queue. Using the * WaitTimeSeconds parameter enables long-poll support. For more - * information, see Amazon - * SQS Long Polling in the Amazon SQS Developer Guide.

                + * information, see Amazon SQS + * Long Polling in the Amazon SQS Developer Guide.

                *

                Short poll is the default behavior where a weighted random set of machines is sampled * on a ReceiveMessage call. Thus, only the messages on the sampled machines * are returned. If the number of messages in the queue is small (fewer than 1,000), you @@ -75,17 +75,15 @@ export interface ReceiveMessageCommandOutput extends ReceiveMessageResult, __Met * more information, see Queue and Message Identifiers in the Amazon SQS Developer * Guide.

                *

                You can provide the VisibilityTimeout parameter in your request. The - * parameter is applied to the messages that Amazon SQS returns in the response. If you - * don't include the parameter, the overall visibility timeout for the queue is used for - * the returned messages. For more information, see Visibility Timeout in the Amazon SQS Developer + * parameter is applied to the messages that Amazon SQS returns in the response. If you don't + * include the parameter, the overall visibility timeout for the queue is used for the + * returned messages. For more information, see Visibility Timeout in the Amazon SQS Developer * Guide.

                *

                A message that isn't deleted or a message whose visibility isn't extended before the * visibility timeout expires counts as a failed receive. Depending on the configuration of * the queue, the message might be sent to the dead-letter queue.

                * - *

                In the future, new attributes might be added. If you write code that calls this - * action, we recommend that you structure your code so that it can handle new - * attributes gracefully.

                + *

                In the future, new attributes might be added. If you write code that calls this action, we recommend that you structure your code so that it can handle new attributes gracefully.

                *
                * @example * Use a bare-bones client and the command you need to make an API call. @@ -144,77 +142,12 @@ export interface ReceiveMessageCommandOutput extends ReceiveMessageResult, __Met * @see {@link ReceiveMessageCommandOutput} for command's `response` shape. * @see {@link SQSClientResolvedConfig | config} for SQSClient's `config` shape. * - * @throws {@link InvalidAddress} (client fault) - *

                The accountId is invalid.

                - * - * @throws {@link InvalidSecurity} (client fault) - *

                When the request to a queue is not HTTPS and SigV4.

                - * - * @throws {@link KmsAccessDenied} (client fault) - *

                The caller doesn't have the required KMS access.

                - * - * @throws {@link KmsDisabled} (client fault) - *

                The request was denied due to request throttling.

                - * - * @throws {@link KmsInvalidKeyUsage} (client fault) - *

                The request was rejected for one of the following reasons:

                - *
                  - *
                • - *

                  The KeyUsage value of the KMS key is incompatible with the API - * operation.

                  - *
                • - *
                • - *

                  The encryption algorithm or signing algorithm specified for the operation is - * incompatible with the type of key material in the KMS key (KeySpec).

                  - *
                • - *
                - * - * @throws {@link KmsInvalidState} (client fault) - *

                The request was rejected because the state of the specified resource is not valid for - * this request.

                - * - * @throws {@link KmsNotFound} (client fault) - *

                The request was rejected because the specified entity or resource could not be found. - *

                - * - * @throws {@link KmsOptInRequired} (client fault) - *

                The request was rejected because the specified key policy isn't syntactically or - * semantically correct.

                - * - * @throws {@link KmsThrottled} (client fault) - *

                Amazon Web Services KMS throttles requests for the following conditions.

                - * * @throws {@link OverLimit} (client fault) *

                The specified action violates a limit. For example, ReceiveMessage * returns this error if the maximum number of in flight messages is reached and * AddPermission returns this error if the maximum number of permissions * for the queue is reached.

                * - * @throws {@link QueueDoesNotExist} (client fault) - *

                The specified queue doesn't exist.

                - * - * @throws {@link RequestThrottled} (client fault) - *

                The request was denied due to request throttling.

                - *
                  - *
                • - *

                  The rate of requests per second exceeds the Amazon Web Services KMS request quota for an - * account and Region.

                  - *
                • - *
                • - *

                  A burst or sustained high rate of requests to change the state of the same KMS - * key. This condition is often known as a "hot key."

                  - *
                • - *
                • - *

                  Requests for operations on KMS keys in a Amazon Web Services CloudHSM key store - * might be throttled at a lower-than-expected rate when the Amazon Web Services - * CloudHSM cluster associated with the Amazon Web Services CloudHSM key store is - * processing numerous commands, including those unrelated to the Amazon Web Services CloudHSM key store.

                  - *
                • - *
                - * - * @throws {@link UnsupportedOperation} (client fault) - *

                Error code 400. Unsupported operation.

                - * * @throws {@link SQSServiceException} *

                Base exception class for all service exceptions from SQS service.

                * diff --git a/clients/client-sqs/src/commands/RemovePermissionCommand.ts b/clients/client-sqs/src/commands/RemovePermissionCommand.ts index 92a1a9cf8def4..822ff1e30e777 100644 --- a/clients/client-sqs/src/commands/RemovePermissionCommand.ts +++ b/clients/client-sqs/src/commands/RemovePermissionCommand.ts @@ -15,7 +15,7 @@ import { } from "@smithy/types"; import { RemovePermissionRequest } from "../models/models_0"; -import { de_RemovePermissionCommand, se_RemovePermissionCommand } from "../protocols/Aws_json1_0"; +import { de_RemovePermissionCommand, se_RemovePermissionCommand } from "../protocols/Aws_query"; import { ServiceInputTypes, ServiceOutputTypes, SQSClientResolvedConfig } from "../SQSClient"; /** @@ -45,14 +45,12 @@ export interface RemovePermissionCommandOutput extends __MetadataBearer {} *

                Only the owner of a queue can remove permissions from it.

                * *
              • - *

                Cross-account permissions don't apply to this action. For more - * information, see Grant cross-account permissions to a role and a username in the - * Amazon SQS Developer Guide.

                + *

                Cross-account permissions don't apply to this action. For more information, + * see Grant + * cross-account permissions to a role and a username in the Amazon SQS Developer Guide.

                *
              • *
              • - *

                To remove the ability to change queue permissions, you must deny - * permission to the AddPermission, RemovePermission, - * and SetQueueAttributes actions in your IAM policy.

                + *

                To remove the ability to change queue permissions, you must deny permission to the AddPermission, RemovePermission, and SetQueueAttributes actions in your IAM policy.

                *
              • *
              * @@ -78,37 +76,6 @@ export interface RemovePermissionCommandOutput extends __MetadataBearer {} * @see {@link RemovePermissionCommandOutput} for command's `response` shape. * @see {@link SQSClientResolvedConfig | config} for SQSClient's `config` shape. * - * @throws {@link InvalidAddress} (client fault) - *

              The accountId is invalid.

              - * - * @throws {@link InvalidSecurity} (client fault) - *

              When the request to a queue is not HTTPS and SigV4.

              - * - * @throws {@link QueueDoesNotExist} (client fault) - *

              The specified queue doesn't exist.

              - * - * @throws {@link RequestThrottled} (client fault) - *

              The request was denied due to request throttling.

              - *
                - *
              • - *

                The rate of requests per second exceeds the Amazon Web Services KMS request quota for an - * account and Region.

                - *
              • - *
              • - *

                A burst or sustained high rate of requests to change the state of the same KMS - * key. This condition is often known as a "hot key."

                - *
              • - *
              • - *

                Requests for operations on KMS keys in a Amazon Web Services CloudHSM key store - * might be throttled at a lower-than-expected rate when the Amazon Web Services - * CloudHSM cluster associated with the Amazon Web Services CloudHSM key store is - * processing numerous commands, including those unrelated to the Amazon Web Services CloudHSM key store.

                - *
              • - *
              - * - * @throws {@link UnsupportedOperation} (client fault) - *

              Error code 400. Unsupported operation.

              - * * @throws {@link SQSServiceException} *

              Base exception class for all service exceptions from SQS service.

              * diff --git a/clients/client-sqs/src/commands/SendMessageBatchCommand.ts b/clients/client-sqs/src/commands/SendMessageBatchCommand.ts index e6a6946dd5a03..2f9aeb3e5b3e8 100644 --- a/clients/client-sqs/src/commands/SendMessageBatchCommand.ts +++ b/clients/client-sqs/src/commands/SendMessageBatchCommand.ts @@ -16,7 +16,7 @@ import { } from "@smithy/types"; import { SendMessageBatchRequest, SendMessageBatchResult } from "../models/models_0"; -import { de_SendMessageBatchCommand, se_SendMessageBatchCommand } from "../protocols/Aws_json1_0"; +import { de_SendMessageBatchCommand, se_SendMessageBatchCommand } from "../protocols/Aws_query"; import { ServiceInputTypes, ServiceOutputTypes, SQSClientResolvedConfig } from "../SQSClient"; /** @@ -41,29 +41,22 @@ export interface SendMessageBatchCommandOutput extends SendMessageBatchResult, _ *

              You can use SendMessageBatch to send up to 10 messages to the specified * queue by assigning either identical or different values to each message (or by not * assigning values at all). This is a batch version of - * SendMessage. For a FIFO queue, multiple messages within a single batch are enqueued in - * the order they are sent.

              - *

              The result of sending each message is reported individually in the response. Because - * the batch request can result in a combination of successful and unsuccessful actions, - * you should check for batch errors even when the call returns an HTTP status code of - * 200.

              + * SendMessage. For a FIFO queue, multiple messages within a single batch are enqueued + * in the order they are sent.

              + *

              The result of sending each message is reported individually in the response. + * Because the batch request can result in a combination of successful and unsuccessful actions, you should check for batch errors even when the call returns an HTTP status code of 200.

              *

              The maximum allowed individual message size and the maximum total payload size (the * sum of the individual lengths of all of the batched messages) are both 256 KiB (262,144 * bytes).

              * - *

              A message can include only XML, JSON, and unformatted text. The following Unicode - * characters are allowed:

              + *

              A message can include only XML, JSON, and unformatted text. The following Unicode characters are allowed:

              *

              - * #x9 | #xA | #xD | #x20 to - * #xD7FF | #xE000 to #xFFFD | - * #x10000 to #x10FFFF + * #x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF *

              - *

              Any characters not included in this list will be rejected. For more information, - * see the W3C specification for - * characters.

              + *

              Any characters not included in this list will be rejected. For more information, see the W3C specification for characters.

              *
              - *

              If you don't specify the DelaySeconds parameter for an entry, Amazon SQS - * uses the default value for the queue.

              + *

              If you don't specify the DelaySeconds parameter for an entry, Amazon SQS uses + * the default value for the queue.

              * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript @@ -148,72 +141,10 @@ export interface SendMessageBatchCommandOutput extends SendMessageBatchResult, _ * @throws {@link EmptyBatchRequest} (client fault) *

              The batch request doesn't contain any entries.

              * - * @throws {@link InvalidAddress} (client fault) - *

              The accountId is invalid.

              - * * @throws {@link InvalidBatchEntryId} (client fault) *

              The Id of a batch entry in a batch request doesn't abide by the * specification.

              * - * @throws {@link InvalidSecurity} (client fault) - *

              When the request to a queue is not HTTPS and SigV4.

              - * - * @throws {@link KmsAccessDenied} (client fault) - *

              The caller doesn't have the required KMS access.

              - * - * @throws {@link KmsDisabled} (client fault) - *

              The request was denied due to request throttling.

              - * - * @throws {@link KmsInvalidKeyUsage} (client fault) - *

              The request was rejected for one of the following reasons:

              - *
                - *
              • - *

                The KeyUsage value of the KMS key is incompatible with the API - * operation.

                - *
              • - *
              • - *

                The encryption algorithm or signing algorithm specified for the operation is - * incompatible with the type of key material in the KMS key (KeySpec).

                - *
              • - *
              - * - * @throws {@link KmsInvalidState} (client fault) - *

              The request was rejected because the state of the specified resource is not valid for - * this request.

              - * - * @throws {@link KmsNotFound} (client fault) - *

              The request was rejected because the specified entity or resource could not be found. - *

              - * - * @throws {@link KmsOptInRequired} (client fault) - *

              The request was rejected because the specified key policy isn't syntactically or - * semantically correct.

              - * - * @throws {@link KmsThrottled} (client fault) - *

              Amazon Web Services KMS throttles requests for the following conditions.

              - * - * @throws {@link QueueDoesNotExist} (client fault) - *

              The specified queue doesn't exist.

              - * - * @throws {@link RequestThrottled} (client fault) - *

              The request was denied due to request throttling.

              - *
                - *
              • - *

                The rate of requests per second exceeds the Amazon Web Services KMS request quota for an - * account and Region.

                - *
              • - *
              • - *

                A burst or sustained high rate of requests to change the state of the same KMS - * key. This condition is often known as a "hot key."

                - *
              • - *
              • - *

                Requests for operations on KMS keys in a Amazon Web Services CloudHSM key store - * might be throttled at a lower-than-expected rate when the Amazon Web Services - * CloudHSM cluster associated with the Amazon Web Services CloudHSM key store is - * processing numerous commands, including those unrelated to the Amazon Web Services CloudHSM key store.

                - *
              • - *
              - * * @throws {@link TooManyEntriesInBatchRequest} (client fault) *

              The batch request contains more entries than permissible.

              * diff --git a/clients/client-sqs/src/commands/SendMessageCommand.ts b/clients/client-sqs/src/commands/SendMessageCommand.ts index 0d74fc2256f95..94401201b7546 100644 --- a/clients/client-sqs/src/commands/SendMessageCommand.ts +++ b/clients/client-sqs/src/commands/SendMessageCommand.ts @@ -16,7 +16,7 @@ import { } from "@smithy/types"; import { SendMessageRequest, SendMessageResult } from "../models/models_0"; -import { de_SendMessageCommand, se_SendMessageCommand } from "../protocols/Aws_json1_0"; +import { de_SendMessageCommand, se_SendMessageCommand } from "../protocols/Aws_query"; import { ServiceInputTypes, ServiceOutputTypes, SQSClientResolvedConfig } from "../SQSClient"; /** @@ -40,16 +40,11 @@ export interface SendMessageCommandOutput extends SendMessageResult, __MetadataB * @public *

              Delivers a message to the specified queue.

              * - *

              A message can include only XML, JSON, and unformatted text. The following Unicode - * characters are allowed:

              + *

              A message can include only XML, JSON, and unformatted text. The following Unicode characters are allowed:

              *

              - * #x9 | #xA | #xD | #x20 to - * #xD7FF | #xE000 to #xFFFD | - * #x10000 to #x10FFFF + * #x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF *

              - *

              Any characters not included in this list will be rejected. For more information, - * see the W3C specification for - * characters.

              + *

              Any characters not included in this list will be rejected. For more information, see the W3C specification for characters.

              *
              * @example * Use a bare-bones client and the command you need to make an API call. @@ -108,71 +103,9 @@ export interface SendMessageCommandOutput extends SendMessageResult, __MetadataB * @see {@link SendMessageCommandOutput} for command's `response` shape. * @see {@link SQSClientResolvedConfig | config} for SQSClient's `config` shape. * - * @throws {@link InvalidAddress} (client fault) - *

              The accountId is invalid.

              - * * @throws {@link InvalidMessageContents} (client fault) *

              The message contains characters outside the allowed set.

              * - * @throws {@link InvalidSecurity} (client fault) - *

              When the request to a queue is not HTTPS and SigV4.

              - * - * @throws {@link KmsAccessDenied} (client fault) - *

              The caller doesn't have the required KMS access.

              - * - * @throws {@link KmsDisabled} (client fault) - *

              The request was denied due to request throttling.

              - * - * @throws {@link KmsInvalidKeyUsage} (client fault) - *

              The request was rejected for one of the following reasons:

              - *
                - *
              • - *

                The KeyUsage value of the KMS key is incompatible with the API - * operation.

                - *
              • - *
              • - *

                The encryption algorithm or signing algorithm specified for the operation is - * incompatible with the type of key material in the KMS key (KeySpec).

                - *
              • - *
              - * - * @throws {@link KmsInvalidState} (client fault) - *

              The request was rejected because the state of the specified resource is not valid for - * this request.

              - * - * @throws {@link KmsNotFound} (client fault) - *

              The request was rejected because the specified entity or resource could not be found. - *

              - * - * @throws {@link KmsOptInRequired} (client fault) - *

              The request was rejected because the specified key policy isn't syntactically or - * semantically correct.

              - * - * @throws {@link KmsThrottled} (client fault) - *

              Amazon Web Services KMS throttles requests for the following conditions.

              - * - * @throws {@link QueueDoesNotExist} (client fault) - *

              The specified queue doesn't exist.

              - * - * @throws {@link RequestThrottled} (client fault) - *

              The request was denied due to request throttling.

              - *
                - *
              • - *

                The rate of requests per second exceeds the Amazon Web Services KMS request quota for an - * account and Region.

                - *
              • - *
              • - *

                A burst or sustained high rate of requests to change the state of the same KMS - * key. This condition is often known as a "hot key."

                - *
              • - *
              • - *

                Requests for operations on KMS keys in a Amazon Web Services CloudHSM key store - * might be throttled at a lower-than-expected rate when the Amazon Web Services - * CloudHSM cluster associated with the Amazon Web Services CloudHSM key store is - * processing numerous commands, including those unrelated to the Amazon Web Services CloudHSM key store.

                - *
              • - *
              - * * @throws {@link UnsupportedOperation} (client fault) *

              Error code 400. Unsupported operation.

              * diff --git a/clients/client-sqs/src/commands/SetQueueAttributesCommand.ts b/clients/client-sqs/src/commands/SetQueueAttributesCommand.ts index aed92331e9338..4d30bdc7a1fd6 100644 --- a/clients/client-sqs/src/commands/SetQueueAttributesCommand.ts +++ b/clients/client-sqs/src/commands/SetQueueAttributesCommand.ts @@ -15,7 +15,7 @@ import { } from "@smithy/types"; import { SetQueueAttributesRequest } from "../models/models_0"; -import { de_SetQueueAttributesCommand, se_SetQueueAttributesCommand } from "../protocols/Aws_json1_0"; +import { de_SetQueueAttributesCommand, se_SetQueueAttributesCommand } from "../protocols/Aws_query"; import { ServiceInputTypes, ServiceOutputTypes, SQSClientResolvedConfig } from "../SQSClient"; /** @@ -39,26 +39,22 @@ export interface SetQueueAttributesCommandOutput extends __MetadataBearer {} * @public *

              Sets the value of one or more queue attributes. When you change a queue's attributes, * the change can take up to 60 seconds for most of the attributes to propagate throughout - * the Amazon SQS system. Changes made to the MessageRetentionPeriod attribute - * can take up to 15 minutes and will impact existing messages in the queue potentially - * causing them to be expired and deleted if the MessageRetentionPeriod is - * reduced below the age of existing messages.

              + * the Amazon SQS system. Changes made to the MessageRetentionPeriod attribute can + * take up to 15 minutes and will impact existing messages in the queue potentially causing + * them to be expired and deleted if the MessageRetentionPeriod is reduced + * below the age of existing messages.

              * *
                *
              • - *

                In the future, new attributes might be added. If you write code that calls - * this action, we recommend that you structure your code so that it can handle - * new attributes gracefully.

                + *

                In the future, new attributes might be added. If you write code that calls this action, we recommend that you structure your code so that it can handle new attributes gracefully.

                *
              • *
              • - *

                Cross-account permissions don't apply to this action. For more - * information, see Grant cross-account permissions to a role and a username in the - * Amazon SQS Developer Guide.

                + *

                Cross-account permissions don't apply to this action. For more information, + * see Grant + * cross-account permissions to a role and a username in the Amazon SQS Developer Guide.

                *
              • *
              • - *

                To remove the ability to change queue permissions, you must deny - * permission to the AddPermission, RemovePermission, - * and SetQueueAttributes actions in your IAM policy.

                + *

                To remove the ability to change queue permissions, you must deny permission to the AddPermission, RemovePermission, and SetQueueAttributes actions in your IAM policy.

                *
              • *
              *
              @@ -86,49 +82,9 @@ export interface SetQueueAttributesCommandOutput extends __MetadataBearer {} * @see {@link SetQueueAttributesCommandOutput} for command's `response` shape. * @see {@link SQSClientResolvedConfig | config} for SQSClient's `config` shape. * - * @throws {@link InvalidAddress} (client fault) - *

              The accountId is invalid.

              - * * @throws {@link InvalidAttributeName} (client fault) *

              The specified attribute doesn't exist.

              * - * @throws {@link InvalidAttributeValue} (client fault) - *

              A queue attribute value is invalid.

              - * - * @throws {@link InvalidSecurity} (client fault) - *

              When the request to a queue is not HTTPS and SigV4.

              - * - * @throws {@link OverLimit} (client fault) - *

              The specified action violates a limit. For example, ReceiveMessage - * returns this error if the maximum number of in flight messages is reached and - * AddPermission returns this error if the maximum number of permissions - * for the queue is reached.

              - * - * @throws {@link QueueDoesNotExist} (client fault) - *

              The specified queue doesn't exist.

              - * - * @throws {@link RequestThrottled} (client fault) - *

              The request was denied due to request throttling.

              - *
                - *
              • - *

                The rate of requests per second exceeds the Amazon Web Services KMS request quota for an - * account and Region.

                - *
              • - *
              • - *

                A burst or sustained high rate of requests to change the state of the same KMS - * key. This condition is often known as a "hot key."

                - *
              • - *
              • - *

                Requests for operations on KMS keys in a Amazon Web Services CloudHSM key store - * might be throttled at a lower-than-expected rate when the Amazon Web Services - * CloudHSM cluster associated with the Amazon Web Services CloudHSM key store is - * processing numerous commands, including those unrelated to the Amazon Web Services CloudHSM key store.

                - *
              • - *
              - * - * @throws {@link UnsupportedOperation} (client fault) - *

              Error code 400. Unsupported operation.

              - * * @throws {@link SQSServiceException} *

              Base exception class for all service exceptions from SQS service.

              * diff --git a/clients/client-sqs/src/commands/StartMessageMoveTaskCommand.ts b/clients/client-sqs/src/commands/StartMessageMoveTaskCommand.ts index e9489607a6cd1..de5d1a8e0582c 100644 --- a/clients/client-sqs/src/commands/StartMessageMoveTaskCommand.ts +++ b/clients/client-sqs/src/commands/StartMessageMoveTaskCommand.ts @@ -15,7 +15,7 @@ import { } from "@smithy/types"; import { StartMessageMoveTaskRequest, StartMessageMoveTaskResult } from "../models/models_0"; -import { de_StartMessageMoveTaskCommand, se_StartMessageMoveTaskCommand } from "../protocols/Aws_json1_0"; +import { de_StartMessageMoveTaskCommand, se_StartMessageMoveTaskCommand } from "../protocols/Aws_query"; import { ServiceInputTypes, ServiceOutputTypes, SQSClientResolvedConfig } from "../SQSClient"; /** @@ -88,31 +88,6 @@ export interface StartMessageMoveTaskCommandOutput extends StartMessageMoveTaskR * @see {@link StartMessageMoveTaskCommandOutput} for command's `response` shape. * @see {@link SQSClientResolvedConfig | config} for SQSClient's `config` shape. * - * @throws {@link InvalidAddress} (client fault) - *

              The accountId is invalid.

              - * - * @throws {@link InvalidSecurity} (client fault) - *

              When the request to a queue is not HTTPS and SigV4.

              - * - * @throws {@link RequestThrottled} (client fault) - *

              The request was denied due to request throttling.

              - *
                - *
              • - *

                The rate of requests per second exceeds the Amazon Web Services KMS request quota for an - * account and Region.

                - *
              • - *
              • - *

                A burst or sustained high rate of requests to change the state of the same KMS - * key. This condition is often known as a "hot key."

                - *
              • - *
              • - *

                Requests for operations on KMS keys in a Amazon Web Services CloudHSM key store - * might be throttled at a lower-than-expected rate when the Amazon Web Services - * CloudHSM cluster associated with the Amazon Web Services CloudHSM key store is - * processing numerous commands, including those unrelated to the Amazon Web Services CloudHSM key store.

                - *
              • - *
              - * * @throws {@link ResourceNotFoundException} (client fault) *

              One or more specified resources don't exist.

              * diff --git a/clients/client-sqs/src/commands/TagQueueCommand.ts b/clients/client-sqs/src/commands/TagQueueCommand.ts index 9785c18f2f29d..505548e8f3746 100644 --- a/clients/client-sqs/src/commands/TagQueueCommand.ts +++ b/clients/client-sqs/src/commands/TagQueueCommand.ts @@ -15,7 +15,7 @@ import { } from "@smithy/types"; import { TagQueueRequest } from "../models/models_0"; -import { de_TagQueueCommand, se_TagQueueCommand } from "../protocols/Aws_json1_0"; +import { de_TagQueueCommand, se_TagQueueCommand } from "../protocols/Aws_query"; import { ServiceInputTypes, ServiceOutputTypes, SQSClientResolvedConfig } from "../SQSClient"; /** @@ -37,33 +37,30 @@ export interface TagQueueCommandOutput extends __MetadataBearer {} /** * @public - *

              Add cost allocation tags to the specified Amazon SQS queue. For an overview, see - * Tagging - * Your Amazon SQS Queues in the Amazon SQS Developer - * Guide.

              + *

              Add cost allocation tags to the specified Amazon SQS queue. For an overview, see Tagging + * Your Amazon SQS Queues in the Amazon SQS Developer Guide.

              *

              When you use queue tags, keep the following guidelines in mind:

              *
                *
              • *

                Adding more than 50 tags to a queue isn't recommended.

                *
              • *
              • - *

                Tags don't have any semantic meaning. Amazon SQS interprets tags as character - * strings.

                + *

                Tags don't have any semantic meaning. Amazon SQS interprets tags as character strings.

                *
              • *
              • *

                Tags are case-sensitive.

                *
              • *
              • - *

                A new tag with a key identical to that of an existing tag overwrites the - * existing tag.

                + *

                A new tag with a key identical to that of an existing tag overwrites the existing tag.

                *
              • *
              - *

              For a full list of tag restrictions, see Quotas related to queues in the Amazon SQS Developer - * Guide.

              + *

              For a full list of tag restrictions, see + * Quotas related to queues + * in the Amazon SQS Developer Guide.

              * - *

              Cross-account permissions don't apply to this action. For more information, see - * Grant cross-account permissions to a role and a username in the - * Amazon SQS Developer Guide.

              + *

              Cross-account permissions don't apply to this action. For more information, + * see Grant + * cross-account permissions to a role and a username in the Amazon SQS Developer Guide.

              *
              * @example * Use a bare-bones client and the command you need to make an API call. @@ -89,37 +86,6 @@ export interface TagQueueCommandOutput extends __MetadataBearer {} * @see {@link TagQueueCommandOutput} for command's `response` shape. * @see {@link SQSClientResolvedConfig | config} for SQSClient's `config` shape. * - * @throws {@link InvalidAddress} (client fault) - *

              The accountId is invalid.

              - * - * @throws {@link InvalidSecurity} (client fault) - *

              When the request to a queue is not HTTPS and SigV4.

              - * - * @throws {@link QueueDoesNotExist} (client fault) - *

              The specified queue doesn't exist.

              - * - * @throws {@link RequestThrottled} (client fault) - *

              The request was denied due to request throttling.

              - *
                - *
              • - *

                The rate of requests per second exceeds the Amazon Web Services KMS request quota for an - * account and Region.

                - *
              • - *
              • - *

                A burst or sustained high rate of requests to change the state of the same KMS - * key. This condition is often known as a "hot key."

                - *
              • - *
              • - *

                Requests for operations on KMS keys in a Amazon Web Services CloudHSM key store - * might be throttled at a lower-than-expected rate when the Amazon Web Services - * CloudHSM cluster associated with the Amazon Web Services CloudHSM key store is - * processing numerous commands, including those unrelated to the Amazon Web Services CloudHSM key store.

                - *
              • - *
              - * - * @throws {@link UnsupportedOperation} (client fault) - *

              Error code 400. Unsupported operation.

              - * * @throws {@link SQSServiceException} *

              Base exception class for all service exceptions from SQS service.

              * diff --git a/clients/client-sqs/src/commands/UntagQueueCommand.ts b/clients/client-sqs/src/commands/UntagQueueCommand.ts index f0113c4971915..93ee98bec1d19 100644 --- a/clients/client-sqs/src/commands/UntagQueueCommand.ts +++ b/clients/client-sqs/src/commands/UntagQueueCommand.ts @@ -15,7 +15,7 @@ import { } from "@smithy/types"; import { UntagQueueRequest } from "../models/models_0"; -import { de_UntagQueueCommand, se_UntagQueueCommand } from "../protocols/Aws_json1_0"; +import { de_UntagQueueCommand, se_UntagQueueCommand } from "../protocols/Aws_query"; import { ServiceInputTypes, ServiceOutputTypes, SQSClientResolvedConfig } from "../SQSClient"; /** @@ -37,14 +37,12 @@ export interface UntagQueueCommandOutput extends __MetadataBearer {} /** * @public - *

              Remove cost allocation tags from the specified Amazon SQS queue. For an overview, see - * Tagging - * Your Amazon SQS Queues in the Amazon SQS Developer - * Guide.

              + *

              Remove cost allocation tags from the specified Amazon SQS queue. For an overview, see Tagging + * Your Amazon SQS Queues in the Amazon SQS Developer Guide.

              * - *

              Cross-account permissions don't apply to this action. For more information, see - * Grant cross-account permissions to a role and a username in the - * Amazon SQS Developer Guide.

              + *

              Cross-account permissions don't apply to this action. For more information, + * see Grant + * cross-account permissions to a role and a username in the Amazon SQS Developer Guide.

              *
              * @example * Use a bare-bones client and the command you need to make an API call. @@ -70,37 +68,6 @@ export interface UntagQueueCommandOutput extends __MetadataBearer {} * @see {@link UntagQueueCommandOutput} for command's `response` shape. * @see {@link SQSClientResolvedConfig | config} for SQSClient's `config` shape. * - * @throws {@link InvalidAddress} (client fault) - *

              The accountId is invalid.

              - * - * @throws {@link InvalidSecurity} (client fault) - *

              When the request to a queue is not HTTPS and SigV4.

              - * - * @throws {@link QueueDoesNotExist} (client fault) - *

              The specified queue doesn't exist.

              - * - * @throws {@link RequestThrottled} (client fault) - *

              The request was denied due to request throttling.

              - *
                - *
              • - *

                The rate of requests per second exceeds the Amazon Web Services KMS request quota for an - * account and Region.

                - *
              • - *
              • - *

                A burst or sustained high rate of requests to change the state of the same KMS - * key. This condition is often known as a "hot key."

                - *
              • - *
              • - *

                Requests for operations on KMS keys in a Amazon Web Services CloudHSM key store - * might be throttled at a lower-than-expected rate when the Amazon Web Services - * CloudHSM cluster associated with the Amazon Web Services CloudHSM key store is - * processing numerous commands, including those unrelated to the Amazon Web Services CloudHSM key store.

                - *
              • - *
              - * - * @throws {@link UnsupportedOperation} (client fault) - *

              Error code 400. Unsupported operation.

              - * * @throws {@link SQSServiceException} *

              Base exception class for all service exceptions from SQS service.

              * diff --git a/clients/client-sqs/src/index.ts b/clients/client-sqs/src/index.ts index 2569a59d426fc..db0ba7542efa5 100644 --- a/clients/client-sqs/src/index.ts +++ b/clients/client-sqs/src/index.ts @@ -2,15 +2,15 @@ /* eslint-disable */ /** *

              Welcome to the Amazon SQS API Reference.

              - *

              Amazon SQS is a reliable, highly-scalable hosted queue for storing messages as they - * travel between applications or microservices. Amazon SQS moves data between distributed - * application components and helps you decouple these components.

              + *

              Amazon SQS is a reliable, highly-scalable hosted queue for storing messages as they travel + * between applications or microservices. Amazon SQS moves data between distributed application + * components and helps you decouple these components.

              *

              For information on the permissions you need to use this API, see Identity and access management in the Amazon SQS Developer * Guide. *

              - *

              You can use Amazon Web Services - * SDKs to access Amazon SQS using your favorite programming language. The SDKs - * perform tasks such as the following automatically:

              + *

              You can use Amazon Web Services SDKs to access + * Amazon SQS using your favorite programming language. The SDKs perform tasks such as the + * following automatically:

              *
                *
              • *

                Cryptographically sign your service requests

                @@ -55,8 +55,7 @@ *
              • *
              • *

                - * Amazon SQS in the Command Line - * Interface + * Amazon SQS in the Command Line Interface * *

                *
              • diff --git a/clients/client-sqs/src/models/models_0.ts b/clients/client-sqs/src/models/models_0.ts index 602881755e25a..cccf959bea6ac 100644 --- a/clients/client-sqs/src/models/models_0.ts +++ b/clients/client-sqs/src/models/models_0.ts @@ -26,12 +26,9 @@ export interface AddPermissionRequest { /** * @public - *

                The Amazon Web - * Services account numbers of the principals who are to receive - * permission. For information about locating the Amazon Web Services - * account identification, see Your Amazon Web - * Services Identifiers in the Amazon SQS Developer - * Guide.

                + *

                The Amazon Web Services account numbers of the principals who are to receive + * permission. For information about locating the Amazon Web Services account identification, see Your Amazon Web Services Identifiers in the Amazon SQS Developer + * Guide.

                */ AWSAccountIds: string[] | undefined; @@ -50,46 +47,6 @@ export interface AddPermissionRequest { Actions: string[] | undefined; } -/** - * @public - *

                The accountId is invalid.

                - */ -export class InvalidAddress extends __BaseException { - readonly name: "InvalidAddress" = "InvalidAddress"; - readonly $fault: "client" = "client"; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "InvalidAddress", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, InvalidAddress.prototype); - } -} - -/** - * @public - *

                When the request to a queue is not HTTPS and SigV4.

                - */ -export class InvalidSecurity extends __BaseException { - readonly name: "InvalidSecurity" = "InvalidSecurity"; - readonly $fault: "client" = "client"; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "InvalidSecurity", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, InvalidSecurity.prototype); - } -} - /** * @public *

                The specified action violates a limit. For example, ReceiveMessage @@ -113,82 +70,6 @@ export class OverLimit extends __BaseException { } } -/** - * @public - *

                The specified queue doesn't exist.

                - */ -export class QueueDoesNotExist extends __BaseException { - readonly name: "QueueDoesNotExist" = "QueueDoesNotExist"; - readonly $fault: "client" = "client"; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "QueueDoesNotExist", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, QueueDoesNotExist.prototype); - } -} - -/** - * @public - *

                The request was denied due to request throttling.

                - *
                  - *
                • - *

                  The rate of requests per second exceeds the Amazon Web Services KMS request quota for an - * account and Region.

                  - *
                • - *
                • - *

                  A burst or sustained high rate of requests to change the state of the same KMS - * key. This condition is often known as a "hot key."

                  - *
                • - *
                • - *

                  Requests for operations on KMS keys in a Amazon Web Services CloudHSM key store - * might be throttled at a lower-than-expected rate when the Amazon Web Services - * CloudHSM cluster associated with the Amazon Web Services CloudHSM key store is - * processing numerous commands, including those unrelated to the Amazon Web Services CloudHSM key store.

                  - *
                • - *
                - */ -export class RequestThrottled extends __BaseException { - readonly name: "RequestThrottled" = "RequestThrottled"; - readonly $fault: "client" = "client"; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "RequestThrottled", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, RequestThrottled.prototype); - } -} - -/** - * @public - *

                Error code 400. Unsupported operation.

                - */ -export class UnsupportedOperation extends __BaseException { - readonly name: "UnsupportedOperation" = "UnsupportedOperation"; - readonly $fault: "client" = "client"; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "UnsupportedOperation", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, UnsupportedOperation.prototype); - } -} - /** * @public */ @@ -231,6 +112,26 @@ export class ResourceNotFoundException extends __BaseException { } } +/** + * @public + *

                Error code 400. Unsupported operation.

                + */ +export class UnsupportedOperation extends __BaseException { + readonly name: "UnsupportedOperation" = "UnsupportedOperation"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "UnsupportedOperation", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, UnsupportedOperation.prototype); + } +} + /** * @public */ @@ -333,8 +234,7 @@ export interface ChangeMessageVisibilityBatchRequestEntry { * result.

                * *

                The Ids of a batch request need to be unique within a request.

                - *

                This identifier can have up to 80 characters. The following characters are - * accepted: alphanumeric characters, hyphens(-), and underscores (_).

                + *

                This identifier can have up to 80 characters. The following characters are accepted: alphanumeric characters, hyphens(-), and underscores (_).

                *
                */ Id: string | undefined; @@ -565,6 +465,38 @@ export interface CreateQueueRequest { */ QueueName: string | undefined; + /** + * @public + *

                Add cost allocation tags to the specified Amazon SQS queue. For an overview, see Tagging + * Your Amazon SQS Queues in the Amazon SQS Developer Guide.

                + *

                When you use queue tags, keep the following guidelines in mind:

                + *
                  + *
                • + *

                  Adding more than 50 tags to a queue isn't recommended.

                  + *
                • + *
                • + *

                  Tags don't have any semantic meaning. Amazon SQS interprets tags as character strings.

                  + *
                • + *
                • + *

                  Tags are case-sensitive.

                  + *
                • + *
                • + *

                  A new tag with a key identical to that of an existing tag overwrites the existing tag.

                  + *
                • + *
                + *

                For a full list of tag restrictions, see + * Quotas related to queues + * in the Amazon SQS Developer Guide.

                + * + *

                To be able to tag a queue on creation, you must have the + * sqs:CreateQueue and sqs:TagQueue permissions.

                + *

                Cross-account permissions don't apply to this action. For more information, + * see Grant + * cross-account permissions to a role and a username in the Amazon SQS Developer Guide.

                + *
                + */ + tags?: Record; + /** * @public *

                A map of attributes with their corresponding values.

                @@ -579,35 +511,36 @@ export interface CreateQueueRequest { * *
              • *

                - * MaximumMessageSize – The limit of how many bytes a message can - * contain before Amazon SQS rejects it. Valid values: An integer from 1,024 bytes + * MaximumMessageSize – The limit of how many bytes a message + * can contain before Amazon SQS rejects it. Valid values: An integer from 1,024 bytes * (1 KiB) to 262,144 bytes (256 KiB). Default: 262,144 (256 KiB).

                *
              • *
              • *

                - * MessageRetentionPeriod – The length of time, in seconds, for which - * Amazon SQS retains a message. Valid values: An integer from 60 seconds (1 + * MessageRetentionPeriod – The length of time, in seconds, for + * which Amazon SQS retains a message. Valid values: An integer from 60 seconds (1 * minute) to 1,209,600 seconds (14 days). Default: 345,600 (4 days). When you * change a queue's attributes, the change can take up to 60 seconds for most of - * the attributes to propagate throughout the Amazon SQS system. Changes made to - * the MessageRetentionPeriod attribute can take up to 15 minutes and + * the attributes to propagate throughout the Amazon SQS system. Changes made to the + * MessageRetentionPeriod attribute can take up to 15 minutes and * will impact existing messages in the queue potentially causing them to be * expired and deleted if the MessageRetentionPeriod is reduced below * the age of existing messages.

                *
              • *
              • *

                - * Policy – The queue's policy. A valid Amazon Web Services - * policy. For more information about policy structure, see Overview of Amazon Web Services IAM Policies in the IAM - * User Guide.

                + * Policy – The queue's policy. A valid Amazon Web Services policy. For more + * information about policy structure, see Overview of Amazon Web Services IAM + * Policies in the IAM User Guide.

                *
              • *
              • *

                - * ReceiveMessageWaitTimeSeconds – The length of time, in seconds, for - * which a + * ReceiveMessageWaitTimeSeconds – The length of time, in + * seconds, for which a * ReceiveMessage - * action waits for a message - * to arrive. Valid values: An integer from 0 to 20 (seconds). Default: 0.

                + * action waits + * for a message to arrive. Valid values: An integer from 0 to 20 (seconds). + * Default: 0.

                *
              • *
              • *

                @@ -622,115 +555,102 @@ export interface CreateQueueRequest { *

                  *
                • *

                  - * RedrivePolicy – The string that includes the parameters for the - * dead-letter queue functionality of the source queue as a JSON object. The - * parameters are as follows:

                  + * RedrivePolicy – The string that includes the parameters for the dead-letter queue functionality + * of the source queue as a JSON object. The parameters are as follows:

                  *
                    *
                  • *

                    - * deadLetterTargetArn – The Amazon Resource Name (ARN) of - * the dead-letter queue to which Amazon SQS moves messages after the value - * of maxReceiveCount is exceeded.

                    + * deadLetterTargetArn – The Amazon Resource Name (ARN) of the dead-letter queue to + * which Amazon SQS moves messages after the value of maxReceiveCount is exceeded.

                    *
                  • *
                  • *

                    - * maxReceiveCount – The number of times a message is - * delivered to the source queue before being moved to the dead-letter - * queue. Default: 10. When the ReceiveCount for a message - * exceeds the maxReceiveCount for a queue, Amazon SQS moves - * the message to the dead-letter-queue.

                    + * maxReceiveCount – The number of times a message is delivered to the source queue before being + * moved to the dead-letter queue. Default: 10. When the ReceiveCount for a message exceeds the maxReceiveCount + * for a queue, Amazon SQS moves the message to the dead-letter-queue.

                    *
                  • *
                  *
                • *
                • *

                  - * RedriveAllowPolicy – The string that includes the parameters for - * the permissions for the dead-letter queue redrive permission and which source - * queues can specify dead-letter queues as a JSON object. The parameters are as - * follows:

                  + * RedriveAllowPolicy – The string that includes the parameters for the permissions for the dead-letter + * queue redrive permission and which source queues can specify dead-letter queues as a JSON object. The parameters are as follows:

                  *
                    *
                  • *

                    - * redrivePermission – The permission type that defines - * which source queues can specify the current queue as the dead-letter - * queue. Valid values are:

                    + * redrivePermission – The permission type that defines which source queues can + * specify the current queue as the dead-letter queue. Valid values are:

                    *
                      *
                    • *

                      - * allowAll – (Default) Any source queues in this - * Amazon Web Services account in the same - * Region can specify this queue as the dead-letter queue.

                      + * allowAll – (Default) Any source queues in this Amazon Web Services account in the same Region can + * specify this queue as the dead-letter queue.

                      *
                    • *
                    • *

                      - * denyAll – No source queues can specify this queue - * as the dead-letter queue.

                      + * denyAll – No source queues can specify this queue as the dead-letter + * queue.

                      *
                    • *
                    • *

                      - * byQueue – Only queues specified by the - * sourceQueueArns parameter can specify this - * queue as the dead-letter queue.

                      + * byQueue – Only queues specified by the sourceQueueArns parameter can specify + * this queue as the dead-letter queue.

                      *
                    • *
                    *
                  • *
                  • *

                    - * sourceQueueArns – The Amazon Resource Names (ARN)s of the - * source queues that can specify this queue as the dead-letter queue and - * redrive messages. You can specify this parameter only when the - * redrivePermission parameter is set to - * byQueue. You can specify up to 10 source queue ARNs. To - * allow more than 10 source queues to specify dead-letter queues, set the - * redrivePermission parameter to - * allowAll.

                    + * sourceQueueArns – The Amazon Resource Names (ARN)s of the source queues that can specify + * this queue as the dead-letter queue and redrive messages. You can specify this parameter only when the + * redrivePermission parameter is set to byQueue. You can specify up to 10 source queue ARNs. + * To allow more than 10 source queues to specify dead-letter queues, set the redrivePermission parameter + * to allowAll.

                    *
                  • *
                  *
                • *
                * - *

                The dead-letter queue of a FIFO queue must also be a FIFO queue. Similarly, the - * dead-letter queue of a standard queue must also be a standard queue.

                + *

                The dead-letter queue of a + * FIFO queue must also be a FIFO queue. Similarly, the dead-letter + * queue of a standard queue must also be a standard queue.

                *
                *

                The following attributes apply only to server-side-encryption:

                *
                  *
                • *

                  - * KmsMasterKeyId – The ID of an Amazon Web Services managed customer - * master key (CMK) for Amazon SQS or a custom CMK. For more information, see - * Key Terms. While the alias of the Amazon Web Services - * managed CMK for Amazon SQS is always alias/aws/sqs, the alias of a - * custom CMK can, for example, be alias/MyAlias - * . - * For more examples, see KeyId in the Key Management Service API + * KmsMasterKeyId – The ID of an Amazon Web Services managed customer master + * key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms. While the alias of the Amazon Web Services managed CMK for Amazon SQS is + * always alias/aws/sqs, the alias of a custom CMK can, for example, + * be alias/MyAlias + * . For more examples, see + * KeyId in the Key Management Service API * Reference.

                  *
                • *
                • *

                  - * KmsDataKeyReusePeriodSeconds – The length of time, in seconds, for - * which Amazon SQS can reuse a data key to - * encrypt or decrypt messages before calling KMS again. An integer representing - * seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). Default: - * 300 (5 minutes). A shorter time period provides better security but results in - * more calls to KMS which might incur charges after Free Tier. For more - * information, see How Does the Data Key Reuse Period Work? + * KmsDataKeyReusePeriodSeconds – The length of time, in + * seconds, for which Amazon SQS can reuse a data key to + * encrypt or decrypt messages before calling KMS again. An integer + * representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 + * hours). Default: 300 (5 minutes). A shorter time period provides better security + * but results in more calls to KMS which might incur charges after Free Tier. For + * more information, see How Does the Data Key Reuse Period Work? *

                  *
                • *
                • *

                  - * SqsManagedSseEnabled – Enables server-side queue encryption using - * SQS owned encryption keys. Only one server-side encryption option is supported - * per queue (for example, SSE-KMS or SSE-SQS).

                  + * SqsManagedSseEnabled – Enables server-side queue encryption + * using SQS owned encryption keys. Only one server-side encryption option is + * supported per queue (for example, SSE-KMS or SSE-SQS).

                  *
                • *
                - *

                The following attributes apply only to FIFO - * (first-in-first-out) queues:

                + *

                The following attributes apply only to FIFO (first-in-first-out) + * queues:

                *
                  *
                • *

                  * FifoQueue – Designates a queue as FIFO. Valid values are - * true and false. If you don't specify the - * FifoQueue attribute, Amazon SQS creates a standard queue. You + * true and false. If you don't specify the FifoQueue attribute, Amazon SQS creates a standard queue. You * can provide this attribute only during queue creation. You can't change it for * an existing queue. When you set this attribute, you must also provide the * MessageGroupId for your messages explicitly.

                  @@ -739,9 +659,9 @@ export interface CreateQueueRequest { *
                • *
                • *

                  - * ContentBasedDeduplication – Enables content-based deduplication. - * Valid values are true and false. For more information, - * see Exactly-once processing in the Amazon SQS Developer + * ContentBasedDeduplication – Enables content-based + * deduplication. Valid values are true and false. For + * more information, see Exactly-once processing in the Amazon SQS Developer * Guide. Note the following:

                  *
                    *
                  • @@ -755,8 +675,8 @@ export interface CreateQueueRequest { *
                  • *

                    If you aren't able to provide a * MessageDeduplicationId and you enable - * ContentBasedDeduplication for your queue, - * Amazon SQS uses a SHA-256 hash to generate the + * ContentBasedDeduplication for your queue, Amazon SQS + * uses a SHA-256 hash to generate the * MessageDeduplicationId using the body of the * message (but not the attributes of the message).

                    *
                  • @@ -789,22 +709,20 @@ export interface CreateQueueRequest { *
                  *
                • *
                - *

                The following attributes apply only to high - * throughput for FIFO queues:

                + *

                The following attributes apply only to + * high throughput + * for FIFO queues:

                *
                  *
                • *

                  - * DeduplicationScope – Specifies whether message deduplication - * occurs at the message group or queue level. Valid values are - * messageGroup and queue.

                  + * DeduplicationScope – Specifies whether message deduplication occurs at the + * message group or queue level. Valid values are messageGroup and queue.

                  *
                • *
                • *

                  * FifoThroughputLimit – Specifies whether the FIFO queue throughput - * quota applies to the entire queue or per message group. Valid values are - * perQueue and perMessageGroupId. The - * perMessageGroupId value is allowed only when the value for - * DeduplicationScope is messageGroup.

                  + * quota applies to the entire queue or per message group. Valid values are perQueue and perMessageGroupId. + * The perMessageGroupId value is allowed only when the value for DeduplicationScope is messageGroup.

                  *
                • *
                *

                To enable high throughput for FIFO queues, do the following:

                @@ -817,47 +735,12 @@ export interface CreateQueueRequest { *
              • *
              *

              If you set these attributes to anything other than the values shown for enabling high - * throughput, normal throughput is in effect and deduplication occurs as specified.

              - *

              For information on throughput quotas, see Quotas - * related to messages in the Amazon SQS Developer - * Guide.

              + * throughput, normal throughput is in effect and deduplication occurs as specified.

              + *

              For information on throughput quotas, + * see Quotas related to messages + * in the Amazon SQS Developer Guide.

              */ Attributes?: Partial>; - - /** - * @public - *

              Add cost allocation tags to the specified Amazon SQS queue. For an overview, see - * Tagging - * Your Amazon SQS Queues in the Amazon SQS Developer - * Guide.

              - *

              When you use queue tags, keep the following guidelines in mind:

              - *
                - *
              • - *

                Adding more than 50 tags to a queue isn't recommended.

                - *
              • - *
              • - *

                Tags don't have any semantic meaning. Amazon SQS interprets tags as character - * strings.

                - *
              • - *
              • - *

                Tags are case-sensitive.

                - *
              • - *
              • - *

                A new tag with a key identical to that of an existing tag overwrites the - * existing tag.

                - *
              • - *
              - *

              For a full list of tag restrictions, see Quotas related to queues in the Amazon SQS Developer - * Guide.

              - * - *

              To be able to tag a queue on creation, you must have the - * sqs:CreateQueue and sqs:TagQueue permissions.

              - *

              Cross-account permissions don't apply to this action. For more information, see - * Grant cross-account permissions to a role and a username in the - * Amazon SQS Developer Guide.

              - *
              - */ - tags?: Record; } /** @@ -872,46 +755,6 @@ export interface CreateQueueResult { QueueUrl?: string; } -/** - * @public - *

              The specified attribute doesn't exist.

              - */ -export class InvalidAttributeName extends __BaseException { - readonly name: "InvalidAttributeName" = "InvalidAttributeName"; - readonly $fault: "client" = "client"; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "InvalidAttributeName", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, InvalidAttributeName.prototype); - } -} - -/** - * @public - *

              A queue attribute value is invalid.

              - */ -export class InvalidAttributeValue extends __BaseException { - readonly name: "InvalidAttributeValue" = "InvalidAttributeValue"; - readonly $fault: "client" = "client"; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "InvalidAttributeValue", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, InvalidAttributeValue.prototype); - } -} - /** * @public *

              You must wait 60 seconds after deleting a queue before you can create another queue @@ -935,8 +778,8 @@ export class QueueDeletedRecently extends __BaseException { /** * @public - *

              A queue with this name already exists. Amazon SQS returns this error only if the - * request includes attributes whose values differ from those of the existing queue.

              + *

              A queue with this name already exists. Amazon SQS returns this error only if the request + * includes attributes whose values differ from those of the existing queue.

              */ export class QueueNameExists extends __BaseException { readonly name: "QueueNameExists" = "QueueNameExists"; @@ -975,8 +818,6 @@ export interface DeleteMessageRequest { /** * @public - * @deprecated - * *

              The specified receipt handle isn't valid for the current version.

              */ export class InvalidIdFormat extends __BaseException { @@ -1006,8 +847,7 @@ export interface DeleteMessageBatchRequestEntry { * result.

              * *

              The Ids of a batch request need to be unique within a request.

              - *

              This identifier can have up to 80 characters. The following characters are - * accepted: alphanumeric characters, hyphens(-), and underscores (_).

              + *

              This identifier can have up to 80 characters. The following characters are accepted: alphanumeric characters, hyphens(-), and underscores (_).

              *
              */ Id: string | undefined; @@ -1111,9 +951,7 @@ export interface GetQueueAttributesRequest { *

              The AttributeNames parameter is optional, but if you don't specify values * for this parameter, the request returns empty results.

              * - *

              In the future, new attributes might be added. If you write code that calls this - * action, we recommend that you structure your code so that it can handle new - * attributes gracefully.

              + *

              In the future, new attributes might be added. If you write code that calls this action, we recommend that you structure your code so that it can handle new attributes gracefully.

              *
              *

              The following attributes are supported:

              * @@ -1130,29 +968,29 @@ export interface GetQueueAttributesRequest { * *
            • *

              - * ApproximateNumberOfMessages – Returns the approximate number of - * messages available for retrieval from the queue.

              + * ApproximateNumberOfMessages – Returns the approximate + * number of messages available for retrieval from the queue.

              *
            • *
            • *

              - * ApproximateNumberOfMessagesDelayed – Returns the approximate - * number of messages in the queue that are delayed and not available for reading - * immediately. This can happen when the queue is configured as a delay queue or - * when a message has been sent with a delay parameter.

              + * ApproximateNumberOfMessagesDelayed – Returns the + * approximate number of messages in the queue that are delayed and not available + * for reading immediately. This can happen when the queue is configured as a delay + * queue or when a message has been sent with a delay parameter.

              *
            • *
            • *

              - * ApproximateNumberOfMessagesNotVisible – Returns the approximate - * number of messages that are in flight. Messages are considered to be + * ApproximateNumberOfMessagesNotVisible – Returns the + * approximate number of messages that are in flight. Messages are considered to be * in flight if they have been sent to a client but have * not yet been deleted or have not yet reached the end of their visibility window. *

              *
            • *
            • *

              - * CreatedTimestamp – Returns the time when the queue was created in - * seconds (epoch - * time).

              + * CreatedTimestamp – Returns the time when the queue was + * created in seconds (epoch + * time).

              *
            • *
            • *

              @@ -1161,9 +999,8 @@ export interface GetQueueAttributesRequest { *

            • *
            • *

              - * LastModifiedTimestamp – Returns the time when the queue was last - * changed in seconds (epoch - * time).

              + * LastModifiedTimestamp – Returns the time when the queue + * was last changed in seconds (epoch time).

              *
            • *
            • *

              @@ -1172,10 +1009,10 @@ export interface GetQueueAttributesRequest { *

            • *
            • *

              - * MessageRetentionPeriod – Returns the length of time, in seconds, - * for which Amazon SQS retains a message. When you change a queue's attributes, - * the change can take up to 60 seconds for most of the attributes to propagate - * throughout the Amazon SQS system. Changes made to the + * MessageRetentionPeriod – Returns the length of time, in + * seconds, for which Amazon SQS retains a message. When you change a queue's + * attributes, the change can take up to 60 seconds for most of the attributes to + * propagate throughout the Amazon SQS system. Changes made to the * MessageRetentionPeriod attribute can take up to 15 minutes and * will impact existing messages in the queue potentially causing them to be * expired and deleted if the MessageRetentionPeriod is reduced below @@ -1192,14 +1029,14 @@ export interface GetQueueAttributesRequest { *

            • *
            • *

              - * ReceiveMessageWaitTimeSeconds – Returns the length of time, in - * seconds, for which the ReceiveMessage action waits for a message to - * arrive.

              + * ReceiveMessageWaitTimeSeconds – Returns the length of + * time, in seconds, for which the ReceiveMessage action waits for a + * message to arrive.

              *
            • *
            • *

              - * VisibilityTimeout – Returns the visibility timeout for the queue. - * For more information about the visibility timeout, see Visibility Timeout in the Amazon SQS Developer + * VisibilityTimeout – Returns the visibility timeout for the + * queue. For more information about the visibility timeout, see Visibility Timeout in the Amazon SQS Developer * Guide.

              *
            • *
            @@ -1208,108 +1045,96 @@ export interface GetQueueAttributesRequest { *
              *
            • *

              - * RedrivePolicy – The string that includes the parameters for the - * dead-letter queue functionality of the source queue as a JSON object. The - * parameters are as follows:

              + * RedrivePolicy – The string that includes the parameters for the dead-letter queue functionality + * of the source queue as a JSON object. The parameters are as follows:

              *
                *
              • *

                - * deadLetterTargetArn – The Amazon Resource Name (ARN) of - * the dead-letter queue to which Amazon SQS moves messages after the value - * of maxReceiveCount is exceeded.

                + * deadLetterTargetArn – The Amazon Resource Name (ARN) of the dead-letter queue to + * which Amazon SQS moves messages after the value of maxReceiveCount is exceeded.

                *
              • *
              • *

                - * maxReceiveCount – The number of times a message is - * delivered to the source queue before being moved to the dead-letter - * queue. Default: 10. When the ReceiveCount for a message - * exceeds the maxReceiveCount for a queue, Amazon SQS moves - * the message to the dead-letter-queue.

                + * maxReceiveCount – The number of times a message is delivered to the source queue before being + * moved to the dead-letter queue. Default: 10. When the ReceiveCount for a message exceeds the maxReceiveCount + * for a queue, Amazon SQS moves the message to the dead-letter-queue.

                *
              • *
              *
            • *
            • *

              - * RedriveAllowPolicy – The string that includes the parameters for - * the permissions for the dead-letter queue redrive permission and which source - * queues can specify dead-letter queues as a JSON object. The parameters are as - * follows:

              + * RedriveAllowPolicy – The string that includes the parameters for the permissions for the dead-letter + * queue redrive permission and which source queues can specify dead-letter queues as a JSON object. The parameters are as follows:

              *
                *
              • *

                - * redrivePermission – The permission type that defines - * which source queues can specify the current queue as the dead-letter - * queue. Valid values are:

                + * redrivePermission – The permission type that defines which source queues can + * specify the current queue as the dead-letter queue. Valid values are:

                *
                  *
                • *

                  - * allowAll – (Default) Any source queues in this - * Amazon Web Services account in the same - * Region can specify this queue as the dead-letter queue.

                  + * allowAll – (Default) Any source queues in this Amazon Web Services account in the same Region can + * specify this queue as the dead-letter queue.

                  *
                • *
                • *

                  - * denyAll – No source queues can specify this queue - * as the dead-letter queue.

                  + * denyAll – No source queues can specify this queue as the dead-letter + * queue.

                  *
                • *
                • *

                  - * byQueue – Only queues specified by the - * sourceQueueArns parameter can specify this - * queue as the dead-letter queue.

                  + * byQueue – Only queues specified by the sourceQueueArns parameter can specify + * this queue as the dead-letter queue.

                  *
                • *
                *
              • *
              • *

                - * sourceQueueArns – The Amazon Resource Names (ARN)s of the - * source queues that can specify this queue as the dead-letter queue and - * redrive messages. You can specify this parameter only when the - * redrivePermission parameter is set to - * byQueue. You can specify up to 10 source queue ARNs. To - * allow more than 10 source queues to specify dead-letter queues, set the - * redrivePermission parameter to - * allowAll.

                + * sourceQueueArns – The Amazon Resource Names (ARN)s of the source queues that can specify + * this queue as the dead-letter queue and redrive messages. You can specify this parameter only when the + * redrivePermission parameter is set to byQueue. You can specify up to 10 source queue ARNs. + * To allow more than 10 source queues to specify dead-letter queues, set the redrivePermission parameter + * to allowAll.

                *
              • *
              *
            • *
            * - *

            The dead-letter queue of a FIFO queue must also be a FIFO queue. Similarly, the - * dead-letter queue of a standard queue must also be a standard queue.

            + *

            The dead-letter queue of a + * FIFO queue must also be a FIFO queue. Similarly, the dead-letter + * queue of a standard queue must also be a standard queue.

            *
            *

            The following attributes apply only to server-side-encryption:

            *
              *
            • *

              - * KmsMasterKeyId – Returns the ID of an Amazon Web Services - * managed customer master key (CMK) for Amazon SQS or a custom CMK. For more - * information, see Key Terms.

              + * KmsMasterKeyId – Returns the ID of an Amazon Web Services managed customer + * master key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms.

              *
            • *
            • *

              - * KmsDataKeyReusePeriodSeconds – Returns the length of time, in - * seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt - * messages before calling KMS again. For more information, see How Does the Data Key Reuse Period Work?.

              + * KmsDataKeyReusePeriodSeconds – Returns the length of time, + * in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt + * messages before calling KMS again. For more information, see + * How Does the Data Key Reuse Period Work?.

              *
            • *
            • *

              - * SqsManagedSseEnabled – Returns information about whether the queue - * is using SSE-SQS encryption using SQS owned encryption keys. Only one + * SqsManagedSseEnabled – Returns information about whether the + * queue is using SSE-SQS encryption using SQS owned encryption keys. Only one * server-side encryption option is supported per queue (for example, SSE-KMS or SSE-SQS).

              *
            • *
            - *

            The following attributes apply only to FIFO - * (first-in-first-out) queues:

            + *

            The following attributes apply only to FIFO (first-in-first-out) + * queues:

            *
              *
            • *

              - * FifoQueue – Returns information about whether the queue is FIFO. - * For more information, see FIFO queue logic in the Amazon SQS Developer + * FifoQueue – Returns information about whether the queue is + * FIFO. For more information, see FIFO queue logic in the Amazon SQS Developer * Guide.

              * - *

              To determine whether a queue is FIFO, you can check whether QueueName ends with - * the .fifo suffix.

              + *

              To determine whether a queue is FIFO, you can check whether QueueName ends with the .fifo suffix.

              *
              *
            • *
            • @@ -1319,22 +1144,20 @@ export interface GetQueueAttributesRequest { * Guide.

              *
            • *
            - *

            The following attributes apply only to high - * throughput for FIFO queues:

            + *

            The following attributes apply only to + * high throughput + * for FIFO queues:

            *
              *
            • *

              - * DeduplicationScope – Specifies whether message deduplication - * occurs at the message group or queue level. Valid values are - * messageGroup and queue.

              + * DeduplicationScope – Specifies whether message deduplication occurs at the + * message group or queue level. Valid values are messageGroup and queue.

              *
            • *
            • *

              * FifoThroughputLimit – Specifies whether the FIFO queue throughput - * quota applies to the entire queue or per message group. Valid values are - * perQueue and perMessageGroupId. The - * perMessageGroupId value is allowed only when the value for - * DeduplicationScope is messageGroup.

              + * quota applies to the entire queue or per message group. Valid values are perQueue and perMessageGroupId. + * The perMessageGroupId value is allowed only when the value for DeduplicationScope is messageGroup.

              *
            • *
            *

            To enable high throughput for FIFO queues, do the following:

            @@ -1347,10 +1170,10 @@ export interface GetQueueAttributesRequest { * *
          *

          If you set these attributes to anything other than the values shown for enabling high - * throughput, normal throughput is in effect and deduplication occurs as specified.

          - *

          For information on throughput quotas, see Quotas - * related to messages in the Amazon SQS Developer - * Guide.

          + * throughput, normal throughput is in effect and deduplication occurs as specified.

          + *

          For information on throughput quotas, + * see Quotas related to messages + * in the Amazon SQS Developer Guide.

          */ AttributeNames?: QueueAttributeName[]; } @@ -1367,6 +1190,26 @@ export interface GetQueueAttributesResult { Attributes?: Partial>; } +/** + * @public + *

          The specified attribute doesn't exist.

          + */ +export class InvalidAttributeName extends __BaseException { + readonly name: "InvalidAttributeName" = "InvalidAttributeName"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "InvalidAttributeName", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, InvalidAttributeName.prototype); + } +} + /** * @public *

          @@ -1383,8 +1226,7 @@ export interface GetQueueUrlRequest { /** * @public - *

          The Amazon Web - * Services account ID of the account that created the queue.

          + *

          The Amazon Web Services account ID of the account that created the queue.

          */ QueueOwnerAWSAccountId?: string; } @@ -1392,7 +1234,7 @@ export interface GetQueueUrlRequest { /** * @public *

          For more information, see Interpreting Responses in the Amazon SQS Developer - * Guide.

          + * Guide
          .

          */ export interface GetQueueUrlResult { /** @@ -1402,6 +1244,26 @@ export interface GetQueueUrlResult { QueueUrl?: string; } +/** + * @public + *

          The specified queue doesn't exist.

          + */ +export class QueueDoesNotExist extends __BaseException { + readonly name: "QueueDoesNotExist" = "QueueDoesNotExist"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "QueueDoesNotExist", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, QueueDoesNotExist.prototype); + } +} + /** * @public *

          @@ -1468,23 +1330,6 @@ export interface ListMessageMoveTasksRequest { MaxResults?: number; } -/** - * @public - * @enum - */ -export const TaskStatus = { - CANCELLED: "CANCELLED", - CANCELLING: "CANCELLING", - COMPLETED: "COMPLETED", - FAILED: "FAILED", - RUNNING: "RUNNING", -} as const; - -/** - * @public - */ -export type TaskStatus = (typeof TaskStatus)[keyof typeof TaskStatus]; - /** * @public *

          Contains the details of a message movement task.

          @@ -1503,7 +1348,7 @@ export interface ListMessageMoveTasksResultEntry { *

          The status of the message movement task. Possible values are: RUNNING, COMPLETED, * CANCELLING, CANCELLED, and FAILED.

          */ - Status?: TaskStatus; + Status?: string; /** * @public @@ -1599,13 +1444,6 @@ export interface ListQueuesRequest { *

          A list of your queues.

          */ export interface ListQueuesResult { - /** - * @public - *

          A list of queue URLs, up to 1,000 entries, or the value of MaxResults - * that you sent in the request.

          - */ - QueueUrls?: string[]; - /** * @public *

          Pagination token to include in the next request. Token value is null if @@ -1613,6 +1451,13 @@ export interface ListQueuesResult { * MaxResults in the request.

          */ NextToken?: string; + + /** + * @public + *

          A list of queue URLs, up to 1,000 entries, or the value of MaxResults + * that you sent in the request.

          + */ + QueueUrls?: string[]; } /** @@ -1673,159 +1518,6 @@ export interface PurgeQueueRequest { QueueUrl: string | undefined; } -/** - * @public - *

          The caller doesn't have the required KMS access.

          - */ -export class KmsAccessDenied extends __BaseException { - readonly name: "KmsAccessDenied" = "KmsAccessDenied"; - readonly $fault: "client" = "client"; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "KmsAccessDenied", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, KmsAccessDenied.prototype); - } -} - -/** - * @public - *

          The request was denied due to request throttling.

          - */ -export class KmsDisabled extends __BaseException { - readonly name: "KmsDisabled" = "KmsDisabled"; - readonly $fault: "client" = "client"; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "KmsDisabled", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, KmsDisabled.prototype); - } -} - -/** - * @public - *

          The request was rejected for one of the following reasons:

          - *
            - *
          • - *

            The KeyUsage value of the KMS key is incompatible with the API - * operation.

            - *
          • - *
          • - *

            The encryption algorithm or signing algorithm specified for the operation is - * incompatible with the type of key material in the KMS key (KeySpec).

            - *
          • - *
          - */ -export class KmsInvalidKeyUsage extends __BaseException { - readonly name: "KmsInvalidKeyUsage" = "KmsInvalidKeyUsage"; - readonly $fault: "client" = "client"; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "KmsInvalidKeyUsage", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, KmsInvalidKeyUsage.prototype); - } -} - -/** - * @public - *

          The request was rejected because the state of the specified resource is not valid for - * this request.

          - */ -export class KmsInvalidState extends __BaseException { - readonly name: "KmsInvalidState" = "KmsInvalidState"; - readonly $fault: "client" = "client"; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "KmsInvalidState", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, KmsInvalidState.prototype); - } -} - -/** - * @public - *

          The request was rejected because the specified entity or resource could not be found. - *

          - */ -export class KmsNotFound extends __BaseException { - readonly name: "KmsNotFound" = "KmsNotFound"; - readonly $fault: "client" = "client"; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "KmsNotFound", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, KmsNotFound.prototype); - } -} - -/** - * @public - *

          The request was rejected because the specified key policy isn't syntactically or - * semantically correct.

          - */ -export class KmsOptInRequired extends __BaseException { - readonly name: "KmsOptInRequired" = "KmsOptInRequired"; - readonly $fault: "client" = "client"; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "KmsOptInRequired", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, KmsOptInRequired.prototype); - } -} - -/** - * @public - *

          Amazon Web Services KMS throttles requests for the following conditions.

          - */ -export class KmsThrottled extends __BaseException { - readonly name: "KmsThrottled" = "KmsThrottled"; - readonly $fault: "client" = "client"; - /** - * @internal - */ - constructor(opts: __ExceptionOptionType) { - super({ - name: "KmsThrottled", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, KmsThrottled.prototype); - } -} - /** * @public *

          @@ -1849,19 +1541,19 @@ export interface ReceiveMessageRequest { *
        • *
        • *

          - * ApproximateFirstReceiveTimestamp – Returns the time the message was - * first received from the queue (epoch time in + * ApproximateFirstReceiveTimestamp – Returns the time the + * message was first received from the queue (epoch time in * milliseconds).

          *
        • *
        • *

          - * ApproximateReceiveCount – Returns the number of times a message has - * been received across all queues but not deleted.

          + * ApproximateReceiveCount – Returns the number of times a + * message has been received across all queues but not deleted.

          *
        • *
        • *

          - * AWSTraceHeader – Returns the X-Ray trace header - * string.

          + * AWSTraceHeader – Returns the X-Ray trace + * header string.

          *
        • *
        • *

          @@ -1880,15 +1572,15 @@ export interface ReceiveMessageRequest { *

        • *
        • *

          - * SentTimestamp – Returns the time the message was sent to the queue - * (epoch time in + * SentTimestamp – Returns the time the message was sent to the + * queue (epoch time in * milliseconds).

          *
        • *
        • *

          - * SqsManagedSseEnabled – Enables server-side queue encryption using - * SQS owned encryption keys. Only one server-side encryption option is supported - * per queue (for example, SSE-KMS or SSE-SQS).

          + * SqsManagedSseEnabled – Enables server-side queue encryption + * using SQS owned encryption keys. Only one server-side encryption option is + * supported per queue (for example, SSE-KMS or SSE-SQS).

          *
        • *
        • *

          @@ -1900,15 +1592,17 @@ export interface ReceiveMessageRequest { *

        • *
        • *

          - * MessageGroupId – Returns the value provided by the producer that - * calls the + * MessageGroupId – Returns the value provided by the + * producer that calls the * SendMessage - * action. Messages with the - * same MessageGroupId are returned in sequence.

          + * action. + * Messages with the same MessageGroupId are returned in + * sequence.

          *
        • *
        • *

          - * SequenceNumber – Returns the value provided by Amazon SQS.

          + * SequenceNumber – Returns the value provided by + * Amazon SQS.

          *
        • *
        */ @@ -1948,8 +1642,8 @@ export interface ReceiveMessageRequest { /** * @public - *

        The maximum number of messages to return. Amazon SQS never returns more messages than - * this value (however, fewer messages might be returned). Valid values: 1 to 10. Default: + *

        The maximum number of messages to return. Amazon SQS never returns more messages than this + * value (however, fewer messages might be returned). Valid values: 1 to 10. Default: * 1.

        */ MaxNumberOfMessages?: number; @@ -2039,8 +1733,8 @@ export interface ReceiveMessageRequest { * ReceiveRequestAttemptId can contain alphanumeric characters * (a-z, A-Z, 0-9) and punctuation * (!"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~).

        - *

        For best practices of using ReceiveRequestAttemptId, see Using the ReceiveRequestAttemptId Request Parameter in the Amazon - * SQS Developer Guide.

        + *

        For best practices of using ReceiveRequestAttemptId, see Using the ReceiveRequestAttemptId Request Parameter in the Amazon SQS + * Developer Guide.

        */ ReceiveRequestAttemptId?: string; } @@ -2112,7 +1806,7 @@ export interface MessageAttributeValue { * Number, and Binary. For the Number data type, * you must use StringValue.

        *

        You can also append custom labels. For more information, see Amazon SQS Message Attributes in the Amazon SQS Developer - * Guide.

        + * Guide.

        */ DataType: string | undefined; } @@ -2201,18 +1895,16 @@ export interface Message { /** * @public - *

        An MD5 digest of the non-URL-encoded message attribute string. You can use this - * attribute to verify that Amazon SQS received the message correctly. Amazon SQS - * URL-decodes the message before creating the MD5 digest. For information about MD5, see - * RFC1321.

        + *

        An MD5 digest of the non-URL-encoded message attribute string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see RFC1321.

        */ MD5OfMessageAttributes?: string; /** * @public - *

        Each message attribute consists of a Name, Type, and - * Value. For more information, see Amazon SQS message attributes in the Amazon SQS Developer - * Guide.

        + *

        Each message attribute consists of a Name, Type, + * and Value. For more information, see + * Amazon SQS + * message attributes in the Amazon SQS Developer Guide.

        */ MessageAttributes?: Record; } @@ -2329,7 +2021,7 @@ export interface MessageSystemAttributeValue { * Number, and Binary. For the Number data type, * you must use StringValue.

        *

        You can also append custom labels. For more information, see Amazon SQS Message Attributes in the Amazon SQS Developer - * Guide.

        + * Guide.

        */ DataType: string | undefined; } @@ -2351,16 +2043,11 @@ export interface SendMessageRequest { *

        The message to send. The minimum size is one character. The maximum size is 256 * KiB.

        * - *

        A message can include only XML, JSON, and unformatted text. The following Unicode - * characters are allowed:

        + *

        A message can include only XML, JSON, and unformatted text. The following Unicode characters are allowed:

        *

        - * #x9 | #xA | #xD | #x20 to - * #xD7FF | #xE000 to #xFFFD | - * #x10000 to #x10FFFF + * #x9 | #xA | #xD | #x20 to #xD7FF | #xE000 to #xFFFD | #x10000 to #x10FFFF *

        - *

        Any characters not included in this list will be rejected. For more information, - * see the W3C specification for - * characters.

        + *

        Any characters not included in this list will be rejected. For more information, see the W3C specification for characters.

        *
        */ MessageBody: string | undefined; @@ -2372,35 +2059,32 @@ export interface SendMessageRequest { * become available for processing after the delay period is finished. If you don't specify * a value, the default value for the queue applies.

        * - *

        When you set FifoQueue, you can't set DelaySeconds per - * message. You can set this parameter only on a queue level.

        + *

        When you set FifoQueue, you can't set DelaySeconds per message. You can set this parameter only on a queue level.

        *
        */ DelaySeconds?: number; /** * @public - *

        Each message attribute consists of a Name, Type, and - * Value. For more information, see Amazon SQS message attributes in the Amazon SQS Developer - * Guide.

        + *

        Each message attribute consists of a Name, Type, + * and Value. For more information, see + * Amazon SQS + * message attributes in the Amazon SQS Developer Guide.

        */ MessageAttributes?: Record; /** * @public - *

        The message system attribute to send. Each message system attribute consists of a - * Name, Type, and Value.

        + *

        The message system attribute to send. Each message system attribute consists of a Name, Type, and Value.

        * *
          *
        • - *

          Currently, the only supported message system attribute is - * AWSTraceHeader. Its type must be String and - * its value must be a correctly formatted X-Ray trace - * header string.

          + *

          Currently, the only supported message system attribute is AWSTraceHeader. + * Its type must be String and its value must be a correctly formatted + * X-Ray trace header string.

          *
        • *
        • - *

          The size of a message system attribute doesn't count towards the total - * size of a message.

          + *

          The size of a message system attribute doesn't count towards the total size of a message.

          *
        • *
        *
        @@ -2414,7 +2098,7 @@ export interface SendMessageRequest { * MessageDeduplicationId is sent successfully, any messages sent with the * same MessageDeduplicationId are accepted successfully but aren't delivered * during the 5-minute deduplication interval. For more information, see Exactly-once processing in the Amazon SQS Developer - * Guide.

        + * Guide.

        *
          *
        • *

          Every message must have a unique MessageDeduplicationId,

          @@ -2461,15 +2145,14 @@ export interface SendMessageRequest { *

          If a message is sent successfully but the acknowledgement is lost and the message * is resent with the same MessageDeduplicationId after the deduplication * interval, Amazon SQS can't detect duplicate messages.

          - *

          Amazon SQS continues to keep track of the message deduplication ID even after the - * message is received and deleted.

          + *

          Amazon SQS continues to keep track of the message deduplication ID even after the message is received and deleted.

          * *

          The maximum length of MessageDeduplicationId is 128 characters. * MessageDeduplicationId can contain alphanumeric characters * (a-z, A-Z, 0-9) and punctuation * (!"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~).

          - *

          For best practices of using MessageDeduplicationId, see Using the MessageDeduplicationId Property in the Amazon SQS - * Developer Guide.

          + *

          For best practices of using MessageDeduplicationId, see Using the MessageDeduplicationId Property in the Amazon SQS Developer + * Guide.

          */ MessageDeduplicationId?: string; @@ -2477,10 +2160,10 @@ export interface SendMessageRequest { * @public *

          This parameter applies only to FIFO (first-in-first-out) queues.

          *

          The tag that specifies that a message belongs to a specific message group. Messages - * that belong to the same message group are processed in a FIFO manner (however, messages - * in different message groups might be processed out of order). To interleave multiple - * ordered streams within a single queue, use MessageGroupId values (for - * example, session data for multiple users). In this scenario, multiple consumers can + * that belong to the same message group are processed in a FIFO manner (however, + * messages in different message groups might be processed out of order). To interleave + * multiple ordered streams within a single queue, use MessageGroupId values + * (for example, session data for multiple users). In this scenario, multiple consumers can * process the queue, but the session data of each user is processed in a FIFO * fashion.

          *
            @@ -2517,26 +2200,20 @@ export interface SendMessageRequest { export interface SendMessageResult { /** * @public - *

            An MD5 digest of the non-URL-encoded message body string. You can use this attribute - * to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the - * message before creating the MD5 digest. For information about MD5, see RFC1321.

            + *

            An MD5 digest of the non-URL-encoded message body string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see RFC1321.

            */ MD5OfMessageBody?: string; /** * @public - *

            An MD5 digest of the non-URL-encoded message attribute string. You can use this - * attribute to verify that Amazon SQS received the message correctly. Amazon SQS - * URL-decodes the message before creating the MD5 digest. For information about MD5, see - * RFC1321.

            + *

            An MD5 digest of the non-URL-encoded message attribute string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see RFC1321.

            */ MD5OfMessageAttributes?: string; /** * @public *

            An MD5 digest of the non-URL-encoded message system attribute string. You can use this - * attribute to verify that Amazon SQS received the message correctly. Amazon SQS - * URL-decodes the message before creating the MD5 digest.

            + * attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest.

            */ MD5OfMessageSystemAttributes?: string; @@ -2580,8 +2257,7 @@ export class BatchRequestTooLong extends __BaseException { /** * @public - *

            Contains the details of a single Amazon SQS message along with an - * Id.

            + *

            Contains the details of a single Amazon SQS message along with an Id.

            */ export interface SendMessageBatchRequestEntry { /** @@ -2589,8 +2265,7 @@ export interface SendMessageBatchRequestEntry { *

            An identifier for a message in this batch used to communicate the result.

            * *

            The Ids of a batch request need to be unique within a request.

            - *

            This identifier can have up to 80 characters. The following characters are - * accepted: alphanumeric characters, hyphens(-), and underscores (_).

            + *

            This identifier can have up to 80 characters. The following characters are accepted: alphanumeric characters, hyphens(-), and underscores (_).

            *
            */ Id: string | undefined; @@ -2608,35 +2283,32 @@ export interface SendMessageBatchRequestEntry { * become available for processing after the delay period is finished. If you don't specify * a value, the default value for the queue is applied.

            * - *

            When you set FifoQueue, you can't set DelaySeconds per - * message. You can set this parameter only on a queue level.

            + *

            When you set FifoQueue, you can't set DelaySeconds per message. You can set this parameter only on a queue level.

            *
            */ DelaySeconds?: number; /** * @public - *

            Each message attribute consists of a Name, Type, and - * Value. For more information, see Amazon SQS message attributes in the Amazon SQS Developer - * Guide.

            + *

            Each message attribute consists of a Name, Type, + * and Value. For more information, see + * Amazon SQS + * message attributes in the Amazon SQS Developer Guide.

            */ MessageAttributes?: Record; /** * @public - *

            The message system attribute to send Each message system attribute consists of a - * Name, Type, and Value.

            + *

            The message system attribute to send Each message system attribute consists of a Name, Type, and Value.

            * *
              *
            • - *

              Currently, the only supported message system attribute is - * AWSTraceHeader. Its type must be String and - * its value must be a correctly formatted X-Ray trace - * header string.

              + *

              Currently, the only supported message system attribute is AWSTraceHeader. + * Its type must be String and its value must be a correctly formatted + * X-Ray trace header string.

              *
            • *
            • - *

              The size of a message system attribute doesn't count towards the total - * size of a message.

              + *

              The size of a message system attribute doesn't count towards the total size of a message.

              *
            • *
            *
            @@ -2650,7 +2322,7 @@ export interface SendMessageBatchRequestEntry { * interval. If a message with a particular MessageDeduplicationId is sent * successfully, subsequent messages with the same MessageDeduplicationId are * accepted successfully but aren't delivered. For more information, see Exactly-once processing in the Amazon SQS Developer - * Guide.

            + * Guide.

            *
              *
            • *

              Every message must have a unique MessageDeduplicationId,

              @@ -2697,15 +2369,14 @@ export interface SendMessageBatchRequestEntry { *

              If a message is sent successfully but the acknowledgement is lost and the message * is resent with the same MessageDeduplicationId after the deduplication * interval, Amazon SQS can't detect duplicate messages.

              - *

              Amazon SQS continues to keep track of the message deduplication ID even after the - * message is received and deleted.

              + *

              Amazon SQS continues to keep track of the message deduplication ID even after the message is received and deleted.

              * *

              The length of MessageDeduplicationId is 128 characters. * MessageDeduplicationId can contain alphanumeric characters * (a-z, A-Z, 0-9) and punctuation * (!"#$%&'()*+,-./:;<=>?@[\]^_`\{|\}~).

              - *

              For best practices of using MessageDeduplicationId, see Using the MessageDeduplicationId Property in the Amazon SQS - * Developer Guide.

              + *

              For best practices of using MessageDeduplicationId, see Using the MessageDeduplicationId Property in the Amazon SQS Developer + * Guide.

              */ MessageDeduplicationId?: string; @@ -2713,10 +2384,10 @@ export interface SendMessageBatchRequestEntry { * @public *

              This parameter applies only to FIFO (first-in-first-out) queues.

              *

              The tag that specifies that a message belongs to a specific message group. Messages - * that belong to the same message group are processed in a FIFO manner (however, messages - * in different message groups might be processed out of order). To interleave multiple - * ordered streams within a single queue, use MessageGroupId values (for - * example, session data for multiple users). In this scenario, multiple consumers can + * that belong to the same message group are processed in a FIFO manner (however, + * messages in different message groups might be processed out of order). To interleave + * multiple ordered streams within a single queue, use MessageGroupId values + * (for example, session data for multiple users). In this scenario, multiple consumers can * process the queue, but the session data of each user is processed in a FIFO * fashion.

              *
                @@ -2788,27 +2459,20 @@ export interface SendMessageBatchResultEntry { /** * @public - *

                An MD5 digest of the non-URL-encoded message body string. You can use this attribute - * to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the - * message before creating the MD5 digest. For information about MD5, see RFC1321.

                + *

                An MD5 digest of the non-URL-encoded message body string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see RFC1321.

                */ MD5OfMessageBody: string | undefined; /** * @public - *

                An MD5 digest of the non-URL-encoded message attribute string. You can use this - * attribute to verify that Amazon SQS received the message correctly. Amazon SQS - * URL-decodes the message before creating the MD5 digest. For information about MD5, see - * RFC1321.

                + *

                An MD5 digest of the non-URL-encoded message attribute string. You can use this attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see RFC1321.

                */ MD5OfMessageAttributes?: string; /** * @public *

                An MD5 digest of the non-URL-encoded message system attribute string. You can use this - * attribute to verify that Amazon SQS received the message correctly. Amazon SQS - * URL-decodes the message before creating the MD5 digest. For information about MD5, see - * RFC1321.

                + * attribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest. For information about MD5, see RFC1321.

                */ MD5OfMessageSystemAttributes?: string; @@ -2877,36 +2541,37 @@ export interface SetQueueAttributesRequest { * *
              • *

                - * MaximumMessageSize – The limit of how many bytes a message can - * contain before Amazon SQS rejects it. Valid values: An integer from 1,024 bytes + * MaximumMessageSize – The limit of how many bytes a message + * can contain before Amazon SQS rejects it. Valid values: An integer from 1,024 bytes * (1 KiB) up to 262,144 bytes (256 KiB). Default: 262,144 (256 KiB).

                *
              • *
              • *

                - * MessageRetentionPeriod – The length of time, in seconds, for which - * Amazon SQS retains a message. Valid values: An integer representing seconds, + * MessageRetentionPeriod – The length of time, in seconds, for + * which Amazon SQS retains a message. Valid values: An integer representing seconds, * from 60 (1 minute) to 1,209,600 (14 days). Default: 345,600 (4 days). When you * change a queue's attributes, the change can take up to 60 seconds for most of - * the attributes to propagate throughout the Amazon SQS system. Changes made to - * the MessageRetentionPeriod attribute can take up to 15 minutes and + * the attributes to propagate throughout the Amazon SQS system. Changes made to the + * MessageRetentionPeriod attribute can take up to 15 minutes and * will impact existing messages in the queue potentially causing them to be * expired and deleted if the MessageRetentionPeriod is reduced below * the age of existing messages.

                *
              • *
              • *

                - * Policy – The queue's policy. A valid Amazon Web Services - * policy. For more information about policy structure, see Overview of Amazon Web Services IAM Policies in the - * Identity and Access Management User Guide. - *

                + * Policy – The queue's policy. A valid Amazon Web Services policy. For more + * information about policy structure, see Overview of Amazon Web Services IAM + * Policies in the Identity and Access Management User + * Guide.

                *
              • *
              • *

                - * ReceiveMessageWaitTimeSeconds – The length of time, in seconds, for - * which a + * ReceiveMessageWaitTimeSeconds – The length of time, in + * seconds, for which a * ReceiveMessage - * action waits for a message - * to arrive. Valid values: An integer from 0 to 20 (seconds). Default: 0.

                + * action waits + * for a message to arrive. Valid values: An integer from 0 to 20 (seconds). + * Default: 0.

                *
              • *
              • *

                @@ -2921,83 +2586,71 @@ export interface SetQueueAttributesRequest { *

                  *
                • *

                  - * RedrivePolicy – The string that includes the parameters for the - * dead-letter queue functionality of the source queue as a JSON object. The - * parameters are as follows:

                  + * RedrivePolicy – The string that includes the parameters for the dead-letter queue functionality + * of the source queue as a JSON object. The parameters are as follows:

                  *
                    *
                  • *

                    - * deadLetterTargetArn – The Amazon Resource Name (ARN) of - * the dead-letter queue to which Amazon SQS moves messages after the value - * of maxReceiveCount is exceeded.

                    + * deadLetterTargetArn – The Amazon Resource Name (ARN) of the dead-letter queue to + * which Amazon SQS moves messages after the value of maxReceiveCount is exceeded.

                    *
                  • *
                  • *

                    - * maxReceiveCount – The number of times a message is - * delivered to the source queue before being moved to the dead-letter - * queue. Default: 10. When the ReceiveCount for a message - * exceeds the maxReceiveCount for a queue, Amazon SQS moves - * the message to the dead-letter-queue.

                    + * maxReceiveCount – The number of times a message is delivered to the source queue before being + * moved to the dead-letter queue. Default: 10. When the ReceiveCount for a message exceeds the maxReceiveCount + * for a queue, Amazon SQS moves the message to the dead-letter-queue.

                    *
                  • *
                  *
                • *
                • *

                  - * RedriveAllowPolicy – The string that includes the parameters for - * the permissions for the dead-letter queue redrive permission and which source - * queues can specify dead-letter queues as a JSON object. The parameters are as - * follows:

                  + * RedriveAllowPolicy – The string that includes the parameters for the permissions for the dead-letter + * queue redrive permission and which source queues can specify dead-letter queues as a JSON object. The parameters are as follows:

                  *
                    *
                  • *

                    - * redrivePermission – The permission type that defines - * which source queues can specify the current queue as the dead-letter - * queue. Valid values are:

                    + * redrivePermission – The permission type that defines which source queues can + * specify the current queue as the dead-letter queue. Valid values are:

                    *
                      *
                    • *

                      - * allowAll – (Default) Any source queues in this - * Amazon Web Services account in the same - * Region can specify this queue as the dead-letter queue.

                      + * allowAll – (Default) Any source queues in this Amazon Web Services account in the same Region can + * specify this queue as the dead-letter queue.

                      *
                    • *
                    • *

                      - * denyAll – No source queues can specify this queue - * as the dead-letter queue.

                      + * denyAll – No source queues can specify this queue as the dead-letter + * queue.

                      *
                    • *
                    • *

                      - * byQueue – Only queues specified by the - * sourceQueueArns parameter can specify this - * queue as the dead-letter queue.

                      + * byQueue – Only queues specified by the sourceQueueArns parameter can specify + * this queue as the dead-letter queue.

                      *
                    • *
                    *
                  • *
                  • *

                    - * sourceQueueArns – The Amazon Resource Names (ARN)s of the - * source queues that can specify this queue as the dead-letter queue and - * redrive messages. You can specify this parameter only when the - * redrivePermission parameter is set to - * byQueue. You can specify up to 10 source queue ARNs. To - * allow more than 10 source queues to specify dead-letter queues, set the - * redrivePermission parameter to - * allowAll.

                    + * sourceQueueArns – The Amazon Resource Names (ARN)s of the source queues that can specify + * this queue as the dead-letter queue and redrive messages. You can specify this parameter only when the + * redrivePermission parameter is set to byQueue. You can specify up to 10 source queue ARNs. + * To allow more than 10 source queues to specify dead-letter queues, set the redrivePermission parameter + * to allowAll.

                    *
                  • *
                  *
                • *
                * - *

                The dead-letter queue of a FIFO queue must also be a FIFO queue. Similarly, the - * dead-letter queue of a standard queue must also be a standard queue.

                + *

                The dead-letter queue of a + * FIFO queue must also be a FIFO queue. Similarly, the dead-letter + * queue of a standard queue must also be a standard queue.

                *
                *

                The following attributes apply only to server-side-encryption:

                *
                  *
                • *

                  - * KmsMasterKeyId – The ID of an Amazon Web Services managed customer - * master key (CMK) for Amazon SQS or a custom CMK. For more information, see - * Key Terms. While the alias of the AWS-managed CMK for Amazon SQS is + * KmsMasterKeyId – The ID of an Amazon Web Services managed customer master + * key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms. While the alias of the AWS-managed CMK for Amazon SQS is * always alias/aws/sqs, the alias of a custom CMK can, for example, * be alias/MyAlias * . For more examples, see @@ -3006,28 +2659,28 @@ export interface SetQueueAttributesRequest { *

                • *
                • *

                  - * KmsDataKeyReusePeriodSeconds – The length of time, in seconds, for - * which Amazon SQS can reuse a data key to - * encrypt or decrypt messages before calling KMS again. An integer representing - * seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). Default: - * 300 (5 minutes). A shorter time period provides better security but results in - * more calls to KMS which might incur charges after Free Tier. For more - * information, see How Does the Data Key Reuse Period Work?.

                  + * KmsDataKeyReusePeriodSeconds – The length of time, in + * seconds, for which Amazon SQS can reuse a data key to + * encrypt or decrypt messages before calling KMS again. An integer + * representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 + * hours). Default: 300 (5 minutes). A shorter time period provides better security + * but results in more calls to KMS which might incur charges after Free Tier. For + * more information, see How Does the Data Key Reuse Period Work?.

                  *
                • *
                • *

                  - * SqsManagedSseEnabled – Enables server-side queue encryption using - * SQS owned encryption keys. Only one server-side encryption option is supported - * per queue (for example, SSE-KMS or SSE-SQS).

                  + * SqsManagedSseEnabled – Enables server-side queue encryption + * using SQS owned encryption keys. Only one server-side encryption option is + * supported per queue (for example, SSE-KMS or SSE-SQS).

                  *
                • *
                - *

                The following attribute applies only to FIFO - * (first-in-first-out) queues:

                + *

                The following attribute applies only to FIFO (first-in-first-out) + * queues:

                *
                  *
                • *

                  - * ContentBasedDeduplication – Enables content-based deduplication. - * For more information, see Exactly-once processing in the Amazon SQS Developer + * ContentBasedDeduplication – Enables content-based + * deduplication. For more information, see Exactly-once processing in the Amazon SQS Developer * Guide. Note the following:

                  *
                    *
                  • @@ -3041,8 +2694,8 @@ export interface SetQueueAttributesRequest { *
                  • *

                    If you aren't able to provide a * MessageDeduplicationId and you enable - * ContentBasedDeduplication for your queue, - * Amazon SQS uses a SHA-256 hash to generate the + * ContentBasedDeduplication for your queue, Amazon SQS + * uses a SHA-256 hash to generate the * MessageDeduplicationId using the body of the * message (but not the attributes of the message).

                    *
                  • @@ -3075,22 +2728,20 @@ export interface SetQueueAttributesRequest { *
                  *
                • *
                - *

                The following attributes apply only to high - * throughput for FIFO queues:

                + *

                The following attributes apply only to + * high throughput + * for FIFO queues:

                *
                  *
                • *

                  - * DeduplicationScope – Specifies whether message deduplication - * occurs at the message group or queue level. Valid values are - * messageGroup and queue.

                  + * DeduplicationScope – Specifies whether message deduplication occurs at the + * message group or queue level. Valid values are messageGroup and queue.

                  *
                • *
                • *

                  * FifoThroughputLimit – Specifies whether the FIFO queue throughput - * quota applies to the entire queue or per message group. Valid values are - * perQueue and perMessageGroupId. The - * perMessageGroupId value is allowed only when the value for - * DeduplicationScope is messageGroup.

                  + * quota applies to the entire queue or per message group. Valid values are perQueue and perMessageGroupId. + * The perMessageGroupId value is allowed only when the value for DeduplicationScope is messageGroup.

                  *
                • *
                *

                To enable high throughput for FIFO queues, do the following:

                @@ -3103,10 +2754,10 @@ export interface SetQueueAttributesRequest { *
              • *
              *

              If you set these attributes to anything other than the values shown for enabling high - * throughput, normal throughput is in effect and deduplication occurs as specified.

              - *

              For information on throughput quotas, see Quotas - * related to messages in the Amazon SQS Developer - * Guide.

              + * throughput, normal throughput is in effect and deduplication occurs as specified.

              + *

              For information on throughput quotas, + * see Quotas related to messages + * in the Amazon SQS Developer Guide.

              */ Attributes: Partial> | undefined; } diff --git a/clients/client-sqs/src/protocols/Aws_json1_0.ts b/clients/client-sqs/src/protocols/Aws_json1_0.ts deleted file mode 100644 index d07f7ea05c2bc..0000000000000 --- a/clients/client-sqs/src/protocols/Aws_json1_0.ts +++ /dev/null @@ -1,3067 +0,0 @@ -// smithy-typescript generated code -import { _toBool, _toNum, _toStr } from "@aws-sdk/core"; -import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; -import { - _json, - collectBody, - decorateServiceException as __decorateServiceException, - expectString as __expectString, - take, - withBaseException, -} from "@smithy/smithy-client"; -import { - Endpoint as __Endpoint, - HeaderBag as __HeaderBag, - ResponseMetadata as __ResponseMetadata, - SerdeContext as __SerdeContext, -} from "@smithy/types"; - -import { AddPermissionCommandInput, AddPermissionCommandOutput } from "../commands/AddPermissionCommand"; -import { - CancelMessageMoveTaskCommandInput, - CancelMessageMoveTaskCommandOutput, -} from "../commands/CancelMessageMoveTaskCommand"; -import { - ChangeMessageVisibilityBatchCommandInput, - ChangeMessageVisibilityBatchCommandOutput, -} from "../commands/ChangeMessageVisibilityBatchCommand"; -import { - ChangeMessageVisibilityCommandInput, - ChangeMessageVisibilityCommandOutput, -} from "../commands/ChangeMessageVisibilityCommand"; -import { CreateQueueCommandInput, CreateQueueCommandOutput } from "../commands/CreateQueueCommand"; -import { DeleteMessageBatchCommandInput, DeleteMessageBatchCommandOutput } from "../commands/DeleteMessageBatchCommand"; -import { DeleteMessageCommandInput, DeleteMessageCommandOutput } from "../commands/DeleteMessageCommand"; -import { DeleteQueueCommandInput, DeleteQueueCommandOutput } from "../commands/DeleteQueueCommand"; -import { GetQueueAttributesCommandInput, GetQueueAttributesCommandOutput } from "../commands/GetQueueAttributesCommand"; -import { GetQueueUrlCommandInput, GetQueueUrlCommandOutput } from "../commands/GetQueueUrlCommand"; -import { - ListDeadLetterSourceQueuesCommandInput, - ListDeadLetterSourceQueuesCommandOutput, -} from "../commands/ListDeadLetterSourceQueuesCommand"; -import { - ListMessageMoveTasksCommandInput, - ListMessageMoveTasksCommandOutput, -} from "../commands/ListMessageMoveTasksCommand"; -import { ListQueuesCommandInput, ListQueuesCommandOutput } from "../commands/ListQueuesCommand"; -import { ListQueueTagsCommandInput, ListQueueTagsCommandOutput } from "../commands/ListQueueTagsCommand"; -import { PurgeQueueCommandInput, PurgeQueueCommandOutput } from "../commands/PurgeQueueCommand"; -import { ReceiveMessageCommandInput, ReceiveMessageCommandOutput } from "../commands/ReceiveMessageCommand"; -import { RemovePermissionCommandInput, RemovePermissionCommandOutput } from "../commands/RemovePermissionCommand"; -import { SendMessageBatchCommandInput, SendMessageBatchCommandOutput } from "../commands/SendMessageBatchCommand"; -import { SendMessageCommandInput, SendMessageCommandOutput } from "../commands/SendMessageCommand"; -import { SetQueueAttributesCommandInput, SetQueueAttributesCommandOutput } from "../commands/SetQueueAttributesCommand"; -import { - StartMessageMoveTaskCommandInput, - StartMessageMoveTaskCommandOutput, -} from "../commands/StartMessageMoveTaskCommand"; -import { TagQueueCommandInput, TagQueueCommandOutput } from "../commands/TagQueueCommand"; -import { UntagQueueCommandInput, UntagQueueCommandOutput } from "../commands/UntagQueueCommand"; -import { - AddPermissionRequest, - BatchEntryIdsNotDistinct, - BatchRequestTooLong, - CancelMessageMoveTaskRequest, - ChangeMessageVisibilityBatchRequest, - ChangeMessageVisibilityBatchRequestEntry, - ChangeMessageVisibilityRequest, - CreateQueueRequest, - DeleteMessageBatchRequest, - DeleteMessageBatchRequestEntry, - DeleteMessageRequest, - DeleteQueueRequest, - EmptyBatchRequest, - GetQueueAttributesRequest, - GetQueueUrlRequest, - InvalidAddress, - InvalidAttributeName, - InvalidAttributeValue, - InvalidBatchEntryId, - InvalidIdFormat, - InvalidMessageContents, - InvalidSecurity, - KmsAccessDenied, - KmsDisabled, - KmsInvalidKeyUsage, - KmsInvalidState, - KmsNotFound, - KmsOptInRequired, - KmsThrottled, - ListDeadLetterSourceQueuesRequest, - ListMessageMoveTasksRequest, - ListQueuesRequest, - ListQueueTagsRequest, - Message, - MessageAttributeValue, - MessageNotInflight, - MessageSystemAttributeNameForSends, - MessageSystemAttributeValue, - OverLimit, - PurgeQueueInProgress, - PurgeQueueRequest, - QueueAttributeName, - QueueDeletedRecently, - QueueDoesNotExist, - QueueNameExists, - ReceiptHandleIsInvalid, - ReceiveMessageRequest, - ReceiveMessageResult, - RemovePermissionRequest, - RequestThrottled, - ResourceNotFoundException, - SendMessageBatchRequest, - SendMessageBatchRequestEntry, - SendMessageRequest, - SetQueueAttributesRequest, - StartMessageMoveTaskRequest, - TagQueueRequest, - TooManyEntriesInBatchRequest, - UnsupportedOperation, - UntagQueueRequest, -} from "../models/models_0"; -import { SQSServiceException as __BaseException } from "../models/SQSServiceException"; - -/** - * serializeAws_json1_0AddPermissionCommand - */ -export const se_AddPermissionCommand = async ( - input: AddPermissionCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("AddPermission"); - let body: any; - body = JSON.stringify(se_AddPermissionRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_json1_0CancelMessageMoveTaskCommand - */ -export const se_CancelMessageMoveTaskCommand = async ( - input: CancelMessageMoveTaskCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("CancelMessageMoveTask"); - let body: any; - body = JSON.stringify(se_CancelMessageMoveTaskRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_json1_0ChangeMessageVisibilityCommand - */ -export const se_ChangeMessageVisibilityCommand = async ( - input: ChangeMessageVisibilityCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("ChangeMessageVisibility"); - let body: any; - body = JSON.stringify(se_ChangeMessageVisibilityRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_json1_0ChangeMessageVisibilityBatchCommand - */ -export const se_ChangeMessageVisibilityBatchCommand = async ( - input: ChangeMessageVisibilityBatchCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("ChangeMessageVisibilityBatch"); - let body: any; - body = JSON.stringify(se_ChangeMessageVisibilityBatchRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_json1_0CreateQueueCommand - */ -export const se_CreateQueueCommand = async ( - input: CreateQueueCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("CreateQueue"); - let body: any; - body = JSON.stringify(se_CreateQueueRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_json1_0DeleteMessageCommand - */ -export const se_DeleteMessageCommand = async ( - input: DeleteMessageCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("DeleteMessage"); - let body: any; - body = JSON.stringify(se_DeleteMessageRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_json1_0DeleteMessageBatchCommand - */ -export const se_DeleteMessageBatchCommand = async ( - input: DeleteMessageBatchCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("DeleteMessageBatch"); - let body: any; - body = JSON.stringify(se_DeleteMessageBatchRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_json1_0DeleteQueueCommand - */ -export const se_DeleteQueueCommand = async ( - input: DeleteQueueCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("DeleteQueue"); - let body: any; - body = JSON.stringify(se_DeleteQueueRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_json1_0GetQueueAttributesCommand - */ -export const se_GetQueueAttributesCommand = async ( - input: GetQueueAttributesCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("GetQueueAttributes"); - let body: any; - body = JSON.stringify(se_GetQueueAttributesRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_json1_0GetQueueUrlCommand - */ -export const se_GetQueueUrlCommand = async ( - input: GetQueueUrlCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("GetQueueUrl"); - let body: any; - body = JSON.stringify(se_GetQueueUrlRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_json1_0ListDeadLetterSourceQueuesCommand - */ -export const se_ListDeadLetterSourceQueuesCommand = async ( - input: ListDeadLetterSourceQueuesCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("ListDeadLetterSourceQueues"); - let body: any; - body = JSON.stringify(se_ListDeadLetterSourceQueuesRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_json1_0ListMessageMoveTasksCommand - */ -export const se_ListMessageMoveTasksCommand = async ( - input: ListMessageMoveTasksCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("ListMessageMoveTasks"); - let body: any; - body = JSON.stringify(se_ListMessageMoveTasksRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_json1_0ListQueuesCommand - */ -export const se_ListQueuesCommand = async ( - input: ListQueuesCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("ListQueues"); - let body: any; - body = JSON.stringify(se_ListQueuesRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_json1_0ListQueueTagsCommand - */ -export const se_ListQueueTagsCommand = async ( - input: ListQueueTagsCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("ListQueueTags"); - let body: any; - body = JSON.stringify(se_ListQueueTagsRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_json1_0PurgeQueueCommand - */ -export const se_PurgeQueueCommand = async ( - input: PurgeQueueCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("PurgeQueue"); - let body: any; - body = JSON.stringify(se_PurgeQueueRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_json1_0ReceiveMessageCommand - */ -export const se_ReceiveMessageCommand = async ( - input: ReceiveMessageCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("ReceiveMessage"); - let body: any; - body = JSON.stringify(se_ReceiveMessageRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_json1_0RemovePermissionCommand - */ -export const se_RemovePermissionCommand = async ( - input: RemovePermissionCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("RemovePermission"); - let body: any; - body = JSON.stringify(se_RemovePermissionRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_json1_0SendMessageCommand - */ -export const se_SendMessageCommand = async ( - input: SendMessageCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("SendMessage"); - let body: any; - body = JSON.stringify(se_SendMessageRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_json1_0SendMessageBatchCommand - */ -export const se_SendMessageBatchCommand = async ( - input: SendMessageBatchCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("SendMessageBatch"); - let body: any; - body = JSON.stringify(se_SendMessageBatchRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_json1_0SetQueueAttributesCommand - */ -export const se_SetQueueAttributesCommand = async ( - input: SetQueueAttributesCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("SetQueueAttributes"); - let body: any; - body = JSON.stringify(se_SetQueueAttributesRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_json1_0StartMessageMoveTaskCommand - */ -export const se_StartMessageMoveTaskCommand = async ( - input: StartMessageMoveTaskCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("StartMessageMoveTask"); - let body: any; - body = JSON.stringify(se_StartMessageMoveTaskRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_json1_0TagQueueCommand - */ -export const se_TagQueueCommand = async ( - input: TagQueueCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("TagQueue"); - let body: any; - body = JSON.stringify(se_TagQueueRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * serializeAws_json1_0UntagQueueCommand - */ -export const se_UntagQueueCommand = async ( - input: UntagQueueCommandInput, - context: __SerdeContext -): Promise<__HttpRequest> => { - const headers: __HeaderBag = sharedHeaders("UntagQueue"); - let body: any; - body = JSON.stringify(se_UntagQueueRequest(input, context)); - return buildHttpRpcRequest(context, headers, "/", undefined, body); -}; - -/** - * deserializeAws_json1_0AddPermissionCommand - */ -export const de_AddPermissionCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_AddPermissionCommandError(output, context); - } - await collectBody(output.body, context); - const response: AddPermissionCommandOutput = { - $metadata: deserializeMetadata(output), - }; - return response; -}; - -/** - * deserializeAws_json1_0AddPermissionCommandError - */ -const de_AddPermissionCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - populateBodyWithQueryCompatibility(parsedOutput, output.headers); - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidAddress": - case "com.amazonaws.sqs#InvalidAddress": - throw await de_InvalidAddressRes(parsedOutput, context); - case "InvalidSecurity": - case "com.amazonaws.sqs#InvalidSecurity": - throw await de_InvalidSecurityRes(parsedOutput, context); - case "OverLimit": - case "com.amazonaws.sqs#OverLimit": - throw await de_OverLimitRes(parsedOutput, context); - case "QueueDoesNotExist": - case "com.amazonaws.sqs#QueueDoesNotExist": - throw await de_QueueDoesNotExistRes(parsedOutput, context); - case "RequestThrottled": - case "com.amazonaws.sqs#RequestThrottled": - throw await de_RequestThrottledRes(parsedOutput, context); - case "UnsupportedOperation": - case "com.amazonaws.sqs#UnsupportedOperation": - throw await de_UnsupportedOperationRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode, - }); - } -}; - -/** - * deserializeAws_json1_0CancelMessageMoveTaskCommand - */ -export const de_CancelMessageMoveTaskCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CancelMessageMoveTaskCommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = _json(data); - const response: CancelMessageMoveTaskCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_json1_0CancelMessageMoveTaskCommandError - */ -const de_CancelMessageMoveTaskCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - populateBodyWithQueryCompatibility(parsedOutput, output.headers); - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidAddress": - case "com.amazonaws.sqs#InvalidAddress": - throw await de_InvalidAddressRes(parsedOutput, context); - case "InvalidSecurity": - case "com.amazonaws.sqs#InvalidSecurity": - throw await de_InvalidSecurityRes(parsedOutput, context); - case "RequestThrottled": - case "com.amazonaws.sqs#RequestThrottled": - throw await de_RequestThrottledRes(parsedOutput, context); - case "ResourceNotFoundException": - case "com.amazonaws.sqs#ResourceNotFoundException": - throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); - case "UnsupportedOperation": - case "com.amazonaws.sqs#UnsupportedOperation": - throw await de_UnsupportedOperationRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode, - }); - } -}; - -/** - * deserializeAws_json1_0ChangeMessageVisibilityCommand - */ -export const de_ChangeMessageVisibilityCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_ChangeMessageVisibilityCommandError(output, context); - } - await collectBody(output.body, context); - const response: ChangeMessageVisibilityCommandOutput = { - $metadata: deserializeMetadata(output), - }; - return response; -}; - -/** - * deserializeAws_json1_0ChangeMessageVisibilityCommandError - */ -const de_ChangeMessageVisibilityCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - populateBodyWithQueryCompatibility(parsedOutput, output.headers); - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidAddress": - case "com.amazonaws.sqs#InvalidAddress": - throw await de_InvalidAddressRes(parsedOutput, context); - case "InvalidSecurity": - case "com.amazonaws.sqs#InvalidSecurity": - throw await de_InvalidSecurityRes(parsedOutput, context); - case "MessageNotInflight": - case "com.amazonaws.sqs#MessageNotInflight": - throw await de_MessageNotInflightRes(parsedOutput, context); - case "QueueDoesNotExist": - case "com.amazonaws.sqs#QueueDoesNotExist": - throw await de_QueueDoesNotExistRes(parsedOutput, context); - case "ReceiptHandleIsInvalid": - case "com.amazonaws.sqs#ReceiptHandleIsInvalid": - throw await de_ReceiptHandleIsInvalidRes(parsedOutput, context); - case "RequestThrottled": - case "com.amazonaws.sqs#RequestThrottled": - throw await de_RequestThrottledRes(parsedOutput, context); - case "UnsupportedOperation": - case "com.amazonaws.sqs#UnsupportedOperation": - throw await de_UnsupportedOperationRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode, - }); - } -}; - -/** - * deserializeAws_json1_0ChangeMessageVisibilityBatchCommand - */ -export const de_ChangeMessageVisibilityBatchCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_ChangeMessageVisibilityBatchCommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = _json(data); - const response: ChangeMessageVisibilityBatchCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_json1_0ChangeMessageVisibilityBatchCommandError - */ -const de_ChangeMessageVisibilityBatchCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - populateBodyWithQueryCompatibility(parsedOutput, output.headers); - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "BatchEntryIdsNotDistinct": - case "com.amazonaws.sqs#BatchEntryIdsNotDistinct": - throw await de_BatchEntryIdsNotDistinctRes(parsedOutput, context); - case "EmptyBatchRequest": - case "com.amazonaws.sqs#EmptyBatchRequest": - throw await de_EmptyBatchRequestRes(parsedOutput, context); - case "InvalidAddress": - case "com.amazonaws.sqs#InvalidAddress": - throw await de_InvalidAddressRes(parsedOutput, context); - case "InvalidBatchEntryId": - case "com.amazonaws.sqs#InvalidBatchEntryId": - throw await de_InvalidBatchEntryIdRes(parsedOutput, context); - case "InvalidSecurity": - case "com.amazonaws.sqs#InvalidSecurity": - throw await de_InvalidSecurityRes(parsedOutput, context); - case "QueueDoesNotExist": - case "com.amazonaws.sqs#QueueDoesNotExist": - throw await de_QueueDoesNotExistRes(parsedOutput, context); - case "RequestThrottled": - case "com.amazonaws.sqs#RequestThrottled": - throw await de_RequestThrottledRes(parsedOutput, context); - case "TooManyEntriesInBatchRequest": - case "com.amazonaws.sqs#TooManyEntriesInBatchRequest": - throw await de_TooManyEntriesInBatchRequestRes(parsedOutput, context); - case "UnsupportedOperation": - case "com.amazonaws.sqs#UnsupportedOperation": - throw await de_UnsupportedOperationRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode, - }); - } -}; - -/** - * deserializeAws_json1_0CreateQueueCommand - */ -export const de_CreateQueueCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_CreateQueueCommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = _json(data); - const response: CreateQueueCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_json1_0CreateQueueCommandError - */ -const de_CreateQueueCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - populateBodyWithQueryCompatibility(parsedOutput, output.headers); - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidAddress": - case "com.amazonaws.sqs#InvalidAddress": - throw await de_InvalidAddressRes(parsedOutput, context); - case "InvalidAttributeName": - case "com.amazonaws.sqs#InvalidAttributeName": - throw await de_InvalidAttributeNameRes(parsedOutput, context); - case "InvalidAttributeValue": - case "com.amazonaws.sqs#InvalidAttributeValue": - throw await de_InvalidAttributeValueRes(parsedOutput, context); - case "InvalidSecurity": - case "com.amazonaws.sqs#InvalidSecurity": - throw await de_InvalidSecurityRes(parsedOutput, context); - case "QueueDeletedRecently": - case "com.amazonaws.sqs#QueueDeletedRecently": - throw await de_QueueDeletedRecentlyRes(parsedOutput, context); - case "QueueNameExists": - case "com.amazonaws.sqs#QueueNameExists": - throw await de_QueueNameExistsRes(parsedOutput, context); - case "RequestThrottled": - case "com.amazonaws.sqs#RequestThrottled": - throw await de_RequestThrottledRes(parsedOutput, context); - case "UnsupportedOperation": - case "com.amazonaws.sqs#UnsupportedOperation": - throw await de_UnsupportedOperationRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode, - }); - } -}; - -/** - * deserializeAws_json1_0DeleteMessageCommand - */ -export const de_DeleteMessageCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_DeleteMessageCommandError(output, context); - } - await collectBody(output.body, context); - const response: DeleteMessageCommandOutput = { - $metadata: deserializeMetadata(output), - }; - return response; -}; - -/** - * deserializeAws_json1_0DeleteMessageCommandError - */ -const de_DeleteMessageCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - populateBodyWithQueryCompatibility(parsedOutput, output.headers); - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidAddress": - case "com.amazonaws.sqs#InvalidAddress": - throw await de_InvalidAddressRes(parsedOutput, context); - case "InvalidIdFormat": - case "com.amazonaws.sqs#InvalidIdFormat": - throw await de_InvalidIdFormatRes(parsedOutput, context); - case "InvalidSecurity": - case "com.amazonaws.sqs#InvalidSecurity": - throw await de_InvalidSecurityRes(parsedOutput, context); - case "QueueDoesNotExist": - case "com.amazonaws.sqs#QueueDoesNotExist": - throw await de_QueueDoesNotExistRes(parsedOutput, context); - case "ReceiptHandleIsInvalid": - case "com.amazonaws.sqs#ReceiptHandleIsInvalid": - throw await de_ReceiptHandleIsInvalidRes(parsedOutput, context); - case "RequestThrottled": - case "com.amazonaws.sqs#RequestThrottled": - throw await de_RequestThrottledRes(parsedOutput, context); - case "UnsupportedOperation": - case "com.amazonaws.sqs#UnsupportedOperation": - throw await de_UnsupportedOperationRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode, - }); - } -}; - -/** - * deserializeAws_json1_0DeleteMessageBatchCommand - */ -export const de_DeleteMessageBatchCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_DeleteMessageBatchCommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = _json(data); - const response: DeleteMessageBatchCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_json1_0DeleteMessageBatchCommandError - */ -const de_DeleteMessageBatchCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - populateBodyWithQueryCompatibility(parsedOutput, output.headers); - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "BatchEntryIdsNotDistinct": - case "com.amazonaws.sqs#BatchEntryIdsNotDistinct": - throw await de_BatchEntryIdsNotDistinctRes(parsedOutput, context); - case "EmptyBatchRequest": - case "com.amazonaws.sqs#EmptyBatchRequest": - throw await de_EmptyBatchRequestRes(parsedOutput, context); - case "InvalidAddress": - case "com.amazonaws.sqs#InvalidAddress": - throw await de_InvalidAddressRes(parsedOutput, context); - case "InvalidBatchEntryId": - case "com.amazonaws.sqs#InvalidBatchEntryId": - throw await de_InvalidBatchEntryIdRes(parsedOutput, context); - case "InvalidSecurity": - case "com.amazonaws.sqs#InvalidSecurity": - throw await de_InvalidSecurityRes(parsedOutput, context); - case "QueueDoesNotExist": - case "com.amazonaws.sqs#QueueDoesNotExist": - throw await de_QueueDoesNotExistRes(parsedOutput, context); - case "RequestThrottled": - case "com.amazonaws.sqs#RequestThrottled": - throw await de_RequestThrottledRes(parsedOutput, context); - case "TooManyEntriesInBatchRequest": - case "com.amazonaws.sqs#TooManyEntriesInBatchRequest": - throw await de_TooManyEntriesInBatchRequestRes(parsedOutput, context); - case "UnsupportedOperation": - case "com.amazonaws.sqs#UnsupportedOperation": - throw await de_UnsupportedOperationRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode, - }); - } -}; - -/** - * deserializeAws_json1_0DeleteQueueCommand - */ -export const de_DeleteQueueCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_DeleteQueueCommandError(output, context); - } - await collectBody(output.body, context); - const response: DeleteQueueCommandOutput = { - $metadata: deserializeMetadata(output), - }; - return response; -}; - -/** - * deserializeAws_json1_0DeleteQueueCommandError - */ -const de_DeleteQueueCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - populateBodyWithQueryCompatibility(parsedOutput, output.headers); - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidAddress": - case "com.amazonaws.sqs#InvalidAddress": - throw await de_InvalidAddressRes(parsedOutput, context); - case "InvalidSecurity": - case "com.amazonaws.sqs#InvalidSecurity": - throw await de_InvalidSecurityRes(parsedOutput, context); - case "QueueDoesNotExist": - case "com.amazonaws.sqs#QueueDoesNotExist": - throw await de_QueueDoesNotExistRes(parsedOutput, context); - case "RequestThrottled": - case "com.amazonaws.sqs#RequestThrottled": - throw await de_RequestThrottledRes(parsedOutput, context); - case "UnsupportedOperation": - case "com.amazonaws.sqs#UnsupportedOperation": - throw await de_UnsupportedOperationRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode, - }); - } -}; - -/** - * deserializeAws_json1_0GetQueueAttributesCommand - */ -export const de_GetQueueAttributesCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_GetQueueAttributesCommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = _json(data); - const response: GetQueueAttributesCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_json1_0GetQueueAttributesCommandError - */ -const de_GetQueueAttributesCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - populateBodyWithQueryCompatibility(parsedOutput, output.headers); - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidAddress": - case "com.amazonaws.sqs#InvalidAddress": - throw await de_InvalidAddressRes(parsedOutput, context); - case "InvalidAttributeName": - case "com.amazonaws.sqs#InvalidAttributeName": - throw await de_InvalidAttributeNameRes(parsedOutput, context); - case "InvalidSecurity": - case "com.amazonaws.sqs#InvalidSecurity": - throw await de_InvalidSecurityRes(parsedOutput, context); - case "QueueDoesNotExist": - case "com.amazonaws.sqs#QueueDoesNotExist": - throw await de_QueueDoesNotExistRes(parsedOutput, context); - case "RequestThrottled": - case "com.amazonaws.sqs#RequestThrottled": - throw await de_RequestThrottledRes(parsedOutput, context); - case "UnsupportedOperation": - case "com.amazonaws.sqs#UnsupportedOperation": - throw await de_UnsupportedOperationRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode, - }); - } -}; - -/** - * deserializeAws_json1_0GetQueueUrlCommand - */ -export const de_GetQueueUrlCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_GetQueueUrlCommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = _json(data); - const response: GetQueueUrlCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_json1_0GetQueueUrlCommandError - */ -const de_GetQueueUrlCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - populateBodyWithQueryCompatibility(parsedOutput, output.headers); - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidAddress": - case "com.amazonaws.sqs#InvalidAddress": - throw await de_InvalidAddressRes(parsedOutput, context); - case "InvalidSecurity": - case "com.amazonaws.sqs#InvalidSecurity": - throw await de_InvalidSecurityRes(parsedOutput, context); - case "QueueDoesNotExist": - case "com.amazonaws.sqs#QueueDoesNotExist": - throw await de_QueueDoesNotExistRes(parsedOutput, context); - case "RequestThrottled": - case "com.amazonaws.sqs#RequestThrottled": - throw await de_RequestThrottledRes(parsedOutput, context); - case "UnsupportedOperation": - case "com.amazonaws.sqs#UnsupportedOperation": - throw await de_UnsupportedOperationRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode, - }); - } -}; - -/** - * deserializeAws_json1_0ListDeadLetterSourceQueuesCommand - */ -export const de_ListDeadLetterSourceQueuesCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_ListDeadLetterSourceQueuesCommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = _json(data); - const response: ListDeadLetterSourceQueuesCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_json1_0ListDeadLetterSourceQueuesCommandError - */ -const de_ListDeadLetterSourceQueuesCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - populateBodyWithQueryCompatibility(parsedOutput, output.headers); - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidAddress": - case "com.amazonaws.sqs#InvalidAddress": - throw await de_InvalidAddressRes(parsedOutput, context); - case "InvalidSecurity": - case "com.amazonaws.sqs#InvalidSecurity": - throw await de_InvalidSecurityRes(parsedOutput, context); - case "QueueDoesNotExist": - case "com.amazonaws.sqs#QueueDoesNotExist": - throw await de_QueueDoesNotExistRes(parsedOutput, context); - case "RequestThrottled": - case "com.amazonaws.sqs#RequestThrottled": - throw await de_RequestThrottledRes(parsedOutput, context); - case "UnsupportedOperation": - case "com.amazonaws.sqs#UnsupportedOperation": - throw await de_UnsupportedOperationRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode, - }); - } -}; - -/** - * deserializeAws_json1_0ListMessageMoveTasksCommand - */ -export const de_ListMessageMoveTasksCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_ListMessageMoveTasksCommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = _json(data); - const response: ListMessageMoveTasksCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_json1_0ListMessageMoveTasksCommandError - */ -const de_ListMessageMoveTasksCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - populateBodyWithQueryCompatibility(parsedOutput, output.headers); - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidAddress": - case "com.amazonaws.sqs#InvalidAddress": - throw await de_InvalidAddressRes(parsedOutput, context); - case "InvalidSecurity": - case "com.amazonaws.sqs#InvalidSecurity": - throw await de_InvalidSecurityRes(parsedOutput, context); - case "RequestThrottled": - case "com.amazonaws.sqs#RequestThrottled": - throw await de_RequestThrottledRes(parsedOutput, context); - case "ResourceNotFoundException": - case "com.amazonaws.sqs#ResourceNotFoundException": - throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); - case "UnsupportedOperation": - case "com.amazonaws.sqs#UnsupportedOperation": - throw await de_UnsupportedOperationRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode, - }); - } -}; - -/** - * deserializeAws_json1_0ListQueuesCommand - */ -export const de_ListQueuesCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_ListQueuesCommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = _json(data); - const response: ListQueuesCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_json1_0ListQueuesCommandError - */ -const de_ListQueuesCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - populateBodyWithQueryCompatibility(parsedOutput, output.headers); - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidAddress": - case "com.amazonaws.sqs#InvalidAddress": - throw await de_InvalidAddressRes(parsedOutput, context); - case "InvalidSecurity": - case "com.amazonaws.sqs#InvalidSecurity": - throw await de_InvalidSecurityRes(parsedOutput, context); - case "RequestThrottled": - case "com.amazonaws.sqs#RequestThrottled": - throw await de_RequestThrottledRes(parsedOutput, context); - case "UnsupportedOperation": - case "com.amazonaws.sqs#UnsupportedOperation": - throw await de_UnsupportedOperationRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode, - }); - } -}; - -/** - * deserializeAws_json1_0ListQueueTagsCommand - */ -export const de_ListQueueTagsCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_ListQueueTagsCommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = _json(data); - const response: ListQueueTagsCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_json1_0ListQueueTagsCommandError - */ -const de_ListQueueTagsCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - populateBodyWithQueryCompatibility(parsedOutput, output.headers); - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidAddress": - case "com.amazonaws.sqs#InvalidAddress": - throw await de_InvalidAddressRes(parsedOutput, context); - case "InvalidSecurity": - case "com.amazonaws.sqs#InvalidSecurity": - throw await de_InvalidSecurityRes(parsedOutput, context); - case "QueueDoesNotExist": - case "com.amazonaws.sqs#QueueDoesNotExist": - throw await de_QueueDoesNotExistRes(parsedOutput, context); - case "RequestThrottled": - case "com.amazonaws.sqs#RequestThrottled": - throw await de_RequestThrottledRes(parsedOutput, context); - case "UnsupportedOperation": - case "com.amazonaws.sqs#UnsupportedOperation": - throw await de_UnsupportedOperationRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode, - }); - } -}; - -/** - * deserializeAws_json1_0PurgeQueueCommand - */ -export const de_PurgeQueueCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_PurgeQueueCommandError(output, context); - } - await collectBody(output.body, context); - const response: PurgeQueueCommandOutput = { - $metadata: deserializeMetadata(output), - }; - return response; -}; - -/** - * deserializeAws_json1_0PurgeQueueCommandError - */ -const de_PurgeQueueCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - populateBodyWithQueryCompatibility(parsedOutput, output.headers); - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidAddress": - case "com.amazonaws.sqs#InvalidAddress": - throw await de_InvalidAddressRes(parsedOutput, context); - case "InvalidSecurity": - case "com.amazonaws.sqs#InvalidSecurity": - throw await de_InvalidSecurityRes(parsedOutput, context); - case "PurgeQueueInProgress": - case "com.amazonaws.sqs#PurgeQueueInProgress": - throw await de_PurgeQueueInProgressRes(parsedOutput, context); - case "QueueDoesNotExist": - case "com.amazonaws.sqs#QueueDoesNotExist": - throw await de_QueueDoesNotExistRes(parsedOutput, context); - case "RequestThrottled": - case "com.amazonaws.sqs#RequestThrottled": - throw await de_RequestThrottledRes(parsedOutput, context); - case "UnsupportedOperation": - case "com.amazonaws.sqs#UnsupportedOperation": - throw await de_UnsupportedOperationRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode, - }); - } -}; - -/** - * deserializeAws_json1_0ReceiveMessageCommand - */ -export const de_ReceiveMessageCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_ReceiveMessageCommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = de_ReceiveMessageResult(data, context); - const response: ReceiveMessageCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_json1_0ReceiveMessageCommandError - */ -const de_ReceiveMessageCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - populateBodyWithQueryCompatibility(parsedOutput, output.headers); - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidAddress": - case "com.amazonaws.sqs#InvalidAddress": - throw await de_InvalidAddressRes(parsedOutput, context); - case "InvalidSecurity": - case "com.amazonaws.sqs#InvalidSecurity": - throw await de_InvalidSecurityRes(parsedOutput, context); - case "KmsAccessDenied": - case "com.amazonaws.sqs#KmsAccessDenied": - throw await de_KmsAccessDeniedRes(parsedOutput, context); - case "KmsDisabled": - case "com.amazonaws.sqs#KmsDisabled": - throw await de_KmsDisabledRes(parsedOutput, context); - case "KmsInvalidKeyUsage": - case "com.amazonaws.sqs#KmsInvalidKeyUsage": - throw await de_KmsInvalidKeyUsageRes(parsedOutput, context); - case "KmsInvalidState": - case "com.amazonaws.sqs#KmsInvalidState": - throw await de_KmsInvalidStateRes(parsedOutput, context); - case "KmsNotFound": - case "com.amazonaws.sqs#KmsNotFound": - throw await de_KmsNotFoundRes(parsedOutput, context); - case "KmsOptInRequired": - case "com.amazonaws.sqs#KmsOptInRequired": - throw await de_KmsOptInRequiredRes(parsedOutput, context); - case "KmsThrottled": - case "com.amazonaws.sqs#KmsThrottled": - throw await de_KmsThrottledRes(parsedOutput, context); - case "OverLimit": - case "com.amazonaws.sqs#OverLimit": - throw await de_OverLimitRes(parsedOutput, context); - case "QueueDoesNotExist": - case "com.amazonaws.sqs#QueueDoesNotExist": - throw await de_QueueDoesNotExistRes(parsedOutput, context); - case "RequestThrottled": - case "com.amazonaws.sqs#RequestThrottled": - throw await de_RequestThrottledRes(parsedOutput, context); - case "UnsupportedOperation": - case "com.amazonaws.sqs#UnsupportedOperation": - throw await de_UnsupportedOperationRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode, - }); - } -}; - -/** - * deserializeAws_json1_0RemovePermissionCommand - */ -export const de_RemovePermissionCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_RemovePermissionCommandError(output, context); - } - await collectBody(output.body, context); - const response: RemovePermissionCommandOutput = { - $metadata: deserializeMetadata(output), - }; - return response; -}; - -/** - * deserializeAws_json1_0RemovePermissionCommandError - */ -const de_RemovePermissionCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - populateBodyWithQueryCompatibility(parsedOutput, output.headers); - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidAddress": - case "com.amazonaws.sqs#InvalidAddress": - throw await de_InvalidAddressRes(parsedOutput, context); - case "InvalidSecurity": - case "com.amazonaws.sqs#InvalidSecurity": - throw await de_InvalidSecurityRes(parsedOutput, context); - case "QueueDoesNotExist": - case "com.amazonaws.sqs#QueueDoesNotExist": - throw await de_QueueDoesNotExistRes(parsedOutput, context); - case "RequestThrottled": - case "com.amazonaws.sqs#RequestThrottled": - throw await de_RequestThrottledRes(parsedOutput, context); - case "UnsupportedOperation": - case "com.amazonaws.sqs#UnsupportedOperation": - throw await de_UnsupportedOperationRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode, - }); - } -}; - -/** - * deserializeAws_json1_0SendMessageCommand - */ -export const de_SendMessageCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_SendMessageCommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = _json(data); - const response: SendMessageCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_json1_0SendMessageCommandError - */ -const de_SendMessageCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - populateBodyWithQueryCompatibility(parsedOutput, output.headers); - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidAddress": - case "com.amazonaws.sqs#InvalidAddress": - throw await de_InvalidAddressRes(parsedOutput, context); - case "InvalidMessageContents": - case "com.amazonaws.sqs#InvalidMessageContents": - throw await de_InvalidMessageContentsRes(parsedOutput, context); - case "InvalidSecurity": - case "com.amazonaws.sqs#InvalidSecurity": - throw await de_InvalidSecurityRes(parsedOutput, context); - case "KmsAccessDenied": - case "com.amazonaws.sqs#KmsAccessDenied": - throw await de_KmsAccessDeniedRes(parsedOutput, context); - case "KmsDisabled": - case "com.amazonaws.sqs#KmsDisabled": - throw await de_KmsDisabledRes(parsedOutput, context); - case "KmsInvalidKeyUsage": - case "com.amazonaws.sqs#KmsInvalidKeyUsage": - throw await de_KmsInvalidKeyUsageRes(parsedOutput, context); - case "KmsInvalidState": - case "com.amazonaws.sqs#KmsInvalidState": - throw await de_KmsInvalidStateRes(parsedOutput, context); - case "KmsNotFound": - case "com.amazonaws.sqs#KmsNotFound": - throw await de_KmsNotFoundRes(parsedOutput, context); - case "KmsOptInRequired": - case "com.amazonaws.sqs#KmsOptInRequired": - throw await de_KmsOptInRequiredRes(parsedOutput, context); - case "KmsThrottled": - case "com.amazonaws.sqs#KmsThrottled": - throw await de_KmsThrottledRes(parsedOutput, context); - case "QueueDoesNotExist": - case "com.amazonaws.sqs#QueueDoesNotExist": - throw await de_QueueDoesNotExistRes(parsedOutput, context); - case "RequestThrottled": - case "com.amazonaws.sqs#RequestThrottled": - throw await de_RequestThrottledRes(parsedOutput, context); - case "UnsupportedOperation": - case "com.amazonaws.sqs#UnsupportedOperation": - throw await de_UnsupportedOperationRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode, - }); - } -}; - -/** - * deserializeAws_json1_0SendMessageBatchCommand - */ -export const de_SendMessageBatchCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_SendMessageBatchCommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = _json(data); - const response: SendMessageBatchCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_json1_0SendMessageBatchCommandError - */ -const de_SendMessageBatchCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - populateBodyWithQueryCompatibility(parsedOutput, output.headers); - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "BatchEntryIdsNotDistinct": - case "com.amazonaws.sqs#BatchEntryIdsNotDistinct": - throw await de_BatchEntryIdsNotDistinctRes(parsedOutput, context); - case "BatchRequestTooLong": - case "com.amazonaws.sqs#BatchRequestTooLong": - throw await de_BatchRequestTooLongRes(parsedOutput, context); - case "EmptyBatchRequest": - case "com.amazonaws.sqs#EmptyBatchRequest": - throw await de_EmptyBatchRequestRes(parsedOutput, context); - case "InvalidAddress": - case "com.amazonaws.sqs#InvalidAddress": - throw await de_InvalidAddressRes(parsedOutput, context); - case "InvalidBatchEntryId": - case "com.amazonaws.sqs#InvalidBatchEntryId": - throw await de_InvalidBatchEntryIdRes(parsedOutput, context); - case "InvalidSecurity": - case "com.amazonaws.sqs#InvalidSecurity": - throw await de_InvalidSecurityRes(parsedOutput, context); - case "KmsAccessDenied": - case "com.amazonaws.sqs#KmsAccessDenied": - throw await de_KmsAccessDeniedRes(parsedOutput, context); - case "KmsDisabled": - case "com.amazonaws.sqs#KmsDisabled": - throw await de_KmsDisabledRes(parsedOutput, context); - case "KmsInvalidKeyUsage": - case "com.amazonaws.sqs#KmsInvalidKeyUsage": - throw await de_KmsInvalidKeyUsageRes(parsedOutput, context); - case "KmsInvalidState": - case "com.amazonaws.sqs#KmsInvalidState": - throw await de_KmsInvalidStateRes(parsedOutput, context); - case "KmsNotFound": - case "com.amazonaws.sqs#KmsNotFound": - throw await de_KmsNotFoundRes(parsedOutput, context); - case "KmsOptInRequired": - case "com.amazonaws.sqs#KmsOptInRequired": - throw await de_KmsOptInRequiredRes(parsedOutput, context); - case "KmsThrottled": - case "com.amazonaws.sqs#KmsThrottled": - throw await de_KmsThrottledRes(parsedOutput, context); - case "QueueDoesNotExist": - case "com.amazonaws.sqs#QueueDoesNotExist": - throw await de_QueueDoesNotExistRes(parsedOutput, context); - case "RequestThrottled": - case "com.amazonaws.sqs#RequestThrottled": - throw await de_RequestThrottledRes(parsedOutput, context); - case "TooManyEntriesInBatchRequest": - case "com.amazonaws.sqs#TooManyEntriesInBatchRequest": - throw await de_TooManyEntriesInBatchRequestRes(parsedOutput, context); - case "UnsupportedOperation": - case "com.amazonaws.sqs#UnsupportedOperation": - throw await de_UnsupportedOperationRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode, - }); - } -}; - -/** - * deserializeAws_json1_0SetQueueAttributesCommand - */ -export const de_SetQueueAttributesCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_SetQueueAttributesCommandError(output, context); - } - await collectBody(output.body, context); - const response: SetQueueAttributesCommandOutput = { - $metadata: deserializeMetadata(output), - }; - return response; -}; - -/** - * deserializeAws_json1_0SetQueueAttributesCommandError - */ -const de_SetQueueAttributesCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - populateBodyWithQueryCompatibility(parsedOutput, output.headers); - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidAddress": - case "com.amazonaws.sqs#InvalidAddress": - throw await de_InvalidAddressRes(parsedOutput, context); - case "InvalidAttributeName": - case "com.amazonaws.sqs#InvalidAttributeName": - throw await de_InvalidAttributeNameRes(parsedOutput, context); - case "InvalidAttributeValue": - case "com.amazonaws.sqs#InvalidAttributeValue": - throw await de_InvalidAttributeValueRes(parsedOutput, context); - case "InvalidSecurity": - case "com.amazonaws.sqs#InvalidSecurity": - throw await de_InvalidSecurityRes(parsedOutput, context); - case "OverLimit": - case "com.amazonaws.sqs#OverLimit": - throw await de_OverLimitRes(parsedOutput, context); - case "QueueDoesNotExist": - case "com.amazonaws.sqs#QueueDoesNotExist": - throw await de_QueueDoesNotExistRes(parsedOutput, context); - case "RequestThrottled": - case "com.amazonaws.sqs#RequestThrottled": - throw await de_RequestThrottledRes(parsedOutput, context); - case "UnsupportedOperation": - case "com.amazonaws.sqs#UnsupportedOperation": - throw await de_UnsupportedOperationRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode, - }); - } -}; - -/** - * deserializeAws_json1_0StartMessageMoveTaskCommand - */ -export const de_StartMessageMoveTaskCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_StartMessageMoveTaskCommandError(output, context); - } - const data: any = await parseBody(output.body, context); - let contents: any = {}; - contents = _json(data); - const response: StartMessageMoveTaskCommandOutput = { - $metadata: deserializeMetadata(output), - ...contents, - }; - return response; -}; - -/** - * deserializeAws_json1_0StartMessageMoveTaskCommandError - */ -const de_StartMessageMoveTaskCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - populateBodyWithQueryCompatibility(parsedOutput, output.headers); - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidAddress": - case "com.amazonaws.sqs#InvalidAddress": - throw await de_InvalidAddressRes(parsedOutput, context); - case "InvalidSecurity": - case "com.amazonaws.sqs#InvalidSecurity": - throw await de_InvalidSecurityRes(parsedOutput, context); - case "RequestThrottled": - case "com.amazonaws.sqs#RequestThrottled": - throw await de_RequestThrottledRes(parsedOutput, context); - case "ResourceNotFoundException": - case "com.amazonaws.sqs#ResourceNotFoundException": - throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); - case "UnsupportedOperation": - case "com.amazonaws.sqs#UnsupportedOperation": - throw await de_UnsupportedOperationRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode, - }); - } -}; - -/** - * deserializeAws_json1_0TagQueueCommand - */ -export const de_TagQueueCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_TagQueueCommandError(output, context); - } - await collectBody(output.body, context); - const response: TagQueueCommandOutput = { - $metadata: deserializeMetadata(output), - }; - return response; -}; - -/** - * deserializeAws_json1_0TagQueueCommandError - */ -const de_TagQueueCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - populateBodyWithQueryCompatibility(parsedOutput, output.headers); - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidAddress": - case "com.amazonaws.sqs#InvalidAddress": - throw await de_InvalidAddressRes(parsedOutput, context); - case "InvalidSecurity": - case "com.amazonaws.sqs#InvalidSecurity": - throw await de_InvalidSecurityRes(parsedOutput, context); - case "QueueDoesNotExist": - case "com.amazonaws.sqs#QueueDoesNotExist": - throw await de_QueueDoesNotExistRes(parsedOutput, context); - case "RequestThrottled": - case "com.amazonaws.sqs#RequestThrottled": - throw await de_RequestThrottledRes(parsedOutput, context); - case "UnsupportedOperation": - case "com.amazonaws.sqs#UnsupportedOperation": - throw await de_UnsupportedOperationRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode, - }); - } -}; - -/** - * deserializeAws_json1_0UntagQueueCommand - */ -export const de_UntagQueueCommand = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - if (output.statusCode >= 300) { - return de_UntagQueueCommandError(output, context); - } - await collectBody(output.body, context); - const response: UntagQueueCommandOutput = { - $metadata: deserializeMetadata(output), - }; - return response; -}; - -/** - * deserializeAws_json1_0UntagQueueCommandError - */ -const de_UntagQueueCommandError = async ( - output: __HttpResponse, - context: __SerdeContext -): Promise => { - const parsedOutput: any = { - ...output, - body: await parseErrorBody(output.body, context), - }; - populateBodyWithQueryCompatibility(parsedOutput, output.headers); - const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); - switch (errorCode) { - case "InvalidAddress": - case "com.amazonaws.sqs#InvalidAddress": - throw await de_InvalidAddressRes(parsedOutput, context); - case "InvalidSecurity": - case "com.amazonaws.sqs#InvalidSecurity": - throw await de_InvalidSecurityRes(parsedOutput, context); - case "QueueDoesNotExist": - case "com.amazonaws.sqs#QueueDoesNotExist": - throw await de_QueueDoesNotExistRes(parsedOutput, context); - case "RequestThrottled": - case "com.amazonaws.sqs#RequestThrottled": - throw await de_RequestThrottledRes(parsedOutput, context); - case "UnsupportedOperation": - case "com.amazonaws.sqs#UnsupportedOperation": - throw await de_UnsupportedOperationRes(parsedOutput, context); - default: - const parsedBody = parsedOutput.body; - return throwDefaultError({ - output, - parsedBody, - errorCode, - }); - } -}; - -/** - * deserializeAws_json1_0BatchEntryIdsNotDistinctRes - */ -const de_BatchEntryIdsNotDistinctRes = async ( - parsedOutput: any, - context: __SerdeContext -): Promise => { - const body = parsedOutput.body; - const deserialized: any = _json(body); - const exception = new BatchEntryIdsNotDistinct({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_json1_0BatchRequestTooLongRes - */ -const de_BatchRequestTooLongRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = _json(body); - const exception = new BatchRequestTooLong({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_json1_0EmptyBatchRequestRes - */ -const de_EmptyBatchRequestRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = _json(body); - const exception = new EmptyBatchRequest({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_json1_0InvalidAddressRes - */ -const de_InvalidAddressRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = _json(body); - const exception = new InvalidAddress({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_json1_0InvalidAttributeNameRes - */ -const de_InvalidAttributeNameRes = async ( - parsedOutput: any, - context: __SerdeContext -): Promise => { - const body = parsedOutput.body; - const deserialized: any = _json(body); - const exception = new InvalidAttributeName({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_json1_0InvalidAttributeValueRes - */ -const de_InvalidAttributeValueRes = async ( - parsedOutput: any, - context: __SerdeContext -): Promise => { - const body = parsedOutput.body; - const deserialized: any = _json(body); - const exception = new InvalidAttributeValue({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_json1_0InvalidBatchEntryIdRes - */ -const de_InvalidBatchEntryIdRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = _json(body); - const exception = new InvalidBatchEntryId({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_json1_0InvalidIdFormatRes - */ -const de_InvalidIdFormatRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = _json(body); - const exception = new InvalidIdFormat({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_json1_0InvalidMessageContentsRes - */ -const de_InvalidMessageContentsRes = async ( - parsedOutput: any, - context: __SerdeContext -): Promise => { - const body = parsedOutput.body; - const deserialized: any = _json(body); - const exception = new InvalidMessageContents({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_json1_0InvalidSecurityRes - */ -const de_InvalidSecurityRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = _json(body); - const exception = new InvalidSecurity({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_json1_0KmsAccessDeniedRes - */ -const de_KmsAccessDeniedRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = _json(body); - const exception = new KmsAccessDenied({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_json1_0KmsDisabledRes - */ -const de_KmsDisabledRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = _json(body); - const exception = new KmsDisabled({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_json1_0KmsInvalidKeyUsageRes - */ -const de_KmsInvalidKeyUsageRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = _json(body); - const exception = new KmsInvalidKeyUsage({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_json1_0KmsInvalidStateRes - */ -const de_KmsInvalidStateRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = _json(body); - const exception = new KmsInvalidState({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_json1_0KmsNotFoundRes - */ -const de_KmsNotFoundRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = _json(body); - const exception = new KmsNotFound({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_json1_0KmsOptInRequiredRes - */ -const de_KmsOptInRequiredRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = _json(body); - const exception = new KmsOptInRequired({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_json1_0KmsThrottledRes - */ -const de_KmsThrottledRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = _json(body); - const exception = new KmsThrottled({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_json1_0MessageNotInflightRes - */ -const de_MessageNotInflightRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = _json(body); - const exception = new MessageNotInflight({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_json1_0OverLimitRes - */ -const de_OverLimitRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = _json(body); - const exception = new OverLimit({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_json1_0PurgeQueueInProgressRes - */ -const de_PurgeQueueInProgressRes = async ( - parsedOutput: any, - context: __SerdeContext -): Promise => { - const body = parsedOutput.body; - const deserialized: any = _json(body); - const exception = new PurgeQueueInProgress({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_json1_0QueueDeletedRecentlyRes - */ -const de_QueueDeletedRecentlyRes = async ( - parsedOutput: any, - context: __SerdeContext -): Promise => { - const body = parsedOutput.body; - const deserialized: any = _json(body); - const exception = new QueueDeletedRecently({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_json1_0QueueDoesNotExistRes - */ -const de_QueueDoesNotExistRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = _json(body); - const exception = new QueueDoesNotExist({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_json1_0QueueNameExistsRes - */ -const de_QueueNameExistsRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = _json(body); - const exception = new QueueNameExists({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_json1_0ReceiptHandleIsInvalidRes - */ -const de_ReceiptHandleIsInvalidRes = async ( - parsedOutput: any, - context: __SerdeContext -): Promise => { - const body = parsedOutput.body; - const deserialized: any = _json(body); - const exception = new ReceiptHandleIsInvalid({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_json1_0RequestThrottledRes - */ -const de_RequestThrottledRes = async (parsedOutput: any, context: __SerdeContext): Promise => { - const body = parsedOutput.body; - const deserialized: any = _json(body); - const exception = new RequestThrottled({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_json1_0ResourceNotFoundExceptionRes - */ -const de_ResourceNotFoundExceptionRes = async ( - parsedOutput: any, - context: __SerdeContext -): Promise => { - const body = parsedOutput.body; - const deserialized: any = _json(body); - const exception = new ResourceNotFoundException({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_json1_0TooManyEntriesInBatchRequestRes - */ -const de_TooManyEntriesInBatchRequestRes = async ( - parsedOutput: any, - context: __SerdeContext -): Promise => { - const body = parsedOutput.body; - const deserialized: any = _json(body); - const exception = new TooManyEntriesInBatchRequest({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * deserializeAws_json1_0UnsupportedOperationRes - */ -const de_UnsupportedOperationRes = async ( - parsedOutput: any, - context: __SerdeContext -): Promise => { - const body = parsedOutput.body; - const deserialized: any = _json(body); - const exception = new UnsupportedOperation({ - $metadata: deserializeMetadata(parsedOutput), - ...deserialized, - }); - return __decorateServiceException(exception, body); -}; - -/** - * serializeAws_json1_0ActionNameList - */ -const se_ActionNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return _toStr(entry); - }); -}; - -/** - * serializeAws_json1_0AddPermissionRequest - */ -const se_AddPermissionRequest = (input: AddPermissionRequest, context: __SerdeContext): any => { - return take(input, { - AWSAccountIds: (_) => se_AWSAccountIdList(_, context), - Actions: (_) => se_ActionNameList(_, context), - Label: _toStr, - QueueUrl: _toStr, - }); -}; - -/** - * serializeAws_json1_0AttributeNameList - */ -const se_AttributeNameList = (input: QueueAttributeName[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return _toStr(entry); - }); -}; - -/** - * serializeAws_json1_0AWSAccountIdList - */ -const se_AWSAccountIdList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return _toStr(entry); - }); -}; - -/** - * serializeAws_json1_0BinaryList - */ -const se_BinaryList = (input: Uint8Array[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return context.base64Encoder(entry); - }); -}; - -/** - * serializeAws_json1_0CancelMessageMoveTaskRequest - */ -const se_CancelMessageMoveTaskRequest = (input: CancelMessageMoveTaskRequest, context: __SerdeContext): any => { - return take(input, { - TaskHandle: _toStr, - }); -}; - -/** - * serializeAws_json1_0ChangeMessageVisibilityBatchRequest - */ -const se_ChangeMessageVisibilityBatchRequest = ( - input: ChangeMessageVisibilityBatchRequest, - context: __SerdeContext -): any => { - return take(input, { - Entries: (_) => se_ChangeMessageVisibilityBatchRequestEntryList(_, context), - QueueUrl: _toStr, - }); -}; - -/** - * serializeAws_json1_0ChangeMessageVisibilityBatchRequestEntry - */ -const se_ChangeMessageVisibilityBatchRequestEntry = ( - input: ChangeMessageVisibilityBatchRequestEntry, - context: __SerdeContext -): any => { - return take(input, { - Id: _toStr, - ReceiptHandle: _toStr, - VisibilityTimeout: _toNum, - }); -}; - -/** - * serializeAws_json1_0ChangeMessageVisibilityBatchRequestEntryList - */ -const se_ChangeMessageVisibilityBatchRequestEntryList = ( - input: ChangeMessageVisibilityBatchRequestEntry[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_ChangeMessageVisibilityBatchRequestEntry(entry, context); - }); -}; - -/** - * serializeAws_json1_0ChangeMessageVisibilityRequest - */ -const se_ChangeMessageVisibilityRequest = (input: ChangeMessageVisibilityRequest, context: __SerdeContext): any => { - return take(input, { - QueueUrl: _toStr, - ReceiptHandle: _toStr, - VisibilityTimeout: _toNum, - }); -}; - -/** - * serializeAws_json1_0CreateQueueRequest - */ -const se_CreateQueueRequest = (input: CreateQueueRequest, context: __SerdeContext): any => { - return take(input, { - Attributes: (_) => se_QueueAttributeMap(_, context), - QueueName: _toStr, - tags: (_) => se_TagMap(_, context), - }); -}; - -/** - * serializeAws_json1_0DeleteMessageBatchRequest - */ -const se_DeleteMessageBatchRequest = (input: DeleteMessageBatchRequest, context: __SerdeContext): any => { - return take(input, { - Entries: (_) => se_DeleteMessageBatchRequestEntryList(_, context), - QueueUrl: _toStr, - }); -}; - -/** - * serializeAws_json1_0DeleteMessageBatchRequestEntry - */ -const se_DeleteMessageBatchRequestEntry = (input: DeleteMessageBatchRequestEntry, context: __SerdeContext): any => { - return take(input, { - Id: _toStr, - ReceiptHandle: _toStr, - }); -}; - -/** - * serializeAws_json1_0DeleteMessageBatchRequestEntryList - */ -const se_DeleteMessageBatchRequestEntryList = ( - input: DeleteMessageBatchRequestEntry[], - context: __SerdeContext -): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_DeleteMessageBatchRequestEntry(entry, context); - }); -}; - -/** - * serializeAws_json1_0DeleteMessageRequest - */ -const se_DeleteMessageRequest = (input: DeleteMessageRequest, context: __SerdeContext): any => { - return take(input, { - QueueUrl: _toStr, - ReceiptHandle: _toStr, - }); -}; - -/** - * serializeAws_json1_0DeleteQueueRequest - */ -const se_DeleteQueueRequest = (input: DeleteQueueRequest, context: __SerdeContext): any => { - return take(input, { - QueueUrl: _toStr, - }); -}; - -/** - * serializeAws_json1_0GetQueueAttributesRequest - */ -const se_GetQueueAttributesRequest = (input: GetQueueAttributesRequest, context: __SerdeContext): any => { - return take(input, { - AttributeNames: (_) => se_AttributeNameList(_, context), - QueueUrl: _toStr, - }); -}; - -/** - * serializeAws_json1_0GetQueueUrlRequest - */ -const se_GetQueueUrlRequest = (input: GetQueueUrlRequest, context: __SerdeContext): any => { - return take(input, { - QueueName: _toStr, - QueueOwnerAWSAccountId: _toStr, - }); -}; - -/** - * serializeAws_json1_0ListDeadLetterSourceQueuesRequest - */ -const se_ListDeadLetterSourceQueuesRequest = ( - input: ListDeadLetterSourceQueuesRequest, - context: __SerdeContext -): any => { - return take(input, { - MaxResults: _toNum, - NextToken: _toStr, - QueueUrl: _toStr, - }); -}; - -/** - * serializeAws_json1_0ListMessageMoveTasksRequest - */ -const se_ListMessageMoveTasksRequest = (input: ListMessageMoveTasksRequest, context: __SerdeContext): any => { - return take(input, { - MaxResults: _toNum, - SourceArn: _toStr, - }); -}; - -/** - * serializeAws_json1_0ListQueuesRequest - */ -const se_ListQueuesRequest = (input: ListQueuesRequest, context: __SerdeContext): any => { - return take(input, { - MaxResults: _toNum, - NextToken: _toStr, - QueueNamePrefix: _toStr, - }); -}; - -/** - * serializeAws_json1_0ListQueueTagsRequest - */ -const se_ListQueueTagsRequest = (input: ListQueueTagsRequest, context: __SerdeContext): any => { - return take(input, { - QueueUrl: _toStr, - }); -}; - -/** - * serializeAws_json1_0MessageAttributeNameList - */ -const se_MessageAttributeNameList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return _toStr(entry); - }); -}; - -/** - * serializeAws_json1_0MessageAttributeValue - */ -const se_MessageAttributeValue = (input: MessageAttributeValue, context: __SerdeContext): any => { - return take(input, { - BinaryListValues: (_) => se_BinaryList(_, context), - BinaryValue: context.base64Encoder, - DataType: _toStr, - StringListValues: (_) => se_StringList(_, context), - StringValue: _toStr, - }); -}; - -/** - * serializeAws_json1_0MessageBodyAttributeMap - */ -const se_MessageBodyAttributeMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_MessageAttributeValue(value, context); - return acc; - }, {}); -}; - -/** - * serializeAws_json1_0MessageBodySystemAttributeMap - */ -const se_MessageBodySystemAttributeMap = ( - input: Partial>, - context: __SerdeContext -): any => { - return Object.entries(input).reduce( - (acc: Record, [key, value]: [MessageSystemAttributeNameForSends | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = se_MessageSystemAttributeValue(value, context); - return acc; - }, - {} - ); -}; - -/** - * serializeAws_json1_0MessageSystemAttributeValue - */ -const se_MessageSystemAttributeValue = (input: MessageSystemAttributeValue, context: __SerdeContext): any => { - return take(input, { - BinaryListValues: (_) => se_BinaryList(_, context), - BinaryValue: context.base64Encoder, - DataType: _toStr, - StringListValues: (_) => se_StringList(_, context), - StringValue: _toStr, - }); -}; - -/** - * serializeAws_json1_0PurgeQueueRequest - */ -const se_PurgeQueueRequest = (input: PurgeQueueRequest, context: __SerdeContext): any => { - return take(input, { - QueueUrl: _toStr, - }); -}; - -/** - * serializeAws_json1_0QueueAttributeMap - */ -const se_QueueAttributeMap = (input: Partial>, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [QueueAttributeName | string, any]) => { - if (value === null) { - return acc; - } - acc[key] = _toStr(value); - return acc; - }, {}); -}; - -/** - * serializeAws_json1_0ReceiveMessageRequest - */ -const se_ReceiveMessageRequest = (input: ReceiveMessageRequest, context: __SerdeContext): any => { - return take(input, { - AttributeNames: (_) => se_AttributeNameList(_, context), - MaxNumberOfMessages: _toNum, - MessageAttributeNames: (_) => se_MessageAttributeNameList(_, context), - QueueUrl: _toStr, - ReceiveRequestAttemptId: _toStr, - VisibilityTimeout: _toNum, - WaitTimeSeconds: _toNum, - }); -}; - -/** - * serializeAws_json1_0RemovePermissionRequest - */ -const se_RemovePermissionRequest = (input: RemovePermissionRequest, context: __SerdeContext): any => { - return take(input, { - Label: _toStr, - QueueUrl: _toStr, - }); -}; - -/** - * serializeAws_json1_0SendMessageBatchRequest - */ -const se_SendMessageBatchRequest = (input: SendMessageBatchRequest, context: __SerdeContext): any => { - return take(input, { - Entries: (_) => se_SendMessageBatchRequestEntryList(_, context), - QueueUrl: _toStr, - }); -}; - -/** - * serializeAws_json1_0SendMessageBatchRequestEntry - */ -const se_SendMessageBatchRequestEntry = (input: SendMessageBatchRequestEntry, context: __SerdeContext): any => { - return take(input, { - DelaySeconds: _toNum, - Id: _toStr, - MessageAttributes: (_) => se_MessageBodyAttributeMap(_, context), - MessageBody: _toStr, - MessageDeduplicationId: _toStr, - MessageGroupId: _toStr, - MessageSystemAttributes: (_) => se_MessageBodySystemAttributeMap(_, context), - }); -}; - -/** - * serializeAws_json1_0SendMessageBatchRequestEntryList - */ -const se_SendMessageBatchRequestEntryList = (input: SendMessageBatchRequestEntry[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return se_SendMessageBatchRequestEntry(entry, context); - }); -}; - -/** - * serializeAws_json1_0SendMessageRequest - */ -const se_SendMessageRequest = (input: SendMessageRequest, context: __SerdeContext): any => { - return take(input, { - DelaySeconds: _toNum, - MessageAttributes: (_) => se_MessageBodyAttributeMap(_, context), - MessageBody: _toStr, - MessageDeduplicationId: _toStr, - MessageGroupId: _toStr, - MessageSystemAttributes: (_) => se_MessageBodySystemAttributeMap(_, context), - QueueUrl: _toStr, - }); -}; - -/** - * serializeAws_json1_0SetQueueAttributesRequest - */ -const se_SetQueueAttributesRequest = (input: SetQueueAttributesRequest, context: __SerdeContext): any => { - return take(input, { - Attributes: (_) => se_QueueAttributeMap(_, context), - QueueUrl: _toStr, - }); -}; - -/** - * serializeAws_json1_0StartMessageMoveTaskRequest - */ -const se_StartMessageMoveTaskRequest = (input: StartMessageMoveTaskRequest, context: __SerdeContext): any => { - return take(input, { - DestinationArn: _toStr, - MaxNumberOfMessagesPerSecond: _toNum, - SourceArn: _toStr, - }); -}; - -/** - * serializeAws_json1_0StringList - */ -const se_StringList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return _toStr(entry); - }); -}; - -/** - * serializeAws_json1_0TagKeyList - */ -const se_TagKeyList = (input: string[], context: __SerdeContext): any => { - return input - .filter((e: any) => e != null) - .map((entry) => { - return _toStr(entry); - }); -}; - -/** - * serializeAws_json1_0TagMap - */ -const se_TagMap = (input: Record, context: __SerdeContext): any => { - return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key] = _toStr(value); - return acc; - }, {}); -}; - -/** - * serializeAws_json1_0TagQueueRequest - */ -const se_TagQueueRequest = (input: TagQueueRequest, context: __SerdeContext): any => { - return take(input, { - QueueUrl: _toStr, - Tags: (_) => se_TagMap(_, context), - }); -}; - -/** - * serializeAws_json1_0UntagQueueRequest - */ -const se_UntagQueueRequest = (input: UntagQueueRequest, context: __SerdeContext): any => { - return take(input, { - QueueUrl: _toStr, - TagKeys: (_) => se_TagKeyList(_, context), - }); -}; - -// de_BatchEntryIdsNotDistinct omitted. - -// de_BatchRequestTooLong omitted. - -// de_BatchResultErrorEntry omitted. - -// de_BatchResultErrorEntryList omitted. - -/** - * deserializeAws_json1_0BinaryList - */ -const de_BinaryList = (output: any, context: __SerdeContext): Uint8Array[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return context.base64Decoder(entry); - }); - return retVal; -}; - -// de_CancelMessageMoveTaskResult omitted. - -// de_ChangeMessageVisibilityBatchResult omitted. - -// de_ChangeMessageVisibilityBatchResultEntry omitted. - -// de_ChangeMessageVisibilityBatchResultEntryList omitted. - -// de_CreateQueueResult omitted. - -// de_DeleteMessageBatchResult omitted. - -// de_DeleteMessageBatchResultEntry omitted. - -// de_DeleteMessageBatchResultEntryList omitted. - -// de_EmptyBatchRequest omitted. - -// de_GetQueueAttributesResult omitted. - -// de_GetQueueUrlResult omitted. - -// de_InvalidAddress omitted. - -// de_InvalidAttributeName omitted. - -// de_InvalidAttributeValue omitted. - -// de_InvalidBatchEntryId omitted. - -// de_InvalidIdFormat omitted. - -// de_InvalidMessageContents omitted. - -// de_InvalidSecurity omitted. - -// de_KmsAccessDenied omitted. - -// de_KmsDisabled omitted. - -// de_KmsInvalidKeyUsage omitted. - -// de_KmsInvalidState omitted. - -// de_KmsNotFound omitted. - -// de_KmsOptInRequired omitted. - -// de_KmsThrottled omitted. - -// de_ListDeadLetterSourceQueuesResult omitted. - -// de_ListMessageMoveTasksResult omitted. - -// de_ListMessageMoveTasksResultEntry omitted. - -// de_ListMessageMoveTasksResultEntryList omitted. - -// de_ListQueuesResult omitted. - -// de_ListQueueTagsResult omitted. - -/** - * deserializeAws_json1_0Message - */ -const de_Message = (output: any, context: __SerdeContext): Message => { - return take(output, { - Attributes: _json, - Body: __expectString, - MD5OfBody: __expectString, - MD5OfMessageAttributes: __expectString, - MessageAttributes: (_: any) => de_MessageBodyAttributeMap(_, context), - MessageId: __expectString, - ReceiptHandle: __expectString, - }) as any; -}; - -/** - * deserializeAws_json1_0MessageAttributeValue - */ -const de_MessageAttributeValue = (output: any, context: __SerdeContext): MessageAttributeValue => { - return take(output, { - BinaryListValues: (_: any) => de_BinaryList(_, context), - BinaryValue: context.base64Decoder, - DataType: __expectString, - StringListValues: _json, - StringValue: __expectString, - }) as any; -}; - -/** - * deserializeAws_json1_0MessageBodyAttributeMap - */ -const de_MessageBodyAttributeMap = (output: any, context: __SerdeContext): Record => { - return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { - if (value === null) { - return acc; - } - acc[key as string] = de_MessageAttributeValue(value, context); - return acc; - }, {} as Record); -}; - -/** - * deserializeAws_json1_0MessageList - */ -const de_MessageList = (output: any, context: __SerdeContext): Message[] => { - const retVal = (output || []) - .filter((e: any) => e != null) - .map((entry: any) => { - return de_Message(entry, context); - }); - return retVal; -}; - -// de_MessageNotInflight omitted. - -// de_MessageSystemAttributeMap omitted. - -// de_OverLimit omitted. - -// de_PurgeQueueInProgress omitted. - -// de_QueueAttributeMap omitted. - -// de_QueueDeletedRecently omitted. - -// de_QueueDoesNotExist omitted. - -// de_QueueNameExists omitted. - -// de_QueueUrlList omitted. - -// de_ReceiptHandleIsInvalid omitted. - -/** - * deserializeAws_json1_0ReceiveMessageResult - */ -const de_ReceiveMessageResult = (output: any, context: __SerdeContext): ReceiveMessageResult => { - return take(output, { - Messages: (_: any) => de_MessageList(_, context), - }) as any; -}; - -// de_RequestThrottled omitted. - -// de_ResourceNotFoundException omitted. - -// de_SendMessageBatchResult omitted. - -// de_SendMessageBatchResultEntry omitted. - -// de_SendMessageBatchResultEntryList omitted. - -// de_SendMessageResult omitted. - -// de_StartMessageMoveTaskResult omitted. - -// de_StringList omitted. - -// de_TagMap omitted. - -// de_TooManyEntriesInBatchRequest omitted. - -// de_UnsupportedOperation omitted. - -const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ - httpStatusCode: output.statusCode, - requestId: - output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], - extendedRequestId: output.headers["x-amz-id-2"], - cfId: output.headers["x-amz-cf-id"], -}); - -// Encode Uint8Array data into string with utf-8. -const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => - collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); - -const throwDefaultError = withBaseException(__BaseException); -const buildHttpRpcRequest = async ( - context: __SerdeContext, - headers: __HeaderBag, - path: string, - resolvedHostname: string | undefined, - body: any -): Promise<__HttpRequest> => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const contents: any = { - protocol, - hostname, - port, - method: "POST", - path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, - headers, - }; - if (resolvedHostname !== undefined) { - contents.hostname = resolvedHostname; - } - if (body !== undefined) { - contents.body = body; - } - return new __HttpRequest(contents); -}; -function sharedHeaders(operation: string): __HeaderBag { - return { - "content-type": "application/x-amz-json-1.0", - "x-amz-target": `AmazonSQS.${operation}`, - }; -} - -const parseBody = (streamBody: any, context: __SerdeContext): any => - collectBodyString(streamBody, context).then((encoded) => { - if (encoded.length) { - return JSON.parse(encoded); - } - return {}; - }); - -const parseErrorBody = async (errorBody: any, context: __SerdeContext) => { - const value = await parseBody(errorBody, context); - value.message = value.message ?? value.Message; - return value; -}; - -/** - * Load an error code for the aws.rest-json-1.1 protocol. - */ -const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string | undefined => { - const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()); - - const sanitizeErrorCode = (rawValue: string | number): string => { - let cleanValue = rawValue; - if (typeof cleanValue === "number") { - cleanValue = cleanValue.toString(); - } - if (cleanValue.indexOf(",") >= 0) { - cleanValue = cleanValue.split(",")[0]; - } - if (cleanValue.indexOf(":") >= 0) { - cleanValue = cleanValue.split(":")[0]; - } - if (cleanValue.indexOf("#") >= 0) { - cleanValue = cleanValue.split("#")[1]; - } - return cleanValue; - }; - - const headerKey = findKey(output.headers, "x-amzn-errortype"); - if (headerKey !== undefined) { - return sanitizeErrorCode(output.headers[headerKey]); - } - - if (data.code !== undefined) { - return sanitizeErrorCode(data.code); - } - - if (data["__type"] !== undefined) { - return sanitizeErrorCode(data["__type"]); - } -}; - -const populateBodyWithQueryCompatibility = (parsedOutput: any, headers: __HeaderBag) => { - const queryErrorHeader = headers["x-amzn-query-error"]; - if (parsedOutput.body !== undefined && queryErrorHeader != null) { - const codeAndType = queryErrorHeader.split(";"); - parsedOutput.body.Code = codeAndType[0]; - parsedOutput.body.Type = codeAndType[1]; - } -}; diff --git a/clients/client-sqs/src/protocols/Aws_query.ts b/clients/client-sqs/src/protocols/Aws_query.ts new file mode 100644 index 0000000000000..f46f15c45c73a --- /dev/null +++ b/clients/client-sqs/src/protocols/Aws_query.ts @@ -0,0 +1,3455 @@ +// smithy-typescript generated code +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; +import { + collectBody, + decorateServiceException as __decorateServiceException, + expectString as __expectString, + extendedEncodeURIComponent as __extendedEncodeURIComponent, + getArrayIfSingleItem as __getArrayIfSingleItem, + getValueFromTextNode as __getValueFromTextNode, + parseBoolean as __parseBoolean, + strictParseInt32 as __strictParseInt32, + strictParseLong as __strictParseLong, + withBaseException, +} from "@smithy/smithy-client"; +import { + Endpoint as __Endpoint, + HeaderBag as __HeaderBag, + ResponseMetadata as __ResponseMetadata, + SerdeContext as __SerdeContext, +} from "@smithy/types"; +import { XMLParser } from "fast-xml-parser"; + +import { AddPermissionCommandInput, AddPermissionCommandOutput } from "../commands/AddPermissionCommand"; +import { + CancelMessageMoveTaskCommandInput, + CancelMessageMoveTaskCommandOutput, +} from "../commands/CancelMessageMoveTaskCommand"; +import { + ChangeMessageVisibilityBatchCommandInput, + ChangeMessageVisibilityBatchCommandOutput, +} from "../commands/ChangeMessageVisibilityBatchCommand"; +import { + ChangeMessageVisibilityCommandInput, + ChangeMessageVisibilityCommandOutput, +} from "../commands/ChangeMessageVisibilityCommand"; +import { CreateQueueCommandInput, CreateQueueCommandOutput } from "../commands/CreateQueueCommand"; +import { DeleteMessageBatchCommandInput, DeleteMessageBatchCommandOutput } from "../commands/DeleteMessageBatchCommand"; +import { DeleteMessageCommandInput, DeleteMessageCommandOutput } from "../commands/DeleteMessageCommand"; +import { DeleteQueueCommandInput, DeleteQueueCommandOutput } from "../commands/DeleteQueueCommand"; +import { GetQueueAttributesCommandInput, GetQueueAttributesCommandOutput } from "../commands/GetQueueAttributesCommand"; +import { GetQueueUrlCommandInput, GetQueueUrlCommandOutput } from "../commands/GetQueueUrlCommand"; +import { + ListDeadLetterSourceQueuesCommandInput, + ListDeadLetterSourceQueuesCommandOutput, +} from "../commands/ListDeadLetterSourceQueuesCommand"; +import { + ListMessageMoveTasksCommandInput, + ListMessageMoveTasksCommandOutput, +} from "../commands/ListMessageMoveTasksCommand"; +import { ListQueuesCommandInput, ListQueuesCommandOutput } from "../commands/ListQueuesCommand"; +import { ListQueueTagsCommandInput, ListQueueTagsCommandOutput } from "../commands/ListQueueTagsCommand"; +import { PurgeQueueCommandInput, PurgeQueueCommandOutput } from "../commands/PurgeQueueCommand"; +import { ReceiveMessageCommandInput, ReceiveMessageCommandOutput } from "../commands/ReceiveMessageCommand"; +import { RemovePermissionCommandInput, RemovePermissionCommandOutput } from "../commands/RemovePermissionCommand"; +import { SendMessageBatchCommandInput, SendMessageBatchCommandOutput } from "../commands/SendMessageBatchCommand"; +import { SendMessageCommandInput, SendMessageCommandOutput } from "../commands/SendMessageCommand"; +import { SetQueueAttributesCommandInput, SetQueueAttributesCommandOutput } from "../commands/SetQueueAttributesCommand"; +import { + StartMessageMoveTaskCommandInput, + StartMessageMoveTaskCommandOutput, +} from "../commands/StartMessageMoveTaskCommand"; +import { TagQueueCommandInput, TagQueueCommandOutput } from "../commands/TagQueueCommand"; +import { UntagQueueCommandInput, UntagQueueCommandOutput } from "../commands/UntagQueueCommand"; +import { + AddPermissionRequest, + BatchEntryIdsNotDistinct, + BatchRequestTooLong, + BatchResultErrorEntry, + CancelMessageMoveTaskRequest, + CancelMessageMoveTaskResult, + ChangeMessageVisibilityBatchRequest, + ChangeMessageVisibilityBatchRequestEntry, + ChangeMessageVisibilityBatchResult, + ChangeMessageVisibilityBatchResultEntry, + ChangeMessageVisibilityRequest, + CreateQueueRequest, + CreateQueueResult, + DeleteMessageBatchRequest, + DeleteMessageBatchRequestEntry, + DeleteMessageBatchResult, + DeleteMessageBatchResultEntry, + DeleteMessageRequest, + DeleteQueueRequest, + EmptyBatchRequest, + GetQueueAttributesRequest, + GetQueueAttributesResult, + GetQueueUrlRequest, + GetQueueUrlResult, + InvalidAttributeName, + InvalidBatchEntryId, + InvalidIdFormat, + InvalidMessageContents, + ListDeadLetterSourceQueuesRequest, + ListDeadLetterSourceQueuesResult, + ListMessageMoveTasksRequest, + ListMessageMoveTasksResult, + ListMessageMoveTasksResultEntry, + ListQueuesRequest, + ListQueuesResult, + ListQueueTagsRequest, + ListQueueTagsResult, + Message, + MessageAttributeValue, + MessageNotInflight, + MessageSystemAttributeName, + MessageSystemAttributeNameForSends, + MessageSystemAttributeValue, + OverLimit, + PurgeQueueInProgress, + PurgeQueueRequest, + QueueAttributeName, + QueueDeletedRecently, + QueueDoesNotExist, + QueueNameExists, + ReceiptHandleIsInvalid, + ReceiveMessageRequest, + ReceiveMessageResult, + RemovePermissionRequest, + ResourceNotFoundException, + SendMessageBatchRequest, + SendMessageBatchRequestEntry, + SendMessageBatchResult, + SendMessageBatchResultEntry, + SendMessageRequest, + SendMessageResult, + SetQueueAttributesRequest, + StartMessageMoveTaskRequest, + StartMessageMoveTaskResult, + TagQueueRequest, + TooManyEntriesInBatchRequest, + UnsupportedOperation, + UntagQueueRequest, +} from "../models/models_0"; +import { SQSServiceException as __BaseException } from "../models/SQSServiceException"; + +/** + * serializeAws_queryAddPermissionCommand + */ +export const se_AddPermissionCommand = async ( + input: AddPermissionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_AddPermissionRequest(input, context), + Action: "AddPermission", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_queryCancelMessageMoveTaskCommand + */ +export const se_CancelMessageMoveTaskCommand = async ( + input: CancelMessageMoveTaskCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_CancelMessageMoveTaskRequest(input, context), + Action: "CancelMessageMoveTask", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_queryChangeMessageVisibilityCommand + */ +export const se_ChangeMessageVisibilityCommand = async ( + input: ChangeMessageVisibilityCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_ChangeMessageVisibilityRequest(input, context), + Action: "ChangeMessageVisibility", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_queryChangeMessageVisibilityBatchCommand + */ +export const se_ChangeMessageVisibilityBatchCommand = async ( + input: ChangeMessageVisibilityBatchCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_ChangeMessageVisibilityBatchRequest(input, context), + Action: "ChangeMessageVisibilityBatch", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_queryCreateQueueCommand + */ +export const se_CreateQueueCommand = async ( + input: CreateQueueCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_CreateQueueRequest(input, context), + Action: "CreateQueue", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_queryDeleteMessageCommand + */ +export const se_DeleteMessageCommand = async ( + input: DeleteMessageCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_DeleteMessageRequest(input, context), + Action: "DeleteMessage", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_queryDeleteMessageBatchCommand + */ +export const se_DeleteMessageBatchCommand = async ( + input: DeleteMessageBatchCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_DeleteMessageBatchRequest(input, context), + Action: "DeleteMessageBatch", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_queryDeleteQueueCommand + */ +export const se_DeleteQueueCommand = async ( + input: DeleteQueueCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_DeleteQueueRequest(input, context), + Action: "DeleteQueue", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_queryGetQueueAttributesCommand + */ +export const se_GetQueueAttributesCommand = async ( + input: GetQueueAttributesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_GetQueueAttributesRequest(input, context), + Action: "GetQueueAttributes", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_queryGetQueueUrlCommand + */ +export const se_GetQueueUrlCommand = async ( + input: GetQueueUrlCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_GetQueueUrlRequest(input, context), + Action: "GetQueueUrl", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_queryListDeadLetterSourceQueuesCommand + */ +export const se_ListDeadLetterSourceQueuesCommand = async ( + input: ListDeadLetterSourceQueuesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_ListDeadLetterSourceQueuesRequest(input, context), + Action: "ListDeadLetterSourceQueues", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_queryListMessageMoveTasksCommand + */ +export const se_ListMessageMoveTasksCommand = async ( + input: ListMessageMoveTasksCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_ListMessageMoveTasksRequest(input, context), + Action: "ListMessageMoveTasks", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_queryListQueuesCommand + */ +export const se_ListQueuesCommand = async ( + input: ListQueuesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_ListQueuesRequest(input, context), + Action: "ListQueues", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_queryListQueueTagsCommand + */ +export const se_ListQueueTagsCommand = async ( + input: ListQueueTagsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_ListQueueTagsRequest(input, context), + Action: "ListQueueTags", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_queryPurgeQueueCommand + */ +export const se_PurgeQueueCommand = async ( + input: PurgeQueueCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_PurgeQueueRequest(input, context), + Action: "PurgeQueue", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_queryReceiveMessageCommand + */ +export const se_ReceiveMessageCommand = async ( + input: ReceiveMessageCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_ReceiveMessageRequest(input, context), + Action: "ReceiveMessage", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_queryRemovePermissionCommand + */ +export const se_RemovePermissionCommand = async ( + input: RemovePermissionCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_RemovePermissionRequest(input, context), + Action: "RemovePermission", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_querySendMessageCommand + */ +export const se_SendMessageCommand = async ( + input: SendMessageCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_SendMessageRequest(input, context), + Action: "SendMessage", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_querySendMessageBatchCommand + */ +export const se_SendMessageBatchCommand = async ( + input: SendMessageBatchCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_SendMessageBatchRequest(input, context), + Action: "SendMessageBatch", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_querySetQueueAttributesCommand + */ +export const se_SetQueueAttributesCommand = async ( + input: SetQueueAttributesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_SetQueueAttributesRequest(input, context), + Action: "SetQueueAttributes", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_queryStartMessageMoveTaskCommand + */ +export const se_StartMessageMoveTaskCommand = async ( + input: StartMessageMoveTaskCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_StartMessageMoveTaskRequest(input, context), + Action: "StartMessageMoveTask", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_queryTagQueueCommand + */ +export const se_TagQueueCommand = async ( + input: TagQueueCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_TagQueueRequest(input, context), + Action: "TagQueue", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * serializeAws_queryUntagQueueCommand + */ +export const se_UntagQueueCommand = async ( + input: UntagQueueCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = SHARED_HEADERS; + let body: any; + body = buildFormUrlencodedString({ + ...se_UntagQueueRequest(input, context), + Action: "UntagQueue", + Version: "2012-11-05", + }); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +/** + * deserializeAws_queryAddPermissionCommand + */ +export const de_AddPermissionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_AddPermissionCommandError(output, context); + } + await collectBody(output.body, context); + const response: AddPermissionCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeAws_queryAddPermissionCommandError + */ +const de_AddPermissionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "OverLimit": + case "com.amazonaws.sqs#OverLimit": + throw await de_OverLimitRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Error, + errorCode, + }); + } +}; + +/** + * deserializeAws_queryCancelMessageMoveTaskCommand + */ +export const de_CancelMessageMoveTaskCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CancelMessageMoveTaskCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_CancelMessageMoveTaskResult(data.CancelMessageMoveTaskResult, context); + const response: CancelMessageMoveTaskCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_queryCancelMessageMoveTaskCommandError + */ +const de_CancelMessageMoveTaskCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AWS.SimpleQueueService.UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + throw await de_UnsupportedOperationRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.sqs#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Error, + errorCode, + }); + } +}; + +/** + * deserializeAws_queryChangeMessageVisibilityCommand + */ +export const de_ChangeMessageVisibilityCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_ChangeMessageVisibilityCommandError(output, context); + } + await collectBody(output.body, context); + const response: ChangeMessageVisibilityCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeAws_queryChangeMessageVisibilityCommandError + */ +const de_ChangeMessageVisibilityCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AWS.SimpleQueueService.MessageNotInflight": + case "com.amazonaws.sqs#MessageNotInflight": + throw await de_MessageNotInflightRes(parsedOutput, context); + case "ReceiptHandleIsInvalid": + case "com.amazonaws.sqs#ReceiptHandleIsInvalid": + throw await de_ReceiptHandleIsInvalidRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Error, + errorCode, + }); + } +}; + +/** + * deserializeAws_queryChangeMessageVisibilityBatchCommand + */ +export const de_ChangeMessageVisibilityBatchCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_ChangeMessageVisibilityBatchCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_ChangeMessageVisibilityBatchResult(data.ChangeMessageVisibilityBatchResult, context); + const response: ChangeMessageVisibilityBatchCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_queryChangeMessageVisibilityBatchCommandError + */ +const de_ChangeMessageVisibilityBatchCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AWS.SimpleQueueService.BatchEntryIdsNotDistinct": + case "com.amazonaws.sqs#BatchEntryIdsNotDistinct": + throw await de_BatchEntryIdsNotDistinctRes(parsedOutput, context); + case "AWS.SimpleQueueService.EmptyBatchRequest": + case "com.amazonaws.sqs#EmptyBatchRequest": + throw await de_EmptyBatchRequestRes(parsedOutput, context); + case "AWS.SimpleQueueService.InvalidBatchEntryId": + case "com.amazonaws.sqs#InvalidBatchEntryId": + throw await de_InvalidBatchEntryIdRes(parsedOutput, context); + case "AWS.SimpleQueueService.TooManyEntriesInBatchRequest": + case "com.amazonaws.sqs#TooManyEntriesInBatchRequest": + throw await de_TooManyEntriesInBatchRequestRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Error, + errorCode, + }); + } +}; + +/** + * deserializeAws_queryCreateQueueCommand + */ +export const de_CreateQueueCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_CreateQueueCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_CreateQueueResult(data.CreateQueueResult, context); + const response: CreateQueueCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_queryCreateQueueCommandError + */ +const de_CreateQueueCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AWS.SimpleQueueService.QueueDeletedRecently": + case "com.amazonaws.sqs#QueueDeletedRecently": + throw await de_QueueDeletedRecentlyRes(parsedOutput, context); + case "QueueAlreadyExists": + case "com.amazonaws.sqs#QueueNameExists": + throw await de_QueueNameExistsRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Error, + errorCode, + }); + } +}; + +/** + * deserializeAws_queryDeleteMessageCommand + */ +export const de_DeleteMessageCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_DeleteMessageCommandError(output, context); + } + await collectBody(output.body, context); + const response: DeleteMessageCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeAws_queryDeleteMessageCommandError + */ +const de_DeleteMessageCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidIdFormat": + case "com.amazonaws.sqs#InvalidIdFormat": + throw await de_InvalidIdFormatRes(parsedOutput, context); + case "ReceiptHandleIsInvalid": + case "com.amazonaws.sqs#ReceiptHandleIsInvalid": + throw await de_ReceiptHandleIsInvalidRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Error, + errorCode, + }); + } +}; + +/** + * deserializeAws_queryDeleteMessageBatchCommand + */ +export const de_DeleteMessageBatchCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_DeleteMessageBatchCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_DeleteMessageBatchResult(data.DeleteMessageBatchResult, context); + const response: DeleteMessageBatchCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_queryDeleteMessageBatchCommandError + */ +const de_DeleteMessageBatchCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AWS.SimpleQueueService.BatchEntryIdsNotDistinct": + case "com.amazonaws.sqs#BatchEntryIdsNotDistinct": + throw await de_BatchEntryIdsNotDistinctRes(parsedOutput, context); + case "AWS.SimpleQueueService.EmptyBatchRequest": + case "com.amazonaws.sqs#EmptyBatchRequest": + throw await de_EmptyBatchRequestRes(parsedOutput, context); + case "AWS.SimpleQueueService.InvalidBatchEntryId": + case "com.amazonaws.sqs#InvalidBatchEntryId": + throw await de_InvalidBatchEntryIdRes(parsedOutput, context); + case "AWS.SimpleQueueService.TooManyEntriesInBatchRequest": + case "com.amazonaws.sqs#TooManyEntriesInBatchRequest": + throw await de_TooManyEntriesInBatchRequestRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Error, + errorCode, + }); + } +}; + +/** + * deserializeAws_queryDeleteQueueCommand + */ +export const de_DeleteQueueCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_DeleteQueueCommandError(output, context); + } + await collectBody(output.body, context); + const response: DeleteQueueCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeAws_queryDeleteQueueCommandError + */ +const de_DeleteQueueCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Error, + errorCode, + }); +}; + +/** + * deserializeAws_queryGetQueueAttributesCommand + */ +export const de_GetQueueAttributesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_GetQueueAttributesCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_GetQueueAttributesResult(data.GetQueueAttributesResult, context); + const response: GetQueueAttributesCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_queryGetQueueAttributesCommandError + */ +const de_GetQueueAttributesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidAttributeName": + case "com.amazonaws.sqs#InvalidAttributeName": + throw await de_InvalidAttributeNameRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Error, + errorCode, + }); + } +}; + +/** + * deserializeAws_queryGetQueueUrlCommand + */ +export const de_GetQueueUrlCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_GetQueueUrlCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_GetQueueUrlResult(data.GetQueueUrlResult, context); + const response: GetQueueUrlCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_queryGetQueueUrlCommandError + */ +const de_GetQueueUrlCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AWS.SimpleQueueService.NonExistentQueue": + case "com.amazonaws.sqs#QueueDoesNotExist": + throw await de_QueueDoesNotExistRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Error, + errorCode, + }); + } +}; + +/** + * deserializeAws_queryListDeadLetterSourceQueuesCommand + */ +export const de_ListDeadLetterSourceQueuesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_ListDeadLetterSourceQueuesCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_ListDeadLetterSourceQueuesResult(data.ListDeadLetterSourceQueuesResult, context); + const response: ListDeadLetterSourceQueuesCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_queryListDeadLetterSourceQueuesCommandError + */ +const de_ListDeadLetterSourceQueuesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AWS.SimpleQueueService.NonExistentQueue": + case "com.amazonaws.sqs#QueueDoesNotExist": + throw await de_QueueDoesNotExistRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Error, + errorCode, + }); + } +}; + +/** + * deserializeAws_queryListMessageMoveTasksCommand + */ +export const de_ListMessageMoveTasksCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_ListMessageMoveTasksCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_ListMessageMoveTasksResult(data.ListMessageMoveTasksResult, context); + const response: ListMessageMoveTasksCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_queryListMessageMoveTasksCommandError + */ +const de_ListMessageMoveTasksCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AWS.SimpleQueueService.UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + throw await de_UnsupportedOperationRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.sqs#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Error, + errorCode, + }); + } +}; + +/** + * deserializeAws_queryListQueuesCommand + */ +export const de_ListQueuesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_ListQueuesCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_ListQueuesResult(data.ListQueuesResult, context); + const response: ListQueuesCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_queryListQueuesCommandError + */ +const de_ListQueuesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Error, + errorCode, + }); +}; + +/** + * deserializeAws_queryListQueueTagsCommand + */ +export const de_ListQueueTagsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_ListQueueTagsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_ListQueueTagsResult(data.ListQueueTagsResult, context); + const response: ListQueueTagsCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_queryListQueueTagsCommandError + */ +const de_ListQueueTagsCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Error, + errorCode, + }); +}; + +/** + * deserializeAws_queryPurgeQueueCommand + */ +export const de_PurgeQueueCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_PurgeQueueCommandError(output, context); + } + await collectBody(output.body, context); + const response: PurgeQueueCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeAws_queryPurgeQueueCommandError + */ +const de_PurgeQueueCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AWS.SimpleQueueService.NonExistentQueue": + case "com.amazonaws.sqs#QueueDoesNotExist": + throw await de_QueueDoesNotExistRes(parsedOutput, context); + case "AWS.SimpleQueueService.PurgeQueueInProgress": + case "com.amazonaws.sqs#PurgeQueueInProgress": + throw await de_PurgeQueueInProgressRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Error, + errorCode, + }); + } +}; + +/** + * deserializeAws_queryReceiveMessageCommand + */ +export const de_ReceiveMessageCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_ReceiveMessageCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_ReceiveMessageResult(data.ReceiveMessageResult, context); + const response: ReceiveMessageCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_queryReceiveMessageCommandError + */ +const de_ReceiveMessageCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "OverLimit": + case "com.amazonaws.sqs#OverLimit": + throw await de_OverLimitRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Error, + errorCode, + }); + } +}; + +/** + * deserializeAws_queryRemovePermissionCommand + */ +export const de_RemovePermissionCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_RemovePermissionCommandError(output, context); + } + await collectBody(output.body, context); + const response: RemovePermissionCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeAws_queryRemovePermissionCommandError + */ +const de_RemovePermissionCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Error, + errorCode, + }); +}; + +/** + * deserializeAws_querySendMessageCommand + */ +export const de_SendMessageCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_SendMessageCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_SendMessageResult(data.SendMessageResult, context); + const response: SendMessageCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_querySendMessageCommandError + */ +const de_SendMessageCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AWS.SimpleQueueService.UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + throw await de_UnsupportedOperationRes(parsedOutput, context); + case "InvalidMessageContents": + case "com.amazonaws.sqs#InvalidMessageContents": + throw await de_InvalidMessageContentsRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Error, + errorCode, + }); + } +}; + +/** + * deserializeAws_querySendMessageBatchCommand + */ +export const de_SendMessageBatchCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_SendMessageBatchCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_SendMessageBatchResult(data.SendMessageBatchResult, context); + const response: SendMessageBatchCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_querySendMessageBatchCommandError + */ +const de_SendMessageBatchCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AWS.SimpleQueueService.BatchEntryIdsNotDistinct": + case "com.amazonaws.sqs#BatchEntryIdsNotDistinct": + throw await de_BatchEntryIdsNotDistinctRes(parsedOutput, context); + case "AWS.SimpleQueueService.BatchRequestTooLong": + case "com.amazonaws.sqs#BatchRequestTooLong": + throw await de_BatchRequestTooLongRes(parsedOutput, context); + case "AWS.SimpleQueueService.EmptyBatchRequest": + case "com.amazonaws.sqs#EmptyBatchRequest": + throw await de_EmptyBatchRequestRes(parsedOutput, context); + case "AWS.SimpleQueueService.InvalidBatchEntryId": + case "com.amazonaws.sqs#InvalidBatchEntryId": + throw await de_InvalidBatchEntryIdRes(parsedOutput, context); + case "AWS.SimpleQueueService.TooManyEntriesInBatchRequest": + case "com.amazonaws.sqs#TooManyEntriesInBatchRequest": + throw await de_TooManyEntriesInBatchRequestRes(parsedOutput, context); + case "AWS.SimpleQueueService.UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + throw await de_UnsupportedOperationRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Error, + errorCode, + }); + } +}; + +/** + * deserializeAws_querySetQueueAttributesCommand + */ +export const de_SetQueueAttributesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_SetQueueAttributesCommandError(output, context); + } + await collectBody(output.body, context); + const response: SetQueueAttributesCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeAws_querySetQueueAttributesCommandError + */ +const de_SetQueueAttributesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InvalidAttributeName": + case "com.amazonaws.sqs#InvalidAttributeName": + throw await de_InvalidAttributeNameRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Error, + errorCode, + }); + } +}; + +/** + * deserializeAws_queryStartMessageMoveTaskCommand + */ +export const de_StartMessageMoveTaskCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_StartMessageMoveTaskCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = de_StartMessageMoveTaskResult(data.StartMessageMoveTaskResult, context); + const response: StartMessageMoveTaskCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return response; +}; + +/** + * deserializeAws_queryStartMessageMoveTaskCommandError + */ +const de_StartMessageMoveTaskCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AWS.SimpleQueueService.UnsupportedOperation": + case "com.amazonaws.sqs#UnsupportedOperation": + throw await de_UnsupportedOperationRes(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.sqs#ResourceNotFoundException": + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Error, + errorCode, + }); + } +}; + +/** + * deserializeAws_queryTagQueueCommand + */ +export const de_TagQueueCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_TagQueueCommandError(output, context); + } + await collectBody(output.body, context); + const response: TagQueueCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeAws_queryTagQueueCommandError + */ +const de_TagQueueCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Error, + errorCode, + }); +}; + +/** + * deserializeAws_queryUntagQueueCommand + */ +export const de_UntagQueueCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return de_UntagQueueCommandError(output, context); + } + await collectBody(output.body, context); + const response: UntagQueueCommandOutput = { + $metadata: deserializeMetadata(output), + }; + return response; +}; + +/** + * deserializeAws_queryUntagQueueCommandError + */ +const de_UntagQueueCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadQueryErrorCode(output, parsedOutput.body); + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody: parsedBody.Error, + errorCode, + }); +}; + +/** + * deserializeAws_queryBatchEntryIdsNotDistinctRes + */ +const de_BatchEntryIdsNotDistinctRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = de_BatchEntryIdsNotDistinct(body.Error, context); + const exception = new BatchEntryIdsNotDistinct({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_queryBatchRequestTooLongRes + */ +const de_BatchRequestTooLongRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = de_BatchRequestTooLong(body.Error, context); + const exception = new BatchRequestTooLong({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_queryEmptyBatchRequestRes + */ +const de_EmptyBatchRequestRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = de_EmptyBatchRequest(body.Error, context); + const exception = new EmptyBatchRequest({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_queryInvalidAttributeNameRes + */ +const de_InvalidAttributeNameRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = de_InvalidAttributeName(body.Error, context); + const exception = new InvalidAttributeName({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_queryInvalidBatchEntryIdRes + */ +const de_InvalidBatchEntryIdRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = de_InvalidBatchEntryId(body.Error, context); + const exception = new InvalidBatchEntryId({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_queryInvalidIdFormatRes + */ +const de_InvalidIdFormatRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = de_InvalidIdFormat(body.Error, context); + const exception = new InvalidIdFormat({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_queryInvalidMessageContentsRes + */ +const de_InvalidMessageContentsRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = de_InvalidMessageContents(body.Error, context); + const exception = new InvalidMessageContents({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_queryMessageNotInflightRes + */ +const de_MessageNotInflightRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = de_MessageNotInflight(body.Error, context); + const exception = new MessageNotInflight({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_queryOverLimitRes + */ +const de_OverLimitRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = de_OverLimit(body.Error, context); + const exception = new OverLimit({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_queryPurgeQueueInProgressRes + */ +const de_PurgeQueueInProgressRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = de_PurgeQueueInProgress(body.Error, context); + const exception = new PurgeQueueInProgress({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_queryQueueDeletedRecentlyRes + */ +const de_QueueDeletedRecentlyRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = de_QueueDeletedRecently(body.Error, context); + const exception = new QueueDeletedRecently({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_queryQueueDoesNotExistRes + */ +const de_QueueDoesNotExistRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = de_QueueDoesNotExist(body.Error, context); + const exception = new QueueDoesNotExist({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_queryQueueNameExistsRes + */ +const de_QueueNameExistsRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const body = parsedOutput.body; + const deserialized: any = de_QueueNameExists(body.Error, context); + const exception = new QueueNameExists({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_queryReceiptHandleIsInvalidRes + */ +const de_ReceiptHandleIsInvalidRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = de_ReceiptHandleIsInvalid(body.Error, context); + const exception = new ReceiptHandleIsInvalid({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_queryResourceNotFoundExceptionRes + */ +const de_ResourceNotFoundExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = de_ResourceNotFoundException(body.Error, context); + const exception = new ResourceNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_queryTooManyEntriesInBatchRequestRes + */ +const de_TooManyEntriesInBatchRequestRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = de_TooManyEntriesInBatchRequest(body.Error, context); + const exception = new TooManyEntriesInBatchRequest({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * deserializeAws_queryUnsupportedOperationRes + */ +const de_UnsupportedOperationRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = de_UnsupportedOperation(body.Error, context); + const exception = new UnsupportedOperation({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +/** + * serializeAws_queryActionNameList + */ +const se_ActionNameList = (input: string[], context: __SerdeContext): any => { + const entries: any = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; +}; + +/** + * serializeAws_queryAddPermissionRequest + */ +const se_AddPermissionRequest = (input: AddPermissionRequest, context: __SerdeContext): any => { + const entries: any = {}; + if (input.QueueUrl != null) { + entries["QueueUrl"] = input.QueueUrl; + } + if (input.Label != null) { + entries["Label"] = input.Label; + } + if (input.AWSAccountIds != null) { + const memberEntries = se_AWSAccountIdList(input.AWSAccountIds, context); + if (input.AWSAccountIds?.length === 0) { + entries.AWSAccountId = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `AWSAccountId.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + if (input.Actions != null) { + const memberEntries = se_ActionNameList(input.Actions, context); + if (input.Actions?.length === 0) { + entries.ActionName = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `ActionName.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + return entries; +}; + +/** + * serializeAws_queryAttributeNameList + */ +const se_AttributeNameList = (input: QueueAttributeName[], context: __SerdeContext): any => { + const entries: any = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; +}; + +/** + * serializeAws_queryAWSAccountIdList + */ +const se_AWSAccountIdList = (input: string[], context: __SerdeContext): any => { + const entries: any = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; +}; + +/** + * serializeAws_queryBinaryList + */ +const se_BinaryList = (input: Uint8Array[], context: __SerdeContext): any => { + const entries: any = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + entries[`BinaryListValue.${counter}`] = context.base64Encoder(entry); + counter++; + } + return entries; +}; + +/** + * serializeAws_queryCancelMessageMoveTaskRequest + */ +const se_CancelMessageMoveTaskRequest = (input: CancelMessageMoveTaskRequest, context: __SerdeContext): any => { + const entries: any = {}; + if (input.TaskHandle != null) { + entries["TaskHandle"] = input.TaskHandle; + } + return entries; +}; + +/** + * serializeAws_queryChangeMessageVisibilityBatchRequest + */ +const se_ChangeMessageVisibilityBatchRequest = ( + input: ChangeMessageVisibilityBatchRequest, + context: __SerdeContext +): any => { + const entries: any = {}; + if (input.QueueUrl != null) { + entries["QueueUrl"] = input.QueueUrl; + } + if (input.Entries != null) { + const memberEntries = se_ChangeMessageVisibilityBatchRequestEntryList(input.Entries, context); + if (input.Entries?.length === 0) { + entries.ChangeMessageVisibilityBatchRequestEntry = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `ChangeMessageVisibilityBatchRequestEntry.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + return entries; +}; + +/** + * serializeAws_queryChangeMessageVisibilityBatchRequestEntry + */ +const se_ChangeMessageVisibilityBatchRequestEntry = ( + input: ChangeMessageVisibilityBatchRequestEntry, + context: __SerdeContext +): any => { + const entries: any = {}; + if (input.Id != null) { + entries["Id"] = input.Id; + } + if (input.ReceiptHandle != null) { + entries["ReceiptHandle"] = input.ReceiptHandle; + } + if (input.VisibilityTimeout != null) { + entries["VisibilityTimeout"] = input.VisibilityTimeout; + } + return entries; +}; + +/** + * serializeAws_queryChangeMessageVisibilityBatchRequestEntryList + */ +const se_ChangeMessageVisibilityBatchRequestEntryList = ( + input: ChangeMessageVisibilityBatchRequestEntry[], + context: __SerdeContext +): any => { + const entries: any = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = se_ChangeMessageVisibilityBatchRequestEntry(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; +}; + +/** + * serializeAws_queryChangeMessageVisibilityRequest + */ +const se_ChangeMessageVisibilityRequest = (input: ChangeMessageVisibilityRequest, context: __SerdeContext): any => { + const entries: any = {}; + if (input.QueueUrl != null) { + entries["QueueUrl"] = input.QueueUrl; + } + if (input.ReceiptHandle != null) { + entries["ReceiptHandle"] = input.ReceiptHandle; + } + if (input.VisibilityTimeout != null) { + entries["VisibilityTimeout"] = input.VisibilityTimeout; + } + return entries; +}; + +/** + * serializeAws_queryCreateQueueRequest + */ +const se_CreateQueueRequest = (input: CreateQueueRequest, context: __SerdeContext): any => { + const entries: any = {}; + if (input.QueueName != null) { + entries["QueueName"] = input.QueueName; + } + if (input.tags != null) { + const memberEntries = se_TagMap(input.tags, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Tag.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + if (input.Attributes != null) { + const memberEntries = se_QueueAttributeMap(input.Attributes, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Attribute.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + return entries; +}; + +/** + * serializeAws_queryDeleteMessageBatchRequest + */ +const se_DeleteMessageBatchRequest = (input: DeleteMessageBatchRequest, context: __SerdeContext): any => { + const entries: any = {}; + if (input.QueueUrl != null) { + entries["QueueUrl"] = input.QueueUrl; + } + if (input.Entries != null) { + const memberEntries = se_DeleteMessageBatchRequestEntryList(input.Entries, context); + if (input.Entries?.length === 0) { + entries.DeleteMessageBatchRequestEntry = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `DeleteMessageBatchRequestEntry.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + return entries; +}; + +/** + * serializeAws_queryDeleteMessageBatchRequestEntry + */ +const se_DeleteMessageBatchRequestEntry = (input: DeleteMessageBatchRequestEntry, context: __SerdeContext): any => { + const entries: any = {}; + if (input.Id != null) { + entries["Id"] = input.Id; + } + if (input.ReceiptHandle != null) { + entries["ReceiptHandle"] = input.ReceiptHandle; + } + return entries; +}; + +/** + * serializeAws_queryDeleteMessageBatchRequestEntryList + */ +const se_DeleteMessageBatchRequestEntryList = ( + input: DeleteMessageBatchRequestEntry[], + context: __SerdeContext +): any => { + const entries: any = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = se_DeleteMessageBatchRequestEntry(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; +}; + +/** + * serializeAws_queryDeleteMessageRequest + */ +const se_DeleteMessageRequest = (input: DeleteMessageRequest, context: __SerdeContext): any => { + const entries: any = {}; + if (input.QueueUrl != null) { + entries["QueueUrl"] = input.QueueUrl; + } + if (input.ReceiptHandle != null) { + entries["ReceiptHandle"] = input.ReceiptHandle; + } + return entries; +}; + +/** + * serializeAws_queryDeleteQueueRequest + */ +const se_DeleteQueueRequest = (input: DeleteQueueRequest, context: __SerdeContext): any => { + const entries: any = {}; + if (input.QueueUrl != null) { + entries["QueueUrl"] = input.QueueUrl; + } + return entries; +}; + +/** + * serializeAws_queryGetQueueAttributesRequest + */ +const se_GetQueueAttributesRequest = (input: GetQueueAttributesRequest, context: __SerdeContext): any => { + const entries: any = {}; + if (input.QueueUrl != null) { + entries["QueueUrl"] = input.QueueUrl; + } + if (input.AttributeNames != null) { + const memberEntries = se_AttributeNameList(input.AttributeNames, context); + if (input.AttributeNames?.length === 0) { + entries.AttributeName = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `AttributeName.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + return entries; +}; + +/** + * serializeAws_queryGetQueueUrlRequest + */ +const se_GetQueueUrlRequest = (input: GetQueueUrlRequest, context: __SerdeContext): any => { + const entries: any = {}; + if (input.QueueName != null) { + entries["QueueName"] = input.QueueName; + } + if (input.QueueOwnerAWSAccountId != null) { + entries["QueueOwnerAWSAccountId"] = input.QueueOwnerAWSAccountId; + } + return entries; +}; + +/** + * serializeAws_queryListDeadLetterSourceQueuesRequest + */ +const se_ListDeadLetterSourceQueuesRequest = ( + input: ListDeadLetterSourceQueuesRequest, + context: __SerdeContext +): any => { + const entries: any = {}; + if (input.QueueUrl != null) { + entries["QueueUrl"] = input.QueueUrl; + } + if (input.NextToken != null) { + entries["NextToken"] = input.NextToken; + } + if (input.MaxResults != null) { + entries["MaxResults"] = input.MaxResults; + } + return entries; +}; + +/** + * serializeAws_queryListMessageMoveTasksRequest + */ +const se_ListMessageMoveTasksRequest = (input: ListMessageMoveTasksRequest, context: __SerdeContext): any => { + const entries: any = {}; + if (input.SourceArn != null) { + entries["SourceArn"] = input.SourceArn; + } + if (input.MaxResults != null) { + entries["MaxResults"] = input.MaxResults; + } + return entries; +}; + +/** + * serializeAws_queryListQueuesRequest + */ +const se_ListQueuesRequest = (input: ListQueuesRequest, context: __SerdeContext): any => { + const entries: any = {}; + if (input.QueueNamePrefix != null) { + entries["QueueNamePrefix"] = input.QueueNamePrefix; + } + if (input.NextToken != null) { + entries["NextToken"] = input.NextToken; + } + if (input.MaxResults != null) { + entries["MaxResults"] = input.MaxResults; + } + return entries; +}; + +/** + * serializeAws_queryListQueueTagsRequest + */ +const se_ListQueueTagsRequest = (input: ListQueueTagsRequest, context: __SerdeContext): any => { + const entries: any = {}; + if (input.QueueUrl != null) { + entries["QueueUrl"] = input.QueueUrl; + } + return entries; +}; + +/** + * serializeAws_queryMessageAttributeNameList + */ +const se_MessageAttributeNameList = (input: string[], context: __SerdeContext): any => { + const entries: any = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; +}; + +/** + * serializeAws_queryMessageAttributeValue + */ +const se_MessageAttributeValue = (input: MessageAttributeValue, context: __SerdeContext): any => { + const entries: any = {}; + if (input.StringValue != null) { + entries["StringValue"] = input.StringValue; + } + if (input.BinaryValue != null) { + entries["BinaryValue"] = context.base64Encoder(input.BinaryValue); + } + if (input.StringListValues != null) { + const memberEntries = se_StringList(input.StringListValues, context); + if (input.StringListValues?.length === 0) { + entries.StringListValue = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `StringListValue.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + if (input.BinaryListValues != null) { + const memberEntries = se_BinaryList(input.BinaryListValues, context); + if (input.BinaryListValues?.length === 0) { + entries.BinaryListValue = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `BinaryListValue.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + if (input.DataType != null) { + entries["DataType"] = input.DataType; + } + return entries; +}; + +/** + * serializeAws_queryMessageBodyAttributeMap + */ +const se_MessageBodyAttributeMap = (input: Record, context: __SerdeContext): any => { + const entries: any = {}; + let counter = 1; + Object.keys(input) + .filter((key) => input[key as keyof typeof input] != null) + .forEach((key) => { + entries[`entry.${counter}.Name`] = key; + const memberEntries = se_MessageAttributeValue(input[key as keyof typeof input]!, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`entry.${counter}.Value.${key}`] = value; + }); + counter++; + }); + return entries; +}; + +/** + * serializeAws_queryMessageBodySystemAttributeMap + */ +const se_MessageBodySystemAttributeMap = ( + input: Partial>, + context: __SerdeContext +): any => { + const entries: any = {}; + let counter = 1; + Object.keys(input) + .filter((key) => input[key as keyof typeof input] != null) + .forEach((key) => { + entries[`entry.${counter}.Name`] = key; + const memberEntries = se_MessageSystemAttributeValue(input[key as keyof typeof input]!, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`entry.${counter}.Value.${key}`] = value; + }); + counter++; + }); + return entries; +}; + +/** + * serializeAws_queryMessageSystemAttributeValue + */ +const se_MessageSystemAttributeValue = (input: MessageSystemAttributeValue, context: __SerdeContext): any => { + const entries: any = {}; + if (input.StringValue != null) { + entries["StringValue"] = input.StringValue; + } + if (input.BinaryValue != null) { + entries["BinaryValue"] = context.base64Encoder(input.BinaryValue); + } + if (input.StringListValues != null) { + const memberEntries = se_StringList(input.StringListValues, context); + if (input.StringListValues?.length === 0) { + entries.StringListValue = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `StringListValue.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + if (input.BinaryListValues != null) { + const memberEntries = se_BinaryList(input.BinaryListValues, context); + if (input.BinaryListValues?.length === 0) { + entries.BinaryListValue = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `BinaryListValue.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + if (input.DataType != null) { + entries["DataType"] = input.DataType; + } + return entries; +}; + +/** + * serializeAws_queryPurgeQueueRequest + */ +const se_PurgeQueueRequest = (input: PurgeQueueRequest, context: __SerdeContext): any => { + const entries: any = {}; + if (input.QueueUrl != null) { + entries["QueueUrl"] = input.QueueUrl; + } + return entries; +}; + +/** + * serializeAws_queryQueueAttributeMap + */ +const se_QueueAttributeMap = (input: Partial>, context: __SerdeContext): any => { + const entries: any = {}; + let counter = 1; + Object.keys(input) + .filter((key) => input[key as keyof typeof input] != null) + .forEach((key) => { + entries[`entry.${counter}.Name`] = key; + entries[`entry.${counter}.Value`] = input[key as keyof typeof input]!; + counter++; + }); + return entries; +}; + +/** + * serializeAws_queryReceiveMessageRequest + */ +const se_ReceiveMessageRequest = (input: ReceiveMessageRequest, context: __SerdeContext): any => { + const entries: any = {}; + if (input.QueueUrl != null) { + entries["QueueUrl"] = input.QueueUrl; + } + if (input.AttributeNames != null) { + const memberEntries = se_AttributeNameList(input.AttributeNames, context); + if (input.AttributeNames?.length === 0) { + entries.AttributeName = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `AttributeName.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + if (input.MessageAttributeNames != null) { + const memberEntries = se_MessageAttributeNameList(input.MessageAttributeNames, context); + if (input.MessageAttributeNames?.length === 0) { + entries.MessageAttributeName = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `MessageAttributeName.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + if (input.MaxNumberOfMessages != null) { + entries["MaxNumberOfMessages"] = input.MaxNumberOfMessages; + } + if (input.VisibilityTimeout != null) { + entries["VisibilityTimeout"] = input.VisibilityTimeout; + } + if (input.WaitTimeSeconds != null) { + entries["WaitTimeSeconds"] = input.WaitTimeSeconds; + } + if (input.ReceiveRequestAttemptId != null) { + entries["ReceiveRequestAttemptId"] = input.ReceiveRequestAttemptId; + } + return entries; +}; + +/** + * serializeAws_queryRemovePermissionRequest + */ +const se_RemovePermissionRequest = (input: RemovePermissionRequest, context: __SerdeContext): any => { + const entries: any = {}; + if (input.QueueUrl != null) { + entries["QueueUrl"] = input.QueueUrl; + } + if (input.Label != null) { + entries["Label"] = input.Label; + } + return entries; +}; + +/** + * serializeAws_querySendMessageBatchRequest + */ +const se_SendMessageBatchRequest = (input: SendMessageBatchRequest, context: __SerdeContext): any => { + const entries: any = {}; + if (input.QueueUrl != null) { + entries["QueueUrl"] = input.QueueUrl; + } + if (input.Entries != null) { + const memberEntries = se_SendMessageBatchRequestEntryList(input.Entries, context); + if (input.Entries?.length === 0) { + entries.SendMessageBatchRequestEntry = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `SendMessageBatchRequestEntry.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + return entries; +}; + +/** + * serializeAws_querySendMessageBatchRequestEntry + */ +const se_SendMessageBatchRequestEntry = (input: SendMessageBatchRequestEntry, context: __SerdeContext): any => { + const entries: any = {}; + if (input.Id != null) { + entries["Id"] = input.Id; + } + if (input.MessageBody != null) { + entries["MessageBody"] = input.MessageBody; + } + if (input.DelaySeconds != null) { + entries["DelaySeconds"] = input.DelaySeconds; + } + if (input.MessageAttributes != null) { + const memberEntries = se_MessageBodyAttributeMap(input.MessageAttributes, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `MessageAttribute.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + if (input.MessageSystemAttributes != null) { + const memberEntries = se_MessageBodySystemAttributeMap(input.MessageSystemAttributes, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `MessageSystemAttribute.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + if (input.MessageDeduplicationId != null) { + entries["MessageDeduplicationId"] = input.MessageDeduplicationId; + } + if (input.MessageGroupId != null) { + entries["MessageGroupId"] = input.MessageGroupId; + } + return entries; +}; + +/** + * serializeAws_querySendMessageBatchRequestEntryList + */ +const se_SendMessageBatchRequestEntryList = (input: SendMessageBatchRequestEntry[], context: __SerdeContext): any => { + const entries: any = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = se_SendMessageBatchRequestEntry(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; + } + return entries; +}; + +/** + * serializeAws_querySendMessageRequest + */ +const se_SendMessageRequest = (input: SendMessageRequest, context: __SerdeContext): any => { + const entries: any = {}; + if (input.QueueUrl != null) { + entries["QueueUrl"] = input.QueueUrl; + } + if (input.MessageBody != null) { + entries["MessageBody"] = input.MessageBody; + } + if (input.DelaySeconds != null) { + entries["DelaySeconds"] = input.DelaySeconds; + } + if (input.MessageAttributes != null) { + const memberEntries = se_MessageBodyAttributeMap(input.MessageAttributes, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `MessageAttribute.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + if (input.MessageSystemAttributes != null) { + const memberEntries = se_MessageBodySystemAttributeMap(input.MessageSystemAttributes, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `MessageSystemAttribute.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + if (input.MessageDeduplicationId != null) { + entries["MessageDeduplicationId"] = input.MessageDeduplicationId; + } + if (input.MessageGroupId != null) { + entries["MessageGroupId"] = input.MessageGroupId; + } + return entries; +}; + +/** + * serializeAws_querySetQueueAttributesRequest + */ +const se_SetQueueAttributesRequest = (input: SetQueueAttributesRequest, context: __SerdeContext): any => { + const entries: any = {}; + if (input.QueueUrl != null) { + entries["QueueUrl"] = input.QueueUrl; + } + if (input.Attributes != null) { + const memberEntries = se_QueueAttributeMap(input.Attributes, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Attribute.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + return entries; +}; + +/** + * serializeAws_queryStartMessageMoveTaskRequest + */ +const se_StartMessageMoveTaskRequest = (input: StartMessageMoveTaskRequest, context: __SerdeContext): any => { + const entries: any = {}; + if (input.SourceArn != null) { + entries["SourceArn"] = input.SourceArn; + } + if (input.DestinationArn != null) { + entries["DestinationArn"] = input.DestinationArn; + } + if (input.MaxNumberOfMessagesPerSecond != null) { + entries["MaxNumberOfMessagesPerSecond"] = input.MaxNumberOfMessagesPerSecond; + } + return entries; +}; + +/** + * serializeAws_queryStringList + */ +const se_StringList = (input: string[], context: __SerdeContext): any => { + const entries: any = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + entries[`StringListValue.${counter}`] = entry; + counter++; + } + return entries; +}; + +/** + * serializeAws_queryTagKeyList + */ +const se_TagKeyList = (input: string[], context: __SerdeContext): any => { + const entries: any = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + entries[`member.${counter}`] = entry; + counter++; + } + return entries; +}; + +/** + * serializeAws_queryTagMap + */ +const se_TagMap = (input: Record, context: __SerdeContext): any => { + const entries: any = {}; + let counter = 1; + Object.keys(input) + .filter((key) => input[key as keyof typeof input] != null) + .forEach((key) => { + entries[`entry.${counter}.Key`] = key; + entries[`entry.${counter}.Value`] = input[key as keyof typeof input]!; + counter++; + }); + return entries; +}; + +/** + * serializeAws_queryTagQueueRequest + */ +const se_TagQueueRequest = (input: TagQueueRequest, context: __SerdeContext): any => { + const entries: any = {}; + if (input.QueueUrl != null) { + entries["QueueUrl"] = input.QueueUrl; + } + if (input.Tags != null) { + const memberEntries = se_TagMap(input.Tags, context); + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `Tag.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + return entries; +}; + +/** + * serializeAws_queryUntagQueueRequest + */ +const se_UntagQueueRequest = (input: UntagQueueRequest, context: __SerdeContext): any => { + const entries: any = {}; + if (input.QueueUrl != null) { + entries["QueueUrl"] = input.QueueUrl; + } + if (input.TagKeys != null) { + const memberEntries = se_TagKeyList(input.TagKeys, context); + if (input.TagKeys?.length === 0) { + entries.TagKey = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `TagKey.${key.substring(key.indexOf(".") + 1)}`; + entries[loc] = value; + }); + } + return entries; +}; + +/** + * deserializeAws_queryBatchEntryIdsNotDistinct + */ +const de_BatchEntryIdsNotDistinct = (output: any, context: __SerdeContext): BatchEntryIdsNotDistinct => { + const contents: any = {}; + return contents; +}; + +/** + * deserializeAws_queryBatchRequestTooLong + */ +const de_BatchRequestTooLong = (output: any, context: __SerdeContext): BatchRequestTooLong => { + const contents: any = {}; + return contents; +}; + +/** + * deserializeAws_queryBatchResultErrorEntry + */ +const de_BatchResultErrorEntry = (output: any, context: __SerdeContext): BatchResultErrorEntry => { + const contents: any = {}; + if (output["Id"] !== undefined) { + contents.Id = __expectString(output["Id"]); + } + if (output["SenderFault"] !== undefined) { + contents.SenderFault = __parseBoolean(output["SenderFault"]); + } + if (output["Code"] !== undefined) { + contents.Code = __expectString(output["Code"]); + } + if (output["Message"] !== undefined) { + contents.Message = __expectString(output["Message"]); + } + return contents; +}; + +/** + * deserializeAws_queryBatchResultErrorEntryList + */ +const de_BatchResultErrorEntryList = (output: any, context: __SerdeContext): BatchResultErrorEntry[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_BatchResultErrorEntry(entry, context); + }); +}; + +/** + * deserializeAws_queryBinaryList + */ +const de_BinaryList = (output: any, context: __SerdeContext): Uint8Array[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return context.base64Decoder(entry); + }); +}; + +/** + * deserializeAws_queryCancelMessageMoveTaskResult + */ +const de_CancelMessageMoveTaskResult = (output: any, context: __SerdeContext): CancelMessageMoveTaskResult => { + const contents: any = {}; + if (output["ApproximateNumberOfMessagesMoved"] !== undefined) { + contents.ApproximateNumberOfMessagesMoved = __strictParseLong(output["ApproximateNumberOfMessagesMoved"]) as number; + } + return contents; +}; + +/** + * deserializeAws_queryChangeMessageVisibilityBatchResult + */ +const de_ChangeMessageVisibilityBatchResult = ( + output: any, + context: __SerdeContext +): ChangeMessageVisibilityBatchResult => { + const contents: any = {}; + if (output.ChangeMessageVisibilityBatchResultEntry === "") { + contents.Successful = []; + } else if (output["ChangeMessageVisibilityBatchResultEntry"] !== undefined) { + contents.Successful = de_ChangeMessageVisibilityBatchResultEntryList( + __getArrayIfSingleItem(output["ChangeMessageVisibilityBatchResultEntry"]), + context + ); + } + if (output.BatchResultErrorEntry === "") { + contents.Failed = []; + } else if (output["BatchResultErrorEntry"] !== undefined) { + contents.Failed = de_BatchResultErrorEntryList(__getArrayIfSingleItem(output["BatchResultErrorEntry"]), context); + } + return contents; +}; + +/** + * deserializeAws_queryChangeMessageVisibilityBatchResultEntry + */ +const de_ChangeMessageVisibilityBatchResultEntry = ( + output: any, + context: __SerdeContext +): ChangeMessageVisibilityBatchResultEntry => { + const contents: any = {}; + if (output["Id"] !== undefined) { + contents.Id = __expectString(output["Id"]); + } + return contents; +}; + +/** + * deserializeAws_queryChangeMessageVisibilityBatchResultEntryList + */ +const de_ChangeMessageVisibilityBatchResultEntryList = ( + output: any, + context: __SerdeContext +): ChangeMessageVisibilityBatchResultEntry[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ChangeMessageVisibilityBatchResultEntry(entry, context); + }); +}; + +/** + * deserializeAws_queryCreateQueueResult + */ +const de_CreateQueueResult = (output: any, context: __SerdeContext): CreateQueueResult => { + const contents: any = {}; + if (output["QueueUrl"] !== undefined) { + contents.QueueUrl = __expectString(output["QueueUrl"]); + } + return contents; +}; + +/** + * deserializeAws_queryDeleteMessageBatchResult + */ +const de_DeleteMessageBatchResult = (output: any, context: __SerdeContext): DeleteMessageBatchResult => { + const contents: any = {}; + if (output.DeleteMessageBatchResultEntry === "") { + contents.Successful = []; + } else if (output["DeleteMessageBatchResultEntry"] !== undefined) { + contents.Successful = de_DeleteMessageBatchResultEntryList( + __getArrayIfSingleItem(output["DeleteMessageBatchResultEntry"]), + context + ); + } + if (output.BatchResultErrorEntry === "") { + contents.Failed = []; + } else if (output["BatchResultErrorEntry"] !== undefined) { + contents.Failed = de_BatchResultErrorEntryList(__getArrayIfSingleItem(output["BatchResultErrorEntry"]), context); + } + return contents; +}; + +/** + * deserializeAws_queryDeleteMessageBatchResultEntry + */ +const de_DeleteMessageBatchResultEntry = (output: any, context: __SerdeContext): DeleteMessageBatchResultEntry => { + const contents: any = {}; + if (output["Id"] !== undefined) { + contents.Id = __expectString(output["Id"]); + } + return contents; +}; + +/** + * deserializeAws_queryDeleteMessageBatchResultEntryList + */ +const de_DeleteMessageBatchResultEntryList = ( + output: any, + context: __SerdeContext +): DeleteMessageBatchResultEntry[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_DeleteMessageBatchResultEntry(entry, context); + }); +}; + +/** + * deserializeAws_queryEmptyBatchRequest + */ +const de_EmptyBatchRequest = (output: any, context: __SerdeContext): EmptyBatchRequest => { + const contents: any = {}; + return contents; +}; + +/** + * deserializeAws_queryGetQueueAttributesResult + */ +const de_GetQueueAttributesResult = (output: any, context: __SerdeContext): GetQueueAttributesResult => { + const contents: any = {}; + if (output.Attribute === "") { + contents.Attributes = {}; + } else if (output["Attribute"] !== undefined) { + contents.Attributes = de_QueueAttributeMap(__getArrayIfSingleItem(output["Attribute"]), context); + } + return contents; +}; + +/** + * deserializeAws_queryGetQueueUrlResult + */ +const de_GetQueueUrlResult = (output: any, context: __SerdeContext): GetQueueUrlResult => { + const contents: any = {}; + if (output["QueueUrl"] !== undefined) { + contents.QueueUrl = __expectString(output["QueueUrl"]); + } + return contents; +}; + +/** + * deserializeAws_queryInvalidAttributeName + */ +const de_InvalidAttributeName = (output: any, context: __SerdeContext): InvalidAttributeName => { + const contents: any = {}; + return contents; +}; + +/** + * deserializeAws_queryInvalidBatchEntryId + */ +const de_InvalidBatchEntryId = (output: any, context: __SerdeContext): InvalidBatchEntryId => { + const contents: any = {}; + return contents; +}; + +/** + * deserializeAws_queryInvalidIdFormat + */ +const de_InvalidIdFormat = (output: any, context: __SerdeContext): InvalidIdFormat => { + const contents: any = {}; + return contents; +}; + +/** + * deserializeAws_queryInvalidMessageContents + */ +const de_InvalidMessageContents = (output: any, context: __SerdeContext): InvalidMessageContents => { + const contents: any = {}; + return contents; +}; + +/** + * deserializeAws_queryListDeadLetterSourceQueuesResult + */ +const de_ListDeadLetterSourceQueuesResult = ( + output: any, + context: __SerdeContext +): ListDeadLetterSourceQueuesResult => { + const contents: any = {}; + if (output.QueueUrl === "") { + contents.queueUrls = []; + } else if (output["QueueUrl"] !== undefined) { + contents.queueUrls = de_QueueUrlList(__getArrayIfSingleItem(output["QueueUrl"]), context); + } + if (output["NextToken"] !== undefined) { + contents.NextToken = __expectString(output["NextToken"]); + } + return contents; +}; + +/** + * deserializeAws_queryListMessageMoveTasksResult + */ +const de_ListMessageMoveTasksResult = (output: any, context: __SerdeContext): ListMessageMoveTasksResult => { + const contents: any = {}; + if (output.ListMessageMoveTasksResultEntry === "") { + contents.Results = []; + } else if (output["ListMessageMoveTasksResultEntry"] !== undefined) { + contents.Results = de_ListMessageMoveTasksResultEntryList( + __getArrayIfSingleItem(output["ListMessageMoveTasksResultEntry"]), + context + ); + } + return contents; +}; + +/** + * deserializeAws_queryListMessageMoveTasksResultEntry + */ +const de_ListMessageMoveTasksResultEntry = (output: any, context: __SerdeContext): ListMessageMoveTasksResultEntry => { + const contents: any = {}; + if (output["TaskHandle"] !== undefined) { + contents.TaskHandle = __expectString(output["TaskHandle"]); + } + if (output["Status"] !== undefined) { + contents.Status = __expectString(output["Status"]); + } + if (output["SourceArn"] !== undefined) { + contents.SourceArn = __expectString(output["SourceArn"]); + } + if (output["DestinationArn"] !== undefined) { + contents.DestinationArn = __expectString(output["DestinationArn"]); + } + if (output["MaxNumberOfMessagesPerSecond"] !== undefined) { + contents.MaxNumberOfMessagesPerSecond = __strictParseInt32(output["MaxNumberOfMessagesPerSecond"]) as number; + } + if (output["ApproximateNumberOfMessagesMoved"] !== undefined) { + contents.ApproximateNumberOfMessagesMoved = __strictParseLong(output["ApproximateNumberOfMessagesMoved"]) as number; + } + if (output["ApproximateNumberOfMessagesToMove"] !== undefined) { + contents.ApproximateNumberOfMessagesToMove = __strictParseLong( + output["ApproximateNumberOfMessagesToMove"] + ) as number; + } + if (output["FailureReason"] !== undefined) { + contents.FailureReason = __expectString(output["FailureReason"]); + } + if (output["StartedTimestamp"] !== undefined) { + contents.StartedTimestamp = __strictParseLong(output["StartedTimestamp"]) as number; + } + return contents; +}; + +/** + * deserializeAws_queryListMessageMoveTasksResultEntryList + */ +const de_ListMessageMoveTasksResultEntryList = ( + output: any, + context: __SerdeContext +): ListMessageMoveTasksResultEntry[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_ListMessageMoveTasksResultEntry(entry, context); + }); +}; + +/** + * deserializeAws_queryListQueuesResult + */ +const de_ListQueuesResult = (output: any, context: __SerdeContext): ListQueuesResult => { + const contents: any = {}; + if (output["NextToken"] !== undefined) { + contents.NextToken = __expectString(output["NextToken"]); + } + if (output.QueueUrl === "") { + contents.QueueUrls = []; + } else if (output["QueueUrl"] !== undefined) { + contents.QueueUrls = de_QueueUrlList(__getArrayIfSingleItem(output["QueueUrl"]), context); + } + return contents; +}; + +/** + * deserializeAws_queryListQueueTagsResult + */ +const de_ListQueueTagsResult = (output: any, context: __SerdeContext): ListQueueTagsResult => { + const contents: any = {}; + if (output.Tag === "") { + contents.Tags = {}; + } else if (output["Tag"] !== undefined) { + contents.Tags = de_TagMap(__getArrayIfSingleItem(output["Tag"]), context); + } + return contents; +}; + +/** + * deserializeAws_queryMessage + */ +const de_Message = (output: any, context: __SerdeContext): Message => { + const contents: any = {}; + if (output["MessageId"] !== undefined) { + contents.MessageId = __expectString(output["MessageId"]); + } + if (output["ReceiptHandle"] !== undefined) { + contents.ReceiptHandle = __expectString(output["ReceiptHandle"]); + } + if (output["MD5OfBody"] !== undefined) { + contents.MD5OfBody = __expectString(output["MD5OfBody"]); + } + if (output["Body"] !== undefined) { + contents.Body = __expectString(output["Body"]); + } + if (output.Attribute === "") { + contents.Attributes = {}; + } else if (output["Attribute"] !== undefined) { + contents.Attributes = de_MessageSystemAttributeMap(__getArrayIfSingleItem(output["Attribute"]), context); + } + if (output["MD5OfMessageAttributes"] !== undefined) { + contents.MD5OfMessageAttributes = __expectString(output["MD5OfMessageAttributes"]); + } + if (output.MessageAttribute === "") { + contents.MessageAttributes = {}; + } else if (output["MessageAttribute"] !== undefined) { + contents.MessageAttributes = de_MessageBodyAttributeMap( + __getArrayIfSingleItem(output["MessageAttribute"]), + context + ); + } + return contents; +}; + +/** + * deserializeAws_queryMessageAttributeValue + */ +const de_MessageAttributeValue = (output: any, context: __SerdeContext): MessageAttributeValue => { + const contents: any = {}; + if (output["StringValue"] !== undefined) { + contents.StringValue = __expectString(output["StringValue"]); + } + if (output["BinaryValue"] !== undefined) { + contents.BinaryValue = context.base64Decoder(output["BinaryValue"]); + } + if (output.StringListValue === "") { + contents.StringListValues = []; + } else if (output["StringListValue"] !== undefined) { + contents.StringListValues = de_StringList(__getArrayIfSingleItem(output["StringListValue"]), context); + } + if (output.BinaryListValue === "") { + contents.BinaryListValues = []; + } else if (output["BinaryListValue"] !== undefined) { + contents.BinaryListValues = de_BinaryList(__getArrayIfSingleItem(output["BinaryListValue"]), context); + } + if (output["DataType"] !== undefined) { + contents.DataType = __expectString(output["DataType"]); + } + return contents; +}; + +/** + * deserializeAws_queryMessageBodyAttributeMap + */ +const de_MessageBodyAttributeMap = (output: any, context: __SerdeContext): Record => { + return output.reduce((acc: any, pair: any) => { + if (pair["Value"] === null) { + return acc; + } + acc[pair["Name"]] = de_MessageAttributeValue(pair["Value"], context); + return acc; + }, {}); +}; + +/** + * deserializeAws_queryMessageList + */ +const de_MessageList = (output: any, context: __SerdeContext): Message[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_Message(entry, context); + }); +}; + +/** + * deserializeAws_queryMessageNotInflight + */ +const de_MessageNotInflight = (output: any, context: __SerdeContext): MessageNotInflight => { + const contents: any = {}; + return contents; +}; + +/** + * deserializeAws_queryMessageSystemAttributeMap + */ +const de_MessageSystemAttributeMap = ( + output: any, + context: __SerdeContext +): Partial> => { + return output.reduce((acc: any, pair: any) => { + if (pair["Value"] === null) { + return acc; + } + acc[pair["Name"]] = __expectString(pair["Value"]) as any; + return acc; + }, {}); +}; + +/** + * deserializeAws_queryOverLimit + */ +const de_OverLimit = (output: any, context: __SerdeContext): OverLimit => { + const contents: any = {}; + return contents; +}; + +/** + * deserializeAws_queryPurgeQueueInProgress + */ +const de_PurgeQueueInProgress = (output: any, context: __SerdeContext): PurgeQueueInProgress => { + const contents: any = {}; + return contents; +}; + +/** + * deserializeAws_queryQueueAttributeMap + */ +const de_QueueAttributeMap = (output: any, context: __SerdeContext): Partial> => { + return output.reduce((acc: any, pair: any) => { + if (pair["Value"] === null) { + return acc; + } + acc[pair["Name"]] = __expectString(pair["Value"]) as any; + return acc; + }, {}); +}; + +/** + * deserializeAws_queryQueueDeletedRecently + */ +const de_QueueDeletedRecently = (output: any, context: __SerdeContext): QueueDeletedRecently => { + const contents: any = {}; + return contents; +}; + +/** + * deserializeAws_queryQueueDoesNotExist + */ +const de_QueueDoesNotExist = (output: any, context: __SerdeContext): QueueDoesNotExist => { + const contents: any = {}; + return contents; +}; + +/** + * deserializeAws_queryQueueNameExists + */ +const de_QueueNameExists = (output: any, context: __SerdeContext): QueueNameExists => { + const contents: any = {}; + return contents; +}; + +/** + * deserializeAws_queryQueueUrlList + */ +const de_QueueUrlList = (output: any, context: __SerdeContext): string[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return __expectString(entry) as any; + }); +}; + +/** + * deserializeAws_queryReceiptHandleIsInvalid + */ +const de_ReceiptHandleIsInvalid = (output: any, context: __SerdeContext): ReceiptHandleIsInvalid => { + const contents: any = {}; + return contents; +}; + +/** + * deserializeAws_queryReceiveMessageResult + */ +const de_ReceiveMessageResult = (output: any, context: __SerdeContext): ReceiveMessageResult => { + const contents: any = {}; + if (output.Message === "") { + contents.Messages = []; + } else if (output["Message"] !== undefined) { + contents.Messages = de_MessageList(__getArrayIfSingleItem(output["Message"]), context); + } + return contents; +}; + +/** + * deserializeAws_queryResourceNotFoundException + */ +const de_ResourceNotFoundException = (output: any, context: __SerdeContext): ResourceNotFoundException => { + const contents: any = {}; + return contents; +}; + +/** + * deserializeAws_querySendMessageBatchResult + */ +const de_SendMessageBatchResult = (output: any, context: __SerdeContext): SendMessageBatchResult => { + const contents: any = {}; + if (output.SendMessageBatchResultEntry === "") { + contents.Successful = []; + } else if (output["SendMessageBatchResultEntry"] !== undefined) { + contents.Successful = de_SendMessageBatchResultEntryList( + __getArrayIfSingleItem(output["SendMessageBatchResultEntry"]), + context + ); + } + if (output.BatchResultErrorEntry === "") { + contents.Failed = []; + } else if (output["BatchResultErrorEntry"] !== undefined) { + contents.Failed = de_BatchResultErrorEntryList(__getArrayIfSingleItem(output["BatchResultErrorEntry"]), context); + } + return contents; +}; + +/** + * deserializeAws_querySendMessageBatchResultEntry + */ +const de_SendMessageBatchResultEntry = (output: any, context: __SerdeContext): SendMessageBatchResultEntry => { + const contents: any = {}; + if (output["Id"] !== undefined) { + contents.Id = __expectString(output["Id"]); + } + if (output["MessageId"] !== undefined) { + contents.MessageId = __expectString(output["MessageId"]); + } + if (output["MD5OfMessageBody"] !== undefined) { + contents.MD5OfMessageBody = __expectString(output["MD5OfMessageBody"]); + } + if (output["MD5OfMessageAttributes"] !== undefined) { + contents.MD5OfMessageAttributes = __expectString(output["MD5OfMessageAttributes"]); + } + if (output["MD5OfMessageSystemAttributes"] !== undefined) { + contents.MD5OfMessageSystemAttributes = __expectString(output["MD5OfMessageSystemAttributes"]); + } + if (output["SequenceNumber"] !== undefined) { + contents.SequenceNumber = __expectString(output["SequenceNumber"]); + } + return contents; +}; + +/** + * deserializeAws_querySendMessageBatchResultEntryList + */ +const de_SendMessageBatchResultEntryList = (output: any, context: __SerdeContext): SendMessageBatchResultEntry[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_SendMessageBatchResultEntry(entry, context); + }); +}; + +/** + * deserializeAws_querySendMessageResult + */ +const de_SendMessageResult = (output: any, context: __SerdeContext): SendMessageResult => { + const contents: any = {}; + if (output["MD5OfMessageBody"] !== undefined) { + contents.MD5OfMessageBody = __expectString(output["MD5OfMessageBody"]); + } + if (output["MD5OfMessageAttributes"] !== undefined) { + contents.MD5OfMessageAttributes = __expectString(output["MD5OfMessageAttributes"]); + } + if (output["MD5OfMessageSystemAttributes"] !== undefined) { + contents.MD5OfMessageSystemAttributes = __expectString(output["MD5OfMessageSystemAttributes"]); + } + if (output["MessageId"] !== undefined) { + contents.MessageId = __expectString(output["MessageId"]); + } + if (output["SequenceNumber"] !== undefined) { + contents.SequenceNumber = __expectString(output["SequenceNumber"]); + } + return contents; +}; + +/** + * deserializeAws_queryStartMessageMoveTaskResult + */ +const de_StartMessageMoveTaskResult = (output: any, context: __SerdeContext): StartMessageMoveTaskResult => { + const contents: any = {}; + if (output["TaskHandle"] !== undefined) { + contents.TaskHandle = __expectString(output["TaskHandle"]); + } + return contents; +}; + +/** + * deserializeAws_queryStringList + */ +const de_StringList = (output: any, context: __SerdeContext): string[] => { + return (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return __expectString(entry) as any; + }); +}; + +/** + * deserializeAws_queryTagMap + */ +const de_TagMap = (output: any, context: __SerdeContext): Record => { + return output.reduce((acc: any, pair: any) => { + if (pair["Value"] === null) { + return acc; + } + acc[pair["Key"]] = __expectString(pair["Value"]) as any; + return acc; + }, {}); +}; + +/** + * deserializeAws_queryTooManyEntriesInBatchRequest + */ +const de_TooManyEntriesInBatchRequest = (output: any, context: __SerdeContext): TooManyEntriesInBatchRequest => { + const contents: any = {}; + return contents; +}; + +/** + * deserializeAws_queryUnsupportedOperation + */ +const de_UnsupportedOperation = (output: any, context: __SerdeContext): UnsupportedOperation => { + const contents: any = {}; + return contents; +}; + +const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ + httpStatusCode: output.statusCode, + requestId: + output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], +}); + +// Encode Uint8Array data into string with utf-8. +const collectBodyString = (streamBody: any, context: __SerdeContext): Promise => + collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); + +const throwDefaultError = withBaseException(__BaseException); +const buildHttpRpcRequest = async ( + context: __SerdeContext, + headers: __HeaderBag, + path: string, + resolvedHostname: string | undefined, + body: any +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const contents: any = { + protocol, + hostname, + port, + method: "POST", + path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, + headers, + }; + if (resolvedHostname !== undefined) { + contents.hostname = resolvedHostname; + } + if (body !== undefined) { + contents.body = body; + } + return new __HttpRequest(contents); +}; +const SHARED_HEADERS: __HeaderBag = { + "content-type": "application/x-www-form-urlencoded", +}; + +const parseBody = (streamBody: any, context: __SerdeContext): any => + collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + const parser = new XMLParser({ + attributeNamePrefix: "", + htmlEntities: true, + ignoreAttributes: false, + ignoreDeclaration: true, + parseTagValue: false, + trimValues: false, + tagValueProcessor: (_: any, val: any) => (val.trim() === "" && val.includes("\n") ? "" : undefined), + }); + parser.addEntity("#xD", "\r"); + parser.addEntity("#10", "\n"); + const parsedObj = parser.parse(encoded); + const textNodeName = "#text"; + const key = Object.keys(parsedObj)[0]; + const parsedObjToReturn = parsedObj[key]; + if (parsedObjToReturn[textNodeName]) { + parsedObjToReturn[key] = parsedObjToReturn[textNodeName]; + delete parsedObjToReturn[textNodeName]; + } + return __getValueFromTextNode(parsedObjToReturn); + } + return {}; + }); + +const parseErrorBody = async (errorBody: any, context: __SerdeContext) => { + const value = await parseBody(errorBody, context); + if (value.Error) { + value.Error.message = value.Error.message ?? value.Error.Message; + } + return value; +}; + +const buildFormUrlencodedString = (formEntries: Record): string => + Object.entries(formEntries) + .map(([key, value]) => __extendedEncodeURIComponent(key) + "=" + __extendedEncodeURIComponent(value)) + .join("&"); + +const loadQueryErrorCode = (output: __HttpResponse, data: any): string | undefined => { + if (data.Error?.Code !== undefined) { + return data.Error.Code; + } + if (output.statusCode == 404) { + return "NotFound"; + } +}; diff --git a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonShapeSerVisitor.java b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonShapeSerVisitor.java index 949f87d5e1078..06d17bc7ce22f 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonShapeSerVisitor.java +++ b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/JsonShapeSerVisitor.java @@ -15,12 +15,9 @@ package software.amazon.smithy.aws.typescript.codegen; -import java.lang.reflect.Member; import java.util.Map; import java.util.TreeMap; import java.util.function.BiFunction; - -import software.amazon.smithy.aws.traits.protocols.AwsQueryCompatibleTrait; import software.amazon.smithy.aws.typescript.codegen.validation.UnaryFunctionCall; import software.amazon.smithy.codegen.core.Symbol; import software.amazon.smithy.codegen.core.SymbolProvider; @@ -169,11 +166,6 @@ public void serializeStructure(GenerationContext context, StructureShape shape) TIMESTAMP_FORMAT, "_") : target.accept(getMemberVisitor("_"))); String valueProvider = "_ => " + valueExpression; - - if (context.getService().hasTrait(AwsQueryCompatibleTrait.class)) { - - } - boolean isUnaryCall = UnaryFunctionCall.check(valueExpression); if (hasJsonName) { @@ -227,23 +219,4 @@ public void serializeUnion(GenerationContext context, UnionShape shape) { writer.write("_: (name, value) => ({ name: value } as any)"); }); } - - private boolean isNumeric(Shape target) { - return target.isIntegerShape() || - target.isFloatShape() || - target.isBigIntegerShape() || - target.isBigDecimalShape() || - target.isIntEnumShape() || - target.isDoubleShape() || - target.isShortShape() || - target.isLongShape(); - } - - private boolean isString(Shape target) { - return target.isStringShape(); - } - - private boolean isBoolean(Shape target) { - return target.isBooleanShape(); - } } diff --git a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/RestJsonProtocolGenerator.java b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/RestJsonProtocolGenerator.java index 59d3b094fd063..f6e4b72aa653f 100644 --- a/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/RestJsonProtocolGenerator.java +++ b/codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/RestJsonProtocolGenerator.java @@ -17,7 +17,6 @@ import java.util.List; import java.util.Set; - import software.amazon.smithy.aws.traits.protocols.AwsQueryCompatibleTrait; import software.amazon.smithy.aws.typescript.codegen.validation.UnaryFunctionCall; import software.amazon.smithy.codegen.core.SymbolProvider; diff --git a/packages/core/src/protocols/coercing-serializers.ts b/packages/core/src/protocols/coercing-serializers.ts index bab6f24267854..afed47299bfcd 100644 --- a/packages/core/src/protocols/coercing-serializers.ts +++ b/packages/core/src/protocols/coercing-serializers.ts @@ -8,6 +8,9 @@ export const _toStr = (val: unknown): string | undefined => { return val as undefined; } if (typeof val === "number" || typeof val === "bigint") { + const warning = new Error(`Received number ${val} where a string was expected.`); + warning.name = "Warning"; + console.warn(warning); return String(val); } if (typeof val === "boolean") {