Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an asynchronous operation. To know the status of the operation, call the GetItemOperationResult API.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}?api-version=2025-02-01
URI Parameters Name In Required Type Description
containerName
path Truestring
Container name associated with the backup item.
fabricName
path Truestring
Fabric name associated with the backup item.
protectedItemName
path Truestring
Item name to be backed up.
resourceGroupName
path Truestring
The name of the resource group where the recovery services vault is present.
subscriptionId
path Truestring
The subscription Id.
vaultName
path Truestring
The name of the recovery services vault.
api-version
query Truestring
Client Api Version.
Name Required Type Description x-ms-authorization-auxiliarystring
Request Body Responses Name Type Description 200 OKOK
202 AcceptedAccepted
Other Status CodesError response describing why the operation failed.
Security azure_authAzure Active Directory OAuth2 Flow
Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1/protectedItems/VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1?api-version=2025-02-01
{
"properties": {
"protectedItemType": "Microsoft.Compute/virtualMachines",
"sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.Compute/virtualMachines/netvmtestv2vm1",
"policyId": "/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/DefaultPolicy"
}
}
import com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSComputeVMProtectedItem;
/**
* Samples for ProtectedItems CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/
* AzureIaasVm/ConfigureProtection.json
*/
/**
* Sample code: Enable Protection on Azure IaasVm.
*
* @param manager Entry point to RecoveryServicesBackupManager.
*/
public static void enableProtectionOnAzureIaasVm(
com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
manager.protectedItems().define("VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1").withRegion((String) null)
.withExistingProtectionContainer("NetSDKTestRsVault", "SwaggerTestRg", "Azure",
"IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1")
.withProperties(new AzureIaaSComputeVMProtectedItem().withSourceResourceId(
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.Compute/virtualMachines/netvmtestv2vm1")
.withPolicyId(
"/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/DefaultPolicy"))
.create();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.recoveryservicesbackup.activestamp import RecoveryServicesBackupClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-recoveryservicesbackup
# USAGE
python configure_protection.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = RecoveryServicesBackupClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-0000-0000-0000-000000000000",
)
response = client.protected_items.create_or_update(
vault_name="NetSDKTestRsVault",
resource_group_name="SwaggerTestRg",
fabric_name="Azure",
container_name="IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
protected_item_name="VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
parameters={
"properties": {
"policyId": "/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/DefaultPolicy",
"protectedItemType": "Microsoft.Compute/virtualMachines",
"sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.Compute/virtualMachines/netvmtestv2vm1",
}
},
)
print(response)
# x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/AzureIaasVm/ConfigureProtection.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armrecoveryservicesbackup_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/148c3b0b44f7789ced94859992493fafd0072f83/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/AzureIaasVm/ConfigureProtection.json
func ExampleProtectedItemsClient_CreateOrUpdate_enableProtectionOnAzureIaasVm() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armrecoveryservicesbackup.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProtectedItemsClient().CreateOrUpdate(ctx, "NetSDKTestRsVault", "SwaggerTestRg", "Azure", "IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1", "VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1", armrecoveryservicesbackup.ProtectedItemResource{
Properties: &armrecoveryservicesbackup.AzureIaaSComputeVMProtectedItem{
PolicyID: to.Ptr("/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/DefaultPolicy"),
ProtectedItemType: to.Ptr("Microsoft.Compute/virtualMachines"),
SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.Compute/virtualMachines/netvmtestv2vm1"),
},
}, &armrecoveryservicesbackup.ProtectedItemsClientCreateOrUpdateOptions{XMSAuthorizationAuxiliary: nil})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ProtectedItemResource = armrecoveryservicesbackup.ProtectedItemResource{
// Name: to.Ptr("VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1"),
// Type: to.Ptr("Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PythonSDKBackupTestRg/providers/Microsoft.RecoveryServices/vaults/PySDKBackupTestRsVault/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1/protectedItems/VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1"),
// Properties: &armrecoveryservicesbackup.AzureIaaSComputeVMProtectedItem{
// BackupManagementType: to.Ptr(armrecoveryservicesbackup.BackupManagementTypeAzureIaasVM),
// ContainerName: to.Ptr("iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1"),
// PolicyID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PythonSDKBackupTestRg/providers/Microsoft.RecoveryServices/vaults/PySDKBackupTestRsVault/backupPolicies/testPolicy1"),
// ProtectedItemType: to.Ptr("Microsoft.Compute/virtualMachines"),
// SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.Compute/virtualMachines/netvmtestv2vm1"),
// WorkloadType: to.Ptr(armrecoveryservicesbackup.DataSourceTypeVM),
// FriendlyName: to.Ptr("netvmtestv2vm1"),
// HealthStatus: to.Ptr(armrecoveryservicesbackup.HealthStatusPassed),
// LastBackupStatus: to.Ptr("Completed"),
// LastBackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-22T12:25:32.048Z"); return t}()),
// ProtectedItemDataID: to.Ptr("636482643132986882"),
// ProtectionState: to.Ptr(armrecoveryservicesbackup.ProtectionStateProtected),
// ProtectionStatus: to.Ptr("Healthy"),
// VirtualMachineID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.Compute/virtualMachines/netvmtestv2vm1"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { RecoveryServicesBackupClient } = require("@azure/arm-recoveryservicesbackup");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv/config");
/**
* This sample demonstrates how to Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an
asynchronous operation. To know the status of the operation, call the GetItemOperationResult API.
*
* @summary Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an
asynchronous operation. To know the status of the operation, call the GetItemOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/AzureIaasVm/ConfigureProtection.json
*/
async function enableProtectionOnAzureIaasVM() {
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const fabricName = "Azure";
const containerName = "IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1";
const protectedItemName = "VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1";
const parameters = {
properties: {
policyId:
"/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/DefaultPolicy",
protectedItemType: "Microsoft.Compute/virtualMachines",
sourceResourceId:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.Compute/virtualMachines/netvmtestv2vm1",
},
};
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const result = await client.protectedItems.createOrUpdate(
vaultName,
resourceGroupName,
fabricName,
containerName,
protectedItemName,
parameters,
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.RecoveryServicesBackup.Models;
using Azure.ResourceManager.RecoveryServicesBackup;
// Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/AzureIaasVm/ConfigureProtection.json
// this example is just showing the usage of "ProtectedItems_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this BackupProtectedItemResource created on azure
// for more information of creating BackupProtectedItemResource, please refer to the document of BackupProtectedItemResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "SwaggerTestRg";
string vaultName = "NetSDKTestRsVault";
string fabricName = "Azure";
string containerName = "IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1";
string protectedItemName = "VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1";
ResourceIdentifier backupProtectedItemResourceId = BackupProtectedItemResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, fabricName, containerName, protectedItemName);
BackupProtectedItemResource backupProtectedItem = client.GetBackupProtectedItemResource(backupProtectedItemResourceId);
// invoke the operation
BackupProtectedItemData data = new BackupProtectedItemData(default)
{
Properties = new IaasComputeVmProtectedItem
{
SourceResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.Compute/virtualMachines/netvmtestv2vm1"),
PolicyId = new ResourceIdentifier("/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/DefaultPolicy"),
},
};
ArmOperation<BackupProtectedItemResource> lro = await backupProtectedItem.UpdateAsync(WaitUntil.Completed, data);
BackupProtectedItemResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
BackupProtectedItemData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample responseLocation: https://management.azure.com/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1/protectedItems/VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1/operationResults/00000000-0000-0000-0000-000000000000?api-version=2016-12-01
Azure-AsyncOperation: https://management.azure.com/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1/protectedItems/VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1/operationsStatus/00000000-0000-0000-0000-000000000000?api-version=2016-12-01
Retry-After: 60
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PythonSDKBackupTestRg/providers/Microsoft.RecoveryServices/vaults/PySDKBackupTestRsVault/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1/protectedItems/VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
"name": "VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
"type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems",
"properties": {
"friendlyName": "netvmtestv2vm1",
"virtualMachineId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.Compute/virtualMachines/netvmtestv2vm1",
"protectionStatus": "Healthy",
"protectionState": "Protected",
"healthStatus": "Passed",
"lastBackupStatus": "Completed",
"lastBackupTime": "2018-01-22T12:25:32.048723Z",
"protectedItemDataId": "636482643132986882",
"protectedItemType": "Microsoft.Compute/virtualMachines",
"backupManagementType": "AzureIaasVM",
"workloadType": "VM",
"containerName": "iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
"sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.Compute/virtualMachines/netvmtestv2vm1",
"policyId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PythonSDKBackupTestRg/providers/Microsoft.RecoveryServices/vaults/PySDKBackupTestRsVault/backupPolicies/testPolicy1",
"lastRecoveryPoint": null
}
}
Stop Protection with retain data on Azure IaasVm Sample request
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1/protectedItems/VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1?api-version=2025-02-01
{
"properties": {
"protectedItemType": "Microsoft.Compute/virtualMachines",
"sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.Compute/virtualMachines/netvmtestv2vm1",
"protectionState": "ProtectionStopped"
}
}
import com.azure.resourcemanager.recoveryservicesbackup.models.AzureIaaSComputeVMProtectedItem;
import com.azure.resourcemanager.recoveryservicesbackup.models.ProtectionState;
/**
* Samples for ProtectedItems CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/
* AzureIaasVm/StopProtection.json
*/
/**
* Sample code: Stop Protection with retain data on Azure IaasVm.
*
* @param manager Entry point to RecoveryServicesBackupManager.
*/
public static void stopProtectionWithRetainDataOnAzureIaasVm(
com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
manager.protectedItems().define("VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1").withRegion((String) null)
.withExistingProtectionContainer("NetSDKTestRsVault", "SwaggerTestRg", "Azure",
"IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1")
.withProperties(new AzureIaaSComputeVMProtectedItem().withSourceResourceId(
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.Compute/virtualMachines/netvmtestv2vm1")
.withProtectionState(ProtectionState.PROTECTION_STOPPED))
.create();
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.recoveryservicesbackup.activestamp import RecoveryServicesBackupClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-recoveryservicesbackup
# USAGE
python stop_protection.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = RecoveryServicesBackupClient(
credential=DefaultAzureCredential(),
subscription_id="00000000-0000-0000-0000-000000000000",
)
response = client.protected_items.create_or_update(
vault_name="NetSDKTestRsVault",
resource_group_name="SwaggerTestRg",
fabric_name="Azure",
container_name="IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
protected_item_name="VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
parameters={
"properties": {
"protectedItemType": "Microsoft.Compute/virtualMachines",
"protectionState": "ProtectionStopped",
"sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.Compute/virtualMachines/netvmtestv2vm1",
}
},
)
print(response)
# x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/AzureIaasVm/StopProtection.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armrecoveryservicesbackup_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/recoveryservices/armrecoveryservicesbackup/v4"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/148c3b0b44f7789ced94859992493fafd0072f83/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/AzureIaasVm/StopProtection.json
func ExampleProtectedItemsClient_CreateOrUpdate_stopProtectionWithRetainDataOnAzureIaasVm() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armrecoveryservicesbackup.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewProtectedItemsClient().CreateOrUpdate(ctx, "NetSDKTestRsVault", "SwaggerTestRg", "Azure", "IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1", "VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1", armrecoveryservicesbackup.ProtectedItemResource{
Properties: &armrecoveryservicesbackup.AzureIaaSComputeVMProtectedItem{
ProtectedItemType: to.Ptr("Microsoft.Compute/virtualMachines"),
SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.Compute/virtualMachines/netvmtestv2vm1"),
ProtectionState: to.Ptr(armrecoveryservicesbackup.ProtectionStateProtectionStopped),
},
}, &armrecoveryservicesbackup.ProtectedItemsClientCreateOrUpdateOptions{XMSAuthorizationAuxiliary: nil})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.ProtectedItemResource = armrecoveryservicesbackup.ProtectedItemResource{
// Name: to.Ptr("VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1"),
// Type: to.Ptr("Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems"),
// ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PythonSDKBackupTestRg/providers/Microsoft.RecoveryServices/vaults/PySDKBackupTestRsVault/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1/protectedItems/VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1"),
// Properties: &armrecoveryservicesbackup.AzureIaaSComputeVMProtectedItem{
// BackupManagementType: to.Ptr(armrecoveryservicesbackup.BackupManagementTypeAzureIaasVM),
// ContainerName: to.Ptr("iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1"),
// PolicyID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PythonSDKBackupTestRg/providers/Microsoft.RecoveryServices/vaults/PySDKBackupTestRsVault/backupPolicies/testPolicy1"),
// ProtectedItemType: to.Ptr("Microsoft.Compute/virtualMachines"),
// SourceResourceID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.Compute/virtualMachines/netvmtestv2vm1"),
// WorkloadType: to.Ptr(armrecoveryservicesbackup.DataSourceTypeVM),
// FriendlyName: to.Ptr("netvmtestv2vm1"),
// HealthStatus: to.Ptr(armrecoveryservicesbackup.HealthStatusPassed),
// LastBackupStatus: to.Ptr("Completed"),
// LastBackupTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-01-22T12:25:32.048Z"); return t}()),
// ProtectedItemDataID: to.Ptr("636482643132986882"),
// ProtectionState: to.Ptr(armrecoveryservicesbackup.ProtectionStateProtectionStopped),
// ProtectionStatus: to.Ptr("Healthy"),
// VirtualMachineID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.Compute/virtualMachines/netvmtestv2vm1"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { RecoveryServicesBackupClient } = require("@azure/arm-recoveryservicesbackup");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv/config");
/**
* This sample demonstrates how to Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an
asynchronous operation. To know the status of the operation, call the GetItemOperationResult API.
*
* @summary Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an
asynchronous operation. To know the status of the operation, call the GetItemOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/AzureIaasVm/StopProtection.json
*/
async function stopProtectionWithRetainDataOnAzureIaasVM() {
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const vaultName = "NetSDKTestRsVault";
const resourceGroupName = process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "SwaggerTestRg";
const fabricName = "Azure";
const containerName = "IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1";
const protectedItemName = "VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1";
const parameters = {
properties: {
protectedItemType: "Microsoft.Compute/virtualMachines",
protectionState: "ProtectionStopped",
sourceResourceId:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.Compute/virtualMachines/netvmtestv2vm1",
},
};
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const result = await client.protectedItems.createOrUpdate(
vaultName,
resourceGroupName,
fabricName,
containerName,
protectedItemName,
parameters,
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.RecoveryServicesBackup.Models;
using Azure.ResourceManager.RecoveryServicesBackup;
// Generated from example definition: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2025-02-01/examples/AzureIaasVm/StopProtection.json
// this example is just showing the usage of "ProtectedItems_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this BackupProtectedItemResource created on azure
// for more information of creating BackupProtectedItemResource, please refer to the document of BackupProtectedItemResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "SwaggerTestRg";
string vaultName = "NetSDKTestRsVault";
string fabricName = "Azure";
string containerName = "IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1";
string protectedItemName = "VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1";
ResourceIdentifier backupProtectedItemResourceId = BackupProtectedItemResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, vaultName, fabricName, containerName, protectedItemName);
BackupProtectedItemResource backupProtectedItem = client.GetBackupProtectedItemResource(backupProtectedItemResourceId);
// invoke the operation
BackupProtectedItemData data = new BackupProtectedItemData(default)
{
Properties = new IaasComputeVmProtectedItem
{
ProtectionState = BackupProtectionState.ProtectionStopped,
SourceResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.Compute/virtualMachines/netvmtestv2vm1"),
},
};
ArmOperation<BackupProtectedItemResource> lro = await backupProtectedItem.UpdateAsync(WaitUntil.Completed, data);
BackupProtectedItemResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
BackupProtectedItemData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Sample responseLocation: https://management.azure.com/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1/protectedItems/VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1/operationResults/00000000-0000-0000-0000-000000000000?api-version=2016-12-01
Azure-AsyncOperation: https://management.azure.com/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1/protectedItems/VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1/operationsStatus/00000000-0000-0000-0000-000000000000?api-version=2016-12-01
Retry-After: 60
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PythonSDKBackupTestRg/providers/Microsoft.RecoveryServices/vaults/PySDKBackupTestRsVault/backupFabrics/Azure/protectionContainers/IaasVMContainer;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1/protectedItems/VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
"name": "VM;iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
"type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems",
"properties": {
"friendlyName": "netvmtestv2vm1",
"virtualMachineId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.Compute/virtualMachines/netvmtestv2vm1",
"protectionStatus": "Healthy",
"protectionState": "ProtectionStopped",
"healthStatus": "Passed",
"lastBackupStatus": "Completed",
"lastBackupTime": "2018-01-22T12:25:32.048723Z",
"protectedItemDataId": "636482643132986882",
"protectedItemType": "Microsoft.Compute/virtualMachines",
"backupManagementType": "AzureIaasVM",
"workloadType": "VM",
"containerName": "iaasvmcontainerv2;netsdktestrg;netvmtestv2vm1",
"sourceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/netsdktestrg/providers/Microsoft.Compute/virtualMachines/netvmtestv2vm1",
"policyId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PythonSDKBackupTestRg/providers/Microsoft.RecoveryServices/vaults/PySDKBackupTestRsVault/backupPolicies/testPolicy1",
"lastRecoveryPoint": null
}
}
Definitions
Object
Azure File Share workload-specific backup item.
Name Type Description backupManagementTypeType of backup management for the backed up item.
backupSetNamestring
Name of the backup set the backup item belongs to
containerNamestring
Unique name of container
createModeCreate mode to indicate recovery of existing soft deleted data source or creation of new data source.
deferredDeleteTimeInUTCstring (date-time)
Time for deferred deletion in UTC
deferredDeleteTimeRemainingstring
Time remaining before the DS marked for deferred delete is permanently deleted
extendedInfoAzureFileshareProtectedItemExtendedInfo
Additional information with this backup item.
friendlyNamestring
Friendly name of the fileshare represented by this backup item.
isArchiveEnabledboolean
Flag to identify whether datasource is protected in archive
isDeferredDeleteScheduleUpcomingboolean
Flag to identify whether the deferred deleted DS is to be purged soon
isRehydrateboolean
Flag to identify that deferred deleted DS is to be moved into Pause state
isScheduledForDeferredDeleteboolean
Flag to identify whether the DS is scheduled for deferred delete
kpisHealths<string, KPIResourceHealthDetails>
Health details of different KPIs
lastBackupStatusstring
Last backup operation status. Possible values: Healthy, Unhealthy.
lastBackupTimestring (date-time)
Timestamp of the last backup operation on this backup item.
lastRecoveryPointstring (date-time)
Timestamp when the last (latest) backup copy was created for this backup item.
policyIdstring
ID of the backup policy with which this item is backed up.
policyNamestring
Name of the policy used for protection
protectedItemType string:AzureFileShareProtectedItem
backup item type.
protectionStateBackup state of this backup item.
protectionStatusstring
Backup status of this backup item.
resourceGuardOperationRequestsstring[]
ResourceGuardOperationRequests on which LAC check will be performed
softDeleteRetentionPeriodInDaysinteger (int32)
Soft delete retention period in days
sourceResourceIdstring
ARM ID of the resource to be backed up.
vaultIdstring
ID of the vault which protects this item
workloadTypeType of workload this item represents.
Object
Additional information about Azure File Share backup item.
Name Type Description oldestRecoveryPointstring (date-time)
The oldest backup copy available for this item in the service.
policyStatestring
Indicates consistency of policy object and policy applied to this backup item.
recoveryPointCountinteger (int32)
Number of available backup copies associated with this backup item.
resourceStatestring
Indicates the state of this resource. Possible values are from enum ResourceState {Invalid, Active, SoftDeleted, Deleted}
resourceStateSyncTimestring (date-time)
The resource state sync time for this backup item.
AzureIaaSClassicComputeVMProtectedItemObject
IaaS VM workload-specific backup item representing the Classic Compute VM.
Name Type Description backupManagementTypeType of backup management for the backed up item.
backupSetNamestring
Name of the backup set the backup item belongs to
containerNamestring
Unique name of container
createModeCreate mode to indicate recovery of existing soft deleted data source or creation of new data source.
deferredDeleteTimeInUTCstring (date-time)
Time for deferred deletion in UTC
deferredDeleteTimeRemainingstring
Time remaining before the DS marked for deferred delete is permanently deleted
extendedInfoAzureIaaSVMProtectedItemExtendedInfo
Additional information for this backup item.
extendedPropertiesExtended Properties for Azure IaasVM Backup.
friendlyNamestring
Friendly name of the VM represented by this backup item.
healthDetailsHealth details on this backup item.
healthStatusHealth status of protected item.
isArchiveEnabledboolean
Flag to identify whether datasource is protected in archive
isDeferredDeleteScheduleUpcomingboolean
Flag to identify whether the deferred deleted DS is to be purged soon
isRehydrateboolean
Flag to identify that deferred deleted DS is to be moved into Pause state
isScheduledForDeferredDeleteboolean
Flag to identify whether the DS is scheduled for deferred delete
kpisHealths<string, KPIResourceHealthDetails>
Health details of different KPIs
lastBackupStatusstring
Last backup operation status.
lastBackupTimestring (date-time)
Timestamp of the last backup operation on this backup item.
lastRecoveryPointstring (date-time)
Timestamp when the last (latest) backup copy was created for this backup item.
policyIdstring
ID of the backup policy with which this item is backed up.
policyNamestring
Name of the policy used for protection
policyTypestring
Type of the policy used for protection
protectedItemDataIdstring
Data ID of the protected item.
protectedItemType string:Microsoft.ClassicCompute/virtualMachines
backup item type.
protectionStateBackup state of this backup item.
protectionStatusstring
Backup status of this backup item.
resourceGuardOperationRequestsstring[]
ResourceGuardOperationRequests on which LAC check will be performed
softDeleteRetentionPeriodInDaysinteger (int32)
Soft delete retention period in days
sourceResourceIdstring
ARM ID of the resource to be backed up.
vaultIdstring
ID of the vault which protects this item
virtualMachineIdstring
Fully qualified ARM ID of the virtual machine represented by this item.
workloadTypeType of workload this item represents.
AzureIaaSComputeVMProtectedItemObject
IaaS VM workload-specific backup item representing the Azure Resource Manager VM.
Name Type Description backupManagementTypeType of backup management for the backed up item.
backupSetNamestring
Name of the backup set the backup item belongs to
containerNamestring
Unique name of container
createModeCreate mode to indicate recovery of existing soft deleted data source or creation of new data source.
deferredDeleteTimeInUTCstring (date-time)
Time for deferred deletion in UTC
deferredDeleteTimeRemainingstring
Time remaining before the DS marked for deferred delete is permanently deleted
extendedInfoAzureIaaSVMProtectedItemExtendedInfo
Additional information for this backup item.
extendedPropertiesExtended Properties for Azure IaasVM Backup.
friendlyNamestring
Friendly name of the VM represented by this backup item.
healthDetailsHealth details on this backup item.
healthStatusHealth status of protected item.
isArchiveEnabledboolean
Flag to identify whether datasource is protected in archive
isDeferredDeleteScheduleUpcomingboolean
Flag to identify whether the deferred deleted DS is to be purged soon
isRehydrateboolean
Flag to identify that deferred deleted DS is to be moved into Pause state
isScheduledForDeferredDeleteboolean
Flag to identify whether the DS is scheduled for deferred delete
kpisHealths<string, KPIResourceHealthDetails>
Health details of different KPIs
lastBackupStatusstring
Last backup operation status.
lastBackupTimestring (date-time)
Timestamp of the last backup operation on this backup item.
lastRecoveryPointstring (date-time)
Timestamp when the last (latest) backup copy was created for this backup item.
policyIdstring
ID of the backup policy with which this item is backed up.
policyNamestring
Name of the policy used for protection
policyTypestring
Type of the policy used for protection
protectedItemDataIdstring
Data ID of the protected item.
protectedItemType string:Microsoft.Compute/virtualMachines
backup item type.
protectionStateBackup state of this backup item.
protectionStatusstring
Backup status of this backup item.
resourceGuardOperationRequestsstring[]
ResourceGuardOperationRequests on which LAC check will be performed
softDeleteRetentionPeriodInDaysinteger (int32)
Soft delete retention period in days
sourceResourceIdstring
ARM ID of the resource to be backed up.
vaultIdstring
ID of the vault which protects this item
virtualMachineIdstring
Fully qualified ARM ID of the virtual machine represented by this item.
workloadTypeType of workload this item represents.
AzureIaaSVMHealthDetailsObject
Azure IaaS VM workload-specific Health Details.
Name Type Description codeinteger (int32)
Health Code
messagestring
Health Message
recommendationsstring[]
Health Recommended Actions
titlestring
Health Title
AzureIaaSVMProtectedItemObject
IaaS VM workload-specific backup item.
Name Type Description backupManagementTypeType of backup management for the backed up item.
backupSetNamestring
Name of the backup set the backup item belongs to
containerNamestring
Unique name of container
createModeCreate mode to indicate recovery of existing soft deleted data source or creation of new data source.
deferredDeleteTimeInUTCstring (date-time)
Time for deferred deletion in UTC
deferredDeleteTimeRemainingstring
Time remaining before the DS marked for deferred delete is permanently deleted
extendedInfoAzureIaaSVMProtectedItemExtendedInfo
Additional information for this backup item.
extendedPropertiesExtended Properties for Azure IaasVM Backup.
friendlyNamestring
Friendly name of the VM represented by this backup item.
healthDetailsHealth details on this backup item.
healthStatusHealth status of protected item.
isArchiveEnabledboolean
Flag to identify whether datasource is protected in archive
isDeferredDeleteScheduleUpcomingboolean
Flag to identify whether the deferred deleted DS is to be purged soon
isRehydrateboolean
Flag to identify that deferred deleted DS is to be moved into Pause state
isScheduledForDeferredDeleteboolean
Flag to identify whether the DS is scheduled for deferred delete
kpisHealths<string, KPIResourceHealthDetails>
Health details of different KPIs
lastBackupStatusstring
Last backup operation status.
lastBackupTimestring (date-time)
Timestamp of the last backup operation on this backup item.
lastRecoveryPointstring (date-time)
Timestamp when the last (latest) backup copy was created for this backup item.
policyIdstring
ID of the backup policy with which this item is backed up.
policyNamestring
Name of the policy used for protection
policyTypestring
Type of the policy used for protection
protectedItemDataIdstring
Data ID of the protected item.
protectedItemType string:backup item type.
protectionStateBackup state of this backup item.
protectionStatusstring
Backup status of this backup item.
resourceGuardOperationRequestsstring[]
ResourceGuardOperationRequests on which LAC check will be performed
softDeleteRetentionPeriodInDaysinteger (int32)
Soft delete retention period in days
sourceResourceIdstring
ARM ID of the resource to be backed up.
vaultIdstring
ID of the vault which protects this item
virtualMachineIdstring
Fully qualified ARM ID of the virtual machine represented by this item.
workloadTypeType of workload this item represents.
AzureIaaSVMProtectedItemExtendedInfoObject
Additional information on Azure IaaS VM specific backup item.
Name Type Description newestRecoveryPointInArchivestring (date-time)
The latest backup copy available for this backup item in archive tier
oldestRecoveryPointstring (date-time)
The oldest backup copy available for this backup item across all tiers.
oldestRecoveryPointInArchivestring (date-time)
The oldest backup copy available for this backup item in archive tier
oldestRecoveryPointInVaultstring (date-time)
The oldest backup copy available for this backup item in vault tier
policyInconsistentboolean
Specifies if backup policy associated with the backup item is inconsistent.
recoveryPointCountinteger (int32)
Number of backup copies available for this backup item.
AzureSqlProtectedItemObject
Azure SQL workload-specific backup item.
Name Type Description backupManagementTypeType of backup management for the backed up item.
backupSetNamestring
Name of the backup set the backup item belongs to
containerNamestring
Unique name of container
createModeCreate mode to indicate recovery of existing soft deleted data source or creation of new data source.
deferredDeleteTimeInUTCstring (date-time)
Time for deferred deletion in UTC
deferredDeleteTimeRemainingstring
Time remaining before the DS marked for deferred delete is permanently deleted
extendedInfoAzureSqlProtectedItemExtendedInfo
Additional information for this backup item.
isArchiveEnabledboolean
Flag to identify whether datasource is protected in archive
isDeferredDeleteScheduleUpcomingboolean
Flag to identify whether the deferred deleted DS is to be purged soon
isRehydrateboolean
Flag to identify that deferred deleted DS is to be moved into Pause state
isScheduledForDeferredDeleteboolean
Flag to identify whether the DS is scheduled for deferred delete
lastRecoveryPointstring (date-time)
Timestamp when the last (latest) backup copy was created for this backup item.
policyIdstring
ID of the backup policy with which this item is backed up.
policyNamestring
Name of the policy used for protection
protectedItemDataIdstring
Internal ID of a backup item. Used by Azure SQL Backup engine to contact Recovery Services.
protectedItemType string:Microsoft.Sql/servers/databases
backup item type.
protectionStateBackup state of the backed up item.
resourceGuardOperationRequestsstring[]
ResourceGuardOperationRequests on which LAC check will be performed
softDeleteRetentionPeriodInDaysinteger (int32)
Soft delete retention period in days
sourceResourceIdstring
ARM ID of the resource to be backed up.
vaultIdstring
ID of the vault which protects this item
workloadTypeType of workload this item represents.
AzureSqlProtectedItemExtendedInfoObject
Additional information on Azure Sql specific protected item.
Name Type Description oldestRecoveryPointstring (date-time)
The oldest backup copy available for this item in the service.
policyStatestring
State of the backup policy associated with this backup item.
recoveryPointCountinteger (int32)
Number of available backup copies associated with this backup item.
AzureVmWorkloadProtectedItemObject
Azure VM workload-specific protected item.
Name Type Description backupManagementTypeType of backup management for the backed up item.
backupSetNamestring
Name of the backup set the backup item belongs to
containerNamestring
Unique name of container
createModeCreate mode to indicate recovery of existing soft deleted data source or creation of new data source.
deferredDeleteTimeInUTCstring (date-time)
Time for deferred deletion in UTC
deferredDeleteTimeRemainingstring
Time remaining before the DS marked for deferred delete is permanently deleted
extendedInfoAzureVmWorkloadProtectedItemExtendedInfo
Additional information for this backup item.
friendlyNamestring
Friendly name of the DB represented by this backup item.
isArchiveEnabledboolean
Flag to identify whether datasource is protected in archive
isDeferredDeleteScheduleUpcomingboolean
Flag to identify whether the deferred deleted DS is to be purged soon
isRehydrateboolean
Flag to identify that deferred deleted DS is to be moved into Pause state
isScheduledForDeferredDeleteboolean
Flag to identify whether the DS is scheduled for deferred delete
kpisHealths<string, KPIResourceHealthDetails>
Health details of different KPIs
lastBackupErrorDetailError details in last backup
lastBackupStatusLast backup operation status. Possible values: Healthy, Unhealthy.
lastBackupTimestring (date-time)
Timestamp of the last backup operation on this backup item.
lastRecoveryPointstring (date-time)
Timestamp when the last (latest) backup copy was created for this backup item.
nodesListList of the nodes in case of distributed container.
parentNamestring
Parent name of the DB such as Instance or Availability Group.
parentTypestring
Parent type of protected item, example: for a DB, standalone server or distributed
policyIdstring
ID of the backup policy with which this item is backed up.
policyNamestring
Name of the policy used for protection
protectedItemDataSourceIdstring
Data ID of the protected item.
protectedItemHealthStatusHealth status of the backup item, evaluated based on last heartbeat received
protectedItemType string:backup item type.
protectionStateBackup state of this backup item.
protectionStatusstring
Backup status of this backup item.
resourceGuardOperationRequestsstring[]
ResourceGuardOperationRequests on which LAC check will be performed
serverNamestring
Host/Cluster Name for instance or AG
softDeleteRetentionPeriodInDaysinteger (int32)
Soft delete retention period in days
sourceResourceIdstring
ARM ID of the resource to be backed up.
vaultIdstring
ID of the vault which protects this item
workloadTypeType of workload this item represents.
AzureVmWorkloadProtectedItemExtendedInfoObject
Additional information on Azure Workload for SQL specific backup item.
Name Type Description newestRecoveryPointInArchivestring (date-time)
The latest backup copy available for this backup item in archive tier
oldestRecoveryPointstring (date-time)
The oldest backup copy available for this backup item across all tiers.
oldestRecoveryPointInArchivestring (date-time)
The oldest backup copy available for this backup item in archive tier
oldestRecoveryPointInVaultstring (date-time)
The oldest backup copy available for this backup item in vault tier
policyStatestring
Indicates consistency of policy object and policy applied to this backup item.
recoveryModelstring
Indicates consistency of policy object and policy applied to this backup item.
recoveryPointCountinteger (int32)
Number of backup copies available for this backup item.
AzureVmWorkloadSAPAseDatabaseProtectedItemObject
Azure VM workload-specific protected item representing SAP ASE Database.
Name Type Description backupManagementTypeType of backup management for the backed up item.
backupSetNamestring
Name of the backup set the backup item belongs to
containerNamestring
Unique name of container
createModeCreate mode to indicate recovery of existing soft deleted data source or creation of new data source.
deferredDeleteTimeInUTCstring (date-time)
Time for deferred deletion in UTC
deferredDeleteTimeRemainingstring
Time remaining before the DS marked for deferred delete is permanently deleted
extendedInfoAzureVmWorkloadProtectedItemExtendedInfo
Additional information for this backup item.
friendlyNamestring
Friendly name of the DB represented by this backup item.
isArchiveEnabledboolean
Flag to identify whether datasource is protected in archive
isDeferredDeleteScheduleUpcomingboolean
Flag to identify whether the deferred deleted DS is to be purged soon
isRehydrateboolean
Flag to identify that deferred deleted DS is to be moved into Pause state
isScheduledForDeferredDeleteboolean
Flag to identify whether the DS is scheduled for deferred delete
kpisHealths<string, KPIResourceHealthDetails>
Health details of different KPIs
lastBackupErrorDetailError details in last backup
lastBackupStatusLast backup operation status. Possible values: Healthy, Unhealthy.
lastBackupTimestring (date-time)
Timestamp of the last backup operation on this backup item.
lastRecoveryPointstring (date-time)
Timestamp when the last (latest) backup copy was created for this backup item.
nodesListList of the nodes in case of distributed container.
parentNamestring
Parent name of the DB such as Instance or Availability Group.
parentTypestring
Parent type of protected item, example: for a DB, standalone server or distributed
policyIdstring
ID of the backup policy with which this item is backed up.
policyNamestring
Name of the policy used for protection
protectedItemDataSourceIdstring
Data ID of the protected item.
protectedItemHealthStatusHealth status of the backup item, evaluated based on last heartbeat received
protectedItemType string:AzureVmWorkloadSAPAseDatabase
backup item type.
protectionStateBackup state of this backup item.
protectionStatusstring
Backup status of this backup item.
resourceGuardOperationRequestsstring[]
ResourceGuardOperationRequests on which LAC check will be performed
serverNamestring
Host/Cluster Name for instance or AG
softDeleteRetentionPeriodInDaysinteger (int32)
Soft delete retention period in days
sourceResourceIdstring
ARM ID of the resource to be backed up.
vaultIdstring
ID of the vault which protects this item
workloadTypeType of workload this item represents.
AzureVmWorkloadSAPHanaDatabaseProtectedItemObject
Azure VM workload-specific protected item representing SAP HANA Database.
Name Type Description backupManagementTypeType of backup management for the backed up item.
backupSetNamestring
Name of the backup set the backup item belongs to
containerNamestring
Unique name of container
createModeCreate mode to indicate recovery of existing soft deleted data source or creation of new data source.
deferredDeleteTimeInUTCstring (date-time)
Time for deferred deletion in UTC
deferredDeleteTimeRemainingstring
Time remaining before the DS marked for deferred delete is permanently deleted
extendedInfoAzureVmWorkloadProtectedItemExtendedInfo
Additional information for this backup item.
friendlyNamestring
Friendly name of the DB represented by this backup item.
isArchiveEnabledboolean
Flag to identify whether datasource is protected in archive
isDeferredDeleteScheduleUpcomingboolean
Flag to identify whether the deferred deleted DS is to be purged soon
isRehydrateboolean
Flag to identify that deferred deleted DS is to be moved into Pause state
isScheduledForDeferredDeleteboolean
Flag to identify whether the DS is scheduled for deferred delete
kpisHealths<string, KPIResourceHealthDetails>
Health details of different KPIs
lastBackupErrorDetailError details in last backup
lastBackupStatusLast backup operation status. Possible values: Healthy, Unhealthy.
lastBackupTimestring (date-time)
Timestamp of the last backup operation on this backup item.
lastRecoveryPointstring (date-time)
Timestamp when the last (latest) backup copy was created for this backup item.
nodesListList of the nodes in case of distributed container.
parentNamestring
Parent name of the DB such as Instance or Availability Group.
parentTypestring
Parent type of protected item, example: for a DB, standalone server or distributed
policyIdstring
ID of the backup policy with which this item is backed up.
policyNamestring
Name of the policy used for protection
protectedItemDataSourceIdstring
Data ID of the protected item.
protectedItemHealthStatusHealth status of the backup item, evaluated based on last heartbeat received
protectedItemType string:AzureVmWorkloadSAPHanaDatabase
backup item type.
protectionStateBackup state of this backup item.
protectionStatusstring
Backup status of this backup item.
resourceGuardOperationRequestsstring[]
ResourceGuardOperationRequests on which LAC check will be performed
serverNamestring
Host/Cluster Name for instance or AG
softDeleteRetentionPeriodInDaysinteger (int32)
Soft delete retention period in days
sourceResourceIdstring
ARM ID of the resource to be backed up.
vaultIdstring
ID of the vault which protects this item
workloadTypeType of workload this item represents.
AzureVmWorkloadSAPHanaDBInstanceProtectedItemObject
Azure VM workload-specific protected item representing SAP HANA DBInstance.
Name Type Description backupManagementTypeType of backup management for the backed up item.
backupSetNamestring
Name of the backup set the backup item belongs to
containerNamestring
Unique name of container
createModeCreate mode to indicate recovery of existing soft deleted data source or creation of new data source.
deferredDeleteTimeInUTCstring (date-time)
Time for deferred deletion in UTC
deferredDeleteTimeRemainingstring
Time remaining before the DS marked for deferred delete is permanently deleted
extendedInfoAzureVmWorkloadProtectedItemExtendedInfo
Additional information for this backup item.
friendlyNamestring
Friendly name of the DB represented by this backup item.
isArchiveEnabledboolean
Flag to identify whether datasource is protected in archive
isDeferredDeleteScheduleUpcomingboolean
Flag to identify whether the deferred deleted DS is to be purged soon
isRehydrateboolean
Flag to identify that deferred deleted DS is to be moved into Pause state
isScheduledForDeferredDeleteboolean
Flag to identify whether the DS is scheduled for deferred delete
kpisHealths<string, KPIResourceHealthDetails>
Health details of different KPIs
lastBackupErrorDetailError details in last backup
lastBackupStatusLast backup operation status. Possible values: Healthy, Unhealthy.
lastBackupTimestring (date-time)
Timestamp of the last backup operation on this backup item.
lastRecoveryPointstring (date-time)
Timestamp when the last (latest) backup copy was created for this backup item.
nodesListList of the nodes in case of distributed container.
parentNamestring
Parent name of the DB such as Instance or Availability Group.
parentTypestring
Parent type of protected item, example: for a DB, standalone server or distributed
policyIdstring
ID of the backup policy with which this item is backed up.
policyNamestring
Name of the policy used for protection
protectedItemDataSourceIdstring
Data ID of the protected item.
protectedItemHealthStatusHealth status of the backup item, evaluated based on last heartbeat received
protectedItemType string:AzureVmWorkloadSAPHanaDBInstance
backup item type.
protectionStateBackup state of this backup item.
protectionStatusstring
Backup status of this backup item.
resourceGuardOperationRequestsstring[]
ResourceGuardOperationRequests on which LAC check will be performed
serverNamestring
Host/Cluster Name for instance or AG
softDeleteRetentionPeriodInDaysinteger (int32)
Soft delete retention period in days
sourceResourceIdstring
ARM ID of the resource to be backed up.
vaultIdstring
ID of the vault which protects this item
workloadTypeType of workload this item represents.
AzureVmWorkloadSQLDatabaseProtectedItemObject
Azure VM workload-specific protected item representing SQL Database.
Name Type Description backupManagementTypeType of backup management for the backed up item.
backupSetNamestring
Name of the backup set the backup item belongs to
containerNamestring
Unique name of container
createModeCreate mode to indicate recovery of existing soft deleted data source or creation of new data source.
deferredDeleteTimeInUTCstring (date-time)
Time for deferred deletion in UTC
deferredDeleteTimeRemainingstring
Time remaining before the DS marked for deferred delete is permanently deleted
extendedInfoAzureVmWorkloadProtectedItemExtendedInfo
Additional information for this backup item.
friendlyNamestring
Friendly name of the DB represented by this backup item.
isArchiveEnabledboolean
Flag to identify whether datasource is protected in archive
isDeferredDeleteScheduleUpcomingboolean
Flag to identify whether the deferred deleted DS is to be purged soon
isRehydrateboolean
Flag to identify that deferred deleted DS is to be moved into Pause state
isScheduledForDeferredDeleteboolean
Flag to identify whether the DS is scheduled for deferred delete
kpisHealths<string, KPIResourceHealthDetails>
Health details of different KPIs
lastBackupErrorDetailError details in last backup
lastBackupStatusLast backup operation status. Possible values: Healthy, Unhealthy.
lastBackupTimestring (date-time)
Timestamp of the last backup operation on this backup item.
lastRecoveryPointstring (date-time)
Timestamp when the last (latest) backup copy was created for this backup item.
nodesListList of the nodes in case of distributed container.
parentNamestring
Parent name of the DB such as Instance or Availability Group.
parentTypestring
Parent type of protected item, example: for a DB, standalone server or distributed
policyIdstring
ID of the backup policy with which this item is backed up.
policyNamestring
Name of the policy used for protection
protectedItemDataSourceIdstring
Data ID of the protected item.
protectedItemHealthStatusHealth status of the backup item, evaluated based on last heartbeat received
protectedItemType string:AzureVmWorkloadSQLDatabase
backup item type.
protectionStateBackup state of this backup item.
protectionStatusstring
Backup status of this backup item.
resourceGuardOperationRequestsstring[]
ResourceGuardOperationRequests on which LAC check will be performed
serverNamestring
Host/Cluster Name for instance or AG
softDeleteRetentionPeriodInDaysinteger (int32)
Soft delete retention period in days
sourceResourceIdstring
ARM ID of the resource to be backed up.
vaultIdstring
ID of the vault which protects this item
workloadTypeType of workload this item represents.
BackupManagementTypeEnumeration
Type of backup management for the backed up item.
Value Description Invalid AzureIaasVM MAB DPM AzureBackupServer AzureSql AzureStorage AzureWorkload DefaultBackup CloudErrorObject
An error response from the Container Instance service.
CloudErrorBodyObject
An error response from the Container Instance service.
Name Type Description additionalInfoThe error additional info.
codestring
An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
detailsA list of additional details about the error.
messagestring
A message describing the error, intended to be suitable for display in a user interface.
targetstring
The target of the particular error. For example, the name of the property in error.
CreateModeEnumeration
Create mode to indicate recovery of existing soft deleted data source or creation of new data source.
Value Description Invalid Default Recover DataSourceTypeEnumeration
Type of workload this item represents.
Value Description Invalid VM FileFolder AzureSqlDb SQLDB Exchange Sharepoint VMwareVM SystemState Client GenericDataSource SQLDataBase AzureFileShare SAPHanaDatabase SAPAseDatabase SAPHanaDBInstance DiskExclusionPropertiesObject
Name Type Description diskLunListinteger[] (int32)
List of Disks' Logical Unit Numbers (LUN) to be used for VM Protection.
isInclusionListboolean
Flag to indicate whether DiskLunList is to be included/ excluded from backup.
DistributedNodesInfoObject
This is used to represent the various nodes of the distributed container.
Name Type Description errorDetailError Details if the Status is non-success.
nodeNamestring
Name of the node under a distributed container.
sourceResourceIdstring
ARM resource id of the node
statusstring
Status of this Node. Failed | Succeeded
DPMProtectedItemObject
Additional information on Backup engine specific backup item.
Name Type Description backupEngineNamestring
Backup Management server protecting this backup item
backupManagementTypeType of backup management for the backed up item.
backupSetNamestring
Name of the backup set the backup item belongs to
containerNamestring
Unique name of container
createModeCreate mode to indicate recovery of existing soft deleted data source or creation of new data source.
deferredDeleteTimeInUTCstring (date-time)
Time for deferred deletion in UTC
deferredDeleteTimeRemainingstring
Time remaining before the DS marked for deferred delete is permanently deleted
extendedInfoExtended info of the backup item.
friendlyNamestring
Friendly name of the managed item
isArchiveEnabledboolean
Flag to identify whether datasource is protected in archive
isDeferredDeleteScheduleUpcomingboolean
Flag to identify whether the deferred deleted DS is to be purged soon
isRehydrateboolean
Flag to identify that deferred deleted DS is to be moved into Pause state
isScheduledForDeferredDeleteboolean
Flag to identify whether the DS is scheduled for deferred delete
lastRecoveryPointstring (date-time)
Timestamp when the last (latest) backup copy was created for this backup item.
policyIdstring
ID of the backup policy with which this item is backed up.
policyNamestring
Name of the policy used for protection
protectedItemType string:backup item type.
protectionStateProtection state of the backup engine
resourceGuardOperationRequestsstring[]
ResourceGuardOperationRequests on which LAC check will be performed
softDeleteRetentionPeriodInDaysinteger (int32)
Soft delete retention period in days
sourceResourceIdstring
ARM ID of the resource to be backed up.
vaultIdstring
ID of the vault which protects this item
workloadTypeType of workload this item represents.
DPMProtectedItemExtendedInfoObject
Additional information of DPM Protected item.
Name Type Description diskStorageUsedInBytesstring
Used Disk storage in bytes.
isCollocatedboolean
To check if backup item is collocated.
isPresentOnCloudboolean
To check if backup item is cloud protected.
lastBackupStatusstring
Last backup status information on backup item.
lastRefreshedAtstring (date-time)
Last refresh time on backup item.
oldestRecoveryPointstring (date-time)
Oldest cloud recovery point time.
onPremiseLatestRecoveryPointstring (date-time)
latest disk recovery point time.
onPremiseOldestRecoveryPointstring (date-time)
Oldest disk recovery point time.
onPremiseRecoveryPointCountinteger (int32)
disk recovery point count.
protectableObjectLoadPathobject
Attribute to provide information on various DBs.
protectedboolean
To check if backup item is disk protected.
protectionGroupNamestring
Protection group name of the backup item.
recoveryPointCountinteger (int32)
cloud recovery point count.
totalDiskStorageSizeInBytesstring
total Disk storage in bytes.
ErrorAdditionalInfoObject
The resource management error additional info.
Name Type Description infoobject
The additional info.
typestring
The additional info type.
ErrorDetailObject
Error Detail class which encapsulates Code, Message and Recommendations.
Name Type Description codestring
Error code.
messagestring
Error Message related to the Code.
recommendationsstring[]
List of recommendation strings.
ExtendedPropertiesObject
Extended Properties for Azure IaasVM Backup.
Name Type Description diskExclusionPropertiesExtended Properties for Disk Exclusion.
linuxVmApplicationNamestring
Linux VM name
GenericProtectedItemObject
Base class for backup items.
Name Type Description backupManagementTypeType of backup management for the backed up item.
backupSetNamestring
Name of the backup set the backup item belongs to
containerNamestring
Unique name of container
createModeCreate mode to indicate recovery of existing soft deleted data source or creation of new data source.
deferredDeleteTimeInUTCstring (date-time)
Time for deferred deletion in UTC
deferredDeleteTimeRemainingstring
Time remaining before the DS marked for deferred delete is permanently deleted
fabricNamestring
Name of this backup item's fabric.
friendlyNamestring
Friendly name of the container.
isArchiveEnabledboolean
Flag to identify whether datasource is protected in archive
isDeferredDeleteScheduleUpcomingboolean
Flag to identify whether the deferred deleted DS is to be purged soon
isRehydrateboolean
Flag to identify that deferred deleted DS is to be moved into Pause state
isScheduledForDeferredDeleteboolean
Flag to identify whether the DS is scheduled for deferred delete
lastRecoveryPointstring (date-time)
Timestamp when the last (latest) backup copy was created for this backup item.
policyIdstring
ID of the backup policy with which this item is backed up.
policyNamestring
Name of the policy used for protection
policyStatestring
Indicates consistency of policy object and policy applied to this backup item.
protectedItemIdinteger (int64)
Data Plane Service ID of the protected item.
protectedItemType string:backup item type.
protectionStateBackup state of this backup item.
resourceGuardOperationRequestsstring[]
ResourceGuardOperationRequests on which LAC check will be performed
softDeleteRetentionPeriodInDaysinteger (int32)
Soft delete retention period in days
sourceAssociationsobject
Loosely coupled (type, value) associations (example - parent of a protected item)
sourceResourceIdstring
ARM ID of the resource to be backed up.
vaultIdstring
ID of the vault which protects this item
workloadTypeType of workload this item represents.
HealthStatusEnumeration
Health status of protected item.
Value Description Passed ActionRequired ActionSuggested Invalid KPIResourceHealthDetailsObject
KPI Resource Health Details
LastBackupStatusEnumeration
Last backup operation status. Possible values: Healthy, Unhealthy.
Value Description Invalid Healthy Unhealthy IRPending MabFileFolderProtectedItemObject
MAB workload-specific backup item.
Name Type Description backupManagementTypeType of backup management for the backed up item.
backupSetNamestring
Name of the backup set the backup item belongs to
computerNamestring
Name of the computer associated with this backup item.
containerNamestring
Unique name of container
createModeCreate mode to indicate recovery of existing soft deleted data source or creation of new data source.
deferredDeleteSyncTimeInUTCinteger (int64)
Sync time for deferred deletion in UTC
deferredDeleteTimeInUTCstring (date-time)
Time for deferred deletion in UTC
deferredDeleteTimeRemainingstring
Time remaining before the DS marked for deferred delete is permanently deleted
extendedInfoMabFileFolderProtectedItemExtendedInfo
Additional information with this backup item.
friendlyNamestring
Friendly name of this backup item.
isArchiveEnabledboolean
Flag to identify whether datasource is protected in archive
isDeferredDeleteScheduleUpcomingboolean
Flag to identify whether the deferred deleted DS is to be purged soon
isRehydrateboolean
Flag to identify that deferred deleted DS is to be moved into Pause state
isScheduledForDeferredDeleteboolean
Flag to identify whether the DS is scheduled for deferred delete
lastBackupStatusstring
Status of last backup operation.
lastBackupTimestring (date-time)
Timestamp of the last backup operation on this backup item.
lastRecoveryPointstring (date-time)
Timestamp when the last (latest) backup copy was created for this backup item.
policyIdstring
ID of the backup policy with which this item is backed up.
policyNamestring
Name of the policy used for protection
protectedItemType string:backup item type.
protectionStatestring
Protected, ProtectionStopped, IRPending or ProtectionError
resourceGuardOperationRequestsstring[]
ResourceGuardOperationRequests on which LAC check will be performed
softDeleteRetentionPeriodInDaysinteger (int32)
Soft delete retention period in days
sourceResourceIdstring
ARM ID of the resource to be backed up.
vaultIdstring
ID of the vault which protects this item
workloadTypeType of workload this item represents.
MabFileFolderProtectedItemExtendedInfoObject
Additional information on the backed up item.
Name Type Description lastRefreshedAtstring (date-time)
Last time when the agent data synced to service.
oldestRecoveryPointstring (date-time)
The oldest backup copy available.
recoveryPointCountinteger (int32)
Number of backup copies associated with the backup item.
ProtectedItemHealthStatusEnumeration
Health status of the backup item, evaluated based on last heartbeat received
Value Description Invalid Healthy Unhealthy NotReachable IRPending ProtectedItemResourceObject
Base class for backup items.
ProtectedItemStateEnumeration
Backup state of the backed up item.
Value Description Invalid IRPending Protected ProtectionError ProtectionStopped ProtectionPaused BackupsSuspended ProtectionStateEnumeration
Backup state of this backup item.
Value Description Invalid IRPending Protected ProtectionError ProtectionStopped ProtectionPaused BackupsSuspended ResourceHealthDetailsObject
Health Details for backup items.
Name Type Description codeinteger (int32)
Health Code
messagestring
Health Message
recommendationsstring[]
Health Recommended Actions
titlestring
Health Title
ResourceHealthStatusEnumeration
Resource Health Status
Value Description Healthy TransientDegraded PersistentDegraded TransientUnhealthy PersistentUnhealthy InvalidRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4