Skip to main content

protected_item

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

Overview

Nameprotected_item
TypeResource
Idazure.recovery_services_data_replication.protected_item

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.
allowedJobsarrayGets or sets the allowed scenarios on the protected item.
correlationIdstringGets or sets the protected item correlation Id.
currentJobobjectGets or sets the current scenario.
customPropertiesobjectProtected item model custom properties. Required.
fabricAgentIdstringGets or sets the fabric agent Id.
fabricIdstringGets or sets the fabric Id.
fabricObjectIdstringGets or sets the fabric object Id.
fabricObjectNamestringGets or sets the fabric object name.
healthErrorsarrayGets or sets the list of health errors.
lastFailedEnableProtectionJobobjectGets or sets the last failed enabled protection job.
lastFailedPlannedFailoverJobobjectGets or sets the last failed planned failover job.
lastSuccessfulPlannedFailoverTimestring (date-time)Gets or sets the Last successful planned failover time.
lastSuccessfulTestFailoverTimestring (date-time)Gets or sets the Last successful test failover time.
lastSuccessfulUnplannedFailoverTimestring (date-time)Gets or sets the Last successful unplanned failover time.
lastTestFailoverJobobjectGets or sets the last test failover job.
policyNamestringGets or sets the policy name. Required.
protectionStatestringGets or sets the protection state. Known values are: "UnprotectedStatesBegin", "EnablingProtection", "EnablingFailed", "DisablingProtection", "MarkedForDeletion", "DisablingFailed", "UnprotectedStatesEnd", "InitialReplicationStatesBegin", "InitialReplicationInProgress", "InitialReplicationCompletedOnPrimary", "InitialReplicationCompletedOnRecovery", "InitialReplicationFailed", "InitialReplicationStatesEnd", "ProtectedStatesBegin", "Protected", "ProtectedStatesEnd", "PlannedFailoverTransitionStatesBegin", "PlannedFailoverInitiated", "PlannedFailoverCompleting", "PlannedFailoverCompleted", "PlannedFailoverFailed", "PlannedFailoverCompletionFailed", "PlannedFailoverTransitionStatesEnd", "UnplannedFailoverTransitionStatesBegin", "UnplannedFailoverInitiated", "UnplannedFailoverCompleting", "UnplannedFailoverCompleted", "UnplannedFailoverFailed", "UnplannedFailoverCompletionFailed", "UnplannedFailoverTransitionStatesEnd", "CommitFailoverStatesBegin", "CommitFailoverInProgressOnPrimary", "CommitFailoverInProgressOnRecovery", "CommitFailoverCompleted", "CommitFailoverFailedOnPrimary", "CommitFailoverFailedOnRecovery", "CommitFailoverStatesEnd", "CancelFailoverStatesBegin", "CancelFailoverInProgressOnPrimary", "CancelFailoverInProgressOnRecovery", "CancelFailoverFailedOnPrimary", "CancelFailoverFailedOnRecovery", "CancelFailoverStatesEnd", "ChangeRecoveryPointStatesBegin", "ChangeRecoveryPointInitiated", "ChangeRecoveryPointCompleted", "ChangeRecoveryPointFailed", "ChangeRecoveryPointStatesEnd", "ReprotectStatesBegin", "ReprotectInitiated", "ReprotectFailed", and "ReprotectStatesEnd". (UnprotectedStatesBegin, EnablingProtection, EnablingFailed, DisablingProtection, MarkedForDeletion, DisablingFailed, UnprotectedStatesEnd, InitialReplicationStatesBegin, InitialReplicationInProgress, InitialReplicationCompletedOnPrimary, InitialReplicationCompletedOnRecovery, InitialReplicationFailed, InitialReplicationStatesEnd, ProtectedStatesBegin, Protected, ProtectedStatesEnd, PlannedFailoverTransitionStatesBegin, PlannedFailoverInitiated, PlannedFailoverCompleting, PlannedFailoverCompleted, PlannedFailoverFailed, PlannedFailoverCompletionFailed, PlannedFailoverTransitionStatesEnd, UnplannedFailoverTransitionStatesBegin, UnplannedFailoverInitiated, UnplannedFailoverCompleting, UnplannedFailoverCompleted, UnplannedFailoverFailed, UnplannedFailoverCompletionFailed, UnplannedFailoverTransitionStatesEnd, CommitFailoverStatesBegin, CommitFailoverInProgressOnPrimary, CommitFailoverInProgressOnRecovery, CommitFailoverCompleted, CommitFailoverFailedOnPrimary, CommitFailoverFailedOnRecovery, CommitFailoverStatesEnd, CancelFailoverStatesBegin, CancelFailoverInProgressOnPrimary, CancelFailoverInProgressOnRecovery, CancelFailoverFailedOnPrimary, CancelFailoverFailedOnRecovery, CancelFailoverStatesEnd, ChangeRecoveryPointStatesBegin, ChangeRecoveryPointInitiated, ChangeRecoveryPointCompleted, ChangeRecoveryPointFailed, ChangeRecoveryPointStatesEnd, ReprotectStatesBegin, ReprotectInitiated, ReprotectFailed, ReprotectStatesEnd)
protectionStateDescriptionstringGets or sets the protection state description.
provisioningStatestringGets or sets the provisioning state of the fabric agent. Known values are: "Canceled", "Creating", "Deleting", "Deleted", "Failed", "Succeeded", and "Updating". (Canceled, Creating, Deleting, Deleted, Failed, Succeeded, Updating)
replicationExtensionNamestringGets or sets the replication extension name. Required.
replicationHealthstringGets or sets protected item replication health. Known values are: "Normal", "Warning", and "Critical". (Normal, Warning, Critical)
resyncRequiredbooleanGets or sets a value indicating whether resynchronization is required or not.
resynchronizationStatestringGets or sets the resynchronization state. Known values are: "None", "ResynchronizationInitiated", "ResynchronizationCompleted", and "ResynchronizationFailed". (None, ResynchronizationInitiated, ResynchronizationCompleted, ResynchronizationFailed)
sourceFabricProviderIdstringGets or sets the source fabric provider Id.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
targetFabricAgentIdstringGets or sets the target fabric agent Id.
targetFabricIdstringGets or sets the target fabric Id.
targetFabricProviderIdstringGets or sets the target fabric provider Id.
testFailoverStatestringGets or sets the test failover state. Known values are: "None", "TestFailoverInitiated", "TestFailoverCompleting", "TestFailoverCompleted", "TestFailoverFailed", "TestFailoverCompletionFailed", "TestFailoverCleanupInitiated", "TestFailoverCleanupCompleting", and "MarkedForDeletion". (None, TestFailoverInitiated, TestFailoverCompleting, TestFailoverCompleted, TestFailoverFailed, TestFailoverCompletionFailed, TestFailoverCleanupInitiated, TestFailoverCleanupCompleting, MarkedForDeletion)
testFailoverStateDescriptionstringGets or sets the 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, vault_name, protected_item_name, subscription_idGets the details of the protected item.
listselectresource_group_name, vault_name, subscription_idodataOptions, continuationToken, pageSizeGets the list of protected items in the given vault.
createinsertresource_group_name, vault_name, protected_item_name, subscription_idCreates the protected item.
updateupdateresource_group_name, vault_name, protected_item_name, subscription_idPerforms update on the protected item.
deletedeleteresource_group_name, vault_name, protected_item_name, subscription_idforceDeleteRemoves the protected item.
planned_failoverexecresource_group_name, vault_name, protected_item_name, subscription_id, propertiesPerforms the planned failover on the protected item.

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
protected_item_namestringThe protected item name. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
vault_namestringThe vault name. Required.
continuationTokenstringContinuation token. Default value is None.
forceDeletebooleanA flag indicating whether to do force delete or not. Default value is None.
odataOptionsstringOData options. Default value is None.
pageSizeintegerPage size. Default value is None.

