backup_plans
Creates, updates, deletes or gets a backup_plan
resource or lists backup_plans
in a region
Overview
Name | backup_plans |
Type | Resource |
Description | Resource Type definition for AWS::Backup::BackupPlan |
Id | aws.backup.backup_plans |
Fields
Name | Datatype | Description |
---|---|---|
backup_plan | object | |
backup_plan_tags | object | |
backup_plan_arn | string | |
backup_plan_id | string | |
version_id | string | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | BackupPlan, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all backup_plans
in a region.
SELECT
region,
backup_plan,
backup_plan_tags,
backup_plan_arn,
backup_plan_id,
version_id
FROM aws.backup.backup_plans
WHERE region = 'us-east-1';
Gets all properties from an individual backup_plan
.
SELECT
region,
backup_plan,
backup_plan_tags,
backup_plan_arn,
backup_plan_id,
version_id
FROM aws.backup.backup_plans
WHERE region = 'us-east-1' AND data__Identifier = '<BackupPlanId>';
INSERT
example
Use the following StackQL query and manifest file to create a new backup_plan
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.backup.backup_plans (
BackupPlan,
region
)
SELECT
'{{ BackupPlan }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.backup.backup_plans (
BackupPlan,
BackupPlanTags,
region
)
SELECT
'{{ BackupPlan }}',
'{{ BackupPlanTags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: backup_plan
props:
- name: BackupPlan
value:
BackupPlanName: '{{ BackupPlanName }}'
AdvancedBackupSettings:
- BackupOptions: {}
ResourceType: '{{ ResourceType }}'
BackupPlanRule:
- RuleName: '{{ RuleName }}'
TargetBackupVault: '{{ TargetBackupVault }}'
StartWindowMinutes: null
CompletionWindowMinutes: null
ScheduleExpression: '{{ ScheduleExpression }}'
ScheduleExpressionTimezone: '{{ ScheduleExpressionTimezone }}'
RecoveryPointTags: {}
CopyActions:
- Lifecycle:
MoveToColdStorageAfterDays: null
DeleteAfterDays: null
OptInToArchiveForSupportedResources: '{{ OptInToArchiveForSupportedResources }}'
DestinationBackupVaultArn: '{{ DestinationBackupVaultArn }}'
Lifecycle: null
EnableContinuousBackup: '{{ EnableContinuousBackup }}'
- name: BackupPlanTags
value: {}
DELETE
example
/*+ delete */
DELETE FROM aws.backup.backup_plans
WHERE data__Identifier = '<BackupPlanId>'
AND region = 'us-east-1';
Permissions
To operate on the backup_plans
resource, the following permissions are required:
Read
backup:GetBackupPlan,
backup:ListTags
Create
backup:GetBackupPlan,
backup:TagResource,
backup:CreateBackupPlan
Delete
backup:GetBackupPlan,
backup:DeleteBackupPlan
Update
backup:UpdateBackupPlan,
backup:ListTags,
backup:TagResource,
backup:UntagResource
List
backup:ListBackupPlans