# Backup for GKE V1 API - Class Google::Cloud::GkeBackup::V1::BackupPlan (v1.8.0)

1.8.0 (latest) 1.7.1 1.6.0 1.5.1 1.4.0 1.3.0 1.2.0 1.1.1 1.0.0 0.12.0 0.11.0 0.10.1 0.9.0 0.8.0 0.7.2 0.6.0 0.5.1 0.4.0 0.3.0 0.2.0 0.1.0 Reference documentation and code samples for the Backup for GKE V1 API class Google::Cloud::GkeBackup::V1::BackupPlan.

Defines the configuration and scheduling for a "line" of Backups.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #backup_channel

    def backup_channel() -> ::String

**Returns**

- (::String) --- Output only. The fully qualified name of the BackupChannel to be used to create a backup. This field is set only if the cluster being backed up is in a different project. `projects/*/locations/*/backupChannels/*`

### #backup_config

    def backup_config() -> ::Google::Cloud::GkeBackup::V1::BackupPlan::BackupConfig

**Returns**

- ([::Google::Cloud::GkeBackup::V1::BackupPlan::BackupConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gke_backup-v1/latest/Google-Cloud-GkeBackup-V1-BackupPlan-BackupConfig)) --- Optional. Defines the configuration of Backups created via this BackupPlan.

### #backup_config=

    def backup_config=(value) -> ::Google::Cloud::GkeBackup::V1::BackupPlan::BackupConfig

**Parameter**

- **value** ([::Google::Cloud::GkeBackup::V1::BackupPlan::BackupConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gke_backup-v1/latest/Google-Cloud-GkeBackup-V1-BackupPlan-BackupConfig)) --- Optional. Defines the configuration of Backups created via this BackupPlan.
**Returns**

- ([::Google::Cloud::GkeBackup::V1::BackupPlan::BackupConfig](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gke_backup-v1/latest/Google-Cloud-GkeBackup-V1-BackupPlan-BackupConfig)) --- Optional. Defines the configuration of Backups created via this BackupPlan.

### #backup_schedule

    def backup_schedule() -> ::Google::Cloud::GkeBackup::V1::BackupPlan::Schedule

**Returns**

- ([::Google::Cloud::GkeBackup::V1::BackupPlan::Schedule](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gke_backup-v1/latest/Google-Cloud-GkeBackup-V1-BackupPlan-Schedule)) --- Optional. Defines a schedule for automatic Backup creation via this BackupPlan.

### #backup_schedule=

    def backup_schedule=(value) -> ::Google::Cloud::GkeBackup::V1::BackupPlan::Schedule

**Parameter**

- **value** ([::Google::Cloud::GkeBackup::V1::BackupPlan::Schedule](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gke_backup-v1/latest/Google-Cloud-GkeBackup-V1-BackupPlan-Schedule)) --- Optional. Defines a schedule for automatic Backup creation via this BackupPlan.
**Returns**

- ([::Google::Cloud::GkeBackup::V1::BackupPlan::Schedule](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gke_backup-v1/latest/Google-Cloud-GkeBackup-V1-BackupPlan-Schedule)) --- Optional. Defines a schedule for automatic Backup creation via this BackupPlan.

### #cluster

    def cluster() -> ::String

**Returns**

- (::String) --- Required. Immutable. The source cluster from which Backups will be created
  via this BackupPlan. Valid formats:

  - `projects/*/locations/*/clusters/*`
  - `projects/*/zones/*/clusters/*`

### #cluster=

    def cluster=(value) -> ::String

**Parameter**

- **value** (::String) ---

  Required. Immutable. The source cluster from which Backups will be created
  via this BackupPlan. Valid formats:
  - `projects/*/locations/*/clusters/*`
  - `projects/*/zones/*/clusters/*`
**Returns**

- (::String) --- Required. Immutable. The source cluster from which Backups will be created
  via this BackupPlan. Valid formats:

  - `projects/*/locations/*/clusters/*`
  - `projects/*/zones/*/clusters/*`

### #create_time

    def create_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gke_backup-v1/latest/Google-Protobuf-Timestamp)) --- Output only. The timestamp when this BackupPlan resource was created.

### #deactivated

    def deactivated() -> ::Boolean

**Returns**

- (::Boolean) --- Optional. This flag indicates whether this BackupPlan has been deactivated. Setting this field to True locks the BackupPlan such that no further updates will be allowed (except deletes), including the deactivated field itself. It also prevents any new Backups from being created via this BackupPlan (including scheduled Backups).

  Default: False

### #deactivated=

    def deactivated=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- Optional. This flag indicates whether this BackupPlan has been deactivated. Setting this field to True locks the BackupPlan such that no further updates will be allowed (except deletes), including the deactivated field itself. It also prevents any new Backups from being created via this BackupPlan (including scheduled Backups).


  Default: False
**Returns**

