In the previous section, you added items to the domain. This section provides examples of how to list all items within the domain.
The following sample code snippets demonstrate listing all items within a domain.
To run the sample
Open a clean copy of QuerySample.java.
Remove any comment marks from the invokeQuery(service, request); line and add the following line
after // @TODO: set request parameters here:
request.withDomainName("MyStore");Compile and run the sample.
Amazon SimpleDB returns all items within the domain.
To run the sample
Open AmazonSimpleDBSamples.cs.
Comment out the code you added in the previous section.
Replace the Query Action section with the following:
Query queryAction = new Query().WithDomainName("MyStore");
QuerySample.InvokeQuery(service, queryAction);
Run the sample.
Amazon SimpleDB returns all items within the domain.
To run the sample
Open a clean copy of QuerySample.pl.
Remove any comment marks from the invokeQuery($service, $request); line and add the following lines
after the // @TODO: set request line:
my $request = Amazon::SimpleDB::Model::Query->new({
DomainName=> "MyStore"
});
Run the sample.
Amazon SimpleDB returns all items within the domain.
To run the sample
Open a clean copy of QuerySample.php.
Remove any comment marks from the invokeQuery($service, $request); line and add the following lines
after the // @TODO: set request line:
$request = new Amazon_SimpleDB_Model_Query();
$request->setDomainName('MyStore');
Run the sample.
Amazon SimpleDB returns all items within the domain.
To run the sample
Open AmazonSimpleDBSamples.vb.
Comment out the code you added in the previous section.
Replace the Query Action section with the following:
Dim listAllItemsAction As New Query()
listAllItemsAction.WithDomainName("MyStore")
QuerySample.InvokeQuery(service, listAllItemsAction)
Run the sample.
Amazon SimpleDB returns all items within the domain.
To run the sample
Open the scratchpad application with a web browser.
Select Query from the Explore API list box.
Enter MyStore in the Domain Name field.
Leave the Query Expression field blank.
To limit the number of items returned, enter a value in the Max Number Of Items field.
If there are more items than you specified in the Max Number Of Items field, Amazon SimpleDB returns a next token.
If you need to view the next page of results, enter the next token in the Next Token field.
![]() | Note |
|---|---|
To get the next page of results, you only need to specify the domain name and the next token. |
Select from the following:
To invoke the request, click Invoke Request.
Amazon SimpleDB returns all items within the domain.
To view the signed URL, click Display Signed URL. Then, copy and paste the signed URL into a browser.
Amazon SimpleDB returns all items within the domain.
To view the string to sign, click Display String to Sign.