Class: AWS.DataSync
- Inherits:
-
AWS.Service
- Object
- AWS.Service
- AWS.DataSync
- Identifier:
- datasync
- API Version:
- 2018-11-09
- Defined in:
- (unknown)
Overview
Constructs a service interface object. Each API operation is exposed as a function on service.
Service Description
AWS DataSync is a managed data transfer service that makes it simpler for you to automate moving data between on-premises storage and Amazon Simple Storage Service (Amazon S3) or Amazon Elastic File System (Amazon EFS).
This API interface reference for AWS DataSync contains documentation for a programming interface that you can use to manage AWS DataSync.
Sending a Request Using DataSync
var datasync = new AWS.DataSync();
datasync.cancelTaskExecution(params, function (err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Locking the API Version
In order to ensure that the DataSync object uses this specific API, you can
construct the object by passing the apiVersion
option to the constructor:
var datasync = new AWS.DataSync({apiVersion: '2018-11-09'});
You can also set the API version globally in AWS.config.apiVersions
using
the datasync service identifier:
AWS.config.apiVersions = {
datasync: '2018-11-09',
// other service API versions
};
var datasync = new AWS.DataSync();
Version:
-
2018-11-09
Constructor Summary
-
new AWS.DataSync(options = {}) ⇒ Object
constructor
Constructs a service object.
Property Summary
-
endpoint ⇒ AWS.Endpoint
readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summary
-
cancelTaskExecution(params = {}, callback) ⇒ AWS.Request
Cancels execution of a task.
-
createAgent(params = {}, callback) ⇒ AWS.Request
Activates an AWS DataSync agent that you have deployed on your host.
-
createLocationEfs(params = {}, callback) ⇒ AWS.Request
Creates an endpoint for an Amazon EFS file system.
-
createLocationNfs(params = {}, callback) ⇒ AWS.Request
Creates an endpoint for a Network File System (NFS) file system.
-
createLocationS3(params = {}, callback) ⇒ AWS.Request
Creates an endpoint for an Amazon S3 bucket.
-
createTask(params = {}, callback) ⇒ AWS.Request
Creates a task.
-
deleteAgent(params = {}, callback) ⇒ AWS.Request
Deletes an agent.
-
deleteLocation(params = {}, callback) ⇒ AWS.Request
Deletes the configuration of a location used by AWS DataSync.
-
deleteTask(params = {}, callback) ⇒ AWS.Request
Deletes a task.
-
describeAgent(params = {}, callback) ⇒ AWS.Request
Returns metadata such as the name, the network interfaces, and the status (that is, whether the agent is running or not) for an agent.
-
describeLocationEfs(params = {}, callback) ⇒ AWS.Request
Returns metadata, such as the path information about an Amazon EFS location.
-
describeLocationNfs(params = {}, callback) ⇒ AWS.Request
Returns metadata, such as the path information, about a NFS location.
-
describeLocationS3(params = {}, callback) ⇒ AWS.Request
Returns metadata, such as bucket name, about an Amazon S3 bucket location.
-
describeTask(params = {}, callback) ⇒ AWS.Request
Returns metadata about a task.
-
describeTaskExecution(params = {}, callback) ⇒ AWS.Request
Returns detailed metadata about a task that is being executed.
-
listAgents(params = {}, callback) ⇒ AWS.Request
Returns a list of agents owned by an AWS account in the AWS Region specified in the request.
-
listLocations(params = {}, callback) ⇒ AWS.Request
Returns a lists of source and destination locations.
-
listTagsForResource(params = {}, callback) ⇒ AWS.Request
Returns all the tags associated with a specified resources.
-
listTaskExecutions(params = {}, callback) ⇒ AWS.Request
Returns a list of executed tasks.
-
listTasks(params = {}, callback) ⇒ AWS.Request
Returns a list of all the tasks.
-
startTaskExecution(params = {}, callback) ⇒ AWS.Request
Starts a specific invocation of a task.
-
tagResource(params = {}, callback) ⇒ AWS.Request
Applies a key-value pair to an AWS resource.
-
untagResource(params = {}, callback) ⇒ AWS.Request
Removes a tag from an AWS resource.
-
updateAgent(params = {}, callback) ⇒ AWS.Request
Updates the name of an agent.
-
updateTask(params = {}, callback) ⇒ AWS.Request
Updates the metadata associated with a task.
Methods inherited from AWS.Service
makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService
Constructor Details
new AWS.DataSync(options = {}) ⇒ Object
Constructs a service object. This object has one method for each API operation.
Examples:
Constructing a DataSync object
var datasync = new AWS.DataSync({apiVersion: '2018-11-09'});
Options Hash (options):
-
params
(map)
—
An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.
-
endpoint
(String)
—
The endpoint URI to send requests to. The default endpoint is built from the configured
region
. The endpoint should be a string like'https://{service}.{region}.amazonaws.com'
. -
accessKeyId
(String)
—
your AWS access key ID.
-
secretAccessKey
(String)
—
your AWS secret access key.
-
sessionToken
(AWS.Credentials)
—
the optional AWS session token to sign requests with.
-
credentials
(AWS.Credentials)
—
the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.
-
credentialProvider
(AWS.CredentialProviderChain)
—
the provider chain used to resolve credentials if no static
credentials
property is set. -
region
(String)
—
the region to send service requests to. See AWS.DataSync.region for more information.
-
maxRetries
(Integer)
—
the maximum amount of retries to attempt with a request. See AWS.DataSync.maxRetries for more information.
-
maxRedirects
(Integer)
—
the maximum amount of redirects to follow with a request. See AWS.DataSync.maxRedirects for more information.
-
sslEnabled
(Boolean)
—
whether to enable SSL for requests.
-
paramValidation
(Boolean|map)
—
whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:
- min [Boolean] — Validates that a value meets the min
constraint. This is enabled by default when paramValidation is set
to
true
. - max [Boolean] — Validates that a value meets the max constraint.
- pattern [Boolean] — Validates that a string value matches a regular expression.
- enum [Boolean] — Validates that a string value matches one of the allowable enum values.
- min [Boolean] — Validates that a value meets the min
constraint. This is enabled by default when paramValidation is set
to
-
computeChecksums
(Boolean)
—
whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)
-
convertResponseTypes
(Boolean)
—
whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to
true
. -
correctClockSkew
(Boolean)
—
whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to
false
. -
s3ForcePathStyle
(Boolean)
—
whether to force path style URLs for S3 objects.
-
s3BucketEndpoint
(Boolean)
—
whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an
endpoint
to be provided explicitly to the service constructor. -
s3DisableBodySigning
(Boolean)
—
whether S3 body signing should be disabled when using signature version
v4
. Body signing can only be disabled when using https. Defaults totrue
. -
retryDelayOptions
(map)
—
A set of options to configure the retry delay on retryable errors. Currently supported options are:
- base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
- customBackoff [function] — A custom function that accepts a retry count
and returns the amount of time to delay in milliseconds. The
base
option will be ignored if this option is supplied.
-
httpOptions
(map)
—
A set of options to pass to the low-level HTTP request. Currently supported options are:
- proxy [String] — the URL to proxy requests through
- agent [http.Agent, https.Agent] — the Agent object to perform
HTTP requests with. Used for connection pooling. Defaults to the global
agent (
http.globalAgent
) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment. - connectTimeout [Integer] — Sets the socket to timeout after
failing to establish a connection with the server after
connectTimeout
milliseconds. This timeout has no effect once a socket connection has been established. - timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
- xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
- xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
-
apiVersion
(String, Date)
—
a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by
apiVersions
). Specify 'latest' to use the latest possible version. -
apiVersions
(map<String, String|Date>)
—
a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.
-
logger
(#write, #log)
—
an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests
-
systemClockOffset
(Number)
—
an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global
AWS.config
object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds. -
signatureVersion
(String)
—
the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.
-
signatureCache
(Boolean)
—
whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to
true
. -
dynamoDbCrc32
(Boolean)
—
whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default:
true
. -
useAccelerateEndpoint
(Boolean)
—
Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default:
false
. -
clientSideMonitoring
(Boolean)
—
whether to collect and publish this client's performance metrics of all its API requests.
-
endpointDiscoveryEnabled
(Boolean)
—
whether to enable endpoint discovery for operations that allow optionally using an endpoint returned by the service. Defaults to 'false'
-
endpointCacheSize
(Number)
—
the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000
-
hostPrefixEnabled
(Boolean)
—
whether to marshal request parameters to the prefix of hostname. Defaults to
true
.
Property Details
Method Details
cancelTaskExecution(params = {}, callback) ⇒ AWS.Request
Cancels execution of a task.
When you cancel a task execution, the transfer of some files are abruptly interrupted. The contents of files that are transferred to the destination might be incomplete or inconsistent with the source files. However, if you start a new task execution on the same task and you allow the task execution to complete, file content on the destination is complete and consistent. This applies to other unexpected failures that interrupt a task execution. In all of these cases, AWS DataSync successfully complete the transfer when you start the next task execution.
Service Reference:
Examples:
Calling the cancelTaskExecution operation
var params = {
TaskExecutionArn: 'STRING_VALUE' /* required */
};
datasync.cancelTaskExecution(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
TaskExecutionArn
— (String
)The Amazon Resource Name (ARN) of the task execution to cancel.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
createAgent(params = {}, callback) ⇒ AWS.Request
Activates an AWS DataSync agent that you have deployed on your host. The activation process associates your agent with your account. In the activation process, you specify information such as the AWS Region that you want to activate the agent in. You activate the agent in the AWS Region where your target locations (in Amazon S3 or Amazon EFS) reside. Your tasks are created in this AWS Region.
You can use an agent for more than one location. If a task uses multiple agents, all of them need to have status AVAILABLE for the task to run. If you use multiple agents for a source location, the status of all the agents must be AVAILABLE for the task to run. For more information, see Activating a Sync Agent in the AWS DataSync User Guide.
Agents are automatically updated by AWS on a regular basis, using a mechanism that ensures minimal interruption to your tasks.
Service Reference:
Examples:
Calling the createAgent operation
var params = {
ActivationKey: 'STRING_VALUE', /* required */
AgentName: 'STRING_VALUE',
Tags: [
{
Key: 'STRING_VALUE',
Value: 'STRING_VALUE'
},
/* more items */
]
};
datasync.createAgent(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ActivationKey
— (String
)Your agent activation key. You can get the activation key either by sending an HTTP GET request with redirects that enable you to get the agent IP address (port 80). Alternatively, you can get it from the AWS DataSync console.
The redirect URL returned in the response provides you the activation key for your agent in the query string parameter
activationKey
. It might also include other activation-related parameters; however, these are merely defaults. The arguments you pass to this API call determine the actual configuration of your agent. For more information, see Activating a Sync Agent in the AWS DataSync User Guide.AgentName
— (String
)The name you configured for your agent. This value is a text reference that is used to identify the agent in the console.
Tags
— (Array<map>
)The key-value pair that represents the tag you want to associate with the agent. The value can be an empty string. This value helps you manage, filter, and search for your agents.
Note: Valid characters for key and value are letters, spaces, and numbers representable in UTF-8 format, and the following special characters: + - = . _ : / @.Key
— (String
)The key for an AWS resource tag.
Value
— (String
)The value for an AWS resource tag.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AgentArn
— (String
)The Amazon Resource Name (ARN) of the agent. Use the
ListAgents
operation to return a list of agents for your account and AWS Region.
-
(AWS.Response)
—
Returns:
createLocationEfs(params = {}, callback) ⇒ AWS.Request
Creates an endpoint for an Amazon EFS file system.
Service Reference:
Examples:
Calling the createLocationEfs operation
var params = {
Ec2Config: { /* required */
SecurityGroupArns: [ /* required */
'STRING_VALUE',
/* more items */
],
SubnetArn: 'STRING_VALUE' /* required */
},
EfsFilesystemArn: 'STRING_VALUE', /* required */
Subdirectory: 'STRING_VALUE', /* required */
Tags: [
{
Key: 'STRING_VALUE',
Value: 'STRING_VALUE'
},
/* more items */
]
};
datasync.createLocationEfs(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
Subdirectory
— (String
)A subdirectory in the location’s path. This subdirectory in the EFS file system is used to read data from the EFS source location or write data to the EFS destination. By default, AWS DataSync uses the root directory.
EfsFilesystemArn
— (String
)The Amazon Resource Name (ARN) for the Amazon EFS file system.
Ec2Config
— (map
)The subnet and security group that the Amazon EFS file system uses.
SubnetArn
— required — (String
)The ARN of the subnet that the Amazon EC2 resource belongs in.
SecurityGroupArns
— required — (Array<String>
)The Amazon Resource Names (ARNs) of the security groups that are configured for the Amazon EC2 resource.
Tags
— (Array<map>
)The key-value pair that represents a tag that you want to add to the resource. The value can be an empty string. This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for your location.
Key
— (String
)The key for an AWS resource tag.
Value
— (String
)The value for an AWS resource tag.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:LocationArn
— (String
)The Amazon Resource Name (ARN) of the Amazon EFS file system location that is created.
-
(AWS.Response)
—
Returns:
createLocationNfs(params = {}, callback) ⇒ AWS.Request
Creates an endpoint for a Network File System (NFS) file system.
Service Reference:
Examples:
Calling the createLocationNfs operation
var params = {
OnPremConfig: { /* required */
AgentArns: [ /* required */
'STRING_VALUE',
/* more items */
]
},
ServerHostname: 'STRING_VALUE', /* required */
Subdirectory: 'STRING_VALUE', /* required */
Tags: [
{
Key: 'STRING_VALUE',
Value: 'STRING_VALUE'
},
/* more items */
]
};
datasync.createLocationNfs(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
Subdirectory
— (String
)The subdirectory in the NFS file system that is used to read data from the NFS source location or write data to the NFS destination. The NFS path should be a path that's exported by the NFS server, or a subdirectory of that path. The path should be such that it can be mounted by other NFS clients in your network.
To see all the paths exported by your NFS server. run "
showmount -e nfs-server-name
" from an NFS client that has access to your server. You can specify any directory that appears in the results, and any subdirectory of that directory. Ensure that the NFS export is accessible without Kerberos authentication.To transfer all the data in the folder you specified, DataSync needs to have permissions to read all the data. To ensure this, either configure the NFS export with
no_root_squash,
or ensure that the permissions for all of the files that you want sync allow read access for all users. Doing either enables the agent to read the files. For the agent to access directories, you must additionally enable all execute access. For information about NFS export configuration, see 18.7. The /etc/exports Configuration File in the Centos documentation.ServerHostname
— (String
)The name of the NFS server. This value is the IP address or Domain Name Service (DNS) name of the NFS server. An agent that is installed on-premises uses this host name to mount the NFS server in a network.
Note: This name must either be DNS-compliant or must be an IP version 4 (IPv4) address.OnPremConfig
— (map
)Contains a list of Amazon Resource Names (ARNs) of agents that are used to connect to an NFS server.
AgentArns
— required — (Array<String>
)ARNs)of the agents to use for an NFS location.
Tags
— (Array<map>
)The key-value pair that represents the tag that you want to add to the location. The value can be an empty string. We recommend using tags to name your resources.
Key
— (String
)The key for an AWS resource tag.
Value
— (String
)The value for an AWS resource tag.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:LocationArn
— (String
)The Amazon Resource Name (ARN) of the source NFS file system location that is created.
-
(AWS.Response)
—
Returns:
createLocationS3(params = {}, callback) ⇒ AWS.Request
Creates an endpoint for an Amazon S3 bucket.
For AWS DataSync to access a destination S3 bucket, it needs an AWS Identity and Access Management (IAM) role that has the required permissions. You can set up the required permissions by creating an IAM policy that grants the required permissions and attaching the policy to the role. An example of such a policy is shown in the examples section. For more information, see Configuring Amazon S3 Location Settings in the AWS DataSync User Guide.
Service Reference:
Examples:
Calling the createLocationS3 operation
var params = {
S3BucketArn: 'STRING_VALUE', /* required */
S3Config: { /* required */
BucketAccessRoleArn: 'STRING_VALUE' /* required */
},
Subdirectory: 'STRING_VALUE', /* required */
Tags: [
{
Key: 'STRING_VALUE',
Value: 'STRING_VALUE'
},
/* more items */
]
};
datasync.createLocationS3(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
Subdirectory
— (String
)A subdirectory in the Amazon S3 bucket. This subdirectory in Amazon S3 is used to read data from the S3 source location or write data to the S3 destination.
S3BucketArn
— (String
)The Amazon Resource Name (ARN) of the Amazon S3 bucket.
S3Config
— (map
)The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that is used to access an Amazon S3 bucket. For detailed information about using such a role, see Components and Terminology in the AWS DataSync User Guide.
BucketAccessRoleArn
— required — (String
)The Amazon S3 bucket to access. This bucket is used as a parameter in the CreateLocationS3 operation.
Tags
— (Array<map>
)The key-value pair that represents the tag that you want to add to the location. The value can be an empty string. We recommend using tags to name your resources.
Key
— (String
)The key for an AWS resource tag.
Value
— (String
)The value for an AWS resource tag.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:LocationArn
— (String
)The Amazon Resource Name (ARN) of the source Amazon S3 bucket location that is created.
-
(AWS.Response)
—
Returns:
createTask(params = {}, callback) ⇒ AWS.Request
Creates a task. A task is a set of two locations (source and destination) and a set of default OverrideOptions
that you use to control the behavior of a task. If you don't specify default values for Options
when you create a task, AWS DataSync populates them with safe service defaults.
When you initially create a task, it enters the INITIALIZING status and then the CREATING status. In CREATING status, AWS DataSync attempts to mount the source Network File System (NFS) location. The task transitions to the AVAILABLE status without waiting for the destination location to mount. Instead, AWS DataSync mounts a destination before every task execution and then unmounts it after every task execution.
If an agent that is associated with a source (NFS) location goes offline, the task transitions to the UNAVAILABLE status. If the status of the task remains in the CREATING status for more than a few minutes, it means that your agent might be having trouble mounting the source NFS file system. Check the task's ErrorCode
and ErrorDetail
. Mount issues are often caused by either a misconfigured firewall or a mistyped NFS server host name.
Service Reference:
Examples:
Calling the createTask operation
var params = {
DestinationLocationArn: 'STRING_VALUE', /* required */
SourceLocationArn: 'STRING_VALUE', /* required */
CloudWatchLogGroupArn: 'STRING_VALUE',
Name: 'STRING_VALUE',
Options: {
Atime: NONE | BEST_EFFORT,
BytesPerSecond: 'NUMBER_VALUE',
Gid: NONE | INT_VALUE | NAME | BOTH,
Mtime: NONE | PRESERVE,
PosixPermissions: NONE | BEST_EFFORT | PRESERVE,
PreserveDeletedFiles: PRESERVE | REMOVE,
PreserveDevices: NONE | PRESERVE,
Uid: NONE | INT_VALUE | NAME | BOTH,
VerifyMode: POINT_IN_TIME_CONSISTENT | NONE
},
Tags: [
{
Key: 'STRING_VALUE',
Value: 'STRING_VALUE'
},
/* more items */
]
};
datasync.createTask(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
SourceLocationArn
— (String
)The Amazon Resource Name (ARN) of the source location for the task.
DestinationLocationArn
— (String
)The Amazon Resource Name (ARN) of an AWS storage resource's location.
CloudWatchLogGroupArn
— (String
)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 on these groups, see Working with Log Groups and Log Streams in the Amazon CloudWatch User Guide.
For more information about how to useCloudWatchLogs with DataSync, see Monitoring Your Task.
Name
— (String
)The name of a task. This value is a text reference that is used to identify the task in the console.
Options
— (map
)The set of configuration options that control the behavior of a single execution of the task that occurs when you call
StartTaskExecution
. 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 a the task execution. For more information, see the operation.VerifyMode
— (String
)A value that determines whether a data integrity verification should be performed at the end of a task execution after all data and metadata have been transferred.
Default value: POINT_IN_TIME_CONSISTENT.
POINT_IN_TIME_CONSISTENT: Perform verification (recommended).
NONE: Skip verification.
Possible values include:"POINT_IN_TIME_CONSISTENT"
"NONE"
Atime
— (String
)A file metadata value that shows the last time a file was accessed (that is, when the file was read or written to). If you set
Atime
to BEST_EFFORT, DataSync attempts to preserve the originalAtime
attribute on all source files (that is, the version before the PREPARING phase). However,Atime
's behavior is not fully standard across platforms, so AWS DataSync can only do this on a best-effort basis.Default value: BEST_EFFORT.
BEST_EFFORT: Attempt to preserve the per-file
Atime
value (recommended).NONE: Ignore
Atime
.Note: IfPossible values include:Atime
is set to BEST_EFFORT,Mtime
must be set to PRESERVE. IfAtime
is set to NONE,Mtime
must also be NONE."NONE"
"BEST_EFFORT"
Mtime
— (String
)A value that indicates the last time that a file was modified (that is, a file was written to) before the PREPARING phase.
Default value: PRESERVE.
PRESERVE: Preserve original
Mtime
(recommended)NONE: Ignore
Mtime
.Note: IfPossible values include:Mtime
is set to PRESERVE,Atime
must be set to BEST_EFFORT. IfMtime
is set to NONE,Atime
must also be set to NONE."NONE"
"PRESERVE"
Uid
— (String
)The user ID (UID) of the file's owner.
Default value: INT_VALUE. This preserves the integer value of the ID.
INT_VALUE: Preserve the integer value of UID and group ID (GID) (recommended).
NONE: Ignore UID and GID.
Possible values include:"NONE"
"INT_VALUE"
"NAME"
"BOTH"
Gid
— (String
)The group ID (GID) of the file's owners.
Default value: INT_VALUE. This preserves the integer value of the ID.
INT_VALUE: Preserve the integer value of user ID (UID) and GID (recommended).
NONE: Ignore UID and GID.
Possible values include:"NONE"
"INT_VALUE"
"NAME"
"BOTH"
PreserveDeletedFiles
— (String
)A value that specifies whether files in the destination that don't exist in the source file system should be preserved.
Default value: PRESERVE.
PRESERVE: Ignore such destination files (recommended).
REMOVE: Delete destination files that aren’t present in the source.
Possible values include:"PRESERVE"
"REMOVE"
PreserveDevices
— (String
)A value that determines whether AWS DataSync should preserve the metadata of block and character devices in the source file system, and recreate the files with that device name and metadata on the destination.
Note: AWS DataSync can't sync the actual contents of such devices, because they are nonterminal and don't return an end-of-file (EOF) marker.Default value: NONE.
NONE: Ignore special devices (recommended).
PRESERVE: Preserve character and block device metadata. This option isn't currently supported for Amazon EFS.
Possible values include:"NONE"
"PRESERVE"
PosixPermissions
— (String
)A value that determines which users or groups can access a file for a specific purpose such as reading, writing, or execution of the file.
Default value: PRESERVE.
PRESERVE: Preserve POSIX-style permissions (recommended).
NONE: Ignore permissions.
Note: AWS DataSync can preserve extant permissions of a source location.Possible values include:"NONE"
"BEST_EFFORT"
"PRESERVE"
BytesPerSecond
— (Integer
)A value that limits the bandwidth used by AWS DataSync. For example, if you want AWS DataSync to use a maximum of 1 MB, set this value to
1048576
(=1024*1024
).
Tags
— (Array<map>
)The key-value pair that represents the tag that you want to add to the resource. The value can be an empty string.
Key
— (String
)The key for an AWS resource tag.
Value
— (String
)The value for an AWS resource tag.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:TaskArn
— (String
)The Amazon Resource Name (ARN) of the task.
-
(AWS.Response)
—
Returns:
deleteAgent(params = {}, callback) ⇒ AWS.Request
Deletes an agent. To specify which agent to delete, use the Amazon Resource Name (ARN) of the agent in your request. The operation disassociates the agent from your AWS account. However, it doesn't delete the agent virtual machine (VM) from your on-premises environment.
Service Reference:
Examples:
Calling the deleteAgent operation
var params = {
AgentArn: 'STRING_VALUE' /* required */
};
datasync.deleteAgent(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AgentArn
— (String
)The Amazon Resource Name (ARN) of the agent to delete. Use the
ListAgents
operation to return a list of agents for your account and AWS Region.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
deleteLocation(params = {}, callback) ⇒ AWS.Request
Deletes the configuration of a location used by AWS DataSync.
Service Reference:
Examples:
Calling the deleteLocation operation
var params = {
LocationArn: 'STRING_VALUE' /* required */
};
datasync.deleteLocation(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
LocationArn
— (String
)The Amazon Resource Name (ARN) of the location to delete.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
deleteTask(params = {}, callback) ⇒ AWS.Request
Deletes a task.
Service Reference:
Examples:
Calling the deleteTask operation
var params = {
TaskArn: 'STRING_VALUE' /* required */
};
datasync.deleteTask(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
TaskArn
— (String
)The Amazon Resource Name (ARN) of the task to delete.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
describeAgent(params = {}, callback) ⇒ AWS.Request
Returns metadata such as the name, the network interfaces, and the status (that is, whether the agent is running or not) for an agent. To specify which agent to describe, use the Amazon Resource Name (ARN) of the agent in your request.
Service Reference:
Examples:
Calling the describeAgent operation
var params = {
AgentArn: 'STRING_VALUE' /* required */
};
datasync.describeAgent(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AgentArn
— (String
)The Amazon Resource Name (ARN) of the agent to describe.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:AgentArn
— (String
)The Amazon Resource Name (ARN) of the agent.
Name
— (String
)The name of the agent.
Status
— (String
)The status of the agent. If the status is ONLINE, then the agent is configured properly and is available to use. The Running status is the normal running status for an agent. If the status is OFFLINE, the agent's VM is turned off or the agent is in an unhealthy state. When the issue that caused the unhealthy state is resolved, the agent returns to ONLINE status.
Possible values include:"ONLINE"
"OFFLINE"
LastConnectionTime
— (Date
)The time that the agent was last connected.
CreationTime
— (Date
)The time that the agent was activated (that is, created in your account).
-
(AWS.Response)
—
Returns:
describeLocationEfs(params = {}, callback) ⇒ AWS.Request
Returns metadata, such as the path information about an Amazon EFS location.
Service Reference:
Examples:
Calling the describeLocationEfs operation
var params = {
LocationArn: 'STRING_VALUE' /* required */
};
datasync.describeLocationEfs(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
LocationArn
— (String
)The Amazon Resource Name (ARN) of the EFS location to describe.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:LocationArn
— (String
)The Amazon resource Name (ARN) of the EFS location that was described.
LocationUri
— (String
)The URL of the EFS location that was described.
Ec2Config
— (map
)The subnet and the security group that the target Amazon EFS file system uses. The subnet must have at least one mount target for that file system. The security group that you provide needs to be able to communicate with the security group on the mount target in the subnet specified.
The exact relationship between security group M (of the mount target) and security group S (which you provide for DataSync to use at this stage) is as follows:
-
Security group M (which you associate with the mount target) must allow inbound access for the Transmission Control Protocol (TCP) on the NFS port (2049) from security group S. You can enable inbound connections either by IP address (CIDR range) or security group.
-
Security group S (provided to DataSync to access EFS) should have a rule that enables outbound connections to the NFS port on one of the file system’s mount targets. You can enable outbound connections either by IP address (CIDR range) or security group. For information about security groups and mount targets, see Security Groups for Amazon EC2 Instances and Mount Targets in the Amazon EFS User Guide.
SubnetArn
— required — (String
)The ARN of the subnet that the Amazon EC2 resource belongs in.
SecurityGroupArns
— required — (Array<String>
)The Amazon Resource Names (ARNs) of the security groups that are configured for the Amazon EC2 resource.
-
CreationTime
— (Date
)The time that the EFS location was created.
-
(AWS.Response)
—
Returns:
describeLocationNfs(params = {}, callback) ⇒ AWS.Request
Returns metadata, such as the path information, about a NFS location.
Service Reference:
Examples:
Calling the describeLocationNfs operation
var params = {
LocationArn: 'STRING_VALUE' /* required */
};
datasync.describeLocationNfs(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
LocationArn
— (String
)The Amazon resource Name (ARN) of the NFS location to describe.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:LocationArn
— (String
)The Amazon resource Name (ARN) of the NFS location that was described.
LocationUri
— (String
)The URL of the source NFS location that was described.
OnPremConfig
— (map
)A list of Amazon Resource Names (ARNs) of agents to use for a Network File System (NFS) location.
AgentArns
— required — (Array<String>
)ARNs)of the agents to use for an NFS location.
CreationTime
— (Date
)The time that the NFS location was created.
-
(AWS.Response)
—
Returns:
describeLocationS3(params = {}, callback) ⇒ AWS.Request
Returns metadata, such as bucket name, about an Amazon S3 bucket location.
Service Reference:
Examples:
Calling the describeLocationS3 operation
var params = {
LocationArn: 'STRING_VALUE' /* required */
};
datasync.describeLocationS3(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
LocationArn
— (String
)The Amazon Resource Name (ARN) of the Amazon S3 bucket location to describe.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:LocationArn
— (String
)The Amazon Resource Name (ARN) of the Amazon S3 bucket location.
LocationUri
— (String
)The URL of the Amazon S3 location that was described.
S3Config
— (map
)The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that is used to access an Amazon S3 bucket. For detailed information about using such a role, see Components and Terminology in the AWS DataSync User Guide.
BucketAccessRoleArn
— required — (String
)The Amazon S3 bucket to access. This bucket is used as a parameter in the CreateLocationS3 operation.
CreationTime
— (Date
)The time that the Amazon S3 bucket location was created.
-
(AWS.Response)
—
Returns:
describeTask(params = {}, callback) ⇒ AWS.Request
Returns metadata about a task.
Service Reference:
Examples:
Calling the describeTask operation
var params = {
TaskArn: 'STRING_VALUE' /* required */
};
datasync.describeTask(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
TaskArn
— (String
)The Amazon Resource Name (ARN) of the task to describe.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:TaskArn
— (String
)The Amazon Resource Name (ARN) of the task that was described.
Status
— (String
)The status of the task that was described. For detailed information about sync statuses, see Understanding Sync Task Statuses.
Possible values include:"AVAILABLE"
"CREATING"
"RUNNING"
"UNAVAILABLE"
Name
— (String
)The name of the task that was described.
CurrentTaskExecutionArn
— (String
)The Amazon Resource Name (ARN) of the task execution that is syncing files.
SourceLocationArn
— (String
)The Amazon Resource Name (ARN) of the source file system's location.
DestinationLocationArn
— (String
)The Amazon Resource Name (ARN) of the AWS storage resource's location.
CloudWatchLogGroupArn
— (String
)The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that was used to monitor and log events in the task. For more information on these groups, see Working with Log Groups and Log Streams in the Amazon CloudWatch User Guide.
Options
— (map
)The set of configuration options that control the behavior of a single execution of the task that occurs when you call
StartTaskExecution
. You can configure these options to preserve metadata such as user ID (UID) and group (GID), file permissions, data integrity verification, and so on.For each individual task execution, you can override these options by specifying the overriding
OverrideOptions
value to operation.VerifyMode
— (String
)A value that determines whether a data integrity verification should be performed at the end of a task execution after all data and metadata have been transferred.
Default value: POINT_IN_TIME_CONSISTENT.
POINT_IN_TIME_CONSISTENT: Perform verification (recommended).
NONE: Skip verification.
Possible values include:"POINT_IN_TIME_CONSISTENT"
"NONE"
Atime
— (String
)A file metadata value that shows the last time a file was accessed (that is, when the file was read or written to). If you set
Atime
to BEST_EFFORT, DataSync attempts to preserve the originalAtime
attribute on all source files (that is, the version before the PREPARING phase). However,Atime
's behavior is not fully standard across platforms, so AWS DataSync can only do this on a best-effort basis.Default value: BEST_EFFORT.
BEST_EFFORT: Attempt to preserve the per-file
Atime
value (recommended).NONE: Ignore
Atime
.Note: IfPossible values include:Atime
is set to BEST_EFFORT,Mtime
must be set to PRESERVE. IfAtime
is set to NONE,Mtime
must also be NONE."NONE"
"BEST_EFFORT"
Mtime
— (String
)A value that indicates the last time that a file was modified (that is, a file was written to) before the PREPARING phase.
Default value: PRESERVE.
PRESERVE: Preserve original
Mtime
(recommended)NONE: Ignore
Mtime
.Note: IfPossible values include:Mtime
is set to PRESERVE,Atime
must be set to BEST_EFFORT. IfMtime
is set to NONE,Atime
must also be set to NONE."NONE"
"PRESERVE"
Uid
— (String
)The user ID (UID) of the file's owner.
Default value: INT_VALUE. This preserves the integer value of the ID.
INT_VALUE: Preserve the integer value of UID and group ID (GID) (recommended).
NONE: Ignore UID and GID.
Possible values include:"NONE"
"INT_VALUE"
"NAME"
"BOTH"
Gid
— (String
)The group ID (GID) of the file's owners.
Default value: INT_VALUE. This preserves the integer value of the ID.
INT_VALUE: Preserve the integer value of user ID (UID) and GID (recommended).
NONE: Ignore UID and GID.
Possible values include:"NONE"
"INT_VALUE"
"NAME"
"BOTH"
PreserveDeletedFiles
— (String
)A value that specifies whether files in the destination that don't exist in the source file system should be preserved.
Default value: PRESERVE.
PRESERVE: Ignore such destination files (recommended).
REMOVE: Delete destination files that aren’t present in the source.
Possible values include:"PRESERVE"
"REMOVE"
PreserveDevices
— (String
)A value that determines whether AWS DataSync should preserve the metadata of block and character devices in the source file system, and recreate the files with that device name and metadata on the destination.
Note: AWS DataSync can't sync the actual contents of such devices, because they are nonterminal and don't return an end-of-file (EOF) marker.Default value: NONE.
NONE: Ignore special devices (recommended).
PRESERVE: Preserve character and block device metadata. This option isn't currently supported for Amazon EFS.
Possible values include:"NONE"
"PRESERVE"
PosixPermissions
— (String
)A value that determines which users or groups can access a file for a specific purpose such as reading, writing, or execution of the file.
Default value: PRESERVE.
PRESERVE: Preserve POSIX-style permissions (recommended).
NONE: Ignore permissions.
Note: AWS DataSync can preserve extant permissions of a source location.Possible values include:"NONE"
"BEST_EFFORT"
"PRESERVE"
BytesPerSecond
— (Integer
)A value that limits the bandwidth used by AWS DataSync. For example, if you want AWS DataSync to use a maximum of 1 MB, set this value to
1048576
(=1024*1024
).
ErrorCode
— (String
)Errors that AWS DataSync encountered during execution of the task. You can use this error code to help troubleshoot issues.
ErrorDetail
— (String
)Detailed description of an error that was encountered during the task execution. You can use this information to help troubleshoot issues.
CreationTime
— (Date
)The time that the task was created.
-
(AWS.Response)
—
Returns:
describeTaskExecution(params = {}, callback) ⇒ AWS.Request
Returns detailed metadata about a task that is being executed.
Service Reference:
Examples:
Calling the describeTaskExecution operation
var params = {
TaskExecutionArn: 'STRING_VALUE' /* required */
};
datasync.describeTaskExecution(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
TaskExecutionArn
— (String
)The Amazon Resource Name (ARN) of the task that is being executed.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:TaskExecutionArn
— (String
)The Amazon Resource Name (ARN) of the task execution that was described.
TaskExecutionArn
is hierarchical and includesTaskArn
for the task that was executed.For example, a
TaskExecution
value with the ARNarn:aws:sync:us-east-1:209870788375:task/task-0208075f79cedf4a2/execution/exec-08ef1e88ec491019b
executed the task with the ARNarn:aws:sync:us-east-1:209870788375:task/task-0208075f79cedf4a2
.Status
— (String
)The status of the task. For detailed information about sync statuses, see Understanding Sync Task Statuses.
Possible values include:"LAUNCHING"
"PREPARING"
"TRANSFERRING"
"VERIFYING"
"SUCCESS"
"ERROR"
Options
— (map
)Represents the options that are available to control the behavior of a StartTaskExecution operation. Behavior includes preserving metadata such as user ID (UID), group ID (GID), and file permissions, and also overwriting files in the destination, data integrity verification, and so on.
A task has a set of default options associated with it. If you don't specify an option in StartTaskExecution, the default value is used. You can override the defaults options on each task execution by specifying an overriding
Options
value to StartTaskExecution.VerifyMode
— (String
)A value that determines whether a data integrity verification should be performed at the end of a task execution after all data and metadata have been transferred.
Default value: POINT_IN_TIME_CONSISTENT.
POINT_IN_TIME_CONSISTENT: Perform verification (recommended).
NONE: Skip verification.
Possible values include:"POINT_IN_TIME_CONSISTENT"
"NONE"
Atime
— (String
)A file metadata value that shows the last time a file was accessed (that is, when the file was read or written to). If you set
Atime
to BEST_EFFORT, DataSync attempts to preserve the originalAtime
attribute on all source files (that is, the version before the PREPARING phase). However,Atime
's behavior is not fully standard across platforms, so AWS DataSync can only do this on a best-effort basis.Default value: BEST_EFFORT.
BEST_EFFORT: Attempt to preserve the per-file
Atime
value (recommended).NONE: Ignore
Atime
.Note: IfPossible values include:Atime
is set to BEST_EFFORT,Mtime
must be set to PRESERVE. IfAtime
is set to NONE,Mtime
must also be NONE."NONE"
"BEST_EFFORT"
Mtime
— (String
)A value that indicates the last time that a file was modified (that is, a file was written to) before the PREPARING phase.
Default value: PRESERVE.
PRESERVE: Preserve original
Mtime
(recommended)NONE: Ignore
Mtime
.Note: IfPossible values include:Mtime
is set to PRESERVE,Atime
must be set to BEST_EFFORT. IfMtime
is set to NONE,Atime
must also be set to NONE."NONE"
"PRESERVE"
Uid
— (String
)The user ID (UID) of the file's owner.
Default value: INT_VALUE. This preserves the integer value of the ID.
INT_VALUE: Preserve the integer value of UID and group ID (GID) (recommended).
NONE: Ignore UID and GID.
Possible values include:"NONE"
"INT_VALUE"
"NAME"
"BOTH"
Gid
— (String
)The group ID (GID) of the file's owners.
Default value: INT_VALUE. This preserves the integer value of the ID.
INT_VALUE: Preserve the integer value of user ID (UID) and GID (recommended).
NONE: Ignore UID and GID.
Possible values include:"NONE"
"INT_VALUE"
"NAME"
"BOTH"
PreserveDeletedFiles
— (String
)A value that specifies whether files in the destination that don't exist in the source file system should be preserved.
Default value: PRESERVE.
PRESERVE: Ignore such destination files (recommended).
REMOVE: Delete destination files that aren’t present in the source.
Possible values include:"PRESERVE"
"REMOVE"
PreserveDevices
— (String
)A value that determines whether AWS DataSync should preserve the metadata of block and character devices in the source file system, and recreate the files with that device name and metadata on the destination.
Note: AWS DataSync can't sync the actual contents of such devices, because they are nonterminal and don't return an end-of-file (EOF) marker.Default value: NONE.
NONE: Ignore special devices (recommended).
PRESERVE: Preserve character and block device metadata. This option isn't currently supported for Amazon EFS.
Possible values include:"NONE"
"PRESERVE"
PosixPermissions
— (String
)A value that determines which users or groups can access a file for a specific purpose such as reading, writing, or execution of the file.
Default value: PRESERVE.
PRESERVE: Preserve POSIX-style permissions (recommended).
NONE: Ignore permissions.
Note: AWS DataSync can preserve extant permissions of a source location.Possible values include:"NONE"
"BEST_EFFORT"
"PRESERVE"
BytesPerSecond
— (Integer
)A value that limits the bandwidth used by AWS DataSync. For example, if you want AWS DataSync to use a maximum of 1 MB, set this value to
1048576
(=1024*1024
).
StartTime
— (Date
)The time that the task execution was started.
EstimatedFilesToTransfer
— (Integer
)The expected number of files that is to be transferred over the network. This value is calculated during the PREPARING phase, before the TRANSFERRING phase. This value is the expected number of files to be transferred. It's calculated based on comparing the content of the source and destination locations and finding the delta that needs to be transferred.
EstimatedBytesToTransfer
— (Integer
)The estimated physical number of bytes that is to be transferred over the network.
FilesTransferred
— (Integer
)The actual number of files that was transferred over the network. This value is calculated and updated on an ongoing basis during the TRANSFERRING phase. It's updated periodically when each file is read from the source and sent over the network.
If failures occur during a transfer, this value can be less than
EstimatedFilesToTransfer
. This value can also be greater thanEstimatedFilesTransferred
in some cases. This element is implementation-specific for some location types, so don't use it as an indicator for a correct file number or to monitor your task execution.BytesWritten
— (Integer
)The number of logical bytes written to the destination AWS storage resource.
BytesTransferred
— (Integer
)The physical number of bytes transferred over the network.
Result
— (map
)The result of the task execution.
PrepareDuration
— (Integer
)The total time in milliseconds that AWS DataSync spent in the PREPARING phase.
PrepareStatus
— (String
)The status of the PREPARING phase.
Possible values include:"PENDING"
"SUCCESS"
"ERROR"
TransferDuration
— (Integer
)The total time in milliseconds that AWS DataSync spent in the TRANSFERRING phase.
TransferStatus
— (String
)The status of the TRANSFERRING Phase.
Possible values include:"PENDING"
"SUCCESS"
"ERROR"
VerifyDuration
— (Integer
)The total time in milliseconds that AWS DataSync spent in the VERIFYING phase.
VerifyStatus
— (String
)The status of the VERIFYING Phase.
Possible values include:"PENDING"
"SUCCESS"
"ERROR"
ErrorCode
— (String
)Errors that AWS DataSync encountered during execution of the task. You can use this error code to help troubleshoot issues.
ErrorDetail
— (String
)Detailed description of an error that was encountered during the task execution. You can use this information to help troubleshoot issues.
-
(AWS.Response)
—
Returns:
listAgents(params = {}, callback) ⇒ AWS.Request
Returns a list of agents owned by an AWS account in the AWS Region specified in the request. The returned list is ordered by agent Amazon Resource Name (ARN).
By default, this operation returns a maximum of 100 agents. This operation supports pagination that enables you to optionally reduce the number of agents returned in a response.
If you have more agents than are returned in a response (that is, the response returns only a truncated list of your agents), the response contains a marker that you can specify in your next request to fetch the next page of agents.
Service Reference:
Examples:
Calling the listAgents operation
var params = {
MaxResults: 'NUMBER_VALUE',
NextToken: 'STRING_VALUE'
};
datasync.listAgents(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
MaxResults
— (Integer
)The maximum number of agents to list.
NextToken
— (String
)An opaque string that indicates the position at which to begin the next list of agents.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Agents
— (Array<map>
)A list of agents in your account.
AgentArn
— (String
)The Amazon Resource Name (ARN) of the agent.
Name
— (String
)The name of the agent.
Status
— (String
)The status of the agent.
Possible values include:"ONLINE"
"OFFLINE"
NextToken
— (String
)An opaque string that indicates the position at which to begin returning the next list of agents.
-
(AWS.Response)
—
Returns:
listLocations(params = {}, callback) ⇒ AWS.Request
Returns a lists of source and destination locations.
If you have more locations than are returned in a response (that is, the response returns only a truncated list of your agents), the response contains a token that you can specify in your next request to fetch the next page of locations.
Service Reference:
Examples:
Calling the listLocations operation
var params = {
MaxResults: 'NUMBER_VALUE',
NextToken: 'STRING_VALUE'
};
datasync.listLocations(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
MaxResults
— (Integer
)The maximum number of locations to return.
NextToken
— (String
)An opaque string that indicates the position at which to begin the next list of locations.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Locations
— (Array<map>
)An array that contains a list of locations.
LocationArn
— (String
)The Amazon Resource Name (ARN) of the location. For Network File System (NFS) or Amazon EFS, the location is the export path. For Amazon S3, the location is the prefix path that you want to mount and use as the root of the location.
LocationUri
— (String
)Represents a list of URLs of a location.
LocationUri
returns an array that contains a list of locations when the ListLocations operation is called.Format:
TYPE://GLOBAL_ID/SUBDIR
.TYPE designates the type of location. Valid values: NFS | EFS | S3.
GLOBAL_ID is the globally unique identifier of the resource that backs the location. An example for EFS is
us-east-2.fs-abcd1234
. An example for Amazon S3 is the bucket name, such asmyBucket
. An example for NFS is a valid IPv4 address or a host name compliant with Domain Name Service (DNS).SUBDIR is a valid file system path, delimited by forward slashes as is the *nix convention. For NFS and Amazon EFS, it's the export path to mount the location. For Amazon S3, it's the prefix path that you mount to and treat as the root of the location.
NextToken
— (String
)An opaque string that indicates the position at which to begin returning the next list of locations.
-
(AWS.Response)
—
Returns:
listTagsForResource(params = {}, callback) ⇒ AWS.Request
Returns all the tags associated with a specified resources.
Service Reference:
Examples:
Calling the listTagsForResource operation
var params = {
ResourceArn: 'STRING_VALUE', /* required */
MaxResults: 'NUMBER_VALUE',
NextToken: 'STRING_VALUE'
};
datasync.listTagsForResource(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ResourceArn
— (String
)The Amazon Resource Name (ARN) of the resource whose tags to list.
MaxResults
— (Integer
)The maximum number of locations to return.
NextToken
— (String
)An opaque string that indicates the position at which to begin the next list of locations.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Tags
— (Array<map>
)Array of resource tags.
Key
— (String
)The key for an AWS resource tag.
Value
— (String
)The value for an AWS resource tag.
NextToken
— (String
)An opaque string that indicates the position at which to begin returning the next list of resource tags.
-
(AWS.Response)
—
Returns:
listTaskExecutions(params = {}, callback) ⇒ AWS.Request
Returns a list of executed tasks.
Service Reference:
Examples:
Calling the listTaskExecutions operation
var params = {
MaxResults: 'NUMBER_VALUE',
NextToken: 'STRING_VALUE',
TaskArn: 'STRING_VALUE'
};
datasync.listTaskExecutions(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
TaskArn
— (String
)The Amazon Resource Name (ARN) of the task whose tasks you want to list.
MaxResults
— (Integer
)The maximum number of executed tasks to list.
NextToken
— (String
)An opaque string that indicates the position at which to begin the next list of the executed tasks.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:TaskExecutions
— (Array<map>
)A list of executed tasks.
TaskExecutionArn
— (String
)The Amazon Resource Name (ARN) of the task that was executed.
Status
— (String
)The status of a task execution.
Possible values include:"LAUNCHING"
"PREPARING"
"TRANSFERRING"
"VERIFYING"
"SUCCESS"
"ERROR"
NextToken
— (String
)An opaque string that indicates the position at which to begin returning the next list of executed tasks.
-
(AWS.Response)
—
Returns:
listTasks(params = {}, callback) ⇒ AWS.Request
Returns a list of all the tasks.
Service Reference:
Examples:
Calling the listTasks operation
var params = {
MaxResults: 'NUMBER_VALUE',
NextToken: 'STRING_VALUE'
};
datasync.listTasks(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
MaxResults
— (Integer
)The maximum number of tasks to return.
NextToken
— (String
)An opaque string that indicates the position at which to begin the next list of tasks.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:Tasks
— (Array<map>
)A list of all the tasks that are returned.
TaskArn
— (String
)The Amazon Resource Name (ARN) of the task.
Status
— (String
)The status of the task.
Possible values include:"AVAILABLE"
"CREATING"
"RUNNING"
"UNAVAILABLE"
Name
— (String
)The name of the task.
NextToken
— (String
)An opaque string that indicates the position at which to begin returning the next list of tasks.
-
(AWS.Response)
—
Returns:
startTaskExecution(params = {}, callback) ⇒ AWS.Request
Starts a specific invocation of a task. A TaskExecution
value represents an individual run of a task. Each task can have at most one TaskExecution
at a time.
TaskExecution
has the following transition phases: INITIALIZING | PREPARING | TRANSFERRING | VERIFYING | SUCCESS/FAILURE.
For detailed information, see Task Execution in Components and Terminology in the AWS DataSync User Guide.
Service Reference:
Examples:
Calling the startTaskExecution operation
var params = {
TaskArn: 'STRING_VALUE', /* required */
OverrideOptions: {
Atime: NONE | BEST_EFFORT,
BytesPerSecond: 'NUMBER_VALUE',
Gid: NONE | INT_VALUE | NAME | BOTH,
Mtime: NONE | PRESERVE,
PosixPermissions: NONE | BEST_EFFORT | PRESERVE,
PreserveDeletedFiles: PRESERVE | REMOVE,
PreserveDevices: NONE | PRESERVE,
Uid: NONE | INT_VALUE | NAME | BOTH,
VerifyMode: POINT_IN_TIME_CONSISTENT | NONE
}
};
datasync.startTaskExecution(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
TaskArn
— (String
)The Amazon Resource Name (ARN) of the task to start.
OverrideOptions
— (map
)Represents the options that are available to control the behavior of a StartTaskExecution operation. Behavior includes preserving metadata such as user ID (UID), group ID (GID), and file permissions, and also overwriting files in the destination, data integrity verification, and so on.
A task has a set of default options associated with it. If you don't specify an option in StartTaskExecution, the default value is used. You can override the defaults options on each task execution by specifying an overriding
Options
value to StartTaskExecution.VerifyMode
— (String
)A value that determines whether a data integrity verification should be performed at the end of a task execution after all data and metadata have been transferred.
Default value: POINT_IN_TIME_CONSISTENT.
POINT_IN_TIME_CONSISTENT: Perform verification (recommended).
NONE: Skip verification.
Possible values include:"POINT_IN_TIME_CONSISTENT"
"NONE"
Atime
— (String
)A file metadata value that shows the last time a file was accessed (that is, when the file was read or written to). If you set
Atime
to BEST_EFFORT, DataSync attempts to preserve the originalAtime
attribute on all source files (that is, the version before the PREPARING phase). However,Atime
's behavior is not fully standard across platforms, so AWS DataSync can only do this on a best-effort basis.Default value: BEST_EFFORT.
BEST_EFFORT: Attempt to preserve the per-file
Atime
value (recommended).NONE: Ignore
Atime
.Note: IfPossible values include:Atime
is set to BEST_EFFORT,Mtime
must be set to PRESERVE. IfAtime
is set to NONE,Mtime
must also be NONE."NONE"
"BEST_EFFORT"
Mtime
— (String
)A value that indicates the last time that a file was modified (that is, a file was written to) before the PREPARING phase.
Default value: PRESERVE.
PRESERVE: Preserve original
Mtime
(recommended)NONE: Ignore
Mtime
.Note: IfPossible values include:Mtime
is set to PRESERVE,Atime
must be set to BEST_EFFORT. IfMtime
is set to NONE,Atime
must also be set to NONE."NONE"
"PRESERVE"
Uid
— (String
)The user ID (UID) of the file's owner.
Default value: INT_VALUE. This preserves the integer value of the ID.
INT_VALUE: Preserve the integer value of UID and group ID (GID) (recommended).
NONE: Ignore UID and GID.
Possible values include:"NONE"
"INT_VALUE"
"NAME"
"BOTH"
Gid
— (String
)The group ID (GID) of the file's owners.
Default value: INT_VALUE. This preserves the integer value of the ID.
INT_VALUE: Preserve the integer value of user ID (UID) and GID (recommended).
NONE: Ignore UID and GID.
Possible values include:"NONE"
"INT_VALUE"
"NAME"
"BOTH"
PreserveDeletedFiles
— (String
)A value that specifies whether files in the destination that don't exist in the source file system should be preserved.
Default value: PRESERVE.
PRESERVE: Ignore such destination files (recommended).
REMOVE: Delete destination files that aren’t present in the source.
Possible values include:"PRESERVE"
"REMOVE"
PreserveDevices
— (String
)A value that determines whether AWS DataSync should preserve the metadata of block and character devices in the source file system, and recreate the files with that device name and metadata on the destination.
Note: AWS DataSync can't sync the actual contents of such devices, because they are nonterminal and don't return an end-of-file (EOF) marker.Default value: NONE.
NONE: Ignore special devices (recommended).
PRESERVE: Preserve character and block device metadata. This option isn't currently supported for Amazon EFS.
Possible values include:"NONE"
"PRESERVE"
PosixPermissions
— (String
)A value that determines which users or groups can access a file for a specific purpose such as reading, writing, or execution of the file.
Default value: PRESERVE.
PRESERVE: Preserve POSIX-style permissions (recommended).
NONE: Ignore permissions.
Note: AWS DataSync can preserve extant permissions of a source location.Possible values include:"NONE"
"BEST_EFFORT"
"PRESERVE"
BytesPerSecond
— (Integer
)A value that limits the bandwidth used by AWS DataSync. For example, if you want AWS DataSync to use a maximum of 1 MB, set this value to
1048576
(=1024*1024
).
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs. Thedata
object has the following properties:TaskExecutionArn
— (String
)The Amazon Resource Name (ARN) of the specific task execution that was started.
-
(AWS.Response)
—
Returns:
tagResource(params = {}, callback) ⇒ AWS.Request
Applies a key-value pair to an AWS resource.
Service Reference:
Examples:
Calling the tagResource operation
var params = {
ResourceArn: 'STRING_VALUE', /* required */
Tags: [ /* required */
{
Key: 'STRING_VALUE',
Value: 'STRING_VALUE'
},
/* more items */
]
};
datasync.tagResource(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ResourceArn
— (String
)The Amazon Resource Name (ARN) of the resource to apply the tag to.
Tags
— (Array<map>
)The tags to apply.
Key
— (String
)The key for an AWS resource tag.
Value
— (String
)The value for an AWS resource tag.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
untagResource(params = {}, callback) ⇒ AWS.Request
Removes a tag from an AWS resource.
Service Reference:
Examples:
Calling the untagResource operation
var params = {
Keys: [ /* required */
'STRING_VALUE',
/* more items */
],
ResourceArn: 'STRING_VALUE' /* required */
};
datasync.untagResource(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
ResourceArn
— (String
)The Amazon Resource Name (ARN) of the resource to remove the tag from.
Keys
— (Array<String>
)The keys in the key-value pair in the tag to remove.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
updateAgent(params = {}, callback) ⇒ AWS.Request
Updates the name of an agent.
Service Reference:
Examples:
Calling the updateAgent operation
var params = {
AgentArn: 'STRING_VALUE', /* required */
Name: 'STRING_VALUE'
};
datasync.updateAgent(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
AgentArn
— (String
)The Amazon Resource Name (ARN) of the agent to update.
Name
— (String
)The name that you want to use to configure the agent.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns:
updateTask(params = {}, callback) ⇒ AWS.Request
Updates the metadata associated with a task.
Service Reference:
Examples:
Calling the updateTask operation
var params = {
TaskArn: 'STRING_VALUE', /* required */
Name: 'STRING_VALUE',
Options: {
Atime: NONE | BEST_EFFORT,
BytesPerSecond: 'NUMBER_VALUE',
Gid: NONE | INT_VALUE | NAME | BOTH,
Mtime: NONE | PRESERVE,
PosixPermissions: NONE | BEST_EFFORT | PRESERVE,
PreserveDeletedFiles: PRESERVE | REMOVE,
PreserveDevices: NONE | PRESERVE,
Uid: NONE | INT_VALUE | NAME | BOTH,
VerifyMode: POINT_IN_TIME_CONSISTENT | NONE
}
};
datasync.updateTask(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
Parameters:
-
params
(Object)
(defaults to: {})
—
TaskArn
— (String
)The Amazon Resource Name (ARN) of the resource name of the task to update.
Options
— (map
)Represents the options that are available to control the behavior of a StartTaskExecution operation. Behavior includes preserving metadata such as user ID (UID), group ID (GID), and file permissions, and also overwriting files in the destination, data integrity verification, and so on.
A task has a set of default options associated with it. If you don't specify an option in StartTaskExecution, the default value is used. You can override the defaults options on each task execution by specifying an overriding
Options
value to StartTaskExecution.VerifyMode
— (String
)A value that determines whether a data integrity verification should be performed at the end of a task execution after all data and metadata have been transferred.
Default value: POINT_IN_TIME_CONSISTENT.
POINT_IN_TIME_CONSISTENT: Perform verification (recommended).
NONE: Skip verification.
Possible values include:"POINT_IN_TIME_CONSISTENT"
"NONE"
Atime
— (String
)A file metadata value that shows the last time a file was accessed (that is, when the file was read or written to). If you set
Atime
to BEST_EFFORT, DataSync attempts to preserve the originalAtime
attribute on all source files (that is, the version before the PREPARING phase). However,Atime
's behavior is not fully standard across platforms, so AWS DataSync can only do this on a best-effort basis.Default value: BEST_EFFORT.
BEST_EFFORT: Attempt to preserve the per-file
Atime
value (recommended).NONE: Ignore
Atime
.Note: IfPossible values include:Atime
is set to BEST_EFFORT,Mtime
must be set to PRESERVE. IfAtime
is set to NONE,Mtime
must also be NONE."NONE"
"BEST_EFFORT"
Mtime
— (String
)A value that indicates the last time that a file was modified (that is, a file was written to) before the PREPARING phase.
Default value: PRESERVE.
PRESERVE: Preserve original
Mtime
(recommended)NONE: Ignore
Mtime
.Note: IfPossible values include:Mtime
is set to PRESERVE,Atime
must be set to BEST_EFFORT. IfMtime
is set to NONE,Atime
must also be set to NONE."NONE"
"PRESERVE"
Uid
— (String
)The user ID (UID) of the file's owner.
Default value: INT_VALUE. This preserves the integer value of the ID.
INT_VALUE: Preserve the integer value of UID and group ID (GID) (recommended).
NONE: Ignore UID and GID.
Possible values include:"NONE"
"INT_VALUE"
"NAME"
"BOTH"
Gid
— (String
)The group ID (GID) of the file's owners.
Default value: INT_VALUE. This preserves the integer value of the ID.
INT_VALUE: Preserve the integer value of user ID (UID) and GID (recommended).
NONE: Ignore UID and GID.
Possible values include:"NONE"
"INT_VALUE"
"NAME"
"BOTH"
PreserveDeletedFiles
— (String
)A value that specifies whether files in the destination that don't exist in the source file system should be preserved.
Default value: PRESERVE.
PRESERVE: Ignore such destination files (recommended).
REMOVE: Delete destination files that aren’t present in the source.
Possible values include:"PRESERVE"
"REMOVE"
PreserveDevices
— (String
)A value that determines whether AWS DataSync should preserve the metadata of block and character devices in the source file system, and recreate the files with that device name and metadata on the destination.
Note: AWS DataSync can't sync the actual contents of such devices, because they are nonterminal and don't return an end-of-file (EOF) marker.Default value: NONE.
NONE: Ignore special devices (recommended).
PRESERVE: Preserve character and block device metadata. This option isn't currently supported for Amazon EFS.
Possible values include:"NONE"
"PRESERVE"
PosixPermissions
— (String
)A value that determines which users or groups can access a file for a specific purpose such as reading, writing, or execution of the file.
Default value: PRESERVE.
PRESERVE: Preserve POSIX-style permissions (recommended).
NONE: Ignore permissions.
Note: AWS DataSync can preserve extant permissions of a source location.Possible values include:"NONE"
"BEST_EFFORT"
"PRESERVE"
BytesPerSecond
— (Integer
)A value that limits the bandwidth used by AWS DataSync. For example, if you want AWS DataSync to use a maximum of 1 MB, set this value to
1048576
(=1024*1024
).
Name
— (String
)The name of the task to update.
Callback (callback):
-
function(err, data) { ... }
Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.
Context (this):
-
(AWS.Response)
—
the response object containing error, data properties, and the original request object.
Parameters:
-
err
(Error)
—
the error object returned from the request. Set to
null
if the request is successful. -
data
(Object)
—
the de-serialized data returned from the request. Set to
null
if a request error occurs.
-
(AWS.Response)
—
Returns: