subnet_cidr_blocks
Used to retrieve a list of subnet_cidr_blocks
in a region or to create or delete a subnet_cidr_blocks
resource, use subnet_cidr_block
to read or update an individual resource.
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. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | SubnetId, region |
delete_resource | DELETE | data__Identifier, region |
list_resource | SELECT | region |
SELECT
Example
SELECT
region,
id
FROM aws.ec2.subnet_cidr_blocks
WHERE region = 'us-east-1';
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