Skip to content
v2.278.0

CfnSubnetGroupProps Struct ​

Properties for defining a CfnSubnetGroup.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_memorydb as memorydb } from 'aws-cdk-lib';
const cfnSubnetGroupProps: memorydb.CfnSubnetGroupProps = {
  subnetGroupName: 'subnetGroupName',
  subnetIds: ['subnetIds'],

  // the properties below are optional
  description: 'description',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_memorydb as memorydb

cfn_subnet_group_props = memorydb.CfnSubnetGroupProps(
    subnet_group_name="subnetGroupName",
    subnet_ids=["subnetIds"],

    # the properties below are optional
    description="description",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
java
// 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.*;

CfnSubnetGroupProps cfnSubnetGroupProps = CfnSubnetGroupProps.builder()
        .subnetGroupName("subnetGroupName")
        .subnetIds(List.of("subnetIds"))

        // the properties below are optional
        .description("description")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.MemoryDB;

var cfnSubnetGroupProps = new CfnSubnetGroupProps {
    SubnetGroupName = "subnetGroupName",
    SubnetIds = new [] { "subnetIds" },

    // the properties below are optional
    Description = "description",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnSubnetGroupProps := &CfnSubnetGroupProps{
	SubnetGroupName: jsii.String("subnetGroupName"),
	SubnetIds: []interface{}{
		jsii.String("subnetIds"),
	},

	// the properties below are optional
	Description: jsii.String("description"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
}

Properties ​

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #
A description of the subnet group.
subnetGroupNamestringsubnet_group_namestrsubnetGroupNameStringSubnetGroupNamestringSubnetGroupName*string required #
The name of the subnet group to be used for the cluster .
subnetIdsstring | ISubnetRef[]subnet_idstyping.List[typing.Union[str, ISubnetRef]]subnetIdsList<String>SubnetIdsstring[]SubnetIds*[]interface{} required #
A list of Amazon VPC subnet IDs for the subnet group.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
An array of key-value pairs to apply to this resource.

For more information, see Tag .