Class: Google::Apis::ComputeAlpha::AutoscalingPolicyScalingSchedule
- Inherits:
-
Object
- Object
- Google::Apis::ComputeAlpha::AutoscalingPolicyScalingSchedule
- 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
Scaling based on user-defined schedule. The message describes a single scaling schedule. A scaling schedule changes the minimum number of VM instances an autoscaler can recommend, which can trigger scaling out.
Instance Attribute Summary collapse
-
#description ⇒ String
A description of a scaling schedule.
-
#disabled ⇒ Boolean
(also: #disabled?)
A boolean value that specifies whether a scaling schedule can influence autoscaler recommendations.
-
#duration_sec ⇒ Fixnum
The duration of time intervals, in seconds, for which this scaling schedule is to run.
-
#min_required_replicas ⇒ Fixnum
The minimum number of VM instances that the autoscaler will recommend in time intervals starting according to schedule.
-
#schedule ⇒ String
The start timestamps of time intervals when this scaling schedule is to provide a scaling signal.
-
#time_zone ⇒ String
The time zone to use when interpreting the schedule.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AutoscalingPolicyScalingSchedule
constructor
A new instance of AutoscalingPolicyScalingSchedule.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ AutoscalingPolicyScalingSchedule
Returns a new instance of AutoscalingPolicyScalingSchedule.
3786 3787 3788 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 3786 def initialize(**args) update!(**args) end |
Instance Attribute Details
#description ⇒ String
A description of a scaling schedule.
Corresponds to the JSON property description
3742 3743 3744 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 3742 def description @description end |
#disabled ⇒ Boolean Also known as: disabled?
A boolean value that specifies whether a scaling schedule can influence
autoscaler recommendations. If set to true, then a scaling schedule has
no effect. This field is optional, and its value is false by default.
Corresponds to the JSON property disabled
3749 3750 3751 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 3749 def disabled @disabled end |
#duration_sec ⇒ Fixnum
The duration of time intervals, in seconds, for which this
scaling schedule is to run. The minimum allowed value is 300.
This field is required.
Corresponds to the JSON property durationSec
3757 3758 3759 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 3757 def duration_sec @duration_sec end |
#min_required_replicas ⇒ Fixnum
The minimum number of VM instances that the autoscaler will
recommend in time intervals starting according to schedule. This field is
required.
Corresponds to the JSON property minRequiredReplicas
3764 3765 3766 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 3764 def min_required_replicas @min_required_replicas end |
#schedule ⇒ String
The start timestamps of time intervals when this scaling
schedule is to provide a scaling signal. This field uses the extended
cron format (with an optional year field). The expression can describe a
single timestamp if the optional year is set, in which case the scaling
schedule runs once. The schedule is interpreted with respect to
time_zone. This field is required. Note: These timestamps only describe
when autoscaler starts providing the scaling signal. The VMs
need additional time to become serving.
Corresponds to the JSON property schedule
3776 3777 3778 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 3776 def schedule @schedule end |
#time_zone ⇒ String
The time zone to use when interpreting the schedule.
The value of this field must be a time zone name from the tz database:
https://en.wikipedia.org/wiki/Tz_database. This field is assigned a
default value of "UTC" if left empty.
Corresponds to the JSON property timeZone
3784 3785 3786 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 3784 def time_zone @time_zone end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3791 3792 3793 3794 3795 3796 3797 3798 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 3791 def update!(**args) @description = args[:description] if args.key?(:description) @disabled = args[:disabled] if args.key?(:disabled) @duration_sec = args[:duration_sec] if args.key?(:duration_sec) @min_required_replicas = args[:min_required_replicas] if args.key?(:min_required_replicas) @schedule = args[:schedule] if args.key?(:schedule) @time_zone = args[:time_zone] if args.key?(:time_zone) end |