Table Of Contents


User Guide

First time using the AWS CLI? See the User Guide for help getting started.

[ aws . ssm ]



List all versions for a document.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.


--name <value>
[--max-results <value>]
[--next-token <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]


--name (string)

The name of the document about which you want version information.

--max-results (integer)

The maximum number of items to return for this call. The call also returns a token that you can specify in a subsequent call to get the next set of results.

--next-token (string)

The token for the next set of items to return. (You received this token from a previous call.)

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.


To view details about existing document versions

This example lists all the versions for a document.


aws ssm list-document-versions --name "patchWindowsAmi"


      "DocumentVersions": [
                      "IsDefaultVersion": false,
                      "Name": "patchWindowsAmi",
                      "DocumentVersion": "2",
                      "CreatedDate": 1475799950.484
                      "IsDefaultVersion": false,
                      "Name": "patchWindowsAmi",
                      "DocumentVersion": "1",
                      "CreatedDate": 1475799931.064


DocumentVersions -> (list)

The document versions.


Version information about the document.

Name -> (string)

The document name.

DocumentVersion -> (string)

The document version.

CreatedDate -> (timestamp)

The date the document was created.

IsDefaultVersion -> (boolean)

An identifier for the default version of the document.

DocumentFormat -> (string)

The document format, either JSON or YAML.

NextToken -> (string)

The token to use when requesting the next set of items. If there are no additional items to return, the string is empty.