Associates an existing alias with a different CMK ID.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes UpdateAlias

The operation that you want to perform. Set the value to UpdateAlias.

AliasName String Yes alias/example

The alias that you want to associate with a different CMK ID.

The value must be 1 to 255 characters in length and must include the alias/ prefix.

KeyId String Yes 1234abcd-12ab-34cd-56ef-12345678****

The CMK ID with which you want to associate the alias. This parameter is the globally unique ID of the CMK.

Response parameters

Parameter Type Example Description
RequestId String 1d2baaf3-d357-46c2-832e-13560c2bd9cd

The ID of the request.

Examples

Sample requests

https://kms.cn-hangzhou.aliyuncs.com/?Action=UpdateAlias
&AliasName=alias/example
&KeyId=1234abcd-12ab-34cd-56ef-12345678****
&<Common request parameters>

Sample success responses

XML format

<KMS>
          <RequestId>1d2baaf3-d357-46c2-832e-13560c2bd9cd</RequestId>
</KMS>

JSON format

{
        "RequestId": "1d2baaf3-d357-46c2-832e-13560c2bd9cd"
}

Error codes

HTTP status code Error code Error message Description
400 Throttling Request was denied due to request throttling. The error message returned because your traffic in this period has exceeded the limit. If your business requirements are not met, submit a ticket.
404 Forbidden.KeyNotFound The specified Key is not found. The error message returned because the specified CMK does not exist.

For a list of error codes, visit the API Error Center.