Skip to content

Commit 227ed8b

Browse files
mngo87mikengoduetto
authored andcommitted
update comments
1 parent b4326be commit 227ed8b

File tree

2 files changed

+369
-117
lines changed

2 files changed

+369
-117
lines changed

src/main/java/software/amazon/sns/AmazonSNSExtendedClient.java

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
1010
import software.amazon.awssdk.core.SdkBytes;
11+
import software.amazon.awssdk.core.exception.SdkClientException;
12+
import software.amazon.awssdk.core.exception.SdkException;
1113
import software.amazon.awssdk.services.sns.SnsClient;
1214
import software.amazon.awssdk.services.sns.model.*;
1315
import software.amazon.payloadoffloading.*;
@@ -47,7 +49,8 @@ public AmazonSNSExtendedClient(SnsClient snsClient, SNSExtendedClientConfigurati
4749

4850
/**
4951
* <p>
50-
* Sends a message to an Amazon SNS topic or sends a text message (SMS message) directly to a phone number.
52+
* Sends a message to an Amazon SNS topic, a text message (SMS message) directly to a phone number, or a message to
53+
* a mobile platform endpoint (when you specify the <code>TargetArn</code>).
5154
* </p>
5255
* <p>
5356
* If you send a message to a topic, Amazon SNS delivers the message to each endpoint that is subscribed to the
@@ -64,9 +67,14 @@ public AmazonSNSExtendedClient(SnsClient snsClient, SNSExtendedClientConfigurati
6467
* </p>
6568
* <p>
6669
* For more information about formatting messages, see <a
67-
* href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-send-custommessage.html">Send Custom Platform-Specific
68-
* Payloads in Messages to Mobile Devices</a>.
70+
* href="https://docs.aws.amazon.com/sns/latest/dg/mobile-push-send-custommessage.html">Send Custom
71+
* Platform-Specific Payloads in Messages to Mobile Devices</a>.
6972
* </p>
73+
* <important>
74+
* <p>
75+
* You can publish messages only to topics and endpoints in the same AWS Region.
76+
* </p>
77+
* </important>
7078
*
7179
* @param publishRequest Input for Publish action.
7280
* @return Result of the Publish operation returned by the service.
@@ -77,7 +85,24 @@ public AmazonSNSExtendedClient(SnsClient snsClient, SNSExtendedClientConfigurati
7785
* @throws EndpointDisabledException Exception error indicating endpoint disabled.
7886
* @throws PlatformApplicationDisabledException Exception error indicating platform application disabled.
7987
* @throws AuthorizationErrorException Indicates that the user has been denied access to the requested resource.
80-
* @sample AmazonSNS.Publish
88+
* @throws KmsDisabledException The request was rejected because the specified customer master key (CMK) isn't enabled.
89+
* @throws KmsInvalidStateException The request was rejected because the state of the specified resource isn't valid for this request. For
90+
* more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">How
91+
* Key State Affects Use of a Customer Master Key</a> in the <i>AWS Key Management Service Developer
92+
* Guide</i>.
93+
* @throws KmsNotFoundException The request was rejected because the specified entity or resource can't be found.
94+
* @throws KmsOptInRequiredException The AWS access key ID needs a subscription for the service.
95+
* @throws KmsThrottlingException The request was denied due to request throttling. For more information about throttling, see <a
96+
* href="https://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second">Limits</a>
97+
* in the <i>AWS Key Management Service Developer Guide.</i>
98+
* @throws KmsAccessDeniedException The ciphertext references a key that doesn't exist or that you don't have access to.
99+
* @throws InvalidSecurityException The credential signature isn't valid. You must use an HTTPS endpoint and sign your request using
100+
* Signature Version 4.
101+
* @throws SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
102+
* catch all scenarios.
103+
* @throws SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
104+
* @throws SnsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
105+
* @sample SnsClient.Publish
81106
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/Publish" target="_top">AWS API
82107
* Documentation</a>
83108
*/

0 commit comments

Comments
 (0)