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
4,356 changes: 4,356 additions & 0 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

49 changes: 49 additions & 0 deletions examples/v2_incidents_PatchIncidentImpact.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Patch an incident impact returns "OK" response
use chrono::{DateTime, Utc};
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_incidents::IncidentsAPI;
use datadog_api_client::datadogV2::api_incidents::PatchIncidentImpactOptionalParams;
use datadog_api_client::datadogV2::model::IncidentImpactCreateAttributes;
use datadog_api_client::datadogV2::model::IncidentImpactCreateData;
use datadog_api_client::datadogV2::model::IncidentImpactCreateRequest;
use datadog_api_client::datadogV2::model::IncidentImpactType;
use serde_json::Value;
use std::collections::BTreeMap;

#[tokio::main]
async fn main() {
let body = IncidentImpactCreateRequest::new(IncidentImpactCreateData::new(
IncidentImpactCreateAttributes::new(
"Service was unavailable for external users".to_string(),
DateTime::parse_from_rfc3339("2025-08-28T13:17:00+00:00")
.expect("Failed to parse datetime")
.with_timezone(&Utc),
)
.end_at(Some(
DateTime::parse_from_rfc3339("2025-08-29T13:17:00+00:00")
.expect("Failed to parse datetime")
.with_timezone(&Utc),
))
.fields(BTreeMap::from([(
"customers_impacted".to_string(),
Value::from("all"),
)])),
IncidentImpactType::INCIDENT_IMPACTS,
));
let mut configuration = datadog::Configuration::new();
configuration.set_unstable_operation_enabled("v2.PatchIncidentImpact", true);
let api = IncidentsAPI::with_config(configuration);
let resp = api
.patch_incident_impact(
"incident_id".to_string(),
"impact_id".to_string(),
body,
PatchIncidentImpactOptionalParams::default(),
)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}
49 changes: 49 additions & 0 deletions examples/v2_incidents_UpdateIncidentImpact.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Update an incident impact returns "OK" response
use chrono::{DateTime, Utc};
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_incidents::IncidentsAPI;
use datadog_api_client::datadogV2::api_incidents::UpdateIncidentImpactOptionalParams;
use datadog_api_client::datadogV2::model::IncidentImpactCreateAttributes;
use datadog_api_client::datadogV2::model::IncidentImpactCreateData;
use datadog_api_client::datadogV2::model::IncidentImpactCreateRequest;
use datadog_api_client::datadogV2::model::IncidentImpactType;
use serde_json::Value;
use std::collections::BTreeMap;

