Skip to main content

public_ip_addresses

Creates, updates, deletes, gets or lists a public_ip_addresses resource.

Overview

Namepublic_ip_addresses
TypeResource
Idazure.network.public_ip_addresses

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringResource ID.
namestringResource name.
ddosSettingsobjectThe DDoS protection custom policy associated with the public IP address.
deleteOptionstringSpecify what happens to the public IP address when the VM using it is deleted. Known values are: "Delete" and "Detach". (Delete, Detach)
dnsSettingsobjectThe FQDN of the DNS record associated with the public IP address.
etagstringA unique read-only string that changes whenever the resource is updated.
extendedLocationobjectThe extended location of the public ip address.
idleTimeoutInMinutesintegerThe idle timeout of the public IP address.
ipAddressstringThe IP address associated with the public IP address resource.
ipConfigurationobjectIP configuration.
ipTagsarrayThe list of tags associated with the public IP address.
linkedPublicIPAddressobjectThe linked public IP address of the public IP address resource.
locationstringResource location.
migrationPhasestringMigration phase of Public IP Address. Known values are: "None", "Prepare", "Commit", "Abort", and "Committed". (None, Prepare, Commit, Abort, Committed)
natGatewayobjectThe NatGateway for the Public IP address.
provisioningStatestringThe provisioning state of the public IP address resource. Known values are: "Failed", "Succeeded", "Canceled", "Creating", "Updating", and "Deleting". (Failed, Succeeded, Canceled, Creating, Updating, Deleting)
publicIPAddressVersionstringThe public IP address version. Known values are: "IPv4" and "IPv6". (IPv4, IPv6)
publicIPAllocationMethodstringThe public IP address allocation method. Known values are: "Static" and "Dynamic". (Static, Dynamic)
publicIPPrefixobjectReference to another subresource.
resourceGuidstringThe resource GUID property of the public IP address resource.
servicePublicIPAddressobjectThe service public IP address of the public IP address resource.
skuobjectThe public IP address SKU.
tagsobjectResource tags.
typestringResource type.
zonesarrayA list of availability zones denoting the IP allocated for the resource needs to come from.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_cloud_service_public_ip_addressselectresource_group_name, cloud_service_name, role_instance_name, network_interface_name, ip_configuration_name, public_ip_address_name, subscription_id$expandGet the specified public IP address in a cloud service.
get_virtual_machine_scale_set_public_ip_addressselectresource_group_name, virtual_machine_scale_set_name, virtualmachine_index, network_interface_name, ip_configuration_name, public_ip_address_name, subscription_id$expandGet the specified public IP address in a virtual machine scale set.
list_cloud_service_role_instance_public_ip_addressesselectresource_group_name, cloud_service_name, role_instance_name, network_interface_name, ip_configuration_name, subscription_idGets information about all public IP addresses in a role instance IP configuration in a cloud service.
list_virtual_machine_scale_set_vm_public_ip_addressesselectresource_group_name, virtual_machine_scale_set_name, virtualmachine_index, network_interface_name, ip_configuration_name, subscription_idGets information about all public IP addresses in a virtual machine IP configuration in a virtual machine scale set.
getselectresource_group_name, public_ip_address_name, subscription_id$expandGets the specified public IP address in a specified resource group.
list_cloud_service_public_ip_addressesselectresource_group_name, cloud_service_name, subscription_idGets information about all public IP addresses on a cloud service level.
list_virtual_machine_scale_set_public_ip_addressesselectresource_group_name, virtual_machine_scale_set_name, subscription_idGets information about all public IP addresses on a virtual machine scale set level.
listselectresource_group_name, subscription_idGets all public IP addresses in a resource group.
list_allselectsubscription_idGets all the public IP addresses in a subscription.
create_or_updateinsertresource_group_name, public_ip_address_name, subscription_idCreates or updates a static or dynamic public IP address.
update_tagsupdateresource_group_name, public_ip_address_name, subscription_idUpdates public IP address tags.
create_or_updatereplaceresource_group_name, public_ip_address_name, subscription_idCreates or updates a static or dynamic public IP address.
deletedeleteresource_group_name, public_ip_address_name, subscription_idDeletes the specified public IP address.
ddos_protection_statusexecresource_group_name, public_ip_address_name, subscription_idGets the Ddos Protection Status of a Public IP Address.
reserve_cloud_service_public_ip_addressexecresource_group_name, public_ip_address_name, subscription_id, isRollbackReserves the specified Cloud Service Public IP by switching its allocation method to Static. If rollback is requested, reverts the allocation method to Dynamic.
disassociate_cloud_service_reserved_public_ipexecresource_group_name, public_ip_address_name, subscription_id, publicIpArmIdDisassociates the Cloud Service reserved Public IP and associates the specified Standalone Public IP to the same Cloud Service frontend.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
cloud_service_namestringThe name of the cloud service. Required.
ip_configuration_namestringRequired.
network_interface_namestringRequired.
public_ip_address_namestringThe name of the public IP address. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
role_instance_namestringThe role instance name. Required.
subscription_idstring
virtual_machine_scale_set_namestringThe name of the virtual machine scale set. Required.
virtualmachine_indexstringRequired.
$expandstringExpands referenced resources. Default value is None.

