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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:56.215Z") @Stability(Stable) public class CfnTask extends CfnResource implements IInspectable
A CloudFormation AWS::DataSync::Task.

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()))
         .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")
                 .build())
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 
  • 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 Construct scope, @NotNull String id, @NotNull CfnTaskProps props)
      Create a new AWS::DataSync::Task.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      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()
      Specifies the tags that you want to apply to the Amazon Resource Name (ARN) representing the task.

      Tags are key-value pairs that help you manage, filter, and search for your DataSync resources.

    • 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()
      The Amazon Resource Name (ARN) of the source location for the task.
    • setSourceLocationArn

      @Stability(Stable) public void setSourceLocationArn(@NotNull String value)
      The Amazon Resource Name (ARN) of the source location for the task.
    • getCloudWatchLogGroupArn

      @Stability(Stable) @Nullable public String getCloudWatchLogGroupArn()
      The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that is used to monitor and log events in the task.

      For more information about how to use CloudWatch Logs with DataSync, see Monitoring Your Task in the AWS DataSync User Guide.

      For more information about these groups, see Working with Log Groups and Log Streams in the Amazon CloudWatch Logs User Guide .

    • setCloudWatchLogGroupArn

      @Stability(Stable) public void setCloudWatchLogGroupArn(@Nullable String value)
      The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that is used to monitor and log events in the task.

      For more information about how to use CloudWatch Logs with DataSync, see Monitoring Your Task in the AWS DataSync User Guide.

      For more information about these groups, see Working with Log Groups and Log Streams in the Amazon CloudWatch Logs User Guide .

    • getExcludes

      @Stability(Stable) @Nullable public Object getExcludes()
      Specifies a list of filter rules that exclude specific data during your transfer.

      For more information and examples, see Filtering data transferred by DataSync .

    • setExcludes

      @Stability(Stable) public void setExcludes(@Nullable IResolvable value)
      Specifies a list of filter rules that exclude specific data during your transfer.

      For more information and examples, see Filtering data transferred by DataSync .

    • setExcludes

      @Stability(Stable) public void setExcludes(@Nullable List<Object> value)
      Specifies a list of filter rules that exclude specific data during your transfer.

      For more information and examples, see Filtering data transferred by DataSync .

    • getIncludes

      @Stability(Stable) @Nullable public Object getIncludes()
      Specifies a list of filter rules that include specific data during your transfer.

      For more information and examples, see Filtering data transferred by DataSync .

    • setIncludes

      @Stability(Stable) public void setIncludes(@Nullable IResolvable value)
      Specifies a list of filter rules that include specific data during your transfer.

      For more information and examples, see Filtering data transferred by DataSync .

    • setIncludes

      @Stability(Stable) public void setIncludes(@Nullable List<Object> value)
      Specifies a list of filter rules that include specific data during your transfer.

      For more information and examples, see Filtering data transferred by DataSync .

    • getName

      @Stability(Stable) @Nullable public String getName()
      The name of a task.

      This value is a text reference that is used to identify the task in the console.

    • setName

      @Stability(Stable) public void setName(@Nullable String value)
      The name of a task.

      This value is a text reference that is used to identify the task in the console.

    • getOptions

      @Stability(Stable) @Nullable public Object getOptions()
      Specifies the configuration options for a task. Some options include preserving file or object metadata and verifying data integrity.

      You can also override these options before starting an individual run of a task (also known as a task execution ). For more information, see StartTaskExecution .

    • setOptions

      @Stability(Stable) public void setOptions(@Nullable IResolvable value)
      Specifies the configuration options for a task. Some options include preserving file or object metadata and verifying data integrity.

      You can also override these options before starting an individual run of a task (also known as a task execution ). For more information, see StartTaskExecution .

    • setOptions

      @Stability(Stable) public void setOptions(@Nullable CfnTask.OptionsProperty value)
      Specifies the configuration options for a task. Some options include preserving file or object metadata and verifying data integrity.

      You can also override these options before starting an individual run of a task (also known as a task execution ). For more information, see StartTaskExecution .

    • getSchedule

      @Stability(Stable) @Nullable public Object getSchedule()
      Specifies a schedule used to periodically transfer files from a source to a destination location.

      The schedule should be specified in UTC time. For more information, see Scheduling your task .

    • setSchedule

      @Stability(Stable) public void setSchedule(@Nullable IResolvable value)
      Specifies a schedule used to periodically transfer files from a source to a destination location.

      The schedule should be specified in UTC time. For more information, see Scheduling your task .

    • setSchedule

      @Stability(Stable) public void setSchedule(@Nullable CfnTask.TaskScheduleProperty value)
      Specifies a schedule used to periodically transfer files from a source to a destination location.

      The schedule should be specified in UTC time. For more information, see Scheduling your task .