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=2025-11-01

URI Parameters

Name In Required Type Description
subscriptionId
path True

string (uuid)

The ID of the target subscription. The value must be an UUID.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Request Body

Name Required Type Description
name True

string

minLength: 5
maxLength: 50
pattern: ^[a-zA-Z0-9]*$

The name of the container registry.

type True

ContainerRegistryResourceType

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

Responses

Name Type Description
200 OK

RegistryNameStatus

The request has succeeded.

Other Status Codes

ErrorResponse

An unexpected error response.

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=2025-11-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=2025-11-01

{
  "name": "myRegistry",
  "type": "Microsoft.ContainerRegistry/registries"
}

Sample response

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

Definitions

Name Description
ContainerRegistryResourceType

The resource type for Container Registry.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

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 for Container Registry.

Value Description
Microsoft.ContainerRegistry/registries

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

RegistryNameCheckRequest

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

Name Type Description
name

string

minLength: 5
maxLength: 50
pattern: ^[a-zA-Z0-9]*$

The name of the container registry.

type

ContainerRegistryResourceType

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.