Skip to content

Commit

Permalink
docs(client-sns): This release adds the message payload-filtering fea…
Browse files Browse the repository at this point in the history
…ture to the SNS Subscribe, SetSubscriptionAttributes, and GetSubscriptionAttributes API actions
  • Loading branch information
awstools committed Dec 2, 2022
1 parent 4f42dff commit 8d9c286
Show file tree
Hide file tree
Showing 23 changed files with 790 additions and 558 deletions.
4 changes: 2 additions & 2 deletions clients/client-sns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ AWS SDK for JavaScript SNS Client for Node.js, Browser and React Native.

<fullname>Amazon Simple Notification Service</fullname>

<p>Amazon Simple Notification Service (Amazon SNS) is a web service that enables you to build
distributed web-enabled applications. Applications can use Amazon SNS to easily push
<p>Amazon Simple Notification Service (Amazon SNS) is a web service that enables you
to build distributed web-enabled applications. Applications can use Amazon SNS to easily push
real-time notification messages to interested subscribers over multiple delivery
protocols. For more information about this product see the <a href="http://aws.amazon.com/sns/">Amazon SNS product page</a>. For detailed information about Amazon SNS features
and their associated API calls, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/">Amazon SNS Developer Guide</a>. </p>
Expand Down
115 changes: 76 additions & 39 deletions clients/client-sns/src/SNS.ts

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions clients/client-sns/src/SNSClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,8 @@ export interface SNSClientResolvedConfig extends SNSClientResolvedConfigType {}

