DATASOURCE::REDIS::Account类型用于查找指定Redis实例中某个账号的信息。
语法
{
"Type": "DATASOURCE::REDIS::Account",
"Properties": {
"AccountName": String,
"InstanceId": String,
"RefreshOptions": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
AccountName | String | 是 | 是 | 账号名。 | 无 |
InstanceId | String | 是 | 是 | 实例 ID。 | 无 |
RefreshOptions | String | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 有效值:
|
返回值
Fn::GetAtt
Description:账号备注信息。
InstanceId:实例 ID。
AccountPrivilege:账号权限。
AccountType:账号类型。
AccountName:账号名称。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
InstanceId:
Type: String
Description:
en: The ID of the Redis instance.
Required: true
AccountName:
Type: String
Description:
en: The name of the account that you want to query.
Required: true
Resources:
ExtensionDataSource:
Type: DATASOURCE::REDIS::Account
Properties:
InstanceId:
Ref: InstanceId
AccountName:
Ref: AccountName
Outputs:
Description:
Description: The description of the account.
Value:
Fn::GetAtt:
- ExtensionDataSource
- Description
InstanceId:
Description: The ID of the Redis instance.
Value:
Fn::GetAtt:
- ExtensionDataSource
- InstanceId
AccountPrivilege:
Description: |-
The permission of the account. Default value: RoleReadWrite. Valid values:
* RoleReadOnly: The account has the read-only permissions.
* RoleReadWrite: The account has the read and write permissions.
Value:
Fn::GetAtt:
- ExtensionDataSource
- AccountPrivilege
AccountType:
Description: |-
The type of the account. Valid values:
* Normal: standard account
* Super: super account
Value:
Fn::GetAtt:
- ExtensionDataSource
- AccountType
AccountName:
Description: The name of the account.
Value:
Fn::GetAtt:
- ExtensionDataSource
- AccountName
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"InstanceId": {
"Type": "String",
"Description": {
"en": "The ID of the Redis instance."
},
"Required": true
},
"AccountName": {
"Type": "String",
"Description": {
"en": "The name of the account that you want to query."
},
"Required": true
}
},
"Resources": {
"ExtensionDataSource": {
"Type": "DATASOURCE::REDIS::Account",
"Properties": {
"InstanceId": {
"Ref": "InstanceId"
},
"AccountName": {
"Ref": "AccountName"
}
}
}
},
"Outputs": {
"Description": {
"Description": "The description of the account.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Description"
]
}
},
"InstanceId": {
"Description": "The ID of the Redis instance.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"InstanceId"
]
}
},
"AccountPrivilege": {
"Description": "The permission of the account. Default value: RoleReadWrite. Valid values:\n* RoleReadOnly: The account has the read-only permissions.\n* RoleReadWrite: The account has the read and write permissions.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"AccountPrivilege"
]
}
},
"AccountType": {
"Description": "The type of the account. Valid values:\n* Normal: standard account\n* Super: super account",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"AccountType"
]
}
},
"AccountName": {
"Description": "The name of the account.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"AccountName"
]
}
}
}
}