ipam_pool_allocations
Creates, updates, deletes, gets or lists an ipam_pool_allocations resource.
Overview
| Name | ipam_pool_allocations |
| Type | Resource |
| Id | aws.ec2.ipam_pool_allocations |
Fields
The following fields are returned by SELECT queries:
- get_ipam_pool_allocations
- describe_ipam_pool_allocations
| Name | Datatype | Description |
|---|---|---|
cidr | string | The CIDR for the allocation. A CIDR is a representation of an IP address and its associated network mask (or netmask) and refers to a range of IP addresses. An IPv4 CIDR example is 10.24.34.0/23. An IPv6 CIDR example is 2001:DB8::/32. |
description | string | A description of the pool allocation. |
ipam_pool_allocation_id | string | The ID of an allocation. |
resource_id | string | The ID of the resource. |
resource_owner | string | The owner of the resource. |
resource_region | string | The Amazon Web Services Region of the resource. |
resource_type | string | The type of the resource. |
tags | string | The tags for the IPAM pool allocation. |
| Name | Datatype | Description |
|---|---|---|
cidr | string | The CIDR for the allocation. A CIDR is a representation of an IP address and its associated network mask (or netmask) and refers to a range of IP addresses. An IPv4 CIDR example is 10.24.34.0/23. An IPv6 CIDR example is 2001:DB8::/32. |
description | string | A description of the pool allocation. |
ipam_pool_allocation_id | string | The ID of an allocation. |
resource_id | string | The ID of the resource. |
resource_owner | string | The owner of the resource. |
resource_region | string | The Amazon Web Services Region of the resource. |
resource_type | string | The type of the resource. |
tags | string | The tags for the IPAM pool allocation. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_ipam_pool_allocations | select | IpamPoolId, region | DryRun, IpamPoolAllocationId, Filter, MaxResults, NextToken | Get a list of all the CIDR allocations in an IPAM pool. The Region you use should be the IPAM pool locale. The locale is the Amazon Web Services Region where this IPAM pool is available for allocations. If you use this action after AllocateIpamPoolCidr or ReleaseIpamPoolAllocation, note that all EC2 API actions follow an eventual consistency model. |
describe_ipam_pool_allocations | select | region | DryRun, IpamPoolAllocationId, Filter, MaxResults, NextToken | Describes IPAM pool allocations. You can describe all allocations owned by you across all pools, or you can describe specific allocations by ID. If you specify IpamPoolAllocationIds, the results include only the specified allocations. If you do not specify IpamPoolAllocationIds, the results include all allocations owned by you. You can use Filters to narrow the results. This action returns only allocations directly owned by you. To view all allocations in a pool you own or that has been shared with you, including allocations owned by other accounts, use GetIpamPoolAllocations. |
release_ipam_pool_allocation | update | IpamPoolId, IpamPoolAllocationId, region | DryRun, Cidr | Release an allocation within an IPAM pool. The Region you use should be the IPAM pool locale. The locale is the Amazon Web Services Region where this IPAM pool is available for allocations. You can only use this action to release manual allocations. To remove an allocation for a resource without deleting the resource, set its monitored state to false using ModifyIpamResourceCidr. For more information, see Release an allocation in the Amazon VPC IPAM User Guide. All EC2 API actions follow an eventual consistency model. |
modify_ipam_pool_allocation | update | IpamPoolAllocationId, region | DryRun, Description | Modifies the description of an IPAM pool allocation. For more information, see Modify an IPAM pool allocation in the Amazon VPC IPAM User Guide. |
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 |
|---|---|---|
IpamPoolAllocationId | string | The ID of the IPAM pool allocation you want to modify. |
IpamPoolId | string | The ID of the IPAM pool which contains the allocation you want to release. |
region | string | AWS region (default: us-east-1) |
Cidr | string | The CIDR of the allocation you want to release. |
Description | string | The new description for the IPAM pool allocation. If you submit a null value, the description is removed from the allocation. |
DryRun | boolean | A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation. |
Filter | array | One or more filters for the request. For more information about filtering, see Filtering CLI output. |
IpamPoolAllocationId | array | The IDs of the IPAM pool allocations you want to describe. |
MaxResults | integer | The maximum number of items to return for this request. To get the next page of items, make another request with the token returned in the output. For more information, see Pagination. |
NextToken | string | The token for the next page of results. |
SELECT examples
- get_ipam_pool_allocations
- describe_ipam_pool_allocations
Get a list of all the CIDR allocations in an IPAM pool. The Region you use should be the IPAM pool locale. The locale is the Amazon Web Services Region where this IPAM pool is available for allocations. If you use this action after AllocateIpamPoolCidr or ReleaseIpamPoolAllocation, note that all EC2 API actions follow an eventual consistency model.
SELECT
cidr,
description,
ipam_pool_allocation_id,
resource_id,
resource_owner,
resource_region,
resource_type,
tags
FROM aws.ec2.ipam_pool_allocations
WHERE IpamPoolId = '{{ IpamPoolId }}' -- required
AND region = '{{ region }}' -- required
AND DryRun = '{{ DryRun }}'
AND IpamPoolAllocationId = '{{ IpamPoolAllocationId }}'
AND Filter = '{{ Filter }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
;
Describes IPAM pool allocations. You can describe all allocations owned by you across all pools, or you can describe specific allocations by ID. If you specify IpamPoolAllocationIds, the results include only the specified allocations. If you do not specify IpamPoolAllocationIds, the results include all allocations owned by you. You can use Filters to narrow the results. This action returns only allocations directly owned by you. To view all allocations in a pool you own or that has been shared with you, including allocations owned by other accounts, use GetIpamPoolAllocations.
SELECT
cidr,
description,
ipam_pool_allocation_id,
resource_id,
resource_owner,
resource_region,
resource_type,
tags
FROM aws.ec2.ipam_pool_allocations
WHERE region = '{{ region }}' -- required
AND DryRun = '{{ DryRun }}'
AND IpamPoolAllocationId = '{{ IpamPoolAllocationId }}'
AND Filter = '{{ Filter }}'
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
;
UPDATE examples
- release_ipam_pool_allocation
- modify_ipam_pool_allocation
Release an allocation within an IPAM pool. The Region you use should be the IPAM pool locale. The locale is the Amazon Web Services Region where this IPAM pool is available for allocations. You can only use this action to release manual allocations. To remove an allocation for a resource without deleting the resource, set its monitored state to false using ModifyIpamResourceCidr. For more information, see Release an allocation in the Amazon VPC IPAM User Guide. All EC2 API actions follow an eventual consistency model.
UPDATE aws.ec2.ipam_pool_allocations
SET
-- No updatable properties
WHERE
IpamPoolId = '{{ IpamPoolId }}' --required
AND IpamPoolAllocationId = '{{ IpamPoolAllocationId }}' --required
AND region = '{{ region }}' --required
AND DryRun = {{ DryRun}}
AND Cidr = '{{ Cidr}}'
RETURNING
success;
Modifies the description of an IPAM pool allocation. For more information, see Modify an IPAM pool allocation in the Amazon VPC IPAM User Guide.
UPDATE aws.ec2.ipam_pool_allocations
SET
-- No updatable properties
WHERE
IpamPoolAllocationId = '{{ IpamPoolAllocationId }}' --required
AND region = '{{ region }}' --required
AND DryRun = {{ DryRun}}
AND Description = '{{ Description}}'
RETURNING
cidr,
description,
ipam_pool_allocation_id,
resource_id,
resource_owner,
resource_region,
resource_type,
tags;