replication_protected_items
Creates, updates, deletes, gets or lists a replication_protected_items
resource.
Overview
Name | replication_protected_items |
Type | Resource |
Id | azure.recovery_services_site_recovery.replication_protected_items |
Fields
- vw_replication_protected_items
- replication_protected_items
Name | Datatype | Description |
---|---|---|
id | text | Resource Id |
name | text | Resource Name |
active_location | text | field from the properties object |
allowed_operations | text | field from the properties object |
current_scenario | text | field from the properties object |
event_correlation_id | text | field from the properties object |
fabricName | text | field from the properties object |
failover_health | text | field from the properties object |
failover_recovery_point_id | text | field from the properties object |
friendly_name | text | field from the properties object |
health_errors | text | field from the properties object |
last_successful_failover_time | text | field from the properties object |
last_successful_test_failover_time | text | field from the properties object |
location | text | Resource Location |
policy_friendly_name | text | field from the properties object |
policy_id | text | field from the properties object |
primary_fabric_friendly_name | text | field from the properties object |
primary_fabric_provider | text | field from the properties object |
primary_protection_container_friendly_name | text | field from the properties object |
protectable_item_id | text | field from the properties object |
protected_item_type | text | field from the properties object |
protectionContainerName | text | field from the properties object |
protection_state | text | field from the properties object |
protection_state_description | text | field from the properties object |
provider_specific_details | text | field from the properties object |
recovery_container_id | text | field from the properties object |
recovery_fabric_friendly_name | text | field from the properties object |
recovery_fabric_id | text | field from the properties object |
recovery_protection_container_friendly_name | text | field from the properties object |
recovery_services_provider_id | text | field from the properties object |
replicatedProtectedItemName | text | field from the properties object |
replication_health | text | field from the properties object |
resourceGroupName | text | field from the properties object |
resourceName | text | field from the properties object |
subscriptionId | text | field from the properties object |
switch_provider_state | text | field from the properties object |
switch_provider_state_description | text | field from the properties object |
test_failover_state | text | field from the properties object |
test_failover_state_description | text | field from the properties object |
type | text | Resource Type |
Name | Datatype | Description |
---|---|---|
id | string | Resource Id |
name | string | Resource Name |
location | string | Resource Location |
properties | object | Replication protected item custom data details. |
type | string | Resource Type |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | fabricName, protectionContainerName, replicatedProtectedItemName, resourceGroupName, resourceName, subscriptionId | Gets the details of an ASR replication protected item. |
list | SELECT | resourceGroupName, resourceName, subscriptionId | Gets the list of ASR replication protected items in the vault. |
list_by_replication_protection_containers | SELECT | fabricName, protectionContainerName, resourceGroupName, resourceName, subscriptionId | Gets the list of ASR replication protected items in the protection container. |
create | INSERT | fabricName, protectionContainerName, replicatedProtectedItemName, resourceGroupName, resourceName, subscriptionId | The operation to create an ASR replication protected item (Enable replication). |
delete | DELETE | fabricName, protectionContainerName, replicatedProtectedItemName, resourceGroupName, resourceName, subscriptionId, data__properties | The operation to disable replication on a replication protected item. This will also remove the item. |
update | UPDATE | fabricName, protectionContainerName, replicatedProtectedItemName, resourceGroupName, resourceName, subscriptionId | The operation to update the recovery settings of an ASR replication protected item. |
add_disks | EXEC | fabricName, protectionContainerName, replicatedProtectedItemName, resourceGroupName, resourceName, subscriptionId | Operation to add disks(s) to the replication protected item. |
apply_recovery_point | EXEC | fabricName, protectionContainerName, replicatedProtectedItemName, resourceGroupName, resourceName, subscriptionId, data__properties | The operation to change the recovery point of a failed over replication protected item. |
failover_cancel | EXEC | fabricName, protectionContainerName, replicatedProtectedItemName, resourceGroupName, resourceName, subscriptionId | Operation to cancel the failover of the replication protected item. |
failover_commit | EXEC | fabricName, protectionContainerName, replicatedProtectedItemName, resourceGroupName, resourceName, subscriptionId | Operation to commit the failover of the replication protected item. |
planned_failover | EXEC | fabricName, protectionContainerName, replicatedProtectedItemName, resourceGroupName, resourceName, subscriptionId | Operation to initiate a planned failover of the replication protected item. |
purge | EXEC | fabricName, protectionContainerName, replicatedProtectedItemName, resourceGroupName, resourceName, subscriptionId | 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. |
remove_disks | EXEC | fabricName, protectionContainerName, replicatedProtectedItemName, resourceGroupName, resourceName, subscriptionId | Operation to remove disk(s) from the replication protected item. |
repair_replication | EXEC | fabricName, protectionContainerName, replicatedProtectedItemName, resourceGroupName, resourceName, subscriptionId | The operation to start resynchronize/repair replication for a replication protected item requiring resynchronization. |
reprotect | EXEC | fabricName, protectionContainerName, replicatedProtectedItemName, resourceGroupName, resourceName, subscriptionId | Operation to reprotect or reverse replicate a failed over replication protected item. |
resolve_health_errors | EXEC | fabricName, protectionContainerName, replicatedProtectedItemName, resourceGroupName, resourceName, subscriptionId | Operation to resolve health issues of the replication protected item. |
switch_provider | EXEC | fabricName, protectionContainerName, replicatedProtectedItemName, resourceGroupName, resourceName, subscriptionId | Operation to initiate a switch provider of the replication protected item. |
test_failover | EXEC | fabricName, protectionContainerName, replicatedProtectedItemName, resourceGroupName, resourceName, subscriptionId, data__properties | Operation to perform a test failover of the replication protected item. |
test_failover_cleanup | EXEC | fabricName, protectionContainerName, replicatedProtectedItemName, resourceGroupName, resourceName, subscriptionId, data__properties | Operation to clean up the test failover of a replication protected item. |
unplanned_failover | EXEC | fabricName, protectionContainerName, replicatedProtectedItemName, resourceGroupName, resourceName, subscriptionId, data__properties | Operation to initiate a failover of the replication protected item. |
SELECT
examples
Gets the list of ASR replication protected items in the vault.
- vw_replication_protected_items
- replication_protected_items
SELECT
id,
name,
active_location,
allowed_operations,
current_scenario,
event_correlation_id,
fabricName,
failover_health,
failover_recovery_point_id,
friendly_name,
health_errors,
last_successful_failover_time,
last_successful_test_failover_time,
location,
policy_friendly_name,
policy_id,
primary_fabric_friendly_name,
primary_fabric_provider,
primary_protection_container_friendly_name,
protectable_item_id,
protected_item_type,
protectionContainerName,
protection_state,
protection_state_description,
provider_specific_details,
recovery_container_id,
recovery_fabric_friendly_name,
recovery_fabric_id,
recovery_protection_container_friendly_name,
recovery_services_provider_id,
replicatedProtectedItemName,
replication_health,
resourceGroupName,
resourceName,
subscriptionId,
switch_provider_state,
switch_provider_state_description,
test_failover_state,
test_failover_state_description,
type
FROM azure.recovery_services_site_recovery.vw_replication_protected_items
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
id,
name,
location,
properties,
type
FROM azure.recovery_services_site_recovery.replication_protected_items
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new replication_protected_items
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.recovery_services_site_recovery.replication_protected_items (
fabricName,
protectionContainerName,
replicatedProtectedItemName,
resourceGroupName,
resourceName,
subscriptionId,
properties
)
SELECT
'{{ fabricName }}',
'{{ protectionContainerName }}',
'{{ replicatedProtectedItemName }}',
'{{ resourceGroupName }}',
'{{ resourceName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: policyId
value: string
- name: protectableItemId
value: string
- name: providerSpecificDetails
value:
- name: instanceType
value: string
UPDATE
example
Updates a replication_protected_items
resource.
/*+ update */
UPDATE azure.recovery_services_site_recovery.replication_protected_items
SET
properties = '{{ properties }}'
WHERE
fabricName = '{{ fabricName }}'
AND protectionContainerName = '{{ protectionContainerName }}'
AND replicatedProtectedItemName = '{{ replicatedProtectedItemName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified replication_protected_items
resource.
/*+ delete */
DELETE FROM azure.recovery_services_site_recovery.replication_protected_items
WHERE fabricName = '{{ fabricName }}'
AND protectionContainerName = '{{ protectionContainerName }}'
AND replicatedProtectedItemName = '{{ replicatedProtectedItemName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND resourceName = '{{ resourceName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND data__properties = '{{ data__properties }}';