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
3,783 changes: 3,782 additions & 1 deletion .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion LICENSE-3rdparty.csv
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jni-sys,https://github.com/jni-rs/jni-sys,MIT OR Apache-2.0,"Steven Fackler <sfa
jni-sys-macros,https://github.com/jni-rs/jni-sys,MIT OR Apache-2.0,Robert Bragg <robert@sixbynine.org>
js-sys,https://github.com/wasm-bindgen/wasm-bindgen/tree/master/crates/js-sys,MIT OR Apache-2.0,The wasm-bindgen Developers
lazy_static,https://github.com/rust-lang-nursery/lazy-static.rs,MIT OR Apache-2.0,Marvin Löbel <loebel.marvin@gmail.com>
libc,https://github.com/rust-lang/libc,MIT OR Apache-2.0,The Rust Project Developers
libc,https://github.com/rust-lang/libc,MIT OR Apache-2.0,The libc Authors
linux-raw-sys,https://github.com/sunfishcode/linux-raw-sys,Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT,Dan Gohman <dev@sunfishcode.online>
litemap,https://github.com/unicode-org/icu4x,Unicode-3.0,The ICU4X Project Developers
lock_api,https://github.com/Amanieu/parking_lot,MIT OR Apache-2.0,Amanieu d'Antras <amanieu@gmail.com>
Expand Down
51 changes: 51 additions & 0 deletions examples/v2_incidents_PatchIncidentImpact.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// 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::PatchIncidentImpactOptionalParams;
use datadog_api_client::datadogV2::model::IncidentImpactPatchAttributes;
use datadog_api_client::datadogV2::model::IncidentImpactPatchData;
use datadog_api_client::datadogV2::model::IncidentImpactPatchRequest;
use datadog_api_client::datadogV2::model::IncidentImpactType;
use serde_json::Value;
use std::collections::BTreeMap;

#[tokio::main]
async fn main() {
let body = IncidentImpactPatchRequest::new(
IncidentImpactPatchData::new(IncidentImpactType::INCIDENT_IMPACTS).attributes(
IncidentImpactPatchAttributes::new()
.description("Service was unavailable for external users".to_string())
.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"),
)]))
.start_at(
DateTime::parse_from_rfc3339("2025-08-28T13:17:00+00:00")
.expect("Failed to parse datetime")
.with_timezone(&Utc),
),
),
);
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());
}
}
43 changes: 43 additions & 0 deletions src/datadog/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,61 +588,104 @@ 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_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