0 out of 1 rated this helpful - Rate this topic

Create Storage Account

Updated: September 6, 2011

The Create Storage Account operation creates a new storage account in Windows Azure.

The Create Storage Account request may be specified as follows. Replace <subscription-id> with your subscription ID:

 

Method Request URI HTTP Version

POST

https://management.core.windows.net/<subscription-id>/services/storageservices

HTTP/1.1

None.

The following table describes required and optional request headers.

 

Request Header Description

Content-Type

Required. Set this header to application/xml.

x-ms-version

Required. Specifies the version of the operation to use for this request. The value of this header must be set to 2011-06-01 or later. For more information about versioning headers, see Service Management Versioning.

The format of the request body is as follows:

<?xml version="1.0" encoding="utf-8"?>
<CreateStorageServiceInput xmlns="http://schemas.microsoft.com/windowsazure">
   <ServiceName>service-name</ServiceName>
   <Description>service-description</Description>
   <Label>base64-encoded-label</Label>
   <AffinityGroup>affinity-group-name</AffinityGroup>
   <Location>location-of-the-storage-account</Location>
</CreateStorageServiceInput>

ImportantImportant
The order of the elements in the request body is significant. If an element is required, it must appear in the XML in the order shown above.

The following table describes the key elements of the request body:

 

Element Name

Description

Service Name

Required. A name for the storage account that is unique within Windows Azure. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.

This name is the DNS prefix name and can be used to access blobs, queues, and tables in the storage account.

For example: http://ServiceName.blob.core.windows.net/mycontainer/

Label

Required. A name for the storage account specified as a base64-encoded string. The name may be up to 100 characters in length. The name can be used identify the storage account for your tracking purposes.

Description

Optional. A description for the storage account. The description may be up to 1024 characters in length.

Location

Required if AffinityGroup is not specified. The location where the storage account is created.

You can include either a Location or AffinityGroup element, in the request body but not both. To list available locations, use the List Locations operation.

AffinityGroup

Required if Location is not specified. The name of an existing affinity group in the specified subscription.

You can include either a Location or AffinityGroup element in the request body, but not both. To list available affinity groups, use the List Affinity Groups operation.

The response includes an HTTP status code, a set of response headers, and a response body.

Because Create Storage Account is an asynchronous operation, it always returns status code 202 (Accepted). To determine the status code for the operation once it is complete, call Get Operation Status. The status code is embedded in the response for this operation; if successful, it will be status code 200 (OK).

For information about status codes, see Service Management Status and Error Codes.

The response for this operation includes the following headers. The response may also include additional standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.

 

Response Header Description

x-ms-request-id

A value that uniquely identifies a request made against the Management service. For an asynchronous operation, you can call get operation status with the value of the header to determine whether the operation is complete, has failed, or is still in progress. See Tracking Asynchronous Service Management Requests for more information.

Any management certificate associated with the subscription specified by <subscription-id> can be used to authenticate this operation. For additional details, see Authenticating Service Management Requests.

None.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Storage Account Name, shoud be unique across subscriptions.
A name for the storage account that is unique to the subscription. This should be unique across subscriptions right?

[AzureDocGoy] The name must be unique across all of Windows Azure.
Incorrect status code in the documentation
On successful creation of the storage account, the status code returned by service management API is Accepted and not Created as mentioned in the document.

[AzureDocGuy] - Thanks for reporting this. I have updated the documentation.