# CfnSubnetGroupProps

Properties for defining a `CfnSubnetGroup`.

Extends: CfnSubnetGroupProps
Used as props by: CfnSubnetGroup

- Source: Generated code
- Type last changed: v2.227.0 · 21 Nov 2025

## Example

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

  // the properties below are optional
  cacheSubnetGroupName: 'cacheSubnetGroupName',
  tags: [{
    key: 'key',
    value: 'value',
  }],
};
```

## Properties

- `cacheSubnetGroupName`: string — The name for the cache subnet group. This value is stored as a lowercase string.

  Constraints: Must contain no more than 255 alphanumeric characters or hyphens.

  Example: `mysubnetgroup`

- `description`: string (required) — The description for the cache subnet group.

- `subnetIds`: string | [ISubnetRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_ec2.ISubnetRef.html)[] (required) — The EC2 subnet IDs for the cache subnet group.

- `tags`: [CfnTag](/cdk/api/v2/docs/aws-cdk-lib.CfnTag.html)[] — A tag that can be added to an ElastiCache subnet group.

  Tags are composed of a Key/Value pair. You can use tags to categorize and track all your subnet groups. A tag with a null Value is permitted.
