AWS::DAX::SubnetGroup - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

AWS::DAX::SubnetGroup

Creates a new subnet group.

Syntax

To declare this entity in your Amazon CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::DAX::SubnetGroup", "Properties" : { "Description" : String, "SubnetGroupName" : String, "SubnetIds" : [ String, ... ] } }

YAML

Type: AWS::DAX::SubnetGroup Properties: Description: String SubnetGroupName: String SubnetIds: - String

Properties

Description

The description of the subnet group.

Required: No

Type: String

Update requires: No interruption

SubnetGroupName

The name of the subnet group.

Required: No

Type: String

Update requires: Replacement

SubnetIds

A list of VPC subnet IDs for the subnet group.

Required: Yes

Type: List of String

Update requires: No interruption

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the name of the created subnet group. For example

{ "Ref": "MyDAXSubnetGroup" }

Returns a value similar to the following:

my-dax-subnet-group

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

Examples

Create Subnet group

The following example creates a DAX subnet group.

JSON

{ "AWSTemplateFormatVersion": "2010-09-09", "Description": "Create a DAX subnet group", "Resources": { "MyDAXSubnetGroup": { "Type": "AWS::DAX::SubnetGroup", "Properties": { "SubnetGroupName": "my-dax-subnet-group", "Description": "Description of my DAX subnet group", "SubnetIds": [ "subnet1", "subnet2" ] } }, "subnet1": { "Type": "AWS::EC2::Subnet", "Properties": { "VpcId": "daxVPC", "CidrBlock": "172.13.17.0/24", "AvailabilityZone": { "Fn::Select": [ 0, { "Fn::GetAZs": "" } ] } } }, "subnet2": { "Type": "AWS::EC2::Subnet", "Properties": { "VpcId": "daxVPC", "CidrBlock": "172.13.18.0/24", "AvailabilityZone": { "Fn::Select": [ 1, { "Fn::GetAZs": "" } ] } } }, "daxVpc": { "Type": "AWS::EC2::VPC", "Properties": { "CidrBlock": "172.13.0.0/16" } } }, "Outputs": { "ParameterGroup": { "Value": "MyDAXSubnetGroup" } } }

YAML

AWSTemplateFormatVersion: "2010-09-09" Description: "DAX subnet group" Resources: MyDAXSubnetGroup: Type: AWS::DAX::SubnetGroup Properties: SubnetGroupName: "my-dax-subnet-group" Description: "Description of my DAX subnet group" SubnetIds: - !Ref subnet1 - !Ref subnet2 subnet1: Type: AWS::EC2::Subnet Properties: VpcId: !Ref daxVpc CidrBlock: 172.13.17.0/24 AvailabilityZone: Fn::Select: - 0 - Fn::GetAZs: "" subnet2: Type: AWS::EC2::Subnet Properties: VpcId: !Ref daxVpc CidrBlock: 172.13.18.0/24 AvailabilityZone: Fn::Select: - 1 - Fn::GetAZs: "" daxVpc: Type: AWS::EC2::VPC Properties: CidrBlock: 172.13.0.0/16 Outputs: ParameterGroup: Value: !Ref MyDAXSubnetGroup