Edit

Share via


Update-AzContainerRegistryCredential

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

Syntax

RegenerateExpanded (Default)

Update-AzContainerRegistryCredential
    -RegistryName <String>
    -ResourceGroupName <String>
    -PasswordName <PasswordName>
    [-SubscriptionId <String>]
    [-DefaultProfile <PSObject>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Regenerate

Update-AzContainerRegistryCredential
    -RegistryName <String>
    -ResourceGroupName <String>
    -RegenerateCredentialParameter <IRegenerateCredentialParameters>
    [-SubscriptionId <String>]
    [-DefaultProfile <PSObject>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

RegenerateViaIdentityExpanded

Update-AzContainerRegistryCredential
    -InputObject <IContainerRegistryIdentity>
    -PasswordName <PasswordName>
    [-DefaultProfile <PSObject>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

RegenerateByRegistry

Update-AzContainerRegistryCredential
    -Registry <IRegistry>
    [-DefaultProfile <PSObject>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

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

Examples

Example 1: Regenerate a login credential for a container registry

Update-AzContainerRegistryCredential -ResourceGroupName "MyResourceGroup" -RegistryName "RegistryExample" -PasswordName Password
Username            Password  Password2
--------            --------  ---------
RegistryExample     xxxxxxxxx xxxxxxxxx

This command regenerates a login credential for the specified container registry. Admin user has to be enabled for the container registry `MyRegistry` to regenerate login credentials.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Parameter properties

Type:PSObject
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzureRMContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

Parameter properties

Type:IContainerRegistryIdentity
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

RegenerateViaIdentityExpanded
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-PasswordName

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

Parameter properties

Type:PasswordName
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

RegenerateExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
RegenerateViaIdentityExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RegenerateCredentialParameter

The parameters used to regenerate the login credential. To construct, see NOTES section for REGENERATECREDENTIALPARAMETER properties and create a hash table.

Parameter properties

Type:IRegenerateCredentialParameters
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Regenerate
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Registry

The Registry Object. To construct, see NOTES section for REGISTRY properties and create a hash table.

Parameter properties

Type:IRegistry
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

RegenerateByRegistry
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-RegistryName

The name of the container registry.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:ContainerRegistryName, Name, ResourceName

Parameter sets

RegenerateExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Regenerate
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceGroupName

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

RegenerateExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Regenerate
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SubscriptionId

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

Parameter properties

Type:String
Default value:(Get-AzContext).Subscription.Id
Supports wildcards:False
DontShow:False

Parameter sets

RegenerateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
Regenerate
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

IRegenerateCredentialParameters

IRegistry

IContainerRegistryIdentity

Outputs

PSContainerRegistryCredential