Struct aws_sdk_datasync::client::fluent_builders::CreateTask
source · [−]pub struct CreateTask { /* private fields */ }
Expand description
Fluent builder constructing a request to CreateTask
.
Creates a task.
A task includes a source location and a destination location, and a configuration that specifies how data is transferred. A task always transfers data from the source location to the destination location. The configuration specifies options such as task scheduling, bandwidth limits, etc. A task is the complete definition of a data transfer.
When you create a task that transfers data between Amazon Web Services services in different Amazon Web Services Regions, one of the two locations that you specify must reside in the Region where DataSync is being used. The other location must be specified in a different Region.
You can transfer data between commercial Amazon Web Services Regions except for China, or between Amazon Web Services GovCloud (US) Regions.
When you use DataSync to copy files or objects between Amazon Web Services Regions, you pay for data transfer between Regions. This is billed as data transfer OUT from your source Region to your destination Region. For more information, see Data Transfer pricing.
Implementations
sourceimpl CreateTask
impl CreateTask
sourcepub async fn send(self) -> Result<CreateTaskOutput, SdkError<CreateTaskError>>
pub async fn send(self) -> Result<CreateTaskOutput, SdkError<CreateTaskError>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn source_location_arn(self, input: impl Into<String>) -> Self
pub fn source_location_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the source location for the task.
sourcepub fn set_source_location_arn(self, input: Option<String>) -> Self
pub fn set_source_location_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the source location for the task.
sourcepub fn destination_location_arn(self, input: impl Into<String>) -> Self
pub fn destination_location_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of an Amazon Web Services storage resource's location.
sourcepub fn set_destination_location_arn(self, input: Option<String>) -> Self
pub fn set_destination_location_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of an Amazon Web Services storage resource's location.
sourcepub fn cloud_watch_log_group_arn(self, input: impl Into<String>) -> Self
pub fn cloud_watch_log_group_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that is used to monitor and log events in the task.
sourcepub fn set_cloud_watch_log_group_arn(self, input: Option<String>) -> Self
pub fn set_cloud_watch_log_group_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that is used to monitor and log events in the task.
sourcepub fn name(self, input: impl Into<String>) -> Self
pub fn name(self, input: impl Into<String>) -> Self
The name of a task. This value is a text reference that is used to identify the task in the console.
sourcepub fn set_name(self, input: Option<String>) -> Self
pub fn set_name(self, input: Option<String>) -> Self
The name of a task. This value is a text reference that is used to identify the task in the console.
sourcepub fn options(self, input: Options) -> Self
pub fn options(self, input: Options) -> Self
The set of configuration options that control the behavior of a single execution of the task that occurs when you call StartTaskExecution
. You can configure these options to preserve metadata such as user ID (UID) and group ID (GID), file permissions, data integrity verification, and so on.
For each individual task execution, you can override these options by specifying the OverrideOptions
before starting the task execution. For more information, see the StartTaskExecution operation.
sourcepub fn set_options(self, input: Option<Options>) -> Self
pub fn set_options(self, input: Option<Options>) -> Self
The set of configuration options that control the behavior of a single execution of the task that occurs when you call StartTaskExecution
. You can configure these options to preserve metadata such as user ID (UID) and group ID (GID), file permissions, data integrity verification, and so on.
For each individual task execution, you can override these options by specifying the OverrideOptions
before starting the task execution. For more information, see the StartTaskExecution operation.
sourcepub fn excludes(self, input: FilterRule) -> Self
pub fn excludes(self, input: FilterRule) -> Self
Appends an item to Excludes
.
To override the contents of this collection use set_excludes
.
A list of filter rules that determines which files to exclude from a task. The list should contain a single filter string that consists of the patterns to exclude. The patterns are delimited by "|" (that is, a pipe), for example, "/folder1|/folder2"
.
sourcepub fn set_excludes(self, input: Option<Vec<FilterRule>>) -> Self
pub fn set_excludes(self, input: Option<Vec<FilterRule>>) -> Self
A list of filter rules that determines which files to exclude from a task. The list should contain a single filter string that consists of the patterns to exclude. The patterns are delimited by "|" (that is, a pipe), for example, "/folder1|/folder2"
.
sourcepub fn schedule(self, input: TaskSchedule) -> Self
pub fn schedule(self, input: TaskSchedule) -> Self
Specifies a schedule used to periodically transfer files from a source to a destination location. The schedule should be specified in UTC time. For more information, see Scheduling your task.
sourcepub fn set_schedule(self, input: Option<TaskSchedule>) -> Self
pub fn set_schedule(self, input: Option<TaskSchedule>) -> Self
Specifies a schedule used to periodically transfer files from a source to a destination location. The schedule should be specified in UTC time. For more information, see Scheduling your task.
Appends an item to Tags
.
To override the contents of this collection use set_tags
.
The key-value pair that represents the tag that you want to add to the resource. The value can be an empty string.
The key-value pair that represents the tag that you want to add to the resource. The value can be an empty string.
sourcepub fn includes(self, input: FilterRule) -> Self
pub fn includes(self, input: FilterRule) -> Self
Appends an item to Includes
.
To override the contents of this collection use set_includes
.
A list of filter rules that determines which files to include when running a task. The pattern contains a single filter string that consists of the patterns to include. The patterns are delimited by "|" (that is, a pipe), for example, "/folder1|/folder2"
.
sourcepub fn set_includes(self, input: Option<Vec<FilterRule>>) -> Self
pub fn set_includes(self, input: Option<Vec<FilterRule>>) -> Self
A list of filter rules that determines which files to include when running a task. The pattern contains a single filter string that consists of the patterns to include. The patterns are delimited by "|" (that is, a pipe), for example, "/folder1|/folder2"
.
Trait Implementations
sourceimpl Clone for CreateTask
impl Clone for CreateTask
sourcefn clone(&self) -> CreateTask
fn clone(&self) -> CreateTask
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl !RefUnwindSafe for CreateTask
impl Send for CreateTask
impl Sync for CreateTask
impl Unpin for CreateTask
impl !UnwindSafe for CreateTask
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more