#[non_exhaustive]pub struct AWSAccountUpdateRequestAttributes {
pub account_tags: Option<Option<Vec<String>>>,
pub auth_config: Option<AWSAuthConfig>,
pub aws_account_id: String,
pub aws_partition: Option<AWSAccountPartition>,
pub aws_regions: Option<AWSRegions>,
pub logs_config: Option<AWSLogsConfig>,
pub metrics_config: Option<AWSMetricsConfig>,
pub resources_config: Option<AWSResourcesConfig>,
pub traces_config: Option<AWSTracesConfig>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
The AWS Account Integration Config to be updated.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.Tags to apply to all hosts and metrics reporting for this account. Defaults to []
.
auth_config: Option<AWSAuthConfig>
AWS Authentication config.
aws_account_id: String
AWS Account ID.
aws_partition: Option<AWSAccountPartition>
AWS partition your AWS account is scoped to. Defaults to aws
.
See Partitions in the AWS documentation for more information.
aws_regions: Option<AWSRegions>
AWS Regions to collect data from. Defaults to include_all
.
logs_config: Option<AWSLogsConfig>
AWS Logs Collection config.
metrics_config: Option<AWSMetricsConfig>
AWS Metrics Collection config.
resources_config: Option<AWSResourcesConfig>
AWS Resources Collection config.
traces_config: Option<AWSTracesConfig>
AWS Traces Collection config.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl AWSAccountUpdateRequestAttributes
impl AWSAccountUpdateRequestAttributes
Sourcepub fn new(aws_account_id: String) -> AWSAccountUpdateRequestAttributes
pub fn new(aws_account_id: String) -> AWSAccountUpdateRequestAttributes
Examples found in repository?
examples/v2_aws-integration_UpdateAWSAccount.rs (line 25)
19async fn main() {
20 // there is a valid "aws_account_v2" in the system
21 let aws_account_v2_data_id = std::env::var("AWS_ACCOUNT_V2_DATA_ID").unwrap();
22 let body =
23 AWSAccountUpdateRequest::new(
24 AWSAccountUpdateRequestData::new(
25 AWSAccountUpdateRequestAttributes::new("123456789012".to_string())
26 .account_tags(Some(vec!["key:value".to_string()]))
27 .auth_config(
28 AWSAuthConfig::AWSAuthConfigRole(
29 Box::new(AWSAuthConfigRole::new("DatadogIntegrationRole".to_string())),
30 ),
31 )
32 .aws_partition(AWSAccountPartition::AWS)
33 .logs_config(
34 AWSLogsConfig
35 ::new().lambda_forwarder(
36 AWSLambdaForwarderConfig::new()
37 .lambdas(
38 vec![
39 "arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder".to_string()
40 ],
41 )
42 .sources(vec!["s3".to_string()]),
43 ),
44 )
45 .metrics_config(
46 AWSMetricsConfig::new()
47 .automute_enabled(true)
48 .collect_cloudwatch_alarms(true)
49 .collect_custom_metrics(true)
50 .enabled(true)
51 .tag_filters(
52 vec![
53 AWSNamespaceTagFilter::new()
54 .namespace("AWS/EC2".to_string())
55 .tags(Some(vec!["key:value".to_string()]))
56 ],
57 ),
58 )
59 .resources_config(
60 AWSResourcesConfig::new()
61 .cloud_security_posture_management_collection(false)
62 .extended_collection(false),
63 )
64 .traces_config(AWSTracesConfig::new()),
65 AWSAccountType::ACCOUNT,
66 ),
67 );
68 let mut configuration = datadog::Configuration::new();
69 configuration.set_unstable_operation_enabled("v2.UpdateAWSAccount", true);
70 let api = AWSIntegrationAPI::with_config(configuration);
71 let resp = api
72 .update_aws_account(aws_account_v2_data_id.clone(), body)
73 .await;
74 if let Ok(value) = resp {
75 println!("{:#?}", value);
76 } else {
77 println!("{:#?}", resp.unwrap_err());
78 }
79}
Examples found in repository?
examples/v2_aws-integration_UpdateAWSAccount.rs (line 26)
19async fn main() {
20 // there is a valid "aws_account_v2" in the system
21 let aws_account_v2_data_id = std::env::var("AWS_ACCOUNT_V2_DATA_ID").unwrap();
22 let body =
23 AWSAccountUpdateRequest::new(
24 AWSAccountUpdateRequestData::new(
25 AWSAccountUpdateRequestAttributes::new("123456789012".to_string())
26 .account_tags(Some(vec!["key:value".to_string()]))
27 .auth_config(
28 AWSAuthConfig::AWSAuthConfigRole(
29 Box::new(AWSAuthConfigRole::new("DatadogIntegrationRole".to_string())),
30 ),
31 )
32 .aws_partition(AWSAccountPartition::AWS)
33 .logs_config(
34 AWSLogsConfig
35 ::new().lambda_forwarder(
36 AWSLambdaForwarderConfig::new()
37 .lambdas(
38 vec![
39 "arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder".to_string()
40 ],
41 )
42 .sources(vec!["s3".to_string()]),
43 ),
44 )
45 .metrics_config(
46 AWSMetricsConfig::new()
47 .automute_enabled(true)
48 .collect_cloudwatch_alarms(true)
49 .collect_custom_metrics(true)
50 .enabled(true)
51 .tag_filters(
52 vec![
53 AWSNamespaceTagFilter::new()
54 .namespace("AWS/EC2".to_string())
55 .tags(Some(vec!["key:value".to_string()]))
56 ],
57 ),
58 )
59 .resources_config(
60 AWSResourcesConfig::new()
61 .cloud_security_posture_management_collection(false)
62 .extended_collection(false),
63 )
64 .traces_config(AWSTracesConfig::new()),
65 AWSAccountType::ACCOUNT,
66 ),
67 );
68 let mut configuration = datadog::Configuration::new();
69 configuration.set_unstable_operation_enabled("v2.UpdateAWSAccount", true);
70 let api = AWSIntegrationAPI::with_config(configuration);
71 let resp = api
72 .update_aws_account(aws_account_v2_data_id.clone(), body)
73 .await;
74 if let Ok(value) = resp {
75 println!("{:#?}", value);
76 } else {
77 println!("{:#?}", resp.unwrap_err());
78 }
79}
Sourcepub fn auth_config(self, value: AWSAuthConfig) -> Self
pub fn auth_config(self, value: AWSAuthConfig) -> Self
Examples found in repository?
examples/v2_aws-integration_UpdateAWSAccount.rs (lines 27-31)
19async fn main() {
20 // there is a valid "aws_account_v2" in the system
21 let aws_account_v2_data_id = std::env::var("AWS_ACCOUNT_V2_DATA_ID").unwrap();
22 let body =
23 AWSAccountUpdateRequest::new(
24 AWSAccountUpdateRequestData::new(
25 AWSAccountUpdateRequestAttributes::new("123456789012".to_string())
26 .account_tags(Some(vec!["key:value".to_string()]))
27 .auth_config(
28 AWSAuthConfig::AWSAuthConfigRole(
29 Box::new(AWSAuthConfigRole::new("DatadogIntegrationRole".to_string())),
30 ),
31 )
32 .aws_partition(AWSAccountPartition::AWS)
33 .logs_config(
34 AWSLogsConfig
35 ::new().lambda_forwarder(
36 AWSLambdaForwarderConfig::new()
37 .lambdas(
38 vec![
39 "arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder".to_string()
40 ],
41 )
42 .sources(vec!["s3".to_string()]),
43 ),
44 )
45 .metrics_config(
46 AWSMetricsConfig::new()
47 .automute_enabled(true)
48 .collect_cloudwatch_alarms(true)
49 .collect_custom_metrics(true)
50 .enabled(true)
51 .tag_filters(
52 vec![
53 AWSNamespaceTagFilter::new()
54 .namespace("AWS/EC2".to_string())
55 .tags(Some(vec!["key:value".to_string()]))
56 ],
57 ),
58 )
59 .resources_config(
60 AWSResourcesConfig::new()
61 .cloud_security_posture_management_collection(false)
62 .extended_collection(false),
63 )
64 .traces_config(AWSTracesConfig::new()),
65 AWSAccountType::ACCOUNT,
66 ),
67 );
68 let mut configuration = datadog::Configuration::new();
69 configuration.set_unstable_operation_enabled("v2.UpdateAWSAccount", true);
70 let api = AWSIntegrationAPI::with_config(configuration);
71 let resp = api
72 .update_aws_account(aws_account_v2_data_id.clone(), body)
73 .await;
74 if let Ok(value) = resp {
75 println!("{:#?}", value);
76 } else {
77 println!("{:#?}", resp.unwrap_err());
78 }
79}
Sourcepub fn aws_partition(self, value: AWSAccountPartition) -> Self
pub fn aws_partition(self, value: AWSAccountPartition) -> Self
Examples found in repository?
examples/v2_aws-integration_UpdateAWSAccount.rs (line 32)
19async fn main() {
20 // there is a valid "aws_account_v2" in the system
21 let aws_account_v2_data_id = std::env::var("AWS_ACCOUNT_V2_DATA_ID").unwrap();
22 let body =
23 AWSAccountUpdateRequest::new(
24 AWSAccountUpdateRequestData::new(
25 AWSAccountUpdateRequestAttributes::new("123456789012".to_string())
26 .account_tags(Some(vec!["key:value".to_string()]))
27 .auth_config(
28 AWSAuthConfig::AWSAuthConfigRole(
29 Box::new(AWSAuthConfigRole::new("DatadogIntegrationRole".to_string())),
30 ),
31 )
32 .aws_partition(AWSAccountPartition::AWS)
33 .logs_config(
34 AWSLogsConfig
35 ::new().lambda_forwarder(
36 AWSLambdaForwarderConfig::new()
37 .lambdas(
38 vec![
39 "arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder".to_string()
40 ],
41 )
42 .sources(vec!["s3".to_string()]),
43 ),
44 )
45 .metrics_config(
46 AWSMetricsConfig::new()
47 .automute_enabled(true)
48 .collect_cloudwatch_alarms(true)
49 .collect_custom_metrics(true)
50 .enabled(true)
51 .tag_filters(
52 vec![
53 AWSNamespaceTagFilter::new()
54 .namespace("AWS/EC2".to_string())
55 .tags(Some(vec!["key:value".to_string()]))
56 ],
57 ),
58 )
59 .resources_config(
60 AWSResourcesConfig::new()
61 .cloud_security_posture_management_collection(false)
62 .extended_collection(false),
63 )
64 .traces_config(AWSTracesConfig::new()),
65 AWSAccountType::ACCOUNT,
66 ),
67 );
68 let mut configuration = datadog::Configuration::new();
69 configuration.set_unstable_operation_enabled("v2.UpdateAWSAccount", true);
70 let api = AWSIntegrationAPI::with_config(configuration);
71 let resp = api
72 .update_aws_account(aws_account_v2_data_id.clone(), body)
73 .await;
74 if let Ok(value) = resp {
75 println!("{:#?}", value);
76 } else {
77 println!("{:#?}", resp.unwrap_err());
78 }
79}
pub fn aws_regions(self, value: AWSRegions) -> Self
Sourcepub fn logs_config(self, value: AWSLogsConfig) -> Self
pub fn logs_config(self, value: AWSLogsConfig) -> Self
Examples found in repository?
examples/v2_aws-integration_UpdateAWSAccount.rs (lines 33-44)
19async fn main() {
20 // there is a valid "aws_account_v2" in the system
21 let aws_account_v2_data_id = std::env::var("AWS_ACCOUNT_V2_DATA_ID").unwrap();
22 let body =
23 AWSAccountUpdateRequest::new(
24 AWSAccountUpdateRequestData::new(
25 AWSAccountUpdateRequestAttributes::new("123456789012".to_string())
26 .account_tags(Some(vec!["key:value".to_string()]))
27 .auth_config(
28 AWSAuthConfig::AWSAuthConfigRole(
29 Box::new(AWSAuthConfigRole::new("DatadogIntegrationRole".to_string())),
30 ),
31 )
32 .aws_partition(AWSAccountPartition::AWS)
33 .logs_config(
34 AWSLogsConfig
35 ::new().lambda_forwarder(
36 AWSLambdaForwarderConfig::new()
37 .lambdas(
38 vec![
39 "arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder".to_string()
40 ],
41 )
42 .sources(vec!["s3".to_string()]),
43 ),
44 )
45 .metrics_config(
46 AWSMetricsConfig::new()
47 .automute_enabled(true)
48 .collect_cloudwatch_alarms(true)
49 .collect_custom_metrics(true)
50 .enabled(true)
51 .tag_filters(
52 vec![
53 AWSNamespaceTagFilter::new()
54 .namespace("AWS/EC2".to_string())
55 .tags(Some(vec!["key:value".to_string()]))
56 ],
57 ),
58 )
59 .resources_config(
60 AWSResourcesConfig::new()
61 .cloud_security_posture_management_collection(false)
62 .extended_collection(false),
63 )
64 .traces_config(AWSTracesConfig::new()),
65 AWSAccountType::ACCOUNT,
66 ),
67 );
68 let mut configuration = datadog::Configuration::new();
69 configuration.set_unstable_operation_enabled("v2.UpdateAWSAccount", true);
70 let api = AWSIntegrationAPI::with_config(configuration);
71 let resp = api
72 .update_aws_account(aws_account_v2_data_id.clone(), body)
73 .await;
74 if let Ok(value) = resp {
75 println!("{:#?}", value);
76 } else {
77 println!("{:#?}", resp.unwrap_err());
78 }
79}
Sourcepub fn metrics_config(self, value: AWSMetricsConfig) -> Self
pub fn metrics_config(self, value: AWSMetricsConfig) -> Self
Examples found in repository?
examples/v2_aws-integration_UpdateAWSAccount.rs (lines 45-58)
19async fn main() {
20 // there is a valid "aws_account_v2" in the system
21 let aws_account_v2_data_id = std::env::var("AWS_ACCOUNT_V2_DATA_ID").unwrap();
22 let body =
23 AWSAccountUpdateRequest::new(
24 AWSAccountUpdateRequestData::new(
25 AWSAccountUpdateRequestAttributes::new("123456789012".to_string())
26 .account_tags(Some(vec!["key:value".to_string()]))
27 .auth_config(
28 AWSAuthConfig::AWSAuthConfigRole(
29 Box::new(AWSAuthConfigRole::new("DatadogIntegrationRole".to_string())),
30 ),
31 )
32 .aws_partition(AWSAccountPartition::AWS)
33 .logs_config(
34 AWSLogsConfig
35 ::new().lambda_forwarder(
36 AWSLambdaForwarderConfig::new()
37 .lambdas(
38 vec![
39 "arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder".to_string()
40 ],
41 )
42 .sources(vec!["s3".to_string()]),
43 ),
44 )
45 .metrics_config(
46 AWSMetricsConfig::new()
47 .automute_enabled(true)
48 .collect_cloudwatch_alarms(true)
49 .collect_custom_metrics(true)
50 .enabled(true)
51 .tag_filters(
52 vec![
53 AWSNamespaceTagFilter::new()
54 .namespace("AWS/EC2".to_string())
55 .tags(Some(vec!["key:value".to_string()]))
56 ],
57 ),
58 )
59 .resources_config(
60 AWSResourcesConfig::new()
61 .cloud_security_posture_management_collection(false)
62 .extended_collection(false),
63 )
64 .traces_config(AWSTracesConfig::new()),
65 AWSAccountType::ACCOUNT,
66 ),
67 );
68 let mut configuration = datadog::Configuration::new();
69 configuration.set_unstable_operation_enabled("v2.UpdateAWSAccount", true);
70 let api = AWSIntegrationAPI::with_config(configuration);
71 let resp = api
72 .update_aws_account(aws_account_v2_data_id.clone(), body)
73 .await;
74 if let Ok(value) = resp {
75 println!("{:#?}", value);
76 } else {
77 println!("{:#?}", resp.unwrap_err());
78 }
79}
Sourcepub fn resources_config(self, value: AWSResourcesConfig) -> Self
pub fn resources_config(self, value: AWSResourcesConfig) -> Self
Examples found in repository?
examples/v2_aws-integration_UpdateAWSAccount.rs (lines 59-63)
19async fn main() {
20 // there is a valid "aws_account_v2" in the system
21 let aws_account_v2_data_id = std::env::var("AWS_ACCOUNT_V2_DATA_ID").unwrap();
22 let body =
23 AWSAccountUpdateRequest::new(
24 AWSAccountUpdateRequestData::new(
25 AWSAccountUpdateRequestAttributes::new("123456789012".to_string())
26 .account_tags(Some(vec!["key:value".to_string()]))
27 .auth_config(
28 AWSAuthConfig::AWSAuthConfigRole(
29 Box::new(AWSAuthConfigRole::new("DatadogIntegrationRole".to_string())),
30 ),
31 )
32 .aws_partition(AWSAccountPartition::AWS)
33 .logs_config(
34 AWSLogsConfig
35 ::new().lambda_forwarder(
36 AWSLambdaForwarderConfig::new()
37 .lambdas(
38 vec![
39 "arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder".to_string()
40 ],
41 )
42 .sources(vec!["s3".to_string()]),
43 ),
44 )
45 .metrics_config(
46 AWSMetricsConfig::new()
47 .automute_enabled(true)
48 .collect_cloudwatch_alarms(true)
49 .collect_custom_metrics(true)
50 .enabled(true)
51 .tag_filters(
52 vec![
53 AWSNamespaceTagFilter::new()
54 .namespace("AWS/EC2".to_string())
55 .tags(Some(vec!["key:value".to_string()]))
56 ],
57 ),
58 )
59 .resources_config(
60 AWSResourcesConfig::new()
61 .cloud_security_posture_management_collection(false)
62 .extended_collection(false),
63 )
64 .traces_config(AWSTracesConfig::new()),
65 AWSAccountType::ACCOUNT,
66 ),
67 );
68 let mut configuration = datadog::Configuration::new();
69 configuration.set_unstable_operation_enabled("v2.UpdateAWSAccount", true);
70 let api = AWSIntegrationAPI::with_config(configuration);
71 let resp = api
72 .update_aws_account(aws_account_v2_data_id.clone(), body)
73 .await;
74 if let Ok(value) = resp {
75 println!("{:#?}", value);
76 } else {
77 println!("{:#?}", resp.unwrap_err());
78 }
79}
Sourcepub fn traces_config(self, value: AWSTracesConfig) -> Self
pub fn traces_config(self, value: AWSTracesConfig) -> Self
Examples found in repository?
examples/v2_aws-integration_UpdateAWSAccount.rs (line 64)
19async fn main() {
20 // there is a valid "aws_account_v2" in the system
21 let aws_account_v2_data_id = std::env::var("AWS_ACCOUNT_V2_DATA_ID").unwrap();
22 let body =
23 AWSAccountUpdateRequest::new(
24 AWSAccountUpdateRequestData::new(
25 AWSAccountUpdateRequestAttributes::new("123456789012".to_string())
26 .account_tags(Some(vec!["key:value".to_string()]))
27 .auth_config(
28 AWSAuthConfig::AWSAuthConfigRole(
29 Box::new(AWSAuthConfigRole::new("DatadogIntegrationRole".to_string())),
30 ),
31 )
32 .aws_partition(AWSAccountPartition::AWS)
33 .logs_config(
34 AWSLogsConfig
35 ::new().lambda_forwarder(
36 AWSLambdaForwarderConfig::new()
37 .lambdas(
38 vec![
39 "arn:aws:lambda:us-east-1:123456789012:function:DatadogLambdaLogForwarder".to_string()
40 ],
41 )
42 .sources(vec!["s3".to_string()]),
43 ),
44 )
45 .metrics_config(
46 AWSMetricsConfig::new()
47 .automute_enabled(true)
48 .collect_cloudwatch_alarms(true)
49 .collect_custom_metrics(true)
50 .enabled(true)
51 .tag_filters(
52 vec![
53 AWSNamespaceTagFilter::new()
54 .namespace("AWS/EC2".to_string())
55 .tags(Some(vec!["key:value".to_string()]))
56 ],
57 ),
58 )
59 .resources_config(
60 AWSResourcesConfig::new()
61 .cloud_security_posture_management_collection(false)
62 .extended_collection(false),
63 )
64 .traces_config(AWSTracesConfig::new()),
65 AWSAccountType::ACCOUNT,
66 ),
67 );
68 let mut configuration = datadog::Configuration::new();
69 configuration.set_unstable_operation_enabled("v2.UpdateAWSAccount", true);
70 let api = AWSIntegrationAPI::with_config(configuration);
71 let resp = api
72 .update_aws_account(aws_account_v2_data_id.clone(), body)
73 .await;
74 if let Ok(value) = resp {
75 println!("{:#?}", value);
76 } else {
77 println!("{:#?}", resp.unwrap_err());
78 }
79}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for AWSAccountUpdateRequestAttributes
impl Clone for AWSAccountUpdateRequestAttributes
Source§fn clone(&self) -> AWSAccountUpdateRequestAttributes
fn clone(&self) -> AWSAccountUpdateRequestAttributes
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'de> Deserialize<'de> for AWSAccountUpdateRequestAttributes
impl<'de> Deserialize<'de> for AWSAccountUpdateRequestAttributes
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AWSAccountUpdateRequestAttributes
impl PartialEq for AWSAccountUpdateRequestAttributes
Source§fn eq(&self, other: &AWSAccountUpdateRequestAttributes) -> bool
fn eq(&self, other: &AWSAccountUpdateRequestAttributes) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for AWSAccountUpdateRequestAttributes
Auto Trait Implementations§
impl Freeze for AWSAccountUpdateRequestAttributes
impl RefUnwindSafe for AWSAccountUpdateRequestAttributes
impl Send for AWSAccountUpdateRequestAttributes
impl Sync for AWSAccountUpdateRequestAttributes
impl Unpin for AWSAccountUpdateRequestAttributes
impl UnwindSafe for AWSAccountUpdateRequestAttributes
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
Mutably borrows from an owned value. Read more