az network public-ip
Manage public IP addresses.
To learn more about public IP addresses visit https://learn.microsoft.com/azure/virtual-network/virtual-network-public-ip-address.
Commands
Name | Description | Type | Status |
---|---|---|---|
az network public-ip create |
Create a public IP address. |
Core | GA |
az network public-ip ddos-protection |
Manage public IP DDoS protection. |
Core | GA |
az network public-ip ddos-protection show |
Get the DDoS protection status of a public IP address. |
Core | GA |
az network public-ip delete |
Delete a public IP address. |
Core | GA |
az network public-ip list |
List public IP addresses. |
Core | GA |
az network public-ip prefix |
Manage public IP prefix resources. |
Core | GA |
az network public-ip prefix create |
Create a public IP prefix resource. |
Core | GA |
az network public-ip prefix delete |
Delete a public IP prefix resource. |
Core | GA |
az network public-ip prefix list |
List public IP prefix resources. |
Core | GA |
az network public-ip prefix show |
Get the details of a public IP prefix resource. |
Core | GA |
az network public-ip prefix update |
Update a public IP prefix resource. |
Core | GA |
az network public-ip prefix wait |
Place the CLI in a waiting state until a condition is met. |
Core | GA |
az network public-ip show |
Get the details of a public IP address. |
Core | GA |
az network public-ip update |
Update a public IP address. |
Core | GA |
az network public-ip wait |
Place the CLI in a waiting state until a condition is met. |
Core | GA |
az network public-ip create
Create a public IP address.
az network public-ip create --name
--resource-group
[--allocation-method {Dynamic, Static}]
[--ddos-protection-mode --protection-mode {Disabled, Enabled, VirtualNetworkInherited}]
[--ddos-protection-plan]
[--dns-name]
[--dns-name-scope {NoReuse, ResourceGroupReuse, SubscriptionReuse, TenantReuse}]
[--edge-zone]
[--idle-timeout]
[--ip-address]
[--ip-tags]
[--location]
[--public-ip-prefix]
[--reverse-fqdn]
[--sku {Basic, Standard}]
[--tags]
[--tier {Global, Regional}]
[--version {IPv4, IPv6}]
[--zone]
Examples
Create a basic public IP resource.
az network public-ip create -g MyResourceGroup -n MyIp
Create a static public IP resource for a DNS name label.
az network public-ip create -g MyResourceGroup -n MyIp --dns-name MyLabel --allocation-method Static
Create a public IP resource in an availability zone in the current resource group region.
az network public-ip create -g MyResourceGroup -n MyIp --zone 2
Required Parameters
The name of the public IP address.
Name of resource group. You can configure the default group using az configure --defaults 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.
Property | Value |
---|---|
Accepted values: | Dynamic, Static |
The DDoS protection mode of the public IP.
Property | Value |
---|---|
Accepted values: | Disabled, Enabled, VirtualNetworkInherited |
Name or ID of a DDoS protection plan associated with the public IP. Can only be set if --protection-mode
is Enabled.
Globally unique DNS entry.
The domain name label scope. If a domain name label and a domain name label scope are specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system with a hashed value includes in FQDN.
Property | Value |
---|---|
Accepted values: | NoReuse, ResourceGroupReuse, SubscriptionReuse, TenantReuse |
The name of edge zone.
Idle timeout in minutes.
Property | Value |
---|---|
Default value: | 4 |
The IP address associated with the public IP address resource.
Space-separated list of IP tags in 'TYPE=VAL' format.
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
Name or ID of a public IP prefix.
Reverse FQDN (fully qualified domain name).
Name of a public IP address SKU.
Property | Value |
---|---|
Default value: | Standard |
Accepted values: | Basic, Standard |
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Tier of a public IP address SKU and Global tier is only supported for standard SKU public IP addresses.
Property | Value |
---|---|
Accepted values: | Global, Regional |
IP address type.
Property | Value |
---|---|
Accepted values: | IPv4, IPv6 |
Space-separated list of availability zones into which to provision the resource.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az network public-ip delete
Delete a public IP address.
az network public-ip delete [--ids]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
Examples
Delete a public IP address.
az network public-ip delete -g MyResourceGroup -n MyIp
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The name of the public IP address.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az network public-ip list
List public IP addresses.
az network public-ip list [--max-items]
[--next-token]
[--resource-group]
Examples
List all public IPs in a subscription.
az network public-ip list
List all public IPs in a resource group.
az network public-ip list -g MyResourceGroup
List all public IPs of a domain name label.
az network public-ip list -g MyResourceGroup --query "[?dnsSettings.domainNameLabel=='MyLabel']"
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token
argument of a subsequent command.
Property | Value |
---|---|
Parameter group: | Pagination Arguments |
Token to specify where to start paginating. This is the token value from a previously truncated response.
Property | Value |
---|---|
Parameter group: | Pagination Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az network public-ip show
Get the details of a public IP address.
az network public-ip show [--expand]
[--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Get information about a public IP resource.
az network public-ip show -g MyResourceGroup -n MyIp
Get the FQDN and IP address of a public IP resource.
az network public-ip show -g MyResourceGroup -n MyIp --query "{fqdn: dnsSettings.fqdn,address: ipAddress}"
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Expands referenced resources.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The name of the public IP address.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az network public-ip update
Update a public IP address.
az network public-ip update [--add]
[--allocation-method {Dynamic, Static}]
[--ddos-protection-mode --protection-mode {Disabled, Enabled, VirtualNetworkInherited}]
[--ddos-protection-plan]
[--dns-name]
[--dns-name-scope {NoReuse, ResourceGroupReuse, SubscriptionReuse, TenantReuse}]
[--force-string {0, 1, f, false, n, no, t, true, y, yes}]
[--idle-timeout]
[--ids]
[--ip-tags]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--public-ip-prefix]
[--remove]
[--resource-group]
[--reverse-fqdn]
[--set]
[--sku {Basic, Standard}]
[--subscription]
[--tags]
[--version {IPv4, IPv6}]
Examples
Update a public IP resource with a DNS name label and static allocation.
az network public-ip update -g MyResourceGroup -n MyIp --dns-name MyLabel --allocation-method Static
Detach a DDoS protection plan in a public IP resource.
az network public-ip update -g MyResourceGroup -n MyIP --protection-mode Disabled --ddos-protection-plan null
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
IP address allocation method.
Property | Value |
---|---|
Accepted values: | Dynamic, Static |
The DDoS protection mode of the public IP.
Property | Value |
---|---|
Accepted values: | Disabled, Enabled, VirtualNetworkInherited |
Name or ID of a DDoS protection plan associated with the public IP. Can only be set if --protection-mode
is Enabled.
Globally unique DNS entry.
The domain name label scope. If a domain name label and a domain name label scope are specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system with a hashed value includes in FQDN.
Property | Value |
---|---|
Accepted values: | NoReuse, ResourceGroupReuse, SubscriptionReuse, TenantReuse |
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Idle timeout in minutes.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Space-separated list of IP tags in TYPE=VAL
format. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
The name of the public IP address.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Name or ID of a public IP prefix.
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Reverse FQDN (fully qualified domain name).
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
Property | Value |
---|---|
Parameter group: | Generic Update Arguments |
Name of a public IP address SKU.
Property | Value |
---|---|
Accepted values: | Basic, Standard |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Space-separated tags: key[=value] [key[=value] ...]. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
IP address type.
Property | Value |
---|---|
Default value: | IPv4 |
Accepted values: | IPv4, IPv6 |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az network public-ip wait
Place the CLI in a waiting state until a condition is met.
az network public-ip wait [--created]
[--custom]
[--deleted]
[--exists]
[--expand]
[--ids]
[--interval]
[--name]
[--resource-group]
[--subscription]
[--timeout]
[--updated]
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Wait until created with 'provisioningState' at 'Succeeded'.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | False |
Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Wait until deleted.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | False |
Wait until the resource exists.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | False |
Expands referenced resources.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Polling interval in seconds.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | 30 |
The name of the public IP address.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Maximum wait in seconds.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | 3600 |
Wait until updated with provisioningState at 'Succeeded'.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |