Resource Guards - Put
Creates or updates a ResourceGuard resource belonging to a resource group.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}?api-version=2026-03-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
|
resource
|
path | True |
string |
The name of ResourceGuard |
|
subscription
|
path | True |
string (uuid) |
The ID of the target subscription. The value must be an UUID. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| location | True |
string |
The geo-location where the resource lives |
| eTag |
string |
Optional ETag. |
|
| properties |
ResourceGuardResource properties |
||
| tags |
object |
Resource tags. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Resource 'ResourceGuardResource' update operation succeeded |
|
| 201 Created |
Resource 'ResourceGuardResource' create operation succeeded |
|
| Other Status Codes |
An unexpected error response. |
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
Create ResourceGuard
Sample request
PUT https://management.azure.com/subscriptions/0b352192-dcac-4cc7-992e-a96190ccc68c/resourceGroups/SampleResourceGroup/providers/Microsoft.DataProtection/resourceGuards/swaggerExample?api-version=2026-03-01
{
"location": "WestUS",
"tags": {
"key1": "val1"
}
}
Sample response
{
"name": "VaultGuardTestNew",
"type": "Microsoft.DataProtection/resourceGuards",
"id": "/subscriptions/c999d45b-944f-418c-a0d8-c3fcfd1802c8/resourceGroups/vaultguardRGNew/providers/Microsoft.DataProtection/resourceGuards/VaultGuardTestNew",
"location": "eastus",
"properties": {
"description": "Please take JIT access before performing any of the critical operation",
"allowAutoApprovals": true,
"provisioningState": "Succeeded",
"resourceGuardOperations": [
{
"requestResourceType": "Microsoft.DataProtection/resourceGuards/deleteResourceGuardProxyRequests",
"vaultCriticalOperation": "Microsoft.RecoveryServices/vaults/backupResourceGuardProxies/delete"
},
{
"requestResourceType": "Microsoft.DataProtection/resourceGuards/disableSoftDeleteRequests",
"vaultCriticalOperation": "Microsoft.RecoveryServices/vaults/backupconfig/write"
}
],
"vaultCriticalOperationExclusionList": []
},
"tags": {
"TestKey": "TestValue"
}
}
{
"name": "VaultGuardTestNew",
"type": "Microsoft.DataProtection/resourceGuards",
"id": "/subscriptions/c999d45b-944f-418c-a0d8-c3fcfd1802c8/resourceGroups/vaultguardRGNew/providers/Microsoft.DataProtection/resourceGuards/VaultGuardTestNew",
"location": "eastus",
"properties": {
"description": "Please take JIT access before performing any of the critical operation",
"allowAutoApprovals": true,
"provisioningState": "Succeeded",
"resourceGuardOperations": [
{
"requestResourceType": "Microsoft.DataProtection/resourceGuards/deleteResourceGuardProxyRequests",
"vaultCriticalOperation": "Microsoft.RecoveryServices/vaults/backupResourceGuardProxies/delete"
},
{
"requestResourceType": "Microsoft.DataProtection/resourceGuards/disableSoftDeleteRequests",
"vaultCriticalOperation": "Microsoft.RecoveryServices/vaults/backupconfig/write"
}
],
"vaultCriticalOperationExclusionList": []
},
"tags": {
"TestKey": "TestValue"
}
}
Definitions
| Name | Description |
|---|---|
|
Cloud |
An error response from Azure Backup. |
|
created |
The type of identity that created the resource. |
| Error |
The resource management error response. |
|
Error |
The resource management error additional info. |
|
Provisioning |
Provisioning state of the BackupVault resource |
|
Resource |
|
|
Resource |
This class contains all the details about a critical operation. |
|
Resource |
Concrete tracked resource types can be created by aliasing this type using a specific property type. |
|
system |
Metadata pertaining to creation and last modification of the resource. |
CloudError
An error response from Azure Backup.
| Name | Type | Description |
|---|---|---|
| error |
The resource management error response. |
createdByType
The type of identity that created the resource.
| Value | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
Error
The resource management error response.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
Error[] |
The error details. |
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
ProvisioningState
Provisioning state of the BackupVault resource
| Value | Description |
|---|---|
| Failed | |
| Provisioning | |
| Succeeded | |
| Unknown | |
| Updating |
ResourceGuard
| Name | Type | Description |
|---|---|---|
| allowAutoApprovals |
boolean |
This flag indicates whether auto approval is allowed or not. |
| description |
string |
Description about the pre-req steps to perform all the critical operations. |
| provisioningState |
Provisioning state of the BackupVault resource |
|
| resourceGuardOperations |
{readonly} List of operation details those are protected by the ResourceGuard resource |
|
| vaultCriticalOperationExclusionList |
string[] |
List of critical operations which are not protected by this resourceGuard |
ResourceGuardOperation
This class contains all the details about a critical operation.
| Name | Type | Description |
|---|---|---|
| requestResourceType |
string |
Type of resource request. |
| vaultCriticalOperation |
string |
Name of the critical operation. |
ResourceGuardResource
Concrete tracked resource types can be created by aliasing this type using a specific property type.
| Name | Type | Description |
|---|---|---|
| eTag |
string |
Optional ETag. |
| id |
string (arm-id) |
Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
| location |
string |
The geo-location where the resource lives |
| name |
string |
The name of the resource |
| properties |
ResourceGuardResource properties |
|
| systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
| tags |
object |
Resource tags. |
| type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
systemData
Metadata pertaining to creation and last modification of the resource.
| Name | Type | Description |
|---|---|---|
| createdAt |
string (date-time) |
The timestamp of resource creation (UTC). |
| createdBy |
string |
The identity that created the resource. |
| createdByType |
The type of identity that created the resource. |
|
| lastModifiedAt |
string (date-time) |
The timestamp of resource last modification (UTC) |
| lastModifiedBy |
string |
The identity that last modified the resource. |
| lastModifiedByType |
The type of identity that last modified the resource. |