Used to disable backup of an item within a container. This is an asynchronous operation. To know the status of the
request, call the GetItemOperationResult API.
DELETE https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}?api-version=2024-04-01
URI Parameters
Name |
In |
Required |
Type |
Description |
containerName
|
path |
True
|
string
|
Container name associated with the backed up item.
|
fabricName
|
path |
True
|
string
|
Fabric name associated with the backed up item.
|
protectedItemName
|
path |
True
|
string
|
Backed up item to be deleted.
|
resourceGroupName
|
path |
True
|
string
|
The name of the resource group where the recovery services vault is present.
|
subscriptionId
|
path |
True
|
string
|
The subscription Id.
|
vaultName
|
path |
True
|
string
|
The name of the recovery services vault.
|
api-version
|
query |
True
|
string
|
Client Api Version.
|
Responses
Name |
Type |
Description |
200 OK
|
|
OK
|
202 Accepted
|
|
Accepted
|
204 No Content
|
|
NoContent
|
Other Status Codes
|
CloudError
|
Error response describing why the operation failed.
|
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name |
Description |
user_impersonation
|
impersonate your user account.
|
Examples
Delete Protection from Azure Virtual Machine
Sample request
DELETE https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PythonSDKBackupTestRg/providers/Microsoft.RecoveryServices/vaults/PySDKBackupTestRsVault/backupFabrics/Azure/protectionContainers/iaasvmcontainer;iaasvmcontainerv2;pysdktestrg;pysdktestv2vm1/protectedItems/vm;iaasvmcontainerv2;pysdktestrg;pysdktestv2vm1?api-version=2024-04-01
/**
* Samples for ProtectedItems Delete.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2024-04-01/examples/
* Common/ProtectedItem_Delete.json
*/
/**
* Sample code: Delete Protection from Azure Virtual Machine.
*
* @param manager Entry point to RecoveryServicesBackupManager.
*/
public static void deleteProtectionFromAzureVirtualMachine(
com.azure.resourcemanager.recoveryservicesbackup.RecoveryServicesBackupManager manager) {
manager.protectedItems().deleteWithResponse("PySDKBackupTestRsVault", "PythonSDKBackupTestRg", "Azure",
"iaasvmcontainer;iaasvmcontainerv2;pysdktestrg;pysdktestv2vm1",
"vm;iaasvmcontainerv2;pysdktestrg;pysdktestv2vm1", com.azure.core.util.Context.NONE);
}
}
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 protected_item_delete.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",
)
client.protected_items.delete(
vault_name="PySDKBackupTestRsVault",
resource_group_name="PythonSDKBackupTestRg",
fabric_name="Azure",
container_name="iaasvmcontainer;iaasvmcontainerv2;pysdktestrg;pysdktestv2vm1",
protected_item_name="vm;iaasvmcontainerv2;pysdktestrg;pysdktestv2vm1",
)
# x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2024-04-01/examples/Common/ProtectedItem_Delete.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/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/33c4457b1d13f83965f4fe3367dca4a6df898100/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2024-04-01/examples/Common/ProtectedItem_Delete.json
func ExampleProtectedItemsClient_Delete() {
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)
}
_, err = clientFactory.NewProtectedItemsClient().Delete(ctx, "PySDKBackupTestRsVault", "PythonSDKBackupTestRg", "Azure", "iaasvmcontainer;iaasvmcontainerv2;pysdktestrg;pysdktestv2vm1", "vm;iaasvmcontainerv2;pysdktestrg;pysdktestv2vm1", nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
}
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");
/**
* This sample demonstrates how to Used to disable backup of an item within a container. This is an asynchronous operation. To know the status of the
request, call the GetItemOperationResult API.
*
* @summary Used to disable backup of an item within a container. This is an asynchronous operation. To know the status of the
request, call the GetItemOperationResult API.
* x-ms-original-file: specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2024-04-01/examples/Common/ProtectedItem_Delete.json
*/
async function deleteProtectionFromAzureVirtualMachine() {
const subscriptionId =
process.env["RECOVERYSERVICESBACKUP_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const vaultName = "PySDKBackupTestRsVault";
const resourceGroupName =
process.env["RECOVERYSERVICESBACKUP_RESOURCE_GROUP"] || "PythonSDKBackupTestRg";
const fabricName = "Azure";
const containerName = "iaasvmcontainer;iaasvmcontainerv2;pysdktestrg;pysdktestv2vm1";
const protectedItemName = "vm;iaasvmcontainerv2;pysdktestrg;pysdktestv2vm1";
const credential = new DefaultAzureCredential();
const client = new RecoveryServicesBackupClient(credential, subscriptionId);
const result = await client.protectedItems.delete(
vaultName,
resourceGroupName,
fabricName,
containerName,
protectedItemName,
);
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
Sample response
Azure-AsyncOperation: https://management.azure.com/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PythonSDKBackupTestRg/providers/Microsoft.RecoveryServices/vaults/PySDKBackupTestRsVault/backupOperations/00000000-0000-0000-0000-000000000000?api-version=2016-12-01
Location: https://management.azure.com/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PythonSDKBackupTestRg/providers/Microsoft.RecoveryServices/vaults/PySDKBackupTestRsVault/backupOperationResults/00000000-0000-0000-0000-000000000000?api-version=2016-12-01
Retry-After: 60
Definitions
Name |
Description |
CloudError
|
An error response from the Container Instance service.
|
CloudErrorBody
|
An error response from the Container Instance service.
|
ErrorAdditionalInfo
|
The resource management error additional info.
|
CloudError
An error response from the Container Instance service.
CloudErrorBody
An error response from the Container Instance service.
Name |
Type |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
The error additional info.
|
code
|
string
|
An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
|
details
|
CloudErrorBody[]
|
A list of additional details about the error.
|
message
|
string
|
A message describing the error, intended to be suitable for display in a user interface.
|
target
|
string
|
The target of the particular error. For example, the name of the property in error.
|
ErrorAdditionalInfo
The resource management error additional info.
Name |
Type |
Description |
info
|
object
|
The additional info.
|
type
|
string
|
The additional info type.
|