0.10.4 (latest) 0.10.3 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.0 0.3.0 0.2.5 0.1.7

    BackupPlan(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A `BackupPlan` specifies some common fields, such as
`description` as well as one or more `BackupRule` messages. Each
`BackupRule` has a retention policy and defines a schedule by
which the system is to perform backup workloads.

This message has `oneof`_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.

.. _oneof: <https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields>

| ## Attributes ||
|---|---|
| **Name** | **Description** |
| `disk_backup_plan_properties` | `https://docs.cloud.google.com/python/docs/reference/backupdr/latest/google.cloud.backupdr_v1beta.types.DiskBackupPlanProperties` Optional. Defines optional properties specific to backups of disk-based resources, such as Compute Engine Persistent Disks. This includes settings like whether to perform a guest flush. This field is a member of `oneof`_ `resource_properties`. |
| `compute_instance_backup_plan_properties` | `https://docs.cloud.google.com/python/docs/reference/backupdr/latest/google.cloud.backupdr_v1beta.types.ComputeInstanceBackupPlanProperties` Optional. Defines optional properties specific to backups of compute instance based resources, such as Compute Engine Instances. This includes settings like whether to perform a guest flush. This field is a member of `oneof`_ `resource_properties`. |
| `name` | `str` Output only. Identifier. The resource name of the `BackupPlan`. Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}` |
| `description` | `str` 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. |
| `labels` | `MutableMapping[str, str]` Optional. This collection of key/value pairs allows for custom labels to be supplied by the user. Example, {"tag": "Weekly"}. |
| `create_time` | `google.protobuf.timestamp_pb2.Timestamp` Output only. When the `BackupPlan` was created. |
| `update_time` | `google.protobuf.timestamp_pb2.Timestamp` Output only. When the `BackupPlan` was last updated. |
| `backup_rules` | `MutableSequence[https://docs.cloud.google.com/python/docs/reference/backupdr/latest/google.cloud.backupdr_v1beta.types.BackupRule]` Optional. The backup rules for this `BackupPlan`. |
| `max_custom_on_demand_retention_days` | `int` Optional. Optional field to configure the maximum number of days for which a backup can be retained. This field is only applicable for on-demand backups taken with custom retention value. |
| `state` | `https://docs.cloud.google.com/python/docs/reference/backupdr/latest/google.cloud.backupdr_v1beta.types.BackupPlan.State` Output only. The `State` for the `BackupPlan`. |
| `resource_type` | `str` Required. The resource type to which the `BackupPlan` will be applied. Examples include, "compute.googleapis.com/Instance", "sqladmin.googleapis.com/Instance", "alloydb.googleapis.com/Cluster", "compute.googleapis.com/Disk". |
| `etag` | `str` 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. |
| `backup_vault` | `str` Required. Resource name of backup vault which will be used as storage location for backups. Format: projects/{project}/locations/{location}/backupVaults/{backupvault} |
| `backup_vault_service_account` | `str` Output only. The Google Cloud service account to be used by the BackupVault for taking backups. Specify the email address of the Backup Vault Service Account. |
| `log_retention_days` | `int` Optional. Applicable only for Cloud SQL resource_type. Configures how long logs will be stored. It is defined in "days". This value should be greater than or equal to minimum enforced log retention duration of the backup vault. |
| `supported_resource_types` | `MutableSequence[str]` Output only. All resource types to which backupPlan can be applied. |
| `revision_id` | `str` Output only. The user friendly revision ID of the `BackupPlanRevision`. Example: v0, v1, v2, etc. |
| `revision_name` | `str` Output only. The resource id of the `BackupPlanRevision`. Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision_id}` |

## Classes

### LabelsEntry

    LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The abstract base class for a message.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `kwargs` | `dict` Keys and values corresponding to the fields of the message. |
| `mapping` | ``Union[dict, `.Message`]`` A dictionary or message to be used to determine the values for this message. |
| `ignore_unknown_fields` | `Optional(bool)` If True, do not raise errors for unknown fields. Only applied if `mapping` is a mapping type or there are keyword parameters. |

### State

    State(value)

`State` enumerates the possible states for a `BackupPlan`.