protected_items
Creates, updates, deletes, gets or lists a protected_items resource.
Overview
| Name | protected_items |
| Type | Resource |
| Id | azure.recovery_services_backup.protected_items |
Fields
The following fields are returned by SELECT queries:
- get
| 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. |
backupManagementType | string | Type of backup management for the backed up item. Known values are: "Invalid", "AzureIaasVM", "MAB", "DPM", "AzureBackupServer", "AzureSql", "AzureStorage", "AzureWorkload", and "DefaultBackup". (Invalid, AzureIaasVM, MAB, DPM, AzureBackupServer, AzureSql, AzureStorage, AzureWorkload, DefaultBackup) |
backupSetName | string | Name of the backup set the backup item belongs to. |
containerName | string | Unique name of container. |
createMode | string | Create mode to indicate recovery of existing soft deleted data source or creation of new data source. Known values are: "Invalid", "Default", and "Recover". (Invalid, Default, Recover) |
deferredDeleteTimeInUTC | string (date-time) | Time for deferred deletion in UTC. |
deferredDeleteTimeRemaining | string | Time remaining before the DS marked for deferred delete is permanently deleted. |
eTag | string | Optional ETag. |
isArchiveEnabled | boolean | Flag to identify whether datasource is protected in archive. |
isDeferredDeleteScheduleUpcoming | boolean | Flag to identify whether the deferred deleted DS is to be purged soon. |
isRehydrate | boolean | Flag to identify that deferred deleted DS is to be moved into Pause state. |
isScheduledForDeferredDelete | boolean | Flag to identify whether the DS is scheduled for deferred delete. |
lastRecoveryPoint | string (date-time) | Timestamp when the last (latest) backup copy was created for this backup item. |
location | string | The geo-location where the resource lives. |
policyId | string | ID of the backup policy with which this item is backed up. |
policyName | string | Name of the policy used for protection. |
protectedItemType | string | backup item type. Required. Default value is None. |
resourceGuardOperationRequests | array | ResourceGuardOperationRequests on which LAC check will be performed. |
softDeleteRetentionPeriodInDays | integer | Soft delete retention period in days. |
sourceResourceId | string | ARM ID of the resource to be backed up. |
sourceSideScanInfo | object | Source side threat information. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
vaultId | string | ID of the vault which protects this item. |
workloadType | string | Type of workload this item represents. Known values are: "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", "SAPHanaDatabase", "SAPAseDatabase", and "SAPHanaDBInstance". (Invalid, VM, FileFolder, AzureSqlDb, SQLDB, Exchange, Sharepoint, VMwareVM, SystemState, Client, GenericDataSource, SQLDataBase, AzureFileShare, SAPHanaDatabase, SAPAseDatabase, SAPHanaDBInstance) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | vault_name, resource_group_name, fabric_name, container_name, protected_item_name, subscription_id | $filter | Provides the details of the backed up item. This is an asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. |
create_or_update | insert | vault_name, resource_group_name, fabric_name, container_name, protected_item_name, subscription_id | x-ms-authorization-auxiliary | Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. |
create_or_update | replace | vault_name, resource_group_name, fabric_name, container_name, protected_item_name, subscription_id | x-ms-authorization-auxiliary | Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an asynchronous operation. To know the status of the operation, call the GetItemOperationResult API. |
delete | delete | vault_name, resource_group_name, fabric_name, container_name, protected_item_name, subscription_id | Used to disable backup of an item within a container. This is an asynchronous operation. To know the status of the request, call the GetItemOperationResult API. |
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 |
|---|---|---|
container_name | string | Name of the container whose details need to be fetched. Required. |
fabric_name | string | The name of the BackupFabricResource. Required. |
protected_item_name | string | Backed up item name whose details are to be fetched. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
vault_name | string | The name of the VaultResource. Required. |
$filter | string | OData filter options. Default value is None. |
x-ms-authorization-auxiliary | string | Default value is None. |
SELECT examples
- get
Provides the details of the backed up item. This is an asynchronous operation. To know the status of the operation, call the GetItemOperationResult API.
SELECT
id,
name,
backupManagementType,
backupSetName,
containerName,
createMode,
deferredDeleteTimeInUTC,
deferredDeleteTimeRemaining,
eTag,
isArchiveEnabled,
isDeferredDeleteScheduleUpcoming,
isRehydrate,
isScheduledForDeferredDelete,
lastRecoveryPoint,
location,
policyId,
policyName,
protectedItemType,
resourceGuardOperationRequests,
softDeleteRetentionPeriodInDays,
sourceResourceId,
sourceSideScanInfo,
systemData,
tags,
type,
vaultId,
workloadType
FROM azure.recovery_services_backup.protected_items
WHERE vault_name = '{{ vault_name }}' -- required
AND resource_group_name = '{{ resource_group_name }}' -- required
AND fabric_name = '{{ fabric_name }}' -- required
AND container_name = '{{ container_name }}' -- required
AND protected_item_name = '{{ protected_item_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $filter = '{{ $filter }}'
;
INSERT examples
- create_or_update
- Manifest
Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an asynchronous operation. To know the status of the operation, call the GetItemOperationResult API.
INSERT INTO azure.recovery_services_backup.protected_items (
properties,
tags,
location,
eTag,
vault_name,
resource_group_name,
fabric_name,
container_name,
protected_item_name,
subscription_id,
x-ms-authorization-auxiliary
)
SELECT
'{{ properties }}',
'{{ tags }}',
'{{ location }}',
'{{ eTag }}',
'{{ vault_name }}',
'{{ resource_group_name }}',
'{{ fabric_name }}',
'{{ container_name }}',
'{{ protected_item_name }}',
'{{ subscription_id }}',
'{{ x-ms-authorization-auxiliary }}'
RETURNING
id,
name,
eTag,
location,
properties,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: protected_items
props:
- name: vault_name
value: "{{ vault_name }}"
description: Required parameter for the protected_items resource.
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the protected_items resource.
- name: fabric_name
value: "{{ fabric_name }}"
description: Required parameter for the protected_items resource.
- name: container_name
value: "{{ container_name }}"
description: Required parameter for the protected_items resource.
- name: protected_item_name
value: "{{ protected_item_name }}"
description: Required parameter for the protected_items resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the protected_items resource.
- name: properties
description: |
ProtectedItemResource properties.
value:
protectedItemType: "{{ protectedItemType }}"
backupManagementType: "{{ backupManagementType }}"
workloadType: "{{ workloadType }}"
containerName: "{{ containerName }}"
sourceResourceId: "{{ sourceResourceId }}"
policyId: "{{ policyId }}"
lastRecoveryPoint: "{{ lastRecoveryPoint }}"
backupSetName: "{{ backupSetName }}"
createMode: "{{ createMode }}"
deferredDeleteTimeInUTC: "{{ deferredDeleteTimeInUTC }}"
isScheduledForDeferredDelete: {{ isScheduledForDeferredDelete }}
deferredDeleteTimeRemaining: "{{ deferredDeleteTimeRemaining }}"
isDeferredDeleteScheduleUpcoming: {{ isDeferredDeleteScheduleUpcoming }}
isRehydrate: {{ isRehydrate }}
resourceGuardOperationRequests:
- "{{ resourceGuardOperationRequests }}"
isArchiveEnabled: {{ isArchiveEnabled }}
policyName: "{{ policyName }}"
softDeleteRetentionPeriodInDays: {{ softDeleteRetentionPeriodInDays }}
vaultId: "{{ vaultId }}"
sourceSideScanInfo:
sourceSideScanStatus: "{{ sourceSideScanStatus }}"
sourceSideScanSummary: "{{ sourceSideScanSummary }}"
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives.
- name: eTag
value: "{{ eTag }}"
description: |
Optional ETag.
- name: x-ms-authorization-auxiliary
value: "{{ x-ms-authorization-auxiliary }}"
description: Default value is None.
description: Default value is None.
REPLACE examples
- create_or_update
Enables backup of an item or to modifies the backup policy information of an already backed up item. This is an asynchronous operation. To know the status of the operation, call the GetItemOperationResult API.
REPLACE azure.recovery_services_backup.protected_items
SET
properties = '{{ properties }}',
tags = '{{ tags }}',
location = '{{ location }}',
eTag = '{{ eTag }}'
WHERE
vault_name = '{{ vault_name }}' --required
AND resource_group_name = '{{ resource_group_name }}' --required
AND fabric_name = '{{ fabric_name }}' --required
AND container_name = '{{ container_name }}' --required
AND protected_item_name = '{{ protected_item_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND x-ms-authorization-auxiliary = '{{ x-ms-authorization-auxiliary}}'
RETURNING
id,
name,
eTag,
location,
properties,
systemData,
tags,
type;
DELETE examples
- delete
Used to disable backup of an item within a container. This is an asynchronous operation. To know the status of the request, call the GetItemOperationResult API.
DELETE FROM azure.recovery_services_backup.protected_items
WHERE vault_name = '{{ vault_name }}' --required
AND resource_group_name = '{{ resource_group_name }}' --required
AND fabric_name = '{{ fabric_name }}' --required
AND container_name = '{{ container_name }}' --required
AND protected_item_name = '{{ protected_item_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;