Skip to main content

restore_jobs_by_protected_resources

Creates, updates, deletes, gets or lists a restore_jobs_by_protected_resources resource.

Overview

Namerestore_jobs_by_protected_resources
TypeResource
Idaws.backup.restore_jobs_by_protected_resources

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_idstringThe account ID that owns the restore job. (pattern: <code>^[0-9]{12}$</code>)
backup_size_in_bytesinteger (int64)The size, in bytes, of the restored resource.
backup_vault_arnstringThe Amazon Resource Name (ARN) of the backup vault containing the recovery point being restored. This helps identify vault access policies and permissions.
completion_datestring (date-time)The date and time a job to restore a recovery point is completed, in Unix format and Coordinated Universal Time (UTC). The value of CompletionDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
created_byobjectContains identifying information about the creation of a restore job.
created_resource_arnstringAn Amazon Resource Name (ARN) that uniquely identifies a resource. The format of the ARN depends on the resource type.
creation_datestring (date-time)The date and time a restore job is created, in Unix format and Coordinated Universal Time (UTC). The value of CreationDate is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.
deletion_statusstringThis notes the status of the data generated by the restore test. The status may be Deleting, Failed, or Successful. (DELETING, FAILED, SUCCESSFUL)
deletion_status_messagestringThis describes the restore job deletion status.
expected_completion_time_minutesinteger (int64)The amount of time in minutes that a job restoring a recovery point is expected to take.
iam_role_arnstringThe IAM role ARN used to create the target recovery point; for example, arn:aws:iam::123456789012:role/S3Access.
is_parentbooleanThis is a boolean value indicating whether the restore job is a parent (composite) restore job.
parent_job_idstringThis is the unique identifier of the parent restore job for the selected restore job.
percent_donestringContains an estimated percentage complete of a job at the time the job status was queried.
recovery_point_arnstringAn ARN that uniquely identifies a recovery point; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45.
recovery_point_creation_datestring (date-time)The date on which a recovery point was created.
resource_typestringThe resource type of the listed restore jobs; for example, an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database Service (Amazon RDS) database. For Windows Volume Shadow Copy Service (VSS) backups, the only supported resource type is Amazon EC2. (pattern: <code>^[a-zA-Z0-9-_.]{1,50}$</code>)
restore_job_idstringUniquely identifies the job that restores a recovery point.
source_resource_arnstringThe Amazon Resource Name (ARN) of the original resource that was backed up. This provides context about what resource is being restored.
statusstringA status code specifying the state of the job initiated by Backup to restore a recovery point. (PENDING, RUNNING, COMPLETED, ABORTED, FAILED)
status_messagestringA detailed message explaining the status of the job to restore a recovery point.
validation_statusstringThe status of validation run on the indicated restore job. (FAILED, SUCCESSFUL, TIMED_OUT, VALIDATING)
validation_status_messagestringThis describes the status of validation run on the indicated restore job.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_restore_jobs_by_protected_resourceselectresource_arn, regionstatus, recoveryPointCreationDateAfter, recoveryPointCreationDateBefore, nextToken, maxResultsThis returns restore jobs that contain the specified protected resource. You must include ResourceArn. You can optionally include NextToken, ByStatus, MaxResults, ByRecoveryPointCreationDateAfter , and ByRecoveryPointCreationDateBefore.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)
resource_arnstringReturns only restore jobs that match the specified resource Amazon Resource Name (ARN).
maxResultsintegerThe maximum number of items to be returned.
nextTokenstringThe next item following a partial list of returned items. For example, if a request ismade to return MaxResults number of items, NextToken allows you to return more items in your list starting at the location pointed to by the next token.
recoveryPointCreationDateAfterstring (date-time)Returns only restore jobs of recovery points that were created after the specified date.
recoveryPointCreationDateBeforestring (date-time)Returns only restore jobs of recovery points that were created before the specified date.
statusstringReturns only restore jobs associated with the specified job status.

SELECT examples

This returns restore jobs that contain the specified protected resource. You must include ResourceArn. You can optionally include NextToken, ByStatus, MaxResults, ByRecoveryPointCreationDateAfter , and ByRecoveryPointCreationDateBefore.

SELECT
account_id,
backup_size_in_bytes,
backup_vault_arn,
completion_date,
created_by,
created_resource_arn,
creation_date,
deletion_status,
deletion_status_message,
expected_completion_time_minutes,
iam_role_arn,
is_parent,
parent_job_id,
percent_done,
recovery_point_arn,
recovery_point_creation_date,
resource_type,
restore_job_id,
source_resource_arn,
status,
status_message,
validation_status,
validation_status_message
FROM aws.backup.restore_jobs_by_protected_resources
WHERE resource_arn = '{{ resource_arn }}' -- required
AND region = '{{ region }}' -- required
AND status = '{{ status }}'
AND recoveryPointCreationDateAfter = '{{ recoveryPointCreationDateAfter }}'
AND recoveryPointCreationDateBefore = '{{ recoveryPointCreationDateBefore }}'
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;