Class CfnTask
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.datasync.CfnTask
- All Implemented Interfaces:
IInspectable,ITaskRef,IEnvironmentAware,ITaggable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.121.0 (build d7af9b9)",
date="2025-12-18T18:20:08.038Z")
@Stability(Stable)
public class CfnTask
extends CfnResource
implements IInspectable, ITaskRef, ITaggable
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.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.datasync.*;
CfnTask cfnTask = CfnTask.Builder.create(this, "MyCfnTask")
.destinationLocationArn("destinationLocationArn")
.sourceLocationArn("sourceLocationArn")
// the properties below are optional
.cloudWatchLogGroupArn("cloudWatchLogGroupArn")
.excludes(List.of(FilterRuleProperty.builder()
.filterType("filterType")
.value("value")
.build()))
.includes(List.of(FilterRuleProperty.builder()
.filterType("filterType")
.value("value")
.build()))
.manifestConfig(ManifestConfigProperty.builder()
.source(SourceProperty.builder()
.s3(ManifestConfigSourceS3Property.builder()
.bucketAccessRoleArn("bucketAccessRoleArn")
.manifestObjectPath("manifestObjectPath")
.manifestObjectVersionId("manifestObjectVersionId")
.s3BucketArn("s3BucketArn")
.build())
.build())
// the properties below are optional
.action("action")
.format("format")
.build())
.name("name")
.options(OptionsProperty.builder()
.atime("atime")
.bytesPerSecond(123)
.gid("gid")
.logLevel("logLevel")
.mtime("mtime")
.objectTags("objectTags")
.overwriteMode("overwriteMode")
.posixPermissions("posixPermissions")
.preserveDeletedFiles("preserveDeletedFiles")
.preserveDevices("preserveDevices")
.securityDescriptorCopyFlags("securityDescriptorCopyFlags")
.taskQueueing("taskQueueing")
.transferMode("transferMode")
.uid("uid")
.verifyMode("verifyMode")
.build())
.schedule(TaskScheduleProperty.builder()
.scheduleExpression("scheduleExpression")
.status("status")
.build())
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.taskMode("taskMode")
.taskReportConfig(TaskReportConfigProperty.builder()
.destination(DestinationProperty.builder()
.s3(S3Property.builder()
.bucketAccessRoleArn("bucketAccessRoleArn")
.s3BucketArn("s3BucketArn")
.subdirectory("subdirectory")
.build())
.build())
.outputType("outputType")
// the properties below are optional
.objectVersionIds("objectVersionIds")
.overrides(OverridesProperty.builder()
.deleted(DeletedProperty.builder()
.reportLevel("reportLevel")
.build())
.skipped(SkippedProperty.builder()
.reportLevel("reportLevel")
.build())
.transferred(TransferredProperty.builder()
.reportLevel("reportLevel")
.build())
.verified(VerifiedProperty.builder()
.reportLevel("reportLevel")
.build())
.build())
.reportLevel("reportLevel")
.build())
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnTask.static interfaceSpecifies the level of reporting for the files, objects, and directories that Datasync attempted to delete in your destination location.static interfaceSpecifies where DataSync uploads your task report.static interfaceSpecifies which files, folders, and objects to include or exclude when transferring files from source to destination.static interfaceConfigures a manifest, which is a list of files or objects that you want AWS DataSync to transfer.static interfaceSpecifies the S3 bucket where you're hosting the manifest that you want AWS DataSync to use.static interfaceRepresents the options that are available to control the behavior of a StartTaskExecution operation.static interfaceCustomizes the reporting level for aspects of your task report.static interfaceExample:static interfaceSpecifies the level of reporting for the files, objects, and directories that Datasync attempted to skip during your transfer.static interfaceSpecifies the manifest that you want DataSync to use and where it's hosted.static interfaceSpecifies how you want to configure a task report, which provides detailed information about for your AWS DataSync transfer.static interfaceConfigures your AWS DataSync task to run on a schedule (at a minimum interval of 1 hour).static interfaceSpecifies the level of reporting for the files, objects, and directories that Datasync attempted to transfer.static interfaceSpecifies the level of reporting for the files, objects, and directories that Datasync attempted to verify at the end of your transfer.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.datasync.ITaskRef
ITaskRef.Jsii$Default, ITaskRef.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnTask(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnTask(software.amazon.jsii.JsiiObjectRef objRef) CfnTask(software.constructs.Construct scope, String id, CfnTaskProps props) Create a newAWS::DataSync::Task. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForTask(ITaskRef resource) The ARNs of the destination elastic network interfaces (ENIs) that were created for your subnet.The ARNs of the source ENIs that were created for your subnet.The status of the task that was described.The ARN of the task.Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for monitoring your task.The Amazon Resource Name (ARN) of an AWS storage resource's location.Specifies exclude filters that define the files, objects, and folders in your source location that you don't want DataSync to transfer.Specifies include filters that define the files, objects, and folders in your source location that you want DataSync to transfer.The configuration of the manifest that lists the files or objects that you want DataSync to transfer.getName()Specifies the name of your task.Specifies your task's settings, such as preserving file metadata, verifying data integrity, among other options.Specifies a schedule for when you want your task to run.Specifies the ARN of your transfer's source location.getTags()Tag Manager which manages the tags for this resource.Specifies the tags that you want to apply to your task.The task mode that you're using.A reference to a Task resource.The configuration of your task report, which provides detailed information about your DataSync transfer.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnTask.renderProperties(Map<String, Object> props) voidsetCloudWatchLogGroupArn(String value) Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for monitoring your task.voidsetDestinationLocationArn(String value) The Amazon Resource Name (ARN) of an AWS storage resource's location.voidsetExcludes(List<Object> value) Specifies exclude filters that define the files, objects, and folders in your source location that you don't want DataSync to transfer.voidsetExcludes(IResolvable value) Specifies exclude filters that define the files, objects, and folders in your source location that you don't want DataSync to transfer.voidsetIncludes(List<Object> value) Specifies include filters that define the files, objects, and folders in your source location that you want DataSync to transfer.voidsetIncludes(IResolvable value) Specifies include filters that define the files, objects, and folders in your source location that you want DataSync to transfer.voidsetManifestConfig(IResolvable value) The configuration of the manifest that lists the files or objects that you want DataSync to transfer.voidThe configuration of the manifest that lists the files or objects that you want DataSync to transfer.voidSpecifies the name of your task.voidsetOptions(IResolvable value) Specifies your task's settings, such as preserving file metadata, verifying data integrity, among other options.voidSpecifies your task's settings, such as preserving file metadata, verifying data integrity, among other options.voidsetSchedule(IResolvable value) Specifies a schedule for when you want your task to run.voidSpecifies a schedule for when you want your task to run.voidsetSourceLocationArn(String value) Specifies the ARN of your transfer's source location.voidsetTagsRaw(List<CfnTag> value) Specifies the tags that you want to apply to your task.voidsetTaskMode(String value) The task mode that you're using.voidsetTaskReportConfig(IResolvable value) The configuration of your task report, which provides detailed information about your DataSync transfer.voidThe configuration of your task report, which provides detailed information about your DataSync transfer.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnTask
protected CfnTask(software.amazon.jsii.JsiiObjectRef objRef) -
CfnTask
protected CfnTask(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnTask
@Stability(Stable) public CfnTask(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnTaskProps props) Create a newAWS::DataSync::Task.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
arnForTask
- Parameters:
resource- This parameter is required.
-
isCfnTask
Checks whether the given object is a CfnTask.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrDestinationNetworkInterfaceArns
The ARNs of the destination elastic network interfaces (ENIs) that were created for your subnet. -
getAttrSourceNetworkInterfaceArns
The ARNs of the source ENIs that were created for your subnet. -
getAttrStatus
The status of the task that was described. -
getAttrTaskArn
The ARN of the task. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getTaskRef
A reference to a Task resource.- Specified by:
getTaskRefin interfaceITaskRef
-
getDestinationLocationArn
The Amazon Resource Name (ARN) of an AWS storage resource's location. -
setDestinationLocationArn
The Amazon Resource Name (ARN) of an AWS storage resource's location. -
getSourceLocationArn
Specifies the ARN of your transfer's source location. -
setSourceLocationArn
Specifies the ARN of your transfer's source location. -
getCloudWatchLogGroupArn
Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for monitoring your task. -
setCloudWatchLogGroupArn
Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for monitoring your task. -
getExcludes
Specifies exclude filters that define the files, objects, and folders in your source location that you don't want DataSync to transfer.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnTask.FilterRuleProperty> -
setExcludes
Specifies exclude filters that define the files, objects, and folders in your source location that you don't want DataSync to transfer. -
setExcludes
Specifies exclude filters that define the files, objects, and folders in your source location that you don't want DataSync to transfer. -
getIncludes
Specifies include filters that define the files, objects, and folders in your source location that you want DataSync to transfer.Returns union: either
IResolvableor Listinvalid input: '<'eitherIResolvableorCfnTask.FilterRuleProperty> -
setIncludes
Specifies include filters that define the files, objects, and folders in your source location that you want DataSync to transfer. -
setIncludes
Specifies include filters that define the files, objects, and folders in your source location that you want DataSync to transfer. -
getManifestConfig
The configuration of the manifest that lists the files or objects that you want DataSync to transfer.Returns union: either
IResolvableorCfnTask.ManifestConfigProperty -
setManifestConfig
The configuration of the manifest that lists the files or objects that you want DataSync to transfer. -
setManifestConfig
The configuration of the manifest that lists the files or objects that you want DataSync to transfer. -
getName
Specifies the name of your task. -
setName
Specifies the name of your task. -
getOptions
Specifies your task's settings, such as preserving file metadata, verifying data integrity, among other options.Returns union: either
IResolvableorCfnTask.OptionsProperty -
setOptions
Specifies your task's settings, such as preserving file metadata, verifying data integrity, among other options. -
setOptions
Specifies your task's settings, such as preserving file metadata, verifying data integrity, among other options. -
getSchedule
Specifies a schedule for when you want your task to run.Returns union: either
IResolvableorCfnTask.TaskScheduleProperty -
setSchedule
Specifies a schedule for when you want your task to run. -
setSchedule
Specifies a schedule for when you want your task to run. -
getTagsRaw
Specifies the tags that you want to apply to your task. -
setTagsRaw
Specifies the tags that you want to apply to your task. -
getTaskMode
The task mode that you're using. -
setTaskMode
The task mode that you're using. -
getTaskReportConfig
The configuration of your task report, which provides detailed information about your DataSync transfer.Returns union: either
IResolvableorCfnTask.TaskReportConfigProperty -
setTaskReportConfig
The configuration of your task report, which provides detailed information about your DataSync transfer. -
setTaskReportConfig
@Stability(Stable) public void setTaskReportConfig(@Nullable CfnTask.TaskReportConfigProperty value) The configuration of your task report, which provides detailed information about your DataSync transfer.
-