AWS::DocDB::DBSubnetGroup
The AWS::DocDB::DBSubnetGroup
Amazon DocumentDB (with MongoDB compatibility) resource describes a DBSubnetGroup.
subnet groups must contain at least one subnet in at least two Availability Zones in the AWS Region.
For more information, see DBSubnetGroup in the
Amazon DocumentDB Developer Guide.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::DocDB::DBSubnetGroup", "Properties" : { "DBSubnetGroupDescription" :
String
, "DBSubnetGroupName" :String
, "SubnetIds" :[ String, ... ]
, "Tags" :[ Tag, ... ]
} }
YAML
Type: AWS::DocDB::DBSubnetGroup Properties: DBSubnetGroupDescription:
String
DBSubnetGroupName:String
SubnetIds:- String
Tags:- Tag
Properties
DBSubnetGroupDescription
-
The description for the subnet group.
Required: Yes
Type: String
Update requires: No interruption
DBSubnetGroupName
-
The name for the subnet group. This value is stored as a lowercase string.
Constraints: Must contain no more than 255 letters, numbers, periods, underscores, spaces, or hyphens. Must not be default.
Example:
mySubnetgroup
Required: No
Type: String
Update requires: Replacement
SubnetIds
-
The Amazon EC2 subnet IDs for the subnet group.
Required: Yes
Type: Array of String
Update requires: No interruption
-
The tags to be assigned to the subnet group.
Required: No
Type: Array of Tag
Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref
function, Ref
returns the DBSubnetGroup's name, such as default
.
For more information about using the Ref
function, see Ref
.
Fn::GetAtt
Examples
JSON
{ "AWSTemplateFormatVersion" : "2010-09-09", "Resources" : { "myDBSubnetGroup" : { "Type" : "AWS::DocDB::DBSubnetGroup", "Properties" : { "DBSubnetGroupDescription" : "description", "SubnetIds" : [ "subnet-7b5b4112", "subnet-7b5b4115" ], "Tags" : [ {"Key" : "String", "Value" : "String"} ] } } } }
YAML
AWSTemplateFormatVersion: "2010-09-09" Resources: myDBSubnetGroup: Type: "AWS::DocDB::DBSubnetGroup" Properties: DBSubnetGroupDescription: "description" SubnetIds: - "subnet-7b5b4112" - "subnet-7b5b4115" Tags: - Key: "String" Value: "String"