Class CfnTask
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
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();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCfnTask
.static interface
Specifies which files, folders, and objects to include or exclude when transferring files from source to destination.static interface
Represents the options that are available to control the behavior of a StartTaskExecution operation.static interface
Specifies the schedule you want your task to use for repeated executions.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThe 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.The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that is used to monitor and log events in the task.The Amazon Resource Name (ARN) of an AWS storage resource's location.Specifies a list of filter rules that exclude specific data during your transfer.Specifies a list of filter rules that include specific data during your transfer.getName()
The name of a task.Specifies the configuration options for a task.Specifies a schedule used to periodically transfer files from a source to a destination location.The Amazon Resource Name (ARN) of the source location for the task.getTags()
Specifies the tags that you want to apply to the Amazon Resource Name (ARN) representing the task.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setCloudWatchLogGroupArn
(String value) The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that is used to monitor and log events in the task.void
setDestinationLocationArn
(String value) The Amazon Resource Name (ARN) of an AWS storage resource's location.void
setExcludes
(List<Object> value) Specifies a list of filter rules that exclude specific data during your transfer.void
setExcludes
(IResolvable value) Specifies a list of filter rules that exclude specific data during your transfer.void
setIncludes
(List<Object> value) Specifies a list of filter rules that include specific data during your transfer.void
setIncludes
(IResolvable value) Specifies a list of filter rules that include specific data during your transfer.void
The name of a task.void
setOptions
(IResolvable value) Specifies the configuration options for a task.void
Specifies the configuration options for a task.void
setSchedule
(IResolvable value) Specifies a schedule used to periodically transfer files from a source to a destination location.void
Specifies a schedule used to periodically transfer files from a source to a destination location.void
setSourceLocationArn
(String value) The Amazon Resource Name (ARN) of the source location for the task.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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 Construct scope, @NotNull String id, @NotNull CfnTaskProps props) Create a newAWS::DataSync::Task
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in 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:
getCfnProperties
in classCfnResource
-
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
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
The Amazon Resource Name (ARN) of the source location for the task. -
setSourceLocationArn
The Amazon Resource Name (ARN) of the source location for the task. -
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
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
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
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
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
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
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
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
The name of a task.This value is a text reference that is used to identify the task in the console.
-
setName
The name of a task.This value is a text reference that is used to identify the task in the console.
-
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
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
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
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
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
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 .
-