Jump to Content

Class GetObjectRetentionCommandProtected

Retrieves an object's retention settings. For more information, see Locking Objects.

This action is not supported by Amazon S3 on Outposts.

The following action is related to GetObjectRetention:

Example

Use a bare-bones client and the command you need to make an API call.

import { S3Client, GetObjectRetentionCommand } from "@aws-sdk/client-s3"; // ES Modules import
// const { S3Client, GetObjectRetentionCommand } = require("@aws-sdk/client-s3"); // CommonJS import
const client = new S3Client(config);
const input = { // GetObjectRetentionRequest
Bucket: "STRING_VALUE", // required
Key: "STRING_VALUE", // required
VersionId: "STRING_VALUE",
RequestPayer: "requester",
ExpectedBucketOwner: "STRING_VALUE",
};
const command = new GetObjectRetentionCommand(input);
const response = await client.send(command);

Param

GetObjectRetentionCommandInput

Returns

GetObjectRetentionCommandOutput

See

Hierarchy

Constructors

Properties

Methods