Reference documentation and code samples for the Google Cloud Run V2 Client class ServiceScaling.
Scaling settings applied at the service level rather than
at the revision level.
Generated from protobuf messagegoogle.cloud.run.v2.ServiceScaling
Namespace
Google \ Cloud \ Run \ V2
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ min_instance_count
int
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.
↳ scaling_mode
int
Optional. The scaling mode for the service.
↳ manual_instance_count
int
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.
getMinInstanceCount
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
Type
Description
int
setMinInstanceCount
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.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getScalingMode
Optional. The scaling mode for the service.
Returns
Type
Description
int
setScalingMode
Optional. The scaling mode for the service.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getManualInstanceCount
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
Type
Description
int
hasManualInstanceCount
clearManualInstanceCount
setManualInstanceCount
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.
[[["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-09-04 UTC."],[],[],null,["# Google Cloud Run V2 Client - Class ServiceScaling (1.9.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.9.0 (latest)](/php/docs/reference/cloud-run/latest/V2.ServiceScaling)\n- [1.8.0](/php/docs/reference/cloud-run/1.8.0/V2.ServiceScaling)\n- [1.7.0](/php/docs/reference/cloud-run/1.7.0/V2.ServiceScaling)\n- [1.6.0](/php/docs/reference/cloud-run/1.6.0/V2.ServiceScaling)\n- [1.5.2](/php/docs/reference/cloud-run/1.5.2/V2.ServiceScaling)\n- [1.4.0](/php/docs/reference/cloud-run/1.4.0/V2.ServiceScaling)\n- [1.3.0](/php/docs/reference/cloud-run/1.3.0/V2.ServiceScaling)\n- [1.2.0](/php/docs/reference/cloud-run/1.2.0/V2.ServiceScaling)\n- [1.1.0](/php/docs/reference/cloud-run/1.1.0/V2.ServiceScaling)\n- [1.0.0](/php/docs/reference/cloud-run/1.0.0/V2.ServiceScaling)\n- [0.9.3](/php/docs/reference/cloud-run/0.9.3/V2.ServiceScaling)\n- [0.8.0](/php/docs/reference/cloud-run/0.8.0/V2.ServiceScaling)\n- [0.7.2](/php/docs/reference/cloud-run/0.7.2/V2.ServiceScaling)\n- [0.6.0](/php/docs/reference/cloud-run/0.6.0/V2.ServiceScaling)\n- [0.5.2](/php/docs/reference/cloud-run/0.5.2/V2.ServiceScaling)\n- [0.4.0](/php/docs/reference/cloud-run/0.4.0/V2.ServiceScaling)\n- [0.3.4](/php/docs/reference/cloud-run/0.3.4/V2.ServiceScaling) \nReference documentation and code samples for the Google Cloud Run V2 Client class ServiceScaling.\n\nScaling settings applied at the service level rather than\nat the revision level.\n\nGenerated from protobuf message `google.cloud.run.v2.ServiceScaling`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Run \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getMinInstanceCount\n\nOptional. total min instances for the service. This number of instances is\ndivided among all revisions with specified traffic based on the percent\nof traffic they are receiving.\n\n### setMinInstanceCount\n\nOptional. total min instances for the service. This number of instances is\ndivided among all revisions with specified traffic based on the percent\nof traffic they are receiving.\n\n### getScalingMode\n\nOptional. The scaling mode for the service.\n\n### setScalingMode\n\nOptional. The scaling mode for the service.\n\n### getManualInstanceCount\n\nOptional. total instance count for the service in manual scaling mode. This\nnumber of instances is divided among all revisions with specified traffic\nbased on the percent of traffic they are receiving.\n\n### hasManualInstanceCount\n\n### clearManualInstanceCount\n\n### setManualInstanceCount\n\nOptional. total instance count for the service in manual scaling mode. This\nnumber of instances is divided among all revisions with specified traffic\nbased on the percent of traffic they are receiving."]]