Registries - Check Name Availability

Checks whether the container registry name is available for use. The name must contain only alphanumeric characters, be globally unique, and between 5 and 50 characters in length.

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

URI Parameters

Name In Required Type Description
subscriptionId
path True
  • string

The Microsoft Azure subscription ID.

api-version
query True
  • string

The client API version.

Request Body

Name Required Type Description
name True
  • string

The name of the container registry.

type True

The resource type of the container registry. This field must be set to 'Microsoft.ContainerRegistry/registries'.

Responses

Name Type Description
200 OK

The request was successful; the request was well-formed and received properly.

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

RegistryCheckNameAvailable
RegistryCheckNameNotAvailable

RegistryCheckNameAvailable

Sample Request

POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/checkNameAvailability?api-version=2019-05-01
{
  "name": "myRegistry",
  "type": "Microsoft.ContainerRegistry/registries"
}

Sample Response

{
  "nameAvailable": true
}

RegistryCheckNameNotAvailable

Sample Request

POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerRegistry/checkNameAvailability?api-version=2019-05-01
{
  "name": "myRegistry",
  "type": "Microsoft.ContainerRegistry/registries"
}

Sample Response

{
  "nameAvailable": false,
  "reason": "AlreadyExists",
  "message": "The registry myRegistry is already in use."
}

Definitions

ContainerRegistryResourceType

The resource type of the container registry. This field must be set to 'Microsoft.ContainerRegistry/registries'.

RegistryNameCheckRequest

A request to check whether a container registry name is available.

RegistryNameStatus

The result of a request to check the availability of a container registry name.

ContainerRegistryResourceType

The resource type of the container registry. This field must be set to 'Microsoft.ContainerRegistry/registries'.

Name Type Description
Microsoft.ContainerRegistry/registries
  • string

RegistryNameCheckRequest

A request to check whether a container registry name is available.

Name Type Description
name
  • string

The name of the container registry.

type

The resource type of the container registry. This field must be set to 'Microsoft.ContainerRegistry/registries'.

RegistryNameStatus

The result of a request to check the availability of a container registry name.

Name Type Description
message
  • string

If any, the error message that provides more detail for the reason that the name is not available.

nameAvailable
  • boolean

The value that indicates whether the name is available.

reason
  • string

If any, the reason that the name is not available.