protected_item
Creates, updates, deletes, gets or lists a protected_item resource.
Overview
| Name | protected_item |
| Type | Resource |
| Id | azure.recovery_services_data_replication.protected_item |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
allowedJobs | array | Gets or sets the allowed scenarios on the protected item. |
correlationId | string | Gets or sets the protected item correlation Id. |
currentJob | object | Gets or sets the current scenario. |
customProperties | object | Protected item model custom properties. Required. |
fabricAgentId | string | Gets or sets the fabric agent Id. |
fabricId | string | Gets or sets the fabric Id. |
fabricObjectId | string | Gets or sets the fabric object Id. |
fabricObjectName | string | Gets or sets the fabric object name. |
healthErrors | array | Gets or sets the list of health errors. |
lastFailedEnableProtectionJob | object | Gets or sets the last failed enabled protection job. |
lastFailedPlannedFailoverJob | object | Gets or sets the last failed planned failover job. |
lastSuccessfulPlannedFailoverTime | string (date-time) | Gets or sets the Last successful planned failover time. |
lastSuccessfulTestFailoverTime | string (date-time) | Gets or sets the Last successful test failover time. |
lastSuccessfulUnplannedFailoverTime | string (date-time) | Gets or sets the Last successful unplanned failover time. |
lastTestFailoverJob | object | Gets or sets the last test failover job. |
policyName | string | Gets or sets the policy name. Required. |
protectionState | string | Gets 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) |
protectionStateDescription | string | Gets or sets the protection state description. |
provisioningState | string | Gets 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) |
replicationExtensionName | string | Gets or sets the replication extension name. Required. |
replicationHealth | string | Gets or sets protected item replication health. Known values are: "Normal", "Warning", and "Critical". (Normal, Warning, Critical) |
resyncRequired | boolean | Gets or sets a value indicating whether resynchronization is required or not. |
resynchronizationState | string | Gets or sets the resynchronization state. Known values are: "None", "ResynchronizationInitiated", "ResynchronizationCompleted", and "ResynchronizationFailed". (None, ResynchronizationInitiated, ResynchronizationCompleted, ResynchronizationFailed) |
sourceFabricProviderId | string | Gets or sets the source fabric provider Id. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
targetFabricAgentId | string | Gets or sets the target fabric agent Id. |
targetFabricId | string | Gets or sets the target fabric Id. |
targetFabricProviderId | string | Gets or sets the target fabric provider Id. |
testFailoverState | string | Gets 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) |
testFailoverStateDescription | string | Gets or sets the Test failover state description. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
allowedJobs | array | Gets or sets the allowed scenarios on the protected item. |
correlationId | string | Gets or sets the protected item correlation Id. |
currentJob | object | Gets or sets the current scenario. |
customProperties | object | Protected item model custom properties. Required. |
fabricAgentId | string | Gets or sets the fabric agent Id. |
fabricId | string | Gets or sets the fabric Id. |
fabricObjectId | string | Gets or sets the fabric object Id. |
fabricObjectName | string | Gets or sets the fabric object name. |
healthErrors | array | Gets or sets the list of health errors. |
lastFailedEnableProtectionJob | object | Gets or sets the last failed enabled protection job. |
lastFailedPlannedFailoverJob | object | Gets or sets the last failed planned failover job. |
lastSuccessfulPlannedFailoverTime | string (date-time) | Gets or sets the Last successful planned failover time. |
lastSuccessfulTestFailoverTime | string (date-time) | Gets or sets the Last successful test failover time. |
lastSuccessfulUnplannedFailoverTime | string (date-time) | Gets or sets the Last successful unplanned failover time. |
lastTestFailoverJob | object | Gets or sets the last test failover job. |
policyName | string | Gets or sets the policy name. Required. |
protectionState | string | Gets 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) |
protectionStateDescription | string | Gets or sets the protection state description. |
provisioningState | string | Gets 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) |
replicationExtensionName | string | Gets or sets the replication extension name. Required. |
replicationHealth | string | Gets or sets protected item replication health. Known values are: "Normal", "Warning", and "Critical". (Normal, Warning, Critical) |
resyncRequired | boolean | Gets or sets a value indicating whether resynchronization is required or not. |
resynchronizationState | string | Gets or sets the resynchronization state. Known values are: "None", "ResynchronizationInitiated", "ResynchronizationCompleted", and "ResynchronizationFailed". (None, ResynchronizationInitiated, ResynchronizationCompleted, ResynchronizationFailed) |
sourceFabricProviderId | string | Gets or sets the source fabric provider Id. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
targetFabricAgentId | string | Gets or sets the target fabric agent Id. |
targetFabricId | string | Gets or sets the target fabric Id. |
targetFabricProviderId | string | Gets or sets the target fabric provider Id. |
testFailoverState | string | Gets 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) |
testFailoverStateDescription | string | Gets or sets the Test failover state description. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, vault_name, protected_item_name, subscription_id | Gets the details of the protected item. | |
list | select | resource_group_name, vault_name, subscription_id | odataOptions, continuationToken, pageSize | Gets the list of protected items in the given vault. |
create | insert | resource_group_name, vault_name, protected_item_name, subscription_id | Creates the protected item. | |
update | update | resource_group_name, vault_name, protected_item_name, subscription_id | Performs update on the protected item. | |
delete | delete | resource_group_name, vault_name, protected_item_name, subscription_id | forceDelete | Removes the protected item. |
planned_failover | exec | resource_group_name, vault_name, protected_item_name, subscription_id, properties | Performs 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.
| Name | Datatype | Description |
|---|---|---|
protected_item_name | string | The protected item name. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
vault_name | string | The vault name. Required. |
continuationToken | string | Continuation token. Default value is None. |
forceDelete | boolean | A flag indicating whether to do force delete or not. Default value is None. |
odataOptions | string | OData options. Default value is None. |
pageSize | integer | Page size. Default value is None. |
SELECT examples
- get
- list
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
;
Gets the list of protected items in the given vault.
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 subscription_id = '{{ subscription_id }}' -- required
AND odataOptions = '{{ odataOptions }}'
AND continuationToken = '{{ continuationToken }}'
AND pageSize = '{{ pageSize }}'
;
INSERT examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: protected_item
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the protected_item resource.
- name: vault_name
value: "{{ vault_name }}"
description: Required parameter for the protected_item resource.
- name: protected_item_name
value: "{{ protected_item_name }}"
description: Required parameter for the protected_item resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the protected_item resource.
- name: properties
description: |
The resource-specific properties for this resource.
value:
policyName: "{{ policyName }}"
replicationExtensionName: "{{ replicationExtensionName }}"
correlationId: "{{ correlationId }}"
provisioningState: "{{ provisioningState }}"
protectionState: "{{ protectionState }}"
protectionStateDescription: "{{ protectionStateDescription }}"
testFailoverState: "{{ testFailoverState }}"
testFailoverStateDescription: "{{ testFailoverStateDescription }}"
resynchronizationState: "{{ resynchronizationState }}"
fabricObjectId: "{{ fabricObjectId }}"
fabricObjectName: "{{ fabricObjectName }}"
sourceFabricProviderId: "{{ sourceFabricProviderId }}"
targetFabricProviderId: "{{ targetFabricProviderId }}"
fabricId: "{{ fabricId }}"
targetFabricId: "{{ targetFabricId }}"
fabricAgentId: "{{ fabricAgentId }}"
targetFabricAgentId: "{{ targetFabricAgentId }}"
resyncRequired: {{ resyncRequired }}
lastSuccessfulPlannedFailoverTime: "{{ lastSuccessfulPlannedFailoverTime }}"
lastSuccessfulUnplannedFailoverTime: "{{ lastSuccessfulUnplannedFailoverTime }}"
lastSuccessfulTestFailoverTime: "{{ lastSuccessfulTestFailoverTime }}"
currentJob:
scenarioName: "{{ scenarioName }}"
id: "{{ id }}"
name: "{{ name }}"
displayName: "{{ displayName }}"
state: "{{ state }}"
startTime: "{{ startTime }}"
endTime: "{{ endTime }}"
allowedJobs:
- "{{ allowedJobs }}"
lastFailedEnableProtectionJob:
scenarioName: "{{ scenarioName }}"
id: "{{ id }}"
name: "{{ name }}"
displayName: "{{ displayName }}"
state: "{{ state }}"
startTime: "{{ startTime }}"
endTime: "{{ endTime }}"
lastFailedPlannedFailoverJob:
scenarioName: "{{ scenarioName }}"
id: "{{ id }}"
name: "{{ name }}"
displayName: "{{ displayName }}"
state: "{{ state }}"
startTime: "{{ startTime }}"
endTime: "{{ endTime }}"
lastTestFailoverJob:
scenarioName: "{{ scenarioName }}"
id: "{{ id }}"
name: "{{ name }}"
displayName: "{{ displayName }}"
state: "{{ state }}"
startTime: "{{ startTime }}"
endTime: "{{ endTime }}"
replicationHealth: "{{ replicationHealth }}"
healthErrors:
- affectedResourceType: "{{ affectedResourceType }}"
affectedResourceCorrelationIds: "{{ affectedResourceCorrelationIds }}"
childErrors: "{{ childErrors }}"
code: "{{ code }}"
healthCategory: "{{ healthCategory }}"
category: "{{ category }}"
severity: "{{ severity }}"
source: "{{ source }}"
creationTime: "{{ creationTime }}"
isCustomerResolvable: {{ isCustomerResolvable }}
summary: "{{ summary }}"
message: "{{ message }}"
causes: "{{ causes }}"
recommendation: "{{ recommendation }}"
customProperties:
instanceType: "{{ instanceType }}"
UPDATE examples
- update
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
- delete
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
- planned_failover
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 }}"
}'
;