From 60cb4bb7461824a2cec5169a49278def2cf8bf0d Mon Sep 17 00:00:00 2001 From: David Yaffe Date: Tue, 21 Nov 2023 19:39:33 -0600 Subject: [PATCH] update SQS to latest model that uses aws json protocol + add integration test --- .../AWSSQSIntegrationTests/SQSTests.swift | 42 + Sources/Services/AWSSQS/SQSClient.swift | 378 +- .../Services/AWSSQS/SQSClientProtocol.swift | 301 ++ Sources/Services/AWSSQS/models/Models.swift | 3431 +++++++++++------ .../aws-models/sqs.2012-11-05.json | 986 ++++- 5 files changed, 3684 insertions(+), 1454 deletions(-) create mode 100644 IntegrationTests/Services/AWSSQSIntegrationTests/SQSTests.swift diff --git a/IntegrationTests/Services/AWSSQSIntegrationTests/SQSTests.swift b/IntegrationTests/Services/AWSSQSIntegrationTests/SQSTests.swift new file mode 100644 index 00000000000..541cb76bac9 --- /dev/null +++ b/IntegrationTests/Services/AWSSQSIntegrationTests/SQSTests.swift @@ -0,0 +1,42 @@ +// +// Copyright Amazon.com Inc. or its affiliates. +// All Rights Reserved. +// +// SPDX-License-Identifier: Apache-2.0 +// + +import XCTest +import AWSSQS +import ClientRuntime + +/// Tests AWS SQS queue creation and deletion. +class SQSTests: XCTestCase { + + private var client: SQSClient! + private var queueName: String! + private var queueUrl: String? + + override func setUp() async throws { + client = try await SQSClient() + queueName = "integration-test-queue-\(UUID().uuidString)" + } + + override func tearDown() async throws { + if let queueUrl = queueUrl { + do { + _ = try await client.deleteQueue(input: .init(queueUrl: queueUrl)) + } catch { + XCTFail("Error in tearDown: \(error)") + } + } + // Else, nothing to clean up as the queue was not created. + } + + func test_QueueCreation() async throws { + let response = try await client.createQueue(input: .init(queueName: queueName)) + queueUrl = response.queueUrl + + XCTAssertNotNil(response.queueUrl, "Queue URL should not be nil") + XCTAssertTrue(response.queueUrl?.contains(queueName) ?? false, "Queue URL should contain the queue name.") + } +} diff --git a/Sources/Services/AWSSQS/SQSClient.swift b/Sources/Services/AWSSQS/SQSClient.swift index 497ace61df2..d7def8d88d7 100644 --- a/Sources/Services/AWSSQS/SQSClient.swift +++ b/Sources/Services/AWSSQS/SQSClient.swift @@ -15,9 +15,13 @@ public class SQSClient { public init(config: SQSClient.SQSClientConfiguration) { client = ClientRuntime.SdkHttpClient(engine: config.httpClientEngine, config: config.httpClientConfiguration) - let encoder = ClientRuntime.FormURLEncoder() + let encoder = ClientRuntime.JSONEncoder() + encoder.dateEncodingStrategy = .secondsSince1970 + encoder.nonConformingFloatEncodingStrategy = .convertToString(positiveInfinity: "Infinity", negativeInfinity: "-Infinity", nan: "NaN") self.encoder = config.encoder ?? encoder - let decoder = ClientRuntime.XMLDecoder() + let decoder = ClientRuntime.JSONDecoder() + decoder.dateDecodingStrategy = .secondsSince1970 + decoder.nonConformingFloatDecodingStrategy = .convertFromString(positiveInfinity: "Infinity", negativeInfinity: "-Infinity", nan: "NaN") self.decoder = config.decoder ?? decoder self.config = config } @@ -83,7 +87,18 @@ extension SQSClient: SQSClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. /// - `OverLimit` : 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. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. public func addPermission(input: AddPermissionInput) async throws -> AddPermissionOutput { let context = ClientRuntime.HttpContextBuilder() @@ -106,8 +121,9 @@ extension SQSClient: SQSClientProtocol { let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .before, middleware: AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "AmazonSQS.AddPermission")) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.SerializableBodyMiddleware(xmlName: "AddPermissionRequest")) - operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-amz-json-1.0")) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) @@ -133,6 +149,15 @@ extension SQSClient: SQSClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `RequestThrottled` : 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. /// - `ResourceNotFoundException` : One or more specified resources don't exist. /// - `UnsupportedOperation` : Error code 400. Unsupported operation. public func cancelMessageMoveTask(input: CancelMessageMoveTaskInput) async throws -> CancelMessageMoveTaskOutput @@ -157,8 +182,9 @@ extension SQSClient: SQSClientProtocol { let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .before, middleware: AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "AmazonSQS.CancelMessageMoveTask")) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.SerializableBodyMiddleware(xmlName: "CancelMessageMoveTaskRequest")) - operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-amz-json-1.0")) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) @@ -187,8 +213,19 @@ extension SQSClient: SQSClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. /// - `MessageNotInflight` : The specified message isn't in flight. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. /// - `ReceiptHandleIsInvalid` : The specified receipt handle isn't valid. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. public func changeMessageVisibility(input: ChangeMessageVisibilityInput) async throws -> ChangeMessageVisibilityOutput { let context = ClientRuntime.HttpContextBuilder() @@ -211,8 +248,9 @@ extension SQSClient: SQSClientProtocol { let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .before, middleware: AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "AmazonSQS.ChangeMessageVisibility")) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.SerializableBodyMiddleware(xmlName: "ChangeMessageVisibilityRequest")) - operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-amz-json-1.0")) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) @@ -234,8 +272,19 @@ extension SQSClient: SQSClientProtocol { /// __Possible Exceptions:__ /// - `BatchEntryIdsNotDistinct` : Two or more batch entries in the request have the same Id. /// - `EmptyBatchRequest` : The batch request doesn't contain any entries. + /// - `InvalidAddress` : The accountId is invalid. /// - `InvalidBatchEntryId` : The Id of a batch entry in a batch request doesn't abide by the specification. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. /// - `TooManyEntriesInBatchRequest` : The batch request contains more entries than permissible. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. public func changeMessageVisibilityBatch(input: ChangeMessageVisibilityBatchInput) async throws -> ChangeMessageVisibilityBatchOutput { let context = ClientRuntime.HttpContextBuilder() @@ -258,8 +307,9 @@ extension SQSClient: SQSClientProtocol { let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .before, middleware: AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "AmazonSQS.ChangeMessageVisibilityBatch")) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.SerializableBodyMiddleware(xmlName: "ChangeMessageVisibilityBatchRequest")) - operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-amz-json-1.0")) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) @@ -295,8 +345,20 @@ extension SQSClient: SQSClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidAttributeName` : The specified attribute doesn't exist. + /// - `InvalidAttributeValue` : A queue attribute value is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. /// - `QueueDeletedRecently` : You must wait 60 seconds after deleting a queue before you can create another queue with the same name. /// - `QueueNameExists` : 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. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. public func createQueue(input: CreateQueueInput) async throws -> CreateQueueOutput { let context = ClientRuntime.HttpContextBuilder() @@ -319,8 +381,9 @@ extension SQSClient: SQSClientProtocol { let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .before, middleware: AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "AmazonSQS.CreateQueue")) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.SerializableBodyMiddleware(xmlName: "CreateQueueRequest")) - operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-amz-json-1.0")) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) @@ -340,8 +403,19 @@ extension SQSClient: SQSClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. /// - `InvalidIdFormat` : The specified receipt handle isn't valid for the current version. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. /// - `ReceiptHandleIsInvalid` : The specified receipt handle isn't valid. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. public func deleteMessage(input: DeleteMessageInput) async throws -> DeleteMessageOutput { let context = ClientRuntime.HttpContextBuilder() @@ -364,8 +438,9 @@ extension SQSClient: SQSClientProtocol { let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .before, middleware: AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "AmazonSQS.DeleteMessage")) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.SerializableBodyMiddleware(xmlName: "DeleteMessageRequest")) - operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-amz-json-1.0")) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) @@ -387,8 +462,19 @@ extension SQSClient: SQSClientProtocol { /// __Possible Exceptions:__ /// - `BatchEntryIdsNotDistinct` : Two or more batch entries in the request have the same Id. /// - `EmptyBatchRequest` : The batch request doesn't contain any entries. + /// - `InvalidAddress` : The accountId is invalid. /// - `InvalidBatchEntryId` : The Id of a batch entry in a batch request doesn't abide by the specification. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. /// - `TooManyEntriesInBatchRequest` : The batch request contains more entries than permissible. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. public func deleteMessageBatch(input: DeleteMessageBatchInput) async throws -> DeleteMessageBatchOutput { let context = ClientRuntime.HttpContextBuilder() @@ -411,8 +497,9 @@ extension SQSClient: SQSClientProtocol { let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .before, middleware: AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "AmazonSQS.DeleteMessageBatch")) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.SerializableBodyMiddleware(xmlName: "DeleteMessageBatchRequest")) - operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-amz-json-1.0")) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) @@ -428,6 +515,21 @@ extension SQSClient: SQSClientProtocol { /// - Parameter DeleteQueueInput : /// /// - Returns: `DeleteQueueOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. public func deleteQueue(input: DeleteQueueInput) async throws -> DeleteQueueOutput { let context = ClientRuntime.HttpContextBuilder() @@ -450,8 +552,9 @@ extension SQSClient: SQSClientProtocol { let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .before, middleware: AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "AmazonSQS.DeleteQueue")) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.SerializableBodyMiddleware(xmlName: "DeleteQueueRequest")) - operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-amz-json-1.0")) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) @@ -471,7 +574,18 @@ extension SQSClient: SQSClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. /// - `InvalidAttributeName` : The specified attribute doesn't exist. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. public func getQueueAttributes(input: GetQueueAttributesInput) async throws -> GetQueueAttributesOutput { let context = ClientRuntime.HttpContextBuilder() @@ -494,8 +608,9 @@ extension SQSClient: SQSClientProtocol { let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .before, middleware: AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "AmazonSQS.GetQueueAttributes")) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.SerializableBodyMiddleware(xmlName: "GetQueueAttributesRequest")) - operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-amz-json-1.0")) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) @@ -515,7 +630,17 @@ extension SQSClient: SQSClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. public func getQueueUrl(input: GetQueueUrlInput) async throws -> GetQueueUrlOutput { let context = ClientRuntime.HttpContextBuilder() @@ -538,8 +663,9 @@ extension SQSClient: SQSClientProtocol { let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .before, middleware: AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "AmazonSQS.GetQueueUrl")) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.SerializableBodyMiddleware(xmlName: "GetQueueUrlRequest")) - operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-amz-json-1.0")) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) @@ -559,7 +685,17 @@ extension SQSClient: SQSClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. public func listDeadLetterSourceQueues(input: ListDeadLetterSourceQueuesInput) async throws -> ListDeadLetterSourceQueuesOutput { let context = ClientRuntime.HttpContextBuilder() @@ -582,8 +718,9 @@ extension SQSClient: SQSClientProtocol { let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .before, middleware: AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "AmazonSQS.ListDeadLetterSourceQueues")) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.SerializableBodyMiddleware(xmlName: "ListDeadLetterSourceQueuesRequest")) - operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-amz-json-1.0")) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) @@ -609,6 +746,15 @@ extension SQSClient: SQSClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `RequestThrottled` : 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. /// - `ResourceNotFoundException` : One or more specified resources don't exist. /// - `UnsupportedOperation` : Error code 400. Unsupported operation. public func listMessageMoveTasks(input: ListMessageMoveTasksInput) async throws -> ListMessageMoveTasksOutput @@ -633,8 +779,9 @@ extension SQSClient: SQSClientProtocol { let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .before, middleware: AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "AmazonSQS.ListMessageMoveTasks")) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.SerializableBodyMiddleware(xmlName: "ListMessageMoveTasksRequest")) - operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-amz-json-1.0")) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) @@ -650,6 +797,21 @@ extension SQSClient: SQSClientProtocol { /// - Parameter ListQueueTagsInput : [no documentation found] /// /// - Returns: `ListQueueTagsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. public func listQueueTags(input: ListQueueTagsInput) async throws -> ListQueueTagsOutput { let context = ClientRuntime.HttpContextBuilder() @@ -672,8 +834,9 @@ extension SQSClient: SQSClientProtocol { let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .before, middleware: AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "AmazonSQS.ListQueueTags")) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.SerializableBodyMiddleware(xmlName: "ListQueueTagsRequest")) - operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-amz-json-1.0")) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) @@ -689,6 +852,20 @@ extension SQSClient: SQSClientProtocol { /// - Parameter ListQueuesInput : /// /// - Returns: `ListQueuesOutput` : A list of your queues. + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. public func listQueues(input: ListQueuesInput) async throws -> ListQueuesOutput { let context = ClientRuntime.HttpContextBuilder() @@ -711,8 +888,9 @@ extension SQSClient: SQSClientProtocol { let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .before, middleware: AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "AmazonSQS.ListQueues")) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.SerializableBodyMiddleware(xmlName: "ListQueuesRequest")) - operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-amz-json-1.0")) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) @@ -732,8 +910,18 @@ extension SQSClient: SQSClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. /// - `PurgeQueueInProgress` : 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 queue). /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. public func purgeQueue(input: PurgeQueueInput) async throws -> PurgeQueueOutput { let context = ClientRuntime.HttpContextBuilder() @@ -756,8 +944,9 @@ extension SQSClient: SQSClientProtocol { let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .before, middleware: AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "AmazonSQS.PurgeQueue")) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.SerializableBodyMiddleware(xmlName: "PurgeQueueRequest")) - operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-amz-json-1.0")) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) @@ -792,7 +981,29 @@ extension SQSClient: SQSClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `KmsAccessDenied` : The caller doesn't have the required KMS access. + /// - `KmsDisabled` : The request was denied due to request throttling. + /// - `KmsInvalidKeyUsage` : 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). + /// - `KmsInvalidState` : The request was rejected because the state of the specified resource is not valid for this request. + /// - `KmsNotFound` : The request was rejected because the specified entity or resource could not be found. + /// - `KmsOptInRequired` : The request was rejected because the specified key policy isn't syntactically or semantically correct. + /// - `KmsThrottled` : Amazon Web Services KMS throttles requests for the following conditions. /// - `OverLimit` : 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. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. public func receiveMessage(input: ReceiveMessageInput) async throws -> ReceiveMessageOutput { let context = ClientRuntime.HttpContextBuilder() @@ -815,8 +1026,9 @@ extension SQSClient: SQSClientProtocol { let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .before, middleware: AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "AmazonSQS.ReceiveMessage")) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.SerializableBodyMiddleware(xmlName: "ReceiveMessageRequest")) - operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-amz-json-1.0")) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) @@ -838,6 +1050,21 @@ extension SQSClient: SQSClientProtocol { /// - Parameter RemovePermissionInput : /// /// - Returns: `RemovePermissionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. public func removePermission(input: RemovePermissionInput) async throws -> RemovePermissionOutput { let context = ClientRuntime.HttpContextBuilder() @@ -860,8 +1087,9 @@ extension SQSClient: SQSClientProtocol { let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .before, middleware: AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "AmazonSQS.RemovePermission")) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.SerializableBodyMiddleware(xmlName: "RemovePermissionRequest")) - operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-amz-json-1.0")) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) @@ -881,7 +1109,28 @@ extension SQSClient: SQSClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. /// - `InvalidMessageContents` : The message contains characters outside the allowed set. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `KmsAccessDenied` : The caller doesn't have the required KMS access. + /// - `KmsDisabled` : The request was denied due to request throttling. + /// - `KmsInvalidKeyUsage` : 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). + /// - `KmsInvalidState` : The request was rejected because the state of the specified resource is not valid for this request. + /// - `KmsNotFound` : The request was rejected because the specified entity or resource could not be found. + /// - `KmsOptInRequired` : The request was rejected because the specified key policy isn't syntactically or semantically correct. + /// - `KmsThrottled` : Amazon Web Services KMS throttles requests for the following conditions. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. /// - `UnsupportedOperation` : Error code 400. Unsupported operation. public func sendMessage(input: SendMessageInput) async throws -> SendMessageOutput { @@ -905,8 +1154,9 @@ extension SQSClient: SQSClientProtocol { let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .before, middleware: AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "AmazonSQS.SendMessage")) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.SerializableBodyMiddleware(xmlName: "SendMessageRequest")) - operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-amz-json-1.0")) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) @@ -929,7 +1179,28 @@ extension SQSClient: SQSClientProtocol { /// - `BatchEntryIdsNotDistinct` : Two or more batch entries in the request have the same Id. /// - `BatchRequestTooLong` : The length of all the messages put together is more than the limit. /// - `EmptyBatchRequest` : The batch request doesn't contain any entries. + /// - `InvalidAddress` : The accountId is invalid. /// - `InvalidBatchEntryId` : The Id of a batch entry in a batch request doesn't abide by the specification. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `KmsAccessDenied` : The caller doesn't have the required KMS access. + /// - `KmsDisabled` : The request was denied due to request throttling. + /// - `KmsInvalidKeyUsage` : 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). + /// - `KmsInvalidState` : The request was rejected because the state of the specified resource is not valid for this request. + /// - `KmsNotFound` : The request was rejected because the specified entity or resource could not be found. + /// - `KmsOptInRequired` : The request was rejected because the specified key policy isn't syntactically or semantically correct. + /// - `KmsThrottled` : Amazon Web Services KMS throttles requests for the following conditions. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. /// - `TooManyEntriesInBatchRequest` : The batch request contains more entries than permissible. /// - `UnsupportedOperation` : Error code 400. Unsupported operation. public func sendMessageBatch(input: SendMessageBatchInput) async throws -> SendMessageBatchOutput @@ -954,8 +1225,9 @@ extension SQSClient: SQSClientProtocol { let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .before, middleware: AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "AmazonSQS.SendMessageBatch")) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.SerializableBodyMiddleware(xmlName: "SendMessageBatchRequest")) - operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-amz-json-1.0")) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) @@ -981,7 +1253,20 @@ extension SQSClient: SQSClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. /// - `InvalidAttributeName` : The specified attribute doesn't exist. + /// - `InvalidAttributeValue` : A queue attribute value is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `OverLimit` : 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. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. public func setQueueAttributes(input: SetQueueAttributesInput) async throws -> SetQueueAttributesOutput { let context = ClientRuntime.HttpContextBuilder() @@ -1004,8 +1289,9 @@ extension SQSClient: SQSClientProtocol { let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .before, middleware: AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "AmazonSQS.SetQueueAttributes")) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.SerializableBodyMiddleware(xmlName: "SetQueueAttributesRequest")) - operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-amz-json-1.0")) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) @@ -1033,6 +1319,15 @@ extension SQSClient: SQSClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `RequestThrottled` : 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. /// - `ResourceNotFoundException` : One or more specified resources don't exist. /// - `UnsupportedOperation` : Error code 400. Unsupported operation. public func startMessageMoveTask(input: StartMessageMoveTaskInput) async throws -> StartMessageMoveTaskOutput @@ -1057,8 +1352,9 @@ extension SQSClient: SQSClientProtocol { let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .before, middleware: AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "AmazonSQS.StartMessageMoveTask")) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.SerializableBodyMiddleware(xmlName: "StartMessageMoveTaskRequest")) - operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-amz-json-1.0")) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) @@ -1085,6 +1381,21 @@ extension SQSClient: SQSClientProtocol { /// - Parameter TagQueueInput : [no documentation found] /// /// - Returns: `TagQueueOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. public func tagQueue(input: TagQueueInput) async throws -> TagQueueOutput { let context = ClientRuntime.HttpContextBuilder() @@ -1107,8 +1418,9 @@ extension SQSClient: SQSClientProtocol { let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .before, middleware: AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "AmazonSQS.TagQueue")) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.SerializableBodyMiddleware(xmlName: "TagQueueRequest")) - operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-amz-json-1.0")) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) @@ -1124,6 +1436,21 @@ extension SQSClient: SQSClientProtocol { /// - Parameter UntagQueueInput : [no documentation found] /// /// - Returns: `UntagQueueOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. public func untagQueue(input: UntagQueueInput) async throws -> UntagQueueOutput { let context = ClientRuntime.HttpContextBuilder() @@ -1146,8 +1473,9 @@ extension SQSClient: SQSClientProtocol { let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) operation.buildStep.intercept(position: .before, middleware: EndpointResolverMiddleware(endpointResolver: config.serviceSpecific.endpointResolver, endpointParams: endpointParams)) operation.buildStep.intercept(position: .before, middleware: AWSClientRuntime.UserAgentMiddleware(metadata: AWSClientRuntime.AWSUserAgentMetadata.fromConfig(serviceID: serviceName, version: "1.0", config: config))) + operation.serializeStep.intercept(position: .before, middleware: AWSClientRuntime.XAmzTargetMiddleware(xAmzTarget: "AmazonSQS.UntagQueue")) operation.serializeStep.intercept(position: .after, middleware: ClientRuntime.SerializableBodyMiddleware(xmlName: "UntagQueueRequest")) - operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-www-form-urlencoded")) + operation.serializeStep.intercept(position: .after, middleware: ContentTypeMiddleware(contentType: "application/x-amz-json-1.0")) operation.finalizeStep.intercept(position: .before, middleware: ClientRuntime.ContentLengthMiddleware()) operation.finalizeStep.intercept(position: .after, middleware: ClientRuntime.RetryMiddleware(options: config.retryStrategyOptions)) let sigv4Config = AWSClientRuntime.SigV4Config(unsignedBody: false, signingAlgorithm: .sigv4) diff --git a/Sources/Services/AWSSQS/SQSClientProtocol.swift b/Sources/Services/AWSSQS/SQSClientProtocol.swift index 37bb87c69e1..c83dc2ea56b 100644 --- a/Sources/Services/AWSSQS/SQSClientProtocol.swift +++ b/Sources/Services/AWSSQS/SQSClientProtocol.swift @@ -52,7 +52,18 @@ public protocol SQSClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. /// - `OverLimit` : 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. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. func addPermission(input: AddPermissionInput) async throws -> AddPermissionOutput /// Cancels a specified message movement task. A message movement can only be cancelled when the current status is RUNNING. Cancelling a message movement task does not revert the messages that have already been moved. It can only stop the messages that have not been moved yet. /// @@ -69,6 +80,15 @@ public protocol SQSClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `RequestThrottled` : 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. /// - `ResourceNotFoundException` : One or more specified resources don't exist. /// - `UnsupportedOperation` : Error code 400. Unsupported operation. func cancelMessageMoveTask(input: CancelMessageMoveTaskInput) async throws -> CancelMessageMoveTaskOutput @@ -90,8 +110,19 @@ public protocol SQSClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. /// - `MessageNotInflight` : The specified message isn't in flight. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. /// - `ReceiptHandleIsInvalid` : The specified receipt handle isn't valid. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. func changeMessageVisibility(input: ChangeMessageVisibilityInput) async throws -> ChangeMessageVisibilityOutput /// Changes the visibility timeout of multiple messages. This is a batch version of [ChangeMessageVisibility]. The result of the action on each message is reported individually in the response. You can send up to 10 [ChangeMessageVisibility] 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. /// @@ -104,8 +135,19 @@ public protocol SQSClientProtocol { /// __Possible Exceptions:__ /// - `BatchEntryIdsNotDistinct` : Two or more batch entries in the request have the same Id. /// - `EmptyBatchRequest` : The batch request doesn't contain any entries. + /// - `InvalidAddress` : The accountId is invalid. /// - `InvalidBatchEntryId` : The Id of a batch entry in a batch request doesn't abide by the specification. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. /// - `TooManyEntriesInBatchRequest` : The batch request contains more entries than permissible. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. func changeMessageVisibilityBatch(input: ChangeMessageVisibilityBatchInput) async throws -> ChangeMessageVisibilityBatchOutput /// Creates a new standard or FIFO queue. You can pass one or more attributes in the request. Keep the following in mind: /// @@ -132,8 +174,20 @@ public protocol SQSClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidAttributeName` : The specified attribute doesn't exist. + /// - `InvalidAttributeValue` : A queue attribute value is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. /// - `QueueDeletedRecently` : You must wait 60 seconds after deleting a queue before you can create another queue with the same name. /// - `QueueNameExists` : 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. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. func createQueue(input: CreateQueueInput) async throws -> CreateQueueOutput /// Deletes the specified message from the specified queue. To select the message to delete, use the ReceiptHandle of the message (not the MessageId which you receive when you send the message). Amazon SQS can delete a message from a queue even if a visibility timeout setting causes the message to be locked by another consumer. Amazon SQS automatically deletes messages left in a queue longer than the retention period configured for the queue. The ReceiptHandle is associated with a specific instance of receiving a message. If you receive a message more than once, the ReceiptHandle is different each time you receive a message. 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. /// @@ -144,8 +198,19 @@ public protocol SQSClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. /// - `InvalidIdFormat` : The specified receipt handle isn't valid for the current version. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. /// - `ReceiptHandleIsInvalid` : The specified receipt handle isn't valid. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. func deleteMessage(input: DeleteMessageInput) async throws -> DeleteMessageOutput /// Deletes up to ten messages from the specified queue. This is a batch version of [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. /// @@ -158,14 +223,40 @@ public protocol SQSClientProtocol { /// __Possible Exceptions:__ /// - `BatchEntryIdsNotDistinct` : Two or more batch entries in the request have the same Id. /// - `EmptyBatchRequest` : The batch request doesn't contain any entries. + /// - `InvalidAddress` : The accountId is invalid. /// - `InvalidBatchEntryId` : The Id of a batch entry in a batch request doesn't abide by the specification. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. /// - `TooManyEntriesInBatchRequest` : The batch request contains more entries than permissible. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. func deleteMessageBatch(input: DeleteMessageBatchInput) async throws -> DeleteMessageBatchOutput /// Deletes the queue specified by the QueueUrl, regardless of the queue's contents. Be careful with the DeleteQueue action: When you delete a queue, any messages in the queue are no longer available. When you delete a queue, the deletion process takes up to 60 seconds. Requests you send involving that queue during the 60 seconds might succeed. For example, a [SendMessage] request might succeed, but after 60 seconds the queue and the message you sent no longer exist. 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](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) in the Amazon SQS Developer Guide. The delete operation uses the HTTP GET verb. /// /// - Parameter DeleteQueueInput : /// /// - Returns: `DeleteQueueOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. func deleteQueue(input: DeleteQueueInput) async throws -> DeleteQueueOutput /// Gets attributes for the specified queue. To determine whether a queue is [FIFO](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues.html), you can check whether QueueName ends with the .fifo suffix. /// @@ -176,7 +267,18 @@ public protocol SQSClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. /// - `InvalidAttributeName` : The specified attribute doesn't exist. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. func getQueueAttributes(input: GetQueueAttributesInput) async throws -> GetQueueAttributesOutput /// Returns the URL of an existing Amazon SQS queue. To access a queue that belongs to another AWS account, use the QueueOwnerAWSAccountId parameter to specify the account ID of the queue's owner. The queue's owner must grant you permission to access the queue. For more information about shared queue access, see [AddPermission] or see [Allow Developers to Write Messages to a Shared Queue](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-writing-an-sqs-policy.html#write-messages-to-shared-queue) in the Amazon SQS Developer Guide. /// @@ -187,7 +289,17 @@ public protocol SQSClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. func getQueueUrl(input: GetQueueUrlInput) async throws -> GetQueueUrlOutput /// Returns a list of your queues that have the RedrivePolicy queue attribute configured with a dead-letter queue. The ListDeadLetterSourceQueues methods supports pagination. Set parameter MaxResults in the request to specify the maximum number of results to be returned in the response. If you do not set MaxResults, the response includes a maximum of 1,000 results. If you set MaxResults and there are additional results to display, the response includes a value for NextToken. Use NextToken as a parameter in your next request to ListDeadLetterSourceQueues to receive the next page of results. For more information about using dead-letter queues, see [Using Amazon SQS Dead-Letter Queues](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html) in the Amazon SQS Developer Guide. /// @@ -198,7 +310,17 @@ public protocol SQSClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. func listDeadLetterSourceQueues(input: ListDeadLetterSourceQueuesInput) async throws -> ListDeadLetterSourceQueuesOutput /// Gets the most recent message movement tasks (up to 10) under a specific source queue. /// @@ -215,6 +337,15 @@ public protocol SQSClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `RequestThrottled` : 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. /// - `ResourceNotFoundException` : One or more specified resources don't exist. /// - `UnsupportedOperation` : Error code 400. Unsupported operation. func listMessageMoveTasks(input: ListMessageMoveTasksInput) async throws -> ListMessageMoveTasksOutput @@ -223,12 +354,41 @@ public protocol SQSClientProtocol { /// - Parameter ListQueuesInput : /// /// - Returns: `ListQueuesOutput` : A list of your queues. + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. func listQueues(input: ListQueuesInput) async throws -> ListQueuesOutput /// List all cost allocation tags added to the specified Amazon SQS queue. For an overview, see [Tagging Your Amazon SQS Queues](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-tags.html) 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](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) in the Amazon SQS Developer Guide. /// /// - Parameter ListQueueTagsInput : [no documentation found] /// /// - Returns: `ListQueueTagsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. func listQueueTags(input: ListQueueTagsInput) async throws -> ListQueueTagsOutput /// Deletes available messages in a queue (including in-flight messages) specified by the QueueURL parameter. When you use the PurgeQueue action, you can't retrieve any messages deleted from a queue. The message deletion process takes up to 60 seconds. We recommend waiting for 60 seconds regardless of your queue's size. Messages sent to the queue before you call PurgeQueue might be received but are deleted within the next minute. Messages sent to the queue after you call PurgeQueue might be deleted while the queue is being purged. /// @@ -239,8 +399,18 @@ public protocol SQSClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. /// - `PurgeQueueInProgress` : 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 queue). /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. func purgeQueue(input: PurgeQueueInput) async throws -> PurgeQueueOutput /// 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](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-long-polling.html) 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 most likely get fewer messages than you requested per ReceiveMessage call. If the number of messages in the queue is extremely small, you might not receive any messages in a particular ReceiveMessage response. If this happens, repeat the request. For each message returned, the response includes the following: /// @@ -266,7 +436,29 @@ public protocol SQSClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `KmsAccessDenied` : The caller doesn't have the required KMS access. + /// - `KmsDisabled` : The request was denied due to request throttling. + /// - `KmsInvalidKeyUsage` : 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). + /// - `KmsInvalidState` : The request was rejected because the state of the specified resource is not valid for this request. + /// - `KmsNotFound` : The request was rejected because the specified entity or resource could not be found. + /// - `KmsOptInRequired` : The request was rejected because the specified key policy isn't syntactically or semantically correct. + /// - `KmsThrottled` : Amazon Web Services KMS throttles requests for the following conditions. /// - `OverLimit` : 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. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. func receiveMessage(input: ReceiveMessageInput) async throws -> ReceiveMessageOutput /// Revokes any permissions in the queue policy that matches the specified Label parameter. /// @@ -279,6 +471,21 @@ public protocol SQSClientProtocol { /// - Parameter RemovePermissionInput : /// /// - Returns: `RemovePermissionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. func removePermission(input: RemovePermissionInput) async throws -> RemovePermissionOutput /// Delivers a message to the specified queue. 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 Any characters not included in this list will be rejected. For more information, see the [W3C specification for characters](http://www.w3.org/TR/REC-xml/#charsets). /// @@ -289,7 +496,28 @@ public protocol SQSClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. /// - `InvalidMessageContents` : The message contains characters outside the allowed set. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `KmsAccessDenied` : The caller doesn't have the required KMS access. + /// - `KmsDisabled` : The request was denied due to request throttling. + /// - `KmsInvalidKeyUsage` : 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). + /// - `KmsInvalidState` : The request was rejected because the state of the specified resource is not valid for this request. + /// - `KmsNotFound` : The request was rejected because the specified entity or resource could not be found. + /// - `KmsOptInRequired` : The request was rejected because the specified key policy isn't syntactically or semantically correct. + /// - `KmsThrottled` : Amazon Web Services KMS throttles requests for the following conditions. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. /// - `UnsupportedOperation` : Error code 400. Unsupported operation. func sendMessage(input: SendMessageInput) async throws -> SendMessageOutput /// 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. 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: #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](http://www.w3.org/TR/REC-xml/#charsets). If you don't specify the DelaySeconds parameter for an entry, Amazon SQS uses the default value for the queue. @@ -304,7 +532,28 @@ public protocol SQSClientProtocol { /// - `BatchEntryIdsNotDistinct` : Two or more batch entries in the request have the same Id. /// - `BatchRequestTooLong` : The length of all the messages put together is more than the limit. /// - `EmptyBatchRequest` : The batch request doesn't contain any entries. + /// - `InvalidAddress` : The accountId is invalid. /// - `InvalidBatchEntryId` : The Id of a batch entry in a batch request doesn't abide by the specification. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `KmsAccessDenied` : The caller doesn't have the required KMS access. + /// - `KmsDisabled` : The request was denied due to request throttling. + /// - `KmsInvalidKeyUsage` : 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). + /// - `KmsInvalidState` : The request was rejected because the state of the specified resource is not valid for this request. + /// - `KmsNotFound` : The request was rejected because the specified entity or resource could not be found. + /// - `KmsOptInRequired` : The request was rejected because the specified key policy isn't syntactically or semantically correct. + /// - `KmsThrottled` : Amazon Web Services KMS throttles requests for the following conditions. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. /// - `TooManyEntriesInBatchRequest` : The batch request contains more entries than permissible. /// - `UnsupportedOperation` : Error code 400. Unsupported operation. func sendMessageBatch(input: SendMessageBatchInput) async throws -> SendMessageBatchOutput @@ -323,7 +572,20 @@ public protocol SQSClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. /// - `InvalidAttributeName` : The specified attribute doesn't exist. + /// - `InvalidAttributeValue` : A queue attribute value is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `OverLimit` : 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. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. func setQueueAttributes(input: SetQueueAttributesInput) async throws -> SetQueueAttributesOutput /// Starts an asynchronous task to move messages from a specified source queue to a specified destination queue. /// @@ -342,6 +604,15 @@ public protocol SQSClientProtocol { /// - Throws: One of the exceptions listed below __Possible Exceptions__. /// /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `RequestThrottled` : 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. /// - `ResourceNotFoundException` : One or more specified resources don't exist. /// - `UnsupportedOperation` : Error code 400. Unsupported operation. func startMessageMoveTask(input: StartMessageMoveTaskInput) async throws -> StartMessageMoveTaskOutput @@ -361,12 +632,42 @@ public protocol SQSClientProtocol { /// - Parameter TagQueueInput : [no documentation found] /// /// - Returns: `TagQueueOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. func tagQueue(input: TagQueueInput) async throws -> TagQueueOutput /// Remove cost allocation tags from the specified Amazon SQS queue. For an overview, see [Tagging Your Amazon SQS Queues](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-queue-tags.html) 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](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-customer-managed-policy-examples.html#grant-cross-account-permissions-to-role-and-user-name) in the Amazon SQS Developer Guide. /// /// - Parameter UntagQueueInput : [no documentation found] /// /// - Returns: `UntagQueueOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InvalidAddress` : The accountId is invalid. + /// - `InvalidSecurity` : When the request to a queue is not HTTPS and SigV4. + /// - `QueueDoesNotExist` : The specified queue doesn't exist. + /// - `RequestThrottled` : 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. + /// - `UnsupportedOperation` : Error code 400. Unsupported operation. func untagQueue(input: UntagQueueInput) async throws -> UntagQueueOutput } diff --git a/Sources/Services/AWSSQS/models/Models.swift b/Sources/Services/AWSSQS/models/Models.swift index 6f6f2ba87d0..08359a1be52 100644 --- a/Sources/Services/AWSSQS/models/Models.swift +++ b/Sources/Services/AWSSQS/models/Models.swift @@ -3,40 +3,33 @@ import AWSClientRuntime import ClientRuntime extension AddPermissionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case awsAccountIds = "AWSAccountIds" + case actions = "Actions" + case label = "Label" + case queueUrl = "QueueUrl" + } + public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) if let awsAccountIds = awsAccountIds { - if !awsAccountIds.isEmpty { - for (index0, string0) in awsAccountIds.enumerated() { - var awsAccountIdsContainer0 = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("AWSAccountId.\(index0.advanced(by: 1))")) - try awsAccountIdsContainer0.encode(string0, forKey: ClientRuntime.Key("")) - } - } - else { - var awsAccountIdsContainer = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("AWSAccountId")) - try awsAccountIdsContainer.encode("", forKey: ClientRuntime.Key("")) + var awsAccountIdsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .awsAccountIds) + for string0 in awsAccountIds { + try awsAccountIdsContainer.encode(string0) } } if let actions = actions { - if !actions.isEmpty { - for (index0, string0) in actions.enumerated() { - var actionsContainer0 = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("ActionName.\(index0.advanced(by: 1))")) - try actionsContainer0.encode(string0, forKey: ClientRuntime.Key("")) - } - } - else { - var actionsContainer = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("ActionName")) - try actionsContainer.encode("", forKey: ClientRuntime.Key("")) + var actionsContainer = encodeContainer.nestedUnkeyedContainer(forKey: .actions) + for string0 in actions { + try actionsContainer.encode(string0) } } - if let label = label { - try container.encode(label, forKey: ClientRuntime.Key("Label")) + if let label = self.label { + try encodeContainer.encode(label, forKey: .label) } - if let queueUrl = queueUrl { - try container.encode(queueUrl, forKey: ClientRuntime.Key("QueueUrl")) + if let queueUrl = self.queueUrl { + try encodeContainer.encode(queueUrl, forKey: .queueUrl) } - try container.encode("AddPermission", forKey:ClientRuntime.Key("Action")) - try container.encode("2012-11-05", forKey:ClientRuntime.Key("Version")) } } @@ -84,8 +77,8 @@ struct AddPermissionInputBody: Swift.Equatable { extension AddPermissionInputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case awsAccountIds = "AWSAccountId" - case actions = "ActionName" + case awsAccountIds = "AWSAccountIds" + case actions = "Actions" case label = "Label" case queueUrl = "QueueUrl" } @@ -96,42 +89,28 @@ extension AddPermissionInputBody: Swift.Decodable { queueUrl = queueUrlDecoded let labelDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .label) label = labelDecoded - if containerValues.contains(.awsAccountIds) { - let awsAccountIdsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .awsAccountIds) - if awsAccountIdsWrappedContainer != nil { - let awsAccountIdsContainer = try containerValues.decodeIfPresent([Swift.String].self, forKey: .awsAccountIds) - var awsAccountIdsBuffer:[Swift.String]? = nil - if let awsAccountIdsContainer = awsAccountIdsContainer { - awsAccountIdsBuffer = [Swift.String]() - for stringContainer0 in awsAccountIdsContainer { - awsAccountIdsBuffer?.append(stringContainer0) - } + let awsAccountIdsContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .awsAccountIds) + var awsAccountIdsDecoded0:[Swift.String]? = nil + if let awsAccountIdsContainer = awsAccountIdsContainer { + awsAccountIdsDecoded0 = [Swift.String]() + for string0 in awsAccountIdsContainer { + if let string0 = string0 { + awsAccountIdsDecoded0?.append(string0) } - awsAccountIds = awsAccountIdsBuffer - } else { - awsAccountIds = [] } - } else { - awsAccountIds = nil - } - if containerValues.contains(.actions) { - let actionsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .actions) - if actionsWrappedContainer != nil { - let actionsContainer = try containerValues.decodeIfPresent([Swift.String].self, forKey: .actions) - var actionsBuffer:[Swift.String]? = nil - if let actionsContainer = actionsContainer { - actionsBuffer = [Swift.String]() - for stringContainer0 in actionsContainer { - actionsBuffer?.append(stringContainer0) - } + } + awsAccountIds = awsAccountIdsDecoded0 + let actionsContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .actions) + var actionsDecoded0:[Swift.String]? = nil + if let actionsContainer = actionsContainer { + actionsDecoded0 = [Swift.String]() + for string0 in actionsContainer { + if let string0 = string0 { + actionsDecoded0?.append(string0) } - actions = actionsBuffer - } else { - actions = [] } - } else { - actions = nil } + actions = actionsDecoded0 } } @@ -147,16 +126,29 @@ public struct AddPermissionOutput: Swift.Equatable { enum AddPermissionOutputError: ClientRuntime.HttpResponseErrorBinding { static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "OverLimit": return try await OverLimit(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InvalidAddress": return try await InvalidAddress(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurity(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "OverLimit": return try await OverLimit(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.NonExistentQueue": return try await QueueDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "RequestThrottled": return try await RequestThrottled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } } extension BatchEntryIdsNotDistinct { public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: BatchEntryIdsNotDistinctBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } self.httpResponse = httpResponse self.requestID = requestID self.message = message @@ -165,6 +157,12 @@ extension BatchEntryIdsNotDistinct { /// Two or more batch entries in the request have the same Id. public struct BatchEntryIdsNotDistinct: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() public static var typeName: Swift.String { "AWS.SimpleQueueService.BatchEntryIdsNotDistinct" } public static var fault: ErrorFault { .client } public static var isRetryable: Swift.Bool { false } @@ -173,11 +171,39 @@ public struct BatchEntryIdsNotDistinct: ClientRuntime.ModeledError, AWSClientRun public internal(set) var message: Swift.String? public internal(set) var requestID: Swift.String? - public init() { } + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct BatchEntryIdsNotDistinctBody: Swift.Equatable { + let message: Swift.String? +} + +extension BatchEntryIdsNotDistinctBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } } extension BatchRequestTooLong { public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: BatchRequestTooLongBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } self.httpResponse = httpResponse self.requestID = requestID self.message = message @@ -186,6 +212,12 @@ extension BatchRequestTooLong { /// The length of all the messages put together is more than the limit. public struct BatchRequestTooLong: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() public static var typeName: Swift.String { "AWS.SimpleQueueService.BatchRequestTooLong" } public static var fault: ErrorFault { .client } public static var isRetryable: Swift.Bool { false } @@ -194,7 +226,28 @@ public struct BatchRequestTooLong: ClientRuntime.ModeledError, AWSClientRuntime. public internal(set) var message: Swift.String? public internal(set) var requestID: Swift.String? - public init() { } + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct BatchRequestTooLongBody: Swift.Equatable { + let message: Swift.String? +} + +extension BatchRequestTooLongBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } } extension SQSClientTypes.BatchResultErrorEntry: Swift.Codable { @@ -206,18 +259,18 @@ extension SQSClientTypes.BatchResultErrorEntry: Swift.Codable { } public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) - if let code = code { - try container.encode(code, forKey: ClientRuntime.Key("Code")) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let code = self.code { + try encodeContainer.encode(code, forKey: .code) } - if let id = id { - try container.encode(id, forKey: ClientRuntime.Key("Id")) + if let id = self.id { + try encodeContainer.encode(id, forKey: .id) } - if let message = message { - try container.encode(message, forKey: ClientRuntime.Key("Message")) + if let message = self.message { + try encodeContainer.encode(message, forKey: .message) } if senderFault != false { - try container.encode(senderFault, forKey: ClientRuntime.Key("SenderFault")) + try encodeContainer.encode(senderFault, forKey: .senderFault) } } @@ -266,13 +319,15 @@ extension SQSClientTypes { } extension CancelMessageMoveTaskInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case taskHandle = "TaskHandle" + } + public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) - if let taskHandle = taskHandle { - try container.encode(taskHandle, forKey: ClientRuntime.Key("TaskHandle")) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let taskHandle = self.taskHandle { + try encodeContainer.encode(taskHandle, forKey: .taskHandle) } - try container.encode("CancelMessageMoveTask", forKey:ClientRuntime.Key("Action")) - try container.encode("2012-11-05", forKey:ClientRuntime.Key("Version")) } } @@ -345,8 +400,7 @@ extension CancelMessageMoveTaskOutputBody: Swift.Decodable { } public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CancelMessageMoveTaskResult")) + let containerValues = try decoder.container(keyedBy: CodingKeys.self) let approximateNumberOfMessagesMovedDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .approximateNumberOfMessagesMoved) ?? 0 approximateNumberOfMessagesMoved = approximateNumberOfMessagesMovedDecoded } @@ -354,35 +408,36 @@ extension CancelMessageMoveTaskOutputBody: Swift.Decodable { enum CancelMessageMoveTaskOutputError: ClientRuntime.HttpResponseErrorBinding { static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "AWS.SimpleQueueService.UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InvalidAddress": return try await InvalidAddress(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurity(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "RequestThrottled": return try await RequestThrottled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } } extension ChangeMessageVisibilityBatchInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case entries = "Entries" + case queueUrl = "QueueUrl" + } + public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) if let entries = entries { - if !entries.isEmpty { - for (index0, changemessagevisibilitybatchrequestentry0) in entries.enumerated() { - var entriesContainer0 = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("ChangeMessageVisibilityBatchRequestEntry.\(index0.advanced(by: 1))")) - try entriesContainer0.encode(changemessagevisibilitybatchrequestentry0, forKey: ClientRuntime.Key("")) - } - } - else { - var entriesContainer = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("ChangeMessageVisibilityBatchRequestEntry")) - try entriesContainer.encode("", forKey: ClientRuntime.Key("")) + var entriesContainer = encodeContainer.nestedUnkeyedContainer(forKey: .entries) + for changemessagevisibilitybatchrequestentry0 in entries { + try entriesContainer.encode(changemessagevisibilitybatchrequestentry0) } } - if let queueUrl = queueUrl { - try container.encode(queueUrl, forKey: ClientRuntime.Key("QueueUrl")) + if let queueUrl = self.queueUrl { + try encodeContainer.encode(queueUrl, forKey: .queueUrl) } - try container.encode("ChangeMessageVisibilityBatch", forKey:ClientRuntime.Key("Action")) - try container.encode("2012-11-05", forKey:ClientRuntime.Key("Version")) } } @@ -418,7 +473,7 @@ struct ChangeMessageVisibilityBatchInputBody: Swift.Equatable { extension ChangeMessageVisibilityBatchInputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case entries = "ChangeMessageVisibilityBatchRequestEntry" + case entries = "Entries" case queueUrl = "QueueUrl" } @@ -426,24 +481,17 @@ extension ChangeMessageVisibilityBatchInputBody: Swift.Decodable { let containerValues = try decoder.container(keyedBy: CodingKeys.self) let queueUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .queueUrl) queueUrl = queueUrlDecoded - if containerValues.contains(.entries) { - let entriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .entries) - if entriesWrappedContainer != nil { - let entriesContainer = try containerValues.decodeIfPresent([SQSClientTypes.ChangeMessageVisibilityBatchRequestEntry].self, forKey: .entries) - var entriesBuffer:[SQSClientTypes.ChangeMessageVisibilityBatchRequestEntry]? = nil - if let entriesContainer = entriesContainer { - entriesBuffer = [SQSClientTypes.ChangeMessageVisibilityBatchRequestEntry]() - for structureContainer0 in entriesContainer { - entriesBuffer?.append(structureContainer0) - } + let entriesContainer = try containerValues.decodeIfPresent([SQSClientTypes.ChangeMessageVisibilityBatchRequestEntry?].self, forKey: .entries) + var entriesDecoded0:[SQSClientTypes.ChangeMessageVisibilityBatchRequestEntry]? = nil + if let entriesContainer = entriesContainer { + entriesDecoded0 = [SQSClientTypes.ChangeMessageVisibilityBatchRequestEntry]() + for structure0 in entriesContainer { + if let structure0 = structure0 { + entriesDecoded0?.append(structure0) } - entries = entriesBuffer - } else { - entries = [] } - } else { - entries = nil } + entries = entriesDecoded0 } } @@ -487,61 +535,52 @@ struct ChangeMessageVisibilityBatchOutputBody: Swift.Equatable { extension ChangeMessageVisibilityBatchOutputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case failed = "BatchResultErrorEntry" - case successful = "ChangeMessageVisibilityBatchResultEntry" + case failed = "Failed" + case successful = "Successful" } public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ChangeMessageVisibilityBatchResult")) - if containerValues.contains(.successful) { - let successfulWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .successful) - if successfulWrappedContainer != nil { - let successfulContainer = try containerValues.decodeIfPresent([SQSClientTypes.ChangeMessageVisibilityBatchResultEntry].self, forKey: .successful) - var successfulBuffer:[SQSClientTypes.ChangeMessageVisibilityBatchResultEntry]? = nil - if let successfulContainer = successfulContainer { - successfulBuffer = [SQSClientTypes.ChangeMessageVisibilityBatchResultEntry]() - for structureContainer0 in successfulContainer { - successfulBuffer?.append(structureContainer0) - } + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let successfulContainer = try containerValues.decodeIfPresent([SQSClientTypes.ChangeMessageVisibilityBatchResultEntry?].self, forKey: .successful) + var successfulDecoded0:[SQSClientTypes.ChangeMessageVisibilityBatchResultEntry]? = nil + if let successfulContainer = successfulContainer { + successfulDecoded0 = [SQSClientTypes.ChangeMessageVisibilityBatchResultEntry]() + for structure0 in successfulContainer { + if let structure0 = structure0 { + successfulDecoded0?.append(structure0) } - successful = successfulBuffer - } else { - successful = [] } - } else { - successful = nil - } - if containerValues.contains(.failed) { - let failedWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .failed) - if failedWrappedContainer != nil { - let failedContainer = try containerValues.decodeIfPresent([SQSClientTypes.BatchResultErrorEntry].self, forKey: .failed) - var failedBuffer:[SQSClientTypes.BatchResultErrorEntry]? = nil - if let failedContainer = failedContainer { - failedBuffer = [SQSClientTypes.BatchResultErrorEntry]() - for structureContainer0 in failedContainer { - failedBuffer?.append(structureContainer0) - } + } + successful = successfulDecoded0 + let failedContainer = try containerValues.decodeIfPresent([SQSClientTypes.BatchResultErrorEntry?].self, forKey: .failed) + var failedDecoded0:[SQSClientTypes.BatchResultErrorEntry]? = nil + if let failedContainer = failedContainer { + failedDecoded0 = [SQSClientTypes.BatchResultErrorEntry]() + for structure0 in failedContainer { + if let structure0 = structure0 { + failedDecoded0?.append(structure0) } - failed = failedBuffer - } else { - failed = [] } - } else { - failed = nil } + failed = failedDecoded0 } } enum ChangeMessageVisibilityBatchOutputError: ClientRuntime.HttpResponseErrorBinding { static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AWS.SimpleQueueService.BatchEntryIdsNotDistinct": return try await BatchEntryIdsNotDistinct(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "AWS.SimpleQueueService.EmptyBatchRequest": return try await EmptyBatchRequest(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "AWS.SimpleQueueService.InvalidBatchEntryId": return try await InvalidBatchEntryId(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "AWS.SimpleQueueService.TooManyEntriesInBatchRequest": return try await TooManyEntriesInBatchRequest(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "AWS.SimpleQueueService.BatchEntryIdsNotDistinct": return try await BatchEntryIdsNotDistinct(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.EmptyBatchRequest": return try await EmptyBatchRequest(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidAddress": return try await InvalidAddress(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.InvalidBatchEntryId": return try await InvalidBatchEntryId(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurity(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.NonExistentQueue": return try await QueueDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "RequestThrottled": return try await RequestThrottled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.TooManyEntriesInBatchRequest": return try await TooManyEntriesInBatchRequest(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } } @@ -554,15 +593,15 @@ extension SQSClientTypes.ChangeMessageVisibilityBatchRequestEntry: Swift.Codable } public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) - if let id = id { - try container.encode(id, forKey: ClientRuntime.Key("Id")) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let id = self.id { + try encodeContainer.encode(id, forKey: .id) } - if let receiptHandle = receiptHandle { - try container.encode(receiptHandle, forKey: ClientRuntime.Key("ReceiptHandle")) + if let receiptHandle = self.receiptHandle { + try encodeContainer.encode(receiptHandle, forKey: .receiptHandle) } - if visibilityTimeout != 0 { - try container.encode(visibilityTimeout, forKey: ClientRuntime.Key("VisibilityTimeout")) + if let visibilityTimeout = self.visibilityTimeout { + try encodeContainer.encode(visibilityTimeout, forKey: .visibilityTimeout) } } @@ -572,7 +611,7 @@ extension SQSClientTypes.ChangeMessageVisibilityBatchRequestEntry: Swift.Codable id = idDecoded let receiptHandleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .receiptHandle) receiptHandle = receiptHandleDecoded - let visibilityTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .visibilityTimeout) ?? 0 + let visibilityTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .visibilityTimeout) visibilityTimeout = visibilityTimeoutDecoded } } @@ -587,12 +626,12 @@ extension SQSClientTypes { /// This member is required. public var receiptHandle: Swift.String? /// The new value (in seconds) for the message's visibility timeout. - public var visibilityTimeout: Swift.Int + public var visibilityTimeout: Swift.Int? public init( id: Swift.String? = nil, receiptHandle: Swift.String? = nil, - visibilityTimeout: Swift.Int = 0 + visibilityTimeout: Swift.Int? = nil ) { self.id = id @@ -609,9 +648,9 @@ extension SQSClientTypes.ChangeMessageVisibilityBatchResultEntry: Swift.Codable } public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) - if let id = id { - try container.encode(id, forKey: ClientRuntime.Key("Id")) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let id = self.id { + try encodeContainer.encode(id, forKey: .id) } } @@ -640,19 +679,23 @@ extension SQSClientTypes { } extension ChangeMessageVisibilityInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case queueUrl = "QueueUrl" + case receiptHandle = "ReceiptHandle" + case visibilityTimeout = "VisibilityTimeout" + } + public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) - if let queueUrl = queueUrl { - try container.encode(queueUrl, forKey: ClientRuntime.Key("QueueUrl")) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let queueUrl = self.queueUrl { + try encodeContainer.encode(queueUrl, forKey: .queueUrl) } - if let receiptHandle = receiptHandle { - try container.encode(receiptHandle, forKey: ClientRuntime.Key("ReceiptHandle")) + if let receiptHandle = self.receiptHandle { + try encodeContainer.encode(receiptHandle, forKey: .receiptHandle) } - if let visibilityTimeout = visibilityTimeout { - try container.encode(visibilityTimeout, forKey: ClientRuntime.Key("VisibilityTimeout")) + if let visibilityTimeout = self.visibilityTimeout { + try encodeContainer.encode(visibilityTimeout, forKey: .visibilityTimeout) } - try container.encode("ChangeMessageVisibility", forKey:ClientRuntime.Key("Action")) - try container.encode("2012-11-05", forKey:ClientRuntime.Key("Version")) } } @@ -704,7 +747,7 @@ extension ChangeMessageVisibilityInputBody: Swift.Decodable { queueUrl = queueUrlDecoded let receiptHandleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .receiptHandle) receiptHandle = receiptHandleDecoded - let visibilityTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .visibilityTimeout) ?? 0 + let visibilityTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .visibilityTimeout) visibilityTimeout = visibilityTimeoutDecoded } } @@ -721,49 +764,45 @@ public struct ChangeMessageVisibilityOutput: Swift.Equatable { enum ChangeMessageVisibilityOutputError: ClientRuntime.HttpResponseErrorBinding { static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AWS.SimpleQueueService.MessageNotInflight": return try await MessageNotInflight(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReceiptHandleIsInvalid": return try await ReceiptHandleIsInvalid(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InvalidAddress": return try await InvalidAddress(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurity(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.MessageNotInflight": return try await MessageNotInflight(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.NonExistentQueue": return try await QueueDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ReceiptHandleIsInvalid": return try await ReceiptHandleIsInvalid(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "RequestThrottled": return try await RequestThrottled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } } extension CreateQueueInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case attributes = "Attributes" + case queueName = "QueueName" + case tags + } + public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) if let attributes = attributes { - if !attributes.isEmpty { - for (index0, element0) in attributes.sorted(by: { $0.key < $1.key }).enumerated() { - let queueattributenameKey0 = element0.key - let stringValue0 = element0.value - var nestedContainer0 = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Attribute.\(index0.advanced(by: 1))")) - var keyContainer0 = nestedContainer0.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Name")) - try keyContainer0.encode(queueattributenameKey0, forKey: ClientRuntime.Key("")) - var valueContainer0 = nestedContainer0.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Value")) - try valueContainer0.encode(stringValue0, forKey: ClientRuntime.Key("")) - } + var attributesContainer = encodeContainer.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: .attributes) + for (dictKey0, queueAttributeMap0) in attributes { + try attributesContainer.encode(queueAttributeMap0, forKey: ClientRuntime.Key(stringValue: dictKey0)) } } - if let queueName = queueName { - try container.encode(queueName, forKey: ClientRuntime.Key("QueueName")) + if let queueName = self.queueName { + try encodeContainer.encode(queueName, forKey: .queueName) } if let tags = tags { - if !tags.isEmpty { - for (index0, element0) in tags.sorted(by: { $0.key < $1.key }).enumerated() { - let tagkeyKey0 = element0.key - let tagvalueValue0 = element0.value - var nestedContainer0 = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Tag.\(index0.advanced(by: 1))")) - var keyContainer0 = nestedContainer0.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Key")) - try keyContainer0.encode(tagkeyKey0, forKey: ClientRuntime.Key("")) - var valueContainer0 = nestedContainer0.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Value")) - try valueContainer0.encode(tagvalueValue0, forKey: ClientRuntime.Key("")) - } + var tagsContainer = encodeContainer.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: .tags) + for (dictKey0, tagMap0) in tags { + try tagsContainer.encode(tagMap0, forKey: ClientRuntime.Key(stringValue: dictKey0)) } } - try container.encode("CreateQueue", forKey:ClientRuntime.Key("Action")) - try container.encode("2012-11-05", forKey:ClientRuntime.Key("Version")) } } @@ -912,59 +951,43 @@ public struct CreateQueueInput: Swift.Equatable { struct CreateQueueInputBody: Swift.Equatable { let queueName: Swift.String? - let tags: [Swift.String:Swift.String]? let attributes: [Swift.String:Swift.String]? + let tags: [Swift.String:Swift.String]? } extension CreateQueueInputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case attributes = "Attribute" + case attributes = "Attributes" case queueName = "QueueName" - case tags = "Tag" + case tags } public init(from decoder: Swift.Decoder) throws { let containerValues = try decoder.container(keyedBy: CodingKeys.self) let queueNameDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .queueName) queueName = queueNameDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Key{}; struct Value{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .tags) - if tagsWrappedContainer != nil { - let tagsContainer = try containerValues.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .tags) - var tagsBuffer: [Swift.String:Swift.String]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [Swift.String:Swift.String]() - for stringContainer0 in tagsContainer { - tagsBuffer?[stringContainer0.key] = stringContainer0.value - } + let attributesContainer = try containerValues.decodeIfPresent([Swift.String: Swift.String?].self, forKey: .attributes) + var attributesDecoded0: [Swift.String:Swift.String]? = nil + if let attributesContainer = attributesContainer { + attributesDecoded0 = [Swift.String:Swift.String]() + for (key0, string0) in attributesContainer { + if let string0 = string0 { + attributesDecoded0?[key0] = string0 } - tags = tagsBuffer - } else { - tags = [:] } - } else { - tags = nil - } - if containerValues.contains(.attributes) { - struct KeyVal0{struct Name{}; struct Value{}} - let attributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .attributes) - if attributesWrappedContainer != nil { - let attributesContainer = try containerValues.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .attributes) - var attributesBuffer: [Swift.String:Swift.String]? = nil - if let attributesContainer = attributesContainer { - attributesBuffer = [Swift.String:Swift.String]() - for stringContainer0 in attributesContainer { - attributesBuffer?[stringContainer0.key] = stringContainer0.value - } + } + attributes = attributesDecoded0 + let tagsContainer = try containerValues.decodeIfPresent([Swift.String: Swift.String?].self, forKey: .tags) + var tagsDecoded0: [Swift.String:Swift.String]? = nil + if let tagsContainer = tagsContainer { + tagsDecoded0 = [Swift.String:Swift.String]() + for (key0, tagvalue0) in tagsContainer { + if let tagvalue0 = tagvalue0 { + tagsDecoded0?[key0] = tagvalue0 } - attributes = attributesBuffer - } else { - attributes = [:] } - } else { - attributes = nil } + tags = tagsDecoded0 } } @@ -1003,8 +1026,7 @@ extension CreateQueueOutputBody: Swift.Decodable { } public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("CreateQueueResult")) + let containerValues = try decoder.container(keyedBy: CodingKeys.self) let queueUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .queueUrl) queueUrl = queueUrlDecoded } @@ -1012,35 +1034,39 @@ extension CreateQueueOutputBody: Swift.Decodable { enum CreateQueueOutputError: ClientRuntime.HttpResponseErrorBinding { static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AWS.SimpleQueueService.QueueDeletedRecently": return try await QueueDeletedRecently(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "QueueAlreadyExists": return try await QueueNameExists(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InvalidAddress": return try await InvalidAddress(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidAttributeName": return try await InvalidAttributeName(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidAttributeValue": return try await InvalidAttributeValue(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurity(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.QueueDeletedRecently": return try await QueueDeletedRecently(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "QueueAlreadyExists": return try await QueueNameExists(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "RequestThrottled": return try await RequestThrottled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } } extension DeleteMessageBatchInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case entries = "Entries" + case queueUrl = "QueueUrl" + } + public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) if let entries = entries { - if !entries.isEmpty { - for (index0, deletemessagebatchrequestentry0) in entries.enumerated() { - var entriesContainer0 = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("DeleteMessageBatchRequestEntry.\(index0.advanced(by: 1))")) - try entriesContainer0.encode(deletemessagebatchrequestentry0, forKey: ClientRuntime.Key("")) - } - } - else { - var entriesContainer = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("DeleteMessageBatchRequestEntry")) - try entriesContainer.encode("", forKey: ClientRuntime.Key("")) + var entriesContainer = encodeContainer.nestedUnkeyedContainer(forKey: .entries) + for deletemessagebatchrequestentry0 in entries { + try entriesContainer.encode(deletemessagebatchrequestentry0) } } - if let queueUrl = queueUrl { - try container.encode(queueUrl, forKey: ClientRuntime.Key("QueueUrl")) + if let queueUrl = self.queueUrl { + try encodeContainer.encode(queueUrl, forKey: .queueUrl) } - try container.encode("DeleteMessageBatch", forKey:ClientRuntime.Key("Action")) - try container.encode("2012-11-05", forKey:ClientRuntime.Key("Version")) } } @@ -1076,7 +1102,7 @@ struct DeleteMessageBatchInputBody: Swift.Equatable { extension DeleteMessageBatchInputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case entries = "DeleteMessageBatchRequestEntry" + case entries = "Entries" case queueUrl = "QueueUrl" } @@ -1084,24 +1110,17 @@ extension DeleteMessageBatchInputBody: Swift.Decodable { let containerValues = try decoder.container(keyedBy: CodingKeys.self) let queueUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .queueUrl) queueUrl = queueUrlDecoded - if containerValues.contains(.entries) { - let entriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .entries) - if entriesWrappedContainer != nil { - let entriesContainer = try containerValues.decodeIfPresent([SQSClientTypes.DeleteMessageBatchRequestEntry].self, forKey: .entries) - var entriesBuffer:[SQSClientTypes.DeleteMessageBatchRequestEntry]? = nil - if let entriesContainer = entriesContainer { - entriesBuffer = [SQSClientTypes.DeleteMessageBatchRequestEntry]() - for structureContainer0 in entriesContainer { - entriesBuffer?.append(structureContainer0) - } + let entriesContainer = try containerValues.decodeIfPresent([SQSClientTypes.DeleteMessageBatchRequestEntry?].self, forKey: .entries) + var entriesDecoded0:[SQSClientTypes.DeleteMessageBatchRequestEntry]? = nil + if let entriesContainer = entriesContainer { + entriesDecoded0 = [SQSClientTypes.DeleteMessageBatchRequestEntry]() + for structure0 in entriesContainer { + if let structure0 = structure0 { + entriesDecoded0?.append(structure0) } - entries = entriesBuffer - } else { - entries = [] } - } else { - entries = nil } + entries = entriesDecoded0 } } @@ -1145,61 +1164,52 @@ struct DeleteMessageBatchOutputBody: Swift.Equatable { extension DeleteMessageBatchOutputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case failed = "BatchResultErrorEntry" - case successful = "DeleteMessageBatchResultEntry" + case failed = "Failed" + case successful = "Successful" } public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("DeleteMessageBatchResult")) - if containerValues.contains(.successful) { - let successfulWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .successful) - if successfulWrappedContainer != nil { - let successfulContainer = try containerValues.decodeIfPresent([SQSClientTypes.DeleteMessageBatchResultEntry].self, forKey: .successful) - var successfulBuffer:[SQSClientTypes.DeleteMessageBatchResultEntry]? = nil - if let successfulContainer = successfulContainer { - successfulBuffer = [SQSClientTypes.DeleteMessageBatchResultEntry]() - for structureContainer0 in successfulContainer { - successfulBuffer?.append(structureContainer0) - } + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let successfulContainer = try containerValues.decodeIfPresent([SQSClientTypes.DeleteMessageBatchResultEntry?].self, forKey: .successful) + var successfulDecoded0:[SQSClientTypes.DeleteMessageBatchResultEntry]? = nil + if let successfulContainer = successfulContainer { + successfulDecoded0 = [SQSClientTypes.DeleteMessageBatchResultEntry]() + for structure0 in successfulContainer { + if let structure0 = structure0 { + successfulDecoded0?.append(structure0) } - successful = successfulBuffer - } else { - successful = [] } - } else { - successful = nil - } - if containerValues.contains(.failed) { - let failedWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .failed) - if failedWrappedContainer != nil { - let failedContainer = try containerValues.decodeIfPresent([SQSClientTypes.BatchResultErrorEntry].self, forKey: .failed) - var failedBuffer:[SQSClientTypes.BatchResultErrorEntry]? = nil - if let failedContainer = failedContainer { - failedBuffer = [SQSClientTypes.BatchResultErrorEntry]() - for structureContainer0 in failedContainer { - failedBuffer?.append(structureContainer0) - } + } + successful = successfulDecoded0 + let failedContainer = try containerValues.decodeIfPresent([SQSClientTypes.BatchResultErrorEntry?].self, forKey: .failed) + var failedDecoded0:[SQSClientTypes.BatchResultErrorEntry]? = nil + if let failedContainer = failedContainer { + failedDecoded0 = [SQSClientTypes.BatchResultErrorEntry]() + for structure0 in failedContainer { + if let structure0 = structure0 { + failedDecoded0?.append(structure0) } - failed = failedBuffer - } else { - failed = [] } - } else { - failed = nil } + failed = failedDecoded0 } } enum DeleteMessageBatchOutputError: ClientRuntime.HttpResponseErrorBinding { static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AWS.SimpleQueueService.BatchEntryIdsNotDistinct": return try await BatchEntryIdsNotDistinct(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "AWS.SimpleQueueService.EmptyBatchRequest": return try await EmptyBatchRequest(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "AWS.SimpleQueueService.InvalidBatchEntryId": return try await InvalidBatchEntryId(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "AWS.SimpleQueueService.TooManyEntriesInBatchRequest": return try await TooManyEntriesInBatchRequest(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "AWS.SimpleQueueService.BatchEntryIdsNotDistinct": return try await BatchEntryIdsNotDistinct(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.EmptyBatchRequest": return try await EmptyBatchRequest(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidAddress": return try await InvalidAddress(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.InvalidBatchEntryId": return try await InvalidBatchEntryId(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurity(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.NonExistentQueue": return try await QueueDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "RequestThrottled": return try await RequestThrottled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.TooManyEntriesInBatchRequest": return try await TooManyEntriesInBatchRequest(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } } @@ -1211,12 +1221,12 @@ extension SQSClientTypes.DeleteMessageBatchRequestEntry: Swift.Codable { } public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) - if let id = id { - try container.encode(id, forKey: ClientRuntime.Key("Id")) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let id = self.id { + try encodeContainer.encode(id, forKey: .id) } - if let receiptHandle = receiptHandle { - try container.encode(receiptHandle, forKey: ClientRuntime.Key("ReceiptHandle")) + if let receiptHandle = self.receiptHandle { + try encodeContainer.encode(receiptHandle, forKey: .receiptHandle) } } @@ -1257,9 +1267,9 @@ extension SQSClientTypes.DeleteMessageBatchResultEntry: Swift.Codable { } public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) - if let id = id { - try container.encode(id, forKey: ClientRuntime.Key("Id")) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let id = self.id { + try encodeContainer.encode(id, forKey: .id) } } @@ -1288,16 +1298,19 @@ extension SQSClientTypes { } extension DeleteMessageInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case queueUrl = "QueueUrl" + case receiptHandle = "ReceiptHandle" + } + public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) - if let queueUrl = queueUrl { - try container.encode(queueUrl, forKey: ClientRuntime.Key("QueueUrl")) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let queueUrl = self.queueUrl { + try encodeContainer.encode(queueUrl, forKey: .queueUrl) } - if let receiptHandle = receiptHandle { - try container.encode(receiptHandle, forKey: ClientRuntime.Key("ReceiptHandle")) + if let receiptHandle = self.receiptHandle { + try encodeContainer.encode(receiptHandle, forKey: .receiptHandle) } - try container.encode("DeleteMessage", forKey:ClientRuntime.Key("Action")) - try container.encode("2012-11-05", forKey:ClientRuntime.Key("Version")) } } @@ -1358,23 +1371,31 @@ public struct DeleteMessageOutput: Swift.Equatable { enum DeleteMessageOutputError: ClientRuntime.HttpResponseErrorBinding { static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidIdFormat": return try await InvalidIdFormat(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "ReceiptHandleIsInvalid": return try await ReceiptHandleIsInvalid(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InvalidAddress": return try await InvalidAddress(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidIdFormat": return try await InvalidIdFormat(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurity(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.NonExistentQueue": return try await QueueDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ReceiptHandleIsInvalid": return try await ReceiptHandleIsInvalid(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "RequestThrottled": return try await RequestThrottled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } } extension DeleteQueueInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case queueUrl = "QueueUrl" + } + public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) - if let queueUrl = queueUrl { - try container.encode(queueUrl, forKey: ClientRuntime.Key("QueueUrl")) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let queueUrl = self.queueUrl { + try encodeContainer.encode(queueUrl, forKey: .queueUrl) } - try container.encode("DeleteQueue", forKey:ClientRuntime.Key("Action")) - try container.encode("2012-11-05", forKey:ClientRuntime.Key("Version")) } } @@ -1426,15 +1447,28 @@ public struct DeleteQueueOutput: Swift.Equatable { enum DeleteQueueOutputError: ClientRuntime.HttpResponseErrorBinding { static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InvalidAddress": return try await InvalidAddress(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurity(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.NonExistentQueue": return try await QueueDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "RequestThrottled": return try await RequestThrottled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } } extension EmptyBatchRequest { public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: EmptyBatchRequestBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } self.httpResponse = httpResponse self.requestID = requestID self.message = message @@ -1443,6 +1477,12 @@ extension EmptyBatchRequest { /// The batch request doesn't contain any entries. public struct EmptyBatchRequest: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() public static var typeName: Swift.String { "AWS.SimpleQueueService.EmptyBatchRequest" } public static var fault: ErrorFault { .client } public static var isRetryable: Swift.Bool { false } @@ -1451,29 +1491,47 @@ public struct EmptyBatchRequest: ClientRuntime.ModeledError, AWSClientRuntime.AW public internal(set) var message: Swift.String? public internal(set) var requestID: Swift.String? - public init() { } + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct EmptyBatchRequestBody: Swift.Equatable { + let message: Swift.String? +} + +extension EmptyBatchRequestBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } } extension GetQueueAttributesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case attributeNames = "AttributeNames" + case queueUrl = "QueueUrl" + } + public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) if let attributeNames = attributeNames { - if !attributeNames.isEmpty { - for (index0, queueattributename0) in attributeNames.enumerated() { - var attributeNamesContainer0 = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("AttributeName.\(index0.advanced(by: 1))")) - try attributeNamesContainer0.encode(queueattributename0, forKey: ClientRuntime.Key("")) - } - } - else { - var attributeNamesContainer = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("AttributeName")) - try attributeNamesContainer.encode("", forKey: ClientRuntime.Key("")) + var attributeNamesContainer = encodeContainer.nestedUnkeyedContainer(forKey: .attributeNames) + for queueattributename0 in attributeNames { + try attributeNamesContainer.encode(queueattributename0.rawValue) } } - if let queueUrl = queueUrl { - try container.encode(queueUrl, forKey: ClientRuntime.Key("QueueUrl")) + if let queueUrl = self.queueUrl { + try encodeContainer.encode(queueUrl, forKey: .queueUrl) } - try container.encode("GetQueueAttributes", forKey:ClientRuntime.Key("Action")) - try container.encode("2012-11-05", forKey:ClientRuntime.Key("Version")) } } @@ -1597,7 +1655,7 @@ struct GetQueueAttributesInputBody: Swift.Equatable { extension GetQueueAttributesInputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case attributeNames = "AttributeName" + case attributeNames = "AttributeNames" case queueUrl = "QueueUrl" } @@ -1605,24 +1663,17 @@ extension GetQueueAttributesInputBody: Swift.Decodable { let containerValues = try decoder.container(keyedBy: CodingKeys.self) let queueUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .queueUrl) queueUrl = queueUrlDecoded - if containerValues.contains(.attributeNames) { - let attributeNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .attributeNames) - if attributeNamesWrappedContainer != nil { - let attributeNamesContainer = try containerValues.decodeIfPresent([SQSClientTypes.QueueAttributeName].self, forKey: .attributeNames) - var attributeNamesBuffer:[SQSClientTypes.QueueAttributeName]? = nil - if let attributeNamesContainer = attributeNamesContainer { - attributeNamesBuffer = [SQSClientTypes.QueueAttributeName]() - for enumContainer0 in attributeNamesContainer { - attributeNamesBuffer?.append(enumContainer0) - } + let attributeNamesContainer = try containerValues.decodeIfPresent([SQSClientTypes.QueueAttributeName?].self, forKey: .attributeNames) + var attributeNamesDecoded0:[SQSClientTypes.QueueAttributeName]? = nil + if let attributeNamesContainer = attributeNamesContainer { + attributeNamesDecoded0 = [SQSClientTypes.QueueAttributeName]() + for enum0 in attributeNamesContainer { + if let enum0 = enum0 { + attributeNamesDecoded0?.append(enum0) } - attributeNames = attributeNamesBuffer - } else { - attributeNames = [] } - } else { - attributeNames = nil } + attributeNames = attributeNamesDecoded0 } } @@ -1657,55 +1708,55 @@ struct GetQueueAttributesOutputBody: Swift.Equatable { extension GetQueueAttributesOutputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case attributes = "Attribute" + case attributes = "Attributes" } public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetQueueAttributesResult")) - if containerValues.contains(.attributes) { - struct KeyVal0{struct Name{}; struct Value{}} - let attributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .attributes) - if attributesWrappedContainer != nil { - let attributesContainer = try containerValues.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .attributes) - var attributesBuffer: [Swift.String:Swift.String]? = nil - if let attributesContainer = attributesContainer { - attributesBuffer = [Swift.String:Swift.String]() - for stringContainer0 in attributesContainer { - attributesBuffer?[stringContainer0.key] = stringContainer0.value - } + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let attributesContainer = try containerValues.decodeIfPresent([Swift.String: Swift.String?].self, forKey: .attributes) + var attributesDecoded0: [Swift.String:Swift.String]? = nil + if let attributesContainer = attributesContainer { + attributesDecoded0 = [Swift.String:Swift.String]() + for (key0, string0) in attributesContainer { + if let string0 = string0 { + attributesDecoded0?[key0] = string0 } - attributes = attributesBuffer - } else { - attributes = [:] } - } else { - attributes = nil } + attributes = attributesDecoded0 } } enum GetQueueAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidAttributeName": return try await InvalidAttributeName(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InvalidAddress": return try await InvalidAddress(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidAttributeName": return try await InvalidAttributeName(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurity(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.NonExistentQueue": return try await QueueDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "RequestThrottled": return try await RequestThrottled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } } extension GetQueueUrlInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case queueName = "QueueName" + case queueOwnerAWSAccountId = "QueueOwnerAWSAccountId" + } + public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) - if let queueName = queueName { - try container.encode(queueName, forKey: ClientRuntime.Key("QueueName")) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let queueName = self.queueName { + try encodeContainer.encode(queueName, forKey: .queueName) } - if let queueOwnerAWSAccountId = queueOwnerAWSAccountId { - try container.encode(queueOwnerAWSAccountId, forKey: ClientRuntime.Key("QueueOwnerAWSAccountId")) + if let queueOwnerAWSAccountId = self.queueOwnerAWSAccountId { + try encodeContainer.encode(queueOwnerAWSAccountId, forKey: .queueOwnerAWSAccountId) } - try container.encode("GetQueueUrl", forKey:ClientRuntime.Key("Action")) - try container.encode("2012-11-05", forKey:ClientRuntime.Key("Version")) } } @@ -1788,8 +1839,7 @@ extension GetQueueUrlOutputBody: Swift.Decodable { } public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("GetQueueUrlResult")) + let containerValues = try decoder.container(keyedBy: CodingKeys.self) let queueUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .queueUrl) queueUrl = queueUrlDecoded } @@ -1797,25 +1847,43 @@ extension GetQueueUrlOutputBody: Swift.Decodable { enum GetQueueUrlOutputError: ClientRuntime.HttpResponseErrorBinding { static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AWS.SimpleQueueService.NonExistentQueue": return try await QueueDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InvalidAddress": return try await InvalidAddress(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurity(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.NonExistentQueue": return try await QueueDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "RequestThrottled": return try await RequestThrottled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } } -extension InvalidAttributeName { +extension InvalidAddress { public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: InvalidAddressBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } self.httpResponse = httpResponse self.requestID = requestID self.message = message } } -/// The specified attribute doesn't exist. -public struct InvalidAttributeName: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { - public static var typeName: Swift.String { "InvalidAttributeName" } +/// The accountId is invalid. +public struct InvalidAddress: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "InvalidAddress" } public static var fault: ErrorFault { .client } public static var isRetryable: Swift.Bool { false } public static var isThrottling: Swift.Bool { false } @@ -1823,20 +1891,54 @@ public struct InvalidAttributeName: ClientRuntime.ModeledError, AWSClientRuntime public internal(set) var message: Swift.String? public internal(set) var requestID: Swift.String? - public init() { } + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } } -extension InvalidBatchEntryId { +struct InvalidAddressBody: Swift.Equatable { + let message: Swift.String? +} + +extension InvalidAddressBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + +extension InvalidAttributeName { public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: InvalidAttributeNameBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } self.httpResponse = httpResponse self.requestID = requestID self.message = message } } -/// The Id of a batch entry in a batch request doesn't abide by the specification. -public struct InvalidBatchEntryId: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { - public static var typeName: Swift.String { "AWS.SimpleQueueService.InvalidBatchEntryId" } +/// The specified attribute doesn't exist. +public struct InvalidAttributeName: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "InvalidAttributeName" } public static var fault: ErrorFault { .client } public static var isRetryable: Swift.Bool { false } public static var isThrottling: Swift.Bool { false } @@ -1844,20 +1946,54 @@ public struct InvalidBatchEntryId: ClientRuntime.ModeledError, AWSClientRuntime. public internal(set) var message: Swift.String? public internal(set) var requestID: Swift.String? - public init() { } + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } } -extension InvalidIdFormat { +struct InvalidAttributeNameBody: Swift.Equatable { + let message: Swift.String? +} + +extension InvalidAttributeNameBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + +extension InvalidAttributeValue { public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: InvalidAttributeValueBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } self.httpResponse = httpResponse self.requestID = requestID self.message = message } } -/// The specified receipt handle isn't valid for the current version. -public struct InvalidIdFormat: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { - public static var typeName: Swift.String { "InvalidIdFormat" } +/// A queue attribute value is invalid. +public struct InvalidAttributeValue: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "InvalidAttributeValue" } public static var fault: ErrorFault { .client } public static var isRetryable: Swift.Bool { false } public static var isThrottling: Swift.Bool { false } @@ -1865,20 +2001,97 @@ public struct InvalidIdFormat: ClientRuntime.ModeledError, AWSClientRuntime.AWSS public internal(set) var message: Swift.String? public internal(set) var requestID: Swift.String? - public init() { } + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } } -extension InvalidMessageContents { +struct InvalidAttributeValueBody: Swift.Equatable { + let message: Swift.String? +} + +extension InvalidAttributeValueBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + +extension InvalidBatchEntryId { public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: InvalidBatchEntryIdBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } self.httpResponse = httpResponse self.requestID = requestID self.message = message } } -/// The message contains characters outside the allowed set. -public struct InvalidMessageContents: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { - public static var typeName: Swift.String { "InvalidMessageContents" } +/// The Id of a batch entry in a batch request doesn't abide by the specification. +public struct InvalidBatchEntryId: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "AWS.SimpleQueueService.InvalidBatchEntryId" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct InvalidBatchEntryIdBody: Swift.Equatable { + let message: Swift.String? +} + +extension InvalidBatchEntryIdBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + +extension InvalidIdFormat { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// The specified receipt handle isn't valid for the current version. +@available(*, deprecated, message: "exception has been included in ReceiptHandleIsInvalid") +public struct InvalidIdFormat: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + public static var typeName: Swift.String { "InvalidIdFormat" } public static var fault: ErrorFault { .client } public static var isRetryable: Swift.Bool { false } public static var isThrottling: Swift.Bool { false } @@ -1889,20 +2102,523 @@ public struct InvalidMessageContents: ClientRuntime.ModeledError, AWSClientRunti public init() { } } +extension InvalidMessageContents { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: InvalidMessageContentsBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// The message contains characters outside the allowed set. +public struct InvalidMessageContents: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "InvalidMessageContents" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct InvalidMessageContentsBody: Swift.Equatable { + let message: Swift.String? +} + +extension InvalidMessageContentsBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + +extension InvalidSecurity { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: InvalidSecurityBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// When the request to a queue is not HTTPS and SigV4. +public struct InvalidSecurity: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "InvalidSecurity" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct InvalidSecurityBody: Swift.Equatable { + let message: Swift.String? +} + +extension InvalidSecurityBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + +extension KmsAccessDenied { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: KmsAccessDeniedBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// The caller doesn't have the required KMS access. +public struct KmsAccessDenied: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "KMS.AccessDeniedException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct KmsAccessDeniedBody: Swift.Equatable { + let message: Swift.String? +} + +extension KmsAccessDeniedBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + +extension KmsDisabled { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: KmsDisabledBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// The request was denied due to request throttling. +public struct KmsDisabled: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "KMS.DisabledException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct KmsDisabledBody: Swift.Equatable { + let message: Swift.String? +} + +extension KmsDisabledBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + +extension KmsInvalidKeyUsage { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: KmsInvalidKeyUsageBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// 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). +public struct KmsInvalidKeyUsage: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "KMS.InvalidKeyUsageException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct KmsInvalidKeyUsageBody: Swift.Equatable { + let message: Swift.String? +} + +extension KmsInvalidKeyUsageBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + +extension KmsInvalidState { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: KmsInvalidStateBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// The request was rejected because the state of the specified resource is not valid for this request. +public struct KmsInvalidState: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "KMS.InvalidStateException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct KmsInvalidStateBody: Swift.Equatable { + let message: Swift.String? +} + +extension KmsInvalidStateBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + +extension KmsNotFound { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: KmsNotFoundBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// The request was rejected because the specified entity or resource could not be found. +public struct KmsNotFound: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "KMS.NotFoundException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct KmsNotFoundBody: Swift.Equatable { + let message: Swift.String? +} + +extension KmsNotFoundBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + +extension KmsOptInRequired { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: KmsOptInRequiredBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// The request was rejected because the specified key policy isn't syntactically or semantically correct. +public struct KmsOptInRequired: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "KMS.OptInRequired" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct KmsOptInRequiredBody: Swift.Equatable { + let message: Swift.String? +} + +extension KmsOptInRequiredBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + +extension KmsThrottled { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: KmsThrottledBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// Amazon Web Services KMS throttles requests for the following conditions. +public struct KmsThrottled: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "KMS.ThrottlingException" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct KmsThrottledBody: Swift.Equatable { + let message: Swift.String? +} + +extension KmsThrottledBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } +} + extension ListDeadLetterSourceQueuesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case maxResults = "MaxResults" + case nextToken = "NextToken" + case queueUrl = "QueueUrl" + } + public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) - if let maxResults = maxResults { - try container.encode(maxResults, forKey: ClientRuntime.Key("MaxResults")) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let maxResults = self.maxResults { + try encodeContainer.encode(maxResults, forKey: .maxResults) } - if let nextToken = nextToken { - try container.encode(nextToken, forKey: ClientRuntime.Key("NextToken")) + if let nextToken = self.nextToken { + try encodeContainer.encode(nextToken, forKey: .nextToken) } - if let queueUrl = queueUrl { - try container.encode(queueUrl, forKey: ClientRuntime.Key("QueueUrl")) + if let queueUrl = self.queueUrl { + try encodeContainer.encode(queueUrl, forKey: .queueUrl) } - try container.encode("ListDeadLetterSourceQueues", forKey:ClientRuntime.Key("Action")) - try container.encode("2012-11-05", forKey:ClientRuntime.Key("Version")) } } @@ -1998,30 +2714,22 @@ struct ListDeadLetterSourceQueuesOutputBody: Swift.Equatable { extension ListDeadLetterSourceQueuesOutputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { case nextToken = "NextToken" - case queueUrls = "QueueUrl" + case queueUrls } public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListDeadLetterSourceQueuesResult")) - if containerValues.contains(.queueUrls) { - let queueUrlsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .queueUrls) - if queueUrlsWrappedContainer != nil { - let queueUrlsContainer = try containerValues.decodeIfPresent([Swift.String].self, forKey: .queueUrls) - var queueUrlsBuffer:[Swift.String]? = nil - if let queueUrlsContainer = queueUrlsContainer { - queueUrlsBuffer = [Swift.String]() - for stringContainer0 in queueUrlsContainer { - queueUrlsBuffer?.append(stringContainer0) - } + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let queueUrlsContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .queueUrls) + var queueUrlsDecoded0:[Swift.String]? = nil + if let queueUrlsContainer = queueUrlsContainer { + queueUrlsDecoded0 = [Swift.String]() + for string0 in queueUrlsContainer { + if let string0 = string0 { + queueUrlsDecoded0?.append(string0) } - queueUrls = queueUrlsBuffer - } else { - queueUrls = [] } - } else { - queueUrls = nil } + queueUrls = queueUrlsDecoded0 let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) nextToken = nextTokenDecoded } @@ -2029,25 +2737,33 @@ extension ListDeadLetterSourceQueuesOutputBody: Swift.Decodable { enum ListDeadLetterSourceQueuesOutputError: ClientRuntime.HttpResponseErrorBinding { static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AWS.SimpleQueueService.NonExistentQueue": return try await QueueDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InvalidAddress": return try await InvalidAddress(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurity(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.NonExistentQueue": return try await QueueDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "RequestThrottled": return try await RequestThrottled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } } extension ListMessageMoveTasksInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case maxResults = "MaxResults" + case sourceArn = "SourceArn" + } + public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) - if let maxResults = maxResults { - try container.encode(maxResults, forKey: ClientRuntime.Key("MaxResults")) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let maxResults = self.maxResults { + try encodeContainer.encode(maxResults, forKey: .maxResults) } - if let sourceArn = sourceArn { - try container.encode(sourceArn, forKey: ClientRuntime.Key("SourceArn")) + if let sourceArn = self.sourceArn { + try encodeContainer.encode(sourceArn, forKey: .sourceArn) } - try container.encode("ListMessageMoveTasks", forKey:ClientRuntime.Key("Action")) - try container.encode("2012-11-05", forKey:ClientRuntime.Key("Version")) } } @@ -2089,7 +2805,7 @@ extension ListMessageMoveTasksInputBody: Swift.Decodable { let containerValues = try decoder.container(keyedBy: CodingKeys.self) let sourceArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .sourceArn) sourceArn = sourceArnDecoded - let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) ?? 0 + let maxResultsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxResults) maxResults = maxResultsDecoded } } @@ -2124,40 +2840,36 @@ struct ListMessageMoveTasksOutputBody: Swift.Equatable { extension ListMessageMoveTasksOutputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case results = "ListMessageMoveTasksResultEntry" + case results = "Results" } public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListMessageMoveTasksResult")) - if containerValues.contains(.results) { - let resultsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .results) - if resultsWrappedContainer != nil { - let resultsContainer = try containerValues.decodeIfPresent([SQSClientTypes.ListMessageMoveTasksResultEntry].self, forKey: .results) - var resultsBuffer:[SQSClientTypes.ListMessageMoveTasksResultEntry]? = nil - if let resultsContainer = resultsContainer { - resultsBuffer = [SQSClientTypes.ListMessageMoveTasksResultEntry]() - for structureContainer0 in resultsContainer { - resultsBuffer?.append(structureContainer0) - } + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let resultsContainer = try containerValues.decodeIfPresent([SQSClientTypes.ListMessageMoveTasksResultEntry?].self, forKey: .results) + var resultsDecoded0:[SQSClientTypes.ListMessageMoveTasksResultEntry]? = nil + if let resultsContainer = resultsContainer { + resultsDecoded0 = [SQSClientTypes.ListMessageMoveTasksResultEntry]() + for structure0 in resultsContainer { + if let structure0 = structure0 { + resultsDecoded0?.append(structure0) } - results = resultsBuffer - } else { - results = [] } - } else { - results = nil } + results = resultsDecoded0 } } enum ListMessageMoveTasksOutputError: ClientRuntime.HttpResponseErrorBinding { static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "AWS.SimpleQueueService.UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InvalidAddress": return try await InvalidAddress(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurity(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "RequestThrottled": return try await RequestThrottled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } } @@ -2176,33 +2888,33 @@ extension SQSClientTypes.ListMessageMoveTasksResultEntry: Swift.Codable { } public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) if approximateNumberOfMessagesMoved != 0 { - try container.encode(approximateNumberOfMessagesMoved, forKey: ClientRuntime.Key("ApproximateNumberOfMessagesMoved")) + try encodeContainer.encode(approximateNumberOfMessagesMoved, forKey: .approximateNumberOfMessagesMoved) } - if approximateNumberOfMessagesToMove != 0 { - try container.encode(approximateNumberOfMessagesToMove, forKey: ClientRuntime.Key("ApproximateNumberOfMessagesToMove")) + if let approximateNumberOfMessagesToMove = self.approximateNumberOfMessagesToMove { + try encodeContainer.encode(approximateNumberOfMessagesToMove, forKey: .approximateNumberOfMessagesToMove) } - if let destinationArn = destinationArn { - try container.encode(destinationArn, forKey: ClientRuntime.Key("DestinationArn")) + if let destinationArn = self.destinationArn { + try encodeContainer.encode(destinationArn, forKey: .destinationArn) } - if let failureReason = failureReason { - try container.encode(failureReason, forKey: ClientRuntime.Key("FailureReason")) + if let failureReason = self.failureReason { + try encodeContainer.encode(failureReason, forKey: .failureReason) } - if maxNumberOfMessagesPerSecond != 0 { - try container.encode(maxNumberOfMessagesPerSecond, forKey: ClientRuntime.Key("MaxNumberOfMessagesPerSecond")) + if let maxNumberOfMessagesPerSecond = self.maxNumberOfMessagesPerSecond { + try encodeContainer.encode(maxNumberOfMessagesPerSecond, forKey: .maxNumberOfMessagesPerSecond) } - if let sourceArn = sourceArn { - try container.encode(sourceArn, forKey: ClientRuntime.Key("SourceArn")) + if let sourceArn = self.sourceArn { + try encodeContainer.encode(sourceArn, forKey: .sourceArn) } if startedTimestamp != 0 { - try container.encode(startedTimestamp, forKey: ClientRuntime.Key("StartedTimestamp")) + try encodeContainer.encode(startedTimestamp, forKey: .startedTimestamp) } - if let status = status { - try container.encode(status, forKey: ClientRuntime.Key("Status")) + if let status = self.status { + try encodeContainer.encode(status, forKey: .status) } - if let taskHandle = taskHandle { - try container.encode(taskHandle, forKey: ClientRuntime.Key("TaskHandle")) + if let taskHandle = self.taskHandle { + try encodeContainer.encode(taskHandle, forKey: .taskHandle) } } @@ -2216,11 +2928,11 @@ extension SQSClientTypes.ListMessageMoveTasksResultEntry: Swift.Codable { sourceArn = sourceArnDecoded let destinationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationArn) destinationArn = destinationArnDecoded - let maxNumberOfMessagesPerSecondDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxNumberOfMessagesPerSecond) ?? 0 + let maxNumberOfMessagesPerSecondDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxNumberOfMessagesPerSecond) maxNumberOfMessagesPerSecond = maxNumberOfMessagesPerSecondDecoded let approximateNumberOfMessagesMovedDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .approximateNumberOfMessagesMoved) ?? 0 approximateNumberOfMessagesMoved = approximateNumberOfMessagesMovedDecoded - let approximateNumberOfMessagesToMoveDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .approximateNumberOfMessagesToMove) ?? 0 + let approximateNumberOfMessagesToMoveDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .approximateNumberOfMessagesToMove) approximateNumberOfMessagesToMove = approximateNumberOfMessagesToMoveDecoded let failureReasonDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .failureReason) failureReason = failureReasonDecoded @@ -2235,13 +2947,13 @@ extension SQSClientTypes { /// The approximate number of messages already moved to the destination queue. public var approximateNumberOfMessagesMoved: Swift.Int /// The number of messages to be moved from the source queue. This number is obtained at the time of starting the message movement task. - public var approximateNumberOfMessagesToMove: Swift.Int + public var approximateNumberOfMessagesToMove: Swift.Int? /// The ARN of the destination queue if it has been specified in the StartMessageMoveTask request. If a DestinationArn has not been specified in the StartMessageMoveTask request, this field value will be NULL. public var destinationArn: Swift.String? /// The task failure reason (only included if the task status is FAILED). public var failureReason: Swift.String? /// The number of messages to be moved per second (the message movement rate), if it has been specified in the StartMessageMoveTask request. If a MaxNumberOfMessagesPerSecond has not been specified in the StartMessageMoveTask request, this field value will be NULL. - public var maxNumberOfMessagesPerSecond: Swift.Int + public var maxNumberOfMessagesPerSecond: Swift.Int? /// The ARN of the queue that contains the messages to be moved to another queue. public var sourceArn: Swift.String? /// The timestamp of starting the message movement task. @@ -2253,10 +2965,10 @@ extension SQSClientTypes { public init( approximateNumberOfMessagesMoved: Swift.Int = 0, - approximateNumberOfMessagesToMove: Swift.Int = 0, + approximateNumberOfMessagesToMove: Swift.Int? = nil, destinationArn: Swift.String? = nil, failureReason: Swift.String? = nil, - maxNumberOfMessagesPerSecond: Swift.Int = 0, + maxNumberOfMessagesPerSecond: Swift.Int? = nil, sourceArn: Swift.String? = nil, startedTimestamp: Swift.Int = 0, status: Swift.String? = nil, @@ -2278,13 +2990,15 @@ extension SQSClientTypes { } extension ListQueueTagsInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case queueUrl = "QueueUrl" + } + public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) - if let queueUrl = queueUrl { - try container.encode(queueUrl, forKey: ClientRuntime.Key("QueueUrl")) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let queueUrl = self.queueUrl { + try encodeContainer.encode(queueUrl, forKey: .queueUrl) } - try container.encode("ListQueueTags", forKey:ClientRuntime.Key("Action")) - try container.encode("2012-11-05", forKey:ClientRuntime.Key("Version")) } } @@ -2353,57 +3067,58 @@ struct ListQueueTagsOutputBody: Swift.Equatable { extension ListQueueTagsOutputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case tags = "Tag" + case tags = "Tags" } public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListQueueTagsResult")) - if containerValues.contains(.tags) { - struct KeyVal0{struct Key{}; struct Value{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .tags) - if tagsWrappedContainer != nil { - let tagsContainer = try containerValues.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .tags) - var tagsBuffer: [Swift.String:Swift.String]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [Swift.String:Swift.String]() - for stringContainer0 in tagsContainer { - tagsBuffer?[stringContainer0.key] = stringContainer0.value - } + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let tagsContainer = try containerValues.decodeIfPresent([Swift.String: Swift.String?].self, forKey: .tags) + var tagsDecoded0: [Swift.String:Swift.String]? = nil + if let tagsContainer = tagsContainer { + tagsDecoded0 = [Swift.String:Swift.String]() + for (key0, tagvalue0) in tagsContainer { + if let tagvalue0 = tagvalue0 { + tagsDecoded0?[key0] = tagvalue0 } - tags = tagsBuffer - } else { - tags = [:] } - } else { - tags = nil } + tags = tagsDecoded0 } } enum ListQueueTagsOutputError: ClientRuntime.HttpResponseErrorBinding { static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InvalidAddress": return try await InvalidAddress(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurity(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.NonExistentQueue": return try await QueueDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "RequestThrottled": return try await RequestThrottled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } } extension ListQueuesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case maxResults = "MaxResults" + case nextToken = "NextToken" + case queueNamePrefix = "QueueNamePrefix" + } + public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) - if let maxResults = maxResults { - try container.encode(maxResults, forKey: ClientRuntime.Key("MaxResults")) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let maxResults = self.maxResults { + try encodeContainer.encode(maxResults, forKey: .maxResults) } - if let nextToken = nextToken { - try container.encode(nextToken, forKey: ClientRuntime.Key("NextToken")) + if let nextToken = self.nextToken { + try encodeContainer.encode(nextToken, forKey: .nextToken) } - if let queueNamePrefix = queueNamePrefix { - try container.encode(queueNamePrefix, forKey: ClientRuntime.Key("QueueNamePrefix")) + if let queueNamePrefix = self.queueNamePrefix { + try encodeContainer.encode(queueNamePrefix, forKey: .queueNamePrefix) } - try container.encode("ListQueues", forKey:ClientRuntime.Key("Action")) - try container.encode("2012-11-05", forKey:ClientRuntime.Key("Version")) } } @@ -2490,104 +3205,87 @@ public struct ListQueuesOutput: Swift.Equatable { } struct ListQueuesOutputBody: Swift.Equatable { - let nextToken: Swift.String? let queueUrls: [Swift.String]? + let nextToken: Swift.String? } extension ListQueuesOutputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { case nextToken = "NextToken" - case queueUrls = "QueueUrl" + case queueUrls = "QueueUrls" } public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ListQueuesResult")) - let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) - nextToken = nextTokenDecoded - if containerValues.contains(.queueUrls) { - let queueUrlsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .queueUrls) - if queueUrlsWrappedContainer != nil { - let queueUrlsContainer = try containerValues.decodeIfPresent([Swift.String].self, forKey: .queueUrls) - var queueUrlsBuffer:[Swift.String]? = nil - if let queueUrlsContainer = queueUrlsContainer { - queueUrlsBuffer = [Swift.String]() - for stringContainer0 in queueUrlsContainer { - queueUrlsBuffer?.append(stringContainer0) - } + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let queueUrlsContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .queueUrls) + var queueUrlsDecoded0:[Swift.String]? = nil + if let queueUrlsContainer = queueUrlsContainer { + queueUrlsDecoded0 = [Swift.String]() + for string0 in queueUrlsContainer { + if let string0 = string0 { + queueUrlsDecoded0?.append(string0) } - queueUrls = queueUrlsBuffer - } else { - queueUrls = [] } - } else { - queueUrls = nil } + queueUrls = queueUrlsDecoded0 + let nextTokenDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .nextToken) + nextToken = nextTokenDecoded } } enum ListQueuesOutputError: ClientRuntime.HttpResponseErrorBinding { static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InvalidAddress": return try await InvalidAddress(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurity(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "RequestThrottled": return try await RequestThrottled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } } extension SQSClientTypes.Message: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { - case attributes = "Attribute" + case attributes = "Attributes" case body = "Body" case md5OfBody = "MD5OfBody" case md5OfMessageAttributes = "MD5OfMessageAttributes" - case messageAttributes = "MessageAttribute" + case messageAttributes = "MessageAttributes" case messageId = "MessageId" case receiptHandle = "ReceiptHandle" } public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) if let attributes = attributes { - if !attributes.isEmpty { - for (index0, element0) in attributes.sorted(by: { $0.key < $1.key }).enumerated() { - let messagesystemattributenameKey0 = element0.key - let stringValue0 = element0.value - var nestedContainer0 = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Attribute.\(index0.advanced(by: 1))")) - var keyContainer0 = nestedContainer0.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Name")) - try keyContainer0.encode(messagesystemattributenameKey0, forKey: ClientRuntime.Key("")) - var valueContainer0 = nestedContainer0.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Value")) - try valueContainer0.encode(stringValue0, forKey: ClientRuntime.Key("")) - } + var attributesContainer = encodeContainer.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: .attributes) + for (dictKey0, messageSystemAttributeMap0) in attributes { + try attributesContainer.encode(messageSystemAttributeMap0, forKey: ClientRuntime.Key(stringValue: dictKey0)) } } - if let body = body { - try container.encode(body, forKey: ClientRuntime.Key("Body")) + if let body = self.body { + try encodeContainer.encode(body, forKey: .body) } - if let md5OfBody = md5OfBody { - try container.encode(md5OfBody, forKey: ClientRuntime.Key("MD5OfBody")) + if let md5OfBody = self.md5OfBody { + try encodeContainer.encode(md5OfBody, forKey: .md5OfBody) } - if let md5OfMessageAttributes = md5OfMessageAttributes { - try container.encode(md5OfMessageAttributes, forKey: ClientRuntime.Key("MD5OfMessageAttributes")) + if let md5OfMessageAttributes = self.md5OfMessageAttributes { + try encodeContainer.encode(md5OfMessageAttributes, forKey: .md5OfMessageAttributes) } if let messageAttributes = messageAttributes { - if !messageAttributes.isEmpty { - for (index0, element0) in messageAttributes.sorted(by: { $0.key < $1.key }).enumerated() { - let stringKey0 = element0.key - let messageattributevalueValue0 = element0.value - var nestedContainer0 = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("MessageAttribute.\(index0.advanced(by: 1))")) - var keyContainer0 = nestedContainer0.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Name")) - try keyContainer0.encode(stringKey0, forKey: ClientRuntime.Key("")) - var valueContainer0 = nestedContainer0.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Value")) - try valueContainer0.encode(messageattributevalueValue0, forKey: ClientRuntime.Key("")) - } + var messageAttributesContainer = encodeContainer.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: .messageAttributes) + for (dictKey0, messageBodyAttributeMap0) in messageAttributes { + try messageAttributesContainer.encode(messageBodyAttributeMap0, forKey: ClientRuntime.Key(stringValue: dictKey0)) } } - if let messageId = messageId { - try container.encode(messageId, forKey: ClientRuntime.Key("MessageId")) + if let messageId = self.messageId { + try encodeContainer.encode(messageId, forKey: .messageId) } - if let receiptHandle = receiptHandle { - try container.encode(receiptHandle, forKey: ClientRuntime.Key("ReceiptHandle")) + if let receiptHandle = self.receiptHandle { + try encodeContainer.encode(receiptHandle, forKey: .receiptHandle) } } @@ -2601,46 +3299,30 @@ extension SQSClientTypes.Message: Swift.Codable { md5OfBody = md5OfBodyDecoded let bodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .body) body = bodyDecoded - if containerValues.contains(.attributes) { - struct KeyVal0{struct Name{}; struct Value{}} - let attributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .attributes) - if attributesWrappedContainer != nil { - let attributesContainer = try containerValues.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .attributes) - var attributesBuffer: [Swift.String:Swift.String]? = nil - if let attributesContainer = attributesContainer { - attributesBuffer = [Swift.String:Swift.String]() - for stringContainer0 in attributesContainer { - attributesBuffer?[stringContainer0.key] = stringContainer0.value - } + let attributesContainer = try containerValues.decodeIfPresent([Swift.String: Swift.String?].self, forKey: .attributes) + var attributesDecoded0: [Swift.String:Swift.String]? = nil + if let attributesContainer = attributesContainer { + attributesDecoded0 = [Swift.String:Swift.String]() + for (key0, string0) in attributesContainer { + if let string0 = string0 { + attributesDecoded0?[key0] = string0 } - attributes = attributesBuffer - } else { - attributes = [:] } - } else { - attributes = nil } + attributes = attributesDecoded0 let md5OfMessageAttributesDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .md5OfMessageAttributes) md5OfMessageAttributes = md5OfMessageAttributesDecoded - if containerValues.contains(.messageAttributes) { - struct KeyVal0{struct Name{}; struct Value{}} - let messageAttributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .messageAttributes) - if messageAttributesWrappedContainer != nil { - let messageAttributesContainer = try containerValues.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .messageAttributes) - var messageAttributesBuffer: [Swift.String:SQSClientTypes.MessageAttributeValue]? = nil - if let messageAttributesContainer = messageAttributesContainer { - messageAttributesBuffer = [Swift.String:SQSClientTypes.MessageAttributeValue]() - for structureContainer0 in messageAttributesContainer { - messageAttributesBuffer?[structureContainer0.key] = structureContainer0.value - } + let messageAttributesContainer = try containerValues.decodeIfPresent([Swift.String: SQSClientTypes.MessageAttributeValue?].self, forKey: .messageAttributes) + var messageAttributesDecoded0: [Swift.String:SQSClientTypes.MessageAttributeValue]? = nil + if let messageAttributesContainer = messageAttributesContainer { + messageAttributesDecoded0 = [Swift.String:SQSClientTypes.MessageAttributeValue]() + for (key0, messageattributevalue0) in messageAttributesContainer { + if let messageattributevalue0 = messageattributevalue0 { + messageAttributesDecoded0?[key0] = messageattributevalue0 } - messageAttributes = messageAttributesBuffer - } else { - messageAttributes = [:] } - } else { - messageAttributes = nil } + messageAttributes = messageAttributesDecoded0 } } @@ -2703,46 +3385,35 @@ extension SQSClientTypes { extension SQSClientTypes.MessageAttributeValue: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { - case binaryListValues = "BinaryListValue" + case binaryListValues = "BinaryListValues" case binaryValue = "BinaryValue" case dataType = "DataType" - case stringListValues = "StringListValue" + case stringListValues = "StringListValues" case stringValue = "StringValue" } public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) if let binaryListValues = binaryListValues { - if !binaryListValues.isEmpty { - for (index0, binary0) in binaryListValues.enumerated() { - try container.encode(binary0.base64EncodedString(), forKey: ClientRuntime.Key("BinaryListValue.\(index0.advanced(by: 1))")) - } - } - else { - var binaryListValuesContainer = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("BinaryListValue")) - try binaryListValuesContainer.encode("", forKey: ClientRuntime.Key("")) + var binaryListValuesContainer = encodeContainer.nestedUnkeyedContainer(forKey: .binaryListValues) + for binary0 in binaryListValues { + try binaryListValuesContainer.encode(binary0.base64EncodedString()) } } - if let binaryValue = binaryValue { - try container.encode(binaryValue.base64EncodedString(), forKey: ClientRuntime.Key("BinaryValue")) + if let binaryValue = self.binaryValue { + try encodeContainer.encode(binaryValue.base64EncodedString(), forKey: .binaryValue) } - if let dataType = dataType { - try container.encode(dataType, forKey: ClientRuntime.Key("DataType")) + if let dataType = self.dataType { + try encodeContainer.encode(dataType, forKey: .dataType) } if let stringListValues = stringListValues { - if !stringListValues.isEmpty { - for (index0, string0) in stringListValues.enumerated() { - var stringListValuesContainer0 = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("StringListValue.\(index0.advanced(by: 1))")) - try stringListValuesContainer0.encode(string0, forKey: ClientRuntime.Key("")) - } - } - else { - var stringListValuesContainer = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("StringListValue")) - try stringListValuesContainer.encode("", forKey: ClientRuntime.Key("")) + var stringListValuesContainer = encodeContainer.nestedUnkeyedContainer(forKey: .stringListValues) + for string0 in stringListValues { + try stringListValuesContainer.encode(string0) } } - if let stringValue = stringValue { - try container.encode(stringValue, forKey: ClientRuntime.Key("StringValue")) + if let stringValue = self.stringValue { + try encodeContainer.encode(stringValue, forKey: .stringValue) } } @@ -2750,52 +3421,30 @@ extension SQSClientTypes.MessageAttributeValue: Swift.Codable { let containerValues = try decoder.container(keyedBy: CodingKeys.self) let stringValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stringValue) stringValue = stringValueDecoded - if containerValues.contains(.binaryValue) { - do { - let binaryValueDecoded = try containerValues.decodeIfPresent(ClientRuntime.Data.self, forKey: .binaryValue) - binaryValue = binaryValueDecoded - } catch { - binaryValue = "".data(using: .utf8) - } - } else { - binaryValue = nil - } - if containerValues.contains(.stringListValues) { - let stringListValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .stringListValues) - if stringListValuesWrappedContainer != nil { - let stringListValuesContainer = try containerValues.decodeIfPresent([Swift.String].self, forKey: .stringListValues) - var stringListValuesBuffer:[Swift.String]? = nil - if let stringListValuesContainer = stringListValuesContainer { - stringListValuesBuffer = [Swift.String]() - for stringContainer0 in stringListValuesContainer { - stringListValuesBuffer?.append(stringContainer0) - } + let binaryValueDecoded = try containerValues.decodeIfPresent(ClientRuntime.Data.self, forKey: .binaryValue) + binaryValue = binaryValueDecoded + let stringListValuesContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .stringListValues) + var stringListValuesDecoded0:[Swift.String]? = nil + if let stringListValuesContainer = stringListValuesContainer { + stringListValuesDecoded0 = [Swift.String]() + for string0 in stringListValuesContainer { + if let string0 = string0 { + stringListValuesDecoded0?.append(string0) } - stringListValues = stringListValuesBuffer - } else { - stringListValues = [] } - } else { - stringListValues = nil - } - if containerValues.contains(.binaryListValues) { - let binaryListValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .binaryListValues) - if binaryListValuesWrappedContainer != nil { - let binaryListValuesContainer = try containerValues.decodeIfPresent([ClientRuntime.Data].self, forKey: .binaryListValues) - var binaryListValuesBuffer:[ClientRuntime.Data]? = nil - if let binaryListValuesContainer = binaryListValuesContainer { - binaryListValuesBuffer = [ClientRuntime.Data]() - for blobContainer0 in binaryListValuesContainer { - binaryListValuesBuffer?.append(blobContainer0) - } + } + stringListValues = stringListValuesDecoded0 + let binaryListValuesContainer = try containerValues.decodeIfPresent([ClientRuntime.Data?].self, forKey: .binaryListValues) + var binaryListValuesDecoded0:[ClientRuntime.Data]? = nil + if let binaryListValuesContainer = binaryListValuesContainer { + binaryListValuesDecoded0 = [ClientRuntime.Data]() + for blob0 in binaryListValuesContainer { + if let blob0 = blob0 { + binaryListValuesDecoded0?.append(blob0) } - binaryListValues = binaryListValuesBuffer - } else { - binaryListValues = [] } - } else { - binaryListValues = nil } + binaryListValues = binaryListValuesDecoded0 let dataTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dataType) dataType = dataTypeDecoded } @@ -2939,46 +3588,35 @@ extension SQSClientTypes { extension SQSClientTypes.MessageSystemAttributeValue: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { - case binaryListValues = "BinaryListValue" + case binaryListValues = "BinaryListValues" case binaryValue = "BinaryValue" case dataType = "DataType" - case stringListValues = "StringListValue" + case stringListValues = "StringListValues" case stringValue = "StringValue" } public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) if let binaryListValues = binaryListValues { - if !binaryListValues.isEmpty { - for (index0, binary0) in binaryListValues.enumerated() { - try container.encode(binary0.base64EncodedString(), forKey: ClientRuntime.Key("BinaryListValue.\(index0.advanced(by: 1))")) - } - } - else { - var binaryListValuesContainer = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("BinaryListValue")) - try binaryListValuesContainer.encode("", forKey: ClientRuntime.Key("")) + var binaryListValuesContainer = encodeContainer.nestedUnkeyedContainer(forKey: .binaryListValues) + for binary0 in binaryListValues { + try binaryListValuesContainer.encode(binary0.base64EncodedString()) } } - if let binaryValue = binaryValue { - try container.encode(binaryValue.base64EncodedString(), forKey: ClientRuntime.Key("BinaryValue")) + if let binaryValue = self.binaryValue { + try encodeContainer.encode(binaryValue.base64EncodedString(), forKey: .binaryValue) } - if let dataType = dataType { - try container.encode(dataType, forKey: ClientRuntime.Key("DataType")) + if let dataType = self.dataType { + try encodeContainer.encode(dataType, forKey: .dataType) } if let stringListValues = stringListValues { - if !stringListValues.isEmpty { - for (index0, string0) in stringListValues.enumerated() { - var stringListValuesContainer0 = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("StringListValue.\(index0.advanced(by: 1))")) - try stringListValuesContainer0.encode(string0, forKey: ClientRuntime.Key("")) - } - } - else { - var stringListValuesContainer = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("StringListValue")) - try stringListValuesContainer.encode("", forKey: ClientRuntime.Key("")) + var stringListValuesContainer = encodeContainer.nestedUnkeyedContainer(forKey: .stringListValues) + for string0 in stringListValues { + try stringListValuesContainer.encode(string0) } } - if let stringValue = stringValue { - try container.encode(stringValue, forKey: ClientRuntime.Key("StringValue")) + if let stringValue = self.stringValue { + try encodeContainer.encode(stringValue, forKey: .stringValue) } } @@ -2986,52 +3624,30 @@ extension SQSClientTypes.MessageSystemAttributeValue: Swift.Codable { let containerValues = try decoder.container(keyedBy: CodingKeys.self) let stringValueDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .stringValue) stringValue = stringValueDecoded - if containerValues.contains(.binaryValue) { - do { - let binaryValueDecoded = try containerValues.decodeIfPresent(ClientRuntime.Data.self, forKey: .binaryValue) - binaryValue = binaryValueDecoded - } catch { - binaryValue = "".data(using: .utf8) - } - } else { - binaryValue = nil - } - if containerValues.contains(.stringListValues) { - let stringListValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .stringListValues) - if stringListValuesWrappedContainer != nil { - let stringListValuesContainer = try containerValues.decodeIfPresent([Swift.String].self, forKey: .stringListValues) - var stringListValuesBuffer:[Swift.String]? = nil - if let stringListValuesContainer = stringListValuesContainer { - stringListValuesBuffer = [Swift.String]() - for stringContainer0 in stringListValuesContainer { - stringListValuesBuffer?.append(stringContainer0) - } + let binaryValueDecoded = try containerValues.decodeIfPresent(ClientRuntime.Data.self, forKey: .binaryValue) + binaryValue = binaryValueDecoded + let stringListValuesContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .stringListValues) + var stringListValuesDecoded0:[Swift.String]? = nil + if let stringListValuesContainer = stringListValuesContainer { + stringListValuesDecoded0 = [Swift.String]() + for string0 in stringListValuesContainer { + if let string0 = string0 { + stringListValuesDecoded0?.append(string0) } - stringListValues = stringListValuesBuffer - } else { - stringListValues = [] } - } else { - stringListValues = nil - } - if containerValues.contains(.binaryListValues) { - let binaryListValuesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .binaryListValues) - if binaryListValuesWrappedContainer != nil { - let binaryListValuesContainer = try containerValues.decodeIfPresent([ClientRuntime.Data].self, forKey: .binaryListValues) - var binaryListValuesBuffer:[ClientRuntime.Data]? = nil - if let binaryListValuesContainer = binaryListValuesContainer { - binaryListValuesBuffer = [ClientRuntime.Data]() - for blobContainer0 in binaryListValuesContainer { - binaryListValuesBuffer?.append(blobContainer0) - } + } + stringListValues = stringListValuesDecoded0 + let binaryListValuesContainer = try containerValues.decodeIfPresent([ClientRuntime.Data?].self, forKey: .binaryListValues) + var binaryListValuesDecoded0:[ClientRuntime.Data]? = nil + if let binaryListValuesContainer = binaryListValuesContainer { + binaryListValuesDecoded0 = [ClientRuntime.Data]() + for blob0 in binaryListValuesContainer { + if let blob0 = blob0 { + binaryListValuesDecoded0?.append(blob0) } - binaryListValues = binaryListValuesBuffer - } else { - binaryListValues = [] } - } else { - binaryListValues = nil } + binaryListValues = binaryListValuesDecoded0 let dataTypeDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .dataType) dataType = dataTypeDecoded } @@ -3072,6 +3688,13 @@ extension SQSClientTypes { extension OverLimit { public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: OverLimitBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } self.httpResponse = httpResponse self.requestID = requestID self.message = message @@ -3080,6 +3703,12 @@ extension OverLimit { /// 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. public struct OverLimit: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() public static var typeName: Swift.String { "OverLimit" } public static var fault: ErrorFault { .client } public static var isRetryable: Swift.Bool { false } @@ -3088,11 +3717,39 @@ public struct OverLimit: ClientRuntime.ModeledError, AWSClientRuntime.AWSService public internal(set) var message: Swift.String? public internal(set) var requestID: Swift.String? - public init() { } + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct OverLimitBody: Swift.Equatable { + let message: Swift.String? +} + +extension OverLimitBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } } extension PurgeQueueInProgress { public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: PurgeQueueInProgressBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } self.httpResponse = httpResponse self.requestID = requestID self.message = message @@ -3101,6 +3758,12 @@ extension PurgeQueueInProgress { /// 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 queue). public struct PurgeQueueInProgress: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() public static var typeName: Swift.String { "AWS.SimpleQueueService.PurgeQueueInProgress" } public static var fault: ErrorFault { .client } public static var isRetryable: Swift.Bool { false } @@ -3109,17 +3772,40 @@ public struct PurgeQueueInProgress: ClientRuntime.ModeledError, AWSClientRuntime public internal(set) var message: Swift.String? public internal(set) var requestID: Swift.String? - public init() { } + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct PurgeQueueInProgressBody: Swift.Equatable { + let message: Swift.String? +} + +extension PurgeQueueInProgressBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } } extension PurgeQueueInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case queueUrl = "QueueUrl" + } + public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) - if let queueUrl = queueUrl { - try container.encode(queueUrl, forKey: ClientRuntime.Key("QueueUrl")) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let queueUrl = self.queueUrl { + try encodeContainer.encode(queueUrl, forKey: .queueUrl) } - try container.encode("PurgeQueue", forKey:ClientRuntime.Key("Action")) - try container.encode("2012-11-05", forKey:ClientRuntime.Key("Version")) } } @@ -3171,11 +3857,16 @@ public struct PurgeQueueOutput: Swift.Equatable { enum PurgeQueueOutputError: ClientRuntime.HttpResponseErrorBinding { static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AWS.SimpleQueueService.PurgeQueueInProgress": return try await PurgeQueueInProgress(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "AWS.SimpleQueueService.NonExistentQueue": return try await QueueDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InvalidAddress": return try await InvalidAddress(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurity(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.PurgeQueueInProgress": return try await PurgeQueueInProgress(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.NonExistentQueue": return try await QueueDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "RequestThrottled": return try await RequestThrottled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } } @@ -3274,6 +3965,13 @@ extension SQSClientTypes { extension QueueDeletedRecently { public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: QueueDeletedRecentlyBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } self.httpResponse = httpResponse self.requestID = requestID self.message = message @@ -3282,6 +3980,12 @@ extension QueueDeletedRecently { /// You must wait 60 seconds after deleting a queue before you can create another queue with the same name. public struct QueueDeletedRecently: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() public static var typeName: Swift.String { "AWS.SimpleQueueService.QueueDeletedRecently" } public static var fault: ErrorFault { .client } public static var isRetryable: Swift.Bool { false } @@ -3290,11 +3994,39 @@ public struct QueueDeletedRecently: ClientRuntime.ModeledError, AWSClientRuntime public internal(set) var message: Swift.String? public internal(set) var requestID: Swift.String? - public init() { } + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct QueueDeletedRecentlyBody: Swift.Equatable { + let message: Swift.String? +} + +extension QueueDeletedRecentlyBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } } extension QueueDoesNotExist { public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: QueueDoesNotExistBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } self.httpResponse = httpResponse self.requestID = requestID self.message = message @@ -3303,6 +4035,12 @@ extension QueueDoesNotExist { /// The specified queue doesn't exist. public struct QueueDoesNotExist: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() public static var typeName: Swift.String { "AWS.SimpleQueueService.NonExistentQueue" } public static var fault: ErrorFault { .client } public static var isRetryable: Swift.Bool { false } @@ -3311,11 +4049,39 @@ public struct QueueDoesNotExist: ClientRuntime.ModeledError, AWSClientRuntime.AW public internal(set) var message: Swift.String? public internal(set) var requestID: Swift.String? - public init() { } + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct QueueDoesNotExistBody: Swift.Equatable { + let message: Swift.String? +} + +extension QueueDoesNotExistBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } } extension QueueNameExists { public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: QueueNameExistsBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } self.httpResponse = httpResponse self.requestID = requestID self.message = message @@ -3324,6 +4090,12 @@ extension QueueNameExists { /// 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. public struct QueueNameExists: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() public static var typeName: Swift.String { "QueueAlreadyExists" } public static var fault: ErrorFault { .client } public static var isRetryable: Swift.Bool { false } @@ -3332,11 +4104,39 @@ public struct QueueNameExists: ClientRuntime.ModeledError, AWSClientRuntime.AWSS public internal(set) var message: Swift.String? public internal(set) var requestID: Swift.String? - public init() { } + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct QueueNameExistsBody: Swift.Equatable { + let message: Swift.String? +} + +extension QueueNameExistsBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } } extension ReceiptHandleIsInvalid { public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: ReceiptHandleIsInvalidBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } self.httpResponse = httpResponse self.requestID = requestID self.message = message @@ -3345,6 +4145,12 @@ extension ReceiptHandleIsInvalid { /// The specified receipt handle isn't valid. public struct ReceiptHandleIsInvalid: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() public static var typeName: Swift.String { "ReceiptHandleIsInvalid" } public static var fault: ErrorFault { .client } public static var isRetryable: Swift.Bool { false } @@ -3353,53 +4159,70 @@ public struct ReceiptHandleIsInvalid: ClientRuntime.ModeledError, AWSClientRunti public internal(set) var message: Swift.String? public internal(set) var requestID: Swift.String? - public init() { } + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct ReceiptHandleIsInvalidBody: Swift.Equatable { + let message: Swift.String? +} + +extension ReceiptHandleIsInvalidBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } } extension ReceiveMessageInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case attributeNames = "AttributeNames" + case maxNumberOfMessages = "MaxNumberOfMessages" + case messageAttributeNames = "MessageAttributeNames" + case queueUrl = "QueueUrl" + case receiveRequestAttemptId = "ReceiveRequestAttemptId" + case visibilityTimeout = "VisibilityTimeout" + case waitTimeSeconds = "WaitTimeSeconds" + } + public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) if let attributeNames = attributeNames { - if !attributeNames.isEmpty { - for (index0, queueattributename0) in attributeNames.enumerated() { - var attributeNamesContainer0 = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("AttributeName.\(index0.advanced(by: 1))")) - try attributeNamesContainer0.encode(queueattributename0, forKey: ClientRuntime.Key("")) - } - } - else { - var attributeNamesContainer = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("AttributeName")) - try attributeNamesContainer.encode("", forKey: ClientRuntime.Key("")) + var attributeNamesContainer = encodeContainer.nestedUnkeyedContainer(forKey: .attributeNames) + for queueattributename0 in attributeNames { + try attributeNamesContainer.encode(queueattributename0.rawValue) } } - if let maxNumberOfMessages = maxNumberOfMessages { - try container.encode(maxNumberOfMessages, forKey: ClientRuntime.Key("MaxNumberOfMessages")) + if let maxNumberOfMessages = self.maxNumberOfMessages { + try encodeContainer.encode(maxNumberOfMessages, forKey: .maxNumberOfMessages) } if let messageAttributeNames = messageAttributeNames { - if !messageAttributeNames.isEmpty { - for (index0, messageattributename0) in messageAttributeNames.enumerated() { - var messageAttributeNamesContainer0 = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("MessageAttributeName.\(index0.advanced(by: 1))")) - try messageAttributeNamesContainer0.encode(messageattributename0, forKey: ClientRuntime.Key("")) - } - } - else { - var messageAttributeNamesContainer = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("MessageAttributeName")) - try messageAttributeNamesContainer.encode("", forKey: ClientRuntime.Key("")) + var messageAttributeNamesContainer = encodeContainer.nestedUnkeyedContainer(forKey: .messageAttributeNames) + for messageattributename0 in messageAttributeNames { + try messageAttributeNamesContainer.encode(messageattributename0) } } - if let queueUrl = queueUrl { - try container.encode(queueUrl, forKey: ClientRuntime.Key("QueueUrl")) + if let queueUrl = self.queueUrl { + try encodeContainer.encode(queueUrl, forKey: .queueUrl) } - if let receiveRequestAttemptId = receiveRequestAttemptId { - try container.encode(receiveRequestAttemptId, forKey: ClientRuntime.Key("ReceiveRequestAttemptId")) + if let receiveRequestAttemptId = self.receiveRequestAttemptId { + try encodeContainer.encode(receiveRequestAttemptId, forKey: .receiveRequestAttemptId) } - if let visibilityTimeout = visibilityTimeout { - try container.encode(visibilityTimeout, forKey: ClientRuntime.Key("VisibilityTimeout")) + if let visibilityTimeout = self.visibilityTimeout { + try encodeContainer.encode(visibilityTimeout, forKey: .visibilityTimeout) } - if let waitTimeSeconds = waitTimeSeconds { - try container.encode(waitTimeSeconds, forKey: ClientRuntime.Key("WaitTimeSeconds")) + if let waitTimeSeconds = self.waitTimeSeconds { + try encodeContainer.encode(waitTimeSeconds, forKey: .waitTimeSeconds) } - try container.encode("ReceiveMessage", forKey:ClientRuntime.Key("Action")) - try container.encode("2012-11-05", forKey:ClientRuntime.Key("Version")) } } @@ -3516,9 +4339,9 @@ struct ReceiveMessageInputBody: Swift.Equatable { extension ReceiveMessageInputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case attributeNames = "AttributeName" + case attributeNames = "AttributeNames" case maxNumberOfMessages = "MaxNumberOfMessages" - case messageAttributeNames = "MessageAttributeName" + case messageAttributeNames = "MessageAttributeNames" case queueUrl = "QueueUrl" case receiveRequestAttemptId = "ReceiveRequestAttemptId" case visibilityTimeout = "VisibilityTimeout" @@ -3529,47 +4352,33 @@ extension ReceiveMessageInputBody: Swift.Decodable { let containerValues = try decoder.container(keyedBy: CodingKeys.self) let queueUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .queueUrl) queueUrl = queueUrlDecoded - if containerValues.contains(.attributeNames) { - let attributeNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .attributeNames) - if attributeNamesWrappedContainer != nil { - let attributeNamesContainer = try containerValues.decodeIfPresent([SQSClientTypes.QueueAttributeName].self, forKey: .attributeNames) - var attributeNamesBuffer:[SQSClientTypes.QueueAttributeName]? = nil - if let attributeNamesContainer = attributeNamesContainer { - attributeNamesBuffer = [SQSClientTypes.QueueAttributeName]() - for enumContainer0 in attributeNamesContainer { - attributeNamesBuffer?.append(enumContainer0) - } + let attributeNamesContainer = try containerValues.decodeIfPresent([SQSClientTypes.QueueAttributeName?].self, forKey: .attributeNames) + var attributeNamesDecoded0:[SQSClientTypes.QueueAttributeName]? = nil + if let attributeNamesContainer = attributeNamesContainer { + attributeNamesDecoded0 = [SQSClientTypes.QueueAttributeName]() + for enum0 in attributeNamesContainer { + if let enum0 = enum0 { + attributeNamesDecoded0?.append(enum0) } - attributeNames = attributeNamesBuffer - } else { - attributeNames = [] } - } else { - attributeNames = nil - } - if containerValues.contains(.messageAttributeNames) { - let messageAttributeNamesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .messageAttributeNames) - if messageAttributeNamesWrappedContainer != nil { - let messageAttributeNamesContainer = try containerValues.decodeIfPresent([Swift.String].self, forKey: .messageAttributeNames) - var messageAttributeNamesBuffer:[Swift.String]? = nil - if let messageAttributeNamesContainer = messageAttributeNamesContainer { - messageAttributeNamesBuffer = [Swift.String]() - for stringContainer0 in messageAttributeNamesContainer { - messageAttributeNamesBuffer?.append(stringContainer0) - } + } + attributeNames = attributeNamesDecoded0 + let messageAttributeNamesContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .messageAttributeNames) + var messageAttributeNamesDecoded0:[Swift.String]? = nil + if let messageAttributeNamesContainer = messageAttributeNamesContainer { + messageAttributeNamesDecoded0 = [Swift.String]() + for string0 in messageAttributeNamesContainer { + if let string0 = string0 { + messageAttributeNamesDecoded0?.append(string0) } - messageAttributeNames = messageAttributeNamesBuffer - } else { - messageAttributeNames = [] } - } else { - messageAttributeNames = nil } - let maxNumberOfMessagesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxNumberOfMessages) ?? 0 + messageAttributeNames = messageAttributeNamesDecoded0 + let maxNumberOfMessagesDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxNumberOfMessages) maxNumberOfMessages = maxNumberOfMessagesDecoded - let visibilityTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .visibilityTimeout) ?? 0 + let visibilityTimeoutDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .visibilityTimeout) visibilityTimeout = visibilityTimeoutDecoded - let waitTimeSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .waitTimeSeconds) ?? 0 + let waitTimeSecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .waitTimeSeconds) waitTimeSeconds = waitTimeSecondsDecoded let receiveRequestAttemptIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .receiveRequestAttemptId) receiveRequestAttemptId = receiveRequestAttemptIdDecoded @@ -3607,54 +4416,62 @@ struct ReceiveMessageOutputBody: Swift.Equatable { extension ReceiveMessageOutputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case messages = "Message" + case messages = "Messages" } public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("ReceiveMessageResult")) - if containerValues.contains(.messages) { - let messagesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .messages) - if messagesWrappedContainer != nil { - let messagesContainer = try containerValues.decodeIfPresent([SQSClientTypes.Message].self, forKey: .messages) - var messagesBuffer:[SQSClientTypes.Message]? = nil - if let messagesContainer = messagesContainer { - messagesBuffer = [SQSClientTypes.Message]() - for structureContainer0 in messagesContainer { - messagesBuffer?.append(structureContainer0) - } + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messagesContainer = try containerValues.decodeIfPresent([SQSClientTypes.Message?].self, forKey: .messages) + var messagesDecoded0:[SQSClientTypes.Message]? = nil + if let messagesContainer = messagesContainer { + messagesDecoded0 = [SQSClientTypes.Message]() + for structure0 in messagesContainer { + if let structure0 = structure0 { + messagesDecoded0?.append(structure0) } - messages = messagesBuffer - } else { - messages = [] } - } else { - messages = nil } + messages = messagesDecoded0 } } enum ReceiveMessageOutputError: ClientRuntime.HttpResponseErrorBinding { static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "OverLimit": return try await OverLimit(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InvalidAddress": return try await InvalidAddress(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurity(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "KMS.AccessDeniedException": return try await KmsAccessDenied(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "KMS.DisabledException": return try await KmsDisabled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "KMS.InvalidKeyUsageException": return try await KmsInvalidKeyUsage(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "KMS.InvalidStateException": return try await KmsInvalidState(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "KMS.NotFoundException": return try await KmsNotFound(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "KMS.OptInRequired": return try await KmsOptInRequired(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "KMS.ThrottlingException": return try await KmsThrottled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "OverLimit": return try await OverLimit(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.NonExistentQueue": return try await QueueDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "RequestThrottled": return try await RequestThrottled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } } extension RemovePermissionInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case label = "Label" + case queueUrl = "QueueUrl" + } + public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) - if let label = label { - try container.encode(label, forKey: ClientRuntime.Key("Label")) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let label = self.label { + try encodeContainer.encode(label, forKey: .label) } - if let queueUrl = queueUrl { - try container.encode(queueUrl, forKey: ClientRuntime.Key("QueueUrl")) + if let queueUrl = self.queueUrl { + try encodeContainer.encode(queueUrl, forKey: .queueUrl) } - try container.encode("RemovePermission", forKey:ClientRuntime.Key("Action")) - try container.encode("2012-11-05", forKey:ClientRuntime.Key("Version")) } } @@ -3715,15 +4532,89 @@ public struct RemovePermissionOutput: Swift.Equatable { enum RemovePermissionOutputError: ClientRuntime.HttpResponseErrorBinding { static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InvalidAddress": return try await InvalidAddress(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurity(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.NonExistentQueue": return try await QueueDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "RequestThrottled": return try await RequestThrottled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) + } + } +} + +extension RequestThrottled { + public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: RequestThrottledBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil } + self.httpResponse = httpResponse + self.requestID = requestID + self.message = message + } +} + +/// 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. +public struct RequestThrottled: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "RequestThrottled" } + public static var fault: ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = HttpResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct RequestThrottledBody: Swift.Equatable { + let message: Swift.String? +} + +extension RequestThrottledBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded } } extension ResourceNotFoundException { public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: ResourceNotFoundExceptionBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } self.httpResponse = httpResponse self.requestID = requestID self.message = message @@ -3732,6 +4623,12 @@ extension ResourceNotFoundException { /// One or more specified resources don't exist. public struct ResourceNotFoundException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() public static var typeName: Swift.String { "ResourceNotFoundException" } public static var fault: ErrorFault { .client } public static var isRetryable: Swift.Bool { false } @@ -3740,29 +4637,47 @@ public struct ResourceNotFoundException: ClientRuntime.ModeledError, AWSClientRu public internal(set) var message: Swift.String? public internal(set) var requestID: Swift.String? - public init() { } + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct ResourceNotFoundExceptionBody: Swift.Equatable { + let message: Swift.String? +} + +extension ResourceNotFoundExceptionBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } } extension SendMessageBatchInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case entries = "Entries" + case queueUrl = "QueueUrl" + } + public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) if let entries = entries { - if !entries.isEmpty { - for (index0, sendmessagebatchrequestentry0) in entries.enumerated() { - var entriesContainer0 = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("SendMessageBatchRequestEntry.\(index0.advanced(by: 1))")) - try entriesContainer0.encode(sendmessagebatchrequestentry0, forKey: ClientRuntime.Key("")) - } - } - else { - var entriesContainer = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("SendMessageBatchRequestEntry")) - try entriesContainer.encode("", forKey: ClientRuntime.Key("")) + var entriesContainer = encodeContainer.nestedUnkeyedContainer(forKey: .entries) + for sendmessagebatchrequestentry0 in entries { + try entriesContainer.encode(sendmessagebatchrequestentry0) } } - if let queueUrl = queueUrl { - try container.encode(queueUrl, forKey: ClientRuntime.Key("QueueUrl")) + if let queueUrl = self.queueUrl { + try encodeContainer.encode(queueUrl, forKey: .queueUrl) } - try container.encode("SendMessageBatch", forKey:ClientRuntime.Key("Action")) - try container.encode("2012-11-05", forKey:ClientRuntime.Key("Version")) } } @@ -3798,7 +4713,7 @@ struct SendMessageBatchInputBody: Swift.Equatable { extension SendMessageBatchInputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case entries = "SendMessageBatchRequestEntry" + case entries = "Entries" case queueUrl = "QueueUrl" } @@ -3806,24 +4721,17 @@ extension SendMessageBatchInputBody: Swift.Decodable { let containerValues = try decoder.container(keyedBy: CodingKeys.self) let queueUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .queueUrl) queueUrl = queueUrlDecoded - if containerValues.contains(.entries) { - let entriesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .entries) - if entriesWrappedContainer != nil { - let entriesContainer = try containerValues.decodeIfPresent([SQSClientTypes.SendMessageBatchRequestEntry].self, forKey: .entries) - var entriesBuffer:[SQSClientTypes.SendMessageBatchRequestEntry]? = nil - if let entriesContainer = entriesContainer { - entriesBuffer = [SQSClientTypes.SendMessageBatchRequestEntry]() - for structureContainer0 in entriesContainer { - entriesBuffer?.append(structureContainer0) - } + let entriesContainer = try containerValues.decodeIfPresent([SQSClientTypes.SendMessageBatchRequestEntry?].self, forKey: .entries) + var entriesDecoded0:[SQSClientTypes.SendMessageBatchRequestEntry]? = nil + if let entriesContainer = entriesContainer { + entriesDecoded0 = [SQSClientTypes.SendMessageBatchRequestEntry]() + for structure0 in entriesContainer { + if let structure0 = structure0 { + entriesDecoded0?.append(structure0) } - entries = entriesBuffer - } else { - entries = [] } - } else { - entries = nil } + entries = entriesDecoded0 } } @@ -3867,63 +4775,60 @@ struct SendMessageBatchOutputBody: Swift.Equatable { extension SendMessageBatchOutputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case failed = "BatchResultErrorEntry" - case successful = "SendMessageBatchResultEntry" + case failed = "Failed" + case successful = "Successful" } public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("SendMessageBatchResult")) - if containerValues.contains(.successful) { - let successfulWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .successful) - if successfulWrappedContainer != nil { - let successfulContainer = try containerValues.decodeIfPresent([SQSClientTypes.SendMessageBatchResultEntry].self, forKey: .successful) - var successfulBuffer:[SQSClientTypes.SendMessageBatchResultEntry]? = nil - if let successfulContainer = successfulContainer { - successfulBuffer = [SQSClientTypes.SendMessageBatchResultEntry]() - for structureContainer0 in successfulContainer { - successfulBuffer?.append(structureContainer0) - } + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let successfulContainer = try containerValues.decodeIfPresent([SQSClientTypes.SendMessageBatchResultEntry?].self, forKey: .successful) + var successfulDecoded0:[SQSClientTypes.SendMessageBatchResultEntry]? = nil + if let successfulContainer = successfulContainer { + successfulDecoded0 = [SQSClientTypes.SendMessageBatchResultEntry]() + for structure0 in successfulContainer { + if let structure0 = structure0 { + successfulDecoded0?.append(structure0) } - successful = successfulBuffer - } else { - successful = [] } - } else { - successful = nil - } - if containerValues.contains(.failed) { - let failedWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .failed) - if failedWrappedContainer != nil { - let failedContainer = try containerValues.decodeIfPresent([SQSClientTypes.BatchResultErrorEntry].self, forKey: .failed) - var failedBuffer:[SQSClientTypes.BatchResultErrorEntry]? = nil - if let failedContainer = failedContainer { - failedBuffer = [SQSClientTypes.BatchResultErrorEntry]() - for structureContainer0 in failedContainer { - failedBuffer?.append(structureContainer0) - } + } + successful = successfulDecoded0 + let failedContainer = try containerValues.decodeIfPresent([SQSClientTypes.BatchResultErrorEntry?].self, forKey: .failed) + var failedDecoded0:[SQSClientTypes.BatchResultErrorEntry]? = nil + if let failedContainer = failedContainer { + failedDecoded0 = [SQSClientTypes.BatchResultErrorEntry]() + for structure0 in failedContainer { + if let structure0 = structure0 { + failedDecoded0?.append(structure0) } - failed = failedBuffer - } else { - failed = [] } - } else { - failed = nil } + failed = failedDecoded0 } } enum SendMessageBatchOutputError: ClientRuntime.HttpResponseErrorBinding { static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "AWS.SimpleQueueService.BatchEntryIdsNotDistinct": return try await BatchEntryIdsNotDistinct(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "AWS.SimpleQueueService.BatchRequestTooLong": return try await BatchRequestTooLong(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "AWS.SimpleQueueService.EmptyBatchRequest": return try await EmptyBatchRequest(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "AWS.SimpleQueueService.InvalidBatchEntryId": return try await InvalidBatchEntryId(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "AWS.SimpleQueueService.TooManyEntriesInBatchRequest": return try await TooManyEntriesInBatchRequest(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "AWS.SimpleQueueService.UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "AWS.SimpleQueueService.BatchEntryIdsNotDistinct": return try await BatchEntryIdsNotDistinct(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.BatchRequestTooLong": return try await BatchRequestTooLong(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.EmptyBatchRequest": return try await EmptyBatchRequest(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidAddress": return try await InvalidAddress(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.InvalidBatchEntryId": return try await InvalidBatchEntryId(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurity(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "KMS.AccessDeniedException": return try await KmsAccessDenied(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "KMS.DisabledException": return try await KmsDisabled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "KMS.InvalidKeyUsageException": return try await KmsInvalidKeyUsage(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "KMS.InvalidStateException": return try await KmsInvalidState(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "KMS.NotFoundException": return try await KmsNotFound(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "KMS.OptInRequired": return try await KmsOptInRequired(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "KMS.ThrottlingException": return try await KmsThrottled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.NonExistentQueue": return try await QueueDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "RequestThrottled": return try await RequestThrottled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.TooManyEntriesInBatchRequest": return try await TooManyEntriesInBatchRequest(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } } @@ -3932,54 +4837,40 @@ extension SQSClientTypes.SendMessageBatchRequestEntry: Swift.Codable { enum CodingKeys: Swift.String, Swift.CodingKey { case delaySeconds = "DelaySeconds" case id = "Id" - case messageAttributes = "MessageAttribute" + case messageAttributes = "MessageAttributes" case messageBody = "MessageBody" case messageDeduplicationId = "MessageDeduplicationId" case messageGroupId = "MessageGroupId" - case messageSystemAttributes = "MessageSystemAttribute" + case messageSystemAttributes = "MessageSystemAttributes" } public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) - if delaySeconds != 0 { - try container.encode(delaySeconds, forKey: ClientRuntime.Key("DelaySeconds")) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let delaySeconds = self.delaySeconds { + try encodeContainer.encode(delaySeconds, forKey: .delaySeconds) } - if let id = id { - try container.encode(id, forKey: ClientRuntime.Key("Id")) + if let id = self.id { + try encodeContainer.encode(id, forKey: .id) } if let messageAttributes = messageAttributes { - if !messageAttributes.isEmpty { - for (index0, element0) in messageAttributes.sorted(by: { $0.key < $1.key }).enumerated() { - let stringKey0 = element0.key - let messageattributevalueValue0 = element0.value - var nestedContainer0 = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("MessageAttribute.\(index0.advanced(by: 1))")) - var keyContainer0 = nestedContainer0.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Name")) - try keyContainer0.encode(stringKey0, forKey: ClientRuntime.Key("")) - var valueContainer0 = nestedContainer0.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Value")) - try valueContainer0.encode(messageattributevalueValue0, forKey: ClientRuntime.Key("")) - } + var messageAttributesContainer = encodeContainer.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: .messageAttributes) + for (dictKey0, messageBodyAttributeMap0) in messageAttributes { + try messageAttributesContainer.encode(messageBodyAttributeMap0, forKey: ClientRuntime.Key(stringValue: dictKey0)) } } - if let messageBody = messageBody { - try container.encode(messageBody, forKey: ClientRuntime.Key("MessageBody")) + if let messageBody = self.messageBody { + try encodeContainer.encode(messageBody, forKey: .messageBody) } - if let messageDeduplicationId = messageDeduplicationId { - try container.encode(messageDeduplicationId, forKey: ClientRuntime.Key("MessageDeduplicationId")) + if let messageDeduplicationId = self.messageDeduplicationId { + try encodeContainer.encode(messageDeduplicationId, forKey: .messageDeduplicationId) } - if let messageGroupId = messageGroupId { - try container.encode(messageGroupId, forKey: ClientRuntime.Key("MessageGroupId")) + if let messageGroupId = self.messageGroupId { + try encodeContainer.encode(messageGroupId, forKey: .messageGroupId) } if let messageSystemAttributes = messageSystemAttributes { - if !messageSystemAttributes.isEmpty { - for (index0, element0) in messageSystemAttributes.sorted(by: { $0.key < $1.key }).enumerated() { - let messagesystemattributenameforsendsKey0 = element0.key - let messagesystemattributevalueValue0 = element0.value - var nestedContainer0 = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("MessageSystemAttribute.\(index0.advanced(by: 1))")) - var keyContainer0 = nestedContainer0.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Name")) - try keyContainer0.encode(messagesystemattributenameforsendsKey0, forKey: ClientRuntime.Key("")) - var valueContainer0 = nestedContainer0.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Value")) - try valueContainer0.encode(messagesystemattributevalueValue0, forKey: ClientRuntime.Key("")) - } + var messageSystemAttributesContainer = encodeContainer.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: .messageSystemAttributes) + for (dictKey0, messageBodySystemAttributeMap0) in messageSystemAttributes { + try messageSystemAttributesContainer.encode(messageBodySystemAttributeMap0, forKey: ClientRuntime.Key(stringValue: dictKey0)) } } } @@ -3990,46 +4881,30 @@ extension SQSClientTypes.SendMessageBatchRequestEntry: Swift.Codable { id = idDecoded let messageBodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .messageBody) messageBody = messageBodyDecoded - let delaySecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .delaySeconds) ?? 0 + let delaySecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .delaySeconds) delaySeconds = delaySecondsDecoded - if containerValues.contains(.messageAttributes) { - struct KeyVal0{struct Name{}; struct Value{}} - let messageAttributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .messageAttributes) - if messageAttributesWrappedContainer != nil { - let messageAttributesContainer = try containerValues.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .messageAttributes) - var messageAttributesBuffer: [Swift.String:SQSClientTypes.MessageAttributeValue]? = nil - if let messageAttributesContainer = messageAttributesContainer { - messageAttributesBuffer = [Swift.String:SQSClientTypes.MessageAttributeValue]() - for structureContainer0 in messageAttributesContainer { - messageAttributesBuffer?[structureContainer0.key] = structureContainer0.value - } + let messageAttributesContainer = try containerValues.decodeIfPresent([Swift.String: SQSClientTypes.MessageAttributeValue?].self, forKey: .messageAttributes) + var messageAttributesDecoded0: [Swift.String:SQSClientTypes.MessageAttributeValue]? = nil + if let messageAttributesContainer = messageAttributesContainer { + messageAttributesDecoded0 = [Swift.String:SQSClientTypes.MessageAttributeValue]() + for (key0, messageattributevalue0) in messageAttributesContainer { + if let messageattributevalue0 = messageattributevalue0 { + messageAttributesDecoded0?[key0] = messageattributevalue0 } - messageAttributes = messageAttributesBuffer - } else { - messageAttributes = [:] } - } else { - messageAttributes = nil - } - if containerValues.contains(.messageSystemAttributes) { - struct KeyVal0{struct Name{}; struct Value{}} - let messageSystemAttributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .messageSystemAttributes) - if messageSystemAttributesWrappedContainer != nil { - let messageSystemAttributesContainer = try containerValues.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .messageSystemAttributes) - var messageSystemAttributesBuffer: [Swift.String:SQSClientTypes.MessageSystemAttributeValue]? = nil - if let messageSystemAttributesContainer = messageSystemAttributesContainer { - messageSystemAttributesBuffer = [Swift.String:SQSClientTypes.MessageSystemAttributeValue]() - for structureContainer0 in messageSystemAttributesContainer { - messageSystemAttributesBuffer?[structureContainer0.key] = structureContainer0.value - } + } + messageAttributes = messageAttributesDecoded0 + let messageSystemAttributesContainer = try containerValues.decodeIfPresent([Swift.String: SQSClientTypes.MessageSystemAttributeValue?].self, forKey: .messageSystemAttributes) + var messageSystemAttributesDecoded0: [Swift.String:SQSClientTypes.MessageSystemAttributeValue]? = nil + if let messageSystemAttributesContainer = messageSystemAttributesContainer { + messageSystemAttributesDecoded0 = [Swift.String:SQSClientTypes.MessageSystemAttributeValue]() + for (key0, messagesystemattributevalue0) in messageSystemAttributesContainer { + if let messagesystemattributevalue0 = messagesystemattributevalue0 { + messageSystemAttributesDecoded0?[key0] = messagesystemattributevalue0 } - messageSystemAttributes = messageSystemAttributesBuffer - } else { - messageSystemAttributes = [:] } - } else { - messageSystemAttributes = nil } + messageSystemAttributes = messageSystemAttributesDecoded0 let messageDeduplicationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .messageDeduplicationId) messageDeduplicationId = messageDeduplicationIdDecoded let messageGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .messageGroupId) @@ -4041,7 +4916,7 @@ extension SQSClientTypes { /// Contains the details of a single Amazon SQS message along with an Id. public struct SendMessageBatchRequestEntry: Swift.Equatable { /// The length of time, in seconds, for which a specific message is delayed. Valid values: 0 to 900. Maximum: 15 minutes. Messages with a positive DelaySeconds value 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. - public var delaySeconds: Swift.Int + public var delaySeconds: Swift.Int? /// 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 member is required. public var id: Swift.String? @@ -4089,7 +4964,7 @@ extension SQSClientTypes { public var messageSystemAttributes: [Swift.String:SQSClientTypes.MessageSystemAttributeValue]? public init( - delaySeconds: Swift.Int = 0, + delaySeconds: Swift.Int? = nil, id: Swift.String? = nil, messageAttributes: [Swift.String:SQSClientTypes.MessageAttributeValue]? = nil, messageBody: Swift.String? = nil, @@ -4121,24 +4996,24 @@ extension SQSClientTypes.SendMessageBatchResultEntry: Swift.Codable { } public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) - if let id = id { - try container.encode(id, forKey: ClientRuntime.Key("Id")) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let id = self.id { + try encodeContainer.encode(id, forKey: .id) } - if let md5OfMessageAttributes = md5OfMessageAttributes { - try container.encode(md5OfMessageAttributes, forKey: ClientRuntime.Key("MD5OfMessageAttributes")) + if let md5OfMessageAttributes = self.md5OfMessageAttributes { + try encodeContainer.encode(md5OfMessageAttributes, forKey: .md5OfMessageAttributes) } - if let md5OfMessageBody = md5OfMessageBody { - try container.encode(md5OfMessageBody, forKey: ClientRuntime.Key("MD5OfMessageBody")) + if let md5OfMessageBody = self.md5OfMessageBody { + try encodeContainer.encode(md5OfMessageBody, forKey: .md5OfMessageBody) } - if let md5OfMessageSystemAttributes = md5OfMessageSystemAttributes { - try container.encode(md5OfMessageSystemAttributes, forKey: ClientRuntime.Key("MD5OfMessageSystemAttributes")) + if let md5OfMessageSystemAttributes = self.md5OfMessageSystemAttributes { + try encodeContainer.encode(md5OfMessageSystemAttributes, forKey: .md5OfMessageSystemAttributes) } - if let messageId = messageId { - try container.encode(messageId, forKey: ClientRuntime.Key("MessageId")) + if let messageId = self.messageId { + try encodeContainer.encode(messageId, forKey: .messageId) } - if let sequenceNumber = sequenceNumber { - try container.encode(sequenceNumber, forKey: ClientRuntime.Key("SequenceNumber")) + if let sequenceNumber = self.sequenceNumber { + try encodeContainer.encode(sequenceNumber, forKey: .sequenceNumber) } } @@ -4199,51 +5074,45 @@ extension SQSClientTypes { } extension SendMessageInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case delaySeconds = "DelaySeconds" + case messageAttributes = "MessageAttributes" + case messageBody = "MessageBody" + case messageDeduplicationId = "MessageDeduplicationId" + case messageGroupId = "MessageGroupId" + case messageSystemAttributes = "MessageSystemAttributes" + case queueUrl = "QueueUrl" + } + public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) - if let delaySeconds = delaySeconds { - try container.encode(delaySeconds, forKey: ClientRuntime.Key("DelaySeconds")) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let delaySeconds = self.delaySeconds { + try encodeContainer.encode(delaySeconds, forKey: .delaySeconds) } if let messageAttributes = messageAttributes { - if !messageAttributes.isEmpty { - for (index0, element0) in messageAttributes.sorted(by: { $0.key < $1.key }).enumerated() { - let stringKey0 = element0.key - let messageattributevalueValue0 = element0.value - var nestedContainer0 = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("MessageAttribute.\(index0.advanced(by: 1))")) - var keyContainer0 = nestedContainer0.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Name")) - try keyContainer0.encode(stringKey0, forKey: ClientRuntime.Key("")) - var valueContainer0 = nestedContainer0.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Value")) - try valueContainer0.encode(messageattributevalueValue0, forKey: ClientRuntime.Key("")) - } + var messageAttributesContainer = encodeContainer.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: .messageAttributes) + for (dictKey0, messageBodyAttributeMap0) in messageAttributes { + try messageAttributesContainer.encode(messageBodyAttributeMap0, forKey: ClientRuntime.Key(stringValue: dictKey0)) } } - if let messageBody = messageBody { - try container.encode(messageBody, forKey: ClientRuntime.Key("MessageBody")) + if let messageBody = self.messageBody { + try encodeContainer.encode(messageBody, forKey: .messageBody) } - if let messageDeduplicationId = messageDeduplicationId { - try container.encode(messageDeduplicationId, forKey: ClientRuntime.Key("MessageDeduplicationId")) + if let messageDeduplicationId = self.messageDeduplicationId { + try encodeContainer.encode(messageDeduplicationId, forKey: .messageDeduplicationId) } - if let messageGroupId = messageGroupId { - try container.encode(messageGroupId, forKey: ClientRuntime.Key("MessageGroupId")) + if let messageGroupId = self.messageGroupId { + try encodeContainer.encode(messageGroupId, forKey: .messageGroupId) } if let messageSystemAttributes = messageSystemAttributes { - if !messageSystemAttributes.isEmpty { - for (index0, element0) in messageSystemAttributes.sorted(by: { $0.key < $1.key }).enumerated() { - let messagesystemattributenameforsendsKey0 = element0.key - let messagesystemattributevalueValue0 = element0.value - var nestedContainer0 = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("MessageSystemAttribute.\(index0.advanced(by: 1))")) - var keyContainer0 = nestedContainer0.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Name")) - try keyContainer0.encode(messagesystemattributenameforsendsKey0, forKey: ClientRuntime.Key("")) - var valueContainer0 = nestedContainer0.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Value")) - try valueContainer0.encode(messagesystemattributevalueValue0, forKey: ClientRuntime.Key("")) - } + var messageSystemAttributesContainer = encodeContainer.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: .messageSystemAttributes) + for (dictKey0, messageBodySystemAttributeMap0) in messageSystemAttributes { + try messageSystemAttributesContainer.encode(messageBodySystemAttributeMap0, forKey: ClientRuntime.Key(stringValue: dictKey0)) } } - if let queueUrl = queueUrl { - try container.encode(queueUrl, forKey: ClientRuntime.Key("QueueUrl")) + if let queueUrl = self.queueUrl { + try encodeContainer.encode(queueUrl, forKey: .queueUrl) } - try container.encode("SendMessage", forKey:ClientRuntime.Key("Action")) - try container.encode("2012-11-05", forKey:ClientRuntime.Key("Version")) } } @@ -4336,11 +5205,11 @@ struct SendMessageInputBody: Swift.Equatable { extension SendMessageInputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { case delaySeconds = "DelaySeconds" - case messageAttributes = "MessageAttribute" + case messageAttributes = "MessageAttributes" case messageBody = "MessageBody" case messageDeduplicationId = "MessageDeduplicationId" case messageGroupId = "MessageGroupId" - case messageSystemAttributes = "MessageSystemAttribute" + case messageSystemAttributes = "MessageSystemAttributes" case queueUrl = "QueueUrl" } @@ -4350,46 +5219,30 @@ extension SendMessageInputBody: Swift.Decodable { queueUrl = queueUrlDecoded let messageBodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .messageBody) messageBody = messageBodyDecoded - let delaySecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .delaySeconds) ?? 0 + let delaySecondsDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .delaySeconds) delaySeconds = delaySecondsDecoded - if containerValues.contains(.messageAttributes) { - struct KeyVal0{struct Name{}; struct Value{}} - let messageAttributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .messageAttributes) - if messageAttributesWrappedContainer != nil { - let messageAttributesContainer = try containerValues.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .messageAttributes) - var messageAttributesBuffer: [Swift.String:SQSClientTypes.MessageAttributeValue]? = nil - if let messageAttributesContainer = messageAttributesContainer { - messageAttributesBuffer = [Swift.String:SQSClientTypes.MessageAttributeValue]() - for structureContainer0 in messageAttributesContainer { - messageAttributesBuffer?[structureContainer0.key] = structureContainer0.value - } + let messageAttributesContainer = try containerValues.decodeIfPresent([Swift.String: SQSClientTypes.MessageAttributeValue?].self, forKey: .messageAttributes) + var messageAttributesDecoded0: [Swift.String:SQSClientTypes.MessageAttributeValue]? = nil + if let messageAttributesContainer = messageAttributesContainer { + messageAttributesDecoded0 = [Swift.String:SQSClientTypes.MessageAttributeValue]() + for (key0, messageattributevalue0) in messageAttributesContainer { + if let messageattributevalue0 = messageattributevalue0 { + messageAttributesDecoded0?[key0] = messageattributevalue0 } - messageAttributes = messageAttributesBuffer - } else { - messageAttributes = [:] } - } else { - messageAttributes = nil - } - if containerValues.contains(.messageSystemAttributes) { - struct KeyVal0{struct Name{}; struct Value{}} - let messageSystemAttributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .messageSystemAttributes) - if messageSystemAttributesWrappedContainer != nil { - let messageSystemAttributesContainer = try containerValues.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .messageSystemAttributes) - var messageSystemAttributesBuffer: [Swift.String:SQSClientTypes.MessageSystemAttributeValue]? = nil - if let messageSystemAttributesContainer = messageSystemAttributesContainer { - messageSystemAttributesBuffer = [Swift.String:SQSClientTypes.MessageSystemAttributeValue]() - for structureContainer0 in messageSystemAttributesContainer { - messageSystemAttributesBuffer?[structureContainer0.key] = structureContainer0.value - } + } + messageAttributes = messageAttributesDecoded0 + let messageSystemAttributesContainer = try containerValues.decodeIfPresent([Swift.String: SQSClientTypes.MessageSystemAttributeValue?].self, forKey: .messageSystemAttributes) + var messageSystemAttributesDecoded0: [Swift.String:SQSClientTypes.MessageSystemAttributeValue]? = nil + if let messageSystemAttributesContainer = messageSystemAttributesContainer { + messageSystemAttributesDecoded0 = [Swift.String:SQSClientTypes.MessageSystemAttributeValue]() + for (key0, messagesystemattributevalue0) in messageSystemAttributesContainer { + if let messagesystemattributevalue0 = messagesystemattributevalue0 { + messageSystemAttributesDecoded0?[key0] = messagesystemattributevalue0 } - messageSystemAttributes = messageSystemAttributesBuffer - } else { - messageSystemAttributes = [:] } - } else { - messageSystemAttributes = nil } + messageSystemAttributes = messageSystemAttributesDecoded0 let messageDeduplicationIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .messageDeduplicationId) messageDeduplicationId = messageDeduplicationIdDecoded let messageGroupIdDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .messageGroupId) @@ -4464,8 +5317,7 @@ extension SendMessageOutputBody: Swift.Decodable { } public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("SendMessageResult")) + let containerValues = try decoder.container(keyedBy: CodingKeys.self) let md5OfMessageBodyDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .md5OfMessageBody) md5OfMessageBody = md5OfMessageBodyDecoded let md5OfMessageAttributesDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .md5OfMessageAttributes) @@ -4481,36 +5333,44 @@ extension SendMessageOutputBody: Swift.Decodable { enum SendMessageOutputError: ClientRuntime.HttpResponseErrorBinding { static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidMessageContents": return try await InvalidMessageContents(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "AWS.SimpleQueueService.UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InvalidAddress": return try await InvalidAddress(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidMessageContents": return try await InvalidMessageContents(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurity(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "KMS.AccessDeniedException": return try await KmsAccessDenied(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "KMS.DisabledException": return try await KmsDisabled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "KMS.InvalidKeyUsageException": return try await KmsInvalidKeyUsage(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "KMS.InvalidStateException": return try await KmsInvalidState(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "KMS.NotFoundException": return try await KmsNotFound(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "KMS.OptInRequired": return try await KmsOptInRequired(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "KMS.ThrottlingException": return try await KmsThrottled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.NonExistentQueue": return try await QueueDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "RequestThrottled": return try await RequestThrottled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } } extension SetQueueAttributesInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case attributes = "Attributes" + case queueUrl = "QueueUrl" + } + public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) if let attributes = attributes { - if !attributes.isEmpty { - for (index0, element0) in attributes.sorted(by: { $0.key < $1.key }).enumerated() { - let queueattributenameKey0 = element0.key - let stringValue0 = element0.value - var nestedContainer0 = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Attribute.\(index0.advanced(by: 1))")) - var keyContainer0 = nestedContainer0.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Name")) - try keyContainer0.encode(queueattributenameKey0, forKey: ClientRuntime.Key("")) - var valueContainer0 = nestedContainer0.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Value")) - try valueContainer0.encode(stringValue0, forKey: ClientRuntime.Key("")) - } + var attributesContainer = encodeContainer.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: .attributes) + for (dictKey0, queueAttributeMap0) in attributes { + try attributesContainer.encode(queueAttributeMap0, forKey: ClientRuntime.Key(stringValue: dictKey0)) } } - if let queueUrl = queueUrl { - try container.encode(queueUrl, forKey: ClientRuntime.Key("QueueUrl")) + if let queueUrl = self.queueUrl { + try encodeContainer.encode(queueUrl, forKey: .queueUrl) } - try container.encode("SetQueueAttributes", forKey:ClientRuntime.Key("Action")) - try container.encode("2012-11-05", forKey:ClientRuntime.Key("Version")) } } @@ -4639,7 +5499,7 @@ struct SetQueueAttributesInputBody: Swift.Equatable { extension SetQueueAttributesInputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { - case attributes = "Attribute" + case attributes = "Attributes" case queueUrl = "QueueUrl" } @@ -4647,25 +5507,17 @@ extension SetQueueAttributesInputBody: Swift.Decodable { let containerValues = try decoder.container(keyedBy: CodingKeys.self) let queueUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .queueUrl) queueUrl = queueUrlDecoded - if containerValues.contains(.attributes) { - struct KeyVal0{struct Name{}; struct Value{}} - let attributesWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .attributes) - if attributesWrappedContainer != nil { - let attributesContainer = try containerValues.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .attributes) - var attributesBuffer: [Swift.String:Swift.String]? = nil - if let attributesContainer = attributesContainer { - attributesBuffer = [Swift.String:Swift.String]() - for stringContainer0 in attributesContainer { - attributesBuffer?[stringContainer0.key] = stringContainer0.value - } + let attributesContainer = try containerValues.decodeIfPresent([Swift.String: Swift.String?].self, forKey: .attributes) + var attributesDecoded0: [Swift.String:Swift.String]? = nil + if let attributesContainer = attributesContainer { + attributesDecoded0 = [Swift.String:Swift.String]() + for (key0, string0) in attributesContainer { + if let string0 = string0 { + attributesDecoded0?[key0] = string0 } - attributes = attributesBuffer - } else { - attributes = [:] } - } else { - attributes = nil } + attributes = attributesDecoded0 } } @@ -4681,28 +5533,40 @@ public struct SetQueueAttributesOutput: Swift.Equatable { enum SetQueueAttributesOutputError: ClientRuntime.HttpResponseErrorBinding { static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "InvalidAttributeName": return try await InvalidAttributeName(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InvalidAddress": return try await InvalidAddress(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidAttributeName": return try await InvalidAttributeName(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidAttributeValue": return try await InvalidAttributeValue(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurity(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "OverLimit": return try await OverLimit(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.NonExistentQueue": return try await QueueDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "RequestThrottled": return try await RequestThrottled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } } extension StartMessageMoveTaskInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case destinationArn = "DestinationArn" + case maxNumberOfMessagesPerSecond = "MaxNumberOfMessagesPerSecond" + case sourceArn = "SourceArn" + } + public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) - if let destinationArn = destinationArn { - try container.encode(destinationArn, forKey: ClientRuntime.Key("DestinationArn")) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let destinationArn = self.destinationArn { + try encodeContainer.encode(destinationArn, forKey: .destinationArn) } - if let maxNumberOfMessagesPerSecond = maxNumberOfMessagesPerSecond { - try container.encode(maxNumberOfMessagesPerSecond, forKey: ClientRuntime.Key("MaxNumberOfMessagesPerSecond")) + if let maxNumberOfMessagesPerSecond = self.maxNumberOfMessagesPerSecond { + try encodeContainer.encode(maxNumberOfMessagesPerSecond, forKey: .maxNumberOfMessagesPerSecond) } - if let sourceArn = sourceArn { - try container.encode(sourceArn, forKey: ClientRuntime.Key("SourceArn")) + if let sourceArn = self.sourceArn { + try encodeContainer.encode(sourceArn, forKey: .sourceArn) } - try container.encode("StartMessageMoveTask", forKey:ClientRuntime.Key("Action")) - try container.encode("2012-11-05", forKey:ClientRuntime.Key("Version")) } } @@ -4752,7 +5616,7 @@ extension StartMessageMoveTaskInputBody: Swift.Decodable { sourceArn = sourceArnDecoded let destinationArnDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .destinationArn) destinationArn = destinationArnDecoded - let maxNumberOfMessagesPerSecondDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxNumberOfMessagesPerSecond) ?? 0 + let maxNumberOfMessagesPerSecondDecoded = try containerValues.decodeIfPresent(Swift.Int.self, forKey: .maxNumberOfMessagesPerSecond) maxNumberOfMessagesPerSecond = maxNumberOfMessagesPerSecondDecoded } } @@ -4791,8 +5655,7 @@ extension StartMessageMoveTaskOutputBody: Swift.Decodable { } public init(from decoder: Swift.Decoder) throws { - let topLevelContainer = try decoder.container(keyedBy: ClientRuntime.Key.self) - let containerValues = try topLevelContainer.nestedContainer(keyedBy: CodingKeys.self, forKey: ClientRuntime.Key("StartMessageMoveTaskResult")) + let containerValues = try decoder.container(keyedBy: CodingKeys.self) let taskHandleDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .taskHandle) taskHandle = taskHandleDecoded } @@ -4800,36 +5663,36 @@ extension StartMessageMoveTaskOutputBody: Swift.Decodable { enum StartMessageMoveTaskOutputError: ClientRuntime.HttpResponseErrorBinding { static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - case "AWS.SimpleQueueService.UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restXMLError.message, requestID: restXMLError.requestId) - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InvalidAddress": return try await InvalidAddress(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurity(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "RequestThrottled": return try await RequestThrottled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "ResourceNotFoundException": return try await ResourceNotFoundException(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } } extension TagQueueInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case queueUrl = "QueueUrl" + case tags = "Tags" + } + public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) - if let queueUrl = queueUrl { - try container.encode(queueUrl, forKey: ClientRuntime.Key("QueueUrl")) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let queueUrl = self.queueUrl { + try encodeContainer.encode(queueUrl, forKey: .queueUrl) } if let tags = tags { - if !tags.isEmpty { - for (index0, element0) in tags.sorted(by: { $0.key < $1.key }).enumerated() { - let tagkeyKey0 = element0.key - let tagvalueValue0 = element0.value - var nestedContainer0 = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Tag.\(index0.advanced(by: 1))")) - var keyContainer0 = nestedContainer0.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Key")) - try keyContainer0.encode(tagkeyKey0, forKey: ClientRuntime.Key("")) - var valueContainer0 = nestedContainer0.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("Value")) - try valueContainer0.encode(tagvalueValue0, forKey: ClientRuntime.Key("")) - } + var tagsContainer = encodeContainer.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: .tags) + for (dictKey0, tagMap0) in tags { + try tagsContainer.encode(tagMap0, forKey: ClientRuntime.Key(stringValue: dictKey0)) } } - try container.encode("TagQueue", forKey:ClientRuntime.Key("Action")) - try container.encode("2012-11-05", forKey:ClientRuntime.Key("Version")) } } @@ -4865,32 +5728,24 @@ struct TagQueueInputBody: Swift.Equatable { extension TagQueueInputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { case queueUrl = "QueueUrl" - case tags = "Tag" + case tags = "Tags" } public init(from decoder: Swift.Decoder) throws { let containerValues = try decoder.container(keyedBy: CodingKeys.self) let queueUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .queueUrl) queueUrl = queueUrlDecoded - if containerValues.contains(.tags) { - struct KeyVal0{struct Key{}; struct Value{}} - let tagsWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: ClientRuntime.MapEntry.CodingKeys.self, forKey: .tags) - if tagsWrappedContainer != nil { - let tagsContainer = try containerValues.decodeIfPresent([ClientRuntime.MapKeyValue].self, forKey: .tags) - var tagsBuffer: [Swift.String:Swift.String]? = nil - if let tagsContainer = tagsContainer { - tagsBuffer = [Swift.String:Swift.String]() - for stringContainer0 in tagsContainer { - tagsBuffer?[stringContainer0.key] = stringContainer0.value - } + let tagsContainer = try containerValues.decodeIfPresent([Swift.String: Swift.String?].self, forKey: .tags) + var tagsDecoded0: [Swift.String:Swift.String]? = nil + if let tagsContainer = tagsContainer { + tagsDecoded0 = [Swift.String:Swift.String]() + for (key0, tagvalue0) in tagsContainer { + if let tagvalue0 = tagvalue0 { + tagsDecoded0?[key0] = tagvalue0 } - tags = tagsBuffer - } else { - tags = [:] } - } else { - tags = nil } + tags = tagsDecoded0 } } @@ -4906,15 +5761,28 @@ public struct TagQueueOutput: Swift.Equatable { enum TagQueueOutputError: ClientRuntime.HttpResponseErrorBinding { static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InvalidAddress": return try await InvalidAddress(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurity(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.NonExistentQueue": return try await QueueDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "RequestThrottled": return try await RequestThrottled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } } extension TooManyEntriesInBatchRequest { public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: TooManyEntriesInBatchRequestBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } self.httpResponse = httpResponse self.requestID = requestID self.message = message @@ -4923,6 +5791,12 @@ extension TooManyEntriesInBatchRequest { /// The batch request contains more entries than permissible. public struct TooManyEntriesInBatchRequest: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() public static var typeName: Swift.String { "AWS.SimpleQueueService.TooManyEntriesInBatchRequest" } public static var fault: ErrorFault { .client } public static var isRetryable: Swift.Bool { false } @@ -4931,11 +5805,39 @@ public struct TooManyEntriesInBatchRequest: ClientRuntime.ModeledError, AWSClien public internal(set) var message: Swift.String? public internal(set) var requestID: Swift.String? - public init() { } + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct TooManyEntriesInBatchRequestBody: Swift.Equatable { + let message: Swift.String? +} + +extension TooManyEntriesInBatchRequestBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } } extension UnsupportedOperation { public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil, message: Swift.String? = nil, requestID: Swift.String? = nil) async throws { + if let data = try await httpResponse.body.readData(), + let responseDecoder = decoder { + let output: UnsupportedOperationBody = try responseDecoder.decode(responseBody: data) + self.properties.message = output.message + } else { + self.properties.message = nil + } self.httpResponse = httpResponse self.requestID = requestID self.message = message @@ -4944,6 +5846,12 @@ extension UnsupportedOperation { /// Error code 400. Unsupported operation. public struct UnsupportedOperation: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() public static var typeName: Swift.String { "AWS.SimpleQueueService.UnsupportedOperation" } public static var fault: ErrorFault { .client } public static var isRetryable: Swift.Bool { false } @@ -4952,29 +5860,47 @@ public struct UnsupportedOperation: ClientRuntime.ModeledError, AWSClientRuntime public internal(set) var message: Swift.String? public internal(set) var requestID: Swift.String? - public init() { } + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + +struct UnsupportedOperationBody: Swift.Equatable { + let message: Swift.String? +} + +extension UnsupportedOperationBody: Swift.Decodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case message + } + + public init(from decoder: Swift.Decoder) throws { + let containerValues = try decoder.container(keyedBy: CodingKeys.self) + let messageDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .message) + message = messageDecoded + } } extension UntagQueueInput: Swift.Encodable { + enum CodingKeys: Swift.String, Swift.CodingKey { + case queueUrl = "QueueUrl" + case tagKeys = "TagKeys" + } + public func encode(to encoder: Swift.Encoder) throws { - var container = encoder.container(keyedBy: ClientRuntime.Key.self) - if let queueUrl = queueUrl { - try container.encode(queueUrl, forKey: ClientRuntime.Key("QueueUrl")) + var encodeContainer = encoder.container(keyedBy: CodingKeys.self) + if let queueUrl = self.queueUrl { + try encodeContainer.encode(queueUrl, forKey: .queueUrl) } if let tagKeys = tagKeys { - if !tagKeys.isEmpty { - for (index0, tagkey0) in tagKeys.enumerated() { - var tagKeysContainer0 = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("TagKey.\(index0.advanced(by: 1))")) - try tagKeysContainer0.encode(tagkey0, forKey: ClientRuntime.Key("")) - } - } - else { - var tagKeysContainer = container.nestedContainer(keyedBy: ClientRuntime.Key.self, forKey: ClientRuntime.Key("TagKey")) - try tagKeysContainer.encode("", forKey: ClientRuntime.Key("")) + var tagKeysContainer = encodeContainer.nestedUnkeyedContainer(forKey: .tagKeys) + for tagkey0 in tagKeys { + try tagKeysContainer.encode(tagkey0) } } - try container.encode("UntagQueue", forKey:ClientRuntime.Key("Action")) - try container.encode("2012-11-05", forKey:ClientRuntime.Key("Version")) } } @@ -5010,31 +5936,24 @@ struct UntagQueueInputBody: Swift.Equatable { extension UntagQueueInputBody: Swift.Decodable { enum CodingKeys: Swift.String, Swift.CodingKey { case queueUrl = "QueueUrl" - case tagKeys = "TagKey" + case tagKeys = "TagKeys" } public init(from decoder: Swift.Decoder) throws { let containerValues = try decoder.container(keyedBy: CodingKeys.self) let queueUrlDecoded = try containerValues.decodeIfPresent(Swift.String.self, forKey: .queueUrl) queueUrl = queueUrlDecoded - if containerValues.contains(.tagKeys) { - let tagKeysWrappedContainer = containerValues.nestedContainerNonThrowable(keyedBy: CodingKeys.self, forKey: .tagKeys) - if tagKeysWrappedContainer != nil { - let tagKeysContainer = try containerValues.decodeIfPresent([Swift.String].self, forKey: .tagKeys) - var tagKeysBuffer:[Swift.String]? = nil - if let tagKeysContainer = tagKeysContainer { - tagKeysBuffer = [Swift.String]() - for stringContainer0 in tagKeysContainer { - tagKeysBuffer?.append(stringContainer0) - } + let tagKeysContainer = try containerValues.decodeIfPresent([Swift.String?].self, forKey: .tagKeys) + var tagKeysDecoded0:[Swift.String]? = nil + if let tagKeysContainer = tagKeysContainer { + tagKeysDecoded0 = [Swift.String]() + for string0 in tagKeysContainer { + if let string0 = string0 { + tagKeysDecoded0?.append(string0) } - tagKeys = tagKeysBuffer - } else { - tagKeys = [] } - } else { - tagKeys = nil } + tagKeys = tagKeysDecoded0 } } @@ -5050,9 +5969,15 @@ public struct UntagQueueOutput: Swift.Equatable { enum UntagQueueOutputError: ClientRuntime.HttpResponseErrorBinding { static func makeError(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws -> Swift.Error { - let restXMLError = try await AWSClientRuntime.RestXMLError(httpResponse: httpResponse) - switch restXMLError.errorCode { - default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restXMLError.message, requestID: restXMLError.requestId, typeName: restXMLError.errorCode) + let restJSONError = try await AWSClientRuntime.RestJSONError(httpResponse: httpResponse) + let requestID = httpResponse.requestId + switch restJSONError.errorType { + case "InvalidAddress": return try await InvalidAddress(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "InvalidSecurity": return try await InvalidSecurity(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.NonExistentQueue": return try await QueueDoesNotExist(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "RequestThrottled": return try await RequestThrottled(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + case "AWS.SimpleQueueService.UnsupportedOperation": return try await UnsupportedOperation(httpResponse: httpResponse, decoder: decoder, message: restJSONError.errorMessage, requestID: requestID) + default: return try await AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(httpResponse: httpResponse, message: restJSONError.errorMessage, requestID: requestID, typeName: restJSONError.errorType) } } } diff --git a/codegen/sdk-codegen/aws-models/sqs.2012-11-05.json b/codegen/sdk-codegen/aws-models/sqs.2012-11-05.json index fd3087d50fb..1982004f6e5 100644 --- a/codegen/sdk-codegen/aws-models/sqs.2012-11-05.json +++ b/codegen/sdk-codegen/aws-models/sqs.2012-11-05.json @@ -50,12 +50,27 @@ "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 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
" + "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": { @@ -78,7 +93,7 @@ "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#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" @@ -184,12 +199,10 @@ "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 ", + "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.api#xmlNamespace": { - "uri": "http://queue.amazonaws.com/doc/2012-11-05/" - }, "smithy.rules#endpointRuleSet": { "version": "1.0", "parameters": { @@ -1204,7 +1217,11 @@ }, "com.amazonaws.sqs#BatchEntryIdsNotDistinct": { "type": "structure", - "members": {}, + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { "aws.protocols#awsQueryError": { "code": "AWS.SimpleQueueService.BatchEntryIdsNotDistinct", @@ -1217,7 +1234,11 @@ }, "com.amazonaws.sqs#BatchRequestTooLong": { "type": "structure", - "members": {}, + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { "aws.protocols#awsQueryError": { "code": "AWS.SimpleQueueService.BatchRequestTooLong", @@ -1300,6 +1321,15 @@ "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" }, @@ -1350,15 +1380,30 @@ "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": "

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
" + "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
" } }, "com.amazonaws.sqs#ChangeMessageVisibilityBatch": { @@ -1376,15 +1421,30 @@ { "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": "

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
" + "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
" } }, "com.amazonaws.sqs#ChangeMessageVisibilityBatchRequest": { @@ -1418,7 +1478,7 @@ "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#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": {} } }, @@ -1430,9 +1490,8 @@ } }, "VisibilityTimeout": { - "target": "com.amazonaws.sqs#Integer", + "target": "com.amazonaws.sqs#NullableInteger", "traits": { - "smithy.api#default": 0, "smithy.api#documentation": "

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

