你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

New-AzCustomIpPrefix

Creates a CustomIpPrefix resource

Syntax

New-AzCustomIpPrefix
   -Name <String>
   -ResourceGroupName <String>
   -Location <String>
   -Cidr <String>
   [-Asn <String>]
   [-Geo <String>]
   [-SignedMessage <String>]
   [-AuthorizationMessage <String>]
   [-ExpressRouteAdvertise]
   [-CustomIpPrefixParent <PSCustomIpPrefix>]
   [-IsParent]
   [-Zone <String[]>]
   [-Tag <Hashtable>]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-AzCustomIpPrefix cmdlet creates a CustomIpPrefix resource.

Examples

Example 1

$myCustomIpPrefix = New-AzCustomIpPrefix -Name $prefixName -ResourceGroupName $rgName -Cidr "40.40.40.0/24" -Location westus2 -Zone 1,2,3 -AuthorizationMessage $authorizationMessage -SignedMessage $signedMessage

This command kicks off the provisioning process for a new zone-redundant IPv4 Custom IP Prefix resource with name $prefixName in resource group $rgName with a CIDR of 40.40.40.0/24 in West US 2 region. Note the AuthorizationMessage is a contactenated string (containing the subscription ID, CIDR, and Route Origin Authorization expiration date) and the SignedMessage is the same string signed by X509 certificate offline.

Example 2

$myV4ParentPrefix = New-AzCustomIpPrefix -Name $prefixName -ResourceGroupName $rgName -Cidr "40.40.40.0/24" -Location westus2 -IsParent -AuthorizationMessage $authorizationMessage -SignedMessage $signedMessage

This command kicks off the provisioning process for a new Parent IPv4 Custom IP Prefix resource with name $prefixName in resource group $rgName with a CIDR of 40.40.40.0/24.

Example 3

$myV4ChildIpPrefix = New-AzCustomIpPrefix -Name $prefixName -ResourceGroupName $rgName -Cidr "40.40.40.0/25" -Location westus2 -CustomIpPrefixParent $myV4ParentPrefix

This command kicks off the provisioning process for a new Child IPv4 Custom IP Prefix resource with name $prefixName in resource group $rgName with a CIDR of 40.40.40.0/25. Its parent prefix is $myV4ParentPrefix.

Parameters

-AsJob

Run cmdlet in the background

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

-Asn

The customIpPrefix ASN code.

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

-AuthorizationMessage

Authorization message for WAN validation.

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

-Cidr

The CustomIpPrefix CIDR.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
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

-CustomIpPrefixParent

Parent CustomIpPrefix of resource.

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

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ExpressRouteAdvertise

Using expressRoute advertise.

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

-Geo

The customIpPrefix GEO code.

Type:String
Accepted values:AFRI, APAC, AQ, EURO, LATAM, ME, NAM, OCEANIA
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-IsParent

Denotes that resource is being created as a Parent CustomIpPrefix

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

-Location

The CustomIpPrefix location.

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

-Name

The resource name.

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

-ResourceGroupName

The resource group name.

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

-SignedMessage

Signed message for WAN validation.

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

-Tag

A hashtable which represents resource tags.

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

-Zone

A list of availability zones denoting the IP allocated for the resource needs to come from.

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

Inputs

String

String[]

Hashtable

PSCustomIpPrefix

Outputs

PSCustomIpPrefix