class Google::Apis::ComputeV1::AutoscalingPolicyScalingSchedule

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.

Attributes

description[RW]

A description of a scaling schedule. Corresponds to the JSON property `description` @return [String]

disabled[RW]

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` @return [Boolean]

disabled?[RW]

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` @return [Boolean]

duration_sec[RW]

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` @return [Fixnum]

min_required_replicas[RW]

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` @return [Fixnum]

schedule[RW]

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` @return [String]

time_zone[RW]

The time zone to use when interpreting the schedule. The value of this field must be a time zone name from the tz database: en.wikipedia.org/wiki/ Tz_database. This field is assigned a default value of “UTC” if left empty. Corresponds to the JSON property `timeZone` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/compute_v1/classes.rb, line 2396
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/compute_v1/classes.rb, line 2401
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