ALIYUN::POLARDB::Database は、PolarDB クラスタにデータベースを作成するために使用されます。
構文
{
"Type": "ALIYUN::POLARDB::Database",
"Properties": {
"CharacterSetName": String,
"DBClusterId": String,
"DBName": String,
"AccountPrivilege": String,
"AccountName": String,
"Collate": String,
"Ctype": String,
"DBDescription": String
}
}プロパティ
プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
CharacterSetName | String | はい | いいえ | 文字セット。 | 詳細については、「文字セット表」をご参照ください。 |
DBClusterId | String | はい | いいえ | クラスタの ID。 | なし。 |
DBName | String | はい | いいえ | データベースの名前。 | 名前は次の要件を満たしている必要があります。
|
AccountPrivilege | String | いいえ | いいえ | アカウントの権限。 | 有効な値:
このプロパティを空のままにすると、デフォルト値の ReadWrite が使用されます。 説明
|
AccountName | String | いいえ | いいえ | データベースへのアクセス権限が付与されるアカウントの名前。 | 説明
|
Collate | String | いいえ | いいえ | 言語環境設定。 | このプロパティは、作成されるデータベースの照合順序を指定するために使用されます。 説明
|
Ctype | String | いいえ | いいえ | 言語環境設定。 | このプロパティは、データベースの文字タイプを指定するために使用されます。 説明
|
DBDescription | String | いいえ | はい | データベースの説明。 | 説明は次の要件を満たしている必要があります。
説明 このプロパティは、PolarDB for Oracle クラスタと PolarDB for PostgreSQL クラスタに必須です。このプロパティは、PolarDB for MySQL クラスタではオプションです。 |
戻り値
Fn::GetAtt
なし。
例
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
- 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",
"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"
}
}
}
}
}