Skip to content

Commit

Permalink
backup_plan: modify args spec and add examples for advanced_backup_se…
Browse files Browse the repository at this point in the history
…ttings parameter (#2124) (#2129)

This is a backport of PR #2124 as merged into main (7c1d8aa).
Fixes #2110
This PR

adds an example to showcase the usage of advanced_backup_settings parameter
adds option in args spec and suboption in module doc

SUMMARY


ISSUE TYPE


Docs Pull Request

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis
  • Loading branch information
patchback[bot] authored Jun 27, 2024
1 parent ac1098a commit 8014556
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions changelogs/fragments/fix_args_spec_supoptions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
trivial:
- backup_plan - Modify the argspec to use options for a dict parameter.
- backup_plan - add example for advanced_backup_settings usage.
12 changes: 10 additions & 2 deletions plugins/modules/backup_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,11 @@
- Specifies the backup option for a selected resource.
- This option is only available for Windows VSS backup jobs.
type: dict
choices: [{'WindowsVSS': 'enabled'}, {'WindowsVSS': 'disabled'}]
suboptions:
WindowsVSS:
description: Enable or disable WindowsVSS backup option.
type: str
choices: ['enabled', 'disabled']
creator_request_id:
description: Identifies the request and allows failed requests to be retried
without the risk of running the operation twice. If the request includes a
Expand All @@ -180,6 +184,10 @@
backup_plan_name: elastic
rules:
- rule_name: daily
advanced_backup_settings:
- resource_type: "EC2"
backup_options:
WindowsVSS: enabled
target_backup_vault_name: "{{ backup_vault_name }}"
schedule_expression: 'cron(0 5 ? * * *)'
start_window_minutes: 60
Expand Down Expand Up @@ -387,7 +395,7 @@
resource_type=dict(type="str", choices=["EC2"]),
backup_options=dict(
type="dict",
choices=[{"WindowsVSS": "enabled"}, {"WindowsVSS": "disabled"}],
options=dict(WindowsVSS=dict(type="str", choices=["enabled", "disabled"])),
),
),
),
Expand Down

0 comments on commit 8014556

Please sign in to comment.