S3Control / Client / get_bucket_versioning
get_bucket_versioning#
- S3Control.Client.get_bucket_versioning(**kwargs)#
Note
This operation returns the versioning state for S3 on Outposts buckets only. To return the versioning state for an S3 bucket, see GetBucketVersioning in the Amazon S3 API Reference.
Returns the versioning state for an S3 on Outposts bucket. With S3 Versioning, you can save multiple distinct copies of your objects and recover from unintended user actions and application failures.
If you’ve never set versioning on your bucket, it has no versioning state. In that case, the
GetBucketVersioning
request does not return a versioning state value.For more information about versioning, see Versioning in the Amazon S3 User Guide.
All Amazon S3 on Outposts REST API requests for this action require an additional parameter of
x-amz-outpost-id
to be passed with the request. In addition, you must use an S3 on Outposts endpoint hostname prefix instead ofs3-control
. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and thex-amz-outpost-id
derived by using the access point ARN, see the Examples section.The following operations are related to
GetBucketVersioning
for S3 on Outposts.See also: AWS API Documentation
Request Syntax
response = client.get_bucket_versioning( AccountId='string', Bucket='string' )
- Parameters:
AccountId (string) –
[REQUIRED]
The Amazon Web Services account ID of the S3 on Outposts bucket.
Bucket (string) –
[REQUIRED]
The S3 on Outposts bucket to return the versioning state for.
- Return type:
dict
- Returns:
Response Syntax
{ 'Status': 'Enabled'|'Suspended', 'MFADelete': 'Enabled'|'Disabled' }
Response Structure
(dict) –
Status (string) –
The versioning state of the S3 on Outposts bucket.
MFADelete (string) –
Specifies whether MFA delete is enabled in the bucket versioning configuration. This element is returned only if the bucket has been configured with MFA delete. If MFA delete has never been configured for the bucket, this element is not returned.