#[tokio::main]
async fn main() {
let body = IncidentImpactCreateRequest::new(IncidentImpactCreateData::new(
IncidentImpactCreateAttributes::new(
"Service was unavailable for external users".to_string(),
DateTime::parse_from_rfc3339("2025-08-28T13:17:00+00:00")
.expect("Failed to parse datetime")
.with_timezone(&Utc),
)
.end_at(Some(
DateTime::parse_from_rfc3339("2025-08-29T13:17:00+00:00")
.expect("Failed to parse datetime")
.with_timezone(&Utc),
))
.fields(BTreeMap::from([(
"customers_impacted".to_string(),
Value::from("all"),
)])),
IncidentImpactType::INCIDENT_IMPACTS,
));
let mut configuration = datadog::Configuration::new();
configuration.set_unstable_operation_enabled("v2.UpdateIncidentImpact", true);
let api = IncidentsAPI::with_config(configuration);
let resp = api
.update_incident_impact(
"incident_id".to_string(),
"impact_id".to_string(),
body,
UpdateIncidentImpactOptionalParams::default(),
)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}
49 changes: 49 additions & 0 deletions src/datadog/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -450,56 +450,105 @@ impl Default for Configuration {
("v2.create_global_incident_handle".to_owned(), false),
("v2.create_incident".to_owned(), false),
("v2.create_incident_attachment".to_owned(), false),
("v2.create_incident_configuration".to_owned(), false),
(
"v2.create_incident_google_chat_configuration".to_owned(),
false,
),
(
"v2.create_incident_google_meet_configuration".to_owned(),
false,
),
("v2.create_incident_impact_field".to_owned(), false),
("v2.create_incident_integration".to_owned(), false),
("v2.create_incident_notification_rule".to_owned(), false),
("v2.create_incident_notification_template".to_owned(), false),
("v2.create_incident_postmortem_attachment".to_owned(), false),
("v2.create_incident_postmortem_template".to_owned(), false),
("v2.create_incident_responder".to_owned(), false),
("v2.create_incident_rule".to_owned(), false),
("v2.create_incident_service_now_record".to_owned(), false),
("v2.create_incident_todo".to_owned(), false),
("v2.create_incident_type".to_owned(), false),
("v2.create_incident_user_defined_field".to_owned(), false),
("v2.create_incident_user_defined_role".to_owned(), false),
("v2.create_on_call_page_from_incident".to_owned(), false),
("v2.create_page_from_incident".to_owned(), false),
("v2.create_timestamp_override".to_owned(), false),
("v2.delete_global_incident_handle".to_owned(), false),
("v2.delete_incident".to_owned(), false),
("v2.delete_incident_attachment".to_owned(), false),
("v2.delete_incident_impact_field".to_owned(), false),
("v2.delete_incident_integration".to_owned(), false),
("v2.delete_incident_notification_rule".to_owned(), false),
("v2.delete_incident_notification_template".to_owned(), false),
("v2.delete_incident_postmortem_template".to_owned(), false),
("v2.delete_incident_responder".to_owned(), false),
("v2.delete_incident_rule".to_owned(), false),
("v2.delete_incident_todo".to_owned(), false),
("v2.delete_incident_type".to_owned(), false),
("v2.delete_incident_user_defined_field".to_owned(), false),
("v2.delete_incident_user_defined_role".to_owned(), false),
("v2.delete_timestamp_override".to_owned(), false),
("v2.get_global_incident_settings".to_owned(), false),
("v2.get_incident".to_owned(), false),
("v2.get_incident_ai_postmortem".to_owned(), false),
("v2.get_incident_integration".to_owned(), false),
("v2.get_incident_notification_rule".to_owned(), false),
("v2.get_incident_notification_template".to_owned(), false),
("v2.get_incident_postmortem_template".to_owned(), false),
("v2.get_incident_responder".to_owned(), false),
("v2.get_incident_rule".to_owned(), false),
("v2.get_incident_todo".to_owned(), false),
("v2.get_incident_type".to_owned(), false),
("v2.get_incident_user_defined_field".to_owned(), false),
("v2.get_incident_user_defined_role".to_owned(), false),
("v2.get_org_settings_by_incident_type".to_owned(), false),
("v2.import_incident".to_owned(), false),
("v2.link_page_to_incident".to_owned(), false),
("v2.list_global_incident_handles".to_owned(), false),
("v2.list_incident_attachments".to_owned(), false),
("v2.list_incident_impact_fields".to_owned(), false),
("v2.list_incident_integrations".to_owned(), false),
("v2.list_incident_notification_rules".to_owned(), false),
("v2.list_incident_notification_templates".to_owned(), false),
("v2.list_incident_postmortem_templates".to_owned(), false),
("v2.list_incident_responders".to_owned(), false),
("v2.list_incident_rules".to_owned(), false),
("v2.list_incidents".to_owned(), false),
("v2.list_incident_todos".to_owned(), false),
("v2.list_incident_types".to_owned(), false),
("v2.list_incident_user_defined_fields".to_owned(), false),
("v2.list_incident_user_defined_roles".to_owned(), false),
("v2.list_org_settings".to_owned(), false),
("v2.list_timestamp_overrides".to_owned(), false),
("v2.patch_incident_impact".to_owned(), false),
("v2.search_incidents".to_owned(), false),
("v2.update_global_incident_handle".to_owned(), false),
("v2.update_global_incident_settings".to_owned(), false),
("v2.update_incident".to_owned(), false),
("v2.update_incident_attachment".to_owned(), false),
("v2.update_incident_configuration".to_owned(), false),
(
"v2.update_incident_google_chat_configuration".to_owned(),
false,
),
(
"v2.update_incident_google_meet_configuration".to_owned(),
false,
),
("v2.update_incident_impact".to_owned(), false),
("v2.update_incident_impact_field".to_owned(), false),
("v2.update_incident_integration".to_owned(), false),
("v2.update_incident_notification_rule".to_owned(), false),
("v2.update_incident_notification_template".to_owned(), false),
("v2.update_incident_postmortem_template".to_owned(), false),
("v2.update_incident_rule".to_owned(), false),
("v2.update_incident_todo".to_owned(), false),
("v2.update_incident_type".to_owned(), false),
("v2.update_incident_user_defined_field".to_owned(), false),
("v2.update_incident_user_defined_role".to_owned(), false),
("v2.update_timestamp_override".to_owned(), false),
("v2.create_aws_account_ccm_config".to_owned(), false),
("v2.delete_aws_account_ccm_config".to_owned(), false),
("v2.get_aws_account_ccm_config".to_owned(), false),
Expand Down
Loading
Loading