Protected
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:
GetObjectRetention
GetObjectAttributes
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 importconst 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);
GetObjectRetentionCommandInput
GetObjectRetentionCommandOutput
input
response
config
Readonly
Static
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
:GetObjectAttributes
Example
Use a bare-bones client and the command you need to make an API call.
Param
GetObjectRetentionCommandInput
Returns
GetObjectRetentionCommandOutput
See
input
shape.response
shape.config
shape.