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
impl AWSIntegrationAPI
pub fn new() -> Self
Sourcepub fn with_config(config: Configuration) -> Self
pub fn with_config(config: Configuration) -> Self
Examples found in repository?
More examples
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}
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}
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}
- examples/v1_aws-integration_CreateAWSTagFilter.rs
- examples/v1_aws-integration_DeleteAWSEventBridgeSource.rs
- examples/v1_aws-integration_CreateAWSEventBridgeSource.rs
- examples/v1_aws-integration_CreateAWSAccount.rs
- examples/v1_aws-integration_CreateNewAWSExternalID.rs
- examples/v1_aws-integration_UpdateAWSAccount.rs
pub fn with_client_and_config( config: Configuration, client: ClientWithMiddleware, ) -> Self
Sourcepub async fn create_aws_account(
&self,
body: AWSAccount,
) -> Result<AWSAccountCreateResponse, Error<CreateAWSAccountError>>
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?
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}
Sourcepub async fn create_aws_account_with_http_info(
&self,
body: AWSAccount,
) -> Result<ResponseContent<AWSAccountCreateResponse>, Error<CreateAWSAccountError>>
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.
Sourcepub async fn create_aws_event_bridge_source(
&self,
body: AWSEventBridgeCreateRequest,
) -> Result<AWSEventBridgeCreateResponse, Error<CreateAWSEventBridgeSourceError>>
pub async fn create_aws_event_bridge_source( &self, body: AWSEventBridgeCreateRequest, ) -> Result<AWSEventBridgeCreateResponse, Error<CreateAWSEventBridgeSourceError>>
Create an Amazon EventBridge source.
Examples found in repository?
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}
Sourcepub async fn create_aws_event_bridge_source_with_http_info(
&self,
body: AWSEventBridgeCreateRequest,
) -> Result<ResponseContent<AWSEventBridgeCreateResponse>, Error<CreateAWSEventBridgeSourceError>>
pub async fn create_aws_event_bridge_source_with_http_info( &self, body: AWSEventBridgeCreateRequest, ) -> Result<ResponseContent<AWSEventBridgeCreateResponse>, Error<CreateAWSEventBridgeSourceError>>
Create an Amazon EventBridge source.
Sourcepub async fn create_aws_tag_filter(
&self,
body: AWSTagFilterCreateRequest,
) -> Result<BTreeMap<String, Value>, Error<CreateAWSTagFilterError>>
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?
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}
Sourcepub async fn create_aws_tag_filter_with_http_info(
&self,
body: AWSTagFilterCreateRequest,
) -> Result<ResponseContent<BTreeMap<String, Value>>, Error<CreateAWSTagFilterError>>
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.
Sourcepub async fn create_new_aws_external_id(
&self,
body: AWSAccount,
) -> Result<AWSAccountCreateResponse, Error<CreateNewAWSExternalIDError>>
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?
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}
Sourcepub async fn create_new_aws_external_id_with_http_info(
&self,
body: AWSAccount,
) -> Result<ResponseContent<AWSAccountCreateResponse>, Error<CreateNewAWSExternalIDError>>
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.
Sourcepub async fn delete_aws_account(
&self,
body: AWSAccountDeleteRequest,
) -> Result<BTreeMap<String, Value>, Error<DeleteAWSAccountError>>
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?
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}
Sourcepub async fn delete_aws_account_with_http_info(
&self,
body: AWSAccountDeleteRequest,
) -> Result<ResponseContent<BTreeMap<String, Value>>, Error<DeleteAWSAccountError>>
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
.
Sourcepub async fn delete_aws_event_bridge_source(
&self,
body: AWSEventBridgeDeleteRequest,
) -> Result<AWSEventBridgeDeleteResponse, Error<DeleteAWSEventBridgeSourceError>>
pub async fn delete_aws_event_bridge_source( &self, body: AWSEventBridgeDeleteRequest, ) -> Result<AWSEventBridgeDeleteResponse, Error<DeleteAWSEventBridgeSourceError>>
Delete an Amazon EventBridge source.
Examples found in repository?
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}
Sourcepub async fn delete_aws_event_bridge_source_with_http_info(
&self,
body: AWSEventBridgeDeleteRequest,
) -> Result<ResponseContent<AWSEventBridgeDeleteResponse>, Error<DeleteAWSEventBridgeSourceError>>
pub async fn delete_aws_event_bridge_source_with_http_info( &self, body: AWSEventBridgeDeleteRequest, ) -> Result<ResponseContent<AWSEventBridgeDeleteResponse>, Error<DeleteAWSEventBridgeSourceError>>
Delete an Amazon EventBridge source.
Sourcepub async fn delete_aws_tag_filter(
&self,
body: AWSTagFilterDeleteRequest,
) -> Result<BTreeMap<String, Value>, Error<DeleteAWSTagFilterError>>
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?
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}
Sourcepub async fn delete_aws_tag_filter_with_http_info(
&self,
body: AWSTagFilterDeleteRequest,
) -> Result<ResponseContent<BTreeMap<String, Value>>, Error<DeleteAWSTagFilterError>>
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.
Sourcepub async fn list_aws_accounts(
&self,
params: ListAWSAccountsOptionalParams,
) -> Result<AWSAccountListResponse, Error<ListAWSAccountsError>>
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?
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}
Sourcepub async fn list_aws_accounts_with_http_info(
&self,
params: ListAWSAccountsOptionalParams,
) -> Result<ResponseContent<AWSAccountListResponse>, Error<ListAWSAccountsError>>
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.
Sourcepub async fn list_aws_event_bridge_sources(
&self,
) -> Result<AWSEventBridgeListResponse, Error<ListAWSEventBridgeSourcesError>>
pub async fn list_aws_event_bridge_sources( &self, ) -> Result<AWSEventBridgeListResponse, Error<ListAWSEventBridgeSourcesError>>
Get all Amazon EventBridge sources.
Sourcepub async fn list_aws_event_bridge_sources_with_http_info(
&self,
) -> Result<ResponseContent<AWSEventBridgeListResponse>, Error<ListAWSEventBridgeSourcesError>>
pub async fn list_aws_event_bridge_sources_with_http_info( &self, ) -> Result<ResponseContent<AWSEventBridgeListResponse>, Error<ListAWSEventBridgeSourcesError>>
Get all Amazon EventBridge sources.
Sourcepub async fn list_aws_tag_filters(
&self,
account_id: String,
) -> Result<AWSTagFilterListResponse, Error<ListAWSTagFiltersError>>
pub async fn list_aws_tag_filters( &self, account_id: String, ) -> Result<AWSTagFilterListResponse, Error<ListAWSTagFiltersError>>
Get all AWS tag filters.
Sourcepub async fn list_aws_tag_filters_with_http_info(
&self,
account_id: String,
) -> Result<ResponseContent<AWSTagFilterListResponse>, Error<ListAWSTagFiltersError>>
pub async fn list_aws_tag_filters_with_http_info( &self, account_id: String, ) -> Result<ResponseContent<AWSTagFilterListResponse>, Error<ListAWSTagFiltersError>>
Get all AWS tag filters.
Sourcepub async fn list_available_aws_namespaces(
&self,
) -> Result<Vec<String>, Error<ListAvailableAWSNamespacesError>>
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.
Sourcepub async fn list_available_aws_namespaces_with_http_info(
&self,
) -> Result<ResponseContent<Vec<String>>, Error<ListAvailableAWSNamespacesError>>
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.
Sourcepub async fn update_aws_account(
&self,
body: AWSAccount,
params: UpdateAWSAccountOptionalParams,
) -> Result<BTreeMap<String, Value>, Error<UpdateAWSAccountError>>
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?
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}
Sourcepub async fn update_aws_account_with_http_info(
&self,
body: AWSAccount,
params: UpdateAWSAccountOptionalParams,
) -> Result<ResponseContent<BTreeMap<String, Value>>, Error<UpdateAWSAccountError>>
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
impl Clone for AWSIntegrationAPI
Source§fn clone(&self) -> AWSIntegrationAPI
fn clone(&self) -> AWSIntegrationAPI
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more