:doc:`DirectoryService <../../ds>` / Client / describe_trusts

***************
describe_trusts
***************



.. py:method:: DirectoryService.Client.describe_trusts(**kwargs)

  

  Obtains information about the trust relationships for this account.

   

  If no input parameters are provided, such as DirectoryId or TrustIds, this request describes all the trust relationships belonging to the account.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ds-2015-04-16/DescribeTrusts>`_  


  **Request Syntax**
  ::

    response = client.describe_trusts(
        DirectoryId='string',
        TrustIds=[
            'string',
        ],
        NextToken='string',
        Limit=123
    )
    
  :type DirectoryId: string
  :param DirectoryId: 

    The Directory ID of the Amazon Web Services directory that is a part of the requested trust relationship.

    

  
  :type TrustIds: list
  :param TrustIds: 

    A list of identifiers of the trust relationships for which to obtain the information. If this member is null, all trust relationships that belong to the current account are returned.

     

    An empty list results in an ``InvalidParameterException`` being thrown.

    

  
    - *(string) --* 

    

  :type NextToken: string
  :param NextToken: 

    The *DescribeTrustsResult.NextToken* value from a previous call to  DescribeTrusts. Pass null if this is the first call.

    

  
  :type Limit: integer
  :param Limit: 

    The maximum number of objects to return.

    

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

    
    ::

      {
          'Trusts': [
              {
                  'DirectoryId': 'string',
                  'TrustId': 'string',
                  'RemoteDomainName': 'string',
                  'TrustType': 'Forest'|'External',
                  'TrustDirection': 'One-Way: Outgoing'|'One-Way: Incoming'|'Two-Way',
                  'TrustState': 'Creating'|'Created'|'Verifying'|'VerifyFailed'|'Verified'|'Updating'|'UpdateFailed'|'Updated'|'Deleting'|'Deleted'|'Failed',
                  'CreatedDateTime': datetime(2015, 1, 1),
                  'LastUpdatedDateTime': datetime(2015, 1, 1),
                  'StateLastUpdatedDateTime': datetime(2015, 1, 1),
                  'TrustStateReason': 'string',
                  'SelectiveAuth': 'Enabled'|'Disabled'
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      The result of a DescribeTrust request.

      
      

      - **Trusts** *(list) --* 

        The list of Trust objects that were retrieved.

         

        It is possible that this list contains less than the number of items specified in the *Limit* member of the request. This occurs if there are less than the requested number of items left to retrieve, or if the limitations of the operation have been exceeded.

        
        

        - *(dict) --* 

          Describes a trust relationship between an Managed Microsoft AD directory and an external domain.

          
          

          - **DirectoryId** *(string) --* 

            The Directory ID of the Amazon Web Services directory involved in the trust relationship.

            
          

          - **TrustId** *(string) --* 

            The unique ID of the trust relationship.

            
          

          - **RemoteDomainName** *(string) --* 

            The Fully Qualified Domain Name (FQDN) of the external domain involved in the trust relationship.

            
          

          - **TrustType** *(string) --* 

            The trust relationship type. ``Forest`` is the default.

            
          

          - **TrustDirection** *(string) --* 

            The trust relationship direction.

            
          

          - **TrustState** *(string) --* 

            The trust relationship state.

            
          

          - **CreatedDateTime** *(datetime) --* 

            The date and time that the trust relationship was created.

            
          

          - **LastUpdatedDateTime** *(datetime) --* 

            The date and time that the trust relationship was last updated.

            
          

          - **StateLastUpdatedDateTime** *(datetime) --* 

            The date and time that the TrustState was last updated.

            
          

          - **TrustStateReason** *(string) --* 

            The reason for the TrustState.

            
          

          - **SelectiveAuth** *(string) --* 

            Current state of selective authentication for the trust.

            
      
    
      

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

        If not null, more results are available. Pass this value for the *NextToken* parameter in a subsequent call to  DescribeTrusts to retrieve the next set of items.

        
  
  **Exceptions**
  
  *   :py:class:`DirectoryService.Client.exceptions.EntityDoesNotExistException`

  
  *   :py:class:`DirectoryService.Client.exceptions.InvalidNextTokenException`

  
  *   :py:class:`DirectoryService.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`DirectoryService.Client.exceptions.ClientException`

  
  *   :py:class:`DirectoryService.Client.exceptions.ServiceException`

  
  *   :py:class:`DirectoryService.Client.exceptions.UnsupportedOperationException`

  