Queries the metadata of a secret.
Operation description
This operation returns the metadata of a secret. This operation does not return the secret value.
In this example, the metadata of the secret named secret001 is queried.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| SecretName | string | Yes | The name of the secret. | secret001 |
| FetchTags | string | No | Specifies whether to return the resource tags of the secret. Valid values:
| true |
For more information about common request parameters, see Common parameters.
Response parameters
Examples
Sample success responses
JSONformat
{
"UpdateTime": "2022-02-21T15:39:26Z",
"CreateTime": "2022-02-21T15:39:26Z",
"NextRotationDate": "2022-07-06T18:22:03Z",
"EncryptionKeyId": "00aa68af-2c02-4f68-95fe-3435d330****",
"RotationInterval": "3153600s",
"Arn": "acs:kms:cn-hangzhou:154035569884****:secret/secret001",
"ExtendedConfig": "{\\\"SecretSubType\\\":\\\"SingleUser\\\", \\\"DBInstanceId\\\":\\\"rm-uf667446pc955****\\\", \\\"CustomData\\\":{} }",
"LastRotationDate": "2022-07-05T08:22:03Z",
"RequestId": "93348dfb-3627-4417-8d90-487a76a909c9",
"Description": "userinfo",
"SecretName": "secret001",
"AutomaticRotation": "Enabled",
"SecretType": "Rds",
"PlannedDeleteTime": "2022-03-21T15:45:12Z",
"DKMSInstanceId": "kst-bjj62d8f5e0sgtx8h****",
"Tags": {
"Tag": [
{
"TagValue": "val1",
"TagKey": "key1"
}
]
}
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | InvalidParameter | some of the specified parameters "\" is not valid | - |
| 400 | IllegalTimestamp | The input parameter Timestamp that is mandatory for processing this request is not supplied. | The input parameter timestamp indicates that the request is outside the processing time range. |
| 403 | Forbidden.NoPermission | This operation is forbidden by permission system | - |
| 404 | Forbidden.ResourceNotFound | Resource not found | - |
| 404 | InvalidAccessKeyId.NotFound | The Access Key ID provided does not exist in our records. | - |
| 500 | InternalFailure | Internal Failure | - |
For a list of error codes, visit the Service error codes.
Change history
| Change time | Summary of changes | Operation |
|---|---|---|
| 2023-03-08 | The Error code has changed | View Change Details |
