//1. Creating a SimpleDB Client
AWSCredentials credentials = new BasicAWSCredentials( ACCESS_KEY, SECRET_KEY );
AmazonSimpleDBClient sdbClient = new AmazonSimpleDBClient( credentials);
sdbClient.setEndpoint("sdb.us-west-1.amazonaws.com"); // to define Data Center Region
//2. Select
String nextToken = null;
SelectRequest selectRequest = new SelectRequest( "select * from myDomain" ).withConsistentRead( true );
selectRequest.setNextToken( nextToken );
SelectResult response = sdbClient.select( selectRequest );
nextToken = response.getNextToken();
没有评论:
发表评论