Class: Google::Apis::GkebackupV1::Backup
- Inherits:
-
Object
- Object
- Google::Apis::GkebackupV1::Backup
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/gkebackup_v1/classes.rb,
lib/google/apis/gkebackup_v1/representations.rb,
lib/google/apis/gkebackup_v1/representations.rb
Overview
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). Next id: 28
Instance Attribute Summary collapse
-
#all_namespaces ⇒ Boolean
(also: #all_namespaces?)
Output only.
-
#cluster_metadata ⇒ Google::Apis::GkebackupV1::ClusterMetadata
Information about the GKE cluster from which this Backup was created.
-
#complete_time ⇒ String
Output only.
-
#config_backup_size_bytes ⇒ Fixnum
Output only.
-
#contains_secrets ⇒ Boolean
(also: #contains_secrets?)
Output only.
-
#contains_volume_data ⇒ Boolean
(also: #contains_volume_data?)
Output only.
-
#create_time ⇒ String
Output only.
-
#delete_lock_days ⇒ Fixnum
Minimum age for this Backup (in days).
-
#delete_lock_expire_time ⇒ String
Output only.
-
#description ⇒ String
User specified descriptive string for this Backup.
-
#encryption_key ⇒ Google::Apis::GkebackupV1::EncryptionKey
Defined a customer managed encryption key that will be used to encrypt Backup artifacts.
-
#etag ⇒ String
Output only.
-
#labels ⇒ Hash<String,String>
A set of custom labels supplied by user.
-
#manual ⇒ Boolean
(also: #manual?)
Output only.
-
#name ⇒ String
Output only.
-
#pod_count ⇒ Fixnum
Output only.
-
#resource_count ⇒ Fixnum
Output only.
-
#retain_days ⇒ Fixnum
The age (in days) after which this Backup will be automatically deleted.
-
#retain_expire_time ⇒ String
Output only.
-
#selected_applications ⇒ Google::Apis::GkebackupV1::NamespacedNames
A list of namespaced Kubernetes resources.
-
#selected_namespaces ⇒ Google::Apis::GkebackupV1::Namespaces
A list of Kubernetes Namespaces Corresponds to the JSON property
selectedNamespaces. -
#size_bytes ⇒ Fixnum
Output only.
-
#state ⇒ String
Output only.
-
#state_reason ⇒ String
Output only.
-
#uid ⇒ String
Output only.
-
#update_time ⇒ String
Output only.
-
#volume_count ⇒ Fixnum
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Backup
constructor
A new instance of Backup.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Backup
Returns a new instance of Backup.
274 275 276 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 274 def initialize(**args) update!(**args) end |
Instance Attribute Details
#all_namespaces ⇒ Boolean Also known as: all_namespaces?
Output only. If True, all namespaces were included in the Backup.
Corresponds to the JSON property allNamespaces
106 107 108 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 106 def all_namespaces @all_namespaces end |
#cluster_metadata ⇒ Google::Apis::GkebackupV1::ClusterMetadata
Information about the GKE cluster from which this Backup was created.
Corresponds to the JSON property clusterMetadata
112 113 114 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 112 def @cluster_metadata end |
#complete_time ⇒ String
Output only. Completion time of the Backup
Corresponds to the JSON property completeTime
117 118 119 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 117 def complete_time @complete_time end |
#config_backup_size_bytes ⇒ Fixnum
Output only. cluster config backup size in bytes.
Corresponds to the JSON property configBackupSizeBytes
122 123 124 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 122 def config_backup_size_bytes @config_backup_size_bytes end |
#contains_secrets ⇒ Boolean Also known as: contains_secrets?
Output only. Whether or not the Backup contains Kubernetes Secrets. Inherited
from the parent BackupPlan's backup_config.include_secrets.
Corresponds to the JSON property containsSecrets
128 129 130 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 128 def contains_secrets @contains_secrets end |
#contains_volume_data ⇒ Boolean Also known as: contains_volume_data?
Output only. Whether or not the Backup contains volume data. Inherited from
the parent BackupPlan's backup_config.include_volume_data.
Corresponds to the JSON property containsVolumeData
135 136 137 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 135 def contains_volume_data @contains_volume_data end |
#create_time ⇒ String
Output only. [Output Only] The timestamp when this Backup resource was created
- can be converted to and from RFC3339
Corresponds to the JSON property
createTime
142 143 144 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 142 def create_time @create_time end |
#delete_lock_days ⇒ Fixnum
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). This value is inherited from the parent
BackupPlan's retention_policy.backup_delete_lock_days value and may only be
increased (either at creation time or in a subsequent update). This field MUST
be an integer value between 0-90 (inclusive). Default: inherited from
BackupPlan.
Corresponds to the JSON property deleteLockDays
154 155 156 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 154 def delete_lock_days @delete_lock_days end |
#delete_lock_expire_time ⇒ String
Output only. The time at which an existing delete lock will expire for this
backup (calculated from create_time + delete_lock_days).
Corresponds to the JSON property deleteLockExpireTime
160 161 162 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 160 def delete_lock_expire_time @delete_lock_expire_time end |
#description ⇒ String
User specified descriptive string for this Backup.
Corresponds to the JSON property description
165 166 167 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 165 def description @description end |
#encryption_key ⇒ Google::Apis::GkebackupV1::EncryptionKey
Defined a customer managed encryption key that will be used to encrypt Backup
artifacts.
Corresponds to the JSON property encryptionKey
171 172 173 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 171 def encryption_key @encryption_key end |
#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 to ensure that their change
will be applied to the same version.
Corresponds to the JSON property etag
182 183 184 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 182 def etag @etag end |
#labels ⇒ Hash<String,String>
A set of custom labels supplied by user.
Corresponds to the JSON property labels
187 188 189 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 187 def labels @labels end |
#manual ⇒ Boolean Also known as: manual?
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.
Corresponds to the JSON property manual
194 195 196 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 194 def manual @manual end |
#name ⇒ String
Output only. The fully qualified name of the Backup. projects//locations//
backupPlans//backups/
Corresponds to the JSON property name
201 202 203 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 201 def name @name end |
#pod_count ⇒ Fixnum
Output only. The total number of Kubernetes Pods contained in the Backup.
Corresponds to the JSON property podCount
206 207 208 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 206 def pod_count @pod_count end |
#resource_count ⇒ Fixnum
Output only. The total number of Kubernetes resources included in the Backup.
Corresponds to the JSON property resourceCount
211 212 213 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 211 def resource_count @resource_count end |
#retain_days ⇒ Fixnum
The age (in days) after which this Backup will be automatically deleted. If not specified at Backup creation time, this value is inherited from the parent BackupPlan's retention_policy.backup_retain_days value. Once a Backup is created, this value may only be increased. This 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. Default: inherited from BackupPlan. Corresponds to the JSON property
retainDays
221 222 223 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 221 def retain_days @retain_days end |
#retain_expire_time ⇒ String
Output only. The time at which this Backup will be automatically deleted (
calculated from create_time + retain_days).
Corresponds to the JSON property retainExpireTime
227 228 229 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 227 def retain_expire_time @retain_expire_time end |
#selected_applications ⇒ Google::Apis::GkebackupV1::NamespacedNames
A list of namespaced Kubernetes resources.
Corresponds to the JSON property selectedApplications
232 233 234 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 232 def selected_applications @selected_applications end |
#selected_namespaces ⇒ Google::Apis::GkebackupV1::Namespaces
A list of Kubernetes Namespaces
Corresponds to the JSON property selectedNamespaces
237 238 239 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 237 def selected_namespaces @selected_namespaces end |
#size_bytes ⇒ Fixnum
Output only. The total size of the Backup in bytes = config backup size + sum(
volume backup sizes)
Corresponds to the JSON property sizeBytes
243 244 245 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 243 def size_bytes @size_bytes end |
#state ⇒ String
Output only. Current state of the Backup
Corresponds to the JSON property state
248 249 250 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 248 def state @state end |
#state_reason ⇒ String
Output only. Human-readable description of why the backup is in the current
state.
Corresponds to the JSON property stateReason
254 255 256 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 254 def state_reason @state_reason end |
#uid ⇒ String
Output only. [Output Only] Server generated global unique identifier of UUID4
Corresponds to the JSON property uid
260 261 262 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 260 def uid @uid end |
#update_time ⇒ String
Output only. [Output Only] The timestamp when this Backup resource was last
updated - can be converted to and from RFC3339
Corresponds to the JSON property updateTime
267 268 269 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 267 def update_time @update_time end |
#volume_count ⇒ Fixnum
Output only. The total number of volume backups contained in the Backup.
Corresponds to the JSON property volumeCount
272 273 274 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 272 def volume_count @volume_count end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 279 def update!(**args) @all_namespaces = args[:all_namespaces] if args.key?(:all_namespaces) @cluster_metadata = args[:cluster_metadata] if args.key?(:cluster_metadata) @complete_time = args[:complete_time] if args.key?(:complete_time) @config_backup_size_bytes = args[:config_backup_size_bytes] if args.key?(:config_backup_size_bytes) @contains_secrets = args[:contains_secrets] if args.key?(:contains_secrets) @contains_volume_data = args[:contains_volume_data] if args.key?(:contains_volume_data) @create_time = args[:create_time] if args.key?(:create_time) @delete_lock_days = args[:delete_lock_days] if args.key?(:delete_lock_days) @delete_lock_expire_time = args[:delete_lock_expire_time] if args.key?(:delete_lock_expire_time) @description = args[:description] if args.key?(:description) @encryption_key = args[:encryption_key] if args.key?(:encryption_key) @etag = args[:etag] if args.key?(:etag) @labels = args[:labels] if args.key?(:labels) @manual = args[:manual] if args.key?(:manual) @name = args[:name] if args.key?(:name) @pod_count = args[:pod_count] if args.key?(:pod_count) @resource_count = args[:resource_count] if args.key?(:resource_count) @retain_days = args[:retain_days] if args.key?(:retain_days) @retain_expire_time = args[:retain_expire_time] if args.key?(:retain_expire_time) @selected_applications = args[:selected_applications] if args.key?(:selected_applications) @selected_namespaces = args[:selected_namespaces] if args.key?(:selected_namespaces) @size_bytes = args[:size_bytes] if args.key?(:size_bytes) @state = args[:state] if args.key?(:state) @state_reason = args[:state_reason] if args.key?(:state_reason) @uid = args[:uid] if args.key?(:uid) @update_time = args[:update_time] if args.key?(:update_time) @volume_count = args[:volume_count] if args.key?(:volume_count) end |