Skip to main content

ip_allocations

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

Overview

Nameip_allocations
TypeResource
Idazure.network.ip_allocations

Fields

NameDatatypeDescription
idtextResource ID.
nametextResource name.
allocation_tagstextfield from the properties object
etagtextA unique read-only string that changes whenever the resource is updated.
ipAllocationNametextfield from the properties object
ipam_allocation_idtextfield from the properties object
locationtextResource location.
prefixtextfield from the properties object
prefix_lengthtextfield from the properties object
prefix_typetextfield from the properties object
resourceGroupNametextfield from the properties object
subnettextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.
typetextResource type.
virtual_networktextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTipAllocationName, resourceGroupName, subscriptionIdGets the specified IpAllocation by resource group.
listSELECTsubscriptionIdGets all IpAllocations in a subscription.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdGets all IpAllocations in a resource group.
create_or_updateINSERTipAllocationName, resourceGroupName, subscriptionIdCreates or updates an IpAllocation in the specified resource group.
deleteDELETEipAllocationName, resourceGroupName, subscriptionIdDeletes the specified IpAllocation.
update_tagsEXECipAllocationName, resourceGroupName, subscriptionIdUpdates a IpAllocation tags.

SELECT examples

Gets all IpAllocations in a subscription.

SELECT
id,
name,
allocation_tags,
etag,
ipAllocationName,
ipam_allocation_id,
location,
prefix,
prefix_length,
prefix_type,
resourceGroupName,
subnet,
subscriptionId,
tags,
type,
virtual_network
FROM azure.network.vw_ip_allocations
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new ip_allocations resource.

/*+ create */
INSERT INTO azure.network.ip_allocations (
ipAllocationName,
resourceGroupName,
subscriptionId,
properties,
id,
location,
tags
)
SELECT
'{{ ipAllocationName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}',
'{{ id }}',
'{{ location }}',
'{{ tags }}'
;

DELETE example

Deletes the specified ip_allocations resource.

/*+ delete */
DELETE FROM azure.network.ip_allocations
WHERE ipAllocationName = '{{ ipAllocationName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';