protected_items
Creates, updates, deletes, gets or lists a protected_items
resource.
Overview
Name | protected_items |
Type | Resource |
Id | azure.data_replication.protected_items |
Fields
- vw_protected_items
- protected_items
Name | Datatype | Description |
---|---|---|
id | text | Gets or sets the Id of the resource. |
name | text | Gets or sets the name of the resource. |
allowed_jobs | text | field from the properties object |
correlation_id | text | field from the properties object |
current_job | text | field from the properties object |
custom_properties | text | field from the properties object |
dra_id | text | field from the properties object |
fabric_id | text | field from the properties object |
fabric_object_id | text | field from the properties object |
fabric_object_name | text | field from the properties object |
health_errors | text | field from the properties object |
last_failed_enable_protection_job | text | field from the properties object |
last_failed_planned_failover_job | text | field from the properties object |
last_successful_planned_failover_time | text | field from the properties object |
last_successful_test_failover_time | text | field from the properties object |
last_successful_unplanned_failover_time | text | field from the properties object |
last_test_failover_job | text | field from the properties object |
policy_name | text | field from the properties object |
protectedItemName | text | field from the properties object |
protection_state | text | field from the properties object |
protection_state_description | text | field from the properties object |
provisioning_state | text | field from the properties object |
replication_extension_name | text | field from the properties object |
replication_health | text | field from the properties object |
resourceGroupName | text | field from the properties object |
resync_required | text | field from the properties object |
resynchronization_state | text | field from the properties object |
source_fabric_provider_id | text | field from the properties object |
subscriptionId | text | field from the properties object |
system_data | text | field from the properties object |
target_dra_id | text | field from the properties object |
target_fabric_id | text | field from the properties object |
target_fabric_provider_id | 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 | Gets or sets the type of the resource. |
vaultName | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
id | string | Gets or sets the Id of the resource. |
name | string | Gets or sets the name of the resource. |
properties | object | Protected item model properties. |
systemData | object | System data required to be defined for Azure resources. |
type | string | Gets or sets the type of the resource. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | protectedItemName, resourceGroupName, subscriptionId, vaultName | Gets the details of the protected item. |
list | SELECT | resourceGroupName, subscriptionId, vaultName | Gets the list of protected items in the given vault. |
create | INSERT | protectedItemName, resourceGroupName, subscriptionId, vaultName, data__properties | Creates the protected item. |
delete | DELETE | protectedItemName, resourceGroupName, subscriptionId, vaultName | Removes the protected item. |
planned_failover | EXEC | protectedItemName, resourceGroupName, subscriptionId, vaultName, data__properties | Performs the planned failover on the protected item. |
SELECT
examples
Gets the list of protected items in the given vault.
- vw_protected_items
- protected_items
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 }}';
SELECT
id,
name,
properties,
systemData,
type
FROM azure.data_replication.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.data_replication.protected_items (
protectedItemName,
resourceGroupName,
subscriptionId,
vaultName,
data__properties,
properties
)
SELECT
'{{ protectedItemName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ vaultName }}',
'{{ data__properties }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: policyName
value: string
- name: replicationExtensionName
value: string
- name: correlationId
value: string
- name: provisioningState
value: string
- name: protectionState
value: string
- name: protectionStateDescription
value: string
- name: testFailoverState
value: string
- name: testFailoverStateDescription
value: string
- name: resynchronizationState
value: string
- name: fabricObjectId
value: string
- name: fabricObjectName
value: string
- name: sourceFabricProviderId
value: string
- name: targetFabricProviderId
value: string
- name: fabricId
value: string
- name: targetFabricId
value: string
- name: draId
value: string
- name: targetDraId
value: string
- name: resyncRequired
value: boolean
- name: lastSuccessfulPlannedFailoverTime
value: string
- name: lastSuccessfulUnplannedFailoverTime
value: string
- name: lastSuccessfulTestFailoverTime
value: string
- name: currentJob
value: string
- name: allowedJobs
value:
- string
- name: lastFailedEnableProtectionJob
value: string
- name: lastFailedPlannedFailoverJob
value: string
- name: lastTestFailoverJob
value: string
- name: replicationHealth
value: string
- name: healthErrors
value:
- - name: affectedResourceType
value: string
- name: affectedResourceCorrelationIds
value:
- string
- name: childErrors
value:
- - name: code
value: string
- name: healthCategory
value: string
- name: category
value: string
- name: severity
value: string
- name: source
value: string
- name: creationTime
value: string
- name: isCustomerResolvable
value: boolean
- name: summary
value: string
- name: message
value: string
- name: causes
value: string
- name: recommendation
value: string
- name: code
value: string
- name: healthCategory
value: string
- name: category
value: string
- name: severity
value: string
- name: source
value: string
- name: creationTime
value: string
- name: isCustomerResolvable
value: boolean
- name: summary
value: string
- name: message
value: string
- name: causes
value: string
- name: recommendation
value: string
- name: customProperties
value:
- name: instanceType
value: string
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: systemData
value: string
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 }}';