ip_allocations
Creates, updates, deletes, gets or lists an ip_allocations resource.
Overview
| Name | ip_allocations |
| Type | Resource |
| Id | azure.network.ip_allocations |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_resource_group
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
allocationTags | object | IpAllocation tags. |
etag | string | A unique read-only string that changes whenever the resource is updated. |
ipamAllocationId | string | The IPAM allocation ID. |
location | string | Resource location. |
prefix | string | The address prefix for the IpAllocation. |
prefixLength | integer | The address prefix length for the IpAllocation. |
prefixType | string | The address prefix Type for the IpAllocation. Known values are: "IPv4" and "IPv6". (IPv4, IPv6) |
subnet | object | Reference to another subresource. |
tags | object | Resource tags. |
type | string | Resource type. |
virtualNetwork | object | Reference to another subresource. |
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
allocationTags | object | IpAllocation tags. |
etag | string | A unique read-only string that changes whenever the resource is updated. |
ipamAllocationId | string | The IPAM allocation ID. |
location | string | Resource location. |
prefix | string | The address prefix for the IpAllocation. |
prefixLength | integer | The address prefix length for the IpAllocation. |
prefixType | string | The address prefix Type for the IpAllocation. Known values are: "IPv4" and "IPv6". (IPv4, IPv6) |
subnet | object | Reference to another subresource. |
tags | object | Resource tags. |
type | string | Resource type. |
virtualNetwork | object | Reference to another subresource. |
| Name | Datatype | Description |
|---|---|---|
id | string | Resource ID. |
name | string | Resource name. |
allocationTags | object | IpAllocation tags. |
etag | string | A unique read-only string that changes whenever the resource is updated. |
ipamAllocationId | string | The IPAM allocation ID. |
location | string | Resource location. |
prefix | string | The address prefix for the IpAllocation. |
prefixLength | integer | The address prefix length for the IpAllocation. |
prefixType | string | The address prefix Type for the IpAllocation. Known values are: "IPv4" and "IPv6". (IPv4, IPv6) |
subnet | object | Reference to another subresource. |
tags | object | Resource tags. |
type | string | Resource type. |
virtualNetwork | object | Reference to another subresource. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, ip_allocation_name, subscription_id | $expand | Gets the specified IpAllocation by resource group. |
list_by_resource_group | select | resource_group_name, subscription_id | Gets all IpAllocations in a resource group. | |
list | select | subscription_id | Gets all IpAllocations in a subscription. | |
create_or_update | insert | resource_group_name, ip_allocation_name, subscription_id | Creates or updates an IpAllocation in the specified resource group. | |
update_tags | update | resource_group_name, ip_allocation_name, subscription_id | Updates a IpAllocation tags. | |
create_or_update | replace | resource_group_name, ip_allocation_name, subscription_id | Creates or updates an IpAllocation in the specified resource group. | |
delete | delete | resource_group_name, ip_allocation_name, subscription_id | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
ip_allocation_name | string | The name of the IpAllocation. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
$expand | string | Expands referenced resources. Default value is None. |
SELECT examples
- get
- list_by_resource_group
- list
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 }}'
;
Gets all IpAllocations in a 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 subscription_id = '{{ subscription_id }}' -- required
;
Gets all IpAllocations in a subscription.
SELECT
id,
name,
allocationTags,
etag,
ipamAllocationId,
location,
prefix,
prefixLength,
prefixType,
subnet,
tags,
type,
virtualNetwork
FROM azure.network.ip_allocations
WHERE subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: ip_allocations
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the ip_allocations resource.
- name: ip_allocation_name
value: "{{ ip_allocation_name }}"
description: Required parameter for the ip_allocations resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the ip_allocations resource.
- name: id
value: "{{ id }}"
description: |
Resource ID.
- name: location
value: "{{ location }}"
description: |
Resource location.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: properties
description: |
Properties of the IpAllocation.
value:
subnet:
id: "{{ id }}"
virtualNetwork:
id: "{{ id }}"
type: "{{ type }}"
prefix: "{{ prefix }}"
prefixLength: {{ prefixLength }}
prefixType: "{{ prefixType }}"
ipamAllocationId: "{{ ipamAllocationId }}"
allocationTags: "{{ allocationTags }}"
UPDATE examples
- update_tags
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
- create_or_update
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
- delete
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
;