" } } @@ -1513,9 +1572,8 @@ } }, "VisibilityTimeout": { - "target": "com.amazonaws.sqs#Integer", + "target": "com.amazonaws.sqs#NullableInteger", "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": {} } @@ -1534,15 +1592,33 @@ "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": "

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
" + "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
" } }, "com.amazonaws.sqs#CreateQueueRequest": { @@ -1555,20 +1631,20 @@ "smithy.api#required": {} } }, - "tags": { - "target": "com.amazonaws.sqs#TagMap", + "Attributes": { + "target": "com.amazonaws.sqs#QueueAttributeMap", "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

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#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": "Tag" + "smithy.api#xmlName": "Attribute" } }, - "Attributes": { - "target": "com.amazonaws.sqs#QueueAttributeMap", + "tags": { + "target": "com.amazonaws.sqs#TagMap", "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#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": "Attribute" + "smithy.api#xmlName": "Tag" } } }, @@ -1601,15 +1677,30 @@ "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": "

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
" + "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
" } }, "com.amazonaws.sqs#DeleteMessageBatch": { @@ -1627,15 +1718,30 @@ { "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": "

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
" + "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
" } }, "com.amazonaws.sqs#DeleteMessageBatchRequest": { @@ -1669,7 +1775,7 @@ "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 accepted: alphanumeric characters, hyphens(-), and underscores (_).

