Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backup_plan: modify args spec and add examples for advanced_backup_settings parameter #2124

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading