Skip to main content

ipam_pool_cidrs

Creates, updates, deletes or gets an ipam_pool_cidr resource or lists ipam_pool_cidrs in a region

Overview

Nameipam_pool_cidrs
TypeResource
DescriptionResource Schema of AWS::EC2::IPAMPoolCidr Type
Idaws.ec2.ipam_pool_cidrs

Fields

NameDatatypeDescription
ipam_pool_cidr_idstringId of the IPAM Pool Cidr.
ipam_pool_idstringId of the IPAM Pool.
cidrstringRepresents a single IPv4 or IPv6 CIDR
netmask_lengthintegerThe desired netmask length of the provision. If set, IPAM will choose a block of free space with this size and return the CIDR representing it.
statestringProvisioned state of the cidr.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTIpamPoolId, region
delete_resourceDELETEdata__Identifier, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all ipam_pool_cidrs in a region.

SELECT
region,
ipam_pool_cidr_id,
ipam_pool_id,
cidr,
netmask_length,
state
FROM aws.ec2.ipam_pool_cidrs
WHERE region = 'us-east-1';

Gets all properties from an individual ipam_pool_cidr.

SELECT
region,
ipam_pool_cidr_id,
ipam_pool_id,
cidr,
netmask_length,
state
FROM aws.ec2.ipam_pool_cidrs
WHERE region = 'us-east-1' AND data__Identifier = '<IpamPoolId>|<IpamPoolCidrId>';

INSERT example

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

/*+ create */
INSERT INTO aws.ec2.ipam_pool_cidrs (
IpamPoolId,
region
)
SELECT
'{{ IpamPoolId }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.ec2.ipam_pool_cidrs
WHERE data__Identifier = '<IpamPoolId|IpamPoolCidrId>'
AND region = 'us-east-1';

Permissions

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

Create

ec2:ProvisionIpamPoolCidr,
ec2:GetIpamPoolCidrs

Read

ec2:GetIpamPoolCidrs

Delete

ec2:DeprovisionIpamPoolCidr,
ec2:GetIpamPoolCidrs

List

ec2:GetIpamPoolCidrs