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

**************************
modify_document_permission
**************************



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

  

  Shares a Amazon Web Services Systems Manager document (SSM document)publicly or privately. If you share a document privately, you must specify the Amazon Web Services user IDs for those people who can use the document. If you share a document publicly, you must specify *All* as the account ID.

  

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


  **Request Syntax**
  ::

    response = client.modify_document_permission(
        Name='string',
        PermissionType='Share',
        AccountIdsToAdd=[
            'string',
        ],
        AccountIdsToRemove=[
            'string',
        ],
        SharedDocumentVersion='string'
    )
    
  :type Name: string
  :param Name: **[REQUIRED]** 

    The name of the document that you want to share.

    

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

    The permission type for the document. The permission type can be *Share*.

    

  
  :type AccountIdsToAdd: list
  :param AccountIdsToAdd: 

    The Amazon Web Services users that should have access to the document. The account IDs can either be a group of account IDs or *All*. You must specify a value for this parameter or the ``AccountIdsToRemove`` parameter.

    

  
    - *(string) --* 

    

  :type AccountIdsToRemove: list
  :param AccountIdsToRemove: 

    The Amazon Web Services users that should no longer have access to the document. The Amazon Web Services user can either be a group of account IDs or *All*. This action has a higher priority than ``AccountIdsToAdd``. If you specify an ID to add and the same ID to remove, the system removes access to the document. You must specify a value for this parameter or the ``AccountIdsToAdd`` parameter.

    

  
    - *(string) --* 

    

  :type SharedDocumentVersion: string
  :param SharedDocumentVersion: 

    (Optional) The version of the document to share. If it isn't specified, the system choose the ``Default`` version to share.

    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`SSM.Client.exceptions.InternalServerError`

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

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

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

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

  