backup_plans
Creates, updates, deletes, gets or lists a backup_plans
resource.
Overview
Name | backup_plans |
Type | Resource |
Id | google.backupdr.backup_plans |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Output only. Identifier. The resource name of the BackupPlan . Format: projects/{project}/locations/{location}/backupPlans/{backup_plan} |
description | string | Optional. The description of the BackupPlan resource. The description allows for additional details about BackupPlan and its use cases to be provided. An example description is the following: "This is a backup plan that performs a daily backup at 6pm and retains data for 3 months". The description must be at most 2048 characters. |
backupRules | array | Required. The backup rules for this BackupPlan . There must be at least one BackupRule message. |
backupVault | string | Required. Resource name of backup vault which will be used as storage location for backups. Format: projects/{project}/locations/{location}/backupVaults/{backupvault} |
backupVaultServiceAccount | string | Output only. The Google Cloud Platform Service Account to be used by the BackupVault for taking backups. Specify the email address of the Backup Vault Service Account. |
createTime | string | Output only. When the BackupPlan was created. |
etag | string | Optional. etag is returned from the service in the response. As a user of the service, you may provide an etag value in this field to prevent stale resources. |
labels | object | Optional. This collection of key/value pairs allows for custom labels to be supplied by the user. Example, {"tag": "Weekly"}. |
resourceType | string | Required. The resource type to which the BackupPlan will be applied. Examples include, "compute.googleapis.com/Instance" and "storage.googleapis.com/Bucket". |
state | string | Output only. The State for the BackupPlan . |
updateTime | string | Output only. When the BackupPlan was last updated. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | backupPlansId, locationsId, projectsId | Gets details of a single BackupPlan. |
list | SELECT | locationsId, projectsId | Lists BackupPlans in a given project and location. |
create | INSERT | locationsId, projectsId | Create a BackupPlan |
delete | DELETE | backupPlansId, locationsId, projectsId | Deletes a single BackupPlan. |
SELECT
examples
Lists BackupPlans in a given project and location.
SELECT
name,
description,
backupRules,
backupVault,
backupVaultServiceAccount,
createTime,
etag,
labels,
resourceType,
state,
updateTime
FROM google.backupdr.backup_plans
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new backup_plans
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.backupdr.backup_plans (
locationsId,
projectsId,
description,
labels,
backupRules,
resourceType,
etag,
backupVault
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ description }}',
'{{ labels }}',
'{{ backupRules }}',
'{{ resourceType }}',
'{{ etag }}',
'{{ backupVault }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: description
value: string
- name: labels
value: object
- name: createTime
value: string
- name: updateTime
value: string
- name: backupRules
value:
- - name: ruleId
value: string
- name: backupRetentionDays
value: integer
- name: standardSchedule
value:
- name: recurrenceType
value: string
- name: hourlyFrequency
value: integer
- name: daysOfWeek
value:
- string
- name: daysOfMonth
value:
- integer
- name: weekDayOfMonth
value:
- name: weekOfMonth
value: string
- name: dayOfWeek
value: string
- name: months
value:
- string
- name: backupWindow
value:
- name: startHourOfDay
value: integer
- name: endHourOfDay
value: integer
- name: timeZone
value: string
- name: state
value: string
- name: resourceType
value: string
- name: etag
value: string
- name: backupVault
value: string
- name: backupVaultServiceAccount
value: string
DELETE
example
Deletes the specified backup_plans
resource.
/*+ delete */
DELETE FROM google.backupdr.backup_plans
WHERE backupPlansId = '{{ backupPlansId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';