updateLocationNfs method

Future<void> updateLocationNfs({
  1. required String locationArn,
  2. NfsMountOptions? mountOptions,
  3. OnPremConfig? onPremConfig,
  4. String? serverHostname,
  5. String? subdirectory,
})

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.

May throw InternalException. May throw InvalidRequestException.

Parameter locationArn : Specifies the Amazon Resource Name (ARN) of the NFS transfer location that you want to update.

Parameter serverHostname : Specifies the DNS name or IP address (IPv4 or IPv6) of the NFS file server that your DataSync agent connects to.

Parameter subdirectory : 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.

Implementation

Future<void> updateLocationNfs({
  required String locationArn,
  NfsMountOptions? mountOptions,
  OnPremConfig? onPremConfig,
  String? serverHostname,
  String? subdirectory,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'FmrsService.UpdateLocationNfs'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'LocationArn': locationArn,
      if (mountOptions != null) 'MountOptions': mountOptions,
      if (onPremConfig != null) 'OnPremConfig': onPremConfig,
      if (serverHostname != null) 'ServerHostname': serverHostname,
      if (subdirectory != null) 'Subdirectory': subdirectory,
    },
  );
}