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_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}
More examples
Hide additional examples
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}
examples/v2_action-connection_CreateActionConnection.rs (line 33)
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}
examples/v2_action-connection_UpdateActionConnection.rs (line 35)
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 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

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

Source

pub async fn delete_action_connection( &self, connection_id: String, ) -> Result<(), Error<DeleteActionConnectionError>>

Delete an existing Action Connection

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

Source

pub async fn get_action_connection( &self, connection_id: String, ) -> Result<GetActionConnectionResponse, Error<GetActionConnectionError>>

Get an existing Action Connection

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

Source

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?
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

Trait Implementations§

Source§

impl Clone for ActionConnectionAPI

Source§

fn clone(&self) -> ActionConnectionAPI

Returns a copy 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,

Source§

impl<T> MaybeSendSync for T