Skip to main content

protection_intents

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

Overview

Nameprotection_intents
TypeResource
Idazure.recovery_services_backup.protection_intents

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
propertiesobjectProtectionIntentResource properties
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
getselectvaultName, resourceGroupName, subscriptionId, fabricName, intentObjectNameapi-versionProvides the details of the protection intent up item. This is an asynchronous operation. To know the status of the operation,
call the GetItemOperationResult API.
create_or_updateinsertvaultName, resourceGroupName, subscriptionId, fabricName, intentObjectNameapi-versionCreate Intent for Enabling backup of an item. This is a synchronous operation.
deletedeletevaultName, resourceGroupName, subscriptionId, fabricName, intentObjectNameapi-versionUsed to remove intent from an item
validateexecazureRegion, subscriptionIdapi-version

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
azureRegionstringAzure region to hit Api
fabricNamestringFabric name associated with the intent.
intentObjectNamestringIntent to be deleted.
resourceGroupNamestringThe name of the resource group where the recovery services vault is present.
subscriptionIdstringThe subscription Id.
vaultNamestringThe name of the recovery services vault.
api-versionstringClient Api Version.

SELECT examples

Provides the details of the protection intent up item. This is an asynchronous operation. To know the status of the operation,
call the GetItemOperationResult API.

SELECT
id,
name,
properties,
type
FROM azure.recovery_services_backup.protection_intents
WHERE vaultName = '{{ vaultName }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND fabricName = '{{ fabricName }}' -- required
AND intentObjectName = '{{ intentObjectName }}' -- required
AND api-version = '{{ api-version }}'
;

INSERT examples

Create Intent for Enabling backup of an item. This is a synchronous operation.

INSERT INTO azure.recovery_services_backup.protection_intents (
data__properties,
vaultName,
resourceGroupName,
subscriptionId,
fabricName,
intentObjectName,
api-version
)
SELECT
'{{ properties }}',
'{{ vaultName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ fabricName }}',
'{{ intentObjectName }}',
'{{ api-version }}'
RETURNING
id,
name,
properties,
type
;

DELETE examples

Used to remove intent from an item

DELETE FROM azure.recovery_services_backup.protection_intents
WHERE vaultName = '{{ vaultName }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
AND fabricName = '{{ fabricName }}' --required
AND intentObjectName = '{{ intentObjectName }}' --required
AND api-version = '{{ api-version }}'
;

Lifecycle Methods

OK

EXEC azure.recovery_services_backup.protection_intents.validate 
@azureRegion='{{ azureRegion }}' --required,
@subscriptionId='{{ subscriptionId }}' --required,
@api-version='{{ api-version }}'
@@json=
'{
"resourceType": "{{ resourceType }}",
"resourceId": "{{ resourceId }}",
"vaultId": "{{ vaultId }}",
"properties": "{{ properties }}"
}'
;