aws_sdk_config/operation/put_organization_config_rule/_put_organization_config_rule_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct PutOrganizationConfigRuleInput {
6 /// <p>The name that you assign to an organization Config rule.</p>
7 pub organization_config_rule_name: ::std::option::Option<::std::string::String>,
8 /// <p>An <code>OrganizationManagedRuleMetadata</code> object. This object specifies organization managed rule metadata such as resource type and ID of Amazon Web Services resource along with the rule identifier. It also provides the frequency with which you want Config to run evaluations for the rule if the trigger type is periodic.</p>
9 pub organization_managed_rule_metadata: ::std::option::Option<crate::types::OrganizationManagedRuleMetadata>,
10 /// <p>An <code>OrganizationCustomRuleMetadata</code> object. This object specifies organization custom rule metadata such as resource type, resource ID of Amazon Web Services resource, Lambda function ARN, and organization trigger types that trigger Config to evaluate your Amazon Web Services resources against a rule. It also provides the frequency with which you want Config to run evaluations for the rule if the trigger type is periodic.</p>
11 pub organization_custom_rule_metadata: ::std::option::Option<crate::types::OrganizationCustomRuleMetadata>,
12 /// <p>A comma-separated list of accounts that you want to exclude from an organization Config rule.</p>
13 pub excluded_accounts: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
14 /// <p>An <code>OrganizationCustomPolicyRuleMetadata</code> object. This object specifies metadata for your organization's Config Custom Policy rule. The metadata includes the runtime system in use, which accounts have debug logging enabled, and other custom rule metadata, such as resource type, resource ID of Amazon Web Services resource, and organization trigger types that initiate Config to evaluate Amazon Web Services resources against a rule.</p>
15 pub organization_custom_policy_rule_metadata: ::std::option::Option<crate::types::OrganizationCustomPolicyRuleMetadata>,
16}
17impl PutOrganizationConfigRuleInput {
18 /// <p>The name that you assign to an organization Config rule.</p>
19 pub fn organization_config_rule_name(&self) -> ::std::option::Option<&str> {
20 self.organization_config_rule_name.as_deref()
21 }
22 /// <p>An <code>OrganizationManagedRuleMetadata</code> object. This object specifies organization managed rule metadata such as resource type and ID of Amazon Web Services resource along with the rule identifier. It also provides the frequency with which you want Config to run evaluations for the rule if the trigger type is periodic.</p>
23 pub fn organization_managed_rule_metadata(&self) -> ::std::option::Option<&crate::types::OrganizationManagedRuleMetadata> {
24 self.organization_managed_rule_metadata.as_ref()
25 }
26 /// <p>An <code>OrganizationCustomRuleMetadata</code> object. This object specifies organization custom rule metadata such as resource type, resource ID of Amazon Web Services resource, Lambda function ARN, and organization trigger types that trigger Config to evaluate your Amazon Web Services resources against a rule. It also provides the frequency with which you want Config to run evaluations for the rule if the trigger type is periodic.</p>
27 pub fn organization_custom_rule_metadata(&self) -> ::std::option::Option<&crate::types::OrganizationCustomRuleMetadata> {
28 self.organization_custom_rule_metadata.as_ref()
29 }
30 /// <p>A comma-separated list of accounts that you want to exclude from an organization Config rule.</p>
31 ///
32 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.excluded_accounts.is_none()`.
33 pub fn excluded_accounts(&self) -> &[::std::string::String] {
34 self.excluded_accounts.as_deref().unwrap_or_default()
35 }
36 /// <p>An <code>OrganizationCustomPolicyRuleMetadata</code> object. This object specifies metadata for your organization's Config Custom Policy rule. The metadata includes the runtime system in use, which accounts have debug logging enabled, and other custom rule metadata, such as resource type, resource ID of Amazon Web Services resource, and organization trigger types that initiate Config to evaluate Amazon Web Services resources against a rule.</p>
37 pub fn organization_custom_policy_rule_metadata(&self) -> ::std::option::Option<&crate::types::OrganizationCustomPolicyRuleMetadata> {
38 self.organization_custom_policy_rule_metadata.as_ref()
39 }
40}
41impl PutOrganizationConfigRuleInput {
42 /// Creates a new builder-style object to manufacture [`PutOrganizationConfigRuleInput`](crate::operation::put_organization_config_rule::PutOrganizationConfigRuleInput).
43 pub fn builder() -> crate::operation::put_organization_config_rule::builders::PutOrganizationConfigRuleInputBuilder {
44 crate::operation::put_organization_config_rule::builders::PutOrganizationConfigRuleInputBuilder::default()
45 }
46}
47
48/// A builder for [`PutOrganizationConfigRuleInput`](crate::operation::put_organization_config_rule::PutOrganizationConfigRuleInput).
49#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
50#[non_exhaustive]
51pub struct PutOrganizationConfigRuleInputBuilder {
52 pub(crate) organization_config_rule_name: ::std::option::Option<::std::string::String>,
53 pub(crate) organization_managed_rule_metadata: ::std::option::Option<crate::types::OrganizationManagedRuleMetadata>,
54 pub(crate) organization_custom_rule_metadata: ::std::option::Option<crate::types::OrganizationCustomRuleMetadata>,
55 pub(crate) excluded_accounts: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
56 pub(crate) organization_custom_policy_rule_metadata: ::std::option::Option<crate::types::OrganizationCustomPolicyRuleMetadata>,
57}
58impl PutOrganizationConfigRuleInputBuilder {
59 /// <p>The name that you assign to an organization Config rule.</p>
60 /// This field is required.
61 pub fn organization_config_rule_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62 self.organization_config_rule_name = ::std::option::Option::Some(input.into());
63 self
64 }
65 /// <p>The name that you assign to an organization Config rule.</p>
66 pub fn set_organization_config_rule_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67 self.organization_config_rule_name = input;
68 self
69 }
70 /// <p>The name that you assign to an organization Config rule.</p>
71 pub fn get_organization_config_rule_name(&self) -> &::std::option::Option<::std::string::String> {
72 &self.organization_config_rule_name
73 }
74 /// <p>An <code>OrganizationManagedRuleMetadata</code> object. This object specifies organization managed rule metadata such as resource type and ID of Amazon Web Services resource along with the rule identifier. It also provides the frequency with which you want Config to run evaluations for the rule if the trigger type is periodic.</p>
75 pub fn organization_managed_rule_metadata(mut self, input: crate::types::OrganizationManagedRuleMetadata) -> Self {
76 self.organization_managed_rule_metadata = ::std::option::Option::Some(input);
77 self
78 }
79 /// <p>An <code>OrganizationManagedRuleMetadata</code> object. This object specifies organization managed rule metadata such as resource type and ID of Amazon Web Services resource along with the rule identifier. It also provides the frequency with which you want Config to run evaluations for the rule if the trigger type is periodic.</p>
80 pub fn set_organization_managed_rule_metadata(mut self, input: ::std::option::Option<crate::types::OrganizationManagedRuleMetadata>) -> Self {
81 self.organization_managed_rule_metadata = input;
82 self
83 }
84 /// <p>An <code>OrganizationManagedRuleMetadata</code> object. This object specifies organization managed rule metadata such as resource type and ID of Amazon Web Services resource along with the rule identifier. It also provides the frequency with which you want Config to run evaluations for the rule if the trigger type is periodic.</p>
85 pub fn get_organization_managed_rule_metadata(&self) -> &::std::option::Option<crate::types::OrganizationManagedRuleMetadata> {
86 &self.organization_managed_rule_metadata
87 }
88 /// <p>An <code>OrganizationCustomRuleMetadata</code> object. This object specifies organization custom rule metadata such as resource type, resource ID of Amazon Web Services resource, Lambda function ARN, and organization trigger types that trigger Config to evaluate your Amazon Web Services resources against a rule. It also provides the frequency with which you want Config to run evaluations for the rule if the trigger type is periodic.</p>
89 pub fn organization_custom_rule_metadata(mut self, input: crate::types::OrganizationCustomRuleMetadata) -> Self {
90 self.organization_custom_rule_metadata = ::std::option::Option::Some(input);
91 self
92 }
93 /// <p>An <code>OrganizationCustomRuleMetadata</code> object. This object specifies organization custom rule metadata such as resource type, resource ID of Amazon Web Services resource, Lambda function ARN, and organization trigger types that trigger Config to evaluate your Amazon Web Services resources against a rule. It also provides the frequency with which you want Config to run evaluations for the rule if the trigger type is periodic.</p>
94 pub fn set_organization_custom_rule_metadata(mut self, input: ::std::option::Option<crate::types::OrganizationCustomRuleMetadata>) -> Self {
95 self.organization_custom_rule_metadata = input;
96 self
97 }
98 /// <p>An <code>OrganizationCustomRuleMetadata</code> object. This object specifies organization custom rule metadata such as resource type, resource ID of Amazon Web Services resource, Lambda function ARN, and organization trigger types that trigger Config to evaluate your Amazon Web Services resources against a rule. It also provides the frequency with which you want Config to run evaluations for the rule if the trigger type is periodic.</p>
99 pub fn get_organization_custom_rule_metadata(&self) -> &::std::option::Option<crate::types::OrganizationCustomRuleMetadata> {
100 &self.organization_custom_rule_metadata
101 }
102 /// Appends an item to `excluded_accounts`.
103 ///
104 /// To override the contents of this collection use [`set_excluded_accounts`](Self::set_excluded_accounts).
105 ///
106 /// <p>A comma-separated list of accounts that you want to exclude from an organization Config rule.</p>
107 pub fn excluded_accounts(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
108 let mut v = self.excluded_accounts.unwrap_or_default();
109 v.push(input.into());
110 self.excluded_accounts = ::std::option::Option::Some(v);
111 self
112 }
113 /// <p>A comma-separated list of accounts that you want to exclude from an organization Config rule.</p>
114 pub fn set_excluded_accounts(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
115 self.excluded_accounts = input;
116 self
117 }
118 /// <p>A comma-separated list of accounts that you want to exclude from an organization Config rule.</p>
119 pub fn get_excluded_accounts(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
120 &self.excluded_accounts
121 }
122 /// <p>An <code>OrganizationCustomPolicyRuleMetadata</code> object. This object specifies metadata for your organization's Config Custom Policy rule. The metadata includes the runtime system in use, which accounts have debug logging enabled, and other custom rule metadata, such as resource type, resource ID of Amazon Web Services resource, and organization trigger types that initiate Config to evaluate Amazon Web Services resources against a rule.</p>
123 pub fn organization_custom_policy_rule_metadata(mut self, input: crate::types::OrganizationCustomPolicyRuleMetadata) -> Self {
124 self.organization_custom_policy_rule_metadata = ::std::option::Option::Some(input);
125 self
126 }
127 /// <p>An <code>OrganizationCustomPolicyRuleMetadata</code> object. This object specifies metadata for your organization's Config Custom Policy rule. The metadata includes the runtime system in use, which accounts have debug logging enabled, and other custom rule metadata, such as resource type, resource ID of Amazon Web Services resource, and organization trigger types that initiate Config to evaluate Amazon Web Services resources against a rule.</p>
128 pub fn set_organization_custom_policy_rule_metadata(
129 mut self,
130 input: ::std::option::Option<crate::types::OrganizationCustomPolicyRuleMetadata>,
131 ) -> Self {
132 self.organization_custom_policy_rule_metadata = input;
133 self
134 }
135 /// <p>An <code>OrganizationCustomPolicyRuleMetadata</code> object. This object specifies metadata for your organization's Config Custom Policy rule. The metadata includes the runtime system in use, which accounts have debug logging enabled, and other custom rule metadata, such as resource type, resource ID of Amazon Web Services resource, and organization trigger types that initiate Config to evaluate Amazon Web Services resources against a rule.</p>
136 pub fn get_organization_custom_policy_rule_metadata(&self) -> &::std::option::Option<crate::types::OrganizationCustomPolicyRuleMetadata> {
137 &self.organization_custom_policy_rule_metadata
138 }
139 /// Consumes the builder and constructs a [`PutOrganizationConfigRuleInput`](crate::operation::put_organization_config_rule::PutOrganizationConfigRuleInput).
140 pub fn build(
141 self,
142 ) -> ::std::result::Result<
143 crate::operation::put_organization_config_rule::PutOrganizationConfigRuleInput,
144 ::aws_smithy_types::error::operation::BuildError,
145 > {
146 ::std::result::Result::Ok(crate::operation::put_organization_config_rule::PutOrganizationConfigRuleInput {
147 organization_config_rule_name: self.organization_config_rule_name,
148 organization_managed_rule_metadata: self.organization_managed_rule_metadata,
149 organization_custom_rule_metadata: self.organization_custom_rule_metadata,
150 excluded_accounts: self.excluded_accounts,
151 organization_custom_policy_rule_metadata: self.organization_custom_policy_rule_metadata,
152 })
153 }
154}