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 Name | Type | Required | Update allowed | Description | Constraints |
| DbInstType | String | No | No | The attached storage type. | Valid values:
|
| Type | String | No | No | The sharding method of the database. | Valid values:
For more information, see Extensibility principles. |
| DrdsInstanceId | String | Yes | No | The ID of the PolarDB-X instance. | None |
| RdsInstance | List | No | No | The IDs of the RDS instances. | This property is used only for horizontal sharding. A maximum of five RDS instances are supported. |
| DbInstanceIsCreating | Boolean | No | No | Indicates whether the RDS instances for the database are being created. | Valid values:
|
| InstDbName | List | No | No | The list of RDS instance IDs and databases for vertical sharding. | A maximum of five RDS instances are supported. For more information, see InstDbName properties. |
| DbName | String | No | No | The database name. | None |
| Encode | String | No | No | The encoding of the database. | None |
| AccountName | String | No | No | The 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. |
| Password | String | No | No | The password used to access the database. | None |
InstDbName syntax
"InstDbName": [
{
"ShardDbName": List,
"DbInstanceId": String
}
]InstDbName properties
| Property | Type | Required | Update allowed | Description | Constraints |
| ShardDbName | List | Yes | No | The list of databases to be vertically sharded in the RDS instance. | A maximum of five databases are supported. |
| DbInstanceId | String | Yes | No | The 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该文章对您有帮助吗?