ALIYUN::POLARDB::AccountPrivilege は、指定された ApsaraDB for POLARDB クラスタ内の 1 つ以上のデータベースに対するアクセス権限を標準アカウントに付与するために使用されます。
構文
{
"Type": "ALIYUN::POLARDB::AccountPrivilege",
"Properties": {
"DBClusterId": String,
"AccountPrivilege": String,
"DBName": String,
"AccountName": String
}
}プロパティ
| 名前 | タイプ | 必須 | 編集可能 | 説明 | 有効性 |
| DBClusterId | String | はい | いいえ | クラスタの ID。 | なし |
| AccountPrivilege | String | はい | いいえ | データベースアカウントの権限。 | 有効な値: ReadWrite、ReadOnly、DMLOnly、および DDLOnly。AccountPrivilege パラメータで指定されたアカウント権限の数は、DBName パラメータで指定されたデータベース名の数と同じである必要があります。各アカウント権限は、順番にデータベース名に対応している必要があります。 |
| DBName | String | はい | いいえ | アクセス権限をデータベースアカウントに付与するデータベースの名前。 | データベースアカウントに 1 つ以上のデータベースに対するアクセス権限を付与できます。複数のデータベースはコンマ (,) で区切ります。 |
| AccountName | String | はい | いいえ | データベースアカウントの名前。 | なし |
レスポンスパラメータ
Fn::GetAtt
なし
例
JSON 形式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Resources": {
"AccountPrivilege": {
"Type": "ALIYUN::POLARDB::AccountPrivilege",
"Properties": {
"DBClusterId": {
"Ref": "DBClusterId"
},
"AccountPrivilege": {
"Ref": "AccountPrivilege"
},
"DBName": {
"Ref": "DBName"
},
"AccountName": {
"Ref": "AccountName"
}
}
}
},
"Parameters": {
"DBClusterId": {
"Type": "String",
"Description": "データベースアカウントが属する ApsaraDB for POLARDB クラスタの ID。" // The ID of the ApsaraDB for POLARDB cluster to which a database account belongs.
},
"AccountPrivilege": {
"MinLength": 1,
"Type": "String",
"Description": "データベース上のデータベースアカウントの権限。有効な値: ReadWrite: データベースに対する読み取りおよび書き込み権限があります。ReadOnly: データベースに対する読み取り専用権限があります。DMLOnly: データ操作言語 (DML) ステートメントのみを実行します。DDLOnly: データ定義言語 (DDL) ステートメントのみを実行します。AccountPrivilege パラメータで指定されたアカウント権限の数は、DBName パラメータで指定されたデータベース名の数と同じである必要があります。各アカウント権限は、順番にデータベース名に対応している必要があります。複数の権限はコンマ (,) で区切ります。" // The permissions of the database account on the database. Valid values: ReadWrite: has read and write permissions on the database. ReadOnly: has the read-only permission on the database. DMLOnly: runs only data manipulation language (DML) statements. DDLOnly: runs only data definition language (DDL) statements.The number of account permissions specified by the AccountPrivilege parameter must be the same as that of database names specified by the DBName parameter. Each account permission must correspond to a database name in sequence. Separate multiple permissions with a comma (,).
},
"DBName": {
"MinLength": 1,
"Type": "String",
"Description": "アクセス権限をデータベースアカウントに付与するデータベースの名前。データベースアカウントに 1 つ以上のデータベースに対するアクセス権限を付与できます。複数のデータベースはコンマ (,) で区切ります。" // The name of the database whose access permissions are to be granted to the database account. You can grant access permissions on one or more databases to the database account. Separate multiple databases with a comma (,).
},
"AccountName": {
"MinLength": 1,
"Type": "String",
"Description": "アクセス権限を付与するデータベースアカウントの名前。", // The name of the database account to be granted access permissions.
"MaxLength": 16
}
}
}YAML 形式
ROSTemplateFormatVersion: '2015-09-01'
Resources:
AccountPrivilege:
Type: ALIYUN::POLARDB::AccountPrivilege
Properties:
DBClusterId:
Ref: DBClusterId
AccountPrivilege:
Ref: AccountPrivilege
DBName:
Ref: DBName
AccountName:
Ref: AccountName
Parameters:
DBClusterId:
Type: String
Description: データベースアカウントが属する ApsaraDB for POLARDB クラスタの ID。 # The ID of the ApsaraDB for POLARDB cluster to which a database account belongs.
AccountPrivilege:
MinLength: 1
Type: String
Description: 'データベース上のデータベースアカウントの権限。有効な値: ReadWrite: データベースに対する読み取りおよび書き込み権限があります。ReadOnly: データベースに対する読み取り専用権限があります。DMLOnly: データ操作言語 (DML) ステートメントのみを実行します。DDLOnly: データ定義言語 (DDL) ステートメントのみを実行します。AccountPrivilege パラメータで指定されたアカウント権限の数は、DBName パラメータで指定されたデータベース名の数と同じである必要があります。各アカウント権限は、順番にデータベース名に対応している必要があります。複数の権限はコンマ (,) で区切ります。' # The permissions of the database account on the database. Valid values: ReadWrite: has read and write permissions on the database. ReadOnly: has the read-only permission on the database. DMLOnly: runs only data manipulation language (DML) statements. DDLOnly: runs only data definition language (DDL) statements. The number of account permissions specified by the AccountPrivilege parameter must be the same as that of database names specified by the DBName parameter. Each account permission must correspond to a database name in sequence.Separate multiple permissions with a comma (,).
DBName:
MinLength: 1
Type: String
Description: アクセス権限をデータベースアカウントに付与するデータベースの名前。データベースアカウントに 1 つ以上のデータベースに対するアクセス権限を付与できます。複数のデータベースはコンマ (,) で区切ります。 # The name of the database whose access permissions are to be granted to the database account. You can grant access permissions on one or more databases to the database account. Separate multiple databases with a comma (,).
AccountName:
MinLength: 1
Type: String
Description: アクセス権限を付与するデータベースアカウントの名前。 # The name of the database account to be granted access permissions.
MaxLength: 16