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 |
|
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:
|
|
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.