putSynchronizationConfiguration method
Creates or updates the synchronization configuration for the specified S3 File System, including import data rules and expiration data rules.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter expirationDataRules :
An array of expiration data rules that control when cached data expires
from the file system.
Parameter fileSystemId :
The ID or Amazon Resource Name (ARN) of the S3 File System to configure
synchronization for.
Parameter importDataRules :
An array of import data rules that control how data is imported from S3
into the file system.
Parameter latestVersionNumber :
The version number of the current synchronization configuration. Omit this
value when creating a synchronization configuration for the first time.
For subsequent updates, provide this value for optimistic concurrency
control. If the version number does not match the current configuration,
the request fails with a ConflictException.
Implementation
Future<void> putSynchronizationConfiguration({
required List<ExpirationDataRule> expirationDataRules,
required String fileSystemId,
required List<ImportDataRule> importDataRules,
int? latestVersionNumber,
}) async {
final $payload = <String, dynamic>{
'expirationDataRules': expirationDataRules,
'importDataRules': importDataRules,
if (latestVersionNumber != null)
'latestVersionNumber': latestVersionNumber,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/file-systems/${Uri.encodeComponent(fileSystemId)}/synchronization-configuration',
exceptionFnMap: _exceptionFns,
);
}