Skip to content

Commit d86a914

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 1f033a8 of spec repo
1 parent 1988408 commit d86a914

27 files changed

Lines changed: 2711 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 482 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Execute a tabular DDSQL query returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_ddsql::DDSQLAPI;
4+
use datadog_api_client::datadogV2::model::DdsqlTabularQueryRequest;
5+
use datadog_api_client::datadogV2::model::DdsqlTabularQueryRequestAttributes;
6+
use datadog_api_client::datadogV2::model::DdsqlTabularQueryRequestData;
7+
use datadog_api_client::datadogV2::model::DdsqlTabularQueryRequestType;
8+
use datadog_api_client::datadogV2::model::DdsqlTabularQueryTimeWindow;
9+
10+
#[tokio::main]
11+
async fn main() {
12+
let body = DdsqlTabularQueryRequest::new(DdsqlTabularQueryRequestData::new(
13+
DdsqlTabularQueryRequestAttributes::new(
14+
"SELECT cloud_provider, count(*) FROM dd.hosts group by cloud_provider".to_string(),
15+
DdsqlTabularQueryTimeWindow::new(1736942400000, 1736946000000),
16+
)
17+
.row_limit(1000),
18+
DdsqlTabularQueryRequestType::DDSQL_QUERY_REQUEST,
19+
));
20+
let mut configuration = datadog::Configuration::new();
21+
configuration.set_unstable_operation_enabled("v2.ExecuteDdsqlTabularQuery", true);
22+
let api = DDSQLAPI::with_config(configuration);
23+
let resp = api.execute_ddsql_tabular_query(body).await;
24+
if let Ok(value) = resp {
25+
println!("{:#?}", value);
26+
} else {
27+
println!("{:#?}", resp.unwrap_err());
28+
}
29+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Fetch the result of a DDSQL query returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_ddsql::DDSQLAPI;
4+
use datadog_api_client::datadogV2::model::DdsqlTabularQueryFetchRequest;
5+
use datadog_api_client::datadogV2::model::DdsqlTabularQueryFetchRequestAttributes;
6+
use datadog_api_client::datadogV2::model::DdsqlTabularQueryFetchRequestData;
7+
use datadog_api_client::datadogV2::model::DdsqlTabularQueryFetchRequestType;
8+
9+
#[tokio::main]
10+
async fn main() {
11+
let body = DdsqlTabularQueryFetchRequest::new(DdsqlTabularQueryFetchRequestData::new(
12+
DdsqlTabularQueryFetchRequestAttributes::new(
13+
"eyJxdWVyeSI6ICJTRUxFQ1QgKiBGUk9NIGxvZ3MifQ==".to_string(),
14+
),
15+
DdsqlTabularQueryFetchRequestType::DDSQL_QUERY_FETCH_REQUEST,
16+
));
17+
let mut configuration = datadog::Configuration::new();
18+
configuration.set_unstable_operation_enabled("v2.FetchDdsqlTabularQuery", true);
19+
let api = DDSQLAPI::with_config(configuration);
20+
let resp = api.fetch_ddsql_tabular_query(body).await;
21+
if let Ok(value) = resp {
22+
println!("{:#?}", value);
23+
} else {
24+
println!("{:#?}", resp.unwrap_err());
25+
}
26+
}

src/datadog/configuration.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,8 @@ impl Default for Configuration {
547547
("v2.get_all_datasets".to_owned(), false),
548548
("v2.get_dataset".to_owned(), false),
549549
("v2.update_dataset".to_owned(), false),
550+
("v2.execute_ddsql_tabular_query".to_owned(), false),
551+
("v2.fetch_ddsql_tabular_query".to_owned(), false),
550552
("v2.cancel_data_deletion_request".to_owned(), false),
551553
("v2.create_data_deletion_request".to_owned(), false),
552554
("v2.get_data_deletion_requests".to_owned(), false),

0 commit comments

Comments
 (0)