protection_groups
Creates, updates, deletes, gets or lists a protection_groups resource.
Overview
| Name | protection_groups |
| Type | Resource |
| Id | azure_isv.commvaultcontentstore.protection_groups |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_cloud_account
| 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. |
backupActivityStatus | string | The backup activity status indicating if backup is enabled or not on the protection group. |
dataSourceType | string | The datasource type of Commvault Protection Group. Required. Default value is "AzureVM". |
lastBackUpTime | integer | The Commvault Protection Group backup time. |
numberOfProtectedItems | integer | The number of ProtectedItems under the Protection Group. |
plan | string | The Commvault Plan to be associated with the Protection Group. Required. |
protectionStatus | string | The 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) |
provisioningState | string | Provisioning state of the resource. Known values are: "Succeeded", "Failed", and "Canceled". (Succeeded, Failed, Canceled) |
resources | object | The resources to be protected under Protection Group. Required. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| 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. |
backupActivityStatus | string | The backup activity status indicating if backup is enabled or not on the protection group. |
dataSourceType | string | The datasource type of Commvault Protection Group. Required. Default value is "AzureVM". |
lastBackUpTime | integer | The Commvault Protection Group backup time. |
numberOfProtectedItems | integer | The number of ProtectedItems under the Protection Group. |
plan | string | The Commvault Plan to be associated with the Protection Group. Required. |
protectionStatus | string | The 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) |
provisioningState | string | Provisioning state of the resource. Known values are: "Succeeded", "Failed", and "Canceled". (Succeeded, Failed, Canceled) |
resources | object | The resources to be protected under Protection Group. Required. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
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:
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 |
|---|---|---|
cloud_account_name | string | Name of the Cloud Account resource. Required. |
protection_group_name | string | Name of the ProtectionGroup resource. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string |
SELECT examples
- get
- list_by_cloud_account
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
;
List ProtectionGroup resources by CloudAccount.
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 subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_orupdate
- Manifest
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
;
# Description fields are for documentation purposes
- name: protection_groups
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the protection_groups resource.
- name: cloud_account_name
value: "{{ cloud_account_name }}"
description: Required parameter for the protection_groups resource.
- name: protection_group_name
value: "{{ protection_group_name }}"
description: Required parameter for the protection_groups resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the protection_groups resource.
- name: properties
description: |
The resource-specific properties for this resource.
value:
dataSourceType: "{{ dataSourceType }}"
plan: "{{ plan }}"
resources:
manual:
- "{{ manual }}"
matchRules:
rules:
- property: "{{ property }}"
operator: "{{ operator }}"
value: "{{ value }}"
matchType: "{{ matchType }}"
protectionStatus: "{{ protectionStatus }}"
numberOfProtectedItems: {{ numberOfProtectedItems }}
lastBackUpTime: {{ lastBackUpTime }}
backupActivityStatus: "{{ backupActivityStatus }}"
provisioningState: "{{ provisioningState }}"
DELETE examples
- delete
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
- restore
- resume_backup
- backup
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 }}"
}'
;
Restore resource for a protected items in given protection group.
EXEC azure_isv.commvaultcontentstore.protection_groups.restore
@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=
'{
"inPlaceRestore": {{ inPlaceRestore }},
"restoreType": "{{ restoreType }}",
"toTime": "{{ toTime }}",
"vmDestinationInfo": "{{ vmDestinationInfo }}"
}'
;
Resume Backup for a Protection Group.
EXEC azure_isv.commvaultcontentstore.protection_groups.resume_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
;
Ad-hoc backup of protected items resource in given protection group.
EXEC azure_isv.commvaultcontentstore.protection_groups.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=
'{
"vmList": "{{ vmList }}",
"backupOptions": "{{ backupOptions }}"
}'
;