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:

Request successful. The operation returns the resulting PublicIPPrefix resource.

NameDatatypeDescription
idstring (arm-id)Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
namestringThe name of the resource
etagstringA unique read-only string that changes whenever the resource is updated.
extendedLocationobjectThe extended location of the public ip address.
propertiesobjectPublic IP prefix properties.
skuobjectThe public IP prefix SKU.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
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
getselectresourceGroupName, publicIpPrefixName, subscriptionId$expandGets the specified public IP prefix in a specified resource group.
listselectresourceGroupName, subscriptionIdGets all public IP prefixes in a resource group.
list_allselectsubscriptionIdGets all the public IP prefixes in a subscription.
create_or_updateinsertresourceGroupName, publicIpPrefixName, subscriptionIdCreates or updates a static or dynamic public IP prefix.
deletedeleteresourceGroupName, publicIpPrefixName, subscriptionIdDeletes the specified public IP prefix.
update_tagsexecresourceGroupName, publicIpPrefixName, subscriptionIdUpdates public IP prefix tags.

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
publicIpPrefixNamestringThe name of the public IP prefix.
resourceGroupNamestringThe name of the resource group.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.
$expandstringExpands referenced resources.

SELECT examples

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

SELECT
id,
name,
etag,
extendedLocation,
properties,
sku,
systemData,
type,
zones
FROM azure.network.public_ip_prefixes
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND publicIpPrefixName = '{{ publicIpPrefixName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND $expand = '{{ $expand }}'
;

INSERT examples

Creates or updates a static or dynamic public IP prefix.

INSERT INTO azure.network.public_ip_prefixes (
data__extendedLocation,
data__sku,
data__properties,
data__zones,
resourceGroupName,
publicIpPrefixName,
subscriptionId
)
SELECT
'{{ extendedLocation }}',
'{{ sku }}',
'{{ properties }}',
'{{ zones }}',
'{{ resourceGroupName }}',
'{{ publicIpPrefixName }}',
'{{ subscriptionId }}'
RETURNING
id,
name,
etag,
extendedLocation,
properties,
sku,
systemData,
type,
zones
;

DELETE examples

Deletes the specified public IP prefix.

DELETE FROM azure.network.public_ip_prefixes
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND publicIpPrefixName = '{{ publicIpPrefixName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;

Lifecycle Methods

Updates public IP prefix tags.

EXEC azure.network.public_ip_prefixes.update_tags 
@resourceGroupName='{{ resourceGroupName }}' --required,
@publicIpPrefixName='{{ publicIpPrefixName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
@@json=
'{
"tags": "{{ tags }}"
}'
;