Class: Google::Apis::ComputeAlpha::ResourcePolicySnapshotSchedulePolicy

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/compute_alpha/classes.rb,
lib/google/apis/compute_alpha/representations.rb,
lib/google/apis/compute_alpha/representations.rb

Overview

A snapshot schedule policy specifies when and how frequently snapshots are to be created for the target disk. Also specifies how many and how long these scheduled snapshots should be retained.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ResourcePolicySnapshotSchedulePolicy

Returns a new instance of ResourcePolicySnapshotSchedulePolicy.



35864
35865
35866
# File 'lib/google/apis/compute_alpha/classes.rb', line 35864

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

Instance Attribute Details

#retention_policyGoogle::Apis::ComputeAlpha::ResourcePolicySnapshotSchedulePolicyRetentionPolicy

Policy for retention of scheduled snapshots. Corresponds to the JSON property retentionPolicy



35852
35853
35854
# File 'lib/google/apis/compute_alpha/classes.rb', line 35852

def retention_policy
  @retention_policy
end

#scheduleGoogle::Apis::ComputeAlpha::ResourcePolicySnapshotSchedulePolicySchedule

A schedule for disks where the schedueled operations are performed. Corresponds to the JSON property schedule



35857
35858
35859
# File 'lib/google/apis/compute_alpha/classes.rb', line 35857

def schedule
  @schedule
end

#snapshot_propertiesGoogle::Apis::ComputeAlpha::ResourcePolicySnapshotSchedulePolicySnapshotProperties

Specified snapshot properties for scheduled snapshots created by this policy. Corresponds to the JSON property snapshotProperties



35862
35863
35864
# File 'lib/google/apis/compute_alpha/classes.rb', line 35862

def snapshot_properties
  @snapshot_properties
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



35869
35870
35871
35872
35873
# File 'lib/google/apis/compute_alpha/classes.rb', line 35869

def update!(**args)
  @retention_policy = args[:retention_policy] if args.key?(:retention_policy)
  @schedule = args[:schedule] if args.key?(:schedule)
  @snapshot_properties = args[:snapshot_properties] if args.key?(:snapshot_properties)
end