updateLocationFsxWindows method

Future<void> updateLocationFsxWindows({
  1. required String locationArn,
  2. CmkSecretConfig? cmkSecretConfig,
  3. CustomSecretConfig? customSecretConfig,
  4. String? domain,
  5. String? password,
  6. String? subdirectory,
  7. String? user,
})

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

For more information, see Configuring DataSync transfers with FSx for Windows File Server.

May throw InternalException. May throw InvalidRequestException.

Parameter locationArn : Specifies the ARN of the FSx for Windows File Server transfer location that you're updating.

Parameter cmkSecretConfig : Specifies configuration information for a DataSync-managed secret, such as a Password or set of credentials that DataSync uses to access a specific transfer location, and a customer-managed KMS key.

Parameter customSecretConfig : Specifies configuration information for a customer-managed secret, such as a Password or set of credentials that DataSync uses to access a specific transfer location, and a customer-managed Identity and Access Management (IAM) role that provides access to the secret.

Parameter domain : Specifies the name of the Windows domain that your FSx for Windows File Server file system belongs to.

If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right file system.

Parameter password : Specifies the password of the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.

Parameter subdirectory : Specifies a mount path for your file system using forward slashes. DataSync uses this subdirectory to read or write data (depending on whether the file system is a source or destination location).

Parameter user : Specifies the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.

For information about choosing a user with the right level of access for your transfer, see required permissions for FSx for Windows File Server locations.

Implementation

Future<void> updateLocationFsxWindows({
  required String locationArn,
  CmkSecretConfig? cmkSecretConfig,
  CustomSecretConfig? customSecretConfig,
  String? domain,
  String? password,
  String? subdirectory,
  String? user,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'FmrsService.UpdateLocationFsxWindows'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'LocationArn': locationArn,
      if (cmkSecretConfig != null) 'CmkSecretConfig': cmkSecretConfig,
      if (customSecretConfig != null)
        'CustomSecretConfig': customSecretConfig,
      if (domain != null) 'Domain': domain,
      if (password != null) 'Password': password,
      if (subdirectory != null) 'Subdirectory': subdirectory,
      if (user != null) 'User': user,
    },
  );
}