/**
* <fullname>Amazon Simple Notification Service</fullname>
* <p>Amazon Simple Notification Service (Amazon SNS) is a web service that enables you to build
* distributed web-enabled applications. Applications can use Amazon SNS to easily push
* <p>Amazon Simple Notification Service (Amazon SNS) is a web service that enables you
* to build distributed web-enabled applications. Applications can use Amazon SNS to easily push
* real-time notification messages to interested subscribers over multiple delivery
* protocols. For more information about this product see the <a href="http://aws.amazon.com/sns/">Amazon SNS product page</a>. For detailed information about Amazon SNS features
* and their associated API calls, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/">Amazon SNS Developer Guide</a>. </p>
Expand Down
5 changes: 5 additions & 0 deletions clients/client-sns/src/commands/AddPermissionCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ export interface AddPermissionCommandOutput extends __MetadataBearer {}
/**
* <p>Adds a statement to a topic's access control policy, granting access for the specified
* Amazon Web Services accounts to the specified actions.</p>
* <note>
* <p>To remove the ability to change topic permissions, you must deny permissions to
* the <code>AddPermission</code>, <code>RemovePermission</code>, and
* <code>SetTopicAttributes</code> actions in your IAM policy.</p>
* </note>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export interface CheckIfPhoneNumberIsOptedOutCommandOutput

/**
* <p>Accepts a phone number and indicates whether the phone holder has opted out of
* receiving SMS messages from your Amazon Web Services account. You cannot send SMS messages to a number that
* is opted out.</p>
* receiving SMS messages from your Amazon Web Services account. You cannot send SMS messages to a number
* that is opted out.</p>
* <p>To resume sending messages, you can opt in the number by using the
* <code>OptInPhoneNumber</code> action.</p>
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ export interface CreatePlatformApplicationCommandOutput extends CreatePlatformAp
* and <code>PlatformCredential</code> is <code>secret key</code>.</p>
* </li>
* <li>
* <p>For <code>APNS</code> and <code>APNS_SANDBOX</code> using certificate credentials,
* <code>PlatformPrincipal</code> is <code>SSL certificate</code> and
* <p>For <code>APNS</code> and <code>APNS_SANDBOX</code> using certificate
* credentials, <code>PlatformPrincipal</code> is <code>SSL certificate</code> and
* <code>PlatformCredential</code> is <code>private key</code>.</p>
* </li>
* <li>
* <p>For <code>APNS</code> and <code>APNS_SANDBOX</code> using token credentials,
* <code>PlatformPrincipal</code> is <code>signing key ID</code> and
* <code>PlatformCredential</code> is <code>signing key</code>.</p>
* <code>PlatformPrincipal</code> is <code>signing key ID</code> and
* <code>PlatformCredential</code> is <code>signing key</code>.</p>
* </li>
* <li>
* <p>For <code>GCM</code> (Firebase Cloud Messaging), there is no
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ export interface CreatePlatformEndpointCommandOutput extends CreateEndpointRespo
* Notifications</a>. </p>
* <p>When using <code>CreatePlatformEndpoint</code> with Baidu, two attributes must be
* provided: ChannelId and UserId. The token field must also contain the ChannelId. For
* more information, see <a href="https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePushBaiduEndpoint.html">Creating an Amazon SNS Endpoint
* for Baidu</a>. </p>
* more information, see <a href="https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePushBaiduEndpoint.html">Creating an Amazon SNS Endpoint for
* Baidu</a>. </p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ export interface DeleteSMSSandboxPhoneNumberCommandInput extends DeleteSMSSandbo
export interface DeleteSMSSandboxPhoneNumberCommandOutput extends DeleteSMSSandboxPhoneNumberResult, __MetadataBearer {}

/**
* <p>Deletes an Amazon Web Services account's verified or pending phone number from the SMS sandbox.</p>
* <p>Deletes an Amazon Web Services account's verified or pending phone number from the SMS
* sandbox.</p>
* <p>When you start using Amazon SNS to send SMS messages, your Amazon Web Services account is in the
* <i>SMS sandbox</i>. The SMS sandbox provides a safe environment for
* you to try Amazon SNS features without risking your reputation as an SMS sender. While your
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ export interface GetDataProtectionPolicyCommandInput extends GetDataProtectionPo
export interface GetDataProtectionPolicyCommandOutput extends GetDataProtectionPolicyResponse, __MetadataBearer {}

/**
* <p>Retrieves the specified inline <code>DataProtectionPolicy</code> document that is stored in the specified Amazon SNS topic. </p>
* <p>Retrieves the specified inline <code>DataProtectionPolicy</code> document that is
* stored in the specified Amazon SNS topic. </p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ export interface GetSMSSandboxAccountStatusCommandInput extends GetSMSSandboxAcc
export interface GetSMSSandboxAccountStatusCommandOutput extends GetSMSSandboxAccountStatusResult, __MetadataBearer {}

/**
* <p>Retrieves the SMS sandbox status for the calling Amazon Web Services account in the target Amazon Web Services Region.</p>
* <p>Retrieves the SMS sandbox status for the calling Amazon Web Services account in the target
* Amazon Web Services Region.</p>
* <p>When you start using Amazon SNS to send SMS messages, your Amazon Web Services account is in the
* <i>SMS sandbox</i>. The SMS sandbox provides a safe environment for
* you to try Amazon SNS features without risking your reputation as an SMS sender. While your
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export interface ListOriginationNumbersCommandInput extends ListOriginationNumbe
export interface ListOriginationNumbersCommandOutput extends ListOriginationNumbersResult, __MetadataBearer {}

/**
* <p>Lists the calling Amazon Web Services account's dedicated origination numbers and their metadata. For
* more information about origination numbers, see <a href="https://docs.aws.amazon.com/sns/latest/dg/channels-sms-originating-identities-origination-numbers.html">Origination numbers</a> in the <i>Amazon SNS Developer
* <p>Lists the calling Amazon Web Services account's dedicated origination numbers and their metadata.
* For more information about origination numbers, see <a href="https://docs.aws.amazon.com/sns/latest/dg/channels-sms-originating-identities-origination-numbers.html">Origination numbers</a> in the <i>Amazon SNS Developer
* Guide</i>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export interface ListSMSSandboxPhoneNumbersCommandInput extends ListSMSSandboxPh
export interface ListSMSSandboxPhoneNumbersCommandOutput extends ListSMSSandboxPhoneNumbersResult, __MetadataBearer {}

/**
* <p>Lists the calling Amazon Web Services account's current verified and pending destination phone numbers
* in the SMS sandbox.</p>
* <p>Lists the calling Amazon Web Services account's current verified and pending destination phone
* numbers in the SMS sandbox.</p>
* <p>When you start using Amazon SNS to send SMS messages, your Amazon Web Services account is in the
* <i>SMS sandbox</i>. The SMS sandbox provides a safe environment for
* you to try Amazon SNS features without risking your reputation as an SMS sender. While your
Expand Down
31 changes: 21 additions & 10 deletions clients/client-sns/src/commands/PublishBatchCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,27 @@ export interface PublishBatchCommandInput extends PublishBatchInput {}
export interface PublishBatchCommandOutput extends PublishBatchResponse, __MetadataBearer {}

/**
* <p>Publishes up to ten messages to the specified topic. This is a batch version of <code>Publish</code>. For FIFO topics, multiple messages within a single batch are published in the order they are sent, and messages are deduplicated within the batch and across batches for 5 minutes.</p>
* <p>The result of publishing 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 <code>200</code>.</p>
* <p>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 KB (262,144 bytes). </p>
* <p>Some actions take lists of parameters. These lists are specified using the <code>param.n</code> notation. Values of <code>n</code> are integers starting from 1. For example, a parameter list with two elements looks like this: </p>
* <p>&AttributeName.1=first</p>
* <p>&AttributeName.2=second</p>
* <p>If you send a batch message to a topic, Amazon SNS publishes the batch message to each endpoint that is
* subscribed to the topic. The format of the batch message depends on the notification protocol
* for each subscribed endpoint.</p>
* <p>When a <code>messageId</code> is returned, the batch message is saved and Amazon SNS immediately delivers the message to subscribers.</p>
* <p>Publishes up to ten messages to the specified topic. This is a batch version of
* <code>Publish</code>. For FIFO topics, multiple messages within a single batch are
* published in the order they are sent, and messages are deduplicated within the batch and
* across batches for 5 minutes.</p>
* <p>The result of publishing 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 <code>200</code>.</p>
* <p>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 KB (262,144
* bytes). </p>
* <p>Some actions take lists of parameters. These lists are specified using the
* <code>param.n</code> notation. Values of <code>n</code> are integers starting from
* 1. For example, a parameter list with two elements looks like this: </p>
* <p>&AttributeName.1=first</p>
* <p>&AttributeName.2=second</p>
* <p>If you send a batch message to a topic, Amazon SNS publishes the batch message to each
* endpoint that is subscribed to the topic. The format of the batch message depends on the
* notification protocol for each subscribed endpoint.</p>
* <p>When a <code>messageId</code> is returned, the batch message is saved and Amazon SNS
* immediately delivers the message to subscribers.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
7 changes: 4 additions & 3 deletions clients/client-sns/src/commands/PublishCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,17 @@ export interface PublishCommandOutput extends PublishResponse, __MetadataBearer
* <p>If you send a message to a topic, Amazon SNS delivers the message to each endpoint that is
* subscribed to the topic. The format of the message depends on the notification protocol
* for each subscribed endpoint.</p>
* <p>When a <code>messageId</code> is returned, the message is saved and Amazon SNS
* immediately delivers it to subscribers.</p>
* <p>When a <code>messageId</code> is returned, the message is saved and Amazon SNS immediately
* delivers it to subscribers.</p>
* <p>To use the <code>Publish</code> action for publishing a message to a mobile endpoint,
* such as an app on a Kindle device or mobile phone, you must specify the EndpointArn for
* the TargetArn parameter. The EndpointArn is returned when making a call with the
* <code>CreatePlatformEndpoint</code> action. </p>
* <p>For more information about formatting messages, see <a href="https://docs.aws.amazon.com/sns/latest/dg/mobile-push-send-custommessage.html">Send Custom
* Platform-Specific Payloads in Messages to Mobile Devices</a>. </p>
* <important>
* <p>You can publish messages only to topics and endpoints in the same Amazon Web Services Region.</p>
* <p>You can publish messages only to topics and endpoints in the same
* Amazon Web Services Region.</p>
* </important>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ export interface PutDataProtectionPolicyCommandInput extends PutDataProtectionPo
export interface PutDataProtectionPolicyCommandOutput extends __MetadataBearer {}

/**
* <p>Adds or updates an inline policy document that is stored in the specified Amazon SNS topic.</p>
* <p>Adds or updates an inline policy document that is stored in the specified Amazon SNS
* topic.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
5 changes: 5 additions & 0 deletions clients/client-sns/src/commands/RemovePermissionCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ export interface RemovePermissionCommandOutput extends __MetadataBearer {}

/**
* <p>Removes a statement from a topic's access control policy.</p>
* <note>
* <p>To remove the ability to change topic permissions, you must deny permissions to
* the <code>AddPermission</code>, <code>RemovePermission</code>, and
* <code>SetTopicAttributes</code> actions in your IAM policy.</p>
* </note>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
5 changes: 5 additions & 0 deletions clients/client-sns/src/commands/SetTopicAttributesCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ export interface SetTopicAttributesCommandOutput extends __MetadataBearer {}

/**
* <p>Allows a topic owner to set an attribute of the topic to a new value.</p>
* <note>
* <p>To remove the ability to change topic permissions, you must deny permissions to
* the <code>AddPermission</code>, <code>RemovePermission</code>, and
* <code>SetTopicAttributes</code> actions in your IAM policy.</p>
* </note>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
4 changes: 2 additions & 2 deletions clients/client-sns/src/commands/TagResourceCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export interface TagResourceCommandOutput extends TagResourceResponse, __Metadat
* existing tag.</p>
* </li>
* <li>
* <p>Tagging actions are limited to 10 TPS per Amazon Web Services account, per Amazon Web Services Region. If your
* application requires a higher throughput, file a <a href="https://console.aws.amazon.com/support/home#/case/create?issueType=technical">technical support request</a>.</p>
* <p>Tagging actions are limited to 10 TPS per Amazon Web Services account, per Amazon Web Services Region. If
* your application requires a higher throughput, file a <a href="https://console.aws.amazon.com/support/home#/case/create?issueType=technical">technical support request</a>.</p>
* </li>
* </ul>
* @example
Expand Down
15 changes: 10 additions & 5 deletions clients/client-sns/src/commands/UnsubscribeCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,16 @@ export interface UnsubscribeCommandOutput extends __MetadataBearer {}

/**
* <p>Deletes a subscription. If the subscription requires authentication for deletion, only
* the owner of the subscription or the topic's owner can unsubscribe, and an Amazon Web Services signature
* is required. If the <code>Unsubscribe</code> call does not require authentication and
* the requester is not the subscription owner, a final cancellation message is delivered
* to the endpoint, so that the endpoint owner can easily resubscribe to the topic if the
* <code>Unsubscribe</code> request was unintended.</p>
* the owner of the subscription or the topic's owner can unsubscribe, and an Amazon Web Services
* signature is required. If the <code>Unsubscribe</code> call does not require
* authentication and the requester is not the subscription owner, a final cancellation
* message is delivered to the endpoint, so that the endpoint owner can easily resubscribe
* to the topic if the <code>Unsubscribe</code> request was unintended.</p>
* <note>
* <p>Amazon SQS queue subscriptions require authentication for deletion. Only the owner of
* the subscription, or the owner of the topic can unsubscribe using the required Amazon Web Services
* signature.</p>
* </note>
* <p>This action is throttled at 100 transactions per second (TPS).</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ export interface VerifySMSSandboxPhoneNumberCommandInput extends VerifySMSSandbo
export interface VerifySMSSandboxPhoneNumberCommandOutput extends VerifySMSSandboxPhoneNumberResult, __MetadataBearer {}

/**
* <p>Verifies a destination phone number with a one-time password (OTP) for the calling Amazon Web Services account.</p>
* <p>Verifies a destination phone number with a one-time password (OTP) for the calling
* Amazon Web Services account.</p>
* <p>When you start using Amazon SNS to send SMS messages, your Amazon Web Services account is in the
* <i>SMS sandbox</i>. The SMS sandbox provides a safe environment for
* you to try Amazon SNS features without risking your reputation as an SMS sender. While your
Expand Down
Loading

0 comments on commit 8d9c286

Please sign in to comment.