:doc:`SSM <../../ssm>` / Client / list_document_versions

**********************
list_document_versions
**********************



.. py:method:: SSM.Client.list_document_versions(**kwargs)

  

  List all versions for a document.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/ListDocumentVersions>`_  


  **Request Syntax**
  ::

    response = client.list_document_versions(
        Name='string',
        MaxResults=123,
        NextToken='string'
    )
    
  :type Name: string
  :param Name: **[REQUIRED]** 

    The name of the document. You can specify an Amazon Resource Name (ARN).

    

  
  :type MaxResults: integer
  :param MaxResults: 

    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.

    

  
  :type NextToken: string
  :param NextToken: 

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

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'DocumentVersions': [
              {
                  'Name': 'string',
                  'DisplayName': 'string',
                  'DocumentVersion': 'string',
                  'VersionName': 'string',
                  'CreatedDate': datetime(2015, 1, 1),
                  'IsDefaultVersion': True|False,
                  'DocumentFormat': 'YAML'|'JSON'|'TEXT',
                  'Status': 'Creating'|'Active'|'Updating'|'Deleting'|'Failed',
                  'StatusInformation': 'string',
                  'ReviewStatus': 'APPROVED'|'NOT_REVIEWED'|'PENDING'|'REJECTED'
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **DocumentVersions** *(list) --* 

        The document versions.

        
        

        - *(dict) --* 

          Version information about the document.

          
          

          - **Name** *(string) --* 

            The document name.

            
          

          - **DisplayName** *(string) --* 

            The friendly name of the SSM document. This value can differ for each version of the document. If you want to update this value, see  UpdateDocument.

            
          

          - **DocumentVersion** *(string) --* 

            The document version.

            
          

          - **VersionName** *(string) --* 

            The version of the artifact associated with the document. For example, 12.6. This value is unique across all versions of a document, and can't be changed.

            
          

          - **CreatedDate** *(datetime) --* 

            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.

            
          

          - **Status** *(string) --* 

            The status of the SSM document, such as ``Creating``, ``Active``, ``Failed``, and ``Deleting``.

            
          

          - **StatusInformation** *(string) --* 

            A message returned by Amazon Web Services Systems Manager that explains the ``Status`` value. For example, a ``Failed`` status might be explained by the ``StatusInformation`` message, "The specified S3 bucket doesn't exist. Verify that the URL of the S3 bucket is correct."

            
          

          - **ReviewStatus** *(string) --* 

            The current status of the approval review for the latest version of the document.

            
      
    
      

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

        
  
  **Exceptions**
  
  *   :py:class:`SSM.Client.exceptions.InternalServerError`

  
  *   :py:class:`SSM.Client.exceptions.InvalidNextToken`

  
  *   :py:class:`SSM.Client.exceptions.InvalidDocument`

  