AWS CloudFormation
User Guide (API Version 2010-05-15)
AWS 服务或AWS文档中描述的功能,可能因地区/位置而异。请点击 Amazon AWS 入门,可查看中国地区的具体差异

AWS::DAX::SubnetGroup

使用 AWS CloudFormation AWS::DAX::SubnetGroup 资源创建用于 DAX (DynamoDB Accelerator) 的子网组。

有关更多信息,请参阅 Amazon DynamoDB 开发人员指南 中的 SubnetGroup

语法

JSON

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

YAML

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

属性

SubnetGroupName

子网组的名称。

Required: No

Type: String

更新要求:不支持更新。

Description

子网组的描述。

Required: No

Type: String

更新要求无需中断

SubnetIds

与子网组关联的子网的列表。

Required: No

Type: List of String values;

更新要求无需中断

返回值

Ref

当向 Ref 内部函数提供此资源的逻辑 ID 时,Ref 将返回所创建活动的 ARN。例如:

Copy
{ "Ref": "MyDAXSubnetGroup" }

返回与以下值类似的值:

Copy
my-dax-subnet-group

有关使用 Ref 功能的更多信息,请参阅参考

Fn::GetAtt

Fn::GetAtt 返回一个此类型指定属性的值。以下为可用属性和示例返回值。

SubnetGroupName

返回子网组的名称。例如:

Copy
{ "Fn::GetAtt": ["MyDAXSubnetGroup", "SubnetGroupName"] }

返回与以下值类似的值:

Copy
my-dax-subnet-group

有关使用 Fn::GetAtt 的更多信息,请参见 Fn::GetAtt

示例

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

JSON

Copy
{ "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

Copy
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

本页内容: