@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-31T18:37:02.117Z") public class SubnetGroup extends Resource implements ISubnetGroup
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.*; import software.amazon.awscdk.services.rds.*; import software.amazon.awscdk.core.*; Subnet subnet; SubnetFilter subnetFilter; Vpc vpc; SubnetGroup subnetGroup = SubnetGroup.Builder.create(this, "MySubnetGroup") .description("description") .vpc(vpc) // the properties below are optional .removalPolicy(RemovalPolicy.DESTROY) .subnetGroupName("subnetGroupName") .vpcSubnets(SubnetSelection.builder() .availabilityZones(List.of("availabilityZones")) .onePerAz(false) .subnetFilters(List.of(subnetFilter)) .subnetGroupName("subnetGroupName") .subnetName("subnetName") .subnets(List.of(subnet)) .subnetType(SubnetType.ISOLATED) .build()) .build();
Modifier and Type | Class and Description |
---|---|
static class |
SubnetGroup.Builder
A fluent builder for
SubnetGroup . |
ISubnetGroup.Jsii$Default, ISubnetGroup.Jsii$Proxy
Modifier | Constructor and Description |
---|---|
protected |
SubnetGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
SubnetGroup(software.amazon.jsii.JsiiObjectRef objRef) |
|
SubnetGroup(software.constructs.Construct scope,
java.lang.String id,
SubnetGroupProps props) |
Modifier and Type | Method and Description |
---|---|
static ISubnetGroup |
fromSubnetGroupName(software.constructs.Construct scope,
java.lang.String id,
java.lang.String subnetGroupName)
Imports an existing subnet group by name.
|
java.lang.String |
getSubnetGroupName()
The name of the subnet group.
|
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
applyRemovalPolicy, getEnv, getStack
getNode
protected SubnetGroup(software.amazon.jsii.JsiiObjectRef objRef)
protected SubnetGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public SubnetGroup(software.constructs.Construct scope, java.lang.String id, SubnetGroupProps props)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.public static ISubnetGroup fromSubnetGroupName(software.constructs.Construct scope, java.lang.String id, java.lang.String subnetGroupName)
scope
- This parameter is required.id
- This parameter is required.subnetGroupName
- This parameter is required.public java.lang.String getSubnetGroupName()
getSubnetGroupName
in interface ISubnetGroup