AWSCognitoSync

Objective-C

@interface AWSCognitoSync

Swift

class AWSCognitoSync

Amazon Cognito Sync

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.

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 Amazon Cognito Identity service.

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 Developer Guide for Android and the Developer Guide for iOS.

  • The service configuration used to instantiate this service client.

    Warning

    Once the client is instantiated, do not modify the configuration object. It may cause unspecified behaviors.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) AWSServiceConfiguration *configuration

    Swift

    var configuration: UnsafeMutablePointer<Int32> { get }
  • 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.

    For example, set the default service configuration in - application:didFinishLaunchingWithOptions:

    Swift

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
       let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
       let configuration = AWSServiceConfiguration(region: .USEast1, credentialsProvider: credentialProvider)
       AWSServiceManager.default().defaultServiceConfiguration = configuration
    
       return true
    

    }

    Objective-C

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
         AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
                                                                                                         identityPoolId:@"YourIdentityPoolId"];
         AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1
                                                                              credentialsProvider:credentialsProvider];
         [AWSServiceManager defaultServiceManager].defaultServiceConfiguration = configuration;
    
         return YES;
     }
    

    Then call the following to get the default service client:

    Swift

    let CognitoSync = AWSCognitoSync.default()
    

    Objective-C

    AWSCognitoSync *CognitoSync = [AWSCognitoSync defaultCognitoSync];
    

    Declaration

    Objective-C

    + (nonnull instancetype)defaultCognitoSync;

    Swift

    class func `default`() -> Self

    Return Value

    The default service client.

  • Creates a service client with the given service configuration and registers it for the key.

    For example, set the default service configuration in - application:didFinishLaunchingWithOptions:

    Swift

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
       let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
       let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
       AWSCognitoSync.register(with: configuration!, forKey: "USWest2CognitoSync")
    
       return true
    

    }

    Objective-C

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
        AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
                                                                                                        identityPoolId:@"YourIdentityPoolId"];
        AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
                                                                             credentialsProvider:credentialsProvider];
    
        [AWSCognitoSync registerCognitoSyncWithConfiguration:configuration forKey:@"USWest2CognitoSync"];
    
        return YES;
    }
    

    Then call the following to get the service client:

    Swift

    let CognitoSync = AWSCognitoSync(forKey: "USWest2CognitoSync")
    

    Objective-C

    AWSCognitoSync *CognitoSync = [AWSCognitoSync CognitoSyncForKey:@"USWest2CognitoSync"];
    

    Warning

    After calling this method, do not modify the configuration object. It may cause unspecified behaviors.

    Declaration

    Objective-C

    + (void)registerCognitoSyncWithConfiguration:(id)configuration
                                          forKey:(nonnull NSString *)key;

    Swift

    class func register(withConfiguration configuration: Any!, forKey key: String)

    Parameters

    configuration

    A service configuration object.

    key

    A string to identify the service client.

  • Retrieves the service client associated with the key. You need to call + registerCognitoSyncWithConfiguration:forKey: before invoking this method.

    For example, set the default service configuration in - application:didFinishLaunchingWithOptions:

    Swift

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
       let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId")
       let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider)
       AWSCognitoSync.register(with: configuration!, forKey: "USWest2CognitoSync")
    
       return true
    

    }

    Objective-C

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
        AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1
                                                                                                        identityPoolId:@"YourIdentityPoolId"];
        AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2
                                                                             credentialsProvider:credentialsProvider];
    
        [AWSCognitoSync registerCognitoSyncWithConfiguration:configuration forKey:@"USWest2CognitoSync"];
    
        return YES;
    }
    

    Then call the following to get the service client:

    Swift

    let CognitoSync = AWSCognitoSync(forKey: "USWest2CognitoSync")
    

    Objective-C

    AWSCognitoSync *CognitoSync = [AWSCognitoSync CognitoSyncForKey:@"USWest2CognitoSync"];
    

    Declaration

    Objective-C

    + (nonnull instancetype)CognitoSyncForKey:(nonnull NSString *)key;

    Swift

    convenience init(forKey key: String)

    Parameters

    key

    A string to identify the service client.

    Return Value

    An instance of the service client.

  • Removes the service client associated with the key and release it.

    Warning

    Before calling this method, make sure no method is running on this client.

    Declaration

    Objective-C

    + (void)removeCognitoSyncForKey:(nonnull NSString *)key;

    Swift

    class func remove(forKey key: String)

    Parameters

    key

    A string to identify the service client.

  • 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.

    This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.

    See

    AWSCognitoSyncBulkPublishRequest

    See

    AWSCognitoSyncBulkPublishResponse

    Declaration

    Objective-C

    - (id)bulkPublish:(nonnull AWSCognitoSyncBulkPublishRequest *)request;

    Swift

    func bulkPublish(_ request: AWSCognitoSyncBulkPublishRequest) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the BulkPublish service method.

    Return Value

    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.

  • 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.

    This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.

    See

    AWSCognitoSyncBulkPublishRequest

    See

    AWSCognitoSyncBulkPublishResponse

    Declaration

    Objective-C

    - (void)bulkPublish:(nonnull AWSCognitoSyncBulkPublishRequest *)request
        completionHandler:
            (void (^_Nullable)(AWSCognitoSyncBulkPublishResponse *_Nullable,
                               NSError *_Nullable))completionHandler;

    Swift

    func bulkPublish(_ request: AWSCognitoSyncBulkPublishRequest, completionHandler: ((AWSCognitoSyncBulkPublishResponse?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the BulkPublish service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. 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.

  • 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.

    This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.

    See

    AWSCognitoSyncDeleteDatasetRequest

    See

    AWSCognitoSyncDeleteDatasetResponse

    Declaration

    Objective-C

    - (id)deleteDataset:(nonnull AWSCognitoSyncDeleteDatasetRequest *)request;

    Swift

    func deleteDataset(_ request: AWSCognitoSyncDeleteDatasetRequest) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the DeleteDataset service method.

    Return Value

    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.

  • 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.

    This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.

    See

    AWSCognitoSyncDeleteDatasetRequest

    See

    AWSCognitoSyncDeleteDatasetResponse

    Declaration

    Objective-C

    - (void)deleteDataset:(nonnull AWSCognitoSyncDeleteDatasetRequest *)request
        completionHandler:
            (void (^_Nullable)(AWSCognitoSyncDeleteDatasetResponse *_Nullable,
                               NSError *_Nullable))completionHandler;

    Swift

    func deleteDataset(_ request: AWSCognitoSyncDeleteDatasetRequest, completionHandler: ((AWSCognitoSyncDeleteDatasetResponse?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the DeleteDataset service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. 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.

  • 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.

    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.

    See

    AWSCognitoSyncDescribeDatasetRequest

    See

    AWSCognitoSyncDescribeDatasetResponse

    Declaration

    Objective-C

    - (id)describeDataset:(nonnull AWSCognitoSyncDescribeDatasetRequest *)request;

    Swift

    func describeDataset(_ request: AWSCognitoSyncDescribeDatasetRequest) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the DescribeDataset service method.

    Return Value

    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.

  • 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.

    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.

    See

    AWSCognitoSyncDescribeDatasetRequest

    See

    AWSCognitoSyncDescribeDatasetResponse

    Declaration

    Objective-C

    - (void)describeDataset:(nonnull AWSCognitoSyncDescribeDatasetRequest *)request
          completionHandler:
              (void (^_Nullable)(AWSCognitoSyncDescribeDatasetResponse *_Nullable,
                                 NSError *_Nullable))completionHandler;

    Swift

    func describeDataset(_ request: AWSCognitoSyncDescribeDatasetRequest, completionHandler: ((AWSCognitoSyncDescribeDatasetResponse?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the DescribeDataset service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. 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.

  • Gets usage details (for example, data storage) about a particular identity pool.

    This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.

    See

    AWSCognitoSyncDescribeIdentityPoolUsageRequest

    See

    AWSCognitoSyncDescribeIdentityPoolUsageResponse

    Declaration

    Objective-C

    - (id)describeIdentityPoolUsage:
        (nonnull AWSCognitoSyncDescribeIdentityPoolUsageRequest *)request;

    Swift

    func describeIdentityPoolUsage(_ request: AWSCognitoSyncDescribeIdentityPoolUsageRequest) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the DescribeIdentityPoolUsage service method.

    Return Value

    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.

  • Gets usage details (for example, data storage) about a particular identity pool.

    This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.

    See

    AWSCognitoSyncDescribeIdentityPoolUsageRequest

    See

    AWSCognitoSyncDescribeIdentityPoolUsageResponse

    Declaration

    Objective-C

    - (void)
        describeIdentityPoolUsage:
            (nonnull AWSCognitoSyncDescribeIdentityPoolUsageRequest *)request
                completionHandler:
                    (void (^_Nullable)(
                        AWSCognitoSyncDescribeIdentityPoolUsageResponse *_Nullable,
                        NSError *_Nullable))completionHandler;

    Swift

    func describeIdentityPoolUsage(_ request: AWSCognitoSyncDescribeIdentityPoolUsageRequest, completionHandler: ((AWSCognitoSyncDescribeIdentityPoolUsageResponse?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the DescribeIdentityPoolUsage service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. 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.

  • Gets usage information for an identity, including number of datasets and data usage.

    This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.

    See

    AWSCognitoSyncDescribeIdentityUsageRequest

    See

    AWSCognitoSyncDescribeIdentityUsageResponse

    Declaration

    Objective-C

    - (id)describeIdentityUsage:
        (nonnull AWSCognitoSyncDescribeIdentityUsageRequest *)request;

    Swift

    func describeIdentityUsage(_ request: AWSCognitoSyncDescribeIdentityUsageRequest) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the DescribeIdentityUsage service method.

    Return Value

    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.

  • Gets usage information for an identity, including number of datasets and data usage.

    This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.

    See

    AWSCognitoSyncDescribeIdentityUsageRequest

    See

    AWSCognitoSyncDescribeIdentityUsageResponse

    Declaration

    Objective-C

    - (void)describeIdentityUsage:
                (nonnull AWSCognitoSyncDescribeIdentityUsageRequest *)request
                completionHandler:
                    (void (^_Nullable)(
                        AWSCognitoSyncDescribeIdentityUsageResponse *_Nullable,
                        NSError *_Nullable))completionHandler;

    Swift

    func describeIdentityUsage(_ request: AWSCognitoSyncDescribeIdentityUsageRequest, completionHandler: ((AWSCognitoSyncDescribeIdentityUsageResponse?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the DescribeIdentityUsage service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. 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.

  • Get the status of the last BulkPublish operation for an identity pool.

    This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.

    See

    AWSCognitoSyncGetBulkPublishDetailsRequest

    See

    AWSCognitoSyncGetBulkPublishDetailsResponse

    Declaration

    Objective-C

    - (id)getBulkPublishDetails:
        (nonnull AWSCognitoSyncGetBulkPublishDetailsRequest *)request;

    Swift

    func getBulkPublishDetails(_ request: AWSCognitoSyncGetBulkPublishDetailsRequest) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the GetBulkPublishDetails service method.

    Return Value

    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.

  • Get the status of the last BulkPublish operation for an identity pool.

    This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.

    See

    AWSCognitoSyncGetBulkPublishDetailsRequest

    See

    AWSCognitoSyncGetBulkPublishDetailsResponse

    Declaration

    Objective-C

    - (void)getBulkPublishDetails:
                (nonnull AWSCognitoSyncGetBulkPublishDetailsRequest *)request
                completionHandler:
                    (void (^_Nullable)(
                        AWSCognitoSyncGetBulkPublishDetailsResponse *_Nullable,
                        NSError *_Nullable))completionHandler;

    Swift

    func getBulkPublishDetails(_ request: AWSCognitoSyncGetBulkPublishDetailsRequest, completionHandler: ((AWSCognitoSyncGetBulkPublishDetailsResponse?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the GetBulkPublishDetails service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. 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.

  • Gets the events and the corresponding Lambda functions associated with an identity pool.

    This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.

    See

    AWSCognitoSyncGetCognitoEventsRequest

    See

    AWSCognitoSyncGetCognitoEventsResponse

    Declaration

    Objective-C

    - (id)getCognitoEvents:(nonnull AWSCognitoSyncGetCognitoEventsRequest *)request;

    Swift

    func getCognitoEvents(_ request: AWSCognitoSyncGetCognitoEventsRequest) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the GetCognitoEvents service method.

    Return Value

    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.

  • Gets the events and the corresponding Lambda functions associated with an identity pool.

    This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.

    See

    AWSCognitoSyncGetCognitoEventsRequest

    See

    AWSCognitoSyncGetCognitoEventsResponse

    Declaration

    Objective-C

    - (void)getCognitoEvents:
                (nonnull AWSCognitoSyncGetCognitoEventsRequest *)request
           completionHandler:
               (void (^_Nullable)(AWSCognitoSyncGetCognitoEventsResponse *_Nullable,
                                  NSError *_Nullable))completionHandler;

    Swift

    func getCognitoEvents(_ request: AWSCognitoSyncGetCognitoEventsRequest, completionHandler: ((AWSCognitoSyncGetCognitoEventsResponse?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the GetCognitoEvents service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. 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.

  • Gets the configuration settings of an identity pool.

    This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.

    See

    AWSCognitoSyncGetIdentityPoolConfigurationRequest

    See

    AWSCognitoSyncGetIdentityPoolConfigurationResponse

    Declaration

    Objective-C

    - (id)getIdentityPoolConfiguration:
        (nonnull AWSCognitoSyncGetIdentityPoolConfigurationRequest *)request;

    Swift

    func getIdentityPoolConfiguration(_ request: AWSCognitoSyncGetIdentityPoolConfigurationRequest) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the GetIdentityPoolConfiguration service method.

    Return Value

    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.

  • Gets the configuration settings of an identity pool.

    This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.

    See

    AWSCognitoSyncGetIdentityPoolConfigurationRequest

    See

    AWSCognitoSyncGetIdentityPoolConfigurationResponse

    Declaration

    Objective-C

    - (void)getIdentityPoolConfiguration:
                (nonnull AWSCognitoSyncGetIdentityPoolConfigurationRequest *)request
                       completionHandler:
                           (void (^_Nullable)(
                               AWSCognitoSyncGetIdentityPoolConfigurationResponse
                                   *_Nullable,
                               NSError *_Nullable))completionHandler;

    Swift

    func getIdentityPoolConfiguration(_ request: AWSCognitoSyncGetIdentityPoolConfigurationRequest, completionHandler: ((AWSCognitoSyncGetIdentityPoolConfigurationResponse?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the GetIdentityPoolConfiguration service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. 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.

  • 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.

    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.

    See

    AWSCognitoSyncListDatasetsRequest

    See

    AWSCognitoSyncListDatasetsResponse

    Declaration

    Objective-C

    - (id)listDatasets:(nonnull AWSCognitoSyncListDatasetsRequest *)request;

    Swift

    func listDatasets(_ request: AWSCognitoSyncListDatasetsRequest) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the ListDatasets service method.

    Return Value

    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.

  • 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.

    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.

    See

    AWSCognitoSyncListDatasetsRequest

    See

    AWSCognitoSyncListDatasetsResponse

    Declaration

    Objective-C

    - (void)listDatasets:(nonnull AWSCognitoSyncListDatasetsRequest *)request
        completionHandler:
            (void (^_Nullable)(AWSCognitoSyncListDatasetsResponse *_Nullable,
                               NSError *_Nullable))completionHandler;

    Swift

    func listDatasets(_ request: AWSCognitoSyncListDatasetsRequest, completionHandler: ((AWSCognitoSyncListDatasetsResponse?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the ListDatasets service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. 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.

  • Gets a list of identity pools registered with Cognito.

    ListIdentityPoolUsage can only be called with developer credentials. You cannot make this API call with the temporary user credentials provided by Cognito Identity.

    See

    AWSCognitoSyncListIdentityPoolUsageRequest

    See

    AWSCognitoSyncListIdentityPoolUsageResponse

    Declaration

    Objective-C

    - (id)listIdentityPoolUsage:
        (nonnull AWSCognitoSyncListIdentityPoolUsageRequest *)request;

    Swift

    func listIdentityPoolUsage(_ request: AWSCognitoSyncListIdentityPoolUsageRequest) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the ListIdentityPoolUsage service method.

    Return Value

    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.

  • Gets a list of identity pools registered with Cognito.

    ListIdentityPoolUsage can only be called with developer credentials. You cannot make this API call with the temporary user credentials provided by Cognito Identity.

    See

    AWSCognitoSyncListIdentityPoolUsageRequest

    See

    AWSCognitoSyncListIdentityPoolUsageResponse

    Declaration

    Objective-C

    - (void)listIdentityPoolUsage:
                (nonnull AWSCognitoSyncListIdentityPoolUsageRequest *)request
                completionHandler:
                    (void (^_Nullable)(
                        AWSCognitoSyncListIdentityPoolUsageResponse *_Nullable,
                        NSError *_Nullable))completionHandler;

    Swift

    func listIdentityPoolUsage(_ request: AWSCognitoSyncListIdentityPoolUsageRequest, completionHandler: ((AWSCognitoSyncListIdentityPoolUsageResponse?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the ListIdentityPoolUsage service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. 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.

  • 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.

    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.

    See

    AWSCognitoSyncListRecordsRequest

    See

    AWSCognitoSyncListRecordsResponse

    Declaration

    Objective-C

    - (id)listRecords:(nonnull AWSCognitoSyncListRecordsRequest *)request;

    Swift

    func listRecords(_ request: AWSCognitoSyncListRecordsRequest) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the ListRecords service method.

    Return Value

    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.

  • 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.

    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.

    See

    AWSCognitoSyncListRecordsRequest

    See

    AWSCognitoSyncListRecordsResponse

    Declaration

    Objective-C

    - (void)listRecords:(nonnull AWSCognitoSyncListRecordsRequest *)request
        completionHandler:
            (void (^_Nullable)(AWSCognitoSyncListRecordsResponse *_Nullable,
                               NSError *_Nullable))completionHandler;

    Swift

    func listRecords(_ request: AWSCognitoSyncListRecordsRequest, completionHandler: ((AWSCognitoSyncListRecordsResponse?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the ListRecords service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. 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.

  • Registers a device to receive push sync notifications.

    This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.

    See

    AWSCognitoSyncRegisterDeviceRequest

    See

    AWSCognitoSyncRegisterDeviceResponse

    Declaration

    Objective-C

    - (id)registerDevice:(nonnull AWSCognitoSyncRegisterDeviceRequest *)request;

    Swift

    func registerDevice(_ request: AWSCognitoSyncRegisterDeviceRequest) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the RegisterDevice service method.

    Return Value

    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.

  • Registers a device to receive push sync notifications.

    This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.

    See

    AWSCognitoSyncRegisterDeviceRequest

    See

    AWSCognitoSyncRegisterDeviceResponse

    Declaration

    Objective-C

    - (void)registerDevice:(nonnull AWSCognitoSyncRegisterDeviceRequest *)request
         completionHandler:
             (void (^_Nullable)(AWSCognitoSyncRegisterDeviceResponse *_Nullable,
                                NSError *_Nullable))completionHandler;

    Swift

    func registerDevice(_ request: AWSCognitoSyncRegisterDeviceRequest, completionHandler: ((AWSCognitoSyncRegisterDeviceResponse?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the RegisterDevice service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. 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.

  • 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.

    This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.

    See

    AWSCognitoSyncSetCognitoEventsRequest

    Declaration

    Objective-C

    - (id)setCognitoEvents:(nonnull AWSCognitoSyncSetCognitoEventsRequest *)request;

    Swift

    func setCognitoEvents(_ request: AWSCognitoSyncSetCognitoEventsRequest) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the SetCognitoEvents service method.

    Return Value

    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.

  • 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.

    This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.

    See

    AWSCognitoSyncSetCognitoEventsRequest

    Declaration

    Objective-C

    - (void)
         setCognitoEvents:(nonnull AWSCognitoSyncSetCognitoEventsRequest *)request
        completionHandler:(void (^_Nullable)(NSError *_Nullable))completionHandler;

    Swift

    func setCognitoEvents(_ request: AWSCognitoSyncSetCognitoEventsRequest, completionHandler: ((Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the SetCognitoEvents service method.

    completionHandler

    The completion handler to call when the load request is complete. 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.

  • Sets the necessary configuration for push sync.

    This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.

    See

    AWSCognitoSyncSetIdentityPoolConfigurationRequest

    See

    AWSCognitoSyncSetIdentityPoolConfigurationResponse

    Declaration

    Objective-C

    - (id)setIdentityPoolConfiguration:
        (nonnull AWSCognitoSyncSetIdentityPoolConfigurationRequest *)request;

    Swift

    func setIdentityPoolConfiguration(_ request: AWSCognitoSyncSetIdentityPoolConfigurationRequest) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the SetIdentityPoolConfiguration service method.

    Return Value

    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.

  • Sets the necessary configuration for push sync.

    This API can only be called with developer credentials. You cannot call this API with the temporary user credentials provided by Cognito Identity.

    See

    AWSCognitoSyncSetIdentityPoolConfigurationRequest

    See

    AWSCognitoSyncSetIdentityPoolConfigurationResponse

    Declaration

    Objective-C

    - (void)setIdentityPoolConfiguration:
                (nonnull AWSCognitoSyncSetIdentityPoolConfigurationRequest *)request
                       completionHandler:
                           (void (^_Nullable)(
                               AWSCognitoSyncSetIdentityPoolConfigurationResponse
                                   *_Nullable,
                               NSError *_Nullable))completionHandler;

    Swift

    func setIdentityPoolConfiguration(_ request: AWSCognitoSyncSetIdentityPoolConfigurationRequest, completionHandler: ((AWSCognitoSyncSetIdentityPoolConfigurationResponse?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the SetIdentityPoolConfiguration service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. 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.

  • Subscribes to receive notifications when a dataset is modified by another device.

    This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.

    See

    AWSCognitoSyncSubscribeToDatasetRequest

    See

    AWSCognitoSyncSubscribeToDatasetResponse

    Declaration

    Objective-C

    - (id)subscribeToDataset:
        (nonnull AWSCognitoSyncSubscribeToDatasetRequest *)request;

    Swift

    func subscribe(toDataset request: AWSCognitoSyncSubscribeToDatasetRequest) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the SubscribeToDataset service method.

    Return Value

    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.

  • Subscribes to receive notifications when a dataset is modified by another device.

    This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.

    See

    AWSCognitoSyncSubscribeToDatasetRequest

    See

    AWSCognitoSyncSubscribeToDatasetResponse

    Declaration

    Objective-C

    - (void)
        subscribeToDataset:
            (nonnull AWSCognitoSyncSubscribeToDatasetRequest *)request
         completionHandler:
             (void (^_Nullable)(AWSCognitoSyncSubscribeToDatasetResponse *_Nullable,
                                NSError *_Nullable))completionHandler;

    Swift

    func subscribe(toDataset request: AWSCognitoSyncSubscribeToDatasetRequest, completionHandler: ((AWSCognitoSyncSubscribeToDatasetResponse?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the SubscribeToDataset service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. 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.

  • Unsubscribes from receiving notifications when a dataset is modified by another device.

    This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.

    See

    AWSCognitoSyncUnsubscribeFromDatasetRequest

    See

    AWSCognitoSyncUnsubscribeFromDatasetResponse

    Declaration

    Objective-C

    - (id)unsubscribeFromDataset:
        (nonnull AWSCognitoSyncUnsubscribeFromDatasetRequest *)request;

    Swift

    func unsubscribe(fromDataset request: AWSCognitoSyncUnsubscribeFromDatasetRequest) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the UnsubscribeFromDataset service method.

    Return Value

    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.

  • Unsubscribes from receiving notifications when a dataset is modified by another device.

    This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.

    See

    AWSCognitoSyncUnsubscribeFromDatasetRequest

    See

    AWSCognitoSyncUnsubscribeFromDatasetResponse

    Declaration

    Objective-C

    - (void)unsubscribeFromDataset:
                (nonnull AWSCognitoSyncUnsubscribeFromDatasetRequest *)request
                 completionHandler:
                     (void (^_Nullable)(
                         AWSCognitoSyncUnsubscribeFromDatasetResponse *_Nullable,
                         NSError *_Nullable))completionHandler;

    Swift

    func unsubscribe(fromDataset request: AWSCognitoSyncUnsubscribeFromDatasetRequest, completionHandler: ((AWSCognitoSyncUnsubscribeFromDatasetResponse?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the UnsubscribeFromDataset service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. 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.

  • Posts updates to records and adds and deletes records for a dataset and user.

    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.

    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.

    This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.

    See

    AWSCognitoSyncUpdateRecordsRequest

    See

    AWSCognitoSyncUpdateRecordsResponse

    Declaration

    Objective-C

    - (id)updateRecords:(nonnull AWSCognitoSyncUpdateRecordsRequest *)request;

    Swift

    func updateRecords(_ request: AWSCognitoSyncUpdateRecordsRequest) -> Any!

    Parameters

    request

    A container for the necessary parameters to execute the UpdateRecords service method.

    Return Value

    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.

  • Posts updates to records and adds and deletes records for a dataset and user.

    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.

    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.

    This API can be called with temporary user credentials provided by Cognito Identity or with developer credentials.

    See

    AWSCognitoSyncUpdateRecordsRequest

    See

    AWSCognitoSyncUpdateRecordsResponse

    Declaration

    Objective-C

    - (void)updateRecords:(nonnull AWSCognitoSyncUpdateRecordsRequest *)request
        completionHandler:
            (void (^_Nullable)(AWSCognitoSyncUpdateRecordsResponse *_Nullable,
                               NSError *_Nullable))completionHandler;

    Swift

    func updateRecords(_ request: AWSCognitoSyncUpdateRecordsRequest, completionHandler: ((AWSCognitoSyncUpdateRecordsResponse?, Error?) -> Void)? = nil)

    Parameters

    request

    A container for the necessary parameters to execute the UpdateRecords service method.

    completionHandler

    The completion handler to call when the load request is complete. response - A response object, or nil if the request failed. 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.