ALIYUN::PolarDBX::Account类型用于创建账号。
语法
{
"Type": "ALIYUN::PolarDBX::Account",
"Properties": {
"AccountDescription": String,
"DBInstanceId": String,
"AccountPassword": String,
"AccountName": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|
AccountDescription | String | 否 | 是 | 账号描述信息。 | 无 |
DBInstanceId | String | 是 | 否 | 数据库实例ID。 | 无 |
AccountPassword | String | 是 | 是 | 账号密码。 | 无 |
AccountName | String | 是 | 否 | 账号名称。 | 无 |
返回值
Fn::GetAtt
- AccountDescription:账号描述信息。
- DBInstanceId:数据库实例ID。
- AccountType:账号类型。
- AccountName:账号名称。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
DBInstanceId:
Type: String
Description: The ID of the instance.
AccountPassword:
Type: String
Description: The password of the account.
Resources:
ExtensionResource:
Type: ALIYUN::PolarDBX::Account
Properties:
DBInstanceId:
Ref: DBInstanceId
AccountPassword:
Ref: AccountPassword
AccountName: Demo
Outputs:
AccountDescription:
Description: Account description information.
Value:
Fn::GetAtt:
- ExtensionResource
- AccountDescription
DBInstanceId:
Description: The ID of the instance.
Value:
Fn::GetAtt:
- ExtensionResource
- DBInstanceId
AccountType:
Description: Account type. 0 represents an ordinary account, and 1 represents a high-privilege account.
Value:
Fn::GetAtt:
- ExtensionResource
- AccountType
AccountName:
Description: Account name.
Value:
Fn::GetAtt:
- ExtensionResource
- AccountName
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"DBInstanceId": {
"Type": "String",
"Description": "The ID of the instance."
},
"AccountPassword": {
"Type": "String",
"Description": "The password of the account."
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::PolarDBX::Account",
"Properties": {
"DBInstanceId": {
"Ref": "DBInstanceId"
},
"AccountPassword": {
"Ref": "AccountPassword"
},
"AccountName": "Demo"
}
}
},
"Outputs": {
"AccountDescription": {
"Description": "Account description information.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"AccountDescription"
]
}
},
"DBInstanceId": {
"Description": "The ID of the instance.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"DBInstanceId"
]
}
},
"AccountType": {
"Description": "Account type. 0 represents an ordinary account, and 1 represents a high-privilege account.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"AccountType"
]
}
},
"AccountName": {
"Description": "Account name.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"AccountName"
]
}
}
}
}