interface ISubnetV2
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.ec2.Alpha.ISubnetV2 |
Go | github.com/aws/aws-cdk-go/awsec2alpha/v2#ISubnetV2 |
Java | software.amazon.awscdk.services.ec2.alpha.ISubnetV2 |
Python | aws_cdk.aws_ec2_alpha.ISubnetV2 |
TypeScript (source) | @aws-cdk/aws-ec2-alpha ยป ISubnetV2 |
Implemented by
Subnet
Obtainable from
Subnet
.fromSubnetV2Attributes()
Interface with additional properties for SubnetV2.
Properties
Name | Type | Description |
---|---|---|
availability | string | The Availability Zone the subnet is located in. |
env | Resource | The environment this resource belongs to. |
internet | IDependable | Dependable that can be depended upon to force internet connectivity established on the VPC. |
ipv4 | string | The IPv4 CIDR block for this subnet. |
node | Node | The tree node. |
route | IRoute | The route table for this subnet. |
stack | Stack | The stack in which this resource is defined. |
subnet | string | The subnetId for this particular subnet. |
ipv6 | string | The IPv6 CIDR block for this subnet. |
subnet | Subnet | The type of subnet (public or private) that this subnet represents. |
availabilityZone
Type:
string
The Availability Zone the subnet is located in.
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
internetConnectivityEstablished
Type:
IDependable
Dependable that can be depended upon to force internet connectivity established on the VPC.
ipv4CidrBlock
Type:
string
The IPv4 CIDR block for this subnet.
node
Type:
Node
The tree node.
routeTable
Type:
IRoute
The route table for this subnet.
stack
Type:
Stack
The stack in which this resource is defined.
subnetId
Type:
string
The subnetId for this particular subnet.
ipv6CidrBlock?
Type:
string
(optional)
The IPv6 CIDR block for this subnet.
subnetType?
Type:
Subnet
(optional)
The type of subnet (public or private) that this subnet represents.
Methods
Name | Description |
---|---|
apply | Apply the given removal policy to this resource. |
associate | Associate a Network ACL with this subnet. |
RemovalPolicy(policy)
applypublic applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
NetworkAcl(id, acl)
associatepublic associateNetworkAcl(id: string, acl: INetworkAcl): void
Parameters
- id
string
- acl
INetwork
โ The Network ACL to associate.Acl
Associate a Network ACL with this subnet.