Class AmazonCognitoSyncAsyncClient
- java.lang.Object
-
- com.amazonaws.AmazonWebServiceClient
-
- com.amazonaws.services.cognitosync.AmazonCognitoSyncClient
-
- com.amazonaws.services.cognitosync.AmazonCognitoSyncAsyncClient
-
- All Implemented Interfaces:
AmazonCognitoSync
,AmazonCognitoSyncAsync
@ThreadSafe public class AmazonCognitoSyncAsyncClient extends AmazonCognitoSyncClient implements AmazonCognitoSyncAsync
Interface for accessing Amazon Cognito Sync asynchronously. Each asynchronous method will return a Java Future object representing the asynchronous operation; overloads which accept anAsyncHandler
can be used to receive notification when an asynchronous operation completes.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.
-
-
Field Summary
-
Fields inherited from class com.amazonaws.services.cognitosync.AmazonCognitoSyncClient
configFactory
-
Fields inherited from class com.amazonaws.AmazonWebServiceClient
client, clientConfiguration, endpoint, LOGGING_AWS_REQUEST_METRIC, requestHandler2s, timeOffset
-
-
Constructor Summary
Constructors Constructor Description AmazonCognitoSyncAsyncClient()
Constructs a new asynchronous client to invoke service methods on Amazon Cognito Sync.AmazonCognitoSyncAsyncClient(AWSCredentials awsCredentials)
Constructs a new asynchronous client to invoke service methods on Amazon Cognito Sync using the specified AWS account credentials.AmazonCognitoSyncAsyncClient(AWSCredentialsProvider awsCredentialsProvider)
Constructs a new asynchronous client to invoke service methods on Amazon Cognito Sync using the specified AWS account credentials provider.AmazonCognitoSyncAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration)
Constructs a new asynchronous client to invoke service methods on Amazon Cognito Sync using the provided AWS account credentials provider and client configuration options.AmazonCognitoSyncAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on Amazon Cognito Sync using the specified AWS account credentials provider, executor service, and client configuration options.AmazonCognitoSyncAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on Amazon Cognito Sync using the specified AWS account credentials provider and executor service.AmazonCognitoSyncAsyncClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on Amazon Cognito Sync using the specified AWS account credentials, executor service, and client configuration options.AmazonCognitoSyncAsyncClient(AWSCredentials awsCredentials, ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on Amazon Cognito Sync using the specified AWS account credentials and executor service.AmazonCognitoSyncAsyncClient(ClientConfiguration clientConfiguration)
Constructs a new asynchronous client to invoke service methods on Amazon Cognito Sync.
-
Method Summary
-
Methods inherited from class com.amazonaws.services.cognitosync.AmazonCognitoSyncClient
bulkPublish, deleteDataset, describeDataset, describeIdentityPoolUsage, describeIdentityUsage, getBulkPublishDetails, getCachedResponseMetadata, getCognitoEvents, getIdentityPoolConfiguration, listDatasets, listIdentityPoolUsage, listRecords, registerDevice, setCognitoEvents, setIdentityPoolConfiguration, subscribeToDataset, unsubscribeFromDataset, updateRecords
-
Methods inherited from class com.amazonaws.AmazonWebServiceClient
addRequestHandler, addRequestHandler, beforeMarshalling, configureRegion, createExecutionContext, createExecutionContext, createExecutionContext, endClientExecution, endClientExecution, findRequestMetricCollector, getEndpointPrefix, getRequestMetricsCollector, getServiceAbbreviation, getServiceName, getServiceNameIntern, getSigner, getSignerByURI, getSignerRegionOverride, getTimeOffset, isProfilingEnabled, isRequestMetricsEnabled, removeRequestHandler, removeRequestHandler, requestMetricCollector, setEndpoint, setEndpointPrefix, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, withEndpoint, withRegion, withRegion, withTimeOffset
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.amazonaws.services.cognitosync.AmazonCognitoSync
bulkPublish, deleteDataset, describeDataset, describeIdentityPoolUsage, describeIdentityUsage, getBulkPublishDetails, getCachedResponseMetadata, getCognitoEvents, getIdentityPoolConfiguration, listDatasets, listIdentityPoolUsage, listRecords, registerDevice, setCognitoEvents, setEndpoint, setIdentityPoolConfiguration, setRegion, subscribeToDataset, unsubscribeFromDataset, updateRecords
-
-
-
-
Constructor Detail
-
AmazonCognitoSyncAsyncClient
public AmazonCognitoSyncAsyncClient()
Constructs a new asynchronous client to invoke service methods on Amazon Cognito Sync. A credentials provider chain will be used that searches for credentials in this order:- Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
- Java System Properties - aws.accessKeyId and aws.secretKey
- Credential profiles file at the default location (~/.aws/credentials) shared by all AWS SDKs and the AWS CLI
- Instance profile credentials delivered through the Amazon EC2 metadata service
Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default maximum number of concurrent connections to the service).
-
AmazonCognitoSyncAsyncClient
public AmazonCognitoSyncAsyncClient(ClientConfiguration clientConfiguration)
Constructs a new asynchronous client to invoke service methods on Amazon Cognito Sync. A credentials provider chain will be used that searches for credentials in this order:- Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
- Java System Properties - aws.accessKeyId and aws.secretKey
- Credential profiles file at the default location (~/.aws/credentials) shared by all AWS SDKs and the AWS CLI
- Instance profile credentials delivered through the Amazon EC2 metadata service
Asynchronous methods are delegated to a fixed-size thread pool containing a number of threads equal to the maximum number of concurrent connections configured via
ClientConfiguration.getMaxConnections()
.- Parameters:
clientConfiguration
- The client configuration options controlling how this client connects to Amazon Cognito Sync (ex: proxy settings, retry counts, etc).- See Also:
DefaultAWSCredentialsProviderChain
,Executors.newFixedThreadPool(int)
-
AmazonCognitoSyncAsyncClient
public AmazonCognitoSyncAsyncClient(AWSCredentials awsCredentials)
Constructs a new asynchronous client to invoke service methods on Amazon Cognito Sync using the specified AWS account credentials.Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default maximum number of concurrent connections to the service).
- Parameters:
awsCredentials
- The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.- See Also:
Executors.newFixedThreadPool(int)
-
AmazonCognitoSyncAsyncClient
public AmazonCognitoSyncAsyncClient(AWSCredentials awsCredentials, ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on Amazon Cognito Sync using the specified AWS account credentials and executor service. Default client settings will be used.- Parameters:
awsCredentials
- The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.executorService
- The executor service by which all asynchronous requests will be executed.
-
AmazonCognitoSyncAsyncClient
public AmazonCognitoSyncAsyncClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration, ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on Amazon Cognito Sync using the specified AWS account credentials, executor service, and client configuration options.- Parameters:
awsCredentials
- The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.clientConfiguration
- Client configuration options (ex: max retry limit, proxy settings, etc).executorService
- The executor service by which all asynchronous requests will be executed.
-
AmazonCognitoSyncAsyncClient
public AmazonCognitoSyncAsyncClient(AWSCredentialsProvider awsCredentialsProvider)
Constructs a new asynchronous client to invoke service methods on Amazon Cognito Sync using the specified AWS account credentials provider. Default client settings will be used.Asynchronous methods are delegated to a fixed-size thread pool containing 50 threads (to match the default maximum number of concurrent connections to the service).
- Parameters:
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to authenticate requests with AWS services.- See Also:
Executors.newFixedThreadPool(int)
-
AmazonCognitoSyncAsyncClient
public AmazonCognitoSyncAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration)
Constructs a new asynchronous client to invoke service methods on Amazon Cognito Sync using the provided AWS account credentials provider and client configuration options.Asynchronous methods are delegated to a fixed-size thread pool containing a number of threads equal to the maximum number of concurrent connections configured via
ClientConfiguration.getMaxConnections()
.- Parameters:
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to authenticate requests with AWS services.clientConfiguration
- Client configuration options (ex: max retry limit, proxy settings, etc).- See Also:
DefaultAWSCredentialsProviderChain
,Executors.newFixedThreadPool(int)
-
AmazonCognitoSyncAsyncClient
public AmazonCognitoSyncAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on Amazon Cognito Sync using the specified AWS account credentials provider and executor service. Default client settings will be used.- Parameters:
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to authenticate requests with AWS services.executorService
- The executor service by which all asynchronous requests will be executed.
-
AmazonCognitoSyncAsyncClient
public AmazonCognitoSyncAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, ExecutorService executorService)
Constructs a new asynchronous client to invoke service methods on Amazon Cognito Sync using the specified AWS account credentials provider, executor service, and client configuration options.- Parameters:
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to authenticate requests with AWS services.clientConfiguration
- Client configuration options (ex: max retry limit, proxy settings, etc).executorService
- The executor service by which all asynchronous requests will be executed.
-
-
Method Detail
-
getExecutorService
public ExecutorService getExecutorService()
Returns the executor service used by this client to execute async requests.- Returns:
- The executor service used by this client to execute async requests.
-
bulkPublishAsync
public Future<BulkPublishResult> bulkPublishAsync(BulkPublishRequest request)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
bulkPublishAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- The input for the BulkPublish operation.- Returns:
- A Java Future containing the result of the BulkPublish operation returned by the service.
-
bulkPublishAsync
public Future<BulkPublishResult> bulkPublishAsync(BulkPublishRequest request, AsyncHandler<BulkPublishRequest,BulkPublishResult> asyncHandler)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
bulkPublishAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- The input for the BulkPublish operation.asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the BulkPublish operation returned by the service.
-
deleteDatasetAsync
public Future<DeleteDatasetResult> deleteDatasetAsync(DeleteDatasetRequest request)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
deleteDatasetAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- A request to delete the specific dataset.- Returns:
- A Java Future containing the result of the DeleteDataset operation returned by the service.
-
deleteDatasetAsync
public Future<DeleteDatasetResult> deleteDatasetAsync(DeleteDatasetRequest request, AsyncHandler<DeleteDatasetRequest,DeleteDatasetResult> asyncHandler)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
deleteDatasetAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- A request to delete the specific dataset.asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the DeleteDataset operation returned by the service.
-
describeDatasetAsync
public Future<DescribeDatasetResult> describeDatasetAsync(DescribeDatasetRequest request)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
describeDatasetAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- A request for meta data about a dataset (creation date, number of records, size) by owner and dataset name.- Returns:
- A Java Future containing the result of the DescribeDataset operation returned by the service.
-
describeDatasetAsync
public Future<DescribeDatasetResult> describeDatasetAsync(DescribeDatasetRequest request, AsyncHandler<DescribeDatasetRequest,DescribeDatasetResult> asyncHandler)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
describeDatasetAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- A request for meta data about a dataset (creation date, number of records, size) by owner and dataset name.asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the DescribeDataset operation returned by the service.
-
describeIdentityPoolUsageAsync
public Future<DescribeIdentityPoolUsageResult> describeIdentityPoolUsageAsync(DescribeIdentityPoolUsageRequest request)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
describeIdentityPoolUsageAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- A request for usage information about the identity pool.- Returns:
- A Java Future containing the result of the DescribeIdentityPoolUsage operation returned by the service.
-
describeIdentityPoolUsageAsync
public Future<DescribeIdentityPoolUsageResult> describeIdentityPoolUsageAsync(DescribeIdentityPoolUsageRequest request, AsyncHandler<DescribeIdentityPoolUsageRequest,DescribeIdentityPoolUsageResult> asyncHandler)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
describeIdentityPoolUsageAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- A request for usage information about the identity pool.asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the DescribeIdentityPoolUsage operation returned by the service.
-
describeIdentityUsageAsync
public Future<DescribeIdentityUsageResult> describeIdentityUsageAsync(DescribeIdentityUsageRequest request)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
describeIdentityUsageAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- A request for information about the usage of an identity pool.- Returns:
- A Java Future containing the result of the DescribeIdentityUsage operation returned by the service.
-
describeIdentityUsageAsync
public Future<DescribeIdentityUsageResult> describeIdentityUsageAsync(DescribeIdentityUsageRequest request, AsyncHandler<DescribeIdentityUsageRequest,DescribeIdentityUsageResult> asyncHandler)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
describeIdentityUsageAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- A request for information about the usage of an identity pool.asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the DescribeIdentityUsage operation returned by the service.
-
getBulkPublishDetailsAsync
public Future<GetBulkPublishDetailsResult> getBulkPublishDetailsAsync(GetBulkPublishDetailsRequest request)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
getBulkPublishDetailsAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- The input for the GetBulkPublishDetails operation.- Returns:
- A Java Future containing the result of the GetBulkPublishDetails operation returned by the service.
-
getBulkPublishDetailsAsync
public Future<GetBulkPublishDetailsResult> getBulkPublishDetailsAsync(GetBulkPublishDetailsRequest request, AsyncHandler<GetBulkPublishDetailsRequest,GetBulkPublishDetailsResult> asyncHandler)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
getBulkPublishDetailsAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- The input for the GetBulkPublishDetails operation.asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the GetBulkPublishDetails operation returned by the service.
-
getCognitoEventsAsync
public Future<GetCognitoEventsResult> getCognitoEventsAsync(GetCognitoEventsRequest request)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
getCognitoEventsAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- A request for a list of the configured Cognito Events- Returns:
- A Java Future containing the result of the GetCognitoEvents operation returned by the service.
-
getCognitoEventsAsync
public Future<GetCognitoEventsResult> getCognitoEventsAsync(GetCognitoEventsRequest request, AsyncHandler<GetCognitoEventsRequest,GetCognitoEventsResult> asyncHandler)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
getCognitoEventsAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- A request for a list of the configured Cognito EventsasyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the GetCognitoEvents operation returned by the service.
-
getIdentityPoolConfigurationAsync
public Future<GetIdentityPoolConfigurationResult> getIdentityPoolConfigurationAsync(GetIdentityPoolConfigurationRequest request)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
getIdentityPoolConfigurationAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- The input for the GetIdentityPoolConfiguration operation.- Returns:
- A Java Future containing the result of the GetIdentityPoolConfiguration operation returned by the service.
-
getIdentityPoolConfigurationAsync
public Future<GetIdentityPoolConfigurationResult> getIdentityPoolConfigurationAsync(GetIdentityPoolConfigurationRequest request, AsyncHandler<GetIdentityPoolConfigurationRequest,GetIdentityPoolConfigurationResult> asyncHandler)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
getIdentityPoolConfigurationAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- The input for the GetIdentityPoolConfiguration operation.asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the GetIdentityPoolConfiguration operation returned by the service.
-
listDatasetsAsync
public Future<ListDatasetsResult> listDatasetsAsync(ListDatasetsRequest request)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
listDatasetsAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- Request for a list of datasets for an identity.- Returns:
- A Java Future containing the result of the ListDatasets operation returned by the service.
-
listDatasetsAsync
public Future<ListDatasetsResult> listDatasetsAsync(ListDatasetsRequest request, AsyncHandler<ListDatasetsRequest,ListDatasetsResult> asyncHandler)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
listDatasetsAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- Request for a list of datasets for an identity.asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the ListDatasets operation returned by the service.
-
listIdentityPoolUsageAsync
public Future<ListIdentityPoolUsageResult> listIdentityPoolUsageAsync(ListIdentityPoolUsageRequest request)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
listIdentityPoolUsageAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- A request for usage information on an identity pool.- Returns:
- A Java Future containing the result of the ListIdentityPoolUsage operation returned by the service.
-
listIdentityPoolUsageAsync
public Future<ListIdentityPoolUsageResult> listIdentityPoolUsageAsync(ListIdentityPoolUsageRequest request, AsyncHandler<ListIdentityPoolUsageRequest,ListIdentityPoolUsageResult> asyncHandler)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
listIdentityPoolUsageAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- A request for usage information on an identity pool.asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the ListIdentityPoolUsage operation returned by the service.
-
listRecordsAsync
public Future<ListRecordsResult> listRecordsAsync(ListRecordsRequest request)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
listRecordsAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- A request for a list of records.- Returns:
- A Java Future containing the result of the ListRecords operation returned by the service.
-
listRecordsAsync
public Future<ListRecordsResult> listRecordsAsync(ListRecordsRequest request, AsyncHandler<ListRecordsRequest,ListRecordsResult> asyncHandler)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
listRecordsAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- A request for a list of records.asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the ListRecords operation returned by the service.
-
registerDeviceAsync
public Future<RegisterDeviceResult> registerDeviceAsync(RegisterDeviceRequest request)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
registerDeviceAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- A request to RegisterDevice.- Returns:
- A Java Future containing the result of the RegisterDevice operation returned by the service.
-
registerDeviceAsync
public Future<RegisterDeviceResult> registerDeviceAsync(RegisterDeviceRequest request, AsyncHandler<RegisterDeviceRequest,RegisterDeviceResult> asyncHandler)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
registerDeviceAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- A request to RegisterDevice.asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the RegisterDevice operation returned by the service.
-
setCognitoEventsAsync
public Future<SetCognitoEventsResult> setCognitoEventsAsync(SetCognitoEventsRequest request)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
setCognitoEventsAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- A request to configure Cognito Events"- Returns:
- A Java Future containing the result of the SetCognitoEvents operation returned by the service.
-
setCognitoEventsAsync
public Future<SetCognitoEventsResult> setCognitoEventsAsync(SetCognitoEventsRequest request, AsyncHandler<SetCognitoEventsRequest,SetCognitoEventsResult> asyncHandler)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
setCognitoEventsAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- A request to configure Cognito Events"asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the SetCognitoEvents operation returned by the service.
-
setIdentityPoolConfigurationAsync
public Future<SetIdentityPoolConfigurationResult> setIdentityPoolConfigurationAsync(SetIdentityPoolConfigurationRequest request)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
setIdentityPoolConfigurationAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- The input for the SetIdentityPoolConfiguration operation.- Returns:
- A Java Future containing the result of the SetIdentityPoolConfiguration operation returned by the service.
-
setIdentityPoolConfigurationAsync
public Future<SetIdentityPoolConfigurationResult> setIdentityPoolConfigurationAsync(SetIdentityPoolConfigurationRequest request, AsyncHandler<SetIdentityPoolConfigurationRequest,SetIdentityPoolConfigurationResult> asyncHandler)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
setIdentityPoolConfigurationAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- The input for the SetIdentityPoolConfiguration operation.asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the SetIdentityPoolConfiguration operation returned by the service.
-
subscribeToDatasetAsync
public Future<SubscribeToDatasetResult> subscribeToDatasetAsync(SubscribeToDatasetRequest request)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
subscribeToDatasetAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- A request to SubscribeToDatasetRequest.- Returns:
- A Java Future containing the result of the SubscribeToDataset operation returned by the service.
-
subscribeToDatasetAsync
public Future<SubscribeToDatasetResult> subscribeToDatasetAsync(SubscribeToDatasetRequest request, AsyncHandler<SubscribeToDatasetRequest,SubscribeToDatasetResult> asyncHandler)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
subscribeToDatasetAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- A request to SubscribeToDatasetRequest.asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the SubscribeToDataset operation returned by the service.
-
unsubscribeFromDatasetAsync
public Future<UnsubscribeFromDatasetResult> unsubscribeFromDatasetAsync(UnsubscribeFromDatasetRequest request)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
unsubscribeFromDatasetAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- A request to UnsubscribeFromDataset.- Returns:
- A Java Future containing the result of the UnsubscribeFromDataset operation returned by the service.
-
unsubscribeFromDatasetAsync
public Future<UnsubscribeFromDatasetResult> unsubscribeFromDatasetAsync(UnsubscribeFromDatasetRequest request, AsyncHandler<UnsubscribeFromDatasetRequest,UnsubscribeFromDatasetResult> asyncHandler)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
unsubscribeFromDatasetAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- A request to UnsubscribeFromDataset.asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the UnsubscribeFromDataset operation returned by the service.
-
updateRecordsAsync
public Future<UpdateRecordsResult> updateRecordsAsync(UpdateRecordsRequest request)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
updateRecordsAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- A request to post updates to records or add and delete records for a dataset and user.- Returns:
- A Java Future containing the result of the UpdateRecords operation returned by the service.
-
updateRecordsAsync
public Future<UpdateRecordsResult> updateRecordsAsync(UpdateRecordsRequest request, AsyncHandler<UpdateRecordsRequest,UpdateRecordsResult> asyncHandler)
Description copied from interface:AmazonCognitoSyncAsync
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.
- Specified by:
updateRecordsAsync
in interfaceAmazonCognitoSyncAsync
- Parameters:
request
- A request to post updates to records or add and delete records for a dataset and user.asyncHandler
- Asynchronous callback handler for events in the lifecycle of the request. Users can provide an implementation of the callback methods in this interface to receive notification of successful or unsuccessful completion of the operation.- Returns:
- A Java Future containing the result of the UpdateRecords operation returned by the service.
-
shutdown
public void shutdown()
Shuts down the client, releasing all managed resources. This includes forcibly terminating all pending asynchronous service calls. Clients who wish to give pending asynchronous service calls time to complete should callgetExecutorService().shutdown()
followed bygetExecutorService().awaitTermination()
prior to calling this method.- Specified by:
shutdown
in interfaceAmazonCognitoSync
- Overrides:
shutdown
in classAmazonWebServiceClient
-
-