Skip to content

Commit 8d9c286

Browse files
author
awstools
committed
docs(client-sns): This release adds the message payload-filtering feature to the SNS Subscribe, SetSubscriptionAttributes, and GetSubscriptionAttributes API actions
1 parent 4f42dff commit 8d9c286

23 files changed

+790
-558
lines changed

clients/client-sns/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ AWS SDK for JavaScript SNS Client for Node.js, Browser and React Native.
1111

1212
<fullname>Amazon Simple Notification Service</fullname>
1313

14-
<p>Amazon Simple Notification Service (Amazon SNS) is a web service that enables you to build
15-
distributed web-enabled applications. Applications can use Amazon SNS to easily push
14+
<p>Amazon Simple Notification Service (Amazon SNS) is a web service that enables you
15+
to build distributed web-enabled applications. Applications can use Amazon SNS to easily push
1616
real-time notification messages to interested subscribers over multiple delivery
1717
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
1818
and their associated API calls, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/">Amazon SNS Developer Guide</a>. </p>

clients/client-sns/src/SNS.ts

Lines changed: 76 additions & 39 deletions
Large diffs are not rendered by default.

clients/client-sns/src/SNSClient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,8 @@ export interface SNSClientResolvedConfig extends SNSClientResolvedConfigType {}
408408

