AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::DataSync::Task

CfnTask

The `AWS::DataSync::Task` resource specifies a task. A task is a set of two locations (source and destination) and a set of `Options` that you use to control the behavior of a task. If you don't specify `Options` when you create a task, AWS DataSync populates them with service defaults.

Import

import { CfnTask } from 'aws-cdk-lib/aws-datasync';

Or use the module namespace:

import * as datasync from 'aws-cdk-lib/aws-datasync';
// datasync.CfnTask

Properties

Configuration passed to the constructor as CfnTaskProps.

destinationLocationArnRequired
string | ILocationEFSRef | ILocationS3Ref

The Amazon Resource Name (ARN) of an AWS storage resource's location.

sourceLocationArnRequired
string | ILocationNFSRef | ILocationS3Ref

Specifies the ARN of your transfer's source location.

cloudWatchLogGroupArnOptional
string | ILogGroupRef

Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for monitoring your task. For Enhanced mode tasks, you don't need to specify anything. DataSync automatically sends logs to a CloudWatch log group named `/aws/datasync` . For more information, see [Monitoring data transfers with CloudWatch Logs](https://docs.aws.amazon.com/datasync/latest/userguide/configure-logging.html) .

excludesOptional
IResolvable | IResolvable | FilterRuleProperty[]

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 [Specifying what DataSync transfers by using filters](https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html) .

includesOptional
IResolvable | IResolvable | FilterRuleProperty[]

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 [Specifying what DataSync transfers by using filters](https://docs.aws.amazon.com/datasync/latest/userguide/filtering.html) .

manifestConfigOptional
IResolvable | ManifestConfigProperty

The configuration of the manifest that lists the files or objects that you want DataSync to transfer. For more information, see [Specifying what DataSync transfers by using a manifest](https://docs.aws.amazon.com/datasync/latest/userguide/transferring-with-manifest.html) .

nameOptional
string

Specifies the name of your task.

optionsOptional
IResolvable | OptionsProperty

Specifies your task's settings, such as preserving file metadata, verifying data integrity, among other options.

scheduleOptional
IResolvable | TaskScheduleProperty

Specifies a schedule for when you want your task to run. For more information, see [Scheduling your task](https://docs.aws.amazon.com/datasync/latest/userguide/task-scheduling.html) .

tagsOptional
CfnTag[]

Specifies the tags that you want to apply to your task. *Tags* are key-value pairs that help you manage, filter, and search for your DataSync resources.

taskModeOptional
string

The task mode that you're using. For more information, see [Choosing a task mode for your data transfer](https://docs.aws.amazon.com/datasync/latest/userguide/choosing-task-mode.html) .

taskReportConfigOptional
IResolvable | TaskReportConfigProperty

The configuration of your task report, which provides detailed information about your DataSync transfer. For more information, see [Monitoring your DataSync transfers with task reports](https://docs.aws.amazon.com/datasync/latest/userguide/task-reports.html) .

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter