diff --git a/changelogs/fragments/fix_args_spec_supoptions.yml b/changelogs/fragments/fix_args_spec_supoptions.yml new file mode 100644 index 00000000000..403ef18fbd4 --- /dev/null +++ b/changelogs/fragments/fix_args_spec_supoptions.yml @@ -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. diff --git a/plugins/modules/backup_plan.py b/plugins/modules/backup_plan.py index 4fab240c762..9ae6f00080a 100644 --- a/plugins/modules/backup_plan.py +++ b/plugins/modules/backup_plan.py @@ -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 @@ -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 @@ -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"])), ), ), ),