Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GetBucketVersioningCommand

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:

example

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);
see

GetBucketVersioningCommandInput for command's input shape.

see

GetBucketVersioningCommandOutput for command's response shape.

see

config for S3Client's config shape.

Hierarchy

Implements

Index

Constructors

Properties

Constructors

constructor

Properties

Readonly input

input: GetBucketVersioningCommandInput

Readonly middlewareStack