Skip to main content

Backup Selection

Manages a Backup Selection.

Sample code

exports.createResources = () => [
{
type: "BackupSelection",
group: "Backup",
properties: ({}) => ({
Resources: ["arn:aws:ec2:*:*:instance/*"],
SelectionName: "ec2",
}),
dependencies: ({}) => ({
backupPlan: "my-backup-plan",
iamRole: "AWSBackupDefaultServiceRole",
}),
},
];

Properties

Dependencies

Used By

Full Examples

List

gc l -t Backup::BackupSelection
Listing resources on 1 provider: aws
✓ aws us-east-1
✓ Initialising
✓ Listing 7/7
┌──────────────────────────────────────────────────────────────────────┐
│ 1 Backup::BackupSelection from aws │
├──────────────────────────────────────────────────────────────────────┤
│ name: ec2 │
│ managedByUs: Yes │
│ live: │
│ IamRoleArn: arn:aws:iam::840541460064:role/service-role/AWSBackup… │
│ Resources: │
│ - "arn:aws:ec2:*:*:instance/*" │
│ SelectionName: ec2 │
│ BackupPlanId: 72351b1b-e469-4c39-b0c5-b1a04e873371 │
│ CreationDate: 2022-10-26T21:11:48.063Z │
│ SelectionId: 3d187c13-5d7c-4c63-890d-a45b7cca9410 │
│ │
└──────────────────────────────────────────────────────────────────────┘


List Summary:
Provider: aws
┌─────────────────────────────────────────────────────────────────────┐
│ aws │
├─────────────────────────┬───────────────────────────────────────────┤
│ Backup::BackupSelection │ ec2 │
└─────────────────────────┴───────────────────────────────────────────┘
1 resource, 1 type, 1 provider
Command "gc l -t Backup::BackupSelection" executed in 6s, 99 MB