8
8
9
9
import software .amazon .awssdk .awscore .AwsRequestOverrideConfiguration ;
10
10
import software .amazon .awssdk .core .SdkBytes ;
11
+ import software .amazon .awssdk .core .exception .SdkClientException ;
12
+ import software .amazon .awssdk .core .exception .SdkException ;
11
13
import software .amazon .awssdk .services .sns .SnsClient ;
12
14
import software .amazon .awssdk .services .sns .model .*;
13
15
import software .amazon .payloadoffloading .*;
@@ -47,7 +49,8 @@ public AmazonSNSExtendedClient(SnsClient snsClient, SNSExtendedClientConfigurati
47
49
48
50
/**
49
51
* <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>).
51
54
* </p>
52
55
* <p>
53
56
* 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
64
67
* </p>
65
68
* <p>
66
69
* 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>.
69
72
* </p>
73
+ * <important>
74
+ * <p>
75
+ * You can publish messages only to topics and endpoints in the same AWS Region.
76
+ * </p>
77
+ * </important>
70
78
*
71
79
* @param publishRequest Input for Publish action.
72
80
* @return Result of the Publish operation returned by the service.
@@ -77,7 +85,24 @@ public AmazonSNSExtendedClient(SnsClient snsClient, SNSExtendedClientConfigurati
77
85
* @throws EndpointDisabledException Exception error indicating endpoint disabled.
78
86
* @throws PlatformApplicationDisabledException Exception error indicating platform application disabled.
79
87
* @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
81
106
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/Publish" target="_top">AWS API
82
107
* Documentation</a>
83
108
*/
0 commit comments