SandboxEngineTemplateService

Updates a SandboxEngineTemplate.

Authorization may require the following permission on the template's parent workspace:

  • actions/enginemanager/sandboxEngineTemplates/UPDATE
patch/v1/{sandboxEngineTemplate.name}

Request

Path parameters

sandboxEngineTemplate.namestring required

Identifier. Resource name. Format is workspaces/*/sandboxEngineTemplates/*.

Query parameters

updateMaskstring required

Required. The list of paths referencing which fields to update. Update mask must be non-empty.

Allowed field paths are: {"display_name", "milli_cpu_request", "milli_cpu_limit", "gpu_resource", "gpu", "memory_bytes_request", "memory_bytes_limit", "storage_bytes", "storage_class_name", "environmental_variables", "yaml_pod_template_spec", "enabled", "max_idle_duration"}. Paths are case sensitive (must match exactly).

To update all allowed fields, specify exactly one path with value "*".

Request body

displayNamestring

Optional. Human-readable name.

milliCpuRequestinteger

Optional. MilliCPU units that will be reserved for the SandboxEngine. SandboxEngine may use more CPU resources up to the milli_cpu_limit. It is recommended to set CPU requests to avoid resource contention. 1000 milliCPU = 1 CPU core.

When unset, milli_cpu_request will be set to milli_cpu_limit.

milliCpuLimitinteger

Optional. Maximum MilliCPU units a SandboxEngine is allowed to use. The SandboxEngine will be throttled to not exceed this limit. It is discouraged to set CPU limits when possible. 1000 milliCPU = 1 CPU core.

gpuResourcestring

Optional. Kubernetes GPU resource name. For example: nvidia.com/gpu or amd.com/gpu. When unset, server will choose a default value.

gpuinteger

Optional. The amount of GPU units requested by this SandboxEngine.

memoryBytesRequeststring int64

Optional. Memory in bytes that will be reserved for the SandboxEngine.

When unset, memory_bytes_request will be set to memory_bytes_limit.

memoryBytesLimitstring int64 required

Required. Max memory in bytes a SandboxEngine is allowed to use. SandboxEngine may fail or be terminated if it exceeds this limit.

storageBytesstring int64

Optional. External ephemeral storage in bytes that will be mounted to the SandboxEngine. When unset, the node disk will be used.

environmentalVariablesobject

Optional. Map of environmental variables that will be set in the SandboxEngine.

yamlPodTemplateSpecstring

When specified, then it is applied for SandboxEngine pod. PodTemplateSpec describes what will be applied on top of a regular SandboxEngine pod before it is created. This template is merged using StrategicMergePatch method (it overrides the default SandboxEngine pod). More info about StrategicMergePatch: https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/

Example YAML value (custom annotation applied on SandboxEngine pod): metadata: annotations: custom-key: custom-value

enabledboolean

Optional. Whether the SandboxEngineTemplate is enabled. Disabled SandboxEngineTemplates cannot be used for creating new SandboxEngines.

maxIdleDurationstring required

Required. Maximum time a SandboxEngine can be idle before it is automatically terminated. An idle SandboxEngine is one with no processes in STATE_RUNNING. A value of 0s means no idle limit.

maxRunningDurationstring required

Required. Maximum time a SandboxEngine can run before it is automatically terminated. Measured from pod start time, regardless of activity. A value of 0s means no running limit.

createTimestring date-time

Output only. Time when the SandboxEngineTemplate was created.

updateTimestring date-time nullable

Output only. Time when the SandboxEngineTemplate was last updated.

creatorstring

Output only. Name of entity that created the SandboxEngineTemplate.

updaterstring

Output only. Name of entity that last updated the SandboxEngineTemplate.

creatorDisplayNamestring

Output only. Human-readable name of entity that created the SandboxEngineTemplate.

updaterDisplayNamestring

Output only. Human-readable name of entity that last updated the SandboxEngineTemplate.

Response

A successful response.

Changes

No recorded changes to this operation across all 1 revision of this API.