@Generated(value="jsii-pacmak/1.30.0 (build adae23f)", date="2021-06-30T10:01:06.674Z") @Stability(value=Experimental) public class Subnet extends Resource implements ISubnet
| Modifier and Type | Class and Description |
|---|---|
static class |
Subnet.Builder
(experimental) A fluent builder for
Subnet. |
software.amazon.jsii.JsiiObject.InitializationModeISubnet.Jsii$Default, ISubnet.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
Subnet(software.constructs.Construct scope,
String id,
SubnetProps props) |
protected |
Subnet(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Subnet(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDefaultInternetRoute(String gatewayId,
software.constructs.IDependable gatewayAttachment)
(experimental) Create a default route that points to a passed IGW, with a dependency on the IGW's attachment to the VPC.
|
void |
addDefaultNatRoute(String natGatewayId)
(experimental) Adds an entry to this subnets route table that points to the passed NATGatewayId.
|
void |
addRoute(String id,
AddRouteOptions options)
(experimental) Adds an entry to this subnets route table.
|
void |
associateNetworkAcl(String id,
INetworkAcl networkAcl)
(experimental) Associate a Network ACL with this subnet.
|
static ISubnet |
fromSubnetAttributes(software.constructs.Construct scope,
String id,
SubnetAttributes attrs) |
static ISubnet |
fromSubnetId(software.constructs.Construct scope,
String id,
String subnetId)
(experimental) Import existing subnet from id.
|
String |
getAvailabilityZone()
(experimental) The Availability Zone the subnet is located in.
|
List<software.constructs.IDependable> |
getDependencyElements()
(experimental) Parts of this VPC subnet.
|
software.constructs.IDependable |
getInternetConnectivityEstablished()
(experimental) Dependable that can be depended upon to force internet connectivity established on the VPC.
|
String |
getIpv4CidrBlock()
(experimental) The IPv4 CIDR block for this subnet.
|
INetworkAcl |
getNetworkAcl()
(experimental) Network ACL associated with this Subnet.
|
IRouteTable |
getRouteTable()
(experimental) The routeTableId attached to this subnet.
|
String |
getSubnetAvailabilityZone() |
String |
getSubnetId()
(experimental) The subnetId for this particular subnet.
|
List<String> |
getSubnetIpv6CidrBlocks() |
String |
getSubnetNetworkAclAssociationId() |
String |
getSubnetOutpostArn()
(experimental) The Amazon Resource Name (ARN) of the Outpost for this subnet (if one exists).
|
String |
getSubnetVpcId() |
static Boolean |
isVpcSubnet(Object x) |
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected Subnet(software.amazon.jsii.JsiiObjectRef objRef)
protected Subnet(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public Subnet(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
SubnetProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Experimental) @NotNull public static ISubnet fromSubnetAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull SubnetAttributes attrs)
scope - This parameter is required.id - This parameter is required.attrs - This parameter is required.@Stability(value=Experimental) @NotNull public static ISubnet fromSubnetId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String subnetId)
scope - This parameter is required.id - This parameter is required.subnetId - This parameter is required.@Stability(value=Experimental) @NotNull public static Boolean isVpcSubnet(@NotNull Object x)
x - This parameter is required.@Stability(value=Experimental)
public void addDefaultInternetRoute(@NotNull
String gatewayId,
@NotNull
software.constructs.IDependable gatewayAttachment)
gatewayId - the logical ID (ref) of the gateway attached to your VPC. This parameter is required.gatewayAttachment - the gateway attachment construct to be added as a dependency. This parameter is required.@Stability(value=Experimental)
public void addDefaultNatRoute(@NotNull
String natGatewayId)
natGatewayId - The ID of the NAT gateway. This parameter is required.@Stability(value=Experimental)
public void addRoute(@NotNull
String id,
@NotNull
AddRouteOptions options)
id - This parameter is required.options - This parameter is required.@Stability(value=Experimental)
public void associateNetworkAcl(@NotNull
String id,
@NotNull
INetworkAcl networkAcl)
associateNetworkAcl in interface ISubnetid - This parameter is required.networkAcl - This parameter is required.@Stability(value=Experimental) @NotNull public String getAvailabilityZone()
getAvailabilityZone in interface ISubnet@Stability(value=Experimental) @NotNull public List<software.constructs.IDependable> getDependencyElements()
@Stability(value=Experimental) @NotNull public software.constructs.IDependable getInternetConnectivityEstablished()
getInternetConnectivityEstablished in interface ISubnet@Stability(value=Experimental) @NotNull public String getIpv4CidrBlock()
getIpv4CidrBlock in interface ISubnet@Stability(value=Experimental) @NotNull public INetworkAcl getNetworkAcl()
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 explicit ALLOW entries that you add by creating a NetworkAcl
object and calling associateNetworkAcl().
@Stability(value=Experimental) @NotNull public IRouteTable getRouteTable()
getRouteTable in interface ISubnet@Stability(value=Experimental) @NotNull public String getSubnetAvailabilityZone()
@Stability(value=Experimental) @NotNull public String getSubnetId()
getSubnetId in interface ISubnet@Stability(value=Experimental) @NotNull public List<String> getSubnetIpv6CidrBlocks()
@Stability(value=Experimental) @NotNull public String getSubnetNetworkAclAssociationId()
@Stability(value=Experimental) @NotNull public String getSubnetOutpostArn()
@Stability(value=Experimental) @NotNull public String getSubnetVpcId()
Copyright © 2021. All rights reserved.