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

****************************************
list_related_resources_for_audit_finding
****************************************



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

  

  The related resources of an Audit finding. The following resources can be returned from calling this API:

   

  
  * DEVICE_CERTIFICATE
   
  * CA_CERTIFICATE
   
  * IOT_POLICY
   
  * COGNITO_IDENTITY_POOL
   
  * CLIENT_ID
   
  * ACCOUNT_SETTINGS
   
  * ROLE_ALIAS
   
  * IAM_ROLE
   
  * ISSUER_CERTIFICATE
  

   

  .. note::

    

    This API is similar to DescribeAuditFinding's `RelatedResources <https://docs.aws.amazon.com/iot/latest/apireference/API_DescribeAuditFinding.html>`__ but provides pagination and is not limited to 10 resources. When calling `DescribeAuditFinding <https://docs.aws.amazon.com/iot/latest/apireference/API_DescribeAuditFinding.html>`__ for the intermediate CA revoked for active device certificates check, RelatedResources will not be populated. You must use this API, ListRelatedResourcesForAuditFinding, to list the certificates.

    

  

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


  **Request Syntax**
  ::

    response = client.list_related_resources_for_audit_finding(
        findingId='string',
        nextToken='string',
        maxResults=123
    )
    
  :type findingId: string
  :param findingId: **[REQUIRED]** 

    The finding Id.

    

  
  :type nextToken: string
  :param nextToken: 

    A token that can be used to retrieve the next set of results, or ``null`` if there are no additional results.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of results to return at one time.

    

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

    
    ::

      {
          'relatedResources': [
              {
                  'resourceType': 'DEVICE_CERTIFICATE'|'CA_CERTIFICATE'|'IOT_POLICY'|'COGNITO_IDENTITY_POOL'|'CLIENT_ID'|'ACCOUNT_SETTINGS'|'ROLE_ALIAS'|'IAM_ROLE'|'ISSUER_CERTIFICATE',
                  'resourceIdentifier': {
                      'deviceCertificateId': 'string',
                      'caCertificateId': 'string',
                      'cognitoIdentityPoolId': 'string',
                      'clientId': 'string',
                      'policyVersionIdentifier': {
                          'policyName': 'string',
                          'policyVersionId': 'string'
                      },
                      'account': 'string',
                      'iamRoleArn': 'string',
                      'roleAliasArn': 'string',
                      'issuerCertificateIdentifier': {
                          'issuerCertificateSubject': 'string',
                          'issuerId': 'string',
                          'issuerCertificateSerialNumber': 'string'
                      },
                      'deviceCertificateArn': 'string'
                  },
                  'additionalInfo': {
                      'string': 'string'
                  }
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **relatedResources** *(list) --* 

        The related resources.

        
        

        - *(dict) --* 

          Information about a related resource.

          
          

          - **resourceType** *(string) --* 

            The type of resource.

            
          

          - **resourceIdentifier** *(dict) --* 

            Information that identifies the resource.

            
            

            - **deviceCertificateId** *(string) --* 

              The ID of the certificate attached to the resource.

              
            

            - **caCertificateId** *(string) --* 

              The ID of the CA certificate used to authorize the certificate.

              
            

            - **cognitoIdentityPoolId** *(string) --* 

              The ID of the Amazon Cognito identity pool.

              
            

            - **clientId** *(string) --* 

              The client ID.

              
            

            - **policyVersionIdentifier** *(dict) --* 

              The version of the policy associated with the resource.

              
              

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

                The name of the policy.

                
              

              - **policyVersionId** *(string) --* 

                The ID of the version of the policy associated with the resource.

                
          
            

            - **account** *(string) --* 

              The account with which the resource is associated.

              
            

            - **iamRoleArn** *(string) --* 

              The ARN of the IAM role that has overly permissive actions.

              
            

            - **roleAliasArn** *(string) --* 

              The ARN of the role alias that has overly permissive actions.

              
            

            - **issuerCertificateIdentifier** *(dict) --* 

              The issuer certificate identifier.

              
              

              - **issuerCertificateSubject** *(string) --* 

                The subject of the issuer certificate.

                
              

              - **issuerId** *(string) --* 

                The issuer ID.

                
              

              - **issuerCertificateSerialNumber** *(string) --* 

                The issuer certificate serial number.

                
          
            

            - **deviceCertificateArn** *(string) --* 

              The ARN of the identified device certificate.

              
        
          

          - **additionalInfo** *(dict) --* 

            Other information about the resource.

            
            

            - *(string) --* 
              

              - *(string) --* 
        
      
      
    
      

      - **nextToken** *(string) --* 

        A token that can be used to retrieve the next set of results, or ``null`` for the first API call.

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

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

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

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

  