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?
6async fn main() {
7 let configuration = datadog::Configuration::new();
8 let api = ActionConnectionAPI::with_config(configuration);
9 let resp = api
10 .register_app_key("b7feea52-994e-4714-a100-1bd9eff5aee1".to_string())
11 .await;
12 if let Ok(value) = resp {
13 println!("{:#?}", value);
14 } else {
15 println!("{:#?}", resp.unwrap_err());
16 }
17}
More examples
6async fn main() {
7 let configuration = datadog::Configuration::new();
8 let api = ActionConnectionAPI::with_config(configuration);
9 let resp = api
10 .unregister_app_key("57cc69ae-9214-4ecc-8df8-43ecc1d92d99".to_string())
11 .await;
12 if let Ok(value) = resp {
13 println!("{:#?}", value);
14 } else {
15 println!("{:#?}", resp.unwrap_err());
16 }
17}
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}
6async fn main() {
7 let configuration = datadog::Configuration::new();
8 let api = ActionConnectionAPI::with_config(configuration);
9 let resp = api
10 .get_app_key_registration("b7feea52-994e-4714-a100-1bd9eff5aee1".to_string())
11 .await;
12 if let Ok(value) = resp {
13 println!("{:#?}", value);
14 } else {
15 println!("{:#?}", resp.unwrap_err());
16 }
17}
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = ActionConnectionAPI::with_config(configuration);
10 let resp = api
11 .list_app_key_registrations(ListAppKeyRegistrationsOptionalParams::default())
12 .await;
13 if let Ok(value) = resp {
14 println!("{:#?}", value);
15 } else {
16 println!("{:#?}", resp.unwrap_err());
17 }
18}
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}
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. This API requires a registered application key.
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. This API requires a registered application key.
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. This API requires a registered application key.
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. This API requires a registered application key.
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. This API requires a registered application key.
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. This API requires a registered application key.
Sourcepub async fn get_app_key_registration(
&self,
app_key_id: String,
) -> Result<GetAppKeyRegistrationResponse, Error<GetAppKeyRegistrationError>>
pub async fn get_app_key_registration( &self, app_key_id: String, ) -> Result<GetAppKeyRegistrationResponse, Error<GetAppKeyRegistrationError>>
Get an existing App Key Registration
Examples found in repository?
6async fn main() {
7 let configuration = datadog::Configuration::new();
8 let api = ActionConnectionAPI::with_config(configuration);
9 let resp = api
10 .get_app_key_registration("b7feea52-994e-4714-a100-1bd9eff5aee1".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_app_key_registration_with_http_info(
&self,
app_key_id: String,
) -> Result<ResponseContent<GetAppKeyRegistrationResponse>, Error<GetAppKeyRegistrationError>>
pub async fn get_app_key_registration_with_http_info( &self, app_key_id: String, ) -> Result<ResponseContent<GetAppKeyRegistrationResponse>, Error<GetAppKeyRegistrationError>>
Get an existing App Key Registration
Sourcepub async fn list_app_key_registrations(
&self,
params: ListAppKeyRegistrationsOptionalParams,
) -> Result<ListAppKeyRegistrationsResponse, Error<ListAppKeyRegistrationsError>>
pub async fn list_app_key_registrations( &self, params: ListAppKeyRegistrationsOptionalParams, ) -> Result<ListAppKeyRegistrationsResponse, Error<ListAppKeyRegistrationsError>>
List App Key Registrations
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 .list_app_key_registrations(ListAppKeyRegistrationsOptionalParams::default())
12 .await;
13 if let Ok(value) = resp {
14 println!("{:#?}", value);
15 } else {
16 println!("{:#?}", resp.unwrap_err());
17 }
18}
Sourcepub async fn list_app_key_registrations_with_http_info(
&self,
params: ListAppKeyRegistrationsOptionalParams,
) -> Result<ResponseContent<ListAppKeyRegistrationsResponse>, Error<ListAppKeyRegistrationsError>>
pub async fn list_app_key_registrations_with_http_info( &self, params: ListAppKeyRegistrationsOptionalParams, ) -> Result<ResponseContent<ListAppKeyRegistrationsResponse>, Error<ListAppKeyRegistrationsError>>
List App Key Registrations
Sourcepub async fn register_app_key(
&self,
app_key_id: String,
) -> Result<RegisterAppKeyResponse, Error<RegisterAppKeyError>>
pub async fn register_app_key( &self, app_key_id: String, ) -> Result<RegisterAppKeyResponse, Error<RegisterAppKeyError>>
Register a new App Key
Examples found in repository?
6async fn main() {
7 let configuration = datadog::Configuration::new();
8 let api = ActionConnectionAPI::with_config(configuration);
9 let resp = api
10 .register_app_key("b7feea52-994e-4714-a100-1bd9eff5aee1".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 register_app_key_with_http_info(
&self,
app_key_id: String,
) -> Result<ResponseContent<RegisterAppKeyResponse>, Error<RegisterAppKeyError>>
pub async fn register_app_key_with_http_info( &self, app_key_id: String, ) -> Result<ResponseContent<RegisterAppKeyResponse>, Error<RegisterAppKeyError>>
Register a new App Key
Sourcepub async fn unregister_app_key(
&self,
app_key_id: String,
) -> Result<(), Error<UnregisterAppKeyError>>
pub async fn unregister_app_key( &self, app_key_id: String, ) -> Result<(), Error<UnregisterAppKeyError>>
Unregister an App Key
Examples found in repository?
6async fn main() {
7 let configuration = datadog::Configuration::new();
8 let api = ActionConnectionAPI::with_config(configuration);
9 let resp = api
10 .unregister_app_key("57cc69ae-9214-4ecc-8df8-43ecc1d92d99".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 unregister_app_key_with_http_info(
&self,
app_key_id: String,
) -> Result<ResponseContent<()>, Error<UnregisterAppKeyError>>
pub async fn unregister_app_key_with_http_info( &self, app_key_id: String, ) -> Result<ResponseContent<()>, Error<UnregisterAppKeyError>>
Unregister an App Key
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. This API requires a registered application key.
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. This API requires a registered application key.
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