- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
UpdateLocationNfsCommand
Modifies the following configuration parameters of the Network File System (NFS) transfer location that you're using with DataSync.
For more information, see Configuring transfers with an NFS file server .
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DataSyncClient, UpdateLocationNfsCommand } from "@aws-sdk/client-datasync"; // ES Modules import
// const { DataSyncClient, UpdateLocationNfsCommand } = require("@aws-sdk/client-datasync"); // CommonJS import
const client = new DataSyncClient(config);
const input = { // UpdateLocationNfsRequest
LocationArn: "STRING_VALUE", // required
Subdirectory: "STRING_VALUE",
ServerHostname: "STRING_VALUE",
OnPremConfig: { // OnPremConfig
AgentArns: [ // AgentArnList // required
"STRING_VALUE",
],
},
MountOptions: { // NfsMountOptions
Version: "AUTOMATIC" || "NFS3" || "NFS4_0" || "NFS4_1",
},
};
const command = new UpdateLocationNfsCommand(input);
const response = await client.send(command);
// {};
UpdateLocationNfsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
LocationArn Required | string | undefined | Specifies the Amazon Resource Name (ARN) of the NFS transfer location that you want to update. |
MountOptions | NfsMountOptions | undefined | Specifies how DataSync can access a location using the NFS protocol. |
OnPremConfig | OnPremConfig | undefined | The DataSync agents that can connect to your Network File System (NFS) file server. |
ServerHostname | string | undefined | Specifies the DNS name or IP version 4 (IPv4) address of the NFS file server that your DataSync agent connects to. |
Subdirectory | string | undefined | Specifies the export path in your NFS file server that you want DataSync to mount. This path (or a subdirectory of the path) is where DataSync transfers data to or from. For information on configuring an export for DataSync, see Accessing NFS file servers . |
UpdateLocationNfsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalException | server | This exception is thrown when an error occurs in the DataSync service. |
InvalidRequestException | client | This exception is thrown when the client submits a malformed request. |
DataSyncServiceException | Base exception class for all service exceptions from DataSync service. |