:doc:`IoT <../../iot>` / Client / get_effective_policies

**********************
get_effective_policies
**********************



.. py:method:: IoT.Client.get_effective_policies(**kwargs)

  

  Gets a list of the policies that have an effect on the authorization behavior of the specified device when it connects to the IoT device gateway.

   

  Requires permission to access the `GetEffectivePolicies <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions>`__ action.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iot-2015-05-28/GetEffectivePolicies>`_  


  **Request Syntax**
  ::

    response = client.get_effective_policies(
        principal='string',
        cognitoIdentityPoolId='string',
        thingName='string'
    )
    
  :type principal: string
  :param principal: 

    The principal. Valid principals are CertificateArn (arn:aws:iot:*region*:*accountId*:cert/*certificateId*), thingGroupArn (arn:aws:iot:*region*:*accountId*:thinggroup/*groupName*) and CognitoId (*region*:*id*).

    

  
  :type cognitoIdentityPoolId: string
  :param cognitoIdentityPoolId: 

    The Cognito identity pool ID.

    

  
  :type thingName: string
  :param thingName: 

    The thing name.

    

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

    
    ::

      {
          'effectivePolicies': [
              {
                  'policyName': 'string',
                  'policyArn': 'string',
                  'policyDocument': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **effectivePolicies** *(list) --* 

        The effective policies.

        
        

        - *(dict) --* 

          The policy that has the effect on the authorization results.

          
          

          - **policyName** *(string) --* 

            The policy name.

            
          

          - **policyArn** *(string) --* 

            The policy ARN.

            
          

          - **policyDocument** *(string) --* 

            The IAM policy document.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`IoT.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`IoT.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`IoT.Client.exceptions.ThrottlingException`

  
  *   :py:class:`IoT.Client.exceptions.UnauthorizedException`

  
  *   :py:class:`IoT.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`IoT.Client.exceptions.InternalFailureException`

  
  *   :py:class:`IoT.Client.exceptions.LimitExceededException`

  