Sin descripción

AWSSNSService.h 80KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899
  1. //
  2. // Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License").
  5. // You may not use this file except in compliance with the License.
  6. // A copy of the License is located at
  7. //
  8. // http://aws.amazon.com/apache2.0
  9. //
  10. // or in the "license" file accompanying this file. This file is distributed
  11. // on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  12. // express or implied. See the License for the specific language governing
  13. // permissions and limitations under the License.
  14. //
  15. #import <Foundation/Foundation.h>
  16. #import <AWSCore/AWSCore.h>
  17. #import "AWSSNSModel.h"
  18. #import "AWSSNSResources.h"
  19. NS_ASSUME_NONNULL_BEGIN
  20. //! SDK version for AWSSNS
  21. FOUNDATION_EXPORT NSString *const AWSSNSSDKVersion;
  22. /**
  23. <fullname>Amazon Simple Notification Service</fullname><p>Amazon Simple Notification Service (Amazon SNS) is a web service that enables you to build distributed web-enabled applications. Applications can use Amazon SNS to easily push real-time notification messages to interested subscribers over multiple delivery protocols. For more information about this product see <a href="http://aws.amazon.com/sns/">http://aws.amazon.com/sns</a>. For detailed information about Amazon SNS features and their associated API calls, see the <a href="http://docs.aws.amazon.com/sns/latest/dg/">Amazon SNS Developer Guide</a>. </p><p>We also provide SDKs that enable you to access Amazon SNS from your preferred programming language. The SDKs contain functionality that automatically takes care of tasks such as: cryptographically signing your service requests, retrying requests, and handling error responses. For a list of available SDKs, go to <a href="http://aws.amazon.com/tools/">Tools for Amazon Web Services</a>. </p>
  24. */
  25. @interface AWSSNS : AWSService
  26. /**
  27. The service configuration used to instantiate this service client.
  28. @warning Once the client is instantiated, do not modify the configuration object. It may cause unspecified behaviors.
  29. */
  30. @property (nonatomic, strong, readonly) AWSServiceConfiguration *configuration;
  31. /**
  32. Returns the singleton service client. If the singleton object does not exist, the SDK instantiates the default service client with `defaultServiceConfiguration` from `[AWSServiceManager defaultServiceManager]`. The reference to this object is maintained by the SDK, and you do not need to retain it manually.
  33. For example, set the default service configuration in `- application:didFinishLaunchingWithOptions:`
  34. *Swift*
  35. func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
  36. let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
  37. let configuration = AWSServiceConfiguration(region: .USEast1, credentialsProvider: credentialProvider)
  38. AWSServiceManager.default().defaultServiceConfiguration = configuration
  39. return true
  40. }
  41. *Objective-C*
  42. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  43. AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
  44. identityPoolId:@"YourIdentityPoolId"];
  45. AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1
  46. credentialsProvider:credentialsProvider];
  47. [AWSServiceManager defaultServiceManager].defaultServiceConfiguration = configuration;
  48. return YES;
  49. }
  50. Then call the following to get the default service client:
  51. *Swift*
  52. let SNS = AWSSNS.default()
  53. *Objective-C*
  54. AWSSNS *SNS = [AWSSNS defaultSNS];
  55. @return The default service client.
  56. */
  57. + (instancetype)defaultSNS;
  58. /**
  59. Creates a service client with the given service configuration and registers it for the key.
  60. For example, set the default service configuration in `- application:didFinishLaunchingWithOptions:`
  61. *Swift*
  62. func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
  63. let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
  64. let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
  65. AWSSNS.register(with: configuration!, forKey: "USWest2SNS")
  66. return true
  67. }
  68. *Objective-C*
  69. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  70. AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
  71. identityPoolId:@"YourIdentityPoolId"];
  72. AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
  73. credentialsProvider:credentialsProvider];
  74. [AWSSNS registerSNSWithConfiguration:configuration forKey:@"USWest2SNS"];
  75. return YES;
  76. }
  77. Then call the following to get the service client:
  78. *Swift*
  79. let SNS = AWSSNS(forKey: "USWest2SNS")
  80. *Objective-C*
  81. AWSSNS *SNS = [AWSSNS SNSForKey:@"USWest2SNS"];
  82. @warning After calling this method, do not modify the configuration object. It may cause unspecified behaviors.
  83. @param configuration A service configuration object.
  84. @param key A string to identify the service client.
  85. */
  86. + (void)registerSNSWithConfiguration:(AWSServiceConfiguration *)configuration forKey:(NSString *)key;
  87. /**
  88. Retrieves the service client associated with the key. You need to call `+ registerSNSWithConfiguration:forKey:` before invoking this method.
  89. For example, set the default service configuration in `- application:didFinishLaunchingWithOptions:`
  90. *Swift*
  91. func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
  92. let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
  93. let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
  94. AWSSNS.register(with: configuration!, forKey: "USWest2SNS")
  95. return true
  96. }
  97. *Objective-C*
  98. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  99. AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
  100. identityPoolId:@"YourIdentityPoolId"];
  101. AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
  102. credentialsProvider:credentialsProvider];
  103. [AWSSNS registerSNSWithConfiguration:configuration forKey:@"USWest2SNS"];
  104. return YES;
  105. }
  106. Then call the following to get the service client:
  107. *Swift*
  108. let SNS = AWSSNS(forKey: "USWest2SNS")
  109. *Objective-C*
  110. AWSSNS *SNS = [AWSSNS SNSForKey:@"USWest2SNS"];
  111. @param key A string to identify the service client.
  112. @return An instance of the service client.
  113. */
  114. + (instancetype)SNSForKey:(NSString *)key;
  115. /**
  116. Removes the service client associated with the key and release it.
  117. @warning Before calling this method, make sure no method is running on this client.
  118. @param key A string to identify the service client.
  119. */
  120. + (void)removeSNSForKey:(NSString *)key;
  121. /**
  122. <p>Adds a statement to a topic's access control policy, granting access for the specified AWS accounts to the specified actions.</p>
  123. @param request A container for the necessary parameters to execute the AddPermission service method.
  124. @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
  125. @see AWSSNSAddPermissionInput
  126. */
  127. - (AWSTask *)addPermission:(AWSSNSAddPermissionInput *)request;
  128. /**
  129. <p>Adds a statement to a topic's access control policy, granting access for the specified AWS accounts to the specified actions.</p>
  130. @param request A container for the necessary parameters to execute the AddPermission service method.
  131. @param completionHandler The completion handler to call when the load request is complete.
  132. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
  133. @see AWSSNSAddPermissionInput
  134. */
  135. - (void)addPermission:(AWSSNSAddPermissionInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
  136. /**
  137. <p>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.</p><p>To resume sending messages, you can opt in the number by using the <code>OptInPhoneNumber</code> action.</p>
  138. @param request A container for the necessary parameters to execute the CheckIfPhoneNumberIsOptedOut service method.
  139. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSCheckIfPhoneNumberIsOptedOutResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorThrottled`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidParameter`.
  140. @see AWSSNSCheckIfPhoneNumberIsOptedOutInput
  141. @see AWSSNSCheckIfPhoneNumberIsOptedOutResponse
  142. */
  143. - (AWSTask<AWSSNSCheckIfPhoneNumberIsOptedOutResponse *> *)checkIfPhoneNumberIsOptedOut:(AWSSNSCheckIfPhoneNumberIsOptedOutInput *)request;
  144. /**
  145. <p>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.</p><p>To resume sending messages, you can opt in the number by using the <code>OptInPhoneNumber</code> action.</p>
  146. @param request A container for the necessary parameters to execute the CheckIfPhoneNumberIsOptedOut service method.
  147. @param completionHandler The completion handler to call when the load request is complete.
  148. `response` - A response object, or `nil` if the request failed.
  149. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorThrottled`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidParameter`.
  150. @see AWSSNSCheckIfPhoneNumberIsOptedOutInput
  151. @see AWSSNSCheckIfPhoneNumberIsOptedOutResponse
  152. */
  153. - (void)checkIfPhoneNumberIsOptedOut:(AWSSNSCheckIfPhoneNumberIsOptedOutInput *)request completionHandler:(void (^ _Nullable)(AWSSNSCheckIfPhoneNumberIsOptedOutResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  154. /**
  155. <p>Verifies an endpoint owner's intent to receive messages by validating the token sent to the endpoint by an earlier <code>Subscribe</code> action. 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 the <code>AuthenticateOnUnsubscribe</code> flag is set to "true".</p>
  156. @param request A container for the necessary parameters to execute the ConfirmSubscription service method.
  157. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSConfirmSubscriptionResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorSubscriptionLimitExceeded`, `AWSSNSErrorInvalidParameter`, `AWSSNSErrorNotFound`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
  158. @see AWSSNSConfirmSubscriptionInput
  159. @see AWSSNSConfirmSubscriptionResponse
  160. */
  161. - (AWSTask<AWSSNSConfirmSubscriptionResponse *> *)confirmSubscription:(AWSSNSConfirmSubscriptionInput *)request;
  162. /**
  163. <p>Verifies an endpoint owner's intent to receive messages by validating the token sent to the endpoint by an earlier <code>Subscribe</code> action. 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 the <code>AuthenticateOnUnsubscribe</code> flag is set to "true".</p>
  164. @param request A container for the necessary parameters to execute the ConfirmSubscription service method.
  165. @param completionHandler The completion handler to call when the load request is complete.
  166. `response` - A response object, or `nil` if the request failed.
  167. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorSubscriptionLimitExceeded`, `AWSSNSErrorInvalidParameter`, `AWSSNSErrorNotFound`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
  168. @see AWSSNSConfirmSubscriptionInput
  169. @see AWSSNSConfirmSubscriptionResponse
  170. */
  171. - (void)confirmSubscription:(AWSSNSConfirmSubscriptionInput *)request completionHandler:(void (^ _Nullable)(AWSSNSConfirmSubscriptionResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  172. /**
  173. <p>Creates a platform application object for one of the supported push notification services, such as APNS and GCM, to which devices and mobile apps may register. You must specify PlatformPrincipal and PlatformCredential attributes when using the <code>CreatePlatformApplication</code> action. The PlatformPrincipal is received from the notification service. For APNS/APNS_SANDBOX, PlatformPrincipal is "SSL certificate". For GCM, PlatformPrincipal is not applicable. For ADM, PlatformPrincipal is "client id". The PlatformCredential is also received from the notification service. For WNS, PlatformPrincipal is "Package Security Identifier". For MPNS, PlatformPrincipal is "TLS certificate". For Baidu, PlatformPrincipal is "API key".</p><p>For APNS/APNS_SANDBOX, PlatformCredential is "private key". For GCM, PlatformCredential is "API key". For ADM, PlatformCredential is "client secret". For WNS, PlatformCredential is "secret key". For MPNS, PlatformCredential is "private key". For Baidu, PlatformCredential is "secret key". The PlatformApplicationArn that is returned when using <code>CreatePlatformApplication</code> is then used as an attribute for the <code>CreatePlatformEndpoint</code> action. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. For more information about obtaining the PlatformPrincipal and PlatformCredential for each of the supported push notification services, see <a href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-apns.html">Getting Started with Apple Push Notification Service</a>, <a href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-adm.html">Getting Started with Amazon Device Messaging</a>, <a href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-baidu.html">Getting Started with Baidu Cloud Push</a>, <a href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-gcm.html">Getting Started with Google Cloud Messaging for Android</a>, <a href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-mpns.html">Getting Started with MPNS</a>, or <a href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-wns.html">Getting Started with WNS</a>. </p>
  174. @param request A container for the necessary parameters to execute the CreatePlatformApplication service method.
  175. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSCreatePlatformApplicationResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
  176. @see AWSSNSCreatePlatformApplicationInput
  177. @see AWSSNSCreatePlatformApplicationResponse
  178. */
  179. - (AWSTask<AWSSNSCreatePlatformApplicationResponse *> *)createPlatformApplication:(AWSSNSCreatePlatformApplicationInput *)request;
  180. /**
  181. <p>Creates a platform application object for one of the supported push notification services, such as APNS and GCM, to which devices and mobile apps may register. You must specify PlatformPrincipal and PlatformCredential attributes when using the <code>CreatePlatformApplication</code> action. The PlatformPrincipal is received from the notification service. For APNS/APNS_SANDBOX, PlatformPrincipal is "SSL certificate". For GCM, PlatformPrincipal is not applicable. For ADM, PlatformPrincipal is "client id". The PlatformCredential is also received from the notification service. For WNS, PlatformPrincipal is "Package Security Identifier". For MPNS, PlatformPrincipal is "TLS certificate". For Baidu, PlatformPrincipal is "API key".</p><p>For APNS/APNS_SANDBOX, PlatformCredential is "private key". For GCM, PlatformCredential is "API key". For ADM, PlatformCredential is "client secret". For WNS, PlatformCredential is "secret key". For MPNS, PlatformCredential is "private key". For Baidu, PlatformCredential is "secret key". The PlatformApplicationArn that is returned when using <code>CreatePlatformApplication</code> is then used as an attribute for the <code>CreatePlatformEndpoint</code> action. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. For more information about obtaining the PlatformPrincipal and PlatformCredential for each of the supported push notification services, see <a href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-apns.html">Getting Started with Apple Push Notification Service</a>, <a href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-adm.html">Getting Started with Amazon Device Messaging</a>, <a href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-baidu.html">Getting Started with Baidu Cloud Push</a>, <a href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-gcm.html">Getting Started with Google Cloud Messaging for Android</a>, <a href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-mpns.html">Getting Started with MPNS</a>, or <a href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-wns.html">Getting Started with WNS</a>. </p>
  182. @param request A container for the necessary parameters to execute the CreatePlatformApplication service method.
  183. @param completionHandler The completion handler to call when the load request is complete.
  184. `response` - A response object, or `nil` if the request failed.
  185. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
  186. @see AWSSNSCreatePlatformApplicationInput
  187. @see AWSSNSCreatePlatformApplicationResponse
  188. */
  189. - (void)createPlatformApplication:(AWSSNSCreatePlatformApplicationInput *)request completionHandler:(void (^ _Nullable)(AWSSNSCreatePlatformApplicationResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  190. /**
  191. <p>Creates an endpoint for a device and mobile app on one of the supported push notification services, such as GCM and APNS. <code>CreatePlatformEndpoint</code> requires the PlatformApplicationArn that is returned from <code>CreatePlatformApplication</code>. The EndpointArn that is returned when using <code>CreatePlatformEndpoint</code> can then be used by the <code>Publish</code> action to send a message to a mobile app or by the <code>Subscribe</code> action for subscription to a topic. The <code>CreatePlatformEndpoint</code> action 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 <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p><p>When using <code>CreatePlatformEndpoint</code> with Baidu, two attributes must be provided: ChannelId and UserId. The token field must also contain the ChannelId. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePushBaiduEndpoint.html">Creating an Amazon SNS Endpoint for Baidu</a>. </p>
  192. @param request A container for the necessary parameters to execute the CreatePlatformEndpoint service method.
  193. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSCreateEndpointResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
  194. @see AWSSNSCreatePlatformEndpointInput
  195. @see AWSSNSCreateEndpointResponse
  196. */
  197. - (AWSTask<AWSSNSCreateEndpointResponse *> *)createPlatformEndpoint:(AWSSNSCreatePlatformEndpointInput *)request;
  198. /**
  199. <p>Creates an endpoint for a device and mobile app on one of the supported push notification services, such as GCM and APNS. <code>CreatePlatformEndpoint</code> requires the PlatformApplicationArn that is returned from <code>CreatePlatformApplication</code>. The EndpointArn that is returned when using <code>CreatePlatformEndpoint</code> can then be used by the <code>Publish</code> action to send a message to a mobile app or by the <code>Subscribe</code> action for subscription to a topic. The <code>CreatePlatformEndpoint</code> action 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 <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p><p>When using <code>CreatePlatformEndpoint</code> with Baidu, two attributes must be provided: ChannelId and UserId. The token field must also contain the ChannelId. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePushBaiduEndpoint.html">Creating an Amazon SNS Endpoint for Baidu</a>. </p>
  200. @param request A container for the necessary parameters to execute the CreatePlatformEndpoint service method.
  201. @param completionHandler The completion handler to call when the load request is complete.
  202. `response` - A response object, or `nil` if the request failed.
  203. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
  204. @see AWSSNSCreatePlatformEndpointInput
  205. @see AWSSNSCreateEndpointResponse
  206. */
  207. - (void)createPlatformEndpoint:(AWSSNSCreatePlatformEndpointInput *)request completionHandler:(void (^ _Nullable)(AWSSNSCreateEndpointResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  208. /**
  209. <p>Creates a topic to which notifications can be published. Users can create at most 100,000 topics. For more information, see <a href="http://aws.amazon.com/sns/">http://aws.amazon.com/sns</a>. 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.</p>
  210. @param request A container for the necessary parameters to execute the CreateTopic service method.
  211. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSCreateTopicResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorTopicLimitExceeded`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidSecurity`.
  212. @see AWSSNSCreateTopicInput
  213. @see AWSSNSCreateTopicResponse
  214. */
  215. - (AWSTask<AWSSNSCreateTopicResponse *> *)createTopic:(AWSSNSCreateTopicInput *)request;
  216. /**
  217. <p>Creates a topic to which notifications can be published. Users can create at most 100,000 topics. For more information, see <a href="http://aws.amazon.com/sns/">http://aws.amazon.com/sns</a>. 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.</p>
  218. @param request A container for the necessary parameters to execute the CreateTopic service method.
  219. @param completionHandler The completion handler to call when the load request is complete.
  220. `response` - A response object, or `nil` if the request failed.
  221. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorTopicLimitExceeded`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidSecurity`.
  222. @see AWSSNSCreateTopicInput
  223. @see AWSSNSCreateTopicResponse
  224. */
  225. - (void)createTopic:(AWSSNSCreateTopicInput *)request completionHandler:(void (^ _Nullable)(AWSSNSCreateTopicResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  226. /**
  227. <p>Deletes the endpoint for a device and mobile app from Amazon SNS. This action is idempotent. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p><p>When you delete an endpoint that is also subscribed to a topic, then you must also unsubscribe the endpoint from the topic.</p>
  228. @param request A container for the necessary parameters to execute the DeleteEndpoint service method.
  229. @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
  230. @see AWSSNSDeleteEndpointInput
  231. */
  232. - (AWSTask *)deleteEndpoint:(AWSSNSDeleteEndpointInput *)request;
  233. /**
  234. <p>Deletes the endpoint for a device and mobile app from Amazon SNS. This action is idempotent. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p><p>When you delete an endpoint that is also subscribed to a topic, then you must also unsubscribe the endpoint from the topic.</p>
  235. @param request A container for the necessary parameters to execute the DeleteEndpoint service method.
  236. @param completionHandler The completion handler to call when the load request is complete.
  237. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
  238. @see AWSSNSDeleteEndpointInput
  239. */
  240. - (void)deleteEndpoint:(AWSSNSDeleteEndpointInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
  241. /**
  242. <p>Deletes a platform application object for one of the supported push notification services, such as APNS and GCM. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p>
  243. @param request A container for the necessary parameters to execute the DeletePlatformApplication service method.
  244. @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
  245. @see AWSSNSDeletePlatformApplicationInput
  246. */
  247. - (AWSTask *)deletePlatformApplication:(AWSSNSDeletePlatformApplicationInput *)request;
  248. /**
  249. <p>Deletes a platform application object for one of the supported push notification services, such as APNS and GCM. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p>
  250. @param request A container for the necessary parameters to execute the DeletePlatformApplication service method.
  251. @param completionHandler The completion handler to call when the load request is complete.
  252. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
  253. @see AWSSNSDeletePlatformApplicationInput
  254. */
  255. - (void)deletePlatformApplication:(AWSSNSDeletePlatformApplicationInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
  256. /**
  257. <p>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.</p>
  258. @param request A container for the necessary parameters to execute the DeleteTopic service method.
  259. @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
  260. @see AWSSNSDeleteTopicInput
  261. */
  262. - (AWSTask *)deleteTopic:(AWSSNSDeleteTopicInput *)request;
  263. /**
  264. <p>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.</p>
  265. @param request A container for the necessary parameters to execute the DeleteTopic service method.
  266. @param completionHandler The completion handler to call when the load request is complete.
  267. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
  268. @see AWSSNSDeleteTopicInput
  269. */
  270. - (void)deleteTopic:(AWSSNSDeleteTopicInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
  271. /**
  272. <p>Retrieves the endpoint attributes for a device on one of the supported push notification services, such as GCM and APNS. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p>
  273. @param request A container for the necessary parameters to execute the GetEndpointAttributes service method.
  274. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSGetEndpointAttributesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
  275. @see AWSSNSGetEndpointAttributesInput
  276. @see AWSSNSGetEndpointAttributesResponse
  277. */
  278. - (AWSTask<AWSSNSGetEndpointAttributesResponse *> *)getEndpointAttributes:(AWSSNSGetEndpointAttributesInput *)request;
  279. /**
  280. <p>Retrieves the endpoint attributes for a device on one of the supported push notification services, such as GCM and APNS. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p>
  281. @param request A container for the necessary parameters to execute the GetEndpointAttributes service method.
  282. @param completionHandler The completion handler to call when the load request is complete.
  283. `response` - A response object, or `nil` if the request failed.
  284. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
  285. @see AWSSNSGetEndpointAttributesInput
  286. @see AWSSNSGetEndpointAttributesResponse
  287. */
  288. - (void)getEndpointAttributes:(AWSSNSGetEndpointAttributesInput *)request completionHandler:(void (^ _Nullable)(AWSSNSGetEndpointAttributesResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  289. /**
  290. <p>Retrieves the attributes of the platform application object for the supported push notification services, such as APNS and GCM. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p>
  291. @param request A container for the necessary parameters to execute the GetPlatformApplicationAttributes service method.
  292. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSGetPlatformApplicationAttributesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
  293. @see AWSSNSGetPlatformApplicationAttributesInput
  294. @see AWSSNSGetPlatformApplicationAttributesResponse
  295. */
  296. - (AWSTask<AWSSNSGetPlatformApplicationAttributesResponse *> *)getPlatformApplicationAttributes:(AWSSNSGetPlatformApplicationAttributesInput *)request;
  297. /**
  298. <p>Retrieves the attributes of the platform application object for the supported push notification services, such as APNS and GCM. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p>
  299. @param request A container for the necessary parameters to execute the GetPlatformApplicationAttributes service method.
  300. @param completionHandler The completion handler to call when the load request is complete.
  301. `response` - A response object, or `nil` if the request failed.
  302. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
  303. @see AWSSNSGetPlatformApplicationAttributesInput
  304. @see AWSSNSGetPlatformApplicationAttributesResponse
  305. */
  306. - (void)getPlatformApplicationAttributes:(AWSSNSGetPlatformApplicationAttributesInput *)request completionHandler:(void (^ _Nullable)(AWSSNSGetPlatformApplicationAttributesResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  307. /**
  308. <p>Returns the settings for sending SMS messages from your account.</p><p>These settings are set with the <code>SetSMSAttributes</code> action.</p>
  309. @param request A container for the necessary parameters to execute the GetSMSAttributes service method.
  310. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSGetSMSAttributesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorThrottled`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidParameter`.
  311. @see AWSSNSGetSMSAttributesInput
  312. @see AWSSNSGetSMSAttributesResponse
  313. */
  314. - (AWSTask<AWSSNSGetSMSAttributesResponse *> *)getSMSAttributes:(AWSSNSGetSMSAttributesInput *)request;
  315. /**
  316. <p>Returns the settings for sending SMS messages from your account.</p><p>These settings are set with the <code>SetSMSAttributes</code> action.</p>
  317. @param request A container for the necessary parameters to execute the GetSMSAttributes service method.
  318. @param completionHandler The completion handler to call when the load request is complete.
  319. `response` - A response object, or `nil` if the request failed.
  320. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorThrottled`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidParameter`.
  321. @see AWSSNSGetSMSAttributesInput
  322. @see AWSSNSGetSMSAttributesResponse
  323. */
  324. - (void)getSMSAttributes:(AWSSNSGetSMSAttributesInput *)request completionHandler:(void (^ _Nullable)(AWSSNSGetSMSAttributesResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  325. /**
  326. <p>Returns all of the properties of a subscription.</p>
  327. @param request A container for the necessary parameters to execute the GetSubscriptionAttributes service method.
  328. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSGetSubscriptionAttributesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorNotFound`, `AWSSNSErrorAuthorizationError`.
  329. @see AWSSNSGetSubscriptionAttributesInput
  330. @see AWSSNSGetSubscriptionAttributesResponse
  331. */
  332. - (AWSTask<AWSSNSGetSubscriptionAttributesResponse *> *)getSubscriptionAttributes:(AWSSNSGetSubscriptionAttributesInput *)request;
  333. /**
  334. <p>Returns all of the properties of a subscription.</p>
  335. @param request A container for the necessary parameters to execute the GetSubscriptionAttributes service method.
  336. @param completionHandler The completion handler to call when the load request is complete.
  337. `response` - A response object, or `nil` if the request failed.
  338. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorNotFound`, `AWSSNSErrorAuthorizationError`.
  339. @see AWSSNSGetSubscriptionAttributesInput
  340. @see AWSSNSGetSubscriptionAttributesResponse
  341. */
  342. - (void)getSubscriptionAttributes:(AWSSNSGetSubscriptionAttributesInput *)request completionHandler:(void (^ _Nullable)(AWSSNSGetSubscriptionAttributesResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  343. /**
  344. <p>Returns all of the properties of a topic. Topic properties returned might differ based on the authorization of the user.</p>
  345. @param request A container for the necessary parameters to execute the GetTopicAttributes service method.
  346. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSGetTopicAttributesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorNotFound`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidSecurity`.
  347. @see AWSSNSGetTopicAttributesInput
  348. @see AWSSNSGetTopicAttributesResponse
  349. */
  350. - (AWSTask<AWSSNSGetTopicAttributesResponse *> *)getTopicAttributes:(AWSSNSGetTopicAttributesInput *)request;
  351. /**
  352. <p>Returns all of the properties of a topic. Topic properties returned might differ based on the authorization of the user.</p>
  353. @param request A container for the necessary parameters to execute the GetTopicAttributes service method.
  354. @param completionHandler The completion handler to call when the load request is complete.
  355. `response` - A response object, or `nil` if the request failed.
  356. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorNotFound`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidSecurity`.
  357. @see AWSSNSGetTopicAttributesInput
  358. @see AWSSNSGetTopicAttributesResponse
  359. */
  360. - (void)getTopicAttributes:(AWSSNSGetTopicAttributesInput *)request completionHandler:(void (^ _Nullable)(AWSSNSGetTopicAttributesResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  361. /**
  362. <p>Lists the endpoints and endpoint attributes for devices in a supported push notification service, such as GCM and APNS. The results for <code>ListEndpointsByPlatformApplication</code> are 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 call <code>ListEndpointsByPlatformApplication</code> again 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 <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p><p>This action is throttled at 30 transactions per second (TPS).</p>
  363. @param request A container for the necessary parameters to execute the ListEndpointsByPlatformApplication service method.
  364. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSListEndpointsByPlatformApplicationResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
  365. @see AWSSNSListEndpointsByPlatformApplicationInput
  366. @see AWSSNSListEndpointsByPlatformApplicationResponse
  367. */
  368. - (AWSTask<AWSSNSListEndpointsByPlatformApplicationResponse *> *)listEndpointsByPlatformApplication:(AWSSNSListEndpointsByPlatformApplicationInput *)request;
  369. /**
  370. <p>Lists the endpoints and endpoint attributes for devices in a supported push notification service, such as GCM and APNS. The results for <code>ListEndpointsByPlatformApplication</code> are 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 call <code>ListEndpointsByPlatformApplication</code> again 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 <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p><p>This action is throttled at 30 transactions per second (TPS).</p>
  371. @param request A container for the necessary parameters to execute the ListEndpointsByPlatformApplication service method.
  372. @param completionHandler The completion handler to call when the load request is complete.
  373. `response` - A response object, or `nil` if the request failed.
  374. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
  375. @see AWSSNSListEndpointsByPlatformApplicationInput
  376. @see AWSSNSListEndpointsByPlatformApplicationResponse
  377. */
  378. - (void)listEndpointsByPlatformApplication:(AWSSNSListEndpointsByPlatformApplicationInput *)request completionHandler:(void (^ _Nullable)(AWSSNSListEndpointsByPlatformApplicationResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  379. /**
  380. <p>Returns a list of phone numbers that are opted out, meaning you cannot send SMS messages to them.</p><p>The results for <code>ListPhoneNumbersOptedOut</code> are paginated, and each page returns up to 100 phone numbers. If additional phone numbers are available after the first page of results, then a <code>NextToken</code> string will be returned. To receive the next page, you call <code>ListPhoneNumbersOptedOut</code> again using the <code>NextToken</code> string received from the previous call. When there are no more records to return, <code>NextToken</code> will be null.</p>
  381. @param request A container for the necessary parameters to execute the ListPhoneNumbersOptedOut service method.
  382. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSListPhoneNumbersOptedOutResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorThrottled`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidParameter`.
  383. @see AWSSNSListPhoneNumbersOptedOutInput
  384. @see AWSSNSListPhoneNumbersOptedOutResponse
  385. */
  386. - (AWSTask<AWSSNSListPhoneNumbersOptedOutResponse *> *)listPhoneNumbersOptedOut:(AWSSNSListPhoneNumbersOptedOutInput *)request;
  387. /**
  388. <p>Returns a list of phone numbers that are opted out, meaning you cannot send SMS messages to them.</p><p>The results for <code>ListPhoneNumbersOptedOut</code> are paginated, and each page returns up to 100 phone numbers. If additional phone numbers are available after the first page of results, then a <code>NextToken</code> string will be returned. To receive the next page, you call <code>ListPhoneNumbersOptedOut</code> again using the <code>NextToken</code> string received from the previous call. When there are no more records to return, <code>NextToken</code> will be null.</p>
  389. @param request A container for the necessary parameters to execute the ListPhoneNumbersOptedOut service method.
  390. @param completionHandler The completion handler to call when the load request is complete.
  391. `response` - A response object, or `nil` if the request failed.
  392. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorThrottled`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidParameter`.
  393. @see AWSSNSListPhoneNumbersOptedOutInput
  394. @see AWSSNSListPhoneNumbersOptedOutResponse
  395. */
  396. - (void)listPhoneNumbersOptedOut:(AWSSNSListPhoneNumbersOptedOutInput *)request completionHandler:(void (^ _Nullable)(AWSSNSListPhoneNumbersOptedOutResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  397. /**
  398. <p>Lists the platform application objects for the supported push notification services, such as APNS and GCM. The results for <code>ListPlatformApplications</code> are 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 call <code>ListPlatformApplications</code> 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 <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p><p>This action is throttled at 15 transactions per second (TPS).</p>
  399. @param request A container for the necessary parameters to execute the ListPlatformApplications service method.
  400. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSListPlatformApplicationsResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
  401. @see AWSSNSListPlatformApplicationsInput
  402. @see AWSSNSListPlatformApplicationsResponse
  403. */
  404. - (AWSTask<AWSSNSListPlatformApplicationsResponse *> *)listPlatformApplications:(AWSSNSListPlatformApplicationsInput *)request;
  405. /**
  406. <p>Lists the platform application objects for the supported push notification services, such as APNS and GCM. The results for <code>ListPlatformApplications</code> are 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 call <code>ListPlatformApplications</code> 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 <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p><p>This action is throttled at 15 transactions per second (TPS).</p>
  407. @param request A container for the necessary parameters to execute the ListPlatformApplications service method.
  408. @param completionHandler The completion handler to call when the load request is complete.
  409. `response` - A response object, or `nil` if the request failed.
  410. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
  411. @see AWSSNSListPlatformApplicationsInput
  412. @see AWSSNSListPlatformApplicationsResponse
  413. */
  414. - (void)listPlatformApplications:(AWSSNSListPlatformApplicationsInput *)request completionHandler:(void (^ _Nullable)(AWSSNSListPlatformApplicationsResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  415. /**
  416. <p>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 <code>NextToken</code> is also returned. Use the <code>NextToken</code> parameter in a new <code>ListSubscriptions</code> call to get further results.</p><p>This action is throttled at 30 transactions per second (TPS).</p>
  417. @param request A container for the necessary parameters to execute the ListSubscriptions service method.
  418. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSListSubscriptionsResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
  419. @see AWSSNSListSubscriptionsInput
  420. @see AWSSNSListSubscriptionsResponse
  421. */
  422. - (AWSTask<AWSSNSListSubscriptionsResponse *> *)listSubscriptions:(AWSSNSListSubscriptionsInput *)request;
  423. /**
  424. <p>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 <code>NextToken</code> is also returned. Use the <code>NextToken</code> parameter in a new <code>ListSubscriptions</code> call to get further results.</p><p>This action is throttled at 30 transactions per second (TPS).</p>
  425. @param request A container for the necessary parameters to execute the ListSubscriptions service method.
  426. @param completionHandler The completion handler to call when the load request is complete.
  427. `response` - A response object, or `nil` if the request failed.
  428. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
  429. @see AWSSNSListSubscriptionsInput
  430. @see AWSSNSListSubscriptionsResponse
  431. */
  432. - (void)listSubscriptions:(AWSSNSListSubscriptionsInput *)request completionHandler:(void (^ _Nullable)(AWSSNSListSubscriptionsResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  433. /**
  434. <p>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 <code>NextToken</code> is also returned. Use the <code>NextToken</code> parameter in a new <code>ListSubscriptionsByTopic</code> call to get further results.</p><p>This action is throttled at 30 transactions per second (TPS).</p>
  435. @param request A container for the necessary parameters to execute the ListSubscriptionsByTopic service method.
  436. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSListSubscriptionsByTopicResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorNotFound`, `AWSSNSErrorAuthorizationError`.
  437. @see AWSSNSListSubscriptionsByTopicInput
  438. @see AWSSNSListSubscriptionsByTopicResponse
  439. */
  440. - (AWSTask<AWSSNSListSubscriptionsByTopicResponse *> *)listSubscriptionsByTopic:(AWSSNSListSubscriptionsByTopicInput *)request;
  441. /**
  442. <p>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 <code>NextToken</code> is also returned. Use the <code>NextToken</code> parameter in a new <code>ListSubscriptionsByTopic</code> call to get further results.</p><p>This action is throttled at 30 transactions per second (TPS).</p>
  443. @param request A container for the necessary parameters to execute the ListSubscriptionsByTopic service method.
  444. @param completionHandler The completion handler to call when the load request is complete.
  445. `response` - A response object, or `nil` if the request failed.
  446. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorNotFound`, `AWSSNSErrorAuthorizationError`.
  447. @see AWSSNSListSubscriptionsByTopicInput
  448. @see AWSSNSListSubscriptionsByTopicResponse
  449. */
  450. - (void)listSubscriptionsByTopic:(AWSSNSListSubscriptionsByTopicInput *)request completionHandler:(void (^ _Nullable)(AWSSNSListSubscriptionsByTopicResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  451. /**
  452. <p>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 <code>NextToken</code> is also returned. Use the <code>NextToken</code> parameter in a new <code>ListTopics</code> call to get further results.</p><p>This action is throttled at 30 transactions per second (TPS).</p>
  453. @param request A container for the necessary parameters to execute the ListTopics service method.
  454. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSListTopicsResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
  455. @see AWSSNSListTopicsInput
  456. @see AWSSNSListTopicsResponse
  457. */
  458. - (AWSTask<AWSSNSListTopicsResponse *> *)listTopics:(AWSSNSListTopicsInput *)request;
  459. /**
  460. <p>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 <code>NextToken</code> is also returned. Use the <code>NextToken</code> parameter in a new <code>ListTopics</code> call to get further results.</p><p>This action is throttled at 30 transactions per second (TPS).</p>
  461. @param request A container for the necessary parameters to execute the ListTopics service method.
  462. @param completionHandler The completion handler to call when the load request is complete.
  463. `response` - A response object, or `nil` if the request failed.
  464. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
  465. @see AWSSNSListTopicsInput
  466. @see AWSSNSListTopicsResponse
  467. */
  468. - (void)listTopics:(AWSSNSListTopicsInput *)request completionHandler:(void (^ _Nullable)(AWSSNSListTopicsResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  469. /**
  470. <p>Use this request to opt in a phone number that is opted out, which enables you to resume sending SMS messages to the number.</p><p>You can opt in a phone number only once every 30 days.</p>
  471. @param request A container for the necessary parameters to execute the OptInPhoneNumber service method.
  472. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSOptInPhoneNumberResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorThrottled`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidParameter`.
  473. @see AWSSNSOptInPhoneNumberInput
  474. @see AWSSNSOptInPhoneNumberResponse
  475. */
  476. - (AWSTask<AWSSNSOptInPhoneNumberResponse *> *)optInPhoneNumber:(AWSSNSOptInPhoneNumberInput *)request;
  477. /**
  478. <p>Use this request to opt in a phone number that is opted out, which enables you to resume sending SMS messages to the number.</p><p>You can opt in a phone number only once every 30 days.</p>
  479. @param request A container for the necessary parameters to execute the OptInPhoneNumber service method.
  480. @param completionHandler The completion handler to call when the load request is complete.
  481. `response` - A response object, or `nil` if the request failed.
  482. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorThrottled`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidParameter`.
  483. @see AWSSNSOptInPhoneNumberInput
  484. @see AWSSNSOptInPhoneNumberResponse
  485. */
  486. - (void)optInPhoneNumber:(AWSSNSOptInPhoneNumberInput *)request completionHandler:(void (^ _Nullable)(AWSSNSOptInPhoneNumberResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  487. /**
  488. <p>Sends a message to an Amazon SNS topic or sends a text message (SMS message) directly to a phone number. </p><p>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.</p><p>When a <code>messageId</code> is returned, the message has been saved and Amazon SNS will attempt to deliver it shortly.</p><p>To use the <code>Publish</code> action 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 the <code>CreatePlatformEndpoint</code> action. </p><p>For more information about formatting messages, see <a href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-send-custommessage.html">Send Custom Platform-Specific Payloads in Messages to Mobile Devices</a>. </p>
  489. @param request A container for the necessary parameters to execute the Publish service method.
  490. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSPublishResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInvalidParameterValue`, `AWSSNSErrorInternalError`, `AWSSNSErrorNotFound`, `AWSSNSErrorEndpointDisabled`, `AWSSNSErrorPlatformApplicationDisabled`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorKMSDisabled`, `AWSSNSErrorKMSInvalidState`, `AWSSNSErrorKMSNotFound`, `AWSSNSErrorKMSOptInRequired`, `AWSSNSErrorKMSThrottling`, `AWSSNSErrorKMSAccessDenied`, `AWSSNSErrorInvalidSecurity`.
  491. @see AWSSNSPublishInput
  492. @see AWSSNSPublishResponse
  493. */
  494. - (AWSTask<AWSSNSPublishResponse *> *)publish:(AWSSNSPublishInput *)request;
  495. /**
  496. <p>Sends a message to an Amazon SNS topic or sends a text message (SMS message) directly to a phone number. </p><p>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.</p><p>When a <code>messageId</code> is returned, the message has been saved and Amazon SNS will attempt to deliver it shortly.</p><p>To use the <code>Publish</code> action 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 the <code>CreatePlatformEndpoint</code> action. </p><p>For more information about formatting messages, see <a href="http://docs.aws.amazon.com/sns/latest/dg/mobile-push-send-custommessage.html">Send Custom Platform-Specific Payloads in Messages to Mobile Devices</a>. </p>
  497. @param request A container for the necessary parameters to execute the Publish service method.
  498. @param completionHandler The completion handler to call when the load request is complete.
  499. `response` - A response object, or `nil` if the request failed.
  500. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInvalidParameterValue`, `AWSSNSErrorInternalError`, `AWSSNSErrorNotFound`, `AWSSNSErrorEndpointDisabled`, `AWSSNSErrorPlatformApplicationDisabled`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorKMSDisabled`, `AWSSNSErrorKMSInvalidState`, `AWSSNSErrorKMSNotFound`, `AWSSNSErrorKMSOptInRequired`, `AWSSNSErrorKMSThrottling`, `AWSSNSErrorKMSAccessDenied`, `AWSSNSErrorInvalidSecurity`.
  501. @see AWSSNSPublishInput
  502. @see AWSSNSPublishResponse
  503. */
  504. - (void)publish:(AWSSNSPublishInput *)request completionHandler:(void (^ _Nullable)(AWSSNSPublishResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  505. /**
  506. <p>Removes a statement from a topic's access control policy.</p>
  507. @param request A container for the necessary parameters to execute the RemovePermission service method.
  508. @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
  509. @see AWSSNSRemovePermissionInput
  510. */
  511. - (AWSTask *)removePermission:(AWSSNSRemovePermissionInput *)request;
  512. /**
  513. <p>Removes a statement from a topic's access control policy.</p>
  514. @param request A container for the necessary parameters to execute the RemovePermission service method.
  515. @param completionHandler The completion handler to call when the load request is complete.
  516. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
  517. @see AWSSNSRemovePermissionInput
  518. */
  519. - (void)removePermission:(AWSSNSRemovePermissionInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
  520. /**
  521. <p>Sets the attributes for an endpoint for a device on one of the supported push notification services, such as GCM and APNS. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p>
  522. @param request A container for the necessary parameters to execute the SetEndpointAttributes service method.
  523. @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
  524. @see AWSSNSSetEndpointAttributesInput
  525. */
  526. - (AWSTask *)setEndpointAttributes:(AWSSNSSetEndpointAttributesInput *)request;
  527. /**
  528. <p>Sets the attributes for an endpoint for a device on one of the supported push notification services, such as GCM and APNS. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p>
  529. @param request A container for the necessary parameters to execute the SetEndpointAttributes service method.
  530. @param completionHandler The completion handler to call when the load request is complete.
  531. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
  532. @see AWSSNSSetEndpointAttributesInput
  533. */
  534. - (void)setEndpointAttributes:(AWSSNSSetEndpointAttributesInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
  535. /**
  536. <p>Sets the attributes of the platform application object for the supported push notification services, such as APNS and GCM. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. For information on configuring attributes for message delivery status, see <a href="http://docs.aws.amazon.com/sns/latest/dg/sns-msg-status.html">Using Amazon SNS Application Attributes for Message Delivery Status</a>. </p>
  537. @param request A container for the necessary parameters to execute the SetPlatformApplicationAttributes service method.
  538. @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
  539. @see AWSSNSSetPlatformApplicationAttributesInput
  540. */
  541. - (AWSTask *)setPlatformApplicationAttributes:(AWSSNSSetPlatformApplicationAttributesInput *)request;
  542. /**
  543. <p>Sets the attributes of the platform application object for the supported push notification services, such as APNS and GCM. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. For information on configuring attributes for message delivery status, see <a href="http://docs.aws.amazon.com/sns/latest/dg/sns-msg-status.html">Using Amazon SNS Application Attributes for Message Delivery Status</a>. </p>
  544. @param request A container for the necessary parameters to execute the SetPlatformApplicationAttributes service method.
  545. @param completionHandler The completion handler to call when the load request is complete.
  546. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`.
  547. @see AWSSNSSetPlatformApplicationAttributesInput
  548. */
  549. - (void)setPlatformApplicationAttributes:(AWSSNSSetPlatformApplicationAttributesInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
  550. /**
  551. <p>Use this request to set the default settings for sending SMS messages and receiving daily SMS usage reports.</p><p>You can override some of these settings for a single message when you use the <code>Publish</code> action with the <code>MessageAttributes.entry.N</code> parameter. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/sms_publish-to-phone.html">Sending an SMS Message</a> in the <i>Amazon SNS Developer Guide</i>.</p>
  552. @param request A container for the necessary parameters to execute the SetSMSAttributes service method.
  553. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSSetSMSAttributesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorThrottled`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
  554. @see AWSSNSSetSMSAttributesInput
  555. @see AWSSNSSetSMSAttributesResponse
  556. */
  557. - (AWSTask<AWSSNSSetSMSAttributesResponse *> *)setSMSAttributes:(AWSSNSSetSMSAttributesInput *)request;
  558. /**
  559. <p>Use this request to set the default settings for sending SMS messages and receiving daily SMS usage reports.</p><p>You can override some of these settings for a single message when you use the <code>Publish</code> action with the <code>MessageAttributes.entry.N</code> parameter. For more information, see <a href="http://docs.aws.amazon.com/sns/latest/dg/sms_publish-to-phone.html">Sending an SMS Message</a> in the <i>Amazon SNS Developer Guide</i>.</p>
  560. @param request A container for the necessary parameters to execute the SetSMSAttributes service method.
  561. @param completionHandler The completion handler to call when the load request is complete.
  562. `response` - A response object, or `nil` if the request failed.
  563. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorThrottled`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`.
  564. @see AWSSNSSetSMSAttributesInput
  565. @see AWSSNSSetSMSAttributesResponse
  566. */
  567. - (void)setSMSAttributes:(AWSSNSSetSMSAttributesInput *)request completionHandler:(void (^ _Nullable)(AWSSNSSetSMSAttributesResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  568. /**
  569. <p>Allows a subscription owner to set an attribute of the subscription to a new value.</p>
  570. @param request A container for the necessary parameters to execute the SetSubscriptionAttributes service method.
  571. @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorFilterPolicyLimitExceeded`, `AWSSNSErrorInternalError`, `AWSSNSErrorNotFound`, `AWSSNSErrorAuthorizationError`.
  572. @see AWSSNSSetSubscriptionAttributesInput
  573. */
  574. - (AWSTask *)setSubscriptionAttributes:(AWSSNSSetSubscriptionAttributesInput *)request;
  575. /**
  576. <p>Allows a subscription owner to set an attribute of the subscription to a new value.</p>
  577. @param request A container for the necessary parameters to execute the SetSubscriptionAttributes service method.
  578. @param completionHandler The completion handler to call when the load request is complete.
  579. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorFilterPolicyLimitExceeded`, `AWSSNSErrorInternalError`, `AWSSNSErrorNotFound`, `AWSSNSErrorAuthorizationError`.
  580. @see AWSSNSSetSubscriptionAttributesInput
  581. */
  582. - (void)setSubscriptionAttributes:(AWSSNSSetSubscriptionAttributesInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
  583. /**
  584. <p>Allows a topic owner to set an attribute of the topic to a new value.</p>
  585. @param request A container for the necessary parameters to execute the SetTopicAttributes service method.
  586. @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorNotFound`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidSecurity`.
  587. @see AWSSNSSetTopicAttributesInput
  588. */
  589. - (AWSTask *)setTopicAttributes:(AWSSNSSetTopicAttributesInput *)request;
  590. /**
  591. <p>Allows a topic owner to set an attribute of the topic to a new value.</p>
  592. @param request A container for the necessary parameters to execute the SetTopicAttributes service method.
  593. @param completionHandler The completion handler to call when the load request is complete.
  594. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorNotFound`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidSecurity`.
  595. @see AWSSNSSetTopicAttributesInput
  596. */
  597. - (void)setTopicAttributes:(AWSSNSSetTopicAttributesInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
  598. /**
  599. <p>Prepares to subscribe an endpoint by sending the endpoint a confirmation message. To actually create a subscription, the endpoint owner must call the <code>ConfirmSubscription</code> action with the token from the confirmation message. Confirmation tokens are valid for three days.</p><p>This action is throttled at 100 transactions per second (TPS).</p>
  600. @param request A container for the necessary parameters to execute the Subscribe service method.
  601. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSSNSSubscribeResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorSubscriptionLimitExceeded`, `AWSSNSErrorFilterPolicyLimitExceeded`, `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorNotFound`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidSecurity`.
  602. @see AWSSNSSubscribeInput
  603. @see AWSSNSSubscribeResponse
  604. */
  605. - (AWSTask<AWSSNSSubscribeResponse *> *)subscribe:(AWSSNSSubscribeInput *)request;
  606. /**
  607. <p>Prepares to subscribe an endpoint by sending the endpoint a confirmation message. To actually create a subscription, the endpoint owner must call the <code>ConfirmSubscription</code> action with the token from the confirmation message. Confirmation tokens are valid for three days.</p><p>This action is throttled at 100 transactions per second (TPS).</p>
  608. @param request A container for the necessary parameters to execute the Subscribe service method.
  609. @param completionHandler The completion handler to call when the load request is complete.
  610. `response` - A response object, or `nil` if the request failed.
  611. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorSubscriptionLimitExceeded`, `AWSSNSErrorFilterPolicyLimitExceeded`, `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorNotFound`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorInvalidSecurity`.
  612. @see AWSSNSSubscribeInput
  613. @see AWSSNSSubscribeResponse
  614. */
  615. - (void)subscribe:(AWSSNSSubscribeInput *)request completionHandler:(void (^ _Nullable)(AWSSNSSubscribeResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  616. /**
  617. <p>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 <code>Unsubscribe</code> call 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 the <code>Unsubscribe</code> request was unintended.</p><p>This action is throttled at 100 transactions per second (TPS).</p>
  618. @param request A container for the necessary parameters to execute the Unsubscribe service method.
  619. @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`, `AWSSNSErrorInvalidSecurity`.
  620. @see AWSSNSUnsubscribeInput
  621. */
  622. - (AWSTask *)unsubscribe:(AWSSNSUnsubscribeInput *)request;
  623. /**
  624. <p>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 <code>Unsubscribe</code> call 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 the <code>Unsubscribe</code> request was unintended.</p><p>This action is throttled at 100 transactions per second (TPS).</p>
  625. @param request A container for the necessary parameters to execute the Unsubscribe service method.
  626. @param completionHandler The completion handler to call when the load request is complete.
  627. `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSSNSErrorDomain` domain and the following error code: `AWSSNSErrorInvalidParameter`, `AWSSNSErrorInternalError`, `AWSSNSErrorAuthorizationError`, `AWSSNSErrorNotFound`, `AWSSNSErrorInvalidSecurity`.
  628. @see AWSSNSUnsubscribeInput
  629. */
  630. - (void)unsubscribe:(AWSSNSUnsubscribeInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
  631. @end
  632. NS_ASSUME_NONNULL_END