Storage Accounts - Check Name Availability

Checks that the storage account name is valid and is not already in use.

POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Storage/checkNameAvailability?api-version=2019-06-01

URI Parameters

Name In Required Type Description
subscriptionId
path True
  • string

The ID of the target subscription.

api-version
query True
  • string

The API version to use for this operation.

Request Body

Name Required Type Description
name True
  • string

The storage account name.

type True

The type of resource, Microsoft.Storage/storageAccounts

Responses

Name Type Description
200 OK

OK -- Operation to check the storage account name availability was successful.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

StorageAccountCheckNameAvailability

Sample Request

POST https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Storage/checkNameAvailability?api-version=2019-06-01
{
  "name": "sto3363",
  "type": "Microsoft.Storage/storageAccounts"
}

Sample Response

{
  "nameAvailable": true
}

Definitions

CheckNameAvailabilityResult

The CheckNameAvailability operation response.

Reason

Gets the reason that a storage account name could not be used. The Reason element is only returned if NameAvailable is false.

StorageAccountCheckNameAvailabilityParameters

The parameters used to check the availability of the storage account name.

Type

The type of resource, Microsoft.Storage/storageAccounts

CheckNameAvailabilityResult

The CheckNameAvailability operation response.

Name Type Description
message
  • string

Gets an error message explaining the Reason value in more detail.

nameAvailable
  • boolean

Gets a boolean value that indicates whether the name is available for you to use. If true, the name is available. If false, the name has already been taken or is invalid and cannot be used.

reason

Gets the reason that a storage account name could not be used. The Reason element is only returned if NameAvailable is false.

Reason

Gets the reason that a storage account name could not be used. The Reason element is only returned if NameAvailable is false.

Name Type Description
AccountNameInvalid
  • string
AlreadyExists
  • string

StorageAccountCheckNameAvailabilityParameters

The parameters used to check the availability of the storage account name.

Name Type Description
name
  • string

The storage account name.

type

The type of resource, Microsoft.Storage/storageAccounts

Type

The type of resource, Microsoft.Storage/storageAccounts

Name Type Description
Microsoft.Storage/storageAccounts
  • string