amazonka-cognito-sync-1.3.2: Amazon Cognito Sync SDK.

Copyright(c) 2013-2015 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.CognitoSync

Contents

Description

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.

See: AWS API Reference

Synopsis

Service Configuration

cognitoSync :: Service Source

API version '2014-06-30' of the Amazon Cognito Sync SDK configuration.

Errors

Error matchers are designed for use with the functions provided by Control.Exception.Lens. This allows catching (and rethrowing) service specific errors returned by CognitoSync.

InvalidParameterException

_InvalidParameterException :: AsError a => Getting (First ServiceError) a ServiceError Source

Thrown when a request parameter does not comply with the associated constraints.

NotAuthorizedException

_NotAuthorizedException :: AsError a => Getting (First ServiceError) a ServiceError Source

Thrown when a user is not authorized to access the requested resource.

InternalErrorException

_InternalErrorException :: AsError a => Getting (First ServiceError) a ServiceError Source

Indicates an internal service error.

InvalidConfigurationException

_InvalidConfigurationException :: AsError a => Getting (First ServiceError) a ServiceError Source

Prism for InvalidConfigurationException' errors.

DuplicateRequestException

_DuplicateRequestException :: AsError a => Getting (First ServiceError) a ServiceError Source

An exception thrown when there is an IN_PROGRESS bulk publish operation for the given identity pool.

LambdaThrottledException

_LambdaThrottledException :: AsError a => Getting (First ServiceError) a ServiceError Source

AWS Lambda throttled your account, please contact AWS Support

AlreadyStreamedException

_AlreadyStreamedException :: AsError a => Getting (First ServiceError) a ServiceError Source

An exception thrown when a bulk publish operation is requested less than 24 hours after a previous bulk publish operation completed successfully.

InvalidLambdaFunctionOutputException

_InvalidLambdaFunctionOutputException :: AsError a => Getting (First ServiceError) a ServiceError Source

The AWS Lambda function returned invalid output or an exception.

TooManyRequestsException

_TooManyRequestsException :: AsError a => Getting (First ServiceError) a ServiceError Source

Thrown if the request is throttled.

ConcurrentModificationException

_ConcurrentModificationException :: AsError a => Getting (First ServiceError) a ServiceError Source

Thrown if there are parallel requests to modify a resource.

ResourceConflictException

_ResourceConflictException :: AsError a => Getting (First ServiceError) a ServiceError Source

Thrown if an update can't be applied because the resource was changed by another call and this would result in a conflict.

ResourceNotFoundException

_ResourceNotFoundException :: AsError a => Getting (First ServiceError) a ServiceError Source

Thrown if the resource doesn't exist.

LimitExceededException

_LimitExceededException :: AsError a => Getting (First ServiceError) a ServiceError Source

Thrown when the limit on the number of objects or operations has been exceeded.

Waiters

Waiters poll by repeatedly sending a request until some remote success condition configured by the Wait specification is fulfilled. The Wait specification determines how many attempts should be made, in addition to delay and retry strategies.

Operations

Some AWS operations return results that are incomplete and require subsequent requests in order to obtain the entire result set. The process of sending subsequent requests to continue where a previous request left off is called pagination. For example, the ListObjects operation of Amazon S3 returns up to 1000 objects at a time, and you must send subsequent requests with the appropriate Marker in order to retrieve the next page of results.

Operations that have an AWSPager instance can transparently perform subsequent requests, correctly setting Markers and other request facets to iterate through the entire result set of a truncated API operation. Operations which support this have an additional note in the documentation.

Many operations have the ability to filter results on the server side. See the individual operation parameters for details.

DescribeDataset

SetCognitoEvents

DescribeIdentityPoolUsage

GetBulkPublishDetails

ListIdentityPoolUsage

SetIdentityPoolConfiguration

DeleteDataset

GetCognitoEvents

DescribeIdentityUsage

RegisterDevice

SubscribeToDataset

GetIdentityPoolConfiguration

ListRecords

UnsubscribeFromDataset

UpdateRecords

ListDatasets

BulkPublish

Types

BulkPublishStatus

Operation

Platform

StreamingStatus

CognitoStreams

cognitoStreams :: CognitoStreams Source

Creates a value of CognitoStreams with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

csStreamingStatus :: Lens' CognitoStreams (Maybe StreamingStatus) Source

Status of the Cognito streams. Valid values are:

ENABLED - Streaming of updates to identity pool is enabled.