SELECT examples

Gets the details of the protected item.

SELECT
id,
name,
allowedJobs,
correlationId,
currentJob,
customProperties,
fabricAgentId,
fabricId,
fabricObjectId,
fabricObjectName,
healthErrors,
lastFailedEnableProtectionJob,
lastFailedPlannedFailoverJob,
lastSuccessfulPlannedFailoverTime,
lastSuccessfulTestFailoverTime,
lastSuccessfulUnplannedFailoverTime,
lastTestFailoverJob,
policyName,
protectionState,
protectionStateDescription,
provisioningState,
replicationExtensionName,
replicationHealth,
resyncRequired,
resynchronizationState,
sourceFabricProviderId,
systemData,
targetFabricAgentId,
targetFabricId,
targetFabricProviderId,
testFailoverState,
testFailoverStateDescription,
type
FROM azure.recovery_services_data_replication.protected_item
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND vault_name = '{{ vault_name }}' -- required
AND protected_item_name = '{{ protected_item_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates the protected item.

INSERT INTO azure.recovery_services_data_replication.protected_item (
properties,
resource_group_name,
vault_name,
protected_item_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ vault_name }}',
'{{ protected_item_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

UPDATE examples

Performs update on the protected item.

UPDATE azure.recovery_services_data_replication.protected_item
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND vault_name = '{{ vault_name }}' --required
AND protected_item_name = '{{ protected_item_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples

Removes the protected item.

DELETE FROM azure.recovery_services_data_replication.protected_item
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND vault_name = '{{ vault_name }}' --required
AND protected_item_name = '{{ protected_item_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND forceDelete = '{{ forceDelete }}'
;

Lifecycle Methods

Performs the planned failover on the protected item.

EXEC azure.recovery_services_data_replication.protected_item.planned_failover 
@resource_group_name='{{ resource_group_name }}' --required,
@vault_name='{{ vault_name }}' --required,
@protected_item_name='{{ protected_item_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"properties": "{{ properties }}"
}'
;