clients/client-fsx/README.md
AWS SDK for JavaScript FSx Client for Node.js, Browser and React Native.
<p>Amazon FSx is a fully managed service that makes it easy for storage and application administrators to launch and use shared file storage.</p>To install this package, use the CLI of your favorite package manager:
npm install @aws-sdk/client-fsxyarn add @aws-sdk/client-fsxpnpm add @aws-sdk/client-fsxThe AWS SDK is modulized by clients and commands.
To send a request, you only need to import the FSxClient and
the commands you need, for example ListTagsForResourceCommand:
// ES5 example
const { FSxClient, ListTagsForResourceCommand } = require("@aws-sdk/client-fsx");
// ES6+ example
import { FSxClient, ListTagsForResourceCommand } from "@aws-sdk/client-fsx";
To send a request:
send operation on the client, providing the command object as input.const client = new FSxClient({ region: "REGION" });
const params = { /** input parameters */ };
const command = new ListTagsForResourceCommand(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.
FSx extends FSxClient 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 (FSxClient).
More details are in the blog post on
modular packages in AWS SDK for JavaScript.
import { FSx } from "@aws-sdk/client-fsx";
const client = new FSx({ region: "REGION" });
// async/await.
try {
const data = await client.listTagsForResource(params);
// process data.
} catch (error) {
// error handling.
}
// Promises.
client
.listTagsForResource(params)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
});
// callbacks (not recommended).
client.listTagsForResource(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-fsx 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> CancelDataRepositoryTask </summary>Command API Reference / Input / Output
</details> <details> <summary> CopyBackup </summary>Command API Reference / Input / Output
</details> <details> <summary> CopySnapshotAndUpdateVolume </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateAndAttachS3AccessPoint </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateBackup </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateDataRepositoryAssociation </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateDataRepositoryTask </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateFileCache </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateFileSystem </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateFileSystemFromBackup </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateSnapshot </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateStorageVirtualMachine </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateVolume </summary>Command API Reference / Input / Output
</details> <details> <summary> CreateVolumeFromBackup </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteBackup </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteDataRepositoryAssociation </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteFileCache </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteFileSystem </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteSnapshot </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteStorageVirtualMachine </summary>Command API Reference / Input / Output
</details> <details> <summary> DeleteVolume </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeBackups </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeDataRepositoryAssociations </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeDataRepositoryTasks </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeFileCaches </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeFileSystemAliases </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeFileSystems </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeS3AccessPointAttachments </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeSharedVpcConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeSnapshots </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeStorageVirtualMachines </summary>Command API Reference / Input / Output
</details> <details> <summary> DescribeVolumes </summary>Command API Reference / Input / Output
</details> <details> <summary> DetachAndDeleteS3AccessPoint </summary>Command API Reference / Input / Output
</details> <details> <summary> DisassociateFileSystemAliases </summary>Command API Reference / Input / Output
</details> <details> <summary> ListTagsForResource </summary>Command API Reference / Input / Output
</details> <details> <summary> ReleaseFileSystemNfsV3Locks </summary>Command API Reference / Input / Output
</details> <details> <summary> RestoreVolumeFromSnapshot </summary>Command API Reference / Input / Output
</details> <details> <summary> StartMisconfiguredStateRecovery </summary>Command API Reference / Input / Output
</details> <details> <summary> TagResource </summary>Command API Reference / Input / Output
</details> <details> <summary> UntagResource </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateDataRepositoryAssociation </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateFileCache </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateFileSystem </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateSharedVpcConfiguration </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateSnapshot </summary>Command API Reference / Input / Output
</details> <details> <summary> UpdateStorageVirtualMachine </summary> </details> <details> <summary> UpdateVolume </summary> </details>