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.


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 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:

  • false: no
  • true: yes

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 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.


Sample requests

&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK

        <VersionStages>{ "VersionStage": [ "ACSCurrent", "UStage1", "Ustage2" ] }</VersionStages>

JSON format

HTTP/1.1 200 OK

  "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.