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

**********************
list_security_profiles
**********************



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

  

  Lists the Device Defender security profiles you've created. You can filter security profiles by dimension or custom metric.

   

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

   

  .. note::

    

    ``dimensionName`` and ``metricName`` cannot be used in the same request.

    

  

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


  **Request Syntax**
  ::

    response = client.list_security_profiles(
        nextToken='string',
        maxResults=123,
        dimensionName='string',
        metricName='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 dimensionName: string
  :param dimensionName: 

    A filter to limit results to the security profiles that use the defined dimension. Cannot be used with ``metricName``

    

  
  :type metricName: string
  :param metricName: 

    The name of the custom metric. Cannot be used with ``dimensionName``.

    

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

    
    ::

      {
          'securityProfileIdentifiers': [
              {
                  'name': 'string',
                  'arn': 'string'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **securityProfileIdentifiers** *(list) --* 

        A list of security profile identifiers (names and ARNs).

        
        

        - *(dict) --* 

          Identifying information for a Device Defender security profile.

          
          

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

            The name you've given to 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`

  