---
title: "PUT /api/v1/config/gcp-metrics-integrations/{slug}"
method: PUT
path: "/api/v1/config/gcp-metrics-integrations/{slug}"
tags: ["GcpMetricsIntegration"]
---

# PUT /api/v1/config/gcp-metrics-integrations/{slug}

`PUT /api/v1/config/gcp-metrics-integrations/{slug}`

## Request

- Base URL: `https://docs.chronosphere.io`
- URL: `https://docs.chronosphere.io/api/v1/config/gcp-metrics-integrations/{slug}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/chronosphere/apis/config-v1-api/docs/api/v1/config/gcp-metrics-integrations/:slug/put.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `slug` string, required

## Request body

- ConfigV1UpdateGcpMetricsIntegrationBody
  - `gcp_metrics_integration` Configv1GcpMetricsIntegration
    - `slug` string: Unique identifier of the GcpMetricsIntegration. If a `slug` isn't provided, one will be generated based of the `name` field. You can't modify this field after the GcpMetricsIntegration is created.
    - `name` string: Required. Name of the GcpMetricsIntegration. You can modify this value after the GcpMetricsIntegration is created.
    - `created_at` string, date-time: Timestamp of when the GcpMetricsIntegration was created. Cannot be set by clients.
    - `updated_at` string, date-time: Timestamp of when the GcpMetricsIntegration was last updated. Cannot be set by clients.
    - `service_account` Configv1GcpMetricsIntegrationServiceAccount
      - `client_email` string: Email address of the service account to impersonate.
    - `metric_groups` GcpMetricsIntegrationMetricGroup[]: Metric groups to be ingested for this integration.
      - `project_id` string: Project ID that has access to the metric data.
      - `prefixes` string[]: List of Gcp metric prefixes to ingest.
  - `create_if_missing` boolean: If true, the GcpMetricsIntegration will be created if it does not already exist, identified by slug. If false, an error will be returned if the GcpMetricsIntegration does not already exist.
  - `dry_run` boolean: If true, the GcpMetricsIntegration isn't created or updated, and no response GcpMetricsIntegration will be returned. The response will return an error if the given GcpMetricsIntegration is invalid.

## Response `200`

A successful response containing the updated GcpMetricsIntegration.

- Configv1UpdateGcpMetricsIntegrationResponse
  - `gcp_metrics_integration` Configv1GcpMetricsIntegration
    - `slug` string: Unique identifier of the GcpMetricsIntegration. If a `slug` isn't provided, one will be generated based of the `name` field. You can't modify this field after the GcpMetricsIntegration is created.
    - `name` string: Required. Name of the GcpMetricsIntegration. You can modify this value after the GcpMetricsIntegration is created.
    - `created_at` string, date-time: Timestamp of when the GcpMetricsIntegration was created. Cannot be set by clients.
    - `updated_at` string, date-time: Timestamp of when the GcpMetricsIntegration was last updated. Cannot be set by clients.
    - `service_account` Configv1GcpMetricsIntegrationServiceAccount
      - `client_email` string: Email address of the service account to impersonate.
    - `metric_groups` GcpMetricsIntegrationMetricGroup[]: Metric groups to be ingested for this integration.
      - `project_id` string: Project ID that has access to the metric data.
      - `prefixes` string[]: List of Gcp metric prefixes to ingest.

## Other responses

- `400`: Cannot update the GcpMetricsIntegration because the request is invalid.
- `404`: Cannot update the GcpMetricsIntegration because the slug does not exist.
- `409`: Cannot update the GcpMetricsIntegration because there is a conflict with an existing GcpMetricsIntegration.
- `500`: An unexpected error response.
- `default`: An undefined error response.

---

[API](https://skmtc.dev/chronosphere/apis/config-v1-api.md) - [All operations](https://skmtc.dev/chronosphere/apis/config-v1-api/llms.txt) - [OpenAPI document](https://skmtc.dev/chronosphere/apis/config-v1-api/revisions/530951bd2ccf?raw)
