Compute V1 Client - Class AutoscalingPolicyScalingSchedule (1.5.0)

Reference documentation and code samples for the Compute V1 Client class 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.

Generated from protobuf message google.cloud.compute.v1.AutoscalingPolicyScalingSchedule

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ description string

A description of a scaling schedule.

↳ disabled bool

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.

↳ duration_sec int

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.

↳ min_required_replicas int

The minimum number of VM instances that the autoscaler will recommend in time intervals starting according to schedule. This field is required.

↳ 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.

↳ 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: http://en.wikipedia.org/wiki/Tz_database. This field is assigned a default value of ���UTC��� if left empty.

getDescription

A description of a scaling schedule.

Generated from protobuf field optional string description = 422937596;

Returns
TypeDescription
string

hasDescription

clearDescription

setDescription

A description of a scaling schedule.

Generated from protobuf field optional string description = 422937596;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDisabled

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.

Generated from protobuf field optional bool disabled = 270940796;

Returns
TypeDescription
bool

hasDisabled

clearDisabled

setDisabled

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.

Generated from protobuf field optional bool disabled = 270940796;

Parameter
NameDescription
var bool
Returns
TypeDescription
$this

getDurationSec

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.

Generated from protobuf field optional int32 duration_sec = 212356902;

Returns
TypeDescription
int

hasDurationSec

clearDurationSec

setDurationSec

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.

Generated from protobuf field optional int32 duration_sec = 212356902;

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getMinRequiredReplicas

The minimum number of VM instances that the autoscaler will recommend in time intervals starting according to schedule. This field is required.

Generated from protobuf field optional int32 min_required_replicas = 365514414;

Returns
TypeDescription
int

hasMinRequiredReplicas

clearMinRequiredReplicas

setMinRequiredReplicas

The minimum number of VM instances that the autoscaler will recommend in time intervals starting according to schedule. This field is required.

Generated from protobuf field optional int32 min_required_replicas = 365514414;

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getSchedule

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.

Generated from protobuf field optional string schedule = 375820951;

Returns
TypeDescription
string

hasSchedule

clearSchedule

setSchedule

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.

Generated from protobuf field optional string schedule = 375820951;

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getTimeZone

The time zone to use when interpreting the schedule. The value of this field must be a time zone name from the tz database: http://en.wikipedia.org/wiki/Tz_database. This field is assigned a default value of ���UTC��� if left empty.

Generated from protobuf field optional string time_zone = 36848094;

Returns
TypeDescription
string

hasTimeZone

clearTimeZone

setTimeZone

The time zone to use when interpreting the schedule. The value of this field must be a time zone name from the tz database: http://en.wikipedia.org/wiki/Tz_database. This field is assigned a default value of ���UTC��� if left empty.

Generated from protobuf field optional string time_zone = 36848094;

Parameter
NameDescription
var string
Returns
TypeDescription
$this