Skip to content

Upgrade to AWS SDK v2 #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 5, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 29 additions & 4 deletions src/main/java/software/amazon/sns/AmazonSNSExtendedClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
import software.amazon.awssdk.core.SdkBytes;
import software.amazon.awssdk.core.exception.SdkClientException;
import software.amazon.awssdk.core.exception.SdkException;
import software.amazon.awssdk.services.sns.SnsClient;
import software.amazon.awssdk.services.sns.model.*;
import software.amazon.payloadoffloading.*;
Expand Down Expand Up @@ -47,7 +49,8 @@ public AmazonSNSExtendedClient(SnsClient snsClient, SNSExtendedClientConfigurati

/**
* <p>
* Sends a message to an Amazon SNS topic or sends a text message (SMS message) directly to a phone number.
* Sends a message to an Amazon SNS topic, a text message (SMS message) directly to a phone number, or a message to
* a mobile platform endpoint (when you specify the <code>TargetArn</code>).
* </p>
* <p>
* If you send a message to a topic, Amazon SNS delivers the message to each endpoint that is subscribed to the
Expand All @@ -64,9 +67,14 @@ public AmazonSNSExtendedClient(SnsClient snsClient, SNSExtendedClientConfigurati
* </p>
* <p>
* For more information about formatting messages, see <a
* href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-send-custommessage.html">Send Custom Platform-Specific
* Payloads in Messages to Mobile Devices</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 AWS Region.
* </p>
* </important>
*
* @param publishRequest Input for Publish action.
* @return Result of the Publish operation returned by the service.
Expand All @@ -77,7 +85,24 @@ public AmazonSNSExtendedClient(SnsClient snsClient, SNSExtendedClientConfigurati
* @throws EndpointDisabledException Exception error indicating endpoint disabled.
* @throws PlatformApplicationDisabledException Exception error indicating platform application disabled.
* @throws AuthorizationErrorException Indicates that the user has been denied access to the requested resource.
* @sample AmazonSNS.Publish
* @throws KmsDisabledException The request was rejected because the specified customer master key (CMK) isn't enabled.
* @throws KmsInvalidStateException The request was rejected because the state of the specified resource isn't valid for this request. For
* more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">How
* Key State Affects Use of a Customer Master Key</a> in the <i>AWS Key Management Service Developer
* Guide</i>.
* @throws KmsNotFoundException The request was rejected because the specified entity or resource can't be found.
* @throws KmsOptInRequiredException The AWS access key ID needs a subscription for the service.
* @throws KmsThrottlingException The request was denied due to request throttling. For more information about throttling, see <a
* href="https://docs.aws.amazon.com/kms/latest/developerguide/limits.html#requests-per-second">Limits</a>
* in the <i>AWS Key Management Service Developer Guide.</i>
* @throws KmsAccessDeniedException The ciphertext references a key that doesn't exist or that you don't have access to.
* @throws InvalidSecurityException The credential signature isn't valid. You must use an HTTPS endpoint and sign your request using
* Signature Version 4.
* @throws SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for
* catch all scenarios.
* @throws SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
* @throws SnsException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
* @sample SnsClient.Publish
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/sns-2010-03-31/Publish" target="_top">AWS API
* Documentation</a>
*/
Expand Down
Loading