restore_jobs
Creates, updates, deletes, gets or lists a restore_jobs resource.
Overview
| Name | restore_jobs |
| Type | Resource |
| Id | aws.backup.restore_jobs |
Fields
The following fields are returned by SELECT queries:
- describe_restore_job
- list_restore_jobs
| Name | Datatype | Description |
|---|---|---|
account_id | string | Returns the account ID that owns the restore job. (pattern: <code>^[0-9]{12}$</code>) |
backup_size_in_bytes | integer (int64) | The size, in bytes, of the restored resource. |
backup_vault_arn | string | The Amazon Resource Name (ARN) of the backup vault containing the recovery point being restored. This helps identify vault access policies and permissions. |
completion_date | string (date-time) | The date and time that 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_by | object | Contains identifying information about the creation of a restore job. |
created_resource_arn | string | The Amazon Resource Name (ARN) of the resource that was created by the restore job. The format of the ARN depends on the resource type of the backed-up resource. |
creation_date | string (date-time) | The date and time that 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_status | string | The status of the data generated by the restore test. (DELETING, FAILED, SUCCESSFUL) |
deletion_status_message | string | This describes the restore job deletion status. |
expected_completion_time_minutes | integer (int64) | The amount of time in minutes that a job restoring a recovery point is expected to take. |
iam_role_arn | string | Specifies the IAM role ARN used to create the target recovery point; for example, arn:aws:iam::123456789012:role/S3Access. |
is_parent | boolean | This is a boolean value indicating whether the restore job is a parent (composite) restore job. |
parent_job_id | string | This is the unique identifier of the parent restore job for the selected restore job. |
percent_done | string | Contains an estimated percentage that is complete of a job at the time the job status was queried. |
recovery_point_arn | string | An 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_date | string (date-time) | The creation date of the recovery point made by the specifed restore job. |
resource_type | string | Returns metadata associated with a restore job listed by resource type. (pattern: <code>^[a-zA-Z0-9-_.]{1,50}$</code>) |
restore_job_id | string | Uniquely identifies the job that restores a recovery point. |
source_resource_arn | string | The Amazon Resource Name (ARN) of the original resource that was backed up. This provides context about what resource is being restored. |
status | string | Status code specifying the state of the job that is initiated by Backup to restore a recovery point. (PENDING, RUNNING, COMPLETED, ABORTED, FAILED) |
status_message | string | A message showing the status of a job to restore a recovery point. |
validation_status | string | The status of validation run on the indicated restore job. (FAILED, SUCCESSFUL, TIMED_OUT, VALIDATING) |
validation_status_message | string | The status message. |
| Name | Datatype | Description |
|---|---|---|
account_id | string | The account ID that owns the restore job. (pattern: <code>^[0-9]{12}$</code>) |
backup_size_in_bytes | integer (int64) | The size, in bytes, of the restored resource. |
backup_vault_arn | string | The Amazon Resource Name (ARN) of the backup vault containing the recovery point being restored. This helps identify vault access policies and permissions. |
completion_date | string (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_by | object | Contains identifying information about the creation of a restore job. |
created_resource_arn | string | An Amazon Resource Name (ARN) that uniquely identifies a resource. The format of the ARN depends on the resource type. |
creation_date | string (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_status | string | This notes the status of the data generated by the restore test. The status may be Deleting, Failed, or Successful. (DELETING, FAILED, SUCCESSFUL) |
deletion_status_message | string | This describes the restore job deletion status. |
expected_completion_time_minutes | integer (int64) | The amount of time in minutes that a job restoring a recovery point is expected to take. |
iam_role_arn | string | The IAM role ARN used to create the target recovery point; for example, arn:aws:iam::123456789012:role/S3Access. |
is_parent | boolean | This is a boolean value indicating whether the restore job is a parent (composite) restore job. |
parent_job_id | string | This is the unique identifier of the parent restore job for the selected restore job. |
percent_done | string | Contains an estimated percentage complete of a job at the time the job status was queried. |
recovery_point_arn | string | An 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_date | string (date-time) | The date on which a recovery point was created. |
resource_type | string | The 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_id | string | Uniquely identifies the job that restores a recovery point. |
source_resource_arn | string | The Amazon Resource Name (ARN) of the original resource that was backed up. This provides context about what resource is being restored. |
status | string | A status code specifying the state of the job initiated by Backup to restore a recovery point. (PENDING, RUNNING, COMPLETED, ABORTED, FAILED) |
status_message | string | A detailed message explaining the status of the job to restore a recovery point. |
validation_status | string | The status of validation run on the indicated restore job. (FAILED, SUCCESSFUL, TIMED_OUT, VALIDATING) |
validation_status_message | string | This describes the status of validation run on the indicated restore job. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_restore_job | select | restore_job_id, region | Returns metadata associated with a restore job that is specified by a job ID. | |
list_restore_jobs | select | region | nextToken, maxResults, accountId, resourceType, createdBefore, createdAfter, status, completeBefore, completeAfter, restoreTestingPlanArn, parentJobId | Returns a list of jobs that Backup initiated to restore a saved resource, including details about the recovery process. |
put_restore_validation_result | replace | restore_job_id, region, ValidationStatus | This request allows you to send your independent self-run restore test validation results. RestoreJobId and ValidationStatus are required. Optionally, you can input a ValidationStatusMessage. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
restore_job_id | string | This is a unique identifier of a restore job within Backup. |
accountId | string | The account ID to list the jobs from. Returns only restore jobs associated with the specified account ID. |
completeAfter | string (date-time) | Returns only copy jobs completed after a date expressed in Unix format and Coordinated Universal Time (UTC). |
completeBefore | string (date-time) | Returns only copy jobs completed before a date expressed in Unix format and Coordinated Universal Time (UTC). |
createdAfter | string (date-time) | Returns only restore jobs that were created after the specified date. |
createdBefore | string (date-time) | Returns only restore jobs that were created before the specified date. |
maxResults | integer | The maximum number of items to be returned. |
nextToken | string | The next item following a partial list of returned items. For example, if a request is made 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. |
parentJobId | string | This is a filter to list child (nested) restore jobs based on parent restore job ID. |
resourceType | string | Include this parameter to return only restore jobs for the specified resources: Aurora for Amazon Aurora CloudFormation for CloudFormation DocumentDB for Amazon DocumentDB (with MongoDB compatibility) DynamoDB for Amazon DynamoDB EBS for Amazon Elastic Block Store EC2 for Amazon Elastic Compute Cloud EFS for Amazon Elastic File System EKS for Amazon Elastic Kubernetes Service FSx for Amazon FSx Neptune for Amazon Neptune RDS for Amazon Relational Database Service Redshift for Amazon Redshift S3 for Amazon Simple Storage Service (Amazon S3) SAP HANA on Amazon EC2 for SAP HANA databases on Amazon Elastic Compute Cloud instances Storage Gateway for Storage Gateway Timestream for Amazon Timestream VirtualMachine for VMware virtual machines |
restoreTestingPlanArn | string | This returns only restore testing jobs that match the specified resource Amazon Resource Name (ARN). |
status | string | Returns only restore jobs associated with the specified job status. |
SELECT examples
- describe_restore_job
- list_restore_jobs
Returns metadata associated with a restore job that is specified by a job ID.
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
WHERE restore_job_id = '{{ restore_job_id }}' -- required
AND region = '{{ region }}' -- required
;
Returns a list of jobs that Backup initiated to restore a saved resource, including details about the recovery process.
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
WHERE region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
AND accountId = '{{ accountId }}'
AND resourceType = '{{ resourceType }}'
AND createdBefore = '{{ createdBefore }}'
AND createdAfter = '{{ createdAfter }}'
AND status = '{{ status }}'
AND completeBefore = '{{ completeBefore }}'
AND completeAfter = '{{ completeAfter }}'
AND restoreTestingPlanArn = '{{ restoreTestingPlanArn }}'
AND parentJobId = '{{ parentJobId }}'
;
REPLACE examples
- put_restore_validation_result
This request allows you to send your independent self-run restore test validation results. RestoreJobId and ValidationStatus are required. Optionally, you can input a ValidationStatusMessage.
REPLACE aws.backup.restore_jobs
SET
ValidationStatus = '{{ ValidationStatus }}',
ValidationStatusMessage = '{{ ValidationStatusMessage }}'
WHERE
restore_job_id = '{{ restore_job_id }}' --required
AND region = '{{ region }}' --required
AND ValidationStatus = '{{ ValidationStatus }}' --required;