UpdateBucketMetadataInventoryTableConfiguration
Call UpdateBucketMetadataInventoryTableConfiguration to enable or disable the live inventory table in the metadata management configuration.
Permissions
By default, an Alibaba Cloud account has full permissions. A RAM user or RAM role under an Alibaba Cloud account has no permissions by default; the account or an account administrator must grant the required permissions.
|
API |
Action |
Description |
|
UpdateBucketMetadataInventoryTableConfiguration |
|
Enables or disables the live inventory table. |
When you enable the live inventory table, OSS must create and manage the underlying table resources, so the following dependent permissions are also required:
-
osstables:CreateTableBucket -
osstables:CreateNamespace -
osstables:GetTable -
osstables:CreateTable -
osstables:PutTablePolicy -
osstables:PutTableEncryption -
kms:DescribeKey
Request syntax
PUT /?metadataInventoryTable HTTP/1.1
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Content-Length: ContentLength
Content-MD5: MD5Value
Authorization: SignatureValue
<?xml version="1.0" encoding="UTF-8"?>
<InventoryTableConfiguration>
<ConfigurationState>ENABLED</ConfigurationState>
<EncryptionConfiguration>
<SseAlgorithm>SSE-KMS</SseAlgorithm>
<KmsKeyArn>acs:kms:cn-hangzhou:123456789012:key/key-id</KmsKeyArn>
</EncryptionConfiguration>
</InventoryTableConfiguration>
Request headers
|
Name |
Type |
Required |
Description |
|
Content-MD5 |
String |
No |
The MD5 hash of the request body. |
|
x-oss-expected-bucket-owner |
String |
No |
The expected account ID of the bucket owner. |
Request elements
|
Name |
Type |
Required |
Description |
|
ConfigurationState |
String |
Yes |
Whether the live inventory table is enabled. Valid values: ENABLED, DISABLED. Parent node: InventoryTableConfiguration |
|
EncryptionConfiguration |
Container |
No |
The encryption configuration of the live inventory table. Valid only when ConfigurationState is ENABLED; if it is provided when ConfigurationState is DISABLED, 400 is returned. Parent node: InventoryTableConfiguration |
|
EncryptionConfiguration.SseAlgorithm |
String |
Conditionally required |
The encryption algorithm. Required when EncryptionConfiguration is specified. Parent node: EncryptionConfiguration |
|
EncryptionConfiguration.KmsKeyArn |
String |
Conditionally required |
The ARN of the KMS key. Required when SseAlgorithm is SSE-KMS. Parent node: EncryptionConfiguration |
Response
If the operation succeeds, HTTP status code 200 is returned with an empty response body.
State constraints
Enable operation:
-
The journal table must not be in the CREATING state (both ACTIVE and FAILED are allowed).
-
The live inventory table must currently be DISABLED; otherwise, 400 is returned.
Disable operation:
-
If it is already DISABLED, the operation is idempotent and returns 200.
-
The operation is rejected (400) when the live inventory table is CREATING; BACKFILLING, ACTIVE, and FAILED are all allowed.
To re-enable a live inventory table that is in the FAILED state, first disable it and delete the old table, and then enable it again.
Response headers
This operation uses only common response headers. For more information, see Common response headers.
Examples
-
Sample request
PUT /?metadataInventoryTable HTTP/1.1 Host: examplebucket.oss-cn-hangzhou.aliyuncs.com Date: Wed, 16 Sep 2026 12:00:00 GMT Authorization: SignatureValue <?xml version="1.0" encoding="UTF-8"?> <InventoryTableConfiguration> <ConfigurationState>ENABLED</ConfigurationState> </InventoryTableConfiguration> -
Sample response
HTTP/1.1 200 OK
SDK
The SDKs for UpdateBucketMetadataInventoryTableConfiguration in each language are as follows:
ossutil command-line interface
For the ossutil command that corresponds to UpdateBucketMetadataInventoryTableConfiguration, see update-bucket-metadata-inventory-table-configuration.