---
title: "Update an Elastic Cloud integration account"
method: PATCH
path: "/api/v2/integration-interfaces/elastic-cloud/accounts/{account_id}"
tags: ["Elastic Cloud Integration"]
---

# Update an Elastic Cloud integration account

`PATCH /api/v2/integration-interfaces/elastic-cloud/accounts/{account_id}`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/integration-interfaces/elastic-cloud/accounts/{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`
- TypeScript: <https://skmtc.dev/datadog/apis/datadog-api-v2-collection/docs/api/v2/integration-interfaces/elastic-cloud/accounts/:account_id/patch.ts> (a function with typed inputs; its response is checked against the schema)

Update an Elastic Cloud integration account. Only the fields provided are changed.

## Path parameters

- `account_id` string, required

## Request body

- ElasticCloudIntegrationAccountUpdateRequest: Request payload to update an Elastic Cloud integration account.
  - `data` ElasticCloudIntegrationAccountUpdateData, required: Data envelope for updating an Elastic Cloud integration account.
    - `attributes` ElasticCloudIntegrationAccountUpdateAttributes, required: Writable attributes used to update an Elastic Cloud integration account. Every field is optional; only the fields provided are changed. When `dataflows` is provided, only the dataflow ids included in the request are modified; dataflows omitted from the map keep their current configuration.
      - `authentication` ElasticCloudIntegrationAccountAuthenticationUpdate: Username and password authentication. Only the fields provided are changed; omit `password` to keep the stored one.
        - `auth_type` 'basic', required: The authentication method type.
        - `password` string: Secret password or private key.
        - `username` string: Non-secret username or public identifier for the credential pair.
      - `dataflows` ElasticCloudIntegrationDataflowsRequest: Data Datadog collects from Elastic Cloud, keyed by dataflow id. Node-level cluster statistics are always collected; each dataflow here adds a further set of metrics on top of that baseline, so set `enabled` to start or stop it. Defaults listed on each dataflow apply when the account is created; on update, omitted fields keep their current values. Every dataflow queries the deployment as the user in `authentication`, so that user's role must hold the required Elasticsearch privileges; a dataflow enabled without them is stored but collects no data.
        - `elastic-cloud-detailed-index-stats` ElasticCloudDetailedIndexStatsIntegrationDataflowRequest: Primary shard metrics broken down per index, rather than aggregated across the cluster.
          - `enabled` boolean: Whether Datadog collects this data. Defaults to `false`; set to `true` to start collection.
        - `elastic-cloud-index-stats` ElasticCloudIndexStatsIntegrationDataflowRequest: Metrics for individual indices. Only the indices granted to the role of the user in `authentication` are collected.
          - `enabled` boolean: Whether Datadog collects this data. Defaults to `false`; set to `true` to start collection.
        - `elastic-cloud-pending-task-stats` ElasticCloudPendingTaskStatsIntegrationDataflowRequest: Metrics for cluster-level changes that have been submitted but not yet executed.
          - `enabled` boolean: Whether Datadog collects this data. Defaults to `false`; set to `true` to start collection.
        - `elastic-cloud-primary-shard-graceful-timeout` ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflowRequest: Tolerance for slow primary shard requests. Primary shard metrics can grow large enough for the request to time out; enabling this keeps the rest of the collection running when that happens instead of failing the run. Only has an effect alongside `elastic-cloud-primary-shard-stats`.
          - `enabled` boolean: Whether this tolerance is applied. Defaults to `false`; set to `true` to apply it.
        - `elastic-cloud-primary-shard-stats` ElasticCloudPrimaryShardStatsIntegrationDataflowRequest: Metrics covering only the cluster's primary shards.
          - `enabled` boolean: Whether Datadog collects this data. Defaults to `false`; set to `true` to start collection.
        - `elastic-cloud-shard-allocation-stats` ElasticCloudShardAllocationStatsIntegrationDataflowRequest: Metrics for how many shards are allocated to each data node, and the disk space they use.
          - `enabled` boolean: Whether Datadog collects this data. Defaults to `false`; set to `true` to start collection.
        - `elastic-cloud-slm-stats` ElasticCloudSlmStatsIntegrationDataflowRequest: Metrics about the actions taken by snapshot lifecycle management. Requires the `read_slm` Elasticsearch cluster privilege on the role of the user in `authentication`; without it this dataflow collects no data.
          - `enabled` boolean: Whether Datadog collects this data. Defaults to `false`; set to `true` to start collection.
      - `name` string: Human-readable name of the Elastic Cloud integration account.
      - `settings` ElasticCloudIntegrationAccountSettingsUpdate: Settings for updating the Elastic Cloud integration account. Only the fields provided are changed.
        - `tags` string: Comma-separated list of custom tags for this Elastic Cloud deployment.
        - `url` string: Elastic Cloud deployment URL.
    - `id` string, required: Unique identifier of the Elastic Cloud integration account to update.
    - `type` 'integration-account', required: The type of the integration account resource. Always `integration-account`.

## Response `200`

OK

- ElasticCloudIntegrationAccountResponse: Response payload for a single Elastic Cloud integration account.
  - `data` ElasticCloudIntegrationAccountResponseData, required: Data envelope of an Elastic Cloud integration account, including server-assigned identity.
    - `attributes` ElasticCloudIntegrationAccountResponseAttributes, required: Attributes of an Elastic Cloud integration account returned in responses.
      - `authentication` ElasticCloudIntegrationAccountAuthenticationResponse: The basic authentication method and username configured on the account.
        - `auth_type` 'basic', required: The authentication method type.
        - `username` string, required: Non-secret username or public identifier for the credential pair.
      - `dataflows` ElasticCloudIntegrationDataflowsResponse: Data Datadog collects from Elastic Cloud, keyed by dataflow id.
        - `elastic-cloud-detailed-index-stats` ElasticCloudDetailedIndexStatsIntegrationDataflowResponse: Primary shard metrics broken down per index, rather than aggregated across the cluster.
          - `enabled` boolean: Whether Datadog collects this data.
          - `status` IntegrationAccountDataflowStatus: Read-only collection status of a dataflow.
            - `health` 'DATAFLOW_HEALTH_OK' | 'DATAFLOW_HEALTH_BROKEN' | 'DATAFLOW_HEALTH_UNKNOWN': Collection health of a single dataflow.
            - `message` string: Human-readable detail, populated when the dataflow is not healthy.
            - `updated_at` string, date-time: Time the status was last computed.
        - `elastic-cloud-index-stats` ElasticCloudIndexStatsIntegrationDataflowResponse: Metrics for individual indices. Only the indices granted to the role of the user in `authentication` are collected.
          - `enabled` boolean: Whether Datadog collects this data.
          - `status` IntegrationAccountDataflowStatus: Read-only collection status of a dataflow.
            - `health` 'DATAFLOW_HEALTH_OK' | 'DATAFLOW_HEALTH_BROKEN' | 'DATAFLOW_HEALTH_UNKNOWN': Collection health of a single dataflow.
            - `message` string: Human-readable detail, populated when the dataflow is not healthy.
            - `updated_at` string, date-time: Time the status was last computed.
        - `elastic-cloud-metrics` ElasticCloudMetricsIntegrationDataflowResponse: Node-level statistics for the clusters in your deployment, such as the number of nodes and the number of documents on each node. This is the integration's baseline collection: it is always on and cannot be turned off, which is why it appears in responses only.
          - `enabled` boolean: Whether Datadog collects this data. Always `true`, because this collection cannot be turned off.
          - `status` IntegrationAccountDataflowStatus: Read-only collection status of a dataflow.
            - `health` 'DATAFLOW_HEALTH_OK' | 'DATAFLOW_HEALTH_BROKEN' | 'DATAFLOW_HEALTH_UNKNOWN': Collection health of a single dataflow.
            - `message` string: Human-readable detail, populated when the dataflow is not healthy.
            - `updated_at` string, date-time: Time the status was last computed.
        - `elastic-cloud-pending-task-stats` ElasticCloudPendingTaskStatsIntegrationDataflowResponse: Metrics for cluster-level changes that have been submitted but not yet executed.
          - `enabled` boolean: Whether Datadog collects this data.
          - `status` IntegrationAccountDataflowStatus: Read-only collection status of a dataflow.
            - `health` 'DATAFLOW_HEALTH_OK' | 'DATAFLOW_HEALTH_BROKEN' | 'DATAFLOW_HEALTH_UNKNOWN': Collection health of a single dataflow.
            - `message` string: Human-readable detail, populated when the dataflow is not healthy.
            - `updated_at` string, date-time: Time the status was last computed.
        - `elastic-cloud-primary-shard-graceful-timeout` ElasticCloudPrimaryShardGracefulTimeoutIntegrationDataflowResponse: Tolerance for slow primary shard requests, keeping the rest of the collection running when a primary shard request times out instead of failing the run. Only has an effect alongside `elastic-cloud-primary-shard-stats`.
          - `enabled` boolean: Whether this tolerance is applied.
          - `status` IntegrationAccountDataflowStatus: Read-only collection status of a dataflow.
            - `health` 'DATAFLOW_HEALTH_OK' | 'DATAFLOW_HEALTH_BROKEN' | 'DATAFLOW_HEALTH_UNKNOWN': Collection health of a single dataflow.
            - `message` string: Human-readable detail, populated when the dataflow is not healthy.
            - `updated_at` string, date-time: Time the status was last computed.
        - `elastic-cloud-primary-shard-stats` ElasticCloudPrimaryShardStatsIntegrationDataflowResponse: Metrics covering only the cluster's primary shards.
          - `enabled` boolean: Whether Datadog collects this data.
          - `status` IntegrationAccountDataflowStatus: Read-only collection status of a dataflow.
            - `health` 'DATAFLOW_HEALTH_OK' | 'DATAFLOW_HEALTH_BROKEN' | 'DATAFLOW_HEALTH_UNKNOWN': Collection health of a single dataflow.
            - `message` string: Human-readable detail, populated when the dataflow is not healthy.
            - `updated_at` string, date-time: Time the status was last computed.
        - `elastic-cloud-shard-allocation-stats` ElasticCloudShardAllocationStatsIntegrationDataflowResponse: Metrics for how many shards are allocated to each data node, and the disk space they use.
          - `enabled` boolean: Whether Datadog collects this data.
          - `status` IntegrationAccountDataflowStatus: Read-only collection status of a dataflow.
            - `health` 'DATAFLOW_HEALTH_OK' | 'DATAFLOW_HEALTH_BROKEN' | 'DATAFLOW_HEALTH_UNKNOWN': Collection health of a single dataflow.
            - `message` string: Human-readable detail, populated when the dataflow is not healthy.
            - `updated_at` string, date-time: Time the status was last computed.
        - `elastic-cloud-slm-stats` ElasticCloudSlmStatsIntegrationDataflowResponse: Metrics about the actions taken by snapshot lifecycle management. Requires the `read_slm` Elasticsearch cluster privilege on the role of the user in `authentication`; without it this dataflow collects no data.
          - `enabled` boolean: Whether Datadog collects this data.
          - `status` IntegrationAccountDataflowStatus: Read-only collection status of a dataflow.
            - `health` 'DATAFLOW_HEALTH_OK' | 'DATAFLOW_HEALTH_BROKEN' | 'DATAFLOW_HEALTH_UNKNOWN': Collection health of a single dataflow.
            - `message` string: Human-readable detail, populated when the dataflow is not healthy.
            - `updated_at` string, date-time: Time the status was last computed.
      - `name` string, required: Human-readable name of the Elastic Cloud integration account.
      - `settings` ElasticCloudIntegrationAccountSettingsResponse, required: Settings configured on the Elastic Cloud integration account.
        - `tags` string: Comma-separated list of custom tags for this Elastic Cloud deployment.
        - `url` string, required: Elastic Cloud deployment URL.
    - `id` string, required: Server-generated unique identifier of the Elastic Cloud integration account.
    - `type` 'integration-account', required: The type of the integration account resource. Always `integration-account`.

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: Not Found
- `422`: The server cannot process the request because it contains invalid data.
- `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/3f70db624329?raw)
