Cria um banco de dados em um cluster PolarDB.
Sintaxe
{
"Type": "ALIYUN::POLARDB::Database",
"Properties": {
"CharacterSetName": String,
"DBClusterId": String,
"DBName": String,
"AccountPrivilege": String,
"AccountName": String,
"Collate": String,
"Ctype": String,
"DBDescription": String
}
}
Propriedades
|
Propriedade |
Tipo |
Obrigatória |
Editável |
Descrição |
Restrição |
|
CharacterSetName |
String |
Sim |
Não |
Conjunto de caracteres. |
Para mais informações, consulte Tabelas de conjuntos de caracteres. |
|
DBClusterId |
String |
Sim |
Não |
ID do cluster. |
Nenhuma. |
|
DBName |
String |
Sim |
Não |
Nome do banco de dados. |
O nome deve atender aos seguintes requisitos:
|
|
AccountPrivilege |
String |
Não |
Não |
Permissões concedidas à conta. |
Valores válidos:
Valor padrão: ReadWrite. Nota
|
|
AccountName |
String |
Não |
Não |
Nome da conta autorizada a acessar o banco de dados. |
Nota
|
|
Collate |
String |
Não |
Não |
Intercalação do banco de dados. |
Defina a intercalação do banco de dados. Nota
|
|
Ctype |
String |
Não |
Não |
Classificação de caracteres do banco de dados. |
Defina a classificação de caracteres do banco de dados. Nota
|
|
DBDescription |
String |
Não |
Sim |
Descrição do banco de dados. |
A descrição deve atender aos seguintes requisitos:
Nota
Obrigatória para clusters PolarDB for Oracle e PolarDB for PostgreSQL. Opcional para clusters PolarDB for MySQL. |
Valores de retorno
Fn::GetAtt
Nenhum.
Exemplos
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
CharacterSetName:
AssociationPropertyMetadata:
AutoChangeType: false
Type: String
Description:
en: The character set of the database. For more information, see Character sets.
AllowedValues:
- utf8
- geostd8
- gbk
- greek
- utf8mb4
- hebrew
- latin1
- hp8
- euckr
- keybcs2
- armscii8
- koi8r
- ascii
- koi8u
- big5
- latin2
- binary
- latin5
- cp1250
- latin7
- cp1251
- macce
- cp1256
- macroman
- cp1257
- sjis
- cp850
- swe7
- cp852
- tis620
- cp866
- ucs2
- cp932
- ujis
- dec8
- utf16
- eucjpms
- utf16le
- gb2312
Required: true
DBClusterId:
AssociationProperty: ALIYUN::POLARDB::DBCluster::DBClusterId
Type: String
Description:
en: The ID of the ApsaraDB for POLARDB cluster for which a database is to be created.
Required: true
DBName:
Type: String
Description:
en: |-
The name of the database to be created. The name must comply with the following rules:
It must start with a lowercase letter and consist of lowercase letters, digits, hyphens
(-), and underscores (_).
It must end with a letter or a digit. It can be up to 64 characters in length.
AllowedPattern: ^[a-z0-9][-_a-z0-9]{0,63}(?<![-_]$)$
Required: true
Resources:
Database:
Type: ALIYUN::POLARDB::Database
Properties:
CharacterSetName:
Ref: CharacterSetName
DBClusterId:
Ref: DBClusterId
DBName:
Ref: DBName
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"CharacterSetName": {
"AssociationPropertyMetadata": {
"AutoChangeType": false
},
"Type": "String",
"Description": {
"en": "The character set of the database. For more information, see Character sets."
},
"AllowedValues": [
"utf8",
"geostd8",
"gbk",
"greek",
"utf8mb4",
"hebrew",
"latin1",
"hp8",
"euckr",
"keybcs2",
"armscii8",
"koi8r",
"ascii",
"koi8u",
"big5",
"latin2",
"binary",
"latin5",
"cp1250",
"latin7",
"cp1251",
"macce",
"cp1256",
"macroman",
"cp1257",
"sjis",
"cp850",
"swe7",
"cp852",
"tis620",
"cp866",
"ucs2",
"cp932",
"ujis",
"dec8",
"utf16",
"eucjpms",
"utf16le",
"gb2312"
],
"Required": true
},
"DBClusterId": {
"AssociationProperty": "ALIYUN::POLARDB::DBCluster::DBClusterId",
"Type": "String",
"Description": {
"en": "The ID of the ApsaraDB for POLARDB cluster for which a database is to be created."
},
"Required": true
},
"DBName": {
"Type": "String",
"Description": {
"en": "The name of the database to be created. The name must comply with the following rules:\nIt must start with a lowercase letter and consist of lowercase letters, digits, hyphens\n(-), and underscores (_).\nIt must end with a letter or a digit. It can be up to 64 characters in length."
},
"AllowedPattern": "^[a-z0-9][-_a-z0-9]{0,63}(?<![-_]$)$",
"Required": true
},
},
"Resources": {
"Database": {
"Type": "ALIYUN::POLARDB::Database",
"Properties": {
"CharacterSetName": {
"Ref": "CharacterSetName"
},
"DBClusterId": {
"Ref": "DBClusterId"
},
"DBName": {
"Ref": "DBName"
}
}
}
}
}