S3 · Versioning & retention
GetBucketVersioning
/{bucket}?versioningReturns the versioning state of a bucket.
A bucket starts with versioning off. Turn it on with PutBucketVersioning.
- Role
- Viewer or higher
- Support
- Supported
- Returns empty, Enabled, or Suspended.
Path parameters
The bucket name.
Query parameters
Selects this operation. Send it with no value.
Headers
The workspace ID that must own the bucket. Another owner returns 403 AccessDenied.
Responses
200OK
The versioning state.
application/xml
The root element.
StatusstringAbsent when versioning was never turned on.
- Enabled
- Storage keeps every version.
- Suspended
- Storage keeps no new versions.
Errors
Select an error in the response example to see its XML body. Any request can also get the common errors, such as SignatureDoesNotMatch.
- 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.