Databricks 통합 계정 확보하기

Note: This endpoint is in preview and is subject to change. If you have any feedback, contact Datadog support.

GET https://api.ap1.datadoghq.com/api/v2/integration-interfaces/databricks/accounts/{account_id}https://api.ap2.datadoghq.com/api/v2/integration-interfaces/databricks/accounts/{account_id}https://api.datadoghq.eu/api/v2/integration-interfaces/databricks/accounts/{account_id}https://api.ddog-gov.com/api/v2/integration-interfaces/databricks/accounts/{account_id}https://api.us2.ddog-gov.com/api/v2/integration-interfaces/databricks/accounts/{account_id}https://api.uk1.datadoghq.com/api/v2/integration-interfaces/databricks/accounts/{account_id}https://api.datadoghq.com/api/v2/integration-interfaces/databricks/accounts/{account_id}https://api.us3.datadoghq.com/api/v2/integration-interfaces/databricks/accounts/{account_id}https://api.us5.datadoghq.com/api/v2/integration-interfaces/databricks/accounts/{account_id}

개요

Get a Databricks integration account. This endpoint requires the integrations_read permission.

인수

경로 파라미터

이름

유형

설명

account_id [required]

string

Unique identifier of the integration account.

응답

OK

Response payload for a single Databricks integration account.

Expand All

항목

유형

설명

data [required]

object

Data envelope of a Databricks integration account, including server-assigned identity.

attributes [required]

object

Attributes of a Databricks integration account returned in responses.

authentication

 <oneOf>

Authentication configured on the Databricks integration account. A bearer_token method indicates an account still on token authentication, which Databricks accepts only on accounts that already use it.

<auth_type=databricks_oauth>

object

The Databricks OAuth authentication method and service principal configured on the account.

auth_type [required]

enum

The authentication method type. Allowed enum values: databricks_oauth

default: databricks_oauth

azure_tenant_id

string

Microsoft Entra ID tenant of the service principal, for Azure Databricks workspaces.

client_id [required]

string

Client ID of the Databricks service principal.

<auth_type=private_action_runner>

object

The Private Action Runner authentication method configured on the account.

auth_type [required]

enum

The authentication method type. Allowed enum values: private_action_runner

default: private_action_runner

connection_id [required]

uuid

Unique identifier of the Private Action Runner connection holding the credentials.

secret_path

string

Path of the credential inside the secret backend configured on the runner.

user_uuid [required]

uuid

Unique identifier of the user the Private Action Runner connection belongs to.

<auth_type=bearer_token>

object

The bearer token authentication method configured on the account.

auth_type [required]

enum

The authentication method type. Allowed enum values: bearer_token

default: bearer_token

dataflows

object

Data Datadog collects from Databricks, keyed by dataflow id.

databricks-cloud-cost-metrics

object

Cost data collected from your Databricks system tables. Requires Cloud Cost Management to be set up for your organization.

enabled

boolean

Whether Datadog collects this data.

settings

object

Settings of the Cloud Cost Management dataflow.

ccm_collect_all_workspaces

boolean

Whether cost data is collected for every workspace in the Databricks account rather than this workspace only. This takes effect across the Databricks account: if any one workspace enables it, Datadog collects cost data for all of them regardless of their individual settings, and every covered workspace incurs Cloud Cost Management charges.

databricks-data-observability-jobs-monitoring

object

Data Jobs Monitoring, which collects performance, reliability, and cost data for your Databricks jobs.

enabled

boolean

Whether Datadog collects this data.

settings

object

Settings of the Data Jobs Monitoring dataflow.

dd_api_key_id

string

ID of the Datadog API key the global init script uses to submit data.

djm_global_init_script_enabled

boolean

Whether Datadog installs and manages the Agent on your Databricks clusters through a global init script. The script does not apply to clusters in Standard access mode. When false, the Agent is installed manually.

script_gpum_enabled

boolean

Whether GPU metrics are collected from your Databricks clusters. The Agent installed by the global init script performs the collection, so this requires the dataflow to be enabled with djm_global_init_script_enabled set to true.

script_logs_enabled

boolean

Whether driver and worker logs are collected from your Databricks clusters. The Agent installed by the global init script performs the collection, so this requires the dataflow to be enabled with djm_global_init_script_enabled set to true.

serverless_jobs_enabled

boolean

Whether health and cost data is collected for jobs running on Serverless or SQL Warehouse compute. This compute has no clusters for the global init script to target, so collection reads the Databricks system tables and requires system_tables_sql_warehouse_id.

databricks-data-observability-quality-monitoring

object

Data Observability, which collects lineage and data quality information from your Databricks catalogs so you can explore how data flows and detect, resolve, and prevent quality issues.

enabled

boolean

Whether Datadog collects this data.

settings

object

Settings of the Data Observability dataflow.

do_crawlers_cron

string

Cron expression setting how often Datadog connects to your Databricks warehouse to collect metadata. Currently, only hourly (0 * * * *) and daily (0 0 * * *) are supported.

sync_system_catalog

boolean

Whether metadata from the Databricks system catalog is included in Data Observability alongside your data catalogs.

databricks-model-serving-metrics

object

Health and usage metrics for your Databricks model serving endpoints. Not supported on accounts that authenticate with private_action_runner; on those accounts this dataflow collects no data.