DISABLED - Streaming of updates to identity pool is disabled. Bulk publish will also fail if StreamingStatus is DISABLED.

csStreamName :: Lens' CognitoStreams (Maybe Text) Source

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.

csRoleARN :: Lens' CognitoStreams (Maybe Text) Source

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.

Dataset

data Dataset Source

A collection of data for an identity pool. An identity pool can have multiple datasets. A dataset is per identity and can be general or associated with a particular entity in an application (like a saved game). Datasets are automatically created if they don't exist. Data is synced by dataset, and a dataset can hold up to 1MB of key-value pairs.

See: dataset smart constructor.

dataset :: Dataset Source

Creates a value of Dataset with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

dLastModifiedDate :: Lens' Dataset (Maybe UTCTime) Source

Date when the dataset was last modified.

dNumRecords :: Lens' Dataset (Maybe Integer) Source

Number of records in this dataset.

dDataStorage :: Lens' Dataset (Maybe Integer) Source

Total size in bytes of the records in this dataset.

dDatasetName :: Lens' Dataset (Maybe Text) Source

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

dCreationDate :: Lens' Dataset (Maybe UTCTime) Source

Date on which the dataset was created.

dLastModifiedBy :: Lens' Dataset (Maybe Text) Source

The device that made the last change to this dataset.

dIdentityId :: Lens' Dataset (Maybe Text) Source

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.

IdentityPoolUsage

identityPoolUsage :: IdentityPoolUsage Source

Creates a value of IdentityPoolUsage with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

ipuLastModifiedDate :: Lens' IdentityPoolUsage (Maybe UTCTime) Source

Date on which the identity pool was last modified.

ipuIdentityPoolId :: Lens' IdentityPoolUsage (Maybe Text) Source

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.

ipuDataStorage :: Lens' IdentityPoolUsage (Maybe Integer) Source

Data storage information for the identity pool.

ipuSyncSessionsCount :: Lens' IdentityPoolUsage (Maybe Integer) Source

Number of sync sessions for the identity pool.

IdentityUsage

identityUsage :: IdentityUsage Source

Creates a value of IdentityUsage with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

iuLastModifiedDate :: Lens' IdentityUsage (Maybe UTCTime) Source

Date on which the identity was last modified.

iuIdentityPoolId :: Lens' IdentityUsage (Maybe Text) Source

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.

iuDatasetCount :: Lens' IdentityUsage (Maybe Int) Source

Number of datasets for the identity.

iuDataStorage :: Lens' IdentityUsage (Maybe Integer) Source

Total data storage for this identity.

iuIdentityId :: Lens' IdentityUsage (Maybe Text) Source

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.

PushSync

data PushSync Source

Configuration options to be applied to the identity pool.

See: pushSync smart constructor.

pushSync :: PushSync Source

Creates a value of PushSync with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

psApplicationARNs :: Lens' PushSync [Text] Source

List of SNS platform application ARNs that could be used by clients.

psRoleARN :: Lens' PushSync (Maybe Text) Source

A role configured to allow Cognito to call SNS on behalf of the developer.

Record

data Record Source

The basic data structure of a dataset.

See: record smart constructor.

record :: Record Source

Creates a value of Record with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

rSyncCount :: Lens' Record (Maybe Integer) Source

The server sync count for this record.

rDeviceLastModifiedDate :: Lens' Record (Maybe UTCTime) Source

The last modified date of the client device.

rLastModifiedDate :: Lens' Record (Maybe UTCTime) Source

The date on which the record was last modified.

rValue :: Lens' Record (Maybe Text) Source

The value for the record.

rKey :: Lens' Record (Maybe Text) Source

The key for the record.

rLastModifiedBy :: Lens' Record (Maybe Text) Source

The user/device that made the last change to this record.

RecordPatch

data RecordPatch Source

An update operation for a record.

See: recordPatch smart constructor.

recordPatch Source

Creates a value of RecordPatch with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

rpDeviceLastModifiedDate :: Lens' RecordPatch (Maybe UTCTime) Source

The last modified date of the client device.

rpValue :: Lens' RecordPatch (Maybe Text) Source

The value associated with the record patch.

rpOp :: Lens' RecordPatch Operation Source

An operation, either replace or remove.

rpKey :: Lens' RecordPatch Text Source

The key associated with the record patch.

rpSyncCount :: Lens' RecordPatch Integer Source

Last known server sync count for this record. Set to 0 if unknown.