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:UpdateBucketMetadataJournalTableConfiguration permission. For more information, see Setting up permissions for configuring metadata tables in the Amazon S3 User Guide.
The following operations are related to UpdateBucketMetadataJournalTableConfiguration:
You must URL encode any signed header values that contain spaces. For example, if your header value is my file.txt, containing two spaces after my, you must URL encode this value to my%20%20file.txt.
Parameters:
-
bucket
(BucketName)
–
The general purpose bucket that corresponds to the metadata configuration that you want to enable or disable journal table record expiration for.
-
content_md5
(Optional[ContentMD5], default:
None
)
–
The Content-MD5 header for the journal table configuration.
-
checksum_algorithm
(Optional[ChecksumAlgorithm], default:
None
)
–
The checksum algorithm to use with your journal table configuration.
-
journal_table_configuration
(JournalTableConfigurationUpdates)
–
The contents of your journal table configuration.
-
expected_bucket_owner
(Optional[AccountId], default:
None
)
–
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.
Raises:
Source code in docs_src/capo_s3/_services/async_s3.py
| async def update_bucket_metadata_journal_table_configuration(
self,
bucket: "capo_s3.types.bucket_name.BucketName",
journal_table_configuration: "capo_s3.types.journal_table_configuration_updates.JournalTableConfigurationUpdates",
*,
config_overrides: Optional[AsyncS3ClientConfig] = None,
content_md5: Optional["capo_s3.types.content_md5.ContentMD5"] = None,
checksum_algorithm: Optional[
"capo_s3.types.checksum_algorithm.ChecksumAlgorithm"
] = None,
expected_bucket_owner: Optional["capo_s3.types.account_id.AccountId"] = None,
) -> None:
"""<p>Enables or disables journal table record expiration for an S3 Metadata configuration on a general purpose bucket. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/metadata-tables-overview.html">Accelerating data discovery with S3 Metadata</a> in the <i>Amazon S3 User Guide</i>.</p> <dl> <dt>Permissions</dt> <dd> <p>To use this operation, you must have the <code>s3:UpdateBucketMetadataJournalTableConfiguration</code> permission. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/metadata-tables-permissions.html">Setting up permissions for configuring metadata tables</a> in the <i>Amazon S3 User Guide</i>. </p> </dd> </dl> <p>The following operations are related to <code>UpdateBucketMetadataJournalTableConfiguration</code>:</p> <ul> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucketMetadataConfiguration.html">CreateBucketMetadataConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetadataConfiguration.html">DeleteBucketMetadataConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetadataConfiguration.html">GetBucketMetadataConfiguration</a> </p> </li> <li> <p> <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_UpdateBucketMetadataInventoryTableConfiguration.html">UpdateBucketMetadataInventoryTableConfiguration</a> </p> </li> </ul> <important> <p>You must URL encode any signed header values that contain spaces. For example, if your header value is <code>my file.txt</code>, containing two spaces after <code>my</code>, you must URL encode this value to <code>my%20%20file.txt</code>.</p> </important>
Args:
bucket: <p> The general purpose bucket that corresponds to the metadata configuration that you want to enable or disable journal table record expiration for. </p>
content_md5: <p> The <code>Content-MD5</code> header for the journal table configuration. </p>
checksum_algorithm: <p> The checksum algorithm to use with your journal table configuration. </p>
journal_table_configuration: <p> The contents of your journal table configuration. </p>
expected_bucket_owner: <p> 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. </p>
Raises:
capo_s3.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_s3.types.update_bucket_metadata_journal_table_configuration_request.UpdateBucketMetadataJournalTableConfigurationRequest]",
) -> AsyncOperationResponse[None]:
import capo_s3._operations.amazon_s3.update_bucket_metadata_journal_table_configuration
(
output,
http_response,
) = await capo_s3._operations.amazon_s3.update_bucket_metadata_journal_table_configuration.async_update_bucket_metadata_journal_table_configuration(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("UpdateBucketMetadataJournalTableConfiguration"),
)
input_: capo_s3.types.update_bucket_metadata_journal_table_configuration_request.UpdateBucketMetadataJournalTableConfigurationRequest = {
"bucket": bucket,
"journal_table_configuration": journal_table_configuration,
}
if content_md5 is not None:
input_["content_md5"] = content_md5
if checksum_algorithm is not None:
input_["checksum_algorithm"] = checksum_algorithm
if expected_bucket_owner is not None:
input_["expected_bucket_owner"] = expected_bucket_owner
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|