---
title: "Update STS Service Account"
method: PATCH
path: "/api/v2/integration/gcp/accounts/{account_id}"
tags: ["GCP Integration"]
---

# Update STS Service Account

`PATCH /api/v2/integration/gcp/accounts/{account_id}`

Update an STS enabled service account.

## Path parameters

- `account_id` string, required

## Request body

- GCPSTSServiceAccountUpdateRequest — Service account info.
  - `data` GCPSTSServiceAccountUpdateRequestData — Data on your service account.
    - `attributes` GCPSTSServiceAccountAttributes — Attributes associated with your service account.
      - `account_tags` string[] — Tags to be associated with GCP metrics and service checks from your account.
      - `automute` boolean — Silence monitors for expected GCE instance shutdowns.
      - `client_email` string — Your service account email address.
      - `cloud_run_revision_filters` string[] — List of filters to limit the Cloud Run revisions that are pulled into Datadog by using tags. Only Cloud Run revision resources that apply to specified filters are imported into Datadog. **Note:** This field is deprecated. Instead, use `monitored_resource_configs` with `type=cloud_run_revision`
      - `host_filters` string[] — List of filters to limit the VM instances that are pulled into Datadog by using tags. Only VM instance resources that apply to specified filters are imported into Datadog. **Note:** This field is deprecated. Instead, use `monitored_resource_configs` with `type=gce_instance`
      - `is_cspm_enabled` boolean — When enabled, Datadog will activate the Cloud Security Monitoring product for this service account. Note: This requires resource_collection_enabled to be set to true.
      - `is_global_location_enabled` boolean — When enabled, Datadog collects metrics where location is explicitly stated as "global" or where location information cannot be deduced from GCP labels.
      - `is_per_project_quota_enabled` boolean — When enabled, Datadog applies the `X-Goog-User-Project` header, attributing Google Cloud billing and quota usage to the project being monitored rather than the default service account project.
      - `is_resource_change_collection_enabled` boolean — When enabled, Datadog scans for all resource change data in your Google Cloud environment.
      - `is_security_command_center_enabled` boolean — When enabled, Datadog will attempt to collect Security Command Center Findings. Note: This requires additional permissions on the service account.
      - `metric_namespace_configs` GCPMetricNamespaceConfig[] — Configurations for GCP metric namespaces.
        - `disabled` boolean — When disabled, Datadog does not collect metrics that are related to this GCP metric namespace.
        - `filters` string[] — When enabled, Datadog applies these additional filters to limit metric collection. A metric is collected only if it does not match all exclusion filters and matches at least one allow filter.
        - `id` string — The id of the GCP metric namespace.
      - `monitored_resource_configs` GCPMonitoredResourceConfig[] — Configurations for GCP monitored resources.
        - `filters` string[] — List of filters to limit the monitored resources that are pulled into Datadog by using tags. Only monitored resources that apply to specified filters are imported into Datadog.
        - `type` 'cloud_function' | 'cloud_run_revision' | 'gce_instance' — The GCP monitored resource type. Only a subset of resource types are supported.
      - `region_filter_configs` string[] — Configurations for GCP location filtering, such as region, multi-region, or zone. Only monitored resources that match the specified regions are imported into Datadog. By default, Datadog collects from all locations.
      - `resource_collection_enabled` boolean — When enabled, Datadog scans for all resources in your GCP environment.
    - `id` string — Your service account's unique ID.
    - `type` 'gcp_service_account' — The type of account.

## Response `201`

OK

- GCPSTSServiceAccountResponse — The account creation response.
  - `data` GCPSTSServiceAccount — Info on your service account.
    - `attributes` GCPSTSServiceAccountAttributes — Attributes associated with your service account.
      - `account_tags` string[] — Tags to be associated with GCP metrics and service checks from your account.
      - `automute` boolean — Silence monitors for expected GCE instance shutdowns.
      - `client_email` string — Your service account email address.
      - `cloud_run_revision_filters` string[] — List of filters to limit the Cloud Run revisions that are pulled into Datadog by using tags. Only Cloud Run revision resources that apply to specified filters are imported into Datadog. **Note:** This field is deprecated. Instead, use `monitored_resource_configs` with `type=cloud_run_revision`
      - `host_filters` string[] — List of filters to limit the VM instances that are pulled into Datadog by using tags. Only VM instance resources that apply to specified filters are imported into Datadog. **Note:** This field is deprecated. Instead, use `monitored_resource_configs` with `type=gce_instance`
      - `is_cspm_enabled` boolean — When enabled, Datadog will activate the Cloud Security Monitoring product for this service account. Note: This requires resource_collection_enabled to be set to true.
      - `is_global_location_enabled` boolean — When enabled, Datadog collects metrics where location is explicitly stated as "global" or where location information cannot be deduced from GCP labels.
      - `is_per_project_quota_enabled` boolean — When enabled, Datadog applies the `X-Goog-User-Project` header, attributing Google Cloud billing and quota usage to the project being monitored rather than the default service account project.
      - `is_resource_change_collection_enabled` boolean — When enabled, Datadog scans for all resource change data in your Google Cloud environment.
      - `is_security_command_center_enabled` boolean — When enabled, Datadog will attempt to collect Security Command Center Findings. Note: This requires additional permissions on the service account.
      - `metric_namespace_configs` GCPMetricNamespaceConfig[] — Configurations for GCP metric namespaces.
        - `disabled` boolean — When disabled, Datadog does not collect metrics that are related to this GCP metric namespace.
        - `filters` string[] — When enabled, Datadog applies these additional filters to limit metric collection. A metric is collected only if it does not match all exclusion filters and matches at least one allow filter.
        - `id` string — The id of the GCP metric namespace.
      - `monitored_resource_configs` GCPMonitoredResourceConfig[] — Configurations for GCP monitored resources.
        - `filters` string[] — List of filters to limit the monitored resources that are pulled into Datadog by using tags. Only monitored resources that apply to specified filters are imported into Datadog.
        - `type` 'cloud_function' | 'cloud_run_revision' | 'gce_instance' — The GCP monitored resource type. Only a subset of resource types are supported.
      - `region_filter_configs` string[] — Configurations for GCP location filtering, such as region, multi-region, or zone. Only monitored resources that match the specified regions are imported into Datadog. By default, Datadog collects from all locations.
      - `resource_collection_enabled` boolean — When enabled, Datadog scans for all resources in your GCP environment.
    - `id` string — Your service account's unique ID.
    - `meta` GCPServiceAccountMeta — Additional information related to your service account.
      - `accessible_projects` string[] — The current list of projects accessible from your service account.
    - `type` 'gcp_service_account' — The type of account.

## Other responses

- `400` — Bad Request
- `403` — Not Authorized
- `404` — Not Found
- `429` — Too many requests

---

[API](https://skmtc.net/datadog/apis/api-v2.md) · [All operations](https://skmtc.net/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v2/revisions/da68bf029e4c/schema)
