Task

Manages an AWS DataSync Task, which represents a configuration for synchronization. Starting an execution of these DataSync Tasks (actually synchronizing files) is performed outside of this resource.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.DataSync.Task("example", new Aws.DataSync.TaskArgs
        {
            DestinationLocationArn = aws_datasync_location_s3.Destination.Arn,
            Options = new Aws.DataSync.Inputs.TaskOptionsArgs
            {
                BytesPerSecond = -1,
            },
            SourceLocationArn = aws_datasync_location_nfs.Source.Arn,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/datasync"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := datasync.NewTask(ctx, "example", &datasync.TaskArgs{
            DestinationLocationArn: pulumi.String(aws_datasync_location_s3.Destination.Arn),
            Options: &datasync.TaskOptionsArgs{
                BytesPerSecond: pulumi.Int(-1),
            },
            SourceLocationArn: pulumi.String(aws_datasync_location_nfs.Source.Arn),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.datasync.Task("example",
    destination_location_arn=aws_datasync_location_s3["destination"]["arn"],
    options={
        "bytesPerSecond": -1,
    },
    source_location_arn=aws_datasync_location_nfs["source"]["arn"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.datasync.Task("example", {
    destinationLocationArn: aws_datasync_location_s3_destination.arn,
    options: {
        bytesPerSecond: -1,
    },
    sourceLocationArn: aws_datasync_location_nfs_source.arn,
});

Create a Task Resource

new Task(name: string, args: TaskArgs, opts?: CustomResourceOptions);
def Task(resource_name, opts=None, cloudwatch_log_group_arn=None, destination_location_arn=None, name=None, options=None, source_location_arn=None, tags=None, __props__=None);
func NewTask(ctx *Context, name string, args TaskArgs, opts ...ResourceOption) (*Task, error)
public Task(string name, TaskArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args TaskArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args TaskArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args TaskArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Task Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Task resource accepts the following input properties:

DestinationLocationArn string

Amazon Resource Name (ARN) of destination DataSync Location.

SourceLocationArn string

Amazon Resource Name (ARN) of source DataSync Location.

CloudwatchLogGroupArn string

Amazon Resource Name (ARN) of the CloudWatch Log Group that is used to monitor and log events in the sync task.

Name string

Name of the DataSync Task.

Options TaskOptionsArgs

Configuration block containing option that controls the default behavior when you start an execution of this DataSync Task. For each individual task execution, you can override these options by specifying an overriding configuration in those executions.

Tags Dictionary<string, string>

Key-value pairs of resource tags to assign to the DataSync Task.

DestinationLocationArn string

Amazon Resource Name (ARN) of destination DataSync Location.

SourceLocationArn string

Amazon Resource Name (ARN) of source DataSync Location.

CloudwatchLogGroupArn string

Amazon Resource Name (ARN) of the CloudWatch Log Group that is used to monitor and log events in the sync task.

Name string

Name of the DataSync Task.

Options TaskOptions

Configuration block containing option that controls the default behavior when you start an execution of this DataSync Task. For each individual task execution, you can override these options by specifying an overriding configuration in those executions.

Tags map[string]string

Key-value pairs of resource tags to assign to the DataSync Task.

destinationLocationArn ARN

Amazon Resource Name (ARN) of destination DataSync Location.

sourceLocationArn ARN

Amazon Resource Name (ARN) of source DataSync Location.

cloudwatchLogGroupArn ARN

Amazon Resource Name (ARN) of the CloudWatch Log Group that is used to monitor and log events in the sync task.

name string

Name of the DataSync Task.

options TaskOptions

Configuration block containing option that controls the default behavior when you start an execution of this DataSync Task. For each individual task execution, you can override these options by specifying an overriding configuration in those executions.

tags {[key: string]: string}

Key-value pairs of resource tags to assign to the DataSync Task.

destination_location_arn str

Amazon Resource Name (ARN) of destination DataSync Location.

source_location_arn str

Amazon Resource Name (ARN) of source DataSync Location.

cloudwatch_log_group_arn str

Amazon Resource Name (ARN) of the CloudWatch Log Group that is used to monitor and log events in the sync task.

name str

Name of the DataSync Task.

options Dict[TaskOptions]

Configuration block containing option that controls the default behavior when you start an execution of this DataSync Task. For each individual task execution, you can override these options by specifying an overriding configuration in those executions.

tags Dict[str, str]

Key-value pairs of resource tags to assign to the DataSync Task.

Outputs

All input properties are implicitly available as output properties. Additionally, the Task resource produces the following output properties:

Arn string

Amazon Resource Name (ARN) of the DataSync Task.

Id string
The provider-assigned unique ID for this managed resource.
Arn string

Amazon Resource Name (ARN) of the DataSync Task.

Id string
The provider-assigned unique ID for this managed resource.
arn string

Amazon Resource Name (ARN) of the DataSync Task.

id string
The provider-assigned unique ID for this managed resource.
arn str

Amazon Resource Name (ARN) of the DataSync Task.

id str
The provider-assigned unique ID for this managed resource.

Look up an Existing Task Resource

Get an existing Task resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: TaskState, opts?: CustomResourceOptions): Task
static get(resource_name, id, opts=None, arn=None, cloudwatch_log_group_arn=None, destination_location_arn=None, name=None, options=None, source_location_arn=None, tags=None, __props__=None);
func GetTask(ctx *Context, name string, id IDInput, state *TaskState, opts ...ResourceOption) (*Task, error)
public static Task Get(string name, Input<string> id, TaskState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Arn string

Amazon Resource Name (ARN) of the DataSync Task.

CloudwatchLogGroupArn string

Amazon Resource Name (ARN) of the CloudWatch Log Group that is used to monitor and log events in the sync task.

DestinationLocationArn string

Amazon Resource Name (ARN) of destination DataSync Location.

Name string

Name of the DataSync Task.

Options TaskOptionsArgs

Configuration block containing option that controls the default behavior when you start an execution of this DataSync Task. For each individual task execution, you can override these options by specifying an overriding configuration in those executions.

SourceLocationArn string

Amazon Resource Name (ARN) of source DataSync Location.

Tags Dictionary<string, string>

Key-value pairs of resource tags to assign to the DataSync Task.

Arn string

Amazon Resource Name (ARN) of the DataSync Task.

CloudwatchLogGroupArn string

Amazon Resource Name (ARN) of the CloudWatch Log Group that is used to monitor and log events in the sync task.

DestinationLocationArn string

Amazon Resource Name (ARN) of destination DataSync Location.

Name string

Name of the DataSync Task.

Options TaskOptions

Configuration block containing option that controls the default behavior when you start an execution of this DataSync Task. For each individual task execution, you can override these options by specifying an overriding configuration in those executions.

SourceLocationArn string

Amazon Resource Name (ARN) of source DataSync Location.

Tags map[string]string

Key-value pairs of resource tags to assign to the DataSync Task.

arn string

Amazon Resource Name (ARN) of the DataSync Task.

cloudwatchLogGroupArn ARN

Amazon Resource Name (ARN) of the CloudWatch Log Group that is used to monitor and log events in the sync task.

destinationLocationArn ARN

Amazon Resource Name (ARN) of destination DataSync Location.

name string

Name of the DataSync Task.

options TaskOptions

Configuration block containing option that controls the default behavior when you start an execution of this DataSync Task. For each individual task execution, you can override these options by specifying an overriding configuration in those executions.

sourceLocationArn ARN

Amazon Resource Name (ARN) of source DataSync Location.

tags {[key: string]: string}

Key-value pairs of resource tags to assign to the DataSync Task.

arn str

Amazon Resource Name (ARN) of the DataSync Task.

cloudwatch_log_group_arn str

Amazon Resource Name (ARN) of the CloudWatch Log Group that is used to monitor and log events in the sync task.

destination_location_arn str

Amazon Resource Name (ARN) of destination DataSync Location.

name str

Name of the DataSync Task.

options Dict[TaskOptions]

Configuration block containing option that controls the default behavior when you start an execution of this DataSync Task. For each individual task execution, you can override these options by specifying an overriding configuration in those executions.

source_location_arn str

Amazon Resource Name (ARN) of source DataSync Location.

tags Dict[str, str]

Key-value pairs of resource tags to assign to the DataSync Task.

Supporting Types

TaskOptions

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Atime string

A file metadata that shows the last time a file was accessed (that is when the file was read or written to). If set to BEST_EFFORT, the DataSync Task attempts to preserve the original (that is, the version before sync PREPARING phase) atime attribute on all source files. Valid values: BEST_EFFORT, NONE. Default: BEST_EFFORT.

BytesPerSecond int

Limits the bandwidth utilized. For example, to set a maximum of 1 MB, set this value to 1048576. Value values: -1 or greater. Default: -1 (unlimited).

Gid string

Group identifier of the file’s owners. Valid values: BOTH, INT_VALUE, NAME, NONE. Default: INT_VALUE (preserve integer value of the ID).

Mtime string

A file metadata that indicates the last time a file was modified (written to) before the sync PREPARING phase. Value values: NONE, PRESERVE. Default: PRESERVE.

PosixPermissions string

Determines which users or groups can access a file for a specific purpose such as reading, writing, or execution of the file. Valid values: NONE, PRESERVE. Default: PRESERVE.

PreserveDeletedFiles string

Whether files deleted in the source should be removed or preserved in the destination file system. Valid values: PRESERVE, REMOVE. Default: PRESERVE.

PreserveDevices string

Whether the DataSync Task should preserve the metadata of block and character devices in the source files system, and recreate the files with that device name and metadata on the destination. The DataSync Task can’t sync the actual contents of such devices, because many of the devices are non-terminal and don’t return an end of file (EOF) marker. Valid values: NONE, PRESERVE. Default: NONE (ignore special devices).

Uid string

User identifier of the file’s owners. Valid values: BOTH, INT_VALUE, NAME, NONE. Default: INT_VALUE (preserve integer value of the ID).

VerifyMode string

Whether a data integrity verification should be performed at the end of a task execution after all data and metadata have been transferred. Valid values: NONE, POINT_IN_TIME_CONSISTENT, ONLY_FILES_TRANSFERRED. Default: POINT_IN_TIME_CONSISTENT.

Atime string

A file metadata that shows the last time a file was accessed (that is when the file was read or written to). If set to BEST_EFFORT, the DataSync Task attempts to preserve the original (that is, the version before sync PREPARING phase) atime attribute on all source files. Valid values: BEST_EFFORT, NONE. Default: BEST_EFFORT.

BytesPerSecond int

Limits the bandwidth utilized. For example, to set a maximum of 1 MB, set this value to 1048576. Value values: -1 or greater. Default: -1 (unlimited).

Gid string

Group identifier of the file’s owners. Valid values: BOTH, INT_VALUE, NAME, NONE. Default: INT_VALUE (preserve integer value of the ID).

Mtime string

A file metadata that indicates the last time a file was modified (written to) before the sync PREPARING phase. Value values: NONE, PRESERVE. Default: PRESERVE.

PosixPermissions string

Determines which users or groups can access a file for a specific purpose such as reading, writing, or execution of the file. Valid values: NONE, PRESERVE. Default: PRESERVE.

PreserveDeletedFiles string

Whether files deleted in the source should be removed or preserved in the destination file system. Valid values: PRESERVE, REMOVE. Default: PRESERVE.

PreserveDevices string

Whether the DataSync Task should preserve the metadata of block and character devices in the source files system, and recreate the files with that device name and metadata on the destination. The DataSync Task can’t sync the actual contents of such devices, because many of the devices are non-terminal and don’t return an end of file (EOF) marker. Valid values: NONE, PRESERVE. Default: NONE (ignore special devices).

Uid string

User identifier of the file’s owners. Valid values: BOTH, INT_VALUE, NAME, NONE. Default: INT_VALUE (preserve integer value of the ID).

VerifyMode string

Whether a data integrity verification should be performed at the end of a task execution after all data and metadata have been transferred. Valid values: NONE, POINT_IN_TIME_CONSISTENT, ONLY_FILES_TRANSFERRED. Default: POINT_IN_TIME_CONSISTENT.

atime string

A file metadata that shows the last time a file was accessed (that is when the file was read or written to). If set to BEST_EFFORT, the DataSync Task attempts to preserve the original (that is, the version before sync PREPARING phase) atime attribute on all source files. Valid values: BEST_EFFORT, NONE. Default: BEST_EFFORT.

bytesPerSecond number

Limits the bandwidth utilized. For example, to set a maximum of 1 MB, set this value to 1048576. Value values: -1 or greater. Default: -1 (unlimited).

gid string

Group identifier of the file’s owners. Valid values: BOTH, INT_VALUE, NAME, NONE. Default: INT_VALUE (preserve integer value of the ID).

mtime string

A file metadata that indicates the last time a file was modified (written to) before the sync PREPARING phase. Value values: NONE, PRESERVE. Default: PRESERVE.

posixPermissions string

Determines which users or groups can access a file for a specific purpose such as reading, writing, or execution of the file. Valid values: NONE, PRESERVE. Default: PRESERVE.

preserveDeletedFiles string

Whether files deleted in the source should be removed or preserved in the destination file system. Valid values: PRESERVE, REMOVE. Default: PRESERVE.

preserveDevices string

Whether the DataSync Task should preserve the metadata of block and character devices in the source files system, and recreate the files with that device name and metadata on the destination. The DataSync Task can’t sync the actual contents of such devices, because many of the devices are non-terminal and don’t return an end of file (EOF) marker. Valid values: NONE, PRESERVE. Default: NONE (ignore special devices).

uid string

User identifier of the file’s owners. Valid values: BOTH, INT_VALUE, NAME, NONE. Default: INT_VALUE (preserve integer value of the ID).

verifyMode string

Whether a data integrity verification should be performed at the end of a task execution after all data and metadata have been transferred. Valid values: NONE, POINT_IN_TIME_CONSISTENT, ONLY_FILES_TRANSFERRED. Default: POINT_IN_TIME_CONSISTENT.

atime str

A file metadata that shows the last time a file was accessed (that is when the file was read or written to). If set to BEST_EFFORT, the DataSync Task attempts to preserve the original (that is, the version before sync PREPARING phase) atime attribute on all source files. Valid values: BEST_EFFORT, NONE. Default: BEST_EFFORT.

bytesPerSecond float

Limits the bandwidth utilized. For example, to set a maximum of 1 MB, set this value to 1048576. Value values: -1 or greater. Default: -1 (unlimited).

gid str

Group identifier of the file’s owners. Valid values: BOTH, INT_VALUE, NAME, NONE. Default: INT_VALUE (preserve integer value of the ID).

mtime str

A file metadata that indicates the last time a file was modified (written to) before the sync PREPARING phase. Value values: NONE, PRESERVE. Default: PRESERVE.

posixPermissions str

Determines which users or groups can access a file for a specific purpose such as reading, writing, or execution of the file. Valid values: NONE, PRESERVE. Default: PRESERVE.

preserveDeletedFiles str

Whether files deleted in the source should be removed or preserved in the destination file system. Valid values: PRESERVE, REMOVE. Default: PRESERVE.

preserveDevices str

Whether the DataSync Task should preserve the metadata of block and character devices in the source files system, and recreate the files with that device name and metadata on the destination. The DataSync Task can’t sync the actual contents of such devices, because many of the devices are non-terminal and don’t return an end of file (EOF) marker. Valid values: NONE, PRESERVE. Default: NONE (ignore special devices).

uid str

User identifier of the file’s owners. Valid values: BOTH, INT_VALUE, NAME, NONE. Default: INT_VALUE (preserve integer value of the ID).

verifyMode str

Whether a data integrity verification should be performed at the end of a task execution after all data and metadata have been transferred. Valid values: NONE, POINT_IN_TIME_CONSISTENT, ONLY_FILES_TRANSFERRED. Default: POINT_IN_TIME_CONSISTENT.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.