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
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());
}
}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());
}
}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());
}
}- 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?
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());
}
}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?
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());
}
}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?
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());
}
}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?
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());
}
}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?
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());
}
}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?
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());
}
}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?
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());
}
}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?
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());
}
}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?
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());
}
}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 moresource§impl Debug for AWSIntegrationAPI
impl Debug for AWSIntegrationAPI
Auto Trait Implementations§
impl Freeze for AWSIntegrationAPI
impl !RefUnwindSafe for AWSIntegrationAPI
impl Send for AWSIntegrationAPI
impl Sync for AWSIntegrationAPI
impl Unpin for AWSIntegrationAPI
impl !UnwindSafe for AWSIntegrationAPI
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)