Skip to main content

replication_protected_items

Creates, updates, deletes, gets or lists a replication_protected_items resource.

Overview

Namereplication_protected_items
TypeResource
Idazure.recovery_services_site_recovery.replication_protected_items

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
activeLocationstringThe Current active location of the PE.
allowedOperationsarrayThe allowed operations on the Replication protected item.
currentScenarioobjectThe current scenario.
eventCorrelationIdstringThe correlation Id for events associated with this protected item.
failoverHealthstringThe consolidated failover health for the VM.
failoverRecoveryPointIdstringThe recovery point ARM Id to which the Vm was failed over.
friendlyNamestringThe name.
healthErrorsarrayList of health errors.
lastSuccessfulFailoverTimestring (date-time)The Last successful failover time.
lastSuccessfulTestFailoverTimestring (date-time)The Last successful test failover time.
locationstringResource Location.
policyFriendlyNamestringThe name of Policy governing this PE.
policyIdstringThe ID of Policy governing this PE.
primaryFabricFriendlyNamestringThe friendly name of the primary fabric.
primaryFabricProviderstringThe fabric provider of the primary fabric.
primaryProtectionContainerFriendlyNamestringThe name of primary protection container friendly name.
protectableItemIdstringThe protected item ARM Id.
protectedItemTypestringThe type of protected item type.
protectionStatestringThe protection status.
protectionStateDescriptionstringThe protection state description.
providerSpecificDetailsobjectThe Replication provider custom settings.
recoveryContainerIdstringThe recovery container Id.
recoveryFabricFriendlyNamestringThe friendly name of recovery fabric.
recoveryFabricIdstringThe Arm Id of recovery fabric.
recoveryProtectionContainerFriendlyNamestringThe name of recovery container friendly name.
recoveryServicesProviderIdstringThe recovery provider ARM Id.
replicationHealthstringThe consolidated protection health for the VM taking any issues with SRS as well as all the replication units associated with the VM's replication group into account. This is a string representation of the ProtectionHealth enumeration.
switchProviderStatestringThe switch provider state.
switchProviderStateDescriptionstringThe switch provider state description.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
testFailoverStatestringThe Test failover state.
testFailoverStateDescriptionstringThe Test failover state description.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, resource_name, fabric_name, protection_container_name, replicated_protected_item_name, subscription_idGets the details of a Replication protected item. Gets the details of an ASR replication protected item.
list_by_replication_protection_containersselectresource_group_name, resource_name, fabric_name, protection_container_name, subscription_idGets the list of Replication protected items. Gets the list of ASR replication protected items in the protection container.
listselectresource_group_name, resource_name, subscription_idskipToken, $filterGets the list of replication protected items. Gets the list of ASR replication protected items in the vault.
createinsertresource_group_name, resource_name, fabric_name, protection_container_name, replicated_protected_item_name, subscription_idEnables protection. The operation to create an ASR replication protected item (Enable replication).
updateupdateresource_group_name, resource_name, fabric_name, protection_container_name, replicated_protected_item_name, subscription_idUpdates the replication protected item settings. The operation to update the recovery settings of an ASR replication protected item.
deletedeleteresource_group_name, resource_name, fabric_name, protection_container_name, replicated_protected_item_name, subscription_idDisables protection. The operation to disable replication on a replication protected item. This will also remove the item.
purgedeleteresource_group_name, resource_name, fabric_name, protection_container_name, replicated_protected_item_name, subscription_idPurges protection. The 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.
add_disksexecresource_group_name, resource_name, fabric_name, protection_container_name, replicated_protected_item_name, subscription_idAdd disk(s) for protection. Operation to add disks(s) to the replication protected item.
apply_recovery_pointexecresource_group_name, resource_name, fabric_name, protection_container_name, replicated_protected_item_name, subscription_id, propertiesChange or apply recovery point. The operation to change the recovery point of a failed over replication protected item.
failover_cancelexecresource_group_name, resource_name, fabric_name, protection_container_name, replicated_protected_item_name, subscription_idExecute cancel failover. Operation to cancel the failover of the replication protected item.
failover_commitexecresource_group_name, resource_name, fabric_name, protection_container_name, replicated_protected_item_name, subscription_idExecute commit failover. Operation to commit the failover of the replication protected item.
planned_failoverexecresource_group_name, resource_name, fabric_name, protection_container_name, replicated_protected_item_name, subscription_idExecute planned failover. Operation to initiate a planned failover of the replication protected item.
remove_disksexecresource_group_name, resource_name, fabric_name, protection_container_name, replicated_protected_item_name, subscription_idRemoves disk(s). Operation to remove disk(s) from the replication protected item.
repair_replicationexecresource_group_name, resource_name, fabric_name, protection_container_name, replicated_protected_item_name, subscription_idResynchronize or repair replication. The operation to start resynchronize/repair replication for a replication protected item requiring resynchronization.
reprotectexecresource_group_name, resource_name, fabric_name, protection_container_name, replicated_protected_item_name, subscription_idExecute Reverse Replication\Reprotect. Operation to reprotect or reverse replicate a failed over replication protected item.
resolve_health_errorsexecresource_group_name, resource_name, fabric_name, protection_container_name, replicated_protected_item_name, subscription_idResolve health errors. Operation to resolve health issues of the replication protected item.
switch_providerexecresource_group_name, resource_name, fabric_name, protection_container_name, replicated_protected_item_name, subscription_idExecute switch provider. Operation to initiate a switch provider of the replication protected item.
test_failoverexecresource_group_name, resource_name, fabric_name, protection_container_name, replicated_protected_item_name, subscription_id, propertiesExecute test failover. Operation to perform a test failover of the replication protected item.
test_failover_cleanupexecresource_group_name, resource_name, fabric_name, protection_container_name, replicated_protected_item_name, subscription_id, propertiesExecute test failover cleanup. Operation to clean up the test failover of a replication protected item.
unplanned_failoverexecresource_group_name, resource_name, fabric_name, protection_container_name, replicated_protected_item_name, subscription_id, propertiesExecute unplanned failover. Operation to initiate a failover of the replication protected item.
update_applianceexecresource_group_name, resource_name, fabric_name, protection_container_name, replicated_protected_item_name, subscription_id, propertiesUpdates appliance for replication protected Item. The operation to update appliance of an ASR replication protected item.
update_mobility_serviceexecresource_group_name, resource_name, fabric_name, protection_container_name, replicated_protected_item_name, subscription_idUpdate the mobility service on a protected item. The operation to update(push update) the installed mobility service software on a replication protected item to the latest available version.
reinstall_mobility_serviceexecresource_group_name, resource_name, fabric_name, protection_container_name, replicated_protected_item_name, subscription_idReinstall the mobility service on a protected item. The operation to reinstall the installed mobility service software on a replication protected item to the latest available version.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
fabric_namestringFabric name. Required.
protection_container_namestringProtection container name. Required.
replicated_protected_item_namestringThe name of the protected item on which the agent is to be updated. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
resource_namestringThe name of the recovery services vault. Required.
subscription_idstring
$filterstringOData filter options. Default value is None.
skipTokenstringThe pagination token. Possible values: "FabricId" or "FabricId_CloudId" or null. Default value is None.

