backup_selections
Creates, updates, deletes or gets a backup_selection resource or lists backup_selections in a region
Overview
| Name | backup_selections |
| Type | Resource |
| Description | Resource Type definition for AWS::Backup::BackupSelection |
| Id | awscc.backup.backup_selections |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
id | string | |
backup_plan_id | string | |
backup_selection | object | |
selection_id | string | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
id | string | |
region | string | AWS region. |
For more information, see AWS::Backup::BackupSelection.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | backup_selections | INSERT | BackupSelection, BackupPlanId, region |
delete_resource | backup_selections | DELETE | Identifier, region |
list_resources | backup_selections_list_only | SELECT | region |
get_resource | backup_selections | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual backup_selection.
SELECT
region,
id,
backup_plan_id,
backup_selection,
selection_id
FROM awscc.backup.backup_selections
WHERE
region = 'us-east-1' AND
Identifier = '{{ id }}';
Lists all backup_selections in a region.
SELECT
region,
id
FROM awscc.backup.backup_selections_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new backup_selection resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.backup.backup_selections (
BackupPlanId,
BackupSelection,
region
)
SELECT
'{{ backup_plan_id }}',
'{{ backup_selection }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.backup.backup_selections (
BackupPlanId,
BackupSelection,
region
)
SELECT
'{{ backup_plan_id }}',
'{{ backup_selection }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: backup_selection
props:
- name: backup_plan_id
value: '{{ backup_plan_id }}'
- name: backup_selection
value:
iam_role_arn: '{{ iam_role_arn }}'
list_of_tags:
- condition_key: '{{ condition_key }}'
condition_value: '{{ condition_value }}'
condition_type: '{{ condition_type }}'
resources:
- '{{ resources[0] }}'
selection_name: '{{ selection_name }}'
not_resources:
- '{{ not_resources[0] }}'
conditions:
string_equals:
- condition_key: '{{ condition_key }}'
condition_value: '{{ condition_value }}'
string_not_equals:
- null
string_like:
- null
string_not_like:
- null
DELETE example
/*+ delete */
DELETE FROM awscc.backup.backup_selections
WHERE
Identifier = '{{ id }}' AND
region = 'us-east-1';
Permissions
To operate on the backup_selections resource, the following permissions are required:
- Delete
- Read
- Create
- List
backup:GetBackupSelection,
backup:DeleteBackupSelection
backup:GetBackupSelection
backup:CreateBackupSelection,
iam:GetRole,
iam:PassRole,
iam:CreateServiceLinkedRole
backup:ListBackupSelections,
backup:ListBackupPlans