@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:35.776Z") public class CfnTask extends CfnResource implements IInspectable
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();
Modifier and Type | Class and Description |
---|---|
static class |
CfnTask.Builder
A fluent builder for
CfnTask . |
static interface |
CfnTask.FilterRuleProperty
Specifies which files, folders, and objects to include or exclude when transferring files from source to destination.
|
static interface |
CfnTask.OptionsProperty
Represents the options that are available to control the behavior of a [StartTaskExecution](https://docs.aws.amazon.com/datasync/latest/userguide/API_StartTaskExecution.html) operation.
|
static interface |
CfnTask.TaskScheduleProperty
Specifies the schedule you want your task to use for repeated executions.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnTask(Construct scope,
java.lang.String id,
CfnTaskProps props)
Create a new `AWS::DataSync::Task`.
|
protected |
CfnTask(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnTask(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
getAttrDestinationNetworkInterfaceArns()
The ARNs of the destination elastic network interfaces (ENIs) that were created for your subnet.
|
java.util.List<java.lang.String> |
getAttrSourceNetworkInterfaceArns()
The ARNs of the source ENIs that were created for your subnet.
|
java.lang.String |
getAttrStatus()
The status of the task that was described.
|
java.lang.String |
getAttrTaskArn()
The ARN of the task.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getCloudWatchLogGroupArn()
The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that is used to monitor and log events in the task.
|
java.lang.String |
getDestinationLocationArn()
The Amazon Resource Name (ARN) of an AWS storage resource's location.
|
java.lang.Object |
getExcludes()
Specifies a list of filter rules that exclude specific data during your transfer.
|
java.lang.Object |
getIncludes()
Specifies a list of filter rules that include specific data during your transfer.
|
java.lang.String |
getName()
The name of a task.
|
java.lang.Object |
getOptions()
Specifies the configuration options for a task.
|
java.lang.Object |
getSchedule()
Specifies a schedule used to periodically transfer files from a source to a destination location.
|
java.lang.String |
getSourceLocationArn()
The Amazon Resource Name (ARN) of the source location for the task.
|
TagManager |
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.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setCloudWatchLogGroupArn(java.lang.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(java.lang.String value)
The Amazon Resource Name (ARN) of an AWS storage resource's location.
|
void |
setExcludes(IResolvable value)
Specifies a list of filter rules that exclude specific data during your transfer.
|
void |
setExcludes(java.util.List<java.lang.Object> value)
Specifies a list of filter rules that exclude specific data during your transfer.
|
void |
setIncludes(IResolvable value)
Specifies a list of filter rules that include specific data during your transfer.
|
void |
setIncludes(java.util.List<java.lang.Object> value)
Specifies a list of filter rules that include specific data during your transfer.
|
void |
setName(java.lang.String value)
The name of a task.
|
void |
setOptions(CfnTask.OptionsProperty value)
Specifies the configuration options for a task.
|
void |
setOptions(IResolvable value)
Specifies the configuration options for a task.
|
void |
setSchedule(CfnTask.TaskScheduleProperty value)
Specifies a schedule used to periodically transfer files from a source to a destination location.
|
void |
setSchedule(IResolvable value)
Specifies a schedule used to periodically transfer files from a source to a destination location.
|
void |
setSourceLocationArn(java.lang.String value)
The Amazon Resource Name (ARN) of the source location for the task.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnTask(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnTask(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnTask(Construct scope, java.lang.String id, CfnTaskProps props)
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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.util.List<java.lang.String> getAttrDestinationNetworkInterfaceArns()
public java.util.List<java.lang.String> getAttrSourceNetworkInterfaceArns()
public java.lang.String getAttrStatus()
public java.lang.String getAttrTaskArn()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
Tags are key-value pairs that help you manage, filter, and search for your DataSync resources.
public java.lang.String getDestinationLocationArn()
public void setDestinationLocationArn(java.lang.String value)
public java.lang.String getSourceLocationArn()
public void setSourceLocationArn(java.lang.String value)
public java.lang.String getCloudWatchLogGroupArn()
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 .
public void setCloudWatchLogGroupArn(java.lang.String value)
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 .
public java.lang.Object getExcludes()
For more information and examples, see Filtering data transferred by DataSync .
public void setExcludes(IResolvable value)
For more information and examples, see Filtering data transferred by DataSync .
public void setExcludes(java.util.List<java.lang.Object> value)
For more information and examples, see Filtering data transferred by DataSync .
public java.lang.Object getIncludes()
For more information and examples, see Filtering data transferred by DataSync .
public void setIncludes(IResolvable value)
For more information and examples, see Filtering data transferred by DataSync .
public void setIncludes(java.util.List<java.lang.Object> value)
For more information and examples, see Filtering data transferred by DataSync .
public java.lang.String getName()
This value is a text reference that is used to identify the task in the console.
public void setName(java.lang.String value)
This value is a text reference that is used to identify the task in the console.
public java.lang.Object getOptions()
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 .
public void setOptions(IResolvable value)
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 .
public void setOptions(CfnTask.OptionsProperty value)
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 .
public java.lang.Object getSchedule()
The schedule should be specified in UTC time. For more information, see Scheduling your task .
public void setSchedule(IResolvable value)
The schedule should be specified in UTC time. For more information, see Scheduling your task .
public void setSchedule(CfnTask.TaskScheduleProperty value)
The schedule should be specified in UTC time. For more information, see Scheduling your task .