Get a Snowflake integration account
https://api.datadoghq.com/api/v2/integration-interfaces/snowflake/accounts/{account_id}https://api.us3.datadoghq.com/api/v2/integration-interfaces/snowflake/accounts/{account_id}https://api.us5.datadoghq.com/api/v2/integration-interfaces/snowflake/accounts/{account_id}https://api.datadoghq.eu/api/v2/integration-interfaces/snowflake/accounts/{account_id}https://api.ap1.datadoghq.com/api/v2/integration-interfaces/snowflake/accounts/{account_id}https://api.ap2.datadoghq.com/api/v2/integration-interfaces/snowflake/accounts/{account_id}https://api.uk1.datadoghq.com/api/v2/integration-interfaces/snowflake/accounts/{account_id}https://api.ddog-gov.com/api/v2/integration-interfaces/snowflake/accounts/{account_id}https://api.us2.ddog-gov.com/api/v2/integration-interfaces/snowflake/accounts/{account_id}Descripción general
Get a Snowflake integration account.
Argumentos
Parámetros de ruta
account_id [required]Unique identifier of the integration account.
Respuesta
OK
Response payload for a single Snowflake integration account.
data [required]Data envelope of a Snowflake integration account, including server-assigned identity.
attributes [required]Attributes of a Snowflake integration account returned in responses.
authenticationAuthentication configured on the Snowflake integration account.
<auth_type=snowflake_private_key>The RSA key pair authentication method configured on the account.
auth_type [required]The authentication method type.
snowflake_private_keysnowflake_private_keyprivate_key_name [required]Name that distinguishes this private key from other keys in Datadog.
dataflowsData Datadog collects from Snowflake, keyed by dataflow id.
snowflake-account-usage-metricsAccount-level usage metrics read from the Snowflake ACCOUNT_USAGE schema, covering storage usage, credit consumption, and query activity.
enabledWhether Datadog collects this data.
settingsSettings of the account usage metrics dataflow.
account_usage_metrics_aggregate_last_24hThe 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.
snowflake-cloud-cost-metricsCost data aggregated from the Snowflake ORGANIZATION_USAGE schema. Requires Cloud Cost Management 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.
enabledWhether Datadog collects this data.
settingsSettings of the Cloud Cost Management dataflow.
query_tagsSnowflake 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.
snowflake-data-observability-quality-monitoringData 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.
enabledWhether Datadog collects this data.
settingsSettings of the Data Observability dataflow.
do_table_crawler_cronCron expression setting how often Datadog crawls your Snowflake table metadata.
sync_snowflake_system_databaseWhether metadata from the Snowflake SNOWFLAKE system database is included in Data Observability alongside your own databases.
snowflake-event-table-logsRecords 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.
enabledWhether Datadog collects this data.
settingsSettings 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.
event_table_events_enabledWhether records with a record_type of event are collected.
event_table_logs_enabledWhether records with a record_type of log are collected.
event_table_logs_interval_minHow often event table records are collected, in minutes.
event_table_span_events_enabledWhether records with a record_type of span_event are collected.
event_table_spans_enabledWhether records with a record_type of span are collected.
snowflake-organization-usage-metricsOrganization-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.
enabledWhether Datadog collects this data.
settingsSettings of the organization usage metrics dataflow.
organization_usage_metrics_aggregate_last_24hThe 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.
snowflake-query-history-logsPer-query logs that let you identify long-running, poorly performing, and expensive queries.
enabledWhether Datadog collects this data.
settingsSettings of the query history logs dataflow.
join_query_history_with_access_history_enabledWhether 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.
query_history_logs_interval_minHow often query history logs are collected, in minutes.
snowflake-security-logsSecurity logs from the Snowflake ACCOUNT_USAGE schema, for analyzing the security of your Snowflake account and running threat detection with Cloud SIEM.
enabledWhether Datadog collects this data.
settingsSettings of the security logs dataflow.
security_logs_interval_minHow often security logs are collected, in minutes.
snowflake-task-history-logsExecution logs for your scheduled Snowflake tasks, covering start time, end time, status, and any error message.
enabledWhether Datadog collects this data.
settingsSettings of the task history logs dataflow.
task_history_logs_interval_minHow often task history logs are collected, in minutes.
name [required]Human-readable name of the Snowflake integration account.
settings [required]Settings configured on the Snowflake integration account.
snowflake_account_identifier [required]Identifier of the Snowflake account being monitored.
username [required]Snowflake user Datadog authenticates as.
id [required]Server-generated unique identifier of the Snowflake integration account.
type [required]The type of the integration account resource. Always integration-account.
integration-accountintegration-account{
"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"
}
}Bad Request
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Forbidden
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Not Found
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Too many requests
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Ejemplo de código
# Path parameters
export account_id="CHANGE_ME"
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/integration-interfaces/snowflake/accounts/${account_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export account_id="CHANGE_ME"
# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/integration-interfaces/snowflake/accounts/${account_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export account_id="CHANGE_ME"
# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/integration-interfaces/snowflake/accounts/${account_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export account_id="CHANGE_ME"
# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/integration-interfaces/snowflake/accounts/${account_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export account_id="CHANGE_ME"
# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/integration-interfaces/snowflake/accounts/${account_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export account_id="CHANGE_ME"
# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/integration-interfaces/snowflake/accounts/${account_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export account_id="CHANGE_ME"
# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/integration-interfaces/snowflake/accounts/${account_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export account_id="CHANGE_ME"
# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/integration-interfaces/snowflake/accounts/${account_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"# Path parameters
export account_id="CHANGE_ME"
# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X GET "https://api.${DD_SITE}/api/v2/integration-interfaces/snowflake/accounts/${account_id}" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"// Get a Snowflake integration account returns "OK" response
package main
import (
"context"
"encoding/json"
"fmt"
"os"
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)
func main() {
ctx := datadog.NewDefaultContext(context.Background())
ctx = context.WithValue(ctx, datadog.ContextAccessToken, os.Getenv("DD_BEARER_TOKEN"))
configuration := datadog.NewConfiguration()
configuration.SetUnstableOperationEnabled("v2.GetSnowflakeIntegrationAccount", true)
apiClient := datadog.NewAPIClient(configuration)
api := datadogV2.NewSnowflakeIntegrationApi(apiClient)
resp, r, err := api.GetSnowflakeIntegrationAccount(ctx, "account_id")
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SnowflakeIntegrationApi.GetSnowflakeIntegrationAccount`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
responseContent, _ := json.MarshalIndent(resp, "", " ")
fmt.Fprintf(os.Stdout, "Response from `SnowflakeIntegrationApi.GetSnowflakeIntegrationAccount`:\n%s\n", responseContent)
}
Instructions
First install the library and its dependencies and then save the example to main.go and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"// Get a Snowflake integration account returns "OK" response
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.SnowflakeIntegrationApi;
import com.datadog.api.client.v2.model.SnowflakeIntegrationAccountResponse;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
defaultClient.setUnstableOperationEnabled("v2.getSnowflakeIntegrationAccount", true);
SnowflakeIntegrationApi apiInstance = new SnowflakeIntegrationApi(defaultClient);
try {
SnowflakeIntegrationAccountResponse result =
apiInstance.getSnowflakeIntegrationAccount("account_id");
System.out.println(result);
} catch (ApiException e) {
System.err.println(
"Exception when calling SnowflakeIntegrationApi#getSnowflakeIntegrationAccount");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Instructions
First install the library and its dependencies and then save the example to Example.java and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java""""
Get a Snowflake integration account returns "OK" response
"""
from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.snowflake_integration_api import SnowflakeIntegrationApi
configuration = Configuration()
configuration.access_token = environ["DD_BEARER_TOKEN"]
configuration.unstable_operations["get_snowflake_integration_account"] = True
with ApiClient(configuration) as api_client:
api_instance = SnowflakeIntegrationApi(api_client)
response = api_instance.get_snowflake_integration_account(
account_id="account_id",
)
print(response)
Instructions
First install the library and its dependencies and then save the example to example.py and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"# Get a Snowflake integration account returns "OK" response
require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.access_token = ENV["DD_BEARER_TOKEN"]
config.unstable_operations["v2.get_snowflake_integration_account".to_sym] = true
end
api_instance = DatadogAPIClient::V2::SnowflakeIntegrationAPI.new
p api_instance.get_snowflake_integration_account("account_id")
Instructions
First install the library and its dependencies and then save the example to example.rb and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"// Get a Snowflake integration account returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_snowflake_integration::SnowflakeIntegrationAPI;
#[tokio::main]
async fn main() {
let mut configuration = datadog::Configuration::new();
configuration.set_unstable_operation_enabled("v2.get_snowflake_integration_account", true);
let api = SnowflakeIntegrationAPI::with_config(configuration);
let resp = api
.get_snowflake_integration_account("account_id".to_string())
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}
Instructions
First install the library and its dependencies and then save the example to src/main.rs and run following commands:
DD_SITE="datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="us3.datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="us5.datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="datadoghq.eu" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="ap1.datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="ap2.datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="uk1.datadoghq.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo runDD_SITE="us2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo run/**
* Get a Snowflake integration account returns "OK" response
*/
import { client, v2 } from "@datadog/datadog-api-client";
const configuration = client.createConfiguration({
authMethods: {
AuthZ: {
accessToken: process.env.DD_BEARER_TOKEN as string,
},
},
});
configuration.unstableOperations["v2.getSnowflakeIntegrationAccount"] = true;
const apiInstance = new v2.SnowflakeIntegrationApi(configuration);
const params: v2.SnowflakeIntegrationApiGetSnowflakeIntegrationAccountRequest =
{
accountId: "account_id",
};
apiInstance
.getSnowflakeIntegrationAccount(params)
.then((data: v2.SnowflakeIntegrationAccountResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
Instructions
First install the library and its dependencies and then save the example to example.ts and run following commands:
DD_SITE="datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="us3.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="us5.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="datadoghq.eu" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="ap1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="ap2.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="uk1.datadoghq.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"DD_SITE="us2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"