public sealed class ResourceRequirements : IMessage<ResourceRequirements>, IEquatable<ResourceRequirements>, IDeepCloneable<ResourceRequirements>, IBufferMessage, IMessage
Reference documentation and code samples for the Cloud Run Admin v2 API class ResourceRequirements.
ResourceRequirements describes the compute resource requirements.
Implements
IMessageResourceRequirements, IEquatableResourceRequirements, IDeepCloneableResourceRequirements, IBufferMessage, IMessageNamespace
Google.Cloud.Run.V2Assembly
Google.Cloud.Run.V2.dll
Constructors
ResourceRequirements()
public ResourceRequirements()
ResourceRequirements(ResourceRequirements)
public ResourceRequirements(ResourceRequirements other)
Parameter | |
---|---|
Name | Description |
other | ResourceRequirements |
Properties
CpuIdle
public bool CpuIdle { get; set; }
Determines whether CPU is only allocated during requests (true by default). However, if ResourceRequirements is set, the caller must explicitly set this field to true to preserve the default behavior.
Property Value | |
---|---|
Type | Description |
bool |
Limits
public MapField<string, string> Limits { get; }
Only memory
and cpu
keys in the map are supported.
<p>Notes:
- The only supported values for CPU are '1', '2', '4', and '8'. Setting 4
CPU requires at least 2Gi of memory. For more information, go to
https://cloud.google.com/run/docs/configuring/cpu.
- For supported 'memory' values and syntax, go to https://cloud.google.com/run/docs/configuring/memory-limits
Property Value | |
---|---|
Type | Description |
MapFieldstringstring |
StartupCpuBoost
public bool StartupCpuBoost { get; set; }
Determines whether CPU should be boosted on startup of a new container instance above the requested CPU threshold, this can help reduce cold-start latency.
Property Value | |
---|---|
Type | Description |
bool |