backup_plan_associations
Creates, updates, deletes, gets or lists a backup_plan_associations
resource.
Overview
Name | backup_plan_associations |
Type | Resource |
Id | google.backupdr.backup_plan_associations |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Output only. Identifier. The resource name of BackupPlanAssociation in below format Format : projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId} |
backupPlan | string | Required. Resource name of backup plan which needs to be applied on workload. Format: projects/{project}/locations/{location}/backupPlans/{backupPlanId} |
createTime | string | Output only. The time when the instance was created. |
dataSource | string | Output 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} |
resource | string | Required. Immutable. Resource name of workload on which backupplan is applied |
resourceType | string | Output only. Output Only. Resource type of workload on which backupplan is applied |
rulesConfigInfo | array | Output only. The config info related to backup rules. |
state | string | Output only. The BackupPlanAssociation resource state. |
updateTime | string | Output only. The time when the instance was updated. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | backupPlanAssociationsId, locationsId, projectsId | Gets details of a single BackupPlanAssociation. |
list | SELECT | locationsId, projectsId | Lists BackupPlanAssociations in a given project and location. |
create | INSERT | locationsId, projectsId | Create a BackupPlanAssociation |
delete | DELETE | backupPlanAssociationsId, locationsId, projectsId | Deletes a single BackupPlanAssociation. |
trigger_backup | EXEC | backupPlanAssociationsId, locationsId, projectsId | Triggers 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.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.backupdr.backup_plan_associations (
locationsId,
projectsId,
resource,
backupPlan
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ resource }}',
'{{ backupPlan }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: resourceType
value: string
- name: resource
value: string
- name: backupPlan
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: state
value: string
- name: rulesConfigInfo
value:
- - name: ruleId
value: string
- name: lastBackupState
value: string
- name: lastBackupError
value:
- name: code
value: integer
- name: message
value: string
- name: details
value:
- object
- name: lastSuccessfulBackupConsistencyTime
value: string
- name: dataSource
value: string
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 }}';