Todos os produtos
Search
Central de documentação

Resource Orchestration Service:DATASOURCE::REDIS::Account

Última atualização: Jun 27, 2026

Consulta as informações de uma conta específica em uma instância do ApsaraDB for Redis.

Sintaxe

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

Propriedades

Propriedade

Tipo

Obrigatória

Editável

Descrição

Restrição

AccountName

String

Sim

Sim

Nome da conta.

Nenhuma.

InstanceId

String

Sim

Sim

ID da instância.

Nenhuma.

RefreshOptions

String

Não

Sim

Política de atualização dos recursos de fonte de dados ao atualizar a pilha.

Valores válidos:

  • Never (padrão): não atualiza os recursos de fonte de dados durante a atualização da pilha.

  • Always: atualiza os recursos de fonte de dados durante a atualização da pilha.

Valores de retorno

Fn::GetAtt

  • Description: descrição da conta.

  • InstanceId: ID da instância.

  • AccountPrivilege: permissões da conta.

  • AccountType: tipo da conta.

  • AccountName: nome da conta.

Exemplos

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