protection_intents
Creates, updates, deletes, gets or lists a protection_intents
resource.
Overview
Name | protection_intents |
Type | Resource |
Id | azure.recovery_services_backup.protection_intents |
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 |
properties | object | ProtectionIntentResource properties |
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 | vaultName , resourceGroupName , subscriptionId , fabricName , intentObjectName | api-version | 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. |
create_or_update | insert | vaultName , resourceGroupName , subscriptionId , fabricName , intentObjectName | api-version | Create Intent for Enabling backup of an item. This is a synchronous operation. |
delete | delete | vaultName , resourceGroupName , subscriptionId , fabricName , intentObjectName | api-version | Used to remove intent from an item |
validate | exec | azureRegion , subscriptionId | api-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.
Name | Datatype | Description |
---|---|---|
azureRegion | string | Azure region to hit Api |
fabricName | string | Fabric name associated with the intent. |
intentObjectName | string | Intent to be deleted. |
resourceGroupName | string | The name of the resource group where the recovery services vault is present. |
subscriptionId | string | The subscription Id. |
vaultName | string | The name of the recovery services vault. |
api-version | string | Client Api Version. |
SELECT
examples
- get
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_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: protection_intents
props:
- name: vaultName
value: string
description: Required parameter for the protection_intents resource.
- name: resourceGroupName
value: string
description: Required parameter for the protection_intents resource.
- name: subscriptionId
value: string
description: Required parameter for the protection_intents resource.
- name: fabricName
value: string
description: Required parameter for the protection_intents resource.
- name: intentObjectName
value: string
description: Required parameter for the protection_intents resource.
- name: properties
value: object
description: |
ProtectionIntentResource properties
- name: api-version
value: string
description: Client Api Version.
DELETE
examples
- delete
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
- validate
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 }}"
}'
;