ALIYUN::POLARDB::DBInstance is used to create a database in a PolarDB cluster.
Syntax
{
"Type": "ALIYUN::POLARDB::DBInstance",
"Properties": {
"DBClusterId": String,
"CharacterSetName": String,
"DBDescription": String,
"AccountName": String,
"AccountPrivilege": String,
"DBName": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
DBClusterId | String | Yes | No | The ID of the cluster. | None |
CharacterSetName | String | Yes | No | The character set of the database. | For more information, see Character set tables. |
DBDescription | String | No | Yes | The description of the database. | The description must be 2 to 256 characters in length. It cannot start with http:// or https:// . |
AccountName | String | No | No | The name of the database account. | None |
AccountPrivilege | String | No | No | The permissions of the database account. | Default value: ReadWrite. Valid values:
|
DBName | String | Yes | No | The name of the database. | The name can be up to 64 characters in length. It must start with a lowercase letter and end with a letter or digit. The name can contain letters, digits, hyphens (-), and underscores (_). |
Response parameters
Fn::GetAtt
None
Examples
JSON
format{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "DBClusterId": { "Type": "String", "Description": "The ID of the ApsaraDB for POLARDB cluster for which a database is to be created." } }, "Resources": { "DBInstance": { "Type": "ALIYUN::POLARDB::DBInstance", "Properties": { "DBClusterId": { "Ref": "DBClusterId" }, "CharacterSetName": "utf8", "AccountName": "TestAccountUser", "DBName": "Test" } } } }