create_domain ( $domain_name, $opt )

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

CreateDomain is an idempotent operation; running it multiple times using the same domain name will not result in an error response.

The client can create up to 100 domains per account.

If the client requires additional domains, go to http://aws.amazon.com/contact-us/simpledb-limit-request/.

Access

public

Parameters

Parameter

Type

Required

Description

$domain_name

string

Required

The name of the domain to create. The name can range between 3 and 255 characters and can contain the following characters: a-z, A-Z, 0-9, ‘_’, ‘-‘, and ‘.’.

$opt

array

Optional

An associative array of parameters that can have the following keys:

  • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
  • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.

Returns

Type

Description

CFResponse

A CFResponse object containing a parsed HTTP response.

Examples

AmazonSDB::create_domain

// Instantiate
$sdb = new AmazonSDB();
$response = $sdb->create_domain('example-domain');

// Success?
var_dump($response->isOK());
Result:
bool(true)

Related Methods

Source

Method defined in services/sdb.class.php | Toggle source view (7 lines) | View on GitHub

public function create_domain($domain_name, $opt = null)
{
    if (!$opt) $opt = array();
    $opt['DomainName'] = $domain_name;
    
    return $this->authenticate('CreateDomain', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback