swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector ProtectionPolicies API schemes: - https tags: - name: ProtectionPolicies paths: ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName} : get: tags: - ProtectionPolicies description: 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. operationId: microsoftAzureProtectionpoliciesGet produces: - application/json parameters: - $ref: '#/parameters/ApiVersion' - $ref: '#/parameters/VaultName' - $ref: '#/parameters/ResourceGroupName' - $ref: '#/parameters/SubscriptionId' - name: policyName in: path description: Backup policy information to be fetched. required: true type: string responses: '200': description: OK schema: $ref: '#/definitions/ProtectionPolicyResource' default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/CloudError' x-ms-examples: Get Azure IaasVm Protection Policy Details: $ref: ./examples/AzureIaasVm/ProtectionPolicies_Get.json Get Azure IaasVm Enhanced Protection Policy Details: $ref: ./examples/AzureIaasVm/V2Policy/v2-Get-Policy.json summary: Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Recoveryservices Vaults Vaultname Backuppolicies Policyname put: tags: - ProtectionPolicies description: Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched
using GetPolicyOperationResult API. operationId: microsoftAzureProtectionpoliciesCreateorupdate produces: - application/json parameters: - $ref: '#/parameters/ApiVersion' - $ref: '#/parameters/VaultName' - $ref: '#/parameters/ResourceGroupName' - $ref: '#/parameters/SubscriptionId' - name: policyName in: path description: Backup policy to be created. required: true type: string - name: parameters in: body description: resource backup policy required: true schema: $ref: '#/definitions/ProtectionPolicyResource' responses: '200': description: OK schema: $ref: '#/definitions/ProtectionPolicyResource' '202': description: Accepted default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/CloudError' x-ms-examples: Create or Update Simple Azure Vm Protection Policy: $ref: ./examples/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Simple.json Create or Update Full Azure Vm Protection Policy: $ref: ./examples/AzureIaasVm/ProtectionPolicies_CreateOrUpdate_Complex.json Create or Update Enhanced Azure Vm Protection Policy with Hourly backup: $ref: ./examples/AzureIaasVm/V2Policy/IaaS_v2_hourly.json Create or Update Enhanced Azure Vm Protection Policy with daily backup: $ref: ./examples/AzureIaasVm/V2Policy/IaaS_v2_daily.json Create or Update Full Azure Workload Protection Policy: $ref: ./examples/AzureWorkload/ProtectionPolicies_CreateOrUpdate_Complex.json Create or Update Daily Azure Storage Protection Policy: $ref: ./examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Daily.json Create or Update Hourly Azure Storage Protection Policy: $ref: ./examples/AzureStorage/ProtectionPolicies_CreateOrUpdate_Hourly.json summary: Microsoft Azure Put Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Recoveryservices Vaults Vaultname Backuppolicies Policyname delete: tags: - ProtectionPolicies description: Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status of the
operation can be fetched using GetProtectionPolicyOperationResult API. operationId: microsoftAzureProtectionpoliciesDelete produces: - application/json parameters: - $ref: '#/parameters/ApiVersion' - $ref: '#/parameters/VaultName' - $ref: '#/parameters/ResourceGroupName' - $ref: '#/parameters/SubscriptionId' - name: policyName in: path description: Backup policy to be deleted. required: true type: string responses: '200': description: OK '204': description: NoContent default: description: Error response describing why the operation failed. schema: $ref: '#/definitions/CloudError' x-ms-long-running-operation: true x-ms-examples: Delete Azure Vm Protection Policy: $ref: ./examples/AzureIaasVm/ProtectionPolicies_Delete.json summary: Microsoft Azure Delete Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Recoveryservices Vaults Vaultname Backuppolicies Policyname definitions: Resource: description: ARM Resource. type: object properties: id: description: Resource Id represents the complete path to the resource. type: string readOnly: true name: description: Resource name associated with the resource. type: string readOnly: true type: description: Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/... type: string readOnly: true location: description: Resource location. type: string tags: description: Resource tags. type: object additionalProperties: type: string eTag: description: Optional ETag. type: string x-ms-azure-resource: true ProtectionPolicy: description: Base class for backup policy. Workload-specific backup policies are derived from this class. required: - backupManagementType type: object properties: protectedItemsCount: format: int32 description: Number of items associated with this policy. type: integer backupManagementType: description: This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. type: string resourceGuardOperationRequests: description: ResourceGuard Operation Requests type: array items: type: string discriminator: backupManagementType CloudError: x-ms-external: true properties: error: type: object $ref: '#/definitions/CloudErrorBody' description: The error object. description: An error response from the Container Instance service. CloudErrorBody: x-ms-external: true properties: code: readOnly: true type: string description: An identifier for the error. Codes are invariant and are intended to be consumed programmatically. message: readOnly: true type: string description: A message describing the error, intended to be suitable for display in a user interface. target: readOnly: true type: string description: The target of the particular error. For example, the name of the property in error. details: readOnly: true type: array items: $ref: '#/definitions/CloudErrorBody' x-ms-identifiers: - code description: A list of additional details about the error. additionalInfo: readOnly: true type: array items: $ref: ../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorAdditionalInfo x-ms-identifiers: [] description: The error additional info. description: An error response from the Container Instance service. ProtectionPolicyResource: description: Base class for backup policy. Workload-specific backup policies are derived from this class. allOf: - $ref: '#/definitions/Resource' properties: properties: $ref: '#/definitions/ProtectionPolicy' description: ProtectionPolicyResource properties parameters: ResourceGroupName: name: resourceGroupName in: path description: The name of the resource group where the recovery services vault is present. required: true type: string x-ms-parameter-location: method VaultName: name: vaultName in: path description: The name of the recovery services vault. required: true type: string x-ms-parameter-location: method ApiVersion: name: api-version in: query description: Client Api Version. required: true type: string SubscriptionId: name: subscriptionId in: path description: The subscription Id. required: true type: string x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'