Class: Google::Apis::RunV2::GoogleCloudRunV2ServiceScaling

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

Overview

Scaling settings applied at the service level rather than at the revision level.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRunV2ServiceScaling

Returns a new instance of GoogleCloudRunV2ServiceScaling.



2559
2560
2561
# File 'lib/google/apis/run_v2/classes.rb', line 2559

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

Instance Attribute Details

#manual_instance_countFixnum

Optional. total instance count for the service in manual scaling mode. This number of instances is divided among all revisions with specified traffic based on the percent of traffic they are receiving. Corresponds to the JSON property manualInstanceCount

Returns:

  • (Fixnum)


2538
2539
2540
# File 'lib/google/apis/run_v2/classes.rb', line 2538

def manual_instance_count
  @manual_instance_count
end

#max_instance_countFixnum

Optional. total max instances for the service. This number of instances is divided among all revisions with specified traffic based on the percent of traffic they are receiving. Corresponds to the JSON property maxInstanceCount

Returns:

  • (Fixnum)


2545
2546
2547
# File 'lib/google/apis/run_v2/classes.rb', line 2545

def max_instance_count
  @max_instance_count
end

#min_instance_countFixnum

Optional. total min instances for the service. This number of instances is divided among all revisions with specified traffic based on the percent of traffic they are receiving. Corresponds to the JSON property minInstanceCount

Returns:

  • (Fixnum)


2552
2553
2554
# File 'lib/google/apis/run_v2/classes.rb', line 2552

def min_instance_count
  @min_instance_count
end

#scaling_modeString

Optional. The scaling mode for the service. Corresponds to the JSON property scalingMode

Returns:

  • (String)


2557
2558
2559
# File 'lib/google/apis/run_v2/classes.rb', line 2557

def scaling_mode
  @scaling_mode
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2564
2565
2566
2567
2568
2569
# File 'lib/google/apis/run_v2/classes.rb', line 2564

def update!(**args)
  @manual_instance_count = args[:manual_instance_count] if args.key?(:manual_instance_count)
  @max_instance_count = args[:max_instance_count] if args.key?(:max_instance_count)
  @min_instance_count = args[:min_instance_count] if args.key?(:min_instance_count)
  @scaling_mode = args[:scaling_mode] if args.key?(:scaling_mode)
end