class PrivateSubnet (construct)
Represents a private VPC subnet resource.
new PrivateSubnet(scope: Construct, id: string, props: PrivateSubnetProps)
|availability||The availability zone for the subnet.|
|cidr||The CIDR notation for this subnet.|
|vpc||The VPC which this subnet is part of.|
|map||Controls if a public IP is associated to an instance at launch.|
The availability zone for the subnet.
The CIDR notation for this subnet.
The VPC which this subnet is part of.
(optional, default: true in Subnet.Public, false in Subnet.Private or Subnet.Isolated.)
Controls if a public IP is associated to an instance at launch.
|availability||The Availability Zone the subnet is located in.|
|dependency||Parts of this VPC subnet.|
|internet||Dependable that can be depended upon to force internet connectivity established on the VPC.|
|network||Network ACL associated with this Subnet.|
|node||Construct tree node which offers APIs for interacting with the construct tree.|
|route||The routeTableId attached to this subnet.|
|stack||The stack in which this resource is defined.|
|subnet||The subnetId for this particular subnet.|
The Availability Zone the subnet is located in.
Parts of this VPC subnet.
Dependable that can be depended upon to force internet connectivity established on the VPC.
Network ACL associated with this Subnet.
Upon creation, this is the default ACL which allows all traffic, except explicit DENY entries that you add.
You can replace it with a custom ACL which denies all traffic except
the explic it ALLOW entries that you add by creating a
object and calling
Construct tree node which offers APIs for interacting with the construct tree.
The routeTableId attached to this subnet.
The stack in which this resource is defined.
The subnetId for this particular subnet.
|add||Create a default route that points to a passed IGW, with a dependency on the IGW's attachment to the VPC.|
|add||Adds an entry to this subnets route table that points to the passed NATGatwayId.|
|add||Adds an entry to this subnets route table.|
|associate||Associate a Network ACL with this subnet.|
|to||Returns a string representation of this construct.|
Default Internet Route(gatewayId, gatewayAttachment)
public addDefaultInternetRoute(gatewayId: string, gatewayAttachment: IDependable): void
string— the logical ID (ref) of the gateway attached to your VPC.
IDependable— the gateway attachment construct to be added as a dependency.
Create a default route that points to a passed IGW, with a dependency on the IGW's attachment to the VPC.
Default Nat Route(natGatewayId)
public addDefaultNatRoute(natGatewayId: string): void
string— The ID of the NAT gateway.
Adds an entry to this subnets route table that points to the passed NATGatwayId.
public addRoute(id: string, options: AddRouteOptions): void
Adds an entry to this subnets route table.
Network Acl(id, networkAcl)
public associateNetworkAcl(id: string, networkAcl: INetworkAcl): void
Associate a Network ACL with this subnet.
public toString(): string
Returns a string representation of this construct.
Private Subnet Attributes(scope, id, attrs)
public static fromPrivateSubnetAttributes(scope: Construct, id: string, attrs: PrivateSubnetAttributes): IPrivateSubnet