Share via


az dataprotection resource-guard

Note

This reference is part of the dataprotection extension for the Azure CLI (version 2.57.0 or higher). The extension will automatically install the first time you run an az dataprotection resource-guard command. Learn more about extensions.

Manage resource guard with dataprotection.

Commands

Name Description Type Status
az dataprotection resource-guard create

Creates or updates a ResourceGuard resource belonging to a resource group.

Extension GA
az dataprotection resource-guard delete

Deletes a ResourceGuard resource from the resource group.

Extension GA
az dataprotection resource-guard list

Gets list of ResourceGuards in a subscription or in a resource group.

Extension GA
az dataprotection resource-guard list-protected-operations

Lists protected operations associated with a ResourceGuard.

Extension GA
az dataprotection resource-guard show

Returns a ResourceGuard belonging to a resource group.

Extension GA
az dataprotection resource-guard unlock

Unlocks the critical operation which is protected by the resource guard.

Extension GA
az dataprotection resource-guard update

Updates protected operations associated with a ResourceGuard.

Extension GA

az dataprotection resource-guard create

Creates or updates a ResourceGuard resource belonging to a resource group.

az dataprotection resource-guard create --name
                                        --resource-group
                                        [--e-tag]
                                        [--location]
                                        [--tags]

Examples

Create ResourceGuard

az dataprotection resource-guard create --location "WestUS" --tags key1="val1" --resource-group "SampleResourceGroup" --resource-guard-name "swaggerExample"

Required Parameters

--name --resource-guard-name -n

The name of Resource Guard.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--e-tag

Optional ETag.

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az dataprotection resource-guard delete

Deletes a ResourceGuard resource from the resource group.

az dataprotection resource-guard delete [--ids]
                                        [--name]
                                        [--resource-group]
                                        [--subscription]
                                        [--yes]

Examples

Delete ResourceGuard

az dataprotection resource-guard delete --resource-group "SampleResourceGroup" --resource-guard-name "swaggerExample"

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name --resource-guard-name -n

The name of ResourceGuard.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az dataprotection resource-guard list

Gets list of ResourceGuards in a subscription or in a resource group.

az dataprotection resource-guard list [--max-items]
                                      [--next-token]
                                      [--resource-group]

Examples

List ResourceGuards in a subscription

az dataprotection resource-guard list

List ResourceGuards in a resource group

az dataprotection resource-guard list -g sarath-rg

Optional Parameters

--max-items

Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token argument of a subsequent command.

--next-token

Token to specify where to start paginating. This is the token value from a previously truncated response.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az dataprotection resource-guard list-protected-operations

Lists protected operations associated with a ResourceGuard.

az dataprotection resource-guard list-protected-operations --resource-type {Microsoft.DataProtection/backupVaults, Microsoft.RecoveryServices/vaults}
                                                           [--ids]
                                                           [--name]
                                                           [--resource-group]
                                                           [--subscription]

Examples

List ResourceGuard protected operations

az dataprotection resource-guard list-protected-operations --resource-group "SampleResourceGroup" --resource-guard-name "swaggerExample" --resource-type "Microsoft.RecoveryServices/vaults"

Required Parameters

--resource-type

Type of the resource associated with the protected operations.

Accepted values: Microsoft.DataProtection/backupVaults, Microsoft.RecoveryServices/vaults

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name --resource-guard-name -n

The name of ResourceGuard.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az dataprotection resource-guard show

Returns a ResourceGuard belonging to a resource group.

az dataprotection resource-guard show [--ids]
                                      [--name]
                                      [--resource-group]
                                      [--subscription]

Examples

Get ResourceGuard

az dataprotection resource-guard show --resource-group "SampleResourceGroup" --resource-guard-name "swaggerExample"

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name --resource-guard-name -n

The name of ResourceGuard.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az dataprotection resource-guard unlock

Unlocks the critical operation which is protected by the resource guard.

az dataprotection resource-guard unlock [--ids]
                                        [--name]
                                        [--operation-requests]
                                        [--resource-group]
                                        [--resource-to-be-deleted]
                                        [--subscription]
                                        [--tenant-id]
                                        [--vault-name]

Examples

Unlock deletion of the ResourceGuard mapping to disable MUA on the vault

az dataprotection resource-guard unlock -n "DppResourceGuardProxy" -g "sampleRG" -v "sampleVault" --resource-guard-operation-requests "DisableMUA" --resource-to-be-deleted "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sampleRG/providers/Microsoft.DataProtection/backupVaults/sampleVault/backupResourceGuardProxies/DppResourceGuardProxy"

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name --resource-guard-mapping-name -n

The name of the resource guard mapping.

Default value: DppResourceGuardProxy
--operation-requests --resource-guard-operation-requests

List of critical operations which are protected by the resourceGuard and need to be unlocked. Supported values are DeleteBackupInstance, DisableMUA Support shorthand-syntax, json-file and yaml-file. Try "??" to show more. Singular flags: --operation-requests.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--resource-to-be-deleted

ARM Id of the resource that need to be unlocked for performing critical operation.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--tenant-id

Tenant ID for cross-tenant calls.

--vault-name -v

The name of the backup vault.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az dataprotection resource-guard update

Updates protected operations associated with a ResourceGuard.

az dataprotection resource-guard update [--add]
                                        [--critical-operation-exclusion-list]
                                        [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                                        [--ids]
                                        [--name]
                                        [--remove]
                                        [--resource-group]
                                        [--resource-type {Microsoft.DataProtection/backupVaults, Microsoft.RecoveryServices/vaults}]
                                        [--set]
                                        [--subscription]
                                        [--tags]

Examples

Update ResourceGuard

az dataprotection resource-guard update --resource-group "SampleResourceGroup" --resource-guard-name "swaggerExample" --resource-type "Microsoft.RecoveryServices/vaults" --critical-operation-exclusion-list deleteProtection getSecurityPIN updatePolicy

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

--critical-operation-exclusion-list

List of critical operations which are not protected by this resourceGuard. Allowed values: deleteProtection, getSecurityPIN, updatePolicy, updateProtection. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name --resource-guard-name -n

The name of Resource Guard.

--remove

Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--resource-type

Type of the resource associated with the protected operations.

Accepted values: Microsoft.DataProtection/backupVaults, Microsoft.RecoveryServices/vaults
--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.