@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-14T16:25:28.737Z") public class PublicSubnet extends Subnet implements IPublicSubnet
Example:
// 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.*; PublicSubnet publicSubnet = PublicSubnet.Builder.create(this, "MyPublicSubnet") .availabilityZone("availabilityZone") .cidrBlock("cidrBlock") .vpcId("vpcId") // the properties below are optional .mapPublicIpOnLaunch(false) .build();
Modifier and Type | Class and Description |
---|---|
static class |
PublicSubnet.Builder
A fluent builder for
PublicSubnet . |
IPublicSubnet.Jsii$Default, IPublicSubnet.Jsii$Proxy
Modifier | Constructor and Description |
---|---|
protected |
PublicSubnet(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
PublicSubnet(software.amazon.jsii.JsiiObjectRef objRef) |
|
PublicSubnet(software.constructs.Construct scope,
java.lang.String id,
PublicSubnetProps props) |
Modifier and Type | Method and Description |
---|---|
CfnNatGateway |
addNatGateway()
Creates a new managed NAT gateway attached to this public subnet.
|
CfnNatGateway |
addNatGateway(java.lang.String eipAllocationId)
Creates a new managed NAT gateway attached to this public subnet.
|
static IPublicSubnet |
fromPublicSubnetAttributes(software.constructs.Construct scope,
java.lang.String id,
PublicSubnetAttributes attrs) |
addDefaultInternetRoute, addDefaultNatRoute, addRoute, associateNetworkAcl, fromSubnetAttributes, fromSubnetId, getAvailabilityZone, getDependencyElements, getInternetConnectivityEstablished, getIpv4CidrBlock, getNetworkAcl, getRouteTable, getSubnetAvailabilityZone, getSubnetId, getSubnetIpv6CidrBlocks, getSubnetNetworkAclAssociationId, getSubnetOutpostArn, getSubnetVpcId, isVpcSubnet
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
associateNetworkAcl, getAvailabilityZone, getInternetConnectivityEstablished, getIpv4CidrBlock, getRouteTable, getSubnetId
applyRemovalPolicy, getEnv, getStack
getNode
protected PublicSubnet(software.amazon.jsii.JsiiObjectRef objRef)
protected PublicSubnet(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public PublicSubnet(software.constructs.Construct scope, java.lang.String id, PublicSubnetProps props)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.public static IPublicSubnet fromPublicSubnetAttributes(software.constructs.Construct scope, java.lang.String id, PublicSubnetAttributes attrs)
scope
- This parameter is required.id
- This parameter is required.attrs
- This parameter is required.public CfnNatGateway addNatGateway(java.lang.String eipAllocationId)
Also adds the EIP for the managed NAT.
eipAllocationId
- public CfnNatGateway addNatGateway()
Also adds the EIP for the managed NAT.