Queries all versions of a secret.
The secret value is not included in the returned version information. By default, deprecated secret versions are not returned.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListSecretVersionIds |
The operation that you want to perform. Set the value to ListSecretVersionIds. |
SecretName | String | Yes | secret001 |
The name of the secret. |
IncludeDeprecated | String | No | false |
Specifies whether to return deprecated secret versions. Valid values:
Default value: false. |
PageNumber | Integer | No | 1 |
The number of the page to return. Default value: 1. |
PageSize | Integer | No | 10 |
The number of entries to return on each page. Default value: 10. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
SecretName | String | secret001 |
The name of the secret. |
RequestId | String | 5b75d8b1-5b6a-4ec0-8e0c-c08befdfad47 |
The ID of the request, which is used to locate and troubleshoot issues. |
PageSize | Integer | 10 |
The number of entries returned per page. |
PageNumber | Integer | 1 |
The page number of the returned page. |
TotalCount | Integer | 4 |
The number of entries returned on the current page. |
VersionIds | Array of VersionId |
The list of secret versions. |
|
VersionId | |||
VersionId | String | 00000000000000000000000000000000203 |
The version number. |
CreateTime | String | 2020-02-21T15:39:26Z |
The time when the secret version was created. |
VersionStages | Array of String | null |
The stage labels that mark the secret version. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=ListSecretVersionIds
&SecretName=secret001
&IncludeDeprecated=true
&PageNumber=1
&PageSize=10
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ListSecretVersionIdsResponse>
<SecretName>secret001</SecretName>
<RequestId>5b75d8b1-5b6a-4ec0-8e0c-c08befdfad47</RequestId>
<PageSize>10</PageSize>
<PageNumber>1</PageNumber>
<TotalCount>4</TotalCount>
<VersionIds>
<VersionId>00000000000000000000000000000000203</VersionId>
<CreateTime>2020-02-21T15:39:26Z</CreateTime>
<VersionStages>{ "VersionStage": [ "ACSCurrent", "UStage1", "Ustage2" ] }</VersionStages>
</VersionIds>
</ListSecretVersionIdsResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"SecretName" : "secret001",
"RequestId" : "5b75d8b1-5b6a-4ec0-8e0c-c08befdfad47",
"PageSize" : 10,
"PageNumber" : 1,
"TotalCount" : 4,
"VersionIds" : [ {
"VersionId" : "00000000000000000000000000000000203",
"CreateTime" : "2020-02-21T15:39:26Z",
"VersionStages" : [ "{ \"VersionStage\": [ \"ACSCurrent\", \"UStage1\", \"Ustage2\" ] }" ]
} ]
}
Error codes
For a list of error codes, visit the Error Center.