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

*********************************
list_security_profiles_for_target
*********************************



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

  

  Lists the Device Defender security profiles attached to a target (thing group).

   

  Requires permission to access the `ListSecurityProfilesForTarget <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/ListSecurityProfilesForTarget>`_  


  **Request Syntax**
  ::

    response = client.list_security_profiles_for_target(
        nextToken='string',
        maxResults=123,
        recursive=True|False,
        securityProfileTargetArn='string'
    )
    
  :type nextToken: string
  :param nextToken: 

    The token for the next set of results.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of results to return at one time.

    

  
  :type recursive: boolean
  :param recursive: 

    If true, return child groups too.

    

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

    The ARN of the target (thing group) whose attached security profiles you want to get.

    

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

    
    ::

      {
          'securityProfileTargetMappings': [
              {
                  'securityProfileIdentifier': {
                      'name': 'string',
                      'arn': 'string'
                  },
                  'target': {
                      'arn': 'string'
                  }
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **securityProfileTargetMappings** *(list) --* 

        A list of security profiles and their associated targets.

        
        

        - *(dict) --* 

          Information about a security profile and the target associated with it.

          
          

          - **securityProfileIdentifier** *(dict) --* 

            Information that identifies the security profile.

            
            

            - **name** *(string) --* 

              The name you've given to the security profile.

              
            

            - **arn** *(string) --* 

              The ARN of the security profile.

              
        
          

          - **target** *(dict) --* 

            Information about the target (thing group) associated with the security profile.

            
            

            - **arn** *(string) --* 

              The ARN of the security profile.

              
        
      
    
      

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

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

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

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

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

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

  