ALIYUN::RDS::AccountPrivilege用于授权账号访问数据库。
语法
{
"Type": "ALIYUN::RDS::AccountPrivilege",
"Properties": {
"AccountPrivilege": String,
"DBInstanceId": String,
"DBName": String,
"AccountName": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
AccountPrivilege | String | 是 | 是 | 账号权限。 | 取值范围:
|
DBInstanceId | String | 是 | 否 | 实例ID。 | 无。 |
DBName | String | 是 | 否 | 需要授权访问的数据库名称。 | 无。 |
AccountName | String | 是 | 否 | 账号名称。 | 无。 |
返回值
Fn::GetAtt
无。
示例
JSON
格式{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "DBInstanceId": { "Type": "String", "AssociationProperty": "ALIYUN::RDS::Instance::InstanceId" } }, "Resources": { "AccountPrivilege": { "Type": "ALIYUN::RDS::AccountPrivilege", "Properties": { "AccountPrivilege": "ReadOnly", "DBInstanceId": { "Ref": "DBInstanceId" }, "DBName": "dev", "AccountName": "DBUser" } } }, "Outputs": {} }