Cognito Sync

boto.cognito.sync

boto.cognito.sync.connect_to_region(region_name, **kw_params)
boto.cognito.sync.regions()

Get all available regions for the Amazon Cognito Sync service.

Return type:list
Returns:A list of boto.regioninfo.RegionInfo

boto.cognito.sync.layer1

class boto.cognito.sync.layer1.CognitoSyncConnection(**kwargs)

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.

APIVersion = '2014-06-30'
DefaultRegionEndpoint = 'cognito-sync.us-east-1.amazonaws.com'
DefaultRegionName = 'us-east-1'
ResponseError

alias of JSONResponseError

delete_dataset(identity_pool_id, identity_id, dataset_name)

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 consequent operation on this dataset will result in a ResourceNotFoundException.

Parameters:
  • identity_pool_id (string) – 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.
  • identity_id (string) – 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.
  • dataset_name (string) – A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, ‘_’ (underscore), ‘-‘ (dash), and ‘.’ (dot).
describe_dataset(identity_pool_id, identity_id, dataset_name)

Gets metadata about a dataset by identity and dataset name.

Parameters:
  • identity_pool_id (string) – 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.
  • identity_id (string) – 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.
  • dataset_name (string) – A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, ‘_’ (underscore), ‘-‘ (dash), and ‘.’ (dot).
describe_identity_pool_usage(identity_pool_id)

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

Parameters:identity_pool_id (string) – 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.
describe_identity_usage(identity_pool_id, identity_id)

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

Parameters:
  • identity_pool_id (string) – 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.
  • identity_id (string) – 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.
list_datasets(identity_pool_id, identity_id, next_token=None, max_results=None)

Lists datasets for an identity.

Parameters:
  • identity_pool_id (string) – 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.
  • identity_id (string) – 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.
  • next_token (string) – A pagination token for obtaining the next page of results.
  • max_results (integer) – The maximum number of results to be returned.
list_identity_pool_usage(next_token=None, max_results=None)

Gets a list of identity pools registered with Cognito.

Parameters:
  • next_token (string) – A pagination token for obtaining the next page of results.
  • max_results (integer) – The maximum number of results to be returned.
list_records(identity_pool_id, identity_id, dataset_name, last_sync_count=None, next_token=None, max_results=None, sync_session_token=None)

Gets paginated records, optionally changed after a particular sync count for a dataset and identity.

Parameters:
  • identity_pool_id (string) – 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.
  • identity_id (string) – 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.
  • dataset_name (string) – A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, ‘_’ (underscore), ‘-‘ (dash), and ‘.’ (dot).
  • last_sync_count (long) – The last server sync count for this record.
  • next_token (string) – A pagination token for obtaining the next page of results.
  • max_results (integer) – The maximum number of results to be returned.
  • sync_session_token (string) – A token containing a session ID, identity ID, and expiration.
make_request(verb, resource, headers=None, data='', expected_status=None, params=None)
update_records(identity_pool_id, identity_id, dataset_name, sync_session_token, record_patches=None, client_context=None)

Posts updates to records and add and delete records for a dataset and user.

Parameters:
  • identity_pool_id (string) – 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.
  • identity_id (string) – 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.
  • dataset_name (string) – A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, ‘_’ (underscore), ‘-‘ (dash), and ‘.’ (dot).
  • record_patches (list) –
  • sync_session_token (string) – The SyncSessionToken returned by a previous call to ListRecords for this dataset and identity.
  • client_context (string) –

boto.cognito.sync.exceptions

exception boto.cognito.sync.exceptions.InternalErrorException(status, reason, body=None, *args)
exception boto.cognito.sync.exceptions.InvalidParameterException(status, reason, body=None, *args)
exception boto.cognito.sync.exceptions.LimitExceededException(status, reason, body=None, *args)
exception boto.cognito.sync.exceptions.NotAuthorizedException(status, reason, body=None, *args)
exception boto.cognito.sync.exceptions.ResourceConflictException(status, reason, body=None, *args)
exception boto.cognito.sync.exceptions.ResourceNotFoundException(status, reason, body=None, *args)
exception boto.cognito.sync.exceptions.TooManyRequestsException(status, reason, body=None, *args)

Table Of Contents

Previous topic

Cognito Identity

Next topic

contrib

This Page

PDF Version