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
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 DataSync contains documentation for a programming interface that you can use to manage 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 collapse
-
new AWS.DataSync(options = {}) ⇒ Object
constructor
Constructs a service object.
Property Summary collapse
-
endpoint ⇒ AWS.Endpoint
readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summary collapse
-
cancelTaskExecution(params = {}, callback) ⇒ AWS.Request
Cancels execution of a task.
-
createAgent(params = {}, callback) ⇒ AWS.Request
Activates an DataSync agent that you have deployed on your host.
-
createLocationEfs(params = {}, callback) ⇒ AWS.Request
Creates an endpoint for an Amazon EFS file system.
.
-
createLocationFsxWindows(params = {}, callback) ⇒ AWS.Request
Creates an endpoint for an Amazon FSx for Windows File Server file system.
.
-
createLocationHdfs(params = {}, callback) ⇒ AWS.Request
Creates an endpoint for a Hadoop Distributed File System (HDFS).
-
createLocationNfs(params = {}, callback) ⇒ AWS.Request
Defines a file system on a Network File System (NFS) server that can be read from or written to.
.
-
createLocationObjectStorage(params = {}, callback) ⇒ AWS.Request
Creates an endpoint for a self-managed object storage bucket.
-
createLocationS3(params = {}, callback) ⇒ AWS.Request
Creates an endpoint for an Amazon S3 bucket.
For more information, see Create an Amazon S3 location in the DataSync User Guide.
. -
createLocationSmb(params = {}, callback) ⇒ AWS.Request
Defines a file system on a Server Message Block (SMB) server that can be read from or written to.
.
-
createTask(params = {}, callback) ⇒ AWS.Request
Creates a task.
A task includes a source location and a destination location, and a configuration that specifies how data is transferred.
-
deleteAgent(params = {}, callback) ⇒ AWS.Request
Deletes an agent.
-
deleteLocation(params = {}, callback) ⇒ AWS.Request
Deletes the configuration of a location used by 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.
.
-
describeLocationFsxWindows(params = {}, callback) ⇒ AWS.Request
Returns metadata, such as the path information about an Amazon FSx for Windows File Server location.
.
-
describeLocationHdfs(params = {}, callback) ⇒ AWS.Request
Returns metadata, such as the authentication information about the Hadoop Distributed File System (HDFS) location.
-
describeLocationNfs(params = {}, callback) ⇒ AWS.Request
Returns metadata, such as the path information, about an NFS location.
.
-
describeLocationObjectStorage(params = {}, callback) ⇒ AWS.Request
Returns metadata about a self-managed object storage server location.
-
describeLocationS3(params = {}, callback) ⇒ AWS.Request
Returns metadata, such as bucket name, about an Amazon S3 bucket location.
.
-
describeLocationSmb(params = {}, callback) ⇒ AWS.Request
Returns metadata, such as the path and user information about an SMB 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 Amazon Web Services account in the Amazon Web Services Region specified in the request.
-
listLocations(params = {}, callback) ⇒ AWS.Request
Returns a list 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.
. -
listTagsForResource(params = {}, callback) ⇒ AWS.Request
Returns all the tags associated with a specified resource.
-
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 Amazon Web Services resource.
.
-
untagResource(params = {}, callback) ⇒ AWS.Request
Removes a tag from an Amazon Web Services resource.
.
-
updateAgent(params = {}, callback) ⇒ AWS.Request
Updates the name of an agent.
.
-
updateLocationHdfs(params = {}, callback) ⇒ AWS.Request
Updates some parameters of a previously created location for a Hadoop Distributed File System cluster.
.
-
updateLocationNfs(params = {}, callback) ⇒ AWS.Request
Updates some of the parameters of a previously created location for Network File System (NFS) access.
-
updateLocationObjectStorage(params = {}, callback) ⇒ AWS.Request
Updates some of the parameters of a previously created location for self-managed object storage server access.
-
updateLocationSmb(params = {}, callback) ⇒ AWS.Request
Updates some of the parameters of a previously created location for Server Message Block (SMB) file system access.
-
updateTask(params = {}, callback) ⇒ AWS.Request
Updates the metadata associated with a task.
.
-
updateTaskExecution(params = {}, callback) ⇒ AWS.Request
Updates execution of a task.
You can modify bandwidth throttling for a task execution that is running or queued.
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|AWS.Endpoint)
—
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'
or an Endpoint object. -
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
. -
s3UsEast1RegionalEndpoint
('legacy'|'regional')
—
when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to
legacy
-
s3UseArnRegion
(Boolean)
—
whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to
true
-
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 error and returns the amount of time to delay in
milliseconds. If the result is a non-zero negative value, no further
retry attempts will be made. The
base
option will be ignored if this option is supplied. The function is only called for retryable errors.
-
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|undefined)
—
whether to call operations with endpoints given by service dynamically. Setting this
-
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
. -
stsRegionalEndpoints
('legacy'|'regional')
—
whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.
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 is 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, 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 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 Amazon Web Services Region that you want to activate the agent in. You activate the agent in the Amazon Web Services Region where your target locations (in Amazon S3 or Amazon EFS) reside. Your tasks are created in this Amazon Web Services Region.
You can activate the agent in a VPC (virtual private cloud) or provide the agent access to a VPC endpoint so you can run tasks without going over the public internet.
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.
Agents are automatically updated by Amazon Web Services 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',
SecurityGroupArns: [
'STRING_VALUE',
/* more items */
],
SubnetArns: [
'STRING_VALUE',
/* more items */
],
Tags: [
{
Key: 'STRING_VALUE', /* required */
Value: 'STRING_VALUE'
},
/* more items */
],
VpcEndpointId: 'STRING_VALUE'
};
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 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 an Agent in the 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 that 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
— required — (String
)The key for an Amazon Web Services resource tag.
Value
— (String
)The value for an Amazon Web Services resource tag.
VpcEndpointId
— (String
)The ID of the VPC (virtual private cloud) endpoint that the agent has access to. This is the client-side VPC endpoint, also called a PrivateLink. If you don't have a PrivateLink VPC endpoint, see Creating a VPC Endpoint Service Configuration in the Amazon VPC User Guide.
VPC endpoint ID looks like this:
vpce-01234d5aff67890e1
.SubnetArns
— (Array<String>
)The Amazon Resource Names (ARNs) of the subnets in which DataSync will create elastic network interfaces for each data transfer task. The agent that runs a task must be private. When you start a task that is associated with an agent created in a VPC, or one that has access to an IP address in a VPC, then the task is also private. In this case, DataSync creates four network interfaces for each task in your subnet. For a data transfer to work, the agent must be able to route to all these four network interfaces.
SecurityGroupArns
— (Array<String>
)The ARNs of the security groups used to protect your data transfer task subnets. See SecurityGroupArns.
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 Amazon Web Services 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',
Tags: [
{
Key: 'STRING_VALUE', /* required */
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, DataSync uses the root directory.
Note:Subdirectory
must be specified with forward slashes. For example,/path/to/folder
.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. 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 and the security group that DataSync uses to access the target EFS file system.
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
— required — (String
)The key for an Amazon Web Services resource tag.
Value
— (String
)The value for an Amazon Web Services 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:
createLocationFsxWindows(params = {}, callback) ⇒ AWS.Request
Creates an endpoint for an Amazon FSx for Windows File Server file system.
Service Reference:
Examples:
Calling the createLocationFsxWindows operation
var params = {
FsxFilesystemArn: 'STRING_VALUE', /* required */
Password: 'STRING_VALUE', /* required */
SecurityGroupArns: [ /* required */
'STRING_VALUE',
/* more items */
],
User: 'STRING_VALUE', /* required */
Domain: 'STRING_VALUE',
Subdirectory: 'STRING_VALUE',
Tags: [
{
Key: 'STRING_VALUE', /* required */
Value: 'STRING_VALUE'
},
/* more items */
]
};
datasync.createLocationFsxWindows(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 Amazon FSx for Windows File Server file system is used to read data from the Amazon FSx for Windows File Server source location or write data to the FSx for Windows File Server destination.
FsxFilesystemArn
— (String
)The Amazon Resource Name (ARN) for the FSx for Windows File Server file system.
SecurityGroupArns
— (Array<String>
)The Amazon Resource Names (ARNs) of the security groups that are to use to configure the FSx for Windows File Server file system.
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
— required — (String
)The key for an Amazon Web Services resource tag.
Value
— (String
)The value for an Amazon Web Services resource tag.
User
— (String
)The user who has the permissions to access files and folders in the FSx for Windows File Server file system.
For information about choosing a user name that ensures sufficient permissions to files, folders, and metadata, see user.
Domain
— (String
)The name of the Windows domain that the FSx for Windows File Server belongs to.
Password
— (String
)The password of the user who has the permissions to access files and folders in the FSx for Windows File Server file system.
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 FSx for Windows File Server file system location that is created.
-
(AWS.Response)
—
Returns:
createLocationHdfs(params = {}, callback) ⇒ AWS.Request
Creates an endpoint for a Hadoop Distributed File System (HDFS).
Service Reference:
Examples:
Calling the createLocationHdfs operation
var params = {
AgentArns: [ /* required */
'STRING_VALUE',
/* more items */
],
AuthenticationType: SIMPLE | KERBEROS, /* required */
NameNodes: [ /* required */
{
Hostname: 'STRING_VALUE', /* required */
Port: 'NUMBER_VALUE' /* required */
},
/* more items */
],
BlockSize: 'NUMBER_VALUE',
KerberosKeytab: Buffer.from('...') || 'STRING_VALUE' /* Strings will be Base-64 encoded on your behalf */,
KerberosKrb5Conf: Buffer.from('...') || 'STRING_VALUE' /* Strings will be Base-64 encoded on your behalf */,
KerberosPrincipal: 'STRING_VALUE',
KmsKeyProviderUri: 'STRING_VALUE',
QopConfiguration: {
DataTransferProtection: DISABLED | AUTHENTICATION | INTEGRITY | PRIVACY,
RpcProtection: DISABLED | AUTHENTICATION | INTEGRITY | PRIVACY
},
ReplicationFactor: 'NUMBER_VALUE',
SimpleUser: 'STRING_VALUE',
Subdirectory: 'STRING_VALUE',
Tags: [
{
Key: 'STRING_VALUE', /* required */
Value: 'STRING_VALUE'
},
/* more items */
]
};
datasync.createLocationHdfs(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 HDFS cluster. This subdirectory is used to read data from or write data to the HDFS cluster. If the subdirectory isn't specified, it will default to
/
.NameNodes
— (Array<map>
)The NameNode that manages the HDFS namespace. The NameNode performs operations such as opening, closing, and renaming files and directories. The NameNode contains the information to map blocks of data to the DataNodes. You can use only one NameNode.
Hostname
— required — (String
)The hostname of the NameNode in the HDFS cluster. This value is the IP address or Domain Name Service (DNS) name of the NameNode. An agent that's installed on-premises uses this hostname to communicate with the NameNode in the network.
Port
— required — (Integer
)The port that the NameNode uses to listen to client requests.
BlockSize
— (Integer
)The size of data blocks to write into the HDFS cluster. The block size must be a multiple of 512 bytes. The default block size is 128 mebibytes (MiB).
ReplicationFactor
— (Integer
)The number of DataNodes to replicate the data to when writing to the HDFS cluster. By default, data is replicated to three DataNodes.
KmsKeyProviderUri
— (String
)The URI of the HDFS cluster's Key Management Server (KMS).
QopConfiguration
— (map
)The Quality of Protection (QOP) configuration specifies the Remote Procedure Call (RPC) and data transfer protection settings configured on the Hadoop Distributed File System (HDFS) cluster. If
QopConfiguration
isn't specified,RpcProtection
andDataTransferProtection
default toPRIVACY
. If you setRpcProtection
orDataTransferProtection
, the other parameter assumes the same value.RpcProtection
— (String
)The RPC protection setting configured on the HDFS cluster. This setting corresponds to your
Possible values include:hadoop.rpc.protection
setting in yourcore-site.xml
file on your Hadoop cluster."DISABLED"
"AUTHENTICATION"
"INTEGRITY"
"PRIVACY"
DataTransferProtection
— (String
)The data transfer protection setting configured on the HDFS cluster. This setting corresponds to your
Possible values include:dfs.data.transfer.protection
setting in thehdfs-site.xml
file on your Hadoop cluster."DISABLED"
"AUTHENTICATION"
"INTEGRITY"
"PRIVACY"
AuthenticationType
— (String
)The type of authentication used to determine the identity of the user.
Possible values include:"SIMPLE"
"KERBEROS"
SimpleUser
— (String
)The user name used to identify the client on the host operating system.
Note: IfSIMPLE
is specified forAuthenticationType
, this parameter is required.KerberosPrincipal
— (String
)The Kerberos principal with access to the files and folders on the HDFS cluster.
Note: IfKERBEROS
is specified forAuthenticationType
, this parameter is required.KerberosKeytab
— (Buffer, Typed Array, Blob, String
)The Kerberos key table (keytab) that contains mappings between the defined Kerberos principal and the encrypted keys. You can load the keytab from a file by providing the file's address. If you're using the CLI, it performs base64 encoding for you. Otherwise, provide the base64-encoded text.
Note: IfKERBEROS
is specified forAuthenticationType
, this parameter is required.KerberosKrb5Conf
— (Buffer, Typed Array, Blob, String
)The
krb5.conf
file that contains the Kerberos configuration information. You can load thekrb5.conf
file by providing the file's address. If you're using the CLI, it performs the base64 encoding for you. Otherwise, provide the base64-encoded text.Note: IfKERBEROS
is specified forAuthenticationType
, this parameter is required.AgentArns
— (Array<String>
)The Amazon Resource Names (ARNs) of the agents that are used to connect to the HDFS cluster.
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
— required — (String
)The key for an Amazon Web Services resource tag.
Value
— (String
)The value for an Amazon Web Services 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 ARN of the source HDFS cluster location that's created.
-
(AWS.Response)
—
Returns:
createLocationNfs(params = {}, callback) ⇒ AWS.Request
Defines a file system on a Network File System (NFS) server that can be read from or written to.
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 */
MountOptions: {
Version: AUTOMATIC | NFS3 | NFS4_0 | NFS4_1
},
Tags: [
{
Key: 'STRING_VALUE', /* required */
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 DataSync 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.If you are copying data to or from your Snowcone device, see NFS Server on Snowcone for more information.
For information about NFS export configuration, see 18.7. The /etc/exports Configuration File in the Red Hat Enterprise Linux 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.
If you are copying data to or from your Snowcone device, see NFS Server on Snowcone for more information.
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.
If you are copying data to or from your Snowcone device, see NFS Server on Snowcone for more information.
AgentArns
— required — (Array<String>
)ARNs of the agents to use for an NFS location.
MountOptions
— (map
)The NFS mount options that DataSync can use to mount your NFS share.
Version
— (String
)The specific NFS version that you want DataSync to use to mount your NFS share. If the server refuses to use the version specified, the sync will fail. If you don't specify a version, DataSync defaults to
AUTOMATIC
. That is, DataSync automatically selects a version based on negotiation with the NFS server.You can specify the following NFS versions:
-
NFSv3 - stateless protocol version that allows for asynchronous writes on the server.
-
NFSv4.0 - stateful, firewall-friendly protocol version that supports delegations and pseudo file systems.
-
NFSv4.1 - stateful protocol version that supports sessions, directory delegations, and parallel data processing. Version 4.1 also includes all features available in version 4.0.
"AUTOMATIC"
"NFS3"
"NFS4_0"
"NFS4_1"
-
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
— required — (String
)The key for an Amazon Web Services resource tag.
Value
— (String
)The value for an Amazon Web Services 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:
createLocationObjectStorage(params = {}, callback) ⇒ AWS.Request
Creates an endpoint for a self-managed object storage bucket. For more information about self-managed object storage locations, see Creating a location for object storage.
Service Reference:
Examples:
Calling the createLocationObjectStorage operation
var params = {
AgentArns: [ /* required */
'STRING_VALUE',
/* more items */
],
BucketName: 'STRING_VALUE', /* required */
ServerHostname: 'STRING_VALUE', /* required */
AccessKey: 'STRING_VALUE',
SecretKey: 'STRING_VALUE',
ServerPort: 'NUMBER_VALUE',
ServerProtocol: HTTPS | HTTP,
Subdirectory: 'STRING_VALUE',
Tags: [
{
Key: 'STRING_VALUE', /* required */
Value: 'STRING_VALUE'
},
/* more items */
]
};
datasync.createLocationObjectStorage(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: {})
—
ServerHostname
— (String
)The name of the self-managed object storage server. This value is the IP address or Domain Name Service (DNS) name of the object storage server. An agent uses this host name to mount the object storage server in a network.
ServerPort
— (Integer
)The port that your self-managed object storage server accepts inbound network traffic on. The server port is set by default to TCP 80 (HTTP) or TCP 443 (HTTPS). You can specify a custom port if your self-managed object storage server requires one.
ServerProtocol
— (String
)The protocol that the object storage server uses to communicate. Valid values are HTTP or HTTPS.
Possible values include:"HTTPS"
"HTTP"
Subdirectory
— (String
)The subdirectory in the self-managed object storage server that is used to read data from.
BucketName
— (String
)The bucket on the self-managed object storage server that is used to read data from.
AccessKey
— (String
)Optional. The access key is used if credentials are required to access the self-managed object storage server. If your object storage requires a user name and password to authenticate, use
AccessKey
andSecretKey
to provide the user name and password, respectively.SecretKey
— (String
)Optional. The secret key is used if credentials are required to access the self-managed object storage server. If your object storage requires a user name and password to authenticate, use
AccessKey
andSecretKey
to provide the user name and password, respectively.AgentArns
— (Array<String>
)The Amazon Resource Name (ARN) of the agents associated with the self-managed object storage server 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
— required — (String
)The key for an Amazon Web Services resource tag.
Value
— (String
)The value for an Amazon Web Services 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 agents associated with the self-managed object storage server location.
-
(AWS.Response)
—
Returns:
createLocationS3(params = {}, callback) ⇒ AWS.Request
Creates an endpoint for an Amazon S3 bucket.
For more information, see Create an Amazon S3 location in the DataSync User Guide.
Service Reference:
Examples:
Calling the createLocationS3 operation
var params = {
S3BucketArn: 'STRING_VALUE', /* required */
S3Config: { /* required */
BucketAccessRoleArn: 'STRING_VALUE' /* required */
},
AgentArns: [
'STRING_VALUE',
/* more items */
],
S3StorageClass: STANDARD | STANDARD_IA | ONEZONE_IA | INTELLIGENT_TIERING | GLACIER | DEEP_ARCHIVE | OUTPOSTS,
Subdirectory: 'STRING_VALUE',
Tags: [
{
Key: 'STRING_VALUE', /* required */
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 ARN of the Amazon S3 bucket. If the bucket is on an Amazon Web Services Outpost, this must be an access point ARN.
S3StorageClass
— (String
)The Amazon S3 storage class that you want to store your files in when this location is used as a task destination. For buckets in Amazon Web Services Regions, the storage class defaults to Standard. For buckets on Outposts, the storage class defaults to Amazon Web Services S3 Outposts.
For more information about S3 storage classes, see Amazon S3 Storage Classes. Some storage classes have behaviors that can affect your S3 storage cost. For detailed information, see Considerations when working with S3 storage classes in DataSync.
Possible values include:"STANDARD"
"STANDARD_IA"
"ONEZONE_IA"
"INTELLIGENT_TIERING"
"GLACIER"
"DEEP_ARCHIVE"
"OUTPOSTS"
S3Config
— (map
)The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that is used to access an Amazon S3 bucket.
For detailed information about using such a role, see Creating a Location for Amazon S3 in the DataSync User Guide.
BucketAccessRoleArn
— required — (String
)The Amazon S3 bucket to access. This bucket is used as a parameter in the CreateLocationS3 operation.
AgentArns
— (Array<String>
)If you are using DataSync on an Amazon Web Services Outpost, specify the Amazon Resource Names (ARNs) of the DataSync agents deployed on your Outpost. For more information about launching a DataSync agent on an Amazon Web Services Outpost, see Deploy your DataSync agent on Outposts.
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
— required — (String
)The key for an Amazon Web Services resource tag.
Value
— (String
)The value for an Amazon Web Services 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:
createLocationSmb(params = {}, callback) ⇒ AWS.Request
Defines a file system on a Server Message Block (SMB) server that can be read from or written to.
Service Reference:
Examples:
Calling the createLocationSmb operation
var params = {
AgentArns: [ /* required */
'STRING_VALUE',
/* more items */
],
Password: 'STRING_VALUE', /* required */
ServerHostname: 'STRING_VALUE', /* required */
Subdirectory: 'STRING_VALUE', /* required */
User: 'STRING_VALUE', /* required */
Domain: 'STRING_VALUE',
MountOptions: {
Version: AUTOMATIC | SMB2 | SMB3
},
Tags: [
{
Key: 'STRING_VALUE', /* required */
Value: 'STRING_VALUE'
},
/* more items */
]
};
datasync.createLocationSmb(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 SMB file system that is used to read data from the SMB source location or write data to the SMB destination. The SMB path should be a path that's exported by the SMB server, or a subdirectory of that path. The path should be such that it can be mounted by other SMB clients in your network.
Note:Subdirectory
must be specified with forward slashes. For example,/path/to/folder
.To transfer all the data in the folder you specified, DataSync needs to have permissions to mount the SMB share, as well as to access all the data in that share. To ensure this, either ensure that the user/password specified belongs to the user who can mount the share, and who has the appropriate permissions for all of the files and directories that you want DataSync to access, or use credentials of a member of the Backup Operators group to mount the share. Doing either enables the agent to access the data. For the agent to access directories, you must additionally enable all execute access.
ServerHostname
— (String
)The name of the SMB server. This value is the IP address or Domain Name Service (DNS) name of the SMB server. An agent that is installed on-premises uses this hostname to mount the SMB server in a network.
Note: This name must either be DNS-compliant or must be an IP version 4 (IPv4) address.User
— (String
)The user who can mount the share, has the permissions to access files and folders in the SMB share.
For information about choosing a user name that ensures sufficient permissions to files, folders, and metadata, see user.
Domain
— (String
)The name of the Windows domain that the SMB server belongs to.
Password
— (String
)The password of the user who can mount the share, has the permissions to access files and folders in the SMB share.
AgentArns
— (Array<String>
)The Amazon Resource Names (ARNs) of agents to use for a Simple Message Block (SMB) location.
MountOptions
— (map
)The mount options used by DataSync to access the SMB server.
Version
— (String
)The specific SMB version that you want DataSync to use to mount your SMB share. If you don't specify a version, DataSync defaults to
Possible values include:AUTOMATIC
. That is, DataSync automatically selects a version based on negotiation with the SMB server."AUTOMATIC"
"SMB2"
"SMB3"
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
— required — (String
)The key for an Amazon Web Services resource tag.
Value
— (String
)The value for an Amazon Web Services 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 SMB file system location that is created.
-
(AWS.Response)
—
Returns:
createTask(params = {}, callback) ⇒ AWS.Request
Creates a task.
A task includes a source location and a destination location, and a configuration that specifies how data is transferred. A task always transfers data from the source location to the destination location. The configuration specifies options such as task scheduling, bandwidth limits, etc. A task is the complete definition of a data transfer.
When you create a task that transfers data between Amazon Web Services services in different Amazon Web Services Regions, one of the two locations that you specify must reside in the Region where DataSync is being used. The other location must be specified in a different Region.
You can transfer data between commercial Amazon Web Services Regions except for China, or between Amazon Web Services GovCloud (US) Regions.
When you use DataSync to copy files or objects between Amazon Web Services Regions, you pay for data transfer between Regions. This is billed as data transfer OUT from your source Region to your destination Region. For more information, see Data Transfer pricing.
Service Reference:
Examples:
Calling the createTask operation
var params = {
DestinationLocationArn: 'STRING_VALUE', /* required */
SourceLocationArn: 'STRING_VALUE', /* required */
CloudWatchLogGroupArn: 'STRING_VALUE',
Excludes: [
{
FilterType: SIMPLE_PATTERN,
Value: 'STRING_VALUE'
},
/* more items */
],
Includes: [
{
FilterType: SIMPLE_PATTERN,
Value: 'STRING_VALUE'
},
/* more items */
],
Name: 'STRING_VALUE',
Options: {
Atime: NONE | BEST_EFFORT,
BytesPerSecond: 'NUMBER_VALUE',
Gid: NONE | INT_VALUE | NAME | BOTH,
LogLevel: OFF | BASIC | TRANSFER,
Mtime: NONE | PRESERVE,
OverwriteMode: ALWAYS | NEVER,
PosixPermissions: NONE | PRESERVE,
PreserveDeletedFiles: PRESERVE | REMOVE,
PreserveDevices: NONE | PRESERVE,
SecurityDescriptorCopyFlags: NONE | OWNER_DACL | OWNER_DACL_SACL,
TaskQueueing: ENABLED | DISABLED,
TransferMode: CHANGED | ALL,
Uid: NONE | INT_VALUE | NAME | BOTH,
VerifyMode: POINT_IN_TIME_CONSISTENT | ONLY_FILES_TRANSFERRED | NONE
},
Schedule: {
ScheduleExpression: 'STRING_VALUE' /* required */
},
Tags: [
{
Key: 'STRING_VALUE', /* required */
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 Amazon Web Services 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.
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 the task execution. For more information, see the StartTaskExecution 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. For more information, see Configure task settings.
Default value: POINT_IN_TIME_CONSISTENT.
ONLY_FILES_TRANSFERRED (recommended): Perform verification only on files that were transferred.
POINT_IN_TIME_CONSISTENT: Scan the entire source and entire destination at the end of the transfer to verify that source and destination are fully synchronized. This option isn't supported when transferring to S3 Glacier or S3 Glacier Deep Archive storage classes.
NONE: No additional verification is done at the end of the transfer, but all data transmissions are integrity-checked with checksum verification during the transfer.
Possible values include:"POINT_IN_TIME_CONSISTENT"
"ONLY_FILES_TRANSFERRED"
"NONE"
OverwriteMode
— (String
)A value that determines whether files at the destination should be overwritten or preserved when copying files. If set to
NEVER
a destination file will not be replaced by a source file, even if the destination file differs from the source file. If you modify files in the destination and you sync the files, you can use this value to protect against overwriting those changes.Some storage classes have specific behaviors that can affect your S3 storage cost. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User Guide.
Possible values include:"ALWAYS"
"NEVER"
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 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. This option is required for cases when you need to run the same task more than one time.
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 POSIX user ID (UID) of the file's owner. This option should only be set for NFS, EFS, and S3 locations. To learn more about what metadata is copied by DataSync, see Metadata Copied by DataSync.
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 POSIX group ID (GID) of the file's owners. This option should only be set for NFS, EFS, and S3 locations. For more information about what metadata is copied by DataSync, see Metadata Copied by DataSync.
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. This option can affect your storage cost. If your task deletes objects, you might incur minimum storage duration charges for certain storage classes. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User Guide.
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 DataSync should preserve the metadata of block and character devices in the source file system, and re-create the files with that device name and metadata on the destination. DataSync does not copy the contents of such devices, only the name and metadata.
Note: 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. This option should only be set for NFS, EFS, and S3 locations. For more information about what metadata is copied by DataSync, see Metadata Copied by DataSync.
Default value: PRESERVE.
PRESERVE: Preserve POSIX-style permissions (recommended).
NONE: Ignore permissions.
Note: DataSync can preserve extant permissions of a source location.Possible values include:"NONE"
"PRESERVE"
BytesPerSecond
— (Integer
)A value that limits the bandwidth used by DataSync. For example, if you want DataSync to use a maximum of 1 MB, set this value to
1048576
(=1024*1024
).TaskQueueing
— (String
)A value that determines whether tasks should be queued before executing the tasks. If set to
ENABLED
, the tasks will be queued. The default isENABLED
.If you use the same agent to run multiple tasks, you can enable the tasks to run in series. For more information, see Queueing task executions.
Possible values include:"ENABLED"
"DISABLED"
LogLevel
— (String
)A value that determines the type of logs that DataSync publishes to a log stream in the Amazon CloudWatch log group that you provide. For more information about providing a log group for DataSync, see CloudWatchLogGroupArn. If set to
Possible values include:OFF
, no logs are published.BASIC
publishes logs on errors for individual files transferred, andTRANSFER
publishes logs for every file or object that is transferred and integrity checked."OFF"
"BASIC"
"TRANSFER"
TransferMode
— (String
)A value that determines whether DataSync transfers only the data and metadata that differ between the source and the destination location, or whether DataSync transfers all the content from the source, without comparing to the destination location.
CHANGED: DataSync copies only data or metadata that is new or different content from the source location to the destination location.
ALL: DataSync copies all source location content to the destination, without comparing to existing content on the destination.
Possible values include:"CHANGED"
"ALL"
SecurityDescriptorCopyFlags
— (String
)A value that determines which components of the SMB security descriptor are copied from source to destination objects.
This value is only used for transfers between SMB and Amazon FSx for Windows File Server locations, or between two Amazon FSx for Windows File Server locations. For more information about how DataSync handles metadata, see How DataSync Handles Metadata and Special Files.
Default value: OWNER_DACL.
OWNER_DACL: For each copied object, DataSync copies the following metadata:
-
Object owner.
-
NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
When choosing this option, DataSync does NOT copy the NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured object.
OWNER_DACL_SACL: For each copied object, DataSync copies the following metadata:
-
Object owner.
-
NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
-
NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured object.
Copying SACLs requires granting additional permissions to the Windows user that DataSync uses to access your SMB location. For information about choosing a user that ensures sufficient permissions to files, folders, and metadata, see user.
NONE: None of the SMB security descriptor components are copied. Destination objects are owned by the user that was provided for accessing the destination location. DACLs and SACLs are set based on the destination server’s configuration.
Possible values include:"NONE"
"OWNER_DACL"
"OWNER_DACL_SACL"
-
Excludes
— (Array<map>
)A list of filter rules that determines which files to exclude from a task. 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"
.FilterType
— (String
)The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.
Possible values include:"SIMPLE_PATTERN"
Value
— (String
)A single filter string that consists of the patterns to include or exclude. The patterns are delimited by "|" (that is, a pipe), for example:
/folder1|/folder2
Schedule
— (map
)Specifies a schedule used to periodically transfer files from a source to a destination location. The schedule should be specified in UTC time. For more information, see Scheduling your task.
ScheduleExpression
— required — (String
)A cron expression that specifies when DataSync initiates a scheduled transfer from a source to a destination location.
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
— required — (String
)The key for an Amazon Web Services resource tag.
Value
— (String
)The value for an Amazon Web Services resource tag.
Includes
— (Array<map>
)A list of filter rules that determines which files to include when running a task. 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"
.FilterType
— (String
)The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.
Possible values include:"SIMPLE_PATTERN"
Value
— (String
)A single filter string that consists of the patterns to include or exclude. The patterns are delimited by "|" (that is, a pipe), for example:
/folder1|/folder2
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 Amazon Web Services 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 Amazon Web Services 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 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 last connected to DataSync.
CreationTime
— (Date
)The time that the agent was activated (that is, created in your account).
EndpointType
— (String
)The type of endpoint that your agent is connected to. If the endpoint is a VPC endpoint, the agent is not accessible over the public internet.
Possible values include:"PUBLIC"
"PRIVATE_LINK"
"FIPS"
PrivateLinkConfig
— (map
)The subnet and the security group that DataSync used to access a VPC endpoint.
VpcEndpointId
— (String
)The ID of the VPC endpoint that is configured for an agent. An agent that is configured with a VPC endpoint will not be accessible over the public internet.
PrivateLinkEndpoint
— (String
)The private endpoint that is configured for an agent that has access to IP addresses in a PrivateLink. An agent that is configured with this endpoint will not be accessible over the public internet.
SubnetArns
— (Array<String>
)The Amazon Resource Names (ARNs) of the subnets that are configured for an agent activated in a VPC or an agent that has access to a VPC endpoint.
SecurityGroupArns
— (Array<String>
)The Amazon Resource Names (ARNs) of the security groups that are configured for the EC2 resource that hosts an agent activated in a VPC or an agent that has access to a VPC endpoint.
-
(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 DataSync uses to access target EFS file system. 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.
SubnetArn
— required — (String
)The ARN of the subnet and the security group that DataSync uses to access the target EFS file system.
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:
describeLocationFsxWindows(params = {}, callback) ⇒ AWS.Request
Returns metadata, such as the path information about an Amazon FSx for Windows File Server location.
Service Reference:
Examples:
Calling the describeLocationFsxWindows operation
var params = {
LocationArn: 'STRING_VALUE' /* required */
};
datasync.describeLocationFsxWindows(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 FSx for Windows File Server 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 FSx for Windows File Server location that was described.
LocationUri
— (String
)The URL of the FSx for Windows File Server location that was described.
SecurityGroupArns
— (Array<String>
)The Amazon Resource Names (ARNs) of the security groups that are configured for the FSx for Windows File Server file system.
CreationTime
— (Date
)The time that the FSx for Windows File Server location was created.
User
— (String
)The user who has the permissions to access files and folders in the FSx for Windows File Server file system.
Domain
— (String
)The name of the Windows domain that the FSx for Windows File Server belongs to.
-
(AWS.Response)
—
Returns:
describeLocationHdfs(params = {}, callback) ⇒ AWS.Request
Returns metadata, such as the authentication information about the Hadoop Distributed File System (HDFS) location.
Service Reference:
Examples:
Calling the describeLocationHdfs operation
var params = {
LocationArn: 'STRING_VALUE' /* required */
};
datasync.describeLocationHdfs(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 HDFS cluster 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 ARN of the HDFS cluster location.
LocationUri
— (String
)The URI of the HDFS cluster location.
NameNodes
— (Array<map>
)The NameNode that manage the HDFS namespace.
Hostname
— required — (String
)The hostname of the NameNode in the HDFS cluster. This value is the IP address or Domain Name Service (DNS) name of the NameNode. An agent that's installed on-premises uses this hostname to communicate with the NameNode in the network.
Port
— required — (Integer
)The port that the NameNode uses to listen to client requests.
BlockSize
— (Integer
)The size of the data blocks to write into the HDFS cluster.
ReplicationFactor
— (Integer
)The number of DataNodes to replicate the data to when writing to the HDFS cluster.
KmsKeyProviderUri
— (String
)The URI of the HDFS cluster's Key Management Server (KMS).
QopConfiguration
— (map
)The Quality of Protection (QOP) configuration specifies the Remote Procedure Call (RPC) and data transfer protection settings configured on the Hadoop Distributed File System (HDFS) cluster.
RpcProtection
— (String
)The RPC protection setting configured on the HDFS cluster. This setting corresponds to your
Possible values include:hadoop.rpc.protection
setting in yourcore-site.xml
file on your Hadoop cluster."DISABLED"
"AUTHENTICATION"
"INTEGRITY"
"PRIVACY"
DataTransferProtection
— (String
)The data transfer protection setting configured on the HDFS cluster. This setting corresponds to your
Possible values include:dfs.data.transfer.protection
setting in thehdfs-site.xml
file on your Hadoop cluster."DISABLED"
"AUTHENTICATION"
"INTEGRITY"
"PRIVACY"
AuthenticationType
— (String
)The type of authentication used to determine the identity of the user.
Possible values include:"SIMPLE"
"KERBEROS"
SimpleUser
— (String
)The user name used to identify the client on the host operating system. This parameter is used if the
AuthenticationType
is defined asSIMPLE
.KerberosPrincipal
— (String
)The Kerberos principal with access to the files and folders on the HDFS cluster. This parameter is used if the
AuthenticationType
is defined asKERBEROS
.AgentArns
— (Array<String>
)The ARNs of the agents that are used to connect to the HDFS cluster.
CreationTime
— (Date
)The time that the HDFS location was created.
-
(AWS.Response)
—
Returns:
describeLocationNfs(params = {}, callback) ⇒ AWS.Request
Returns metadata, such as the path information, about an 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.
MountOptions
— (map
)The NFS mount options that DataSync used to mount your NFS share.
Version
— (String
)The specific NFS version that you want DataSync to use to mount your NFS share. If the server refuses to use the version specified, the sync will fail. If you don't specify a version, DataSync defaults to
AUTOMATIC
. That is, DataSync automatically selects a version based on negotiation with the NFS server.You can specify the following NFS versions:
-
NFSv3 - stateless protocol version that allows for asynchronous writes on the server.
-
NFSv4.0 - stateful, firewall-friendly protocol version that supports delegations and pseudo file systems.
-
NFSv4.1 - stateful protocol version that supports sessions, directory delegations, and parallel data processing. Version 4.1 also includes all features available in version 4.0.
"AUTOMATIC"
"NFS3"
"NFS4_0"
"NFS4_1"
-
CreationTime
— (Date
)The time that the NFS location was created.
-
(AWS.Response)
—
Returns:
describeLocationObjectStorage(params = {}, callback) ⇒ AWS.Request
Returns metadata about a self-managed object storage server location. For more information about self-managed object storage locations, see Creating a location for object storage.
Service Reference:
Examples:
Calling the describeLocationObjectStorage operation
var params = {
LocationArn: 'STRING_VALUE' /* required */
};
datasync.describeLocationObjectStorage(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 self-managed object storage server location that was described.
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 self-managed object storage server location to describe.
LocationUri
— (String
)The URL of the source self-managed object storage server location that was described.
AccessKey
— (String
)Optional. The access key is used if credentials are required to access the self-managed object storage server. If your object storage requires a user name and password to authenticate, use
AccessKey
andSecretKey
to provide the user name and password, respectively.ServerPort
— (Integer
)The port that your self-managed object storage server accepts inbound network traffic on. The server port is set by default to TCP 80 (HTTP) or TCP 443 (HTTPS).
ServerProtocol
— (String
)The protocol that the object storage server uses to communicate. Valid values are HTTP or HTTPS.
Possible values include:"HTTPS"
"HTTP"
AgentArns
— (Array<String>
)The Amazon Resource Name (ARN) of the agents associated with the self-managed object storage server location.
CreationTime
— (Date
)The time that the self-managed object storage server agent 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 or access point.
LocationUri
— (String
)The URL of the Amazon S3 location that was described.
S3StorageClass
— (String
)The Amazon S3 storage class that you chose to store your files in when this location is used as a task destination. For more information about S3 storage classes, see Amazon S3 Storage Classes. Some storage classes have behaviors that can affect your S3 storage cost. For detailed information, see Considerations when working with S3 storage classes in DataSync.
Possible values include:"STANDARD"
"STANDARD_IA"
"ONEZONE_IA"
"INTELLIGENT_TIERING"
"GLACIER"
"DEEP_ARCHIVE"
"OUTPOSTS"
S3Config
— (map
)The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role that is used to access an Amazon S3 bucket.
For detailed information about using such a role, see Creating a Location for Amazon S3 in the DataSync User Guide.
BucketAccessRoleArn
— required — (String
)The Amazon S3 bucket to access. This bucket is used as a parameter in the CreateLocationS3 operation.
AgentArns
— (Array<String>
)If you are using DataSync on an Amazon Web Services Outpost, the Amazon Resource Name (ARNs) of the EC2 agents deployed on your Outpost. For more information about launching a DataSync agent on an Amazon Web Services Outpost, see Deploy your DataSync agent on Outposts.
CreationTime
— (Date
)The time that the Amazon S3 bucket location was created.
-
(AWS.Response)
—
Returns:
describeLocationSmb(params = {}, callback) ⇒ AWS.Request
Returns metadata, such as the path and user information about an SMB location.
Service Reference:
Examples:
Calling the describeLocationSmb operation
var params = {
LocationArn: 'STRING_VALUE' /* required */
};
datasync.describeLocationSmb(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 SMB 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 SMB location that was described.
LocationUri
— (String
)The URL of the source SMB location that was described.
AgentArns
— (Array<String>
)The Amazon Resource Name (ARN) of the source SMB file system location that is created.
User
— (String
)The user who can mount the share, has the permissions to access files and folders in the SMB share.
Domain
— (String
)The name of the Windows domain that the SMB server belongs to.
MountOptions
— (map
)The mount options that are available for DataSync to use to access an SMB location.
Version
— (String
)The specific SMB version that you want DataSync to use to mount your SMB share. If you don't specify a version, DataSync defaults to
Possible values include:AUTOMATIC
. That is, DataSync automatically selects a version based on negotiation with the SMB server."AUTOMATIC"
"SMB2"
"SMB3"
CreationTime
— (Date
)The time that the SMB 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 task execution statuses, see Understanding Task Statuses in the DataSync User Guide.
Possible values include:"AVAILABLE"
"CREATING"
"QUEUED"
"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 Amazon Web Services 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.
SourceNetworkInterfaceArns
— (Array<String>
)The Amazon Resource Names (ARNs) of the source elastic network interfaces (ENIs) that were created for your subnet.
DestinationNetworkInterfaceArns
— (Array<String>
)The Amazon Resource Names (ARNs) of the destination elastic network interfaces (ENIs) that were created for your subnet.
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 StartTaskExecution 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. For more information, see Configure task settings.
Default value: POINT_IN_TIME_CONSISTENT.
ONLY_FILES_TRANSFERRED (recommended): Perform verification only on files that were transferred.
POINT_IN_TIME_CONSISTENT: Scan the entire source and entire destination at the end of the transfer to verify that source and destination are fully synchronized. This option isn't supported when transferring to S3 Glacier or S3 Glacier Deep Archive storage classes.
NONE: No additional verification is done at the end of the transfer, but all data transmissions are integrity-checked with checksum verification during the transfer.
Possible values include:"POINT_IN_TIME_CONSISTENT"
"ONLY_FILES_TRANSFERRED"
"NONE"
OverwriteMode
— (String
)A value that determines whether files at the destination should be overwritten or preserved when copying files. If set to
NEVER
a destination file will not be replaced by a source file, even if the destination file differs from the source file. If you modify files in the destination and you sync the files, you can use this value to protect against overwriting those changes.Some storage classes have specific behaviors that can affect your S3 storage cost. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User Guide.
Possible values include:"ALWAYS"
"NEVER"
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 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. This option is required for cases when you need to run the same task more than one time.
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 POSIX user ID (UID) of the file's owner. This option should only be set for NFS, EFS, and S3 locations. To learn more about what metadata is copied by DataSync, see Metadata Copied by DataSync.
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 POSIX group ID (GID) of the file's owners. This option should only be set for NFS, EFS, and S3 locations. For more information about what metadata is copied by DataSync, see Metadata Copied by DataSync.
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. This option can affect your storage cost. If your task deletes objects, you might incur minimum storage duration charges for certain storage classes. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User Guide.
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 DataSync should preserve the metadata of block and character devices in the source file system, and re-create the files with that device name and metadata on the destination. DataSync does not copy the contents of such devices, only the name and metadata.
Note: 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. This option should only be set for NFS, EFS, and S3 locations. For more information about what metadata is copied by DataSync, see Metadata Copied by DataSync.
Default value: PRESERVE.
PRESERVE: Preserve POSIX-style permissions (recommended).
NONE: Ignore permissions.
Note: DataSync can preserve extant permissions of a source location.Possible values include:"NONE"
"PRESERVE"
BytesPerSecond
— (Integer
)A value that limits the bandwidth used by DataSync. For example, if you want DataSync to use a maximum of 1 MB, set this value to
1048576
(=1024*1024
).TaskQueueing
— (String
)A value that determines whether tasks should be queued before executing the tasks. If set to
ENABLED
, the tasks will be queued. The default isENABLED
.If you use the same agent to run multiple tasks, you can enable the tasks to run in series. For more information, see Queueing task executions.
Possible values include:"ENABLED"
"DISABLED"
LogLevel
— (String
)A value that determines the type of logs that DataSync publishes to a log stream in the Amazon CloudWatch log group that you provide. For more information about providing a log group for DataSync, see CloudWatchLogGroupArn. If set to
Possible values include:OFF
, no logs are published.BASIC
publishes logs on errors for individual files transferred, andTRANSFER
publishes logs for every file or object that is transferred and integrity checked."OFF"
"BASIC"
"TRANSFER"
TransferMode
— (String
)A value that determines whether DataSync transfers only the data and metadata that differ between the source and the destination location, or whether DataSync transfers all the content from the source, without comparing to the destination location.
CHANGED: DataSync copies only data or metadata that is new or different content from the source location to the destination location.
ALL: DataSync copies all source location content to the destination, without comparing to existing content on the destination.
Possible values include:"CHANGED"
"ALL"
SecurityDescriptorCopyFlags
— (String
)A value that determines which components of the SMB security descriptor are copied from source to destination objects.
This value is only used for transfers between SMB and Amazon FSx for Windows File Server locations, or between two Amazon FSx for Windows File Server locations. For more information about how DataSync handles metadata, see How DataSync Handles Metadata and Special Files.
Default value: OWNER_DACL.
OWNER_DACL: For each copied object, DataSync copies the following metadata:
-
Object owner.
-
NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
When choosing this option, DataSync does NOT copy the NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured object.
OWNER_DACL_SACL: For each copied object, DataSync copies the following metadata:
-
Object owner.
-
NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
-
NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured object.
Copying SACLs requires granting additional permissions to the Windows user that DataSync uses to access your SMB location. For information about choosing a user that ensures sufficient permissions to files, folders, and metadata, see user.
NONE: None of the SMB security descriptor components are copied. Destination objects are owned by the user that was provided for accessing the destination location. DACLs and SACLs are set based on the destination server’s configuration.
Possible values include:"NONE"
"OWNER_DACL"
"OWNER_DACL_SACL"
-
Excludes
— (Array<map>
)A list of filter rules that determines which files to exclude from a task. 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"
.FilterType
— (String
)The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.
Possible values include:"SIMPLE_PATTERN"
Value
— (String
)A single filter string that consists of the patterns to include or exclude. The patterns are delimited by "|" (that is, a pipe), for example:
/folder1|/folder2
Schedule
— (map
)The schedule used to periodically transfer files from a source to a destination location.
ScheduleExpression
— required — (String
)A cron expression that specifies when DataSync initiates a scheduled transfer from a source to a destination location.
ErrorCode
— (String
)Errors that 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.
Includes
— (Array<map>
)A list of filter rules that determines which files to include when running a task. 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
".FilterType
— (String
)The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.
Possible values include:"SIMPLE_PATTERN"
Value
— (String
)A single filter string that consists of the patterns to include or exclude. The patterns are delimited by "|" (that is, a pipe), for example:
/folder1|/folder2
-
(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:datasync:us-east-1:111222333444:task/task-0208075f79cedf4a2/execution/exec-08ef1e88ec491019b
executed the task with the ARNarn:aws:datasync:us-east-1:111222333444:task/task-0208075f79cedf4a2
.Status
— (String
)The status of the task execution.
For detailed information about task execution statuses, see Understanding Task Statuses in the DataSync User Guide.
Possible values include:"QUEUED"
"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. For more information, see Configure task settings.
Default value: POINT_IN_TIME_CONSISTENT.
ONLY_FILES_TRANSFERRED (recommended): Perform verification only on files that were transferred.
POINT_IN_TIME_CONSISTENT: Scan the entire source and entire destination at the end of the transfer to verify that source and destination are fully synchronized. This option isn't supported when transferring to S3 Glacier or S3 Glacier Deep Archive storage classes.
NONE: No additional verification is done at the end of the transfer, but all data transmissions are integrity-checked with checksum verification during the transfer.
Possible values include:"POINT_IN_TIME_CONSISTENT"
"ONLY_FILES_TRANSFERRED"
"NONE"
OverwriteMode
— (String
)A value that determines whether files at the destination should be overwritten or preserved when copying files. If set to
NEVER
a destination file will not be replaced by a source file, even if the destination file differs from the source file. If you modify files in the destination and you sync the files, you can use this value to protect against overwriting those changes.Some storage classes have specific behaviors that can affect your S3 storage cost. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User Guide.
Possible values include:"ALWAYS"
"NEVER"
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 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. This option is required for cases when you need to run the same task more than one time.
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 POSIX user ID (UID) of the file's owner. This option should only be set for NFS, EFS, and S3 locations. To learn more about what metadata is copied by DataSync, see Metadata Copied by DataSync.
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 POSIX group ID (GID) of the file's owners. This option should only be set for NFS, EFS, and S3 locations. For more information about what metadata is copied by DataSync, see Metadata Copied by DataSync.
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. This option can affect your storage cost. If your task deletes objects, you might incur minimum storage duration charges for certain storage classes. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User Guide.
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 DataSync should preserve the metadata of block and character devices in the source file system, and re-create the files with that device name and metadata on the destination. DataSync does not copy the contents of such devices, only the name and metadata.
Note: 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. This option should only be set for NFS, EFS, and S3 locations. For more information about what metadata is copied by DataSync, see Metadata Copied by DataSync.
Default value: PRESERVE.
PRESERVE: Preserve POSIX-style permissions (recommended).
NONE: Ignore permissions.
Note: DataSync can preserve extant permissions of a source location.Possible values include:"NONE"
"PRESERVE"
BytesPerSecond
— (Integer
)A value that limits the bandwidth used by DataSync. For example, if you want DataSync to use a maximum of 1 MB, set this value to
1048576
(=1024*1024
).TaskQueueing
— (String
)A value that determines whether tasks should be queued before executing the tasks. If set to
ENABLED
, the tasks will be queued. The default isENABLED
.If you use the same agent to run multiple tasks, you can enable the tasks to run in series. For more information, see Queueing task executions.
Possible values include:"ENABLED"
"DISABLED"
LogLevel
— (String
)A value that determines the type of logs that DataSync publishes to a log stream in the Amazon CloudWatch log group that you provide. For more information about providing a log group for DataSync, see CloudWatchLogGroupArn. If set to
Possible values include:OFF
, no logs are published.BASIC
publishes logs on errors for individual files transferred, andTRANSFER
publishes logs for every file or object that is transferred and integrity checked."OFF"
"BASIC"
"TRANSFER"
TransferMode
— (String
)A value that determines whether DataSync transfers only the data and metadata that differ between the source and the destination location, or whether DataSync transfers all the content from the source, without comparing to the destination location.
CHANGED: DataSync copies only data or metadata that is new or different content from the source location to the destination location.
ALL: DataSync copies all source location content to the destination, without comparing to existing content on the destination.
Possible values include:"CHANGED"
"ALL"
SecurityDescriptorCopyFlags
— (String
)A value that determines which components of the SMB security descriptor are copied from source to destination objects.
This value is only used for transfers between SMB and Amazon FSx for Windows File Server locations, or between two Amazon FSx for Windows File Server locations. For more information about how DataSync handles metadata, see How DataSync Handles Metadata and Special Files.
Default value: OWNER_DACL.
OWNER_DACL: For each copied object, DataSync copies the following metadata:
-
Object owner.
-
NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
When choosing this option, DataSync does NOT copy the NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured object.
OWNER_DACL_SACL: For each copied object, DataSync copies the following metadata:
-
Object owner.
-
NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
-
NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured object.
Copying SACLs requires granting additional permissions to the Windows user that DataSync uses to access your SMB location. For information about choosing a user that ensures sufficient permissions to files, folders, and metadata, see user.
NONE: None of the SMB security descriptor components are copied. Destination objects are owned by the user that was provided for accessing the destination location. DACLs and SACLs are set based on the destination server’s configuration.
Possible values include:"NONE"
"OWNER_DACL"
"OWNER_DACL_SACL"
-
Excludes
— (Array<map>
)A list of filter rules that determines which files to exclude from a task. 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"
FilterType
— (String
)The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.
Possible values include:"SIMPLE_PATTERN"
Value
— (String
)A single filter string that consists of the patterns to include or exclude. The patterns are delimited by "|" (that is, a pipe), for example:
/folder1|/folder2
Includes
— (Array<map>
)A list of filter rules that determines which files to include when running a task. The list should contain a single filter string that consists of the patterns to include. The patterns are delimited by "|" (that is, a pipe), for example:
"/folder1|/folder2"
FilterType
— (String
)The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.
Possible values include:"SIMPLE_PATTERN"
Value
— (String
)A single filter string that consists of the patterns to include or exclude. The patterns are delimited by "|" (that is, a pipe), for example:
/folder1|/folder2
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 Amazon Web Services 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 DataSync spent in the PREPARING phase.
PrepareStatus
— (String
)The status of the PREPARING phase.
Possible values include:"PENDING"
"SUCCESS"
"ERROR"
TotalDuration
— (Integer
)The total time in milliseconds that DataSync took to transfer the file from the source to the destination location.
TransferDuration
— (Integer
)The total time in milliseconds that 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 DataSync spent in the VERIFYING phase.
VerifyStatus
— (String
)The status of the VERIFYING phase.
Possible values include:"PENDING"
"SUCCESS"
"ERROR"
ErrorCode
— (String
)Errors that 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 Amazon Web Services account in the Amazon Web Services 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 list 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 = {
Filters: [
{
Name: LocationUri | LocationType | CreationTime, /* required */
Operator: Equals | NotEquals | In | LessThanOrEqual | LessThan | GreaterThanOrEqual | GreaterThan | Contains | NotContains | BeginsWith, /* required */
Values: [ /* required */
'STRING_VALUE',
/* more items */
]
},
/* more items */
],
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.
Filters
— (Array<map>
)You can use API filters to narrow down the list of resources returned by
ListLocations
. For example, to retrieve all tasks on a specific source location, you can useListLocations
with filter nameLocationType S3
andOperator Equals
.Name
— required — (String
)The name of the filter being used. Each API call supports a list of filters that are available for it (for example,
Possible values include:LocationType
forListLocations
)."LocationUri"
"LocationType"
"CreationTime"
Values
— required — (Array<String>
)The values that you want to filter for. For example, you might want to display only Amazon S3 locations.
Operator
— required — (String
)The operator that is used to compare filter values (for example,
Possible values include:Equals
orContains
). For more about API filtering operators, see API filters for ListTasks and ListLocations."Equals"
"NotEquals"
"In"
"LessThanOrEqual"
"LessThan"
"GreaterThanOrEqual"
"GreaterThan"
"Contains"
"NotContains"
"BeginsWith"
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 resource.
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
— required — (String
)The key for an Amazon Web Services resource tag.
Value
— (String
)The value for an Amazon Web Services 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:"QUEUED"
"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 = {
Filters: [
{
Name: LocationId | CreationTime, /* required */
Operator: Equals | NotEquals | In | LessThanOrEqual | LessThan | GreaterThanOrEqual | GreaterThan | Contains | NotContains | BeginsWith, /* required */
Values: [ /* required */
'STRING_VALUE',
/* more items */
]
},
/* more items */
],
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.
Filters
— (Array<map>
)You can use API filters to narrow down the list of resources returned by
ListTasks
. For example, to retrieve all tasks on a specific source location, you can useListTasks
with filter nameLocationId
andOperator Equals
with the ARN for the location.Name
— required — (String
)The name of the filter being used. Each API call supports a list of filters that are available for it. For example,
Possible values include:LocationId
forListTasks
."LocationId"
"CreationTime"
Values
— required — (Array<String>
)The values that you want to filter for. For example, you might want to display only tasks for a specific destination location.
Operator
— required — (String
)The operator that is used to compare filter values (for example,
Possible values include:Equals
orContains
). For more about API filtering operators, see API filters for ListTasks and ListLocations."Equals"
"NotEquals"
"In"
"LessThanOrEqual"
"LessThan"
"GreaterThanOrEqual"
"GreaterThan"
"Contains"
"NotContains"
"BeginsWith"
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"
"QUEUED"
"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 the Task Execution section in the Components and Terminology topic in the DataSync User Guide.
Service Reference:
Examples:
Calling the startTaskExecution operation
var params = {
TaskArn: 'STRING_VALUE', /* required */
Excludes: [
{
FilterType: SIMPLE_PATTERN,
Value: 'STRING_VALUE'
},
/* more items */
],
Includes: [
{
FilterType: SIMPLE_PATTERN,
Value: 'STRING_VALUE'
},
/* more items */
],
OverrideOptions: {
Atime: NONE | BEST_EFFORT,
BytesPerSecond: 'NUMBER_VALUE',
Gid: NONE | INT_VALUE | NAME | BOTH,
LogLevel: OFF | BASIC | TRANSFER,
Mtime: NONE | PRESERVE,
OverwriteMode: ALWAYS | NEVER,
PosixPermissions: NONE | PRESERVE,
PreserveDeletedFiles: PRESERVE | REMOVE,
PreserveDevices: NONE | PRESERVE,
SecurityDescriptorCopyFlags: NONE | OWNER_DACL | OWNER_DACL_SACL,
TaskQueueing: ENABLED | DISABLED,
TransferMode: CHANGED | ALL,
Uid: NONE | INT_VALUE | NAME | BOTH,
VerifyMode: POINT_IN_TIME_CONSISTENT | ONLY_FILES_TRANSFERRED | 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. For more information, see Configure task settings.
Default value: POINT_IN_TIME_CONSISTENT.
ONLY_FILES_TRANSFERRED (recommended): Perform verification only on files that were transferred.
POINT_IN_TIME_CONSISTENT: Scan the entire source and entire destination at the end of the transfer to verify that source and destination are fully synchronized. This option isn't supported when transferring to S3 Glacier or S3 Glacier Deep Archive storage classes.
NONE: No additional verification is done at the end of the transfer, but all data transmissions are integrity-checked with checksum verification during the transfer.
Possible values include:"POINT_IN_TIME_CONSISTENT"
"ONLY_FILES_TRANSFERRED"
"NONE"
OverwriteMode
— (String
)A value that determines whether files at the destination should be overwritten or preserved when copying files. If set to
NEVER
a destination file will not be replaced by a source file, even if the destination file differs from the source file. If you modify files in the destination and you sync the files, you can use this value to protect against overwriting those changes.Some storage classes have specific behaviors that can affect your S3 storage cost. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User Guide.
Possible values include:"ALWAYS"
"NEVER"
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 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. This option is required for cases when you need to run the same task more than one time.
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 POSIX user ID (UID) of the file's owner. This option should only be set for NFS, EFS, and S3 locations. To learn more about what metadata is copied by DataSync, see Metadata Copied by DataSync.
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 POSIX group ID (GID) of the file's owners. This option should only be set for NFS, EFS, and S3 locations. For more information about what metadata is copied by DataSync, see Metadata Copied by DataSync.
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. This option can affect your storage cost. If your task deletes objects, you might incur minimum storage duration charges for certain storage classes. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User Guide.
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 DataSync should preserve the metadata of block and character devices in the source file system, and re-create the files with that device name and metadata on the destination. DataSync does not copy the contents of such devices, only the name and metadata.
Note: 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. This option should only be set for NFS, EFS, and S3 locations. For more information about what metadata is copied by DataSync, see Metadata Copied by DataSync.
Default value: PRESERVE.
PRESERVE: Preserve POSIX-style permissions (recommended).
NONE: Ignore permissions.
Note: DataSync can preserve extant permissions of a source location.Possible values include:"NONE"
"PRESERVE"
BytesPerSecond
— (Integer
)A value that limits the bandwidth used by DataSync. For example, if you want DataSync to use a maximum of 1 MB, set this value to
1048576
(=1024*1024
).TaskQueueing
— (String
)A value that determines whether tasks should be queued before executing the tasks. If set to
ENABLED
, the tasks will be queued. The default isENABLED
.If you use the same agent to run multiple tasks, you can enable the tasks to run in series. For more information, see Queueing task executions.
Possible values include:"ENABLED"
"DISABLED"
LogLevel
— (String
)A value that determines the type of logs that DataSync publishes to a log stream in the Amazon CloudWatch log group that you provide. For more information about providing a log group for DataSync, see CloudWatchLogGroupArn. If set to
Possible values include:OFF
, no logs are published.BASIC
publishes logs on errors for individual files transferred, andTRANSFER
publishes logs for every file or object that is transferred and integrity checked."OFF"
"BASIC"
"TRANSFER"
TransferMode
— (String
)A value that determines whether DataSync transfers only the data and metadata that differ between the source and the destination location, or whether DataSync transfers all the content from the source, without comparing to the destination location.
CHANGED: DataSync copies only data or metadata that is new or different content from the source location to the destination location.
ALL: DataSync copies all source location content to the destination, without comparing to existing content on the destination.
Possible values include:"CHANGED"
"ALL"
SecurityDescriptorCopyFlags
— (String
)A value that determines which components of the SMB security descriptor are copied from source to destination objects.
This value is only used for transfers between SMB and Amazon FSx for Windows File Server locations, or between two Amazon FSx for Windows File Server locations. For more information about how DataSync handles metadata, see How DataSync Handles Metadata and Special Files.
Default value: OWNER_DACL.
OWNER_DACL: For each copied object, DataSync copies the following metadata:
-
Object owner.
-
NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
When choosing this option, DataSync does NOT copy the NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured object.
OWNER_DACL_SACL: For each copied object, DataSync copies the following metadata:
-
Object owner.
-
NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
-
NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured object.
Copying SACLs requires granting additional permissions to the Windows user that DataSync uses to access your SMB location. For information about choosing a user that ensures sufficient permissions to files, folders, and metadata, see user.
NONE: None of the SMB security descriptor components are copied. Destination objects are owned by the user that was provided for accessing the destination location. DACLs and SACLs are set based on the destination server’s configuration.
Possible values include:"NONE"
"OWNER_DACL"
"OWNER_DACL_SACL"
-
Includes
— (Array<map>
)A list of filter rules that determines which files to include when running a task. The pattern should contain a single filter string that consists of the patterns to include. The patterns are delimited by "|" (that is, a pipe), for example,
"/folder1|/folder2"
.FilterType
— (String
)The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.
Possible values include:"SIMPLE_PATTERN"
Value
— (String
)A single filter string that consists of the patterns to include or exclude. The patterns are delimited by "|" (that is, a pipe), for example:
/folder1|/folder2
Excludes
— (Array<map>
)A list of filter rules that determines which files to exclude from a task. The list contains a single filter string that consists of the patterns to exclude. The patterns are delimited by "|" (that is, a pipe), for example,
"/folder1|/folder2"
.FilterType
— (String
)The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.
Possible values include:"SIMPLE_PATTERN"
Value
— (String
)A single filter string that consists of the patterns to include or exclude. The patterns are delimited by "|" (that is, a pipe), for example:
/folder1|/folder2
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 Amazon Web Services resource.
Service Reference:
Examples:
Calling the tagResource operation
var params = {
ResourceArn: 'STRING_VALUE', /* required */
Tags: [ /* required */
{
Key: 'STRING_VALUE', /* required */
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
— required — (String
)The key for an Amazon Web Services resource tag.
Value
— (String
)The value for an Amazon Web Services 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 Amazon Web Services 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:
updateLocationHdfs(params = {}, callback) ⇒ AWS.Request
Updates some parameters of a previously created location for a Hadoop Distributed File System cluster.
Service Reference:
Examples:
Calling the updateLocationHdfs operation
var params = {
LocationArn: 'STRING_VALUE', /* required */
AgentArns: [
'STRING_VALUE',
/* more items */
],
AuthenticationType: SIMPLE | KERBEROS,
BlockSize: 'NUMBER_VALUE',
KerberosKeytab: Buffer.from('...') || 'STRING_VALUE' /* Strings will be Base-64 encoded on your behalf */,
KerberosKrb5Conf: Buffer.from('...') || 'STRING_VALUE' /* Strings will be Base-64 encoded on your behalf */,
KerberosPrincipal: 'STRING_VALUE',
KmsKeyProviderUri: 'STRING_VALUE',
NameNodes: [
{
Hostname: 'STRING_VALUE', /* required */
Port: 'NUMBER_VALUE' /* required */
},
/* more items */
],
QopConfiguration: {
DataTransferProtection: DISABLED | AUTHENTICATION | INTEGRITY | PRIVACY,
RpcProtection: DISABLED | AUTHENTICATION | INTEGRITY | PRIVACY
},
ReplicationFactor: 'NUMBER_VALUE',
SimpleUser: 'STRING_VALUE',
Subdirectory: 'STRING_VALUE'
};
datasync.updateLocationHdfs(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 source HDFS cluster location.
Subdirectory
— (String
)A subdirectory in the HDFS cluster. This subdirectory is used to read data from or write data to the HDFS cluster.
NameNodes
— (Array<map>
)The NameNode that manages the HDFS namespace. The NameNode performs operations such as opening, closing, and renaming files and directories. The NameNode contains the information to map blocks of data to the DataNodes. You can use only one NameNode.
Hostname
— required — (String
)The hostname of the NameNode in the HDFS cluster. This value is the IP address or Domain Name Service (DNS) name of the NameNode. An agent that's installed on-premises uses this hostname to communicate with the NameNode in the network.
Port
— required — (Integer
)The port that the NameNode uses to listen to client requests.
BlockSize
— (Integer
)The size of the data blocks to write into the HDFS cluster.
ReplicationFactor
— (Integer
)The number of DataNodes to replicate the data to when writing to the HDFS cluster.
KmsKeyProviderUri
— (String
)The URI of the HDFS cluster's Key Management Server (KMS).
QopConfiguration
— (map
)The Quality of Protection (QOP) configuration specifies the Remote Procedure Call (RPC) and data transfer privacy settings configured on the Hadoop Distributed File System (HDFS) cluster.
RpcProtection
— (String
)The RPC protection setting configured on the HDFS cluster. This setting corresponds to your
Possible values include:hadoop.rpc.protection
setting in yourcore-site.xml
file on your Hadoop cluster."DISABLED"
"AUTHENTICATION"
"INTEGRITY"
"PRIVACY"
DataTransferProtection
— (String
)The data transfer protection setting configured on the HDFS cluster. This setting corresponds to your
Possible values include:dfs.data.transfer.protection
setting in thehdfs-site.xml
file on your Hadoop cluster."DISABLED"
"AUTHENTICATION"
"INTEGRITY"
"PRIVACY"
AuthenticationType
— (String
)The type of authentication used to determine the identity of the user.
Possible values include:"SIMPLE"
"KERBEROS"
SimpleUser
— (String
)The user name used to identify the client on the host operating system.
KerberosPrincipal
— (String
)The Kerberos principal with access to the files and folders on the HDFS cluster.
KerberosKeytab
— (Buffer, Typed Array, Blob, String
)The Kerberos key table (keytab) that contains mappings between the defined Kerberos principal and the encrypted keys. You can load the keytab from a file by providing the file's address. If you use the AWS CLI, it performs base64 encoding for you. Otherwise, provide the base64-encoded text.
KerberosKrb5Conf
— (Buffer, Typed Array, Blob, String
)The
krb5.conf
file that contains the Kerberos configuration information. You can load thekrb5.conf
file by providing the file's address. If you're using the AWS CLI, it performs the base64 encoding for you. Otherwise, provide the base64-encoded text.AgentArns
— (Array<String>
)The ARNs of the agents that are used to connect to the HDFS cluster.
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:
updateLocationNfs(params = {}, callback) ⇒ AWS.Request
Updates some of the parameters of a previously created location for Network File System (NFS) access. For information about creating an NFS location, see Creating a location for NFS.
Service Reference:
Examples:
Calling the updateLocationNfs operation
var params = {
LocationArn: 'STRING_VALUE', /* required */
MountOptions: {
Version: AUTOMATIC | NFS3 | NFS4_0 | NFS4_1
},
OnPremConfig: {
AgentArns: [ /* required */
'STRING_VALUE',
/* more items */
]
},
Subdirectory: 'STRING_VALUE'
};
datasync.updateLocationNfs(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 update.
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 that you specified, DataSync must have permissions to read all the data. To ensure this, either configure the NFS export with
no_root_squash
, or ensure that the files you want DataSync to access have permissions that allow read access for all users. Doing either option enables the agent to read the files. For the agent to access directories, you must additionally enable all execute access.If you are copying data to or from your Snowcone device, see NFS Server on Snowcone for more information.
For information about NFS export configuration, see 18.7. The /etc/exports Configuration File in the Red Hat Enterprise Linux documentation.
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.
MountOptions
— (map
)Represents the mount options that are available for DataSync to access an NFS location.
Version
— (String
)The specific NFS version that you want DataSync to use to mount your NFS share. If the server refuses to use the version specified, the sync will fail. If you don't specify a version, DataSync defaults to
AUTOMATIC
. That is, DataSync automatically selects a version based on negotiation with the NFS server.You can specify the following NFS versions:
-
NFSv3 - stateless protocol version that allows for asynchronous writes on the server.
-
NFSv4.0 - stateful, firewall-friendly protocol version that supports delegations and pseudo file systems.
-
NFSv4.1 - stateful protocol version that supports sessions, directory delegations, and parallel data processing. Version 4.1 also includes all features available in version 4.0.
"AUTOMATIC"
"NFS3"
"NFS4_0"
"NFS4_1"
-
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:
updateLocationObjectStorage(params = {}, callback) ⇒ AWS.Request
Updates some of the parameters of a previously created location for self-managed object storage server access. For information about creating a self-managed object storage location, see Creating a location for object storage.
Service Reference:
Examples:
Calling the updateLocationObjectStorage operation
var params = {
LocationArn: 'STRING_VALUE', /* required */
AccessKey: 'STRING_VALUE',
AgentArns: [
'STRING_VALUE',
/* more items */
],
SecretKey: 'STRING_VALUE',
ServerPort: 'NUMBER_VALUE',
ServerProtocol: HTTPS | HTTP,
Subdirectory: 'STRING_VALUE'
};
datasync.updateLocationObjectStorage(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 self-managed object storage server location to be updated.
ServerPort
— (Integer
)The port that your self-managed object storage server accepts inbound network traffic on. The server port is set by default to TCP 80 (HTTP) or TCP 443 (HTTPS). You can specify a custom port if your self-managed object storage server requires one.
ServerProtocol
— (String
)The protocol that the object storage server uses to communicate. Valid values are
Possible values include:HTTP
orHTTPS
."HTTPS"
"HTTP"
Subdirectory
— (String
)The subdirectory in the self-managed object storage server that is used to read data from.
AccessKey
— (String
)Optional. The access key is used if credentials are required to access the self-managed object storage server. If your object storage requires a user name and password to authenticate, use
AccessKey
andSecretKey
to provide the user name and password, respectively.SecretKey
— (String
)Optional. The secret key is used if credentials are required to access the self-managed object storage server. If your object storage requires a user name and password to authenticate, use
AccessKey
andSecretKey
to provide the user name and password, respectively.AgentArns
— (Array<String>
)The Amazon Resource Name (ARN) of the agents associated with the self-managed object storage server location.
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:
updateLocationSmb(params = {}, callback) ⇒ AWS.Request
Updates some of the parameters of a previously created location for Server Message Block (SMB) file system access. For information about creating an SMB location, see Creating a location for SMB.
Service Reference:
Examples:
Calling the updateLocationSmb operation
var params = {
LocationArn: 'STRING_VALUE', /* required */
AgentArns: [
'STRING_VALUE',
/* more items */
],
Domain: 'STRING_VALUE',
MountOptions: {
Version: AUTOMATIC | SMB2 | SMB3
},
Password: 'STRING_VALUE',
Subdirectory: 'STRING_VALUE',
User: 'STRING_VALUE'
};
datasync.updateLocationSmb(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 SMB location to update.
Subdirectory
— (String
)The subdirectory in the SMB file system that is used to read data from the SMB source location or write data to the SMB destination. The SMB path should be a path that's exported by the SMB server, or a subdirectory of that path. The path should be such that it can be mounted by other SMB clients in your network.
Note:Subdirectory
must be specified with forward slashes. For example,/path/to/folder
.To transfer all the data in the folder that you specified, DataSync must have permissions to mount the SMB share and to access all the data in that share. To ensure this, do either of the following:
-
Ensure that the user/password specified belongs to the user who can mount the share and who has the appropriate permissions for all of the files and directories that you want DataSync to access.
-
Use credentials of a member of the Backup Operators group to mount the share.
Doing either of these options enables the agent to access the data. For the agent to access directories, you must also enable all execute access.
-
User
— (String
)The user who can mount the share has the permissions to access files and folders in the SMB share.
Domain
— (String
)The name of the Windows domain that the SMB server belongs to.
Password
— (String
)The password of the user who can mount the share has the permissions to access files and folders in the SMB share.
AgentArns
— (Array<String>
)The Amazon Resource Names (ARNs) of agents to use for a Simple Message Block (SMB) location.
MountOptions
— (map
)Represents the mount options that are available for DataSync to access an SMB location.
Version
— (String
)The specific SMB version that you want DataSync to use to mount your SMB share. If you don't specify a version, DataSync defaults to
Possible values include:AUTOMATIC
. That is, DataSync automatically selects a version based on negotiation with the SMB server."AUTOMATIC"
"SMB2"
"SMB3"
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 */
CloudWatchLogGroupArn: 'STRING_VALUE',
Excludes: [
{
FilterType: SIMPLE_PATTERN,
Value: 'STRING_VALUE'
},
/* more items */
],
Includes: [
{
FilterType: SIMPLE_PATTERN,
Value: 'STRING_VALUE'
},
/* more items */
],
Name: 'STRING_VALUE',
Options: {
Atime: NONE | BEST_EFFORT,
BytesPerSecond: 'NUMBER_VALUE',
Gid: NONE | INT_VALUE | NAME | BOTH,
LogLevel: OFF | BASIC | TRANSFER,
Mtime: NONE | PRESERVE,
OverwriteMode: ALWAYS | NEVER,
PosixPermissions: NONE | PRESERVE,
PreserveDeletedFiles: PRESERVE | REMOVE,
PreserveDevices: NONE | PRESERVE,
SecurityDescriptorCopyFlags: NONE | OWNER_DACL | OWNER_DACL_SACL,
TaskQueueing: ENABLED | DISABLED,
TransferMode: CHANGED | ALL,
Uid: NONE | INT_VALUE | NAME | BOTH,
VerifyMode: POINT_IN_TIME_CONSISTENT | ONLY_FILES_TRANSFERRED | NONE
},
Schedule: {
ScheduleExpression: 'STRING_VALUE' /* required */
}
};
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. For more information, see Configure task settings.
Default value: POINT_IN_TIME_CONSISTENT.
ONLY_FILES_TRANSFERRED (recommended): Perform verification only on files that were transferred.
POINT_IN_TIME_CONSISTENT: Scan the entire source and entire destination at the end of the transfer to verify that source and destination are fully synchronized. This option isn't supported when transferring to S3 Glacier or S3 Glacier Deep Archive storage classes.
NONE: No additional verification is done at the end of the transfer, but all data transmissions are integrity-checked with checksum verification during the transfer.
Possible values include:"POINT_IN_TIME_CONSISTENT"
"ONLY_FILES_TRANSFERRED"
"NONE"
OverwriteMode
— (String
)A value that determines whether files at the destination should be overwritten or preserved when copying files. If set to
NEVER
a destination file will not be replaced by a source file, even if the destination file differs from the source file. If you modify files in the destination and you sync the files, you can use this value to protect against overwriting those changes.Some storage classes have specific behaviors that can affect your S3 storage cost. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User Guide.
Possible values include:"ALWAYS"
"NEVER"
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 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. This option is required for cases when you need to run the same task more than one time.
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 POSIX user ID (UID) of the file's owner. This option should only be set for NFS, EFS, and S3 locations. To learn more about what metadata is copied by DataSync, see Metadata Copied by DataSync.
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 POSIX group ID (GID) of the file's owners. This option should only be set for NFS, EFS, and S3 locations. For more information about what metadata is copied by DataSync, see Metadata Copied by DataSync.
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. This option can affect your storage cost. If your task deletes objects, you might incur minimum storage duration charges for certain storage classes. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User Guide.
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 DataSync should preserve the metadata of block and character devices in the source file system, and re-create the files with that device name and metadata on the destination. DataSync does not copy the contents of such devices, only the name and metadata.
Note: 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. This option should only be set for NFS, EFS, and S3 locations. For more information about what metadata is copied by DataSync, see Metadata Copied by DataSync.
Default value: PRESERVE.
PRESERVE: Preserve POSIX-style permissions (recommended).
NONE: Ignore permissions.
Note: DataSync can preserve extant permissions of a source location.Possible values include:"NONE"
"PRESERVE"
BytesPerSecond
— (Integer
)A value that limits the bandwidth used by DataSync. For example, if you want DataSync to use a maximum of 1 MB, set this value to
1048576
(=1024*1024
).TaskQueueing
— (String
)A value that determines whether tasks should be queued before executing the tasks. If set to
ENABLED
, the tasks will be queued. The default isENABLED
.If you use the same agent to run multiple tasks, you can enable the tasks to run in series. For more information, see Queueing task executions.
Possible values include:"ENABLED"
"DISABLED"
LogLevel
— (String
)A value that determines the type of logs that DataSync publishes to a log stream in the Amazon CloudWatch log group that you provide. For more information about providing a log group for DataSync, see CloudWatchLogGroupArn. If set to
Possible values include:OFF
, no logs are published.BASIC
publishes logs on errors for individual files transferred, andTRANSFER
publishes logs for every file or object that is transferred and integrity checked."OFF"
"BASIC"
"TRANSFER"
TransferMode
— (String
)A value that determines whether DataSync transfers only the data and metadata that differ between the source and the destination location, or whether DataSync transfers all the content from the source, without comparing to the destination location.
CHANGED: DataSync copies only data or metadata that is new or different content from the source location to the destination location.
ALL: DataSync copies all source location content to the destination, without comparing to existing content on the destination.
Possible values include:"CHANGED"
"ALL"
SecurityDescriptorCopyFlags
— (String
)A value that determines which components of the SMB security descriptor are copied from source to destination objects.
This value is only used for transfers between SMB and Amazon FSx for Windows File Server locations, or between two Amazon FSx for Windows File Server locations. For more information about how DataSync handles metadata, see How DataSync Handles Metadata and Special Files.
Default value: OWNER_DACL.
OWNER_DACL: For each copied object, DataSync copies the following metadata:
-
Object owner.
-
NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
When choosing this option, DataSync does NOT copy the NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured object.
OWNER_DACL_SACL: For each copied object, DataSync copies the following metadata:
-
Object owner.
-
NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
-
NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured object.
Copying SACLs requires granting additional permissions to the Windows user that DataSync uses to access your SMB location. For information about choosing a user that ensures sufficient permissions to files, folders, and metadata, see user.
NONE: None of the SMB security descriptor components are copied. Destination objects are owned by the user that was provided for accessing the destination location. DACLs and SACLs are set based on the destination server’s configuration.
Possible values include:"NONE"
"OWNER_DACL"
"OWNER_DACL_SACL"
-
Excludes
— (Array<map>
)A list of filter rules that determines which files to exclude from a task. 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"
.FilterType
— (String
)The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.
Possible values include:"SIMPLE_PATTERN"
Value
— (String
)A single filter string that consists of the patterns to include or exclude. The patterns are delimited by "|" (that is, a pipe), for example:
/folder1|/folder2
Schedule
— (map
)Specifies a schedule used to periodically transfer files from a source to a destination location. You can configure your task to execute hourly, daily, weekly or on specific days of the week. You control when in the day or hour you want the task to execute. The time you specify is UTC time. For more information, see Scheduling your task.
ScheduleExpression
— required — (String
)A cron expression that specifies when DataSync initiates a scheduled transfer from a source to a destination location.
Name
— (String
)The name of the task to update.
CloudWatchLogGroupArn
— (String
)The Amazon Resource Name (ARN) of the resource name of the Amazon CloudWatch log group.
Includes
— (Array<map>
)A list of filter rules that determines which files to include when running a task. 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"
.FilterType
— (String
)The type of filter rule to apply. DataSync only supports the SIMPLE_PATTERN rule type.
Possible values include:"SIMPLE_PATTERN"
Value
— (String
)A single filter string that consists of the patterns to include or exclude. The patterns are delimited by "|" (that is, a pipe), for example:
/folder1|/folder2
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:
updateTaskExecution(params = {}, callback) ⇒ AWS.Request
Updates execution of a task.
You can modify bandwidth throttling for a task execution that is running or queued. For more information, see Adjusting Bandwidth Throttling for a Task Execution.
Service Reference:
Examples:
Calling the updateTaskExecution operation
var params = {
Options: { /* required */
Atime: NONE | BEST_EFFORT,
BytesPerSecond: 'NUMBER_VALUE',
Gid: NONE | INT_VALUE | NAME | BOTH,
LogLevel: OFF | BASIC | TRANSFER,
Mtime: NONE | PRESERVE,
OverwriteMode: ALWAYS | NEVER,
PosixPermissions: NONE | PRESERVE,
PreserveDeletedFiles: PRESERVE | REMOVE,
PreserveDevices: NONE | PRESERVE,
SecurityDescriptorCopyFlags: NONE | OWNER_DACL | OWNER_DACL_SACL,
TaskQueueing: ENABLED | DISABLED,
TransferMode: CHANGED | ALL,
Uid: NONE | INT_VALUE | NAME | BOTH,
VerifyMode: POINT_IN_TIME_CONSISTENT | ONLY_FILES_TRANSFERRED | NONE
},
TaskExecutionArn: 'STRING_VALUE' /* required */
};
datasync.updateTaskExecution(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 specific task execution that is being updated.
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. For more information, see Configure task settings.
Default value: POINT_IN_TIME_CONSISTENT.
ONLY_FILES_TRANSFERRED (recommended): Perform verification only on files that were transferred.
POINT_IN_TIME_CONSISTENT: Scan the entire source and entire destination at the end of the transfer to verify that source and destination are fully synchronized. This option isn't supported when transferring to S3 Glacier or S3 Glacier Deep Archive storage classes.
NONE: No additional verification is done at the end of the transfer, but all data transmissions are integrity-checked with checksum verification during the transfer.
Possible values include:"POINT_IN_TIME_CONSISTENT"
"ONLY_FILES_TRANSFERRED"
"NONE"
OverwriteMode
— (String
)A value that determines whether files at the destination should be overwritten or preserved when copying files. If set to
NEVER
a destination file will not be replaced by a source file, even if the destination file differs from the source file. If you modify files in the destination and you sync the files, you can use this value to protect against overwriting those changes.Some storage classes have specific behaviors that can affect your S3 storage cost. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User Guide.
Possible values include:"ALWAYS"
"NEVER"
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 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. This option is required for cases when you need to run the same task more than one time.
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 POSIX user ID (UID) of the file's owner. This option should only be set for NFS, EFS, and S3 locations. To learn more about what metadata is copied by DataSync, see Metadata Copied by DataSync.
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 POSIX group ID (GID) of the file's owners. This option should only be set for NFS, EFS, and S3 locations. For more information about what metadata is copied by DataSync, see Metadata Copied by DataSync.
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. This option can affect your storage cost. If your task deletes objects, you might incur minimum storage duration charges for certain storage classes. For detailed information, see Considerations when working with Amazon S3 storage classes in DataSync in the DataSync User Guide.
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 DataSync should preserve the metadata of block and character devices in the source file system, and re-create the files with that device name and metadata on the destination. DataSync does not copy the contents of such devices, only the name and metadata.
Note: 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. This option should only be set for NFS, EFS, and S3 locations. For more information about what metadata is copied by DataSync, see Metadata Copied by DataSync.
Default value: PRESERVE.
PRESERVE: Preserve POSIX-style permissions (recommended).
NONE: Ignore permissions.
Note: DataSync can preserve extant permissions of a source location.Possible values include:"NONE"
"PRESERVE"
BytesPerSecond
— (Integer
)A value that limits the bandwidth used by DataSync. For example, if you want DataSync to use a maximum of 1 MB, set this value to
1048576
(=1024*1024
).TaskQueueing
— (String
)A value that determines whether tasks should be queued before executing the tasks. If set to
ENABLED
, the tasks will be queued. The default isENABLED
.If you use the same agent to run multiple tasks, you can enable the tasks to run in series. For more information, see Queueing task executions.
Possible values include:"ENABLED"
"DISABLED"
LogLevel
— (String
)A value that determines the type of logs that DataSync publishes to a log stream in the Amazon CloudWatch log group that you provide. For more information about providing a log group for DataSync, see CloudWatchLogGroupArn. If set to
Possible values include:OFF
, no logs are published.BASIC
publishes logs on errors for individual files transferred, andTRANSFER
publishes logs for every file or object that is transferred and integrity checked."OFF"
"BASIC"
"TRANSFER"
TransferMode
— (String
)A value that determines whether DataSync transfers only the data and metadata that differ between the source and the destination location, or whether DataSync transfers all the content from the source, without comparing to the destination location.
CHANGED: DataSync copies only data or metadata that is new or different content from the source location to the destination location.
ALL: DataSync copies all source location content to the destination, without comparing to existing content on the destination.
Possible values include:"CHANGED"
"ALL"
SecurityDescriptorCopyFlags
— (String
)A value that determines which components of the SMB security descriptor are copied from source to destination objects.
This value is only used for transfers between SMB and Amazon FSx for Windows File Server locations, or between two Amazon FSx for Windows File Server locations. For more information about how DataSync handles metadata, see How DataSync Handles Metadata and Special Files.
Default value: OWNER_DACL.
OWNER_DACL: For each copied object, DataSync copies the following metadata:
-
Object owner.
-
NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
When choosing this option, DataSync does NOT copy the NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured object.
OWNER_DACL_SACL: For each copied object, DataSync copies the following metadata:
-
Object owner.
-
NTFS discretionary access control lists (DACLs), which determine whether to grant access to an object.
-
NTFS system access control lists (SACLs), which are used by administrators to log attempts to access a secured object.
Copying SACLs requires granting additional permissions to the Windows user that DataSync uses to access your SMB location. For information about choosing a user that ensures sufficient permissions to files, folders, and metadata, see user.
NONE: None of the SMB security descriptor components are copied. Destination objects are owned by the user that was provided for accessing the destination location. DACLs and SACLs are set based on the destination server’s configuration.
Possible values include:"NONE"
"OWNER_DACL"
"OWNER_DACL_SACL"
-
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: