Struct AWSIntegrationAPI

Source
pub struct AWSIntegrationAPI { /* private fields */ }
Expand description

Configure your Datadog-AWS integration directly through the Datadog API. For more information, see the AWS integration page.

Implementations§

Source§

impl AWSIntegrationAPI

Source

pub fn new() -> Self

Source

pub fn with_config(config: Configuration) -> Self

Examples found in repository?
examples/v1_aws-integration_ListAWSEventBridgeSources.rs (line 8)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = AWSIntegrationAPI::with_config(configuration);
9    let resp = api.list_aws_event_bridge_sources().await;
10    if let Ok(value) = resp {
11        println!("{:#?}", value);
12    } else {
13        println!("{:#?}", resp.unwrap_err());
14    }
15}
More examples
Hide additional examples
examples/v1_aws-integration_ListAvailableAWSNamespaces.rs (line 8)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = AWSIntegrationAPI::with_config(configuration);
9    let resp = api.list_available_aws_namespaces().await;
10    if let Ok(value) = resp {
11        println!("{:#?}", value);
12    } else {
13        println!("{:#?}", resp.unwrap_err());
14    }
15}
examples/v1_aws-integration_ListAWSTagFilters.rs (line 8)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = AWSIntegrationAPI::with_config(configuration);
9    let resp = api.list_aws_tag_filters("account_id".to_string()).await;
10    if let Ok(value) = resp {
11        println!("{:#?}", value);
12    } else {
13        println!("{:#?}", resp.unwrap_err());
14    }
15}
examples/v1_aws-integration_ListAWSAccounts.rs (line 9)
7async fn main() {
8    let configuration = datadog::Configuration::new();
9    let api = AWSIntegrationAPI::with_config(configuration);
10    let resp = api
11        .list_aws_accounts(ListAWSAccountsOptionalParams::default())
12        .await;
13    if let Ok(value) = resp {
14        println!("{:#?}", value);
15    } else {
16        println!("{:#?}", resp.unwrap_err());
17    }
18}
examples/v1_aws-integration_DeleteAWSTagFilter.rs (line 13)
8async fn main() {
9    let body = AWSTagFilterDeleteRequest::new()
10        .account_id("FAKEAC0FAKEAC2FAKEAC".to_string())
11        .namespace(AWSNamespace::ELB);
12    let configuration = datadog::Configuration::new();
13    let api = AWSIntegrationAPI::with_config(configuration);
14    let resp = api.delete_aws_tag_filter(body).await;
15    if let Ok(value) = resp {
16        println!("{:#?}", value);
17    } else {
18        println!("{:#?}", resp.unwrap_err());
19    }
20}
examples/v1_aws-integration_DeleteAWSAccount.rs (line 12)
7async fn main() {
8    let body = AWSAccountDeleteRequest::new()
9        .account_id("163662907100".to_string())
10        .role_name("DatadogAWSIntegrationRole".to_string());
11    let configuration = datadog::Configuration::new();
12    let api = AWSIntegrationAPI::with_config(configuration);
13    let resp = api.delete_aws_account(body).await;
14    if let Ok(value) = resp {
15        println!("{:#?}", value);
16    } else {
17        println!("{:#?}", resp.unwrap_err());
18    }
19}
Source

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

Source

pub async fn create_aws_account( &self, body: AWSAccount, ) -> Result<AWSAccountCreateResponse, Error<CreateAWSAccountError>>

Create a Datadog-Amazon Web Services integration. Using the POST method updates your integration configuration by adding your new configuration to the existing one in your Datadog organization. A unique AWS Account ID for role based authentication.

Examples found in repository?
examples/v1_aws-integration_CreateAWSAccount.rs (line 21)
8async fn main() {
9    let body = AWSAccount::new()
10        .account_id("163662907100".to_string())
11        .account_specific_namespace_rules(BTreeMap::from([("auto_scaling".to_string(), false)]))
12        .cspm_resource_collection_enabled(true)
13        .excluded_regions(vec!["us-east-1".to_string(), "us-west-2".to_string()])
14        .extended_resource_collection_enabled(true)
15        .filter_tags(vec!["$KEY:$VALUE".to_string()])
16        .host_tags(vec!["$KEY:$VALUE".to_string()])
17        .metrics_collection_enabled(false)
18        .role_name("DatadogAWSIntegrationRole".to_string());
19    let configuration = datadog::Configuration::new();
20    let api = AWSIntegrationAPI::with_config(configuration);
21    let resp = api.create_aws_account(body).await;
22    if let Ok(value) = resp {
23        println!("{:#?}", value);
24    } else {
25        println!("{:#?}", resp.unwrap_err());
26    }
27}
Source