SELECT examples

Gets the details of a Replication protected item. Gets the details of an ASR replication protected item.

SELECT
id,
name,
activeLocation,
allowedOperations,
currentScenario,
eventCorrelationId,
failoverHealth,
failoverRecoveryPointId,
friendlyName,
healthErrors,
lastSuccessfulFailoverTime,
lastSuccessfulTestFailoverTime,
location,
policyFriendlyName,
policyId,
primaryFabricFriendlyName,
primaryFabricProvider,
primaryProtectionContainerFriendlyName,
protectableItemId,
protectedItemType,
protectionState,
protectionStateDescription,
providerSpecificDetails,
recoveryContainerId,
recoveryFabricFriendlyName,
recoveryFabricId,
recoveryProtectionContainerFriendlyName,
recoveryServicesProviderId,
replicationHealth,
switchProviderState,
switchProviderStateDescription,
systemData,
testFailoverState,
testFailoverStateDescription,
type
FROM azure.recovery_services_site_recovery.replication_protected_items
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND resource_name = '{{ resource_name }}' -- required
AND fabric_name = '{{ fabric_name }}' -- required
AND protection_container_name = '{{ protection_container_name }}' -- required
AND replicated_protected_item_name = '{{ replicated_protected_item_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Enables protection. The operation to create an ASR replication protected item (Enable replication).

INSERT INTO azure.recovery_services_site_recovery.replication_protected_items (
properties,
resource_group_name,
resource_name,
fabric_name,
protection_container_name,
replicated_protected_item_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ resource_name }}',
'{{ fabric_name }}',
'{{ protection_container_name }}',
'{{ replicated_protected_item_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
type
;

UPDATE examples

Updates the replication protected item settings. The operation to update the recovery settings of an ASR replication protected item.

UPDATE azure.recovery_services_site_recovery.replication_protected_items
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND fabric_name = '{{ fabric_name }}' --required
AND protection_container_name = '{{ protection_container_name }}' --required
AND replicated_protected_item_name = '{{ replicated_protected_item_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
type;

DELETE examples

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

DELETE FROM azure.recovery_services_site_recovery.replication_protected_items
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND resource_name = '{{ resource_name }}' --required
AND fabric_name = '{{ fabric_name }}' --required
AND protection_container_name = '{{ protection_container_name }}' --required
AND replicated_protected_item_name = '{{ replicated_protected_item_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Add disk(s) for protection. Operation to add disks(s) to the replication protected item.

EXEC azure.recovery_services_site_recovery.replication_protected_items.add_disks 
@resource_group_name='{{ resource_group_name }}' --required,
@resource_name='{{ resource_name }}' --required,
@fabric_name='{{ fabric_name }}' --required,
@protection_container_name='{{ protection_container_name }}' --required,
@replicated_protected_item_name='{{ replicated_protected_item_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"properties": "{{ properties }}"
}'
;