Interface ProtectionPolicies


public interface ProtectionPolicies
Resource collection API of ProtectionPolicies.
  • Method Details

    • getWithResponse

      com.azure.core.http.rest.Response<ProtectionPolicyResource> getWithResponse(String vaultName, String resourceGroupName, String policyName, com.azure.core.util.Context context)
      Provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous operation. Status of the operation can be fetched using GetPolicyOperationResult API.
      Parameters:
      vaultName - The name of the recovery services vault.
      resourceGroupName - The name of the resource group where the recovery services vault is present.
      policyName - Backup policy information to be fetched.
      context - The context to associate with this operation.
      Returns:
      base class for backup policy along with Response.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • get

      ProtectionPolicyResource get(String vaultName, String resourceGroupName, String policyName)
      Provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous operation. Status of the operation can be fetched using GetPolicyOperationResult API.
      Parameters:
      vaultName - The name of the recovery services vault.
      resourceGroupName - The name of the resource group where the recovery services vault is present.
      policyName - Backup policy information to be fetched.
      Returns:
      base class for backup policy.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • delete

      void delete(String vaultName, String resourceGroupName, String policyName)
      Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status of the operation can be fetched using GetProtectionPolicyOperationResult API.
      Parameters:
      vaultName - The name of the recovery services vault.
      resourceGroupName - The name of the resource group where the recovery services vault is present.
      policyName - Backup policy to be deleted.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • delete

      void delete(String vaultName, String resourceGroupName, String policyName, com.azure.core.util.Context context)
      Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status of the operation can be fetched using GetProtectionPolicyOperationResult API.
      Parameters:
      vaultName - The name of the recovery services vault.
      resourceGroupName - The name of the resource group where the recovery services vault is present.
      policyName - Backup policy to be deleted.
      context - The context to associate with this operation.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • getById

      Provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous operation. Status of the operation can be fetched using GetPolicyOperationResult API.
      Parameters:
      id - the resource ID.
      Returns:
      base class for backup policy along with Response.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • getByIdWithResponse

      com.azure.core.http.rest.Response<ProtectionPolicyResource> getByIdWithResponse(String id, com.azure.core.util.Context context)
      Provides the details of the backup policies associated to Recovery Services Vault. This is an asynchronous operation. Status of the operation can be fetched using GetPolicyOperationResult API.
      Parameters:
      id - the resource ID.
      context - The context to associate with this operation.
      Returns:
      base class for backup policy along with Response.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • deleteById

      void deleteById(String id)
      Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status of the operation can be fetched using GetProtectionPolicyOperationResult API.
      Parameters:
      id - the resource ID.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • deleteByIdWithResponse

      void deleteByIdWithResponse(String id, com.azure.core.util.Context context)
      Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status of the operation can be fetched using GetProtectionPolicyOperationResult API.
      Parameters:
      id - the resource ID.
      context - The context to associate with this operation.
      Throws:
      IllegalArgumentException - thrown if parameters fail the validation.
      com.azure.core.management.exception.ManagementException - thrown if the request is rejected by server.
      RuntimeException - all other wrapped checked exceptions if the request fails to be sent.
    • define

      Begins definition for a new ProtectionPolicyResource resource.
      Parameters:
      name - resource name.
      Returns:
      the first stage of the new ProtectionPolicyResource definition.