Share via


az site-recovery protected-item

Note

This reference is part of the site-recovery extension for the Azure CLI (version 2.51.0 or higher). The extension will automatically install the first time you run an az site-recovery protected-item command. Learn more about extensions.

Manage Protected Item.

Commands

Name Description Type Status
az site-recovery protected-item create

Create operation to create an ASR replication protected item (Enable replication).

Extension GA
az site-recovery protected-item delete

Delete operation to delete or purge a replication protected item. This operation will force delete the replication protected item. Use the remove operation on replication protected item to perform a clean disable replication for the item.

Extension GA
az site-recovery protected-item failover-commit

Operation to commit the failover of the replication protected item.

Extension GA
az site-recovery protected-item list

List the list of ASR replication protected items in the protection container.

Extension GA
az site-recovery protected-item planned-failover

Operation to initiate a planned failover of the replication protected item.

Extension GA
az site-recovery protected-item remove

The operation to disable replication on a replication protected item. This will also remove the item.

Extension GA
az site-recovery protected-item reprotect

Operation to reprotect or reverse replicate a failed over replication protected item.

Extension GA
az site-recovery protected-item show

Get the details of an ASR replication protected item.

Extension GA
az site-recovery protected-item unplanned-failover

Operation to initiate a failover of the replication protected item.

Extension GA
az site-recovery protected-item update

Update operation to create an ASR replication protected item (Enable replication).

Extension GA

az site-recovery protected-item create

Create operation to create an ASR replication protected item (Enable replication).

