updateLocationFsxOpenZfs method

Future<void> updateLocationFsxOpenZfs({
  1. required String locationArn,
  2. FsxProtocol? protocol,
  3. String? subdirectory,
})

Modifies the following configuration parameters of the Amazon FSx for OpenZFS transfer location that you're using with DataSync.

For more information, see Configuring DataSync transfers with FSx for OpenZFS.

May throw InternalException. May throw InvalidRequestException.

Parameter locationArn : Specifies the Amazon Resource Name (ARN) of the FSx for OpenZFS transfer location that you're updating.

Parameter subdirectory : Specifies a subdirectory in the location's path that must begin with /fsx. DataSync uses this subdirectory to read or write data (depending on whether the file system is a source or destination location).

Implementation

Future<void> updateLocationFsxOpenZfs({
  required String locationArn,
  FsxProtocol? protocol,
  String? subdirectory,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'FmrsService.UpdateLocationFsxOpenZfs'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'LocationArn': locationArn,
      if (protocol != null) 'Protocol': protocol,
      if (subdirectory != null) 'Subdirectory': subdirectory,
    },
  );
}