updateLocationEfs method

Future<void> updateLocationEfs({
  1. required String locationArn,
  2. String? accessPointArn,
  3. String? fileSystemAccessRoleArn,
  4. EfsInTransitEncryption? inTransitEncryption,
  5. String? subdirectory,
})

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

For more information, see Configuring DataSync transfers with Amazon EFS.

May throw InternalException. May throw InvalidRequestException.

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

Parameter accessPointArn : Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to mount your Amazon EFS file system.

For more information, see Accessing restricted Amazon EFS file systems.

Parameter fileSystemAccessRoleArn : Specifies an Identity and Access Management (IAM) role that allows DataSync to access your Amazon EFS file system.

For information on creating this role, see Creating a DataSync IAM role for Amazon EFS file system access.

Parameter inTransitEncryption : Specifies whether you want DataSync to use Transport Layer Security (TLS) 1.2 encryption when it transfers data to or from your Amazon EFS file system.

If you specify an access point using AccessPointArn or an IAM role using FileSystemAccessRoleArn, you must set this parameter to TLS1_2.

Parameter subdirectory : Specifies a mount path for your Amazon EFS file system. This is where DataSync reads or writes data on your file system (depending on if this is a source or destination location).

By default, DataSync uses the root directory (or access point if you provide one by using AccessPointArn). You can also include subdirectories using forward slashes (for example, /path/to/folder).

Implementation

Future<void> updateLocationEfs({
  required String locationArn,
  String? accessPointArn,
  String? fileSystemAccessRoleArn,
  EfsInTransitEncryption? inTransitEncryption,
  String? subdirectory,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'FmrsService.UpdateLocationEfs'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'LocationArn': locationArn,
      if (accessPointArn != null) 'AccessPointArn': accessPointArn,
      if (fileSystemAccessRoleArn != null)
        'FileSystemAccessRoleArn': fileSystemAccessRoleArn,
      if (inTransitEncryption != null)
        'InTransitEncryption': inTransitEncryption.value,
      if (subdirectory != null) 'Subdirectory': subdirectory,
    },
  );
}