Skip to content

Commit

Permalink
[Backup] Add support to specify ResourceGroup for storing instantRP d…
Browse files Browse the repository at this point in the history
…uring Create or Modify Policy (#13376)

* initial comit

* updated test

* Style fix

Co-authored-by: Sambit Rath <[email protected]>
  • Loading branch information
sambitratha and Sambit Rath authored May 14, 2020
1 parent 28b1422 commit 2c3097b
Show file tree
Hide file tree
Showing 3 changed files with 2,340 additions and 4,876 deletions.
5 changes: 5 additions & 0 deletions src/azure-cli/azure/cli/command_modules/backup/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ def set_policy(client, resource_group_name, vault_name, policy, policy_name):
policy_object.properties.instant_rp_retention_range_in_days = 2
if policy_name is None:
policy_name = policy_object.name

additional_properties = policy_object.properties.additional_properties
if 'instantRpDetails' in additional_properties:
policy_object.properties.instant_rp_details = additional_properties['instantRpDetails']

return client.create_or_update(vault_name, resource_group_name, policy_name, policy_object)


Expand Down
Loading

0 comments on commit 2c3097b

Please sign in to comment.