Reference documentation and code samples for the Cloud Run V2 API class Google::Cloud::Run::V2::ServiceScaling.
Scaling settings applied at the service level rather than
at the revision level.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#manual_instance_count
defmanual_instance_count()->::Integer
Returns
(::Integer) — 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.
#manual_instance_count=
defmanual_instance_count=(value)->::Integer
Parameter
value (::Integer) — 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.
Returns
(::Integer) — 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.
#min_instance_count
defmin_instance_count()->::Integer
Returns
(::Integer) — 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.
#min_instance_count=
defmin_instance_count=(value)->::Integer
Parameter
value (::Integer) — 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.
Returns
(::Integer) — 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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Cloud Run V2 API - Class Google::Cloud::Run::V2::ServiceScaling (v0.26.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.26.0 (latest)](/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-ServiceScaling)\n- [0.25.0](/ruby/docs/reference/google-cloud-run-v2/0.25.0/Google-Cloud-Run-V2-ServiceScaling)\n- [0.24.1](/ruby/docs/reference/google-cloud-run-v2/0.24.1/Google-Cloud-Run-V2-ServiceScaling)\n- [0.23.0](/ruby/docs/reference/google-cloud-run-v2/0.23.0/Google-Cloud-Run-V2-ServiceScaling)\n- [0.22.1](/ruby/docs/reference/google-cloud-run-v2/0.22.1/Google-Cloud-Run-V2-ServiceScaling)\n- [0.21.0](/ruby/docs/reference/google-cloud-run-v2/0.21.0/Google-Cloud-Run-V2-ServiceScaling)\n- [0.20.0](/ruby/docs/reference/google-cloud-run-v2/0.20.0/Google-Cloud-Run-V2-ServiceScaling)\n- [0.19.0](/ruby/docs/reference/google-cloud-run-v2/0.19.0/Google-Cloud-Run-V2-ServiceScaling)\n- [0.18.0](/ruby/docs/reference/google-cloud-run-v2/0.18.0/Google-Cloud-Run-V2-ServiceScaling)\n- [0.17.0](/ruby/docs/reference/google-cloud-run-v2/0.17.0/Google-Cloud-Run-V2-ServiceScaling)\n- [0.16.1](/ruby/docs/reference/google-cloud-run-v2/0.16.1/Google-Cloud-Run-V2-ServiceScaling)\n- [0.15.0](/ruby/docs/reference/google-cloud-run-v2/0.15.0/Google-Cloud-Run-V2-ServiceScaling)\n- [0.14.0](/ruby/docs/reference/google-cloud-run-v2/0.14.0/Google-Cloud-Run-V2-ServiceScaling)\n- [0.13.2](/ruby/docs/reference/google-cloud-run-v2/0.13.2/Google-Cloud-Run-V2-ServiceScaling)\n- [0.12.0](/ruby/docs/reference/google-cloud-run-v2/0.12.0/Google-Cloud-Run-V2-ServiceScaling)\n- [0.11.0](/ruby/docs/reference/google-cloud-run-v2/0.11.0/Google-Cloud-Run-V2-ServiceScaling)\n- [0.10.1](/ruby/docs/reference/google-cloud-run-v2/0.10.1/Google-Cloud-Run-V2-ServiceScaling)\n- [0.9.1](/ruby/docs/reference/google-cloud-run-v2/0.9.1/Google-Cloud-Run-V2-ServiceScaling)\n- [0.8.0](/ruby/docs/reference/google-cloud-run-v2/0.8.0/Google-Cloud-Run-V2-ServiceScaling)\n- [0.7.0](/ruby/docs/reference/google-cloud-run-v2/0.7.0/Google-Cloud-Run-V2-ServiceScaling)\n- [0.6.0](/ruby/docs/reference/google-cloud-run-v2/0.6.0/Google-Cloud-Run-V2-ServiceScaling)\n- [0.5.0](/ruby/docs/reference/google-cloud-run-v2/0.5.0/Google-Cloud-Run-V2-ServiceScaling)\n- [0.4.0](/ruby/docs/reference/google-cloud-run-v2/0.4.0/Google-Cloud-Run-V2-ServiceScaling)\n- [0.3.1](/ruby/docs/reference/google-cloud-run-v2/0.3.1/Google-Cloud-Run-V2-ServiceScaling)\n- [0.2.0](/ruby/docs/reference/google-cloud-run-v2/0.2.0/Google-Cloud-Run-V2-ServiceScaling)\n- [0.1.0](/ruby/docs/reference/google-cloud-run-v2/0.1.0/Google-Cloud-Run-V2-ServiceScaling) \nReference documentation and code samples for the Cloud Run V2 API class Google::Cloud::Run::V2::ServiceScaling.\n\nScaling settings applied at the service level rather than\nat the revision level. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #manual_instance_count\n\n def manual_instance_count() -\u003e ::Integer\n\n**Returns**\n\n- (::Integer) --- 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.\n\n### #manual_instance_count=\n\n def manual_instance_count=(value) -\u003e ::Integer\n\n**Parameter**\n\n- **value** (::Integer) --- 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. \n**Returns**\n\n- (::Integer) --- 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.\n\n### #min_instance_count\n\n def min_instance_count() -\u003e ::Integer\n\n**Returns**\n\n- (::Integer) --- 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.\n\n### #min_instance_count=\n\n def min_instance_count=(value) -\u003e ::Integer\n\n**Parameter**\n\n- **value** (::Integer) --- 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. \n**Returns**\n\n- (::Integer) --- 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.\n\n### #scaling_mode\n\n def scaling_mode() -\u003e ::Google::Cloud::Run::V2::ServiceScaling::ScalingMode\n\n**Returns**\n\n- ([::Google::Cloud::Run::V2::ServiceScaling::ScalingMode](./Google-Cloud-Run-V2-ServiceScaling-ScalingMode)) --- Optional. The scaling mode for the service.\n\n### #scaling_mode=\n\n def scaling_mode=(value) -\u003e ::Google::Cloud::Run::V2::ServiceScaling::ScalingMode\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Run::V2::ServiceScaling::ScalingMode](./Google-Cloud-Run-V2-ServiceScaling-ScalingMode)) --- Optional. The scaling mode for the service. \n**Returns**\n\n- ([::Google::Cloud::Run::V2::ServiceScaling::ScalingMode](./Google-Cloud-Run-V2-ServiceScaling-ScalingMode)) --- Optional. The scaling mode for the service."]]