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);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:
- Destination
Location stringArn Amazon Resource Name (ARN) of destination DataSync Location.
- Source
Location stringArn Amazon Resource Name (ARN) of source DataSync Location.
- Cloudwatch
Log stringGroup 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
Task
Options Args 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.
- Dictionary<string, string>
Key-value pairs of resource tags to assign to the DataSync Task.
- Destination
Location stringArn Amazon Resource Name (ARN) of destination DataSync Location.
- Source
Location stringArn Amazon Resource Name (ARN) of source DataSync Location.
- Cloudwatch
Log stringGroup 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
Task
Options 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.
- map[string]string
Key-value pairs of resource tags to assign to the DataSync Task.
- destination
Location ARNArn Amazon Resource Name (ARN) of destination DataSync Location.
- source
Location ARNArn Amazon Resource Name (ARN) of source DataSync Location.
- cloudwatch
Log ARNGroup 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
Task
Options 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.
- {[key: string]: string}
Key-value pairs of resource tags to assign to the DataSync Task.
- destination_
location_ strarn Amazon Resource Name (ARN) of destination DataSync Location.
- source_
location_ strarn Amazon Resource Name (ARN) of source DataSync Location.
- cloudwatch_
log_ strgroup_ arn 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[Task
Options] 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.
- 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:
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): Taskstatic 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);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.
- Cloudwatch
Log stringGroup Arn Amazon Resource Name (ARN) of the CloudWatch Log Group that is used to monitor and log events in the sync task.
- Destination
Location stringArn Amazon Resource Name (ARN) of destination DataSync Location.
- Name string
Name of the DataSync Task.
- Options
Task
Options Args 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 stringArn Amazon Resource Name (ARN) of source DataSync Location.
- 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.
- Cloudwatch
Log stringGroup Arn Amazon Resource Name (ARN) of the CloudWatch Log Group that is used to monitor and log events in the sync task.
- Destination
Location stringArn Amazon Resource Name (ARN) of destination DataSync Location.
- Name string
Name of the DataSync Task.
- Options
Task
Options 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 stringArn Amazon Resource Name (ARN) of source DataSync Location.
- 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.
- cloudwatch
Log ARNGroup Arn Amazon Resource Name (ARN) of the CloudWatch Log Group that is used to monitor and log events in the sync task.
- destination
Location ARNArn Amazon Resource Name (ARN) of destination DataSync Location.
- name string
Name of the DataSync Task.
- options
Task
Options 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 ARNArn Amazon Resource Name (ARN) of source DataSync Location.
- {[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_ strgroup_ arn Amazon Resource Name (ARN) of the CloudWatch Log Group that is used to monitor and log events in the sync task.
- destination_
location_ strarn Amazon Resource Name (ARN) of destination DataSync Location.
- name str
Name of the DataSync Task.
- options
Dict[Task
Options] 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_ strarn Amazon Resource Name (ARN) of source DataSync Location.
- Dict[str, str]
Key-value pairs of resource tags to assign to the DataSync Task.
Supporting Types
TaskOptions
- 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 syncPREPARINGphase)atimeattribute on all source files. Valid values:BEST_EFFORT,NONE. Default:BEST_EFFORT.- Bytes
Per intSecond Limits the bandwidth utilized. For example, to set a maximum of 1 MB, set this value to
1048576. Value values:-1or 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
PREPARINGphase. Value values:NONE,PRESERVE. Default:PRESERVE.- Posix
Permissions 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.- Preserve
Deleted stringFiles Whether files deleted in the source should be removed or preserved in the destination file system. Valid values:
PRESERVE,REMOVE. Default:PRESERVE.- Preserve
Devices 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).- Verify
Mode 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 syncPREPARINGphase)atimeattribute on all source files. Valid values:BEST_EFFORT,NONE. Default:BEST_EFFORT.- Bytes
Per intSecond Limits the bandwidth utilized. For example, to set a maximum of 1 MB, set this value to
1048576. Value values:-1or 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
PREPARINGphase. Value values:NONE,PRESERVE. Default:PRESERVE.- Posix
Permissions 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.- Preserve
Deleted stringFiles Whether files deleted in the source should be removed or preserved in the destination file system. Valid values:
PRESERVE,REMOVE. Default:PRESERVE.- Preserve
Devices 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).- Verify
Mode 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 syncPREPARINGphase)atimeattribute on all source files. Valid values:BEST_EFFORT,NONE. Default:BEST_EFFORT.- bytes
Per numberSecond Limits the bandwidth utilized. For example, to set a maximum of 1 MB, set this value to
1048576. Value values:-1or 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
PREPARINGphase. Value values:NONE,PRESERVE. Default:PRESERVE.- posix
Permissions 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.- preserve
Deleted stringFiles Whether files deleted in the source should be removed or preserved in the destination file system. Valid values:
PRESERVE,REMOVE. Default:PRESERVE.- preserve
Devices 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).- verify
Mode 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 syncPREPARINGphase)atimeattribute on all source files. Valid values:BEST_EFFORT,NONE. Default:BEST_EFFORT.- bytes
Per floatSecond Limits the bandwidth utilized. For example, to set a maximum of 1 MB, set this value to
1048576. Value values:-1or 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
PREPARINGphase. Value values:NONE,PRESERVE. Default:PRESERVE.- posix
Permissions 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.- preserve
Deleted strFiles Whether files deleted in the source should be removed or preserved in the destination file system. Valid values:
PRESERVE,REMOVE. Default:PRESERVE.- preserve
Devices 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).- verify
Mode 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
awsTerraform Provider.