ALIYUN::REDIS::Account は、Tair(Redis OSS 互換)インスタンスに対する特定の権限を持つアカウントを作成するために使用されます。
構文
{
"Type": "ALIYUN::REDIS::Account",
"Properties": {
"AccountDescription": String,
"InstanceId": String,
"AccountName": String,
"AccountPrivilege": String,
"AccountType": String,
"AccountPassword": String
}
}プロパティ
プロパティ | タイプ | 必須 | 編集可能 | 説明 | 制約 |
AccountDescription | String | いいえ | はい | アカウントの説明。 | 説明は 2 ~ 256 文字の長さでなければなりません。文字で始まり、 |
InstanceId | String | はい | いいえ | インスタンス ID。 | なし。 |
AccountName | String | はい | いいえ | アカウント名。 | 名前は最大 16 文字の長さにすることができます。文字で始める必要があります。小文字、数字、およびアンダースコア(_)を含めることができます。 |
AccountPrivilege | String | いいえ | はい | アカウントに付与する権限。 | 有効な値:
|
AccountType | String | いいえ | いいえ | アカウントタイプ。 | 標準アカウントを指定する Normal に値を設定します。 |
AccountPassword | String | はい | はい | アカウントのパスワード。 | パスワードは 8 ~ 32 文字の長さでなければなりません。パスワードには、次の文字タイプのうち少なくとも 3 つが含まれている必要があります:大文字、小文字、数字、および特殊文字。次の特殊文字がサポートされています: |
戻り値
Fn::GetAtt
InstanceId:インスタンス ID。
AccountName:アカウント名。
例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
InstanceId:
Type: String
Description: The ID of the instance for which you want to create the account. # アカウントを作成するインスタンスのID。
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." // アカウントを作成するインスタンスのID。
}
},
"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"
]
}
}
}
}その他の例については、redis をご覧ください。例では、ALIYUN::REDIS::Instance、ALIYUN::REDIS::Whitelist、および ALIYUN::REDIS::Account というリソースタイプが使用されています。