Skip to main content

backup_selections

Creates, updates, deletes or gets a backup_selection resource or lists backup_selections in a region

Overview

Namebackup_selections
TypeResource
DescriptionResource Type definition for AWS::Backup::BackupSelection
Idaws.backup.backup_selections

Fields

NameDatatypeDescription
idstring
backup_plan_idstring
backup_selectionobject
selection_idstring
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTBackupSelection, BackupPlanId, region
delete_resourceDELETEdata__Identifier, region
list_resourcesSELECTregion
get_resourceSELECTdata__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.

/*+ create */
INSERT INTO aws.backup.backup_selections (
BackupPlanId,
BackupSelection,
region
)
SELECT
'{{ BackupPlanId }}',
'{{ BackupSelection }}',
'{{ region }}';

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