ALIYUN::DRDS::DrdsDB

更新时间:
复制 MD 格式

The ALIYUN::DRDS::DrdsDB resource creates a PolarDB-X cloud-native distributed database.

Syntax

{
  "Type": "ALIYUN::DRDS::DrdsDB",
  "Properties": {
    "DbInstType": String,
    "Type": String,
    "DrdsInstanceId": String,
    "RdsInstance": List,
    "DbInstanceIsCreating": Boolean,
    "InstDbName": List,
    "DbName": String,
    "Encode": String,
    "AccountName": String,
    "Password": String
  }
}

Properties

Property NameTypeRequiredUpdate allowedDescriptionConstraints
DbInstTypeStringNoNoThe attached storage type.Valid values:
  • RDS
  • POLARDB
TypeStringNoNoThe sharding method of the database.Valid values:
  • HORIZONTAL: horizontal sharding, also known as database and table sharding.
  • VERTICAL: vertical sharding.

For more information, see Extensibility principles.

DrdsInstanceIdStringYesNoThe ID of the PolarDB-X instance.None
RdsInstanceListNoNoThe IDs of the RDS instances.This property is used only for horizontal sharding.

A maximum of five RDS instances are supported.

DbInstanceIsCreatingBooleanNoNoIndicates whether the RDS instances for the database are being created.Valid values:
  • true
  • false
InstDbNameListNoNoThe list of RDS instance IDs and databases for vertical sharding.A maximum of five RDS instances are supported.

For more information, see InstDbName properties.

DbNameStringNoNoThe database name.None
EncodeStringNoNoThe encoding of the database.None
AccountNameStringNoNoThe name of the account that has access permissions on the corresponding databases of all RDS instances in a vertical sharding scenario.This property is used only for vertical sharding.
PasswordStringNoNoThe password used to access the database.None

InstDbName syntax

"InstDbName": [
  {
    "ShardDbName": List,
    "DbInstanceId": String
  }
]

InstDbName properties

PropertyTypeRequiredUpdate allowedDescriptionConstraints
ShardDbNameListYesNoThe list of databases to be vertically sharded in the RDS instance.A maximum of five databases are supported.
DbInstanceIdStringYesNoThe ID of the RDS instance to be vertically sharded.None

Return value

Fn::GetAtt

None

Examples

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "DbInstType": {
      "Type": "String",
      "Description": "The type of the attached storage. Valid values:\nRDS or POLARDB",
      "AllowedValues": [
        "RDS",
        "POLARDB"
      ]
    },
    "Type": {
      "Type": "String",
      "Description": "Database sharding method. For more information, see Extensibility principles. Valid values:\nHORIZONTAL: indicates horizontal sharding, which is also known as database and table sharding.\nVERTICAL: indicates vertical sharding.",
      "AllowedValues": [
        "HORIZONTAL",
        "VERTICAL"
      ],
      "Default": "HORIZONTAL"
    },
    "DrdsInstanceId": {
      "Type": "String",
      "Description": "The ID of the DRDS instance."
    },
    "RdsInstance": {
      "Type": "Json",
      "Description": "This property is used only for horizontal sharding.",
      "MinLength": 1,
      "MaxLength": 5
    },
    "DbInstanceIsCreating": {
      "Type": "Boolean",
      "Description": "Indicates whether the RDS instance is being created.",
      "AllowedValues": [
        "True",
        "true",
        "False",
        "false"
      ]
    },
    "InstDbName": {
      "Type": "Json",
      "Description": "",
      "MinLength": 1,
      "MaxLength": 5
    },
    "DbName": {
      "Type": "String",
      "Description": "The database name."
    },
    "Encode": {
      "Type": "String",
      "Description": "The encoding used by the database."
    },
    "AccountName": {
      "Type": "String",
      "Description": "In a vertical sharding scenario, the name of an account that has access permissions on the corresponding databases on all RDS instances."
    },
    "Password": {
      "Type": "String",
      "Description": "The password used to access the database."
    }
  },
  "Resources": {
    "DrdsDB": {
      "Type": "ALIYUN::DRDS::DrdsDB",
      "Properties": {
        "DbInstType": {
          "Ref": "DbInstType"
        },
        "Type": {
          "Ref": "Type"
        },
        "DrdsInstanceId": {
          "Ref": "DrdsInstanceId"
        },
        "RdsInstance": {
          "Ref": "RdsInstance"
        },
        "DbInstanceIsCreating": {
          "Ref": "DbInstanceIsCreating"
        },
        "InstDbName": {
          "Ref": "InstDbName"
        },
        "DbName": {
          "Ref": "DbName"
        },
        "Encode": {
          "Ref": "Encode"
        },
        "AccountName": {
          "Ref": "AccountName"
        },
        "Password": {
          "Ref": "Password"
        }
      }
    }
  }
}

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
 DbInstType:
  Type: String
  Description: |-
   The type of the attached storage. Valid values:
   RDS or POLARDB
  AllowedValues:
   - RDS
   - POLARDB
 Type:
  Type: String
  Description: >-
   Database sharding method. For more information, see Extensibility principles.
   Valid values:

   HORIZONTAL: indicates horizontal sharding, which is also known as
   database and table sharding.

   VERTICAL: indicates vertical sharding.
  AllowedValues:
   - HORIZONTAL
   - VERTICAL
  Default: HORIZONTAL
 DrdsInstanceId:
  Type: String
  Description: The ID of the DRDS instance.
 RdsInstance:
  Type: Json
  Description: This property is used only for horizontal sharding.
  MinLength: 1
  MaxLength: 5
 DbInstanceIsCreating:
  Type: Boolean
  Description: Indicates whether the RDS instance is being created.
  AllowedValues:
   - 'True'
   - 'true'
   - 'False'
   - 'false'
 InstDbName:
  Type: Json
  Description: ''
  MinLength: 1
  MaxLength: 5
 DbName:
  Type: String
  Description: The database name.
 Encode:
  Type: String
  Description: The encoding used by the database.
 AccountName:
  Type: String
  Description: >-
   In a vertical sharding scenario, the name of an account that has access permissions on the
   corresponding databases on all RDS instances.
 Password:
  Type: String
  Description: The password used to access the database.
Resources:
 DrdsDB:
  Type: 'ALIYUN::DRDS::DrdsDB'
  Properties:
   DbInstType:
    Ref: DbInstType
   Type:
    Ref: Type
   DrdsInstanceId:
    Ref: DrdsInstanceId
   RdsInstance:
    Ref: RdsInstance
   DbInstanceIsCreating:
    Ref: DbInstanceIsCreating
   InstDbName:
    Ref: InstDbName
   DbName:
    Ref: DbName
   Encode:
    Ref: Encode
   AccountName:
    Ref: AccountName
   Password:
    Ref: Password