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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p><b>\[Custom snapshot policies that target instances only\]</b> Information about pre and/or post scripts for a snapshot lifecycle policy that targets instances. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/automate-app-consistent-backups.html"> Automating application-consistent snapshots with pre and post scripts</a>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Script {
/// <p>Indicate which scripts Amazon Data Lifecycle Manager should run on target instances. Pre scripts run before Amazon Data Lifecycle Manager initiates snapshot creation. Post scripts run after Amazon Data Lifecycle Manager initiates snapshot creation.</p>
/// <ul>
/// <li>
/// <p>To run a pre script only, specify <code>PRE</code>. In this case, Amazon Data Lifecycle Manager calls the SSM document with the <code>pre-script</code> parameter before initiating snapshot creation.</p></li>
/// <li>
/// <p>To run a post script only, specify <code>POST</code>. In this case, Amazon Data Lifecycle Manager calls the SSM document with the <code>post-script</code> parameter after initiating snapshot creation.</p></li>
/// <li>
/// <p>To run both pre and post scripts, specify both <code>PRE</code> and <code>POST</code>. In this case, Amazon Data Lifecycle Manager calls the SSM document with the <code>pre-script</code> parameter before initiating snapshot creation, and then it calls the SSM document again with the <code>post-script</code> parameter after initiating snapshot creation.</p></li>
/// </ul>
/// <p>If you are automating VSS Backups, omit this parameter.</p>
/// <p>Default: PRE and POST</p>
pub stages: ::std::option::Option<::std::vec::Vec<crate::types::StageValues>>,
/// <p>Indicates the service used to execute the pre and/or post scripts.</p>
/// <ul>
/// <li>
/// <p>If you are using custom SSM documents or automating application-consistent snapshots of SAP HANA workloads, specify <code>AWS_SYSTEMS_MANAGER</code>.</p></li>
/// <li>
/// <p>If you are automating VSS Backups, omit this parameter.</p></li>
/// </ul>
/// <p>Default: AWS_SYSTEMS_MANAGER</p>
pub execution_handler_service: ::std::option::Option<crate::types::ExecutionHandlerServiceValues>,
/// <p>The SSM document that includes the pre and/or post scripts to run.</p>
/// <ul>
/// <li>
/// <p>If you are automating VSS backups, specify <code>AWS_VSS_BACKUP</code>. In this case, Amazon Data Lifecycle Manager automatically uses the <code>AWSEC2-CreateVssSnapshot</code> SSM document.</p></li>
/// <li>
/// <p>If you are automating application-consistent snapshots for SAP HANA workloads, specify <code>AWSSystemsManagerSAP-CreateDLMSnapshotForSAPHANA</code>.</p></li>
/// <li>
/// <p>If you are using a custom SSM document that you own, specify either the name or ARN of the SSM document. If you are using a custom SSM document that is shared with you, specify the ARN of the SSM document.</p></li>
/// </ul>
pub execution_handler: ::std::option::Option<::std::string::String>,
/// <p>Indicates whether Amazon Data Lifecycle Manager should default to crash-consistent snapshots if the pre script fails.</p>
/// <ul>
/// <li>
/// <p>To default to crash consistent snapshot if the pre script fails, specify <code>true</code>.</p></li>
/// <li>
/// <p>To skip the instance for snapshot creation if the pre script fails, specify <code>false</code>.</p></li>
/// </ul>
/// <p>This parameter is supported only if you run a pre script. If you run a post script only, omit this parameter.</p>
/// <p>Default: true</p>
pub execute_operation_on_script_failure: ::std::option::Option<bool>,
/// <p>Specifies a timeout period, in seconds, after which Amazon Data Lifecycle Manager fails the script run attempt if it has not completed. If a script does not complete within its timeout period, Amazon Data Lifecycle Manager fails the attempt. The timeout period applies to the pre and post scripts individually.</p>
/// <p>If you are automating VSS Backups, omit this parameter.</p>
/// <p>Default: 10</p>
pub execution_timeout: ::std::option::Option<i32>,
/// <p>Specifies the number of times Amazon Data Lifecycle Manager should retry scripts that fail.</p>
/// <ul>
/// <li>
/// <p>If the pre script fails, Amazon Data Lifecycle Manager retries the entire snapshot creation process, including running the pre and post scripts.</p></li>
/// <li>
/// <p>If the post script fails, Amazon Data Lifecycle Manager retries the post script only; in this case, the pre script will have completed and the snapshot might have been created.</p></li>
/// </ul>
/// <p>If you do not want Amazon Data Lifecycle Manager to retry failed scripts, specify <code>0</code>.</p>
/// <p>Default: 0</p>
pub maximum_retry_count: ::std::option::Option<i32>,
}
impl Script {
/// <p>Indicate which scripts Amazon Data Lifecycle Manager should run on target instances. Pre scripts run before Amazon Data Lifecycle Manager initiates snapshot creation. Post scripts run after Amazon Data Lifecycle Manager initiates snapshot creation.</p>
/// <ul>
/// <li>
/// <p>To run a pre script only, specify <code>PRE</code>. In this case, Amazon Data Lifecycle Manager calls the SSM document with the <code>pre-script</code> parameter before initiating snapshot creation.</p></li>
/// <li>
/// <p>To run a post script only, specify <code>POST</code>. In this case, Amazon Data Lifecycle Manager calls the SSM document with the <code>post-script</code> parameter after initiating snapshot creation.</p></li>
/// <li>
/// <p>To run both pre and post scripts, specify both <code>PRE</code> and <code>POST</code>. In this case, Amazon Data Lifecycle Manager calls the SSM document with the <code>pre-script</code> parameter before initiating snapshot creation, and then it calls the SSM document again with the <code>post-script</code> parameter after initiating snapshot creation.</p></li>
/// </ul>
/// <p>If you are automating VSS Backups, omit this parameter.</p>
/// <p>Default: PRE and POST</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 `.stages.is_none()`.
pub fn stages(&self) -> &[crate::types::StageValues] {
self.stages.as_deref().unwrap_or_default()
}
/// <p>Indicates the service used to execute the pre and/or post scripts.</p>
/// <ul>
/// <li>
/// <p>If you are using custom SSM documents or automating application-consistent snapshots of SAP HANA workloads, specify <code>AWS_SYSTEMS_MANAGER</code>.</p></li>
/// <li>
/// <p>If you are automating VSS Backups, omit this parameter.</p></li>
/// </ul>
/// <p>Default: AWS_SYSTEMS_MANAGER</p>
pub fn execution_handler_service(&self) -> ::std::option::Option<&crate::types::ExecutionHandlerServiceValues> {
self.execution_handler_service.as_ref()
}
/// <p>The SSM document that includes the pre and/or post scripts to run.</p>
/// <ul>
/// <li>
/// <p>If you are automating VSS backups, specify <code>AWS_VSS_BACKUP</code>. In this case, Amazon Data Lifecycle Manager automatically uses the <code>AWSEC2-CreateVssSnapshot</code> SSM document.</p></li>
/// <li>
/// <p>If you are automating application-consistent snapshots for SAP HANA workloads, specify <code>AWSSystemsManagerSAP-CreateDLMSnapshotForSAPHANA</code>.</p></li>
/// <li>
/// <p>If you are using a custom SSM document that you own, specify either the name or ARN of the SSM document. If you are using a custom SSM document that is shared with you, specify the ARN of the SSM document.</p></li>
/// </ul>
pub fn execution_handler(&self) -> ::std::option::Option<&str> {
self.execution_handler.as_deref()
}
/// <p>Indicates whether Amazon Data Lifecycle Manager should default to crash-consistent snapshots if the pre script fails.</p>
/// <ul>
/// <li>
/// <p>To default to crash consistent snapshot if the pre script fails, specify <code>true</code>.</p></li>
/// <li>
/// <p>To skip the instance for snapshot creation if the pre script fails, specify <code>false</code>.</p></li>
/// </ul>
/// <p>This parameter is supported only if you run a pre script. If you run a post script only, omit this parameter.</p>
/// <p>Default: true</p>
pub fn execute_operation_on_script_failure(&self) -> ::std::option::Option<bool> {
self.execute_operation_on_script_failure
}
/// <p>Specifies a timeout period, in seconds, after which Amazon Data Lifecycle Manager fails the script run attempt if it has not completed. If a script does not complete within its timeout period, Amazon Data Lifecycle Manager fails the attempt. The timeout period applies to the pre and post scripts individually.</p>
/// <p>If you are automating VSS Backups, omit this parameter.</p>
/// <p>Default: 10</p>
pub fn execution_timeout(&self) -> ::std::option::Option<i32> {
self.execution_timeout
}
/// <p>Specifies the number of times Amazon Data Lifecycle Manager should retry scripts that fail.</p>
/// <ul>
/// <li>
/// <p>If the pre script fails, Amazon Data Lifecycle Manager retries the entire snapshot creation process, including running the pre and post scripts.</p></li>
/// <li>
/// <p>If the post script fails, Amazon Data Lifecycle Manager retries the post script only; in this case, the pre script will have completed and the snapshot might have been created.</p></li>
/// </ul>
/// <p>If you do not want Amazon Data Lifecycle Manager to retry failed scripts, specify <code>0</code>.</p>
/// <p>Default: 0</p>
pub fn maximum_retry_count(&self) -> ::std::option::Option<i32> {
self.maximum_retry_count
}
}
impl Script {
/// Creates a new builder-style object to manufacture [`Script`](crate::types::Script).
pub fn builder() -> crate::types::builders::ScriptBuilder {
crate::types::builders::ScriptBuilder::default()
}
}
/// A builder for [`Script`](crate::types::Script).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ScriptBuilder {
pub(crate) stages: ::std::option::Option<::std::vec::Vec<crate::types::StageValues>>,
pub(crate) execution_handler_service: ::std::option::Option<crate::types::ExecutionHandlerServiceValues>,
pub(crate) execution_handler: ::std::option::Option<::std::string::String>,
pub(crate) execute_operation_on_script_failure: ::std::option::Option<bool>,
pub(crate) execution_timeout: ::std::option::Option<i32>,
pub(crate) maximum_retry_count: ::std::option::Option<i32>,
}
impl ScriptBuilder {
/// Appends an item to `stages`.
///
/// To override the contents of this collection use [`set_stages`](Self::set_stages).
///
/// <p>Indicate which scripts Amazon Data Lifecycle Manager should run on target instances. Pre scripts run before Amazon Data Lifecycle Manager initiates snapshot creation. Post scripts run after Amazon Data Lifecycle Manager initiates snapshot creation.</p>
/// <ul>
/// <li>
/// <p>To run a pre script only, specify <code>PRE</code>. In this case, Amazon Data Lifecycle Manager calls the SSM document with the <code>pre-script</code> parameter before initiating snapshot creation.</p></li>
/// <li>
/// <p>To run a post script only, specify <code>POST</code>. In this case, Amazon Data Lifecycle Manager calls the SSM document with the <code>post-script</code> parameter after initiating snapshot creation.</p></li>
/// <li>
/// <p>To run both pre and post scripts, specify both <code>PRE</code> and <code>POST</code>. In this case, Amazon Data Lifecycle Manager calls the SSM document with the <code>pre-script</code> parameter before initiating snapshot creation, and then it calls the SSM document again with the <code>post-script</code> parameter after initiating snapshot creation.</p></li>
/// </ul>
/// <p>If you are automating VSS Backups, omit this parameter.</p>
/// <p>Default: PRE and POST</p>
pub fn stages(mut self, input: crate::types::StageValues) -> Self {
let mut v = self.stages.unwrap_or_default();
v.push(input);
self.stages = ::std::option::Option::Some(v);
self
}
/// <p>Indicate which scripts Amazon Data Lifecycle Manager should run on target instances. Pre scripts run before Amazon Data Lifecycle Manager initiates snapshot creation. Post scripts run after Amazon Data Lifecycle Manager initiates snapshot creation.</p>
/// <ul>
/// <li>
/// <p>To run a pre script only, specify <code>PRE</code>. In this case, Amazon Data Lifecycle Manager calls the SSM document with the <code>pre-script</code> parameter before initiating snapshot creation.</p></li>
/// <li>
/// <p>To run a post script only, specify <code>POST</code>. In this case, Amazon Data Lifecycle Manager calls the SSM document with the <code>post-script</code> parameter after initiating snapshot creation.</p></li>
/// <li>
/// <p>To run both pre and post scripts, specify both <code>PRE</code> and <code>POST</code>. In this case, Amazon Data Lifecycle Manager calls the SSM document with the <code>pre-script</code> parameter before initiating snapshot creation, and then it calls the SSM document again with the <code>post-script</code> parameter after initiating snapshot creation.</p></li>
/// </ul>
/// <p>If you are automating VSS Backups, omit this parameter.</p>
/// <p>Default: PRE and POST</p>
pub fn set_stages(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::StageValues>>) -> Self {
self.stages = input;
self
}
/// <p>Indicate which scripts Amazon Data Lifecycle Manager should run on target instances. Pre scripts run before Amazon Data Lifecycle Manager initiates snapshot creation. Post scripts run after Amazon Data Lifecycle Manager initiates snapshot creation.</p>
/// <ul>
/// <li>
/// <p>To run a pre script only, specify <code>PRE</code>. In this case, Amazon Data Lifecycle Manager calls the SSM document with the <code>pre-script</code> parameter before initiating snapshot creation.</p></li>
/// <li>
/// <p>To run a post script only, specify <code>POST</code>. In this case, Amazon Data Lifecycle Manager calls the SSM document with the <code>post-script</code> parameter after initiating snapshot creation.</p></li>
/// <li>
/// <p>To run both pre and post scripts, specify both <code>PRE</code> and <code>POST</code>. In this case, Amazon Data Lifecycle Manager calls the SSM document with the <code>pre-script</code> parameter before initiating snapshot creation, and then it calls the SSM document again with the <code>post-script</code> parameter after initiating snapshot creation.</p></li>
/// </ul>
/// <p>If you are automating VSS Backups, omit this parameter.</p>
/// <p>Default: PRE and POST</p>
pub fn get_stages(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StageValues>> {
&self.stages
}
/// <p>Indicates the service used to execute the pre and/or post scripts.</p>
/// <ul>
/// <li>
/// <p>If you are using custom SSM documents or automating application-consistent snapshots of SAP HANA workloads, specify <code>AWS_SYSTEMS_MANAGER</code>.</p></li>
/// <li>
/// <p>If you are automating VSS Backups, omit this parameter.</p></li>
/// </ul>
/// <p>Default: AWS_SYSTEMS_MANAGER</p>
pub fn execution_handler_service(mut self, input: crate::types::ExecutionHandlerServiceValues) -> Self {
self.execution_handler_service = ::std::option::Option::Some(input);
self
}
/// <p>Indicates the service used to execute the pre and/or post scripts.</p>
/// <ul>
/// <li>
/// <p>If you are using custom SSM documents or automating application-consistent snapshots of SAP HANA workloads, specify <code>AWS_SYSTEMS_MANAGER</code>.</p></li>
/// <li>
/// <p>If you are automating VSS Backups, omit this parameter.</p></li>
/// </ul>
/// <p>Default: AWS_SYSTEMS_MANAGER</p>
pub fn set_execution_handler_service(mut self, input: ::std::option::Option<crate::types::ExecutionHandlerServiceValues>) -> Self {
self.execution_handler_service = input;
self
}
/// <p>Indicates the service used to execute the pre and/or post scripts.</p>
/// <ul>
/// <li>
/// <p>If you are using custom SSM documents or automating application-consistent snapshots of SAP HANA workloads, specify <code>AWS_SYSTEMS_MANAGER</code>.</p></li>
/// <li>
/// <p>If you are automating VSS Backups, omit this parameter.</p></li>
/// </ul>
/// <p>Default: AWS_SYSTEMS_MANAGER</p>
pub fn get_execution_handler_service(&self) -> &::std::option::Option<crate::types::ExecutionHandlerServiceValues> {
&self.execution_handler_service
}
/// <p>The SSM document that includes the pre and/or post scripts to run.</p>
/// <ul>
/// <li>
/// <p>If you are automating VSS backups, specify <code>AWS_VSS_BACKUP</code>. In this case, Amazon Data Lifecycle Manager automatically uses the <code>AWSEC2-CreateVssSnapshot</code> SSM document.</p></li>
/// <li>
/// <p>If you are automating application-consistent snapshots for SAP HANA workloads, specify <code>AWSSystemsManagerSAP-CreateDLMSnapshotForSAPHANA</code>.</p></li>
/// <li>
/// <p>If you are using a custom SSM document that you own, specify either the name or ARN of the SSM document. If you are using a custom SSM document that is shared with you, specify the ARN of the SSM document.</p></li>
/// </ul>
/// This field is required.
pub fn execution_handler(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.execution_handler = ::std::option::Option::Some(input.into());
self
}
/// <p>The SSM document that includes the pre and/or post scripts to run.</p>
/// <ul>
/// <li>
/// <p>If you are automating VSS backups, specify <code>AWS_VSS_BACKUP</code>. In this case, Amazon Data Lifecycle Manager automatically uses the <code>AWSEC2-CreateVssSnapshot</code> SSM document.</p></li>
/// <li>
/// <p>If you are automating application-consistent snapshots for SAP HANA workloads, specify <code>AWSSystemsManagerSAP-CreateDLMSnapshotForSAPHANA</code>.</p></li>
/// <li>
/// <p>If you are using a custom SSM document that you own, specify either the name or ARN of the SSM document. If you are using a custom SSM document that is shared with you, specify the ARN of the SSM document.</p></li>
/// </ul>
pub fn set_execution_handler(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.execution_handler = input;
self
}
/// <p>The SSM document that includes the pre and/or post scripts to run.</p>
/// <ul>
/// <li>
/// <p>If you are automating VSS backups, specify <code>AWS_VSS_BACKUP</code>. In this case, Amazon Data Lifecycle Manager automatically uses the <code>AWSEC2-CreateVssSnapshot</code> SSM document.</p></li>
/// <li>
/// <p>If you are automating application-consistent snapshots for SAP HANA workloads, specify <code>AWSSystemsManagerSAP-CreateDLMSnapshotForSAPHANA</code>.</p></li>
/// <li>
/// <p>If you are using a custom SSM document that you own, specify either the name or ARN of the SSM document. If you are using a custom SSM document that is shared with you, specify the ARN of the SSM document.</p></li>
/// </ul>
pub fn get_execution_handler(&self) -> &::std::option::Option<::std::string::String> {
&self.execution_handler
}
/// <p>Indicates whether Amazon Data Lifecycle Manager should default to crash-consistent snapshots if the pre script fails.</p>
/// <ul>
/// <li>
/// <p>To default to crash consistent snapshot if the pre script fails, specify <code>true</code>.</p></li>
/// <li>
/// <p>To skip the instance for snapshot creation if the pre script fails, specify <code>false</code>.</p></li>
/// </ul>
/// <p>This parameter is supported only if you run a pre script. If you run a post script only, omit this parameter.</p>
/// <p>Default: true</p>
pub fn execute_operation_on_script_failure(mut self, input: bool) -> Self {
self.execute_operation_on_script_failure = ::std::option::Option::Some(input);
self
}
/// <p>Indicates whether Amazon Data Lifecycle Manager should default to crash-consistent snapshots if the pre script fails.</p>
/// <ul>
/// <li>
/// <p>To default to crash consistent snapshot if the pre script fails, specify <code>true</code>.</p></li>
/// <li>
/// <p>To skip the instance for snapshot creation if the pre script fails, specify <code>false</code>.</p></li>
/// </ul>
/// <p>This parameter is supported only if you run a pre script. If you run a post script only, omit this parameter.</p>
/// <p>Default: true</p>
pub fn set_execute_operation_on_script_failure(mut self, input: ::std::option::Option<bool>) -> Self {
self.execute_operation_on_script_failure = input;
self
}
/// <p>Indicates whether Amazon Data Lifecycle Manager should default to crash-consistent snapshots if the pre script fails.</p>
/// <ul>
/// <li>
/// <p>To default to crash consistent snapshot if the pre script fails, specify <code>true</code>.</p></li>
/// <li>
/// <p>To skip the instance for snapshot creation if the pre script fails, specify <code>false</code>.</p></li>
/// </ul>
/// <p>This parameter is supported only if you run a pre script. If you run a post script only, omit this parameter.</p>
/// <p>Default: true</p>
pub fn get_execute_operation_on_script_failure(&self) -> &::std::option::Option<bool> {
&self.execute_operation_on_script_failure
}
/// <p>Specifies a timeout period, in seconds, after which Amazon Data Lifecycle Manager fails the script run attempt if it has not completed. If a script does not complete within its timeout period, Amazon Data Lifecycle Manager fails the attempt. The timeout period applies to the pre and post scripts individually.</p>
/// <p>If you are automating VSS Backups, omit this parameter.</p>
/// <p>Default: 10</p>
pub fn execution_timeout(mut self, input: i32) -> Self {
self.execution_timeout = ::std::option::Option::Some(input);
self
}
/// <p>Specifies a timeout period, in seconds, after which Amazon Data Lifecycle Manager fails the script run attempt if it has not completed. If a script does not complete within its timeout period, Amazon Data Lifecycle Manager fails the attempt. The timeout period applies to the pre and post scripts individually.</p>
/// <p>If you are automating VSS Backups, omit this parameter.</p>
/// <p>Default: 10</p>
pub fn set_execution_timeout(mut self, input: ::std::option::Option<i32>) -> Self {
self.execution_timeout = input;
self
}
/// <p>Specifies a timeout period, in seconds, after which Amazon Data Lifecycle Manager fails the script run attempt if it has not completed. If a script does not complete within its timeout period, Amazon Data Lifecycle Manager fails the attempt. The timeout period applies to the pre and post scripts individually.</p>
/// <p>If you are automating VSS Backups, omit this parameter.</p>
/// <p>Default: 10</p>
pub fn get_execution_timeout(&self) -> &::std::option::Option<i32> {
&self.execution_timeout
}
/// <p>Specifies the number of times Amazon Data Lifecycle Manager should retry scripts that fail.</p>
/// <ul>
/// <li>
/// <p>If the pre script fails, Amazon Data Lifecycle Manager retries the entire snapshot creation process, including running the pre and post scripts.</p></li>
/// <li>
/// <p>If the post script fails, Amazon Data Lifecycle Manager retries the post script only; in this case, the pre script will have completed and the snapshot might have been created.</p></li>
/// </ul>
/// <p>If you do not want Amazon Data Lifecycle Manager to retry failed scripts, specify <code>0</code>.</p>
/// <p>Default: 0</p>
pub fn maximum_retry_count(mut self, input: i32) -> Self {
self.maximum_retry_count = ::std::option::Option::Some(input);
self
}
/// <p>Specifies the number of times Amazon Data Lifecycle Manager should retry scripts that fail.</p>
/// <ul>
/// <li>
/// <p>If the pre script fails, Amazon Data Lifecycle Manager retries the entire snapshot creation process, including running the pre and post scripts.</p></li>
/// <li>
/// <p>If the post script fails, Amazon Data Lifecycle Manager retries the post script only; in this case, the pre script will have completed and the snapshot might have been created.</p></li>
/// </ul>
/// <p>If you do not want Amazon Data Lifecycle Manager to retry failed scripts, specify <code>0</code>.</p>
/// <p>Default: 0</p>
pub fn set_maximum_retry_count(mut self, input: ::std::option::Option<i32>) -> Self {
self.maximum_retry_count = input;
self
}
/// <p>Specifies the number of times Amazon Data Lifecycle Manager should retry scripts that fail.</p>
/// <ul>
/// <li>
/// <p>If the pre script fails, Amazon Data Lifecycle Manager retries the entire snapshot creation process, including running the pre and post scripts.</p></li>
/// <li>
/// <p>If the post script fails, Amazon Data Lifecycle Manager retries the post script only; in this case, the pre script will have completed and the snapshot might have been created.</p></li>
/// </ul>
/// <p>If you do not want Amazon Data Lifecycle Manager to retry failed scripts, specify <code>0</code>.</p>
/// <p>Default: 0</p>
pub fn get_maximum_retry_count(&self) -> &::std::option::Option<i32> {
&self.maximum_retry_count
}
/// Consumes the builder and constructs a [`Script`](crate::types::Script).
pub fn build(self) -> crate::types::Script {
crate::types::Script {
stages: self.stages,
execution_handler_service: self.execution_handler_service,
execution_handler: self.execution_handler,
execute_operation_on_script_failure: self.execute_operation_on_script_failure,
execution_timeout: self.execution_timeout,
maximum_retry_count: self.maximum_retry_count,
}
}
}