ALIYUN::ClickHouse::EnterpriseDBClusterAccount类型用于为云数据库ClickHouse企业版集群创建数据库账号。
语法
{
"Type": "ALIYUN::ClickHouse::EnterpriseDBClusterAccount",
"Properties": {
"Account": String,
"AccountType": String,
"DBInstanceId": String,
"Password": String,
"Description": String,
"DmlAuthSetting": Map
}
}
属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
Account |
String |
是 |
否 |
数据库账号的名称。 |
无 |
|
AccountType |
String |
是 |
否 |
数据库账号的类型。 |
取值范围:
|
|
DBInstanceId |
String |
是 |
否 |
集群ID。 |
无 |
|
Password |
String |
是 |
是 |
数据库账号密码。 |
需满足以下规则。- 由大写字母、小写字母、数字和特殊字符中的至少三种组成。- Oh-! @#$%^& *()_+-= 为特殊字符。- 长度为8~32个字符。 |
|
Description |
String |
否 |
是 |
账号的描述。 |
无 |
|
DmlAuthSetting |
Map |
否 |
是 |
权限信息。 |
无 |
DmlAuthSetting语法
"DmlAuthSetting": {
"DdlAuthority": Boolean,
"DmlAuthority": Integer,
"AllowDictionaries": List,
"AllowDatabases": List
}
DmlAuthSetting属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
DdlAuthority |
Boolean |
是 |
是 |
是否授予数据库账号DDL权限。 |
取值说明:
|
|
DmlAuthority |
Integer |
是 |
是 |
是否授予数据库账号 |
DML权限。取值如下:
|
|
AllowDatabases |
List |
否 |
是 |
需要授权的数据库列表。 |
无 |
|
AllowDictionaries |
List |
否 |
是 |
需要授权的字典列表。 |
无 |
返回值
Fn::GetAtt
-
Account:数据库账号的名称。
-
Description:账号的描述。
-
AccountType:数据库账号的类型。
-
DmlAuthSetting:权限信息。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
Account:
Type: String
Description:
en: The name of the database account.
zh: 数据库账号的名称。
Required: true
DBInstanceId:
Type: String
Description:
en: The cluster ID.
zh: 集群ID。
Required: true
AccountType:
Type: String
Description:
en: |-
The type of the database account. Valid values:
- **NormalAccount**: Normal account number.
- **SuperAccount**: The privileged account.
zh: |-
数据库账号的类型。取值范围:
- **NormalAccount**:普通账号。
- **SuperAccount**:高权限账号。
AllowedValues:
- NormalAccount
- SuperAccount
Required: true
Password:
Type: String
Description:
en: |-
Database account password. Set the following rules.
- Consists of at least three of uppercase letters, lowercase letters, numbers, and special characters.
- Oh-! @#$%^& *()_+-= is a special character.
- Length is 8~32 characters.
zh: |-
数据库账号密码。需满足以下规则。
- 由大写字母、小写字母、数字和特殊字符中的至少三种组成。
- Oh-! @#$%^& *()_+-= 为特殊字符。
- 长度为8~32个字符。
Required: true
Resources:
ExtensionResource:
Type: ALIYUN::ClickHouse::EnterpriseDBClusterAccount
Properties:
Account:
Ref: Account
DBInstanceId:
Ref: DBInstanceId
AccountType:
Ref: AccountType
Password:
Ref: Password
Outputs:
Account:
Description:
en: The name of the database account.
zh: 数据库账号的名称。
Value:
Fn::GetAtt:
- ExtensionResource
- Account
Description:
Description:
en: The description of the account.
zh: 账号的描述。
Value:
Fn::GetAtt:
- ExtensionResource
- Description
AccountType:
Description:
en: The type of the database account.
zh: 数据库账号的类型。
Value:
Fn::GetAtt:
- ExtensionResource
- AccountType
DmlAuthSetting:
Description:
en: The information about permissions.
zh: 权限信息。
Value:
Fn::GetAtt:
- ExtensionResource
- DmlAuthSetting
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"Account": {
"Type": "String",
"Description": {
"en": "The name of the database account.",
"zh": "数据库账号的名称。"
},
"Required": true
},
"DBInstanceId": {
"Type": "String",
"Description": {
"en": "The cluster ID.",
"zh": "集群ID。"
},
"Required": true
},
"AccountType": {
"Type": "String",
"Description": {
"en": "The type of the database account. Valid values:\n- **NormalAccount**: Normal account number.\n- **SuperAccount**: The privileged account.",
"zh": "数据库账号的类型。取值范围:\n- **NormalAccount**:普通账号。\n- **SuperAccount**:高权限账号。"
},
"AllowedValues": [
"NormalAccount",
"SuperAccount"
],
"Required": true
},
"Password": {
"Type": "String",
"Description": {
"en": "Database account password. Set the following rules.\n- Consists of at least three of uppercase letters, lowercase letters, numbers, and special characters.\n- Oh-! @#$%^& *()_+-= is a special character.\n- Length is 8~32 characters.",
"zh": "数据库账号密码。需满足以下规则。\n- 由大写字母、小写字母、数字和特殊字符中的至少三种组成。\n- Oh-! @#$%^& *()_+-= 为特殊字符。\n- 长度为8~32个字符。"
},
"Required": true
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::ClickHouse::EnterpriseDBClusterAccount",
"Properties": {
"Account": {
"Ref": "Account"
},
"DBInstanceId": {
"Ref": "DBInstanceId"
},
"AccountType": {
"Ref": "AccountType"
},
"Password": {
"Ref": "Password"
}
}
}
},
"Outputs": {
"Account": {
"Description": {
"en": "The name of the database account.",
"zh": "数据库账号的名称。"
},
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Account"
]
}
},
"Description": {
"Description": {
"en": "The description of the account.",
"zh": "账号的描述。"
},
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Description"
]
}
},
"AccountType": {
"Description": {
"en": "The type of the database account.",
"zh": "数据库账号的类型。"
},
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"AccountType"
]
}
},
"DmlAuthSetting": {
"Description": {
"en": "The information about permissions.",
"zh": "权限信息。"
},
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"DmlAuthSetting"
]
}
}
}
}
该文章对您有帮助吗?