ALIYUN::KMS::Alias类型用于给主密钥(CMK)创建一个别名。
语法
{
"Type": "ALIYUN::KMS::Alias",
"Properties": {
"KeyId": String,
"AliasName": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
KeyId | String | 是 | 否 | Key的全局唯一标识符。 | 无。 |
AliasName | String | 是 | 否 | CMK 的别名,可以使用别名调用 Encrypt、GenerateDataKey、 DescribeKey。 | 前缀以外的字符长度:最小长度为 1 字符,最大长度为255 字符。 - 必须包含前缀 alias/。 |
返回值
Fn::GetAtt
- 无。
示例
{
"ROSTemplateFormatVersion": "2015-09-01",
"Resources": {
"Alias": {
"Type": "ALIYUN::KMS::Alias",
"Properties": {
"KeyId": {
"Ref": "KeyId"
},
"AliasName": {
"Ref": "AliasName"
}
}
}
},
"Parameters": {
"KeyId": {
"Type": "String",
"Description": "Globally unique identifier of the CMK."
},
"AliasName": {
"MinLength": 1,
"Type": "String",
"Description": "- The display name of the key. You can use the alias to call APIs such as Encrypt, GenerateDataKey, and DescribeKey. - Not including the prefix, the minimum length of an alias is 1 and the maximum length is 255. - The prefix alias/ must be included.",
"MaxLength": 255
}
},
"Outputs": {}
}