Editar

Compartilhar via


Update-AzContainerRegistryCredential

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

Syntax

Update-AzContainerRegistryCredential
      -RegistryName <String>
      -ResourceGroupName <String>
      [-SubscriptionId <String>]
      -PasswordName <PasswordName>
      [-DefaultProfile <PSObject>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzContainerRegistryCredential
      -RegistryName <String>
      -ResourceGroupName <String>
      [-SubscriptionId <String>]
      -RegenerateCredentialParameter <IRegenerateCredentialParameters>
      [-DefaultProfile <PSObject>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzContainerRegistryCredential
      -InputObject <IContainerRegistryIdentity>
      -PasswordName <PasswordName>
      [-DefaultProfile <PSObject>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
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.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

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

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

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

Type:IContainerRegistryIdentity
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-PasswordName

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

Type:PasswordName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-RegenerateCredentialParameter

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

Type:IRegenerateCredentialParameters
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Registry

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

Type:IRegistry
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-RegistryName

The name of the container registry.

Type:String
Aliases:ContainerRegistryName, Name, ResourceName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

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

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionId

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

Type:String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

IRegenerateCredentialParameters

IRegistry

IContainerRegistryIdentity

Outputs

PSContainerRegistryCredential