protected_resources
Creates, updates, deletes, gets or lists a protected_resources resource.
Overview
| Name | protected_resources |
| Type | Resource |
| Id | aws.backup.protected_resources |
Fields
The following fields are returned by SELECT queries:
- describe_protected_resource
- list_protected_resources
| Name | Datatype | Description |
|---|---|---|
last_backup_time | string (date-time) | The date and time that a resource was last backed up, in Unix format and Coordinated Universal Time (UTC). The value of LastBackupTime is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. |
last_backup_vault_arn | string | The ARN (Amazon Resource Name) of the backup vault that contains the most recent backup recovery point. |
last_recovery_point_arn | string | The ARN (Amazon Resource Name) of the most recent recovery point. |
latest_restore_execution_time_minutes | integer (int64) | The time, in minutes, that the most recent restore job took to complete. |
latest_restore_job_creation_date | string (date-time) | The creation date of the most recent restore job. |
latest_restore_recovery_point_creation_date | string (date-time) | The date the most recent recovery point was created. |
resource_arn | string | An ARN that uniquely identifies a resource. The format of the ARN depends on the resource type. |
resource_name | string | The name of the resource that belongs to the specified backup. |
resource_type | string | The type of Amazon Web Services resource saved as a recovery point; for example, an Amazon EBS volume or an Amazon RDS database. (pattern: <code>^[a-zA-Z0-9-_.]{1,50}$</code>) |
| Name | Datatype | Description |
|---|---|---|
last_backup_time | string (date-time) | The date and time a resource was last backed up, in Unix format and Coordinated Universal Time (UTC). The value of LastBackupTime is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM. |
last_backup_vault_arn | string | The ARN (Amazon Resource Name) of the backup vault that contains the most recent backup recovery point. |
last_recovery_point_arn | string | The ARN (Amazon Resource Name) of the most recent recovery point. |
resource_arn | string | An Amazon Resource Name (ARN) that uniquely identifies a resource. The format of the ARN depends on the resource type. |
resource_name | string | The non-unique name of the resource that belongs to the specified backup. |
resource_type | string | The type of Amazon Web Services resource; 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>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_protected_resource | select | resource_arn, region | Returns information about a saved resource, including the last time it was backed up, its Amazon Resource Name (ARN), and the Amazon Web Services service type of the saved resource. | |
list_protected_resources | select | region | nextToken, maxResults | Returns an array of resources with recovery points created by Backup (regardless of the recovery point's status), including the time the resource was saved, an Amazon Resource Name (ARN) of the resource, and a resource type. |
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 | An Amazon Resource Name (ARN) that uniquely identifies a resource. The format of the ARN depends on the resource type. |
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. |
SELECT examples
- describe_protected_resource
- list_protected_resources
Returns information about a saved resource, including the last time it was backed up, its Amazon Resource Name (ARN), and the Amazon Web Services service type of the saved resource.
SELECT
last_backup_time,
last_backup_vault_arn,
last_recovery_point_arn,
latest_restore_execution_time_minutes,
latest_restore_job_creation_date,
latest_restore_recovery_point_creation_date,
resource_arn,
resource_name,
resource_type
FROM aws.backup.protected_resources
WHERE resource_arn = '{{ resource_arn }}' -- required
AND region = '{{ region }}' -- required
;
Returns an array of resources with recovery points created by Backup (regardless of the recovery point's status), including the time the resource was saved, an Amazon Resource Name (ARN) of the resource, and a resource type.
SELECT
last_backup_time,
last_backup_vault_arn,
last_recovery_point_arn,
resource_arn,
resource_name,
resource_type
FROM aws.backup.protected_resources
WHERE region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;