ALIYUN::DRDS::DrdsInstance类型用于创建指定规格的DRDS实例

语法

{
  "Type": "ALIYUN::DRDS::DrdsInstance",
  "Properties": {
    "VpcId": String,
    "Description": String,
    "InstanceSeries": String,
    "Specification": String,
    "PayType": String,
    "ZoneId": String,
    "PricingCycle": String,
    "Duration": Integer,
    "VswitchId": String,
    "IsAutoRenew": Boolean,
    "Type": String,
    "Tags": List,
    "MySQLVersion": String,
    "ResourceGroupId": String
  }
}

属性

属性名称类型必须允许更新描述约束
VpcIdString专有网络ID。创建VPC网络类型的数据库时必须指定专有网络ID。
DescriptionString实例描述。长度为2~128个字符。
InstanceSeriesString

实例系列。

取值:
  • drds.sn1.4c8g
  • drds.sn1.8c16g
  • drds.sn1.16c32g
  • drds.sn1.32c64g
SpecificationString实例规格。例如:drds.sn1.4c8g.8C16G由实例系列(drds.sn1.4c8g)加上具体的实例规格(8C16G)组成。关于实例规格取值的更多信息,请参见:分布式关系型数据库服务规格和定价
ResourceGroupIdString资源组ID。
PayTypeString付费类型。取值:
  • drdsPost
  • drdsPre
ZoneIdString可用区ID。一个可用区属于某个地域,例如:杭州可用区A(cn-hangzhou-a)属于杭州地域(cn-hangzhou)。
PricingCycleString订购的周期单位。取值:
  • year:年。
  • month:月。
付费类型是drdsPre时该参数生效。
DurationInteger订购的周期数量。取值:
  • PricingCycle=year时:1~3。
  • PricingCycle=month时:1~9。
付费类型是drdsPre时该参数生效。
VswitchIdString交换机ID。创建VPC网络类型的数据库时必须指定该参数。
IsAutoRenewBoolean是否自动续费。取值:
  • true
  • false
如果按月购买则自动续费一个月,如果按年购买则自动续费一年。付费类型是drdsPre时该参数生效。
TypeString实例类型。取值:
  • 0:共享实例。
  • 1:专享实例。
  • PRIVATE:专享实例。
  • PUBLIC:共享实例。
MySQLVersionStringMySQL协议版本。取值:
  • 5(默认值)
  • 8
说明 仅当创建主实例时有效,只读实例默认与主实例相同。
TagsList标签。最多支持添加20个标签。

更多信息,请参见Tags属性

Tags语法

"Tags": [
  {
    "Key": String,
    "Value": String
  }
]  

Tags属性

属性名称类型必须允许更新描述约束
KeyString标签键。长度为1~128个字符,不能以aliyunacs:开头,不能包含http://或者https://
ValueString标签值。长度为0~128个字符,不能以aliyunacs:开头,不能包含http://或者https://

返回值

Fn::GetAtt

  • OrderId:订单ID。
  • DrdsInstanceId:实例ID。
  • IntranetEndpoint:私网连接地址。
  • InternetEndpoint:公网连接地址。

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      VpcId:
        Type: String
        AssociationProperty: ALIYUN::ECS::VPC::VPCId
      ZoneId:
        Type: String
        AssociationProperty: ALIYUN::ECS::ZoneId
      VSwitchId:
        Type: String
        AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
        AssociationPropertyMetadata:
          RegionId: ${RegionId}
          VpcId: ${VpcId}
    Resources:
      DrdsInstance:
        Type: ALIYUN::DRDS::DrdsInstance
        Properties:
          Type: PRIVATE
          VpcId:
            Ref: VpcId
          ZoneId:
            Ref: ZoneId
          InstanceSeries: drds.sn1.4c8g
          Specification: drds.sn1.4c8g.8C16G
          PayType: drdsPost
          VswitchId:
            Ref: VSwitchId
    Outputs: {}
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "VpcId": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
        },
        "ZoneId": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::ECS::ZoneId"
        },
        "VSwitchId": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
          "AssociationPropertyMetadata": {
            "RegionId": "${RegionId}",
            "VpcId": "${VpcId}"
          }
        }
      },
      "Resources": {
        "DrdsInstance": {
          "Type": "ALIYUN::DRDS::DrdsInstance",
          "Properties": {
            "Type": "PRIVATE",
            "VpcId": {
              "Ref": "VpcId"
            },
            "ZoneId": {
              "Ref": "ZoneId"
            },
            "InstanceSeries": "drds.sn1.4c8g",
            "Specification": "drds.sn1.4c8g.8C16G",
            "PayType": "drdsPost",
            "VswitchId": {
              "Ref": "VSwitchId"
            }
          }
        }
      },
      "Outputs": {
      }
    }

更多示例,请参见:JSON示例YAML示例