CreateLegalHold - AWS Backup

CreateLegalHold

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.

Request Syntax

POST /legal-holds/ HTTP/1.1 Content-type: application/json { "Description": "string", "IdempotencyToken": "string", "RecoveryPointSelection": { "DateRange": { "FromDate": number, "ToDate": number }, "ResourceIdentifiers": [ "string" ], "VaultNames": [ "string" ] }, "Tags": { "string" : "string" }, "Title": "string" }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

Description

The description of the legal hold.

Type: String

Required: Yes

IdempotencyToken

This is a user-chosen string used to distinguish between otherwise identical calls. Retrying a successful request with the same idempotency token results in a success message with no action taken.

Type: String

Required: No

RecoveryPointSelection

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

Type: RecoveryPointSelection object

Required: No

Tags

Optional tags to include. A tag is a key-value pair you can use to manage, filter, and search for your resources. Allowed characters include UTF-8 letters, numbers, spaces, and the following characters: + - = . _ : /.

Type: String to string map

Required: No

Title

The title of the legal hold.

Type: String

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "CreationDate": number, "Description": "string", "LegalHoldArn": "string", "LegalHoldId": "string", "RecoveryPointSelection": { "DateRange": { "FromDate": number, "ToDate": number }, "ResourceIdentifiers": [ "string" ], "VaultNames": [ "string" ] }, "Status": "string", "Title": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

CreationDate

The time when the legal hold was created.

Type: Timestamp

Description

The description of the legal hold.

Type: String

LegalHoldArn

The Amazon Resource Name (ARN) of the legal hold.

Type: String

LegalHoldId

The ID of the legal hold.

Type: String

RecoveryPointSelection

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

Type: RecoveryPointSelection object

Status

The status of the legal hold.

Type: String

Valid Values: CREATING | ACTIVE | CANCELING | CANCELED

Title

The title of the legal hold.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors.

InvalidParameterValueException

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

HTTP Status Code: 400

LimitExceededException

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

HTTP Status Code: 400

MissingParameterValueException

Indicates that a required parameter is missing.

HTTP Status Code: 400

ServiceUnavailableException

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

HTTP Status Code: 500

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: