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.

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 DescribeSecret

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

SecretName String Yes secret001

The name of the secret you want to delete.

FetchTags String No true

Specifies whether to return the resource tags of the secret.

Default value: false

Response parameters

Parameter Type Example Description
Arn String acs:kms:test-1:1270461636684862:secret/secret001

The Alibaba Cloud Resource Name (ARN).

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

The time when the secret was created.

Description String userinfo

The description of the secret.

EncryptionKeyId String 00 aa68 af-2c02-4f68-95fe-3435d330 instance account number *

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

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

The time when the secret is scheduled to be deleted.

RequestId String 93348dfb-3627-4417-8d90-487a76a909c9

The ID of the request.

SecretName String secret003

The name of a secret.

Tags Array

The resource tags of the secret.

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

Tag
TagKey String key1

The key of a resource tag.

TagValue String val1

The value of a resource tag.

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

The time when the secret was updated.

Examples

Sample requests

http(s)://[Endpoint]/? SecretName=secret001
&<Common request parameters>

Sample success responses

XML format

<Arn>acs:kms:test-1:1270461636684862:secret/secret003</Arn>
<SecretName>secret003</SecretName>
<EncryptionKeyId>00aa68af-2c02-4f68-95fe-3435d330****</EncryptionKeyId>
<Description>data3 description</Description>
<Tags>
</Tags>
<CreateTime>2020-02-21T15:45:12Z</CreateTime>
<UpdateTime>2020-02-21T15:45:12Z</UpdateTime>
<RequestId>da08ec4c-7a55-4e98-9686-fca7114f6696</RequestId>

JSON format

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

Error code

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