subnet_cidr_blocks
Creates, updates, deletes or gets a subnet_cidr_block
resource or lists subnet_cidr_blocks
in a region
Overview
Name | subnet_cidr_blocks |
Type | Resource |
Description | The AWS::EC2::SubnetCidrBlock resource creates association between subnet and IPv6 CIDR |
Id | aws.ec2.subnet_cidr_blocks |
Fields
Name | Datatype | Description |
---|---|---|
id | string | Information about the IPv6 association. |
ipv6_cidr_block | string | The IPv6 network range for the subnet, in CIDR notation. The subnet size must use a /64 prefix length |
ipv6_ipam_pool_id | string | The ID of an IPv6 Amazon VPC IP Address Manager (IPAM) pool from which to allocate, to get the subnet's CIDR |
ipv6_netmask_length | integer | The netmask length of the IPv6 CIDR to allocate to the subnet from an IPAM pool |
subnet_id | string | The ID of the subnet |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | SubnetId, region |
delete_resource | DELETE | data__Identifier, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all subnet_cidr_blocks
in a region.
SELECT
region,
id,
ipv6_cidr_block,
ipv6_ipam_pool_id,
ipv6_netmask_length,
subnet_id
FROM aws.ec2.subnet_cidr_blocks
WHERE region = 'us-east-1';
Gets all properties from an individual subnet_cidr_block
.
SELECT
region,
id,
ipv6_cidr_block,
ipv6_ipam_pool_id,
ipv6_netmask_length,
subnet_id
FROM aws.ec2.subnet_cidr_blocks
WHERE region = 'us-east-1' AND data__Identifier = '<Id>';
INSERT
example
Use the following StackQL query and manifest file to create a new subnet_cidr_block
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.ec2.subnet_cidr_blocks (
SubnetId,
region
)
SELECT
'{{ SubnetId }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.ec2.subnet_cidr_blocks (
Ipv6CidrBlock,
Ipv6IpamPoolId,
Ipv6NetmaskLength,
SubnetId,
region
)
SELECT
'{{ Ipv6CidrBlock }}',
'{{ Ipv6IpamPoolId }}',
'{{ Ipv6NetmaskLength }}',
'{{ SubnetId }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: subnet_cidr_block
props:
- name: Ipv6CidrBlock
value: '{{ Ipv6CidrBlock }}'
- name: Ipv6IpamPoolId
value: '{{ Ipv6IpamPoolId }}'
- name: Ipv6NetmaskLength
value: '{{ Ipv6NetmaskLength }}'
- name: SubnetId
value: '{{ SubnetId }}'
DELETE
example
/*+ delete */
DELETE FROM aws.ec2.subnet_cidr_blocks
WHERE data__Identifier = '<Id>'
AND region = 'us-east-1';
Permissions
To operate on the subnet_cidr_blocks
resource, the following permissions are required:
Create
ec2:AssociateSubnetCidrBlock,
ec2:DescribeSubnets
Delete
ec2:DisassociateSubnetCidrBlock,
ec2:DescribeSubnets
List
ec2:DescribeSubnets
Read
ec2:DescribeSubnets