Search in sources :

Example 1 with UnsubscribeFromDatasetRequest

use of com.amazonaws.services.cognitosync.model.UnsubscribeFromDatasetRequest in project amazon-cognito-android by aws.

the class CognitoSyncStorage method unsubscribeFromDataset.

@Override
public void unsubscribeFromDataset(String datasetName, String deviceId) {
    String identityId = provider.getIdentityId();
    UnsubscribeFromDatasetRequest request = new UnsubscribeFromDatasetRequest().withIdentityPoolId(provider.getIdentityPoolId()).withIdentityId(identityId).withDatasetName(datasetName).withDeviceId(deviceId);
    try {
        client.unsubscribeFromDataset(request);
    } catch (AmazonClientException ace) {
        Log.e(TAG, "Failed to unsubscribe from dataset", ace);
        throw new UnsubscribeFailedException("Failed to unsubscribe from dataset", ace);
    }
}
Also used : UnsubscribeFromDatasetRequest(com.amazonaws.services.cognitosync.model.UnsubscribeFromDatasetRequest) UnsubscribeFailedException(com.amazonaws.mobileconnectors.cognito.exceptions.UnsubscribeFailedException) AmazonClientException(com.amazonaws.AmazonClientException)

Aggregations

AmazonClientException (com.amazonaws.AmazonClientException)1 UnsubscribeFailedException (com.amazonaws.mobileconnectors.cognito.exceptions.UnsubscribeFailedException)1 UnsubscribeFromDatasetRequest (com.amazonaws.services.cognitosync.model.UnsubscribeFromDatasetRequest)1