AWS::ElastiCache::SubnetGroup
Creates a cache subnet group. For more information about cache subnet groups, go to Cache Subnet Groups in the Amazon ElastiCache User Guide or go to CreateCacheSubnetGroup in the Amazon ElastiCache API Reference Guide.
Topics
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::ElastiCache::SubnetGroup", "Properties" : { "CacheSubnetGroupName" :String, "Description" :String, "SubnetIds" : [String, ...] } }
YAML
Type: AWS::ElastiCache::SubnetGroup Properties: CacheSubnetGroupName:StringDescription:StringSubnetIds: -String
Properties
CacheSubnetGroupName-
A name for the cache subnet group. If you don't specify a name, AWS CloudFormation generates a unique physical ID. For more information, see Name Type.
Important
If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
Required: No
Type: String
Update requires: Replacement
Description-
The description for the cache subnet group.
Type: String
Required: Yes
Update requires: No interruption
SubnetIds-
The Amazon EC2 subnet IDs for the cache subnet group.
Type: String list
Required: Yes
Update requires: No interruption
Return Value
Ref
When the logical ID of this resource is provided to the Ref intrinsic
function, Ref returns the resource name.
For more information about using the Ref function, see Ref.
Example
JSON
"SubnetGroup" : { "Type" : "AWS::ElastiCache::SubnetGroup", "Properties" : { "Description" : "Cache Subnet Group", "SubnetIds" : [ { "Ref" : "Subnet1" }, { "Ref" : "Subnet2" } ] } }
YAML
SubnetGroup: Type: AWS::ElastiCache::SubnetGroup Properties: Description: "Cache Subnet Group" SubnetIds: - Ref: "Subnet1" - Ref: "Subnet2"
