CreateLegalHold - AWS Backup

CreateLegalHold

This action 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

This is the string 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

This specifies 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

This is the string 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

Time in number format when legal hold was created.

Type: Timestamp

Description

This is the returned string description of the legal hold.

Type: String

LegalHoldArn

This is the ARN (Amazon Resource Number) of the created legal hold.

Type: String

LegalHoldId

Legal hold ID returned for the specified legal hold on a recovery point.

Type: String

RecoveryPointSelection

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

Type: RecoveryPointSelection object

Status

This displays the status of the legal hold returned after creating the legal hold. Statuses can be ACTIVE, PENDING, CANCELED, CANCELING, or FAILED.

Type: String

Valid Values: CREATING | ACTIVE | CANCELING | CANCELED

Title

This is the string title of the legal hold returned after creating 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: