@Generated(value="jsii-pacmak/1.57.0 (build f614666)", date="2022-04-22T09:30:46.484Z") @Stability(value=Stable) 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") .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.
|
software.amazon.jsii.JsiiObject.InitializationMode
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Modifier and Type | Field and Description |
---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnTask(software.constructs.Construct scope,
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 |
---|---|
List<String> |
getAttrDestinationNetworkInterfaceArns()
The ARNs of the destination elastic network interfaces (ENIs) that were created for your subnet.
|
String |
getAttrErrorCode()
Errors encountered during task execution.
|
String |
getAttrErrorDetail()
Detailed description of an error that was encountered during the task execution.
|
List<String> |
getAttrSourceNetworkInterfaceArns()
The ARNs of the source ENIs that were created for your subnet.
|
String |
getAttrStatus()
The status of the task that was described.
|
String |
getAttrTaskArn()
The ARN of the task.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getCloudWatchLogGroupArn()
The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that is used to monitor and log events in the task.
|
String |
getDestinationLocationArn()
The Amazon Resource Name (ARN) of an AWS storage resource's location.
|
Object |
getExcludes()
A list of filter rules that determines which files to exclude from a task.
|
Object |
getIncludes()
A list of filter rules that determines which files to include when running a task.
|
String |
getName()
The name of a task.
|
Object |
getOptions()
The set of configuration options that control the behavior of a single execution of the task that occurs when you call `StartTaskExecution` .
|
Object |
getSchedule()
Specifies a schedule used to periodically transfer files from a source to a destination location.
|
String |
getSourceLocationArn()
The Amazon Resource Name (ARN) of the source location for the task.
|
TagManager |
getTags()
The key-value pair that represents the tag that you want to add to the resource.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
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(IResolvable value)
A list of filter rules that determines which files to exclude from a task.
|
void |
setExcludes(List<Object> value)
A list of filter rules that determines which files to exclude from a task.
|
void |
setIncludes(IResolvable value)
A list of filter rules that determines which files to include when running a task.
|
void |
setIncludes(List<Object> value)
A list of filter rules that determines which files to include when running a task.
|
void |
setName(String value)
The name of a task.
|
void |
setOptions(CfnTask.OptionsProperty value)
The set of configuration options that control the behavior of a single execution of the task that occurs when you call `StartTaskExecution` .
|
void |
setOptions(IResolvable value)
The set of configuration options that control the behavior of a single execution of the task that occurs when you call `StartTaskExecution` .
|
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(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
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnTask(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnTask(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) public CfnTask(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull 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.@Stability(value=Stable) public void inspect(@NotNull TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.@Stability(value=Stable) @NotNull public List<String> getAttrDestinationNetworkInterfaceArns()
@Stability(value=Stable) @NotNull public String getAttrErrorCode()
Troubleshoot issues with this error code.
@Stability(value=Stable) @NotNull public String getAttrErrorDetail()
You can use this information to help troubleshoot issues.
@Stability(value=Stable) @NotNull public List<String> getAttrSourceNetworkInterfaceArns()
@Stability(value=Stable) @NotNull public String getAttrStatus()
@Stability(value=Stable) @NotNull public String getAttrTaskArn()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties
in class CfnResource
@Stability(value=Stable) @NotNull public TagManager getTags()
The value can be an empty string.
@Stability(value=Stable) @NotNull public String getDestinationLocationArn()
@Stability(value=Stable) public void setDestinationLocationArn(@NotNull String value)
@Stability(value=Stable) @NotNull public String getSourceLocationArn()
@Stability(value=Stable) public void setSourceLocationArn(@NotNull String value)
@Stability(value=Stable) @Nullable public 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 .
@Stability(value=Stable) public void setCloudWatchLogGroupArn(@Nullable 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 .
@Stability(value=Stable) @Nullable public Object getExcludes()
The list should contain a single filter string that consists of the patterns to exclude. The patterns are delimited by "|" (that is, a pipe), for example, "/folder1|/folder2"
.
@Stability(value=Stable) public void setExcludes(@Nullable IResolvable value)
The list should contain a single filter string that consists of the patterns to exclude. The patterns are delimited by "|" (that is, a pipe), for example, "/folder1|/folder2"
.
@Stability(value=Stable) public void setExcludes(@Nullable List<Object> value)
The list should contain a single filter string that consists of the patterns to exclude. The patterns are delimited by "|" (that is, a pipe), for example, "/folder1|/folder2"
.
@Stability(value=Stable) @Nullable public Object getIncludes()
The pattern contains a single filter string that consists of the patterns to include. The patterns are delimited by "|" (that is, a pipe), for example, "/folder1|/folder2"
.
@Stability(value=Stable) public void setIncludes(@Nullable IResolvable value)
The pattern contains a single filter string that consists of the patterns to include. The patterns are delimited by "|" (that is, a pipe), for example, "/folder1|/folder2"
.
@Stability(value=Stable) public void setIncludes(@Nullable List<Object> value)
The pattern contains a single filter string that consists of the patterns to include. The patterns are delimited by "|" (that is, a pipe), for example, "/folder1|/folder2"
.
@Stability(value=Stable) @Nullable public String getName()
This value is a text reference that is used to identify the task in the console.
@Stability(value=Stable) public void setName(@Nullable String value)
This value is a text reference that is used to identify the task in the console.
@Stability(value=Stable) @Nullable public Object getOptions()
You can configure these options to preserve metadata such as user ID (UID) and group ID (GID), file permissions, data integrity verification, and so on.
For each individual task execution, you can override these options by specifying the OverrideOptions
before starting the task execution. For more information, see the StartTaskExecution operation.
@Stability(value=Stable) public void setOptions(@Nullable CfnTask.OptionsProperty value)
You can configure these options to preserve metadata such as user ID (UID) and group ID (GID), file permissions, data integrity verification, and so on.
For each individual task execution, you can override these options by specifying the OverrideOptions
before starting the task execution. For more information, see the StartTaskExecution operation.
@Stability(value=Stable) public void setOptions(@Nullable IResolvable value)
You can configure these options to preserve metadata such as user ID (UID) and group ID (GID), file permissions, data integrity verification, and so on.
For each individual task execution, you can override these options by specifying the OverrideOptions
before starting the task execution. For more information, see the StartTaskExecution operation.
@Stability(value=Stable) @Nullable public Object getSchedule()
The schedule should be specified in UTC time. For more information, see Scheduling your task .
@Stability(value=Stable) public void setSchedule(@Nullable CfnTask.TaskScheduleProperty value)
The schedule should be specified in UTC time. For more information, see Scheduling your task .
@Stability(value=Stable) public void setSchedule(@Nullable IResolvable value)
The schedule should be specified in UTC time. For more information, see Scheduling your task .
Copyright © 2022. All rights reserved.