\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\n accepted: alphanumeric characters, hyphens(-), and underscores (_).

\n
", "smithy.api#required": {} } }, @@ -1770,8 +1876,25 @@ "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": "

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
" + "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
" } }, "com.amazonaws.sqs#DeleteQueueRequest": { @@ -1792,7 +1915,11 @@ }, "com.amazonaws.sqs#EmptyBatchRequest": { "type": "structure", - "members": {}, + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { "aws.protocols#awsQueryError": { "code": "AWS.SimpleQueueService.EmptyBatchRequest", @@ -1803,6 +1930,9 @@ "smithy.api#httpError": 400 } }, + "com.amazonaws.sqs#ExceptionMessage": { + "type": "string" + }, "com.amazonaws.sqs#GetQueueAttributes": { "type": "operation", "input": { @@ -1812,12 +1942,27 @@ "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": "

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
" + "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
" } }, "com.amazonaws.sqs#GetQueueAttributesRequest": { @@ -1833,7 +1978,7 @@ "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 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#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" } @@ -1870,12 +2015,24 @@ "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": "

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.

" + "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.

" } }, "com.amazonaws.sqs#GetQueueUrlRequest": { @@ -1891,7 +2048,7 @@ "QueueOwnerAWSAccountId": { "target": "com.amazonaws.sqs#String", "traits": { - "smithy.api#documentation": "

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

