Graphon API

S3 · Versioning & retention

GetObjectLockConfiguration

GET/{bucket}?object-lock

Returns the object lock settings of a bucket.

Shows whether object lock is on, and the default retention that new versions get.

View as Markdown
Role
Viewer or higher
Support
Supported
  • Returns the default retention for new versions.

Path parameters

bucketstringrequired

The bucket name.

Query parameters

object-lockflagrequired

Selects this operation. Send it with no value.

Headers

The workspace ID that must own the bucket. Another owner returns 403 AccessDenied.

Responses

200OK

Object lock is on.

application/xml

The root element.

Always Enabled.

Present when the bucket has a default retention.

Errors

Select an error in the response example to see its XML body. Any request can also get the common errors, such as SignatureDoesNotMatch.

404ObjectLockConfigurationNotFoundError

Object lock is off for this bucket.

What to do: Turn it on with PutObjectLockConfiguration.

404NoSuchBucket

No bucket has this name, or the bucket was deleted.

What to do: Check the bucket name. ListBuckets shows the buckets of the workspace.

403AccessDenied

The key does not have the role for this operation, or the bucket is in another workspace.

What to do: Use a key of the workspace that owns the bucket, with the role above.

Was this page helpful?