Google Cloud Gke Backup V1 Client - Class Backup (0.8.1)

Reference documentation and code samples for the Google Cloud Gke Backup V1 Client class Backup.

Represents a request to perform a single point-in-time capture of some portion of the state of a GKE cluster, the record of the backup operation itself, and an anchor for the underlying artifacts that comprise the Backup (the config backup and VolumeBackups).

Generated from protobuf message google.cloud.gkebackup.v1.Backup

Namespace

Google \ Cloud \ GkeBackup \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ name string

Output only. The fully qualified name of the Backup. projects/*/locations/*/backupPlans/*/backups/*

↳ uid string

Output only. Server generated global unique identifier of UUID4

↳ create_time Google\Protobuf\Timestamp

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

↳ update_time Google\Protobuf\Timestamp

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

↳ manual bool

Output only. This flag indicates whether this Backup resource was created manually by a user or via a schedule in the BackupPlan. A value of True means that the Backup was created manually.

↳ labels array|Google\Protobuf\Internal\MapField

Optional. A set of custom labels supplied by user.

↳ delete_lock_days int

Optional. Minimum age for this Backup (in days). If this field is set to a non-zero value, the Backup will be "locked" against deletion (either manual or automatic deletion) for the number of days provided (measured from the creation time of the Backup). MUST be an integer value between 0-90 (inclusive). Defaults to parent BackupPlan's backup_delete_lock_days setting and may only be increased (either at creation time or in a subsequent update).

↳ delete_lock_expire_time Google\Protobuf\Timestamp

Output only. The time at which an existing delete lock will expire for this backup (calculated from create_time + delete_lock_days).

↳ retain_days int

Optional. The age (in days) after which this Backup will be automatically deleted. Must be an integer value >= 0: - If 0, no automatic deletion will occur for this Backup. - If not 0, this must be >= delete_lock_days and <= 365. Once a Backup is created, this value may only be increased. Defaults to the parent BackupPlan's backup_retain_days value.

↳ retain_expire_time Google\Protobuf\Timestamp

Output only. The time at which this Backup will be automatically deleted (calculated from create_time + retain_days).

↳ encryption_key Google\Cloud\GkeBackup\V1\EncryptionKey

Output only. The customer managed encryption key that was used to encrypt the Backup's artifacts. Inherited from the parent BackupPlan's encryption_key value.

↳ all_namespaces bool

Output only. If True, all namespaces were included in the Backup.

↳ selected_namespaces Google\Cloud\GkeBackup\V1\Namespaces

Output only. If set, the list of namespaces that were included in the Backup.

↳ selected_applications Google\Cloud\GkeBackup\V1\NamespacedNames

Output only. If set, the list of ProtectedApplications whose resources were included in the Backup.

↳ contains_volume_data bool

Output only. Whether or not the Backup contains volume data. Controlled by the parent BackupPlan's include_volume_data value.

↳ contains_secrets bool

Output only. Whether or not the Backup contains Kubernetes Secrets. Controlled by the parent BackupPlan's include_secrets value.

↳ cluster_metadata Google\Cloud\GkeBackup\V1\Backup\ClusterMetadata

Output only. Information about the GKE cluster from which this Backup was created.

↳ state int

Output only. Current state of the Backup

↳ state_reason string

Output only. Human-readable description of why the backup is in the current state.

↳ complete_time Google\Protobuf\Timestamp

Output only. Completion time of the Backup

↳ resource_count int

Output only. The total number of Kubernetes resources included in the Backup.

↳ volume_count int

Output only. The total number of volume backups contained in the Backup.

↳ size_bytes int|string

Output only. The total size of the Backup in bytes = config backup size + sum(volume backup sizes)

↳ etag string

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

↳ description string

Optional. User specified descriptive string for this Backup.

↳ pod_count int

Output only. The total number of Kubernetes Pods contained in the Backup.

↳ config_backup_size_bytes int|string

Output only. The size of the config backup in bytes.

↳ permissive_mode bool

Output only. If false, Backup will fail when Backup for GKE detects Kubernetes configuration that is non-standard or requires additional setup to restore. Inherited from the parent BackupPlan's permissive_mode value.

getName

Output only. The fully qualified name of the Backup.

projects/*/locations/*/backupPlans/*/backups/*

Returns
Type Description
string

setName

Output only. The fully qualified name of the Backup.

projects/*/locations/*/backupPlans/*/backups/*

Parameter
Name Description
var string
Returns
Type Description
$this

getUid

Output only. Server generated global unique identifier of UUID4

Returns
Type Description
string

setUid

Output only. Server generated global unique identifier of UUID4

Parameter
Name Description
var string
Returns
Type Description
$this

getCreateTime

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

Returns
Type Description
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

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

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getUpdateTime

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

Returns
Type Description
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

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

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getManual

Output only. This flag indicates whether this Backup resource was created manually by a user or via a schedule in the BackupPlan. A value of True means that the Backup was created manually.

Returns
Type Description
bool

setManual

Output only. This flag indicates whether this Backup resource was created manually by a user or via a schedule in the BackupPlan. A value of True means that the Backup was created manually.

Parameter
Name Description
var bool
Returns
Type Description
$this

getLabels

Optional. A set of custom labels supplied by user.

Returns
Type Description
Google\Protobuf\Internal\MapField

setLabels

Optional. A set of custom labels supplied by user.

Parameter
Name Description
var array|Google\Protobuf\Internal\MapField
Returns
Type Description
$this

getDeleteLockDays

Optional. Minimum age for this Backup (in days). If this field is set to a non-zero value, the Backup will be "locked" against deletion (either manual or automatic deletion) for the number of days provided (measured from the creation time of the Backup). MUST be an integer value between 0-90 (inclusive).

Defaults to parent BackupPlan's backup_delete_lock_days setting and may only be increased (either at creation time or in a subsequent update).

Returns
Type Description
int

setDeleteLockDays

Optional. Minimum age for this Backup (in days). If this field is set to a non-zero value, the Backup will be "locked" against deletion (either manual or automatic deletion) for the number of days provided (measured from the creation time of the Backup). MUST be an integer value between 0-90 (inclusive).

Defaults to parent BackupPlan's backup_delete_lock_days setting and may only be increased (either at creation time or in a subsequent update).

Parameter
Name Description
var int
Returns
Type Description
$this

getDeleteLockExpireTime

Output only. The time at which an existing delete lock will expire for this backup (calculated from create_time + delete_lock_days).

Returns
Type Description
Google\Protobuf\Timestamp|null

hasDeleteLockExpireTime

clearDeleteLockExpireTime

setDeleteLockExpireTime

Output only. The time at which an existing delete lock will expire for this backup (calculated from create_time + delete_lock_days).

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getRetainDays

Optional. The age (in days) after which this Backup will be automatically deleted. Must be an integer value >= 0:

  • If 0, no automatic deletion will occur for this Backup.

  • If not 0, this must be >= delete_lock_days and <= 365. Once a Backup is created, this value may only be increased. Defaults to the parent BackupPlan's backup_retain_days value.

Returns
Type Description
int

setRetainDays

Optional. The age (in days) after which this Backup will be automatically deleted. Must be an integer value >= 0:

  • If 0, no automatic deletion will occur for this Backup.

  • If not 0, this must be >= delete_lock_days and <= 365. Once a Backup is created, this value may only be increased. Defaults to the parent BackupPlan's backup_retain_days value.

Parameter
Name Description
var int
Returns
Type Description
$this

getRetainExpireTime

Output only. The time at which this Backup will be automatically deleted (calculated from create_time + retain_days).

Returns
Type Description
Google\Protobuf\Timestamp|null

hasRetainExpireTime

clearRetainExpireTime

setRetainExpireTime

Output only. The time at which this Backup will be automatically deleted (calculated from create_time + retain_days).

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getEncryptionKey

Output only. The customer managed encryption key that was used to encrypt the Backup's artifacts. Inherited from the parent BackupPlan's encryption_key value.

Returns
Type Description
Google\Cloud\GkeBackup\V1\EncryptionKey|null

hasEncryptionKey

clearEncryptionKey

setEncryptionKey

Output only. The customer managed encryption key that was used to encrypt the Backup's artifacts. Inherited from the parent BackupPlan's encryption_key value.

Parameter
Name Description
var Google\Cloud\GkeBackup\V1\EncryptionKey
Returns
Type Description
$this

getAllNamespaces

Output only. If True, all namespaces were included in the Backup.

Returns
Type Description
bool

hasAllNamespaces

setAllNamespaces

Output only. If True, all namespaces were included in the Backup.

Parameter
Name Description
var bool
Returns
Type Description
$this

getSelectedNamespaces

Output only. If set, the list of namespaces that were included in the Backup.

Returns
Type Description
Google\Cloud\GkeBackup\V1\Namespaces|null

hasSelectedNamespaces

setSelectedNamespaces

Output only. If set, the list of namespaces that were included in the Backup.

Parameter
Name Description
var Google\Cloud\GkeBackup\V1\Namespaces
Returns
Type Description
$this

getSelectedApplications

Output only. If set, the list of ProtectedApplications whose resources were included in the Backup.

Returns
Type Description
Google\Cloud\GkeBackup\V1\NamespacedNames|null

hasSelectedApplications

setSelectedApplications

Output only. If set, the list of ProtectedApplications whose resources were included in the Backup.

Parameter
Name Description
var Google\Cloud\GkeBackup\V1\NamespacedNames
Returns
Type Description
$this

getContainsVolumeData

Output only. Whether or not the Backup contains volume data. Controlled by the parent BackupPlan's include_volume_data value.

Returns
Type Description
bool

setContainsVolumeData

Output only. Whether or not the Backup contains volume data. Controlled by the parent BackupPlan's include_volume_data value.

Parameter
Name Description
var bool
Returns
Type Description
$this

getContainsSecrets

Output only. Whether or not the Backup contains Kubernetes Secrets.

Controlled by the parent BackupPlan's include_secrets value.

Returns
Type Description
bool

setContainsSecrets

Output only. Whether or not the Backup contains Kubernetes Secrets.

Controlled by the parent BackupPlan's include_secrets value.

Parameter
Name Description
var bool
Returns
Type Description
$this

getClusterMetadata

Output only. Information about the GKE cluster from which this Backup was created.

Returns
Type Description
Google\Cloud\GkeBackup\V1\Backup\ClusterMetadata|null

hasClusterMetadata

clearClusterMetadata

setClusterMetadata

Output only. Information about the GKE cluster from which this Backup was created.

Parameter
Name Description
var Google\Cloud\GkeBackup\V1\Backup\ClusterMetadata
Returns
Type Description
$this

getState

Output only. Current state of the Backup

Returns
Type Description
int

setState

Output only. Current state of the Backup

Parameter
Name Description
var int
Returns
Type Description
$this

getStateReason

Output only. Human-readable description of why the backup is in the current state.

Returns
Type Description
string

setStateReason

Output only. Human-readable description of why the backup is in the current state.

Parameter
Name Description
var string
Returns
Type Description
$this

getCompleteTime

Output only. Completion time of the Backup

Returns
Type Description
Google\Protobuf\Timestamp|null

hasCompleteTime

clearCompleteTime

setCompleteTime

Output only. Completion time of the Backup

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getResourceCount

Output only. The total number of Kubernetes resources included in the Backup.

Returns
Type Description
int

setResourceCount

Output only. The total number of Kubernetes resources included in the Backup.

Parameter
Name Description
var int
Returns
Type Description
$this

getVolumeCount

Output only. The total number of volume backups contained in the Backup.

Returns
Type Description
int

setVolumeCount

Output only. The total number of volume backups contained in the Backup.

Parameter
Name Description
var int
Returns
Type Description
$this

getSizeBytes

Output only. The total size of the Backup in bytes = config backup size + sum(volume backup sizes)

Returns
Type Description
int|string

setSizeBytes

Output only. The total size of the Backup in bytes = config backup size + sum(volume backup sizes)

Parameter
Name Description
var int|string
Returns
Type Description
$this

getEtag

Output only. etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a backup from overwriting each other.

It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform backup updates in order to avoid race conditions: An etag is returned in the response to GetBackup, and systems are expected to put that etag in the request to UpdateBackup or DeleteBackup to ensure that their change will be applied to the same version of the resource.

Returns
Type Description
string

setEtag

Output only. etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a backup from overwriting each other.

It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform backup updates in order to avoid race conditions: An etag is returned in the response to GetBackup, and systems are expected to put that etag in the request to UpdateBackup or DeleteBackup to ensure that their change will be applied to the same version of the resource.

Parameter
Name Description
var string
Returns
Type Description
$this

getDescription

Optional. User specified descriptive string for this Backup.

Returns
Type Description
string

setDescription

Optional. User specified descriptive string for this Backup.

Parameter
Name Description
var string
Returns
Type Description
$this

getPodCount

Output only. The total number of Kubernetes Pods contained in the Backup.

Returns
Type Description
int

setPodCount

Output only. The total number of Kubernetes Pods contained in the Backup.

Parameter
Name Description
var int
Returns
Type Description
$this

getConfigBackupSizeBytes

Output only. The size of the config backup in bytes.

Returns
Type Description
int|string

setConfigBackupSizeBytes

Output only. The size of the config backup in bytes.

Parameter
Name Description
var int|string
Returns
Type Description
$this

getPermissiveMode

Output only. If false, Backup will fail when Backup for GKE detects Kubernetes configuration that is non-standard or requires additional setup to restore.

Inherited from the parent BackupPlan's permissive_mode value.

Returns
Type Description
bool

setPermissiveMode

Output only. If false, Backup will fail when Backup for GKE detects Kubernetes configuration that is non-standard or requires additional setup to restore.

Inherited from the parent BackupPlan's permissive_mode value.

Parameter
Name Description
var bool
Returns
Type Description
$this

getBackupScope

Returns
Type Description
string