---
title: "PATCH /fleet-metric/{metricName}"
method: PATCH
path: "/fleet-metric/{metricName}"
---

# PATCH /fleet-metric/{metricName}

`PATCH /fleet-metric/{metricName}`

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.

## Path parameters

- `metricName` string, required

## Request body

- object
  - `queryString` string — The search query string.
  - `aggregationType` object — The type of aggregation queries.
    - `name` 'Statistics' | 'Percentiles' | 'Cardinality' — The name of the aggregation type.
    - `values` AggregationTypeValue[] — A list of the values of aggregation types.
  - `period` integer — The time in seconds between fleet metric emissions. Range [60(1 min), 86400(1 day)] and must be multiple of 60.
  - `aggregationField` string — The field to aggregate.
  - `description` string — The description of the fleet metric.
  - `queryVersion` string — The version of the query.
  - `indexName` string, required — The name of the index to search.
  - `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' — Used to support unit transformation such as milliseconds to seconds. The unit must be supported by <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDatum.html">CW metric</a>.
  - `expectedVersion` integer — The expected version of the fleet metric record in the registry.

## Response `200`

Success

## Other responses

- `480` — InvalidRequestException
- `481` — ThrottlingException
- `482` — UnauthorizedException
- `483` — ServiceUnavailableException
- `484` — InternalFailureException
- `485` — ResourceNotFoundException
- `486` — InvalidQueryException
- `487` — InvalidAggregationException
- `488` — VersionConflictException
- `489` — IndexNotReadyException

---

[API](https://skmtc.net/aws/apis/iot.md) · [All operations](https://skmtc.net/aws/apis/iot/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/iot/versions/deef5c4b09f0/schema)
