aws_sdk_datasync/operation/create_task/
_create_task_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>CreateTaskRequest</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateTaskInput {
7    /// <p>Specifies the ARN of your transfer's source location.</p>
8    pub source_location_arn: ::std::option::Option<::std::string::String>,
9    /// <p>Specifies the ARN of your transfer's destination location.</p>
10    pub destination_location_arn: ::std::option::Option<::std::string::String>,
11    /// <p>Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for monitoring your task.</p>
12    /// <p>For Enhanced mode tasks, you don't need to specify anything. DataSync automatically sends logs to a CloudWatch log group named <code>/aws/datasync</code>.</p>
13    pub cloud_watch_log_group_arn: ::std::option::Option<::std::string::String>,
14    /// <p>Specifies the name of your task.</p>
15    pub name: ::std::option::Option<::std::string::String>,
16    /// <p>Specifies your task's settings, such as preserving file metadata, verifying data integrity, among other options.</p>
17    pub options: ::std::option::Option<crate::types::Options>,
18    /// <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>
19    pub excludes: ::std::option::Option<::std::vec::Vec<crate::types::FilterRule>>,
20    /// <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>
21    pub schedule: ::std::option::Option<crate::types::TaskSchedule>,
22    /// <p>Specifies the tags that you want to apply to your task.</p>
23    /// <p><i>Tags</i> are key-value pairs that help you manage, filter, and search for your DataSync resources.</p>
24    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::TagListEntry>>,
25    /// <p>Specifies include filters that 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>
26    pub includes: ::std::option::Option<::std::vec::Vec<crate::types::FilterRule>>,
27    /// <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>
28    /// <p>When using this parameter, your caller identity (the 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>
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 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    pub task_report_config: ::std::option::Option<crate::types::TaskReportConfig>,
33    /// <p>Specifies one of the following task modes for your data transfer:</p>
34    /// <ul>
35    /// <li>
36    /// <p><code>ENHANCED</code> - Transfer virtually unlimited numbers of objects with higher performance than Basic mode. Enhanced mode tasks optimize the data transfer process by listing, preparing, transferring, and verifying data in parallel. Enhanced mode is currently available for transfers between Amazon S3 locations, transfers between Azure Blob and Amazon S3 without an agent, and transfers between other clouds and Amazon S3 without an agent.</p><note>
37    /// <p>To create an Enhanced mode task, the IAM role that you use to call the <code>CreateTask</code> operation must have the <code>iam:CreateServiceLinkedRole</code> permission.</p>
38    /// </note></li>
39    /// <li>
40    /// <p><code>BASIC</code> (default) - Transfer files or objects between Amazon Web Services storage and all other supported DataSync locations. Basic mode tasks are subject to <a href="https://docs.aws.amazon.com/datasync/latest/userguide/datasync-limits.html">quotas</a> on the number of files, objects, and directories in a dataset. Basic mode sequentially prepares, transfers, and verifies data, making it slower than Enhanced mode for most workloads.</p></li>
41    /// </ul>
42    /// <p>For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html#task-mode-differences">Understanding task mode differences</a>.</p>
43    pub task_mode: ::std::option::Option<crate::types::TaskMode>,
44}
45impl CreateTaskInput {
46    /// <p>Specifies the ARN of your transfer's source location.</p>
47    pub fn source_location_arn(&self) -> ::std::option::Option<&str> {
48        self.source_location_arn.as_deref()
49    }
50    /// <p>Specifies the ARN of your transfer's destination location.</p>
51    pub fn destination_location_arn(&self) -> ::std::option::Option<&str> {
52        self.destination_location_arn.as_deref()
53    }
54    /// <p>Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for monitoring your task.</p>
55    /// <p>For Enhanced mode tasks, you don't need to specify anything. DataSync automatically sends logs to a CloudWatch log group named <code>/aws/datasync</code>.</p>
56    pub fn cloud_watch_log_group_arn(&self) -> ::std::option::Option<&str> {
57        self.cloud_watch_log_group_arn.as_deref()
58    }
59    /// <p>Specifies the name of your task.</p>
60    pub fn name(&self) -> ::std::option::Option<&str> {
61        self.name.as_deref()
62    }
63    /// <p>Specifies your task's settings, such as preserving file metadata, verifying data integrity, among other options.</p>
64    pub fn options(&self) -> ::std::option::Option<&crate::types::Options> {
65        self.options.as_ref()
66    }
67    /// <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>
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 `.excludes.is_none()`.
70    pub fn excludes(&self) -> &[crate::types::FilterRule] {
71        self.excludes.as_deref().unwrap_or_default()
72    }
73    /// <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>
74    pub fn schedule(&self) -> ::std::option::Option<&crate::types::TaskSchedule> {
75        self.schedule.as_ref()
76    }
77    /// <p>Specifies the tags that you want to apply to your task.</p>
78    /// <p><i>Tags</i> are key-value pairs that help you manage, filter, and search for your DataSync resources.</p>
79    ///
80    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
81    pub fn tags(&self) -> &[crate::types::TagListEntry] {
82        self.tags.as_deref().unwrap_or_default()
83    }
84    /// <p>Specifies include filters that 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>
85    ///
86    /// 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()`.
87    pub fn includes(&self) -> &[crate::types::FilterRule] {
88        self.includes.as_deref().unwrap_or_default()
89    }
90    /// <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>
91    /// <p>When using this parameter, your caller identity (the 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>
92    pub fn manifest_config(&self) -> ::std::option::Option<&crate::types::ManifestConfig> {
93        self.manifest_config.as_ref()
94    }
95    /// <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>
96    /// <p>When using this parameter, your caller identity (the 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>
97    pub fn task_report_config(&self) -> ::std::option::Option<&crate::types::TaskReportConfig> {
98        self.task_report_config.as_ref()
99    }
100    /// <p>Specifies one of the following task modes for your data transfer:</p>
101    /// <ul>
102    /// <li>
103    /// <p><code>ENHANCED</code> - Transfer virtually unlimited numbers of objects with higher performance than Basic mode. Enhanced mode tasks optimize the data transfer process by listing, preparing, transferring, and verifying data in parallel. Enhanced mode is currently available for transfers between Amazon S3 locations, transfers between Azure Blob and Amazon S3 without an agent, and transfers between other clouds and Amazon S3 without an agent.</p><note>
104    /// <p>To create an Enhanced mode task, the IAM role that you use to call the <code>CreateTask</code> operation must have the <code>iam:CreateServiceLinkedRole</code> permission.</p>
105    /// </note></li>
106    /// <li>
107    /// <p><code>BASIC</code> (default) - Transfer files or objects between Amazon Web Services storage and all other supported DataSync locations. Basic mode tasks are subject to <a href="https://docs.aws.amazon.com/datasync/latest/userguide/datasync-limits.html">quotas</a> on the number of files, objects, and directories in a dataset. Basic mode sequentially prepares, transfers, and verifies data, making it slower than Enhanced mode for most workloads.</p></li>
108    /// </ul>
109    /// <p>For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html#task-mode-differences">Understanding task mode differences</a>.</p>
110    pub fn task_mode(&self) -> ::std::option::Option<&crate::types::TaskMode> {
111        self.task_mode.as_ref()
112    }
113}
114impl CreateTaskInput {
115    /// Creates a new builder-style object to manufacture [`CreateTaskInput`](crate::operation::create_task::CreateTaskInput).
116    pub fn builder() -> crate::operation::create_task::builders::CreateTaskInputBuilder {
117        crate::operation::create_task::builders::CreateTaskInputBuilder::default()
118    }
119}
120
121/// A builder for [`CreateTaskInput`](crate::operation::create_task::CreateTaskInput).
122#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
123#[non_exhaustive]
124pub struct CreateTaskInputBuilder {
125    pub(crate) source_location_arn: ::std::option::Option<::std::string::String>,
126    pub(crate) destination_location_arn: ::std::option::Option<::std::string::String>,
127    pub(crate) cloud_watch_log_group_arn: ::std::option::Option<::std::string::String>,
128    pub(crate) name: ::std::option::Option<::std::string::String>,
129    pub(crate) options: ::std::option::Option<crate::types::Options>,
130    pub(crate) excludes: ::std::option::Option<::std::vec::Vec<crate::types::FilterRule>>,
131    pub(crate) schedule: ::std::option::Option<crate::types::TaskSchedule>,
132    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::TagListEntry>>,
133    pub(crate) includes: ::std::option::Option<::std::vec::Vec<crate::types::FilterRule>>,
134    pub(crate) manifest_config: ::std::option::Option<crate::types::ManifestConfig>,
135    pub(crate) task_report_config: ::std::option::Option<crate::types::TaskReportConfig>,
136    pub(crate) task_mode: ::std::option::Option<crate::types::TaskMode>,
137}
138impl CreateTaskInputBuilder {
139    /// <p>Specifies the ARN of your transfer's source location.</p>
140    /// This field is required.
141    pub fn source_location_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
142        self.source_location_arn = ::std::option::Option::Some(input.into());
143        self
144    }
145    /// <p>Specifies the ARN of your transfer's source location.</p>
146    pub fn set_source_location_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
147        self.source_location_arn = input;
148        self
149    }
150    /// <p>Specifies the ARN of your transfer's source location.</p>
151    pub fn get_source_location_arn(&self) -> &::std::option::Option<::std::string::String> {
152        &self.source_location_arn
153    }
154    /// <p>Specifies the ARN of your transfer's destination location.</p>
155    /// This field is required.
156    pub fn destination_location_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
157        self.destination_location_arn = ::std::option::Option::Some(input.into());
158        self
159    }
160    /// <p>Specifies the ARN of your transfer's destination location.</p>
161    pub fn set_destination_location_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
162        self.destination_location_arn = input;
163        self
164    }
165    /// <p>Specifies the ARN of your transfer's destination location.</p>
166    pub fn get_destination_location_arn(&self) -> &::std::option::Option<::std::string::String> {
167        &self.destination_location_arn
168    }
169    /// <p>Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for monitoring your task.</p>
170    /// <p>For Enhanced mode tasks, you don't need to specify anything. DataSync automatically sends logs to a CloudWatch log group named <code>/aws/datasync</code>.</p>
171    pub fn cloud_watch_log_group_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
172        self.cloud_watch_log_group_arn = ::std::option::Option::Some(input.into());
173        self
174    }
175    /// <p>Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for monitoring your task.</p>
176    /// <p>For Enhanced mode tasks, you don't need to specify anything. DataSync automatically sends logs to a CloudWatch log group named <code>/aws/datasync</code>.</p>
177    pub fn set_cloud_watch_log_group_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
178        self.cloud_watch_log_group_arn = input;
179        self
180    }
181    /// <p>Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for monitoring your task.</p>
182    /// <p>For Enhanced mode tasks, you don't need to specify anything. DataSync automatically sends logs to a CloudWatch log group named <code>/aws/datasync</code>.</p>
183    pub fn get_cloud_watch_log_group_arn(&self) -> &::std::option::Option<::std::string::String> {
184        &self.cloud_watch_log_group_arn
185    }
186    /// <p>Specifies the name of your task.</p>
187    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
188        self.name = ::std::option::Option::Some(input.into());
189        self
190    }
191    /// <p>Specifies the name of your task.</p>
192    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
193        self.name = input;
194        self
195    }
196    /// <p>Specifies the name of your task.</p>
197    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
198        &self.name
199    }
200    /// <p>Specifies your task's settings, such as preserving file metadata, verifying data integrity, among other options.</p>
201    pub fn options(mut self, input: crate::types::Options) -> Self {
202        self.options = ::std::option::Option::Some(input);
203        self
204    }
205    /// <p>Specifies your task's settings, such as preserving file metadata, verifying data integrity, among other options.</p>
206    pub fn set_options(mut self, input: ::std::option::Option<crate::types::Options>) -> Self {
207        self.options = input;
208        self
209    }
210    /// <p>Specifies your task's settings, such as preserving file metadata, verifying data integrity, among other options.</p>
211    pub fn get_options(&self) -> &::std::option::Option<crate::types::Options> {
212        &self.options
213    }
214    /// Appends an item to `excludes`.
215    ///
216    /// To override the contents of this collection use [`set_excludes`](Self::set_excludes).
217    ///
218    /// <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>
219    pub fn excludes(mut self, input: crate::types::FilterRule) -> Self {
220        let mut v = self.excludes.unwrap_or_default();
221        v.push(input);
222        self.excludes = ::std::option::Option::Some(v);
223        self
224    }
225    /// <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>
226    pub fn set_excludes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FilterRule>>) -> Self {
227        self.excludes = input;
228        self
229    }
230    /// <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>
231    pub fn get_excludes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FilterRule>> {
232        &self.excludes
233    }
234    /// <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>
235    pub fn schedule(mut self, input: crate::types::TaskSchedule) -> Self {
236        self.schedule = ::std::option::Option::Some(input);
237        self
238    }
239    /// <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>
240    pub fn set_schedule(mut self, input: ::std::option::Option<crate::types::TaskSchedule>) -> Self {
241        self.schedule = input;
242        self
243    }
244    /// <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>
245    pub fn get_schedule(&self) -> &::std::option::Option<crate::types::TaskSchedule> {
246        &self.schedule
247    }
248    /// Appends an item to `tags`.
249    ///
250    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
251    ///
252    /// <p>Specifies the tags that you want to apply to your task.</p>
253    /// <p><i>Tags</i> are key-value pairs that help you manage, filter, and search for your DataSync resources.</p>
254    pub fn tags(mut self, input: crate::types::TagListEntry) -> Self {
255        let mut v = self.tags.unwrap_or_default();
256        v.push(input);
257        self.tags = ::std::option::Option::Some(v);
258        self
259    }
260    /// <p>Specifies the tags that you want to apply to your task.</p>
261    /// <p><i>Tags</i> are key-value pairs that help you manage, filter, and search for your DataSync resources.</p>
262    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TagListEntry>>) -> Self {
263        self.tags = input;
264        self
265    }
266    /// <p>Specifies the tags that you want to apply to your task.</p>
267    /// <p><i>Tags</i> are key-value pairs that help you manage, filter, and search for your DataSync resources.</p>
268    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TagListEntry>> {
269        &self.tags
270    }
271    /// Appends an item to `includes`.
272    ///
273    /// To override the contents of this collection use [`set_includes`](Self::set_includes).
274    ///
275    /// <p>Specifies include filters that 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>
276    pub fn includes(mut self, input: crate::types::FilterRule) -> Self {
277        let mut v = self.includes.unwrap_or_default();
278        v.push(input);
279        self.includes = ::std::option::Option::Some(v);
280        self
281    }
282    /// <p>Specifies include filters that 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>
283    pub fn set_includes(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FilterRule>>) -> Self {
284        self.includes = input;
285        self
286    }
287    /// <p>Specifies include filters that 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>
288    pub fn get_includes(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FilterRule>> {
289        &self.includes
290    }
291    /// <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>
292    /// <p>When using this parameter, your caller identity (the 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>
293    pub fn manifest_config(mut self, input: crate::types::ManifestConfig) -> Self {
294        self.manifest_config = ::std::option::Option::Some(input);
295        self
296    }
297    /// <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>
298    /// <p>When using this parameter, your caller identity (the 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>
299    pub fn set_manifest_config(mut self, input: ::std::option::Option<crate::types::ManifestConfig>) -> Self {
300        self.manifest_config = input;
301        self
302    }
303    /// <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>
304    /// <p>When using this parameter, your caller identity (the 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>
305    pub fn get_manifest_config(&self) -> &::std::option::Option<crate::types::ManifestConfig> {
306        &self.manifest_config
307    }
308    /// <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>
309    /// <p>When using this parameter, your caller identity (the 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>
310    pub fn task_report_config(mut self, input: crate::types::TaskReportConfig) -> Self {
311        self.task_report_config = ::std::option::Option::Some(input);
312        self
313    }
314    /// <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>
315    /// <p>When using this parameter, your caller identity (the 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>
316    pub fn set_task_report_config(mut self, input: ::std::option::Option<crate::types::TaskReportConfig>) -> Self {
317        self.task_report_config = input;
318        self
319    }
320    /// <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>
321    /// <p>When using this parameter, your caller identity (the 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>
322    pub fn get_task_report_config(&self) -> &::std::option::Option<crate::types::TaskReportConfig> {
323        &self.task_report_config
324    }
325    /// <p>Specifies one of the following task modes for your data transfer:</p>
326    /// <ul>
327    /// <li>
328    /// <p><code>ENHANCED</code> - Transfer virtually unlimited numbers of objects with higher performance than Basic mode. Enhanced mode tasks optimize the data transfer process by listing, preparing, transferring, and verifying data in parallel. Enhanced mode is currently available for transfers between Amazon S3 locations, transfers between Azure Blob and Amazon S3 without an agent, and transfers between other clouds and Amazon S3 without an agent.</p><note>
329    /// <p>To create an Enhanced mode task, the IAM role that you use to call the <code>CreateTask</code> operation must have the <code>iam:CreateServiceLinkedRole</code> permission.</p>
330    /// </note></li>
331    /// <li>
332    /// <p><code>BASIC</code> (default) - Transfer files or objects between Amazon Web Services storage and all other supported DataSync locations. Basic mode tasks are subject to <a href="https://docs.aws.amazon.com/datasync/latest/userguide/datasync-limits.html">quotas</a> on the number of files, objects, and directories in a dataset. Basic mode sequentially prepares, transfers, and verifies data, making it slower than Enhanced mode for most workloads.</p></li>
333    /// </ul>
334    /// <p>For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html#task-mode-differences">Understanding task mode differences</a>.</p>
335    pub fn task_mode(mut self, input: crate::types::TaskMode) -> Self {
336        self.task_mode = ::std::option::Option::Some(input);
337        self
338    }
339    /// <p>Specifies one of the following task modes for your data transfer:</p>
340    /// <ul>
341    /// <li>
342    /// <p><code>ENHANCED</code> - Transfer virtually unlimited numbers of objects with higher performance than Basic mode. Enhanced mode tasks optimize the data transfer process by listing, preparing, transferring, and verifying data in parallel. Enhanced mode is currently available for transfers between Amazon S3 locations, transfers between Azure Blob and Amazon S3 without an agent, and transfers between other clouds and Amazon S3 without an agent.</p><note>
343    /// <p>To create an Enhanced mode task, the IAM role that you use to call the <code>CreateTask</code> operation must have the <code>iam:CreateServiceLinkedRole</code> permission.</p>
344    /// </note></li>
345    /// <li>
346    /// <p><code>BASIC</code> (default) - Transfer files or objects between Amazon Web Services storage and all other supported DataSync locations. Basic mode tasks are subject to <a href="https://docs.aws.amazon.com/datasync/latest/userguide/datasync-limits.html">quotas</a> on the number of files, objects, and directories in a dataset. Basic mode sequentially prepares, transfers, and verifies data, making it slower than Enhanced mode for most workloads.</p></li>
347    /// </ul>
348    /// <p>For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html#task-mode-differences">Understanding task mode differences</a>.</p>
349    pub fn set_task_mode(mut self, input: ::std::option::Option<crate::types::TaskMode>) -> Self {
350        self.task_mode = input;
351        self
352    }
353    /// <p>Specifies one of the following task modes for your data transfer:</p>
354    /// <ul>
355    /// <li>
356    /// <p><code>ENHANCED</code> - Transfer virtually unlimited numbers of objects with higher performance than Basic mode. Enhanced mode tasks optimize the data transfer process by listing, preparing, transferring, and verifying data in parallel. Enhanced mode is currently available for transfers between Amazon S3 locations, transfers between Azure Blob and Amazon S3 without an agent, and transfers between other clouds and Amazon S3 without an agent.</p><note>
357    /// <p>To create an Enhanced mode task, the IAM role that you use to call the <code>CreateTask</code> operation must have the <code>iam:CreateServiceLinkedRole</code> permission.</p>
358    /// </note></li>
359    /// <li>
360    /// <p><code>BASIC</code> (default) - Transfer files or objects between Amazon Web Services storage and all other supported DataSync locations. Basic mode tasks are subject to <a href="https://docs.aws.amazon.com/datasync/latest/userguide/datasync-limits.html">quotas</a> on the number of files, objects, and directories in a dataset. Basic mode sequentially prepares, transfers, and verifies data, making it slower than Enhanced mode for most workloads.</p></li>
361    /// </ul>
362    /// <p>For more information, see <a href="https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html#task-mode-differences">Understanding task mode differences</a>.</p>
363    pub fn get_task_mode(&self) -> &::std::option::Option<crate::types::TaskMode> {
364        &self.task_mode
365    }
366    /// Consumes the builder and constructs a [`CreateTaskInput`](crate::operation::create_task::CreateTaskInput).
367    pub fn build(self) -> ::std::result::Result<crate::operation::create_task::CreateTaskInput, ::aws_smithy_types::error::operation::BuildError> {
368        ::std::result::Result::Ok(crate::operation::create_task::CreateTaskInput {
369            source_location_arn: self.source_location_arn,
370            destination_location_arn: self.destination_location_arn,
371            cloud_watch_log_group_arn: self.cloud_watch_log_group_arn,
372            name: self.name,
373            options: self.options,
374            excludes: self.excludes,
375            schedule: self.schedule,
376            tags: self.tags,
377            includes: self.includes,
378            manifest_config: self.manifest_config,
379            task_report_config: self.task_report_config,
380            task_mode: self.task_mode,
381        })
382    }
383}