aws_sdk_datasync/operation/update_task/_update_task_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>UpdateTaskResponse</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateTaskInput {
7 /// <p>Specifies the ARN of the task that you want to update.</p>
8 pub task_arn: ::std::option::Option<::std::string::String>,
9 /// <p>Indicates how your transfer task is configured. These options include how DataSync handles files, objects, and their associated metadata during your transfer. You also can specify how to verify data integrity, set bandwidth limits for your task, among other options.</p>
10 /// <p>Each option has a default value. Unless you need to, you don't have to configure any option before calling <a href="https://docs.aws.amazon.com/datasync/latest/userguide/API_StartTaskExecution.html">StartTaskExecution</a>.</p>
11 /// <p>You also can override your task options for each task execution. For example, you might want to adjust the <code>LogLevel</code> for an individual execution.</p>
12 pub options: ::std::option::Option<crate::types::Options>,
13 /// <p>Specifies exclude filters that define the files, objects, and folders in your source location that you don't want DataSync to transfer. For more information and examples, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html">Specifying what DataSync transfers by using filters</a>.</p>
14 pub excludes: ::std::option::Option<::std::vec::Vec<crate::types::FilterRule>>,
15 /// <p>Specifies a schedule for when you want your task to run. For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/task-scheduling.html">Scheduling your task</a>.</p>
16 pub schedule: ::std::option::Option<crate::types::TaskSchedule>,
17 /// <p>Specifies the name of your task.</p>
18 pub name: ::std::option::Option<::std::string::String>,
19 /// <p>Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for monitoring your task.</p>
20 /// <p>For Enhanced mode tasks, you must use <code>/aws/datasync</code> as your log group name. For example:</p>
21 /// <p><code>arn:aws:logs:us-east-1:111222333444:log-group:/aws/datasync:*</code></p>
22 /// <p>For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/configure-logging.html">Monitoring data transfers with CloudWatch Logs</a>.</p>
23 pub cloud_watch_log_group_arn: ::std::option::Option<::std::string::String>,
24 /// <p>Specifies include filters define the files, objects, and folders in your source location that you want DataSync to transfer. For more information and examples, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html">Specifying what DataSync transfers by using filters</a>.</p>
25 pub includes: ::std::option::Option<::std::vec::Vec<crate::types::FilterRule>>,
26 /// <p>Configures a manifest, which is a list of files or objects that you want DataSync to transfer. For more information and configuration examples, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/transferring-with-manifest.html">Specifying what DataSync transfers by using a manifest</a>.</p>
27 /// <p>When using this parameter, your caller identity (the IAM role that you're using DataSync with) must have the <code>iam:PassRole</code> permission. The <a href="https://docs.aws.amazon.com/datasync/latest/userguide/security-iam-awsmanpol.html#security-iam-awsmanpol-awsdatasyncfullaccess">AWSDataSyncFullAccess</a> policy includes this permission.</p>
28 /// <p>To remove a manifest configuration, specify this parameter as empty.</p>
29 pub manifest_config: ::std::option::Option<crate::types::ManifestConfig>,
30 /// <p>Specifies how you want to configure a task report, which provides detailed information about your DataSync transfer. For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/task-reports.html">Monitoring your DataSync transfers with task reports</a>.</p>
31 /// <p>When using this parameter, your caller identity (the IAM role that you're using DataSync with) must have the <code>iam:PassRole</code> permission. The <a href="https://docs.aws.amazon.com/datasync/latest/userguide/security-iam-awsmanpol.html#security-iam-awsmanpol-awsdatasyncfullaccess">AWSDataSyncFullAccess</a> policy includes this permission.</p>
32 /// <p>To remove a task report configuration, specify this parameter as empty.</p>
33 pub task_report_config: ::std::option::Option<crate::types::TaskReportConfig>,
34}
35impl UpdateTaskInput {
36 /// <p>Specifies the ARN of the task that you want to update.</p>
37 pub fn task_arn(&self) -> ::std::option::Option<&str> {
38 self.task_arn.as_deref()
39 }
40 /// <p>Indicates how your transfer task is configured. These options include how DataSync handles files, objects, and their associated metadata during your transfer. You also can specify how to verify data integrity, set bandwidth limits for your task, among other options.</p>
41 /// <p>Each option has a default value. Unless you need to, you don't have to configure any option before calling <a href="https://docs.aws.amazon.com/datasync/latest/userguide/API_StartTaskExecution.html">StartTaskExecution</a>.</p>
42 /// <p>You also can override your task options for each task execution. For example, you might want to adjust the <code>LogLevel</code> for an individual execution.</p>
43 pub fn options(&self) -> ::std::option::Option<&crate::types::Options> {
44 self.options.as_ref()
45 }
46 /// <p>Specifies exclude filters that define the files, objects, and folders in your source location that you don't want DataSync to transfer. For more information and examples, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html">Specifying what DataSync transfers by using filters</a>.</p>
47 ///
48 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.excludes.is_none()`.
49 pub fn excludes(&self) -> &[crate::types::FilterRule] {
50 self.excludes.as_deref().unwrap_or_default()
51 }
52 /// <p>Specifies a schedule for when you want your task to run. For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/task-scheduling.html">Scheduling your task</a>.</p>
53 pub fn schedule(&self) -> ::std::option::Option<&crate::types::TaskSchedule> {
54 self.schedule.as_ref()
55 }
56 /// <p>Specifies the name of your task.</p>
57 pub fn name(&self) -> ::std::option::Option<&str> {
58 self.name.as_deref()
59 }
60 /// <p>Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for monitoring your task.</p>
61 /// <p>For Enhanced mode tasks, you must use <code>/aws/datasync</code> as your log group name. For example:</p>
62 /// <p><code>arn:aws:logs:us-east-1:111222333444:log-group:/aws/datasync:*</code></p>
63 /// <p>For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/configure-logging.html">Monitoring data transfers with CloudWatch Logs</a>.</p>
64 pub fn cloud_watch_log_group_arn(&self) -> ::std::option::Option<&str> {
65 self.cloud_watch_log_group_arn.as_deref()
66 }
67 /// <p>Specifies include filters define the files, objects, and folders in your source location that you want DataSync to transfer. For more information and examples, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html">Specifying what DataSync transfers by using filters</a>.</p>
68 ///
69 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.includes.is_none()`.
70 pub fn includes(&self) -> &[crate::types::FilterRule] {
71 self.includes.as_deref().unwrap_or_default()
72 }
73 /// <p>Configures a manifest, which is a list of files or objects that you want DataSync to transfer. For more information and configuration examples, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/transferring-with-manifest.html">Specifying what DataSync transfers by using a manifest</a>.</p>
74 /// <p>When using this parameter, your caller identity (the IAM role that you're using DataSync with) must have the <code>iam:PassRole</code> permission. The <a href="https://docs.aws.amazon.com/datasync/latest/userguide/security-iam-awsmanpol.html#security-iam-awsmanpol-awsdatasyncfullaccess">AWSDataSyncFullAccess</a> policy includes this permission.</p>
75 /// <p>To remove a manifest configuration, specify this parameter as empty.</p>
76 pub fn manifest_config(&self) -> ::std::option::Option<&crate::types::ManifestConfig> {
77 self.manifest_config.as_ref()
78 }
79 /// <p>Specifies how you want to configure a task report, which provides detailed information about your DataSync transfer. For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/task-reports.html">Monitoring your DataSync transfers with task reports</a>.</p>
80 /// <p>When using this parameter, your caller identity (the IAM role that you're using DataSync with) must have the <code>iam:PassRole</code> permission. The <a href="https://docs.aws.amazon.com/datasync/latest/userguide/security-iam-awsmanpol.html#security-iam-awsmanpol-awsdatasyncfullaccess">AWSDataSyncFullAccess</a> policy includes this permission.</p>
81 /// <p>To remove a task report configuration, specify this parameter as empty.</p>
82 pub fn task_report_config(&self) -> ::std::option::Option<&crate::types::TaskReportConfig> {
83 self.task_report_config.as_ref()
84 }
85}
86static UPDATETASKINPUT_MEMBER_TASK_ARN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
87 ::aws_smithy_schema::ShapeId::from_parts(
88 "com.amazonaws.datasync.synthetic#UpdateTaskInput$TaskArn",
89 "com.amazonaws.datasync.synthetic",
90 "UpdateTaskInput",
91 ),
92 ::aws_smithy_schema::ShapeType::String,
93 "TaskArn",
94 0,
95);
96static UPDATETASKINPUT_MEMBER_OPTIONS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
97 ::aws_smithy_schema::ShapeId::from_parts(
98 "com.amazonaws.datasync.synthetic#UpdateTaskInput$Options",
99 "com.amazonaws.datasync.synthetic",
100 "UpdateTaskInput",
101 ),
102 ::aws_smithy_schema::ShapeType::Structure,
103 "Options",
104 1,
105);
106static UPDATETASKINPUT_MEMBER_EXCLUDES_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
107 ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.datasync#FilterList$member", "com.amazonaws.datasync", "FilterList"),
108 ::aws_smithy_schema::ShapeType::Structure,
109 "member",
110 0,
111);
112static UPDATETASKINPUT_MEMBER_EXCLUDES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
113 ::aws_smithy_schema::ShapeId::from_parts(
114 "com.amazonaws.datasync.synthetic#UpdateTaskInput$Excludes",
115 "com.amazonaws.datasync.synthetic",
116 "UpdateTaskInput",
117 ),
118 ::aws_smithy_schema::ShapeType::List,
119 "Excludes",
120 2,
121)
122.with_list_member(&UPDATETASKINPUT_MEMBER_EXCLUDES_MEMBER);
123static UPDATETASKINPUT_MEMBER_SCHEDULE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
124 ::aws_smithy_schema::ShapeId::from_parts(
125 "com.amazonaws.datasync.synthetic#UpdateTaskInput$Schedule",
126 "com.amazonaws.datasync.synthetic",
127 "UpdateTaskInput",
128 ),
129 ::aws_smithy_schema::ShapeType::Structure,
130 "Schedule",
131 3,
132);
133static UPDATETASKINPUT_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
134 ::aws_smithy_schema::ShapeId::from_parts(
135 "com.amazonaws.datasync.synthetic#UpdateTaskInput$Name",
136 "com.amazonaws.datasync.synthetic",
137 "UpdateTaskInput",
138 ),
139 ::aws_smithy_schema::ShapeType::String,
140 "Name",
141 4,
142);
143static UPDATETASKINPUT_MEMBER_CLOUD_WATCH_LOG_GROUP_ARN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
144 ::aws_smithy_schema::ShapeId::from_parts(
145 "com.amazonaws.datasync.synthetic#UpdateTaskInput$CloudWatchLogGroupArn",
146 "com.amazonaws.datasync.synthetic",
147 "UpdateTaskInput",
148 ),
149 ::aws_smithy_schema::ShapeType::String,
150 "CloudWatchLogGroupArn",
151 5,
152);
153static UPDATETASKINPUT_MEMBER_INCLUDES_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
154 ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.datasync#FilterList$member", "com.amazonaws.datasync", "FilterList"),
155 ::aws_smithy_schema::ShapeType::Structure,
156 "member",
157 0,
158);
159static UPDATETASKINPUT_MEMBER_INCLUDES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
160 ::aws_smithy_schema::ShapeId::from_parts(
161 "com.amazonaws.datasync.synthetic#UpdateTaskInput$Includes",
162 "com.amazonaws.datasync.synthetic",
163 "UpdateTaskInput",
164 ),
165 ::aws_smithy_schema::ShapeType::List,
166 "Includes",
167 6,
168)
169.with_list_member(&UPDATETASKINPUT_MEMBER_INCLUDES_MEMBER);
170static UPDATETASKINPUT_MEMBER_MANIFEST_CONFIG: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
171 ::aws_smithy_schema::ShapeId::from_parts(
172 "com.amazonaws.datasync.synthetic#UpdateTaskInput$ManifestConfig",
173 "com.amazonaws.datasync.synthetic",
174 "UpdateTaskInput",
175 ),
176 ::aws_smithy_schema::ShapeType::Structure,
177 "ManifestConfig",
178 7,
179);
180static UPDATETASKINPUT_MEMBER_TASK_REPORT_CONFIG: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
181 ::aws_smithy_schema::ShapeId::from_parts(
182 "com.amazonaws.datasync.synthetic#UpdateTaskInput$TaskReportConfig",
183 "com.amazonaws.datasync.synthetic",
184 "UpdateTaskInput",
185 ),
186 ::aws_smithy_schema::ShapeType::Structure,
187 "TaskReportConfig",
188 8,
189);
190static UPDATETASKINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
191 ::aws_smithy_schema::ShapeId::from_parts(
192 "com.amazonaws.datasync.synthetic#UpdateTaskInput",
193 "com.amazonaws.datasync.synthetic",
194 "UpdateTaskInput",
195 ),
196 ::aws_smithy_schema::ShapeType::Structure,
197 &[
198 &UPDATETASKINPUT_MEMBER_TASK_ARN,
199 &UPDATETASKINPUT_MEMBER_OPTIONS,
200 &UPDATETASKINPUT_MEMBER_EXCLUDES,
201 &UPDATETASKINPUT_MEMBER_SCHEDULE,
202 &UPDATETASKINPUT_MEMBER_NAME,
203 &UPDATETASKINPUT_MEMBER_CLOUD_WATCH_LOG_GROUP_ARN,
204 &UPDATETASKINPUT_MEMBER_INCLUDES,
205 &UPDATETASKINPUT_MEMBER_MANIFEST_CONFIG,
206 &UPDATETASKINPUT_MEMBER_TASK_REPORT_CONFIG,
207 ],
208)
209.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
210.with_original_name("UpdateTaskRequest");
211impl UpdateTaskInput {
212 /// The schema for this shape.
213 pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &UPDATETASKINPUT_SCHEMA;
214}
215impl ::aws_smithy_schema::serde::SerializableStruct for UpdateTaskInput {
216 fn schema(&self) -> &::aws_smithy_schema::Schema<'_> {
217 Self::SCHEMA
218 }
219
220 #[allow(unused_variables, clippy::diverging_sub_expression)]
221 fn serialize_members(
222 &self,
223 ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
224 ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
225 if let Some(ref val) = self.task_arn {
226 ser.write_string(&UPDATETASKINPUT_MEMBER_TASK_ARN, val)?;
227 }
228 if let Some(ref val) = self.options {
229 ser.write_struct(&UPDATETASKINPUT_MEMBER_OPTIONS, val)?;
230 }
231 if let Some(ref val) = self.excludes {
232 ser.write_list(
233 &UPDATETASKINPUT_MEMBER_EXCLUDES,
234 &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
235 for item in val {
236 ser.write_struct(crate::types::FilterRule::SCHEMA, item)?;
237 }
238 Ok(())
239 },
240 )?;
241 }
242 if let Some(ref val) = self.schedule {
243 ser.write_struct(&UPDATETASKINPUT_MEMBER_SCHEDULE, val)?;
244 }
245 if let Some(ref val) = self.name {
246 ser.write_string(&UPDATETASKINPUT_MEMBER_NAME, val)?;
247 }
248 if let Some(ref val) = self.cloud_watch_log_group_arn {
249 ser.write_string(&UPDATETASKINPUT_MEMBER_CLOUD_WATCH_LOG_GROUP_ARN, val)?;
250 }
251 if let Some(ref val) = self.includes {
252 ser.write_list(
253 &UPDATETASKINPUT_MEMBER_INCLUDES,
254 &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
255 for item in val {
256 ser.write_struct(crate::types::FilterRule::SCHEMA, item)?;
257 }
258 Ok(())
259 },
260 )?;
261 }
262 if let Some(ref val) = self.manifest_config {
263 ser.write_struct(&UPDATETASKINPUT_MEMBER_MANIFEST_CONFIG, val)?;
264 }
265 if let Some(ref val) = self.task_report_config {
266 ser.write_struct(&UPDATETASKINPUT_MEMBER_TASK_REPORT_CONFIG, val)?;
267 }
268 Ok(())
269 }
270}
271impl crate::operation::update_task::builders::UpdateTaskInputBuilder {
272 #[allow(
273 unused_variables,
274 unreachable_code,
275 clippy::single_match,
276 clippy::match_single_binding,
277 clippy::diverging_sub_expression
278 )]
279 pub(crate) fn deserialize_members(
280 &mut self,
281 deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
282 ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
283 deserializer.read_struct(&UPDATETASKINPUT_SCHEMA, &mut |member, deser| {
284 match member.member_index() {
285 Some(0) => {
286 if deser.is_null() {
287 deser.read_null()?;
288 } else {
289 self.task_arn = Some(deser.read_string(member)?);
290 }
291 }
292 Some(1) => {
293 if deser.is_null() {
294 deser.read_null()?;
295 } else {
296 self.options = Some(crate::types::Options::deserialize(deser)?);
297 }
298 }
299 Some(2) => {
300 if deser.is_null() {
301 deser.read_null()?;
302 } else {
303 self.excludes = Some({
304 let mut container = Vec::new();
305 deser.read_list(member, &mut |deser| {
306 container.push(crate::types::FilterRule::deserialize(deser)?);
307 Ok(())
308 })?;
309 container
310 });
311 }
312 }
313 Some(3) => {
314 if deser.is_null() {
315 deser.read_null()?;
316 } else {
317 self.schedule = Some(crate::types::TaskSchedule::deserialize(deser)?);
318 }
319 }
320 Some(4) => {
321 if deser.is_null() {
322 deser.read_null()?;
323 } else {
324 self.name = Some(deser.read_string(member)?);
325 }
326 }
327 Some(5) => {
328 if deser.is_null() {
329 deser.read_null()?;
330 } else {
331 self.cloud_watch_log_group_arn = Some(deser.read_string(member)?);
332 }
333 }
334 Some(6) => {
335 if deser.is_null() {
336 deser.read_null()?;
337 } else {
338 self.includes = Some({
339 let mut container = Vec::new();
340 deser.read_list(member, &mut |deser| {
341 container.push(crate::types::FilterRule::deserialize(deser)?);
342 Ok(())
343 })?;
344 container
345 });
346 }
347 }
348 Some(7) => {
349 if deser.is_null() {
350 deser.read_null()?;
351 } else {
352 self.manifest_config = Some(crate::types::ManifestConfig::deserialize(deser)?);
353 }
354 }
355 Some(8) => {
356 if deser.is_null() {
357 deser.read_null()?;
358 } else {
359 self.task_report_config = Some(crate::types::TaskReportConfig::deserialize(deser)?);
360 }
361 }
362 _ => {}
363 }
364 Ok(())
365 })
366 }
367}
368
369impl UpdateTaskInput {
370 /// Deserializes this structure from a [`ShapeDeserializer`].
371 pub fn deserialize(
372 deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
373 ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
374 let mut builder = Self::builder();
375 builder.deserialize_members(deserializer)?;
376 builder.task_arn = builder.task_arn.or(Some(String::new()));
377 builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
378 }
379}
380impl UpdateTaskInput {
381 /// Creates a new builder-style object to manufacture [`UpdateTaskInput`](crate::operation::update_task::UpdateTaskInput).
382 pub fn builder() -> crate::operation::update_task::builders::UpdateTaskInputBuilder {
383 crate::operation::update_task::builders::UpdateTaskInputBuilder::default()
384 }
385}
386
387/// A builder for [`UpdateTaskInput`](crate::operation::update_task::UpdateTaskInput).
388#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
389#[non_exhaustive]
390pub struct UpdateTaskInputBuilder {
391 pub(crate) task_arn: ::std::option::Option<::std::string::String>,
392 pub(crate) options: ::std::option::Option<crate::types::Options>,
393 pub(crate) excludes: ::std::option::Option<::std::vec::Vec<crate::types::FilterRule>>,
394 pub(crate) schedule: ::std::option::Option<crate::types::TaskSchedule>,
395 pub(crate) name: ::std::option::Option<::std::string::String>,
396 pub(crate) cloud_watch_log_group_arn: ::std::option::Option<::std::string::String>,
397 pub(crate) includes: ::std::option::Option<::std::vec::Vec<crate::types::FilterRule>>,
398 pub(crate) manifest_config: ::std::option::Option<crate::types::ManifestConfig>,
399 pub(crate) task_report_config: ::std::option::Option<crate::types::TaskReportConfig>,
400}
401impl UpdateTaskInputBuilder {
402 /// <p>Specifies the ARN of the task that you want to update.</p>
403 /// This field is required.
404 pub fn task_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
405 self.task_arn = ::std::option::Option::Some(input.into());
406 self
407 }
408 /// <p>Specifies the ARN of the task that you want to update.</p>
409 pub fn set_task_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
410 self.task_arn = input;
411 self
412 }
413 /// <p>Specifies the ARN of the task that you want to update.</p>
414 pub fn get_task_arn(&self) -> &::std::option::Option<::std::string::String> {
415 &self.task_arn
416 }
417 /// <p>Indicates how your transfer task is configured. These options include how DataSync handles files, objects, and their associated metadata during your transfer. You also can specify how to verify data integrity, set bandwidth limits for your task, among other options.</p>
418 /// <p>Each option has a default value. Unless you need to, you don't have to configure any option before calling <a href="https://docs.aws.amazon.com/datasync/latest/userguide/API_StartTaskExecution.html">StartTaskExecution</a>.</p>
419 /// <p>You also can override your task options for each task execution. For example, you might want to adjust the <code>LogLevel</code> for an individual execution.</p>
420 pub fn options(mut self, input: crate::types::Options) -> Self {
421 self.options = ::std::option::Option::Some(input);
422 self
423 }
424 /// <p>Indicates how your transfer task is configured. These options include how DataSync handles files, objects, and their associated metadata during your transfer. You also can specify how to verify data integrity, set bandwidth limits for your task, among other options.</p>
425 /// <p>Each option has a default value. Unless you need to, you don't have to configure any option before calling <a href="https://docs.aws.amazon.com/datasync/latest/userguide/API_StartTaskExecution.html">StartTaskExecution</a>.</p>
426 /// <p>You also can override your task options for each task execution. For example, you might want to adjust the <code>LogLevel</code> for an individual execution.</p>
427 pub fn set_options(mut self, input: ::std::option::Option<crate::types::Options>) -> Self {
428 self.options = input;
429 self
430 }
431 /// <p>Indicates how your transfer task is configured. These options include how DataSync handles files, objects, and their associated metadata during your transfer. You also can specify how to verify data integrity, set bandwidth limits for your task, among other options.</p>
432 /// <p>Each option has a default value. Unless you need to, you don't have to configure any option before calling <a href="https://docs.aws.amazon.com/datasync/latest/userguide/API_StartTaskExecution.html">StartTaskExecution</a>.</p>
433 /// <p>You also can override your task options for each task execution. For example, you might want to adjust the <code>LogLevel</code> for an individual execution.</p>
434 pub fn get_options(&self) -> &::std::option::Option<crate::types::Options> {
435 &self.options
436 }
437 /// Appends an item to `excludes`.
438 ///
439 /// To override the contents of this collection use [`set_excludes`](Self::set_excludes).
440 ///
441 /// <p>Specifies exclude filters that define the files, objects, and folders in your source location that you don't want DataSync to transfer. For more information and examples, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html">Specifying what DataSync transfers by using filters</a>.</p>
442 pub fn excludes(mut self, input: crate::types::FilterRule) -> Self {
443 let mut v = self.excludes.unwrap_or_default();
444 v.push(input);
445 self.excludes = ::std::option::Option::Some(v);
446 self
447 }
448 /// <p>Specifies exclude filters that define the files, objects, and folders in your source location that you don't want DataSync to transfer. For more information and examples, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html">Specifying what DataSync transfers by using filters</a>.</p>
449 pub fn set_excludes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FilterRule>>) -> Self {
450 self.excludes = input;
451 self
452 }
453 /// <p>Specifies exclude filters that define the files, objects, and folders in your source location that you don't want DataSync to transfer. For more information and examples, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html">Specifying what DataSync transfers by using filters</a>.</p>
454 pub fn get_excludes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FilterRule>> {
455 &self.excludes
456 }
457 /// <p>Specifies a schedule for when you want your task to run. For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/task-scheduling.html">Scheduling your task</a>.</p>
458 pub fn schedule(mut self, input: crate::types::TaskSchedule) -> Self {
459 self.schedule = ::std::option::Option::Some(input);
460 self
461 }
462 /// <p>Specifies a schedule for when you want your task to run. For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/task-scheduling.html">Scheduling your task</a>.</p>
463 pub fn set_schedule(mut self, input: ::std::option::Option<crate::types::TaskSchedule>) -> Self {
464 self.schedule = input;
465 self
466 }
467 /// <p>Specifies a schedule for when you want your task to run. For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/task-scheduling.html">Scheduling your task</a>.</p>
468 pub fn get_schedule(&self) -> &::std::option::Option<crate::types::TaskSchedule> {
469 &self.schedule
470 }
471 /// <p>Specifies the name of your task.</p>
472 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
473 self.name = ::std::option::Option::Some(input.into());
474 self
475 }
476 /// <p>Specifies the name of your task.</p>
477 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
478 self.name = input;
479 self
480 }
481 /// <p>Specifies the name of your task.</p>
482 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
483 &self.name
484 }
485 /// <p>Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for monitoring your task.</p>
486 /// <p>For Enhanced mode tasks, you must use <code>/aws/datasync</code> as your log group name. For example:</p>
487 /// <p><code>arn:aws:logs:us-east-1:111222333444:log-group:/aws/datasync:*</code></p>
488 /// <p>For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/configure-logging.html">Monitoring data transfers with CloudWatch Logs</a>.</p>
489 pub fn cloud_watch_log_group_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
490 self.cloud_watch_log_group_arn = ::std::option::Option::Some(input.into());
491 self
492 }
493 /// <p>Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for monitoring your task.</p>
494 /// <p>For Enhanced mode tasks, you must use <code>/aws/datasync</code> as your log group name. For example:</p>
495 /// <p><code>arn:aws:logs:us-east-1:111222333444:log-group:/aws/datasync:*</code></p>
496 /// <p>For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/configure-logging.html">Monitoring data transfers with CloudWatch Logs</a>.</p>
497 pub fn set_cloud_watch_log_group_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
498 self.cloud_watch_log_group_arn = input;
499 self
500 }
501 /// <p>Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for monitoring your task.</p>
502 /// <p>For Enhanced mode tasks, you must use <code>/aws/datasync</code> as your log group name. For example:</p>
503 /// <p><code>arn:aws:logs:us-east-1:111222333444:log-group:/aws/datasync:*</code></p>
504 /// <p>For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/configure-logging.html">Monitoring data transfers with CloudWatch Logs</a>.</p>
505 pub fn get_cloud_watch_log_group_arn(&self) -> &::std::option::Option<::std::string::String> {
506 &self.cloud_watch_log_group_arn
507 }
508 /// Appends an item to `includes`.
509 ///
510 /// To override the contents of this collection use [`set_includes`](Self::set_includes).
511 ///
512 /// <p>Specifies include filters define the files, objects, and folders in your source location that you want DataSync to transfer. For more information and examples, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html">Specifying what DataSync transfers by using filters</a>.</p>
513 pub fn includes(mut self, input: crate::types::FilterRule) -> Self {
514 let mut v = self.includes.unwrap_or_default();
515 v.push(input);
516 self.includes = ::std::option::Option::Some(v);
517 self
518 }
519 /// <p>Specifies include filters define the files, objects, and folders in your source location that you want DataSync to transfer. For more information and examples, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html">Specifying what DataSync transfers by using filters</a>.</p>
520 pub fn set_includes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FilterRule>>) -> Self {
521 self.includes = input;
522 self
523 }
524 /// <p>Specifies include filters define the files, objects, and folders in your source location that you want DataSync to transfer. For more information and examples, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html">Specifying what DataSync transfers by using filters</a>.</p>
525 pub fn get_includes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FilterRule>> {
526 &self.includes
527 }
528 /// <p>Configures a manifest, which is a list of files or objects that you want DataSync to transfer. For more information and configuration examples, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/transferring-with-manifest.html">Specifying what DataSync transfers by using a manifest</a>.</p>
529 /// <p>When using this parameter, your caller identity (the IAM role that you're using DataSync with) must have the <code>iam:PassRole</code> permission. The <a href="https://docs.aws.amazon.com/datasync/latest/userguide/security-iam-awsmanpol.html#security-iam-awsmanpol-awsdatasyncfullaccess">AWSDataSyncFullAccess</a> policy includes this permission.</p>
530 /// <p>To remove a manifest configuration, specify this parameter as empty.</p>
531 pub fn manifest_config(mut self, input: crate::types::ManifestConfig) -> Self {
532 self.manifest_config = ::std::option::Option::Some(input);
533 self
534 }
535 /// <p>Configures a manifest, which is a list of files or objects that you want DataSync to transfer. For more information and configuration examples, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/transferring-with-manifest.html">Specifying what DataSync transfers by using a manifest</a>.</p>
536 /// <p>When using this parameter, your caller identity (the IAM role that you're using DataSync with) must have the <code>iam:PassRole</code> permission. The <a href="https://docs.aws.amazon.com/datasync/latest/userguide/security-iam-awsmanpol.html#security-iam-awsmanpol-awsdatasyncfullaccess">AWSDataSyncFullAccess</a> policy includes this permission.</p>
537 /// <p>To remove a manifest configuration, specify this parameter as empty.</p>
538 pub fn set_manifest_config(mut self, input: ::std::option::Option<crate::types::ManifestConfig>) -> Self {
539 self.manifest_config = input;
540 self
541 }
542 /// <p>Configures a manifest, which is a list of files or objects that you want DataSync to transfer. For more information and configuration examples, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/transferring-with-manifest.html">Specifying what DataSync transfers by using a manifest</a>.</p>
543 /// <p>When using this parameter, your caller identity (the IAM role that you're using DataSync with) must have the <code>iam:PassRole</code> permission. The <a href="https://docs.aws.amazon.com/datasync/latest/userguide/security-iam-awsmanpol.html#security-iam-awsmanpol-awsdatasyncfullaccess">AWSDataSyncFullAccess</a> policy includes this permission.</p>
544 /// <p>To remove a manifest configuration, specify this parameter as empty.</p>
545 pub fn get_manifest_config(&self) -> &::std::option::Option<crate::types::ManifestConfig> {
546 &self.manifest_config
547 }
548 /// <p>Specifies how you want to configure a task report, which provides detailed information about your DataSync transfer. For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/task-reports.html">Monitoring your DataSync transfers with task reports</a>.</p>
549 /// <p>When using this parameter, your caller identity (the IAM role that you're using DataSync with) must have the <code>iam:PassRole</code> permission. The <a href="https://docs.aws.amazon.com/datasync/latest/userguide/security-iam-awsmanpol.html#security-iam-awsmanpol-awsdatasyncfullaccess">AWSDataSyncFullAccess</a> policy includes this permission.</p>
550 /// <p>To remove a task report configuration, specify this parameter as empty.</p>
551 pub fn task_report_config(mut self, input: crate::types::TaskReportConfig) -> Self {
552 self.task_report_config = ::std::option::Option::Some(input);
553 self
554 }
555 /// <p>Specifies how you want to configure a task report, which provides detailed information about your DataSync transfer. For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/task-reports.html">Monitoring your DataSync transfers with task reports</a>.</p>
556 /// <p>When using this parameter, your caller identity (the IAM role that you're using DataSync with) must have the <code>iam:PassRole</code> permission. The <a href="https://docs.aws.amazon.com/datasync/latest/userguide/security-iam-awsmanpol.html#security-iam-awsmanpol-awsdatasyncfullaccess">AWSDataSyncFullAccess</a> policy includes this permission.</p>
557 /// <p>To remove a task report configuration, specify this parameter as empty.</p>
558 pub fn set_task_report_config(mut self, input: ::std::option::Option<crate::types::TaskReportConfig>) -> Self {
559 self.task_report_config = input;
560 self
561 }
562 /// <p>Specifies how you want to configure a task report, which provides detailed information about your DataSync transfer. For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/task-reports.html">Monitoring your DataSync transfers with task reports</a>.</p>
563 /// <p>When using this parameter, your caller identity (the IAM role that you're using DataSync with) must have the <code>iam:PassRole</code> permission. The <a href="https://docs.aws.amazon.com/datasync/latest/userguide/security-iam-awsmanpol.html#security-iam-awsmanpol-awsdatasyncfullaccess">AWSDataSyncFullAccess</a> policy includes this permission.</p>
564 /// <p>To remove a task report configuration, specify this parameter as empty.</p>
565 pub fn get_task_report_config(&self) -> &::std::option::Option<crate::types::TaskReportConfig> {
566 &self.task_report_config
567 }
568 /// Consumes the builder and constructs a [`UpdateTaskInput`](crate::operation::update_task::UpdateTaskInput).
569 pub fn build(self) -> ::std::result::Result<crate::operation::update_task::UpdateTaskInput, ::aws_smithy_types::error::operation::BuildError> {
570 ::std::result::Result::Ok(crate::operation::update_task::UpdateTaskInput {
571 task_arn: self.task_arn,
572 options: self.options,
573 excludes: self.excludes,
574 schedule: self.schedule,
575 name: self.name,
576 cloud_watch_log_group_arn: self.cloud_watch_log_group_arn,
577 includes: self.includes,
578 manifest_config: self.manifest_config,
579 task_report_config: self.task_report_config,
580 })
581 }
582}