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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Returns information about the trail.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeTrailsInput {
/// <p>Specifies a list of trail names, trail ARNs, or both, of the trails to describe. The format of a trail ARN is:</p>
/// <p><code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code></p>
/// <p>If an empty list is specified, information for the trail in the current Region is returned.</p>
/// <ul>
/// <li>
/// <p>If an empty list is specified and <code>IncludeShadowTrails</code> is false, then information for all trails in the current Region is returned.</p></li>
/// <li>
/// <p>If an empty list is specified and IncludeShadowTrails is null or true, then information for all trails in the current Region and any associated shadow trails in other Regions is returned.</p></li>
/// </ul><note>
/// <p>If one or more trail names are specified, information is returned only if the names match the names of trails belonging only to the current Region and current account. To return information about a trail in another Region, you must specify its trail ARN.</p>
/// </note>
pub trail_name_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>Specifies whether to include shadow trails in the response. A shadow trail is the replication in a Region of a trail that was created in a different Region, or in the case of an organization trail, the replication of an organization trail in member accounts. If you do not include shadow trails, organization trails in a member account and Region replication trails will not be returned. The default is true.</p>
pub include_shadow_trails: ::std::option::Option<bool>,
}
impl DescribeTrailsInput {
/// <p>Specifies a list of trail names, trail ARNs, or both, of the trails to describe. The format of a trail ARN is:</p>
/// <p><code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code></p>
/// <p>If an empty list is specified, information for the trail in the current Region is returned.</p>
/// <ul>
/// <li>
/// <p>If an empty list is specified and <code>IncludeShadowTrails</code> is false, then information for all trails in the current Region is returned.</p></li>
/// <li>
/// <p>If an empty list is specified and IncludeShadowTrails is null or true, then information for all trails in the current Region and any associated shadow trails in other Regions is returned.</p></li>
/// </ul><note>
/// <p>If one or more trail names are specified, information is returned only if the names match the names of trails belonging only to the current Region and current account. To return information about a trail in another Region, you must specify its trail ARN.</p>
/// </note>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.trail_name_list.is_none()`.
pub fn trail_name_list(&self) -> &[::std::string::String] {
self.trail_name_list.as_deref().unwrap_or_default()
}
/// <p>Specifies whether to include shadow trails in the response. A shadow trail is the replication in a Region of a trail that was created in a different Region, or in the case of an organization trail, the replication of an organization trail in member accounts. If you do not include shadow trails, organization trails in a member account and Region replication trails will not be returned. The default is true.</p>
pub fn include_shadow_trails(&self) -> ::std::option::Option<bool> {
self.include_shadow_trails
}
}
impl DescribeTrailsInput {
/// Creates a new builder-style object to manufacture [`DescribeTrailsInput`](crate::operation::describe_trails::DescribeTrailsInput).
pub fn builder() -> crate::operation::describe_trails::builders::DescribeTrailsInputBuilder {
crate::operation::describe_trails::builders::DescribeTrailsInputBuilder::default()
}
}
/// A builder for [`DescribeTrailsInput`](crate::operation::describe_trails::DescribeTrailsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeTrailsInputBuilder {
pub(crate) trail_name_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) include_shadow_trails: ::std::option::Option<bool>,
}
impl DescribeTrailsInputBuilder {
/// Appends an item to `trail_name_list`.
///
/// To override the contents of this collection use [`set_trail_name_list`](Self::set_trail_name_list).
///
/// <p>Specifies a list of trail names, trail ARNs, or both, of the trails to describe. The format of a trail ARN is:</p>
/// <p><code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code></p>
/// <p>If an empty list is specified, information for the trail in the current Region is returned.</p>
/// <ul>
/// <li>
/// <p>If an empty list is specified and <code>IncludeShadowTrails</code> is false, then information for all trails in the current Region is returned.</p></li>
/// <li>
/// <p>If an empty list is specified and IncludeShadowTrails is null or true, then information for all trails in the current Region and any associated shadow trails in other Regions is returned.</p></li>
/// </ul><note>
/// <p>If one or more trail names are specified, information is returned only if the names match the names of trails belonging only to the current Region and current account. To return information about a trail in another Region, you must specify its trail ARN.</p>
/// </note>
pub fn trail_name_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.trail_name_list.unwrap_or_default();
v.push(input.into());
self.trail_name_list = ::std::option::Option::Some(v);
self
}
/// <p>Specifies a list of trail names, trail ARNs, or both, of the trails to describe. The format of a trail ARN is:</p>
/// <p><code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code></p>
/// <p>If an empty list is specified, information for the trail in the current Region is returned.</p>
/// <ul>
/// <li>
/// <p>If an empty list is specified and <code>IncludeShadowTrails</code> is false, then information for all trails in the current Region is returned.</p></li>
/// <li>
/// <p>If an empty list is specified and IncludeShadowTrails is null or true, then information for all trails in the current Region and any associated shadow trails in other Regions is returned.</p></li>
/// </ul><note>
/// <p>If one or more trail names are specified, information is returned only if the names match the names of trails belonging only to the current Region and current account. To return information about a trail in another Region, you must specify its trail ARN.</p>
/// </note>
pub fn set_trail_name_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.trail_name_list = input;
self
}
/// <p>Specifies a list of trail names, trail ARNs, or both, of the trails to describe. The format of a trail ARN is:</p>
/// <p><code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code></p>
/// <p>If an empty list is specified, information for the trail in the current Region is returned.</p>
/// <ul>
/// <li>
/// <p>If an empty list is specified and <code>IncludeShadowTrails</code> is false, then information for all trails in the current Region is returned.</p></li>
/// <li>
/// <p>If an empty list is specified and IncludeShadowTrails is null or true, then information for all trails in the current Region and any associated shadow trails in other Regions is returned.</p></li>
/// </ul><note>
/// <p>If one or more trail names are specified, information is returned only if the names match the names of trails belonging only to the current Region and current account. To return information about a trail in another Region, you must specify its trail ARN.</p>
/// </note>
pub fn get_trail_name_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.trail_name_list
}
/// <p>Specifies whether to include shadow trails in the response. A shadow trail is the replication in a Region of a trail that was created in a different Region, or in the case of an organization trail, the replication of an organization trail in member accounts. If you do not include shadow trails, organization trails in a member account and Region replication trails will not be returned. The default is true.</p>
pub fn include_shadow_trails(mut self, input: bool) -> Self {
self.include_shadow_trails = ::std::option::Option::Some(input);
self
}
/// <p>Specifies whether to include shadow trails in the response. A shadow trail is the replication in a Region of a trail that was created in a different Region, or in the case of an organization trail, the replication of an organization trail in member accounts. If you do not include shadow trails, organization trails in a member account and Region replication trails will not be returned. The default is true.</p>
pub fn set_include_shadow_trails(mut self, input: ::std::option::Option<bool>) -> Self {
self.include_shadow_trails = input;
self
}
/// <p>Specifies whether to include shadow trails in the response. A shadow trail is the replication in a Region of a trail that was created in a different Region, or in the case of an organization trail, the replication of an organization trail in member accounts. If you do not include shadow trails, organization trails in a member account and Region replication trails will not be returned. The default is true.</p>
pub fn get_include_shadow_trails(&self) -> &::std::option::Option<bool> {
&self.include_shadow_trails
}
/// Consumes the builder and constructs a [`DescribeTrailsInput`](crate::operation::describe_trails::DescribeTrailsInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::describe_trails::DescribeTrailsInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::describe_trails::DescribeTrailsInput {
trail_name_list: self.trail_name_list,
include_shadow_trails: self.include_shadow_trails,
})
}
}