Skip to main content

backup_plan_associations

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

Overview

Namebackup_plan_associations
TypeResource
Idgoogle.backupdr.backup_plan_associations

Fields

NameDatatypeDescription
namestringOutput only. Identifier. The resource name of BackupPlanAssociation in below format Format : projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}
backupPlanstringRequired. Resource name of backup plan which needs to be applied on workload. Format: projects/{project}/locations/{location}/backupPlans/{backupPlanId}
createTimestringOutput only. The time when the instance was created.
dataSourcestringOutput only. Output Only. Resource name of data source which will be used as storage location for backups taken. Format : projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}
resourcestringRequired. Immutable. Resource name of workload on which backupplan is applied
resourceTypestringOutput only. Output Only. Resource type of workload on which backupplan is applied
rulesConfigInfoarrayOutput only. The config info related to backup rules.
statestringOutput only. The BackupPlanAssociation resource state.
updateTimestringOutput only. The time when the instance was updated.

Methods

NameAccessible byRequired ParamsDescription
getSELECTbackupPlanAssociationsId, locationsId, projectsIdGets details of a single BackupPlanAssociation.
listSELECTlocationsId, projectsIdLists BackupPlanAssociations in a given project and location.
createINSERTlocationsId, projectsIdCreate a BackupPlanAssociation
deleteDELETEbackupPlanAssociationsId, locationsId, projectsIdDeletes a single BackupPlanAssociation.
trigger_backupEXECbackupPlanAssociationsId, locationsId, projectsIdTriggers a new Backup.

SELECT examples

Lists BackupPlanAssociations in a given project and location.

SELECT
name,
backupPlan,
createTime,
dataSource,
resource,
resourceType,
rulesConfigInfo,
state,
updateTime
FROM google.backupdr.backup_plan_associations
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new backup_plan_associations resource.

/*+ create */
INSERT INTO google.backupdr.backup_plan_associations (
locationsId,
projectsId,
resource,
backupPlan
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ resource }}',
'{{ backupPlan }}'
;

DELETE example

Deletes the specified backup_plan_associations resource.

/*+ delete */
DELETE FROM google.backupdr.backup_plan_associations
WHERE backupPlanAssociationsId = '{{ backupPlanAssociationsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';