pub async fn create_aws_account_with_http_info( &self, body: AWSAccount, ) -> Result<ResponseContent<AWSAccountCreateResponse>, Error<CreateAWSAccountError>>

Create a Datadog-Amazon Web Services integration. Using the POST method updates your integration configuration by adding your new configuration to the existing one in your Datadog organization. A unique AWS Account ID for role based authentication.

Source

pub async fn create_aws_event_bridge_source( &self, body: AWSEventBridgeCreateRequest, ) -> Result<AWSEventBridgeCreateResponse, Error<CreateAWSEventBridgeSourceError>>

Create an Amazon EventBridge source.

Examples found in repository?
examples/v1_aws-integration_CreateAWSEventBridgeSource.rs (line 15)
7async fn main() {
8    let body = AWSEventBridgeCreateRequest::new()
9        .account_id("123456789012".to_string())
10        .create_event_bus(true)
11        .event_generator_name("app-alerts".to_string())
12        .region("us-east-1".to_string());
13    let configuration = datadog::Configuration::new();
14    let api = AWSIntegrationAPI::with_config(configuration);
15    let resp = api.create_aws_event_bridge_source(body).await;
16    if let Ok(value) = resp {
17        println!("{:#?}", value);
18    } else {
19        println!("{:#?}", resp.unwrap_err());
20    }
21}
Source

pub async fn create_aws_event_bridge_source_with_http_info( &self, body: AWSEventBridgeCreateRequest, ) -> Result<ResponseContent<AWSEventBridgeCreateResponse>, Error<CreateAWSEventBridgeSourceError>>

Create an Amazon EventBridge source.

Source

pub async fn create_aws_tag_filter( &self, body: AWSTagFilterCreateRequest, ) -> Result<BTreeMap<String, Value>, Error<CreateAWSTagFilterError>>

Set an AWS tag filter.

Examples found in repository?
examples/v1_aws-integration_CreateAWSTagFilter.rs (line 15)
8async fn main() {
9    let body = AWSTagFilterCreateRequest::new()
10        .account_id("123456789012".to_string())
11        .namespace(AWSNamespace::ELB)
12        .tag_filter_str("prod*".to_string());
13    let configuration = datadog::Configuration::new();
14    let api = AWSIntegrationAPI::with_config(configuration);
15    let resp = api.create_aws_tag_filter(body).await;
16    if let Ok(value) = resp {
17        println!("{:#?}", value);
18    } else {
19        println!("{:#?}", resp.unwrap_err());
20    }
21}
Source

pub async fn create_aws_tag_filter_with_http_info( &self, body: AWSTagFilterCreateRequest, ) -> Result<ResponseContent<BTreeMap<String, Value>>, Error<CreateAWSTagFilterError>>

Set an AWS tag filter.

Source

pub async fn create_new_aws_external_id( &self, body: AWSAccount, ) -> Result<AWSAccountCreateResponse, Error<CreateNewAWSExternalIDError>>

Generate a new AWS external ID for a given AWS account ID and role name pair.

Examples found in repository?
examples/v1_aws-integration_CreateNewAWSExternalID.rs (line 25)
8async fn main() {
9    let body = AWSAccount::new()
10        .account_id("123456789012".to_string())
11        .account_specific_namespace_rules(BTreeMap::from([
12            ("auto_scaling".to_string(), false),
13            ("opswork".to_string(), false),
14        ]))
15        .cspm_resource_collection_enabled(true)
16        .excluded_regions(vec!["us-east-1".to_string(), "us-west-2".to_string()])
17        .extended_resource_collection_enabled(true)
18        .filter_tags(vec!["$KEY:$VALUE".to_string()])
19        .host_tags(vec!["$KEY:$VALUE".to_string()])
20        .metrics_collection_enabled(false)
21        .resource_collection_enabled(true)
22        .role_name("DatadogAWSIntegrationRole".to_string());
23    let configuration = datadog::Configuration::new();
24    let api = AWSIntegrationAPI::with_config(configuration);
25    let resp = api.create_new_aws_external_id(body).await;
26    if let Ok(value) = resp {
27        println!("{:#?}", value);
28    } else {
29        println!("{:#?}", resp.unwrap_err());
30    }
31}
Source

pub async fn create_new_aws_external_id_with_http_info( &self, body: AWSAccount, ) -> Result<ResponseContent<AWSAccountCreateResponse>, Error<CreateNewAWSExternalIDError>>