az site-recovery protected-item create --fabric-name
                                       --name --replicated-protected-item-name
                                       --protection-container --protection-container-name
                                       --resource-group
                                       --vault-name
                                       [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                       [--policy-id]
                                       [--protectable-item-id]
                                       [--provider-details --provider-specific-details]

Examples

protected-item create for A2A

az site-recovery protected-item create -g rg --fabric-name fabric1_name -n protected_item_name --protection-container container1_name --vault-name vault_name --policy-id policy_id --provider-details '{a2a:{fabric-object-id:vm_id,vm-managed-disks:[{disk-id:os_disk,primary-staging-azure-storage-account-id:storage1_id,recovery-resource-group-id:rg_id}],recovery-azure-network-id:vnet2_id,recovery-container-id:container2_id,recovery-resource-group-id:rg_id,recovery-subnet-name:vnet2_subnet}}'

protected-item create for hyper-v-replica-azure

az site-recovery protected-item create -g "rg" --fabric-name "fabric_name" -n "protected_item_name" --protection-container "container_name" --vault-name "vault_name" --policy-id "policy_id" --protectable-item-id "protectable_item_id" --provider-details '{hyper-v-replica-azure:{disks-to-include:["vhd_id"],enable-rdp-on-target-option:Never,os-type:Windows,target-azure-network-id:"vnet_id",target-azure-subnet-id:"subnet_id",target-azure-v2-resource-group-id:"rg_id",target-azure-vm-name:"hypervvm_name",target-storage-account-id:"storage_id",use-managed-disks:false,vhd-id:"vhd_id"}}'

protected-item create for v2arcm

az site-recovery protected-item create -g "rg" --fabric-name "fabric_name" -n "protected_item_name" --protection-container "container_name" --vault-name "vault_name" --policy-id "policy_id" --provider-details '{in-mage-rcm:{fabric-discovery-machine-id:"fabric_discovery_machine_id",process-server-id:"process_server_id",run-as-account-id:"run_as_account_id",target-resource-group-id:"rg_id",target-boot-diagnostics-storage-account-id:"storage_id",target-network-id:"vnet_id",target-subnet-name:MySubnet,target-vm-name:"target_vm_name",disks-default:{disk-type:Premium_LRS,log-storage-account-id:"storage_id"}}}'

Required Parameters

--fabric-name

Name of the fabric.

--name --replicated-protected-item-name -n

A name for the replication protected item.

--protection-container --protection-container-name

Protection container name.

--resource-group -g

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

--vault-name

The name of the recovery services vault.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--policy-id

The Policy Id.

Property Value
Parameter group: Properties Arguments
--protectable-item-id

The protectable item Id.

Property Value
Parameter group: Properties Arguments
--provider-details --provider-specific-details

The ReplicationProviderInput. For HyperVReplicaAzure provider, it will be AzureEnableProtectionInput object. For San provider, it will be SanEnableProtectionInput object. For HyperVReplicaAzure provider, it can be null. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az site-recovery protected-item delete

Delete operation to delete or purge a replication protected item. This operation will force delete the replication protected item. Use the remove operation on replication protected item to perform a clean disable replication for the item.

az site-recovery protected-item delete [--fabric-name]
                                       [--ids]
                                       [--name --replicated-protected-item-name]
                                       [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                       [--protection-container --protection-container-name]
                                       [--resource-group]
                                       [--subscription]
                                       [--vault-name]
                                       [--yes]

Examples

protected-item delete

az site-recovery protected-item delete -g rg --fabric-name fabric2_name -n protected_item_name --protection-container container2_name --vault-name vault_name

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--fabric-name

Fabric name.

Property Value
Parameter group: Resource Id Arguments
--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.

Property Value
Parameter group: Resource Id Arguments
--name --replicated-protected-item-name -n

Replication protected item name.

Property Value
Parameter group: Resource Id Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--protection-container --protection-container-name

Protection container name.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--vault-name

The name of the recovery services vault.

Property Value
Parameter group: Resource Id Arguments
--yes -y

Do not prompt for confirmation.

Property Value
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

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

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

--verbose

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

Property Value
Default value: False

az site-recovery protected-item failover-commit

Operation to commit the failover of the replication protected item.

az site-recovery protected-item failover-commit [--fabric-name]
                                                [--ids]
                                                [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                                [--protection-container --protection-container-name]
                                                [--replicated-protected-item-name]
                                                [--resource-group]
                                                [--subscription]
                                                [--vault-name]

Examples

protected-item failover-commit

az site-recovery protected-item failover-commit --fabric-name fabric1_name --protection-container container1_name -n protected_item_name -g rg --vault-name vault_name

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--fabric-name

Unique fabric name.

Property Value
Parameter group: Resource Id Arguments
--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.

Property Value
Parameter group: Resource Id Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--protection-container --protection-container-name

Protection container name.

Property Value
Parameter group: Resource Id Arguments
--replicated-protected-item-name -n

Replication protected item name.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--vault-name

The name of the recovery services vault.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

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

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

--verbose

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

Property Value
Default value: False

az site-recovery protected-item list

List the list of ASR replication protected items in the protection container.

az site-recovery protected-item list --fabric-name
                                     --protection-container --protection-container-name
                                     --resource-group
                                     --vault-name
                                     [--max-items]
                                     [--next-token]

Examples

protected-item list

az site-recovery protected-item list -g rg --fabric-name fabric_recovery_name --protection-container container_recovery_name --vault-name vault_name

Required Parameters

--fabric-name

Fabric name.

--protection-container --protection-container-name

Protection container name.

--resource-group -g

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

--vault-name

The name of the recovery services vault.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--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.

Property Value
Parameter group: Pagination Arguments
--next-token

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

Property Value
Parameter group: Pagination Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az site-recovery protected-item planned-failover

Operation to initiate a planned failover of the replication protected item.

az site-recovery protected-item planned-failover [--fabric-name]
                                                 [--failover-direction]
                                                 [--ids]
                                                 [--name --replicated-protected-item-name]
                                                 [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                                 [--protection-container --protection-container-name]
                                                 [--provider-details --provider-specific-details]
                                                 [--resource-group]
                                                 [--subscription]
                                                 [--vault-name]

Examples

failback hyper-v-replica-azure

az site-recovery protected-item planned-failover --fabric-name "fabric_name" --protection-container "container_name" -n "protected_item_name" -g "rg" --vault-name "vault_name" --failover-direction RecoveryToPrimary --provider-details '{hyper-v-replica-azure-failback:{data-sync-option:ForSynchronization,recovery-vm-creation-option:NoAction}}'

failback v2arcm

az site-recovery protected-item planned-failover --fabric-name "fabric_name" --protection-container "container_name" -n "protected_item_name" -g "rg" --vault-name "vault_name" --provider-details '{in-mage-rcm-failback:{recovery-point-type:CrashConsistent}}'

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--fabric-name

Unique fabric name.

Property Value
Parameter group: Resource Id Arguments
--failover-direction

Failover direction.

Property Value
Parameter group: Properties Arguments
--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.

Property Value
Parameter group: Resource Id Arguments
--name --replicated-protected-item-name -n

Replication protected item name.

Property Value
Parameter group: Resource Id Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--protection-container --protection-container-name

Protection container name.

Property Value
Parameter group: Resource Id Arguments
--provider-details --provider-specific-details

Provider specific settings. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--vault-name

The name of the recovery services vault.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

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

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

--verbose

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

Property Value
Default value: False

az site-recovery protected-item remove

The operation to disable replication on a replication protected item. This will also remove the item.

az site-recovery protected-item remove [--disable-protection-reason --disable-reason {MigrationComplete, NotSpecified}]
                                       [--fabric-name]
                                       [--ids]
                                       [--name --replicated-protected-item-name]
                                       [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                       [--protection-container --protection-container-name]
                                       [--provider-input --replication-provider-input]
                                       [--resource-group]
                                       [--subscription]
                                       [--vault-name]

Examples

protected-item remove

az site-recovery protected-item remove -g rg --fabric-name fabric_recovery_name -n protected_item_name --protection-container container_recovery_name --vault-name vault_name

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--disable-protection-reason --disable-reason

Disable protection reason. It can have values NotSpecified/MigrationComplete.

Property Value
Parameter group: Properties Arguments
Accepted values: MigrationComplete, NotSpecified
--fabric-name

Fabric name.

Property Value
Parameter group: Resource Id Arguments
--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.

Property Value
Parameter group: Resource Id Arguments
--name --replicated-protected-item-name -n

Replication protected item name.

Property Value
Parameter group: Resource Id Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--protection-container --protection-container-name

Protection container name.

Property Value
Parameter group: Resource Id Arguments
--provider-input --replication-provider-input

Replication provider specific input. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--vault-name

The name of the recovery services vault.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

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

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

--verbose

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

Property Value
Default value: False

az site-recovery protected-item reprotect

Operation to reprotect or reverse replicate a failed over replication protected item.

az site-recovery protected-item reprotect [--fabric-name]
                                          [--failover-direction]
                                          [--ids]
                                          [--name --replicated-protected-item-name]
                                          [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                          [--protection-container --protection-container-name]
                                          [--provider-details --provider-specific-details]
                                          [--resource-group]
                                          [--subscription]
                                          [--vault-name]

Examples

reprotect for v2arcm after failover

az site-recovery protected-item reprotect --fabric-name "fabric_name" --protection-container "container_name" -n "protected_item_name" -g "rg" --vault-name "vault_name" --failover-direction RecoveryToPrimary --provider-details '{in-mage-rcm:{datastore-name:"datastore_name",log-storage-account-id:"storage_id",reprotect-agent-id:"reprotect_agent_id"}}'

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--fabric-name

Unique fabric name.

Property Value
Parameter group: Resource Id Arguments
--failover-direction

Failover direction.

Property Value
Parameter group: Properties Arguments
--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.

Property Value
Parameter group: Resource Id Arguments
--name --replicated-protected-item-name -n

Replication protected item name.

Property Value
Parameter group: Resource Id Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--protection-container --protection-container-name

Protection container name.

Property Value
Parameter group: Resource Id Arguments
--provider-details --provider-specific-details

Provider specific reverse replication input. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--vault-name

The name of the recovery services vault.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

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

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

--verbose

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

Property Value
Default value: False

az site-recovery protected-item show

Get the details of an ASR replication protected item.

az site-recovery protected-item show [--fabric-name]
                                     [--ids]
                                     [--name --replicated-protected-item-name]
                                     [--protection-container --protection-container-name]
                                     [--resource-group]
                                     [--subscription]
                                     [--vault-name]

Examples

protected-item show

az site-recovery protected-item show -g rg --fabric-name fabric1_name -n protected_item_name --protection-container container1_name --vault-name vault_name

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--fabric-name

Fabric unique name.

Property Value
Parameter group: Resource Id Arguments
--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.

Property Value
Parameter group: Resource Id Arguments
--name --replicated-protected-item-name -n

Replication protected item name.

Property Value
Parameter group: Resource Id Arguments
--protection-container --protection-container-name

Protection container name.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--vault-name

The name of the recovery services vault.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

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

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

--verbose

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

Property Value
Default value: False

az site-recovery protected-item unplanned-failover

Operation to initiate a failover of the replication protected item.

az site-recovery protected-item unplanned-failover [--fabric-name]
                                                   [--failover-direction]
                                                   [--ids]
                                                   [--name --replicated-protected-item-name]
                                                   [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                                   [--protection-container --protection-container-name]
                                                   [--provider-details --provider-specific-details]
                                                   [--resource-group]
                                                   [--source-site-operations]
                                                   [--subscription]
                                                   [--vault-name]

Examples

protected-item unplanned-failover for A2A

az site-recovery protected-item unplanned-failover --fabric-name fabric1_name --protection-container container1_name -n protected_item_name -g rg --vault-name vault_name --failover-direction PrimaryToRecovery --provider-details '{a2a:{}}' --source-site-operations NotRequired

protected-item failback for A2A

az site-recovery protected-item unplanned-failover --fabric-name fabric2_name --protection-container container2_name -n protected_item_name -g rg --vault-name vault_name --failover-direction PrimaryToRecovery --provider-details '{a2a:{}}' --source-site-operations NotRequired

protected-item failover hyper-v-replica-azure

az site-recovery protected-item unplanned-failover --fabric-name "fabric_name" --protection-container "container_name" -n "protected_item_name" -g "rg" --vault-name "vault_name" --failover-direction PrimaryToRecovery --provider-details '{hyper-v-replica-azure:""}' --source-site-operations NotRequired

protected-item unplanned-failover for v2arcm

az site-recovery protected-item unplanned-failover --fabric-name "fabric_name" --protection-container "container_name" -n "protected_item_name" -g "rg" --vault-name "vault_name" --failover-direction PrimaryToRecovery --provider-details '{in-mage-rcm:{perform-shutdown:true}}' --source-site-operations NotRequired

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--fabric-name

Unique fabric name.

Property Value
Parameter group: Resource Id Arguments
--failover-direction

Failover direction.

Property Value
Parameter group: Properties Arguments
--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.

Property Value
Parameter group: Resource Id Arguments
--name --replicated-protected-item-name -n

Replication protected item name.

Property Value
Parameter group: Resource Id Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--protection-container --protection-container-name

Protection container name.

Property Value
Parameter group: Resource Id Arguments
--provider-details --provider-specific-details

Provider specific settings. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--source-site-operations

Source site operations status.

Property Value
Parameter group: Properties Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--vault-name

The name of the recovery services vault.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

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

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

--verbose

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

Property Value
Default value: False

az site-recovery protected-item update

Update operation to create an ASR replication protected item (Enable replication).

az site-recovery protected-item update [--add]
                                       [--fabric-name]
                                       [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                                       [--ids]
                                       [--name --replicated-protected-item-name]
                                       [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                       [--policy-id]
                                       [--protectable-item-id]
                                       [--protection-container --protection-container-name]
                                       [--provider-details --provider-specific-details]
                                       [--remove]
                                       [--resource-group]
                                       [--set]
                                       [--subscription]
                                       [--vault-name]

Examples

protected-item update

az site-recovery protected-item update -g rg --fabric-name fabric1_name -n protected_item_name --protection-container container1_name --vault-name vault_name --policy-id policy_id --provider-details '{a2a:{fabric-object-id:vm_id,vm-managed-disks:[{disk-id:os_disk,primary-staging-azure-storage-account-id:storage1_id,recovery-resource-group-id:rg_id}],recovery-azure-network-id:vnet2_id,recovery-container-id:container2_id,recovery-resource-group-id:rg_id,recovery-subnet-name:vnet2_subnet}}'

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--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>.

Property Value
Parameter group: Generic Update Arguments
--fabric-name

Fabric unique name.

Property Value
Parameter group: Resource Id Arguments
--force-string

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

Property Value
Parameter group: Generic Update Arguments
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.

Property Value
Parameter group: Resource Id Arguments
--name --replicated-protected-item-name -n

Replication protected item name.

Property Value
Parameter group: Resource Id Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--policy-id

The Policy Id.

Property Value
Parameter group: Properties Arguments
--protectable-item-id

The protectable item Id.

Property Value
Parameter group: Properties Arguments
--protection-container --protection-container-name

Protection container name.

Property Value
Parameter group: Resource Id Arguments
--provider-details --provider-specific-details

The ReplicationProviderInput. For HyperVReplicaAzure provider, it will be AzureEnableProtectionInput object. For San provider, it will be SanEnableProtectionInput object. For HyperVReplicaAzure provider, it can be null. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--remove

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

Property Value
Parameter group: Generic Update Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--set

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

Property Value
Parameter group: Generic Update Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--vault-name

The name of the recovery services vault.

Property Value
Parameter group: Resource Id Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

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

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

--verbose

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

Property Value
Default value: False