deleteReplicationConfiguration method

Future<void> deleteReplicationConfiguration({
  1. required String sourceFileSystemId,
  2. DeletionMode? deletionMode,
})

Deletes a replication configuration. Deleting a replication configuration ends the replication process. After a replication configuration is deleted, the destination file system becomes Writeable and its replication overwrite protection is re-enabled. For more information, see Delete a replication configuration.

This operation requires permissions for the elasticfilesystem:DeleteReplicationConfiguration action.

May throw BadRequest. May throw FileSystemNotFound. May throw InternalServerError. May throw ReplicationNotFound.

Parameter sourceFileSystemId : The ID of the source file system in the replication configuration.

Parameter deletionMode : When replicating across Amazon Web Services accounts or across Amazon Web Services Regions, Amazon EFS deletes the replication configuration from both the source and destination account or Region (ALL_CONFIGURATIONS) by default. If there's a configuration or permissions issue that prevents Amazon EFS from deleting the replication configuration from both sides, you can use the LOCAL_CONFIGURATION_ONLY mode to delete the replication configuration from only the local side (the account or Region from which the delete is performed).

Additionally, do not use this mode for same-account, same-region replication as doing so results in a BadRequest exception error.

Implementation

Future<void> deleteReplicationConfiguration({
  required String sourceFileSystemId,
  DeletionMode? deletionMode,
}) async {
  final $query = <String, List<String>>{
    if (deletionMode != null) 'deletionMode': [deletionMode.value],
  };
  await _protocol.send(
    payload: null,
    method: 'DELETE',
    requestUri:
        '/2015-02-01/file-systems/${Uri.encodeComponent(sourceFileSystemId)}/replication-configuration',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
}