@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-04-20T17:18:02.065Z") @Stability(value=Stable) public class CfnSubnetGroup extends CfnResource implements IInspectable
Specifies a subnet group. A subnet group is a collection of subnets (typically private) that you can designate for your cluster s running in an Amazon Virtual Private Cloud (VPC) environment. When you create a cluster in an Amazon VPC , you must specify a subnet group. MemoryDB uses that subnet group to choose a subnet and IP addresses within that subnet to associate with your nodes. For more information, see Subnets and subnet groups .
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.memorydb.*;
CfnSubnetGroup cfnSubnetGroup = CfnSubnetGroup.Builder.create(this, "MyCfnSubnetGroup")
.subnetGroupName("subnetGroupName")
.subnetIds(List.of("subnetIds"))
// the properties below are optional
.description("description")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnSubnetGroup.Builder
A fluent builder for
CfnSubnetGroup. |
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$ProxyIConstruct.Jsii$Default| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnSubnetGroup(Construct scope,
String id,
CfnSubnetGroupProps props)
Create a new `AWS::MemoryDB::SubnetGroup`.
|
protected |
CfnSubnetGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnSubnetGroup(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttrArn()
When you pass the logical ID of this resource to the intrinsic `Ref` function, Ref returns the ARN of the subnet group, such as `arn:aws:memorydb:us-east-1:123456789012:subnetgroup/my-subnet-group`.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getDescription()
A description of the subnet group.
|
String |
getSubnetGroupName()
The name of the subnet group to be used for the cluster .
|
List<String> |
getSubnetIds()
A list of Amazon VPC subnet IDs for the subnet group.
|
TagManager |
getTags()
An array of key-value pairs to apply to this resource.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setDescription(String value)
A description of the subnet group.
|
void |
setSubnetGroupName(String value)
The name of the subnet group to be used for the cluster .
|
void |
setSubnetIds(List<String> value)
A list of Amazon VPC subnet IDs for the subnet group.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnSubnetGroup(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnSubnetGroup(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnSubnetGroup(@NotNull
Construct scope,
@NotNull
String id,
@NotNull
CfnSubnetGroupProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrArn()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
For more information, see Tag .
@Stability(value=Stable) @NotNull public String getSubnetGroupName()
@Stability(value=Stable)
public void setSubnetGroupName(@NotNull
String value)
@Stability(value=Stable) @NotNull public List<String> getSubnetIds()
@Stability(value=Stable)
public void setSubnetIds(@NotNull
List<String> value)
@Stability(value=Stable) @Nullable public String getDescription()
@Stability(value=Stable)
public void setDescription(@Nullable
String value)
Copyright © 2023. All rights reserved.