409409
/**
410410
* <fullname>Amazon Simple Notification Service</fullname>
411-
* <p>Amazon Simple Notification Service (Amazon SNS) is a web service that enables you to build
412-
* distributed web-enabled applications. Applications can use Amazon SNS to easily push
411+
* <p>Amazon Simple Notification Service (Amazon SNS) is a web service that enables you
412+
* to build distributed web-enabled applications. Applications can use Amazon SNS to easily push
413413
* real-time notification messages to interested subscribers over multiple delivery
414414
* 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
415415
* and their associated API calls, see the <a href="https://docs.aws.amazon.com/sns/latest/dg/">Amazon SNS Developer Guide</a>. </p>

clients/client-sns/src/commands/AddPermissionCommand.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ export interface AddPermissionCommandOutput extends __MetadataBearer {}
2626
/**
2727
* <p>Adds a statement to a topic's access control policy, granting access for the specified
2828
* Amazon Web Services accounts to the specified actions.</p>
29+
* <note>
30+
* <p>To remove the ability to change topic permissions, you must deny permissions to
31+
* the <code>AddPermission</code>, <code>RemovePermission</code>, and
32+
* <code>SetTopicAttributes</code> actions in your IAM policy.</p>
33+
* </note>
2934
* @example
3035
* Use a bare-bones client and the command you need to make an API call.
3136
* ```javascript

clients/client-sns/src/commands/CheckIfPhoneNumberIsOptedOutCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ export interface CheckIfPhoneNumberIsOptedOutCommandOutput
3232

3333
/**
3434
* <p>Accepts a phone number and indicates whether the phone holder has opted out of
35-
* receiving SMS messages from your Amazon Web Services account. You cannot send SMS messages to a number that
36-
* is opted out.</p>
35+
* receiving SMS messages from your Amazon Web Services account. You cannot send SMS messages to a number
36+
* that is opted out.</p>
3737
* <p>To resume sending messages, you can opt in the number by using the
3838
* <code>OptInPhoneNumber</code> action.</p>
3939
* @example

clients/client-sns/src/commands/CreatePlatformApplicationCommand.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ export interface CreatePlatformApplicationCommandOutput extends CreatePlatformAp
4747
* and <code>PlatformCredential</code> is <code>secret key</code>.</p>
4848
* </li>
4949
* <li>
50-
* <p>For <code>APNS</code> and <code>APNS_SANDBOX</code> using certificate credentials,
51-
* <code>PlatformPrincipal</code> is <code>SSL certificate</code> and
50+
* <p>For <code>APNS</code> and <code>APNS_SANDBOX</code> using certificate
51+
* credentials, <code>PlatformPrincipal</code> is <code>SSL certificate</code> and
5252
* <code>PlatformCredential</code> is <code>private key</code>.</p>
5353
* </li>
5454
* <li>
5555
* <p>For <code>APNS</code> and <code>APNS_SANDBOX</code> using token credentials,
56-
* <code>PlatformPrincipal</code> is <code>signing key ID</code> and
57-
* <code>PlatformCredential</code> is <code>signing key</code>.</p>
56+
* <code>PlatformPrincipal</code> is <code>signing key ID</code> and
57+
* <code>PlatformCredential</code> is <code>signing key</code>.</p>
5858
* </li>
5959
* <li>
6060
* <p>For <code>GCM</code> (Firebase Cloud Messaging), there is no

clients/client-sns/src/commands/CreatePlatformEndpointCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ export interface CreatePlatformEndpointCommandOutput extends CreateEndpointRespo
4141
* Notifications</a>. </p>
4242
* <p>When using <code>CreatePlatformEndpoint</code> with Baidu, two attributes must be
4343
* provided: ChannelId and UserId. The token field must also contain the ChannelId. For
44-
* more information, see <a href="https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePushBaiduEndpoint.html">Creating an Amazon SNS Endpoint
45-
* for Baidu</a>. </p>
44+
* more information, see <a href="https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePushBaiduEndpoint.html">Creating an Amazon SNS Endpoint for
45+
* Baidu</a>. </p>
4646
* @example
4747
* Use a bare-bones client and the command you need to make an API call.
4848
* ```javascript

clients/client-sns/src/commands/DeleteSMSSandboxPhoneNumberCommand.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ export interface DeleteSMSSandboxPhoneNumberCommandInput extends DeleteSMSSandbo
2929
export interface DeleteSMSSandboxPhoneNumberCommandOutput extends DeleteSMSSandboxPhoneNumberResult, __MetadataBearer {}
3030

3131
/**
32-
* <p>Deletes an Amazon Web Services account's verified or pending phone number from the SMS sandbox.</p>
32+
* <p>Deletes an Amazon Web Services account's verified or pending phone number from the SMS
33+
* sandbox.</p>
3334
* <p>When you start using Amazon SNS to send SMS messages, your Amazon Web Services account is in the
3435
* <i>SMS sandbox</i>. The SMS sandbox provides a safe environment for
3536
* you to try Amazon SNS features without risking your reputation as an SMS sender. While your

clients/client-sns/src/commands/GetDataProtectionPolicyCommand.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ export interface GetDataProtectionPolicyCommandInput extends GetDataProtectionPo
2929
export interface GetDataProtectionPolicyCommandOutput extends GetDataProtectionPolicyResponse, __MetadataBearer {}
3030

3131
/**
32-
* <p>Retrieves the specified inline <code>DataProtectionPolicy</code> document that is stored in the specified Amazon SNS topic. </p>
32+
* <p>Retrieves the specified inline <code>DataProtectionPolicy</code> document that is
33+
* stored in the specified Amazon SNS topic. </p>
3334
* @example
3435
* Use a bare-bones client and the command you need to make an API call.
3536
* ```javascript

clients/client-sns/src/commands/GetSMSSandboxAccountStatusCommand.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ export interface GetSMSSandboxAccountStatusCommandInput extends GetSMSSandboxAcc
2929
export interface GetSMSSandboxAccountStatusCommandOutput extends GetSMSSandboxAccountStatusResult, __MetadataBearer {}
3030

3131
/**
32-
* <p>Retrieves the SMS sandbox status for the calling Amazon Web Services account in the target Amazon Web Services Region.</p>
32+
* <p>Retrieves the SMS sandbox status for the calling Amazon Web Services account in the target
33+
* Amazon Web Services Region.</p>
3334
* <p>When you start using Amazon SNS to send SMS messages, your Amazon Web Services account is in the
3435
* <i>SMS sandbox</i>. The SMS sandbox provides a safe environment for
3536
* you to try Amazon SNS features without risking your reputation as an SMS sender. While your

clients/client-sns/src/commands/ListOriginationNumbersCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ export interface ListOriginationNumbersCommandInput extends ListOriginationNumbe
2929
export interface ListOriginationNumbersCommandOutput extends ListOriginationNumbersResult, __MetadataBearer {}
3030

3131
/**
32-
* <p>Lists the calling Amazon Web Services account's dedicated origination numbers and their metadata. For
33-
* 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
32+
* <p>Lists the calling Amazon Web Services account's dedicated origination numbers and their metadata.
33+
* 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
3434
* Guide</i>.</p>
3535
* @example
3636
* Use a bare-bones client and the command you need to make an API call.

clients/client-sns/src/commands/ListSMSSandboxPhoneNumbersCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ export interface ListSMSSandboxPhoneNumbersCommandInput extends ListSMSSandboxPh
2929
export interface ListSMSSandboxPhoneNumbersCommandOutput extends ListSMSSandboxPhoneNumbersResult, __MetadataBearer {}
3030

3131
/**
32-
* <p>Lists the calling Amazon Web Services account's current verified and pending destination phone numbers
33-
* in the SMS sandbox.</p>
32+
* <p>Lists the calling Amazon Web Services account's current verified and pending destination phone
33+
* numbers in the SMS sandbox.</p>
3434
* <p>When you start using Amazon SNS to send SMS messages, your Amazon Web Services account is in the
3535
* <i>SMS sandbox</i>. The SMS sandbox provides a safe environment for
3636
* you to try Amazon SNS features without risking your reputation as an SMS sender. While your

clients/client-sns/src/commands/PublishBatchCommand.ts

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,27 @@ export interface PublishBatchCommandInput extends PublishBatchInput {}
2626
export interface PublishBatchCommandOutput extends PublishBatchResponse, __MetadataBearer {}
2727

2828
/**
29-
* <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>
30-
* <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>
31-
* <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>
32-
* <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>
33-
* <p>&AttributeName.1=first</p>
34-
* <p>&AttributeName.2=second</p>
35-
* <p>If you send a batch message to a topic, Amazon SNS publishes the batch message to each endpoint that is
36-
* subscribed to the topic. The format of the batch message depends on the notification protocol
37-
* for each subscribed endpoint.</p>
38-
* <p>When a <code>messageId</code> is returned, the batch message is saved and Amazon SNS immediately delivers the message to subscribers.</p>
29+
* <p>Publishes up to ten messages to the specified topic. This is a batch version of
30+
* <code>Publish</code>. For FIFO topics, multiple messages within a single batch are
31+
* published in the order they are sent, and messages are deduplicated within the batch and
32+
* across batches for 5 minutes.</p>
33+
* <p>The result of publishing each message is reported individually in the response.
34+
* Because the batch request can result in a combination of successful and unsuccessful
35+
* actions, you should check for batch errors even when the call returns an HTTP status
36+
* code of <code>200</code>.</p>
37+
* <p>The maximum allowed individual message size and the maximum total payload size (the
38+
* sum of the individual lengths of all of the batched messages) are both 256 KB (262,144
39+
* bytes). </p>
40+
* <p>Some actions take lists of parameters. These lists are specified using the
41+
* <code>param.n</code> notation. Values of <code>n</code> are integers starting from
42+
* 1. For example, a parameter list with two elements looks like this: </p>
43+
* <p>&AttributeName.1=first</p>
44+
* <p>&AttributeName.2=second</p>
45+
* <p>If you send a batch message to a topic, Amazon SNS publishes the batch message to each
46+
* endpoint that is subscribed to the topic. The format of the batch message depends on the
47+
* notification protocol for each subscribed endpoint.</p>
48+
* <p>When a <code>messageId</code> is returned, the batch message is saved and Amazon SNS
49+
* immediately delivers the message to subscribers.</p>
3950
* @example
4051
* Use a bare-bones client and the command you need to make an API call.
4152
* ```javascript

clients/client-sns/src/commands/PublishCommand.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,17 @@ export interface PublishCommandOutput extends PublishResponse, __MetadataBearer
3232
* <p>If you send a message to a topic, Amazon SNS delivers the message to each endpoint that is
3333
* subscribed to the topic. The format of the message depends on the notification protocol
3434
* for each subscribed endpoint.</p>
35-
* <p>When a <code>messageId</code> is returned, the message is saved and Amazon SNS
36-
* immediately delivers it to subscribers.</p>
35+
* <p>When a <code>messageId</code> is returned, the message is saved and Amazon SNS immediately
36+
* delivers it to subscribers.</p>
3737
* <p>To use the <code>Publish</code> action for publishing a message to a mobile endpoint,
3838
* such as an app on a Kindle device or mobile phone, you must specify the EndpointArn for
3939
* the TargetArn parameter. The EndpointArn is returned when making a call with the
4040
* <code>CreatePlatformEndpoint</code> action. </p>
4141
* <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
4242
* Platform-Specific Payloads in Messages to Mobile Devices</a>. </p>
4343
* <important>
44-
* <p>You can publish messages only to topics and endpoints in the same Amazon Web Services Region.</p>
44+
* <p>You can publish messages only to topics and endpoints in the same
45+
* Amazon Web Services Region.</p>
4546
* </important>
4647
* @example
4748
* Use a bare-bones client and the command you need to make an API call.

clients/client-sns/src/commands/PutDataProtectionPolicyCommand.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ export interface PutDataProtectionPolicyCommandInput extends PutDataProtectionPo
2424
export interface PutDataProtectionPolicyCommandOutput extends __MetadataBearer {}
2525

2626
/**
27-
* <p>Adds or updates an inline policy document that is stored in the specified Amazon SNS topic.</p>
27+
* <p>Adds or updates an inline policy document that is stored in the specified Amazon SNS
28+
* topic.</p>
2829
* @example
2930
* Use a bare-bones client and the command you need to make an API call.
3031
* ```javascript

clients/client-sns/src/commands/RemovePermissionCommand.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ export interface RemovePermissionCommandOutput extends __MetadataBearer {}
2525

2626
/**
2727
* <p>Removes a statement from a topic's access control policy.</p>
28+
* <note>
29+
* <p>To remove the ability to change topic permissions, you must deny permissions to
30+
* the <code>AddPermission</code>, <code>RemovePermission</code>, and
31+
* <code>SetTopicAttributes</code> actions in your IAM policy.</p>
32+
* </note>
2833
* @example
2934
* Use a bare-bones client and the command you need to make an API call.
3035
* ```javascript

clients/client-sns/src/commands/SetTopicAttributesCommand.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ export interface SetTopicAttributesCommandOutput extends __MetadataBearer {}
2525

2626
/**
2727
* <p>Allows a topic owner to set an attribute of the topic to a new value.</p>
28+
* <note>
29+
* <p>To remove the ability to change topic permissions, you must deny permissions to
30+
* the <code>AddPermission</code>, <code>RemovePermission</code>, and
31+
* <code>SetTopicAttributes</code> actions in your IAM policy.</p>
32+
* </note>
2833
* @example
2934
* Use a bare-bones client and the command you need to make an API call.
3035
* ```javascript

clients/client-sns/src/commands/TagResourceCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ export interface TagResourceCommandOutput extends TagResourceResponse, __Metadat
4545
* existing tag.</p>
4646
* </li>
4747
* <li>
48-
* <p>Tagging actions are limited to 10 TPS per Amazon Web Services account, per Amazon Web Services Region. If your
49-
* 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>
48+
* <p>Tagging actions are limited to 10 TPS per Amazon Web Services account, per Amazon Web Services Region. If
49+
* 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>
5050
* </li>
5151
* </ul>
5252
* @example

clients/client-sns/src/commands/UnsubscribeCommand.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,16 @@ export interface UnsubscribeCommandOutput extends __MetadataBearer {}
2222

2323
/**
2424
* <p>Deletes a subscription. If the subscription requires authentication for deletion, only
25-
* the owner of the subscription or the topic's owner can unsubscribe, and an Amazon Web Services signature
26-
* is required. If the <code>Unsubscribe</code> call does not require authentication and
27-
* the requester is not the subscription owner, a final cancellation message is delivered
28-
* to the endpoint, so that the endpoint owner can easily resubscribe to the topic if the
29-
* <code>Unsubscribe</code> request was unintended.</p>
25+
* the owner of the subscription or the topic's owner can unsubscribe, and an Amazon Web Services
26+
* signature is required. If the <code>Unsubscribe</code> call does not require
27+
* authentication and the requester is not the subscription owner, a final cancellation
28+
* message is delivered to the endpoint, so that the endpoint owner can easily resubscribe
29+
* to the topic if the <code>Unsubscribe</code> request was unintended.</p>
30+
* <note>
31+
* <p>Amazon SQS queue subscriptions require authentication for deletion. Only the owner of
32+
* the subscription, or the owner of the topic can unsubscribe using the required Amazon Web Services
33+
* signature.</p>
34+
* </note>
3035
* <p>This action is throttled at 100 transactions per second (TPS).</p>
3136
* @example
3237
* Use a bare-bones client and the command you need to make an API call.

clients/client-sns/src/commands/VerifySMSSandboxPhoneNumberCommand.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ export interface VerifySMSSandboxPhoneNumberCommandInput extends VerifySMSSandbo
2929
export interface VerifySMSSandboxPhoneNumberCommandOutput extends VerifySMSSandboxPhoneNumberResult, __MetadataBearer {}
3030

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

0 commit comments

Comments
 (0)