aws-sdk-auditmanager 1.102.0

AWS SDK for AWS Audit Manager
Documentation
1
2
3
4
5
6
7
8
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A record that contains the information needed to demonstrate compliance with the requirements specified by a control. Examples of evidence include change activity invoked by a user, or a system configuration snapshot.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Evidence {
    /// <p>The data source where the evidence was collected from.</p>
    pub data_source: ::std::option::Option<::std::string::String>,
    /// <p>The identifier for the Amazon Web Services account.</p>
    pub evidence_aws_account_id: ::std::option::Option<::std::string::String>,
    /// <p>The timestamp that represents when the evidence was collected.</p>
    pub time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The Amazon Web Services service that the evidence is collected from.</p>
    pub event_source: ::std::option::Option<::std::string::String>,
    /// <p>The name of the evidence event.</p>
    pub event_name: ::std::option::Option<::std::string::String>,
    /// <p>The type of automated evidence.</p>
    pub evidence_by_type: ::std::option::Option<::std::string::String>,
    /// <p>The list of resources that are assessed to generate the evidence.</p>
    pub resources_included: ::std::option::Option<::std::vec::Vec<crate::types::Resource>>,
    /// <p>The names and values that are used by the evidence event. This includes an attribute name (such as <code>allowUsersToChangePassword</code>) and value (such as <code>true</code> or <code>false</code>).</p>
    pub attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>The unique identifier for the user or role that's associated with the evidence.</p>
    pub iam_id: ::std::option::Option<::std::string::String>,
    /// <p>The evaluation status for automated evidence that falls under the compliance check category.</p>
    /// <ul>
    /// <li>
    /// <p>Audit Manager classes evidence as non-compliant if Security Hub reports a <i>Fail</i> result, or if Config reports a <i>Non-compliant</i> result.</p></li>
    /// <li>
    /// <p>Audit Manager classes evidence as compliant if Security Hub reports a <i>Pass</i> result, or if Config reports a <i>Compliant</i> result.</p></li>
    /// <li>
    /// <p>If a compliance check isn't available or applicable, then no compliance evaluation can be made for that evidence. This is the case if the evidence uses Config or Security Hub as the underlying data source type, but those services aren't enabled. This is also the case if the evidence uses an underlying data source type that doesn't support compliance checks (such as manual evidence, Amazon Web Services API calls, or CloudTrail).</p></li>
    /// </ul>
    pub compliance_check: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Web Services account that the evidence is collected from, and its organization path.</p>
    pub aws_organization: ::std::option::Option<::std::string::String>,
    /// <p>The identifier for the Amazon Web Services account.</p>
    pub aws_account_id: ::std::option::Option<::std::string::String>,
    /// <p>The identifier for the folder that the evidence is stored in.</p>
    pub evidence_folder_id: ::std::option::Option<::std::string::String>,
    /// <p>The identifier for the evidence.</p>
    pub id: ::std::option::Option<::std::string::String>,
    /// <p>Specifies whether the evidence is included in the assessment report.</p>
    pub assessment_report_selection: ::std::option::Option<::std::string::String>,
}
impl Evidence {
    /// <p>The data source where the evidence was collected from.</p>
    pub fn data_source(&self) -> ::std::option::Option<&str> {
        self.data_source.as_deref()
    }
    /// <p>The identifier for the Amazon Web Services account.</p>
    pub fn evidence_aws_account_id(&self) -> ::std::option::Option<&str> {
        self.evidence_aws_account_id.as_deref()
    }
    /// <p>The timestamp that represents when the evidence was collected.</p>
    pub fn time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.time.as_ref()
    }
    /// <p>The Amazon Web Services service that the evidence is collected from.</p>
    pub fn event_source(&self) -> ::std::option::Option<&str> {
        self.event_source.as_deref()
    }
    /// <p>The name of the evidence event.</p>
    pub fn event_name(&self) -> ::std::option::Option<&str> {
        self.event_name.as_deref()
    }
    /// <p>The type of automated evidence.</p>
    pub fn evidence_by_type(&self) -> ::std::option::Option<&str> {
        self.evidence_by_type.as_deref()
    }
    /// <p>The list of resources that are assessed to generate the evidence.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.resources_included.is_none()`.
    pub fn resources_included(&self) -> &[crate::types::Resource] {
        self.resources_included.as_deref().unwrap_or_default()
    }
    /// <p>The names and values that are used by the evidence event. This includes an attribute name (such as <code>allowUsersToChangePassword</code>) and value (such as <code>true</code> or <code>false</code>).</p>
    pub fn attributes(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.attributes.as_ref()
    }
    /// <p>The unique identifier for the user or role that's associated with the evidence.</p>
    pub fn iam_id(&self) -> ::std::option::Option<&str> {
        self.iam_id.as_deref()
    }
    /// <p>The evaluation status for automated evidence that falls under the compliance check category.</p>
    /// <ul>
    /// <li>
    /// <p>Audit Manager classes evidence as non-compliant if Security Hub reports a <i>Fail</i> result, or if Config reports a <i>Non-compliant</i> result.</p></li>
    /// <li>
    /// <p>Audit Manager classes evidence as compliant if Security Hub reports a <i>Pass</i> result, or if Config reports a <i>Compliant</i> result.</p></li>
    /// <li>
    /// <p>If a compliance check isn't available or applicable, then no compliance evaluation can be made for that evidence. This is the case if the evidence uses Config or Security Hub as the underlying data source type, but those services aren't enabled. This is also the case if the evidence uses an underlying data source type that doesn't support compliance checks (such as manual evidence, Amazon Web Services API calls, or CloudTrail).</p></li>
    /// </ul>
    pub fn compliance_check(&self) -> ::std::option::Option<&str> {
        self.compliance_check.as_deref()
    }
    /// <p>The Amazon Web Services account that the evidence is collected from, and its organization path.</p>
    pub fn aws_organization(&self) -> ::std::option::Option<&str> {
        self.aws_organization.as_deref()
    }
    /// <p>The identifier for the Amazon Web Services account.</p>
    pub fn aws_account_id(&self) -> ::std::option::Option<&str> {
        self.aws_account_id.as_deref()
    }
    /// <p>The identifier for the folder that the evidence is stored in.</p>
    pub fn evidence_folder_id(&self) -> ::std::option::Option<&str> {
        self.evidence_folder_id.as_deref()
    }
    /// <p>The identifier for the evidence.</p>
    pub fn id(&self) -> ::std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>Specifies whether the evidence is included in the assessment report.</p>
    pub fn assessment_report_selection(&self) -> ::std::option::Option<&str> {
        self.assessment_report_selection.as_deref()
    }
}
impl Evidence {
    /// Creates a new builder-style object to manufacture [`Evidence`](crate::types::Evidence).
    pub fn builder() -> crate::types::builders::EvidenceBuilder {
        crate::types::builders::EvidenceBuilder::default()
    }
}

