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

*******************
update_fleet_metric
*******************



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

  

  Updates the data for a fleet metric.

   

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


  **Request Syntax**
  ::

    response = client.update_fleet_metric(
        metricName='string',
        queryString='string',
        aggregationType={
            'name': 'Statistics'|'Percentiles'|'Cardinality',
            'values': [
                'string',
            ]
        },
        period=123,
        aggregationField='string',
        description='string',
        queryVersion='string',
        indexName='string',
        unit='Seconds'|'Microseconds'|'Milliseconds'|'Bytes'|'Kilobytes'|'Megabytes'|'Gigabytes'|'Terabytes'|'Bits'|'Kilobits'|'Megabits'|'Gigabits'|'Terabits'|'Percent'|'Count'|'Bytes/Second'|'Kilobytes/Second'|'Megabytes/Second'|'Gigabytes/Second'|'Terabytes/Second'|'Bits/Second'|'Kilobits/Second'|'Megabits/Second'|'Gigabits/Second'|'Terabits/Second'|'Count/Second'|'None',
        expectedVersion=123
    )
    
  :type metricName: string
  :param metricName: **[REQUIRED]** 

    The name of the fleet metric to update.

    

  
  :type queryString: string
  :param queryString: 

    The search query string.

    

  
  :type aggregationType: dict
  :param aggregationType: 

    The type of the aggregation query.

    

  
    - **name** *(string) --* **[REQUIRED]** 

      The name of the aggregation type.

      

    
    - **values** *(list) --* 

      A list of the values of aggregation types.

      

    
      - *(string) --* 

      
  
  
  :type period: integer
  :param period: 

    The time in seconds between fleet metric emissions. Range [60(1 min), 86400(1 day)] and must be multiple of 60.

    

  
  :type aggregationField: string
  :param aggregationField: 

    The field to aggregate.

    

  
  :type description: string
  :param description: 

    The description of the fleet metric.

    

  
  :type queryVersion: string
  :param queryVersion: 

    The version of the query.

    

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

    The name of the index to search.

    

  
  :type unit: string
  :param unit: 

    Used to support unit transformation such as milliseconds to seconds. The unit must be supported by `CW metric <https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDatum.html>`__.

    

  
  :type expectedVersion: integer
  :param expectedVersion: 

    The expected version of the fleet metric record in the registry.

    

  
  
  :returns: None
  **Exceptions**
  
  *   :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.ResourceNotFoundException`

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

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

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

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

  