In the previous section, you created a domain. This section provides examples of how to list all domains within your account.
The following sample code snippets demonstrate listing domains.
To run the sample
Open a clean copy of ListDomainsSample.java.
Remove any comment marks from the invokeListDomains(service, request); line.
Compile and run the sample.
Amazon SimpleDB returns the list of domains within the account, including the newly created MyStore domain.
To run the sample
Open AmazonSimpleDBSamples.cs.
Comment out the code you added in the previous section.
Replace the List Domains Action section with the following:
ListDomains ListDomainsAction = new ListDomains(); ListDomainsSample.InvokeListDomains(service, ListDomainsAction);
Run the sample.
Amazon SimpleDB returns the list of domains within the account, including the newly created MyStore domain.
To run the sample
Open a clean copy of ListDomainsSample.pl.
Remove any comment marks from the invokeCreateDomain($service, $request);line and
add the following line after the @TODO: set request line:
my $request = Amazon::SimpleDB::Model::ListDomains->new();
Run the sample.
Amazon SimpleDB returns the list of domains within the account, including the newly created MyStore domain.
To run the sample
Open a clean copy of ListDomainsSample.php.
Remove any comment marks from the invokeListDomains($service, $request); line and add the following line after the @TODO: set request line:
$request = new Amazon_SimpleDB_Model_ListDomains();
Run the sample.
Amazon SimpleDB returns the list of domains within the account, including the newly created MyStore domain.
To run the sample
Open AmazonSimpleDBSamples.vb.
Comment out the code you added in the previous section.
Replace the List Domains Action section with the following:
Dim listDomainsAction As New ListDomains() ListDomainsSample.InvokeListDomains(service, listDomainsAction)
Run the sample.
Amazon SimpleDB returns the list of domains within the account, including the newly created MyStore domain.
To run the sample
Open the scratchpad application with a web browser.
Select ListDomains from the Explore API list box.
To limit the number of domains returned, enter a value in the Max Number Of Domains field.
If there are more domains than you specified in the Max Number Of Domains field, Amazon SimpleDB returns a next token.
To view the next page of results, enter the next token in the Next Token field.
Select from the following:
To invoke the request, click Invoke Request.
Amazon SimpleDB returns the list of domains within the account, including the newly created MyStore domain.
To view the signed URL, click Display Signed URL. Then, copy and paste the signed URL into a browser.
To view the string to sign, click Display String to Sign.