Create Storage Account

 

Updated: February 24, 2016

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

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

Method

Request URI

POST

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

The following table describes the 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 higher.

The format for the request body is as follows:

<?xml version="1.0" encoding="utf-8"?>
<CreateStorageServiceInput xmlns="http://schemas.microsoft.com/windowsazure">
  <ServiceName>name-of-storage-account</ServiceName>
  <Description>description-of-storage-account</Description>
  <Label>base64-encoded-label</Label>
  <AffinityGroup>name-of-affinity-group</AffinityGroup>
  <Location>location-of-storage-account</Location>
  <ExtendedProperties>
    <ExtendedProperty>
      <Name>property-name</Name>
      <Value>property-value</Value>
    </ExtendedProperty>
  </ExtendedProperties>
  <AccountType>type-of-storage-account</AccountType>
</CreateStorageServiceInput>

The following table describes the elements of the request body.

Element Name

Description

Service Name

Required. A name for the storage account that is unique within 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 label for the storage account specified as a base64-encoded string. The label may be up to 100 characters in length. The label 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.

Name

Optional. Represents the name of an extended storage account property. Each extended property must have both a defined name and value. You can have a maximum of 50 extended property name/value pairs.

The maximum length of the Name element is 64 characters, only alphanumeric characters and underscores are valid in the Name, and the name must start with a letter. Attempting to use other characters, starting the Name with a non-letter character, or entering a name that is identical to that of another extended property owned by the same storage account, will result in a status code 400 (Bad Request) error.

The Name element is only available using version 2012-03-01 or higher.

Value

Optional. Represents the value of an extended storage account property. Each extended property must have both a defined name and value. You can have a maximum of 50 extended property name/value pairs, and each extended property value has a maximum length of 255 characters.

The Value element is only available using version 2012-03-01 or higher.

AccountType

Specifies whether the account supports locally-redundant storage, geo-redundant storage, zone-redundant storage, or read access geo-redundant storage.

Possible values are:

  • Standard_LRS

  • Standard_ZRS

  • Standard_GRS

  • Standard_RAGRS

  • Premium_LRS

The AccountType element is only available using version 2014-06-01 or higher and it replaces the SecondaryReadEnabled and GeoReplicationEnabled elements.

The Premium_LRS element is only available using version 2014-10-01 or higher.

A Standard_ZRS account cannot be changed to another account type later, and the other account types cannot be changed to Standard_ZRS. The same goes for Premium_LRS accounts.

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

A successful operation returns status code 200 (OK).

The response for this operation includes the following headers. The response may also include additional standard HTTP headers.

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.

Show: