All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::PolarDBX::DBInstance

Last Updated:Sep 30, 2024

ALIYUN::PolarDBX::DBInstance is used to create a PolarDB for Xscale (PolarDB-X) instance.

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

TopologyType

String

Yes

No

The topology type.

Valid values:

  • 3azones: three-zone

  • 1azone: single-zone

EngineVersion

String

Yes

No

The version of the database engine.

  • Valid values when the billing method of the instance is pay-as-you-go: 2.0 and 5.7.

  • Valid value when the billing method of the instance is subscription: 5.7.

ResourceGroupId

String

No

No

The ID of the resource group.

None.

VPCId

String

Yes

No

The ID of the virtual private cloud (VPC).

None.

AutoRenew

Boolean

No

No

Specifies whether to enable auto-renewal.

Valid values:

  • true

  • false

VSwitchId

String

Yes

No

The vSwitch ID.

None.

Period

String

No

No

The unit of the billing cycle.

  • Valid values when the billing method of the instance is subscription: Year and Month.

  • Valid value when the billing method of the instance is pay-as-you-go: Hour.

PayType

String

No

No

The billing method of the instance.

  • Valid values that specify the subscription billing method:

    Subscription, PrePaid, Prepaid, PrePay, PREPAY, and PRE.

  • Valid values that specify the pay-as-you-go billing method:

    PayOnDemand, PayAsYouGo, PostPaid, PayOnDemand, Postpaid, PostPay, POSTPAY, and POST.

DBNodeClass

String

Yes

No

The instance type of the node.

Valid values:

  • polarx.x4.medium.2e: A node of this instance type is configured with 2 vCPUs and 8 GB memory.

  • polarx.x4.large.2e: A node of this instance type is configured with 4 vCPUs and 16 GB memory.

  • polarx.x8.large.2e: A node of this instance type is configured with 4 vCPUs and 32 GB memory.

  • polarx.x4.xlarge.2e: A node of this instance type is configured with 8 vCPUs and 32 GB memory.

  • polarx.x8.xlarge.2e: A node of this instance type is configured with 8 vCPUs and 64 GB memory.

  • polarx.x4.2xlarge.2e: A node of this instance type is configured with 16 vCPUs and 64 GB memory.

  • polarx.x8.2xlarge.2e: A node of this instance type is configured with 16 vCPUs and 128 GB memory.

  • polarx.x4.4xlarge.2e: A node of this instance type is configured with 32 vCPUs and 128 GB memory.

  • polarx.x8.4xlarge.2e: A node of this instance type is configured with 32 vCPUs and 256 GB memory.

  • polarx.st.8xlarge.2e: A node of this instance type is configured with 60 vCPUs and 470 GB memory.

  • polarx.st.12xlarge.2e: A node of this instance type is configured with 90 vCPUs and 720 GB memory.

SecondaryZone

String

No

No

The secondary zone.

None.

TertiaryZone

String

No

No

The tertiary zone.

None.

DBNodeCount

Integer

Yes

No

The number of nodes in the instance.

The instance must contain at least two nodes.

PrimaryZone

String

Yes

No

The primary zone.

None.

UsedTime

Integer

No

No

The subscription duration.

Note

Valid values when Period is set to Year: 1, 2, and 3.

DBInstanceDescription

String

No

Yes

The description of the instance.

None.

SecurityIpConfig

Map

No

No

The configurations of the IP address whitelist of the instance.

For more information, see SecurityIpConfig properties.

SecurityIpConfig syntax

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

SecurityIpConfig properties

Property

Type

Required

Editable

Description

Constraint

SecurityIPList

String

No

No

The IP addresses in the IP address whitelist.

Separate multiple IP addresses with commas (,).

ModifyMode

String

No

No

The method that is used to modify the IP address whitelist.

Valid values:

  • 0: overwrites and modifies the IP address whitelist.

  • 1: adds IP addresses to the IP address whitelist.

  • 2: deletes IP addresses from the IP address whitelist.  

GroupName

String

No

No

The name of the IP address whitelist.

None.

Return values

Fn::GetAtt

  • OrderId: the order ID.

  • DBInstanceName: the instance name.

  • Port: the internal port of the instance.

  • InnerConnectionString: the internal connection string of the instance.

Examples

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
{
  "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"
        ]
      }
    }
  }
}