pub struct ActionConnectionAPI { /* private fields */ }
Expand description
Action connections extend your installed integrations and allow you to take action in your third-party systems (e.g. AWS, GitLab, and Statuspage) with Datadog’s Workflow Automation and App Builder products.
Datadog’s Integrations automatically provide authentication for Slack, Microsoft Teams, PagerDuty, Opsgenie, JIRA, GitHub, and Statuspage. You do not need additional connections in order to access these tools within Workflow Automation and App Builder.
We offer granular access control for editing and resolving connections.
Implementations§
Source§impl ActionConnectionAPI
impl ActionConnectionAPI
pub fn new() -> Self
Sourcepub fn with_config(config: Configuration) -> Self
pub fn with_config(config: Configuration) -> Self
Examples found in repository?
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = ActionConnectionAPI::with_config(configuration);
10 let resp = api
11 .get_action_connection("cb460d51-3c88-4e87-adac-d47131d0423d".to_string())
12 .await;
13 if let Ok(value) = resp {
14 println!("{:#?}", value);
15 } else {
16 println!("{:#?}", resp.unwrap_err());
17 }
18}
More examples
7async fn main() {
8 // there is a valid "action_connection" in the system
9 let action_connection_data_id = std::env::var("ACTION_CONNECTION_DATA_ID").unwrap();
10 let configuration = datadog::Configuration::new();
11 let api = ActionConnectionAPI::with_config(configuration);
12 let resp = api
13 .delete_action_connection(action_connection_data_id.clone())
14 .await;
15 if let Ok(value) = resp {
16 println!("{:#?}", value);
17 } else {
18 println!("{:#?}", resp.unwrap_err());
19 }
20}
17async fn main() {
18 let body = CreateActionConnectionRequest::new(ActionConnectionData::new(
19 ActionConnectionAttributes::new(
20 ActionConnectionIntegration::AWSIntegration(Box::new(AWSIntegration::new(
21 AWSCredentials::AWSAssumeRole(Box::new(AWSAssumeRole::new(
22 "123456789123".to_string(),
23 "MyRoleUpdated".to_string(),
24 AWSAssumeRoleType::AWSASSUMEROLE,
25 ))),
26 AWSIntegrationType::AWS,
27 ))),
28 "Cassette Connection exampleactionconnection".to_string(),
29 ),
30 ActionConnectionDataType::ACTION_CONNECTION,
31 ));
32 let configuration = datadog::Configuration::new();
33 let api = ActionConnectionAPI::with_config(configuration);
34 let resp = api.create_action_connection(body).await;
35 if let Ok(value) = resp {
36 println!("{:#?}", value);
37 } else {
38 println!("{:#?}", resp.unwrap_err());
39 }
40}
17async fn main() {
18 let body = UpdateActionConnectionRequest::new(ActionConnectionDataUpdate::new(
19 ActionConnectionAttributesUpdate::new()
20 .integration(ActionConnectionIntegrationUpdate::AWSIntegrationUpdate(
21 Box::new(
22 AWSIntegrationUpdate::new(AWSIntegrationType::AWS).credentials(
23 AWSCredentialsUpdate::AWSAssumeRoleUpdate(Box::new(
24 AWSAssumeRoleUpdate::new(AWSAssumeRoleType::AWSASSUMEROLE)
25 .account_id("123456789123".to_string())
26 .role("MyRoleUpdated".to_string()),
27 )),
28 ),
29 ),
30 ))
31 .name("Cassette Connection".to_string()),
32 ActionConnectionDataType::ACTION_CONNECTION,
33 ));
34 let configuration = datadog::Configuration::new();
35 let api = ActionConnectionAPI::with_config(configuration);
36 let resp = api
37 .update_action_connection("cb460d51-3c88-4e87-adac-d47131d0423d".to_string(), body)
38 .await;
39 if let Ok(value) = resp {
40 println!("{:#?}", value);
41 } else {
42 println!("{:#?}", resp.unwrap_err());
43 }
44}
pub fn with_client_and_config( config: Configuration, client: ClientWithMiddleware, ) -> Self
Sourcepub async fn create_action_connection(
&self,
body: CreateActionConnectionRequest,
) -> Result<CreateActionConnectionResponse, Error<CreateActionConnectionError>>
pub async fn create_action_connection( &self, body: CreateActionConnectionRequest, ) -> Result<CreateActionConnectionResponse, Error<CreateActionConnectionError>>
Create a new Action Connection
Examples found in repository?
17async fn main() {
18 let body = CreateActionConnectionRequest::new(ActionConnectionData::new(
19 ActionConnectionAttributes::new(
20 ActionConnectionIntegration::AWSIntegration(Box::new(AWSIntegration::new(
21 AWSCredentials::AWSAssumeRole(Box::new(AWSAssumeRole::new(
22 "123456789123".to_string(),
23 "MyRoleUpdated".to_string(),
24 AWSAssumeRoleType::AWSASSUMEROLE,
25 ))),
26 AWSIntegrationType::AWS,
27 ))),
28 "Cassette Connection exampleactionconnection".to_string(),
29 ),
30 ActionConnectionDataType::ACTION_CONNECTION,
31 ));
32 let configuration = datadog::Configuration::new();
33 let api = ActionConnectionAPI::with_config(configuration);
34 let resp = api.create_action_connection(body).await;
35 if let Ok(value) = resp {
36 println!("{:#?}", value);
37 } else {
38 println!("{:#?}", resp.unwrap_err());
39 }
40}
Sourcepub async fn create_action_connection_with_http_info(
&self,
body: CreateActionConnectionRequest,
) -> Result<ResponseContent<CreateActionConnectionResponse>, Error<CreateActionConnectionError>>
pub async fn create_action_connection_with_http_info( &self, body: CreateActionConnectionRequest, ) -> Result<ResponseContent<CreateActionConnectionResponse>, Error<CreateActionConnectionError>>
Create a new Action Connection
Sourcepub async fn delete_action_connection(
&self,
connection_id: String,
) -> Result<(), Error<DeleteActionConnectionError>>
pub async fn delete_action_connection( &self, connection_id: String, ) -> Result<(), Error<DeleteActionConnectionError>>
Delete an existing Action Connection
Examples found in repository?
7async fn main() {
8 // there is a valid "action_connection" in the system
9 let action_connection_data_id = std::env::var("ACTION_CONNECTION_DATA_ID").unwrap();
10 let configuration = datadog::Configuration::new();
11 let api = ActionConnectionAPI::with_config(configuration);
12 let resp = api
13 .delete_action_connection(action_connection_data_id.clone())
14 .await;
15 if let Ok(value) = resp {
16 println!("{:#?}", value);
17 } else {
18 println!("{:#?}", resp.unwrap_err());
19 }
20}
Sourcepub async fn delete_action_connection_with_http_info(
&self,
connection_id: String,
) -> Result<ResponseContent<()>, Error<DeleteActionConnectionError>>
pub async fn delete_action_connection_with_http_info( &self, connection_id: String, ) -> Result<ResponseContent<()>, Error<DeleteActionConnectionError>>
Delete an existing Action Connection
Sourcepub async fn get_action_connection(
&self,
connection_id: String,
) -> Result<GetActionConnectionResponse, Error<GetActionConnectionError>>
pub async fn get_action_connection( &self, connection_id: String, ) -> Result<GetActionConnectionResponse, Error<GetActionConnectionError>>
Get an existing Action Connection
Examples found in repository?
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = ActionConnectionAPI::with_config(configuration);
10 let resp = api
11 .get_action_connection("cb460d51-3c88-4e87-adac-d47131d0423d".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 get_action_connection_with_http_info(
&self,
connection_id: String,
) -> Result<ResponseContent<GetActionConnectionResponse>, Error<GetActionConnectionError>>
pub async fn get_action_connection_with_http_info( &self, connection_id: String, ) -> Result<ResponseContent<GetActionConnectionResponse>, Error<GetActionConnectionError>>
Get an existing Action Connection
Sourcepub async fn update_action_connection(
&self,
connection_id: String,
body: UpdateActionConnectionRequest,
) -> Result<UpdateActionConnectionResponse, Error<UpdateActionConnectionError>>
pub async fn update_action_connection( &self, connection_id: String, body: UpdateActionConnectionRequest, ) -> Result<UpdateActionConnectionResponse, Error<UpdateActionConnectionError>>
Update an existing Action Connection
Examples found in repository?
17async fn main() {
18 let body = UpdateActionConnectionRequest::new(ActionConnectionDataUpdate::new(
19 ActionConnectionAttributesUpdate::new()
20 .integration(ActionConnectionIntegrationUpdate::AWSIntegrationUpdate(
21 Box::new(
22 AWSIntegrationUpdate::new(AWSIntegrationType::AWS).credentials(
23 AWSCredentialsUpdate::AWSAssumeRoleUpdate(Box::new(
24 AWSAssumeRoleUpdate::new(AWSAssumeRoleType::AWSASSUMEROLE)
25 .account_id("123456789123".to_string())
26 .role("MyRoleUpdated".to_string()),
27 )),
28 ),
29 ),
30 ))
31 .name("Cassette Connection".to_string()),
32 ActionConnectionDataType::ACTION_CONNECTION,
33 ));
34 let configuration = datadog::Configuration::new();
35 let api = ActionConnectionAPI::with_config(configuration);
36 let resp = api
37 .update_action_connection("cb460d51-3c88-4e87-adac-d47131d0423d".to_string(), body)
38 .await;
39 if let Ok(value) = resp {
40 println!("{:#?}", value);
41 } else {
42 println!("{:#?}", resp.unwrap_err());
43 }
44}
Sourcepub async fn update_action_connection_with_http_info(
&self,
connection_id: String,
body: UpdateActionConnectionRequest,
) -> Result<ResponseContent<UpdateActionConnectionResponse>, Error<UpdateActionConnectionError>>
pub async fn update_action_connection_with_http_info( &self, connection_id: String, body: UpdateActionConnectionRequest, ) -> Result<ResponseContent<UpdateActionConnectionResponse>, Error<UpdateActionConnectionError>>
Update an existing Action Connection
Trait Implementations§
Source§impl Clone for ActionConnectionAPI
impl Clone for ActionConnectionAPI
Source§fn clone(&self) -> ActionConnectionAPI
fn clone(&self) -> ActionConnectionAPI
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more