CognitoSync class

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.

Constructors

CognitoSync({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

bulkPublish({required String identityPoolId}) Future<BulkPublishResponse>
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.
close() → void
Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
deleteDataset({required String datasetName, required String identityId, required String identityPoolId}) Future<DeleteDatasetResponse>
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.
describeDataset({required String datasetName, required String identityId, required String identityPoolId}) Future<DescribeDatasetResponse>
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.
describeIdentityPoolUsage({required String identityPoolId}) Future<DescribeIdentityPoolUsageResponse>
Gets usage details (for example, data storage) about a particular identity pool.
describeIdentityUsage({required String identityId, required String identityPoolId}) Future<DescribeIdentityUsageResponse>
Gets usage information for an identity, including number of datasets and data usage.
getBulkPublishDetails({required String identityPoolId}) Future<GetBulkPublishDetailsResponse>
Get the status of the last BulkPublish operation for an identity pool.
getCognitoEvents({required String identityPoolId}) Future<GetCognitoEventsResponse>
Gets the events and the corresponding Lambda functions associated with an identity pool.
getIdentityPoolConfiguration({required String identityPoolId}) Future<GetIdentityPoolConfigurationResponse>
Gets the configuration settings of an identity pool.
listDatasets({required String identityId, required String identityPoolId, int? maxResults, String? nextToken}) Future<ListDatasetsResponse>
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.
listIdentityPoolUsage({int? maxResults, String? nextToken}) Future<ListIdentityPoolUsageResponse>
Gets a list of identity pools registered with Cognito.
listRecords({required String datasetName, required String identityId, required String identityPoolId, int? lastSyncCount, int? maxResults, String? nextToken, String? syncSessionToken}) Future<ListRecordsResponse>
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.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerDevice({required String identityId, required String identityPoolId, required Platform platform, required String token}) Future<RegisterDeviceResponse>
Registers a device to receive push sync notifications.
setCognitoEvents({required Map<String, String> events, required String identityPoolId}) Future<void>
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.
setIdentityPoolConfiguration({required String identityPoolId, CognitoStreams? cognitoStreams, PushSync? pushSync}) Future<SetIdentityPoolConfigurationResponse>
Sets the necessary configuration for push sync.
subscribeToDataset({required String datasetName, required String deviceId, required String identityId, required String identityPoolId}) Future<void>
Subscribes to receive notifications when a dataset is modified by another device.
toString() String
A string representation of this object.
inherited
unsubscribeFromDataset({required String datasetName, required String deviceId, required String identityId, required String identityPoolId}) Future<void>
Unsubscribes from receiving notifications when a dataset is modified by another device.
updateRecords({required String datasetName, required String identityId, required String identityPoolId, required String syncSessionToken, String? clientContext, String? deviceId, List<RecordPatch>? recordPatches}) Future<UpdateRecordsResponse>
Posts updates to records and adds and deletes records for a dataset and user.

Operators

operator ==(Object other) bool
The equality operator.
inherited