AWS CloudFormation
User Guide (API Version 2010-05-15)

AWS::DocDB::DBSubnetGroup

The AWS::DocDB::DBSubnetGroup Amazon DocumentDB resource describes a DBSubnetGroup. 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 of the DB subnet group.

Required: Yes

Type: String

Update requires: No interruption

DBSubnetGroupName

The name of the DB subnet group.

Required: No

Type: String

Update requires: Replacement

SubnetIds

List of subnet identifiers.

Required: Yes

Type: List of String values

Update requires: No interruption

Tags

A list of up to 50 tags. A tag is metadata assigned to an Amazon DocumentDB (with MongoDB compatibility) resource consisting of a key-value pair.

Required: No

Type: List of Resource Tag property types

Update requires: No interruption

Return Values

Ref

When you pass the logical ID of an AWS::DocDB::DBSubnetGroup to the intrinsic Ref function, the function returns the name of the DBSubnetGroup, such as default.

For more information about using the Ref function, see Ref.

Example

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"

See Also

For more information, see the following topics in the Amazon DocumentDB (with MongoDB compatibility) Developer Guide.