Class: Google::Apis::AlloydbV1alpha::Schedule

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

Overview

A schedule for the autoscaler.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Schedule

Returns a new instance of Schedule.



3651
3652
3653
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 3651

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

Instance Attribute Details

#cron_expressionString

Cron expression for the triggering the schedule. See https://cloud.google.com/ compute/docs/autoscaler/scaling-schedules#cron_expressions for the syntax. Corresponds to the JSON property cronExpression

Returns:

  • (String)


3617
3618
3619
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 3617

def cron_expression
  @cron_expression
end

#descriptionString

Description of the schedule. Corresponds to the JSON property description

Returns:

  • (String)


3622
3623
3624
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 3622

def description
  @description
end

#disabledBoolean Also known as: disabled?

If true, the schedule is disabled. Corresponds to the JSON property disabled

Returns:

  • (Boolean)


3627
3628
3629
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 3627

def disabled
  @disabled
end

#duration_secFixnum

Duration of the schedule. Corresponds to the JSON property durationSec

Returns:

  • (Fixnum)


3633
3634
3635
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 3633

def duration_sec
  @duration_sec
end

#min_node_countFixnum

Minimum number of nodes in while the schedule is active. Corresponds to the JSON property minNodeCount

Returns:

  • (Fixnum)


3638
3639
3640
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 3638

def min_node_count
  @min_node_count
end

#nameString

Name of the schedule. Corresponds to the JSON property name

Returns:

  • (String)


3643
3644
3645
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 3643

def name
  @name
end

#time_zoneString

The location-based IANA time zone for interpreting the schedule's start time. If no time zone is provided, UTC is used by default. Corresponds to the JSON property timeZone

Returns:

  • (String)


3649
3650
3651
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 3649

def time_zone
  @time_zone
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3656
3657
3658
3659
3660
3661
3662
3663
3664
# File 'lib/google/apis/alloydb_v1alpha/classes.rb', line 3656

def update!(**args)
  @cron_expression = args[:cron_expression] if args.key?(:cron_expression)
  @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_node_count = args[:min_node_count] if args.key?(:min_node_count)
  @name = args[:name] if args.key?(:name)
  @time_zone = args[:time_zone] if args.key?(:time_zone)
end