We are excited to announce our new API Documentation.
Protected
Gets an object's current legal hold status. For more information, see Locking Objects.
This action is not supported by Amazon S3 on Outposts.
The following action is related to GetObjectLegalHold:
GetObjectLegalHold
GetObjectAttributes
Use a bare-bones client and the command you need to make an API call.
import { S3Client, GetObjectLegalHoldCommand } from "@aws-sdk/client-s3"; // ES Modules import// const { S3Client, GetObjectLegalHoldCommand } = require("@aws-sdk/client-s3"); // CommonJS importconst client = new S3Client(config);const input = { // GetObjectLegalHoldRequest Bucket: "STRING_VALUE", // required Key: "STRING_VALUE", // required VersionId: "STRING_VALUE", RequestPayer: "requester", ExpectedBucketOwner: "STRING_VALUE",};const command = new GetObjectLegalHoldCommand(input);const response = await client.send(command);// { // GetObjectLegalHoldOutput// LegalHold: { // ObjectLockLegalHold// Status: "ON" || "OFF",// },// };
GetObjectLegalHoldCommandInput
GetObjectLegalHoldCommandOutput
input
response
config
S3ServiceException
Base exception class for all service exceptions from S3 service.
Readonly
Static
Gets an object's current legal hold status. For more information, see Locking Objects.
This action is not supported by Amazon S3 on Outposts.
The following action is related to
GetObjectLegalHold
:GetObjectAttributes
Example
Use a bare-bones client and the command you need to make an API call.
Param
GetObjectLegalHoldCommandInput
Returns
GetObjectLegalHoldCommandOutput
See
input
shape.response
shape.config
shape.Throws
S3ServiceException
Base exception class for all service exceptions from S3 service.