CreateDomain() public method

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.

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/.

/// The value for a parameter is invalid. /// /// The request must contain the specified missing parameter. /// /// Too many domains exist per this account. ///
public CreateDomain ( CreateDomainRequest request ) : CreateDomainResponse
request CreateDomainRequest Container for the necessary parameters to execute the CreateDomain service method.
return CreateDomainResponse
        static void WriteToSimpleDb(AWSCredentials credentials)
        {
            var client = new AmazonSimpleDBClient(credentials, RegionEndpoint.USEast1);

            var request = new CreateDomainRequest("aws-talk");
            var response = client.CreateDomain(request);

            var putData = new PutAttributesRequest("aws-talk", "products/" + Guid.NewGuid().ToString(),
                new List<ReplaceableAttribute>()
                {
                    new ReplaceableAttribute("Name", "Couch", true),
                    new ReplaceableAttribute("Price", "20", true)
                });
            client.PutAttributes(putData);
        }
 public SimpleDBAppender()
 {
     var client = new AmazonSimpleDBClient();
     ListDomainsRequest request=new ListDomainsRequest();
     var response = client.ListDomains(request);
     bool found = response.ListDomainsResult.DomainName.Any(d => d == DBName);
     if (!found)
     {
         CreateDomainRequest createDomainRequest =
             new CreateDomainRequest
                 {
                     DomainName = DBName
                 };
         client.CreateDomain(createDomainRequest);
     }
 }
Beispiel #3
0
        public override void ActivateOptions()
        {
            base.ActivateOptions();

            var client   = new AmazonSimpleDBClient(Utility.GetRegionEndpoint());
            var request  = new ListDomainsRequest();
            var response = client.ListDomains(request);
            bool found   = response.ListDomainsResult.DomainNames.Any(d => d == DBName);
            if (!found)
            {
                var createDomainRequest =
                    new CreateDomainRequest
                    {
                        DomainName = DBName
                    };
                client.CreateDomain(createDomainRequest);
            }
        }