---
title: "Update Google Cloud Usage Cost config"
method: PATCH
path: "/api/v2/cost/gcp_uc_config/{cloud_account_id}"
tags: ["Cloud Cost Management"]
---

# Update Google Cloud Usage Cost config

`PATCH /api/v2/cost/gcp_uc_config/{cloud_account_id}`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/cost/gcp_uc_config/{cloud_account_id}`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `cloud_cost_management_write`

Update the status of an Google Cloud Usage Cost config (active/archived).

## Path parameters

- `cloud_account_id` integer, required

## Request body

- GCPUsageCostConfigPatchRequest: Google Cloud Usage Cost config patch request.
  - `data` GCPUsageCostConfigPatchData, required: Google Cloud Usage Cost config patch data.
    - `attributes` GCPUsageCostConfigPatchRequestAttributes, required: Attributes for Google Cloud Usage Cost config patch request.
      - `is_enabled` boolean, required: Whether or not the Cloud Cost Management account is enabled.
    - `type` 'gcp_uc_config_patch_request', required: Type of Google Cloud Usage Cost config patch request.

## Response `200`

OK

- GCPUsageCostConfigResponse: Response of Google Cloud Usage Cost config.
  - `data` GCPUsageCostConfig: Google Cloud Usage Cost config.
    - `attributes` GCPUsageCostConfigAttributes, required: Attributes for a Google Cloud Usage Cost config.
      - `account_id` string, required: The Google Cloud account ID.
      - `bucket_name` string, required: The Google Cloud bucket name used to store the Usage Cost export.
      - `created_at` string: The timestamp when the Google Cloud Usage Cost config was created.
      - `dataset` string, required: The export dataset name used for the Google Cloud Usage Cost Report.
      - `error_messages` string[], nullable: The error messages for the Google Cloud Usage Cost config.
      - `export_prefix` string, required: The export prefix used for the Google Cloud Usage Cost Report.
      - `export_project_name` string, required: The name of the Google Cloud Usage Cost Report.
      - `months` integer: The number of months the report has been backfilled.
      - `project_id` string: The `project_id` of the Google Cloud Usage Cost report.
      - `service_account` string, required: The unique Google Cloud service account email.
      - `status` string, required: The status of the Google Cloud Usage Cost config.
      - `status_updated_at` string: The timestamp when the Google Cloud Usage Cost config status was updated.
      - `updated_at` string: The timestamp when the Google Cloud Usage Cost config status was updated.
    - `id` string: The ID of the Google Cloud Usage Cost config.
    - `type` 'gcp_uc_config', required: Type of Google Cloud Usage Cost config.

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: Not Found
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/da68bf029e4c?raw)
