Obtains the metadata of a secret.

This operation returns the metadata information stored in a secret object and does not return the encrypted secret value.


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 DescribeSecret

The operation that you want to perform.

Set the value to DescribeSecret.

SecretName String Yes seret001

The name of the secret whose metadata you want to obtain.

FetchTags String No true

Specifies whether to return the resource tags of the secret.

Default value: false

Response parameters

Parameter Type Example Description
RequestId String 93348dfb-3627-4417-8d90-487a76a909c9

The ID of the request.

Arn String acs:kms:test-1:1270461636684862:secret/seret001

The Alibaba Cloud Resource Name (ARN).

SecretName String seret003

The name of the secret.

EncryptionKeyId String 00aa68af-2c02-4f68-95fe-3435d3305f1a

The ID of the KMS customer master key (CMK) that is used to encrypt the secret value.

Description String userinfo

The description of the secret.

CreateTime String 2020-02-21T15:39:26Z

The time when the secret was created.

UpdateTime String 2020-02-21T15:39:26Z

The time when the secret was updated.

PlannedDeleteTime String 2020-03-21T15:45:12Z

The time when the secret is scheduled to be deleted.

Tags Array

The resource tags of the secret.

If the request parameter FetchTags is set to false, this parameter is not returned.

TagKey String key1

The key of a resource tag.

TagValue String val1

The value of a resource tag.


Sample requests

&<Common request parameters>

Sample success responses

XML format

<Description>data3 description</Description>

JSON format

    "Arn": "acs:kms:test-1:1270461636684862:secret/seret003",
    "SecretName": "seret003",
    "EncryptionKeyId": "00aa68af-2c02-4f68-95fe-3435d3305f1a",
    "Description": "data3 description",
    "Tags": {
        "Tag": []
    "CreateTime": "2020-02-21T15:45:12Z",
    "UpdateTime": "2020-02-21T15:45:12Z",
    "RequestId": "da08ec4c-7a55-4e98-9686-fca7114f6696"

Error codes

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