AWS Cognito Sync (version v1.*.*)

bulk_publish#

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.

Parameters

IdentityPoolId (required)#

A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.

Type: string

delete_dataset#

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.

Parameters

DatasetName (required)#

A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash), and '.' (dot).

Type: string

IdentityId (required)#

A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.

Type: string

IdentityPoolId (required)#

A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.

Type: string

describe_dataset#

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.

Parameters

DatasetName (required)#

A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash), and '.' (dot).

Type: string

IdentityId (required)#

A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.

Type: string

IdentityPoolId (required)#

A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.

Type: string

describe_identity_pool_usage#

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.

Parameters

IdentityPoolId (required)#

A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.

Type: string

describe_identity_usage#

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.

Parameters

IdentityId (required)#

A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.

Type: string

IdentityPoolId (required)#

A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.

Type: string

get_bulk_publish_details#

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.

Parameters

IdentityPoolId (required)#

A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.

Type: string

get_cognito_events#

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.

Parameters

IdentityPoolId (required)#

The Cognito Identity Pool ID for the request

Type: string

get_identity_pool_configuration#

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.

Parameters

IdentityPoolId (required)#

A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. This is the ID of the pool for which to return a configuration.

Type: string

list_datasets#

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.

Parameters

IdentityId (required)#

A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.

Type: string

IdentityPoolId (required)#

A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.

Type: string

maxResults#

The maximum number of results to be returned.

Type: integer

nextToken#

A pagination token for obtaining the next page of results.

Type: string

list_identity_pool_usage#

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.

Parameters

maxResults#

The maximum number of results to be returned.

Type: integer

nextToken#

A pagination token for obtaining the next page of results.

Type: string

list_records#

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.

Parameters

DatasetName (required)#

A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash), and '.' (dot).

Type: string

IdentityId (required)#

A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.

Type: string

IdentityPoolId (required)#

A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.

Type: string

lastSyncCount#

The last server sync count for this record.

Type: number

maxResults#

The maximum number of results to be returned.

Type: integer

nextToken#

A pagination token for obtaining the next page of results.

Type: string

syncSessionToken#

A token containing a session ID, identity ID, and expiration.

Type: string

register_device#

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.

Parameters

IdentityId (required)#

The unique ID for this identity.

Type: string

IdentityPoolId (required)#

A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. Here, the ID of the pool that the identity belongs to.

Type: string

$body#

A request to RegisterDevice.

Type: object

{
"Platform" : "The SNS platform type (e.g. GCM, SDM, APNS, APNS_SANDBOX).",
"Token" : "The push token."
}

set_cognito_events#

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.

Parameters

IdentityPoolId (required)#

The Cognito Identity Pool to use when configuring Cognito Events

Type: string

$body#

A request to configure Cognito Events""

Type: object

{
"Events" : "The events to configure"
}

set_identity_pool_configuration#

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.

Parameters

IdentityPoolId (required)#

A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. This is the ID of the pool to modify.

Type: string

$body#

The input for the SetIdentityPoolConfiguration operation.

Type: object

{
"PushSync" : {
"ApplicationArns" : [ "string" ],
"RoleArn" : "A role configured to allow Cognito to call SNS on behalf of the developer."
},
"CognitoStreams" : {
"StreamingStatus" : "Status of the Cognito streams. Valid values are: \nENABLED - Streaming of updates to identity pool is enabled. \nDISABLED - Streaming of updates to identity pool is disabled. Bulk publish will also fail if StreamingStatus is DISABLED.",
"StreamName" : "The name of the Cognito stream to receive updates. This stream must be in the developers account and in the same region as the identity pool.",
"RoleArn" : "The ARN of the role Amazon Cognito can assume in order to publish to the stream. This role must grant access to Amazon Cognito (cognito-sync) to invoke PutRecord on your Cognito stream."
}
}

subscribe_to_dataset#

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.

Parameters

DatasetName (required)#

The name of the dataset to subcribe to.

Type: string

DeviceId (required)#

The unique ID generated for this device by Cognito.

Type: string

IdentityId (required)#

Unique ID for this identity.

Type: string

IdentityPoolId (required)#

A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. The ID of the pool to which the identity belongs.

Type: string

unsubscribe_from_dataset#

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.

Parameters

DatasetName (required)#

The name of the dataset from which to unsubcribe.

Type: string

DeviceId (required)#

The unique ID generated for this device by Cognito.

Type: string

IdentityId (required)#

Unique ID for this identity.

Type: string

IdentityPoolId (required)#

A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. The ID of the pool to which this identity belongs.

Type: string

update_records#

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.

Parameters

DatasetName (required)#

A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash), and '.' (dot).

Type: string

IdentityId (required)#

A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.

Type: string

IdentityPoolId (required)#

A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.

Type: string

$body#

A request to post updates to records or add and delete records for a dataset and user.

Type: object

{
"SyncSessionToken" : "The SyncSessionToken returned by a previous call to ListRecords for this dataset and identity.",
"RecordPatches" : [ {
"Op" : "An operation, either replace or remove.",
"DeviceLastModifiedDate" : "The last modified date of the client device.",
"Value" : "The value associated with the record patch.",
"SyncCount" : "Last known server sync count for this record. Set to 0 if unknown.",
"Key" : "The key associated with the record patch."
} ],
"DeviceId" : "The unique ID generated for this device by Cognito."
}

x-amz-Client-Context#

Intended to supply a device ID that will populate the lastModifiedBy field referenced in other methods. The ClientContext field is not yet implemented.

Type: string