Skip to content

Object Lock: Manage the Compliance Lock

Last updated on

The Compliance Lock is the project-level switch that enables S3 Object Lock for all buckets in a STACKIT project. It must be activated before you can create buckets with Object Lock or configure retention policies.

  • A STACKIT project with Object Storage enabled
  • Appropriate project permissions

Activate the Compliance Lock for your project:

curl -X POST \
"https://object-storage.api.{region}.stackit.cloud/v1/project/{projectId}/compliance-lock" \
-H "Authorization: Bearer $TOKEN"

Response (HTTP 201):

{
"project": "cd5e788d-5b7b-4ab9-a20d-e790205df10b",
"maxRetentionDays": 365
}
curl -X GET \
"https://object-storage.api.{region}.stackit.cloud/v1/project/{projectId}/compliance-lock" \
-H "Authorization: Bearer $TOKEN"

Response (HTTP 200):

{
"project": "cd5e788d-5b7b-4ab9-a20d-e790205df10b",
"maxRetentionDays": 365
}

Returns HTTP 404 if the Compliance Lock is not active.

curl -X DELETE \
"https://object-storage.api.{region}.stackit.cloud/v1/project/{projectId}/compliance-lock" \
-H "Authorization: Bearer $TOKEN"

Response (HTTP 200):

{
"project": "cd5e788d-5b7b-4ab9-a20d-e790205df10b",
"maxRetentionDays": 365
}

Important: The Compliance Lock can only be disabled if no buckets with Object Lock exist in the project. Since Object Lock cannot be removed from an existing bucket, you must delete all Object Lock-enabled buckets before you can disable the Compliance Lock.

Note: Buckets without Object Lock are not affected and do not need to be deleted.

A project with an active Compliance Lock cannot be deleted. Both the regular project deletion and force-delete endpoints return HTTP 409 Conflict if the Compliance Lock is active.

To delete a project, you must first disable the Compliance Lock.