From 10014a819d3e8a2d1732b85b666f7cafd25590b7 Mon Sep 17 00:00:00 2001 From: awstools Date: Thu, 26 Oct 2023 18:27:14 +0000 Subject: [PATCH] feat(client-sns): Message Archiving and Replay is now supported in Amazon SNS for FIFO topics. --- .../commands/ConfirmSubscriptionCommand.ts | 3 + .../src/commands/DeleteTopicCommand.ts | 3 + .../src/commands/PublishBatchCommand.ts | 5 +- .../client-sns/src/commands/PublishCommand.ts | 5 +- .../SetSubscriptionAttributesCommand.ts | 3 + .../src/commands/SubscribeCommand.ts | 5 +- clients/client-sns/src/models/models_0.ts | 94 ++++++++++++++++++- clients/client-sns/src/protocols/Aws_query.ts | 68 ++++++++++++++ codegen/sdk-codegen/aws-models/sns.json | 56 ++++++++++- 9 files changed, 225 insertions(+), 17 deletions(-) diff --git a/clients/client-sns/src/commands/ConfirmSubscriptionCommand.ts b/clients/client-sns/src/commands/ConfirmSubscriptionCommand.ts index 274e71357379..9c57e5c88eac 100644 --- a/clients/client-sns/src/commands/ConfirmSubscriptionCommand.ts +++ b/clients/client-sns/src/commands/ConfirmSubscriptionCommand.ts @@ -85,6 +85,9 @@ export interface ConfirmSubscriptionCommandOutput extends ConfirmSubscriptionRes * @throws {@link NotFoundException} (client fault) *

Indicates that the requested resource does not exist.

* + * @throws {@link ReplayLimitExceededException} (client fault) + *

Indicates that the request parameter has exceeded the maximum number of concurrent message replays.

+ * * @throws {@link SubscriptionLimitExceededException} (client fault) *

Indicates that the customer already owns the maximum allowed number of * subscriptions.

diff --git a/clients/client-sns/src/commands/DeleteTopicCommand.ts b/clients/client-sns/src/commands/DeleteTopicCommand.ts index 7b9cbd211aa1..117aaf8df76a 100644 --- a/clients/client-sns/src/commands/DeleteTopicCommand.ts +++ b/clients/client-sns/src/commands/DeleteTopicCommand.ts @@ -76,6 +76,9 @@ export interface DeleteTopicCommandOutput extends __MetadataBearer {} *

Indicates that a request parameter does not comply with the associated * constraints.

* + * @throws {@link InvalidStateException} (client fault) + *

Indicates that the specified state is not a valid state for an event source.

+ * * @throws {@link NotFoundException} (client fault) *

Indicates that the requested resource does not exist.

* diff --git a/clients/client-sns/src/commands/PublishBatchCommand.ts b/clients/client-sns/src/commands/PublishBatchCommand.ts index 0de4c72e78e2..430cd1620669 100644 --- a/clients/client-sns/src/commands/PublishBatchCommand.ts +++ b/clients/client-sns/src/commands/PublishBatchCommand.ts @@ -149,13 +149,12 @@ export interface PublishBatchCommandOutput extends PublishBatchResponse, __Metad * to.

* * @throws {@link KMSDisabledException} (client fault) - *

The request was rejected because the specified customer master key (CMK) isn't + *

The request was rejected because the specified Amazon Web Services KMS key isn't * enabled.

* * @throws {@link KMSInvalidStateException} (client fault) *

The request was rejected because the state of the specified resource isn't valid for - * this request. For more information, see How Key State Affects Use of a - * Customer Master Key in the Key Management Service Developer + * this request. For more information, see Key states of Amazon Web Services KMS keys in the Key Management Service Developer * Guide.

* * @throws {@link KMSNotFoundException} (client fault) diff --git a/clients/client-sns/src/commands/PublishCommand.ts b/clients/client-sns/src/commands/PublishCommand.ts index 3d9d7cc01e46..ba24be80a6ac 100644 --- a/clients/client-sns/src/commands/PublishCommand.ts +++ b/clients/client-sns/src/commands/PublishCommand.ts @@ -118,13 +118,12 @@ export interface PublishCommandOutput extends PublishResponse, __MetadataBearer * to.

* * @throws {@link KMSDisabledException} (client fault) - *

