Registries - Regenerate Credential

Regenerates one of the login credentials for the specified container registry.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/regenerateCredential?api-version=2023-01-01-preview

URI Parameters

Name In Required Type Description
registryName
path True

string

The name of the container registry.

Regex pattern: ^[a-zA-Z0-9]*$

resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string

uuid

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

api-version
query True

string

The API version to use for this operation.

Request Body

Name Required Type Description
name True

PasswordName

Specifies name of the password which should be regenerated -- password or password2.

Responses

Name Type Description
200 OK

RegistryListCredentialsResult

The request was successful; the specified credential regenerated successfully.

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

RegistryRegenerateCredential

Sample Request

POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/regenerateCredential?api-version=2023-01-01-preview

{
  "name": "password"
}

Sample Response

{
  "username": "myRegistry",
  "passwords": [
    {
      "name": "password",
      "value": "00000000000000000000000000000000"
    },
    {
      "name": "password2",
      "value": "00000000000000000000000000000000"
    }
  ]
}

Definitions

Name Description
PasswordName

The password name.

RegenerateCredentialParameters

The parameters used to regenerate the login credential.

RegistryListCredentialsResult

The response from the ListCredentials operation.

RegistryPassword

The login password for the container registry.

PasswordName

The password name.

Name Type Description
password

string

password2

string

RegenerateCredentialParameters

The parameters used to regenerate the login credential.

Name Type Description
name

PasswordName

Specifies name of the password which should be regenerated -- password or password2.

RegistryListCredentialsResult

The response from the ListCredentials operation.

Name Type Description
passwords

RegistryPassword[]

The list of passwords for a container registry.

username

string

The username for a container registry.

RegistryPassword

The login password for the container registry.

Name Type Description
name

PasswordName

The password name.

value

string

The password value.