clients/client-transfer/README.md
AWS SDK for JavaScript Transfer Client for Node.js, Browser and React Native.
<p>Transfer Family is a fully managed service that enables the transfer of files over the File Transfer Protocol (FTP), File Transfer Protocol over SSL (FTPS), or Secure Shell (SSH) File Transfer Protocol (SFTP) directly into and out of Amazon Simple Storage Service (Amazon S3) or Amazon EFS. Additionally, you can use Applicability Statement 2 (AS2) to transfer files into and out of Amazon S3. Amazon Web Services helps you seamlessly migrate your file transfer workflows to Transfer Family by integrating with existing authentication systems, and providing DNS routing with Amazon Route 53 so nothing changes for your customers and partners, or their applications. With your data in Amazon S3, you can use it with Amazon Web Services services for processing, analytics, machine learning, and archiving. Getting started with Transfer Family is easy since there is no infrastructure to buy and set up.</p>To install this package, use the CLI of your favorite package manager:
npm install @aws-sdk/client-transferyarn add @aws-sdk/client-transferpnpm add @aws-sdk/client-transferThe AWS SDK is modulized by clients and commands.
To send a request, you only need to import the TransferClient and
the commands you need, for example ListServersCommand:
// ES5 example
const { TransferClient, ListServersCommand } = require("@aws-sdk/client-transfer");
// ES6+ example
import { TransferClient, ListServersCommand } from "@aws-sdk/client-transfer";
To send a request:
send operation on the client, providing the command object as input.const client = new TransferClient({ region: "REGION" });
const params = { /** input parameters */ };
const command = new ListServersCommand(params);
We recommend using the await operator to wait for the promise returned by send operation as follows:
// async/await.
try {
const data = await client.send(command);
// process data.
} catch (error) {
// error handling.
} finally {
// finally.
}
You can also use Promise chaining.
client
.send(command)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
})
.finally(() => {
// finally.
});
The aggregated client class is exported from the same package, but without the "Client" suffix.
Transfer extends TransferClient and additionally supports all operations, waiters, and paginators as methods.
This style may be familiar to you from the AWS SDK for JavaScript v2.
If you are bundling the AWS SDK, we recommend using only the bare-bones client (TransferClient).
More details are in the blog post on
modular packages in AWS SDK for JavaScript.
import { Transfer } from "@aws-sdk/client-transfer";
const client = new Transfer({ region: "REGION" });
// async/await.
try {
const data = await client.listServers(params);
// process data.
} catch (error) {
// error handling.
}
// Promises.
client
.listServers(params)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
});
// callbacks (not recommended).
client.listServers(params, (err, data) => {
// process err and data.
});
When the service returns an exception, the error will include the exception information, as well as response metadata (e.g. request id).
try {
const data = await client.send(command);
// process data.
} catch (error) {
const { requestId, cfId, extendedRequestId } = error.$metadata;
console.log({ requestId, cfId, extendedRequestId });
/**
* The keys within exceptions are also parsed.
* You can access them by specifying exception names:
* if (error.name === 'SomeServiceException') {
* const value = error.specialKeyInException;
* }
*/
}
See also docs/ERROR_HANDLING.
Please use these community resources for getting help. We use GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.
aws-sdk-js
on AWS Developer Blog.aws-sdk-js.To test your universal JavaScript code in Node.js, browser and react-native environments, visit our code samples repo.
This client code is generated automatically. Any modifications will be overwritten the next time the @aws-sdk/client-transfer package is updated.
To contribute to client you can check our generate clients scripts.
This SDK is distributed under the Apache License, Version 2.0, see LICENSE for more information.
Command API Reference / Input / Output
</details> <details> <summary> CreateAgreement </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateConnector </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateProfile </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateServer </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateUser </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateWebApp </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateWorkflow </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteAccess </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteAgreement </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteCertificate </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteConnector </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteHostKey </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteProfile </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteServer </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteSshPublicKey </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteUser </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteWebApp </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteWebAppCustomization </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteWorkflow </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeAccess </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeAgreement </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeCertificate </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeConnector </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeExecution </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeHostKey </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeProfile </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeSecurityPolicy </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeServer </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeUser </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeWebApp </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeWebAppCustomization </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeWorkflow </summary>Command API Reference / Input / Output
</details> <details> <summary> ImportCertificate </summary>Command API Reference / Input / Output
</details> <details> <summary> ImportHostKey </summary>Command API Reference / Input / Output
</details> <details> <summary> ImportSshPublicKey </summary>Command API Reference / Input / Output
</details> <details> <summary> ListAccesses </summary>Command API Reference / Input / Output
</details> <details> <summary> ListAgreements </summary>Command API Reference / Input / Output
</details> <details> <summary> ListCertificates </summary>Command API Reference / Input / Output
</details> <details> <summary> ListConnectors </summary>Command API Reference / Input / Output
</details> <details> <summary> ListExecutions </summary>Command API Reference / Input / Output
</details> <details> <summary> ListFileTransferResults </summary>Command API Reference / Input / Output
</details> <details> <summary> ListHostKeys </summary>Command API Reference / Input / Output
</details> <details> <summary> ListProfiles </summary>Command API Reference / Input / Output
</details> <details> <summary> ListSecurityPolicies </summary>Command API Reference / Input / Output
</details> <details> <summary> ListServers </summary>Command API Reference / Input / Output
</details> <details> <summary> ListTagsForResource </summary>Command API Reference / Input / Output
</details> <details> <summary> ListUsers </summary>Command API Reference / Input / Output
</details> <details> <summary> ListWebApps </summary>Command API Reference / Input / Output
</details> <details> <summary> ListWorkflows </summary>Command API Reference / Input / Output
</details> <details> <summary> SendWorkflowStepState </summary>Command API Reference / Input / Output
</details> <details> <summary> StartDirectoryListing </summary>Command API Reference / Input / Output
</details> <details> <summary> StartFileTransfer </summary>Command API Reference / Input / Output
</details> <details> <summary> StartRemoteDelete </summary>Command API Reference / Input / Output
</details> <details> <summary> StartRemoteMove </summary>Command API Reference / Input / Output
</details> <details> <summary> StartServer </summary>Command API Reference / Input / Output
</details> <details> <summary> StopServer </summary>Command API Reference / Input / Output
</details> <details> <summary> TagResource </summary>Command API Reference / Input / Output
</details> <details> <summary> TestConnection </summary>Command API Reference / Input / Output
</details> <details> <summary> TestIdentityProvider </summary>Command API Reference / Input / Output
</details> <details> <summary> UntagResource </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateAccess </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateAgreement </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateCertificate </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateConnector </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateHostKey </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateProfile </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateServer </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateUser </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateWebApp </summary> </details> <details> <summary> UpdateWebAppCustomization </summary> </details>