From f9c26c17adb0be38fb228dfc619e61a48a97ed39 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 23 Sep 2026 13:31:23 +0000 Subject: [PATCH] Regenerate client from commit 76326c8 of spec repo --- .generator/schemas/v2/openapi.yaml | 919 ++++++++++++++++++ .../CreateDatabricksIntegrationAccount.rb | 56 ++ .../DeleteDatabricksIntegrationAccount.rb | 8 + .../GetDatabricksIntegrationAccount.rb | 8 + .../ListDatabricksIntegrationAccounts.rb | 8 + .../UpdateDatabricksIntegrationAccount.rb | 57 ++ features/scenarios_model_mapping.rb | 13 + features/v2/databricks_integration.feature | 148 +++ features/v2/rum_replay_heatmaps.feature | 8 +- features/v2/rum_replay_playlists.feature | 20 +- features/v2/rum_replay_sessions.feature | 2 +- features/v2/rum_replay_viewership.feature | 8 +- features/v2/undo.json | 37 + lib/datadog_api_client/configuration.rb | 5 + lib/datadog_api_client/inflector.rb | 44 + .../v2/api/databricks_integration_api.rb | 385 ++++++++ ...st_metrics_integration_dataflow_request.rb | 90 ++ ...t_metrics_integration_dataflow_response.rb | 115 +++ ...s_integration_dataflow_settings_request.rb | 80 ++ ..._integration_dataflow_settings_response.rb | 105 ++ ...monitoring_integration_dataflow_request.rb | 90 ++ ...onitoring_integration_dataflow_response.rb | 115 +++ ...g_integration_dataflow_settings_request.rb | 130 +++ ..._integration_dataflow_settings_response.rb | 145 +++ ...monitoring_integration_dataflow_request.rb | 90 ++ ...onitoring_integration_dataflow_response.rb | 115 +++ ...g_integration_dataflow_settings_request.rb | 90 ++ ..._integration_dataflow_settings_response.rb | 115 +++ ...egration_account_authentication_request.rb | 63 ++ ...gration_account_authentication_response.rb | 64 ++ ...tegration_account_authentication_update.rb | 64 ++ ...tion_account_bearer_token_auth_response.rb | 123 +++ ...egration_account_bearer_token_auth_type.rb | 26 + ...ration_account_bearer_token_auth_update.rb | 108 ++ ...s_integration_account_create_attributes.rb | 175 ++++ ...abricks_integration_account_create_data.rb | 144 +++ ...icks_integration_account_create_request.rb | 123 +++ ...integration_account_o_auth_auth_request.rb | 150 +++ ...ntegration_account_o_auth_auth_response.rb | 154 +++ ...ks_integration_account_o_auth_auth_type.rb | 26 + ..._integration_account_o_auth_auth_update.rb | 136 +++ ...ount_private_action_runner_auth_request.rb | 150 +++ ...unt_private_action_runner_auth_response.rb | 175 ++++ ...account_private_action_runner_auth_type.rb | 26 + ...count_private_action_runner_auth_update.rb | 136 +++ ...databricks_integration_account_response.rb | 123 +++ ...integration_account_response_attributes.rb | 164 ++++ ...ricks_integration_account_response_data.rb | 165 ++++ ...ks_integration_account_settings_request.rb | 108 ++ ...s_integration_account_settings_response.rb | 133 +++ ...cks_integration_account_settings_update.rb | 90 ++ ...s_integration_account_update_attributes.rb | 135 +++ ...abricks_integration_account_update_data.rb | 165 ++++ ...icks_integration_account_update_request.rb | 123 +++ ...atabricks_integration_accounts_response.rb | 125 +++ ...atabricks_integration_dataflows_request.rb | 110 +++ ...tabricks_integration_dataflows_response.rb | 135 +++ ...ng_metrics_integration_dataflow_request.rb | 80 ++ ...g_metrics_integration_dataflow_response.rb | 105 ++ 59 files changed, 6591 insertions(+), 19 deletions(-) create mode 100644 examples/v2/databricks-integration/CreateDatabricksIntegrationAccount.rb create mode 100644 examples/v2/databricks-integration/DeleteDatabricksIntegrationAccount.rb create mode 100644 examples/v2/databricks-integration/GetDatabricksIntegrationAccount.rb create mode 100644 examples/v2/databricks-integration/ListDatabricksIntegrationAccounts.rb create mode 100644 examples/v2/databricks-integration/UpdateDatabricksIntegrationAccount.rb create mode 100644 features/v2/databricks_integration.feature create mode 100644 lib/datadog_api_client/v2/api/databricks_integration_api.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_cloud_cost_metrics_integration_dataflow_request.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_cloud_cost_metrics_integration_dataflow_response.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_cloud_cost_metrics_integration_dataflow_settings_request.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_cloud_cost_metrics_integration_dataflow_settings_response.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_data_observability_jobs_monitoring_integration_dataflow_request.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_data_observability_jobs_monitoring_integration_dataflow_response.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_data_observability_jobs_monitoring_integration_dataflow_settings_request.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_data_observability_jobs_monitoring_integration_dataflow_settings_response.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_data_observability_quality_monitoring_integration_dataflow_request.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_data_observability_quality_monitoring_integration_dataflow_response.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_data_observability_quality_monitoring_integration_dataflow_settings_request.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_data_observability_quality_monitoring_integration_dataflow_settings_response.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_account_authentication_request.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_account_authentication_response.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_account_authentication_update.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_account_bearer_token_auth_response.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_account_bearer_token_auth_type.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_account_bearer_token_auth_update.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_account_create_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_account_create_data.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_account_create_request.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_account_o_auth_auth_request.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_account_o_auth_auth_response.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_account_o_auth_auth_type.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_account_o_auth_auth_update.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_account_private_action_runner_auth_request.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_account_private_action_runner_auth_response.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_account_private_action_runner_auth_type.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_account_private_action_runner_auth_update.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_account_response.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_account_response_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_account_response_data.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_account_settings_request.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_account_settings_response.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_account_settings_update.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_account_update_attributes.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_account_update_data.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_account_update_request.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_accounts_response.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_dataflows_request.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_integration_dataflows_response.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_model_serving_metrics_integration_dataflow_request.rb create mode 100644 lib/datadog_api_client/v2/models/databricks_model_serving_metrics_integration_dataflow_response.rb diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index fdafbd6b9d51..accb43f9843d 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -32063,6 +32063,618 @@ components: required: - databaseMonitoringTrigger type: object + DatabricksCloudCostMetricsIntegrationDataflowRequest: + additionalProperties: false + description: >- + Cost data collected from your Databricks system tables. [Cloud Cost Management](https://docs.datadoghq.com/cloud_cost_management/) must be enabled for your organization while this dataflow is on; any request that leaves it enabled without that is rejected with a `422` response. + properties: + enabled: + description: Whether Datadog collects this data. Defaults to `false`; set to `true` to start collection. + example: true + type: boolean + settings: + $ref: "#/components/schemas/DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest" + type: object + DatabricksCloudCostMetricsIntegrationDataflowResponse: + description: >- + Cost data collected from your Databricks system tables. Requires [Cloud Cost Management](https://docs.datadoghq.com/cloud_cost_management/) to be set up for your organization. + properties: + enabled: + description: Whether Datadog collects this data. + example: true + type: boolean + settings: + $ref: "#/components/schemas/DatabricksCloudCostMetricsIntegrationDataflowSettingsResponse" + type: object + DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest: + additionalProperties: false + description: Settings of the Cloud Cost Management dataflow. Only the fields provided are changed. + properties: + ccm_collect_all_workspaces: + description: >- + 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. Defaults to `true`. + example: true + type: boolean + type: object + DatabricksCloudCostMetricsIntegrationDataflowSettingsResponse: + description: Settings of the Cloud Cost Management dataflow. + properties: + ccm_collect_all_workspaces: + description: >- + 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. + example: true + type: boolean + type: object + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest: + additionalProperties: false + description: >- + Data Jobs Monitoring, which collects performance, reliability, and cost data for your Databricks jobs. + properties: + enabled: + description: Whether Datadog collects this data. Defaults to `true`; set to `false` to stop collection. + example: true + type: boolean + settings: + $ref: "#/components/schemas/DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest" + type: object + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowResponse: + description: >- + Data Jobs Monitoring, which collects performance, reliability, and cost data for your Databricks jobs. + properties: + enabled: + description: Whether Datadog collects this data. + example: true + type: boolean + settings: + $ref: "#/components/schemas/DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse" + type: object + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest: + additionalProperties: false + description: Settings of the Data Jobs Monitoring dataflow. Only the fields provided are changed. + properties: + dd_api_key_id: + description: >- + ID of the Datadog API key the global init script uses to submit data. Setting or changing it requires `dd_api_key_secret` in the same request. + example: fe383f4e-09fc-46bf-8e10-4efdd453a646 + type: string + dd_api_key_secret: + description: Secret value of the Datadog API key identified by `dd_api_key_id`. + example: your-datadog-api-key + type: string + writeOnly: true + djm_global_init_script_enabled: + description: >- + Whether Datadog installs and manages the Agent on your Databricks clusters through a global init script. Installation can take up to 15 minutes and requires Databricks Workspace Admin permissions. The script does not apply to clusters in Standard access mode. Leave this `false` to install the Agent yourself. Defaults to `false`. + example: true + type: boolean + script_gpum_enabled: + description: >- + 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`. Defaults to `false`. + example: true + type: boolean + script_logs_enabled: + description: >- + 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`. Defaults to `false`. + example: true + type: boolean + serverless_jobs_enabled: + description: >- + 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`. Defaults to `true`. + example: true + type: boolean + type: object + DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse: + description: Settings of the Data Jobs Monitoring dataflow. + properties: + dd_api_key_id: + description: ID of the Datadog API key the global init script uses to submit data. + example: fe383f4e-09fc-46bf-8e10-4efdd453a646 + type: string + djm_global_init_script_enabled: + description: >- + 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. + example: true + type: boolean + script_gpum_enabled: + description: >- + 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`. + example: true + type: boolean + script_logs_enabled: + description: >- + 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`. + example: true + type: boolean + serverless_jobs_enabled: + description: >- + 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`. + example: true + type: boolean + type: object + DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest: + additionalProperties: false + description: >- + 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. + properties: + enabled: + description: Whether Datadog collects this data. Defaults to `false`; set to `true` to start collection. + example: true + type: boolean + settings: + $ref: "#/components/schemas/DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest" + type: object + DatabricksDataObservabilityQualityMonitoringIntegrationDataflowResponse: + description: >- + 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. + properties: + enabled: + description: Whether Datadog collects this data. + example: true + type: boolean + settings: + $ref: "#/components/schemas/DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse" + type: object + DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest: + additionalProperties: false + description: Settings of the Data Observability dataflow. Only the fields provided are changed. + properties: + do_crawlers_cron: + description: >- + Cron expression setting how often Datadog connects to your Databricks warehouse to collect metadata. Currently, only hourly (`0 * * * *`) and daily (`0 0 * * *`) are supported. Defaults to hourly (`0 * * * *`). + example: "0 * * * *" + type: string + sync_system_catalog: + description: >- + Whether metadata from the Databricks `system` catalog is included in Data Observability alongside your data catalogs. Defaults to `false`. + example: true + type: boolean + type: object + DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse: + description: Settings of the Data Observability dataflow. + properties: + do_crawlers_cron: + description: >- + Cron expression setting how often Datadog connects to your Databricks warehouse to collect metadata. Currently, only hourly (`0 * * * *`) and daily (`0 0 * * *`) are supported. + example: "0 * * * *" + type: string + sync_system_catalog: + description: >- + Whether metadata from the Databricks `system` catalog is included in Data Observability alongside your data catalogs. + example: true + type: boolean + type: object + DatabricksIntegrationAccountAuthenticationRequest: + description: >- + Authentication for creating the Databricks integration account. Exactly one method is set. Choosing `private_action_runner` leaves the `databricks-model-serving-metrics` dataflow unable to collect data. `bearer_token` is not available on creation: Databricks accepts it only on accounts that already use it, so it can only appear on read and update. + oneOf: + - $ref: "#/components/schemas/DatabricksIntegrationAccountOAuthAuthRequest" + - $ref: "#/components/schemas/DatabricksIntegrationAccountPrivateActionRunnerAuthRequest" + DatabricksIntegrationAccountAuthenticationResponse: + description: >- + 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. + oneOf: + - $ref: "#/components/schemas/DatabricksIntegrationAccountOAuthAuthResponse" + - $ref: "#/components/schemas/DatabricksIntegrationAccountPrivateActionRunnerAuthResponse" + - $ref: "#/components/schemas/DatabricksIntegrationAccountBearerTokenAuthResponse" + DatabricksIntegrationAccountAuthenticationUpdate: + description: >- + Authentication for updating the Databricks integration account. Exactly one method is set. Choosing `private_action_runner` leaves the `databricks-model-serving-metrics` dataflow unable to collect data. `bearer_token` is deprecated on Databricks: it is accepted only on accounts that already use it and never on creation, so it cannot move an account onto token authentication. Migrate those accounts to `databricks_oauth` or `private_action_runner`. + oneOf: + - $ref: "#/components/schemas/DatabricksIntegrationAccountOAuthAuthUpdate" + - $ref: "#/components/schemas/DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate" + - $ref: "#/components/schemas/DatabricksIntegrationAccountBearerTokenAuthUpdate" + DatabricksIntegrationAccountBearerTokenAuthResponse: + description: The bearer token authentication method configured on the account. + properties: + auth_type: + $ref: "#/components/schemas/DatabricksIntegrationAccountBearerTokenAuthType" + required: + - auth_type + type: object + DatabricksIntegrationAccountBearerTokenAuthType: + default: bearer_token + description: The authentication method type. + enum: + - bearer_token + example: bearer_token + type: string + x-enum-varnames: + - BEARER_TOKEN + DatabricksIntegrationAccountBearerTokenAuthUpdate: + additionalProperties: false + description: >- + Bearer token authentication. The credential is a single opaque secret, a Databricks personal access token, with no accompanying non-secret identifier. The method is deprecated: Databricks accepts it only on accounts that already use it, and never on creation. Only the fields provided are changed; omit `token` to keep the stored one. + properties: + auth_type: + $ref: "#/components/schemas/DatabricksIntegrationAccountBearerTokenAuthType" + token: + description: Secret token used to authenticate with Databricks. + example: your-token + type: string + writeOnly: true + required: + - auth_type + type: object + DatabricksIntegrationAccountCreateAttributes: + description: Writable attributes used to create a Databricks integration account. + properties: + authentication: + $ref: "#/components/schemas/DatabricksIntegrationAccountAuthenticationRequest" + dataflows: + $ref: "#/components/schemas/DatabricksIntegrationDataflowsRequest" + name: + description: Human-readable name of the Databricks integration account. + example: My Databricks Workspace + type: string + settings: + $ref: "#/components/schemas/DatabricksIntegrationAccountSettingsRequest" + required: + - name + - authentication + - settings + type: object + DatabricksIntegrationAccountCreateData: + description: Data envelope for creating a Databricks integration account. + properties: + attributes: + $ref: "#/components/schemas/DatabricksIntegrationAccountCreateAttributes" + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - type + - attributes + type: object + DatabricksIntegrationAccountCreateRequest: + description: Request payload to create a Databricks integration account. + properties: + data: + $ref: "#/components/schemas/DatabricksIntegrationAccountCreateData" + required: + - data + type: object + DatabricksIntegrationAccountOAuthAuthRequest: + additionalProperties: false + description: >- + Databricks OAuth machine-to-machine authentication using a service principal. + properties: + auth_type: + $ref: "#/components/schemas/DatabricksIntegrationAccountOAuthAuthType" + azure_tenant_id: + description: Microsoft Entra ID tenant of the service principal, for Azure Databricks workspaces. + example: 4d3bac44-0230-4732-9e70-cc00736f0a97 + type: string + client_id: + description: Client ID of the Databricks service principal. + example: 5c10654a-b3a3-4840-b37f-f477590c70a0 + type: string + client_secret: + description: >- + Secret of the Databricks service principal. Generate it under User management > Service principals > Credentials & secrets in Databricks. + example: your-client-secret + type: string + writeOnly: true + required: + - auth_type + - client_id + - client_secret + type: object + DatabricksIntegrationAccountOAuthAuthResponse: + description: The Databricks OAuth authentication method and service principal configured on the account. + properties: + auth_type: + $ref: "#/components/schemas/DatabricksIntegrationAccountOAuthAuthType" + azure_tenant_id: + description: Microsoft Entra ID tenant of the service principal, for Azure Databricks workspaces. + example: 4d3bac44-0230-4732-9e70-cc00736f0a97 + type: string + client_id: + description: Client ID of the Databricks service principal. + example: 5c10654a-b3a3-4840-b37f-f477590c70a0 + type: string + required: + - auth_type + - client_id + type: object + DatabricksIntegrationAccountOAuthAuthType: + default: databricks_oauth + description: The authentication method type. + enum: + - databricks_oauth + example: databricks_oauth + type: string + x-enum-varnames: + - DATABRICKS_OAUTH + DatabricksIntegrationAccountOAuthAuthUpdate: + additionalProperties: false + description: >- + Databricks OAuth machine-to-machine authentication using a service principal. Only the fields provided are changed; omit `client_secret` to keep the stored one. + properties: + auth_type: + $ref: "#/components/schemas/DatabricksIntegrationAccountOAuthAuthType" + azure_tenant_id: + description: >- + Microsoft Entra ID tenant of the service principal, for Azure Databricks workspaces. Omit it to keep the stored tenant, send `null` or an empty string to remove it, or send a value to replace it. + example: 4d3bac44-0230-4732-9e70-cc00736f0a97 + nullable: true + type: string + client_id: + description: Client ID of the Databricks service principal. + example: 5c10654a-b3a3-4840-b37f-f477590c70a0 + type: string + client_secret: + description: >- + Secret of the Databricks service principal. Generate it under User management > Service principals > Credentials & secrets in Databricks. + example: your-client-secret + type: string + writeOnly: true + required: + - auth_type + type: object + DatabricksIntegrationAccountPrivateActionRunnerAuthRequest: + additionalProperties: false + description: >- + Private Action Runner authentication. The runner holds the Databricks credentials, so this method carries no secrets. + properties: + auth_type: + $ref: "#/components/schemas/DatabricksIntegrationAccountPrivateActionRunnerAuthType" + connection_id: + description: Unique identifier of the Private Action Runner connection holding the credentials. + example: 08356fb7-3ae3-4ea2-913e-b4cb1b7e7ec2 + format: uuid + type: string + secret_path: + description: >- + Path of the credential inside the secret backend configured on the runner. + example: /vault/databricks/prod + type: string + user_uuid: + description: Unique identifier of the user the Private Action Runner connection belongs to. + example: ac470ea4-aa08-11f0-994d-da9212322ca2 + format: uuid + type: string + required: + - auth_type + - connection_id + - user_uuid + type: object + DatabricksIntegrationAccountPrivateActionRunnerAuthResponse: + description: The Private Action Runner authentication method configured on the account. + properties: + auth_type: + $ref: "#/components/schemas/DatabricksIntegrationAccountPrivateActionRunnerAuthType" + connection_id: + description: Unique identifier of the Private Action Runner connection holding the credentials. + example: 08356fb7-3ae3-4ea2-913e-b4cb1b7e7ec2 + type: string + secret_path: + description: Path of the credential inside the secret backend configured on the runner. + example: /vault/databricks/prod + type: string + user_uuid: + description: Unique identifier of the user the Private Action Runner connection belongs to. + example: ac470ea4-aa08-11f0-994d-da9212322ca2 + type: string + required: + - auth_type + - connection_id + - user_uuid + type: object + DatabricksIntegrationAccountPrivateActionRunnerAuthType: + default: private_action_runner + description: The authentication method type. + enum: + - private_action_runner + example: private_action_runner + type: string + x-enum-varnames: + - PRIVATE_ACTION_RUNNER + DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate: + additionalProperties: false + description: >- + Private Action Runner authentication. The runner holds the Databricks credentials, so this method carries no secrets. Only the fields provided are changed. + properties: + auth_type: + $ref: "#/components/schemas/DatabricksIntegrationAccountPrivateActionRunnerAuthType" + connection_id: + description: Unique identifier of the Private Action Runner connection holding the credentials. + example: 08356fb7-3ae3-4ea2-913e-b4cb1b7e7ec2 + format: uuid + type: string + secret_path: + description: >- + Path of the credential inside the secret backend configured on the runner. Omit it to keep the stored path, send `null` or an empty string to remove it, or send a value to replace it. + example: /vault/databricks/prod + nullable: true + type: string + user_uuid: + description: Unique identifier of the user the Private Action Runner connection belongs to. + example: ac470ea4-aa08-11f0-994d-da9212322ca2 + format: uuid + type: string + required: + - auth_type + type: object + DatabricksIntegrationAccountResponse: + description: Response payload for a single Databricks integration account. + properties: + data: + $ref: "#/components/schemas/DatabricksIntegrationAccountResponseData" + required: + - data + type: object + DatabricksIntegrationAccountResponseAttributes: + description: Attributes of a Databricks integration account returned in responses. + properties: + authentication: + $ref: "#/components/schemas/DatabricksIntegrationAccountAuthenticationResponse" + dataflows: + $ref: "#/components/schemas/DatabricksIntegrationDataflowsResponse" + name: + description: Human-readable name of the Databricks integration account. + example: My Databricks Workspace + type: string + settings: + $ref: "#/components/schemas/DatabricksIntegrationAccountSettingsResponse" + required: + - name + - settings + type: object + DatabricksIntegrationAccountResponseData: + description: Data envelope of a Databricks integration account, including server-assigned identity. + properties: + attributes: + $ref: "#/components/schemas/DatabricksIntegrationAccountResponseAttributes" + id: + description: Server-generated unique identifier of the Databricks integration account. + example: a9a69c2e-4f8d-4e42-9c1a-2a7a2d3b7c6f + readOnly: true + type: string + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - id + - attributes + - type + type: object + DatabricksIntegrationAccountSettingsRequest: + additionalProperties: false + description: Settings for creating the Databricks integration account. + properties: + system_tables_sql_warehouse_id: + description: >- + ID of the SQL warehouse used to query the Databricks system tables. Find it at the end of the HTTP Path under Warehouses > Connection Details in the Databricks console. Required when the cloud cost metrics or the Data Observability dataflow is enabled, or when `serverless_jobs_enabled` is on; since serverless jobs are on unless explicitly disabled, omitting this field otherwise causes the request to be rejected with a `422` response. + example: aba7c023d4172910 + type: string + workspace_url: + description: URL of the Databricks workspace. + example: "https://dbc-1234abcd.cloud.databricks.com" + type: string + required: + - workspace_url + type: object + DatabricksIntegrationAccountSettingsResponse: + description: Settings configured on the Databricks integration account. + properties: + system_tables_sql_warehouse_id: + description: ID of the SQL warehouse used to query the Databricks system tables. + example: aba7c023d4172910 + type: string + workspace_url: + description: URL of the Databricks workspace. + example: "https://dbc-1234abcd.cloud.databricks.com" + type: string + required: + - workspace_url + type: object + DatabricksIntegrationAccountSettingsUpdate: + additionalProperties: false + description: Settings for updating the Databricks integration account. Only the fields provided are changed. + properties: + system_tables_sql_warehouse_id: + description: >- + ID of the SQL warehouse used to query the Databricks system tables. Find it at the end of the HTTP Path under Warehouses > Connection Details in the Databricks console. Required once the cloud cost metrics or the Data Observability dataflow is enabled, or while `serverless_jobs_enabled` is on; an update that leaves the account without one is rejected with a `422` response. + example: aba7c023d4172910 + type: string + workspace_url: + description: URL of the Databricks workspace. + example: "https://dbc-1234abcd.cloud.databricks.com" + type: string + type: object + DatabricksIntegrationAccountUpdateAttributes: + description: >- + Writable attributes used to update a Databricks 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`. + properties: + authentication: + $ref: "#/components/schemas/DatabricksIntegrationAccountAuthenticationUpdate" + dataflows: + $ref: "#/components/schemas/DatabricksIntegrationDataflowsRequest" + name: + description: Human-readable name of the Databricks integration account. + example: My Databricks Workspace + type: string + settings: + $ref: "#/components/schemas/DatabricksIntegrationAccountSettingsUpdate" + type: object + DatabricksIntegrationAccountUpdateData: + description: Data envelope for updating a Databricks integration account. + properties: + attributes: + $ref: "#/components/schemas/DatabricksIntegrationAccountUpdateAttributes" + id: + description: Unique identifier of the Databricks integration account to update. + example: a9a69c2e-4f8d-4e42-9c1a-2a7a2d3b7c6f + type: string + type: + $ref: "#/components/schemas/IntegrationAccountType" + required: + - id + - type + - attributes + type: object + DatabricksIntegrationAccountUpdateRequest: + description: Request payload to update a Databricks integration account. + properties: + data: + $ref: "#/components/schemas/DatabricksIntegrationAccountUpdateData" + required: + - data + type: object + DatabricksIntegrationAccountsResponse: + description: Response payload for a list of Databricks integration accounts. + properties: + data: + description: List of Databricks integration accounts. + items: + $ref: "#/components/schemas/DatabricksIntegrationAccountResponseData" + type: array + required: + - data + type: object + DatabricksIntegrationDataflowsRequest: + additionalProperties: false + description: >- + Data Datadog collects from Databricks, 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. Some dataflows have prerequisites, noted on each; unless one is documented as rejecting the request, it is not verified, so a dataflow enabled without it is stored but collects no data. + properties: + databricks-cloud-cost-metrics: + $ref: "#/components/schemas/DatabricksCloudCostMetricsIntegrationDataflowRequest" + databricks-data-observability-jobs-monitoring: + $ref: "#/components/schemas/DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest" + databricks-data-observability-quality-monitoring: + $ref: "#/components/schemas/DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest" + databricks-model-serving-metrics: + $ref: "#/components/schemas/DatabricksModelServingMetricsIntegrationDataflowRequest" + type: object + DatabricksIntegrationDataflowsResponse: + description: Data Datadog collects from Databricks, keyed by dataflow id. + properties: + databricks-cloud-cost-metrics: + $ref: "#/components/schemas/DatabricksCloudCostMetricsIntegrationDataflowResponse" + databricks-data-observability-jobs-monitoring: + $ref: "#/components/schemas/DatabricksDataObservabilityJobsMonitoringIntegrationDataflowResponse" + databricks-data-observability-quality-monitoring: + $ref: "#/components/schemas/DatabricksDataObservabilityQualityMonitoringIntegrationDataflowResponse" + databricks-model-serving-metrics: + $ref: "#/components/schemas/DatabricksModelServingMetricsIntegrationDataflowResponse" + type: object + DatabricksModelServingMetricsIntegrationDataflowRequest: + additionalProperties: false + description: >- + 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. + properties: + enabled: + description: Whether Datadog collects this data. Defaults to `false`; set to `true` to start collection. + example: true + type: boolean + type: object + DatabricksModelServingMetricsIntegrationDataflowResponse: + description: >- + 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. + properties: + enabled: + description: Whether Datadog collects this data. + example: true + type: boolean + type: object DatadogAPIKey: description: The definition of the `DatadogAPIKey` object. properties: @@ -165741,6 +166353,304 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/integration-interfaces/databricks/accounts: + get: + description: List Databricks integration accounts. + operationId: ListDatabricksIntegrationAccounts + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + authentication: + auth_type: databricks_oauth + 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: false + 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: false + 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 + schema: + $ref: "#/components/schemas/DatabricksIntegrationAccountsResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: List Databricks integration accounts + tags: + - Databricks Integration + "x-permission": + operator: OR + permissions: + - integrations_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Create a Databricks integration account. + operationId: CreateDatabricksIntegrationAccount + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DatabricksIntegrationAccountCreateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + auth_type: databricks_oauth + 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: false + 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: false + 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 + schema: + $ref: "#/components/schemas/DatabricksIntegrationAccountResponse" + description: Created + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "422": + $ref: "#/components/responses/UnprocessableEntityResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create a Databricks integration account + tags: + - Databricks Integration + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - manage_integrations + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/integration-interfaces/databricks/accounts/{account_id}: + delete: + description: Delete a Databricks integration account. + operationId: DeleteDatabricksIntegrationAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + responses: + "200": + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete a Databricks integration account + tags: + - Databricks Integration + "x-permission": + operator: OR + permissions: + - manage_integrations + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get a Databricks integration account. + operationId: GetDatabricksIntegrationAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + auth_type: databricks_oauth + 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: false + 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: false + 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 + schema: + $ref: "#/components/schemas/DatabricksIntegrationAccountResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get a Databricks integration account + tags: + - Databricks Integration + "x-permission": + operator: OR + permissions: + - integrations_read + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + patch: + description: Update a Databricks integration account. Only the fields provided are changed. + operationId: UpdateDatabricksIntegrationAccount + parameters: + - $ref: "#/components/parameters/IntegrationAccountIdParameter" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DatabricksIntegrationAccountUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + authentication: + auth_type: databricks_oauth + 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: false + 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: false + 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 + schema: + $ref: "#/components/schemas/DatabricksIntegrationAccountResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "422": + $ref: "#/components/responses/UnprocessableEntityResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update a Databricks integration account + tags: + - Databricks Integration + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - manage_integrations + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/integration-interfaces/elastic-cloud/accounts: get: description: List Elastic Cloud integration accounts. @@ -230783,6 +231693,15 @@ tags: name: Data Deletion - description: Manage and run data observability monitors. name: Data Observability + - description: |- + Manage your Datadog Databricks integration accounts and account resources directly + through the Datadog API. See the + [Databricks integration page](https://docs.datadoghq.com/integrations/databricks/) for + more information. + externalDocs: + description: Databricks integration. + url: https://docs.datadoghq.com/integrations/databricks/ + name: Databricks Integration - description: |- Data Access Controls in Datadog is a feature that allows administrators and access managers to regulate access to sensitive data. By defining Restricted Datasets, you can ensure that only specific teams or roles can diff --git a/examples/v2/databricks-integration/CreateDatabricksIntegrationAccount.rb b/examples/v2/databricks-integration/CreateDatabricksIntegrationAccount.rb new file mode 100644 index 000000000000..06bacb8a70a5 --- /dev/null +++ b/examples/v2/databricks-integration/CreateDatabricksIntegrationAccount.rb @@ -0,0 +1,56 @@ +# Create a Databricks integration account returns "Created" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.create_databricks_integration_account".to_sym] = true +end +api_instance = DatadogAPIClient::V2::DatabricksIntegrationAPI.new + +body = DatadogAPIClient::V2::DatabricksIntegrationAccountCreateRequest.new({ + data: DatadogAPIClient::V2::DatabricksIntegrationAccountCreateData.new({ + attributes: DatadogAPIClient::V2::DatabricksIntegrationAccountCreateAttributes.new({ + authentication: DatadogAPIClient::V2::DatabricksIntegrationAccountOAuthAuthRequest.new({ + auth_type: DatadogAPIClient::V2::DatabricksIntegrationAccountOAuthAuthType::DATABRICKS_OAUTH, + azure_tenant_id: "4d3bac44-0230-4732-9e70-cc00736f0a97", + client_id: "5c10654a-b3a3-4840-b37f-f477590c70a0", + client_secret: "your-client-secret", + }), + dataflows: DatadogAPIClient::V2::DatabricksIntegrationDataflowsRequest.new({ + databricks_cloud_cost_metrics: DatadogAPIClient::V2::DatabricksCloudCostMetricsIntegrationDataflowRequest.new({ + enabled: true, + settings: DatadogAPIClient::V2::DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest.new({ + ccm_collect_all_workspaces: true, + }), + }), + databricks_data_observability_jobs_monitoring: DatadogAPIClient::V2::DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest.new({ + enabled: true, + settings: DatadogAPIClient::V2::DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest.new({ + dd_api_key_id: "fe383f4e-09fc-46bf-8e10-4efdd453a646", + dd_api_key_secret: "your-datadog-api-key", + djm_global_init_script_enabled: true, + script_gpum_enabled: true, + script_logs_enabled: true, + serverless_jobs_enabled: true, + }), + }), + databricks_data_observability_quality_monitoring: DatadogAPIClient::V2::DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest.new({ + enabled: true, + settings: DatadogAPIClient::V2::DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest.new({ + do_crawlers_cron: "0 * * * *", + sync_system_catalog: true, + }), + }), + databricks_model_serving_metrics: DatadogAPIClient::V2::DatabricksModelServingMetricsIntegrationDataflowRequest.new({ + enabled: true, + }), + }), + name: "My Databricks Workspace", + settings: DatadogAPIClient::V2::DatabricksIntegrationAccountSettingsRequest.new({ + system_tables_sql_warehouse_id: "aba7c023d4172910", + workspace_url: "https://dbc-1234abcd.cloud.databricks.com", + }), + }), + type: DatadogAPIClient::V2::IntegrationAccountType::INTEGRATION_ACCOUNT, + }), +}) +p api_instance.create_databricks_integration_account(body) diff --git a/examples/v2/databricks-integration/DeleteDatabricksIntegrationAccount.rb b/examples/v2/databricks-integration/DeleteDatabricksIntegrationAccount.rb new file mode 100644 index 000000000000..dd93baabe85c --- /dev/null +++ b/examples/v2/databricks-integration/DeleteDatabricksIntegrationAccount.rb @@ -0,0 +1,8 @@ +# Delete a Databricks integration account returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.delete_databricks_integration_account".to_sym] = true +end +api_instance = DatadogAPIClient::V2::DatabricksIntegrationAPI.new +p api_instance.delete_databricks_integration_account("account_id") diff --git a/examples/v2/databricks-integration/GetDatabricksIntegrationAccount.rb b/examples/v2/databricks-integration/GetDatabricksIntegrationAccount.rb new file mode 100644 index 000000000000..d724aa037d54 --- /dev/null +++ b/examples/v2/databricks-integration/GetDatabricksIntegrationAccount.rb @@ -0,0 +1,8 @@ +# Get a Databricks integration account returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + 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") diff --git a/examples/v2/databricks-integration/ListDatabricksIntegrationAccounts.rb b/examples/v2/databricks-integration/ListDatabricksIntegrationAccounts.rb new file mode 100644 index 000000000000..0be42548cf15 --- /dev/null +++ b/examples/v2/databricks-integration/ListDatabricksIntegrationAccounts.rb @@ -0,0 +1,8 @@ +# List Databricks integration accounts returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.list_databricks_integration_accounts".to_sym] = true +end +api_instance = DatadogAPIClient::V2::DatabricksIntegrationAPI.new +p api_instance.list_databricks_integration_accounts() diff --git a/examples/v2/databricks-integration/UpdateDatabricksIntegrationAccount.rb b/examples/v2/databricks-integration/UpdateDatabricksIntegrationAccount.rb new file mode 100644 index 000000000000..9140453136b8 --- /dev/null +++ b/examples/v2/databricks-integration/UpdateDatabricksIntegrationAccount.rb @@ -0,0 +1,57 @@ +# Update a Databricks integration account returns "OK" response + +require "datadog_api_client" +DatadogAPIClient.configure do |config| + config.unstable_operations["v2.update_databricks_integration_account".to_sym] = true +end +api_instance = DatadogAPIClient::V2::DatabricksIntegrationAPI.new + +body = DatadogAPIClient::V2::DatabricksIntegrationAccountUpdateRequest.new({ + data: DatadogAPIClient::V2::DatabricksIntegrationAccountUpdateData.new({ + attributes: DatadogAPIClient::V2::DatabricksIntegrationAccountUpdateAttributes.new({ + authentication: DatadogAPIClient::V2::DatabricksIntegrationAccountOAuthAuthUpdate.new({ + auth_type: DatadogAPIClient::V2::DatabricksIntegrationAccountOAuthAuthType::DATABRICKS_OAUTH, + azure_tenant_id: "4d3bac44-0230-4732-9e70-cc00736f0a97", + client_id: "5c10654a-b3a3-4840-b37f-f477590c70a0", + client_secret: "your-client-secret", + }), + dataflows: DatadogAPIClient::V2::DatabricksIntegrationDataflowsRequest.new({ + databricks_cloud_cost_metrics: DatadogAPIClient::V2::DatabricksCloudCostMetricsIntegrationDataflowRequest.new({ + enabled: true, + settings: DatadogAPIClient::V2::DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest.new({ + ccm_collect_all_workspaces: true, + }), + }), + databricks_data_observability_jobs_monitoring: DatadogAPIClient::V2::DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest.new({ + enabled: true, + settings: DatadogAPIClient::V2::DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest.new({ + dd_api_key_id: "fe383f4e-09fc-46bf-8e10-4efdd453a646", + dd_api_key_secret: "your-datadog-api-key", + djm_global_init_script_enabled: true, + script_gpum_enabled: true, + script_logs_enabled: true, + serverless_jobs_enabled: true, + }), + }), + databricks_data_observability_quality_monitoring: DatadogAPIClient::V2::DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest.new({ + enabled: true, + settings: DatadogAPIClient::V2::DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest.new({ + do_crawlers_cron: "0 * * * *", + sync_system_catalog: true, + }), + }), + databricks_model_serving_metrics: DatadogAPIClient::V2::DatabricksModelServingMetricsIntegrationDataflowRequest.new({ + enabled: true, + }), + }), + name: "My Databricks Workspace", + settings: DatadogAPIClient::V2::DatabricksIntegrationAccountSettingsUpdate.new({ + system_tables_sql_warehouse_id: "aba7c023d4172910", + workspace_url: "https://dbc-1234abcd.cloud.databricks.com", + }), + }), + id: "a9a69c2e-4f8d-4e42-9c1a-2a7a2d3b7c6f", + type: DatadogAPIClient::V2::IntegrationAccountType::INTEGRATION_ACCOUNT, + }), +}) +p api_instance.update_databricks_integration_account("account_id", body) diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 265ff78b760f..e38be4553429 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -4080,6 +4080,19 @@ "id" => "UUID", "body" => "IncidentTimestampOverridePatchRequest", }, + "v2.CreateDatabricksIntegrationAccount" => { + "body" => "DatabricksIntegrationAccountCreateRequest", + }, + "v2.DeleteDatabricksIntegrationAccount" => { + "account_id" => "String", + }, + "v2.GetDatabricksIntegrationAccount" => { + "account_id" => "String", + }, + "v2.UpdateDatabricksIntegrationAccount" => { + "account_id" => "String", + "body" => "DatabricksIntegrationAccountUpdateRequest", + }, "v2.CreateElasticCloudIntegrationAccount" => { "body" => "ElasticCloudIntegrationAccountCreateRequest", }, diff --git a/features/v2/databricks_integration.feature b/features/v2/databricks_integration.feature new file mode 100644 index 000000000000..0518707d9a2b --- /dev/null +++ b/features/v2/databricks_integration.feature @@ -0,0 +1,148 @@ +@endpoint(databricks-integration) @endpoint(databricks-integration-v2) +Feature: Databricks Integration + Manage your Datadog Databricks integration accounts and account resources + directly through the Datadog API. See the [Databricks integration + page](https://docs.datadoghq.com/integrations/databricks/) for more + information. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "DatabricksIntegration" API + + @generated @skip @team:DataDog/saas-integrations + Scenario: Create a Databricks integration account returns "Bad Request" response + Given operation "CreateDatabricksIntegrationAccount" enabled + And new "CreateDatabricksIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"auth_type": "databricks_oauth", "azure_tenant_id": "4d3bac44-0230-4732-9e70-cc00736f0a97", "client_id": "5c10654a-b3a3-4840-b37f-f477590c70a0", "client_secret": "your-client-secret"}, "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", "dd_api_key_secret": "your-datadog-api-key", "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"}}, "type": "integration-account"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: Create a Databricks integration account returns "Created" response + Given operation "CreateDatabricksIntegrationAccount" enabled + And new "CreateDatabricksIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"auth_type": "databricks_oauth", "azure_tenant_id": "4d3bac44-0230-4732-9e70-cc00736f0a97", "client_id": "5c10654a-b3a3-4840-b37f-f477590c70a0", "client_secret": "your-client-secret"}, "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", "dd_api_key_secret": "your-datadog-api-key", "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"}}, "type": "integration-account"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/saas-integrations + Scenario: Create a Databricks integration account returns "Not Found" response + Given operation "CreateDatabricksIntegrationAccount" enabled + And new "CreateDatabricksIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"auth_type": "databricks_oauth", "azure_tenant_id": "4d3bac44-0230-4732-9e70-cc00736f0a97", "client_id": "5c10654a-b3a3-4840-b37f-f477590c70a0", "client_secret": "your-client-secret"}, "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", "dd_api_key_secret": "your-datadog-api-key", "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"}}, "type": "integration-account"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: Create a Databricks integration account returns "The server cannot process the request because it contains invalid data." response + Given operation "CreateDatabricksIntegrationAccount" enabled + And new "CreateDatabricksIntegrationAccount" request + And body with value {"data": {"attributes": {"authentication": {"auth_type": "databricks_oauth", "azure_tenant_id": "4d3bac44-0230-4732-9e70-cc00736f0a97", "client_id": "5c10654a-b3a3-4840-b37f-f477590c70a0", "client_secret": "your-client-secret"}, "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", "dd_api_key_secret": "your-datadog-api-key", "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"}}, "type": "integration-account"}} + When the request is sent + Then the response status is 422 The server cannot process the request because it contains invalid data. + + @generated @skip @team:DataDog/saas-integrations + Scenario: Delete a Databricks integration account returns "Bad Request" response + Given operation "DeleteDatabricksIntegrationAccount" enabled + And new "DeleteDatabricksIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: Delete a Databricks integration account returns "Not Found" response + Given operation "DeleteDatabricksIntegrationAccount" enabled + And new "DeleteDatabricksIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: Delete a Databricks integration account returns "OK" response + Given operation "DeleteDatabricksIntegrationAccount" enabled + And new "DeleteDatabricksIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/saas-integrations + Scenario: Get a Databricks integration account returns "Bad Request" response + Given operation "GetDatabricksIntegrationAccount" enabled + And new "GetDatabricksIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: Get a Databricks integration account returns "Not Found" response + Given operation "GetDatabricksIntegrationAccount" enabled + And new "GetDatabricksIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: Get a Databricks integration account returns "OK" response + Given operation "GetDatabricksIntegrationAccount" enabled + And new "GetDatabricksIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/saas-integrations + Scenario: List Databricks integration accounts returns "Bad Request" response + Given operation "ListDatabricksIntegrationAccounts" enabled + And new "ListDatabricksIntegrationAccounts" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: List Databricks integration accounts returns "Not Found" response + Given operation "ListDatabricksIntegrationAccounts" enabled + And new "ListDatabricksIntegrationAccounts" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: List Databricks integration accounts returns "OK" response + Given operation "ListDatabricksIntegrationAccounts" enabled + And new "ListDatabricksIntegrationAccounts" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/saas-integrations + Scenario: Update a Databricks integration account returns "Bad Request" response + Given operation "UpdateDatabricksIntegrationAccount" enabled + And new "UpdateDatabricksIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"auth_type": "databricks_oauth", "azure_tenant_id": "4d3bac44-0230-4732-9e70-cc00736f0a97", "client_id": "5c10654a-b3a3-4840-b37f-f477590c70a0", "client_secret": "your-client-secret"}, "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", "dd_api_key_secret": "your-datadog-api-key", "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"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/saas-integrations + Scenario: Update a Databricks integration account returns "Not Found" response + Given operation "UpdateDatabricksIntegrationAccount" enabled + And new "UpdateDatabricksIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"auth_type": "databricks_oauth", "azure_tenant_id": "4d3bac44-0230-4732-9e70-cc00736f0a97", "client_id": "5c10654a-b3a3-4840-b37f-f477590c70a0", "client_secret": "your-client-secret"}, "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", "dd_api_key_secret": "your-datadog-api-key", "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"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/saas-integrations + Scenario: Update a Databricks integration account returns "OK" response + Given operation "UpdateDatabricksIntegrationAccount" enabled + And new "UpdateDatabricksIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"auth_type": "databricks_oauth", "azure_tenant_id": "4d3bac44-0230-4732-9e70-cc00736f0a97", "client_id": "5c10654a-b3a3-4840-b37f-f477590c70a0", "client_secret": "your-client-secret"}, "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", "dd_api_key_secret": "your-datadog-api-key", "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"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/saas-integrations + Scenario: Update a Databricks integration account returns "The server cannot process the request because it contains invalid data." response + Given operation "UpdateDatabricksIntegrationAccount" enabled + And new "UpdateDatabricksIntegrationAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"authentication": {"auth_type": "databricks_oauth", "azure_tenant_id": "4d3bac44-0230-4732-9e70-cc00736f0a97", "client_id": "5c10654a-b3a3-4840-b37f-f477590c70a0", "client_secret": "your-client-secret"}, "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", "dd_api_key_secret": "your-datadog-api-key", "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"}} + When the request is sent + Then the response status is 422 The server cannot process the request because it contains invalid data. diff --git a/features/v2/rum_replay_heatmaps.feature b/features/v2/rum_replay_heatmaps.feature index 86e8b851ae28..69b8076d2a50 100644 --- a/features/v2/rum_replay_heatmaps.feature +++ b/features/v2/rum_replay_heatmaps.feature @@ -8,28 +8,28 @@ Feature: Rum Replay Heatmaps And a valid "appKeyAuth" key in the system And an instance of "RumReplayHeatmaps" API - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: Create replay heatmap snapshot returns "Created" response Given new "CreateReplayHeatmapSnapshot" request And body with value {"data": {"attributes": {"application_id": "aaaaaaaa-1111-2222-3333-bbbbbbbbbbbb", "device_type": "desktop", "event_id": "11111111-2222-3333-4444-555555555555", "is_device_type_selected_by_user": false, "snapshot_name": "My Snapshot", "start": 0, "view_name": "/home"}, "type": "snapshots"}} When the request is sent Then the response status is 201 Created - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: Delete replay heatmap snapshot returns "No Content" response Given new "DeleteReplayHeatmapSnapshot" request And request contains "snapshot_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 204 No Content - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: List replay heatmap snapshots returns "OK" response Given new "ListReplayHeatmapSnapshots" request And request contains "filter[view_name]" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: Update replay heatmap snapshot returns "OK" response Given new "UpdateReplayHeatmapSnapshot" request And request contains "snapshot_id" parameter from "REPLACE.ME" diff --git a/features/v2/rum_replay_playlists.feature b/features/v2/rum_replay_playlists.feature index 2fd317e4df2a..bd1a9f7ae8b9 100644 --- a/features/v2/rum_replay_playlists.feature +++ b/features/v2/rum_replay_playlists.feature @@ -8,7 +8,7 @@ Feature: Rum Replay Playlists And a valid "appKeyAuth" key in the system And an instance of "RumReplayPlaylists" API - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: Add RUM replay session to playlist returns "Created" response Given new "AddRumReplaySessionToPlaylist" request And request contains "ts" parameter from "REPLACE.ME" @@ -17,7 +17,7 @@ Feature: Rum Replay Playlists When the request is sent Then the response status is 201 Created - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: Add RUM replay session to playlist returns "OK" response Given new "AddRumReplaySessionToPlaylist" request And request contains "ts" parameter from "REPLACE.ME" @@ -26,7 +26,7 @@ Feature: Rum Replay Playlists When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: Bulk remove RUM replay playlist sessions returns "No Content" response Given new "BulkRemoveRumReplayPlaylistSessions" request And request contains "playlist_id" parameter from "REPLACE.ME" @@ -34,41 +34,41 @@ Feature: Rum Replay Playlists When the request is sent Then the response status is 204 No Content - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: Create RUM replay playlist returns "Created" response Given new "CreateRumReplayPlaylist" request And body with value {"data": {"attributes": {"created_by": {"handle": "john.doe@example.com", "id": "00000000-0000-0000-0000-000000000001", "uuid": "00000000-0000-0000-0000-000000000001"}, "name": "My Playlist"}, "type": "rum_replay_playlist"}} When the request is sent Then the response status is 201 Created - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: Delete RUM replay playlist returns "No Content" response Given new "DeleteRumReplayPlaylist" request And request contains "playlist_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 204 No Content - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: Get RUM replay playlist returns "OK" response Given new "GetRumReplayPlaylist" request And request contains "playlist_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: List RUM replay playlist sessions returns "OK" response Given new "ListRumReplayPlaylistSessions" request And request contains "playlist_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: List RUM replay playlists returns "OK" response Given new "ListRumReplayPlaylists" request When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: Remove RUM replay session from playlist returns "No Content" response Given new "RemoveRumReplaySessionFromPlaylist" request And request contains "playlist_id" parameter from "REPLACE.ME" @@ -76,7 +76,7 @@ Feature: Rum Replay Playlists When the request is sent Then the response status is 204 No Content - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: Update RUM replay playlist returns "OK" response Given new "UpdateRumReplayPlaylist" request And request contains "playlist_id" parameter from "REPLACE.ME" diff --git a/features/v2/rum_replay_sessions.feature b/features/v2/rum_replay_sessions.feature index e5ce759c6b2f..3aab0ffe818a 100644 --- a/features/v2/rum_replay_sessions.feature +++ b/features/v2/rum_replay_sessions.feature @@ -3,7 +3,7 @@ Feature: Rum Replay Sessions Retrieve segments for RUM replay sessions. Access session replay data stored in event platform or blob storage. - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: Get segments returns "OK" response Given a valid "apiKeyAuth" key in the system And a valid "appKeyAuth" key in the system diff --git a/features/v2/rum_replay_viewership.feature b/features/v2/rum_replay_viewership.feature index e339e1e5e454..22d5630a38ee 100644 --- a/features/v2/rum_replay_viewership.feature +++ b/features/v2/rum_replay_viewership.feature @@ -8,7 +8,7 @@ Feature: Rum Replay Viewership And a valid "appKeyAuth" key in the system And an instance of "RumReplayViewership" API - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: Create RUM replay session watch returns "Created" response Given new "CreateRumReplaySessionWatch" request And request contains "session_id" parameter from "REPLACE.ME" @@ -16,21 +16,21 @@ Feature: Rum Replay Viewership When the request is sent Then the response status is 201 Created - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: Delete RUM replay session watch returns "No Content" response Given new "DeleteRumReplaySessionWatch" request And request contains "session_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 204 No Content - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: List RUM replay session watchers returns "OK" response Given new "ListRumReplaySessionWatchers" request And request contains "session_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/session-replay-backend + @generated @skip @team:DataDog/session-replay Scenario: List RUM replay viewership history sessions returns "OK" response Given new "ListRumReplayViewershipHistorySessions" request When the request is sent diff --git a/features/v2/undo.json b/features/v2/undo.json index 316bfc290bba..cbecf69cfc20 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -3692,6 +3692,43 @@ "type": "idempotent" } }, + "ListDatabricksIntegrationAccounts": { + "tag": "Databricks Integration", + "undo": { + "type": "safe" + } + }, + "CreateDatabricksIntegrationAccount": { + "tag": "Databricks Integration", + "undo": { + "operationId": "DeleteDatabricksIntegrationAccount", + "parameters": [ + { + "name": "account_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteDatabricksIntegrationAccount": { + "tag": "Databricks Integration", + "undo": { + "type": "idempotent" + } + }, + "GetDatabricksIntegrationAccount": { + "tag": "Databricks Integration", + "undo": { + "type": "safe" + } + }, + "UpdateDatabricksIntegrationAccount": { + "tag": "Databricks Integration", + "undo": { + "type": "idempotent" + } + }, "ListElasticCloudIntegrationAccounts": { "tag": "Elastic Cloud Integration", "undo": { diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index 590305485915..d67503f05633 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -596,6 +596,11 @@ def initialize "v2.update_incident_user_defined_field": false, "v2.update_incident_user_defined_role": false, "v2.update_timestamp_override": false, + "v2.create_databricks_integration_account": false, + "v2.delete_databricks_integration_account": false, + "v2.get_databricks_integration_account": false, + "v2.list_databricks_integration_accounts": false, + "v2.update_databricks_integration_account": false, "v2.create_elastic_cloud_integration_account": false, "v2.delete_elastic_cloud_integration_account": false, "v2.get_elastic_cloud_integration_account": false, diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 8bcef7d7201b..08190e7e23ba 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -2863,6 +2863,49 @@ def overrides "v2.data_attributes_rules_items_if_tag_exists" => "DataAttributesRulesItemsIfTagExists", "v2.data_attributes_rules_items_mapping" => "DataAttributesRulesItemsMapping", "v2.database_monitoring_trigger_wrapper" => "DatabaseMonitoringTriggerWrapper", + "v2.databricks_cloud_cost_metrics_integration_dataflow_request" => "DatabricksCloudCostMetricsIntegrationDataflowRequest", + "v2.databricks_cloud_cost_metrics_integration_dataflow_response" => "DatabricksCloudCostMetricsIntegrationDataflowResponse", + "v2.databricks_cloud_cost_metrics_integration_dataflow_settings_request" => "DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest", + "v2.databricks_cloud_cost_metrics_integration_dataflow_settings_response" => "DatabricksCloudCostMetricsIntegrationDataflowSettingsResponse", + "v2.databricks_data_observability_jobs_monitoring_integration_dataflow_request" => "DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest", + "v2.databricks_data_observability_jobs_monitoring_integration_dataflow_response" => "DatabricksDataObservabilityJobsMonitoringIntegrationDataflowResponse", + "v2.databricks_data_observability_jobs_monitoring_integration_dataflow_settings_request" => "DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest", + "v2.databricks_data_observability_jobs_monitoring_integration_dataflow_settings_response" => "DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse", + "v2.databricks_data_observability_quality_monitoring_integration_dataflow_request" => "DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest", + "v2.databricks_data_observability_quality_monitoring_integration_dataflow_response" => "DatabricksDataObservabilityQualityMonitoringIntegrationDataflowResponse", + "v2.databricks_data_observability_quality_monitoring_integration_dataflow_settings_request" => "DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest", + "v2.databricks_data_observability_quality_monitoring_integration_dataflow_settings_response" => "DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse", + "v2.databricks_integration_account_authentication_request" => "DatabricksIntegrationAccountAuthenticationRequest", + "v2.databricks_integration_account_authentication_response" => "DatabricksIntegrationAccountAuthenticationResponse", + "v2.databricks_integration_account_authentication_update" => "DatabricksIntegrationAccountAuthenticationUpdate", + "v2.databricks_integration_account_bearer_token_auth_response" => "DatabricksIntegrationAccountBearerTokenAuthResponse", + "v2.databricks_integration_account_bearer_token_auth_type" => "DatabricksIntegrationAccountBearerTokenAuthType", + "v2.databricks_integration_account_bearer_token_auth_update" => "DatabricksIntegrationAccountBearerTokenAuthUpdate", + "v2.databricks_integration_account_create_attributes" => "DatabricksIntegrationAccountCreateAttributes", + "v2.databricks_integration_account_create_data" => "DatabricksIntegrationAccountCreateData", + "v2.databricks_integration_account_create_request" => "DatabricksIntegrationAccountCreateRequest", + "v2.databricks_integration_account_o_auth_auth_request" => "DatabricksIntegrationAccountOAuthAuthRequest", + "v2.databricks_integration_account_o_auth_auth_response" => "DatabricksIntegrationAccountOAuthAuthResponse", + "v2.databricks_integration_account_o_auth_auth_type" => "DatabricksIntegrationAccountOAuthAuthType", + "v2.databricks_integration_account_o_auth_auth_update" => "DatabricksIntegrationAccountOAuthAuthUpdate", + "v2.databricks_integration_account_private_action_runner_auth_request" => "DatabricksIntegrationAccountPrivateActionRunnerAuthRequest", + "v2.databricks_integration_account_private_action_runner_auth_response" => "DatabricksIntegrationAccountPrivateActionRunnerAuthResponse", + "v2.databricks_integration_account_private_action_runner_auth_type" => "DatabricksIntegrationAccountPrivateActionRunnerAuthType", + "v2.databricks_integration_account_private_action_runner_auth_update" => "DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate", + "v2.databricks_integration_account_response" => "DatabricksIntegrationAccountResponse", + "v2.databricks_integration_account_response_attributes" => "DatabricksIntegrationAccountResponseAttributes", + "v2.databricks_integration_account_response_data" => "DatabricksIntegrationAccountResponseData", + "v2.databricks_integration_account_settings_request" => "DatabricksIntegrationAccountSettingsRequest", + "v2.databricks_integration_account_settings_response" => "DatabricksIntegrationAccountSettingsResponse", + "v2.databricks_integration_account_settings_update" => "DatabricksIntegrationAccountSettingsUpdate", + "v2.databricks_integration_accounts_response" => "DatabricksIntegrationAccountsResponse", + "v2.databricks_integration_account_update_attributes" => "DatabricksIntegrationAccountUpdateAttributes", + "v2.databricks_integration_account_update_data" => "DatabricksIntegrationAccountUpdateData", + "v2.databricks_integration_account_update_request" => "DatabricksIntegrationAccountUpdateRequest", + "v2.databricks_integration_dataflows_request" => "DatabricksIntegrationDataflowsRequest", + "v2.databricks_integration_dataflows_response" => "DatabricksIntegrationDataflowsResponse", + "v2.databricks_model_serving_metrics_integration_dataflow_request" => "DatabricksModelServingMetricsIntegrationDataflowRequest", + "v2.databricks_model_serving_metrics_integration_dataflow_response" => "DatabricksModelServingMetricsIntegrationDataflowResponse", "v2.data_deletion_response_item" => "DataDeletionResponseItem", "v2.data_deletion_response_item_attributes" => "DataDeletionResponseItemAttributes", "v2.data_deletion_response_meta" => "DataDeletionResponseMeta", @@ -9207,6 +9250,7 @@ def overrides "v2.dashboards_api" => "DashboardsAPI", "v2.data_deletion_api" => "DataDeletionAPI", "v2.data_observability_api" => "DataObservabilityAPI", + "v2.databricks_integration_api" => "DatabricksIntegrationAPI", "v2.datasets_api" => "DatasetsAPI", "v2.ddsql_api" => "DDSQLAPI", "v2.dem_api" => "DEMAPI", diff --git a/lib/datadog_api_client/v2/api/databricks_integration_api.rb b/lib/datadog_api_client/v2/api/databricks_integration_api.rb new file mode 100644 index 000000000000..51005bff034e --- /dev/null +++ b/lib/datadog_api_client/v2/api/databricks_integration_api.rb @@ -0,0 +1,385 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'cgi' + +module DatadogAPIClient::V2 + class DatabricksIntegrationAPI + attr_accessor :api_client + + def initialize(api_client = DatadogAPIClient::APIClient.default) + @api_client = api_client + end + + # Create a Databricks integration account. + # + # @see #create_databricks_integration_account_with_http_info + def create_databricks_integration_account(body, opts = {}) + data, _status_code, _headers = create_databricks_integration_account_with_http_info(body, opts) + data + end + + # Create a Databricks integration account. + # + # Create a Databricks integration account. + # + # @param body [DatabricksIntegrationAccountCreateRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(DatabricksIntegrationAccountResponse, Integer, Hash)>] DatabricksIntegrationAccountResponse data, response status code and response headers + def create_databricks_integration_account_with_http_info(body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.create_databricks_integration_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.create_databricks_integration_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.create_databricks_integration_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DatabricksIntegrationAPI.create_databricks_integration_account ...' + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling DatabricksIntegrationAPI.create_databricks_integration_account" + end + # resource path + local_var_path = '/api/v2/integration-interfaces/databricks/accounts' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'DatabricksIntegrationAccountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :create_databricks_integration_account, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DatabricksIntegrationAPI#create_databricks_integration_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Delete a Databricks integration account. + # + # @see #delete_databricks_integration_account_with_http_info + def delete_databricks_integration_account(account_id, opts = {}) + delete_databricks_integration_account_with_http_info(account_id, opts) + nil + end + + # Delete a Databricks integration account. + # + # Delete a Databricks integration account. + # + # @param account_id [String] Unique identifier of the integration account. + # @param opts [Hash] the optional parameters + # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers + def delete_databricks_integration_account_with_http_info(account_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.delete_databricks_integration_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.delete_databricks_integration_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.delete_databricks_integration_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DatabricksIntegrationAPI.delete_databricks_integration_account ...' + end + # verify the required parameter 'account_id' is set + if @api_client.config.client_side_validation && account_id.nil? + fail ArgumentError, "Missing the required parameter 'account_id' when calling DatabricksIntegrationAPI.delete_databricks_integration_account" + end + # resource path + local_var_path = '/api/v2/integration-interfaces/databricks/accounts/{account_id}'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['*/*']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :delete_databricks_integration_account, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DatabricksIntegrationAPI#delete_databricks_integration_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Get a Databricks integration account. + # + # @see #get_databricks_integration_account_with_http_info + def get_databricks_integration_account(account_id, opts = {}) + data, _status_code, _headers = get_databricks_integration_account_with_http_info(account_id, opts) + data + end + + # Get a Databricks integration account. + # + # Get a Databricks integration account. + # + # @param account_id [String] Unique identifier of the integration account. + # @param opts [Hash] the optional parameters + # @return [Array<(DatabricksIntegrationAccountResponse, Integer, Hash)>] DatabricksIntegrationAccountResponse data, response status code and response headers + def get_databricks_integration_account_with_http_info(account_id, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.get_databricks_integration_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.get_databricks_integration_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.get_databricks_integration_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DatabricksIntegrationAPI.get_databricks_integration_account ...' + end + # verify the required parameter 'account_id' is set + if @api_client.config.client_side_validation && account_id.nil? + fail ArgumentError, "Missing the required parameter 'account_id' when calling DatabricksIntegrationAPI.get_databricks_integration_account" + end + # resource path + local_var_path = '/api/v2/integration-interfaces/databricks/accounts/{account_id}'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'DatabricksIntegrationAccountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :get_databricks_integration_account, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DatabricksIntegrationAPI#get_databricks_integration_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # List Databricks integration accounts. + # + # @see #list_databricks_integration_accounts_with_http_info + def list_databricks_integration_accounts(opts = {}) + data, _status_code, _headers = list_databricks_integration_accounts_with_http_info(opts) + data + end + + # List Databricks integration accounts. + # + # List Databricks integration accounts. + # + # @param opts [Hash] the optional parameters + # @return [Array<(DatabricksIntegrationAccountsResponse, Integer, Hash)>] DatabricksIntegrationAccountsResponse data, response status code and response headers + def list_databricks_integration_accounts_with_http_info(opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.list_databricks_integration_accounts".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_databricks_integration_accounts") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_databricks_integration_accounts")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DatabricksIntegrationAPI.list_databricks_integration_accounts ...' + end + # resource path + local_var_path = '/api/v2/integration-interfaces/databricks/accounts' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'DatabricksIntegrationAccountsResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :list_databricks_integration_accounts, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DatabricksIntegrationAPI#list_databricks_integration_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # Update a Databricks integration account. + # + # @see #update_databricks_integration_account_with_http_info + def update_databricks_integration_account(account_id, body, opts = {}) + data, _status_code, _headers = update_databricks_integration_account_with_http_info(account_id, body, opts) + data + end + + # Update a Databricks integration account. + # + # Update a Databricks integration account. Only the fields provided are changed. + # + # @param account_id [String] Unique identifier of the integration account. + # @param body [DatabricksIntegrationAccountUpdateRequest] + # @param opts [Hash] the optional parameters + # @return [Array<(DatabricksIntegrationAccountResponse, Integer, Hash)>] DatabricksIntegrationAccountResponse data, response status code and response headers + def update_databricks_integration_account_with_http_info(account_id, body, opts = {}) + unstable_enabled = @api_client.config.unstable_operations["v2.update_databricks_integration_account".to_sym] + if unstable_enabled + @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.update_databricks_integration_account") + else + raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.update_databricks_integration_account")) + end + + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DatabricksIntegrationAPI.update_databricks_integration_account ...' + end + # verify the required parameter 'account_id' is set + if @api_client.config.client_side_validation && account_id.nil? + fail ArgumentError, "Missing the required parameter 'account_id' when calling DatabricksIntegrationAPI.update_databricks_integration_account" + end + # verify the required parameter 'body' is set + if @api_client.config.client_side_validation && body.nil? + fail ArgumentError, "Missing the required parameter 'body' when calling DatabricksIntegrationAPI.update_databricks_integration_account" + end + # resource path + local_var_path = '/api/v2/integration-interfaces/databricks/accounts/{account_id}'.sub('{account_id}', CGI.escape(account_id.to_s).gsub('%2F', '/')) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(body) + + # return_type + return_type = opts[:debug_return_type] || 'DatabricksIntegrationAccountResponse' + + # auth_names + auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth] + + new_options = opts.merge( + :operation => :update_databricks_integration_account, + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type, + :api_version => "V2" + ) + + data, status_code, headers = @api_client.call_api(Net::HTTP::Patch, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DatabricksIntegrationAPI#update_databricks_integration_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_cloud_cost_metrics_integration_dataflow_request.rb b/lib/datadog_api_client/v2/models/databricks_cloud_cost_metrics_integration_dataflow_request.rb new file mode 100644 index 000000000000..126fd9ab52f6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_cloud_cost_metrics_integration_dataflow_request.rb @@ -0,0 +1,90 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Cost data collected from your Databricks system tables. [Cloud Cost Management](https://docs.datadoghq.com/cloud_cost_management/) must be enabled for your organization while this dataflow is on; any request that leaves it enabled without that is rejected with a `422` response. + class DatabricksCloudCostMetricsIntegrationDataflowRequest + include BaseGenericModel + + # Whether Datadog collects this data. Defaults to `false`; set to `true` to start collection. + attr_accessor :enabled + + # Settings of the Cloud Cost Management dataflow. Only the fields provided are changed. + attr_accessor :settings + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled', + :'settings' => :'settings' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'settings' => :'DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksCloudCostMetricsIntegrationDataflowRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DatabricksCloudCostMetricsIntegrationDataflowRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + enabled == o.enabled && + settings == o.settings + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, settings].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_cloud_cost_metrics_integration_dataflow_response.rb b/lib/datadog_api_client/v2/models/databricks_cloud_cost_metrics_integration_dataflow_response.rb new file mode 100644 index 000000000000..dc14c42b21ac --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_cloud_cost_metrics_integration_dataflow_response.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Cost data collected from your Databricks system tables. Requires [Cloud Cost Management](https://docs.datadoghq.com/cloud_cost_management/) to be set up for your organization. + class DatabricksCloudCostMetricsIntegrationDataflowResponse + include BaseGenericModel + + # Whether Datadog collects this data. + attr_accessor :enabled + + # Settings of the Cloud Cost Management dataflow. + attr_accessor :settings + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled', + :'settings' => :'settings' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'settings' => :'DatabricksCloudCostMetricsIntegrationDataflowSettingsResponse' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksCloudCostMetricsIntegrationDataflowResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + enabled == o.enabled && + settings == o.settings && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, settings, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_cloud_cost_metrics_integration_dataflow_settings_request.rb b/lib/datadog_api_client/v2/models/databricks_cloud_cost_metrics_integration_dataflow_settings_request.rb new file mode 100644 index 000000000000..f55ac8847719 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_cloud_cost_metrics_integration_dataflow_settings_request.rb @@ -0,0 +1,80 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Settings of the Cloud Cost Management dataflow. Only the fields provided are changed. + class DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest + include BaseGenericModel + + # 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. Defaults to `true`. + attr_accessor :ccm_collect_all_workspaces + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'ccm_collect_all_workspaces' => :'ccm_collect_all_workspaces' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'ccm_collect_all_workspaces' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DatabricksCloudCostMetricsIntegrationDataflowSettingsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'ccm_collect_all_workspaces') + self.ccm_collect_all_workspaces = attributes[:'ccm_collect_all_workspaces'] + end + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ccm_collect_all_workspaces == o.ccm_collect_all_workspaces + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [ccm_collect_all_workspaces].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_cloud_cost_metrics_integration_dataflow_settings_response.rb b/lib/datadog_api_client/v2/models/databricks_cloud_cost_metrics_integration_dataflow_settings_response.rb new file mode 100644 index 000000000000..297a6986d8b2 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_cloud_cost_metrics_integration_dataflow_settings_response.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Settings of the Cloud Cost Management dataflow. + class DatabricksCloudCostMetricsIntegrationDataflowSettingsResponse + include BaseGenericModel + + # 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. + attr_accessor :ccm_collect_all_workspaces + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'ccm_collect_all_workspaces' => :'ccm_collect_all_workspaces' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'ccm_collect_all_workspaces' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksCloudCostMetricsIntegrationDataflowSettingsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'ccm_collect_all_workspaces') + self.ccm_collect_all_workspaces = attributes[:'ccm_collect_all_workspaces'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + ccm_collect_all_workspaces == o.ccm_collect_all_workspaces && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [ccm_collect_all_workspaces, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_data_observability_jobs_monitoring_integration_dataflow_request.rb b/lib/datadog_api_client/v2/models/databricks_data_observability_jobs_monitoring_integration_dataflow_request.rb new file mode 100644 index 000000000000..cde8995b5ebb --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_data_observability_jobs_monitoring_integration_dataflow_request.rb @@ -0,0 +1,90 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data Jobs Monitoring, which collects performance, reliability, and cost data for your Databricks jobs. + class DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest + include BaseGenericModel + + # Whether Datadog collects this data. Defaults to `true`; set to `false` to stop collection. + attr_accessor :enabled + + # Settings of the Data Jobs Monitoring dataflow. Only the fields provided are changed. + attr_accessor :settings + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled', + :'settings' => :'settings' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'settings' => :'DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + enabled == o.enabled && + settings == o.settings + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, settings].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_data_observability_jobs_monitoring_integration_dataflow_response.rb b/lib/datadog_api_client/v2/models/databricks_data_observability_jobs_monitoring_integration_dataflow_response.rb new file mode 100644 index 000000000000..17074906afad --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_data_observability_jobs_monitoring_integration_dataflow_response.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data Jobs Monitoring, which collects performance, reliability, and cost data for your Databricks jobs. + class DatabricksDataObservabilityJobsMonitoringIntegrationDataflowResponse + include BaseGenericModel + + # Whether Datadog collects this data. + attr_accessor :enabled + + # Settings of the Data Jobs Monitoring dataflow. + attr_accessor :settings + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled', + :'settings' => :'settings' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'settings' => :'DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksDataObservabilityJobsMonitoringIntegrationDataflowResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + enabled == o.enabled && + settings == o.settings && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, settings, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_data_observability_jobs_monitoring_integration_dataflow_settings_request.rb b/lib/datadog_api_client/v2/models/databricks_data_observability_jobs_monitoring_integration_dataflow_settings_request.rb new file mode 100644 index 000000000000..3e3d2822c235 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_data_observability_jobs_monitoring_integration_dataflow_settings_request.rb @@ -0,0 +1,130 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Settings of the Data Jobs Monitoring dataflow. Only the fields provided are changed. + class DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest + include BaseGenericModel + + # ID of the Datadog API key the global init script uses to submit data. Setting or changing it requires `dd_api_key_secret` in the same request. + attr_accessor :dd_api_key_id + + # Secret value of the Datadog API key identified by `dd_api_key_id`. + attr_accessor :dd_api_key_secret + + # Whether Datadog installs and manages the Agent on your Databricks clusters through a global init script. Installation can take up to 15 minutes and requires Databricks Workspace Admin permissions. The script does not apply to clusters in Standard access mode. Leave this `false` to install the Agent yourself. Defaults to `false`. + attr_accessor :djm_global_init_script_enabled + + # 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`. Defaults to `false`. + attr_accessor :script_gpum_enabled + + # 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`. Defaults to `false`. + attr_accessor :script_logs_enabled + + # 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`. Defaults to `true`. + attr_accessor :serverless_jobs_enabled + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'dd_api_key_id' => :'dd_api_key_id', + :'dd_api_key_secret' => :'dd_api_key_secret', + :'djm_global_init_script_enabled' => :'djm_global_init_script_enabled', + :'script_gpum_enabled' => :'script_gpum_enabled', + :'script_logs_enabled' => :'script_logs_enabled', + :'serverless_jobs_enabled' => :'serverless_jobs_enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'dd_api_key_id' => :'String', + :'dd_api_key_secret' => :'String', + :'djm_global_init_script_enabled' => :'Boolean', + :'script_gpum_enabled' => :'Boolean', + :'script_logs_enabled' => :'Boolean', + :'serverless_jobs_enabled' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'dd_api_key_id') + self.dd_api_key_id = attributes[:'dd_api_key_id'] + end + + if attributes.key?(:'dd_api_key_secret') + self.dd_api_key_secret = attributes[:'dd_api_key_secret'] + end + + if attributes.key?(:'djm_global_init_script_enabled') + self.djm_global_init_script_enabled = attributes[:'djm_global_init_script_enabled'] + end + + if attributes.key?(:'script_gpum_enabled') + self.script_gpum_enabled = attributes[:'script_gpum_enabled'] + end + + if attributes.key?(:'script_logs_enabled') + self.script_logs_enabled = attributes[:'script_logs_enabled'] + end + + if attributes.key?(:'serverless_jobs_enabled') + self.serverless_jobs_enabled = attributes[:'serverless_jobs_enabled'] + end + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + dd_api_key_id == o.dd_api_key_id && + dd_api_key_secret == o.dd_api_key_secret && + djm_global_init_script_enabled == o.djm_global_init_script_enabled && + script_gpum_enabled == o.script_gpum_enabled && + script_logs_enabled == o.script_logs_enabled && + serverless_jobs_enabled == o.serverless_jobs_enabled + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [dd_api_key_id, dd_api_key_secret, djm_global_init_script_enabled, script_gpum_enabled, script_logs_enabled, serverless_jobs_enabled].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_data_observability_jobs_monitoring_integration_dataflow_settings_response.rb b/lib/datadog_api_client/v2/models/databricks_data_observability_jobs_monitoring_integration_dataflow_settings_response.rb new file mode 100644 index 000000000000..428a4a85328e --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_data_observability_jobs_monitoring_integration_dataflow_settings_response.rb @@ -0,0 +1,145 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Settings of the Data Jobs Monitoring dataflow. + class DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse + include BaseGenericModel + + # ID of the Datadog API key the global init script uses to submit data. + attr_accessor :dd_api_key_id + + # 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. + attr_accessor :djm_global_init_script_enabled + + # 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`. + attr_accessor :script_gpum_enabled + + # 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`. + attr_accessor :script_logs_enabled + + # 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`. + attr_accessor :serverless_jobs_enabled + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'dd_api_key_id' => :'dd_api_key_id', + :'djm_global_init_script_enabled' => :'djm_global_init_script_enabled', + :'script_gpum_enabled' => :'script_gpum_enabled', + :'script_logs_enabled' => :'script_logs_enabled', + :'serverless_jobs_enabled' => :'serverless_jobs_enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'dd_api_key_id' => :'String', + :'djm_global_init_script_enabled' => :'Boolean', + :'script_gpum_enabled' => :'Boolean', + :'script_logs_enabled' => :'Boolean', + :'serverless_jobs_enabled' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksDataObservabilityJobsMonitoringIntegrationDataflowSettingsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'dd_api_key_id') + self.dd_api_key_id = attributes[:'dd_api_key_id'] + end + + if attributes.key?(:'djm_global_init_script_enabled') + self.djm_global_init_script_enabled = attributes[:'djm_global_init_script_enabled'] + end + + if attributes.key?(:'script_gpum_enabled') + self.script_gpum_enabled = attributes[:'script_gpum_enabled'] + end + + if attributes.key?(:'script_logs_enabled') + self.script_logs_enabled = attributes[:'script_logs_enabled'] + end + + if attributes.key?(:'serverless_jobs_enabled') + self.serverless_jobs_enabled = attributes[:'serverless_jobs_enabled'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + dd_api_key_id == o.dd_api_key_id && + djm_global_init_script_enabled == o.djm_global_init_script_enabled && + script_gpum_enabled == o.script_gpum_enabled && + script_logs_enabled == o.script_logs_enabled && + serverless_jobs_enabled == o.serverless_jobs_enabled && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [dd_api_key_id, djm_global_init_script_enabled, script_gpum_enabled, script_logs_enabled, serverless_jobs_enabled, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_data_observability_quality_monitoring_integration_dataflow_request.rb b/lib/datadog_api_client/v2/models/databricks_data_observability_quality_monitoring_integration_dataflow_request.rb new file mode 100644 index 000000000000..a9d11963a50e --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_data_observability_quality_monitoring_integration_dataflow_request.rb @@ -0,0 +1,90 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # 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. + class DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest + include BaseGenericModel + + # Whether Datadog collects this data. Defaults to `false`; set to `true` to start collection. + attr_accessor :enabled + + # Settings of the Data Observability dataflow. Only the fields provided are changed. + attr_accessor :settings + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled', + :'settings' => :'settings' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'settings' => :'DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + enabled == o.enabled && + settings == o.settings + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, settings].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_data_observability_quality_monitoring_integration_dataflow_response.rb b/lib/datadog_api_client/v2/models/databricks_data_observability_quality_monitoring_integration_dataflow_response.rb new file mode 100644 index 000000000000..3beb9ed54472 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_data_observability_quality_monitoring_integration_dataflow_response.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # 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. + class DatabricksDataObservabilityQualityMonitoringIntegrationDataflowResponse + include BaseGenericModel + + # Whether Datadog collects this data. + attr_accessor :enabled + + # Settings of the Data Observability dataflow. + attr_accessor :settings + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled', + :'settings' => :'settings' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean', + :'settings' => :'DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksDataObservabilityQualityMonitoringIntegrationDataflowResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + enabled == o.enabled && + settings == o.settings && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, settings, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_data_observability_quality_monitoring_integration_dataflow_settings_request.rb b/lib/datadog_api_client/v2/models/databricks_data_observability_quality_monitoring_integration_dataflow_settings_request.rb new file mode 100644 index 000000000000..ec902cfdcbde --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_data_observability_quality_monitoring_integration_dataflow_settings_request.rb @@ -0,0 +1,90 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Settings of the Data Observability dataflow. Only the fields provided are changed. + class DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest + include BaseGenericModel + + # Cron expression setting how often Datadog connects to your Databricks warehouse to collect metadata. Currently, only hourly (`0 * * * *`) and daily (`0 0 * * *`) are supported. Defaults to hourly (`0 * * * *`). + attr_accessor :do_crawlers_cron + + # Whether metadata from the Databricks `system` catalog is included in Data Observability alongside your data catalogs. Defaults to `false`. + attr_accessor :sync_system_catalog + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'do_crawlers_cron' => :'do_crawlers_cron', + :'sync_system_catalog' => :'sync_system_catalog' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'do_crawlers_cron' => :'String', + :'sync_system_catalog' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'do_crawlers_cron') + self.do_crawlers_cron = attributes[:'do_crawlers_cron'] + end + + if attributes.key?(:'sync_system_catalog') + self.sync_system_catalog = attributes[:'sync_system_catalog'] + end + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + do_crawlers_cron == o.do_crawlers_cron && + sync_system_catalog == o.sync_system_catalog + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [do_crawlers_cron, sync_system_catalog].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_data_observability_quality_monitoring_integration_dataflow_settings_response.rb b/lib/datadog_api_client/v2/models/databricks_data_observability_quality_monitoring_integration_dataflow_settings_response.rb new file mode 100644 index 000000000000..b0e7345b9df4 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_data_observability_quality_monitoring_integration_dataflow_settings_response.rb @@ -0,0 +1,115 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Settings of the Data Observability dataflow. + class DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse + include BaseGenericModel + + # Cron expression setting how often Datadog connects to your Databricks warehouse to collect metadata. Currently, only hourly (`0 * * * *`) and daily (`0 0 * * *`) are supported. + attr_accessor :do_crawlers_cron + + # Whether metadata from the Databricks `system` catalog is included in Data Observability alongside your data catalogs. + attr_accessor :sync_system_catalog + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'do_crawlers_cron' => :'do_crawlers_cron', + :'sync_system_catalog' => :'sync_system_catalog' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'do_crawlers_cron' => :'String', + :'sync_system_catalog' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksDataObservabilityQualityMonitoringIntegrationDataflowSettingsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'do_crawlers_cron') + self.do_crawlers_cron = attributes[:'do_crawlers_cron'] + end + + if attributes.key?(:'sync_system_catalog') + self.sync_system_catalog = attributes[:'sync_system_catalog'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + do_crawlers_cron == o.do_crawlers_cron && + sync_system_catalog == o.sync_system_catalog && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [do_crawlers_cron, sync_system_catalog, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_account_authentication_request.rb b/lib/datadog_api_client/v2/models/databricks_integration_account_authentication_request.rb new file mode 100644 index 000000000000..2aa781432a05 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_account_authentication_request.rb @@ -0,0 +1,63 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Authentication for creating the Databricks integration account. Exactly one method is set. Choosing `private_action_runner` leaves the `databricks-model-serving-metrics` dataflow unable to collect data. `bearer_token` is not available on creation: Databricks accepts it only on accounts that already use it, so it can only appear on read and update. + module DatabricksIntegrationAccountAuthenticationRequest + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'DatabricksIntegrationAccountOAuthAuthRequest', + :'DatabricksIntegrationAccountPrivateActionRunnerAuthRequest' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_account_authentication_response.rb b/lib/datadog_api_client/v2/models/databricks_integration_account_authentication_response.rb new file mode 100644 index 000000000000..6ed5d54f101e --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_account_authentication_response.rb @@ -0,0 +1,64 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # 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. + module DatabricksIntegrationAccountAuthenticationResponse + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'DatabricksIntegrationAccountOAuthAuthResponse', + :'DatabricksIntegrationAccountPrivateActionRunnerAuthResponse', + :'DatabricksIntegrationAccountBearerTokenAuthResponse' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_account_authentication_update.rb b/lib/datadog_api_client/v2/models/databricks_integration_account_authentication_update.rb new file mode 100644 index 000000000000..1abd68d14d52 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_account_authentication_update.rb @@ -0,0 +1,64 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Authentication for updating the Databricks integration account. Exactly one method is set. Choosing `private_action_runner` leaves the `databricks-model-serving-metrics` dataflow unable to collect data. `bearer_token` is deprecated on Databricks: it is accepted only on accounts that already use it and never on creation, so it cannot move an account onto token authentication. Migrate those accounts to `databricks_oauth` or `private_action_runner`. + module DatabricksIntegrationAccountAuthenticationUpdate + class << self + include BaseOneOfModel + include BaseOneOfModelNoDiscriminator + + # List of class defined in oneOf (OpenAPI v3) + def openapi_one_of + [ + :'DatabricksIntegrationAccountOAuthAuthUpdate', + :'DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate', + :'DatabricksIntegrationAccountBearerTokenAuthUpdate' + ] + end + # Builds the object + # @param data [Mixed] Data to be matched against the list of oneOf items + # @return [Object] Returns the model or the data itself + def build(data) + # Go through the list of oneOf items and attempt to identify the appropriate one. + # Note: + # - We do not attempt to check whether exactly one item matches. + # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 }) + # due to the way the deserialization is made in the base_object template (it just casts without verifying). + # - TODO: scalar values are de facto behaving as if they were nullable. + # - TODO: logging when debugging is set. + openapi_one_of.each do |klass| + begin + next if klass == :AnyType # "nullable: true" + typed_data = find_and_cast_into_type(klass, data) + next if typed_data.respond_to?(:_unparsed) && typed_data._unparsed + return typed_data if typed_data + rescue # rescue all errors so we keep iterating even if the current item lookup raises + end + end + + if openapi_one_of.include?(:AnyType) + data + else + self._unparsed = true + DatadogAPIClient::UnparsedObject.new(data) + end + end + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_account_bearer_token_auth_response.rb b/lib/datadog_api_client/v2/models/databricks_integration_account_bearer_token_auth_response.rb new file mode 100644 index 000000000000..3e61d09cb522 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_account_bearer_token_auth_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The bearer token authentication method configured on the account. + class DatabricksIntegrationAccountBearerTokenAuthResponse + include BaseGenericModel + + # The authentication method type. + attr_reader :auth_type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'auth_type' => :'auth_type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'auth_type' => :'DatabricksIntegrationAccountBearerTokenAuthType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksIntegrationAccountBearerTokenAuthResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'auth_type') + self.auth_type = attributes[:'auth_type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @auth_type.nil? + true + end + + # Custom attribute writer method with validation + # @param auth_type [Object] Object to be assigned + # @!visibility private + def auth_type=(auth_type) + if auth_type.nil? + fail ArgumentError, 'invalid value for "auth_type", auth_type cannot be nil.' + end + @auth_type = auth_type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + auth_type == o.auth_type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [auth_type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_account_bearer_token_auth_type.rb b/lib/datadog_api_client/v2/models/databricks_integration_account_bearer_token_auth_type.rb new file mode 100644 index 000000000000..0a790e8c39a9 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_account_bearer_token_auth_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The authentication method type. + class DatabricksIntegrationAccountBearerTokenAuthType + include BaseEnumModel + + BEARER_TOKEN = "bearer_token".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_account_bearer_token_auth_update.rb b/lib/datadog_api_client/v2/models/databricks_integration_account_bearer_token_auth_update.rb new file mode 100644 index 000000000000..d108fa44e742 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_account_bearer_token_auth_update.rb @@ -0,0 +1,108 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Bearer token authentication. The credential is a single opaque secret, a Databricks personal access token, with no accompanying non-secret identifier. The method is deprecated: Databricks accepts it only on accounts that already use it, and never on creation. Only the fields provided are changed; omit `token` to keep the stored one. + class DatabricksIntegrationAccountBearerTokenAuthUpdate + include BaseGenericModel + + # The authentication method type. + attr_reader :auth_type + + # Secret token used to authenticate with Databricks. + attr_accessor :token + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'auth_type' => :'auth_type', + :'token' => :'token' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'auth_type' => :'DatabricksIntegrationAccountBearerTokenAuthType', + :'token' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksIntegrationAccountBearerTokenAuthUpdate` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DatabricksIntegrationAccountBearerTokenAuthUpdate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'auth_type') + self.auth_type = attributes[:'auth_type'] + end + + if attributes.key?(:'token') + self.token = attributes[:'token'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @auth_type.nil? + true + end + + # Custom attribute writer method with validation + # @param auth_type [Object] Object to be assigned + # @!visibility private + def auth_type=(auth_type) + if auth_type.nil? + fail ArgumentError, 'invalid value for "auth_type", auth_type cannot be nil.' + end + @auth_type = auth_type + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + auth_type == o.auth_type && + token == o.token + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [auth_type, token].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_account_create_attributes.rb b/lib/datadog_api_client/v2/models/databricks_integration_account_create_attributes.rb new file mode 100644 index 000000000000..1323ba8e5d07 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_account_create_attributes.rb @@ -0,0 +1,175 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Writable attributes used to create a Databricks integration account. + class DatabricksIntegrationAccountCreateAttributes + include BaseGenericModel + + # Authentication for creating the Databricks integration account. Exactly one method is set. Choosing `private_action_runner` leaves the `databricks-model-serving-metrics` dataflow unable to collect data. `bearer_token` is not available on creation: Databricks accepts it only on accounts that already use it, so it can only appear on read and update. + attr_reader :authentication + + # Data Datadog collects from Databricks, 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. Some dataflows have prerequisites, noted on each; unless one is documented as rejecting the request, it is not verified, so a dataflow enabled without it is stored but collects no data. + attr_accessor :dataflows + + # Human-readable name of the Databricks integration account. + attr_reader :name + + # Settings for creating the Databricks integration account. + attr_reader :settings + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'authentication' => :'authentication', + :'dataflows' => :'dataflows', + :'name' => :'name', + :'settings' => :'settings' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'authentication' => :'DatabricksIntegrationAccountAuthenticationRequest', + :'dataflows' => :'DatabricksIntegrationDataflowsRequest', + :'name' => :'String', + :'settings' => :'DatabricksIntegrationAccountSettingsRequest' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksIntegrationAccountCreateAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'authentication') + self.authentication = attributes[:'authentication'] + end + + if attributes.key?(:'dataflows') + self.dataflows = attributes[:'dataflows'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @authentication.nil? + return false if @name.nil? + return false if @settings.nil? + true + end + + # Custom attribute writer method with validation + # @param authentication [Object] Object to be assigned + # @!visibility private + def authentication=(authentication) + if authentication.nil? + fail ArgumentError, 'invalid value for "authentication", authentication cannot be nil.' + end + @authentication = authentication + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param settings [Object] Object to be assigned + # @!visibility private + def settings=(settings) + if settings.nil? + fail ArgumentError, 'invalid value for "settings", settings cannot be nil.' + end + @settings = settings + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + authentication == o.authentication && + dataflows == o.dataflows && + name == o.name && + settings == o.settings && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [authentication, dataflows, name, settings, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_account_create_data.rb b/lib/datadog_api_client/v2/models/databricks_integration_account_create_data.rb new file mode 100644 index 000000000000..a059773ae5fe --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_account_create_data.rb @@ -0,0 +1,144 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data envelope for creating a Databricks integration account. + class DatabricksIntegrationAccountCreateData + include BaseGenericModel + + # Writable attributes used to create a Databricks integration account. + attr_reader :attributes + + # The type of the integration account resource. Always `integration-account`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'DatabricksIntegrationAccountCreateAttributes', + :'type' => :'IntegrationAccountType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksIntegrationAccountCreateData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_account_create_request.rb b/lib/datadog_api_client/v2/models/databricks_integration_account_create_request.rb new file mode 100644 index 000000000000..552ab480c047 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_account_create_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request payload to create a Databricks integration account. + class DatabricksIntegrationAccountCreateRequest + include BaseGenericModel + + # Data envelope for creating a Databricks integration account. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'DatabricksIntegrationAccountCreateData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksIntegrationAccountCreateRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_account_o_auth_auth_request.rb b/lib/datadog_api_client/v2/models/databricks_integration_account_o_auth_auth_request.rb new file mode 100644 index 000000000000..901d569f4435 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_account_o_auth_auth_request.rb @@ -0,0 +1,150 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Databricks OAuth machine-to-machine authentication using a service principal. + class DatabricksIntegrationAccountOAuthAuthRequest + include BaseGenericModel + + # The authentication method type. + attr_reader :auth_type + + # Microsoft Entra ID tenant of the service principal, for Azure Databricks workspaces. + attr_accessor :azure_tenant_id + + # Client ID of the Databricks service principal. + attr_reader :client_id + + # Secret of the Databricks service principal. Generate it under User management > Service principals > Credentials & secrets in Databricks. + attr_reader :client_secret + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'auth_type' => :'auth_type', + :'azure_tenant_id' => :'azure_tenant_id', + :'client_id' => :'client_id', + :'client_secret' => :'client_secret' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'auth_type' => :'DatabricksIntegrationAccountOAuthAuthType', + :'azure_tenant_id' => :'String', + :'client_id' => :'String', + :'client_secret' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksIntegrationAccountOAuthAuthRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DatabricksIntegrationAccountOAuthAuthRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'auth_type') + self.auth_type = attributes[:'auth_type'] + end + + if attributes.key?(:'azure_tenant_id') + self.azure_tenant_id = attributes[:'azure_tenant_id'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'client_secret') + self.client_secret = attributes[:'client_secret'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @auth_type.nil? + return false if @client_id.nil? + return false if @client_secret.nil? + true + end + + # Custom attribute writer method with validation + # @param auth_type [Object] Object to be assigned + # @!visibility private + def auth_type=(auth_type) + if auth_type.nil? + fail ArgumentError, 'invalid value for "auth_type", auth_type cannot be nil.' + end + @auth_type = auth_type + end + + # Custom attribute writer method with validation + # @param client_id [Object] Object to be assigned + # @!visibility private + def client_id=(client_id) + if client_id.nil? + fail ArgumentError, 'invalid value for "client_id", client_id cannot be nil.' + end + @client_id = client_id + end + + # Custom attribute writer method with validation + # @param client_secret [Object] Object to be assigned + # @!visibility private + def client_secret=(client_secret) + if client_secret.nil? + fail ArgumentError, 'invalid value for "client_secret", client_secret cannot be nil.' + end + @client_secret = client_secret + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + auth_type == o.auth_type && + azure_tenant_id == o.azure_tenant_id && + client_id == o.client_id && + client_secret == o.client_secret + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [auth_type, azure_tenant_id, client_id, client_secret].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_account_o_auth_auth_response.rb b/lib/datadog_api_client/v2/models/databricks_integration_account_o_auth_auth_response.rb new file mode 100644 index 000000000000..5250e0511a06 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_account_o_auth_auth_response.rb @@ -0,0 +1,154 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The Databricks OAuth authentication method and service principal configured on the account. + class DatabricksIntegrationAccountOAuthAuthResponse + include BaseGenericModel + + # The authentication method type. + attr_reader :auth_type + + # Microsoft Entra ID tenant of the service principal, for Azure Databricks workspaces. + attr_accessor :azure_tenant_id + + # Client ID of the Databricks service principal. + attr_reader :client_id + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'auth_type' => :'auth_type', + :'azure_tenant_id' => :'azure_tenant_id', + :'client_id' => :'client_id' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'auth_type' => :'DatabricksIntegrationAccountOAuthAuthType', + :'azure_tenant_id' => :'String', + :'client_id' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksIntegrationAccountOAuthAuthResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'auth_type') + self.auth_type = attributes[:'auth_type'] + end + + if attributes.key?(:'azure_tenant_id') + self.azure_tenant_id = attributes[:'azure_tenant_id'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @auth_type.nil? + return false if @client_id.nil? + true + end + + # Custom attribute writer method with validation + # @param auth_type [Object] Object to be assigned + # @!visibility private + def auth_type=(auth_type) + if auth_type.nil? + fail ArgumentError, 'invalid value for "auth_type", auth_type cannot be nil.' + end + @auth_type = auth_type + end + + # Custom attribute writer method with validation + # @param client_id [Object] Object to be assigned + # @!visibility private + def client_id=(client_id) + if client_id.nil? + fail ArgumentError, 'invalid value for "client_id", client_id cannot be nil.' + end + @client_id = client_id + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + auth_type == o.auth_type && + azure_tenant_id == o.azure_tenant_id && + client_id == o.client_id && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [auth_type, azure_tenant_id, client_id, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_account_o_auth_auth_type.rb b/lib/datadog_api_client/v2/models/databricks_integration_account_o_auth_auth_type.rb new file mode 100644 index 000000000000..def0597cbf6f --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_account_o_auth_auth_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The authentication method type. + class DatabricksIntegrationAccountOAuthAuthType + include BaseEnumModel + + DATABRICKS_OAUTH = "databricks_oauth".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_account_o_auth_auth_update.rb b/lib/datadog_api_client/v2/models/databricks_integration_account_o_auth_auth_update.rb new file mode 100644 index 000000000000..e69bec0483d7 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_account_o_auth_auth_update.rb @@ -0,0 +1,136 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Databricks OAuth machine-to-machine authentication using a service principal. Only the fields provided are changed; omit `client_secret` to keep the stored one. + class DatabricksIntegrationAccountOAuthAuthUpdate + include BaseGenericModel + + # The authentication method type. + attr_reader :auth_type + + # Microsoft Entra ID tenant of the service principal, for Azure Databricks workspaces. Omit it to keep the stored tenant, send `null` or an empty string to remove it, or send a value to replace it. + attr_accessor :azure_tenant_id + + # Client ID of the Databricks service principal. + attr_accessor :client_id + + # Secret of the Databricks service principal. Generate it under User management > Service principals > Credentials & secrets in Databricks. + attr_accessor :client_secret + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'auth_type' => :'auth_type', + :'azure_tenant_id' => :'azure_tenant_id', + :'client_id' => :'client_id', + :'client_secret' => :'client_secret' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'auth_type' => :'DatabricksIntegrationAccountOAuthAuthType', + :'azure_tenant_id' => :'String', + :'client_id' => :'String', + :'client_secret' => :'String' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'azure_tenant_id', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksIntegrationAccountOAuthAuthUpdate` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DatabricksIntegrationAccountOAuthAuthUpdate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'auth_type') + self.auth_type = attributes[:'auth_type'] + end + + if attributes.key?(:'azure_tenant_id') + self.azure_tenant_id = attributes[:'azure_tenant_id'] + end + + if attributes.key?(:'client_id') + self.client_id = attributes[:'client_id'] + end + + if attributes.key?(:'client_secret') + self.client_secret = attributes[:'client_secret'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @auth_type.nil? + true + end + + # Custom attribute writer method with validation + # @param auth_type [Object] Object to be assigned + # @!visibility private + def auth_type=(auth_type) + if auth_type.nil? + fail ArgumentError, 'invalid value for "auth_type", auth_type cannot be nil.' + end + @auth_type = auth_type + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + auth_type == o.auth_type && + azure_tenant_id == o.azure_tenant_id && + client_id == o.client_id && + client_secret == o.client_secret + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [auth_type, azure_tenant_id, client_id, client_secret].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_account_private_action_runner_auth_request.rb b/lib/datadog_api_client/v2/models/databricks_integration_account_private_action_runner_auth_request.rb new file mode 100644 index 000000000000..44002ad01788 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_account_private_action_runner_auth_request.rb @@ -0,0 +1,150 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Private Action Runner authentication. The runner holds the Databricks credentials, so this method carries no secrets. + class DatabricksIntegrationAccountPrivateActionRunnerAuthRequest + include BaseGenericModel + + # The authentication method type. + attr_reader :auth_type + + # Unique identifier of the Private Action Runner connection holding the credentials. + attr_reader :connection_id + + # Path of the credential inside the secret backend configured on the runner. + attr_accessor :secret_path + + # Unique identifier of the user the Private Action Runner connection belongs to. + attr_reader :user_uuid + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'auth_type' => :'auth_type', + :'connection_id' => :'connection_id', + :'secret_path' => :'secret_path', + :'user_uuid' => :'user_uuid' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'auth_type' => :'DatabricksIntegrationAccountPrivateActionRunnerAuthType', + :'connection_id' => :'UUID', + :'secret_path' => :'String', + :'user_uuid' => :'UUID' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksIntegrationAccountPrivateActionRunnerAuthRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DatabricksIntegrationAccountPrivateActionRunnerAuthRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'auth_type') + self.auth_type = attributes[:'auth_type'] + end + + if attributes.key?(:'connection_id') + self.connection_id = attributes[:'connection_id'] + end + + if attributes.key?(:'secret_path') + self.secret_path = attributes[:'secret_path'] + end + + if attributes.key?(:'user_uuid') + self.user_uuid = attributes[:'user_uuid'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @auth_type.nil? + return false if @connection_id.nil? + return false if @user_uuid.nil? + true + end + + # Custom attribute writer method with validation + # @param auth_type [Object] Object to be assigned + # @!visibility private + def auth_type=(auth_type) + if auth_type.nil? + fail ArgumentError, 'invalid value for "auth_type", auth_type cannot be nil.' + end + @auth_type = auth_type + end + + # Custom attribute writer method with validation + # @param connection_id [Object] Object to be assigned + # @!visibility private + def connection_id=(connection_id) + if connection_id.nil? + fail ArgumentError, 'invalid value for "connection_id", connection_id cannot be nil.' + end + @connection_id = connection_id + end + + # Custom attribute writer method with validation + # @param user_uuid [Object] Object to be assigned + # @!visibility private + def user_uuid=(user_uuid) + if user_uuid.nil? + fail ArgumentError, 'invalid value for "user_uuid", user_uuid cannot be nil.' + end + @user_uuid = user_uuid + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + auth_type == o.auth_type && + connection_id == o.connection_id && + secret_path == o.secret_path && + user_uuid == o.user_uuid + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [auth_type, connection_id, secret_path, user_uuid].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_account_private_action_runner_auth_response.rb b/lib/datadog_api_client/v2/models/databricks_integration_account_private_action_runner_auth_response.rb new file mode 100644 index 000000000000..5358c3bf2505 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_account_private_action_runner_auth_response.rb @@ -0,0 +1,175 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The Private Action Runner authentication method configured on the account. + class DatabricksIntegrationAccountPrivateActionRunnerAuthResponse + include BaseGenericModel + + # The authentication method type. + attr_reader :auth_type + + # Unique identifier of the Private Action Runner connection holding the credentials. + attr_reader :connection_id + + # Path of the credential inside the secret backend configured on the runner. + attr_accessor :secret_path + + # Unique identifier of the user the Private Action Runner connection belongs to. + attr_reader :user_uuid + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'auth_type' => :'auth_type', + :'connection_id' => :'connection_id', + :'secret_path' => :'secret_path', + :'user_uuid' => :'user_uuid' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'auth_type' => :'DatabricksIntegrationAccountPrivateActionRunnerAuthType', + :'connection_id' => :'String', + :'secret_path' => :'String', + :'user_uuid' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksIntegrationAccountPrivateActionRunnerAuthResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'auth_type') + self.auth_type = attributes[:'auth_type'] + end + + if attributes.key?(:'connection_id') + self.connection_id = attributes[:'connection_id'] + end + + if attributes.key?(:'secret_path') + self.secret_path = attributes[:'secret_path'] + end + + if attributes.key?(:'user_uuid') + self.user_uuid = attributes[:'user_uuid'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @auth_type.nil? + return false if @connection_id.nil? + return false if @user_uuid.nil? + true + end + + # Custom attribute writer method with validation + # @param auth_type [Object] Object to be assigned + # @!visibility private + def auth_type=(auth_type) + if auth_type.nil? + fail ArgumentError, 'invalid value for "auth_type", auth_type cannot be nil.' + end + @auth_type = auth_type + end + + # Custom attribute writer method with validation + # @param connection_id [Object] Object to be assigned + # @!visibility private + def connection_id=(connection_id) + if connection_id.nil? + fail ArgumentError, 'invalid value for "connection_id", connection_id cannot be nil.' + end + @connection_id = connection_id + end + + # Custom attribute writer method with validation + # @param user_uuid [Object] Object to be assigned + # @!visibility private + def user_uuid=(user_uuid) + if user_uuid.nil? + fail ArgumentError, 'invalid value for "user_uuid", user_uuid cannot be nil.' + end + @user_uuid = user_uuid + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + auth_type == o.auth_type && + connection_id == o.connection_id && + secret_path == o.secret_path && + user_uuid == o.user_uuid && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [auth_type, connection_id, secret_path, user_uuid, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_account_private_action_runner_auth_type.rb b/lib/datadog_api_client/v2/models/databricks_integration_account_private_action_runner_auth_type.rb new file mode 100644 index 000000000000..903acae393a8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_account_private_action_runner_auth_type.rb @@ -0,0 +1,26 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # The authentication method type. + class DatabricksIntegrationAccountPrivateActionRunnerAuthType + include BaseEnumModel + + PRIVATE_ACTION_RUNNER = "private_action_runner".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_account_private_action_runner_auth_update.rb b/lib/datadog_api_client/v2/models/databricks_integration_account_private_action_runner_auth_update.rb new file mode 100644 index 000000000000..ee0452e8bf87 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_account_private_action_runner_auth_update.rb @@ -0,0 +1,136 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Private Action Runner authentication. The runner holds the Databricks credentials, so this method carries no secrets. Only the fields provided are changed. + class DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate + include BaseGenericModel + + # The authentication method type. + attr_reader :auth_type + + # Unique identifier of the Private Action Runner connection holding the credentials. + attr_accessor :connection_id + + # Path of the credential inside the secret backend configured on the runner. Omit it to keep the stored path, send `null` or an empty string to remove it, or send a value to replace it. + attr_accessor :secret_path + + # Unique identifier of the user the Private Action Runner connection belongs to. + attr_accessor :user_uuid + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'auth_type' => :'auth_type', + :'connection_id' => :'connection_id', + :'secret_path' => :'secret_path', + :'user_uuid' => :'user_uuid' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'auth_type' => :'DatabricksIntegrationAccountPrivateActionRunnerAuthType', + :'connection_id' => :'UUID', + :'secret_path' => :'String', + :'user_uuid' => :'UUID' + } + end + + # List of attributes with nullable: true + # @!visibility private + def self.openapi_nullable + Set.new([ + :'secret_path', + ]) + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DatabricksIntegrationAccountPrivateActionRunnerAuthUpdate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'auth_type') + self.auth_type = attributes[:'auth_type'] + end + + if attributes.key?(:'connection_id') + self.connection_id = attributes[:'connection_id'] + end + + if attributes.key?(:'secret_path') + self.secret_path = attributes[:'secret_path'] + end + + if attributes.key?(:'user_uuid') + self.user_uuid = attributes[:'user_uuid'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @auth_type.nil? + true + end + + # Custom attribute writer method with validation + # @param auth_type [Object] Object to be assigned + # @!visibility private + def auth_type=(auth_type) + if auth_type.nil? + fail ArgumentError, 'invalid value for "auth_type", auth_type cannot be nil.' + end + @auth_type = auth_type + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + auth_type == o.auth_type && + connection_id == o.connection_id && + secret_path == o.secret_path && + user_uuid == o.user_uuid + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [auth_type, connection_id, secret_path, user_uuid].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_account_response.rb b/lib/datadog_api_client/v2/models/databricks_integration_account_response.rb new file mode 100644 index 000000000000..c2631db050dd --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_account_response.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response payload for a single Databricks integration account. + class DatabricksIntegrationAccountResponse + include BaseGenericModel + + # Data envelope of a Databricks integration account, including server-assigned identity. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'DatabricksIntegrationAccountResponseData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksIntegrationAccountResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_account_response_attributes.rb b/lib/datadog_api_client/v2/models/databricks_integration_account_response_attributes.rb new file mode 100644 index 000000000000..3bda77c2c866 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_account_response_attributes.rb @@ -0,0 +1,164 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Attributes of a Databricks integration account returned in responses. + class DatabricksIntegrationAccountResponseAttributes + include BaseGenericModel + + # 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. + attr_accessor :authentication + + # Data Datadog collects from Databricks, keyed by dataflow id. + attr_accessor :dataflows + + # Human-readable name of the Databricks integration account. + attr_reader :name + + # Settings configured on the Databricks integration account. + attr_reader :settings + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'authentication' => :'authentication', + :'dataflows' => :'dataflows', + :'name' => :'name', + :'settings' => :'settings' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'authentication' => :'DatabricksIntegrationAccountAuthenticationResponse', + :'dataflows' => :'DatabricksIntegrationDataflowsResponse', + :'name' => :'String', + :'settings' => :'DatabricksIntegrationAccountSettingsResponse' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksIntegrationAccountResponseAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'authentication') + self.authentication = attributes[:'authentication'] + end + + if attributes.key?(:'dataflows') + self.dataflows = attributes[:'dataflows'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @name.nil? + return false if @settings.nil? + true + end + + # Custom attribute writer method with validation + # @param name [Object] Object to be assigned + # @!visibility private + def name=(name) + if name.nil? + fail ArgumentError, 'invalid value for "name", name cannot be nil.' + end + @name = name + end + + # Custom attribute writer method with validation + # @param settings [Object] Object to be assigned + # @!visibility private + def settings=(settings) + if settings.nil? + fail ArgumentError, 'invalid value for "settings", settings cannot be nil.' + end + @settings = settings + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + authentication == o.authentication && + dataflows == o.dataflows && + name == o.name && + settings == o.settings && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [authentication, dataflows, name, settings, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_account_response_data.rb b/lib/datadog_api_client/v2/models/databricks_integration_account_response_data.rb new file mode 100644 index 000000000000..52eda1dbff90 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_account_response_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data envelope of a Databricks integration account, including server-assigned identity. + class DatabricksIntegrationAccountResponseData + include BaseGenericModel + + # Attributes of a Databricks integration account returned in responses. + attr_reader :attributes + + # Server-generated unique identifier of the Databricks integration account. + attr_reader :id + + # The type of the integration account resource. Always `integration-account`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'DatabricksIntegrationAccountResponseAttributes', + :'id' => :'String', + :'type' => :'IntegrationAccountType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksIntegrationAccountResponseData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_account_settings_request.rb b/lib/datadog_api_client/v2/models/databricks_integration_account_settings_request.rb new file mode 100644 index 000000000000..3f615eb845d8 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_account_settings_request.rb @@ -0,0 +1,108 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Settings for creating the Databricks integration account. + class DatabricksIntegrationAccountSettingsRequest + include BaseGenericModel + + # ID of the SQL warehouse used to query the Databricks system tables. Find it at the end of the HTTP Path under Warehouses > Connection Details in the Databricks console. Required when the cloud cost metrics or the Data Observability dataflow is enabled, or when `serverless_jobs_enabled` is on; since serverless jobs are on unless explicitly disabled, omitting this field otherwise causes the request to be rejected with a `422` response. + attr_accessor :system_tables_sql_warehouse_id + + # URL of the Databricks workspace. + attr_reader :workspace_url + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'system_tables_sql_warehouse_id' => :'system_tables_sql_warehouse_id', + :'workspace_url' => :'workspace_url' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'system_tables_sql_warehouse_id' => :'String', + :'workspace_url' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksIntegrationAccountSettingsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DatabricksIntegrationAccountSettingsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'system_tables_sql_warehouse_id') + self.system_tables_sql_warehouse_id = attributes[:'system_tables_sql_warehouse_id'] + end + + if attributes.key?(:'workspace_url') + self.workspace_url = attributes[:'workspace_url'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @workspace_url.nil? + true + end + + # Custom attribute writer method with validation + # @param workspace_url [Object] Object to be assigned + # @!visibility private + def workspace_url=(workspace_url) + if workspace_url.nil? + fail ArgumentError, 'invalid value for "workspace_url", workspace_url cannot be nil.' + end + @workspace_url = workspace_url + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + system_tables_sql_warehouse_id == o.system_tables_sql_warehouse_id && + workspace_url == o.workspace_url + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [system_tables_sql_warehouse_id, workspace_url].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_account_settings_response.rb b/lib/datadog_api_client/v2/models/databricks_integration_account_settings_response.rb new file mode 100644 index 000000000000..00bd04e23831 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_account_settings_response.rb @@ -0,0 +1,133 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Settings configured on the Databricks integration account. + class DatabricksIntegrationAccountSettingsResponse + include BaseGenericModel + + # ID of the SQL warehouse used to query the Databricks system tables. + attr_accessor :system_tables_sql_warehouse_id + + # URL of the Databricks workspace. + attr_reader :workspace_url + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'system_tables_sql_warehouse_id' => :'system_tables_sql_warehouse_id', + :'workspace_url' => :'workspace_url' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'system_tables_sql_warehouse_id' => :'String', + :'workspace_url' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksIntegrationAccountSettingsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'system_tables_sql_warehouse_id') + self.system_tables_sql_warehouse_id = attributes[:'system_tables_sql_warehouse_id'] + end + + if attributes.key?(:'workspace_url') + self.workspace_url = attributes[:'workspace_url'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @workspace_url.nil? + true + end + + # Custom attribute writer method with validation + # @param workspace_url [Object] Object to be assigned + # @!visibility private + def workspace_url=(workspace_url) + if workspace_url.nil? + fail ArgumentError, 'invalid value for "workspace_url", workspace_url cannot be nil.' + end + @workspace_url = workspace_url + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + system_tables_sql_warehouse_id == o.system_tables_sql_warehouse_id && + workspace_url == o.workspace_url && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [system_tables_sql_warehouse_id, workspace_url, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_account_settings_update.rb b/lib/datadog_api_client/v2/models/databricks_integration_account_settings_update.rb new file mode 100644 index 000000000000..1be466e09b47 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_account_settings_update.rb @@ -0,0 +1,90 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Settings for updating the Databricks integration account. Only the fields provided are changed. + class DatabricksIntegrationAccountSettingsUpdate + include BaseGenericModel + + # ID of the SQL warehouse used to query the Databricks system tables. Find it at the end of the HTTP Path under Warehouses > Connection Details in the Databricks console. Required once the cloud cost metrics or the Data Observability dataflow is enabled, or while `serverless_jobs_enabled` is on; an update that leaves the account without one is rejected with a `422` response. + attr_accessor :system_tables_sql_warehouse_id + + # URL of the Databricks workspace. + attr_accessor :workspace_url + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'system_tables_sql_warehouse_id' => :'system_tables_sql_warehouse_id', + :'workspace_url' => :'workspace_url' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'system_tables_sql_warehouse_id' => :'String', + :'workspace_url' => :'String' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksIntegrationAccountSettingsUpdate` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DatabricksIntegrationAccountSettingsUpdate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'system_tables_sql_warehouse_id') + self.system_tables_sql_warehouse_id = attributes[:'system_tables_sql_warehouse_id'] + end + + if attributes.key?(:'workspace_url') + self.workspace_url = attributes[:'workspace_url'] + end + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + system_tables_sql_warehouse_id == o.system_tables_sql_warehouse_id && + workspace_url == o.workspace_url + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [system_tables_sql_warehouse_id, workspace_url].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_account_update_attributes.rb b/lib/datadog_api_client/v2/models/databricks_integration_account_update_attributes.rb new file mode 100644 index 000000000000..d3fa9b0acab5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_account_update_attributes.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Writable attributes used to update a Databricks 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`. + class DatabricksIntegrationAccountUpdateAttributes + include BaseGenericModel + + # Authentication for updating the Databricks integration account. Exactly one method is set. Choosing `private_action_runner` leaves the `databricks-model-serving-metrics` dataflow unable to collect data. `bearer_token` is deprecated on Databricks: it is accepted only on accounts that already use it and never on creation, so it cannot move an account onto token authentication. Migrate those accounts to `databricks_oauth` or `private_action_runner`. + attr_accessor :authentication + + # Data Datadog collects from Databricks, 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. Some dataflows have prerequisites, noted on each; unless one is documented as rejecting the request, it is not verified, so a dataflow enabled without it is stored but collects no data. + attr_accessor :dataflows + + # Human-readable name of the Databricks integration account. + attr_accessor :name + + # Settings for updating the Databricks integration account. Only the fields provided are changed. + attr_accessor :settings + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'authentication' => :'authentication', + :'dataflows' => :'dataflows', + :'name' => :'name', + :'settings' => :'settings' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'authentication' => :'DatabricksIntegrationAccountAuthenticationUpdate', + :'dataflows' => :'DatabricksIntegrationDataflowsRequest', + :'name' => :'String', + :'settings' => :'DatabricksIntegrationAccountSettingsUpdate' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksIntegrationAccountUpdateAttributes` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'authentication') + self.authentication = attributes[:'authentication'] + end + + if attributes.key?(:'dataflows') + self.dataflows = attributes[:'dataflows'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'settings') + self.settings = attributes[:'settings'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + authentication == o.authentication && + dataflows == o.dataflows && + name == o.name && + settings == o.settings && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [authentication, dataflows, name, settings, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_account_update_data.rb b/lib/datadog_api_client/v2/models/databricks_integration_account_update_data.rb new file mode 100644 index 000000000000..caac7736b1ca --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_account_update_data.rb @@ -0,0 +1,165 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data envelope for updating a Databricks integration account. + class DatabricksIntegrationAccountUpdateData + include BaseGenericModel + + # Writable attributes used to update a Databricks 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`. + attr_reader :attributes + + # Unique identifier of the Databricks integration account to update. + attr_reader :id + + # The type of the integration account resource. Always `integration-account`. + attr_reader :type + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'attributes' => :'attributes', + :'id' => :'id', + :'type' => :'type' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'attributes' => :'DatabricksIntegrationAccountUpdateAttributes', + :'id' => :'String', + :'type' => :'IntegrationAccountType' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksIntegrationAccountUpdateData` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'attributes') + self.attributes = attributes[:'attributes'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @attributes.nil? + return false if @id.nil? + return false if @type.nil? + true + end + + # Custom attribute writer method with validation + # @param attributes [Object] Object to be assigned + # @!visibility private + def attributes=(attributes) + if attributes.nil? + fail ArgumentError, 'invalid value for "attributes", attributes cannot be nil.' + end + @attributes = attributes + end + + # Custom attribute writer method with validation + # @param id [Object] Object to be assigned + # @!visibility private + def id=(id) + if id.nil? + fail ArgumentError, 'invalid value for "id", id cannot be nil.' + end + @id = id + end + + # Custom attribute writer method with validation + # @param type [Object] Object to be assigned + # @!visibility private + def type=(type) + if type.nil? + fail ArgumentError, 'invalid value for "type", type cannot be nil.' + end + @type = type + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + attributes == o.attributes && + id == o.id && + type == o.type && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [attributes, id, type, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_account_update_request.rb b/lib/datadog_api_client/v2/models/databricks_integration_account_update_request.rb new file mode 100644 index 000000000000..5d9226926318 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_account_update_request.rb @@ -0,0 +1,123 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Request payload to update a Databricks integration account. + class DatabricksIntegrationAccountUpdateRequest + include BaseGenericModel + + # Data envelope for updating a Databricks integration account. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'DatabricksIntegrationAccountUpdateData' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksIntegrationAccountUpdateRequest` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_accounts_response.rb b/lib/datadog_api_client/v2/models/databricks_integration_accounts_response.rb new file mode 100644 index 000000000000..39079815eaad --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_accounts_response.rb @@ -0,0 +1,125 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Response payload for a list of Databricks integration accounts. + class DatabricksIntegrationAccountsResponse + include BaseGenericModel + + # List of Databricks integration accounts. + attr_reader :data + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'data' => :'data' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'data' => :'Array' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksIntegrationAccountsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'data') + if (value = attributes[:'data']).is_a?(Array) + self.data = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @data.nil? + true + end + + # Custom attribute writer method with validation + # @param data [Object] Object to be assigned + # @!visibility private + def data=(data) + if data.nil? + fail ArgumentError, 'invalid value for "data", data cannot be nil.' + end + @data = data + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + data == o.data && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [data, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_dataflows_request.rb b/lib/datadog_api_client/v2/models/databricks_integration_dataflows_request.rb new file mode 100644 index 000000000000..42c65b12056d --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_dataflows_request.rb @@ -0,0 +1,110 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data Datadog collects from Databricks, 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. Some dataflows have prerequisites, noted on each; unless one is documented as rejecting the request, it is not verified, so a dataflow enabled without it is stored but collects no data. + class DatabricksIntegrationDataflowsRequest + include BaseGenericModel + + # Cost data collected from your Databricks system tables. [Cloud Cost Management](https://docs.datadoghq.com/cloud_cost_management/) must be enabled for your organization while this dataflow is on; any request that leaves it enabled without that is rejected with a `422` response. + attr_accessor :databricks_cloud_cost_metrics + + # Data Jobs Monitoring, which collects performance, reliability, and cost data for your Databricks jobs. + attr_accessor :databricks_data_observability_jobs_monitoring + + # 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. + attr_accessor :databricks_data_observability_quality_monitoring + + # 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. + attr_accessor :databricks_model_serving_metrics + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'databricks_cloud_cost_metrics' => :'databricks-cloud-cost-metrics', + :'databricks_data_observability_jobs_monitoring' => :'databricks-data-observability-jobs-monitoring', + :'databricks_data_observability_quality_monitoring' => :'databricks-data-observability-quality-monitoring', + :'databricks_model_serving_metrics' => :'databricks-model-serving-metrics' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'databricks_cloud_cost_metrics' => :'DatabricksCloudCostMetricsIntegrationDataflowRequest', + :'databricks_data_observability_jobs_monitoring' => :'DatabricksDataObservabilityJobsMonitoringIntegrationDataflowRequest', + :'databricks_data_observability_quality_monitoring' => :'DatabricksDataObservabilityQualityMonitoringIntegrationDataflowRequest', + :'databricks_model_serving_metrics' => :'DatabricksModelServingMetricsIntegrationDataflowRequest' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksIntegrationDataflowsRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DatabricksIntegrationDataflowsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'databricks_cloud_cost_metrics') + self.databricks_cloud_cost_metrics = attributes[:'databricks_cloud_cost_metrics'] + end + + if attributes.key?(:'databricks_data_observability_jobs_monitoring') + self.databricks_data_observability_jobs_monitoring = attributes[:'databricks_data_observability_jobs_monitoring'] + end + + if attributes.key?(:'databricks_data_observability_quality_monitoring') + self.databricks_data_observability_quality_monitoring = attributes[:'databricks_data_observability_quality_monitoring'] + end + + if attributes.key?(:'databricks_model_serving_metrics') + self.databricks_model_serving_metrics = attributes[:'databricks_model_serving_metrics'] + end + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + databricks_cloud_cost_metrics == o.databricks_cloud_cost_metrics && + databricks_data_observability_jobs_monitoring == o.databricks_data_observability_jobs_monitoring && + databricks_data_observability_quality_monitoring == o.databricks_data_observability_quality_monitoring && + databricks_model_serving_metrics == o.databricks_model_serving_metrics + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [databricks_cloud_cost_metrics, databricks_data_observability_jobs_monitoring, databricks_data_observability_quality_monitoring, databricks_model_serving_metrics].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_integration_dataflows_response.rb b/lib/datadog_api_client/v2/models/databricks_integration_dataflows_response.rb new file mode 100644 index 000000000000..65bdf05138e5 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_integration_dataflows_response.rb @@ -0,0 +1,135 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # Data Datadog collects from Databricks, keyed by dataflow id. + class DatabricksIntegrationDataflowsResponse + include BaseGenericModel + + # Cost data collected from your Databricks system tables. Requires [Cloud Cost Management](https://docs.datadoghq.com/cloud_cost_management/) to be set up for your organization. + attr_accessor :databricks_cloud_cost_metrics + + # Data Jobs Monitoring, which collects performance, reliability, and cost data for your Databricks jobs. + attr_accessor :databricks_data_observability_jobs_monitoring + + # 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. + attr_accessor :databricks_data_observability_quality_monitoring + + # 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. + attr_accessor :databricks_model_serving_metrics + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'databricks_cloud_cost_metrics' => :'databricks-cloud-cost-metrics', + :'databricks_data_observability_jobs_monitoring' => :'databricks-data-observability-jobs-monitoring', + :'databricks_data_observability_quality_monitoring' => :'databricks-data-observability-quality-monitoring', + :'databricks_model_serving_metrics' => :'databricks-model-serving-metrics' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'databricks_cloud_cost_metrics' => :'DatabricksCloudCostMetricsIntegrationDataflowResponse', + :'databricks_data_observability_jobs_monitoring' => :'DatabricksDataObservabilityJobsMonitoringIntegrationDataflowResponse', + :'databricks_data_observability_quality_monitoring' => :'DatabricksDataObservabilityQualityMonitoringIntegrationDataflowResponse', + :'databricks_model_serving_metrics' => :'DatabricksModelServingMetricsIntegrationDataflowResponse' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksIntegrationDataflowsResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'databricks_cloud_cost_metrics') + self.databricks_cloud_cost_metrics = attributes[:'databricks_cloud_cost_metrics'] + end + + if attributes.key?(:'databricks_data_observability_jobs_monitoring') + self.databricks_data_observability_jobs_monitoring = attributes[:'databricks_data_observability_jobs_monitoring'] + end + + if attributes.key?(:'databricks_data_observability_quality_monitoring') + self.databricks_data_observability_quality_monitoring = attributes[:'databricks_data_observability_quality_monitoring'] + end + + if attributes.key?(:'databricks_model_serving_metrics') + self.databricks_model_serving_metrics = attributes[:'databricks_model_serving_metrics'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + databricks_cloud_cost_metrics == o.databricks_cloud_cost_metrics && + databricks_data_observability_jobs_monitoring == o.databricks_data_observability_jobs_monitoring && + databricks_data_observability_quality_monitoring == o.databricks_data_observability_quality_monitoring && + databricks_model_serving_metrics == o.databricks_model_serving_metrics && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [databricks_cloud_cost_metrics, databricks_data_observability_jobs_monitoring, databricks_data_observability_quality_monitoring, databricks_model_serving_metrics, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_model_serving_metrics_integration_dataflow_request.rb b/lib/datadog_api_client/v2/models/databricks_model_serving_metrics_integration_dataflow_request.rb new file mode 100644 index 000000000000..25120f6a33f6 --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_model_serving_metrics_integration_dataflow_request.rb @@ -0,0 +1,80 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # 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. + class DatabricksModelServingMetricsIntegrationDataflowRequest + include BaseGenericModel + + # Whether Datadog collects this data. Defaults to `false`; set to `true` to start collection. + attr_accessor :enabled + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksModelServingMetricsIntegrationDataflowRequest` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V2::DatabricksModelServingMetricsIntegrationDataflowRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + enabled == o.enabled + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/databricks_model_serving_metrics_integration_dataflow_response.rb b/lib/datadog_api_client/v2/models/databricks_model_serving_metrics_integration_dataflow_response.rb new file mode 100644 index 000000000000..acd41cd4ec4f --- /dev/null +++ b/lib/datadog_api_client/v2/models/databricks_model_serving_metrics_integration_dataflow_response.rb @@ -0,0 +1,105 @@ +=begin +#Datadog API V2 Collection + +#Collection of all Datadog Public endpoints. + +The version of the OpenAPI document: 1.0 +Contact: support@datadoghq.com +Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator + + Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + This product includes software developed at Datadog (https://www.datadoghq.com/). + Copyright 2020-Present Datadog, Inc. + +=end + +require 'date' +require 'time' + +module DatadogAPIClient::V2 + # 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. + class DatabricksModelServingMetricsIntegrationDataflowResponse + include BaseGenericModel + + # Whether Datadog collects this data. + attr_accessor :enabled + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'enabled' => :'enabled' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'enabled' => :'Boolean' + } + end + + # Initializes the object + # @param attributes [Hash] Model attributes in the form of hash + # @!visibility private + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::DatabricksModelServingMetricsIntegrationDataflowResponse` initialize method" + end + + self.additional_properties = {} + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + self.additional_properties[k.to_sym] = v + else + h[k.to_sym] = v + end + } + + if attributes.key?(:'enabled') + self.enabled = attributes[:'enabled'] + end + end + + # Returns the object in the form of hash, with additionalProperties support. + # @return [Hash] Returns the object in the form of hash + # @!visibility private + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + self.additional_properties.each_pair do |attr, value| + hash[attr] = value + end + hash + end + + # Checks equality by comparing each attribute. + # @param o [Object] Object to be compared + # @!visibility private + def ==(o) + return true if self.equal?(o) + self.class == o.class && + enabled == o.enabled && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [enabled, additional_properties].hash + end + end +end