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

*******************
list_custom_metrics
*******************



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

  

  Lists your Device Defender detect custom metrics.

   

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


  **Request Syntax**
  ::

    response = client.list_custom_metrics(
        nextToken='string',
        maxResults=123
    )
    
  :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. The default is 25.

    

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

    
    ::

      {
          'metricNames': [
              'string',
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **metricNames** *(list) --* 

        The name of the custom metric.

        
        

        - *(string) --* 
    
      

      - **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`

  