Skip to main content

public_ip_prefixes

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

Overview

Namepublic_ip_prefixes
TypeResource
Idazure.network.public_ip_prefixes

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringResource ID.
namestringResource name.
customIPPrefixobjectReference to another subresource.
etagstringA unique read-only string that changes whenever the resource is updated.
extendedLocationobjectThe extended location of the public ip address.
ipPrefixstringThe allocated Prefix.
ipTagsarrayThe list of tags associated with the public IP prefix.
loadBalancerFrontendIpConfigurationobjectReference to another subresource.
locationstringResource location.
natGatewayobjectNatGateway of Public IP Prefix.
prefixLengthintegerThe Length of the Public IP Prefix.
provisioningStatestringThe provisioning state of the public IP prefix 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)
publicIPAddressesarrayThe list of all referenced PublicIPAddresses.
resourceGuidstringThe resource GUID property of the public IP prefix resource.
skuobjectThe public IP prefix 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
getselectresource_group_name, public_ip_prefix_name, subscription_id$expandGets the specified public IP prefix in a specified resource group.
listselectresource_group_name, subscription_idGets all public IP prefixes in a resource group.
list_allselectsubscription_idGets all the public IP prefixes in a subscription.
create_or_updateinsertresource_group_name, public_ip_prefix_name, subscription_idCreates or updates a static or dynamic public IP prefix.
update_tagsupdateresource_group_name, public_ip_prefix_name, subscription_idUpdates public IP prefix tags.
create_or_updatereplaceresource_group_name, public_ip_prefix_name, subscription_idCreates or updates a static or dynamic public IP prefix.
deletedeleteresource_group_name, public_ip_prefix_name, subscription_idDeletes the specified public IP prefix.

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
public_ip_prefix_namestringThe name of the public IP prefix. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
$expandstringExpands referenced resources. Default value is None.

SELECT examples

Gets the specified public IP prefix in a specified resource group.

SELECT
id,
name,
customIPPrefix,
etag,
extendedLocation,
ipPrefix,
ipTags,
loadBalancerFrontendIpConfiguration,
location,
natGateway,
prefixLength,
provisioningState,
publicIPAddressVersion,
publicIPAddresses,
resourceGuid,
sku,
tags,
type,
zones
FROM azure.network.public_ip_prefixes
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND public_ip_prefix_name = '{{ public_ip_prefix_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $expand = '{{ $expand }}'
;

INSERT examples

Creates or updates a static or dynamic public IP prefix.

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

UPDATE examples

Updates public IP prefix tags.

UPDATE azure.network.public_ip_prefixes
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND public_ip_prefix_name = '{{ public_ip_prefix_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 prefix.

REPLACE azure.network.public_ip_prefixes
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_prefix_name = '{{ public_ip_prefix_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 prefix.

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