Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
563 changes: 563 additions & 0 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Create a CoreWeave integration account returns "Created" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.access_token = ENV["DD_BEARER_TOKEN"]
config.unstable_operations["v2.create_core_weave_cloud_integration_account".to_sym] = true
end
api_instance = DatadogAPIClient::V2::CoreWeaveIntegrationAPI.new

body = DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountCreateRequest.new({
data: DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountCreateData.new({
attributes: DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountCreateAttributes.new({
authentication: DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountAPITokenAuthRequest.new({
api_token: "CW-SECRET-xxxxxxxxxxxxxxxxxxxx",
auth_type: DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountAPITokenAuthType::COREWEAVE_API_TOKEN,
}),
dataflows: DatadogAPIClient::V2::CoreWeaveCloudIntegrationDataflowsRequest.new({
coreweave_cloud_logs: DatadogAPIClient::V2::CoreWeaveCloudLogsIntegrationDataflowRequest.new({
enabled: true,
}),
coreweave_cloud_metrics: DatadogAPIClient::V2::CoreWeaveCloudMetricsIntegrationDataflowRequest.new({
enabled: true,
}),
}),
name: "coreweave-prod",
settings: DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountSettingsRequest.new({
account_tags: [
"env:prod",
"team:gpu",
],
cluster_filters: [
"cluster:prod-*",
"!cluster:dev",
],
}),
}),
type: DatadogAPIClient::V2::IntegrationAccountType::INTEGRATION_ACCOUNT,
}),
})
p api_instance.create_core_weave_cloud_integration_account(body)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Delete a CoreWeave integration account returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.access_token = ENV["DD_BEARER_TOKEN"]
config.unstable_operations["v2.delete_core_weave_cloud_integration_account".to_sym] = true
end
api_instance = DatadogAPIClient::V2::CoreWeaveIntegrationAPI.new
p api_instance.delete_core_weave_cloud_integration_account("account_id")
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Get a CoreWeave integration account returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.access_token = ENV["DD_BEARER_TOKEN"]
config.unstable_operations["v2.get_core_weave_cloud_integration_account".to_sym] = true
end
api_instance = DatadogAPIClient::V2::CoreWeaveIntegrationAPI.new
p api_instance.get_core_weave_cloud_integration_account("account_id")
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# List CoreWeave integration accounts returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.access_token = ENV["DD_BEARER_TOKEN"]
config.unstable_operations["v2.list_core_weave_cloud_integration_accounts".to_sym] = true
end
api_instance = DatadogAPIClient::V2::CoreWeaveIntegrationAPI.new
p api_instance.list_core_weave_cloud_integration_accounts()
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Update a CoreWeave integration account returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.access_token = ENV["DD_BEARER_TOKEN"]
config.unstable_operations["v2.update_core_weave_cloud_integration_account".to_sym] = true
end
api_instance = DatadogAPIClient::V2::CoreWeaveIntegrationAPI.new

body = DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountUpdateRequest.new({
data: DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountUpdateData.new({
attributes: DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountUpdateAttributes.new({
authentication: DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountAPITokenAuthUpdate.new({
api_token: "CW-SECRET-xxxxxxxxxxxxxxxxxxxx",
auth_type: DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountAPITokenAuthType::COREWEAVE_API_TOKEN,
}),
dataflows: DatadogAPIClient::V2::CoreWeaveCloudIntegrationDataflowsRequest.new({
coreweave_cloud_logs: DatadogAPIClient::V2::CoreWeaveCloudLogsIntegrationDataflowRequest.new({
enabled: true,
}),
coreweave_cloud_metrics: DatadogAPIClient::V2::CoreWeaveCloudMetricsIntegrationDataflowRequest.new({
enabled: true,
}),
}),
name: "coreweave-prod",
settings: DatadogAPIClient::V2::CoreWeaveCloudIntegrationAccountSettingsUpdate.new({
account_tags: [
"env:prod",
"team:gpu",
],
cluster_filters: [
"cluster:prod-*",
"!cluster:dev",
],
}),
}),
id: "f7a8b9c0-d1e2-4f3a-9b4c-5d6e7f8091a2",
type: DatadogAPIClient::V2::IntegrationAccountType::INTEGRATION_ACCOUNT,
}),
})
p api_instance.update_core_weave_cloud_integration_account("account_id", body)
13 changes: 13 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4720,6 +4720,19 @@
"id" => "UUID",
"body" => "IncidentTimestampOverridePatchRequest",
},
"v2.CreateCoreWeaveCloudIntegrationAccount" => {
"body" => "CoreWeaveCloudIntegrationAccountCreateRequest",
},
"v2.DeleteCoreWeaveCloudIntegrationAccount" => {
"account_id" => "String",
},
"v2.GetCoreWeaveCloudIntegrationAccount" => {
"account_id" => "String",
},
"v2.UpdateCoreWeaveCloudIntegrationAccount" => {
"account_id" => "String",
"body" => "CoreWeaveCloudIntegrationAccountUpdateRequest",
},
"v2.CreateDatabricksIntegrationAccount" => {
"body" => "DatabricksIntegrationAccountCreateRequest",
},
Expand Down
148 changes: 148 additions & 0 deletions features/v2/coreweave_integration.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
@endpoint(coreweave-integration) @endpoint(coreweave-integration-v2)
Feature: CoreWeave Integration
Manage your Datadog CoreWeave integration accounts and account resources
directly through the Datadog API. See the [CoreWeave integration
page](https://docs.datadoghq.com/integrations/coreweave/) for more
information.

Background:
Given a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "CoreWeaveIntegration" API

@generated @skip @team:ddoghq/emerging-cloud-integrations
Scenario: Create a CoreWeave integration account returns "Bad Request" response
Given operation "CreateCoreWeaveCloudIntegrationAccount" enabled
And new "CreateCoreWeaveCloudIntegrationAccount" request
And body with value {"data": {"attributes": {"authentication": {"api_token": "CW-SECRET-xxxxxxxxxxxxxxxxxxxx", "auth_type": "coreweave_api_token"}, "dataflows": {"coreweave-cloud-logs": {"enabled": true}, "coreweave-cloud-metrics": {"enabled": true}}, "name": "coreweave-prod", "settings": {"account_tags": ["env:prod", "team:gpu"], "cluster_filters": ["cluster:prod-*", "!cluster:dev"]}}, "type": "integration-account"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:ddoghq/emerging-cloud-integrations
Scenario: Create a CoreWeave integration account returns "Created" response
Given operation "CreateCoreWeaveCloudIntegrationAccount" enabled
And new "CreateCoreWeaveCloudIntegrationAccount" request
And body with value {"data": {"attributes": {"authentication": {"api_token": "CW-SECRET-xxxxxxxxxxxxxxxxxxxx", "auth_type": "coreweave_api_token"}, "dataflows": {"coreweave-cloud-logs": {"enabled": true}, "coreweave-cloud-metrics": {"enabled": true}}, "name": "coreweave-prod", "settings": {"account_tags": ["env:prod", "team:gpu"], "cluster_filters": ["cluster:prod-*", "!cluster:dev"]}}, "type": "integration-account"}}
When the request is sent
Then the response status is 201 Created

@generated @skip @team:ddoghq/emerging-cloud-integrations
Scenario: Create a CoreWeave integration account returns "Not Found" response
Given operation "CreateCoreWeaveCloudIntegrationAccount" enabled
And new "CreateCoreWeaveCloudIntegrationAccount" request
And body with value {"data": {"attributes": {"authentication": {"api_token": "CW-SECRET-xxxxxxxxxxxxxxxxxxxx", "auth_type": "coreweave_api_token"}, "dataflows": {"coreweave-cloud-logs": {"enabled": true}, "coreweave-cloud-metrics": {"enabled": true}}, "name": "coreweave-prod", "settings": {"account_tags": ["env:prod", "team:gpu"], "cluster_filters": ["cluster:prod-*", "!cluster:dev"]}}, "type": "integration-account"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:ddoghq/emerging-cloud-integrations
Scenario: Create a CoreWeave integration account returns "The server cannot process the request because it contains invalid data." response
Given operation "CreateCoreWeaveCloudIntegrationAccount" enabled
And new "CreateCoreWeaveCloudIntegrationAccount" request
And body with value {"data": {"attributes": {"authentication": {"api_token": "CW-SECRET-xxxxxxxxxxxxxxxxxxxx", "auth_type": "coreweave_api_token"}, "dataflows": {"coreweave-cloud-logs": {"enabled": true}, "coreweave-cloud-metrics": {"enabled": true}}, "name": "coreweave-prod", "settings": {"account_tags": ["env:prod", "team:gpu"], "cluster_filters": ["cluster:prod-*", "!cluster:dev"]}}, "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:ddoghq/emerging-cloud-integrations
Scenario: Delete a CoreWeave integration account returns "Bad Request" response
Given operation "DeleteCoreWeaveCloudIntegrationAccount" enabled
And new "DeleteCoreWeaveCloudIntegrationAccount" 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:ddoghq/emerging-cloud-integrations
Scenario: Delete a CoreWeave integration account returns "Not Found" response
Given operation "DeleteCoreWeaveCloudIntegrationAccount" enabled
And new "DeleteCoreWeaveCloudIntegrationAccount" 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:ddoghq/emerging-cloud-integrations
Scenario: Delete a CoreWeave integration account returns "OK" response
Given operation "DeleteCoreWeaveCloudIntegrationAccount" enabled
And new "DeleteCoreWeaveCloudIntegrationAccount" 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:ddoghq/emerging-cloud-integrations
Scenario: Get a CoreWeave integration account returns "Bad Request" response
Given operation "GetCoreWeaveCloudIntegrationAccount" enabled
And new "GetCoreWeaveCloudIntegrationAccount" 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:ddoghq/emerging-cloud-integrations
Scenario: Get a CoreWeave integration account returns "Not Found" response
Given operation "GetCoreWeaveCloudIntegrationAccount" enabled
And new "GetCoreWeaveCloudIntegrationAccount" 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:ddoghq/emerging-cloud-integrations
Scenario: Get a CoreWeave integration account returns "OK" response
Given operation "GetCoreWeaveCloudIntegrationAccount" enabled
And new "GetCoreWeaveCloudIntegrationAccount" 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:ddoghq/emerging-cloud-integrations
Scenario: List CoreWeave integration accounts returns "Bad Request" response
Given operation "ListCoreWeaveCloudIntegrationAccounts" enabled
And new "ListCoreWeaveCloudIntegrationAccounts" request
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:ddoghq/emerging-cloud-integrations
Scenario: List CoreWeave integration accounts returns "Not Found" response
Given operation "ListCoreWeaveCloudIntegrationAccounts" enabled
And new "ListCoreWeaveCloudIntegrationAccounts" request
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:ddoghq/emerging-cloud-integrations
Scenario: List CoreWeave integration accounts returns "OK" response
Given operation "ListCoreWeaveCloudIntegrationAccounts" enabled
And new "ListCoreWeaveCloudIntegrationAccounts" request
When the request is sent
Then the response status is 200 OK

@generated @skip @team:ddoghq/emerging-cloud-integrations
Scenario: Update a CoreWeave integration account returns "Bad Request" response
Given operation "UpdateCoreWeaveCloudIntegrationAccount" enabled
And new "UpdateCoreWeaveCloudIntegrationAccount" request
And request contains "account_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"authentication": {"api_token": "CW-SECRET-xxxxxxxxxxxxxxxxxxxx", "auth_type": "coreweave_api_token"}, "dataflows": {"coreweave-cloud-logs": {"enabled": true}, "coreweave-cloud-metrics": {"enabled": true}}, "name": "coreweave-prod", "settings": {"account_tags": ["env:prod", "team:gpu"], "cluster_filters": ["cluster:prod-*", "!cluster:dev"]}}, "id": "f7a8b9c0-d1e2-4f3a-9b4c-5d6e7f8091a2", "type": "integration-account"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:ddoghq/emerging-cloud-integrations
Scenario: Update a CoreWeave integration account returns "Not Found" response
Given operation "UpdateCoreWeaveCloudIntegrationAccount" enabled
And new "UpdateCoreWeaveCloudIntegrationAccount" request
And request contains "account_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"authentication": {"api_token": "CW-SECRET-xxxxxxxxxxxxxxxxxxxx", "auth_type": "coreweave_api_token"}, "dataflows": {"coreweave-cloud-logs": {"enabled": true}, "coreweave-cloud-metrics": {"enabled": true}}, "name": "coreweave-prod", "settings": {"account_tags": ["env:prod", "team:gpu"], "cluster_filters": ["cluster:prod-*", "!cluster:dev"]}}, "id": "f7a8b9c0-d1e2-4f3a-9b4c-5d6e7f8091a2", "type": "integration-account"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:ddoghq/emerging-cloud-integrations
Scenario: Update a CoreWeave integration account returns "OK" response
Given operation "UpdateCoreWeaveCloudIntegrationAccount" enabled
And new "UpdateCoreWeaveCloudIntegrationAccount" request
And request contains "account_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"authentication": {"api_token": "CW-SECRET-xxxxxxxxxxxxxxxxxxxx", "auth_type": "coreweave_api_token"}, "dataflows": {"coreweave-cloud-logs": {"enabled": true}, "coreweave-cloud-metrics": {"enabled": true}}, "name": "coreweave-prod", "settings": {"account_tags": ["env:prod", "team:gpu"], "cluster_filters": ["cluster:prod-*", "!cluster:dev"]}}, "id": "f7a8b9c0-d1e2-4f3a-9b4c-5d6e7f8091a2", "type": "integration-account"}}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:ddoghq/emerging-cloud-integrations
Scenario: Update a CoreWeave integration account returns "The server cannot process the request because it contains invalid data." response
Given operation "UpdateCoreWeaveCloudIntegrationAccount" enabled
And new "UpdateCoreWeaveCloudIntegrationAccount" request
And request contains "account_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"authentication": {"api_token": "CW-SECRET-xxxxxxxxxxxxxxxxxxxx", "auth_type": "coreweave_api_token"}, "dataflows": {"coreweave-cloud-logs": {"enabled": true}, "coreweave-cloud-metrics": {"enabled": true}}, "name": "coreweave-prod", "settings": {"account_tags": ["env:prod", "team:gpu"], "cluster_filters": ["cluster:prod-*", "!cluster:dev"]}}, "id": "f7a8b9c0-d1e2-4f3a-9b4c-5d6e7f8091a2", "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.
37 changes: 37 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -4307,6 +4307,43 @@
"type": "safe"
}
},
"ListCoreWeaveCloudIntegrationAccounts": {
"tag": "CoreWeave Integration",
"undo": {
"type": "safe"
}
},
"CreateCoreWeaveCloudIntegrationAccount": {
"tag": "CoreWeave Integration",
"undo": {
"operationId": "DeleteCoreWeaveCloudIntegrationAccount",
"parameters": [
{
"name": "account_id",
"source": "data.id"
}
],
"type": "unsafe"
}
},
"DeleteCoreWeaveCloudIntegrationAccount": {
"tag": "CoreWeave Integration",
"undo": {
"type": "idempotent"
}
},
"GetCoreWeaveCloudIntegrationAccount": {
"tag": "CoreWeave Integration",
"undo": {
"type": "safe"
}
},
"UpdateCoreWeaveCloudIntegrationAccount": {
"tag": "CoreWeave Integration",
"undo": {
"type": "idempotent"
}
},
"ListDatabricksIntegrationAccounts": {
"tag": "Databricks Integration",
"undo": {
Expand Down
5 changes: 5 additions & 0 deletions lib/datadog_api_client/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,11 @@ def initialize
"v2.update_incident_user_defined_field": false,
"v2.update_incident_user_defined_role": false,
"v2.update_timestamp_override": false,
"v2.create_core_weave_cloud_integration_account": false,
"v2.delete_core_weave_cloud_integration_account": false,
"v2.get_core_weave_cloud_integration_account": false,
"v2.list_core_weave_cloud_integration_accounts": false,
"v2.update_core_weave_cloud_integration_account": false,
"v2.create_databricks_integration_account": false,
"v2.delete_databricks_integration_account": false,
"v2.get_databricks_integration_account": false,
Expand Down
Loading
Loading