Retrieves the automatic maintenance configuration for a specified table.
Usage notes
-
The response includes configurations for all maintenance types, such as
icebergCompaction(table compression) andicebergSnapshotManagement(snapshot management). -
The configuration for each maintenance type includes its
statusandsettings.
Permissions
|
API |
Action |
Description |
|
GetTableMaintenanceConfiguration |
oss:GetTableMaintenanceConfiguration |
Retrieves the table maintenance configuration. This operation also checks the table policy. Admin users are exempt from this check. |
Request syntax
GET /tables/{tableBucketARN}/{namespace}/{name}/maintenance HTTP/1.1
Host: cn-hangzhou.oss-tables.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue
Request parameters
|
Parameter |
Type |
Required |
Example value |
Description |
|
tableBucketARN |
String |
Yes |
acs:osstables:cn-hangzhou:1234567890:bucket/my-table-bucket |
The ARN of the table bucket in the format |
|
namespace |
String |
Yes |
my_namespace |
The namespace of the table. Specified in the URI path. |
|
name |
String |
Yes |
my_table |
The name of the table. Specified in the URI path. |
Response parameters
|
Parameter |
Type |
Example value |
Description |
|
tableARN |
String |
acs:osstables:cn-hangzhou:1234567890:bucket/my-table-bucket/table/table-id |
The ARN of the table. |
|
configuration |
container |
- |
The maintenance configuration, which includes two child objects: |
Examples
Request example
GET /tables/acs%3Aosstables%3Acn-hangzhou%3A1234567890%3Abucket%2Fmy-table-bucket/my_namespace/my_table/maintenance HTTP/1.1
Host: cn-hangzhou.oss-tables.aliyuncs.com
Date: Thu, 10 Apr 2025 08:00:00 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/osstables/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c****
Response example
HTTP/1.1 200 OK
Server: AliyunOSS
x-oss-request-id: 5C06A3B67B8B5A3DA422****
x-oss-server-time: 3
Content-Type: application/json
{
"tableARN": "acs:osstables:cn-hangzhou:1234567890:bucket/my-table-bucket/table/table_id",
"configuration": {
"icebergCompaction": {
"status": "enabled",
"settings": {
"icebergCompaction": {
"targetFileSizeMB": 512,
"strategy": "auto"
}
}
},
"icebergSnapshotManagement": {
"status": "enabled",
"settings": {
"icebergSnapshotManagement": {
"minSnapshotsToKeep": 1,
"maxSnapshotAgeHours": 120
}
}
}
}
}
SDK
This operation is available in the following SDKs:
ossutil CLI
The ossutil command for this operation is get-table-maintenance-configuration.
Error codes
|
Error code |
HTTP status code |
Description |
|
ForbiddenException |
403 |
The caller does not have the required permissions to perform this request. |
|
NotFoundException |
404 |
The requested resource does not exist. |