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
resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

resourceGuardsName
path True

string

The name of ResourceGuard

subscriptionId
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

ResourceGuard

ResourceGuardResource properties

tags

object

Resource tags.

Responses

Name Type Description
200 OK

ResourceGuardResource

Resource 'ResourceGuardResource' update operation succeeded

201 Created

ResourceGuardResource

Resource 'ResourceGuardResource' create operation succeeded

Other Status Codes

CloudError

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
CloudError

An error response from Azure Backup.

createdByType

The type of identity that created the resource.

Error

The resource management error response.

ErrorAdditionalInfo

The resource management error additional info.

ProvisioningState

Provisioning state of the BackupVault resource

ResourceGuard
ResourceGuardOperation

This class contains all the details about a critical operation.

ResourceGuardResource

Concrete tracked resource types can be created by aliasing this type using a specific property type.

systemData

Metadata pertaining to creation and last modification of the resource.

CloudError

An error response from Azure Backup.

Name Type Description
error

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

ErrorAdditionalInfo[]

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

ProvisioningState

Provisioning state of the BackupVault resource

resourceGuardOperations

ResourceGuardOperation[]

{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

ResourceGuard

ResourceGuardResource properties

systemData

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

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

createdByType

The type of identity that last modified the resource.