- (::Boolean) --- Optional. This flag indicates whether this BackupPlan has been deactivated. Setting this field to True locks the BackupPlan such that no further updates will be allowed (except deletes), including the deactivated field itself. It also prevents any new Backups from being created via this BackupPlan (including scheduled Backups).

  Default: False

### #description

    def description() -> ::String

**Returns**

- (::String) --- Optional. User specified descriptive string for this BackupPlan.

### #description=

    def description=(value) -> ::String

**Parameter**

- **value** (::String) --- Optional. User specified descriptive string for this BackupPlan.
**Returns**

- (::String) --- Optional. User specified descriptive string for this BackupPlan.

### #etag

    def etag() -> ::String

**Returns**

- (::String) --- Output only. `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a backup plan from overwriting each other. It is strongly suggested that systems make use of the 'etag' in the read-modify-write cycle to perform BackupPlan updates in order to avoid race conditions: An `etag` is returned in the response to `GetBackupPlan`, and systems are expected to put that etag in the request to `UpdateBackupPlan` or `DeleteBackupPlan` to ensure that their change will be applied to the same version of the resource.

### #labels

    def labels() -> ::Google::Protobuf::Map{::String => ::String}

**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- Optional. A set of custom labels supplied by user.

### #labels=

    def labels=(value) -> ::Google::Protobuf::Map{::String => ::String}

**Parameter**

- **value** (::Google::Protobuf::Map{::String =\> ::String}) --- Optional. A set of custom labels supplied by user.
**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- Optional. A set of custom labels supplied by user.

### #last_successful_backup_time

    def last_successful_backup_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gke_backup-v1/latest/Google-Protobuf-Timestamp)) --- Output only. Completion time of the last successful Backup. This is sourced from a successful Backup's complete_time field. This field is added to maintain consistency with BackupPlanBinding to display last successful backup time.

### #name

    def name() -> ::String

**Returns**

- (::String) --- Output only. The full name of the BackupPlan resource. Format: `projects/*/locations/*/backupPlans/*`

### #protected_pod_count

    def protected_pod_count() -> ::Integer

**Returns**

- (::Integer) --- Output only. The number of Kubernetes Pods backed up in the last successful Backup created via this BackupPlan.

### #retention_policy

    def retention_policy() -> ::Google::Cloud::GkeBackup::V1::BackupPlan::RetentionPolicy

**Returns**

- ([::Google::Cloud::GkeBackup::V1::BackupPlan::RetentionPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gke_backup-v1/latest/Google-Cloud-GkeBackup-V1-BackupPlan-RetentionPolicy)) --- Optional. RetentionPolicy governs lifecycle of Backups created under this plan.

### #retention_policy=

    def retention_policy=(value) -> ::Google::Cloud::GkeBackup::V1::BackupPlan::RetentionPolicy

**Parameter**

- **value** ([::Google::Cloud::GkeBackup::V1::BackupPlan::RetentionPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gke_backup-v1/latest/Google-Cloud-GkeBackup-V1-BackupPlan-RetentionPolicy)) --- Optional. RetentionPolicy governs lifecycle of Backups created under this plan.
**Returns**

- ([::Google::Cloud::GkeBackup::V1::BackupPlan::RetentionPolicy](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gke_backup-v1/latest/Google-Cloud-GkeBackup-V1-BackupPlan-RetentionPolicy)) --- Optional. RetentionPolicy governs lifecycle of Backups created under this plan.

### #rpo_risk_level

    def rpo_risk_level() -> ::Integer

**Returns**

- (::Integer) --- Output only. A number that represents the current risk level of this BackupPlan from RPO perspective with 1 being no risk and 5 being highest risk.

### #rpo_risk_reason

    def rpo_risk_reason() -> ::String

**Returns**

- (::String) --- Output only. Human-readable description of why the BackupPlan is in the current rpo_risk_level and action items if any.

### #state

    def state() -> ::Google::Cloud::GkeBackup::V1::BackupPlan::State

**Returns**

- ([::Google::Cloud::GkeBackup::V1::BackupPlan::State](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gke_backup-v1/latest/Google-Cloud-GkeBackup-V1-BackupPlan-State)) --- Output only. State of the BackupPlan. This State field reflects the various stages a BackupPlan can be in during the Create operation. It will be set to "DEACTIVATED" if the BackupPlan is deactivated on an Update

### #state_reason

    def state_reason() -> ::String

**Returns**

- (::String) --- Output only. Human-readable description of why BackupPlan is in the current `state`. This field is only meant for human readability and should not be used programmatically as this field is not guaranteed to be consistent.

### #uid

    def uid() -> ::String

**Returns**

- (::String) --- Output only. Server generated global unique identifier of [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format.

### #update_time

    def update_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-gke_backup-v1/latest/Google-Protobuf-Timestamp)) --- Output only. The timestamp when this BackupPlan resource was last updated.