Class: Google::Apis::GkebackupV1::BackupPlan

Inherits:
Object
  • Object
show all
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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ BackupPlan

Returns a new instance of BackupPlan.



446
447
448
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 446

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#backup_configGoogle::Apis::GkebackupV1::BackupConfig

BackupConfig defines the configuration of Backups created via this BackupPlan. Corresponds to the JSON property backupConfig



366
367
368
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 366

def backup_config
  @backup_config
end

#backup_scheduleGoogle::Apis::GkebackupV1::Schedule

Schedule defines scheduling parameters for automatically creating Backups via this BackupPlan. Corresponds to the JSON property backupSchedule



372
373
374
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 372

def backup_schedule
  @backup_schedule
end

#clusterString

Required. Immutable. The source cluster from which Backups will be created via this BackupPlan. Valid formats: - projects//locations//clusters/* - projects/ /zones//clusters/* Corresponds to the JSON property cluster

Returns:

  • (String)


379
380
381
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 379

def cluster
  @cluster
end

#create_timeString

Output only. The timestamp when this BackupPlan resource was created. Corresponds to the JSON property createTime

Returns:

  • (String)


384
385
386
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 384

def create_time
  @create_time
end

#deactivatedBoolean Also known as: deactivated?

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 Corresponds to the JSON property deactivated

Returns:

  • (Boolean)


393
394
395
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 393

def deactivated
  @deactivated
end

#descriptionString

User specified descriptive string for this BackupPlan. Corresponds to the JSON property description

Returns:

  • (String)


399
400
401
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 399

def description
  @description
end

#etagString

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. Corresponds to the JSON property etag

Returns:

  • (String)


411
412
413
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 411

def etag
  @etag
end

#labelsHash<String,String>

A set of custom labels supplied by user. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


416
417
418
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 416

def labels
  @labels
end

#nameString

Output only. The full name of the BackupPlan resource. Format: projects// locations//backupPlans/* Corresponds to the JSON property name

Returns:

  • (String)


422
423
424
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 422

def name
  @name
end

#protected_pod_countFixnum

Output only. The number of Kubernetes Pods backed up in the last successful Backup created via this BackupPlan. Corresponds to the JSON property protectedPodCount

Returns:

  • (Fixnum)


428
429
430
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 428

def protected_pod_count
  @protected_pod_count
end

#retention_policyGoogle::Apis::GkebackupV1::RetentionPolicy

RetentionPolicy defines a Backup retention policy for a BackupPlan. Corresponds to the JSON property retentionPolicy



433
434
435
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 433

def retention_policy
  @retention_policy
end

#uidString

Output only. Server generated global unique identifier of UUID format. Corresponds to the JSON property uid

Returns:

  • (String)


439
440
441
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 439

def uid
  @uid
end

#update_timeString

Output only. The timestamp when this BackupPlan resource was last updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


444
445
446
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 444

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 451

def update!(**args)
  @backup_config = args[:backup_config] if args.key?(:backup_config)
  @backup_schedule = args[:backup_schedule] if args.key?(:backup_schedule)
  @cluster = args[:cluster] if args.key?(:cluster)
  @create_time = args[:create_time] if args.key?(:create_time)
  @deactivated = args[:deactivated] if args.key?(:deactivated)
  @description = args[:description] if args.key?(:description)
  @etag = args[:etag] if args.key?(:etag)
  @labels = args[:labels] if args.key?(:labels)
  @name = args[:name] if args.key?(:name)
  @protected_pod_count = args[:protected_pod_count] if args.key?(:protected_pod_count)
  @retention_policy = args[:retention_policy] if args.key?(:retention_policy)
  @uid = args[:uid] if args.key?(:uid)
  @update_time = args[:update_time] if args.key?(:update_time)
end