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 | aws.ec2.ipam_pool_cidrs |
Fields
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. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | IpamPoolId, region |
delete_resource | DELETE | data__Identifier, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.ec2.ipam_pool_cidrs (
IpamPoolId,
region
)
SELECT
'{{ IpamPoolId }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.ec2.ipam_pool_cidrs (
IpamPoolId,
Cidr,
NetmaskLength,
region
)
SELECT
'{{ IpamPoolId }}',
'{{ Cidr }}',
'{{ NetmaskLength }}',
'{{ 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: IpamPoolId
value: '{{ IpamPoolId }}'
- name: Cidr
value: '{{ Cidr }}'
- name: NetmaskLength
value: '{{ NetmaskLength }}'
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