use of com.amazonaws.services.cognitosync.model.DescribeDatasetRequest in project amazon-cognito-android by aws.
the class CognitoSyncStorage method getDatasetMetadata.
@Override
public DatasetMetadata getDatasetMetadata(String datasetName) throws DataStorageException {
DescribeDatasetRequest request = new DescribeDatasetRequest();
appendUserAgent(request, userAgent);
request.setIdentityPoolId(identityPoolId);
DatasetMetadata dataset = null;
try {
request.setIdentityId(getIdentityId());
request.setDatasetName(datasetName);
DescribeDatasetResult result = client.describeDataset(request);
dataset = modelToDatasetMetadata(result.getDataset());
} catch (AmazonClientException ace) {
throw handleException(ace, "Failed to get metadata of dataset: " + datasetName);
}
return dataset;
}
Aggregations