This section provides examples of how to delete a domain.
The following sample code snippets demonstrate deleting the MyStore domain.
To run the sample
Open a clean copy of DeleteDomainSample.java.
Remove any comment marks from the invokeDeleteDomain(service, request); line and add the following line
after // @TODO: set request parameters here:
request.withDomainName("MyStore");Compile and run the sample.
Amazon SimpleDB deletes MyStore.
To verify whether the domain is deleted, see Listing Domains.
To run the sample
Open AmazonSimpleDBSamples.cs.
Comment out the code you added in the previous section.
Add the following to the Delete Domain Action section:
DeleteDomain deleteDomainAction = new DeleteDomain().WithDomainName("MyStore");
DeleteDomainSample.InvokeDeleteDomain(service, deleteDomainAction);
Run the sample.
Amazon SimpleDB deletes MyStore.
To verify whether the domain is deleted, see Listing Domains.
To run the sample
Open a clean copy of DeleteDomainSample.pl.
Remove any comment marks from the invokeDeleteDomain($service, $request); line and add the following line
after the // @TODO: set request line:
my $request = Amazon::SimpleDB::Model::DeleteDomain->new({DomainName => "MyStore"});Run the sample.
Amazon SimpleDB deletes MyStore.
To verify whether the domain is deleted, see Listing Domains.
To run the sample
Open a clean copy of DeleteDomainSample.php.
Remove any comment marks from the invokeDeleteDomain($service, $request); line and add the following lines
after the // @TODO: set request line:
$request = new Amazon_SimpleDB_Model_DeleteDomain();
$request->setDomainName('MyStore');
Run the sample.
Amazon SimpleDB deletes MyStore.
To verify whether the domain is deleted, see Listing Domains.
To run the sample
Open AmazonSimpleDBSamples.vb.
Comment out the code you added in the previous section.
Add the following to the Delete Domain Action section:
Dim deleteDomainAction As New DeleteDomain()
deleteDomainAction.WithDomainName("MyStore")
DeleteDomainSample.InvokeDeleteDomain(service, deleteDomainAction)
Run the sample.
Amazon SimpleDB deletes MyStore.
To verify whether the domain is deleted, see Listing Domains.
To run the sample
Open the scratchpad application with a web browser.
Select DeleteDomain from the Explore API list box.
Enter MyStore in the Domain Name field.
Click Invoke Request. The scratchpad returns a signed URL
Select from the following:
To invoke the request, click Invoke Request.
Amazon SimpleDB returns a response.
To view the signed URL, click Display Signed URL. Then, copy and paste the signed URL into a browser.
Amazon SimpleDB returns a response.
To view the string to sign, click Display String to Sign.
To verify whether the domain is deleted, see Listing Domains.