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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p><b>\[Custom snapshot and AMI policies only\]</b> Specifies optional parameters for snapshot and AMI policies. The set of valid parameters depends on the combination of policy type and target resource type.</p>
/// <p>If you choose to exclude boot volumes and you specify tags that consequently exclude all of the additional data volumes attached to an instance, then Amazon Data Lifecycle Manager will not create any snapshots for the affected instance, and it will emit a <code>SnapshotsCreateFailed</code> Amazon CloudWatch metric. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitor-dlm-cw-metrics.html">Monitor your policies using Amazon CloudWatch</a>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Parameters {
/// <p><b>\[Custom snapshot policies that target instances only\]</b> Indicates whether to exclude the root volume from multi-volume snapshot sets. The default is <code>false</code>. If you specify <code>true</code>, then the root volumes attached to targeted instances will be excluded from the multi-volume snapshot sets created by the policy.</p>
pub exclude_boot_volume: ::std::option::Option<bool>,
/// <p><b>\[Custom AMI policies only\]</b> Indicates whether targeted instances are rebooted when the lifecycle policy runs. <code>true</code> indicates that targeted instances are not rebooted when the policy runs. <code>false</code> indicates that target instances are rebooted when the policy runs. The default is <code>true</code> (instances are not rebooted).</p>
pub no_reboot: ::std::option::Option<bool>,
/// <p><b>\[Custom snapshot policies that target instances only\]</b> The tags used to identify data (non-root) volumes to exclude from multi-volume snapshot sets.</p>
/// <p>If you create a snapshot lifecycle policy that targets instances and you specify tags for this parameter, then data volumes with the specified tags that are attached to targeted instances will be excluded from the multi-volume snapshot sets created by the policy.</p>
pub exclude_data_volume_tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl Parameters {
/// <p><b>\[Custom snapshot policies that target instances only\]</b> Indicates whether to exclude the root volume from multi-volume snapshot sets. The default is <code>false</code>. If you specify <code>true</code>, then the root volumes attached to targeted instances will be excluded from the multi-volume snapshot sets created by the policy.</p>
pub fn exclude_boot_volume(&self) -> ::std::option::Option<bool> {
self.exclude_boot_volume
}
/// <p><b>\[Custom AMI policies only\]</b> Indicates whether targeted instances are rebooted when the lifecycle policy runs. <code>true</code> indicates that targeted instances are not rebooted when the policy runs. <code>false</code> indicates that target instances are rebooted when the policy runs. The default is <code>true</code> (instances are not rebooted).</p>
pub fn no_reboot(&self) -> ::std::option::Option<bool> {
self.no_reboot
}
/// <p><b>\[Custom snapshot policies that target instances only\]</b> The tags used to identify data (non-root) volumes to exclude from multi-volume snapshot sets.</p>
/// <p>If you create a snapshot lifecycle policy that targets instances and you specify tags for this parameter, then data volumes with the specified tags that are attached to targeted instances will be excluded from the multi-volume snapshot sets created by the policy.</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 `.exclude_data_volume_tags.is_none()`.
pub fn exclude_data_volume_tags(&self) -> &[crate::types::Tag] {
self.exclude_data_volume_tags.as_deref().unwrap_or_default()
}
}
impl Parameters {
/// Creates a new builder-style object to manufacture [`Parameters`](crate::types::Parameters).
pub fn builder() -> crate::types::builders::ParametersBuilder {
crate::types::builders::ParametersBuilder::default()
}
}
/// A builder for [`Parameters`](crate::types::Parameters).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ParametersBuilder {
pub(crate) exclude_boot_volume: ::std::option::Option<bool>,
pub(crate) no_reboot: ::std::option::Option<bool>,
pub(crate) exclude_data_volume_tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl ParametersBuilder {
/// <p><b>\[Custom snapshot policies that target instances only\]</b> Indicates whether to exclude the root volume from multi-volume snapshot sets. The default is <code>false</code>. If you specify <code>true</code>, then the root volumes attached to targeted instances will be excluded from the multi-volume snapshot sets created by the policy.</p>
pub fn exclude_boot_volume(mut self, input: bool) -> Self {
self.exclude_boot_volume = ::std::option::Option::Some(input);
self
}
/// <p><b>\[Custom snapshot policies that target instances only\]</b> Indicates whether to exclude the root volume from multi-volume snapshot sets. The default is <code>false</code>. If you specify <code>true</code>, then the root volumes attached to targeted instances will be excluded from the multi-volume snapshot sets created by the policy.</p>
pub fn set_exclude_boot_volume(mut self, input: ::std::option::Option<bool>) -> Self {
self.exclude_boot_volume = input;
self
}
/// <p><b>\[Custom snapshot policies that target instances only\]</b> Indicates whether to exclude the root volume from multi-volume snapshot sets. The default is <code>false</code>. If you specify <code>true</code>, then the root volumes attached to targeted instances will be excluded from the multi-volume snapshot sets created by the policy.</p>
pub fn get_exclude_boot_volume(&self) -> &::std::option::Option<bool> {
&self.exclude_boot_volume
}
/// <p><b>\[Custom AMI policies only\]</b> Indicates whether targeted instances are rebooted when the lifecycle policy runs. <code>true</code> indicates that targeted instances are not rebooted when the policy runs. <code>false</code> indicates that target instances are rebooted when the policy runs. The default is <code>true</code> (instances are not rebooted).</p>
pub fn no_reboot(mut self, input: bool) -> Self {
self.no_reboot = ::std::option::Option::Some(input);
self
}
/// <p><b>\[Custom AMI policies only\]</b> Indicates whether targeted instances are rebooted when the lifecycle policy runs. <code>true</code> indicates that targeted instances are not rebooted when the policy runs. <code>false</code> indicates that target instances are rebooted when the policy runs. The default is <code>true</code> (instances are not rebooted).</p>
pub fn set_no_reboot(mut self, input: ::std::option::Option<bool>) -> Self {
self.no_reboot = input;
self
}
/// <p><b>\[Custom AMI policies only\]</b> Indicates whether targeted instances are rebooted when the lifecycle policy runs. <code>true</code> indicates that targeted instances are not rebooted when the policy runs. <code>false</code> indicates that target instances are rebooted when the policy runs. The default is <code>true</code> (instances are not rebooted).</p>
pub fn get_no_reboot(&self) -> &::std::option::Option<bool> {
&self.no_reboot
}
/// Appends an item to `exclude_data_volume_tags`.
///
/// To override the contents of this collection use [`set_exclude_data_volume_tags`](Self::set_exclude_data_volume_tags).
///
/// <p><b>\[Custom snapshot policies that target instances only\]</b> The tags used to identify data (non-root) volumes to exclude from multi-volume snapshot sets.</p>
/// <p>If you create a snapshot lifecycle policy that targets instances and you specify tags for this parameter, then data volumes with the specified tags that are attached to targeted instances will be excluded from the multi-volume snapshot sets created by the policy.</p>
pub fn exclude_data_volume_tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.exclude_data_volume_tags.unwrap_or_default();
v.push(input);
self.exclude_data_volume_tags = ::std::option::Option::Some(v);
self
}
/// <p><b>\[Custom snapshot policies that target instances only\]</b> The tags used to identify data (non-root) volumes to exclude from multi-volume snapshot sets.</p>
/// <p>If you create a snapshot lifecycle policy that targets instances and you specify tags for this parameter, then data volumes with the specified tags that are attached to targeted instances will be excluded from the multi-volume snapshot sets created by the policy.</p>
pub fn set_exclude_data_volume_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.exclude_data_volume_tags = input;
self
}
/// <p><b>\[Custom snapshot policies that target instances only\]</b> The tags used to identify data (non-root) volumes to exclude from multi-volume snapshot sets.</p>
/// <p>If you create a snapshot lifecycle policy that targets instances and you specify tags for this parameter, then data volumes with the specified tags that are attached to targeted instances will be excluded from the multi-volume snapshot sets created by the policy.</p>
pub fn get_exclude_data_volume_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.exclude_data_volume_tags
}
/// Consumes the builder and constructs a [`Parameters`](crate::types::Parameters).
pub fn build(self) -> crate::types::Parameters {
crate::types::Parameters {
exclude_boot_volume: self.exclude_boot_volume,
no_reboot: self.no_reboot,
exclude_data_volume_tags: self.exclude_data_volume_tags,
}
}
}