Skip to content
v2.273.0

CfnTaskProps Struct ​

Properties for defining a CfnTask.

Example ​

ts
// 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 ​

cloudWatchLogGroupArnstring | ILogGroupRefcloud_watch_log_group_arntyping.Union[str, ILogGroupRef]cloudWatchLogGroupArnStringCloudWatchLogGroupArnstringCloudWatchLogGroupArninterface{}#
Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for monitoring your task.
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#
The Amazon Resource Name (ARN) of an AWS storage resource's location.
excludesIResolvable | IResolvable | CfnTask.FilterRuleProperty[]excludestyping.Union[IResolvable, typing.List[typing.Union[IResolvable, FilterRuleProperty]]]excludesIResolvableExcludesIResolvableExcludesinterface{}#
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 .

includesIResolvable | IResolvable | CfnTask.FilterRuleProperty[]includestyping.Union[IResolvable, typing.List[typing.Union[IResolvable, FilterRuleProperty]]]includesIResolvableIncludesIResolvableIncludesinterface{}#
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 .

manifestConfigIResolvable | CfnTask.ManifestConfigPropertymanifest_configtyping.Union[IResolvable, ManifestConfigProperty]manifestConfigIResolvableManifestConfigIResolvableManifestConfiginterface{}#
The configuration of the manifest that lists the files or objects that you want DataSync to transfer.
namestringnamestrnameStringNamestringName*string#
Specifies the name of your task.
optionsIResolvable | CfnTask.OptionsPropertyoptionstyping.Union[IResolvable, OptionsProperty]optionsIResolvableOptionsIResolvableOptionsinterface{}#
Specifies your task's settings, such as preserving file metadata, verifying data integrity, among other options.
scheduleIResolvable | CfnTask.TaskSchedulePropertyscheduletyping.Union[IResolvable, TaskScheduleProperty]scheduleIResolvableScheduleIResolvableScheduleinterface{}#
Specifies a schedule for when you want your task to run.

For more information, see Scheduling your task .

sourceLocationArnstring | ILocationNFSRef | ILocationS3Refsource_location_arntyping.Union[str, ILocationNFSRef, ILocationS3Ref]sourceLocationArnStringSourceLocationArnstringSourceLocationArninterface{}required#
Specifies the ARN of your transfer's source location.
tagsCfnTag[]tagstyping.List[CfnTag]tagsList<CfnTag>TagsCfnTag[]Tags*[]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.

taskModestringtask_modestrtaskModeStringTaskModestringTaskMode*string#
The task mode that you're using.
taskReportConfigIResolvable | CfnTask.TaskReportConfigPropertytask_report_configtyping.Union[IResolvable, TaskReportConfigProperty]taskReportConfigIResolvableTaskReportConfigIResolvableTaskReportConfiginterface{}#
The configuration of your task report, which provides detailed information about your DataSync transfer.

Used as props by ​