# Backup for GKE v1 API - Class BackupPlan (2.9.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.9.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/latest/Google.Cloud.GkeBackup.V1.BackupPlan)
- [2.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/2.8.0/Google.Cloud.GkeBackup.V1.BackupPlan)
- [2.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/2.7.0/Google.Cloud.GkeBackup.V1.BackupPlan)
- [2.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/2.6.0/Google.Cloud.GkeBackup.V1.BackupPlan)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/2.5.0/Google.Cloud.GkeBackup.V1.BackupPlan)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/2.4.0/Google.Cloud.GkeBackup.V1.BackupPlan)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/2.3.0/Google.Cloud.GkeBackup.V1.BackupPlan)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/2.2.0/Google.Cloud.GkeBackup.V1.BackupPlan)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/2.1.0/Google.Cloud.GkeBackup.V1.BackupPlan)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/2.0.0/Google.Cloud.GkeBackup.V1.BackupPlan)
- [1.0.0-beta01](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/1.0.0-beta01/Google.Cloud.GkeBackup.V1.BackupPlan)

    public sealed class BackupPlan : IMessage<BackupPlan>, IEquatable<BackupPlan>, IDeepCloneable<BackupPlan>, IBufferMessage, IMessage

Reference documentation and code samples for the Backup for GKE v1 API class BackupPlan.

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

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> BackupPlan

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[BackupPlan](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/latest/Google.Cloud.GkeBackup.V1.BackupPlan), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[BackupPlan](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/latest/Google.Cloud.GkeBackup.V1.BackupPlan), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[BackupPlan](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/latest/Google.Cloud.GkeBackup.V1.BackupPlan), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.GkeBackup.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/latest/Google.Cloud.GkeBackup.V1)

## Assembly

Google.Cloud.GkeBackup.V1.dll

## Constructors

### BackupPlan()

    public BackupPlan()

### BackupPlan(BackupPlan)

    public BackupPlan(BackupPlan other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/latest/Google.Cloud.GkeBackup.V1.BackupPlan` |

## Properties

### BackupChannel

    public string BackupChannel { get; set; }

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/*`

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### BackupChannelAsBackupChannelName

    public BackupChannelName BackupChannelAsBackupChannelName { get; set; }

[BackupChannelName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/latest/Google.Cloud.GkeBackup.V1.BackupChannelName)-typed view over the [BackupChannel](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/latest/Google.Cloud.GkeBackup.V1.BackupPlan#Google_Cloud_GkeBackup_V1_BackupPlan_BackupChannel) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/latest/Google.Cloud.GkeBackup.V1.BackupChannelName` |   |

### BackupConfig

    public BackupPlan.Types.BackupConfig BackupConfig { get; set; }

Optional. Defines the configuration of Backups created via this BackupPlan.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/latest/Google.Cloud.GkeBackup.V1.BackupPlanhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/latest/Google.Cloud.GkeBackup.V1.BackupPlan.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/latest/Google.Cloud.GkeBackup.V1.BackupPlan.Types.BackupConfig` |   |

### BackupPlanName

    public BackupPlanName BackupPlanName { get; set; }

[BackupPlanName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/latest/Google.Cloud.GkeBackup.V1.BackupPlanName)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/latest/Google.Cloud.GkeBackup.V1.BackupPlan#Google_Cloud_GkeBackup_V1_BackupPlan_Name) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/latest/Google.Cloud.GkeBackup.V1.BackupPlanName` |   |

### BackupSchedule

    public BackupPlan.Types.Schedule BackupSchedule { get; set; }

Optional. Defines a schedule for automatic Backup creation via this
BackupPlan.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/latest/Google.Cloud.GkeBackup.V1.BackupPlanhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/latest/Google.Cloud.GkeBackup.V1.BackupPlan.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/latest/Google.Cloud.GkeBackup.V1.BackupPlan.Types.Schedule` |   |

### Cluster

    public string Cluster { get; set; }

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

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### ClusterAsClusterName

    public ClusterName ClusterAsClusterName { get; set; }

[ClusterName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/latest/Google.Cloud.GkeBackup.V1.ClusterName)-typed view over the [Cluster](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/latest/Google.Cloud.GkeBackup.V1.BackupPlan#Google_Cloud_GkeBackup_V1_BackupPlan_Cluster) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/latest/Google.Cloud.GkeBackup.V1.ClusterName` |   |

### CreateTime

    public Timestamp CreateTime { get; set; }

Output only. The timestamp when this BackupPlan resource was created.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |

### Deactivated

    public bool Deactivated { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### Description

    public string Description { get; set; }

Optional. User specified descriptive string for this BackupPlan.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Etag

    public string Etag { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Labels

    public MapField<string, string> Labels { get; }

Optional. A set of custom labels supplied by user.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.MapField-2.htmlhttps://learn.microsoft.com/dotnet/api/system.stringhttps://learn.microsoft.com/dotnet/api/system.string` |   |

### LastSuccessfulBackupTime

    public Timestamp LastSuccessfulBackupTime { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |

### Name

    public string Name { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### ProtectedPodCount

    public int ProtectedPodCount { get; set; }

Output only. The number of Kubernetes Pods backed up in the
last successful Backup created via this BackupPlan.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### RetentionPolicy

    public BackupPlan.Types.RetentionPolicy RetentionPolicy { get; set; }

Optional. RetentionPolicy governs lifecycle of Backups created under this
plan.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/latest/Google.Cloud.GkeBackup.V1.BackupPlanhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/latest/Google.Cloud.GkeBackup.V1.BackupPlan.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/latest/Google.Cloud.GkeBackup.V1.BackupPlan.Types.RetentionPolicy` |   |

### RpoRiskLevel

    public int RpoRiskLevel { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

### RpoRiskReason

    public string RpoRiskReason { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### State

    public BackupPlan.Types.State State { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/latest/Google.Cloud.GkeBackup.V1.BackupPlanhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/latest/Google.Cloud.GkeBackup.V1.BackupPlan.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.GkeBackup.V1/latest/Google.Cloud.GkeBackup.V1.BackupPlan.Types.State` |   |

### StateReason

    public string StateReason { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Uid

    public string Uid { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### UpdateTime

    public Timestamp UpdateTime { get; set; }

Output only. The timestamp when this BackupPlan resource was last
updated.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |