All Products
Search
Document Center

Key Management Service:UntagResource

Last Updated:Jul 29, 2025

Detaches tags from a master key, a credential, or a certificate.

Operation description

For information about the access policy that is required for a RAM user or RAM role to call this OpenAPI operation, see Resource Access Management.

This topic provides an example of how to detach tags with the tag keys tagkey1 and tagkey2 from the key with the ID 08c33a6f-4e0a-4a1b-a3fa-7ddf****.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

KeyId

string

No

The ID of the key. This is the globally unique identifier (GUID) of the master key (CMK).

Note

You must specify one and only one of the KeyId, SecretName, and CertificateId parameters.

08c33a6f-4e0a-4a1b-a3fa-7ddf****

TagKeys

string

Yes

One or more tag keys. Separate multiple tag keys with commas (,).
You need to specify only tag keys, not tag values.
The tag key can be 1 to 128 bytes in length.




["tagkey1","tagkey2"]

SecretName

string

No

The name of the credential.

Note

You must specify one and only one of the KeyId, SecretName, and CertificateId parameters.

MyDbC****

CertificateId

string

No

The ID of the certificate.

Note

You must specify one and only one of the KeyId, SecretName, and CertificateId parameters.

770dbe42-e146-43d1-a55a-1355db86****

For information about common request parameters, see Common parameters.

Response parameters

Parameter

Type

Description

Example

object

RequestId

string

The ID of the request. This ID is generated by Alibaba Cloud to uniquely identify the request. You can use this ID to troubleshoot issues.

4162a6af-bc99-40b3-a552-89dcc8aaf7c8

Examples

Success response

JSON format

{
  "RequestId": "4162a6af-bc99-40b3-a552-89dcc8aaf7c8"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameter The specified parameter is not valid. An invalid value is specified for the parameter.
404 InvalidAccessKeyId.NotFound The Access Key ID provided does not exist in our records.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.