GetLegalHoldCommand

This action returns details for a specified legal hold. The details are the body of a legal hold in JSON format, in addition to metadata.

Example Syntax

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

import { BackupClient, GetLegalHoldCommand } from "@aws-sdk/client-backup"; // ES Modules import
// const { BackupClient, GetLegalHoldCommand } = require("@aws-sdk/client-backup"); // CommonJS import
const client = new BackupClient(config);
const input = { // GetLegalHoldInput
  LegalHoldId: "STRING_VALUE", // required
};
const command = new GetLegalHoldCommand(input);
const response = await client.send(command);
// { // GetLegalHoldOutput
//   Title: "STRING_VALUE",
//   Status: "CREATING" || "ACTIVE" || "CANCELING" || "CANCELED",
//   Description: "STRING_VALUE",
//   CancelDescription: "STRING_VALUE",
//   LegalHoldId: "STRING_VALUE",
//   LegalHoldArn: "STRING_VALUE",
//   CreationDate: new Date("TIMESTAMP"),
//   CancellationDate: new Date("TIMESTAMP"),
//   RetainRecordUntil: 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
//     },
//   },
// };

GetLegalHoldCommand Input

See GetLegalHoldCommandInput for more details

Parameter
Type
Description
LegalHoldId
Required
string | undefined

The ID of the legal hold.

GetLegalHoldCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
CancelDescription
string | undefined

The reason for removing the legal hold.

CancellationDate
Date | undefined

The time when the legal hold was cancelled.

CreationDate
Date | undefined

The time when the legal hold was created.

Description
string | undefined

The description of the legal hold.

LegalHoldArn
string | undefined

The framework ARN for the specified legal hold. The format of the ARN depends on the resource type.

LegalHoldId
string | undefined

The ID of the legal hold.

RecoveryPointSelection
RecoveryPointSelection | undefined

The criteria to assign a set of resources, such as resource types or backup vaults.

RetainRecordUntil
Date | undefined

The date and time until which the legal hold record is retained.

Status
LegalHoldStatus | undefined

The status of the legal hold.

Title
string | undefined

The title of the legal hold.

Throws

Name
Fault
Details
InvalidParameterValueException
client

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

MissingParameterValueException
client

Indicates that a required parameter is missing.

ResourceNotFoundException
client

A resource that is required for the action doesn't exist.

ServiceUnavailableException
server

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

BackupServiceException
Base exception class for all service exceptions from Backup service.