This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Working with Domains in Amazon SimpleDB



Overview

The following operations allow you to work with domains. Click an operation name to see details on how to use it.

For a sample proxy service that illustrates how to work with domains, see Sample configuration.

OperationDescription

createDomain

Creates a new domain.

deleteDomainDeletes a domain.
listDomainsLists domains.

Operation details

This section provides details on the operations.

 Creating a domain

The createDomain operation creates a new domain. The domain name must be unique among the domains associated with the Access Key ID provided in the request. This operation might take 10 or more seconds to complete.

 

createDomain
<amazonsdb.createDomain>
	<domainName>{$ctx:domainName}</domainName>
</amazonsdb.createDomain>
Property
  • domainName: Required - The name of the domain to be created. The name can range between 3 and 255 characters and can contain the following characters: a-z, A-Z, 0-9, "_", "-", and ".".
Sample request

Following is a sample REST/XML request that can be handled by the createDomain operation.

Sample Request for createDomain
<root>
	<apiUrl>https://sdb.amazonaws.com</apiUrl>
	<accessKeyId>AKIAIYMUNCUHQdfJEFMURA</accessKeyId>
	<secretAccessKey>qAb5n5hAYdfgzpgcD2+7APuEVg3rLtpkkEuTj2zjGOg</secretAccessKey>
	<action>CreateDomain</action>
	<version>2009-04-15</version>
	<signatureVersion>2</signatureVersion>
	<signatureMethod>HmacSHA1</signatureMethod>
	<domainName>Name</domainName>
</root>
Related Amazon SimpleDB documentation

http://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/SDB_API_CreateDomain.html

 Deleting a domain

The deleteDomain operation deletes a domain. Any items (and their attributes) in the domain will also be deleted. This operation might take 10 or more seconds to complete.

 

deleteDomain
<amazonsdb.deleteDomain>
	<domainName>{$ctx:domainName}</domainName>
</amazonsdb.deleteDomain>
Property
  • domainName: Required - Name of the domain to be deleted.

Running DeleteDomain on a domain that does not exist or running the function multiple times using the same domain name will not result in an error response.

Sample request

Following is a sample REST/XML request that can be handled by the deleteDomain operation.

Sample Request for deleteDomain
<root>
	<apiUrl>https://sdb.amazonaws.com</apiUrl>
	<accessKeyId>AKIAIYMUdfgNCUHQJEFMURA</accessKeyId>
	<secretAccessKey>qAb5n5sghAYzpgcD2+7APuEVg3rLtpkkEuTj2zjGOg</secretAccessKey>
	<action>DeleteDomain</action>
	<version>2009-04-15</version>
	<signatureVersion>2</signatureVersion>
	<signatureMethod>HmacSHA1</signatureMethod>
	<domainName>Name</domainName>
</root>
Related Amazon SimpleDB documentation

http://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/SDB_API_DeleteDomain.html

 Listing domains

The listDomains operation lists all domains associated with the Access Key ID.

listDomains
<amazonsdb.listDomains>
	<maxNumberOfDomains>{$ctx:maxNumberOfDomains}</maxNumberOfDomains>
    <nextToken>{$ctx:nextToken}</nextToken>
</amazonsdb.listDomains> 
Properties
  • maxNumberOfDomains: Optional - The maximum number of domain names to be returned. The range is 1 to 100. Default is 100.
  • nextToken: Optional - String that tells Amazon SimpleDB where to start the next list of domain names.

This operation returns domain names up to the limit set by maxNumberOfDomains. A nextToken is returned if there are more than maxNumberOfDomains domains. Calling listDomains successive times with the nextToken returns up to maxNumberOfDomains more domain names each time.

Sample request

Following is a sample REST/XML request that can be handled by the listDomains operation.

Sample Request for listDomains
<root>
	<apiUrl>https://sdb.amazonaws.com</apiUrl>
	<accessKeyId>AKIAIYMUNCfgUHQJEFMURA</accessKeyId>
	<secretAccessKey>qAb5n5hAYfgzpgcD2+7APuEVg3rLtpkkEuTj2zjGfOg</secretAccessKey>
	<action>ListDomains</action>
	<version>2009-04-15</version>
	<signatureVersion>2</signatureVersion>
	<signatureMethod>HmacSHA1</signatureMethod>
	<maxNumberOfDomains>5</maxNumberOfDomains>
	<nextToken>1</nextToken>
</root>
Related Amazon SimpleDB documentation

http://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/SDB_API_ListDomains.html

Sample configuration

Following is a sample proxy service that illustrates how to connect to Amazon SimpleDB with the init operation and use the createDomain operation. The sample request for this proxy can be found in createDomain sample request. You can use this sample as a template for using other operations in this category.

Sample Proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="amazonSimpleDB_createDomain" transports="https,http" statistics="disable" trace="disable" startOnLoad="true">
  <target>
    <inSequence onError="faultHandlerSeq">
      <property name="apiUrl" expression="//apiUrl/text()"/>
      <property name="accessKeyId" expression="//accessKeyId/text()"/>
      <property name="secretAccessKey" expression="//secretAccessKey/text()"/>
      <property name="action" expression="//action/text()"/>
	  <property name="domainName" expression="//domainName/text()"/>
      <property name="version" expression="//version/text()"/>
      <property name="signatureVersion" expression="//signatureVersion/text()"/>
      <property name="signatureMethod" expression="//signatureMethod/text()"/>
	  <amazonsdb.init>
        <signatureMethod>{$ctx:signatureMethod}</signatureMethod>
        <secretAccessKey>{$ctx:secretAccessKey}</secretAccessKey>
        <action>{$ctx:action}</action>
		<accessKeyId>{$ctx:accessKeyId}</accessKeyId>
        <apiUrl>{$ctx:apiUrl}</apiUrl>
        <signatureVersion>{$ctx:signatureVersion}</signatureVersion>
        <version>{$ctx:version}</version>
	  </amazonsdb.init>	       
      <amazonsdb.createDomain>
        <domainName>{$ctx:domainName}</domainName>
      </amazonsdb.createDomain>	  
	  <respond></respond>
    </inSequence>
    <outSequence>
      <send></send>
    </outSequence>
	      <faultSequence>
         <makefault version="soap11">
            <code expression="get-property('ERROR_CODE')"/>
            <reason expression="get-property('ERROR_MESSAGE')"/>
            <detail expression="get-property('ERROR_DETAIL')"/>
         </makefault>
         <send/>
      </faultSequence>
  </target>
</proxy>