/// A builder for [`Evidence`](crate::types::Evidence).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct EvidenceBuilder {
    pub(crate) data_source: ::std::option::Option<::std::string::String>,
    pub(crate) evidence_aws_account_id: ::std::option::Option<::std::string::String>,
    pub(crate) time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) event_source: ::std::option::Option<::std::string::String>,
    pub(crate) event_name: ::std::option::Option<::std::string::String>,
    pub(crate) evidence_by_type: ::std::option::Option<::std::string::String>,
    pub(crate) resources_included: ::std::option::Option<::std::vec::Vec<crate::types::Resource>>,
    pub(crate) attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) iam_id: ::std::option::Option<::std::string::String>,
    pub(crate) compliance_check: ::std::option::Option<::std::string::String>,
    pub(crate) aws_organization: ::std::option::Option<::std::string::String>,
    pub(crate) aws_account_id: ::std::option::Option<::std::string::String>,
    pub(crate) evidence_folder_id: ::std::option::Option<::std::string::String>,
    pub(crate) id: ::std::option::Option<::std::string::String>,
    pub(crate) assessment_report_selection: ::std::option::Option<::std::string::String>,
}
impl EvidenceBuilder {
    /// <p>The data source where the evidence was collected from.</p>
    pub fn data_source(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.data_source = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The data source where the evidence was collected from.</p>
    pub fn set_data_source(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.data_source = input;
        self
    }
    /// <p>The data source where the evidence was collected from.</p>
    pub fn get_data_source(&self) -> &::std::option::Option<::std::string::String> {
        &self.data_source
    }
    /// <p>The identifier for the Amazon Web Services account.</p>
    pub fn evidence_aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.evidence_aws_account_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier for the Amazon Web Services account.</p>
    pub fn set_evidence_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.evidence_aws_account_id = input;
        self
    }
    /// <p>The identifier for the Amazon Web Services account.</p>
    pub fn get_evidence_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.evidence_aws_account_id
    }
    /// <p>The timestamp that represents when the evidence was collected.</p>
    pub fn time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp that represents when the evidence was collected.</p>
    pub fn set_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.time = input;
        self
    }
    /// <p>The timestamp that represents when the evidence was collected.</p>
    pub fn get_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.time
    }
    /// <p>The Amazon Web Services service that the evidence is collected from.</p>
    pub fn event_source(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.event_source = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services service that the evidence is collected from.</p>
    pub fn set_event_source(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.event_source = input;
        self
    }
    /// <p>The Amazon Web Services service that the evidence is collected from.</p>
    pub fn get_event_source(&self) -> &::std::option::Option<::std::string::String> {
        &self.event_source
    }
    /// <p>The name of the evidence event.</p>
    pub fn event_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.event_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the evidence event.</p>
    pub fn set_event_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.event_name = input;
        self
    }
    /// <p>The name of the evidence event.</p>
    pub fn get_event_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.event_name
    }
    /// <p>The type of automated evidence.</p>
    pub fn evidence_by_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.evidence_by_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The type of automated evidence.</p>
    pub fn set_evidence_by_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.evidence_by_type = input;
        self
    }
    /// <p>The type of automated evidence.</p>
    pub fn get_evidence_by_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.evidence_by_type
    }
    /// Appends an item to `resources_included`.
    ///
    /// To override the contents of this collection use [`set_resources_included`](Self::set_resources_included).
    ///
    /// <p>The list of resources that are assessed to generate the evidence.</p>
    pub fn resources_included(mut self, input: crate::types::Resource) -> Self {
        let mut v = self.resources_included.unwrap_or_default();
        v.push(input);
        self.resources_included = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of resources that are assessed to generate the evidence.</p>
    pub fn set_resources_included(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Resource>>) -> Self {
        self.resources_included = input;
        self
    }
    /// <p>The list of resources that are assessed to generate the evidence.</p>
    pub fn get_resources_included(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Resource>> {
        &self.resources_included
    }
    /// Adds a key-value pair to `attributes`.
    ///
    /// To override the contents of this collection use [`set_attributes`](Self::set_attributes).
    ///
    /// <p>The names and values that are used by the evidence event. This includes an attribute name (such as <code>allowUsersToChangePassword</code>) and value (such as <code>true</code> or <code>false</code>).</p>
    pub fn attributes(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.attributes.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.attributes = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The names and values that are used by the evidence event. This includes an attribute name (such as <code>allowUsersToChangePassword</code>) and value (such as <code>true</code> or <code>false</code>).</p>
    pub fn set_attributes(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.attributes = input;
        self
    }
    /// <p>The names and values that are used by the evidence event. This includes an attribute name (such as <code>allowUsersToChangePassword</code>) and value (such as <code>true</code> or <code>false</code>).</p>
    pub fn get_attributes(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.attributes
    }
    /// <p>The unique identifier for the user or role that's associated with the evidence.</p>
    pub fn iam_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.iam_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier for the user or role that's associated with the evidence.</p>
    pub fn set_iam_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.iam_id = input;
        self
    }
    /// <p>The unique identifier for the user or role that's associated with the evidence.</p>
    pub fn get_iam_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.iam_id
    }
    /// <p>The evaluation status for automated evidence that falls under the compliance check category.</p>
    /// <ul>
    /// <li>
    /// <p>Audit Manager classes evidence as non-compliant if Security Hub reports a <i>Fail</i> result, or if Config reports a <i>Non-compliant</i> result.</p></li>
    /// <li>
    /// <p>Audit Manager classes evidence as compliant if Security Hub reports a <i>Pass</i> result, or if Config reports a <i>Compliant</i> result.</p></li>
    /// <li>
    /// <p>If a compliance check isn't available or applicable, then no compliance evaluation can be made for that evidence. This is the case if the evidence uses Config or Security Hub as the underlying data source type, but those services aren't enabled. This is also the case if the evidence uses an underlying data source type that doesn't support compliance checks (such as manual evidence, Amazon Web Services API calls, or CloudTrail).</p></li>
    /// </ul>
    pub fn compliance_check(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.compliance_check = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The evaluation status for automated evidence that falls under the compliance check category.</p>
    /// <ul>
    /// <li>
    /// <p>Audit Manager classes evidence as non-compliant if Security Hub reports a <i>Fail</i> result, or if Config reports a <i>Non-compliant</i> result.</p></li>
    /// <li>
    /// <p>Audit Manager classes evidence as compliant if Security Hub reports a <i>Pass</i> result, or if Config reports a <i>Compliant</i> result.</p></li>
    /// <li>
    /// <p>If a compliance check isn't available or applicable, then no compliance evaluation can be made for that evidence. This is the case if the evidence uses Config or Security Hub as the underlying data source type, but those services aren't enabled. This is also the case if the evidence uses an underlying data source type that doesn't support compliance checks (such as manual evidence, Amazon Web Services API calls, or CloudTrail).</p></li>
    /// </ul>
    pub fn set_compliance_check(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.compliance_check = input;
        self
    }
    /// <p>The evaluation status for automated evidence that falls under the compliance check category.</p>
    /// <ul>
    /// <li>
    /// <p>Audit Manager classes evidence as non-compliant if Security Hub reports a <i>Fail</i> result, or if Config reports a <i>Non-compliant</i> result.</p></li>
    /// <li>
    /// <p>Audit Manager classes evidence as compliant if Security Hub reports a <i>Pass</i> result, or if Config reports a <i>Compliant</i> result.</p></li>
    /// <li>
    /// <p>If a compliance check isn't available or applicable, then no compliance evaluation can be made for that evidence. This is the case if the evidence uses Config or Security Hub as the underlying data source type, but those services aren't enabled. This is also the case if the evidence uses an underlying data source type that doesn't support compliance checks (such as manual evidence, Amazon Web Services API calls, or CloudTrail).</p></li>
    /// </ul>
    pub fn get_compliance_check(&self) -> &::std::option::Option<::std::string::String> {
        &self.compliance_check
    }
    /// <p>The Amazon Web Services account that the evidence is collected from, and its organization path.</p>
    pub fn aws_organization(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.aws_organization = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services account that the evidence is collected from, and its organization path.</p>
    pub fn set_aws_organization(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.aws_organization = input;
        self
    }
    /// <p>The Amazon Web Services account that the evidence is collected from, and its organization path.</p>
    pub fn get_aws_organization(&self) -> &::std::option::Option<::std::string::String> {
        &self.aws_organization
    }
    /// <p>The identifier for the Amazon Web Services account.</p>
    pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.aws_account_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier for the Amazon Web Services account.</p>
    pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.aws_account_id = input;
        self
    }
    /// <p>The identifier for the Amazon Web Services account.</p>
    pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.aws_account_id
    }
    /// <p>The identifier for the folder that the evidence is stored in.</p>
    pub fn evidence_folder_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.evidence_folder_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier for the folder that the evidence is stored in.</p>
    pub fn set_evidence_folder_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.evidence_folder_id = input;
        self
    }
    /// <p>The identifier for the folder that the evidence is stored in.</p>
    pub fn get_evidence_folder_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.evidence_folder_id
    }
    /// <p>The identifier for the evidence.</p>
    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier for the evidence.</p>
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.id = input;
        self
    }
    /// <p>The identifier for the evidence.</p>
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// <p>Specifies whether the evidence is included in the assessment report.</p>
    pub fn assessment_report_selection(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.assessment_report_selection = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specifies whether the evidence is included in the assessment report.</p>
    pub fn set_assessment_report_selection(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.assessment_report_selection = input;
        self
    }
    /// <p>Specifies whether the evidence is included in the assessment report.</p>
    pub fn get_assessment_report_selection(&self) -> &::std::option::Option<::std::string::String> {
        &self.assessment_report_selection
    }
    /// Consumes the builder and constructs a [`Evidence`](crate::types::Evidence).
    pub fn build(self) -> crate::types::Evidence {
        crate::types::Evidence {
            data_source: self.data_source,
            evidence_aws_account_id: self.evidence_aws_account_id,
            time: self.time,
            event_source: self.event_source,
            event_name: self.event_name,
            evidence_by_type: self.evidence_by_type,
            resources_included: self.resources_included,
            attributes: self.attributes,
            iam_id: self.iam_id,
            compliance_check: self.compliance_check,
            aws_organization: self.aws_organization,
            aws_account_id: self.aws_account_id,
            evidence_folder_id: self.evidence_folder_id,
            id: self.id,
            assessment_report_selection: self.assessment_report_selection,
        }
    }
}