Generate a new AWS external ID for a given AWS account ID and role name pair.

Source

pub async fn delete_aws_account( &self, body: AWSAccountDeleteRequest, ) -> Result<BTreeMap<String, Value>, Error<DeleteAWSAccountError>>

Delete a Datadog-AWS integration matching the specified account_id and role_name parameters.

Examples found in repository?
examples/v1_aws-integration_DeleteAWSAccount.rs (line 13)
7async fn main() {
8    let body = AWSAccountDeleteRequest::new()
9        .account_id("163662907100".to_string())
10        .role_name("DatadogAWSIntegrationRole".to_string());
11    let configuration = datadog::Configuration::new();
12    let api = AWSIntegrationAPI::with_config(configuration);
13    let resp = api.delete_aws_account(body).await;
14    if let Ok(value) = resp {
15        println!("{:#?}", value);
16    } else {
17        println!("{:#?}", resp.unwrap_err());
18    }
19}
Source

pub async fn delete_aws_account_with_http_info( &self, body: AWSAccountDeleteRequest, ) -> Result<ResponseContent<BTreeMap<String, Value>>, Error<DeleteAWSAccountError>>

Delete a Datadog-AWS integration matching the specified account_id and role_name parameters.

Source

pub async fn delete_aws_event_bridge_source( &self, body: AWSEventBridgeDeleteRequest, ) -> Result<AWSEventBridgeDeleteResponse, Error<DeleteAWSEventBridgeSourceError>>

Delete an Amazon EventBridge source.

Examples found in repository?
examples/v1_aws-integration_DeleteAWSEventBridgeSource.rs (line 14)
7async fn main() {
8    let body = AWSEventBridgeDeleteRequest::new()
9        .account_id("123456789012".to_string())
10        .event_generator_name("app-alerts-zyxw3210".to_string())
11        .region("us-east-1".to_string());
12    let configuration = datadog::Configuration::new();
13    let api = AWSIntegrationAPI::with_config(configuration);
14    let resp = api.delete_aws_event_bridge_source(body).await;
15    if let Ok(value) = resp {
16        println!("{:#?}", value);
17    } else {
18        println!("{:#?}", resp.unwrap_err());
19    }
20}
Source

pub async fn delete_aws_event_bridge_source_with_http_info( &self, body: AWSEventBridgeDeleteRequest, ) -> Result<ResponseContent<AWSEventBridgeDeleteResponse>, Error<DeleteAWSEventBridgeSourceError>>

Delete an Amazon EventBridge source.

Source

pub async fn delete_aws_tag_filter( &self, body: AWSTagFilterDeleteRequest, ) -> Result<BTreeMap<String, Value>, Error<DeleteAWSTagFilterError>>

Delete a tag filtering entry.

Examples found in repository?
examples/v1_aws-integration_DeleteAWSTagFilter.rs (line 14)
8async fn main() {
9    let body = AWSTagFilterDeleteRequest::new()
10        .account_id("FAKEAC0FAKEAC2FAKEAC".to_string())
11        .namespace(AWSNamespace::ELB);
12    let configuration = datadog::Configuration::new();
13    let api = AWSIntegrationAPI::with_config(configuration);
14    let resp = api.delete_aws_tag_filter(body).await;
15    if let Ok(value) = resp {
16        println!("{:#?}", value);
17    } else {
18        println!("{:#?}", resp.unwrap_err());
19    }
20}
Source

pub async fn delete_aws_tag_filter_with_http_info( &self, body: AWSTagFilterDeleteRequest, ) -> Result<ResponseContent<BTreeMap<String, Value>>, Error<DeleteAWSTagFilterError>>

Delete a tag filtering entry.

Source

pub async fn list_aws_accounts( &self, params: ListAWSAccountsOptionalParams, ) -> Result<AWSAccountListResponse, Error<ListAWSAccountsError>>

List all Datadog-AWS integrations available in your Datadog organization.

