updateBucketMetadataJournalTableConfiguration method
Enables or disables journal table record expiration for an S3 Metadata configuration on a general purpose bucket. For more information, see Accelerating data discovery with S3 Metadata in the Amazon S3 User Guide.
- Permissions
-
To use this operation, you must have the
s3:UpdateBucketMetadataJournalTableConfigurationpermission. For more information, see Setting up permissions for configuring metadata tables in the Amazon S3 User Guide.
UpdateBucketMetadataJournalTableConfiguration:
- CreateBucketMetadataConfiguration
- DeleteBucketMetadataConfiguration
- GetBucketMetadataConfiguration
- UpdateBucketMetadataInventoryTableConfiguration
Parameter bucket :
The general purpose bucket that corresponds to the metadata configuration
that you want to enable or disable journal table record expiration for.
Parameter journalTableConfiguration :
The contents of your journal table configuration.
Parameter checksumAlgorithm :
The checksum algorithm to use with your journal table configuration.
Parameter contentMD5 :
The Content-MD5 header for the journal table configuration.
Parameter expectedBucketOwner :
The expected owner of the general purpose bucket that corresponds to the
metadata table configuration that you want to enable or disable journal
table record expiration for.
Implementation
Future<void> updateBucketMetadataJournalTableConfiguration({
required String bucket,
required JournalTableConfigurationUpdates journalTableConfiguration,
ChecksumAlgorithm? checksumAlgorithm,
String? contentMD5,
String? expectedBucketOwner,
}) async {
final headers = <String, String>{
if (checksumAlgorithm != null)
'x-amz-sdk-checksum-algorithm': checksumAlgorithm.value,
if (contentMD5 != null) 'Content-MD5': contentMD5.toString(),
if (expectedBucketOwner != null)
'x-amz-expected-bucket-owner': expectedBucketOwner.toString(),
};
await _protocol.send(
method: 'PUT',
requestUri: '/${Uri.encodeComponent(bucket)}?metadataJournalTable',
headers: headers,
payload: journalTableConfiguration.toXml('JournalTableConfiguration'),
exceptionFnMap: _exceptionFns,
);
}