文档

ALIYUN::PolarDBX::DBInstance

更新时间:

ALIYUN::PolarDBX::DBInstance类型用于创建PolarDB-X实例。

语法

{
  "Type": "ALIYUN::PolarDBX::DBInstance",
  "Properties": {
    "TopologyType": String,
    "EngineVersion": String,
    "ResourceGroupId": String,
    "VPCId": String,
    "AutoRenew": Boolean,
    "VSwitchId": String,
    "Period": String,
    "PayType": String,
    "DBNodeClass": String,
    "SecondaryZone": String,
    "TertiaryZone": String,
    "DBNodeCount": Integer,
    "PrimaryZone": String,
    "UsedTime": Integer,
    "DBInstanceDescription": String,
    "SecurityIpConfig": Map
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

TopologyType

String

拓扑类型。

取值:

  • 3azones:三可用区。

  • 1azone:单可用区。

EngineVersion

String

数据库引擎版本。

  • 实例付费类型为按量付费时支持2.0、5.7。

  • 实例付费类型为包年包月时支持5.7。

ResourceGroupId

String

资源组ID。

VPCId

String

专有网络ID。

AutoRenew

Boolean

是否自动续费。

取值:

  • true:自动续费。

  • false:不自动续费。

VSwitchId

String

虚拟交换机ID。

Period

String

收费周期。

  • 当PayType取值为包年包月时,本参数取值为Year或Mouth。

  • 当PayType取值为按量付费时,本参数取值为Hour。

PayType

String

实例付费类型。

取值:

  • 包年包月。

    您可以通过下列形式定义包年包月类型:Subscription、PrePaid、Prepaid、PrePay、PREPAY、PRE。

  • 按量付费。

    您可以通过下列形式定义按量付费类型:PayOnDemand、PayAsYouGo、PostPaid、PayOnDemand、Postpaid、PostPay、POSTPAY、POST。

DBNodeClass

String

节点规格。

取值:

  • polarx.x4.medium.2e:2核8G。

  • polarx.x4.large.2e:4核16G。

  • polarx.x8.large.2e:4核32G。

  • polarx.x4.xlarge.2e:8核32G。

  • polarx.x8.xlarge.2e:8核64G。

  • polarx.x4.2xlarge.2e:16核64G。

  • polarx.x8.2xlarge.2e:16核128G。

  • polarx.x4.4xlarge.2e:32核128G。

  • polarx.x8.4xlarge.2e:32核256G。

  • polarx.st.8xlarge.2e:60核470G。

  • polarx.st.12xlarge.2e:90核720G。

SecondaryZone

String

次可用区。

TertiaryZone

String

第三可用区。

DBNodeCount

Integer

实例节点数量。

最小值为2。

PrimaryZone

String

主可用区。

UsedTime

Integer

预付费时长。

说明

当Period取值为Year时,该参数支持的取值为1、2、3。

DBInstanceDescription

String

实例备注描述。

SecurityIpConfig

Map

实例白名单配置。

更多信息,请参见SecurityIpConfig属性

SecurityIpConfig语法

"SecurityIpConfig": {
  "SecurityIPList": String,
  "ModifyMode": String,
  "GroupName": String
}

SecurityIpConfig属性

属性名称

类型

必须

允许更新

描述

约束

SecurityIPList

String

实例的白名单组名。

ModifyMode

String

白名单修改方式,

取值:

  • 0:覆盖并修改白名单组。

  • 1:添加白名单组。

  • 2:删除白名单组。 

GroupName

String

白名单组中的IP列表。

多个IP白名单间以“,”分隔。

返回值

Fn::GetAtt

  • OrderId:订单号。

  • DBInstanceName:创建的实例名称。

  • Port:内网连接端口。

  • ConnectionString:内网连接串。

示例

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  TopologyType:
    Type: String
    Description: 'The topology type of the instance. Valid values: 3azones: The instance is deployed in three zones. 1azone: The instance is deployed in only one zone.'
    AllowedValues:
      - 1azone
      - 3azones
  EngineVersion:
    Type: String
    Description: The version of the database engine.
  VPCId:
    Type: String
    Description: The ID of the VPC to which the instance belongs.
  VSwitchId:
    Type: String
    Description: The ID of the vSwitch.
  DBNodeClass:
    Type: String
    Description: The specification of the nodes in the instance you want to create.
  DBNodeCount:
    Type: Number
    Description: The number of nodes in the instance you want to create.
    MinValue: 2
  PrimaryZone:
    Type: String
    Description: The primary zone.
Resources:
  DBInstance:
    Type: ALIYUN::PolarDBX::DBInstance
    Properties:
      TopologyType:
        Ref: TopologyType
      EngineVersion:
        Ref: EngineVersion
      VPCId:
        Ref: VPCId
      VSwitchId:
        Ref: VSwitchId
      DBNodeClass:
        Ref: DBNodeClass
      DBNodeCount:
        Ref: DBNodeCount
      PrimaryZone:
        Ref: PrimaryZone
Outputs:
  OrderId:
    Description: The ID of the order.
    Value:
      Fn::GetAtt:
        - DBInstance
        - OrderId
  DBInstanceName:
    Description: The name of the instance that you create.
    Value:
      Fn::GetAtt:
        - DBInstance
        - DBInstanceName
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "TopologyType": {
          "Type": "String",
          "Description": "The topology type of the instance. Valid values: 3azones: The instance is deployed in three zones. 1azone: The instance is deployed in only one zone.",
          "AllowedValues": [
            "1azone",
            "3azones"
          ]
        },
        "EngineVersion": {
          "Type": "String",
          "Description": "The version of the database engine."
        },
        "VPCId": {
          "Type": "String",
          "Description": "The ID of the VPC to which the instance belongs."
        },
        "VSwitchId": {
          "Type": "String",
          "Description": "The ID of the vSwitch."
        },
        "DBNodeClass": {
          "Type": "String",
          "Description": "The specification of the nodes in the instance you want to create."
        },
        "DBNodeCount": {
          "Type": "Number",
          "Description": "The number of nodes in the instance you want to create.",
          "MinValue": 2
        },
        "PrimaryZone": {
          "Type": "String",
          "Description": "The primary zone."
        }
      },
      "Resources": {
        "DBInstance": {
          "Type": "ALIYUN::PolarDBX::DBInstance",
          "Properties": {
            "TopologyType": {
              "Ref": "TopologyType"
            },
            "EngineVersion": {
              "Ref": "EngineVersion"
            },
            "VPCId": {
              "Ref": "VPCId"
            },
            "VSwitchId": {
              "Ref": "VSwitchId"
            },
            "DBNodeClass": {
              "Ref": "DBNodeClass"
            },
            "DBNodeCount": {
              "Ref": "DBNodeCount"
            },
            "PrimaryZone": {
              "Ref": "PrimaryZone"
            }
          }
        }
      },
      "Outputs": {
        "OrderId": {
          "Description": "The ID of the order.",
          "Value": {
            "Fn::GetAtt": [
              "DBInstance",
              "OrderId"
            ]
          }
        },
        "DBInstanceName": {
          "Description": "The name of the instance that you create.",
          "Value": {
            "Fn::GetAtt": [
              "DBInstance",
              "DBInstanceName"
            ]
          }
        }
      }
    }
  • 本页导读 (1)
文档反馈