Examples found in repository?
examples/v1_aws-integration_ListAWSAccounts.rs (line 11)
7async fn main() {
8    let configuration = datadog::Configuration::new();
9    let api = AWSIntegrationAPI::with_config(configuration);
10    let resp = api
11        .list_aws_accounts(ListAWSAccountsOptionalParams::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_aws_accounts_with_http_info( &self, params: ListAWSAccountsOptionalParams, ) -> Result<ResponseContent<AWSAccountListResponse>, Error<ListAWSAccountsError>>

List all Datadog-AWS integrations available in your Datadog organization.

Source

pub async fn list_aws_event_bridge_sources( &self, ) -> Result<AWSEventBridgeListResponse, Error<ListAWSEventBridgeSourcesError>>

Get all Amazon EventBridge sources.

Examples found in repository?
examples/v1_aws-integration_ListAWSEventBridgeSources.rs (line 9)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = AWSIntegrationAPI::with_config(configuration);
9    let resp = api.list_aws_event_bridge_sources().await;
10    if let Ok(value) = resp {
11        println!("{:#?}", value);
12    } else {
13        println!("{:#?}", resp.unwrap_err());
14    }
15}
Source

pub async fn list_aws_event_bridge_sources_with_http_info( &self, ) -> Result<ResponseContent<AWSEventBridgeListResponse>, Error<ListAWSEventBridgeSourcesError>>

Get all Amazon EventBridge sources.

Source

pub async fn list_aws_tag_filters( &self, account_id: String, ) -> Result<AWSTagFilterListResponse, Error<ListAWSTagFiltersError>>

Get all AWS tag filters.

Examples found in repository?
examples/v1_aws-integration_ListAWSTagFilters.rs (line 9)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = AWSIntegrationAPI::with_config(configuration);
9    let resp = api.list_aws_tag_filters("account_id".to_string()).await;
10    if let Ok(value) = resp {
11        println!("{:#?}", value);
12    } else {
13        println!("{:#?}", resp.unwrap_err());
14    }
15}
Source

pub async fn list_aws_tag_filters_with_http_info( &self, account_id: String, ) -> Result<ResponseContent<AWSTagFilterListResponse>, Error<ListAWSTagFiltersError>>

Get all AWS tag filters.

Source

pub async fn list_available_aws_namespaces( &self, ) -> Result<Vec<String>, Error<ListAvailableAWSNamespacesError>>

List all namespace rules for a given Datadog-AWS integration. This endpoint takes no arguments.

Examples found in repository?
examples/v1_aws-integration_ListAvailableAWSNamespaces.rs (line 9)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = AWSIntegrationAPI::with_config(configuration);
9    let resp = api.list_available_aws_namespaces().await;
10    if let Ok(value) = resp {
11        println!("{:#?}", value);
12    } else {
13        println!("{:#?}", resp.unwrap_err());
14    }
15}
Source

pub async fn list_available_aws_namespaces_with_http_info( &self, ) -> Result<ResponseContent<Vec<String>>, Error<ListAvailableAWSNamespacesError>>

List all namespace rules for a given Datadog-AWS integration. This endpoint takes no arguments.

Source

pub async fn update_aws_account( &self, body: AWSAccount, params: UpdateAWSAccountOptionalParams, ) -> Result<BTreeMap<String, Value>, Error<UpdateAWSAccountError>>

Update a Datadog-Amazon Web Services integration.

Examples found in repository?
examples/v1_aws-integration_UpdateAWSAccount.rs (lines 23-28)
9async fn main() {
10    let body = AWSAccount::new()
11        .account_id("163662907100".to_string())
12        .account_specific_namespace_rules(BTreeMap::from([("auto_scaling".to_string(), false)]))
13        .cspm_resource_collection_enabled(false)
14        .excluded_regions(vec!["us-east-1".to_string(), "us-west-2".to_string()])
15        .extended_resource_collection_enabled(true)
16        .filter_tags(vec!["$KEY:$VALUE".to_string()])
17        .host_tags(vec!["$KEY:$VALUE".to_string()])
18        .metrics_collection_enabled(true)
19        .role_name("DatadogAWSIntegrationRole".to_string());
20    let configuration = datadog::Configuration::new();
21    let api = AWSIntegrationAPI::with_config(configuration);
22    let resp = api
23        .update_aws_account(
24            body,
25            UpdateAWSAccountOptionalParams::default()
26                .account_id("163662907100".to_string())
27                .role_name("DatadogAWSIntegrationRole".to_string()),
28        )
29        .await;
30    if let Ok(value) = resp {
31        println!("{:#?}", value);
32    } else {
33        println!("{:#?}", resp.unwrap_err());
34    }
35}
Source

pub async fn update_aws_account_with_http_info( &self, body: AWSAccount, params: UpdateAWSAccountOptionalParams, ) -> Result<ResponseContent<BTreeMap<String, Value>>, Error<UpdateAWSAccountError>>

Update a Datadog-Amazon Web Services integration.

Trait Implementations§

Source§

impl Clone for AWSIntegrationAPI

Source§

fn clone(&self) -> AWSIntegrationAPI

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 AWSIntegrationAPI

Source§

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

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

impl Default for AWSIntegrationAPI

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,