---
title: Update a Snowflake integration account
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > Snowflake Integration
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Update a Snowflake integration account{% #update-a-snowflake-integration-account %}
Copy pageCopied
{% tab title="v2" %}
**Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
| Datadog site      | API endpoint                                                                                      |
| ----------------- | ------------------------------------------------------------------------------------------------- |
| ap1.datadoghq.com | PATCH https://api.ap1.datadoghq.com/api/v2/integration-interfaces/snowflake/accounts/{account_id} |
| ap2.datadoghq.com | PATCH https://api.ap2.datadoghq.com/api/v2/integration-interfaces/snowflake/accounts/{account_id} |
| app.datadoghq.eu  | PATCH https://api.datadoghq.eu/api/v2/integration-interfaces/snowflake/accounts/{account_id}      |
| app.ddog-gov.com  | PATCH https://api.ddog-gov.com/api/v2/integration-interfaces/snowflake/accounts/{account_id}      |
| us2.ddog-gov.com  | PATCH https://api.us2.ddog-gov.com/api/v2/integration-interfaces/snowflake/accounts/{account_id}  |
| uk1.datadoghq.com | PATCH https://api.uk1.datadoghq.com/api/v2/integration-interfaces/snowflake/accounts/{account_id} |
| app.datadoghq.com | PATCH https://api.datadoghq.com/api/v2/integration-interfaces/snowflake/accounts/{account_id}     |
| us3.datadoghq.com | PATCH https://api.us3.datadoghq.com/api/v2/integration-interfaces/snowflake/accounts/{account_id} |
| us5.datadoghq.com | PATCH https://api.us5.datadoghq.com/api/v2/integration-interfaces/snowflake/accounts/{account_id} |

### Overview

Update a Snowflake integration account. Only the fields provided are changed. This endpoint requires the `manage_integrations` permission.

### Arguments

#### Path Parameters

| Name                         | Type   | Description                                   |
| ---------------------------- | ------ | --------------------------------------------- |
| account_id [*required*] | string | Unique identifier of the integration account. |

### Request

#### Body Data (required)



{% tab title="Model" %}

| Parent field                                    | Field                                           | Type          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ----------------------------------------------- | ----------------------------------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                                                 | data [*required*]                          | object        | Data envelope for updating a Snowflake integration account.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| data                                            | attributes [*required*]                    | object        | Writable attributes used to update a Snowflake 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, as do the settings of an included dataflow that provides only `enabled`.                                                                                                                                                                              |
| attributes                                      | authentication                                  |  <oneOf> | Authentication for updating the Snowflake integration account. Exactly one method is set.                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| authentication                                  | <auth_type=snowflake_private_key>               | object        | RSA key pair authentication, the only method Snowflake integration accounts support. Only the fields provided are changed; omit `private_key` to keep the stored one.                                                                                                                                                                                                                                                                                                                                                                               |
| <auth_type=snowflake_private_key>               | auth_type [*required*]                     | enum          | The authentication method type. Allowed enum values: `snowflake_private_key`                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| <auth_type=snowflake_private_key>               | private_key                                     | string        | The private key, in PEM format.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| <auth_type=snowflake_private_key>               | private_key_name                                | string        | Name that distinguishes this private key from other keys in Datadog.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| <auth_type=snowflake_private_key>               | private_key_passphrase                          | string        | Passphrase that decrypts the private key. Provide it only when the key is encrypted. Omit it to keep the stored passphrase, send `null` or an empty string to remove it, or send a value to replace it.                                                                                                                                                                                                                                                                                                                                             |
| attributes                                      | dataflows                                       | object        | Data Datadog collects from Snowflake, keyed by dataflow id. Each dataflow turns on a distinct kind of collection: set `enabled` to start or stop it, and use `settings` to configure what it collects. Defaults listed on each dataflow apply when the account is created; on update, omitted fields keep their current values. Every dataflow reads from Snowflake as the user in `settings.username`, so that user's role must be granted access to the underlying views; a dataflow enabled without those grants is stored but collects no data. |
| dataflows                                       | snowflake-account-usage-metrics                 | object        | Account-level usage metrics read from the Snowflake `ACCOUNT_USAGE` schema, covering storage usage, credit consumption, and query activity.                                                                                                                                                                                                                                                                                                                                                                                                         |
| snowflake-account-usage-metrics                 | enabled                                         | boolean       | Whether Datadog collects this data. Defaults to `false`; set to `true` to start collection.                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| snowflake-account-usage-metrics                 | settings                                        | object        | Settings of the account usage metrics dataflow. Only the fields provided are changed.                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| settings                                        | account_usage_metrics_aggregate_last_24h        | boolean       | The period each metric aggregates over. Set to `true` to aggregate the past 24 hours on a rolling basis, or `false` to aggregate the current day so far. Defaults to `false`.                                                                                                                                                                                                                                                                                                                                                                       |
| dataflows                                       | snowflake-cloud-cost-metrics                    | object        | Cost data aggregated from the Snowflake `ORGANIZATION_USAGE` schema. [Cloud Cost Management](https://docs.datadoghq.com/cloud_cost_management.md) must be enabled for your organization while this dataflow is enabled. Any request that enables this dataflow without Cloud Cost Management is rejected with a `422` response. The Snowflake role also needs the ORGANIZATION_BILLING_VIEWER database role to read the underlying cost views; without that role this dataflow collects no data.                                                    |
| snowflake-cloud-cost-metrics                    | enabled                                         | boolean       | Whether Datadog collects this data. Defaults to `false`; set to `true` to start collection.                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| snowflake-cloud-cost-metrics                    | settings                                        | object        | Settings of the Cloud Cost Management dataflow. Only the fields provided are changed.                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| settings                                        | query_tags                                      | string        | Snowflake query tags to ingest, so that cost data can be broken down by them in Cloud Cost Management. Provide the tag names as a comma-separated list without spaces, using only letters, digits, underscores, dots, and hyphens. Datadog does not collect query tags by default.                                                                                                                                                                                                                                                                  |
| dataflows                                       | snowflake-data-observability-quality-monitoring | object        | Data Observability, which collects lineage and data quality information from your Snowflake databases so you can explore how data flows and detect and resolve quality issues.                                                                                                                                                                                                                                                                                                                                                                      |
| snowflake-data-observability-quality-monitoring | enabled                                         | boolean       | Whether Datadog collects this data. Defaults to `false`; set to `true` to start collection.                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| snowflake-data-observability-quality-monitoring | settings                                        | object        | Settings of the Data Observability dataflow. Only the fields provided are changed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| settings                                        | do_table_crawler_cron                           | string        | Cron expression setting how often Datadog crawls your Snowflake table metadata. It takes the five standard fields, with the restriction that the month must be `*` and that the day of the month and the day of the week cannot both be constrained. Common values are hourly (`0 * * * *`) and daily (`0 0 * * *`). Defaults to hourly (`0 * * * *`).                                                                                                                                                                                              |
| settings                                        | sync_snowflake_system_database                  | boolean       | Whether metadata from the Snowflake `SNOWFLAKE` system database is included in Data Observability alongside your own databases. Defaults to `true`.                                                                                                                                                                                                                                                                                                                                                                                                 |
| dataflows                                       | snowflake-event-table-logs                      | object        | Records from your Snowflake event tables, used to monitor application behavior and identify issues. `enabled` turns the dataflow on and off as a whole, and the per-record-type toggles in `settings` select which kinds of record it collects while it is on. The Snowflake role needs usage granted on the database, the schema, and the event table itself; without those grants this dataflow collects no data.                                                                                                                                 |
| snowflake-event-table-logs                      | enabled                                         | boolean       | Whether Datadog collects this data. Defaults to `false`; set to `true` to start collection.                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| snowflake-event-table-logs                      | settings                                        | object        | Settings of the event table dataflow. Each record type is collected independently so that you can control ingestion costs, and every record type is ingested into Datadog as logs tagged with its `record_type`. Only the fields provided are changed.                                                                                                                                                                                                                                                                                              |
| settings                                        | event_table_events_enabled                      | boolean       | Whether records with a `record_type` of `event` are collected. Defaults to `false`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| settings                                        | event_table_logs_enabled                        | boolean       | Whether records with a `record_type` of `log` are collected. Defaults to `false`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| settings                                        | event_table_logs_interval_min                   | int64         | How often event table records are collected, in minutes. One of `5`, `15`, `30`, `60`, or `1440`. Defaults to `5`.                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| settings                                        | event_table_span_events_enabled                 | boolean       | Whether records with a `record_type` of `span_event` are collected. Defaults to `false`.                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| settings                                        | event_table_spans_enabled                       | boolean       | Whether records with a `record_type` of `span` are collected. Defaults to `false`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| dataflows                                       | snowflake-organization-usage-metrics            | object        | Organization-level usage metrics read from the Snowflake `ORGANIZATION_USAGE` schema, covering the credit consumption of every account in the organization and the history of data transferred out of Snowflake. Reading that schema requires the ORGADMIN role; without it this dataflow collects no data.                                                                                                                                                                                                                                         |
| snowflake-organization-usage-metrics            | enabled                                         | boolean       | Whether Datadog collects this data. Defaults to `false`; set to `true` to start collection.                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| snowflake-organization-usage-metrics            | settings                                        | object        | Settings of the organization usage metrics dataflow. Only the fields provided are changed.                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| settings                                        | organization_usage_metrics_aggregate_last_24h   | boolean       | The period each metric aggregates over. Set to `true` to aggregate the past 24 hours on a rolling basis, or `false` to aggregate the current day so far. Defaults to `false`.                                                                                                                                                                                                                                                                                                                                                                       |
| dataflows                                       | snowflake-query-history-logs                    | object        | Per-query logs that let you identify long-running, poorly performing, and expensive queries.                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| snowflake-query-history-logs                    | enabled                                         | boolean       | Whether Datadog collects this data. Defaults to `false`; set to `true` to start collection.                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| snowflake-query-history-logs                    | settings                                        | object        | Settings of the query history logs dataflow. Only the fields provided are changed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| settings                                        | join_query_history_with_access_history_enabled  | boolean       | Whether query logs are joined with Snowflake access history, which adds the objects each query read and wrote so you can follow how data is used and where it came from. Defaults to `false`.                                                                                                                                                                                                                                                                                                                                                       |
| settings                                        | query_history_logs_interval_min                 | int64         | How often query history logs are collected, in minutes. One of `5`, `15`, `30`, `60`, `720`, or `1440`. Defaults to `5`.                                                                                                                                                                                                                                                                                                                                                                                                                            |
| dataflows                                       | snowflake-security-logs                         | object        | Security logs from the Snowflake `ACCOUNT_USAGE` schema, for analyzing the security of your Snowflake account and running threat detection with [Cloud SIEM](https://docs.datadoghq.com/security/cloud_siem.md).                                                                                                                                                                                                                                                                                                                                    |
| snowflake-security-logs                         | enabled                                         | boolean       | Whether Datadog collects this data. Defaults to `false`; set to `true` to start collection.                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| snowflake-security-logs                         | settings                                        | object        | Settings of the security logs dataflow. Only the fields provided are changed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| settings                                        | security_logs_interval_min                      | int64         | How often security logs are collected, in minutes. One of `5`, `15`, `30`, `60`, `360`, `720`, or `1440`. Defaults to `5`.                                                                                                                                                                                                                                                                                                                                                                                                                          |
| dataflows                                       | snowflake-task-history-logs                     | object        | Execution logs for your scheduled Snowflake tasks, covering start time, end time, status, and any error message.                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| snowflake-task-history-logs                     | enabled                                         | boolean       | Whether Datadog collects this data. Defaults to `false`; set to `true` to start collection.                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| snowflake-task-history-logs                     | settings                                        | object        | Settings of the task history logs dataflow. Only the fields provided are changed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| settings                                        | task_history_logs_interval_min                  | int64         | How often task history logs are collected, in minutes. One of `5`, `15`, `30`, `60`, or `1440`. Defaults to `5`.                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| attributes                                      | name                                            | string        | Human-readable name of the Snowflake integration account. Must be unique within your Datadog organization.                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| attributes                                      | settings                                        | object        | Settings for updating the Snowflake integration account. Only the fields provided are changed.                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| settings                                        | snowflake_account_identifier                    | string        | Identifier of the Snowflake account to monitor, either as `organization-account` or as the legacy `account_name.region_id.cloud_provider` account locator. An account identifier can be configured once per Datadog organization; reusing one is rejected with a `422` response. Accounts reached through AWS PrivateLink are not supported.                                                                                                                                                                                                        |
| settings                                        | username                                        | string        | Snowflake user Datadog authenticates as. Create a dedicated user for Datadog and grant it a role with access to the data you want to collect.                                                                                                                                                                                                                                                                                                                                                                                                       |
| data                                            | id [*required*]                            | string        | Unique identifier of the Snowflake integration account to update.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| data                                            | type [*required*]                          | enum          | The type of the integration account resource. Always `integration-account`. Allowed enum values: `integration-account`                                                                                                                                                                                                                                                                                                                                                                                                                              |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "authentication": {
        "auth_type": "snowflake_private_key",
        "private_key": "-----BEGIN PRIVATE KEY-----\nMIIE...\n-----END PRIVATE KEY-----",
        "private_key_name": "my-rsa-key",
        "private_key_passphrase": "your-private-key-passphrase"
      },
      "dataflows": {
        "snowflake-account-usage-metrics": {
          "enabled": true,
          "settings": {
            "account_usage_metrics_aggregate_last_24h": false
          }
        },
        "snowflake-cloud-cost-metrics": {
          "enabled": true,
          "settings": {
            "query_tags": "env,team,cost_center"
          }
        },
        "snowflake-data-observability-quality-monitoring": {
          "enabled": true,
          "settings": {
            "do_table_crawler_cron": "0 */6 * * *",
            "sync_snowflake_system_database": true
          }
        },
        "snowflake-event-table-logs": {
          "enabled": true,
          "settings": {
            "event_table_events_enabled": true,
            "event_table_logs_enabled": true,
            "event_table_logs_interval_min": 15,
            "event_table_span_events_enabled": false,
            "event_table_spans_enabled": false
          }
        },
        "snowflake-organization-usage-metrics": {
          "enabled": true,
          "settings": {
            "organization_usage_metrics_aggregate_last_24h": false
          }
        },
        "snowflake-query-history-logs": {
          "enabled": true,
          "settings": {
            "join_query_history_with_access_history_enabled": true,
            "query_history_logs_interval_min": 15
          }
        },
        "snowflake-security-logs": {
          "enabled": true,
          "settings": {
            "security_logs_interval_min": 60
          }
        },
        "snowflake-task-history-logs": {
          "enabled": true,
          "settings": {
            "task_history_logs_interval_min": 30
          }
        }
      },
      "name": "prod-snowflake",
      "settings": {
        "snowflake_account_identifier": "myorg-myaccount",
        "username": "datadog_user"
      }
    },
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "type": "integration-account"
  }
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response payload for a single Snowflake integration account.

| Parent field                                    | Field                                           | Type          | Description                                                                                                                                                                                                                                                                                                                                                                                                         |
| ----------------------------------------------- | ----------------------------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|                                                 | data [*required*]                          | object        | Data envelope of a Snowflake integration account, including server-assigned identity.                                                                                                                                                                                                                                                                                                                               |
| data                                            | attributes [*required*]                    | object        | Attributes of a Snowflake integration account returned in responses.                                                                                                                                                                                                                                                                                                                                                |
| attributes                                      | authentication                                  |  <oneOf> | Authentication configured on the Snowflake integration account.                                                                                                                                                                                                                                                                                                                                                     |
| authentication                                  | <auth_type=snowflake_private_key>               | object        | The RSA key pair authentication method configured on the account.                                                                                                                                                                                                                                                                                                                                                   |
| <auth_type=snowflake_private_key>               | auth_type [*required*]                     | enum          | The authentication method type. Allowed enum values: `snowflake_private_key`                                                                                                                                                                                                                                                                                                                                        |
| <auth_type=snowflake_private_key>               | private_key_name [*required*]              | string        | Name that distinguishes this private key from other keys in Datadog.                                                                                                                                                                                                                                                                                                                                                |
| attributes                                      | dataflows                                       | object        | Data Datadog collects from Snowflake, keyed by dataflow id.                                                                                                                                                                                                                                                                                                                                                         |
| dataflows                                       | snowflake-account-usage-metrics                 | object        | Account-level usage metrics read from the Snowflake `ACCOUNT_USAGE` schema, covering storage usage, credit consumption, and query activity.                                                                                                                                                                                                                                                                         |
| snowflake-account-usage-metrics                 | enabled                                         | boolean       | Whether Datadog collects this data.                                                                                                                                                                                                                                                                                                                                                                                 |
| snowflake-account-usage-metrics                 | settings                                        | object        | Settings of the account usage metrics dataflow.                                                                                                                                                                                                                                                                                                                                                                     |
| settings                                        | account_usage_metrics_aggregate_last_24h        | boolean       | The period each metric aggregates over. When `true`, metrics aggregate the past 24 hours on a rolling basis; when `false`, they aggregate the current day so far.                                                                                                                                                                                                                                                   |
| dataflows                                       | snowflake-cloud-cost-metrics                    | object        | Cost data aggregated from the Snowflake `ORGANIZATION_USAGE` schema. Requires [Cloud Cost Management](https://docs.datadoghq.com/cloud_cost_management.md) to be set up for your organization, and the ORGANIZATION_BILLING_VIEWER database role on the Snowflake role; without both this dataflow collects no data.                                                                                                |
| snowflake-cloud-cost-metrics                    | enabled                                         | boolean       | Whether Datadog collects this data.                                                                                                                                                                                                                                                                                                                                                                                 |
| snowflake-cloud-cost-metrics                    | settings                                        | object        | Settings of the Cloud Cost Management dataflow.                                                                                                                                                                                                                                                                                                                                                                     |
| settings                                        | query_tags                                      | string        | Snowflake query tags ingested as a comma-separated list of tag names, so that cost data can be broken down by them in Cloud Cost Management.                                                                                                                                                                                                                                                                        |
| dataflows                                       | snowflake-data-observability-quality-monitoring | object        | Data Observability, which collects lineage and data quality information from your Snowflake databases so you can explore how data flows and detect and resolve quality issues.                                                                                                                                                                                                                                      |
| snowflake-data-observability-quality-monitoring | enabled                                         | boolean       | Whether Datadog collects this data.                                                                                                                                                                                                                                                                                                                                                                                 |
| snowflake-data-observability-quality-monitoring | settings                                        | object        | Settings of the Data Observability dataflow.                                                                                                                                                                                                                                                                                                                                                                        |
| settings                                        | do_table_crawler_cron                           | string        | Cron expression setting how often Datadog crawls your Snowflake table metadata.                                                                                                                                                                                                                                                                                                                                     |
| settings                                        | sync_snowflake_system_database                  | boolean       | Whether metadata from the Snowflake `SNOWFLAKE` system database is included in Data Observability alongside your own databases.                                                                                                                                                                                                                                                                                     |
| dataflows                                       | snowflake-event-table-logs                      | object        | Records from your Snowflake event tables, used to monitor application behavior and identify issues. `enabled` turns the dataflow on and off as a whole, and the per-record-type toggles in `settings` select which kinds of record it collects while it is on. The Snowflake role needs usage granted on the database, the schema, and the event table itself; without those grants this dataflow collects no data. |
| snowflake-event-table-logs                      | enabled                                         | boolean       | Whether Datadog collects this data.                                                                                                                                                                                                                                                                                                                                                                                 |
| snowflake-event-table-logs                      | settings                                        | object        | Settings of the event table dataflow. Each record type is collected independently so that you can control ingestion costs, and every record type is ingested into Datadog as logs tagged with its `record_type`.                                                                                                                                                                                                    |
| settings                                        | event_table_events_enabled                      | boolean       | Whether records with a `record_type` of `event` are collected.                                                                                                                                                                                                                                                                                                                                                      |
| settings                                        | event_table_logs_enabled                        | boolean       | Whether records with a `record_type` of `log` are collected.                                                                                                                                                                                                                                                                                                                                                        |
| settings                                        | event_table_logs_interval_min                   | int64         | How often event table records are collected, in minutes.                                                                                                                                                                                                                                                                                                                                                            |
| settings                                        | event_table_span_events_enabled                 | boolean       | Whether records with a `record_type` of `span_event` are collected.                                                                                                                                                                                                                                                                                                                                                 |
| settings                                        | event_table_spans_enabled                       | boolean       | Whether records with a `record_type` of `span` are collected.                                                                                                                                                                                                                                                                                                                                                       |
| dataflows                                       | snowflake-organization-usage-metrics            | object        | Organization-level usage metrics read from the Snowflake `ORGANIZATION_USAGE` schema, covering the credit consumption of every account in the organization and the history of data transferred out of Snowflake. Reading that schema requires the ORGADMIN role; without it this dataflow collects no data.                                                                                                         |
| snowflake-organization-usage-metrics            | enabled                                         | boolean       | Whether Datadog collects this data.                                                                                                                                                                                                                                                                                                                                                                                 |
| snowflake-organization-usage-metrics            | settings                                        | object        | Settings of the organization usage metrics dataflow.                                                                                                                                                                                                                                                                                                                                                                |
| settings                                        | organization_usage_metrics_aggregate_last_24h   | boolean       | The period each metric aggregates over. When `true`, metrics aggregate the past 24 hours on a rolling basis; when `false`, they aggregate the current day so far.                                                                                                                                                                                                                                                   |
| dataflows                                       | snowflake-query-history-logs                    | object        | Per-query logs that let you identify long-running, poorly performing, and expensive queries.                                                                                                                                                                                                                                                                                                                        |
| snowflake-query-history-logs                    | enabled                                         | boolean       | Whether Datadog collects this data.                                                                                                                                                                                                                                                                                                                                                                                 |
| snowflake-query-history-logs                    | settings                                        | object        | Settings of the query history logs dataflow.                                                                                                                                                                                                                                                                                                                                                                        |
| settings                                        | join_query_history_with_access_history_enabled  | boolean       | Whether query logs are joined with Snowflake access history, which adds the objects each query read and wrote so you can follow how data is used and where it came from.                                                                                                                                                                                                                                            |
| settings                                        | query_history_logs_interval_min                 | int64         | How often query history logs are collected, in minutes.                                                                                                                                                                                                                                                                                                                                                             |
| dataflows                                       | snowflake-security-logs                         | object        | Security logs from the Snowflake `ACCOUNT_USAGE` schema, for analyzing the security of your Snowflake account and running threat detection with [Cloud SIEM](https://docs.datadoghq.com/security/cloud_siem.md).                                                                                                                                                                                                    |
| snowflake-security-logs                         | enabled                                         | boolean       | Whether Datadog collects this data.                                                                                                                                                                                                                                                                                                                                                                                 |
| snowflake-security-logs                         | settings                                        | object        | Settings of the security logs dataflow.                                                                                                                                                                                                                                                                                                                                                                             |
| settings                                        | security_logs_interval_min                      | int64         | How often security logs are collected, in minutes.                                                                                                                                                                                                                                                                                                                                                                  |
| dataflows                                       | snowflake-task-history-logs                     | object        | Execution logs for your scheduled Snowflake tasks, covering start time, end time, status, and any error message.                                                                                                                                                                                                                                                                                                    |
| snowflake-task-history-logs                     | enabled                                         | boolean       | Whether Datadog collects this data.                                                                                                                                                                                                                                                                                                                                                                                 |
| snowflake-task-history-logs                     | settings                                        | object        | Settings of the task history logs dataflow.                                                                                                                                                                                                                                                                                                                                                                         |
| settings                                        | task_history_logs_interval_min                  | int64         | How often task history logs are collected, in minutes.                                                                                                                                                                                                                                                                                                                                                              |
| attributes                                      | name [*required*]                          | string        | Human-readable name of the Snowflake integration account.                                                                                                                                                                                                                                                                                                                                                           |
| attributes                                      | settings [*required*]                      | object        | Settings configured on the Snowflake integration account.                                                                                                                                                                                                                                                                                                                                                           |
| settings                                        | snowflake_account_identifier [*required*]  | string        | Identifier of the Snowflake account being monitored.                                                                                                                                                                                                                                                                                                                                                                |
| settings                                        | username [*required*]                      | string        | Snowflake user Datadog authenticates as.                                                                                                                                                                                                                                                                                                                                                                            |
| data                                            | id [*required*]                            | string        | Server-generated unique identifier of the Snowflake integration account.                                                                                                                                                                                                                                                                                                                                            |
| data                                            | type [*required*]                          | enum          | The type of the integration account resource. Always `integration-account`. Allowed enum values: `integration-account`                                                                                                                                                                                                                                                                                              |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "authentication": {
        "auth_type": "snowflake_private_key",
        "private_key_name": "my-rsa-key"
      },
      "dataflows": {
        "snowflake-account-usage-metrics": {
          "enabled": true,
          "settings": {
            "account_usage_metrics_aggregate_last_24h": false
          }
        },
        "snowflake-cloud-cost-metrics": {
          "enabled": true,
          "settings": {
            "query_tags": "env,team,cost_center"
          }
        },
        "snowflake-data-observability-quality-monitoring": {
          "enabled": true,
          "settings": {
            "do_table_crawler_cron": "0 */6 * * *",
            "sync_snowflake_system_database": true
          }
        },
        "snowflake-event-table-logs": {
          "enabled": true,
          "settings": {
            "event_table_events_enabled": true,
            "event_table_logs_enabled": true,
            "event_table_logs_interval_min": 15,
            "event_table_span_events_enabled": false,
            "event_table_spans_enabled": false
          }
        },
        "snowflake-organization-usage-metrics": {
          "enabled": true,
          "settings": {
            "organization_usage_metrics_aggregate_last_24h": false
          }
        },
        "snowflake-query-history-logs": {
          "enabled": true,
          "settings": {
            "join_query_history_with_access_history_enabled": true,
            "query_history_logs_interval_min": 15
          }
        },
        "snowflake-security-logs": {
          "enabled": true,
          "settings": {
            "security_logs_interval_min": 60
          }
        },
        "snowflake-task-history-logs": {
          "enabled": true,
          "settings": {
            "task_history_logs_interval_min": 30
          }
        }
      },
      "name": "prod-snowflake",
      "settings": {
        "snowflake_account_identifier": "myorg-myaccount",
        "username": "datadog_user"
      }
    },
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "type": "integration-account"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="404" %}
Not Found
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="422" %}
The server cannot process the request because it contains invalid data.
{% tab title="Model" %}
API error response.

| Parent field | Field                    | Type     | Description                                                                     |
| ------------ | ------------------------ | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail                   | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                     | object   | Non-standard meta-information about the error                                   |
| errors       | source                   | object   | References to the source of the error.                                          |
| source       | header                   | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter                | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer                  | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status                   | string   | Status code of the response.                                                    |
| errors       | title                    | string   | Short human-readable summary of the error.                                      |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Path parameters export account_id="CHANGE_ME" \# Curl command curl -X PATCH "https://api.datadoghq.com/api/v2/integration-interfaces/snowflake/accounts/${account_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {},
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "type": "integration-account"
  }
}
EOF 
                
{% /tab %}
