updateFileSystemProtection method
Future<FileSystemProtectionDescription>
updateFileSystemProtection({
- required String fileSystemId,
- ReplicationOverwriteProtection? replicationOverwriteProtection,
Updates protection on the file system.
This operation requires permissions for the
elasticfilesystem:UpdateFileSystemProtection action.
May throw BadRequest.
May throw FileSystemNotFound.
May throw IncorrectFileSystemLifeCycleState.
May throw InsufficientThroughputCapacity.
May throw InternalServerError.
May throw ReplicationAlreadyExists.
May throw ThroughputLimitExceeded.
May throw TooManyRequests.
Parameter fileSystemId :
The ID of the file system to update.
Parameter replicationOverwriteProtection :
The status of the file system's replication overwrite protection.
-
ENABLED– The file system cannot be used as the destination file system in a replication configuration. The file system is writeable. Replication overwrite protection isENABLEDby default. -
DISABLED– The file system can be used as the destination file system in a replication configuration. The file system is read-only and can only be modified by EFS replication. -
REPLICATING– The file system is being used as the destination file system in a replication configuration. The file system is read-only and is only modified only by EFS replication.
Implementation
Future<FileSystemProtectionDescription> updateFileSystemProtection({
required String fileSystemId,
ReplicationOverwriteProtection? replicationOverwriteProtection,
}) async {
final $payload = <String, dynamic>{
if (replicationOverwriteProtection != null)
'ReplicationOverwriteProtection': replicationOverwriteProtection.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/2015-02-01/file-systems/${Uri.encodeComponent(fileSystemId)}/protection',
exceptionFnMap: _exceptionFns,
);
return FileSystemProtectionDescription.fromJson(response);
}