java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:05.158Z") @Stability(Stable) public class CfnTask extends CfnResource implements IInspectable, 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()))
         .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:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String 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)
      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

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrDestinationNetworkInterfaceArns

      @Stability(Stable) @NotNull public List<String> getAttrDestinationNetworkInterfaceArns()
      The ARNs of the destination elastic network interfaces (ENIs) that were created for your subnet.
    • getAttrSourceNetworkInterfaceArns

      @Stability(Stable) @NotNull public List<String> getAttrSourceNetworkInterfaceArns()
      The ARNs of the source ENIs that were created for your subnet.
    • getAttrStatus

      @Stability(Stable) @NotNull public String getAttrStatus()
      The status of the task that was described.
    • getAttrTaskArn

      @Stability(Stable) @NotNull public String getAttrTaskArn()
      The ARN of the task.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getDestinationLocationArn

      @Stability(Stable) @NotNull public String getDestinationLocationArn()
      The Amazon Resource Name (ARN) of an AWS storage resource's location.
    • setDestinationLocationArn

      @Stability(Stable) public void setDestinationLocationArn(@NotNull String value)
      The Amazon Resource Name (ARN) of an AWS storage resource's location.
    • getSourceLocationArn

      @Stability(Stable) @NotNull public String getSourceLocationArn()
      Specifies the ARN of your transfer's source location.
    • setSourceLocationArn

      @Stability(Stable) public void setSourceLocationArn(@NotNull String value)
      Specifies the ARN of your transfer's source location.
    • getCloudWatchLogGroupArn

      @Stability(Stable) @Nullable public String getCloudWatchLogGroupArn()
      Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for monitoring your task.
    • setCloudWatchLogGroupArn

      @Stability(Stable) public void setCloudWatchLogGroupArn(@Nullable String value)
      Specifies the Amazon Resource Name (ARN) of an Amazon CloudWatch log group for monitoring your task.
    • getExcludes

      @Stability(Stable) @Nullable public Object getExcludes()
      Specifies exclude filters that define the files, objects, and folders in your source location that you don't want DataSync to transfer.
    • setExcludes

      @Stability(Stable) public void setExcludes(@Nullable IResolvable value)
      Specifies exclude filters that define the files, objects, and folders in your source location that you don't want DataSync to transfer.
    • setExcludes

      @Stability(Stable) public void setExcludes(@Nullable 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.
    • getIncludes

      @Stability(Stable) @Nullable public Object getIncludes()
      Specifies include filters define the files, objects, and folders in your source location that you want DataSync to transfer.
    • setIncludes

      @Stability(Stable) public void setIncludes(@Nullable IResolvable value)
      Specifies include filters define the files, objects, and folders in your source location that you want DataSync to transfer.
    • setIncludes

      @Stability(Stable) public void setIncludes(@Nullable List<Object> value)
      Specifies include filters define the files, objects, and folders in your source location that you want DataSync to transfer.
    • getManifestConfig

      @Stability(Stable) @Nullable public Object getManifestConfig()
      The configuration of the manifest that lists the files or objects that you want DataSync to transfer.
    • setManifestConfig

      @Stability(Stable) public void setManifestConfig(@Nullable IResolvable value)
      The configuration of the manifest that lists the files or objects that you want DataSync to transfer.
    • setManifestConfig

      @Stability(Stable) public void setManifestConfig(@Nullable CfnTask.ManifestConfigProperty value)
      The configuration of the manifest that lists the files or objects that you want DataSync to transfer.
    • getName

      @Stability(Stable) @Nullable public String getName()
      Specifies the name of your task.
    • setName

      @Stability(Stable) public void setName(@Nullable String value)
      Specifies the name of your task.
    • getOptions

      @Stability(Stable) @Nullable public Object getOptions()
      Specifies your task's settings, such as preserving file metadata, verifying data integrity, among other options.
    • setOptions

      @Stability(Stable) public void setOptions(@Nullable IResolvable value)
      Specifies your task's settings, such as preserving file metadata, verifying data integrity, among other options.
    • setOptions

      @Stability(Stable) public void setOptions(@Nullable CfnTask.OptionsProperty value)
      Specifies your task's settings, such as preserving file metadata, verifying data integrity, among other options.
    • getSchedule

      @Stability(Stable) @Nullable public Object getSchedule()
      Specifies a schedule for when you want your task to run.
    • setSchedule

      @Stability(Stable) public void setSchedule(@Nullable IResolvable value)
      Specifies a schedule for when you want your task to run.
    • setSchedule

      @Stability(Stable) public void setSchedule(@Nullable CfnTask.TaskScheduleProperty value)
      Specifies a schedule for when you want your task to run.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      Specifies the tags that you want to apply to your task.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      Specifies the tags that you want to apply to your task.
    • getTaskReportConfig

      @Stability(Stable) @Nullable public Object getTaskReportConfig()
      Specifies how you want to configure a task report, which provides detailed information about your DataSync transfer.
    • setTaskReportConfig

      @Stability(Stable) public void setTaskReportConfig(@Nullable IResolvable value)
      Specifies how you want to configure a task report, which provides detailed information about your DataSync transfer.
    • setTaskReportConfig

      @Stability(Stable) public void setTaskReportConfig(@Nullable CfnTask.TaskReportConfigProperty value)
      Specifies how you want to configure a task report, which provides detailed information about your DataSync transfer.