Reference documentation and code samples for the Google Cloud Run V2 Client class ResourceRequirements.
ResourceRequirements describes the compute resource requirements.
Generated from protobuf message google.cloud.run.v2.ResourceRequirements
Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ limits |
array|Google\Protobuf\Internal\MapField
Only memory and CPU are supported. Note: The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 CPU requires at least 2Gi of memory. The values of the map is string form of the 'quantity' k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go |
↳ cpu_idle |
bool
Determines whether CPU should be throttled or not outside of requests. |
getLimits
Only memory and CPU are supported. Note: The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 CPU requires at least 2Gi of memory. The values of the map is string form of the 'quantity' k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\MapField |
|
setLimits
Only memory and CPU are supported. Note: The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 CPU requires at least 2Gi of memory. The values of the map is string form of the 'quantity' k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go
| Parameter | |
|---|---|
| Name | Description |
var |
array|Google\Protobuf\Internal\MapField
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getCpuIdle
Determines whether CPU should be throttled or not outside of requests.
| Returns | |
|---|---|
| Type | Description |
bool |
|
setCpuIdle
Determines whether CPU should be throttled or not outside of requests.
| Parameter | |
|---|---|
| Name | Description |
var |
bool
|
| Returns | |
|---|---|
| Type | Description |
$this |
|