IBM COS SDK for JavaScript V2 - v1.0.0
    Preparing search index...

    Adds a legal hold to an object.

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

    import { S3Client, AddLegalHoldCommand } from "ibm-cos-sdk-v2"; // ES Modules import
    // const { S3Client, AddLegalHoldCommand } = require("ibm-cos-sdk-v2"); // CommonJS import
    // import type { S3ClientConfig } from "ibm-cos-sdk-v2";
    const config = {}; // type is S3ClientConfig
    const client = new S3Client(config);
    const input = { // AddLegalHoldInput
    Bucket: "STRING_VALUE", // required
    Key: "STRING_VALUE", // required
    RetentionLegalHoldId: "STRING_VALUE", // required
    };
    const command = new AddLegalHoldCommand(input);
    const response = await client.send(command);
    // {};

    AddLegalHoldCommandInput

    S3ServiceException

    Base exception class for all service exceptions from S3 service.

    Hierarchy

    Index

    Constructors

    Constructors

    • Parameters

      Returns AddLegalHoldCommand

    • Parameters

      Returns AddLegalHoldCommand