# AWS::MemoryDB::SubnetGroup The AWS::MemoryDB::SubnetGroup resource creates an Amazon MemoryDB Subnet Group. ## Syntax To declare this entity in your AWS CloudFormation template, use the following syntax: ### JSON
{
    "Type" : "AWS::MemoryDB::SubnetGroup",
    "Properties" : {
        "SubnetGroupName" : String,
        "Description" : String,
        "SubnetIds" : [ String, ... ],
        "Tags" : [ Tag, ... ],
    }
}
### YAML
Type: AWS::MemoryDB::SubnetGroup
Properties:
    SubnetGroupName: String
    Description: String
    SubnetIds: 
      - String
    Tags: 
      - Tag
## Properties #### SubnetGroupName The name of the subnet group. This value must be unique as it also serves as the subnet group identifier. _Required_: Yes _Type_: String _Pattern_: [a-z][a-z0-9\-]* _Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) #### Description An optional description of the subnet group. _Required_: No _Type_: String _Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) #### SubnetIds A list of VPC subnet IDs for the subnet group. _Required_: Yes _Type_: List of String _Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) #### Tags An array of key-value pairs to apply to this subnet group. _Required_: No _Type_: List of Tag _Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) ## Return Values ### Ref When you pass the logical ID of this resource to the intrinsic `Ref` function, Ref returns the SubnetGroupName. ### Fn::GetAtt The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values. For more information about using the `Fn::GetAtt` intrinsic function, see [Fn::GetAtt](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html). #### ARN The Amazon Resource Name (ARN) of the subnet group.