All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::KMS::Alias

Last Updated:Jun 03, 2026

Creates an alias for a customer master key (CMK) in Key Management Service (KMS).

Syntax

{
  "Type": "ALIYUN::KMS::Alias",
  "Properties": {
    "KeyId": String,
    "AliasName": String
  }
}

Properties

Property Name Type Required Update Allowed Description Constraints
KeyId String Yes No The globally unique ID of the CMK. None.
AliasName String Yes No The alias for the CMK. Use this alias to call Encrypt, GenerateDataKey, and DescribeKey. Must start with the prefix alias/. The part after the prefix must be 1 to 255 characters.

Return values

Fn::GetAtt

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Resources:
      Alias:
        Type: ALIYUN::KMS::Alias
        Properties:
          KeyId:
            Ref: KeyId
          AliasName: alias/test_key
    Parameters:
      KeyId:
        Type: String
        Description: Globally unique identifier of the CMK.
    Outputs: {}
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Resources": {
        "Alias": {
          "Type": "ALIYUN::KMS::Alias",
          "Properties": {
            "KeyId": {
              "Ref": "KeyId"
            },
            "AliasName": "alias/test_key"
          }
        }
      },
      "Parameters": {
        "KeyId": {
          "Type": "String",
          "Description": "Globally unique identifier of the CMK."
        }
      },
      "Outputs": {}
    }