enabled

boolean

Whether Datadog collects this data.

name [required]

string

Human-readable name of the Databricks integration account.

settings [required]

object

Settings configured on the Databricks integration account.

system_tables_sql_warehouse_id

string

ID of the SQL warehouse used to query the Databricks system tables.

workspace_url [required]

string

URL of the Databricks workspace.

id [required]

string

Server-generated unique identifier of the Databricks integration account.

type [required]

enum

The type of the integration account resource. Always integration-account. Allowed enum values: integration-account

default: integration-account

{
  "data": {
    "attributes": {
      "authentication": {
        "auth_type": "databricks_oauth",
        "azure_tenant_id": "4d3bac44-0230-4732-9e70-cc00736f0a97",
        "client_id": "5c10654a-b3a3-4840-b37f-f477590c70a0"
      },
      "dataflows": {
        "databricks-cloud-cost-metrics": {
          "enabled": true,
          "settings": {
            "ccm_collect_all_workspaces": true
          }
        },
        "databricks-data-observability-jobs-monitoring": {
          "enabled": true,
          "settings": {
            "dd_api_key_id": "fe383f4e-09fc-46bf-8e10-4efdd453a646",
            "djm_global_init_script_enabled": true,
            "script_gpum_enabled": true,
            "script_logs_enabled": true,
            "serverless_jobs_enabled": true
          }
        },
        "databricks-data-observability-quality-monitoring": {
          "enabled": true,
          "settings": {
            "do_crawlers_cron": "0 * * * *",
            "sync_system_catalog": true
          }
        },
        "databricks-model-serving-metrics": {
          "enabled": true
        }
      },
      "name": "My Databricks Workspace",
      "settings": {
        "system_tables_sql_warehouse_id": "aba7c023d4172910",
        "workspace_url": "https://dbc-1234abcd.cloud.databricks.com"
      }
    },
    "id": "a9a69c2e-4f8d-4e42-9c1a-2a7a2d3b7c6f",
    "type": "integration-account"
  }
}

Bad Request

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

항목

유형

설명

errors [required]

[string]

A list of errors.

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

코드 예시

                  # Path parameters
export account_id="CHANGE_ME"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

# Curl command
curl -X GET "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.us2.ddog-gov.com"https://api.uk1.datadoghq.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/integration-interfaces/databricks/accounts/${account_id}" \ -H "Accept: application/json" \ -H "Authorization: Bearer ${DD_BEARER_TOKEN}"
"""
Get a Databricks integration account returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.databricks_integration_api import DatabricksIntegrationApi

configuration = Configuration()
configuration.access_token = environ["DD_BEARER_TOKEN"]
configuration.unstable_operations["get_databricks_integration_account"] = True
with ApiClient(configuration) as api_client:
    api_instance = DatabricksIntegrationApi(api_client)
    response = api_instance.get_databricks_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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" python3 "example.py"
# Get a Databricks 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_databricks_integration_account".to_sym] = true
end
api_instance = DatadogAPIClient::V2::DatabricksIntegrationAPI.new
p api_instance.get_databricks_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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" rb "example.rb"
// Get a Databricks 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.GetDatabricksIntegrationAccount", true)
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewDatabricksIntegrationApi(apiClient)
	resp, r, err := api.GetDatabricksIntegrationAccount(ctx, "account_id")

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `DatabricksIntegrationApi.GetDatabricksIntegrationAccount`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `DatabricksIntegrationApi.GetDatabricksIntegrationAccount`:\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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" go run "main.go"
// Get a Databricks integration account returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.DatabricksIntegrationApi;
import com.datadog.api.client.v2.model.DatabricksIntegrationAccountResponse;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    defaultClient.setAccessToken(System.getenv("DD_BEARER_TOKEN"));
    defaultClient.setUnstableOperationEnabled("v2.getDatabricksIntegrationAccount", true);
    DatabricksIntegrationApi apiInstance = new DatabricksIntegrationApi(defaultClient);

    try {
      DatabricksIntegrationAccountResponse result =
          apiInstance.getDatabricksIntegrationAccount("account_id");
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println(
          "Exception when calling DatabricksIntegrationApi#getDatabricksIntegrationAccount");
      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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" java "Example.java"
// Get a Databricks integration account returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_databricks_integration::DatabricksIntegrationAPI;

#[tokio::main]
async fn main() {
    let mut configuration = datadog::Configuration::new();
    configuration.set_unstable_operation_enabled("v2.GetDatabricksIntegrationAccount", true);
    let api = DatabricksIntegrationAPI::with_config(configuration);
    let resp = api
        .get_databricks_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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_API_KEY="<API-KEY>" DD_APP_KEY="<APP-KEY>" cargo run
/**
 * Get a Databricks 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.getDatabricksIntegrationAccount"] = true;
const apiInstance = new v2.DatabricksIntegrationApi(configuration);

const params: v2.DatabricksIntegrationApiGetDatabricksIntegrationAccountRequest =
  {
    accountId: "account_id",
  };

apiInstance
  .getDatabricksIntegrationAccount(params)
  .then((data: v2.DatabricksIntegrationAccountResponse) => {
    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.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com" DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>" tsc "example.ts"