ipam_pool_cidrs
Creates, updates, deletes or gets an ipam_pool_cidr resource or lists ipam_pool_cidrs in a region
Overview
| Name | ipam_pool_cidrs |
| Type | Resource |
| Description | Resource Schema of AWS::EC2::IPAMPoolCidr Type |
| Id | awscc.ec2.ipam_pool_cidrs |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
ipam_pool_cidr_id | string | Id of the IPAM Pool Cidr. |
ipam_pool_id | string | Id of the IPAM Pool. |
cidr | string | Represents a single IPv4 or IPv6 CIDR |
netmask_length | integer | The 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. |
state | string | Provisioned state of the cidr. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
ipam_pool_cidr_id | string | Id of the IPAM Pool Cidr. |
ipam_pool_id | string | Id of the IPAM Pool. |
cidr | string | Represents a single IPv4 or IPv6 CIDR |
region | string | AWS region. |
For more information, see AWS::EC2::IPAMPoolCidr.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | ipam_pool_cidrs | INSERT | IpamPoolId, region |
delete_resource | ipam_pool_cidrs | DELETE | Identifier, region |
list_resources | ipam_pool_cidrs_list_only | SELECT | region |
get_resource | ipam_pool_cidrs | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual ipam_pool_cidr.
SELECT
region,
ipam_pool_cidr_id,
ipam_pool_id,
cidr,
netmask_length,
state
FROM awscc.ec2.ipam_pool_cidrs
WHERE
region = 'us-east-1' AND
Identifier = '{{ ipam_pool_id }}|{{ ipam_pool_cidr_id }}';
Lists all ipam_pool_cidrs in a region.
SELECT
region,
ipam_pool_id,
ipam_pool_cidr_id
FROM awscc.ec2.ipam_pool_cidrs_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new ipam_pool_cidr resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.ec2.ipam_pool_cidrs (
IpamPoolId,
region
)
SELECT
'{{ ipam_pool_id }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.ec2.ipam_pool_cidrs (
IpamPoolId,
Cidr,
NetmaskLength,
region
)
SELECT
'{{ ipam_pool_id }}',
'{{ cidr }}',
'{{ netmask_length }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: ipam_pool_cidr
props:
- name: ipam_pool_id
value: '{{ ipam_pool_id }}'
- name: cidr
value: '{{ cidr }}'
- name: netmask_length
value: '{{ netmask_length }}'
DELETE example
/*+ delete */
DELETE FROM awscc.ec2.ipam_pool_cidrs
WHERE
Identifier = '{{ ipam_pool_id }}|{{ ipam_pool_cidr_id }}' AND
region = 'us-east-1';
Permissions
To operate on the ipam_pool_cidrs resource, the following permissions are required:
- Create
- Read
- Delete
- List
ec2:ProvisionIpamPoolCidr,
ec2:GetIpamPoolCidrs
ec2:GetIpamPoolCidrs
ec2:DeprovisionIpamPoolCidr,
ec2:GetIpamPoolCidrs
ec2:GetIpamPoolCidrs