AWS::DAX::SubnetGroup - AWS CloudFormation
AWS 文档中描述的 AWS 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 AWS 服务入门

AWS::DAX::SubnetGroup

创建新的子网组。

语法

要在 AWS CloudFormation 模板中声明此实体,请使用以下语法:

JSON

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

YAML

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

属性

Description

子网组的描述。

必需:否

类型:字符串

Update requires: No interruption

SubnetGroupName

子网组的名称。

必需:否

类型:字符串

Update requires: Replacement

SubnetIds

子网组的 VPC 子网 ID 的列表。

必需:是

类型:字符串列表

Update requires: No interruption

返回值

Ref

在将此资源的逻辑 ID 传递给内部 Ref 函数时,Ref 返回 创建的子网组的名称。例如

{ "Ref": "MyDAXSubnetGroup" }

返回与以下值类似的值:

my-dax-subnet-group

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

示例

创建子网组

以下示例创建一个 DAX 子网组。

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