All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::REDIS::Accounts

Last Updated:Dec 26, 2024

DATASOURCE::REDIS::Accounts is used to query the information about accounts of a Tair (Redis OSS-compatible) instance.

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

InstanceId

String

Yes

Yes

The instance ID.

None.

AccountName

String

No

Yes

The name of the account that you want to query.

None.

RefreshOptions

String

No

Yes

The refresh policy for data source resources when the stack is updated.

Valid values:

  • Never (default): does not refresh data source resources when the stack is updated.

  • Always: refreshes data source resources when the stack is updated.

Return values (Fn::GetAtt)

  • AccountNames: the names of the accounts.

  • Accounts: details of the accounts.

Property

Type

Description

Constraint

AccountNames

List

The names of the accounts.

None.

Accounts

List

Details of the accounts.

None.

AccountStatus

String

The status of the account.

Valid values:

  • Unavailable: The account is unavailable.

  • Available: The account is available.

AccountDescription

String

The description of the account.

None.

InstanceId

String

The instance ID.

None.

AccountType

String

The account type.

Valid values:

  • Normal: standard account

  • Super: superuser account

AccountName

String

The account name.

None.

DatabasePrivileges

List

The permissions of the account.

Example:

[ {
          "AccountPrivilege" : "RoleReadWrite"
        } ]

Examples

{
  "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