S3 / Client / create_bucket_metadata_configuration
create_bucket_metadata_configuration¶
- S3.Client.create_bucket_metadata_configuration(**kwargs)¶
Creates an S3 Metadata V2 metadata configuration for 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 metadata tables 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.
If you also want to integrate your table bucket with Amazon Web Services analytics services so that you can query your metadata table, you need additional permissions. For more information, see Integrating Amazon S3 Tables with Amazon Web Services analytics services in the Amazon S3 User Guide.
To query your metadata tables, you need additional permissions. For more information, see Permissions for querying metadata tables in the Amazon S3 User Guide.
s3:CreateBucketMetadataTableConfiguration
Note
The IAM policy action name is the same for the V1 and V2 API operations.
s3tables:CreateTableBucket
s3tables:CreateNamespace
s3tables:GetTable
s3tables:CreateTable
s3tables:PutTablePolicy
s3tables:PutTableEncryption
kms:DescribeKey
The following operations are related to
CreateBucketMetadataConfiguration
:See also: AWS API Documentation
Request Syntax
response = client.create_bucket_metadata_configuration( Bucket='string', ContentMD5='string', ChecksumAlgorithm='CRC32'|'CRC32C'|'SHA1'|'SHA256'|'CRC64NVME', MetadataConfiguration={ 'JournalTableConfiguration': { 'RecordExpiration': { 'Expiration': 'ENABLED'|'DISABLED', 'Days': 123 }, 'EncryptionConfiguration': { 'SseAlgorithm': 'aws:kms'|'AES256', 'KmsKeyArn': 'string' } }, 'InventoryTableConfiguration': { 'ConfigurationState': 'ENABLED'|'DISABLED', 'EncryptionConfiguration': { 'SseAlgorithm': 'aws:kms'|'AES256', 'KmsKeyArn': 'string' } } }, ExpectedBucketOwner='string' )
- Parameters:
Bucket (string) –
[REQUIRED]
The general purpose bucket that you want to create the metadata configuration for.
ContentMD5 (string) – The
Content-MD5
header for the metadata configuration.ChecksumAlgorithm (string) – The checksum algorithm to use with your metadata configuration.
MetadataConfiguration (dict) –
[REQUIRED]
The contents of your metadata configuration.
JournalTableConfiguration (dict) – [REQUIRED]
The journal table configuration for a metadata configuration.
RecordExpiration (dict) – [REQUIRED]
The journal table record expiration settings for the journal table.
Expiration (string) – [REQUIRED]
Specifies whether journal table record expiration is enabled or disabled.
Days (integer) –
If you enable journal table record expiration, you can set the number of days to retain your journal table records. Journal table records must be retained for a minimum of 7 days. To set this value, specify any whole number from
7
to2147483647
. For example, to retain your journal table records for one year, set this value to365
.
EncryptionConfiguration (dict) –
The encryption configuration for the journal table.
SseAlgorithm (string) – [REQUIRED]
The encryption type specified for a metadata table. To specify server-side encryption with Key Management Service (KMS) keys (SSE-KMS), use the
aws:kms
value. To specify server-side encryption with Amazon S3 managed keys (SSE-S3), use theAES256
value.KmsKeyArn (string) –
If server-side encryption with Key Management Service (KMS) keys (SSE-KMS) is specified, you must also specify the KMS key Amazon Resource Name (ARN). You must specify a customer-managed KMS key that’s located in the same Region as the general purpose bucket that corresponds to the metadata table configuration.
InventoryTableConfiguration (dict) –
The inventory table configuration for a metadata configuration.
ConfigurationState (string) – [REQUIRED]
The configuration state of the inventory table, indicating whether the inventory table is enabled or disabled.
EncryptionConfiguration (dict) –
The encryption configuration for the inventory table.
SseAlgorithm (string) – [REQUIRED]
The encryption type specified for a metadata table. To specify server-side encryption with Key Management Service (KMS) keys (SSE-KMS), use the
aws:kms
value. To specify server-side encryption with Amazon S3 managed keys (SSE-S3), use theAES256
value.KmsKeyArn (string) –
If server-side encryption with Key Management Service (KMS) keys (SSE-KMS) is specified, you must also specify the KMS key Amazon Resource Name (ARN). You must specify a customer-managed KMS key that’s located in the same Region as the general purpose bucket that corresponds to the metadata table configuration.
ExpectedBucketOwner (string) – The expected owner of the general purpose bucket that corresponds to your metadata configuration.
- Returns:
None