All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::REDIS::Account

Last Updated:Jun 03, 2026

ALIYUN::REDIS::Account creates an account with specific permissions for a Tair (Redis OSS-compatible) instance.

Syntax

{
  "Type": "ALIYUN::REDIS::Account",
  "Properties": {
    "AccountDescription": String,
    "InstanceId": String,
    "AccountName": String,
    "AccountPrivilege": String,
    "AccountType": String,
    "AccountPassword": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

AccountDescription

String

No

Yes

The account description.

2 to 256 characters. Must start with a letter. Cannot start with http:// or https://. Can contain letters, digits, and hyphens (-).

InstanceId

String

Yes

No

The instance ID.

None.

AccountName

String

Yes

No

The account name.

Up to 16 characters. Must start with a letter. Can contain lowercase letters, digits, and underscores (_).

AccountPrivilege

String

No

Yes

The permissions to grant to the account.

Valid values:

  • RoleReadOnly: read-only.

  • RoleReadWrite (default): read and write.

  • RoleRepl: replication. Includes read/write permissions and allows the SYNC and PSYNC commands. Available only for standard Redis 4.0 instances.

AccountType

String

No

No

The account type.

Set to Normal (standard account).

AccountPassword

String

Yes

Yes

The account password.

8 to 32 characters. Must contain at least three of the following types: uppercase letters, lowercase letters, digits, and special characters. Supported special characters: ! @ # $ % ^ * ( ) _ + - =.

Return values

Fn::GetAtt

  • InstanceId: the instance ID.

  • AccountName: the account name.

Examples

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  InstanceId:
    Type: String
    Description: The ID of the instance for which you want to create the account.
Resources:
  Account:
    Type: ALIYUN::REDIS::Account
    Properties:
      AccountDescription: Test Create Redis Account
      InstanceId:
        Ref: InstanceId
      AccountType: Normal
      AccountName: demo_redis
      AccountPrivilege: RoleReadWrite
      AccountPassword: Admin@123!
Outputs:
  InstanceId:
    Description: The name of the instance.
    Value:
      Fn::GetAtt:
        - Account
        - InstanceId
  AccountName:
    Description: The name of the account.
    Value:
      Fn::GetAtt:
        - Account
        - AccountName
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "InstanceId": {
      "Type": "String",
      "Description": "The ID of the instance for which you want to create the account."
    }
  },
  "Resources": {
    "Account": {
      "Type": "ALIYUN::REDIS::Account",
      "Properties": {
        "AccountDescription": "Test Create Redis Account",
        "InstanceId": {
          "Ref": "InstanceId"
        },
        "AccountType": "Normal",
        "AccountName": "demo_redis",
        "AccountPrivilege": "RoleReadWrite",
        "AccountPassword": "Admin@123!"
      }
    }
  },
  "Outputs": {
    "InstanceId": {
      "Description": "The name of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "Account",
          "InstanceId"
        ]
      }
    },
    "AccountName": {
      "Description": "The name of the account.",
      "Value": {
        "Fn::GetAtt": [
          "Account",
          "AccountName"
        ]
      }
    }
  }
}

The redis templates repository provides more examples that use ALIYUN::REDIS::Instance, ALIYUN::REDIS::Whitelist, and ALIYUN::REDIS::Account.