Skip to main content

protected_items

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

Overview

Nameprotected_items
TypeResource
Idazure.data_replication.protected_items

Fields

NameDatatypeDescription
idtextGets or sets the Id of the resource.
nametextGets or sets the name of the resource.
allowed_jobstextfield from the properties object
correlation_idtextfield from the properties object
current_jobtextfield from the properties object
custom_propertiestextfield from the properties object
dra_idtextfield from the properties object
fabric_idtextfield from the properties object
fabric_object_idtextfield from the properties object
fabric_object_nametextfield from the properties object
health_errorstextfield from the properties object
last_failed_enable_protection_jobtextfield from the properties object
last_failed_planned_failover_jobtextfield from the properties object
last_successful_planned_failover_timetextfield from the properties object
last_successful_test_failover_timetextfield from the properties object
last_successful_unplanned_failover_timetextfield from the properties object
last_test_failover_jobtextfield from the properties object
policy_nametextfield from the properties object
protectedItemNametextfield from the properties object
protection_statetextfield from the properties object
protection_state_descriptiontextfield from the properties object
provisioning_statetextfield from the properties object
replication_extension_nametextfield from the properties object
replication_healthtextfield from the properties object
resourceGroupNametextfield from the properties object
resync_requiredtextfield from the properties object
resynchronization_statetextfield from the properties object
source_fabric_provider_idtextfield from the properties object
subscriptionIdtextfield from the properties object
system_datatextfield from the properties object
target_dra_idtextfield from the properties object
target_fabric_idtextfield from the properties object
target_fabric_provider_idtextfield from the properties object
test_failover_statetextfield from the properties object
test_failover_state_descriptiontextfield from the properties object
typetextGets or sets the type of the resource.
vaultNametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTprotectedItemName, resourceGroupName, subscriptionId, vaultNameGets the details of the protected item.
listSELECTresourceGroupName, subscriptionId, vaultNameGets the list of protected items in the given vault.
createINSERTprotectedItemName, resourceGroupName, subscriptionId, vaultName, data__propertiesCreates the protected item.
deleteDELETEprotectedItemName, resourceGroupName, subscriptionId, vaultNameRemoves the protected item.
planned_failoverEXECprotectedItemName, resourceGroupName, subscriptionId, vaultName, data__propertiesPerforms the planned failover on the protected item.

SELECT examples

Gets the list of protected items in the given vault.

SELECT
id,
name,
allowed_jobs,
correlation_id,
current_job,
custom_properties,
dra_id,
fabric_id,
fabric_object_id,
fabric_object_name,
health_errors,
last_failed_enable_protection_job,
last_failed_planned_failover_job,
last_successful_planned_failover_time,
last_successful_test_failover_time,
last_successful_unplanned_failover_time,
last_test_failover_job,
policy_name,
protectedItemName,
protection_state,
protection_state_description,
provisioning_state,
replication_extension_name,
replication_health,
resourceGroupName,
resync_required,
resynchronization_state,
source_fabric_provider_id,
subscriptionId,
system_data,
target_dra_id,
target_fabric_id,
target_fabric_provider_id,
test_failover_state,
test_failover_state_description,
type,
vaultName
FROM azure.data_replication.vw_protected_items
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND vaultName = '{{ vaultName }}';

INSERT example

Use the following StackQL query and manifest file to create a new protected_items resource.

/*+ create */
INSERT INTO azure.data_replication.protected_items (
protectedItemName,
resourceGroupName,
subscriptionId,
vaultName,
data__properties,
properties
)
SELECT
'{{ protectedItemName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ vaultName }}',
'{{ data__properties }}',
'{{ properties }}'
;

DELETE example

Deletes the specified protected_items resource.

/*+ delete */
DELETE FROM azure.data_replication.protected_items
WHERE protectedItemName = '{{ protectedItemName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND vaultName = '{{ vaultName }}';