Redigera

Dela via


New-AzContainerRegistryReplication

Creates a replication for a container registry with the specified parameters.

Syntax

New-AzContainerRegistryReplication
   -RegistryName <String>
   -ResourceGroupName <String>
   [-Name <String>]
   [-SubscriptionId <String>]
   -Location <String>
   [-RegionEndpointEnabled]
   [-Tag <Hashtable>]
   [-ZoneRedundancy <ZoneRedundancy>]
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzContainerRegistryReplication
   [-Name <String>]
   [-SubscriptionId <String>]
   -Registry <IRegistry>
   -Location <String>
   [-RegionEndpointEnabled]
   [-Tag <Hashtable>]
   [-ZoneRedundancy <ZoneRedundancy>]
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Creates a replication for a container registry with the specified parameters.

Examples

Example 1: Creates a container registry replication.

New-AzContainerRegistryReplication -ResourceGroupName "MyResourceGroup" -RegistryName "RegistryExample" -Name replication001 -Location 'west us' -Tag @{tagName='MyTag'}

Name           Location ProvisioningState StatusTimestamp
----           -------- ----------------- ---------------
replication001 westus   Succeeded         1/19/2023 5:57:00 AM

Creates a container registry replication.

Parameters

-AsJob

Run the command as a job

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

-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

-Location

The location of the resource. This cannot be changed after the resource is created.

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

-Name

The name of the replication.

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

-NoWait

Run the command asynchronously

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

-RegionEndpointEnabled

Specifies whether the replication's regional endpoint is enabled. Requests will not be routed to a replication whose regional endpoint is disabled, however its data will continue to be synced with other replications.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
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:False
Accept wildcard characters:False

-RegistryName

The name of the container registry.

Type:String
Aliases:ContainerRegistryName
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

-Tag

The tags of the resource.

Type:Hashtable
Aliases:Tags
Position:Named
Default value:None
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

-ZoneRedundancy

Whether or not zone redundancy is enabled for this container registry replication

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

Outputs

IReplication