CfnTaskProps Struct
Properties for defining a CfnTask.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_datasync as datasync } from 'aws-cdk-lib';
const cfnTaskProps: datasync.CfnTaskProps = {
destinationLocationArn: 'destinationLocationArn',
sourceLocationArn: 'sourceLocationArn',
// the properties below are optional
cloudWatchLogGroupArn: 'cloudWatchLogGroupArn',
excludes: [{
filterType: 'filterType',
value: 'value',
}],
includes: [{
filterType: 'filterType',
value: 'value',
}],
manifestConfig: {
source: {
s3: {
bucketAccessRoleArn: 'bucketAccessRoleArn',
manifestObjectPath: 'manifestObjectPath',
manifestObjectVersionId: 'manifestObjectVersionId',
s3BucketArn: 's3BucketArn',
},
},
// the properties below are optional
action: 'action',
format: 'format',
},
name: 'name',
options: {
atime: 'atime',
bytesPerSecond: 123,
gid: 'gid',
logLevel: 'logLevel',
mtime: 'mtime',
objectMetadata: 'objectMetadata',
objectTags: 'objectTags',
overwriteMode: 'overwriteMode',
posixPermissions: 'posixPermissions',
preserveDeletedFiles: 'preserveDeletedFiles',
preserveDevices: 'preserveDevices',
securityDescriptorCopyFlags: 'securityDescriptorCopyFlags',
taskQueueing: 'taskQueueing',
transferMode: 'transferMode',
uid: 'uid',
verifyMode: 'verifyMode',
},
schedule: {
scheduleExpression: 'scheduleExpression',
status: 'status',
},
tags: [{
key: 'key',
value: 'value',
}],
taskMode: 'taskMode',
taskReportConfig: {
destination: {
s3: {
bucketAccessRoleArn: 'bucketAccessRoleArn',
s3BucketArn: 's3BucketArn',
subdirectory: 'subdirectory',
},
},
outputType: 'outputType',
// the properties below are optional
objectVersionIds: 'objectVersionIds',
overrides: {
deleted: {
reportLevel: 'reportLevel',
},
skipped: {
reportLevel: 'reportLevel',
},
transferred: {
reportLevel: 'reportLevel',
},
verified: {
reportLevel: 'reportLevel',
},
},
reportLevel: 'reportLevel',
},
};
Properties
cloudWatchLogGroupArnoptionalstring | ILogGroupRefcloud_watch_log_group_arnoptionaltyping.Union[str, ILogGroupRef]cloudWatchLogGroupArnoptionalStringCloudWatchLogGroupArnoptionalstringCloudWatchLogGroupArnoptionalinterface{}#notes
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 .
destinationLocationArnstring | ILocationEFSRef | ILocationS3Refdestination_location_arntyping.Union[str, ILocationEFSRef, ILocationS3Ref]destinationLocationArnStringDestinationLocationArnstringDestinationLocationArninterface{}required#excludesoptionalIResolvable | IResolvable | CfnTask.FilterRuleProperty[]excludesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, FilterRuleProperty]]]excludesoptionalIResolvableExcludesoptionalIResolvableExcludesoptionalinterface{}#For more information and examples, see Specifying what DataSync transfers by using filters .
includesoptionalIResolvable | IResolvable | CfnTask.FilterRuleProperty[]includesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, FilterRuleProperty]]]includesoptionalIResolvableIncludesoptionalIResolvableIncludesoptionalinterface{}#For more information and examples, see Specifying what DataSync transfers by using filters .
manifestConfigoptionalIResolvable | CfnTask.ManifestConfigPropertymanifest_configoptionaltyping.Union[IResolvable, ManifestConfigProperty]manifestConfigoptionalIResolvableManifestConfigoptionalIResolvableManifestConfigoptionalinterface{}#For more information, see Specifying what DataSync transfers by using a manifest .
optionsoptionalIResolvable | CfnTask.OptionsPropertyoptionsoptionaltyping.Union[IResolvable, OptionsProperty]optionsoptionalIResolvableOptionsoptionalIResolvableOptionsoptionalinterface{}#scheduleoptionalIResolvable | CfnTask.TaskSchedulePropertyscheduleoptionaltyping.Union[IResolvable, TaskScheduleProperty]scheduleoptionalIResolvableScheduleoptionalIResolvableScheduleoptionalinterface{}#For more information, see Scheduling your task .
sourceLocationArnstring | ILocationNFSRef | ILocationS3Refsource_location_arntyping.Union[str, ILocationNFSRef, ILocationS3Ref]sourceLocationArnStringSourceLocationArnstringSourceLocationArninterface{}required#tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag#Tags are key-value pairs that help you manage, filter, and search for your DataSync resources.
taskModeoptionalstringtask_modeoptionalstrtaskModeoptionalStringTaskModeoptionalstringTaskModeoptional*string#For more information, see Choosing a task mode for your data transfer .
taskReportConfigoptionalIResolvable | CfnTask.TaskReportConfigPropertytask_report_configoptionaltyping.Union[IResolvable, TaskReportConfigProperty]taskReportConfigoptionalIResolvableTaskReportConfigoptionalIResolvableTaskReportConfigoptionalinterface{}#For more information, see Monitoring your DataSync transfers with task reports .