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.
Operation | Description |
---|---|
Creates a new domain. | |
deleteDomain | Deletes a domain. |
listDomains | Lists domains. |
Returns information about the domain, including when the domain was created, the number of items and attributes, and the size of attribute names and values. |
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.
<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 ".".
- The
createDomain
operation is an idempotent operation, so running it multiple times using the same domain name will not result in an error response. - You can create up to 250 domains per account. If you require additional domains, see https://aws.amazon.com/support/createCase?type=service_limit_increase&serviceLimitIncreaseType=simpledb-domains.
Sample request
Following is a sample REST/XML request that can be handled by the createDomain operation.
<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.
<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.
<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.
<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.
<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
get domains metadata
The domainMetadata operation returns information about the domain, including when the domain was created, the number of items and attributes, and the size of attribute names and values.
<amazonsdb.domainMetadata> <domainName>{$ctx:domainName}</domainName> </amazonsdb.domainMetadata>
Properties
domainName:
Required - Name of the domain to be return metadata.
Sample request
Following is a sample REST/XML request that can be handled by the domainMetadata operation.
<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> <domainName>user</domainName> </root>
Related Amazon SimpleDB documentation
http://docs.aws.amazon.com/AmazonSimpleDB/latest/DeveloperGuide/SDB_API_DomainMetadata.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.
<?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>