@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.492Z") @Stability(value=Stable) 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. |
software.amazon.jsii.JsiiObject.InitializationModeIPublicSubnet.Jsii$Default, IPublicSubnet.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
PublicSubnet(software.constructs.Construct scope,
String id,
PublicSubnetProps props) |
protected |
PublicSubnet(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
PublicSubnet(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
CfnNatGateway |
addNatGateway()
Creates a new managed NAT gateway attached to this public subnet.
|
CfnNatGateway |
addNatGateway(String eipAllocationId)
Creates a new managed NAT gateway attached to this public subnet.
|
static IPublicSubnet |
fromPublicSubnetAttributes(software.constructs.Construct scope,
String id,
PublicSubnetAttributes attrs) |
addDefaultInternetRoute, addDefaultNatRoute, addRoute, associateNetworkAcl, fromSubnetAttributes, fromSubnetId, getAvailabilityZone, getDependencyElements, getInternetConnectivityEstablished, getIpv4CidrBlock, getNetworkAcl, getRouteTable, getSubnetAvailabilityZone, getSubnetId, getSubnetIpv6CidrBlocks, getSubnetNetworkAclAssociationId, getSubnetOutpostArn, getSubnetVpcId, isVpcSubnetapplyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitassociateNetworkAcl, getAvailabilityZone, getInternetConnectivityEstablished, getIpv4CidrBlock, getRouteTable, getSubnetIdapplyRemovalPolicy, getEnv, getStackprotected PublicSubnet(software.amazon.jsii.JsiiObjectRef objRef)
protected PublicSubnet(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public PublicSubnet(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
PublicSubnetProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Stable) @NotNull public static IPublicSubnet fromPublicSubnetAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull PublicSubnetAttributes attrs)
scope - This parameter is required.id - This parameter is required.attrs - This parameter is required.@Stability(value=Stable) @NotNull public CfnNatGateway addNatGateway(@Nullable String eipAllocationId)
Also adds the EIP for the managed NAT.
eipAllocationId - @Stability(value=Stable) @NotNull public CfnNatGateway addNatGateway()
Also adds the EIP for the managed NAT.
Copyright © 2022. All rights reserved.