Skip to main content

ip_allocations

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

Overview

Nameip_allocations
TypeResource
Idazure.network.ip_allocations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringResource ID.
namestringResource name.
allocationTagsobjectIpAllocation tags.
etagstringA unique read-only string that changes whenever the resource is updated.
ipamAllocationIdstringThe IPAM allocation ID.
locationstringResource location.
prefixstringThe address prefix for the IpAllocation.
prefixLengthintegerThe address prefix length for the IpAllocation.
prefixTypestringThe address prefix Type for the IpAllocation. Known values are: "IPv4" and "IPv6". (IPv4, IPv6)
subnetobjectReference to another subresource.
tagsobjectResource tags.
typestringResource type.
virtualNetworkobjectReference to another subresource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, ip_allocation_name, subscription_id$expandGets the specified IpAllocation by resource group.
list_by_resource_groupselectresource_group_name, subscription_idGets all IpAllocations in a resource group.
listselectsubscription_idGets all IpAllocations in a subscription.
create_or_updateinsertresource_group_name, ip_allocation_name, subscription_idCreates or updates an IpAllocation in the specified resource group.
update_tagsupdateresource_group_name, ip_allocation_name, subscription_idUpdates a IpAllocation tags.
create_or_updatereplaceresource_group_name, ip_allocation_name, subscription_idCreates or updates an IpAllocation in the specified resource group.
deletedeleteresource_group_name, ip_allocation_name, subscription_idDeletes the specified IpAllocation.

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
ip_allocation_namestringThe name of the IpAllocation. 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 IpAllocation by resource group.

SELECT
id,
name,
allocationTags,
etag,
ipamAllocationId,
location,
prefix,
prefixLength,
prefixType,
subnet,
tags,
type,
virtualNetwork
FROM azure.network.ip_allocations
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND ip_allocation_name = '{{ ip_allocation_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $expand = '{{ $expand }}'
;

INSERT examples

Creates or updates an IpAllocation in the specified resource group.

INSERT INTO azure.network.ip_allocations (
id,
location,
tags,
properties,
resource_group_name,
ip_allocation_name,
subscription_id
)
SELECT
'{{ id }}',
'{{ location }}',
'{{ tags }}',
'{{ properties }}',
'{{ resource_group_name }}',
'{{ ip_allocation_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
etag,
location,
properties,
tags,
type
;

UPDATE examples

Updates a IpAllocation tags.

UPDATE azure.network.ip_allocations
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND ip_allocation_name = '{{ ip_allocation_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
location,
properties,
tags,
type;

REPLACE examples

Creates or updates an IpAllocation in the specified resource group.

REPLACE azure.network.ip_allocations
SET
id = '{{ id }}',
location = '{{ location }}',
tags = '{{ tags }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND ip_allocation_name = '{{ ip_allocation_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
etag,
location,
properties,
tags,
type;

DELETE examples

Deletes the specified IpAllocation.

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