Skip to content
Start here

Maintenance Configs

Get table maintenance configuration
r2_data_catalog.namespaces.tables.maintenance_configs.get(strtable_name, MaintenanceConfigGetParams**kwargs) -> MaintenanceConfigGetResponse
GET/accounts/{account_id}/r2-catalog/{bucket_name}/namespaces/{namespace}/tables/{table_name}/maintenance-configs
Update table maintenance configuration
r2_data_catalog.namespaces.tables.maintenance_configs.update(strtable_name, MaintenanceConfigUpdateParams**kwargs) -> MaintenanceConfigUpdateResponse
POST/accounts/{account_id}/r2-catalog/{bucket_name}/namespaces/{namespace}/tables/{table_name}/maintenance-configs
ModelsExpand Collapse
class MaintenanceConfigGetResponse:

Contains table maintenance configuration.

maintenance_config: MaintenanceConfig

Configures maintenance for the table.

compaction: Optional[MaintenanceConfigCompaction]

Configures compaction settings for table optimization.

state: Literal["enabled", "disabled"]

Specifies the state of maintenance operations.

One of the following:
"enabled"
"disabled"
target_size_mb: Literal["64", "128", "256", "512"]

Sets the target file size for compaction in megabytes. Defaults to “128”.

One of the following:
"64"
"128"
"256"
"512"
snapshot_expiration: Optional[MaintenanceConfigSnapshotExpiration]

Configures snapshot expiration settings.

max_snapshot_age: str

Specifies the maximum age for snapshots. The system deletes snapshots older than this age. Format: where unit is d (days), h (hours), m (minutes), or s (seconds). Examples: “7d” (7 days), “48h” (48 hours), “2880m” (2,880 minutes). Defaults to “7d”.

min_snapshots_to_keep: int

Specifies the minimum number of snapshots to retain. Defaults to 100.

formatint64
minimum1
state: Literal["enabled", "disabled"]

Specifies the state of maintenance operations.

One of the following:
"enabled"
"disabled"
class MaintenanceConfigUpdateResponse:

Configures maintenance for the table.

compaction: Optional[Compaction]

Configures compaction settings for table optimization.

state: Literal["enabled", "disabled"]

Specifies the state of maintenance operations.

One of the following:
"enabled"
"disabled"
target_size_mb: Literal["64", "128", "256", "512"]

Sets the target file size for compaction in megabytes. Defaults to “128”.

One of the following:
"64"
"128"
"256"
"512"
snapshot_expiration: Optional[SnapshotExpiration]

Configures snapshot expiration settings.

max_snapshot_age: str

Specifies the maximum age for snapshots. The system deletes snapshots older than this age. Format: where unit is d (days), h (hours), m (minutes), or s (seconds). Examples: “7d” (7 days), “48h” (48 hours), “2880m” (2,880 minutes). Defaults to “7d”.

min_snapshots_to_keep: int

Specifies the minimum number of snapshots to retain. Defaults to 100.

formatint64
minimum1
state: Literal["enabled", "disabled"]

Specifies the state of maintenance operations.

One of the following:
"enabled"
"disabled"