DATASOURCE::REDIS::Account

DATASOURCE::REDIS::Account类型用于查找指定Redis实例中某个账号的信息。

语法

{
  "Type": "DATASOURCE::REDIS::Account",
  "Properties": {
    "AccountName": String,
    "InstanceId": String,
    "RefreshOptions": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

AccountName

String

账号名。

InstanceId

String

实例 ID。

RefreshOptions

String

当资源栈更新时,数据源资源的刷新策略。

有效值:

  • Never(默认值):更新堆栈时,从不刷新数据源资源。

  • Always:更新堆栈时,始终刷新数据源资源。

返回值

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"
        ]
      }
    }
  }
}