az network public-ip
Manage public IP addresses.
Commands
| Name | Description | Type | Status |
|---|---|---|---|
| az network public-ip create |
Create a public IP address. |
Core | Preview |
| az network public-ip delete |
Delete a public IP address. |
Core | Preview |
| az network public-ip list |
List public IP addresses. |
Core | Preview |
| az network public-ip show |
Show details for a public IP address. |
Core | Preview |
az network public-ip create
Create a public IP address.
Create a public IP address in a resource group. The SKU defaults to Standard, the IP version to IPv4 and the idle timeout to 4 minutes. The allocation method defaults to Static for the Standard SKUs and Dynamic for the Basic SKU.
az network public-ip create --location
--name
--resource-group
[--allocation-method {Static, Dynamic}]
[--ddos-custom-policy]
[--ddos-protection-plan]
[--dns-name]
[--dns-name-scope {TenantReuse, SubscriptionReuse, ResourceGroupReuse, NoReuse}]
[--edge-zone]
[--idle-timeout]
[--ip-address]
[--ip-tags]
[--profile]
[--protection-mode {VirtualNetworkInherited, Enabled, Disabled}]
[--public-ip-prefix]
[--reverse-fqdn]
[--sku {Basic, Standard, StandardV2}]
[--subscription-id]
[--tags]
[--tier {Regional, Global}]
[--version {IPv4, IPv6}]
[--zone {1, 2, 3}]
Examples
Create a public IP address
az network public-ip create --name mypip --resource-group myrg --location eastus
Create a zone-redundant Standard address
az network public-ip create --name mypip --resource-group myrg --location eastus \
--sku Standard --zone 1 2 3
Create an address with a DNS name and tags
az network public-ip create --name mypip --resource-group myrg --location eastus \
--dns-name mylabel --tags owner=team-a costCenter=42
Create a Basic dynamic IPv6 address
az network public-ip create --name mypip --resource-group myrg --location eastus \
--sku Basic --version IPv6 --allocation-method Dynamic
Allocate from a public IP prefix
az network public-ip create --name mypip --resource-group myrg --location eastus \
--public-ip-prefix myprefix
Create an address with DDoS protection and an IP tag
az network public-ip create --name mypip --resource-group myrg --location eastus \
--protection-mode Enabled --ddos-protection-plan myplan \
--ip-tags FirstPartyUsage=/Sql
Required Parameters
Location for the public IP address.
The name of the public IP address.
The resource group name.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
IP address allocation method. Defaults to Dynamic for the Basic SKU and Static otherwise.
| Property | Value |
|---|---|
| Accepted values: | Static, Dynamic |
Name or resource id of a DDoS custom policy to associate.
Name or resource id of a DDoS protection plan. Can only be set when the protection mode is Enabled.
Globally unique DNS entry (the domain name label).
The domain name label scope, which selects the reuse policy hashed into the FQDN.
| Property | Value |
|---|---|
| Accepted values: | TenantReuse, SubscriptionReuse, ResourceGroupReuse, NoReuse |
Name of the edge zone (extended location) to create the public IP address in.
Idle timeout in minutes. Defaults to 4.
The IP address to assign, for bring-your-own-IP addresses.
IP tags in TYPE=VALUE form (space-separated), e.g. FirstPartyUsage=/Sql.
Use the named profile for this command (overrides the active profile).
The DDoS protection mode of the public IP address.
| Property | Value |
|---|---|
| Accepted values: | VirtualNetworkInherited, Enabled, Disabled |
Name or resource id of a public IP prefix to allocate the address from.
Reverse FQDN (fully qualified domain name).
Name of the public IP address SKU. Defaults to Standard.
| Property | Value |
|---|---|
| Accepted values: | Basic, Standard, StandardV2 |
Azure Subscription Id. Defaults to the active profile's subscription.
Resource tags in KEY=VALUE form (space-separated).
Tier of the public IP address SKU. Global is only supported for Standard SKU addresses.
| Property | Value |
|---|---|
| Accepted values: | Regional, Global |
IP address version. Defaults to IPv4.
| Property | Value |
|---|---|
| Accepted values: | IPv4, IPv6 |
Availability zones to provision the address into.
| Property | Value |
|---|---|
| Accepted values: | 1, 2, 3 |
Global Parameters
Increase logging verbosity to show all debug logs.
Show help for the command or group and exit.
Bypass the extension discovery cache and reload extensions from disk.
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, table, tsv, yaml, yamlc |
JMESPath query string to filter/project the command result before rendering.
az network public-ip delete
Delete a public IP address.
Delete the named public IP address. The delete fails while the address is still associated with another resource, so detach it from the network interface, load balancer or gateway first.
az network public-ip delete --name
--resource-group
[--profile]
[--subscription-id]
Examples
Delete a public IP address
az network public-ip delete --name mypip --resource-group myrg
Required Parameters
The name of the public IP address.
The resource group name.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Use the named profile for this command (overrides the active profile).
Azure Subscription Id. Defaults to the active profile's subscription.
Global Parameters
Increase logging verbosity to show all debug logs.
Show help for the command or group and exit.
Bypass the extension discovery cache and reload extensions from disk.
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, table, tsv, yaml, yamlc |
JMESPath query string to filter/project the command result before rendering.
az network public-ip list
List public IP addresses.
List public IP addresses in a resource group, or across the whole subscription when --resource-group is omitted.
az network public-ip list [--profile]
[--resource-group]
[--subscription-id]
Examples
List the public IP addresses in a resource group
az network public-ip list --resource-group myrg
List every public IP address in the subscription
az network public-ip list --subscription-id $subId
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Use the named profile for this command (overrides the active profile).
The resource group name. Omit to list every public IP address in the subscription.
Azure Subscription Id. Defaults to the active profile's subscription.
Global Parameters
Increase logging verbosity to show all debug logs.
Show help for the command or group and exit.
Bypass the extension discovery cache and reload extensions from disk.
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, table, tsv, yaml, yamlc |
JMESPath query string to filter/project the command result before rendering.
az network public-ip show
Show details for a public IP address.
Retrieve the full definition of a single public IP address, including its allocated IP address, SKU, DNS settings and provisioning state. Use --expand to inline referenced sub-resources.
az network public-ip show --name
--resource-group
[--expand]
[--profile]
[--subscription-id]
Examples
Show a public IP address
az network public-ip show --name mypip --resource-group myrg
Show using shell variables
az network public-ip show --name $pipName --resource-group $rg --subscription-id $subId
Show a public IP address with its IP configuration expanded
az network public-ip show --name mypip --resource-group myrg --expand ipConfiguration
Required Parameters
The name of the public IP address.
The resource group name.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Expand referenced resources, e.g. ipConfiguration.
Use the named profile for this command (overrides the active profile).
Azure Subscription Id. Defaults to the active profile's subscription.
Global Parameters
Increase logging verbosity to show all debug logs.
Show help for the command or group and exit.
Bypass the extension discovery cache and reload extensions from disk.
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, table, tsv, yaml, yamlc |
JMESPath query string to filter/project the command result before rendering.