Class AmazonSNSExtendedClient
- All Implemented Interfaces:
AutoCloseable,software.amazon.awssdk.awscore.AwsClient,software.amazon.awssdk.core.SdkClient,software.amazon.awssdk.services.sns.SnsClient,software.amazon.awssdk.utils.SdkAutoCloseable
-
Field Summary
Fields inherited from interface software.amazon.awssdk.services.sns.SnsClient
SERVICE_METADATA_ID, SERVICE_NAME -
Constructor Summary
ConstructorsConstructorDescriptionAmazonSNSExtendedClient(software.amazon.awssdk.services.sns.SnsClient snsClient, SNSExtendedClientConfiguration snsExtendedClientConfiguration) Constructs a new Amazon SNS extended client to invoke service methods on Amazon SNS with extended functionality using the specified Amazon SNS client object.AmazonSNSExtendedClient(software.amazon.awssdk.services.sns.SnsClient snsClient, SNSExtendedClientConfiguration snsExtendedClientConfiguration, software.amazon.payloadoffloading.PayloadStore payloadStore) Constructs a new Amazon SNS extended client to invoke service methods on Amazon SNS with extended functionality using the specified Amazon SNS client object and Payload Store object. -
Method Summary
Modifier and TypeMethodDescriptionsoftware.amazon.awssdk.services.sns.model.AddPermissionResponseaddPermission(software.amazon.awssdk.services.sns.model.AddPermissionRequest addPermissionRequest) Adds a statement to a topic's access control policy, granting access for the specified AWS accounts to the specified actions.software.amazon.awssdk.services.sns.model.CheckIfPhoneNumberIsOptedOutResponsecheckIfPhoneNumberIsOptedOut(software.amazon.awssdk.services.sns.model.CheckIfPhoneNumberIsOptedOutRequest checkIfPhoneNumberIsOptedOutRequest) Accepts a phone number and indicates whether the phone holder has opted out of receiving SMS messages from your account.voidclose()software.amazon.awssdk.services.sns.model.ConfirmSubscriptionResponseconfirmSubscription(software.amazon.awssdk.services.sns.model.ConfirmSubscriptionRequest confirmSubscriptionRequest) Verifies an endpoint owner's intent to receive messages by validating the token sent to the endpoint by an earlierSubscribeaction.software.amazon.awssdk.services.sns.model.CreatePlatformApplicationResponsecreatePlatformApplication(software.amazon.awssdk.services.sns.model.CreatePlatformApplicationRequest createPlatformApplicationRequest) Creates a platform application object for one of the supported push notification services, such as APNS and GCM (Firebase Cloud Messaging), to which devices and mobile apps may register.software.amazon.awssdk.services.sns.model.CreatePlatformEndpointResponsecreatePlatformEndpoint(software.amazon.awssdk.services.sns.model.CreatePlatformEndpointRequest createPlatformEndpointRequest) Creates an endpoint for a device and mobile app on one of the supported push notification services, such as GCM (Firebase Cloud Messaging) and APNS.software.amazon.awssdk.services.sns.model.CreateTopicResponsecreateTopic(software.amazon.awssdk.services.sns.model.CreateTopicRequest createTopicRequest) Creates a topic to which notifications can be published.software.amazon.awssdk.services.sns.model.DeleteEndpointResponsedeleteEndpoint(software.amazon.awssdk.services.sns.model.DeleteEndpointRequest deleteEndpointRequest) Deletes the endpoint for a device and mobile app from Amazon SNS.software.amazon.awssdk.services.sns.model.DeletePlatformApplicationResponsedeletePlatformApplication(software.amazon.awssdk.services.sns.model.DeletePlatformApplicationRequest deletePlatformApplicationRequest) Deletes a platform application object for one of the supported push notification services, such as APNS and GCM (Firebase Cloud Messaging).software.amazon.awssdk.services.sns.model.DeleteTopicResponsedeleteTopic(software.amazon.awssdk.services.sns.model.DeleteTopicRequest deleteTopicRequest) Deletes a topic and all its subscriptions.software.amazon.awssdk.services.sns.model.GetEndpointAttributesResponsegetEndpointAttributes(software.amazon.awssdk.services.sns.model.GetEndpointAttributesRequest getEndpointAttributesRequest) Retrieves the endpoint attributes for a device on one of the supported push notification services, such as GCM (Firebase Cloud Messaging) and APNS.software.amazon.awssdk.services.sns.model.GetPlatformApplicationAttributesResponsegetPlatformApplicationAttributes(software.amazon.awssdk.services.sns.model.GetPlatformApplicationAttributesRequest getPlatformApplicationAttributesRequest) Retrieves the attributes of the platform application object for the supported push notification services, such as APNS and GCM.software.amazon.awssdk.services.sns.model.GetSmsAttributesResponsegetSMSAttributes(software.amazon.awssdk.services.sns.model.GetSmsAttributesRequest getSMSAttributesRequest) Returns the settings for sending SMS messages from your account.software.amazon.awssdk.services.sns.model.GetSubscriptionAttributesResponsegetSubscriptionAttributes(software.amazon.awssdk.services.sns.model.GetSubscriptionAttributesRequest getSubscriptionAttributesRequest) Returns all of the properties of a subscription.software.amazon.awssdk.services.sns.model.GetTopicAttributesResponsegetTopicAttributes(software.amazon.awssdk.services.sns.model.GetTopicAttributesRequest getTopicAttributesRequest) Returns all of the properties of a topic.software.amazon.awssdk.services.sns.model.ListEndpointsByPlatformApplicationResponselistEndpointsByPlatformApplication(software.amazon.awssdk.services.sns.model.ListEndpointsByPlatformApplicationRequest listEndpointsByPlatformApplicationRequest) Lists the endpoints and endpoint attributes for devices in a supported push notification service, such as GCM (Firebase Cloud Messaging) and APNS.software.amazon.awssdk.services.sns.paginators.ListEndpointsByPlatformApplicationIterablelistEndpointsByPlatformApplicationPaginator(software.amazon.awssdk.services.sns.model.ListEndpointsByPlatformApplicationRequest listEndpointsByPlatformApplicationRequest) Lists the endpoints and endpoint attributes for devices in a supported push notification service, such as GCM (Firebase Cloud Messaging) and APNS.software.amazon.awssdk.services.sns.model.ListPhoneNumbersOptedOutResponselistPhoneNumbersOptedOut(software.amazon.awssdk.services.sns.model.ListPhoneNumbersOptedOutRequest listPhoneNumbersOptedOutRequest) Returns a list of phone numbers that are opted out, meaning you cannot send SMS messages to them.software.amazon.awssdk.services.sns.model.ListPlatformApplicationsResponselistPlatformApplications(software.amazon.awssdk.services.sns.model.ListPlatformApplicationsRequest listPlatformApplicationsRequest) Lists the platform application objects for the supported push notification services, such as APNS and GCM (Firebase Cloud Messaging).software.amazon.awssdk.services.sns.paginators.ListPlatformApplicationsIterablelistPlatformApplicationsPaginator(software.amazon.awssdk.services.sns.model.ListPlatformApplicationsRequest listPlatformApplicationsRequest) Lists the platform application objects for the supported push notification services, such as APNS and GCM (Firebase Cloud Messaging).software.amazon.awssdk.services.sns.model.ListSubscriptionsResponselistSubscriptions(software.amazon.awssdk.services.sns.model.ListSubscriptionsRequest listSubscriptionsRequest) Returns a list of the requester's subscriptions.software.amazon.awssdk.services.sns.model.ListSubscriptionsByTopicResponselistSubscriptionsByTopic(software.amazon.awssdk.services.sns.model.ListSubscriptionsByTopicRequest listSubscriptionsByTopicRequest) Returns a list of the subscriptions to a specific topic.software.amazon.awssdk.services.sns.paginators.ListSubscriptionsByTopicIterablelistSubscriptionsByTopicPaginator(software.amazon.awssdk.services.sns.model.ListSubscriptionsByTopicRequest listSubscriptionsByTopicRequest) Returns a list of the subscriptions to a specific topic.software.amazon.awssdk.services.sns.paginators.ListSubscriptionsIterablelistSubscriptionsPaginator(software.amazon.awssdk.services.sns.model.ListSubscriptionsRequest listSubscriptionsRequest) Returns a list of the requester's subscriptions.software.amazon.awssdk.services.sns.model.ListTagsForResourceResponselistTagsForResource(software.amazon.awssdk.services.sns.model.ListTagsForResourceRequest listTagsForResourceRequest) List all tags added to the specified Amazon SNS topic.software.amazon.awssdk.services.sns.model.ListTopicsResponselistTopics(software.amazon.awssdk.services.sns.model.ListTopicsRequest listTopicsRequest) Returns a list of the requester's topics.software.amazon.awssdk.services.sns.paginators.ListTopicsIterablelistTopicsPaginator(software.amazon.awssdk.services.sns.model.ListTopicsRequest listTopicsRequest) Returns a list of the requester's topics.software.amazon.awssdk.services.sns.model.OptInPhoneNumberResponseoptInPhoneNumber(software.amazon.awssdk.services.sns.model.OptInPhoneNumberRequest optInPhoneNumberRequest) Use this request to opt in a phone number that is opted out, which enables you to resume sending SMS messages to the number.software.amazon.awssdk.services.sns.model.PublishResponsepublish(software.amazon.awssdk.services.sns.model.PublishRequest publishRequest) 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 theTargetArn).software.amazon.awssdk.services.sns.model.RemovePermissionResponseremovePermission(software.amazon.awssdk.services.sns.model.RemovePermissionRequest removePermissionRequest) Removes a statement from a topic's access control policy.software.amazon.awssdk.services.sns.model.SetEndpointAttributesResponsesetEndpointAttributes(software.amazon.awssdk.services.sns.model.SetEndpointAttributesRequest setEndpointAttributesRequest) Sets the attributes for an endpoint for a device on one of the supported push notification services, such as GCM (Firebase Cloud Messaging) and APNS.software.amazon.awssdk.services.sns.model.SetPlatformApplicationAttributesResponsesetPlatformApplicationAttributes(software.amazon.awssdk.services.sns.model.SetPlatformApplicationAttributesRequest setPlatformApplicationAttributesRequest) Sets the attributes of the platform application object for the supported push notification services, such as APNS and GCM (Firebase Cloud Messaging).software.amazon.awssdk.services.sns.model.SetSmsAttributesResponsesetSMSAttributes(software.amazon.awssdk.services.sns.model.SetSmsAttributesRequest setSMSAttributesRequest) Use this request to set the default settings for sending SMS messages and receiving daily SMS usage reports.software.amazon.awssdk.services.sns.model.SetSubscriptionAttributesResponsesetSubscriptionAttributes(software.amazon.awssdk.services.sns.model.SetSubscriptionAttributesRequest setSubscriptionAttributesRequest) Allows a subscription owner to set an attribute of the subscription to a new value.software.amazon.awssdk.services.sns.model.SetTopicAttributesResponsesetTopicAttributes(software.amazon.awssdk.services.sns.model.SetTopicAttributesRequest setTopicAttributesRequest) Allows a topic owner to set an attribute of the topic to a new value.software.amazon.awssdk.services.sns.model.SubscribeResponsesubscribe(software.amazon.awssdk.services.sns.model.SubscribeRequest subscribeRequest) Subscribes an endpoint to an Amazon SNS topic.software.amazon.awssdk.services.sns.model.TagResourceResponsetagResource(software.amazon.awssdk.services.sns.model.TagResourceRequest tagResourceRequest) Add tags to the specified Amazon SNS topic.software.amazon.awssdk.services.sns.model.UnsubscribeResponseunsubscribe(software.amazon.awssdk.services.sns.model.UnsubscribeRequest unsubscribeRequest) Deletes a subscription.software.amazon.awssdk.services.sns.model.UntagResourceResponseuntagResource(software.amazon.awssdk.services.sns.model.UntagResourceRequest untagResourceRequest) Remove tags from the specified Amazon SNS topic.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.awssdk.services.sns.SnsClient
addPermission, checkIfPhoneNumberIsOptedOut, confirmSubscription, createPlatformApplication, createPlatformEndpoint, createSMSSandboxPhoneNumber, createSMSSandboxPhoneNumber, createTopic, deleteEndpoint, deletePlatformApplication, deleteSMSSandboxPhoneNumber, deleteSMSSandboxPhoneNumber, deleteTopic, getDataProtectionPolicy, getDataProtectionPolicy, getEndpointAttributes, getPlatformApplicationAttributes, getSMSAttributes, getSMSAttributes, getSMSSandboxAccountStatus, getSMSSandboxAccountStatus, getSubscriptionAttributes, getTopicAttributes, listEndpointsByPlatformApplication, listEndpointsByPlatformApplicationPaginator, listOriginationNumbers, listOriginationNumbers, listOriginationNumbersPaginator, listOriginationNumbersPaginator, listPhoneNumbersOptedOut, listPhoneNumbersOptedOut, listPhoneNumbersOptedOutPaginator, listPhoneNumbersOptedOutPaginator, listPhoneNumbersOptedOutPaginator, listPlatformApplications, listPlatformApplications, listPlatformApplicationsPaginator, listPlatformApplicationsPaginator, listSMSSandboxPhoneNumbers, listSMSSandboxPhoneNumbers, listSMSSandboxPhoneNumbersPaginator, listSMSSandboxPhoneNumbersPaginator, listSubscriptions, listSubscriptions, listSubscriptionsByTopic, listSubscriptionsByTopicPaginator, listSubscriptionsPaginator, listSubscriptionsPaginator, listTagsForResource, listTopics, listTopics, listTopicsPaginator, listTopicsPaginator, optInPhoneNumber, publish, publishBatch, publishBatch, putDataProtectionPolicy, putDataProtectionPolicy, removePermission, serviceClientConfiguration, setEndpointAttributes, setPlatformApplicationAttributes, setSMSAttributes, setSubscriptionAttributes, setTopicAttributes, subscribe, tagResource, unsubscribe, untagResource, verifySMSSandboxPhoneNumber, verifySMSSandboxPhoneNumber
-
Constructor Details
-
AmazonSNSExtendedClient
public AmazonSNSExtendedClient(software.amazon.awssdk.services.sns.SnsClient snsClient, SNSExtendedClientConfiguration snsExtendedClientConfiguration) Constructs a new Amazon SNS extended client to invoke service methods on Amazon SNS with extended functionality using the specified Amazon SNS client object.All service calls made using this new client object are blocking, and will not return until the service call completes.
- Parameters:
snsClient- The Amazon SNS client to use to connect to Amazon SNS.snsExtendedClientConfiguration- The sns extended client configuration options controlling the functionality of this client.
-
AmazonSNSExtendedClient
public AmazonSNSExtendedClient(software.amazon.awssdk.services.sns.SnsClient snsClient, SNSExtendedClientConfiguration snsExtendedClientConfiguration, software.amazon.payloadoffloading.PayloadStore payloadStore) Constructs a new Amazon SNS extended client to invoke service methods on Amazon SNS with extended functionality using the specified Amazon SNS client object and Payload Store object.All service calls made using this new client object are blocking, and will not return until the service call completes.
- Parameters:
snsClient- The Amazon SNS client to use to connect to Amazon SNS.snsExtendedClientConfiguration- The sns extended client configuration options controlling the functionality of this client.payloadStore- The Payload Store that handles logic for saving to the desired extended storage.
-
-
Method Details
-
publish
public software.amazon.awssdk.services.sns.model.PublishResponse publish(software.amazon.awssdk.services.sns.model.PublishRequest publishRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.InvalidParameterValueException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.NotFoundException, software.amazon.awssdk.services.sns.model.EndpointDisabledException, software.amazon.awssdk.services.sns.model.PlatformApplicationDisabledException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.services.sns.model.KmsDisabledException, software.amazon.awssdk.services.sns.model.KmsInvalidStateException, software.amazon.awssdk.services.sns.model.KmsNotFoundException, software.amazon.awssdk.services.sns.model.KmsOptInRequiredException, software.amazon.awssdk.services.sns.model.KmsThrottlingException, software.amazon.awssdk.services.sns.model.KmsAccessDeniedException, software.amazon.awssdk.services.sns.model.InvalidSecurityException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException 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
TargetArn).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.
When a
messageIdis returned, the message has been saved and Amazon SNS will attempt to deliver it shortly.To use the
Publishaction for sending 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 theCreatePlatformEndpointaction.For more information about formatting messages, see Send Custom Platform-Specific Payloads in Messages to Mobile Devices.
You can publish messages only to topics and endpoints in the same AWS Region.
- Specified by:
publishin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
publishRequest- Input for Publish action.- Returns:
- Result of the Publish operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.InvalidParameterValueException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.NotFoundException- Indicates that the requested resource does not exist.software.amazon.awssdk.services.sns.model.EndpointDisabledException- Exception error indicating endpoint disabled.software.amazon.awssdk.services.sns.model.PlatformApplicationDisabledException- Exception error indicating platform application disabled.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.services.sns.model.KmsDisabledException- The request was rejected because the specified customer master key (CMK) isn't enabled.software.amazon.awssdk.services.sns.model.KmsInvalidStateException- The request was rejected because the state of the specified resource isn't valid for this request. For more information, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.software.amazon.awssdk.services.sns.model.KmsNotFoundException- The request was rejected because the specified entity or resource can't be found.software.amazon.awssdk.services.sns.model.KmsOptInRequiredException- The AWS access key ID needs a subscription for the service.software.amazon.awssdk.services.sns.model.KmsThrottlingException- The request was denied due to request throttling. For more information about throttling, see Limits in the AWS Key Management Service Developer Guide.software.amazon.awssdk.services.sns.model.KmsAccessDeniedException- The ciphertext references a key that doesn't exist or that you don't have access to.software.amazon.awssdk.services.sns.model.InvalidSecurityException- The credential signature isn't valid. You must use an HTTPS endpoint and sign your request using Signature Version 4.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfacesoftware.amazon.awssdk.utils.SdkAutoCloseable
-
getEndpointAttributes
public software.amazon.awssdk.services.sns.model.GetEndpointAttributesResponse getEndpointAttributes(software.amazon.awssdk.services.sns.model.GetEndpointAttributesRequest getEndpointAttributesRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.services.sns.model.NotFoundException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Retrieves the endpoint attributes for a device on one of the supported push notification services, such as GCM (Firebase Cloud Messaging) and APNS. For more information, see Using Amazon SNS Mobile Push Notifications.
- Specified by:
getEndpointAttributesin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
getEndpointAttributesRequest- Input for GetEndpointAttributes action.- Returns:
- Result of the GetEndpointAttributes operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.services.sns.model.NotFoundException- Indicates that the requested resource does not exist.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
addPermission
public software.amazon.awssdk.services.sns.model.AddPermissionResponse addPermission(software.amazon.awssdk.services.sns.model.AddPermissionRequest addPermissionRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.services.sns.model.NotFoundException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Adds a statement to a topic's access control policy, granting access for the specified AWS accounts to the specified actions.
- Specified by:
addPermissionin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
addPermissionRequest-- Returns:
- Result of the AddPermission operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.services.sns.model.NotFoundException- Indicates that the requested resource does not exist.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
checkIfPhoneNumberIsOptedOut
public software.amazon.awssdk.services.sns.model.CheckIfPhoneNumberIsOptedOutResponse checkIfPhoneNumberIsOptedOut(software.amazon.awssdk.services.sns.model.CheckIfPhoneNumberIsOptedOutRequest checkIfPhoneNumberIsOptedOutRequest) throws software.amazon.awssdk.services.sns.model.ThrottledException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Accepts a phone number and indicates whether the phone holder has opted out of receiving SMS messages from your account. You cannot send SMS messages to a number that is opted out.
To resume sending messages, you can opt in the number by using the
OptInPhoneNumberaction.- Specified by:
checkIfPhoneNumberIsOptedOutin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
checkIfPhoneNumberIsOptedOutRequest- The input for theCheckIfPhoneNumberIsOptedOutaction.- Returns:
- Result of the CheckIfPhoneNumberIsOptedOut operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.ThrottledException- Indicates that the rate at which requests have been submitted for this action exceeds the limit for your account.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
confirmSubscription
public software.amazon.awssdk.services.sns.model.ConfirmSubscriptionResponse confirmSubscription(software.amazon.awssdk.services.sns.model.ConfirmSubscriptionRequest confirmSubscriptionRequest) throws software.amazon.awssdk.services.sns.model.SubscriptionLimitExceededException, software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.NotFoundException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.services.sns.model.FilterPolicyLimitExceededException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Verifies an endpoint owner's intent to receive messages by validating the token sent to the endpoint by an earlier
Subscribeaction. If the token is valid, the action creates a new subscription and returns its Amazon Resource Name (ARN). This call requires an AWS signature only when theAuthenticateOnUnsubscribeflag is set to "true".- Specified by:
confirmSubscriptionin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
confirmSubscriptionRequest- Input for ConfirmSubscription action.- Returns:
- Result of the ConfirmSubscription operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.SubscriptionLimitExceededException- Indicates that the customer already owns the maximum allowed number of subscriptions.software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.NotFoundException- Indicates that the requested resource does not exist.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.services.sns.model.FilterPolicyLimitExceededException- Indicates that the number of filter polices in your AWS account exceeds the limit. To add more filter polices, submit an SNS Limit Increase case in the AWS Support Center.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
createPlatformApplication
public software.amazon.awssdk.services.sns.model.CreatePlatformApplicationResponse createPlatformApplication(software.amazon.awssdk.services.sns.model.CreatePlatformApplicationRequest createPlatformApplicationRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Creates a platform application object for one of the supported push notification services, such as APNS and GCM (Firebase Cloud Messaging), to which devices and mobile apps may register. You must specify
PlatformPrincipalandPlatformCredentialattributes when using theCreatePlatformApplicationaction.PlatformPrincipalandPlatformCredentialare received from the notification service.-
For
ADM,PlatformPrincipalisclient idandPlatformCredentialisclient secret. -
For
Baidu,PlatformPrincipalisAPI keyandPlatformCredentialissecret key. -
For
APNSandAPNS_SANDBOX,PlatformPrincipalisSSL certificateandPlatformCredentialisprivate key. -
For
GCM(Firebase Cloud Messaging), there is noPlatformPrincipaland thePlatformCredentialisAPI key. -
For
MPNS,PlatformPrincipalisTLS certificateandPlatformCredentialisprivate key. -
For
WNS,PlatformPrincipalisPackage Security IdentifierandPlatformCredentialissecret key.
You can use the returned
PlatformApplicationArnas an attribute for theCreatePlatformEndpointaction.- Specified by:
createPlatformApplicationin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
createPlatformApplicationRequest- Input for CreatePlatformApplication action.- Returns:
- Result of the CreatePlatformApplication operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
-
createPlatformEndpoint
public software.amazon.awssdk.services.sns.model.CreatePlatformEndpointResponse createPlatformEndpoint(software.amazon.awssdk.services.sns.model.CreatePlatformEndpointRequest createPlatformEndpointRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.services.sns.model.NotFoundException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Creates an endpoint for a device and mobile app on one of the supported push notification services, such as GCM (Firebase Cloud Messaging) and APNS.
CreatePlatformEndpointrequires thePlatformApplicationArnthat is returned fromCreatePlatformApplication. You can use the returnedEndpointArnto send a message to a mobile app or by theSubscribeaction for subscription to a topic. TheCreatePlatformEndpointaction is idempotent, so if the requester already owns an endpoint with the same device token and attributes, that endpoint's ARN is returned without creating a new endpoint. For more information, see Using Amazon SNS Mobile Push Notifications.When using
CreatePlatformEndpointwith Baidu, two attributes must be provided: ChannelId and UserId. The token field must also contain the ChannelId. For more information, see Creating an Amazon SNS Endpoint for Baidu.- Specified by:
createPlatformEndpointin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
createPlatformEndpointRequest- Input for CreatePlatformEndpoint action.- Returns:
- Result of the CreatePlatformEndpoint operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.services.sns.model.NotFoundException- Indicates that the requested resource does not exist.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
createTopic
public software.amazon.awssdk.services.sns.model.CreateTopicResponse createTopic(software.amazon.awssdk.services.sns.model.CreateTopicRequest createTopicRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.TopicLimitExceededException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.services.sns.model.InvalidSecurityException, software.amazon.awssdk.services.sns.model.TagLimitExceededException, software.amazon.awssdk.services.sns.model.StaleTagException, software.amazon.awssdk.services.sns.model.TagPolicyException, software.amazon.awssdk.services.sns.model.ConcurrentAccessException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Creates a topic to which notifications can be published. Users can create at most 100,000 topics. For more information, see https://aws.amazon.com/sns. This action is idempotent, so if the requester already owns a topic with the specified name, that topic's ARN is returned without creating a new topic.
- Specified by:
createTopicin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
createTopicRequest- Input for CreateTopic action.- Returns:
- Result of the CreateTopic operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.TopicLimitExceededException- Indicates that the customer already owns the maximum allowed number of topics.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.services.sns.model.InvalidSecurityException- The credential signature isn't valid. You must use an HTTPS endpoint and sign your request using Signature Version 4.software.amazon.awssdk.services.sns.model.TagLimitExceededException- Can't add more than 50 tags to a topic.software.amazon.awssdk.services.sns.model.StaleTagException- A tag has been added to a resource with the same ARN as a deleted resource. Wait a short while and then retry the operation.software.amazon.awssdk.services.sns.model.TagPolicyException- The request doesn't comply with the IAM tag policy. Correct your request and then retry it.software.amazon.awssdk.services.sns.model.ConcurrentAccessException- Can't perform multiple operations on a tag simultaneously. Perform the operations sequentially.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
deleteEndpoint
public software.amazon.awssdk.services.sns.model.DeleteEndpointResponse deleteEndpoint(software.amazon.awssdk.services.sns.model.DeleteEndpointRequest deleteEndpointRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Deletes the endpoint for a device and mobile app from Amazon SNS. This action is idempotent. For more information, see Using Amazon SNS Mobile Push Notifications.
When you delete an endpoint that is also subscribed to a topic, then you must also unsubscribe the endpoint from the topic.
- Specified by:
deleteEndpointin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
deleteEndpointRequest- Input for DeleteEndpoint action.- Returns:
- Result of the DeleteEndpoint operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
deletePlatformApplication
public software.amazon.awssdk.services.sns.model.DeletePlatformApplicationResponse deletePlatformApplication(software.amazon.awssdk.services.sns.model.DeletePlatformApplicationRequest deletePlatformApplicationRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Deletes a platform application object for one of the supported push notification services, such as APNS and GCM (Firebase Cloud Messaging). For more information, see Using Amazon SNS Mobile Push Notifications.
- Specified by:
deletePlatformApplicationin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
deletePlatformApplicationRequest- Input for DeletePlatformApplication action.- Returns:
- Result of the DeletePlatformApplication operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
deleteTopic
public software.amazon.awssdk.services.sns.model.DeleteTopicResponse deleteTopic(software.amazon.awssdk.services.sns.model.DeleteTopicRequest deleteTopicRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.services.sns.model.NotFoundException, software.amazon.awssdk.services.sns.model.StaleTagException, software.amazon.awssdk.services.sns.model.TagPolicyException, software.amazon.awssdk.services.sns.model.ConcurrentAccessException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Deletes a topic and all its subscriptions. Deleting a topic might prevent some messages previously sent to the topic from being delivered to subscribers. This action is idempotent, so deleting a topic that does not exist does not result in an error.
- Specified by:
deleteTopicin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
deleteTopicRequest-- Returns:
- Result of the DeleteTopic operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.services.sns.model.NotFoundException- Indicates that the requested resource does not exist.software.amazon.awssdk.services.sns.model.StaleTagException- A tag has been added to a resource with the same ARN as a deleted resource. Wait a short while and then retry the operation.software.amazon.awssdk.services.sns.model.TagPolicyException- The request doesn't comply with the IAM tag policy. Correct your request and then retry it.software.amazon.awssdk.services.sns.model.ConcurrentAccessException- Can't perform multiple operations on a tag simultaneously. Perform the operations sequentially.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
getPlatformApplicationAttributes
public software.amazon.awssdk.services.sns.model.GetPlatformApplicationAttributesResponse getPlatformApplicationAttributes(software.amazon.awssdk.services.sns.model.GetPlatformApplicationAttributesRequest getPlatformApplicationAttributesRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.services.sns.model.NotFoundException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Retrieves the attributes of the platform application object for the supported push notification services, such as APNS and GCM. For more information, see Using Amazon SNS Mobile Push Notifications.
- Specified by:
getPlatformApplicationAttributesin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
getPlatformApplicationAttributesRequest- Input for GetPlatformApplicationAttributes action.- Returns:
- Result of the GetPlatformApplicationAttributes operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.services.sns.model.NotFoundException- Indicates that the requested resource does not exist.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
getSMSAttributes
public software.amazon.awssdk.services.sns.model.GetSmsAttributesResponse getSMSAttributes(software.amazon.awssdk.services.sns.model.GetSmsAttributesRequest getSMSAttributesRequest) throws software.amazon.awssdk.services.sns.model.ThrottledException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Returns the settings for sending SMS messages from your account.
These settings are set with the
SetSMSAttributesaction.- Specified by:
getSMSAttributesin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
getSMSAttributesRequest- The input for theGetSMSAttributesrequest.- Returns:
- Result of the GetSMSAttributes operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.ThrottledException- Indicates that the rate at which requests have been submitted for this action exceeds the limit for your account.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
getSubscriptionAttributes
public software.amazon.awssdk.services.sns.model.GetSubscriptionAttributesResponse getSubscriptionAttributes(software.amazon.awssdk.services.sns.model.GetSubscriptionAttributesRequest getSubscriptionAttributesRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.NotFoundException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Returns all of the properties of a subscription.
- Specified by:
getSubscriptionAttributesin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
getSubscriptionAttributesRequest- Input for GetSubscriptionAttributes.- Returns:
- Result of the GetSubscriptionAttributes operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.NotFoundException- Indicates that the requested resource does not exist.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
getTopicAttributes
public software.amazon.awssdk.services.sns.model.GetTopicAttributesResponse getTopicAttributes(software.amazon.awssdk.services.sns.model.GetTopicAttributesRequest getTopicAttributesRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.NotFoundException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.services.sns.model.InvalidSecurityException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Returns all of the properties of a topic. Topic properties returned might differ based on the authorization of the user.
- Specified by:
getTopicAttributesin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
getTopicAttributesRequest- Input for GetTopicAttributes action.- Returns:
- Result of the GetTopicAttributes operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.NotFoundException- Indicates that the requested resource does not exist.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.services.sns.model.InvalidSecurityException- The credential signature isn't valid. You must use an HTTPS endpoint and sign your request using Signature Version 4.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
listEndpointsByPlatformApplication
public software.amazon.awssdk.services.sns.model.ListEndpointsByPlatformApplicationResponse listEndpointsByPlatformApplication(software.amazon.awssdk.services.sns.model.ListEndpointsByPlatformApplicationRequest listEndpointsByPlatformApplicationRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.services.sns.model.NotFoundException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Lists the endpoints and endpoint attributes for devices in a supported push notification service, such as GCM (Firebase Cloud Messaging) and APNS. The results for
ListEndpointsByPlatformApplicationare paginated and return a limited list of endpoints, up to 100. If additional records are available after the first page results, then a NextToken string will be returned. To receive the next page, you callListEndpointsByPlatformApplicationagain using the NextToken string received from the previous call. When there are no more records to return, NextToken will be null. For more information, see Using Amazon SNS Mobile Push Notifications.This action is throttled at 30 transactions per second (TPS).
- Specified by:
listEndpointsByPlatformApplicationin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
listEndpointsByPlatformApplicationRequest- Input for ListEndpointsByPlatformApplication action.- Returns:
- Result of the ListEndpointsByPlatformApplication operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.services.sns.model.NotFoundException- Indicates that the requested resource does not exist.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
listEndpointsByPlatformApplicationPaginator
public software.amazon.awssdk.services.sns.paginators.ListEndpointsByPlatformApplicationIterable listEndpointsByPlatformApplicationPaginator(software.amazon.awssdk.services.sns.model.ListEndpointsByPlatformApplicationRequest listEndpointsByPlatformApplicationRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.services.sns.model.NotFoundException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Lists the endpoints and endpoint attributes for devices in a supported push notification service, such as GCM (Firebase Cloud Messaging) and APNS. The results for
ListEndpointsByPlatformApplicationare paginated and return a limited list of endpoints, up to 100. If additional records are available after the first page results, then a NextToken string will be returned. To receive the next page, you callListEndpointsByPlatformApplicationagain using the NextToken string received from the previous call. When there are no more records to return, NextToken will be null. For more information, see Using Amazon SNS Mobile Push Notifications.This action is throttled at 30 transactions per second (TPS).
This is a variant of
SnsClient.listEndpointsByPlatformApplication(software.amazon.awssdk.services.sns.model.ListEndpointsByPlatformApplicationRequest)operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.sns.paginators.ListEndpointsByPlatformApplicationIterable responses = client.listEndpointsByPlatformApplicationPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.sns.paginators.ListEndpointsByPlatformApplicationIterable responses = client .listEndpointsByPlatformApplicationPaginator(request); for (software.amazon.awssdk.services.sns.model.ListEndpointsByPlatformApplicationResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.sns.paginators.ListEndpointsByPlatformApplicationIterable responses = client.listEndpointsByPlatformApplicationPaginator(request); responses.iterator().forEachRemaining(....);Please notice that the configuration of null won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
SnsClient.listEndpointsByPlatformApplication(software.amazon.awssdk.services.sns.model.ListEndpointsByPlatformApplicationRequest)operation.- Specified by:
listEndpointsByPlatformApplicationPaginatorin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
listEndpointsByPlatformApplicationRequest- Input for ListEndpointsByPlatformApplication action.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.services.sns.model.NotFoundException- Indicates that the requested resource does not exist.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
listPhoneNumbersOptedOut
public software.amazon.awssdk.services.sns.model.ListPhoneNumbersOptedOutResponse listPhoneNumbersOptedOut(software.amazon.awssdk.services.sns.model.ListPhoneNumbersOptedOutRequest listPhoneNumbersOptedOutRequest) throws software.amazon.awssdk.services.sns.model.ThrottledException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Returns a list of phone numbers that are opted out, meaning you cannot send SMS messages to them.
The results for
ListPhoneNumbersOptedOutare paginated, and each page returns up to 100 phone numbers. If additional phone numbers are available after the first page of results, then aNextTokenstring will be returned. To receive the next page, you callListPhoneNumbersOptedOutagain using theNextTokenstring received from the previous call. When there are no more records to return,NextTokenwill be null.- Specified by:
listPhoneNumbersOptedOutin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
listPhoneNumbersOptedOutRequest- The input for theListPhoneNumbersOptedOutaction.- Returns:
- Result of the ListPhoneNumbersOptedOut operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.ThrottledException- Indicates that the rate at which requests have been submitted for this action exceeds the limit for your account.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
listPlatformApplications
public software.amazon.awssdk.services.sns.model.ListPlatformApplicationsResponse listPlatformApplications(software.amazon.awssdk.services.sns.model.ListPlatformApplicationsRequest listPlatformApplicationsRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Lists the platform application objects for the supported push notification services, such as APNS and GCM (Firebase Cloud Messaging). The results for
ListPlatformApplicationsare paginated and return a limited list of applications, up to 100. If additional records are available after the first page results, then a NextToken string will be returned. To receive the next page, you callListPlatformApplicationsusing the NextToken string received from the previous call. When there are no more records to return,NextTokenwill be null. For more information, see Using Amazon SNS Mobile Push Notifications.This action is throttled at 15 transactions per second (TPS).
- Specified by:
listPlatformApplicationsin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
listPlatformApplicationsRequest- Input for ListPlatformApplications action.- Returns:
- Result of the ListPlatformApplications operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
listPlatformApplicationsPaginator
public software.amazon.awssdk.services.sns.paginators.ListPlatformApplicationsIterable listPlatformApplicationsPaginator(software.amazon.awssdk.services.sns.model.ListPlatformApplicationsRequest listPlatformApplicationsRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Lists the platform application objects for the supported push notification services, such as APNS and GCM (Firebase Cloud Messaging). The results for
ListPlatformApplicationsare paginated and return a limited list of applications, up to 100. If additional records are available after the first page results, then a NextToken string will be returned. To receive the next page, you callListPlatformApplicationsusing the NextToken string received from the previous call. When there are no more records to return,NextTokenwill be null. For more information, see Using Amazon SNS Mobile Push Notifications.This action is throttled at 15 transactions per second (TPS).
This is a variant of
SnsClient.listPlatformApplications(software.amazon.awssdk.services.sns.model.ListPlatformApplicationsRequest)operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.sns.paginators.ListPlatformApplicationsIterable responses = client.listPlatformApplicationsPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.sns.paginators.ListPlatformApplicationsIterable responses = client .listPlatformApplicationsPaginator(request); for (software.amazon.awssdk.services.sns.model.ListPlatformApplicationsResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.sns.paginators.ListPlatformApplicationsIterable responses = client.listPlatformApplicationsPaginator(request); responses.iterator().forEachRemaining(....);Please notice that the configuration of null won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
SnsClient.listPlatformApplications(software.amazon.awssdk.services.sns.model.ListPlatformApplicationsRequest)operation.- Specified by:
listPlatformApplicationsPaginatorin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
listPlatformApplicationsRequest- Input for ListPlatformApplications action.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
listSubscriptions
public software.amazon.awssdk.services.sns.model.ListSubscriptionsResponse listSubscriptions(software.amazon.awssdk.services.sns.model.ListSubscriptionsRequest listSubscriptionsRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Returns a list of the requester's subscriptions. Each call returns a limited list of subscriptions, up to 100. If there are more subscriptions, a
NextTokenis also returned. Use theNextTokenparameter in a newListSubscriptionscall to get further results.This action is throttled at 30 transactions per second (TPS).
- Specified by:
listSubscriptionsin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
listSubscriptionsRequest- Input for ListSubscriptions action.- Returns:
- Result of the ListSubscriptions operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
listSubscriptionsPaginator
public software.amazon.awssdk.services.sns.paginators.ListSubscriptionsIterable listSubscriptionsPaginator(software.amazon.awssdk.services.sns.model.ListSubscriptionsRequest listSubscriptionsRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Returns a list of the requester's subscriptions. Each call returns a limited list of subscriptions, up to 100. If there are more subscriptions, a
NextTokenis also returned. Use theNextTokenparameter in a newListSubscriptionscall to get further results.This action is throttled at 30 transactions per second (TPS).
This is a variant of
SnsClient.listSubscriptions(software.amazon.awssdk.services.sns.model.ListSubscriptionsRequest)operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.sns.paginators.ListSubscriptionsIterable responses = client.listSubscriptionsPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.sns.paginators.ListSubscriptionsIterable responses = client .listSubscriptionsPaginator(request); for (software.amazon.awssdk.services.sns.model.ListSubscriptionsResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.sns.paginators.ListSubscriptionsIterable responses = client.listSubscriptionsPaginator(request); responses.iterator().forEachRemaining(....);Please notice that the configuration of null won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
SnsClient.listSubscriptions(software.amazon.awssdk.services.sns.model.ListSubscriptionsRequest)operation.- Specified by:
listSubscriptionsPaginatorin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
listSubscriptionsRequest- Input for ListSubscriptions action.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
listSubscriptionsByTopic
public software.amazon.awssdk.services.sns.model.ListSubscriptionsByTopicResponse listSubscriptionsByTopic(software.amazon.awssdk.services.sns.model.ListSubscriptionsByTopicRequest listSubscriptionsByTopicRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.NotFoundException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Returns a list of the subscriptions to a specific topic. Each call returns a limited list of subscriptions, up to 100. If there are more subscriptions, a
NextTokenis also returned. Use theNextTokenparameter in a newListSubscriptionsByTopiccall to get further results.This action is throttled at 30 transactions per second (TPS).
- Specified by:
listSubscriptionsByTopicin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
listSubscriptionsByTopicRequest- Input for ListSubscriptionsByTopic action.- Returns:
- Result of the ListSubscriptionsByTopic operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.NotFoundException- Indicates that the requested resource does not exist.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
listSubscriptionsByTopicPaginator
public software.amazon.awssdk.services.sns.paginators.ListSubscriptionsByTopicIterable listSubscriptionsByTopicPaginator(software.amazon.awssdk.services.sns.model.ListSubscriptionsByTopicRequest listSubscriptionsByTopicRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.NotFoundException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Returns a list of the subscriptions to a specific topic. Each call returns a limited list of subscriptions, up to 100. If there are more subscriptions, a
NextTokenis also returned. Use theNextTokenparameter in a newListSubscriptionsByTopiccall to get further results.This action is throttled at 30 transactions per second (TPS).
This is a variant of
SnsClient.listSubscriptionsByTopic(software.amazon.awssdk.services.sns.model.ListSubscriptionsByTopicRequest)operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.sns.paginators.ListSubscriptionsByTopicIterable responses = client.listSubscriptionsByTopicPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.sns.paginators.ListSubscriptionsByTopicIterable responses = client .listSubscriptionsByTopicPaginator(request); for (software.amazon.awssdk.services.sns.model.ListSubscriptionsByTopicResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.sns.paginators.ListSubscriptionsByTopicIterable responses = client.listSubscriptionsByTopicPaginator(request); responses.iterator().forEachRemaining(....);Please notice that the configuration of null won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
SnsClient.listSubscriptionsByTopic(software.amazon.awssdk.services.sns.model.ListSubscriptionsByTopicRequest)operation.- Specified by:
listSubscriptionsByTopicPaginatorin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
listSubscriptionsByTopicRequest- Input for ListSubscriptionsByTopic action.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.NotFoundException- Indicates that the requested resource does not exist.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
listTopics
public software.amazon.awssdk.services.sns.model.ListTopicsResponse listTopics(software.amazon.awssdk.services.sns.model.ListTopicsRequest listTopicsRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Returns a list of the requester's topics. Each call returns a limited list of topics, up to 100. If there are more topics, a
NextTokenis also returned. Use theNextTokenparameter in a newListTopicscall to get further results.This action is throttled at 30 transactions per second (TPS).
- Specified by:
listTopicsin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
listTopicsRequest-- Returns:
- Result of the ListTopics operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
listTopicsPaginator
public software.amazon.awssdk.services.sns.paginators.ListTopicsIterable listTopicsPaginator(software.amazon.awssdk.services.sns.model.ListTopicsRequest listTopicsRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Returns a list of the requester's topics. Each call returns a limited list of topics, up to 100. If there are more topics, a
NextTokenis also returned. Use theNextTokenparameter in a newListTopicscall to get further results.This action is throttled at 30 transactions per second (TPS).
This is a variant of
SnsClient.listTopics(software.amazon.awssdk.services.sns.model.ListTopicsRequest)operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Stream
2) Using For loopsoftware.amazon.awssdk.services.sns.paginators.ListTopicsIterable responses = client.listTopicsPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.sns.paginators.ListTopicsIterable responses = client.listTopicsPaginator(request); for (software.amazon.awssdk.services.sns.model.ListTopicsResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.sns.paginators.ListTopicsIterable responses = client.listTopicsPaginator(request); responses.iterator().forEachRemaining(....);Please notice that the configuration of null won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
SnsClient.listTopics(software.amazon.awssdk.services.sns.model.ListTopicsRequest)operation.- Specified by:
listTopicsPaginatorin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
listTopicsRequest-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
optInPhoneNumber
public software.amazon.awssdk.services.sns.model.OptInPhoneNumberResponse optInPhoneNumber(software.amazon.awssdk.services.sns.model.OptInPhoneNumberRequest optInPhoneNumberRequest) throws software.amazon.awssdk.services.sns.model.ThrottledException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Use this request to opt in a phone number that is opted out, which enables you to resume sending SMS messages to the number.
You can opt in a phone number only once every 30 days.
- Specified by:
optInPhoneNumberin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
optInPhoneNumberRequest- Input for the OptInPhoneNumber action.- Returns:
- Result of the OptInPhoneNumber operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.ThrottledException- Indicates that the rate at which requests have been submitted for this action exceeds the limit for your account.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
removePermission
public software.amazon.awssdk.services.sns.model.RemovePermissionResponse removePermission(software.amazon.awssdk.services.sns.model.RemovePermissionRequest removePermissionRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.services.sns.model.NotFoundException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Removes a statement from a topic's access control policy.
- Specified by:
removePermissionin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
removePermissionRequest- Input for RemovePermission action.- Returns:
- Result of the RemovePermission operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.services.sns.model.NotFoundException- Indicates that the requested resource does not exist.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
setEndpointAttributes
public software.amazon.awssdk.services.sns.model.SetEndpointAttributesResponse setEndpointAttributes(software.amazon.awssdk.services.sns.model.SetEndpointAttributesRequest setEndpointAttributesRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.services.sns.model.NotFoundException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Sets the attributes for an endpoint for a device on one of the supported push notification services, such as GCM (Firebase Cloud Messaging) and APNS. For more information, see Using Amazon SNS Mobile Push Notifications.
- Specified by:
setEndpointAttributesin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
setEndpointAttributesRequest- Input for SetEndpointAttributes action.- Returns:
- Result of the SetEndpointAttributes operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.services.sns.model.NotFoundException- Indicates that the requested resource does not exist.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
setPlatformApplicationAttributes
public software.amazon.awssdk.services.sns.model.SetPlatformApplicationAttributesResponse setPlatformApplicationAttributes(software.amazon.awssdk.services.sns.model.SetPlatformApplicationAttributesRequest setPlatformApplicationAttributesRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.services.sns.model.NotFoundException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Sets the attributes of the platform application object for the supported push notification services, such as APNS and GCM (Firebase Cloud Messaging). For more information, see Using Amazon SNS Mobile Push Notifications. For information on configuring attributes for message delivery status, see Using Amazon SNS Application Attributes for Message Delivery Status.
- Specified by:
setPlatformApplicationAttributesin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
setPlatformApplicationAttributesRequest- Input for SetPlatformApplicationAttributes action.- Returns:
- Result of the SetPlatformApplicationAttributes operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.services.sns.model.NotFoundException- Indicates that the requested resource does not exist.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
setSMSAttributes
public software.amazon.awssdk.services.sns.model.SetSmsAttributesResponse setSMSAttributes(software.amazon.awssdk.services.sns.model.SetSmsAttributesRequest setSMSAttributesRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.ThrottledException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Use this request to set the default settings for sending SMS messages and receiving daily SMS usage reports.
You can override some of these settings for a single message when you use the
Publishaction with theMessageAttributes.entry.Nparameter. For more information, see Sending an SMS Message in the Amazon SNS Developer Guide.- Specified by:
setSMSAttributesin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
setSMSAttributesRequest- The input for the SetSMSAttributes action.- Returns:
- Result of the SetSMSAttributes operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.ThrottledException- Indicates that the rate at which requests have been submitted for this action exceeds the limit for your account.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
setSubscriptionAttributes
public software.amazon.awssdk.services.sns.model.SetSubscriptionAttributesResponse setSubscriptionAttributes(software.amazon.awssdk.services.sns.model.SetSubscriptionAttributesRequest setSubscriptionAttributesRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.FilterPolicyLimitExceededException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.NotFoundException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Allows a subscription owner to set an attribute of the subscription to a new value.
- Specified by:
setSubscriptionAttributesin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
setSubscriptionAttributesRequest- Input for SetSubscriptionAttributes action.- Returns:
- Result of the SetSubscriptionAttributes operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.FilterPolicyLimitExceededException- Indicates that the number of filter polices in your AWS account exceeds the limit. To add more filter polices, submit an SNS Limit Increase case in the AWS Support Center.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.NotFoundException- Indicates that the requested resource does not exist.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
setTopicAttributes
public software.amazon.awssdk.services.sns.model.SetTopicAttributesResponse setTopicAttributes(software.amazon.awssdk.services.sns.model.SetTopicAttributesRequest setTopicAttributesRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.NotFoundException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.services.sns.model.InvalidSecurityException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Allows a topic owner to set an attribute of the topic to a new value.
- Specified by:
setTopicAttributesin interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
setTopicAttributesRequest- Input for SetTopicAttributes action.- Returns:
- Result of the SetTopicAttributes operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.NotFoundException- Indicates that the requested resource does not exist.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.services.sns.model.InvalidSecurityException- The credential signature isn't valid. You must use an HTTPS endpoint and sign your request using Signature Version 4.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
subscribe
public software.amazon.awssdk.services.sns.model.SubscribeResponse subscribe(software.amazon.awssdk.services.sns.model.SubscribeRequest subscribeRequest) throws software.amazon.awssdk.services.sns.model.SubscriptionLimitExceededException, software.amazon.awssdk.services.sns.model.FilterPolicyLimitExceededException, software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.NotFoundException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.services.sns.model.InvalidSecurityException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Subscribes an endpoint to an Amazon SNS topic. If the endpoint type is HTTP/S or email, or if the endpoint and the topic are not in the same AWS account, the endpoint owner must the
ConfirmSubscriptionaction to confirm the subscription.You call the
ConfirmSubscriptionaction with the token from the subscription response. Confirmation tokens are valid for three days.This action is throttled at 100 transactions per second (TPS).
- Specified by:
subscribein interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
subscribeRequest- Input for Subscribe action.- Returns:
- Result of the Subscribe operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.SubscriptionLimitExceededException- Indicates that the customer already owns the maximum allowed number of subscriptions.software.amazon.awssdk.services.sns.model.FilterPolicyLimitExceededException- Indicates that the number of filter polices in your AWS account exceeds the limit. To add more filter polices, submit an SNS Limit Increase case in the AWS Support Center.software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.NotFoundException- Indicates that the requested resource does not exist.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.services.sns.model.InvalidSecurityException- The credential signature isn't valid. You must use an HTTPS endpoint and sign your request using Signature Version 4.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
unsubscribe
public software.amazon.awssdk.services.sns.model.UnsubscribeResponse unsubscribe(software.amazon.awssdk.services.sns.model.UnsubscribeRequest unsubscribeRequest) throws software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.InternalErrorException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.services.sns.model.NotFoundException, software.amazon.awssdk.services.sns.model.InvalidSecurityException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException 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 AWS signature is required. If the
Unsubscribecall 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 theUnsubscriberequest was unintended.This action is throttled at 100 transactions per second (TPS).
- Specified by:
unsubscribein interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
unsubscribeRequest- Input for Unsubscribe action.- Returns:
- Result of the Unsubscribe operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.InternalErrorException- Indicates an internal service error.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.services.sns.model.NotFoundException- Indicates that the requested resource does not exist.software.amazon.awssdk.services.sns.model.InvalidSecurityException- The credential signature isn't valid. You must use an HTTPS endpoint and sign your request using Signature Version 4.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
listTagsForResource
public software.amazon.awssdk.services.sns.model.ListTagsForResourceResponse listTagsForResource(software.amazon.awssdk.services.sns.model.ListTagsForResourceRequest listTagsForResourceRequest) throws software.amazon.awssdk.services.sns.model.ResourceNotFoundException, software.amazon.awssdk.services.sns.model.TagPolicyException, software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.services.sns.model.ConcurrentAccessException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException List all tags added to the specified Amazon SNS topic. For an overview, see Amazon SNS Tags in the Amazon Simple Notification Service Developer Guide.
- Specified by:
listTagsForResourcein interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
listTagsForResourceRequest-- Returns:
- Result of the ListTagsForResource operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.ResourceNotFoundException- Can't tag resource. Verify that the topic exists.software.amazon.awssdk.services.sns.model.TagPolicyException- The request doesn't comply with the IAM tag policy. Correct your request and then retry it.software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.services.sns.model.ConcurrentAccessException- Can't perform multiple operations on a tag simultaneously. Perform the operations sequentially.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
tagResource
public software.amazon.awssdk.services.sns.model.TagResourceResponse tagResource(software.amazon.awssdk.services.sns.model.TagResourceRequest tagResourceRequest) throws software.amazon.awssdk.services.sns.model.ResourceNotFoundException, software.amazon.awssdk.services.sns.model.TagLimitExceededException, software.amazon.awssdk.services.sns.model.StaleTagException, software.amazon.awssdk.services.sns.model.TagPolicyException, software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.services.sns.model.ConcurrentAccessException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Add tags to the specified Amazon SNS topic. For an overview, see Amazon SNS Tags in the Amazon SNS Developer Guide.
When you use topic tags, keep the following guidelines in mind:
-
Adding more than 50 tags to a topic isn't recommended.
-
Tags don't have any semantic meaning. Amazon SNS interprets tags as character strings.
-
Tags are case-sensitive.
-
A new tag with a key identical to that of an existing tag overwrites the existing tag.
-
Tagging actions are limited to 10 TPS per AWS account, per AWS region. If your application requires a higher throughput, file a technical support request.
- Specified by:
tagResourcein interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
tagResourceRequest-- Returns:
- Result of the TagResource operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.ResourceNotFoundException- Can't tag resource. Verify that the topic exists.software.amazon.awssdk.services.sns.model.TagLimitExceededException- Can't add more than 50 tags to a topic.software.amazon.awssdk.services.sns.model.StaleTagException- A tag has been added to a resource with the same ARN as a deleted resource. Wait a short while and then retry the operation.software.amazon.awssdk.services.sns.model.TagPolicyException- The request doesn't comply with the IAM tag policy. Correct your request and then retry it.software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.services.sns.model.ConcurrentAccessException- Can't perform multiple operations on a tag simultaneously. Perform the operations sequentially.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
-
untagResource
public software.amazon.awssdk.services.sns.model.UntagResourceResponse untagResource(software.amazon.awssdk.services.sns.model.UntagResourceRequest untagResourceRequest) throws software.amazon.awssdk.services.sns.model.ResourceNotFoundException, software.amazon.awssdk.services.sns.model.TagLimitExceededException, software.amazon.awssdk.services.sns.model.StaleTagException, software.amazon.awssdk.services.sns.model.TagPolicyException, software.amazon.awssdk.services.sns.model.InvalidParameterException, software.amazon.awssdk.services.sns.model.AuthorizationErrorException, software.amazon.awssdk.services.sns.model.ConcurrentAccessException, software.amazon.awssdk.awscore.exception.AwsServiceException, software.amazon.awssdk.core.exception.SdkClientException, software.amazon.awssdk.services.sns.model.SnsException Remove tags from the specified Amazon SNS topic. For an overview, see Amazon SNS Tags in the Amazon SNS Developer Guide.
- Specified by:
untagResourcein interfacesoftware.amazon.awssdk.services.sns.SnsClient- Parameters:
untagResourceRequest-- Returns:
- Result of the UntagResource operation returned by the service.
- Throws:
software.amazon.awssdk.services.sns.model.ResourceNotFoundException- Can't tag resource. Verify that the topic exists.software.amazon.awssdk.services.sns.model.TagLimitExceededException- Can't add more than 50 tags to a topic.software.amazon.awssdk.services.sns.model.StaleTagException- A tag has been added to a resource with the same ARN as a deleted resource. Wait a short while and then retry the operation.software.amazon.awssdk.services.sns.model.TagPolicyException- The request doesn't comply with the IAM tag policy. Correct your request and then retry it.software.amazon.awssdk.services.sns.model.InvalidParameterException- Indicates that a request parameter does not comply with the associated constraints.software.amazon.awssdk.services.sns.model.AuthorizationErrorException- Indicates that the user has been denied access to the requested resource.software.amazon.awssdk.services.sns.model.ConcurrentAccessException- Can't perform multiple operations on a tag simultaneously. Perform the operations sequentially.software.amazon.awssdk.core.exception.SdkException- Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.software.amazon.awssdk.core.exception.SdkClientException- If any client side error occurs such as an IO related failure, failure to get credentials, etc.software.amazon.awssdk.services.sns.model.SnsException- Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.software.amazon.awssdk.awscore.exception.AwsServiceException- See Also:
-
serviceName
- Specified by:
serviceNamein interfacesoftware.amazon.awssdk.core.SdkClient
-