Enables or disables a live inventory table 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 following permissions. For more information, see Setting up permissions for configuring metadata tables in the Amazon S3 User Guide.
If you want to encrypt your inventory table with server-side encryption with Key Management Service (KMS) keys (SSE-KMS), you need additional permissions in your KMS key policy. For more information, see Setting up permissions for configuring metadata tables in the Amazon S3 User Guide.
-
s3:UpdateBucketMetadataInventoryTableConfiguration
-
s3tables:CreateTableBucket
-
s3tables:CreateNamespace
-
s3tables:GetTable
-
s3tables:CreateTable
-
s3tables:PutTablePolicy
-
s3tables:PutTableEncryption
-
kms:DescribeKey
The following operations are related to UpdateBucketMetadataInventoryTableConfiguration:
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 an inventory table for.
-
content_md5
(Optional[ContentMD5], default:
None
)
–
The Content-MD5 header for the inventory table configuration.
-
checksum_algorithm
(Optional[ChecksumAlgorithm], default:
None
)
–
The checksum algorithm to use with your inventory table configuration.
-
inventory_table_configuration
(InventoryTableConfigurationUpdates)
–
The contents of your inventory 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 an inventory table for.
Raises:
Source code in docs_src/capo_s3/_services/async_s3.py
| async def update_bucket_metadata_inventory_table_configuration(
self,
bucket: "capo_s3.types.bucket_name.BucketName",
inventory_table_configuration: "capo_s3.types.inventory_table_configuration_updates.InventoryTableConfigurationUpdates",
*,
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 a live inventory table 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 following permissions. 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> <p>If you want to encrypt your inventory table with server-side encryption with Key Management Service (KMS) keys (SSE-KMS), you need additional permissions in your KMS key policy. 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> <ul> <li> <p> <code>s3:UpdateBucketMetadataInventoryTableConfiguration</code> </p> </li> <li> <p> <code>s3tables:CreateTableBucket</code> </p> </li> <li> <p> <code>s3tables:CreateNamespace</code> </p> </li> <li> <p> <code>s3tables:GetTable</code> </p> </li> <li> <p> <code>s3tables:CreateTable</code> </p> </li> <li> <p> <code>s3tables:PutTablePolicy</code> </p> </li> <li> <p> <code>s3tables:PutTableEncryption</code> </p> </li> <li> <p> <code>kms:DescribeKey</code> </p> </li> </ul> </dd> </dl> <p>The following operations are related to <code>UpdateBucketMetadataInventoryTableConfiguration</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_UpdateBucketMetadataJournalTableConfiguration.html">UpdateBucketMetadataJournalTableConfiguration</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 an inventory table for. </p>
content_md5: <p> The <code>Content-MD5</code> header for the inventory table configuration. </p>
checksum_algorithm: <p> The checksum algorithm to use with your inventory table configuration. </p>
inventory_table_configuration: <p> The contents of your inventory 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 an inventory table 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_inventory_table_configuration_request.UpdateBucketMetadataInventoryTableConfigurationRequest]",
) -> AsyncOperationResponse[None]:
import capo_s3._operations.amazon_s3.update_bucket_metadata_inventory_table_configuration
(
output,
http_response,
) = await capo_s3._operations.amazon_s3.update_bucket_metadata_inventory_table_configuration.async_update_bucket_metadata_inventory_table_configuration(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("UpdateBucketMetadataInventoryTableConfiguration"),
)
input_: capo_s3.types.update_bucket_metadata_inventory_table_configuration_request.UpdateBucketMetadataInventoryTableConfigurationRequest = {
"bucket": bucket,
"inventory_table_configuration": inventory_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
|