ALIYUN::DRDS::Account類型用于創建實例級賬號。
語法
{
"Type": "ALIYUN::DRDS::Account",
"Properties": {
"DbPrivileges": List,
"DrdsAccountName": String,
"InstanceId": String,
"Password": String,
"Description": String
}
}
屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
DbPrivileges | List | 是 | 否 | 數據庫權限信息。 | 更多信息,請參見DbPrivileges屬性。 |
DrdsAccountName | String | 是 | 否 | 賬號名稱。 | 無 |
InstanceId | String | 是 | 否 | 實例ID。 | 無 |
Password | String | 是 | 是 | 賬號密碼。 | 無 |
Description | String | 否 | 是 | 賬號描述。 | 無 |
DbPrivileges語法
"DbPrivileges": [
{
"DbName": String,
"Privilege": String
}
]
DbPrivileges屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
DbName | String | 是 | 否 | 數據庫名稱。 | 無 |
Privilege | String | 是 | 是 | 賬戶權限。 | 取值:
|
返回值
Fn::GetAtt
DbPrivileges:數據庫權限信息。
Description:賬號描述。
DrdsAccountName:賬號名稱。
Host:數據庫的訪問地址。
AccountType:賬號類型。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
DbPrivileges:
AssociationPropertyMetadata:
Parameters:
DbName:
Type: String
Description:
en: The name of the database.
Required: true
Privilege:
Type: String
Description:
en: |-
Account permissions.
- **R**: read permission.
- **W**: write permission.
- **DDL**: the permission to perform DDL operations.
- **DML**: the permission to perform DML operations.
AllowedValues:
- R
- W
- DDL
- DML
Required: true
AssociationProperty: List[Parameters]
Type: Json
Description:
en: Database permission information.
Required: true
MinLength: 1
MaxLength: 1000
DrdsAccountName:
Type: String
Description:
en: The name of the account.
Required: true
InstanceId:
Type: String
Description:
en: The ID of the instance.
Required: true
Password:
Type: String
Description:
en: The password of the account.
Required: true
Resources:
ExtensionResource:
Type: ALIYUN::DRDS::Account
Properties:
DbPrivileges:
Ref: DbPrivileges
DrdsAccountName:
Ref: DrdsAccountName
InstanceId:
Ref: InstanceId
Password:
Ref: Password
Outputs: {}
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"DbPrivileges": {
"AssociationPropertyMetadata": {
"Parameters": {
"DbName": {
"Type": "String",
"Description": {
"en": "The name of the database."
},
"Required": true
},
"Privilege": {
"Type": "String",
"Description": {
"en": "Account permissions.\n- **R**: read permission.\n- **W**: write permission.\n- **DDL**: the permission to perform DDL operations.\n- **DML**: the permission to perform DML operations."
},
"AllowedValues": [
"R",
"W",
"DDL",
"DML"
],
"Required": true
}
}
},
"AssociationProperty": "List[Parameters]",
"Type": "Json",
"Description": {
"en": "Database permission information."
},
"Required": true,
"MinLength": 1,
"MaxLength": 1000
},
"DrdsAccountName": {
"Type": "String",
"Description": {
"en": "The name of the account."
},
"Required": true
},
"InstanceId": {
"Type": "String",
"Description": {
"en": "The ID of the instance."
},
"Required": true
},
"Password": {
"Type": "String",
"Description": {
"en": "The password of the account."
},
"Required": true
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::DRDS::Account",
"Properties": {
"DbPrivileges": {
"Ref": "DbPrivileges"
},
"DrdsAccountName": {
"Ref": "DrdsAccountName"
},
"InstanceId": {
"Ref": "InstanceId"
},
"Password": {
"Ref": "Password"
}
}
}
},
"Outputs": {
}
}
文檔內容是否對您有幫助?