DATASOURCE::REDIS::Accounts类型用于查找指定Redis实例的账号列表信息或指定Redis实例中某个账号的信息。
语法
{
"Type": "DATASOURCE::REDIS::Accounts",
"Properties": {
"InstanceId": String,
"AccountName": String,
"RefreshOptions": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
InstanceId | String | 是 | 是 | 实例ID。 | 无 |
AccountName | String | 否 | 是 | 待查询的账号名称。 | 无 |
RefreshOptions | String | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 有效值:
|
返回数据(Fn::GetAtt)
AccountNames:Redis实例的账号列表。
Accounts:Redis实例的账号信息列表。
属性名称 | 类型 | 描述 | 约束 |
AccountNames | List | Redis实例的账号列表。 | 无 |
Accounts | List | Redis实例的账号信息列表。 | 无 |
AccountStatus | String | 账号状态。 | 取值:
|
AccountDescription | String | 账号备注信息。 | 无 |
InstanceId | String | 实例ID。 | 无 |
AccountType | String | 账号类型。 | 取值:
|
AccountName | String | 账号名称。 | 无 |
DatabasePrivileges | List | 账号权限列表。 | 例如:
|
示例
JSON
YAML
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"InstanceId": {
"Type": "String",
"Description": "The ID of the Redis instance."
}
},
"Resources": {
"ExtensionDataSource": {
"Type": "DATASOURCE::REDIS::Accounts",
"Properties": {
"InstanceId": {
"Ref": "InstanceId"
}
}
}
},
"Outputs": {
"AccountNames": {
"Description": "The list of The Redis account names.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"AccountNames"
]
}
},
"Accounts": {
"Description": "The list of The Redis accounts.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Accounts"
]
}
}
}
}
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
InstanceId:
Type: String
Description: The ID of the Redis instance.
Resources:
ExtensionDataSource:
Type: DATASOURCE::REDIS::Accounts
Properties:
InstanceId:
Ref: InstanceId
Outputs:
AccountNames:
Description: The list of The Redis account names.
Value:
Fn::GetAtt:
- ExtensionDataSource
- AccountNames
Accounts:
Description: The list of The Redis accounts.
Value:
Fn::GetAtt:
- ExtensionDataSource
- Accounts