---
title: "Add resources to a policy"
method: PATCH
path: "/backup-and-dr/policies/{policy_id}/resources"
---

# Add resources to a policy

`PATCH /backup-and-dr/policies/{policy_id}/resources`

Appends FRNs to the policy's selected_resources scope.
Duplicate FRNs are automatically deduplicated.
Automatically triggers an immediate backup after adding resources.

## Path parameters

- `policy_id` string, uuid, required

## Request body

- AssignResourcesRequest
  - `frns` string[], required — FRN strings to add to the policy (duplicates are automatically deduplicated)

## Response `200`

Resources added successfully and backup initiated

- object
  - `message` string — Success message
  - `policy` Policy
    - `account_id` string
    - `policy_id` string
    - `policy_name` string
    - `description` string
    - `integration_id` string
    - `region` string
    - `provider_type` string — Provider type (e.g., "aws", "azure", "gcp")
    - `schedule` ScheduleConfig
      - `frequency` 'One-time' | 'Daily' | 'Weekly' | 'Monthly', required
      - `hour` integer
      - `minute` integer
      - `days_of_week` string[]
      - `monthly_schedule_type` 'specific_day' | 'specific_weekday' | 'last_day'
      - `day_of_month` integer
      - `weekday_ordinal` 'First' | 'Second' | 'Third' | 'Fourth' | 'Last'
      - `weekday_name` 'Sunday' | 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday'
      - `cron_expression` string
    - `scope` ScopeConfig[] — Scope configuration array. At least one scope type must be provided (e.g., tags, resource_group, asset_types, exclude_asset_types, or selected_resources). Note: integration_id and region are stored as separate fields, not in this scope array.
      - `type` 'tags' | 'resource_group' | 'asset_types' | 'exclude_asset_types' | 'selected_resources', required — Scope type identifier (display name): - tags: Tag-based filtering (maps to Elasticsearch field: tagsList.keyword) - resource_group: Azure resource group filtering (maps to Elasticsearch field: providerGroupId.keyword) - asset_types: Asset type filtering (maps to Elasticsearch field: assetType.keyword) - exclude_asset_types: Exclude asset type filtering (maps to Elasticsearch field: assetType.keyword). When combined with asset_types, exclusions take precedence. - selected_resources: Specific resources by FRN (union with other scope filters)
      - `value` string[], required — Array of scope values: - tags: Tag strings in "key:value" format (e.g., "env:prod", "team:platform") - resource_group: Azure resource group names (e.g., "rg-prod", "rg-staging") - asset_types: Asset type names (e.g., "aws_instance", "aws_s3_bucket", "azurerm_compute_virtual_machine") - exclude_asset_types: Asset type names to exclude (e.g., "aws_instance", "aws_s3_bucket"). When combined with asset_types, exclusions take precedence. - selected_resources: FRN strings (e.g., "frn:aws:123:us-east-1:ec2:i-abc123")
    - `notificationId` string — Notification ID for sending notifications
    - `vcs` VCSConfig
      - `project_id` string
      - `vcs_integration_id` string
      - `repo_id` string
    - `restore_instructions` string — Optional free-text restore instructions used as contextual input during DR restore generation
    - `status` 'Active' | 'Inactive'
    - `snapshots_count` integer
    - `last_backup_snapshot_id` string
    - `last_backup_time` string, date-time
    - `last_backup_status` string
    - `next_backup_time` string, date-time
    - `created_at` string, date-time
    - `updated_at` string, date-time
  - `snapshot_id` string, uuid — ID of the triggered snapshot
  - `snapshot_status` string — Initial status of the snapshot

## Other responses

- `400` — Invalid request (empty FRNs, inactive policy)
- `404` — Policy not found

---

[API](https://skmtc.net/firefly/apis/backup-dr-api.md) · [All operations](https://skmtc.net/firefly/apis/backup-dr-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/firefly/backup-dr-api/revisions/ff4cd0352ad5/schema)
