pub struct SlackIntegrationAPI { /* private fields */ }
Expand description
Configure your Datadog-Slack integration directly through the Datadog API.
Implementations§
Source§impl SlackIntegrationAPI
impl SlackIntegrationAPI
pub fn new() -> Self
Sourcepub fn with_config(config: Configuration) -> Self
pub fn with_config(config: Configuration) -> Self
Examples found in repository?
examples/v1_slack-integration_GetSlackIntegrationChannels.rs (line 8)
6async fn main() {
7 let configuration = datadog::Configuration::new();
8 let api = SlackIntegrationAPI::with_config(configuration);
9 let resp = api
10 .get_slack_integration_channels("account_name".to_string())
11 .await;
12 if let Ok(value) = resp {
13 println!("{:#?}", value);
14 } else {
15 println!("{:#?}", resp.unwrap_err());
16 }
17}
More examples
examples/v1_slack-integration_GetSlackIntegrationChannel.rs (line 8)
6async fn main() {
7 let configuration = datadog::Configuration::new();
8 let api = SlackIntegrationAPI::with_config(configuration);
9 let resp = api
10 .get_slack_integration_channel("account_name".to_string(), "channel_name".to_string())
11 .await;
12 if let Ok(value) = resp {
13 println!("{:#?}", value);
14 } else {
15 println!("{:#?}", resp.unwrap_err());
16 }
17}
examples/v1_slack-integration_RemoveSlackIntegrationChannel.rs (line 9)
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = SlackIntegrationAPI::with_config(configuration);
10 let resp = api
11 .remove_slack_integration_channel("account_name".to_string(), "channel_name".to_string())
12 .await;
13 if let Ok(value) = resp {
14 println!("{:#?}", value);
15 } else {
16 println!("{:#?}", resp.unwrap_err());
17 }
18}
examples/v1_slack-integration_CreateSlackIntegrationChannel.rs (line 20)
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 .create_slack_integration_channel("account_name".to_string(), body)
23 .await;
24 if let Ok(value) = resp {
25 println!("{:#?}", value);
26 } else {
27 println!("{:#?}", resp.unwrap_err());
28 }
29}
examples/v1_slack-integration_UpdateSlackIntegrationChannel.rs (line 20)
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}
pub fn with_client_and_config( config: Configuration, client: ClientWithMiddleware, ) -> Self
Sourcepub async fn create_slack_integration_channel(
&self,
account_name: String,
body: SlackIntegrationChannel,
) -> Result<SlackIntegrationChannel, Error<CreateSlackIntegrationChannelError>>
pub async fn create_slack_integration_channel( &self, account_name: String, body: SlackIntegrationChannel, ) -> Result<SlackIntegrationChannel, Error<CreateSlackIntegrationChannelError>>
Add a channel to your Datadog-Slack integration.
Examples found in repository?
examples/v1_slack-integration_CreateSlackIntegrationChannel.rs (line 22)
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 .create_slack_integration_channel("account_name".to_string(), body)
23 .await;
24 if let Ok(value) = resp {
25 println!("{:#?}", value);
26 } else {
27 println!("{:#?}", resp.unwrap_err());
28 }
29}
Sourcepub async fn create_slack_integration_channel_with_http_info(
&self,
account_name: String,
body: SlackIntegrationChannel,
) -> Result<ResponseContent<SlackIntegrationChannel>, Error<CreateSlackIntegrationChannelError>>
pub async fn create_slack_integration_channel_with_http_info( &self, account_name: String, body: SlackIntegrationChannel, ) -> Result<ResponseContent<SlackIntegrationChannel>, Error<CreateSlackIntegrationChannelError>>
Add a channel to your Datadog-Slack integration.
Sourcepub async fn get_slack_integration_channel(
&self,
account_name: String,
channel_name: String,
) -> Result<SlackIntegrationChannel, Error<GetSlackIntegrationChannelError>>
pub async fn get_slack_integration_channel( &self, account_name: String, channel_name: String, ) -> Result<SlackIntegrationChannel, Error<GetSlackIntegrationChannelError>>
Get a channel configured for your Datadog-Slack integration.
Examples found in repository?
examples/v1_slack-integration_GetSlackIntegrationChannel.rs (line 10)
6async fn main() {
7 let configuration = datadog::Configuration::new();
8 let api = SlackIntegrationAPI::with_config(configuration);
9 let resp = api
10 .get_slack_integration_channel("account_name".to_string(), "channel_name".to_string())
11 .await;
12 if let Ok(value) = resp {
13 println!("{:#?}", value);
14 } else {
15 println!("{:#?}", resp.unwrap_err());
16 }
17}
Sourcepub async fn get_slack_integration_channel_with_http_info(
&self,
account_name: String,
channel_name: String,
) -> Result<ResponseContent<SlackIntegrationChannel>, Error<GetSlackIntegrationChannelError>>
pub async fn get_slack_integration_channel_with_http_info( &self, account_name: String, channel_name: String, ) -> Result<ResponseContent<SlackIntegrationChannel>, Error<GetSlackIntegrationChannelError>>
Get a channel configured for your Datadog-Slack integration.
Sourcepub async fn get_slack_integration_channels(
&self,
account_name: String,
) -> Result<Vec<SlackIntegrationChannel>, Error<GetSlackIntegrationChannelsError>>
pub async fn get_slack_integration_channels( &self, account_name: String, ) -> Result<Vec<SlackIntegrationChannel>, Error<GetSlackIntegrationChannelsError>>
Get a list of all channels configured for your Datadog-Slack integration.
Examples found in repository?
examples/v1_slack-integration_GetSlackIntegrationChannels.rs (line 10)
6async fn main() {
7 let configuration = datadog::Configuration::new();
8 let api = SlackIntegrationAPI::with_config(configuration);
9 let resp = api
10 .get_slack_integration_channels("account_name".to_string())
11 .await;
12 if let Ok(value) = resp {
13 println!("{:#?}", value);
14 } else {
15 println!("{:#?}", resp.unwrap_err());
16 }
17}
Sourcepub async fn get_slack_integration_channels_with_http_info(
&self,
account_name: String,
) -> Result<ResponseContent<Vec<SlackIntegrationChannel>>, Error<GetSlackIntegrationChannelsError>>
pub async fn get_slack_integration_channels_with_http_info( &self, account_name: String, ) -> Result<ResponseContent<Vec<SlackIntegrationChannel>>, Error<GetSlackIntegrationChannelsError>>
Get a list of all channels configured for your Datadog-Slack integration.
Sourcepub async fn remove_slack_integration_channel(
&self,
account_name: String,
channel_name: String,
) -> Result<(), Error<RemoveSlackIntegrationChannelError>>
pub async fn remove_slack_integration_channel( &self, account_name: String, channel_name: String, ) -> Result<(), Error<RemoveSlackIntegrationChannelError>>
Remove a channel from your Datadog-Slack integration.
Examples found in repository?
examples/v1_slack-integration_RemoveSlackIntegrationChannel.rs (line 11)
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = SlackIntegrationAPI::with_config(configuration);
10 let resp = api
11 .remove_slack_integration_channel("account_name".to_string(), "channel_name".to_string())
12 .await;
13 if let Ok(value) = resp {
14 println!("{:#?}", value);
15 } else {
16 println!("{:#?}", resp.unwrap_err());
17 }
18}
Sourcepub async fn remove_slack_integration_channel_with_http_info(
&self,
account_name: String,
channel_name: String,
) -> Result<ResponseContent<()>, Error<RemoveSlackIntegrationChannelError>>
pub async fn remove_slack_integration_channel_with_http_info( &self, account_name: String, channel_name: String, ) -> Result<ResponseContent<()>, Error<RemoveSlackIntegrationChannelError>>
Remove a channel from your Datadog-Slack integration.
Sourcepub async fn update_slack_integration_channel(
&self,
account_name: String,
channel_name: String,
body: SlackIntegrationChannel,
) -> Result<SlackIntegrationChannel, Error<UpdateSlackIntegrationChannelError>>
pub async fn update_slack_integration_channel( &self, account_name: String, channel_name: String, body: SlackIntegrationChannel, ) -> Result<SlackIntegrationChannel, Error<UpdateSlackIntegrationChannelError>>
Update a channel used in your Datadog-Slack integration.
Examples found in repository?
examples/v1_slack-integration_UpdateSlackIntegrationChannel.rs (lines 22-26)
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}
Sourcepub async fn update_slack_integration_channel_with_http_info(
&self,
account_name: String,
channel_name: String,
body: SlackIntegrationChannel,
) -> Result<ResponseContent<SlackIntegrationChannel>, Error<UpdateSlackIntegrationChannelError>>
pub async fn update_slack_integration_channel_with_http_info( &self, account_name: String, channel_name: String, body: SlackIntegrationChannel, ) -> Result<ResponseContent<SlackIntegrationChannel>, Error<UpdateSlackIntegrationChannelError>>
Update a channel used in your Datadog-Slack integration.
Trait Implementations§
Source§impl Clone for SlackIntegrationAPI
impl Clone for SlackIntegrationAPI
Source§fn clone(&self) -> SlackIntegrationAPI
fn clone(&self) -> SlackIntegrationAPI
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SlackIntegrationAPI
impl Debug for SlackIntegrationAPI
Auto Trait Implementations§
impl Freeze for SlackIntegrationAPI
impl !RefUnwindSafe for SlackIntegrationAPI
impl Send for SlackIntegrationAPI
impl Sync for SlackIntegrationAPI
impl Unpin for SlackIntegrationAPI
impl !UnwindSafe for SlackIntegrationAPI
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more