Skip to main content

subnet_cidr_blocks

Creates, updates, deletes or gets a subnet_cidr_block resource or lists subnet_cidr_blocks in a region

Overview

Namesubnet_cidr_blocks
TypeResource
DescriptionThe AWS::EC2::SubnetCidrBlock resource creates association between subnet and IPv6 CIDR
Idawscc.ec2.subnet_cidr_blocks

Fields

NameDatatypeDescription
idstringInformation about the IPv6 association.
ipv6_cidr_blockstringThe IPv6 network range for the subnet, in CIDR notation. The subnet size must use a /64 prefix length
ipv6_ipam_pool_idstringThe ID of an IPv6 Amazon VPC IP Address Manager (IPAM) pool from which to allocate, to get the subnet's CIDR
ipv6_netmask_lengthintegerThe netmask length of the IPv6 CIDR to allocate to the subnet from an IPAM pool
subnet_idstringThe ID of the subnet
ipv6_address_attributestringThe value denoting whether an IPv6 Subnet CIDR Block is public or private.
ip_sourcestringThe IP Source of an IPv6 Subnet CIDR Block.
regionstringAWS region.

For more information, see AWS::EC2::SubnetCidrBlock.

Methods

NameResourceAccessible byRequired Params
create_resourcesubnet_cidr_blocksINSERTSubnetId, region
delete_resourcesubnet_cidr_blocksDELETEIdentifier, region
list_resourcessubnet_cidr_blocks_list_onlySELECTregion
get_resourcesubnet_cidr_blocksSELECTIdentifier, region

SELECT examples

Gets all properties from an individual subnet_cidr_block.

SELECT
region,
id,
ipv6_cidr_block,
ipv6_ipam_pool_id,
ipv6_netmask_length,
subnet_id,
ipv6_address_attribute,
ip_source
FROM awscc.ec2.subnet_cidr_blocks
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.ec2.subnet_cidr_blocks (
SubnetId,
region
)
SELECT
'{{ subnet_id }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.ec2.subnet_cidr_blocks
WHERE
Identifier = '{{ id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

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

ec2:AssociateSubnetCidrBlock,
ec2:DescribeSubnets