Queries all version information of a secret.
Operation description
-
For details about the access policy required for a Resource Access Management (RAM) user or RAM role to invoke this operation, refer to Access control.
-
Version information does not include secret values. By default, only secret versions that have version stages are returned.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| SecretName |
string |
Yes |
The secret name or secret Amazon Resource Name (ARN). Note
When accessing a secret under another Alibaba Cloud account, you must specify the secret ARN. The format of the secret ARN is |
secret001 |
| IncludeDeprecated |
string |
No |
Specifies whether to include secret versions that do not have version stages in the response. Valid values:
|
false |
| PageNumber |
integer |
No |
The page number of the current page in a paged query. Default value: 1. |
1 |
| PageSize |
integer |
No |
The number of entries per page in a paged query. Default value: 20. |
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| SecretName |
string |
The secret name. |
secret001 |
| RequestId |
string |
The ID of the request. The ID is a unique identifier that Alibaba Cloud generates for the request and can be used to troubleshoot issues. |
5b75d8b1-5b6a-4ec0-8e0c-c08befdfad47 |
| PageSize |
integer |
The page size of the current page. |
10 |
| PageNumber |
integer |
The current page number. |
1 |
| TotalCount |
integer |
The total number of entries. |
1 |
| VersionIds |
object |
||
| VersionId |
array<object> |
The list of secret version information. |
|
|
array<object> |
The list of secret version information. |
||
| VersionId |
string |
The version number. |
v1 |
| CreateTime |
string |
The time when the version was created. |
2024-02-21T15:39:26Z |
| VersionStages |
object |
||
| VersionStage |
array |
The stage labels of the version. |
|
|
string |
The stage labels of the version. |
{"VersionStage": ["ACSCurrent","uStage1"]} |
Examples
Success response
JSON format
{
"SecretName": "secret001",
"RequestId": "5b75d8b1-5b6a-4ec0-8e0c-c08befdfad47",
"PageSize": 10,
"PageNumber": 1,
"TotalCount": 1,
"VersionIds": {
"VersionId": [
{
"VersionId": "v1",
"CreateTime": "2024-02-21T15:39:26Z",
"VersionStages": {
"VersionStage": [
"{\"VersionStage\": [\"ACSCurrent\",\"uStage1\"]}"
]
}
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParameter | some of the specified parameters "\" is not valid | |
| 500 | InternalFailure | Internal Failure | |
| 403 | Forbidden.NoPermission | This operation is forbidden by permission system | |
| 404 | Forbidden.ResourceNotFound | Resource not found |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.