No Description

AWSCognitoSyncService.h 51KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601
  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 "AWSCognitoSyncModel.h"
  18. #import "AWSCognitoSyncResources.h"
  19. NS_ASSUME_NONNULL_BEGIN
  20. //! SDK version for AWSCognitoSync
  21. FOUNDATION_EXPORT NSString *const AWSCognitoSyncSDKVersion;
  22. /**
  23. <fullname>Amazon Cognito Sync</fullname><p>Amazon Cognito Sync provides an AWS service and client library that enable cross-device syncing of application-related user data. High-level client libraries are available for both iOS and Android. You can use these libraries to persist data locally so that it's available even if the device is offline. Developer credentials don't need to be stored on the mobile device to access the service. You can use Amazon Cognito to obtain a normalized user ID and credentials. User data is persisted in a dataset that can store up to 1 MB of key-value pairs, and you can have up to 20 datasets per user identity.</p><p>With Amazon Cognito Sync, the data stored for each identity is accessible only to credentials assigned to that identity. In order to use the Cognito Sync service, you need to make API calls using credentials retrieved with <a href="http://docs.aws.amazon.com/cognitoidentity/latest/APIReference/Welcome.html">Amazon Cognito Identity service</a>.</p><p>If you want to use Cognito Sync in an Android or iOS application, you will probably want to make API calls via the AWS Mobile SDK. To learn more, see the <a href="http://docs.aws.amazon.com/mobile/sdkforandroid/developerguide/cognito-sync.html">Developer Guide for Android</a> and the <a href="http://docs.aws.amazon.com/mobile/sdkforios/developerguide/cognito-sync.html">Developer Guide for iOS</a>.</p>
  24. */
  25. @interface AWSCognitoSync : 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 CognitoSync = AWSCognitoSync.default()
  53. *Objective-C*
  54. AWSCognitoSync *CognitoSync = [AWSCognitoSync defaultCognitoSync];
  55. @return The default service client.
  56. */
  57. + (instancetype)defaultCognitoSync;
  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. AWSCognitoSync.register(with: configuration!, forKey: "USWest2CognitoSync")
  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. [AWSCognitoSync registerCognitoSyncWithConfiguration:configuration forKey:@"USWest2CognitoSync"];
  75. return YES;
  76. }
  77. Then call the following to get the service client:
  78. *Swift*
  79. let CognitoSync = AWSCognitoSync(forKey: "USWest2CognitoSync")
  80. *Objective-C*
  81. AWSCognitoSync *CognitoSync = [AWSCognitoSync CognitoSyncForKey:@"USWest2CognitoSync"];
  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)registerCognitoSyncWithConfiguration:(AWSServiceConfiguration *)configuration forKey:(NSString *)key;
  87. /**
  88. Retrieves the service client associated with the key. You need to call `+ registerCognitoSyncWithConfiguration: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. AWSCognitoSync.register(with: configuration!, forKey: "USWest2CognitoSync")
  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. [AWSCognitoSync registerCognitoSyncWithConfiguration:configuration forKey:@"USWest2CognitoSync"];
  104. return YES;
  105. }
  106. Then call the following to get the service client:
  107. *Swift*
  108. let CognitoSync = AWSCognitoSync(forKey: "USWest2CognitoSync")
  109. *Objective-C*
  110. AWSCognitoSync *CognitoSync = [AWSCognitoSync CognitoSyncForKey:@"USWest2CognitoSync"];
  111. @param key A string to identify the service client.
  112. @return An instance of the service client.
  113. */
  114. + (instancetype)CognitoSyncForKey:(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)removeCognitoSyncForKey:(NSString *)key;
  121. /**
  122. <p>Initiates a bulk publish of all existing datasets for an Identity Pool to the configured stream. Customers are limited to one successful bulk publish per 24 hours. Bulk publish is an asynchronous request, customers can see the status of the request via the GetBulkPublishDetails operation.</p><p>This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.</p>
  123. @param request A container for the necessary parameters to execute the BulkPublish service method.
  124. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncBulkPublishResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorDuplicateRequest`, `AWSCognitoSyncErrorAlreadyStreamed`.
  125. @see AWSCognitoSyncBulkPublishRequest
  126. @see AWSCognitoSyncBulkPublishResponse
  127. */
  128. - (AWSTask<AWSCognitoSyncBulkPublishResponse *> *)bulkPublish:(AWSCognitoSyncBulkPublishRequest *)request;
  129. /**
  130. <p>Initiates a bulk publish of all existing datasets for an Identity Pool to the configured stream. Customers are limited to one successful bulk publish per 24 hours. Bulk publish is an asynchronous request, customers can see the status of the request via the GetBulkPublishDetails operation.</p><p>This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.</p>
  131. @param request A container for the necessary parameters to execute the BulkPublish service method.
  132. @param completionHandler The completion handler to call when the load request is complete.
  133. `response` - A response object, or `nil` if the request failed.
  134. `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 `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorDuplicateRequest`, `AWSCognitoSyncErrorAlreadyStreamed`.
  135. @see AWSCognitoSyncBulkPublishRequest
  136. @see AWSCognitoSyncBulkPublishResponse
  137. */
  138. - (void)bulkPublish:(AWSCognitoSyncBulkPublishRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncBulkPublishResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  139. /**
  140. <p>Deletes the specific dataset. The dataset will be deleted permanently, and the action can't be undone. Datasets that this dataset was merged with will no longer report the merge. Any subsequent operation on this dataset will result in a ResourceNotFoundException.</p><p>This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.</p>
  141. @param request A container for the necessary parameters to execute the DeleteDataset service method.
  142. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncDeleteDatasetResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`, `AWSCognitoSyncErrorResourceConflict`.
  143. @see AWSCognitoSyncDeleteDatasetRequest
  144. @see AWSCognitoSyncDeleteDatasetResponse
  145. */
  146. - (AWSTask<AWSCognitoSyncDeleteDatasetResponse *> *)deleteDataset:(AWSCognitoSyncDeleteDatasetRequest *)request;
  147. /**
  148. <p>Deletes the specific dataset. The dataset will be deleted permanently, and the action can't be undone. Datasets that this dataset was merged with will no longer report the merge. Any subsequent operation on this dataset will result in a ResourceNotFoundException.</p><p>This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.</p>
  149. @param request A container for the necessary parameters to execute the DeleteDataset service method.
  150. @param completionHandler The completion handler to call when the load request is complete.
  151. `response` - A response object, or `nil` if the request failed.
  152. `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 `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`, `AWSCognitoSyncErrorResourceConflict`.
  153. @see AWSCognitoSyncDeleteDatasetRequest
  154. @see AWSCognitoSyncDeleteDatasetResponse
  155. */
  156. - (void)deleteDataset:(AWSCognitoSyncDeleteDatasetRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncDeleteDatasetResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  157. /**
  158. <p>Gets meta data about a dataset by identity and dataset name. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data.</p><p>This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use Cognito Identity credentials to make this API call.</p>
  159. @param request A container for the necessary parameters to execute the DescribeDataset service method.
  160. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncDescribeDatasetResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
  161. @see AWSCognitoSyncDescribeDatasetRequest
  162. @see AWSCognitoSyncDescribeDatasetResponse
  163. */
  164. - (AWSTask<AWSCognitoSyncDescribeDatasetResponse *> *)describeDataset:(AWSCognitoSyncDescribeDatasetRequest *)request;
  165. /**
  166. <p>Gets meta data about a dataset by identity and dataset name. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data.</p><p>This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use Cognito Identity credentials to make this API call.</p>
  167. @param request A container for the necessary parameters to execute the DescribeDataset service method.
  168. @param completionHandler The completion handler to call when the load request is complete.
  169. `response` - A response object, or `nil` if the request failed.
  170. `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 `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
  171. @see AWSCognitoSyncDescribeDatasetRequest
  172. @see AWSCognitoSyncDescribeDatasetResponse
  173. */
  174. - (void)describeDataset:(AWSCognitoSyncDescribeDatasetRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncDescribeDatasetResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  175. /**
  176. <p>Gets usage details (for example, data storage) about a particular identity pool.</p><p>This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.</p>
  177. @param request A container for the necessary parameters to execute the DescribeIdentityPoolUsage service method.
  178. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncDescribeIdentityPoolUsageResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
  179. @see AWSCognitoSyncDescribeIdentityPoolUsageRequest
  180. @see AWSCognitoSyncDescribeIdentityPoolUsageResponse
  181. */
  182. - (AWSTask<AWSCognitoSyncDescribeIdentityPoolUsageResponse *> *)describeIdentityPoolUsage:(AWSCognitoSyncDescribeIdentityPoolUsageRequest *)request;
  183. /**
  184. <p>Gets usage details (for example, data storage) about a particular identity pool.</p><p>This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.</p>
  185. @param request A container for the necessary parameters to execute the DescribeIdentityPoolUsage service method.
  186. @param completionHandler The completion handler to call when the load request is complete.
  187. `response` - A response object, or `nil` if the request failed.
  188. `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 `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
  189. @see AWSCognitoSyncDescribeIdentityPoolUsageRequest
  190. @see AWSCognitoSyncDescribeIdentityPoolUsageResponse
  191. */
  192. - (void)describeIdentityPoolUsage:(AWSCognitoSyncDescribeIdentityPoolUsageRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncDescribeIdentityPoolUsageResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  193. /**
  194. <p>Gets usage information for an identity, including number of datasets and data usage.</p><p>This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.</p>
  195. @param request A container for the necessary parameters to execute the DescribeIdentityUsage service method.
  196. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncDescribeIdentityUsageResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
  197. @see AWSCognitoSyncDescribeIdentityUsageRequest
  198. @see AWSCognitoSyncDescribeIdentityUsageResponse
  199. */
  200. - (AWSTask<AWSCognitoSyncDescribeIdentityUsageResponse *> *)describeIdentityUsage:(AWSCognitoSyncDescribeIdentityUsageRequest *)request;
  201. /**
  202. <p>Gets usage information for an identity, including number of datasets and data usage.</p><p>This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.</p>
  203. @param request A container for the necessary parameters to execute the DescribeIdentityUsage service method.
  204. @param completionHandler The completion handler to call when the load request is complete.
  205. `response` - A response object, or `nil` if the request failed.
  206. `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 `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
  207. @see AWSCognitoSyncDescribeIdentityUsageRequest
  208. @see AWSCognitoSyncDescribeIdentityUsageResponse
  209. */
  210. - (void)describeIdentityUsage:(AWSCognitoSyncDescribeIdentityUsageRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncDescribeIdentityUsageResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  211. /**
  212. <p>Get the status of the last BulkPublish operation for an identity pool.</p><p>This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.</p>
  213. @param request A container for the necessary parameters to execute the GetBulkPublishDetails service method.
  214. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncGetBulkPublishDetailsResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`.
  215. @see AWSCognitoSyncGetBulkPublishDetailsRequest
  216. @see AWSCognitoSyncGetBulkPublishDetailsResponse
  217. */
  218. - (AWSTask<AWSCognitoSyncGetBulkPublishDetailsResponse *> *)getBulkPublishDetails:(AWSCognitoSyncGetBulkPublishDetailsRequest *)request;
  219. /**
  220. <p>Get the status of the last BulkPublish operation for an identity pool.</p><p>This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.</p>
  221. @param request A container for the necessary parameters to execute the GetBulkPublishDetails service method.
  222. @param completionHandler The completion handler to call when the load request is complete.
  223. `response` - A response object, or `nil` if the request failed.
  224. `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 `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`.
  225. @see AWSCognitoSyncGetBulkPublishDetailsRequest
  226. @see AWSCognitoSyncGetBulkPublishDetailsResponse
  227. */
  228. - (void)getBulkPublishDetails:(AWSCognitoSyncGetBulkPublishDetailsRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncGetBulkPublishDetailsResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  229. /**
  230. <p>Gets the events and the corresponding Lambda functions associated with an identity pool.</p><p>This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.</p>
  231. @param request A container for the necessary parameters to execute the GetCognitoEvents service method.
  232. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncGetCognitoEventsResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
  233. @see AWSCognitoSyncGetCognitoEventsRequest
  234. @see AWSCognitoSyncGetCognitoEventsResponse
  235. */
  236. - (AWSTask<AWSCognitoSyncGetCognitoEventsResponse *> *)getCognitoEvents:(AWSCognitoSyncGetCognitoEventsRequest *)request;
  237. /**
  238. <p>Gets the events and the corresponding Lambda functions associated with an identity pool.</p><p>This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.</p>
  239. @param request A container for the necessary parameters to execute the GetCognitoEvents service method.
  240. @param completionHandler The completion handler to call when the load request is complete.
  241. `response` - A response object, or `nil` if the request failed.
  242. `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 `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
  243. @see AWSCognitoSyncGetCognitoEventsRequest
  244. @see AWSCognitoSyncGetCognitoEventsResponse
  245. */
  246. - (void)getCognitoEvents:(AWSCognitoSyncGetCognitoEventsRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncGetCognitoEventsResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  247. /**
  248. <p>Gets the configuration settings of an identity pool.</p><p>This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.</p>
  249. @param request A container for the necessary parameters to execute the GetIdentityPoolConfiguration service method.
  250. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncGetIdentityPoolConfigurationResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
  251. @see AWSCognitoSyncGetIdentityPoolConfigurationRequest
  252. @see AWSCognitoSyncGetIdentityPoolConfigurationResponse
  253. */
  254. - (AWSTask<AWSCognitoSyncGetIdentityPoolConfigurationResponse *> *)getIdentityPoolConfiguration:(AWSCognitoSyncGetIdentityPoolConfigurationRequest *)request;
  255. /**
  256. <p>Gets the configuration settings of an identity pool.</p><p>This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.</p>
  257. @param request A container for the necessary parameters to execute the GetIdentityPoolConfiguration service method.
  258. @param completionHandler The completion handler to call when the load request is complete.
  259. `response` - A response object, or `nil` if the request failed.
  260. `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 `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
  261. @see AWSCognitoSyncGetIdentityPoolConfigurationRequest
  262. @see AWSCognitoSyncGetIdentityPoolConfigurationResponse
  263. */
  264. - (void)getIdentityPoolConfiguration:(AWSCognitoSyncGetIdentityPoolConfigurationRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncGetIdentityPoolConfigurationResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  265. /**
  266. <p>Lists datasets for an identity. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data.</p><p>ListDatasets can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use the Cognito Identity credentials to make this API call.</p>
  267. @param request A container for the necessary parameters to execute the ListDatasets service method.
  268. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncListDatasetsResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
  269. @see AWSCognitoSyncListDatasetsRequest
  270. @see AWSCognitoSyncListDatasetsResponse
  271. */
  272. - (AWSTask<AWSCognitoSyncListDatasetsResponse *> *)listDatasets:(AWSCognitoSyncListDatasetsRequest *)request;
  273. /**
  274. <p>Lists datasets for an identity. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data.</p><p>ListDatasets can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use the Cognito Identity credentials to make this API call.</p>
  275. @param request A container for the necessary parameters to execute the ListDatasets service method.
  276. @param completionHandler The completion handler to call when the load request is complete.
  277. `response` - A response object, or `nil` if the request failed.
  278. `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 `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
  279. @see AWSCognitoSyncListDatasetsRequest
  280. @see AWSCognitoSyncListDatasetsResponse
  281. */
  282. - (void)listDatasets:(AWSCognitoSyncListDatasetsRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncListDatasetsResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  283. /**
  284. <p>Gets a list of identity pools registered with Cognito.</p><p>ListIdentityPoolUsage can only be called with developer credentials. You cannot make this API call with the temporary user credentials provided by Cognito Identity.</p>
  285. @param request A container for the necessary parameters to execute the ListIdentityPoolUsage service method.
  286. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncListIdentityPoolUsageResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
  287. @see AWSCognitoSyncListIdentityPoolUsageRequest
  288. @see AWSCognitoSyncListIdentityPoolUsageResponse
  289. */
  290. - (AWSTask<AWSCognitoSyncListIdentityPoolUsageResponse *> *)listIdentityPoolUsage:(AWSCognitoSyncListIdentityPoolUsageRequest *)request;
  291. /**
  292. <p>Gets a list of identity pools registered with Cognito.</p><p>ListIdentityPoolUsage can only be called with developer credentials. You cannot make this API call with the temporary user credentials provided by Cognito Identity.</p>
  293. @param request A container for the necessary parameters to execute the ListIdentityPoolUsage service method.
  294. @param completionHandler The completion handler to call when the load request is complete.
  295. `response` - A response object, or `nil` if the request failed.
  296. `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 `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
  297. @see AWSCognitoSyncListIdentityPoolUsageRequest
  298. @see AWSCognitoSyncListIdentityPoolUsageResponse
  299. */
  300. - (void)listIdentityPoolUsage:(AWSCognitoSyncListIdentityPoolUsageRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncListIdentityPoolUsageResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  301. /**
  302. <p>Gets paginated records, optionally changed after a particular sync count for a dataset and identity. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data.</p><p>ListRecords can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use Cognito Identity credentials to make this API call.</p>
  303. @param request A container for the necessary parameters to execute the ListRecords service method.
  304. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncListRecordsResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorTooManyRequests`, `AWSCognitoSyncErrorInternalError`.
  305. @see AWSCognitoSyncListRecordsRequest
  306. @see AWSCognitoSyncListRecordsResponse
  307. */
  308. - (AWSTask<AWSCognitoSyncListRecordsResponse *> *)listRecords:(AWSCognitoSyncListRecordsRequest *)request;
  309. /**
  310. <p>Gets paginated records, optionally changed after a particular sync count for a dataset and identity. With Amazon Cognito Sync, each identity has access only to its own data. Thus, the credentials used to make this API call need to have access to the identity data.</p><p>ListRecords can be called with temporary user credentials provided by Cognito Identity or with developer credentials. You should use Cognito Identity credentials to make this API call.</p>
  311. @param request A container for the necessary parameters to execute the ListRecords service method.
  312. @param completionHandler The completion handler to call when the load request is complete.
  313. `response` - A response object, or `nil` if the request failed.
  314. `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 `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorTooManyRequests`, `AWSCognitoSyncErrorInternalError`.
  315. @see AWSCognitoSyncListRecordsRequest
  316. @see AWSCognitoSyncListRecordsResponse
  317. */
  318. - (void)listRecords:(AWSCognitoSyncListRecordsRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncListRecordsResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  319. /**
  320. <p>Registers a device to receive push sync notifications.</p><p>This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.</p>
  321. @param request A container for the necessary parameters to execute the RegisterDevice service method.
  322. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncRegisterDeviceResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorInvalidConfiguration`, `AWSCognitoSyncErrorTooManyRequests`.
  323. @see AWSCognitoSyncRegisterDeviceRequest
  324. @see AWSCognitoSyncRegisterDeviceResponse
  325. */
  326. - (AWSTask<AWSCognitoSyncRegisterDeviceResponse *> *)registerDevice:(AWSCognitoSyncRegisterDeviceRequest *)request;
  327. /**
  328. <p>Registers a device to receive push sync notifications.</p><p>This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.</p>
  329. @param request A container for the necessary parameters to execute the RegisterDevice service method.
  330. @param completionHandler The completion handler to call when the load request is complete.
  331. `response` - A response object, or `nil` if the request failed.
  332. `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 `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorInvalidConfiguration`, `AWSCognitoSyncErrorTooManyRequests`.
  333. @see AWSCognitoSyncRegisterDeviceRequest
  334. @see AWSCognitoSyncRegisterDeviceResponse
  335. */
  336. - (void)registerDevice:(AWSCognitoSyncRegisterDeviceRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncRegisterDeviceResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  337. /**
  338. <p>Sets the AWS Lambda function for a given event type for an identity pool. This request only updates the key/value pair specified. Other key/values pairs are not updated. To remove a key value pair, pass a empty value for the particular key.</p><p>This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.</p>
  339. @param request A container for the necessary parameters to execute the SetCognitoEvents service method.
  340. @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
  341. @see AWSCognitoSyncSetCognitoEventsRequest
  342. */
  343. - (AWSTask *)setCognitoEvents:(AWSCognitoSyncSetCognitoEventsRequest *)request;
  344. /**
  345. <p>Sets the AWS Lambda function for a given event type for an identity pool. This request only updates the key/value pair specified. Other key/values pairs are not updated. To remove a key value pair, pass a empty value for the particular key.</p><p>This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.</p>
  346. @param request A container for the necessary parameters to execute the SetCognitoEvents service method.
  347. @param completionHandler The completion handler to call when the load request is complete.
  348. `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 `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`.
  349. @see AWSCognitoSyncSetCognitoEventsRequest
  350. */
  351. - (void)setCognitoEvents:(AWSCognitoSyncSetCognitoEventsRequest *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler;
  352. /**
  353. <p>Sets the necessary configuration for push sync.</p><p>This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.</p>
  354. @param request A container for the necessary parameters to execute the SetIdentityPoolConfiguration service method.
  355. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncSetIdentityPoolConfigurationResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`, `AWSCognitoSyncErrorConcurrentModification`.
  356. @see AWSCognitoSyncSetIdentityPoolConfigurationRequest
  357. @see AWSCognitoSyncSetIdentityPoolConfigurationResponse
  358. */
  359. - (AWSTask<AWSCognitoSyncSetIdentityPoolConfigurationResponse *> *)setIdentityPoolConfiguration:(AWSCognitoSyncSetIdentityPoolConfigurationRequest *)request;
  360. /**
  361. <p>Sets the necessary configuration for push sync.</p><p>This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.</p>
  362. @param request A container for the necessary parameters to execute the SetIdentityPoolConfiguration service method.
  363. @param completionHandler The completion handler to call when the load request is complete.
  364. `response` - A response object, or `nil` if the request failed.
  365. `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 `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorTooManyRequests`, `AWSCognitoSyncErrorConcurrentModification`.
  366. @see AWSCognitoSyncSetIdentityPoolConfigurationRequest
  367. @see AWSCognitoSyncSetIdentityPoolConfigurationResponse
  368. */
  369. - (void)setIdentityPoolConfiguration:(AWSCognitoSyncSetIdentityPoolConfigurationRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncSetIdentityPoolConfigurationResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  370. /**
  371. <p>Subscribes to receive notifications when a dataset is modified by another device.</p><p>This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.</p>
  372. @param request A container for the necessary parameters to execute the SubscribeToDataset service method.
  373. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncSubscribeToDatasetResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorInvalidConfiguration`, `AWSCognitoSyncErrorTooManyRequests`.
  374. @see AWSCognitoSyncSubscribeToDatasetRequest
  375. @see AWSCognitoSyncSubscribeToDatasetResponse
  376. */
  377. - (AWSTask<AWSCognitoSyncSubscribeToDatasetResponse *> *)subscribeToDataset:(AWSCognitoSyncSubscribeToDatasetRequest *)request;
  378. /**
  379. <p>Subscribes to receive notifications when a dataset is modified by another device.</p><p>This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.</p>
  380. @param request A container for the necessary parameters to execute the SubscribeToDataset service method.
  381. @param completionHandler The completion handler to call when the load request is complete.
  382. `response` - A response object, or `nil` if the request failed.
  383. `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 `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorInvalidConfiguration`, `AWSCognitoSyncErrorTooManyRequests`.
  384. @see AWSCognitoSyncSubscribeToDatasetRequest
  385. @see AWSCognitoSyncSubscribeToDatasetResponse
  386. */
  387. - (void)subscribeToDataset:(AWSCognitoSyncSubscribeToDatasetRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncSubscribeToDatasetResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  388. /**
  389. <p>Unsubscribes from receiving notifications when a dataset is modified by another device.</p><p>This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.</p>
  390. @param request A container for the necessary parameters to execute the UnsubscribeFromDataset service method.
  391. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncUnsubscribeFromDatasetResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorInvalidConfiguration`, `AWSCognitoSyncErrorTooManyRequests`.
  392. @see AWSCognitoSyncUnsubscribeFromDatasetRequest
  393. @see AWSCognitoSyncUnsubscribeFromDatasetResponse
  394. */
  395. - (AWSTask<AWSCognitoSyncUnsubscribeFromDatasetResponse *> *)unsubscribeFromDataset:(AWSCognitoSyncUnsubscribeFromDatasetRequest *)request;
  396. /**
  397. <p>Unsubscribes from receiving notifications when a dataset is modified by another device.</p><p>This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.</p>
  398. @param request A container for the necessary parameters to execute the UnsubscribeFromDataset service method.
  399. @param completionHandler The completion handler to call when the load request is complete.
  400. `response` - A response object, or `nil` if the request failed.
  401. `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 `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorInternalError`, `AWSCognitoSyncErrorInvalidConfiguration`, `AWSCognitoSyncErrorTooManyRequests`.
  402. @see AWSCognitoSyncUnsubscribeFromDatasetRequest
  403. @see AWSCognitoSyncUnsubscribeFromDatasetResponse
  404. */
  405. - (void)unsubscribeFromDataset:(AWSCognitoSyncUnsubscribeFromDatasetRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncUnsubscribeFromDatasetResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  406. /**
  407. <p>Posts updates to records and adds and deletes records for a dataset and user.</p><p>The sync count in the record patch is your last known sync count for that record. The server will reject an UpdateRecords request with a ResourceConflictException if you try to patch a record with a new value but a stale sync count.</p><p>For example, if the sync count on the server is 5 for a key called highScore and you try and submit a new highScore with sync count of 4, the request will be rejected. To obtain the current sync count for a record, call ListRecords. On a successful update of the record, the response returns the new sync count for that record. You should present that sync count the next time you try to update that same record. When the record does not exist, specify the sync count as 0.</p><p>This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.</p>
  408. @param request A container for the necessary parameters to execute the UpdateRecords service method.
  409. @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoSyncUpdateRecordsResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorLimitExceeded`, `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorResourceConflict`, `AWSCognitoSyncErrorInvalidLambdaFunctionOutput`, `AWSCognitoSyncErrorLambdaThrottled`, `AWSCognitoSyncErrorTooManyRequests`, `AWSCognitoSyncErrorInternalError`.
  410. @see AWSCognitoSyncUpdateRecordsRequest
  411. @see AWSCognitoSyncUpdateRecordsResponse
  412. */
  413. - (AWSTask<AWSCognitoSyncUpdateRecordsResponse *> *)updateRecords:(AWSCognitoSyncUpdateRecordsRequest *)request;
  414. /**
  415. <p>Posts updates to records and adds and deletes records for a dataset and user.</p><p>The sync count in the record patch is your last known sync count for that record. The server will reject an UpdateRecords request with a ResourceConflictException if you try to patch a record with a new value but a stale sync count.</p><p>For example, if the sync count on the server is 5 for a key called highScore and you try and submit a new highScore with sync count of 4, the request will be rejected. To obtain the current sync count for a record, call ListRecords. On a successful update of the record, the response returns the new sync count for that record. You should present that sync count the next time you try to update that same record. When the record does not exist, specify the sync count as 0.</p><p>This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.</p>
  416. @param request A container for the necessary parameters to execute the UpdateRecords service method.
  417. @param completionHandler The completion handler to call when the load request is complete.
  418. `response` - A response object, or `nil` if the request failed.
  419. `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 `AWSCognitoSyncErrorDomain` domain and the following error code: `AWSCognitoSyncErrorInvalidParameter`, `AWSCognitoSyncErrorLimitExceeded`, `AWSCognitoSyncErrorNotAuthorized`, `AWSCognitoSyncErrorResourceNotFound`, `AWSCognitoSyncErrorResourceConflict`, `AWSCognitoSyncErrorInvalidLambdaFunctionOutput`, `AWSCognitoSyncErrorLambdaThrottled`, `AWSCognitoSyncErrorTooManyRequests`, `AWSCognitoSyncErrorInternalError`.
  420. @see AWSCognitoSyncUpdateRecordsRequest
  421. @see AWSCognitoSyncUpdateRecordsResponse
  422. */
  423. - (void)updateRecords:(AWSCognitoSyncUpdateRecordsRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoSyncUpdateRecordsResponse * _Nullable response, NSError * _Nullable error))completionHandler;
  424. @end
  425. NS_ASSUME_NONNULL_END