v1_webhooks_integration_UpdateWebhooksIntegrationCustomVariable/
v1_webhooks-integration_UpdateWebhooksIntegrationCustomVariable.rs1use datadog_api_client::datadog;
3use datadog_api_client::datadogV1::api_webhooks_integration::WebhooksIntegrationAPI;
4use datadog_api_client::datadogV1::model::WebhooksIntegrationCustomVariableUpdateRequest;
5
6#[tokio::main]
7async fn main() {
8 let webhook_custom_variable_name = std::env::var("WEBHOOK_CUSTOM_VARIABLE_NAME").unwrap();
10 let body =
11 WebhooksIntegrationCustomVariableUpdateRequest::new().value("variable-updated".to_string());
12 let configuration = datadog::Configuration::new();
13 let api = WebhooksIntegrationAPI::with_config(configuration);
14 let resp = api
15 .update_webhooks_integration_custom_variable(webhook_custom_variable_name.clone(), body)
16 .await;
17 if let Ok(value) = resp {
18 println!("{:#?}", value);
19 } else {
20 println!("{:#?}", resp.unwrap_err());
21 }
22}