get-bucket-versioning¶
Returns the versioning state of a bucket.
See also: GET Bucket Versioning.
Synopsis¶
get-bucket-versioning
--bucket <value>
[--cli-input-json <value>]
Options¶
--bucket
(string)
--cli-input-json
(string)
Operates a service or services based on the provided JSON string. If other arguments are provided on the command line, the CLI values override the JSON-provided values. You cannot pass arbitrary binary values using a JSON-provided value, because the string is taken literally.
Examples¶
The following command retrieves the versioning configuration for a bucket named “my-bucket”:
$ aws s3api get-bucket-versioning --bucket my-bucket
Output:
{
"Status": "Enabled"
}
Output¶
Status -> (string)
The versioning state of the bucket.
MFADelete -> (string)
Specifies whether MFA delete is enabled in the bucket versioning configuration. This element is only returned if the bucket has been configured with MFA delete. If the bucket has never been so configured, this element is not returned.