Skip to main content

protection_groups

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

Overview

Nameprotection_groups
TypeResource
Idazure_isv.commvaultcontentstore.protection_groups

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.
backupActivityStatusstringThe backup activity status indicating if backup is enabled or not on the protection group.
dataSourceTypestringThe datasource type of Commvault Protection Group. Required. Default value is "AzureVM".
lastBackUpTimeintegerThe Commvault Protection Group backup time.
numberOfProtectedItemsintegerThe number of ProtectedItems under the Protection Group.
planstringThe Commvault Plan to be associated with the Protection Group. Required.
protectionStatusstringThe protection group schedule. Known values are: "all", "protected", "not_protected", "pending", "backed_up_with_error", and "discovered". (all, protected, not_protected, pending, backed_up_with_error, discovered)
provisioningStatestringProvisioning state of the resource. Known values are: "Succeeded", "Failed", and "Canceled". (Succeeded, Failed, Canceled)
resourcesobjectThe resources to be protected under Protection Group. Required.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
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
getselectresource_group_name, cloud_account_name, protection_group_name, subscription_idGet a ProtectionGroup.
list_by_cloud_accountselectresource_group_name, cloud_account_name, subscription_idList ProtectionGroup resources by CloudAccount.
create_orupdateinsertresource_group_name, cloud_account_name, protection_group_name, subscription_idCreate a ProtectionGroup.
deletedeleteresource_group_name, cloud_account_name, protection_group_name, subscription_idDelete a ProtectionGroup.
stop_backupexecresource_group_name, cloud_account_name, protection_group_name, subscription_id, reasonStop Backup for a Protection Group.
restoreexecresource_group_name, cloud_account_name, protection_group_name, subscription_id, inPlaceRestore, vmDestinationInfoRestore resource for a protected items in given protection group.
resume_backupexecresource_group_name, cloud_account_name, protection_group_name, subscription_idResume Backup for a Protection Group.
backupexecresource_group_name, cloud_account_name, protection_group_name, subscription_id, vmList, backupOptionsAd-hoc backup of protected items resource in given protection group.

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
cloud_account_namestringName of the Cloud Account resource. Required.
protection_group_namestringName of the ProtectionGroup resource. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

Get a ProtectionGroup.

SELECT
id,
name,
backupActivityStatus,
dataSourceType,
lastBackUpTime,
numberOfProtectedItems,
plan,
protectionStatus,
provisioningState,
resources,
systemData,
type
FROM azure_isv.commvaultcontentstore.protection_groups
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND cloud_account_name = '{{ cloud_account_name }}' -- required
AND protection_group_name = '{{ protection_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create a ProtectionGroup.

INSERT INTO azure_isv.commvaultcontentstore.protection_groups (
properties,
resource_group_name,
cloud_account_name,
protection_group_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ cloud_account_name }}',
'{{ protection_group_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

DELETE examples

Delete a ProtectionGroup.

DELETE FROM azure_isv.commvaultcontentstore.protection_groups
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND cloud_account_name = '{{ cloud_account_name }}' --required
AND protection_group_name = '{{ protection_group_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Stop Backup for a Protection Group.

EXEC azure_isv.commvaultcontentstore.protection_groups.stop_backup 
@resource_group_name='{{ resource_group_name }}' --required,
@cloud_account_name='{{ cloud_account_name }}' --required,
@protection_group_name='{{ protection_group_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
@@json=
'{
"reason": "{{ reason }}",
"comment": "{{ comment }}"
}'
;