Skip to content
Start here

Maintenance Configs

Get catalog maintenance configuration
GET/accounts/{account_id}/r2-catalog/{bucket_name}/maintenance-configs
Update catalog maintenance configuration
POST/accounts/{account_id}/r2-catalog/{bucket_name}/maintenance-configs
ModelsExpand Collapse
MaintenanceConfigGetResponse { credential_status, maintenance_config }

Contains maintenance configuration and credential status.

credential_status: "present" or "absent"

Shows the credential configuration status.

One of the following:
"present"
"absent"
maintenance_config: { compaction, snapshot_expiration }

Configures maintenance for the catalog.

compaction: optional { state, target_size_mb }

Configures compaction for catalog maintenance.

state: "enabled" or "disabled"

Specifies the state of maintenance operations.

One of the following:
"enabled"
"disabled"
target_size_mb: "64" or "128" or "256" or "512"

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

One of the following:
"64"
"128"
"256"
"512"
snapshot_expiration: optional { max_snapshot_age, min_snapshots_to_keep, state }

Configures snapshot expiration settings.

max_snapshot_age: string

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: number

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

formatint64
minimum1
state: "enabled" or "disabled"

Specifies the state of maintenance operations.

One of the following:
"enabled"
"disabled"
MaintenanceConfigUpdateResponse { compaction, snapshot_expiration }

Configures maintenance for the catalog.

compaction: optional { state, target_size_mb }

Configures compaction for catalog maintenance.

state: "enabled" or "disabled"

Specifies the state of maintenance operations.

One of the following:
"enabled"
"disabled"
target_size_mb: "64" or "128" or "256" or "512"

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

One of the following:
"64"
"128"
"256"
"512"
snapshot_expiration: optional { max_snapshot_age, min_snapshots_to_keep, state }

Configures snapshot expiration settings.

max_snapshot_age: string

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: number

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

formatint64
minimum1
state: "enabled" or "disabled"

Specifies the state of maintenance operations.

One of the following:
"enabled"
"disabled"