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 |
|---|---|---|---|---|
|
subscription
|
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: 5maxLength: 50 pattern: ^[a-zA-Z0-9]*$ |
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 has succeeded. |
|
| Other Status Codes |
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
|
Registry |
|
Registry |
RegistryCheckNameAvailable
Sample request
Sample response
{
"nameAvailable": true
}
RegistryCheckNameNotAvailable
Sample request
Sample response
{
"nameAvailable": false,
"reason": "AlreadyExists",
"message": "The registry myRegistry is already in use."
}
Definitions
| Name | Description |
|---|---|
|
Container |
The resource type for Container Registry. |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
Registry |
A request to check whether a container registry name is available. |
|
Registry |
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 |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
RegistryNameCheckRequest
A request to check whether a container registry name is available.
| Name | Type | Description |
|---|---|---|
| name |
string minLength: 5maxLength: 50 pattern: ^[a-zA-Z0-9]*$ |
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. |