Skip to main content

ipam_allocations

Creates, updates, deletes or gets an ipam_allocation resource or lists ipam_allocations in a region

Overview

Nameipam_allocations
TypeResource
DescriptionResource Schema of AWS::EC2::IPAMAllocation Type
Idawscc.ec2.ipam_allocations

Fields

NameDatatypeDescription
ipam_pool_allocation_idstringId of the allocation.
ipam_pool_idstringId of the IPAM Pool.
cidrstringRepresents a single IPv4 or IPv6 CIDR
netmask_lengthintegerThe desired netmask length of the allocation. If set, IPAM will choose a block of free space with this size and return the CIDR representing it.
descriptionstring
regionstringAWS region.

For more information, see AWS::EC2::IPAMAllocation.

Methods

NameResourceAccessible byRequired Params
create_resourceipam_allocationsINSERTIpamPoolId, region
delete_resourceipam_allocationsDELETEIdentifier, region
list_resourcesipam_allocations_list_onlySELECTregion
get_resourceipam_allocationsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual ipam_allocation.

SELECT
region,
ipam_pool_allocation_id,
ipam_pool_id,
cidr,
netmask_length,
description
FROM awscc.ec2.ipam_allocations
WHERE
region = 'us-east-1' AND
Identifier = '{{ ipam_pool_id }}|{{ ipam_pool_allocation_id }}|{{ cidr }}';

INSERT example

Use the following StackQL query and manifest file to create a new ipam_allocation resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.ec2.ipam_allocations (
IpamPoolId,
region
)
SELECT
'{{ ipam_pool_id }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM awscc.ec2.ipam_allocations
WHERE
Identifier = '{{ ipam_pool_id }}|{{ ipam_pool_allocation_id }}|{{ cidr }}' AND
region = 'us-east-1';

Permissions

To operate on the ipam_allocations resource, the following permissions are required:

ec2:AllocateIpamPoolCidr,
ec2:GetIpamPoolAllocations