PublicSubnetAttributes Struct
| Source | aws-ec2/lib/vpc.ts |
|---|
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const publicSubnetAttributes: ec2.PublicSubnetAttributes = {
subnetId: 'subnetId',
// the properties below are optional
availabilityZone: 'availabilityZone',
ipv4CidrBlock: 'ipv4CidrBlock',
routeTableId: 'routeTableId',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ec2 as ec2
public_subnet_attributes = ec2.PublicSubnetAttributes(
subnet_id="subnetId",
# the properties below are optional
availability_zone="availabilityZone",
ipv4_cidr_block="ipv4CidrBlock",
route_table_id="routeTableId"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.*;
PublicSubnetAttributes publicSubnetAttributes = PublicSubnetAttributes.builder()
.subnetId("subnetId")
// the properties below are optional
.availabilityZone("availabilityZone")
.ipv4CidrBlock("ipv4CidrBlock")
.routeTableId("routeTableId")
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;
var publicSubnetAttributes = new PublicSubnetAttributes {
SubnetId = "subnetId",
// the properties below are optional
AvailabilityZone = "availabilityZone",
Ipv4CidrBlock = "ipv4CidrBlock",
RouteTableId = "routeTableId"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
publicSubnetAttributes := &PublicSubnetAttributes{
SubnetId: jsii.String("subnetId"),
// the properties below are optional
AvailabilityZone: jsii.String("availabilityZone"),
Ipv4CidrBlock: jsii.String("ipv4CidrBlock"),
RouteTableId: jsii.String("routeTableId"),
}
Properties
availabilityZoneoptionalstringavailability_zoneoptionalstravailabilityZoneoptionalStringAvailabilityZoneoptionalstringAvailabilityZoneoptional*string #The Availability Zone the subnet is located in.
Default: No AZ information, cannot use AZ selection features
ipv4CidrBlockoptionalstringipv4_cidr_blockoptionalstripv4CidrBlockoptionalStringIpv4CidrBlockoptionalstringIpv4CidrBlockoptional*string #The IPv4 CIDR block associated with the subnet.
Default: No CIDR information, cannot use CIDR filter features
routeTableIdoptionalstringroute_table_idoptionalstrrouteTableIdoptionalStringRouteTableIdoptionalstringRouteTableIdoptional*string #The ID of the route table for this particular subnet.
Default: No route table information, cannot create VPC endpoints
The subnetId for this particular subnet.