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

Preview

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 -l

Location for the public IP address.

--name -n

The name of the public IP address.

--resource-group -g

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.

--allocation-method

IP address allocation method. Defaults to Dynamic for the Basic SKU and Static otherwise.

Property Value
Accepted values: Static, Dynamic
--ddos-custom-policy

Name or resource id of a DDoS custom policy to associate.

--ddos-protection-plan

Name or resource id of a DDoS protection plan. Can only be set when the protection mode is Enabled.

--dns-name

Globally unique DNS entry (the domain name label).

--dns-name-scope

The domain name label scope, which selects the reuse policy hashed into the FQDN.

Property Value
Accepted values: TenantReuse, SubscriptionReuse, ResourceGroupReuse, NoReuse
--edge-zone

Name of the edge zone (extended location) to create the public IP address in.

--idle-timeout

Idle timeout in minutes. Defaults to 4.

--ip-address

The IP address to assign, for bring-your-own-IP addresses.

--ip-tags

IP tags in TYPE=VALUE form (space-separated), e.g. FirstPartyUsage=/Sql.

--profile

Use the named profile for this command (overrides the active profile).

--protection-mode

The DDoS protection mode of the public IP address.

Property Value
Accepted values: VirtualNetworkInherited, Enabled, Disabled
--public-ip-prefix

Name or resource id of a public IP prefix to allocate the address from.

--reverse-fqdn

Reverse FQDN (fully qualified domain name).

--sku

Name of the public IP address SKU. Defaults to Standard.

Property Value
Accepted values: Basic, Standard, StandardV2
--subscription-id

Azure Subscription Id. Defaults to the active profile's subscription.

--tags

Resource tags in KEY=VALUE form (space-separated).

--tier

Tier of the public IP address SKU. Global is only supported for Standard SKU addresses.

Property Value
Accepted values: Regional, Global
--version

IP address version. Defaults to IPv4.

Property Value
Accepted values: IPv4, IPv6
--zone -z

Availability zones to provision the address into.

Property Value
Accepted values: 1, 2, 3
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h -help -? --?

Show help for the command or group and exit.

--no-cache

Bypass the extension discovery cache and reload extensions from disk.

--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, table, tsv, yaml, yamlc
--query

JMESPath query string to filter/project the command result before rendering.

az network public-ip delete

Preview

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

--name -n

The name of the public IP address.

--resource-group -g

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.

--profile

Use the named profile for this command (overrides the active profile).

--subscription-id

Azure Subscription Id. Defaults to the active profile's subscription.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h -help -? --?

Show help for the command or group and exit.

--no-cache

Bypass the extension discovery cache and reload extensions from disk.

--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, table, tsv, yaml, yamlc
--query

JMESPath query string to filter/project the command result before rendering.

az network public-ip list

Preview

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.

--profile

Use the named profile for this command (overrides the active profile).

--resource-group -g

The resource group name. Omit to list every public IP address in the subscription.

--subscription-id

Azure Subscription Id. Defaults to the active profile's subscription.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h -help -? --?

Show help for the command or group and exit.

--no-cache

Bypass the extension discovery cache and reload extensions from disk.

--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, table, tsv, yaml, yamlc
--query

JMESPath query string to filter/project the command result before rendering.

az network public-ip show

Preview

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

--name -n

The name of the public IP address.

--resource-group -g

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

Expand referenced resources, e.g. ipConfiguration.

--profile

Use the named profile for this command (overrides the active profile).

--subscription-id

Azure Subscription Id. Defaults to the active profile's subscription.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h -help -? --?

Show help for the command or group and exit.

--no-cache

Bypass the extension discovery cache and reload extensions from disk.

--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, table, tsv, yaml, yamlc
--query

JMESPath query string to filter/project the command result before rendering.