Class SubnetGroup
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.rds.SubnetGroup
- All Implemented Interfaces:
IResource,ISubnetGroup,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)",
date="2025-10-14T12:28:19.042Z")
@Stability(Stable)
public class SubnetGroup
extends Resource
implements ISubnetGroup
Class for creating a RDS DB subnet group.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.ec2.*;
import software.amazon.awscdk.services.rds.*;
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")
.subnets(List.of(subnet))
.subnetType(SubnetType.PRIVATE_ISOLATED)
.build())
.build();
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.rds.ISubnetGroup
ISubnetGroup.Jsii$Default, ISubnetGroup.Jsii$Proxy -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSubnetGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedSubnetGroup(software.amazon.jsii.JsiiObjectRef objRef) SubnetGroup(software.constructs.Construct scope, String id, SubnetGroupProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic ISubnetGroupfromSubnetGroupName(software.constructs.Construct scope, String id, String subnetGroupName) Imports an existing subnet group by name.The name of the subnet group.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
Constructor Details
-
SubnetGroup
protected SubnetGroup(software.amazon.jsii.JsiiObjectRef objRef) -
SubnetGroup
protected SubnetGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
SubnetGroup
@Stability(Stable) public SubnetGroup(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull SubnetGroupProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
fromSubnetGroupName
@Stability(Stable) @NotNull public static ISubnetGroup fromSubnetGroupName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String subnetGroupName) Imports an existing subnet group by name.- Parameters:
scope- This parameter is required.id- This parameter is required.subnetGroupName- This parameter is required.
-
getSubnetGroupName
The name of the subnet group.- Specified by:
getSubnetGroupNamein interfaceISubnetGroup
-