Interface ProtectionPoliciesClient


  • public interface ProtectionPoliciesClient
    An instance of this class provides access to all the operations defined in ProtectionPoliciesClient.
    • Method Detail

      • get

        ProtectionPolicyResourceInner 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.
      • getWithResponse

        com.azure.core.http.rest.Response<ProtectionPolicyResourceInner> 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.
      • createOrUpdate

        ProtectionPolicyResourceInner createOrUpdate​(String vaultName,
                                                     String resourceGroupName,
                                                     String policyName,
                                                     ProtectionPolicyResourceInner parameters)
        Creates or modifies a backup policy. 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 to be created.
        parameters - resource backup policy.
        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.
      • createOrUpdateWithResponse

        com.azure.core.http.rest.Response<ProtectionPolicyResourceInner> createOrUpdateWithResponse​(String vaultName,
                                                                                                    String resourceGroupName,
                                                                                                    String policyName,
                                                                                                    ProtectionPolicyResourceInner parameters,
                                                                                                    com.azure.core.util.Context context)
        Creates or modifies a backup policy. 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 to be created.
        parameters - resource backup policy.
        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.
      • beginDelete

        com.azure.core.util.polling.SyncPoller<com.azure.core.management.polling.PollResult<Void>,​Void> beginDelete​(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.
        Returns:
        the SyncPoller for polling of long-running 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.
      • beginDelete

        com.azure.core.util.polling.SyncPoller<com.azure.core.management.polling.PollResult<Void>,​Void> beginDelete​(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.
        Returns:
        the SyncPoller for polling of long-running 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.
      • 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.