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 | aws.backup.backup_selections |
Fields
Name | Datatype | Description |
---|---|---|
id | string | |
backup_plan_id | string | |
backup_selection | object | |
selection_id | string | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | BackupSelection, BackupPlanId, region |
delete_resource | DELETE | data__Identifier, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all backup_selections
in a region.
SELECT
region,
id,
backup_plan_id,
backup_selection,
selection_id
FROM aws.backup.backup_selections
WHERE region = 'us-east-1';
Gets all properties from an individual backup_selection
.
SELECT
region,
id,
backup_plan_id,
backup_selection,
selection_id
FROM aws.backup.backup_selections
WHERE region = 'us-east-1' AND data__Identifier = '<Id>';
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 aws.backup.backup_selections (
BackupPlanId,
BackupSelection,
region
)
SELECT
'{{ BackupPlanId }}',
'{{ BackupSelection }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.backup.backup_selections (
BackupPlanId,
BackupSelection,
region
)
SELECT
'{{ BackupPlanId }}',
'{{ BackupSelection }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: backup_selection
props:
- name: BackupPlanId
value: '{{ BackupPlanId }}'
- name: BackupSelection
value:
IamRoleArn: '{{ IamRoleArn }}'
ListOfTags:
- ConditionKey: '{{ ConditionKey }}'
ConditionValue: '{{ ConditionValue }}'
ConditionType: '{{ ConditionType }}'
Resources:
- '{{ Resources[0] }}'
SelectionName: '{{ SelectionName }}'
NotResources:
- '{{ NotResources[0] }}'
Conditions:
StringEquals:
- ConditionKey: '{{ ConditionKey }}'
ConditionValue: '{{ ConditionValue }}'
StringNotEquals:
- null
StringLike:
- null
StringNotLike:
- null
DELETE
example
/*+ delete */
DELETE FROM aws.backup.backup_selections
WHERE data__Identifier = '<Id>'
AND region = 'us-east-1';
Permissions
To operate on the backup_selections
resource, the following permissions are required:
Delete
backup:GetBackupSelection,
backup:DeleteBackupSelection
Read
backup:GetBackupSelection
Create
backup:CreateBackupSelection,
iam:GetRole,
iam:PassRole,
iam:CreateServiceLinkedRole
List
backup:ListBackupSelections