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)
6
7
8
9
10
11
12
13
14
15
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = AWSIntegrationAPI::with_config(configuration);
    let resp = api.list_aws_event_bridge_sources().await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
More examples
Hide additional examples
examples/v1_aws-integration_ListAvailableAWSNamespaces.rs (line 8)
6
7
8
9
10
11
12
13
14
15
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = AWSIntegrationAPI::with_config(configuration);
    let resp = api.list_available_aws_namespaces().await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
examples/v1_aws-integration_ListAWSTagFilters.rs (line 8)
6
7
8
9
10
11
12
13
14
15
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = AWSIntegrationAPI::with_config(configuration);
    let resp = api.list_aws_tag_filters("account_id".to_string()).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
examples/v1_aws-integration_ListAWSAccounts.rs (line 9)
7
8
9
10
11
12
13
14
15
16
17
18
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = AWSIntegrationAPI::with_config(configuration);
    let resp = api
        .list_aws_accounts(ListAWSAccountsOptionalParams::default())
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
examples/v1_aws-integration_DeleteAWSTagFilter.rs (line 13)
8
9
10
11
12
13
14
15
16
17
18
19
20
async fn main() {
    let body = AWSTagFilterDeleteRequest::new()
        .account_id("FAKEAC0FAKEAC2FAKEAC".to_string())
        .namespace(AWSNamespace::ELB);
    let configuration = datadog::Configuration::new();
    let api = AWSIntegrationAPI::with_config(configuration);
    let resp = api.delete_aws_tag_filter(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
examples/v1_aws-integration_DeleteAWSAccount.rs (line 12)
7
8
9
10
11
12
13
14
15
16
17
18
19
async fn main() {
    let body = AWSAccountDeleteRequest::new()
        .account_id("163662907100".to_string())
        .role_name("DatadogAWSIntegrationRole".to_string());
    let configuration = datadog::Configuration::new();
    let api = AWSIntegrationAPI::with_config(configuration);
    let resp = api.delete_aws_account(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
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)
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
async fn main() {
    let body = AWSAccount::new()
        .account_id("163662907100".to_string())
        .account_specific_namespace_rules(BTreeMap::from([("auto_scaling".to_string(), false)]))
        .cspm_resource_collection_enabled(true)
        .excluded_regions(vec!["us-east-1".to_string(), "us-west-2".to_string()])
        .extended_resource_collection_enabled(true)
        .filter_tags(vec!["$KEY:$VALUE".to_string()])
        .host_tags(vec!["$KEY:$VALUE".to_string()])
        .metrics_collection_enabled(false)
        .role_name("DatadogAWSIntegrationRole".to_string());
    let configuration = datadog::Configuration::new();
    let api = AWSIntegrationAPI::with_config(configuration);
    let resp = api.create_aws_account(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
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)
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
async fn main() {
    let body = AWSEventBridgeCreateRequest::new()
        .account_id("123456789012".to_string())
        .create_event_bus(true)
        .event_generator_name("app-alerts".to_string())
        .region("us-east-1".to_string());
    let configuration = datadog::Configuration::new();
    let api = AWSIntegrationAPI::with_config(configuration);
    let resp = api.create_aws_event_bridge_source(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
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)
8
9
10
11
12
13
14
15
16
17
18
19
20
21
async fn main() {
    let body = AWSTagFilterCreateRequest::new()
        .account_id("123456789012".to_string())
        .namespace(AWSNamespace::ELB)
        .tag_filter_str("prod*".to_string());
    let configuration = datadog::Configuration::new();
    let api = AWSIntegrationAPI::with_config(configuration);
    let resp = api.create_aws_tag_filter(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
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)
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
async fn main() {
    let body = AWSAccount::new()
        .account_id("123456789012".to_string())
        .account_specific_namespace_rules(BTreeMap::from([
            ("auto_scaling".to_string(), false),
            ("opswork".to_string(), false),
        ]))
        .cspm_resource_collection_enabled(true)
        .excluded_regions(vec!["us-east-1".to_string(), "us-west-2".to_string()])
        .extended_resource_collection_enabled(true)
        .filter_tags(vec!["$KEY:$VALUE".to_string()])
        .host_tags(vec!["$KEY:$VALUE".to_string()])
        .metrics_collection_enabled(false)
        .resource_collection_enabled(true)
        .role_name("DatadogAWSIntegrationRole".to_string());
    let configuration = datadog::Configuration::new();
    let api = AWSIntegrationAPI::with_config(configuration);
    let resp = api.create_new_aws_external_id(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
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)
7
8
9
10
11
12
13
14
15
16
17
18
19
async fn main() {
    let body = AWSAccountDeleteRequest::new()
        .account_id("163662907100".to_string())
        .role_name("DatadogAWSIntegrationRole".to_string());
    let configuration = datadog::Configuration::new();
    let api = AWSIntegrationAPI::with_config(configuration);
    let resp = api.delete_aws_account(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
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)
7
8
9
10
11
12
13
14
15
16
17
18
19
20
async fn main() {
    let body = AWSEventBridgeDeleteRequest::new()
        .account_id("123456789012".to_string())
        .event_generator_name("app-alerts-zyxw3210".to_string())
        .region("us-east-1".to_string());
    let configuration = datadog::Configuration::new();
    let api = AWSIntegrationAPI::with_config(configuration);
    let resp = api.delete_aws_event_bridge_source(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
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)
8
9
10
11
12
13
14
15
16
17
18
19
20
async fn main() {
    let body = AWSTagFilterDeleteRequest::new()
        .account_id("FAKEAC0FAKEAC2FAKEAC".to_string())
        .namespace(AWSNamespace::ELB);
    let configuration = datadog::Configuration::new();
    let api = AWSIntegrationAPI::with_config(configuration);
    let resp = api.delete_aws_tag_filter(body).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
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)
7
8
9
10
11
12
13
14
15
16
17
18
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = AWSIntegrationAPI::with_config(configuration);
    let resp = api
        .list_aws_accounts(ListAWSAccountsOptionalParams::default())
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
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)
6
7
8
9
10
11
12
13
14
15
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = AWSIntegrationAPI::with_config(configuration);
    let resp = api.list_aws_event_bridge_sources().await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
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)
6
7
8
9
10
11
12
13
14
15
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = AWSIntegrationAPI::with_config(configuration);
    let resp = api.list_aws_tag_filters("account_id".to_string()).await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
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)
6
7
8
9
10
11
12
13
14
15
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = AWSIntegrationAPI::with_config(configuration);
    let resp = api.list_available_aws_namespaces().await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
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)
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
async fn main() {
    let body = AWSAccount::new()
        .account_id("163662907100".to_string())
        .account_specific_namespace_rules(BTreeMap::from([("auto_scaling".to_string(), false)]))
        .cspm_resource_collection_enabled(false)
        .excluded_regions(vec!["us-east-1".to_string(), "us-west-2".to_string()])
        .extended_resource_collection_enabled(true)
        .filter_tags(vec!["$KEY:$VALUE".to_string()])
        .host_tags(vec!["$KEY:$VALUE".to_string()])
        .metrics_collection_enabled(true)
        .role_name("DatadogAWSIntegrationRole".to_string());
    let configuration = datadog::Configuration::new();
    let api = AWSIntegrationAPI::with_config(configuration);
    let resp = api
        .update_aws_account(
            body,
            UpdateAWSAccountOptionalParams::default()
                .account_id("163662907100".to_string())
                .role_name("DatadogAWSIntegrationRole".to_string()),
        )
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
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 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 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, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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