import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { CreateLegalHoldInput, CreateLegalHoldOutput } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; /** * @public * * The input for {@link CreateLegalHoldCommand}. */ export interface CreateLegalHoldCommandInput extends CreateLegalHoldInput { } /** * @public * * The output of {@link CreateLegalHoldCommand}. */ export interface CreateLegalHoldCommandOutput extends CreateLegalHoldOutput, __MetadataBearer { } declare const CreateLegalHoldCommand_base: { new (input: CreateLegalHoldCommandInput): import("@smithy/core/client").CommandImpl; new (input: CreateLegalHoldCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions; }; /** *

Creates a legal hold on a recovery point (backup). A legal hold is a restraint on * altering or deleting a backup until an authorized user cancels the legal hold. Any actions * to delete or disassociate a recovery point will fail with an error if one or more active * legal holds are on the recovery point.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { BackupClient, CreateLegalHoldCommand } from "@aws-sdk/client-backup"; // ES Modules import * // const { BackupClient, CreateLegalHoldCommand } = require("@aws-sdk/client-backup"); // CommonJS import * // import type { BackupClientConfig } from "@aws-sdk/client-backup"; * const config = {}; // type is BackupClientConfig * const client = new BackupClient(config); * const input = { // CreateLegalHoldInput * Title: "STRING_VALUE", // required * Description: "STRING_VALUE", // required * IdempotencyToken: "STRING_VALUE", * RecoveryPointSelection: { // RecoveryPointSelection * VaultNames: [ // VaultNames * "STRING_VALUE", * ], * ResourceIdentifiers: [ // ResourceIdentifiers * "STRING_VALUE", * ], * DateRange: { // DateRange * FromDate: new Date("TIMESTAMP"), // required * ToDate: new Date("TIMESTAMP"), // required * }, * }, * Tags: { // Tags * "": "STRING_VALUE", * }, * }; * const command = new CreateLegalHoldCommand(input); * const response = await client.send(command); * // { // CreateLegalHoldOutput * // Title: "STRING_VALUE", * // Status: "CREATING" || "ACTIVE" || "CANCELING" || "CANCELED", * // Description: "STRING_VALUE", * // LegalHoldId: "STRING_VALUE", * // LegalHoldArn: "STRING_VALUE", * // CreationDate: new Date("TIMESTAMP"), * // RecoveryPointSelection: { // RecoveryPointSelection * // VaultNames: [ // VaultNames * // "STRING_VALUE", * // ], * // ResourceIdentifiers: [ // ResourceIdentifiers * // "STRING_VALUE", * // ], * // DateRange: { // DateRange * // FromDate: new Date("TIMESTAMP"), // required * // ToDate: new Date("TIMESTAMP"), // required * // }, * // }, * // }; * * ``` * * @param CreateLegalHoldCommandInput - {@link CreateLegalHoldCommandInput} * @returns {@link CreateLegalHoldCommandOutput} * @see {@link CreateLegalHoldCommandInput} for command's `input` shape. * @see {@link CreateLegalHoldCommandOutput} for command's `response` shape. * @see {@link BackupClientResolvedConfig | config} for BackupClient's `config` shape. * * @throws {@link InvalidParameterValueException} (client fault) *

Indicates that something is wrong with a parameter's value. For example, the value is * out of range.

* * @throws {@link LimitExceededException} (client fault) *

A limit in the request has been exceeded; for example, a maximum number of items allowed * in a request.

* * @throws {@link MissingParameterValueException} (client fault) *

Indicates that a required parameter is missing.

* * @throws {@link ServiceUnavailableException} (server fault) *

The request failed due to a temporary failure of the server.

* * @throws {@link BackupServiceException} *

Base exception class for all service exceptions from Backup service.

* * * @public */ export declare class CreateLegalHoldCommand extends CreateLegalHoldCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: CreateLegalHoldInput; output: CreateLegalHoldOutput; }; sdk: { input: CreateLegalHoldCommandInput; output: CreateLegalHoldCommandOutput; }; }; }