restore_jobs_by_protected_resources
Creates, updates, deletes, gets or lists a restore_jobs_by_protected_resources resource.
Overview
| Name | restore_jobs_by_protected_resources |
| Type | Resource |
| Id | aws.backup.restore_jobs_by_protected_resources |
Fields
The following fields are returned by SELECT queries:
- list_restore_jobs_by_protected_resource
| 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 |
|---|---|---|---|---|
list_restore_jobs_by_protected_resource | select | resource_arn, region | status, recoveryPointCreationDateAfter, recoveryPointCreationDateBefore, nextToken, maxResults | This 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
resource_arn | string | Returns only restore jobs that match the specified resource Amazon Resource Name (ARN). |
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 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. |
recoveryPointCreationDateAfter | string (date-time) | Returns only restore jobs of recovery points that were created after the specified date. |
recoveryPointCreationDateBefore | string (date-time) | Returns only restore jobs of recovery points that were created before the specified date. |
status | string | Returns only restore jobs associated with the specified job status. |
SELECT examples
- list_restore_jobs_by_protected_resource
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 }}'
;