CmdID

CmdID / aws / aws secretsmanager

aws secretsmanager list-secret-version-ids

Lists the versions of a secret. AWS CLI reference

1 example 4 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To list all of the secret versions associated with a secret

The following list-secret-version-ids example gets a list of all of the versions of a secret.

aws secretsmanager list-secret-version-ids --secret-id MyTestSecretIdentify
--secret-idThe ARN or name of the secret whose versions you want to list.
Its output
{
    "Versions": [
        {
            "VersionId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
            "VersionStages": [
                "AWSPREVIOUS"
            ],
            "LastAccessedDate": 1523477145.713,
            "CreatedDate": 1523477145.713
        },
        {
            "VersionId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE22222",
            "VersionStages": [
                "AWSCURRENT"
            ],
            "LastAccessedDate": 1523477145.713,
            "CreatedDate": 1523486221.391
        },
        {
            "CreatedDate": 1.51197446236E9,
            "VersionId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE33333;"
        }
    ],
    "ARN": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MyTestSecret-a1b2c3",
    "Name": "MyTestSecret"
}

For more information, see What's in a Secrets Manager secret? in the Secrets Manager User Guide.

Options

4 in the AWS CLI reference
--include-deprecatedSpecifies whether to include versions of secrets that don't have any staging labels attached to them.
--max-resultsThe number of results to include in the response.
--next-tokenA token that indicates where the output should continue from, if a previous call did not show all results.
--secret-idThe ARN or name of the secret whose versions you want to list.