To retrieve the versioning state of a bucket, you must be the bucket owner.
This implementation also returns the MFA Delete status of the versioning state. If the
MFA Delete status is enabled, the bucket owner must use an authentication
device to change the versioning state of the bucket.
The following operations are related to GetBucketVersioning:
Returns the versioning state of a bucket.
To retrieve the versioning state of a bucket, you must be the bucket owner.
This implementation also returns the MFA Delete status of the versioning state. If the MFA Delete status is
enabled
, the bucket owner must use an authentication device to change the versioning state of the bucket.The following operations are related to
GetBucketVersioning
:GetObject
PutObject
DeleteObject
Use a bare-bones client and the command you need to make an API call.
import { S3Client, GetBucketVersioningCommand } from "@aws-sdk/client-s3"; // ES Modules import // const { S3Client, GetBucketVersioningCommand } = require("@aws-sdk/client-s3"); // CommonJS import const client = new S3Client(config); const command = new GetBucketVersioningCommand(input); const response = await client.send(command);
GetBucketVersioningCommandInput for command's
input
shape.GetBucketVersioningCommandOutput for command's
response
shape.config for S3Client's
config
shape.