#[non_exhaustive]pub struct UpdateAWSAccountOptionalParams {
pub account_id: Option<String>,
pub role_name: Option<String>,
pub access_key_id: Option<String>,
}
Expand description
UpdateAWSAccountOptionalParams is a struct for passing parameters to the method AWSIntegrationAPI::update_aws_account
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.account_id: Option<String>
Only return AWS accounts that matches this account_id
.
role_name: Option<String>
Only return AWS accounts that match this role_name
.
Required if account_id
is specified.
access_key_id: Option<String>
Only return AWS accounts that matches this access_key_id
.
Required if none of the other two options are specified.
Implementations§
Source§impl UpdateAWSAccountOptionalParams
impl UpdateAWSAccountOptionalParams
Sourcepub fn account_id(self, value: String) -> Self
pub fn account_id(self, value: String) -> Self
Only return AWS accounts that matches this account_id
.
Examples found in repository?
examples/v1_aws-integration_UpdateAWSAccount.rs (line 26)
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 fn role_name(self, value: String) -> Self
pub fn role_name(self, value: String) -> Self
Only return AWS accounts that match this role_name
.
Required if account_id
is specified.
Examples found in repository?
examples/v1_aws-integration_UpdateAWSAccount.rs (line 27)
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 fn access_key_id(self, value: String) -> Self
pub fn access_key_id(self, value: String) -> Self
Only return AWS accounts that matches this access_key_id
.
Required if none of the other two options are specified.
Trait Implementations§
Source§impl Clone for UpdateAWSAccountOptionalParams
impl Clone for UpdateAWSAccountOptionalParams
Source§fn clone(&self) -> UpdateAWSAccountOptionalParams
fn clone(&self) -> UpdateAWSAccountOptionalParams
Returns a duplicate 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 Default for UpdateAWSAccountOptionalParams
impl Default for UpdateAWSAccountOptionalParams
Source§fn default() -> UpdateAWSAccountOptionalParams
fn default() -> UpdateAWSAccountOptionalParams
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for UpdateAWSAccountOptionalParams
impl RefUnwindSafe for UpdateAWSAccountOptionalParams
impl Send for UpdateAWSAccountOptionalParams
impl Sync for UpdateAWSAccountOptionalParams
impl Unpin for UpdateAWSAccountOptionalParams
impl UnwindSafe for UpdateAWSAccountOptionalParams
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