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

****************************
describe_document_permission
****************************



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

  

  Describes the permissions for a Amazon Web Services Systems Manager document (SSM document). If you created the document, you are the owner. If a document is shared, it can either be shared privately (by specifying a user's Amazon Web Services account ID) or publicly (*All*).

  

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


  **Request Syntax**
  ::

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

    The name of the document for which you are the owner.

    

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

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

    

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

    
    ::

      {
          'AccountIds': [
              'string',
          ],
          'AccountSharingInfoList': [
              {
                  'AccountId': 'string',
                  'SharedDocumentVersion': 'string'
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **AccountIds** *(list) --* 

        The account IDs that have permission to use this document. The ID can be either an Amazon Web Services account number or ``all``.

        
        

        - *(string) --* 
    
      

      - **AccountSharingInfoList** *(list) --* 

        A list of Amazon Web Services accounts where the current document is shared and the version shared with each account.

        
        

        - *(dict) --* 

          Information includes the Amazon Web Services account ID where the current document is shared and the version shared with that account.

          
          

          - **AccountId** *(string) --* 

            The Amazon Web Services account ID where the current document is shared.

            
          

          - **SharedDocumentVersion** *(string) --* 

            The version of the current document shared with the account.

            
      
    
      

      - **NextToken** *(string) --* 

        The token for the next set of items to return. Use this token to get the next set of results.

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

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

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

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

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

  