AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.


Class CognitoSyncManager

; The Cognito Sync Manager allows your application to store data in the cloud for your users and synchronize across other devices. The library uses the sqlite for local storage API and defaults to inmemory where sqlite is not available to create a local cache for the data, similar to our SDK. This allows your application to access stored data even when there is no connectivity.

CognitoAWSCredentials credentials = new CognitoAWSCredentials("identityPoolId","RegionEndpoint")
//using default region from your app.config or awsconfig.xml
CognitoSyncManager cognitoSyncManager = new CognitoSyncManager(credentials);
// creating a dataset
Dataset playerInfo = cognitoSyncManager.OpenOrCreateDataset("playerInfo");
// add some values into your dataset
playerInfo.Put("high_score", "90");
playerInfo.Put("name", "John");
// push changes to remote if needed
Note: Some platforms may only expose async methods such as SynchronizeAsync().

Class DataConflictException

This exception is thrown when an update fails due to conflicting states

Class DataLimitExceededException

This exception is thrown when the dataset operation exceeds certain limit, e.g. maximum of 20 datasets per identity, 1024 records per dataset, and 1mb in size per dataset, etc.

Class Dataset

Dataset is the container of Amazon.CognitoSync.SyncManager.Records. It can have up to 1k Amazon.CognitoSync.SyncManager.Record or 1 MB in size. A typical use of Dataset is the following.

//open or create dataset
Dataset dataset = cognitoSyncManger.OpenOrCreateDataset("new dataset");
// synchronize. It pulls down latest changes from remote storage
// and push local changes to remote storage
// reads value
String highScore = dataset.Get("high_score");
String name = dataset.Get("name");
// sets value
dataset.Put("high_score", "90");
dataset.Put("name", "John");
// push changes to remote if needed

Class Dataset.DatasetDeletedDelegate

Delegate which is invoked when a data set is deleted

Class Dataset.DatasetMergedDelegate

Delegate which is invoked when a dataset is merged due to an identity merge

Class Dataset.SyncConflictDelegate

Delegate which is invoked when a sync conflict occurs

Class DatasetMetadata

Metadata information representing a dataset

Class DatasetNotFoundException

This exception is thrown when the dataset that is attempted to access does not exist.

Class DatasetUpdates

A model class which stores a list of updated dataset.

Class DataStorageException

This exception is thrown when an error occurs during an data storage operation.

Class NetworkException

This exception is thrown when a service request failed due to network connectivity problem.

Class Record

A Record is the element stored in a Amazon.CognitoSync.SyncManager.Dataset. There can be up to 1k records or up to 1 MB in size in a Amazon.CognitoSync.SyncManager.Dataset.

Class SQLiteCognitoAWSCredentials

The SQLiteCognitoAWSCredentials extends from Amazon.CognitoIdentity.CognitoAWSCredentials and adds support for caching of identity id using SQLite

Class SyncConflict

A model which stores conflicting record from the remote storage and the local storage.

Class SyncFailureEventArgs

A sync failure event

Class SyncManagerException

This exception is thrown when an error occurs during an data storage operation.

Class SyncSuccessEventArgs

A sync success event


Interface ILocalStorage

A local storage like a sqlite database on which we can invoke actions like creating a dataset, or record