SELECT examples

Get the specified public IP address in a cloud service.

SELECT
id,
name,
ddosSettings,
deleteOption,
dnsSettings,
etag,
extendedLocation,
idleTimeoutInMinutes,
ipAddress,
ipConfiguration,
ipTags,
linkedPublicIPAddress,
location,
migrationPhase,
natGateway,
provisioningState,
publicIPAddressVersion,
publicIPAllocationMethod,
publicIPPrefix,
resourceGuid,
servicePublicIPAddress,
sku,
tags,
type,
zones
FROM azure.network.public_ip_addresses
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND cloud_service_name = '{{ cloud_service_name }}' -- required
AND role_instance_name = '{{ role_instance_name }}' -- required
AND network_interface_name = '{{ network_interface_name }}' -- required
AND ip_configuration_name = '{{ ip_configuration_name }}' -- required
AND public_ip_address_name = '{{ public_ip_address_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $expand = '{{ $expand }}'
;

INSERT examples

Creates or updates a static or dynamic public IP address.

INSERT INTO azure.network.public_ip_addresses (
id,
location,
tags,
properties,
extendedLocation,
sku,
zones,
resource_group_name,
public_ip_address_name,
subscription_id
)
SELECT
'{{ id }}',
'{{ location }}',
'{{ tags }}',
'{{ properties }}',
'{{ extendedLocation }}',
'{{ sku }}',
'{{ zones }}',
'{{ resource_group_name }}',
'{{ public_ip_address_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
extendedLocation,
location,
properties,
sku,
tags,
type,
zones
;

UPDATE examples

Updates public IP address tags.

UPDATE azure.network.public_ip_addresses
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND public_ip_address_name = '{{ public_ip_address_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
extendedLocation,
location,
properties,
sku,
tags,
type,
zones;

REPLACE examples

Creates or updates a static or dynamic public IP address.

REPLACE azure.network.public_ip_addresses
SET
id = '{{ id }}',
location = '{{ location }}',
tags = '{{ tags }}',
properties = '{{ properties }}',
extendedLocation = '{{ extendedLocation }}',
sku = '{{ sku }}',
zones = '{{ zones }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND public_ip_address_name = '{{ public_ip_address_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
extendedLocation,
location,
properties,
sku,
tags,
type,
zones;

DELETE examples

Deletes the specified public IP address.

DELETE FROM azure.network.public_ip_addresses
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND public_ip_address_name = '{{ public_ip_address_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Gets the Ddos Protection Status of a Public IP Address.

EXEC azure.network.public_ip_addresses.ddos_protection_status 
@resource_group_name='{{ resource_group_name }}' --required,
@public_ip_address_name='{{ public_ip_address_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;