clients/client-transfer/README.md
AWS SDK for JavaScript Transfer Client for Node.js, Browser and React Native.
<p>Transfer Family offers fully managed support for the transfer of files over SFTP, AS2, FTPS, FTP, and web browser-based transfers directly into and out of Amazon Web Services storage services.</p> <p>File transfer protocols are used in data exchange workflows across different industries such as financial services, healthcare, advertising, and retail, among others. Transfer Family simplifies the migration of file transfer workflows to Amazon Web Services.</p> <p>To use the Transfer Family service, you instantiate a server in the Amazon Web Services Region of your choice. You can create the server, list available servers, and update and delete servers. The server is the entity that requests file operations from Transfer Family. Servers have a number of important properties. The server is a named instance as identified by a system assigned <code>ServerId</code> identifier. You can optionally assign a hostname, or even a custom hostname to a server. The service bills for any instantiated servers (even ones <code>OFFLINE</code>), and for the amount of data transferred.</p> <p>Users must be known to the server that requests file operations. A user as identified by their username is assigned to a server. Usernames are used to authenticate requests. A server can have only one authentication method: <code>AWS_DIRECTORY_SERVICE</code>, <code>SERVICE_MANAGED</code>, <code>AWS_LAMBDA</code>, or <code>API_GATEWAY</code>.</p> <p>Transfer Family also supports web applications that provide browser-based file transfer capabilities. Web applications can be configured with VPC endpoints to enable secure, private connectivity within your Virtual Private Cloud (VPC). This allows you to control network access and route traffic through your VPC infrastructure while maintaining the managed benefits of Transfer Family.</p> <p>This API interface reference for Transfer Family contains documentation for a programming interface that you can use to manage Transfer Family. The reference structure is as follows:</p> <ul> <li> <p>For the alphabetical list of API actions, see .</p> </li> <li> <p>For the alphabetical list of data types, see .</p> </li> <li> <p>For a list of common query parameters, see <a>CommonParameters</a>.</p> </li> <li> <p>For descriptions of the error codes, see <a>CommonErrors</a>.</p> </li> </ul> <note> <p>Rather than actually running a command, you can use the <code>--generate-cli-skeleton</code> parameter with any API call to generate and display a parameter template. You can then use the generated template to customize and use as input on a later command. For details, see <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-skeleton.html#cli-usage-skeleton-generate">Generate and use a parameter skeleton file</a>.</p> </note>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>