The request was rejected because the specified customer master key (CMK) isn't + *

The request was rejected because the specified Amazon Web Services KMS key isn't * enabled.

* * @throws {@link KMSInvalidStateException} (client fault) *

The request was rejected because the state of the specified resource isn't valid for - * this request. For more information, see How Key State Affects Use of a - * Customer Master Key in the Key Management Service Developer + * this request. For more information, see Key states of Amazon Web Services KMS keys in the Key Management Service Developer * Guide.

* * @throws {@link KMSNotFoundException} (client fault) diff --git a/clients/client-sns/src/commands/SetSubscriptionAttributesCommand.ts b/clients/client-sns/src/commands/SetSubscriptionAttributesCommand.ts index 73adc8c4490a..8beb6d33733c 100644 --- a/clients/client-sns/src/commands/SetSubscriptionAttributesCommand.ts +++ b/clients/client-sns/src/commands/SetSubscriptionAttributesCommand.ts @@ -80,6 +80,9 @@ export interface SetSubscriptionAttributesCommandOutput extends __MetadataBearer * @throws {@link NotFoundException} (client fault) *

Indicates that the requested resource does not exist.

* + * @throws {@link ReplayLimitExceededException} (client fault) + *

Indicates that the request parameter has exceeded the maximum number of concurrent message replays.

+ * * @throws {@link SNSServiceException} *

Base exception class for all service exceptions from SNS service.

* diff --git a/clients/client-sns/src/commands/SubscribeCommand.ts b/clients/client-sns/src/commands/SubscribeCommand.ts index d755be67f6bc..b8dd6106d526 100644 --- a/clients/client-sns/src/commands/SubscribeCommand.ts +++ b/clients/client-sns/src/commands/SubscribeCommand.ts @@ -41,7 +41,7 @@ export interface SubscribeCommandOutput extends SubscribeResponse, __MetadataBea * if the endpoint and the topic are not in the same Amazon Web Services account, the endpoint owner must * run the ConfirmSubscription action to confirm the subscription.

*

You call the ConfirmSubscription action with the token from the - * subscription response. Confirmation tokens are valid for three days.

+ * subscription response. Confirmation tokens are valid for two days.

*

This action is throttled at 100 transactions per second (TPS).

* @example * Use a bare-bones client and the command you need to make an API call. @@ -94,6 +94,9 @@ export interface SubscribeCommandOutput extends SubscribeResponse, __MetadataBea * @throws {@link NotFoundException} (client fault) *

Indicates that the requested resource does not exist.

* + * @throws {@link ReplayLimitExceededException} (client fault) + *

Indicates that the request parameter has exceeded the maximum number of concurrent message replays.

+ * * @throws {@link SubscriptionLimitExceededException} (client fault) *

Indicates that the customer already owns the maximum allowed number of * subscriptions.

diff --git a/clients/client-sns/src/models/models_0.ts b/clients/client-sns/src/models/models_0.ts index 11fac159dc45..a651474ca79b 100644 --- a/clients/client-sns/src/models/models_0.ts +++ b/clients/client-sns/src/models/models_0.ts @@ -233,6 +233,26 @@ export class FilterPolicyLimitExceededException extends __BaseException { } } +/** + * @public + *

Indicates that the request parameter has exceeded the maximum number of concurrent message replays.

+ */ +export class ReplayLimitExceededException extends __BaseException { + readonly name: "ReplayLimitExceededException" = "ReplayLimitExceededException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ReplayLimitExceededException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ReplayLimitExceededException.prototype); + } +} + /** * @public *

Indicates that the customer already owns the maximum allowed number of @@ -544,8 +564,15 @@ export interface CreateTopicInput { *

    *
  • *

    - * FifoTopic – When this is set to true, a FIFO - * topic is created.

    + * ArchivePolicy – Adds or updates an inline policy document + * to archive messages stored in the specified Amazon SNS topic.

    + *
  • + *
  • + *

    + * BeginningArchiveTime – The earliest starting point at + * which a message in the topic’s archive can be replayed from. This point in time + * is based on the configured message retention period set by the topic’s message + * archiving policy.

    *
  • *
  • *

    @@ -780,6 +807,26 @@ export interface DeleteTopicInput { TopicArn: string | undefined; } +/** + * @public + *

    Indicates that the specified state is not a valid state for an event source.

    + */ +export class InvalidStateException extends __BaseException { + readonly name: "InvalidStateException" = "InvalidStateException"; + readonly $fault: "client" = "client"; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "InvalidStateException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, InvalidStateException.prototype); + } +} + /** * @public */ @@ -1812,7 +1859,7 @@ export class KMSAccessDeniedException extends __BaseException { /** * @public - *

    The request was rejected because the specified customer master key (CMK) isn't + *

    The request was rejected because the specified Amazon Web Services KMS key isn't * enabled.

    */ export class KMSDisabledException extends __BaseException { @@ -1834,8 +1881,7 @@ export class KMSDisabledException extends __BaseException { /** * @public *

    The request was rejected because the state of the specified resource isn't valid for - * this request. For more information, see How Key State Affects Use of a - * Customer Master Key in the Key Management Service Developer + * this request. For more information, see Key states of Amazon Web Services KMS keys in the Key Management Service Developer * Guide.

    */ export class KMSInvalidStateException extends __BaseException { @@ -3299,6 +3345,44 @@ export interface SubscribeInput { * to Kinesis Data Firehose delivery streams in the Amazon SNS Developer Guide.

    *
  • *
+ *

The following attributes apply only to FIFO topics:

+ *
    + *
  • + *

    + * ReplayPolicy – Adds or updates an inline policy document + * for a subscription to replay messages stored in the specified Amazon SNS + * topic.

    + *
  • + *
  • + *

    + * ReplayStatus – Retrieves the status of the subscription + * message replay, which can be one of the following:

    + *
      + *
    • + *

      + * Completed – The replay has successfully + * redelivered all messages, and is now delivering newly published + * messages. If an ending point was specified in the + * ReplayPolicy then the subscription will no longer + * receive newly published messages.

      + *
    • + *
    • + *

      + * In progress – The replay is currently replaying + * the selected messages.

      + *
    • + *
    • + *

      + * Failed – The replay was unable to complete.

      + *
    • + *
    • + *

      + * Pending – The default state while the replay + * initiates.

      + *
    • + *
    + *
  • + *
*/ Attributes?: Record; diff --git a/clients/client-sns/src/protocols/Aws_query.ts b/clients/client-sns/src/protocols/Aws_query.ts index c60594a1eec2..94356c1a7814 100644 --- a/clients/client-sns/src/protocols/Aws_query.ts +++ b/clients/client-sns/src/protocols/Aws_query.ts @@ -181,6 +181,7 @@ import { InvalidParameterException, InvalidParameterValueException, InvalidSecurityException, + InvalidStateException, KMSAccessDeniedException, KMSDisabledException, KMSInvalidStateException, @@ -222,6 +223,7 @@ import { PublishResponse, PutDataProtectionPolicyInput, RemovePermissionInput, + ReplayLimitExceededException, ResourceNotFoundException, SetEndpointAttributesInput, SetPlatformApplicationAttributesInput, @@ -1124,6 +1126,9 @@ const de_ConfirmSubscriptionCommandError = async ( case "NotFound": case "com.amazonaws.sns#NotFoundException": throw await de_NotFoundExceptionRes(parsedOutput, context); + case "ReplayLimitExceeded": + case "com.amazonaws.sns#ReplayLimitExceededException": + throw await de_ReplayLimitExceededExceptionRes(parsedOutput, context); case "SubscriptionLimitExceeded": case "com.amazonaws.sns#SubscriptionLimitExceededException": throw await de_SubscriptionLimitExceededExceptionRes(parsedOutput, context); @@ -1576,6 +1581,9 @@ const de_DeleteTopicCommandError = async ( case "InvalidParameter": case "com.amazonaws.sns#InvalidParameterException": throw await de_InvalidParameterExceptionRes(parsedOutput, context); + case "InvalidState": + case "com.amazonaws.sns#InvalidStateException": + throw await de_InvalidStateExceptionRes(parsedOutput, context); case "NotFound": case "com.amazonaws.sns#NotFoundException": throw await de_NotFoundExceptionRes(parsedOutput, context); @@ -3035,6 +3043,9 @@ const de_SetSubscriptionAttributesCommandError = async ( case "NotFound": case "com.amazonaws.sns#NotFoundException": throw await de_NotFoundExceptionRes(parsedOutput, context); + case "ReplayLimitExceeded": + case "com.amazonaws.sns#ReplayLimitExceededException": + throw await de_ReplayLimitExceededExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; return throwDefaultError({ @@ -3151,6 +3162,9 @@ const de_SubscribeCommandError = async ( case "NotFound": case "com.amazonaws.sns#NotFoundException": throw await de_NotFoundExceptionRes(parsedOutput, context); + case "ReplayLimitExceeded": + case "com.amazonaws.sns#ReplayLimitExceededException": + throw await de_ReplayLimitExceededExceptionRes(parsedOutput, context); case "SubscriptionLimitExceeded": case "com.amazonaws.sns#SubscriptionLimitExceededException": throw await de_SubscriptionLimitExceededExceptionRes(parsedOutput, context); @@ -3600,6 +3614,22 @@ const de_InvalidSecurityExceptionRes = async ( return __decorateServiceException(exception, body); }; +/** + * deserializeAws_queryInvalidStateExceptionRes + */ +const de_InvalidStateExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = de_InvalidStateException(body.Error, context); + const exception = new InvalidStateException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + /** * deserializeAws_queryKMSAccessDeniedExceptionRes */ @@ -3735,6 +3765,22 @@ const de_PlatformApplicationDisabledExceptionRes = async ( return __decorateServiceException(exception, body); }; +/** + * deserializeAws_queryReplayLimitExceededExceptionRes + */ +const de_ReplayLimitExceededExceptionRes = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = de_ReplayLimitExceededException(body.Error, context); + const exception = new ReplayLimitExceededException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + /** * deserializeAws_queryResourceNotFoundExceptionRes */ @@ -5171,6 +5217,17 @@ const de_InvalidSecurityException = (output: any, context: __SerdeContext): Inva return contents; }; +/** + * deserializeAws_queryInvalidStateException + */ +const de_InvalidStateException = (output: any, context: __SerdeContext): InvalidStateException => { + const contents: any = {}; + if (output["message"] !== undefined) { + contents.message = __expectString(output["message"]); + } + return contents; +}; + /** * deserializeAws_queryKMSAccessDeniedException */ @@ -5624,6 +5681,17 @@ const de_PublishResponse = (output: any, context: __SerdeContext): PublishRespon return contents; }; +/** + * deserializeAws_queryReplayLimitExceededException + */ +const de_ReplayLimitExceededException = (output: any, context: __SerdeContext): ReplayLimitExceededException => { + const contents: any = {}; + if (output["message"] !== undefined) { + contents.message = __expectString(output["message"]); + } + return contents; +}; + /** * deserializeAws_queryResourceNotFoundException */ diff --git a/codegen/sdk-codegen/aws-models/sns.json b/codegen/sdk-codegen/aws-models/sns.json index 3423c428dcf3..51bafdd44211 100644 --- a/codegen/sdk-codegen/aws-models/sns.json +++ b/codegen/sdk-codegen/aws-models/sns.json @@ -1481,6 +1481,9 @@ { "target": "com.amazonaws.sns#NotFoundException" }, + { + "target": "com.amazonaws.sns#ReplayLimitExceededException" + }, { "target": "com.amazonaws.sns#SubscriptionLimitExceededException" } @@ -1791,7 +1794,7 @@ "Attributes": { "target": "com.amazonaws.sns#TopicAttributesMap", "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 CreateTopic action uses:

\n
    \n
  • \n

    \n DeliveryPolicy – The policy that defines how Amazon SNS retries\n failed deliveries to HTTP/S endpoints.

    \n
  • \n
  • \n

    \n DisplayName – The display name to use for a topic with SMS\n subscriptions.

    \n
  • \n
  • \n

    \n FifoTopic – Set to true to create a FIFO topic.

    \n
  • \n
  • \n

    \n Policy – The policy that defines who can access your\n topic. By default, only the topic owner can publish or subscribe to the\n topic.

    \n
  • \n
  • \n

    \n SignatureVersion – The signature version corresponds to\n the hashing algorithm used while creating the signature of the notifications,\n subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS.\n By default, SignatureVersion is set to 1.

    \n
  • \n
  • \n

    \n TracingConfig – Tracing mode of an Amazon SNS topic. By default\n TracingConfig is set to PassThrough, and the topic\n passes through the tracing header it receives from an Amazon SNS publisher to its\n subscriptions. If set to Active, Amazon SNS will vend X-Ray segment data\n to topic owner account if the sampled flag in the tracing header is true. This\n is only supported on standard topics.

    \n
  • \n
\n

The following attribute applies only to server-side\n encryption:

\n
    \n
  • \n

    \n KmsMasterKeyId – The ID of an Amazon Web Services managed customer master\n key (CMK) for Amazon SNS or a custom CMK. For more information, see Key\n Terms. For more examples, see KeyId in the Key Management Service API Reference.

    \n
  • \n
\n

The following attributes apply only to FIFO topics:

\n
    \n
  • \n

    \n FifoTopic – When this is set to true, a FIFO\n topic is created.

    \n
  • \n
  • \n

    \n ContentBasedDeduplication – Enables content-based deduplication for\n FIFO topics.

    \n
      \n
    • \n

      By default, ContentBasedDeduplication is set to false.\n If you create a FIFO topic and this attribute is false, you must\n specify a value for the MessageDeduplicationId parameter for the\n Publish action.

      \n
    • \n
    • \n

      When you set ContentBasedDeduplication to true, \n Amazon SNS uses a SHA-256 hash to generate the MessageDeduplicationId using \n the body of the message (but not the attributes of the message).

      \n

      (Optional) To override the generated value, you can specify a value\n for the MessageDeduplicationId parameter for the Publish\n action.

      \n
    • \n
    \n
  • \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 CreateTopic action uses:

\n
    \n
  • \n

    \n DeliveryPolicy – The policy that defines how Amazon SNS retries\n failed deliveries to HTTP/S endpoints.

    \n
  • \n
  • \n

    \n DisplayName – The display name to use for a topic with SMS\n subscriptions.

    \n
  • \n
  • \n

    \n FifoTopic – Set to true to create a FIFO topic.

    \n
  • \n
  • \n

    \n Policy – The policy that defines who can access your\n topic. By default, only the topic owner can publish or subscribe to the\n topic.

    \n
  • \n
  • \n

    \n SignatureVersion – The signature version corresponds to\n the hashing algorithm used while creating the signature of the notifications,\n subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS.\n By default, SignatureVersion is set to 1.

    \n
  • \n
  • \n

    \n TracingConfig – Tracing mode of an Amazon SNS topic. By default\n TracingConfig is set to PassThrough, and the topic\n passes through the tracing header it receives from an Amazon SNS publisher to its\n subscriptions. If set to Active, Amazon SNS will vend X-Ray segment data\n to topic owner account if the sampled flag in the tracing header is true. This\n is only supported on standard topics.

    \n
  • \n
\n

The following attribute applies only to server-side\n encryption:

\n
    \n
  • \n

    \n KmsMasterKeyId – The ID of an Amazon Web Services managed customer master\n key (CMK) for Amazon SNS or a custom CMK. For more information, see Key\n Terms. For more examples, see KeyId in the Key Management Service API Reference.

    \n
  • \n
\n

The following attributes apply only to FIFO topics:

\n
    \n
  • \n

    \n ArchivePolicy – Adds or updates an inline policy document\n to archive messages stored in the specified Amazon SNS topic.

    \n
  • \n
  • \n

    \n BeginningArchiveTime – The earliest starting point at\n which a message in the topic’s archive can be replayed from. This point in time\n is based on the configured message retention period set by the topic’s message\n archiving policy.

    \n
  • \n
  • \n

    \n ContentBasedDeduplication – Enables content-based deduplication for\n FIFO topics.

    \n
      \n
    • \n

      By default, ContentBasedDeduplication is set to false.\n If you create a FIFO topic and this attribute is false, you must\n specify a value for the MessageDeduplicationId parameter for the\n Publish action.

      \n
    • \n
    • \n

      When you set ContentBasedDeduplication to true, \n Amazon SNS uses a SHA-256 hash to generate the MessageDeduplicationId using \n the body of the message (but not the attributes of the message).

      \n

      (Optional) To override the generated value, you can specify a value\n for the MessageDeduplicationId parameter for the Publish\n action.

      \n
    • \n
    \n
  • \n
" } }, "Tags": { @@ -1986,6 +1989,9 @@ { "target": "com.amazonaws.sns#InvalidParameterException" }, + { + "target": "com.amazonaws.sns#InvalidStateException" + }, { "target": "com.amazonaws.sns#NotFoundException" }, @@ -2571,6 +2577,23 @@ "smithy.api#httpError": 403 } }, + "com.amazonaws.sns#InvalidStateException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sns#String" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "InvalidState", + "httpResponseCode": 400 + }, + "smithy.api#documentation": "

Indicates that the specified state is not a valid state for an event source.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, "com.amazonaws.sns#Iso2CountryCode": { "type": "string", "traits": { @@ -2611,7 +2634,7 @@ "code": "KMSDisabled", "httpResponseCode": 400 }, - "smithy.api#documentation": "

The request was rejected because the specified customer master key (CMK) isn't\n enabled.

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

The request was rejected because the specified Amazon Web Services KMS key isn't\n enabled.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -2628,7 +2651,7 @@ "code": "KMSInvalidState", "httpResponseCode": 400 }, - "smithy.api#documentation": "

The request was rejected because the state of the specified resource isn't valid for\n this request. For more information, see How Key State Affects Use of a\n Customer Master Key in the Key Management Service Developer\n Guide.

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

The request was rejected because the state of the specified resource isn't valid for\n this request. For more information, see Key states of Amazon Web Services KMS keys in the Key Management Service Developer\n Guide.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } @@ -4164,6 +4187,23 @@ "smithy.api#input": {} } }, + "com.amazonaws.sns#ReplayLimitExceededException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.sns#String" + } + }, + "traits": { + "aws.protocols#awsQueryError": { + "code": "ReplayLimitExceeded", + "httpResponseCode": 403 + }, + "smithy.api#documentation": "

Indicates that the request parameter has exceeded the maximum number of concurrent message replays.

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, "com.amazonaws.sns#ResourceNotFoundException": { "type": "structure", "members": { @@ -4424,6 +4464,9 @@ }, { "target": "com.amazonaws.sns#NotFoundException" + }, + { + "target": "com.amazonaws.sns#ReplayLimitExceededException" } ], "traits": { @@ -4564,12 +4607,15 @@ { "target": "com.amazonaws.sns#NotFoundException" }, + { + "target": "com.amazonaws.sns#ReplayLimitExceededException" + }, { "target": "com.amazonaws.sns#SubscriptionLimitExceededException" } ], "traits": { - "smithy.api#documentation": "

Subscribes an endpoint to an Amazon SNS topic. If the endpoint type is HTTP/S or email, or\n if the endpoint and the topic are not in the same Amazon Web Services account, the endpoint owner must\n run the ConfirmSubscription action to confirm the subscription.

\n

You call the ConfirmSubscription action with the token from the\n subscription response. Confirmation tokens are valid for three days.

\n

This action is throttled at 100 transactions per second (TPS).

" + "smithy.api#documentation": "

Subscribes an endpoint to an Amazon SNS topic. If the endpoint type is HTTP/S or email, or\n if the endpoint and the topic are not in the same Amazon Web Services account, the endpoint owner must\n run the ConfirmSubscription action to confirm the subscription.

\n

You call the ConfirmSubscription action with the token from the\n subscription response. Confirmation tokens are valid for two days.

\n

This action is throttled at 100 transactions per second (TPS).

" } }, "com.amazonaws.sns#SubscribeInput": { @@ -4598,7 +4644,7 @@ "Attributes": { "target": "com.amazonaws.sns#SubscriptionAttributesMap", "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 Subscribe action uses:

\n
    \n
  • \n

    \n DeliveryPolicy – The policy that defines how Amazon SNS retries\n failed deliveries to HTTP/S endpoints.

    \n
  • \n
  • \n

    \n FilterPolicy – The simple JSON object that lets your\n subscriber receive only a subset of messages, rather than receiving every\n message published to the topic.

    \n
  • \n
  • \n

    \n FilterPolicyScope – This attribute lets you choose the\n filtering scope by using one of the following string value types:

    \n
      \n
    • \n

      \n MessageAttributes (default) – The filter is\n applied on the message attributes.

      \n
    • \n
    • \n

      \n MessageBody – The filter is applied on the message\n body.

      \n
    • \n
    \n
  • \n
  • \n

    \n RawMessageDelivery – When set to true,\n enables raw message delivery to Amazon SQS or HTTP/S endpoints. This eliminates the\n need for the endpoints to process JSON formatting, which is otherwise created\n for Amazon SNS metadata.

    \n
  • \n
  • \n

    \n RedrivePolicy – When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue. \n Messages that can't be delivered due to client errors (for example, when the subscribed endpoint is unreachable)\n or server errors (for example, when the service that powers the subscribed endpoint becomes unavailable) are held \n in the dead-letter queue for further analysis or reprocessing.

    \n
  • \n
\n

The following attribute applies only to Amazon Kinesis Data Firehose delivery stream subscriptions:

\n
    \n
  • \n

    \n SubscriptionRoleArn – The ARN of the IAM role that has the following:

    \n
      \n
    • \n

      Permission to write to the Kinesis Data Firehose delivery stream

      \n
    • \n
    • \n

      Amazon SNS listed as a trusted entity

      \n
    • \n
    \n

    Specifying a valid ARN for this attribute is required for Kinesis Data Firehose delivery stream subscriptions. \n For more information, see Fanout \n to Kinesis Data Firehose delivery streams in the Amazon SNS Developer Guide.

    \n
  • \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 Subscribe action uses:

\n
    \n
  • \n

    \n DeliveryPolicy – The policy that defines how Amazon SNS retries\n failed deliveries to HTTP/S endpoints.

    \n
  • \n
  • \n

    \n FilterPolicy – The simple JSON object that lets your\n subscriber receive only a subset of messages, rather than receiving every\n message published to the topic.

    \n
  • \n
  • \n

    \n FilterPolicyScope – This attribute lets you choose the\n filtering scope by using one of the following string value types:

    \n
      \n
    • \n

      \n MessageAttributes (default) – The filter is\n applied on the message attributes.

      \n
    • \n
    • \n

      \n MessageBody – The filter is applied on the message\n body.

      \n
    • \n
    \n
  • \n
  • \n

    \n RawMessageDelivery – When set to true,\n enables raw message delivery to Amazon SQS or HTTP/S endpoints. This eliminates the\n need for the endpoints to process JSON formatting, which is otherwise created\n for Amazon SNS metadata.

    \n
  • \n
  • \n

    \n RedrivePolicy – When specified, sends undeliverable messages to the specified Amazon SQS dead-letter queue. \n Messages that can't be delivered due to client errors (for example, when the subscribed endpoint is unreachable)\n or server errors (for example, when the service that powers the subscribed endpoint becomes unavailable) are held \n in the dead-letter queue for further analysis or reprocessing.

    \n
  • \n
\n

The following attribute applies only to Amazon Kinesis Data Firehose delivery stream subscriptions:

\n
    \n
  • \n

    \n SubscriptionRoleArn – The ARN of the IAM role that has the following:

    \n
      \n
    • \n

      Permission to write to the Kinesis Data Firehose delivery stream

      \n
    • \n
    • \n

      Amazon SNS listed as a trusted entity

      \n
    • \n
    \n

    Specifying a valid ARN for this attribute is required for Kinesis Data Firehose delivery stream subscriptions. \n For more information, see Fanout \n to Kinesis Data Firehose delivery streams in the Amazon SNS Developer Guide.

    \n
  • \n
\n

The following attributes apply only to FIFO topics:

\n
    \n
  • \n

    \n ReplayPolicy – Adds or updates an inline policy document\n for a subscription to replay messages stored in the specified Amazon SNS\n topic.

    \n
  • \n
  • \n

    \n ReplayStatus – Retrieves the status of the subscription\n message replay, which can be one of the following:

    \n
      \n
    • \n

      \n Completed – The replay has successfully\n redelivered all messages, and is now delivering newly published\n messages. If an ending point was specified in the\n ReplayPolicy then the subscription will no longer\n receive newly published messages.

      \n
    • \n
    • \n

      \n In progress – The replay is currently replaying\n the selected messages.

      \n
    • \n
    • \n

      \n Failed – The replay was unable to complete.

      \n
    • \n
    • \n

      \n Pending – The default state while the replay\n initiates.

      \n
    • \n
    \n
  • \n
" } }, "ReturnSubscriptionArn": {