Struct ActionConnectionAPI

Source
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

Source

pub fn new() -> Self

Source

pub fn with_config(config: Configuration) -> Self

Examples found in repository?
examples/v2_action-connection_RegisterAppKey.rs (line 8)
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
Hide additional examples
examples/v2_action-connection_UnregisterAppKey.rs (line 8)
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}
examples/v2_action-connection_GetActionConnection.rs (line 9)
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}
examples/v2_action-connection_GetAppKeyRegistration.rs (line 8)
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}
examples/v2_action-connection_ListAppKeyRegistrations.rs (line 9)
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}
examples/v2_action-connection_DeleteActionConnection.rs (line 11)
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}
Source

pub fn with_client_and_config( config: Configuration, client: ClientWithMiddleware, ) -> Self

Source

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?
examples/v2_action-connection_CreateActionConnection.rs (line 34)
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}
Source

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.

Source

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?
examples/v2_action-connection_DeleteActionConnection.rs (line 13)
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}
Source

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.

Source

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?
examples/v2_action-connection_GetActionConnection.rs (line 11)
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}
Source

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.

Source

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?
examples/v2_action-connection_GetAppKeyRegistration.rs (line 10)
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}
Source

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

Source

pub async fn list_app_key_registrations( &self, params: ListAppKeyRegistrationsOptionalParams, ) -> Result<ListAppKeyRegistrationsResponse, Error<ListAppKeyRegistrationsError>>

List App Key Registrations

Examples found in repository?
examples/v2_action-connection_ListAppKeyRegistrations.rs (line 11)
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}
Source

pub async fn list_app_key_registrations_with_http_info( &self, params: ListAppKeyRegistrationsOptionalParams, ) -> Result<ResponseContent<ListAppKeyRegistrationsResponse>, Error<ListAppKeyRegistrationsError>>

List App Key Registrations

Source

pub async fn register_app_key( &self, app_key_id: String, ) -> Result<RegisterAppKeyResponse, Error<RegisterAppKeyError>>

Register a new App Key

Examples found in repository?
examples/v2_action-connection_RegisterAppKey.rs (line 10)
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}
Source

pub async fn register_app_key_with_http_info( &self, app_key_id: String, ) -> Result<ResponseContent<RegisterAppKeyResponse>, Error<RegisterAppKeyError>>

Register a new App Key

Source

pub async fn unregister_app_key( &self, app_key_id: String, ) -> Result<(), Error<UnregisterAppKeyError>>

Unregister an App Key

Examples found in repository?
examples/v2_action-connection_UnregisterAppKey.rs (line 10)
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}
Source

pub async fn unregister_app_key_with_http_info( &self, app_key_id: String, ) -> Result<ResponseContent<()>, Error<UnregisterAppKeyError>>

Unregister an App Key

Source

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?
examples/v2_action-connection_UpdateActionConnection.rs (line 37)
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}
Source

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

Source§

fn clone(&self) -> ActionConnectionAPI

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ActionConnectionAPI

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ActionConnectionAPI

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,