@@ -15,7 +15,7 @@ Creates a public IP address.
15
15
16
16
```
17
17
New-AzPublicIpAddress [-Name <String>] -ResourceGroupName <String> [-Location <String>] [-EdgeZone <String>]
18
- [-Sku <String>] [-Tier <String>] -AllocationMethod <String> [-IpAddressVersion <String>]
18
+ [-Sku <String>] [-Tier <String>] -AllocationMethod <String> [-IpAddressVersion <String>] [-IpAddress <String>]
19
19
[-DomainNameLabel <String>] [-IpTag <PSPublicIpTag[]>] [-PublicIpPrefix <PSPublicIpPrefix>]
20
20
[-ReverseFqdn <String>] [-IdleTimeoutInMinutes <Int32>] [-Zone <String[]>] [-Tag <Hashtable>] [-Force]
21
21
[-AsJob] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
@@ -64,16 +64,26 @@ and passed as input through -IpTags.
64
64
65
65
### Example 4: Create a new public IP address from a Prefix
66
66
``` powershell
67
- $publicIp = New-AzPublicIpAddress -Name $publicIpName -ResourceGroupName $rgName -AllocationMethod Static -DomainNameLabel $dnsPrefix -Location $location
68
- -PublicIpPrefix publicIpPrefix -Sku Standard
67
+ $publicIp = New-AzPublicIpAddress -Name $publicIpName -ResourceGroupName $rgName -AllocationMethod Static -DomainNameLabel $dnsPrefix -Location $location -PublicIpPrefix $publicIpPrefix -Sku Standard
69
68
```
70
69
71
70
This command creates a new public IP address resource. A DNS record is created for
72
71
$dnsPrefix.$location.cloudapp.azure.com pointing to the public IP address of this resource. A
73
72
public IP address is immediately allocated to this resource from the publicIpPrefix specified.
74
73
This option is only supported for the 'Standard' Sku and 'Static' AllocationMethod.
75
74
76
- ### Example 5: Create a new global public IP address
75
+ ### Example 5: Create a specific public IP address from a BYOIP Prefix
76
+ ``` powershell
77
+ $publicIp = New-AzPublicIpAddress -Name $publicIpName -ResourceGroupName $rgName -AllocationMethod Static -Location $location -IpAddress 0.0.0.0 -PublicIpPrefix $publicIpPrefix -Sku Standard
78
+ ```
79
+
80
+ This command creates a new public IP address resource with specific IP. NRP would check if the
81
+ given IP is inside the PublicIpPrefix and if the given PublicIpPrefix is BYOIP PublicIpPrefix.
82
+ the given public IP address is immediately allocated to this resource from the publicIpPrefix
83
+ specified. This option is only supported for the 'Standard' Sku and 'Static' AllocationMethod
84
+ and BYOIP PublicIpPrefix.
85
+
86
+ ### Example 6: Create a new global public IP address
77
87
``` powershell
78
88
$publicIp = New-AzPublicIpAddress -Name $publicIpName -ResourceGroupName $rgName -AllocationMethod Static -DomainNameLabel $domainNameLabel -Location $location -Sku Standard -Tier Global
79
89
```
@@ -268,6 +278,21 @@ Accept pipeline input: True (ByPropertyName)
268
278
Accept wildcard characters : False
269
279
` ` `
270
280
281
+ ### -IpAddress
282
+ Specifies the IP address when creating a BYOIP publicIpAddress.
283
+
284
+ ` ` ` yaml
285
+ Type : System.String
286
+ Parameter Sets : (All)
287
+ Aliases :
288
+
289
+ Required : False
290
+ Position : Named
291
+ Default value : None
292
+ Accept pipeline input : True (ByPropertyName)
293
+ Accept wildcard characters : False
294
+ ` ` `
295
+
271
296
### -ResourceGroupName
272
297
Specifies the name of the resource group in which to create a public IP address.
273
298
0 commit comments