Skip to main content

ipam_pool_allocations

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

Overview

Nameipam_pool_allocations
TypeResource
Idaws.ec2.ipam_pool_allocations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
cidrstringThe 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.
descriptionstringA description of the pool allocation.
ipam_pool_allocation_idstringThe ID of an allocation.
resource_idstringThe ID of the resource.
resource_ownerstringThe owner of the resource.
resource_regionstringThe Amazon Web Services Region of the resource.
resource_typestringThe type of the resource.
tagsstringThe tags for the IPAM pool allocation.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_ipam_pool_allocationsselectIpamPoolId, regionDryRun, IpamPoolAllocationId, Filter, MaxResults, NextTokenGet 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_allocationsselectregionDryRun, IpamPoolAllocationId, Filter, MaxResults, NextTokenDescribes 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_allocationupdateIpamPoolId, IpamPoolAllocationId, regionDryRun, CidrRelease 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_allocationupdateIpamPoolAllocationId, regionDryRun, DescriptionModifies 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.

NameDatatypeDescription
IpamPoolAllocationIdstringThe ID of the IPAM pool allocation you want to modify.
IpamPoolIdstringThe ID of the IPAM pool which contains the allocation you want to release.
regionstringAWS region (default: us-east-1)
CidrstringThe CIDR of the allocation you want to release.
DescriptionstringThe new description for the IPAM pool allocation. If you submit a null value, the description is removed from the allocation.
DryRunbooleanA 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.
FilterarrayOne or more filters for the request. For more information about filtering, see Filtering CLI output.
IpamPoolAllocationIdarrayThe IDs of the IPAM pool allocations you want to describe.
MaxResultsintegerThe 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.
NextTokenstringThe token for the next page of results.

SELECT examples

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 }}'
;

UPDATE examples

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;