v1_slack_integration_UpdateSlackIntegrationChannel/
v1_slack-integration_UpdateSlackIntegrationChannel.rs1use datadog_api_client::datadog;
3use datadog_api_client::datadogV1::api_slack_integration::SlackIntegrationAPI;
4use datadog_api_client::datadogV1::model::SlackIntegrationChannel;
5use datadog_api_client::datadogV1::model::SlackIntegrationChannelDisplay;
6
7#[tokio::main]
8async fn main() {
9 let body = SlackIntegrationChannel::new()
10 .display(
11 SlackIntegrationChannelDisplay::new()
12 .message(true)
13 .mute_buttons(false)
14 .notified(true)
15 .snapshot(true)
16 .tags(true),
17 )
18 .name("#general".to_string());
19 let configuration = datadog::Configuration::new();
20 let api = SlackIntegrationAPI::with_config(configuration);
21 let resp = api
22 .update_slack_integration_channel(
23 "account_name".to_string(),
24 "channel_name".to_string(),
25 body,
26 )
27 .await;
28 if let Ok(value) = resp {
29 println!("{:#?}", value);
30 } else {
31 println!("{:#?}", resp.unwrap_err());
32 }
33}