Method: Azure::RecoveryServicesBackup::Mgmt::V2016_12_01::ProtectionPolicies#create_or_update

Defined in:
lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/protection_policies.rb

#create_or_update(vault_name, resource_group_name, policy_name, parameters, custom_headers: nil) ⇒ ProtectionPolicyResource

Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched using GetPolicyOperationResult API.

recovery services vault is present. will be added to the HTTP request.

Parameters:

  • vault_name (String)

    The name of the recovery services vault.

  • resource_group_name (String)

    The name of the resource group where the

  • policy_name (String)

    Backup policy to be created.

  • parameters (ProtectionPolicyResource)

    resource backup policy

  • custom_headers (Hash{String => String}) (defaults to: nil)

    A hash of custom headers that

Returns:

  • (ProtectionPolicyResource)

    operation results.



153
154
155
156
# File 'lib/2016-12-01/generated/azure_mgmt_recovery_services_backup/protection_policies.rb', line 153

def create_or_update(vault_name, resource_group_name, policy_name, parameters, custom_headers:nil)
  response = create_or_update_async(vault_name, resource_group_name, policy_name, parameters, custom_headers:custom_headers).value!
  response.body unless response.nil?
end