

.. _Configuration Document: http://docs.aws.amazon.com/ssm/latest/APIReference/aws-ssm-document.html


***
SSM
***

.. contents:: Table of Contents
   :depth: 2


======
Client
======



.. py:class:: SSM.Client

  A low-level client representing Amazon Simple Systems Management Service (SSM)::

    
    import boto3
    
    client = boto3.client('ssm')

  
  These are the available methods:
  
  *   :py:meth:`can_paginate`

  
  *   :py:meth:`create_association`

  
  *   :py:meth:`create_association_batch`

  
  *   :py:meth:`create_document`

  
  *   :py:meth:`delete_association`

  
  *   :py:meth:`delete_document`

  
  *   :py:meth:`describe_association`

  
  *   :py:meth:`describe_document`

  
  *   :py:meth:`generate_presigned_url`

  
  *   :py:meth:`get_document`

  
  *   :py:meth:`get_paginator`

  
  *   :py:meth:`get_waiter`

  
  *   :py:meth:`list_associations`

  
  *   :py:meth:`list_documents`

  
  *   :py:meth:`update_association_status`

  

  .. py:method:: can_paginate(operation_name)

        
    Check if an operation can be paginated.
    
    :type operation_name: string
    :param operation_name: The operation name.  This is the same name
        as the method name on the client.  For example, if the
        method name is ``create_foo``, and you'd normally invoke the
        operation as ``client.create_foo(**kwargs)``, if the
        ``create_foo`` operation can be paginated, you can use the
        call ``client.get_paginator("create_foo")``.
    
    :return: ``True`` if the operation can be paginated,
        ``False`` otherwise.


  .. py:method:: create_association(**kwargs)

    

    Associates the specified configuration document with the specified instance.

     

    When you associate a configuration document with an instance, the configuration agent on the instance processes the configuration document and configures the instance as specified.

     

    If you associate a configuration document with an instance that already has an associated configuration document, we replace the current configuration document with the new configuration document.

    

    **Request Syntax** 
    ::

      response = client.create_association(
          Name='string',
          InstanceId='string'
      )
    :type Name: string
    :param Name: **[REQUIRED]** 

      The name of the configuration document.

      

    
    :type InstanceId: string
    :param InstanceId: **[REQUIRED]** 

      The ID of the instance.

      

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

      
      ::

        {
            'AssociationDescription': {
                'Name': 'string',
                'InstanceId': 'string',
                'Date': datetime(2015, 1, 1),
                'Status': {
                    'Date': datetime(2015, 1, 1),
                    'Name': 'Pending'|'Success'|'Failed',
                    'Message': 'string',
                    'AdditionalInfo': 'string'
                }
            }
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **AssociationDescription** *(dict) --* 

          Information about the association.

          
          

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

            The name of the configuration document.

            
          

          - **InstanceId** *(string) --* 

            The ID of the instance.

            
          

          - **Date** *(datetime) --* 

            The date when the association was made.

            
          

          - **Status** *(dict) --* 

            The association status.

            
            

            - **Date** *(datetime) --* 

              The date when the status changed.

              
            

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

              The status.

              
            

            - **Message** *(string) --* 

              The reason for the status.

              
            

            - **AdditionalInfo** *(string) --* 

              A user-defined string.

              
        
      
    

  .. py:method:: create_association_batch(**kwargs)

    

    Associates the specified configuration documents with the specified instances.

     

    When you associate a configuration document with an instance, the configuration agent on the instance processes the configuration document and configures the instance as specified.

     

    If you associate a configuration document with an instance that already has an associated configuration document, we replace the current configuration document with the new configuration document.

    

    **Request Syntax** 
    ::

      response = client.create_association_batch(
          Entries=[
              {
                  'Name': 'string',
                  'InstanceId': 'string'
              },
          ]
      )
    :type Entries: list
    :param Entries: **[REQUIRED]** 

      One or more associations.

      

    
      - *(dict) --* 

        Describes the association of a configuration document and an instance.

        

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

          The name of the configuration document.

          

        
        - **InstanceId** *(string) --* 

          The ID of the instance.

          

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

      
      ::

        {
            'Successful': [
                {
                    'Name': 'string',
                    'InstanceId': 'string',
                    'Date': datetime(2015, 1, 1),
                    'Status': {
                        'Date': datetime(2015, 1, 1),
                        'Name': 'Pending'|'Success'|'Failed',
                        'Message': 'string',
                        'AdditionalInfo': 'string'
                    }
                },
            ],
            'Failed': [
                {
                    'Entry': {
                        'Name': 'string',
                        'InstanceId': 'string'
                    },
                    'Message': 'string',
                    'Fault': 'Client'|'Server'|'Unknown'
                },
            ]
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **Successful** *(list) --* 

          Information about the associations that succeeded.

          
          

          - *(dict) --* 

            Describes an association.

            
            

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

              The name of the configuration document.

              
            

            - **InstanceId** *(string) --* 

              The ID of the instance.

              
            

            - **Date** *(datetime) --* 

              The date when the association was made.

              
            

            - **Status** *(dict) --* 

              The association status.

              
              

              - **Date** *(datetime) --* 

                The date when the status changed.

                
              

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

                The status.

                
              

              - **Message** *(string) --* 

                The reason for the status.

                
              

              - **AdditionalInfo** *(string) --* 

                A user-defined string.

                
          
        
      
        

        - **Failed** *(list) --* 

          Information about the associations that failed.

          
          

          - *(dict) --* 

            Describes a failed association.

            
            

            - **Entry** *(dict) --* 

              The association.

              
              

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

                The name of the configuration document.

                
              

              - **InstanceId** *(string) --* 

                The ID of the instance.

                
          
            

            - **Message** *(string) --* 

              A description of the failure.

              
            

            - **Fault** *(string) --* 

              The source of the failure.

              
        
      
    

  .. py:method:: create_document(**kwargs)

    

    Creates a configuration document.

     

    After you create a configuration document, you can use  CreateAssociation to associate it with one or more running instances.

    

    **Request Syntax** 
    ::

      response = client.create_document(
          Content='string',
          Name='string'
      )
    :type Content: string
    :param Content: **[REQUIRED]** 

      A valid JSON file. For more information about the contents of this file, see `Configuration Document`_ .

      

    
    :type Name: string
    :param Name: **[REQUIRED]** 

      A name for the configuration document.

      

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

      
      ::

        {
            'DocumentDescription': {
                'Sha1': 'string',
                'Name': 'string',
                'CreatedDate': datetime(2015, 1, 1),
                'Status': 'Creating'|'Active'|'Deleting'
            }
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **DocumentDescription** *(dict) --* 

          Information about the configuration document.

          
          

          - **Sha1** *(string) --* 

            The SHA1 hash of the document, which you can use for verification purposes.

            
          

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

            The name of the configuration document.

            
          

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

            The date when the configuration document was created.

            
          

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

            The status of the configuration document.

            
      
    

  .. py:method:: delete_association(**kwargs)

    

    Disassociates the specified configuration document from the specified instance.

     

    When you disassociate a configuration document from an instance, it does not change the configuration of the instance. To change the configuration state of an instance after you disassociate a configuration document, you must create a new configuration document with the desired configuration and associate it with the instance.

    

    **Request Syntax** 
    ::

      response = client.delete_association(
          Name='string',
          InstanceId='string'
      )
    :type Name: string
    :param Name: **[REQUIRED]** 

      The name of the configuration document.

      

    
    :type InstanceId: string
    :param InstanceId: **[REQUIRED]** 

      The ID of the instance.

      

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

      
      ::

        {}
        
      **Response Structure** 

      

      - *(dict) --* 
    

  .. py:method:: delete_document(**kwargs)

    

    Deletes the specified configuration document.

     

    You must use  DeleteAssociation to disassociate all instances that are associated with the configuration document before you can delete it.

    

    **Request Syntax** 
    ::

      response = client.delete_document(
          Name='string'
      )
    :type Name: string
    :param Name: **[REQUIRED]** 

      The name of the configuration document.

      

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

      
      ::

        {}
        
      **Response Structure** 

      

      - *(dict) --* 
    

  .. py:method:: describe_association(**kwargs)

    

    Describes the associations for the specified configuration document or instance.

    

    **Request Syntax** 
    ::

      response = client.describe_association(
          Name='string',
          InstanceId='string'
      )
    :type Name: string
    :param Name: **[REQUIRED]** 

      The name of the configuration document.

      

    
    :type InstanceId: string
    :param InstanceId: **[REQUIRED]** 

      The ID of the instance.

      

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

      
      ::

        {
            'AssociationDescription': {
                'Name': 'string',
                'InstanceId': 'string',
                'Date': datetime(2015, 1, 1),
                'Status': {
                    'Date': datetime(2015, 1, 1),
                    'Name': 'Pending'|'Success'|'Failed',
                    'Message': 'string',
                    'AdditionalInfo': 'string'
                }
            }
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **AssociationDescription** *(dict) --* 

          Information about the association.

          
          

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

            The name of the configuration document.

            
          

          - **InstanceId** *(string) --* 

            The ID of the instance.

            
          

          - **Date** *(datetime) --* 

            The date when the association was made.

            
          

          - **Status** *(dict) --* 

            The association status.

            
            

            - **Date** *(datetime) --* 

              The date when the status changed.

              
            

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

              The status.

              
            

            - **Message** *(string) --* 

              The reason for the status.

              
            

            - **AdditionalInfo** *(string) --* 

              A user-defined string.

              
        
      
    

  .. py:method:: describe_document(**kwargs)

    

    Describes the specified configuration document.

    

    **Request Syntax** 
    ::

      response = client.describe_document(
          Name='string'
      )
    :type Name: string
    :param Name: **[REQUIRED]** 

      The name of the configuration document.

      

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

      
      ::

        {
            'Document': {
                'Sha1': 'string',
                'Name': 'string',
                'CreatedDate': datetime(2015, 1, 1),
                'Status': 'Creating'|'Active'|'Deleting'
            }
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **Document** *(dict) --* 

          Information about the configuration document.

          
          

          - **Sha1** *(string) --* 

            The SHA1 hash of the document, which you can use for verification purposes.

            
          

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

            The name of the configuration document.

            
          

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

            The date when the configuration document was created.

            
          

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

            The status of the configuration document.

            
      
    

  .. py:method:: generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)

        
    Generate a presigned url given a client, its method, and arguments
    
    :type ClientMethod: string
    :param ClientMethod: The client method to presign for
    
    :type Params: dict
    :param Params: The parameters normally passed to
        ``ClientMethod``.
    
    :type ExpiresIn: int
    :param ExpiresIn: The number of seconds the presigned url is valid
        for. By default it expires in an hour (3600 seconds)
    
    :type HttpMethod: string
    :param HttpMethod: The http method to use on the generated url. By
        default, the http method is whatever is used in the method's model.
    
    :returns: The presigned url


  .. py:method:: get_document(**kwargs)

    

    Gets the contents of the specified configuration document.

    

    **Request Syntax** 
    ::

      response = client.get_document(
          Name='string'
      )
    :type Name: string
    :param Name: **[REQUIRED]** 

      The name of the configuration document.

      

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

      
      ::

        {
            'Name': 'string',
            'Content': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 
        

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

          The name of the configuration document.

          
        

        - **Content** *(string) --* 

          The contents of the configuration document.

          
    

  .. py:method:: get_paginator(operation_name)

        
    Create a paginator for an operation.
    
    :type operation_name: string
    :param operation_name: The operation name.  This is the same name
        as the method name on the client.  For example, if the
        method name is ``create_foo``, and you'd normally invoke the
        operation as ``client.create_foo(**kwargs)``, if the
        ``create_foo`` operation can be paginated, you can use the
        call ``client.get_paginator("create_foo")``.
    
    :raise OperationNotPageableError: Raised if the operation is not
        pageable.  You can use the ``client.can_paginate`` method to
        check if an operation is pageable.
    
    :rtype: L{botocore.paginate.Paginator}
    :return: A paginator object.


  .. py:method:: get_waiter(waiter_name)

        


  .. py:method:: list_associations(**kwargs)

    

    Lists the associations for the specified configuration document or instance.

    

    **Request Syntax** 
    ::

      response = client.list_associations(
          AssociationFilterList=[
              {
                  'key': 'InstanceId'|'Name',
                  'value': 'string'
              },
          ],
          MaxResults=123,
          NextToken='string'
      )
    :type AssociationFilterList: list
    :param AssociationFilterList: **[REQUIRED]** 

      One or more filters. Use a filter to return a more specific list of results.

      

    
      - *(dict) --* 

        Describes a filter.

        

      
        - **key** *(string) --* **[REQUIRED]** 

          The name of the filter.

          

        
        - **value** *(string) --* **[REQUIRED]** 

          The filter value.

          

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

      
      ::

        {
            'Associations': [
                {
                    'Name': 'string',
                    'InstanceId': 'string'
                },
            ],
            'NextToken': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **Associations** *(list) --* 

          The associations.

          
          

          - *(dict) --* 

            Describes an association of a configuration document and an instance.

            
            

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

              The name of the configuration document.

              
            

            - **InstanceId** *(string) --* 

              The ID of the instance.

              
        
      
        

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

          
    

  .. py:method:: list_documents(**kwargs)

    

    Describes one or more of your configuration documents.

    

    **Request Syntax** 
    ::

      response = client.list_documents(
          DocumentFilterList=[
              {
                  'key': 'Name',
                  'value': 'string'
              },
          ],
          MaxResults=123,
          NextToken='string'
      )
    :type DocumentFilterList: list
    :param DocumentFilterList: 

      One or more filters. Use a filter to return a more specific list of results.

      

    
      - *(dict) --* 

        Describes a filter.

        

      
        - **key** *(string) --* **[REQUIRED]** 

          The name of the filter.

          

        
        - **value** *(string) --* **[REQUIRED]** 

          The value of the filter.

          

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

      
      ::

        {
            'DocumentIdentifiers': [
                {
                    'Name': 'string'
                },
            ],
            'NextToken': 'string'
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **DocumentIdentifiers** *(list) --* 

          The names of the configuration documents.

          
          

          - *(dict) --* 

            Describes the name of a configuration document.

            
            

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

              The name of the configuration 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.

          
    

  .. py:method:: update_association_status(**kwargs)

    

    Updates the status of the configuration document associated with the specified instance.

    

    **Request Syntax** 
    ::

      response = client.update_association_status(
          Name='string',
          InstanceId='string',
          AssociationStatus={
              'Date': datetime(2015, 1, 1),
              'Name': 'Pending'|'Success'|'Failed',
              'Message': 'string',
              'AdditionalInfo': 'string'
          }
      )
    :type Name: string
    :param Name: **[REQUIRED]** 

      The name of the configuration document.

      

    
    :type InstanceId: string
    :param InstanceId: **[REQUIRED]** 

      The ID of the instance.

      

    
    :type AssociationStatus: dict
    :param AssociationStatus: **[REQUIRED]** 

      The association status.

      

    
      - **Date** *(datetime) --* **[REQUIRED]** 

        The date when the status changed.

        

      
      - **Name** *(string) --* **[REQUIRED]** 

        The status.

        

      
      - **Message** *(string) --* **[REQUIRED]** 

        The reason for the status.

        

      
      - **AdditionalInfo** *(string) --* 

        A user-defined string.

        

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

      
      ::

        {
            'AssociationDescription': {
                'Name': 'string',
                'InstanceId': 'string',
                'Date': datetime(2015, 1, 1),
                'Status': {
                    'Date': datetime(2015, 1, 1),
                    'Name': 'Pending'|'Success'|'Failed',
                    'Message': 'string',
                    'AdditionalInfo': 'string'
                }
            }
        }
      **Response Structure** 

      

      - *(dict) --* 
        

        - **AssociationDescription** *(dict) --* 

          Information about the association.

          
          

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

            The name of the configuration document.

            
          

          - **InstanceId** *(string) --* 

            The ID of the instance.

            
          

          - **Date** *(datetime) --* 

            The date when the association was made.

            
          

          - **Status** *(dict) --* 

            The association status.

            
            

            - **Date** *(datetime) --* 

              The date when the status changed.

              
            

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

              The status.

              
            

            - **Message** *(string) --* 

              The reason for the status.

              
            

            - **AdditionalInfo** *(string) --* 

              A user-defined string.

              
        
      
    