" + "smithy.api#documentation": "

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

" } } }, @@ -1911,27 +2068,58 @@ } }, "traits": { - "smithy.api#documentation": "

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

", + "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", + "com.amazonaws.sqs#InvalidAddress": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { - "smithy.api#default": 0 + "aws.protocols#awsQueryError": { + "code": "InvalidAddress", + "httpResponseCode": 404 + }, + "smithy.api#documentation": "

The accountId is invalid.

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

The specified attribute doesn't exist.

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

A queue attribute value is invalid.

", + "smithy.api#error": "client" + } + }, "com.amazonaws.sqs#InvalidBatchEntryId": { "type": "structure", - "members": {}, + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { "aws.protocols#awsQueryError": { "code": "AWS.SimpleQueueService.InvalidBatchEntryId", @@ -1946,102 +2134,266 @@ "type": "structure", "members": {}, "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" } }, "com.amazonaws.sqs#InvalidMessageContents": { "type": "structure", - "members": {}, + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "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" + "com.amazonaws.sqs#InvalidSecurity": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" } - ], + }, "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" - } + "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 } }, - "com.amazonaws.sqs#ListDeadLetterSourceQueuesRequest": { + "com.amazonaws.sqs#KmsAccessDenied": { "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.

" - } + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" } }, "traits": { - "smithy.api#documentation": "

", - "smithy.api#input": {} + "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#ListDeadLetterSourceQueuesResult": { + "com.amazonaws.sqs#KmsDisabled": { "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.

" - } + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" } }, "traits": { - "smithy.api#documentation": "

A list of your dead letter source queues.

", - "smithy.api#output": {} + "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#ListMessageMoveTasks": { - "type": "operation", - "input": { - "target": "com.amazonaws.sqs#ListMessageMoveTasksRequest" - }, - "output": { + "com.amazonaws.sqs#KmsInvalidKeyUsage": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, + "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 + } + }, + "com.amazonaws.sqs#KmsInvalidState": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, + "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 + } + }, + "com.amazonaws.sqs#KmsNotFound": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, + "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 + } + }, + "com.amazonaws.sqs#KmsOptInRequired": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, + "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 + } + }, + "com.amazonaws.sqs#KmsThrottled": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, + "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 + } + }, + "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": "

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": {} + } + }, + "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#documentation": "

", + "smithy.api#input": {} + } + }, + "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#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#InvalidAddress" + }, + { + "target": "com.amazonaws.sqs#InvalidSecurity" + }, + { + "target": "com.amazonaws.sqs#RequestThrottled" + }, { "target": "com.amazonaws.sqs#ResourceNotFoundException" }, @@ -2064,9 +2416,8 @@ } }, "MaxResults": { - "target": "com.amazonaws.sqs#Integer", + "target": "com.amazonaws.sqs#NullableInteger", "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.

" } } @@ -2088,7 +2439,8 @@ } }, "traits": { - "smithy.api#output": {} + "smithy.api#output": {}, + "smithy.api#xmlName": "ListMessageMoveTasksResult" } }, "com.amazonaws.sqs#ListMessageMoveTasksResultEntry": { @@ -2119,9 +2471,8 @@ } }, "MaxNumberOfMessagesPerSecond": { - "target": "com.amazonaws.sqs#Integer", + "target": "com.amazonaws.sqs#NullableInteger", "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.

" } }, @@ -2133,9 +2484,8 @@ } }, "ApproximateNumberOfMessagesToMove": { - "target": "com.amazonaws.sqs#Long", + "target": "com.amazonaws.sqs#NullableLong", "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.

" } }, @@ -2171,8 +2521,25 @@ "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#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
" + "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
" } }, "com.amazonaws.sqs#ListQueueTagsRequest": { @@ -2214,8 +2581,22 @@ "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#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#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", @@ -2254,12 +2635,6 @@ "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", "traits": { @@ -2267,6 +2642,12 @@ "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": { @@ -2318,13 +2699,13 @@ "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.

" + "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, \nand Value. For more information, see \nAmazon SQS \nmessage attributes in the Amazon SQS Developer Guide.

", + "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" } @@ -2377,7 +2758,7 @@ "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#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": {} } } @@ -2554,7 +2935,7 @@ "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#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": {} } } @@ -2563,9 +2944,19 @@ "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#NullableInteger": { + "type": "integer" + }, + "com.amazonaws.sqs#NullableLong": { + "type": "long" + }, "com.amazonaws.sqs#OverLimit": { "type": "structure", - "members": {}, + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { "aws.protocols#awsQueryError": { "code": "OverLimit", @@ -2585,11 +2976,23 @@ "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": { @@ -2598,7 +3001,11 @@ }, "com.amazonaws.sqs#PurgeQueueInProgress": { "type": "structure", - "members": {}, + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { "aws.protocols#awsQueryError": { "code": "AWS.SimpleQueueService.PurgeQueueInProgress", @@ -2779,7 +3186,11 @@ }, "com.amazonaws.sqs#QueueDeletedRecently": { "type": "structure", - "members": {}, + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { "aws.protocols#awsQueryError": { "code": "AWS.SimpleQueueService.QueueDeletedRecently", @@ -2792,7 +3203,11 @@ }, "com.amazonaws.sqs#QueueDoesNotExist": { "type": "structure", - "members": {}, + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { "aws.protocols#awsQueryError": { "code": "AWS.SimpleQueueService.NonExistentQueue", @@ -2805,13 +3220,17 @@ }, "com.amazonaws.sqs#QueueNameExists": { "type": "structure", - "members": {}, + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "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#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 } @@ -2824,10 +3243,19 @@ }, "com.amazonaws.sqs#ReceiptHandleIsInvalid": { "type": "structure", - "members": {}, + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { + "aws.protocols#awsQueryError": { + "code": "ReceiptHandleIsInvalid", + "httpResponseCode": 404 + }, "smithy.api#documentation": "

The specified receipt handle isn't valid.

", - "smithy.api#error": "client" + "smithy.api#error": "client", + "smithy.api#httpError": 404 } }, "com.amazonaws.sqs#ReceiveMessage": { @@ -2839,12 +3267,48 @@ "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": "

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
" + "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
" } }, "com.amazonaws.sqs#ReceiveMessageRequest": { @@ -2860,7 +3324,7 @@ "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\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#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" } @@ -2874,30 +3338,27 @@ } }, "MaxNumberOfMessages": { - "target": "com.amazonaws.sqs#Integer", + "target": "com.amazonaws.sqs#NullableInteger", "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.

" + "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#Integer", + "target": "com.amazonaws.sqs#NullableInteger", "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.

" } }, "WaitTimeSeconds": { - "target": "com.amazonaws.sqs#Integer", + "target": "com.amazonaws.sqs#NullableInteger", "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
" } }, "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 SQS\n Developer Guide.

" + "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.

" } } }, @@ -2931,8 +3392,25 @@ "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": "

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
" + "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
" } }, "com.amazonaws.sqs#RemovePermissionRequest": { @@ -2958,9 +3436,30 @@ "smithy.api#input": {} } }, + "com.amazonaws.sqs#RequestThrottled": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, + "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 + } + }, "com.amazonaws.sqs#ResourceNotFoundException": { "type": "structure", - "members": {}, + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { "aws.protocols#awsQueryError": { "code": "ResourceNotFoundException", @@ -2980,15 +3479,48 @@ "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": "

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
" + "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
" } }, "com.amazonaws.sqs#SendMessageBatch": { @@ -3009,9 +3541,42 @@ { "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" }, @@ -3020,7 +3585,7 @@ } ], "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.

" + "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.

" } }, "com.amazonaws.sqs#SendMessageBatchRequest": { @@ -3054,7 +3619,7 @@ "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 accepted: alphanumeric characters, hyphens(-), and underscores (_).

\n
", + "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": {} } }, @@ -3066,16 +3631,15 @@ } }, "DelaySeconds": { - "target": "com.amazonaws.sqs#Integer", + "target": "com.amazonaws.sqs#NullableInteger", "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
" + "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, \nand Value. For more information, see \nAmazon SQS \nmessage attributes in the Amazon SQS Developer Guide.

", + "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" } @@ -3083,7 +3647,7 @@ "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
  • \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#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" } @@ -3091,18 +3655,18 @@ "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 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": "

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,\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
" + "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
" } } }, "traits": { - "smithy.api#documentation": "

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

" + "smithy.api#documentation": "

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

" } }, "com.amazonaws.sqs#SendMessageBatchRequestEntryList": { @@ -3158,20 +3722,20 @@ "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 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": "

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 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": "

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 \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": "

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": { @@ -3204,21 +3768,20 @@ "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#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#Integer", + "target": "com.amazonaws.sqs#NullableInteger", "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": "

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, \nand Value. For more information, see \nAmazon SQS \nmessage attributes in the Amazon SQS Developer Guide.

", + "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" } @@ -3226,7 +3789,7 @@ "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
  • \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#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" } @@ -3234,13 +3797,13 @@ "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 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": "

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,\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
" + "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
" } } }, @@ -3255,19 +3818,19 @@ "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 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": "

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 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": "

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 \nattribute to verify that Amazon SQS received the message correctly. Amazon SQS URL-decodes the message before creating the MD5 digest.

" + "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": { @@ -3297,12 +3860,33 @@ "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": "

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
" + "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
" } }, "com.amazonaws.sqs#SetQueueAttributesRequest": { @@ -3318,7 +3902,7 @@ "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#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" @@ -3339,6 +3923,15 @@ "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" }, @@ -3367,9 +3960,8 @@ } }, "MaxNumberOfMessagesPerSecond": { - "target": "com.amazonaws.sqs#Integer", + "target": "com.amazonaws.sqs#NullableInteger", "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.

" } } @@ -3436,8 +4028,25 @@ "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": "

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
" + "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
" } }, "com.amazonaws.sqs#TagQueueRequest": { @@ -3472,7 +4081,11 @@ }, "com.amazonaws.sqs#TooManyEntriesInBatchRequest": { "type": "structure", - "members": {}, + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { "aws.protocols#awsQueryError": { "code": "AWS.SimpleQueueService.TooManyEntriesInBatchRequest", @@ -3485,7 +4098,11 @@ }, "com.amazonaws.sqs#UnsupportedOperation": { "type": "structure", - "members": {}, + "members": { + "message": { + "target": "com.amazonaws.sqs#ExceptionMessage" + } + }, "traits": { "aws.protocols#awsQueryError": { "code": "AWS.SimpleQueueService.UnsupportedOperation", @@ -3504,8 +4121,25 @@ "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": "

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
" + "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
" } }, "com.amazonaws.sqs#UntagQueueRequest": {