> This page is for Self-Hosted, version v3.0 (default).
> For other versions, use one of these documentation indexes:
> - v3.0 (default): https://docs.nvidia.com/run-ai/self-hosted/v3.0/llms.txt
> - v2.26: https://docs.nvidia.com/run-ai/self-hosted/v2.26/llms.txt
> - v2.25: https://docs.nvidia.com/run-ai/self-hosted/v2.25/llms.txt
> - v2.24: https://docs.nvidia.com/run-ai/self-hosted/v2.24/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/run-ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/run-ai/_mcp/server.

# Update a training template by ID. [Experimental]

PUT http://localhost:8080/api/v1/workload-templates/trainings/{templateId}
Content-Type: application/json

Update a training template by ID.

Reference: https://docs.nvidia.com/run-ai/self-hosted/reference/rest-api/endpoints/workloads/workload-templates/update-training-template

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication

## Request

### Path parameters

- `templateId` (string, required) — The Universally Unique Identifier (UUID) of the template.

### Body (application/json)

This endpoint expects a TrainingTemplateUpdateRequest.

- `meta` (TemplateUpdateMetaFields, required)
- `spec` (TrainingTemplateSpec, optional)

## Response

### 200

Executed successfully.

- `meta` (TemplateMetaFields, required)
- `spec` (TrainingTemplateSpec, optional)
- `runnable` (RunnableInfo, optional) — whether the template can be submitted, as is
- `combinedSpec` (TrainingTemplateSpec, optional)

## Errors

### 400 Bad Request Error

Bad request.

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

### 401 Unauthorized Error

Unauthorized

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

### 403 Forbidden Error

Forbidden

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

### 404 Not Found Error

The specified resource was not found

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

### 500 Internal Server Error

unexpected error

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

### 503 Service Unavailable Error

unexpected error

- `code` (integer, required)
- `message` (string, required)
- `details` (string, optional)

## Types

### TemplateUpdateMetaFields

- `name` (string, required) — The name of the template.
- `description` (string, optional) — A description of the template.

### TrainingTemplateSpec

- `annotations` (list of Annotation, optional) — Set of annotations to populate into the container running the workload.
- `args` (string, optional) — Arguments to the command that the container running the workload executes.
- `autoDeletionTimeAfterCompletionSeconds` (long, optional) — Specifies the duration after which a finished workload (completed or failed) will be automatically deleted. The default is 30 days. Log retention is managed separately.
- `backoffLimit` (long, optional) — Specifies the number of retries before marking a workload as failed (not applicable to Inference workloads). The default value is 6.
- `category` (string, optional) — Specify the workload category assigned to the workload. Categories are used to classify and monitor different types of workloads within the NVIDIA Run:ai platform.
- `command` (string, optional) — A command to the server as the entry point of the container running the workload.
- `completions` (integer, optional) — Used with Hyperparameter Optimization. Specifies the number of successful pods the job should reach to be completed. The Job will be marked as successful once the specified amount of pods has been reached (applicable to standard training only).
- `compute` (TrainingTemplateSpecCompute, optional, nullable)
- `createHomeDir` (boolean, optional) — When set to `true`, creates a home directory for the container.
- `environmentVariables` (list of EnvironmentVariable, optional) — Set of environment variables to populate into the container running the workload.
- `exposedUrls` (list of ExposedUrl, optional) — Set of container ports that the workload exposes via URLs.
- `image` (string, optional) — Docker image name. For more information, see [Images](https://kubernetes.io/docs/concepts/containers/images). The image name is mandatory for creating a workload.
- `imagePullPolicy` (enum, optional) — Image pull policy. Defaults to `Always` if `:latest` tag is specified, otherwise it is `IfNotPresent`.
  - Allowed values: `Always`, `Never`, `IfNotPresent`
- `labels` (list of Label, optional) — Set of labels to populate into the container running the workload.
- `nodeAffinityRequired` (NodeAffinityRequired, optional) — If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.
- `nodePools` (list of string, optional) — A prioritized list of node pools for the scheduler to run the workload on. The scheduler will always try to use the first node pool before moving to the next one if the first is not available.
- `nodeType` (string, optional) — Deprecated: use a workload policy node selector to target node types instead. Nodes (machines), or a group of nodes on which the workload will run. To use this feature, your Administrator will need to label nodes. For more information, see [Group Nodes](https://docs.run.ai/latest/admin/researcher-setup/limit-to-node-group). When using this flag with with Project-based affinity, it refines the list of allowable node groups set in the Project. For more information, see [Projects](https://docshub.run.ai/guides/platform-management/aiinitiatives/organization/projects).
- `parallelism` (integer, optional) — Used with Hyperparameter Optimization. Specifies the maximum number of pods the workload should run at any given time (applicable to standard training only).
- `podAffinity` (PodAffinity, optional) — Pod affinity scheduling rules (e.g. co-locate this workload in the same node, zone, etc. as some other workloads).
- `ports` (list of Port, optional) — Set of container ports that the workload exposes.
- `preemptibility` (enum, optional) — Specifies whether the workload can be preempted by higher-priority workloads. Valid values are preemptible, semi-preemptible and non-preemptible. If explicitly set, this value takes precedence. If not set, the system derives the preemptibility from the priorityClassName field, ensuring backward compatibility. Each workload type has a default preemptibility. To view the default preemptibility for each workload type, use the GET /workload-types endpoint.
  - Allowed values: `preemptible`, `semi-preemptible`, `non-preemptible`
- `priorityClass` (string, optional) — Specifies the priority class for the workload, which determines its scheduling behavior. Valid values are: very-low, low, medium-low, medium, medium-high, high, and very-high. Each workload type has a default priority. To view the default priority for each workload type, use the GET /workload-types endpoint. Once you change the priority from the default value defined for that workload type, the preemptibility field is not automatically updated. Make sure to set the desired preemptibility value.
- `probes` (Probes, optional) — Probes are used to determine if the container is healthy and ready to accept traffic.
- `relatedUrls` (list of RelatedUrl, optional) — Set of URLs that are related to the workload.
- `restartPolicy` (enum, optional) — Specify the restart policy of the workload pods. Default is empty, which is determine by the framework default. The `Always` value is deprecated; use `OnFailure` or `Never` instead.
  - Allowed values: `Always`, `Never`, `OnFailure`
- `security` (TrainingTemplateSpecSecurity, optional, nullable)
- `stdin` (boolean, optional) — Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF
- `storage` (TrainingTemplateSpecStorage, optional, nullable)
- `terminateAfterPreemption` (boolean, optional) — Indicates if the job should be terminated by the system after it has been preempted.
- `terminationGracePeriodSeconds` (long, optional) — Duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down).
- `tolerations` (list of Toleration, optional) — Set of tolerations to apply to the workload.
- `tty` (boolean, optional) — Whether this container should allocate a TTY for itself, also requires 'stdin' to be true.
- `workingDir` (string, optional) — Container's working directory. If not specified, the container runtime default will be used. This may be configured in the container image.

### TemplateMetaFields

- `id` (string, required) — A unique ID of the template.
- `name` (string, required) — The name of the template.
- `workloadType` (enum, required) — the type of workload
  - Allowed values: `Workspace`, `Training`, `Distributed`, `Inference`, `DistributedInference`
- `scopeType` (enum, required)
  - Allowed values: `system`, `tenant`, `cluster`, `department`, `project`
- `scopeId` (string, required) — The id of the cluster, department or project, depending on the scope type.
- `createdBy` (string, required) — The user who created the template
- `createdAt` (datetime, required) — The creation time of the template.
- `description` (string, optional) — A description of the template.
- `clusterId` (string, optional) — The id of the cluster.
- `departmentId` (string, optional) — The id of the department.
- `projectId` (integer, optional) — The id of the project.
- `updatedBy` (string, optional, nullable) — The user who recently updated the template
- `updatedAt` (datetime, optional, nullable) — The time of the recent update.

### RunnableInfo

whether the template can be submitted, as is

- `isRunnable` (boolean, optional) — indication if the template is runnable, as is
- `issue` (string, optional, nullable) — if the template is non runnable, specify a reason

### Annotation

Annotation details to be populated into the container.

- `name` (string, optional, nullable) — The name of the annotation (mandatory)
- `value` (string, optional, nullable) — The value of the annotation.
- `exclude` (boolean, optional, nullable, default: false) — Use 'true' in case the annotation is defined in defaults of the policy, and you wish to exclude it from the workload.

### TrainingTemplateSpecCompute

- `cpuCoreLimit` (double, optional) — Limitations on the number of CPUs consumed by the workload (0.5, 1, .etc). The system guarantees that this workload will not be able to consume more than this amount of CPUs.
- `cpuCoreRequest` (double, optional) — CPU units to allocate for the created workload (0.5, 1, .etc). The workload will receive at least this amount of CPU. Note that the workload will not be scheduled unless the system can guarantee this amount of CPUs to the workload.
- `cpuMemoryLimit` (string, optional) — Limitations on the CPU memory to allocate for this workload (1G, 20M, .etc). The system guarantees that this workload will not be able to consume more than this amount of memory. The workload will receive an error when trying to allocate more memory than this limit.
- `cpuMemoryRequest` (string, optional) — The amount of CPU memory to allocate for this workload (1G, 20M, .etc). The workload will receive at least this amount of memory. Note that the workload will not be scheduled unless the system can guarantee this amount of memory to the workload
- `extendedResources` (list of ExtendedResource, optional) — Extended resources and their quantity.
- `gpuDevicesRequest` (integer, optional) — Requested number of GPU devices. Currently if more than one device is requested, it is not possible to provide values for gpuMemory or gpuPortion.
- `gpuMemoryLimit` (string, optional) — Limitation on the memory consumed by the workload, per GPU device. The system guarantees The gpuMemoryLimit must be no less than gpuMemoryRequest.
- `gpuMemoryRequest` (string, optional) — Required if and only if gpuRequestType is memory. States the GPU memory to allocate for the created workload, per GPU device. Note that the workload will not be scheduled unless the system can guarantee this amount of GPU memory to the workload.
- `gpuPortionLimit` (double, optional) — Limitations on the portion consumed by the workload, per GPU device. The system guarantees The gpuPotionLimit must be no less than the gpuPortionRequest.
- `gpuPortionRequest` (double, optional) — Required if and only if gpuRequestType is portion. States the portion of the GPU to allocate for the created workload, per GPU device, between 0 and 1. The default is no allocated GPUs.
- `gpuRequestType` (enum, optional) — Sets the unit type for GPU resources requests. Stated in terms of portion or memory. Sets the unit type for other GPU request fields. If `gpuDevicesRequest > 1`, only `portion` is supported. If `gpuDeviceRequest = 1`, the request type can be stated as `portion` or `memory`.
  - Allowed values: `portion`, `memory`
- `largeShmRequest` (boolean, optional) — A large /dev/shm device to mount into a container running the created workload. An shm is a shared file system mounted on RAM.

### EnvironmentVariable

Details of an environment variable which is populated into the container.

- `name` (string, optional, nullable) — The name of the environment variable. (mandatory)
- `value` (string, optional, nullable) — The value of the environment variable. (mutually exclusive with secret, userCredential, configMap and podFieldRef)
- `secret` (EnvironmentVariableSecret, optional) — Details of the secret and key use to populate the environment variable
- `configMap` (EnvironmentVariableConfigMap, optional) — Details of the configMap and key use to populate the environment variable
- `podFieldRef` (EnvironmentVariablePodFieldReference, optional) — Details of the field-reference and key use to populate the environment variable
- `userCredential` (EnvironmentVariableUserCredential, optional) — Defines a reference to a user-created credential and a specific key within that credential whose value will populate the environment variable. User credentials can only be accessed by the user who created them.
- `exclude` (boolean, optional, nullable) — Use 'true' in case the environment variable is defined in defaults of the policy, and you wish to exclude it from the workload.
- `description` (string, optional, nullable) — Description of the environment variable.

### ExposedUrl

A URL for accessing the workload.

- `container` (integer, optional, nullable) — The port that the container running the workload exposes. (mandatory)
- `url` (string, optional) — The URL for connecting to the container port. If not specified, the URL will be auto-generated by the system.
- `authorizationType` (enum, optional) — Specifies who can access the connection URL: - `authenticatedUsers`: Any authenticated user or service account can access the URL; the authorizedUsers and authorizedGroups fields are ignored. - `authorizedUsers`: Only users listed in the authorizedUsers field are allowed to access the URL; the authorizedGroups field is ignored. - `authorizedGroups`: Only members of user groups listed in the authorizedGroups field are allowed to access the URL; the authorizedUsers field is ignored. If not specified, authorization is determined by whether authorizedUsers or authorizedGroups is present. If both fields are set, this results in an error. If neither is set, any authenticatedUser can access.
  - Allowed values: `authenticatedUsers`, `authorizedUsers`, `authorizedGroups`
- `authorizedUsers` (list of string, optional) — List of users or service accounts that are allowed to access the URL. Note that authorizedUsers and authorizedGroups are mutually exclusive.
- `authorizedGroups` (list of string, optional) — List of groups that are allowed to access the URL. Note that authorizedUsers and authorizedGroups are mutually exclusive.
- `toolType` (string, optional, nullable) — The tool type that runs on this container port.
- `toolName` (string, optional, nullable) — A name describing the tool that runs on this url.
- `name` (string, optional, nullable) — Unique name to identify the instance. primarily used for policy locked rules.
- `exclude` (boolean, optional, nullable) — Use 'true' in case the instance is defined in defaults of the policy, and you wish to exclude it from the workload.

### Label

Label details to be populated into the container.

- `name` (string, optional, nullable) — The name of the label (mandatory)
- `value` (string, optional, nullable) — The value of the label.
- `exclude` (boolean, optional, nullable) — Use 'true' in case the label is defined in defaults of the policy, and you wish to exclude it from the workload.

### NodeAffinityRequired

If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.

- `nodeSelectorTerms` (list of NodeSelectorTerm, optional) — A list of node selector terms. The terms are ORed.

### PodAffinity

Pod affinity scheduling rules (e.g. co-locate this workload in the same node, zone, etc. as some other workloads).

- `type` (enum, optional) — The affinity type, required or preferred. (mandatory)
  - Allowed values: `Required`, `Preferred`
- `key` (string, optional, nullable) — The label key to use. (mandatory)

### Port

A port for accessing the workload.

- `container` (integer, optional, nullable) — The port that the container running the workload exposes. (mandatory)
- `serviceType` (enum, optional) — The service type of the port (mandatory).
  - Allowed values: `LoadBalancer`, `NodePort`, `ClusterIP`
- `external` (integer, optional, nullable) — The external port which allows a connection to the container port. If not specified, the port will be auto-generated by the system..
- `toolType` (string, optional, nullable) — The tool type that runs on this port.
- `toolName` (string, optional, nullable) — A name describing the tool that runs on this port.
- `name` (string, optional, nullable) — Unique name to identify the instance. primarily used for policy locked rules.
- `exclude` (boolean, optional, nullable, default: false) — Use 'true' in case the item is defined in defaults of the policy, and you wish to exclude it from the workload.

### Probes

Probes are used to determine if the container is healthy and ready to accept traffic.

- `readiness` (Probe, optional)

### RelatedUrl

A URL that is related to the workload. For example, a URL to an external server providing statistics or logging about the workload.

- `url` (string, optional, nullable) — The URL for connecting an external service related to the workload. (mandatory)
- `type` (string, optional, nullable) — The type of service that the url provides. For example, wandb (Weights & Biases). (mandatory)
- `name` (string, optional, nullable) — Unique name to identify the instance. primarily used for policy locked rules.
- `exclude` (boolean, optional, nullable, default: false) — Use 'true' in case the item is defined in defaults of the policy, and you wish to exclude it from the workload.

### TrainingTemplateSpecSecurity

- `allowPrivilegeEscalation` (boolean, optional) — Allow the container running the workload and all launched processes to gain additional privileges after the workload starts. For more information consult the [User Identity in Container guide](/run-ai/self-hosted/documentation/installation-and-configuration/configuration/security/user-identity-in-containers)
- `capabilities` (list of enum, optional) — Add POSIX capabilities to running containers. Defaults to the default set of capabilities granted by the container runtime.
  - Allowed values: `AUDIT_CONTROL`, `AUDIT_READ`, `AUDIT_WRITE`, `BLOCK_SUSPEND`, `CHOWN`, `DAC_OVERRIDE`, `DAC_READ_SEARCH`, `FOWNER`, `FSETID`, `IPC_LOCK`, `IPC_OWNER`, `KILL`, `LEASE`, `LINUX_IMMUTABLE`, `MAC_ADMIN`, `MAC_OVERRIDE`, `MKNOD`, `NET_ADMIN`, `NET_BIND_SERVICE`, `NET_BROADCAST`, `NET_RAW`, `SETGID`, `SETFCAP`, `SETPCAP`, `SETUID`, `SYS_ADMIN`, `SYS_BOOT`, `SYS_CHROOT`, `SYS_MODULE`, `SYS_NICE`, `SYS_PACCT`, `SYS_PTRACE`, `SYS_RAWIO`, `SYS_RESOURCE`, `SYS_TIME`, `SYS_TTY_CONFIG`, `SYSLOG`, `WAKE_ALARM`
- `hostIpc` (boolean, optional) — Whether to enable host IPC. Defaults to false.
- `hostNetwork` (boolean, optional) — Whether to enable host networking. Default to false.
- `readOnlyRootFilesystem` (boolean, optional) — If true, mounts the container's root filesystem as read-only.
- `runAsGid` (long, optional) — The group id to run the entrypoint of the container which executes the workspace. Default to the value specified in the environment asset `runAsGid` field (optional). Use only when the source uid/gid of the environment asset is not `fromTheImage`, and `overrideUidGidInWorkspace` is enabled.
- `runAsNonRoot` (boolean, optional) — Force the container to run as a non-root user.
- `runAsUid` (long, optional) — The user id to run the entrypoint of the container which executes the workspace. Default to the value specified in the environment asset `runAsUid` field (optional). Use only when the source uid/gid of the environment asset is not `fromTheImage`, and `overrideUidGidInWorkspace` is enabled.
- `seccompProfileType` (enum, optional) — Indicates which kind of seccomp profile will be applied to the container. The options are a. `RuntimeDefault` - the container runtime default profile should be used. b. `Unconfined` - no profile should be applied. c. `Localhost` is not yet supported by Run:ai.
  - Allowed values: `RuntimeDefault`, `Unconfined`, `Localhost`
- `supplementalGroups` (string, optional) — Comma separated list of groups that the user running the container belongs to, in addition to the group indicated by runAsGid. Use only when the source uid/gid of the environment asset is not `fromTheImage`, and `overrideUidGidInWorkspace` is enabled. Using an empty string implies reverting the supplementary groups of the image.
- `uidGidSource` (enum, optional) — Indicate the way to determine the user and group ids of the container. The options are a. `fromTheImage` - user and group ids are determined by the docker image that the container runs. this is the default option. b. `custom` - user and group ids can be specified in the environment asset and/or the workload creation request. c. `idpToken` - user and group IDs are automatically taken from the identity provider (IdP) token (available only in SSO-enabled installations). For more information, see [User Identity](/run-ai/self-hosted/documentation/installation-and-configuration/configuration/security/user-identity-in-containers).
  - Allowed values: `fromTheImage`, `fromIdpToken`, `custom`

### TrainingTemplateSpecStorage

- `configMapVolume` (list of ConfigMapInstance, optional) — Set of config map volumes to use in the workload
- `dataVolume` (list of DataVolumeInstance, optional) — Set of data volumes to use in the workload.
- `emptyDirVolume` (list of EmptyDirInstance, optional) — A list of emptyDir volumes to mount in the workload.
- `git` (list of GitInstance, optional) — Set of git repositories to use in the workload.
- `hostPath` (list of HostPathInstance, optional) — Set of host paths to use in the workload.
- `nfs` (list of NfsInstance, optional) — Set of nfs volumes to use in the workload.
- `pvc` (list of PvcInstance, optional) — Set of pvc persistent volume claims to use in the workload.
- `s3` (list of S3Instance, optional) — Set of s3 buckets to use in the workload.
- `secretVolume` (list of SecretInstance, optional) — Set of secret volumes to use in the workload

### Toleration

Toleration details.

- `name` (string, optional, nullable) — The name of the toleration.
- `operator` (enum, optional) — A key's relationship to the value. Equal uses key and value. Exists is equivalent to wildcard for value, so that a workload can tolerate all taints of a particular category. (mandatory)
  - Allowed values: `Equal`, `Exists`
- `key` (string, optional, nullable) — The taint key that the toleration applies to. (mandatory)
- `value` (string, optional, nullable) — The taint value the toleration matches to. Mandatory if operator is Exists, forbidden otherwise.
- `effect` (enum, optional) — The taint effect to match. (mandatory)
  - Allowed values: `NoSchedule`, `NoExecute`, `PreferNoSchedule`, `Any`
- `seconds` (integer, optional, nullable) — The period of time the toleration tolerates the taint. Valid only if effect is NoExecute. taint.
- `exclude` (boolean, optional, nullable) — Use 'true' in case the label is defined in defaults of the policy, and you wish to exclude it from the workload.

### ExtendedResource

Quantity of an extended resource.

- `resource` (string, optional, nullable) — The name of the extended resource (mandatory)
- `quantity` (string, optional, nullable) — The requested quantity for the resource.
- `exclude` (boolean, optional, nullable) — Use 'true' in case the extended resource is defined in defaults of the policy, and you wish to exclude it from the workload.

### EnvironmentVariableSecret

Details of the secret and key use to populate the environment variable

- `name` (string, optional, nullable) — The name of the secret resource. (mandatory)
- `key` (string, optional, nullable) — The key in the secret resource. (mandatory)

### EnvironmentVariableConfigMap

Details of the configMap and key use to populate the environment variable

- `name` (string, optional, nullable) — The name of the config-map resource. (mandatory)
- `key` (string, optional, nullable) — The key in the config-map resource. (mandatory)

### EnvironmentVariablePodFieldReference

Details of the field-reference and key use to populate the environment variable

- `path` (string, optional, nullable) — The field path resource. (mandatory)

### EnvironmentVariableUserCredential

Defines a reference to a user-created credential and a specific key within that credential whose value will populate the environment variable. User credentials can only be accessed by the user who created them.

- `name` (string, optional, nullable) — The name of the user credential. (mandatory)
- `key` (string, optional, nullable) — The key in the user credential resource. (mandatory)

### NodeSelectorTerm

A null or empty node selector term matches no objects. The requirements of them are ANDed.

- `matchExpressions` (list of MatchExpression, optional) — A list of node selector requirements by node's labels.

### Probe

- `initialDelaySeconds` (integer, optional, nullable) — Number of seconds after the container has started before liveness or readiness probes are initiated.
- `periodSeconds` (integer, optional, nullable) — How often (in seconds) to perform the probe.
- `timeoutSeconds` (integer, optional, nullable) — Number of seconds after which the probe times out.
- `successThreshold` (integer, optional, nullable) — Minimum consecutive successes for the probe to be considered successful after having failed.
- `failureThreshold` (integer, optional, nullable) — When a probe fails, the number of times to try before giving up.
- `handler` (ProbeHandler, optional) — The action taken to determine the health of the container. (mandatory)

### ConfigMapInstance

- `configMap` (string, optional, nullable) — The name of the ConfigMap resource. (mandatory)
- `defaultMode` (string, optional) — File permission mode in octal string format. This value must be a 4-digit octal number, representing the default file mode when mounting a Secret or ConfigMap as a volume.
- `exclude` (boolean, optional, nullable, default: false) — Use 'true' in case the item is defined in defaults of the policy, and you wish to exclude it from the workload.
- `mountPath` (string, optional, nullable) — Local path within the workload to which the ConfigMap will be mapped to. (mandatory)
- `name` (string, optional, nullable) — unique name to identify the instance. primarily used for policy locked rules.
- `subPath` (string, optional, nullable) — Path within the volume from which the container's volume should be mounted.

### DataVolumeInstance

- `exclude` (boolean, optional, nullable, default: false) — Use 'true' in case the item is defined in defaults of the policy, and you wish to exclude it from the workload.
- `id` (string, optional, nullable) — The unique identifier of the data volume. (mandatory)
- `mountPath` (string, optional, nullable) — The path where the data volume will be mounted. (mandatory)

### EmptyDirInstance

- `exclude` (boolean, optional, nullable, default: false) — Use 'true' in case the item is defined in defaults of the policy, and you wish to exclude it from the workload.
- `medium` (string, optional, nullable) — The type of storage medium for the volume. Use "Memory" for memory-backed storage, or leave empty for disk-backed storage.
- `name` (string, optional, nullable) — unique name to identify the instance. primarily used for policy locked rules.
- `path` (string, optional, nullable) — Local path within the workload to which the EmptyDir volume will be mapped. (mandatory)
- `sizeLimit` (string, optional, nullable) — The total amount of local storage or memory required for the emptyDir volume. Specify using Kubernetes quantity format (e.g., 1G, 500Mi).

### GitInstance

- `branch` (string, optional, nullable) — Specific branch to synchronize the repository from.
- `exclude` (boolean, optional, nullable, default: false) — Use 'true' in case the item is defined in defaults of the policy, and you wish to exclude it from the workload.
- `name` (string, optional, nullable) — unique name to identify the instance. primarily used for policy locked rules.
- `passwordSecret` (string, optional, nullable) — Secret containing the credentials of the repository (needed for non public repository which requires authentication). (deprecated)
- `path` (string, optional, nullable) — Local path within the workload to which the Git repository will be mapped (mandatory).
- `repository` (string, optional, nullable) — URL to a remote Git repository. The content of this repository will be mapped to the container running the workload. (mandatory)
- `revision` (string, optional, nullable) — Specific revision to synchronize the repository from.
- `secretKeyOfPassword` (string, optional, nullable) — The key to use for loading the password from the secret. The default is `Password`. (deprecated)
- `secretKeyOfUser` (string, optional, nullable) — The key to use for loading the user name from the secret. The default is `User`. (deprecated)
- `secretRef` (GitSecretRef, optional)

### HostPathInstance

- `exclude` (boolean, optional, nullable, default: false) — Use 'true' in case the item is defined in defaults of the policy, and you wish to exclude it from the workload.
- `mountPath` (string, optional, nullable) — The path that the host volume will be mounted to when in use. (mandatory)
- `mountPropagation` (enum, optional) — Share this volumes mount with other containers. If set to HostToContainer, this volume mount will receive all subsequent mounts that are mounted to this volume or any of its subdirectories. In case of multiple hostPath entries, this field should have the same value for all of them.
  - Allowed values: `None`, `HostToContainer`
- `name` (string, optional, nullable) — unique name to identify the instance. primarily used for policy locked rules.
- `path` (string, optional, nullable) — Local path within the controller to which the host volume will be mapped. (mandatory)
- `readOnly` (boolean, optional, nullable, default: true) — Force the volume to be mounted with read-only permissions. Defaults to false.

### NfsInstance

- `exclude` (boolean, optional, nullable, default: false) — Use 'true' in case the item is defined in defaults of the policy, and you wish to exclude it from the workload.
- `mountPath` (string, optional, nullable) — The path that the NFS volume will be mounted to when in use. (mandatory)
- `name` (string, optional, nullable) — unique name to identify the instance. primarily used for policy locked rules.
- `path` (string, optional, nullable) — Path that is exported by the NFS server (mandatory). For more information, see [NFS](https://kubernetes.io/docs/concepts/storage/volumes#nfs).
- `readOnly` (boolean, optional, nullable, default: true) — Force the NFS export to be mounted with read-only permissions.
- `server` (string, optional, nullable) — The hostname or IP address of the NFS server. (mandatory)

### PvcInstance

- `claimInfo` (ClaimInfo, optional) — Claim information for the newly created PVC. The information should not be provided when attempting to use existing PVC.
- `claimName` (string, optional, nullable) — Name for the PVC. Allow referencing it across workloads. If not provided, a name based on the workload name and scope will be auto-generated.
- `dataSharing` (boolean, optional, nullable, default: false) — Use `true` to share the PVC data to all projects under the selected scope. Cannot be set to `true` when `existingPvc` is `true`.
- `ephemeral` (boolean, optional, nullable, default: false) — Use `true` to set PVC to ephemeral. If set to `true`, the PVC will be deleted when the workload is stopped. Not supported for inference workloads.
- `exclude` (boolean, optional, nullable, default: false) — Use 'true' in case the item is defined in defaults of the policy, and you wish to exclude it from the workload.
- `existingPvc` (boolean, optional, nullable, default: false) — Verify existing PVC. PVC is assumed to exist when set to `true`. If set to `false`, the PVC will be created, if it does not exist. Cannot be set to `true` when `dataSharing` is `true`.
- `name` (string, optional, nullable) — unique name to identify the instance. primarily used for policy locked rules.
- `path` (string, optional, nullable) — Local path within the workload to which the PVC bucket will be mapped. (mandatory)
- `readOnly` (boolean, optional, nullable, default: false) — Permit only read access to PVC.

### S3Instance

- `accessKeySecret` (string, optional, nullable) — Name of the secret containing credentials of the S3 bucket. Used for private S3 buckets.
- `bucket` (string, optional, nullable) — The name of the bucket. (mandatory)
- `exclude` (boolean, optional, nullable, default: false) — Use 'true' in case the item is defined in defaults of the policy, and you wish to exclude it from the workload.
- `name` (string, optional, nullable) — unique name to identify the instance. primarily used for policy locked rules.
- `path` (string, optional, nullable) — Local path within the workload to which the S3 bucket will be mapped. (mandatory)
- `secretKeyOfAccessKeyId` (string, optional, nullable) — The key to use for loading the access key id from the secret. The default is `AccessKeyId`. For more information, see [Credentials access keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html).
- `secretKeyOfSecretKey` (string, optional, nullable) — The key to use for loading the secret key from the secret. The default is `SecretKey`. For more information, see [Credentials access keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html).
- `url` (string, optional, nullable) — The url of the S3 service provider. The default is the URL of the Amazon AWS S3 service.

### SecretInstance

- `defaultMode` (string, optional) — File permission mode in octal string format. This value must be a 4-digit octal number, representing the default file mode when mounting a Secret or ConfigMap as a volume.
- `exclude` (boolean, optional, nullable, default: false) — Use 'true' in case the item is defined in defaults of the policy, and you wish to exclude it from the workload.
- `mountPath` (string, optional, nullable) — Local path within the workload to which the Secret will be mapped to. (mandatory)
- `name` (string, optional, nullable) — unique name to identify the instance. primarily used for policy locked rules.
- `secret` (string, optional, nullable) — The name of the Secret resource. (mandatory)

### MatchExpression

A selector that contains values, a key, and an operator that relates the key and values.

- `key` (string, required) — The label key that the selector applies to (mandatory).
- `operator` (enum, required) — Represents a key's relationship to a set of values (mandatory).
  - Allowed values: `In`, `NotIn`, `Exists`, `DoesNotExist`, `Gt`, `Lt`
- `values` (list of string, optional) — An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer.

### ProbeHandler

The action taken to determine the health of the container. (mandatory)

- `httpGet` (ProbeHandlerHttpGet, optional) — An action based on HTTP Get requests.

### GitSecretRef

- `name` (string, optional) — Name of the Secret containing the credentials of the repository.
- `authenticationMethod` (enum, optional) — Specifies the authentication method to use when accessing the Git repository. This is required for private repositories - `password` - Authenticate using a username and password. - `ssh-key` - Authenticate using an SSH private key.
  - Allowed values: `password`, `ssh-key`
- `secretKeyOfUser` (string, optional, nullable) — The key in the Secret that contains the Git username (used for `password` authentication).
- `secretKeyOfPassword` (string, optional, nullable) — The key in the Secret that contains the Git password (used for `password` authentication).

### ClaimInfo

Claim information for the newly created PVC. The information should not be provided when attempting to use existing PVC.

- `size` (string, optional) — Requested size for the PVC. Mandatory when existingPvc is false. Recommended sizes: TB/GB/MB/TIB/GIB/MIB
- `storageClass` (string, optional, nullable) — Storage class name to associate with the PVC. This parameter may be omitted if there is a single storage class in the system, or you are using the default storage class. For more information, see [Storage class](https://kubernetes.io/docs/concepts/storage/storage-classes).
- `accessModes` (PvcAccessModes, optional) — Default access mode(s) applied to newly created PVCs unless explicitly overridden.
- `volumeMode` (enum, optional) — Default volume mode for the PVC. Choose between Filesystem (default) or Block.
  - Allowed values: `Filesystem`, `Block`
- `addedAttrValues` (list of PvcAddedAttrValue, optional) — an optional array of key-values pairs that are written as annotations on the created PVC. the allowed attributes are determined according to the storage class configuration (see k8s-objects-tracker for further info).

### ProbeHandlerHttpGet

An action based on HTTP Get requests.

- `path` (string, optional, nullable) — Path to access on the HTTP server, defaults to /.
- `port` (integer, optional, nullable) — Number of the port to access on the container.
- `host` (string, optional, nullable) — Host name to connect to, defaults to the pod IP.
- `scheme` (enum, optional) — Scheme to use for connecting to the host, defaults to HTTP.
  - Allowed values: `HTTP`, `HTTPS`

### PvcAccessModes

Default access mode(s) applied to newly created PVCs unless explicitly overridden.

- `readWriteOnce` (boolean, optional, nullable, default: true) — Mount the volume as read/write by a single node.
- `readOnlyMany` (boolean, optional, nullable, default: false) — Mount the volume as read-only by many nodes.
- `readWriteMany` (boolean, optional, nullable, default: false) — Mount the volume as read/write by many nodes.

### PvcAddedAttrValue

- `key` (string, required)
- `value` (string, optional)

## Examples

**Request**

```json
{
  "meta": {
    "name": "my-template-name"
  }
}
```

**Response**

```json
{
  "meta": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "my-template-name",
    "workloadType": "Workspace",
    "scopeType": "system",
    "scopeId": "string",
    "createdBy": "test@lab.com",
    "createdAt": "2022-01-01T03:49:52.531Z",
    "description": "description of my template.",
    "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
    "departmentId": "2",
    "projectId": 1,
    "updatedBy": "test@lab.com",
    "updatedAt": "2022-01-01T03:49:52.531Z"
  },
  "spec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "string",
    "command": "python",
    "completions": 1,
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": "2",
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "string",
              "operator": "In",
              "values": [
                "string"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "parallelism": 1,
    "podAffinity": {
      "type": "Required",
      "key": "string"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "string",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "configMap": "string",
          "defaultMode": "0644",
          "exclude": false,
          "mountPath": "string",
          "name": "storage-instance-a",
          "subPath": "string"
        }
      ],
      "dataVolume": [
        {
          "exclude": false,
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data"
        }
      ],
      "emptyDirVolume": [
        {
          "exclude": false,
          "medium": "string",
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "sizeLimit": "1G"
        }
      ],
      "git": [
        {
          "branch": "main",
          "exclude": false,
          "name": "storage-instance-a",
          "passwordSecret": "my-password-secret",
          "path": "/container/my-repository",
          "repository": "https://github.com/my-git/my-repo",
          "revision": "string",
          "secretKeyOfPassword": "Password",
          "secretKeyOfUser": "User",
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "exclude": false,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true
        }
      ],
      "nfs": [
        {
          "exclude": false,
          "mountPath": "/local/nfs",
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com"
        }
      ],
      "pvc": [
        {
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "claimName": "my-claim",
          "dataSharing": false,
          "ephemeral": false,
          "exclude": false,
          "existingPvc": false,
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "readOnly": false
        }
      ],
      "s3": [
        {
          "accessKeySecret": "my-access-key-secret",
          "bucket": "my-bucket",
          "exclude": false,
          "name": "storage-instance-a",
          "path": "/container/my-bucket",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "url": "https://s3.amazonaws.com"
        }
      ],
      "secretVolume": [
        {
          "defaultMode": "0644",
          "exclude": false,
          "mountPath": "string",
          "name": "storage-instance-a",
          "secret": "string"
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "string",
        "operator": "Equal",
        "key": "string",
        "value": "string",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  },
  "runnable": {
    "isRunnable": false,
    "issue": "mandatory image is not provided"
  },
  "combinedSpec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "string",
    "command": "python",
    "completions": 1,
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": "2",
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "string",
              "operator": "In",
              "values": [
                "string"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "parallelism": 1,
    "podAffinity": {
      "type": "Required",
      "key": "string"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "string",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "configMap": "string",
          "defaultMode": "0644",
          "exclude": false,
          "mountPath": "string",
          "name": "storage-instance-a",
          "subPath": "string"
        }
      ],
      "dataVolume": [
        {
          "exclude": false,
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data"
        }
      ],
      "emptyDirVolume": [
        {
          "exclude": false,
          "medium": "string",
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "sizeLimit": "1G"
        }
      ],
      "git": [
        {
          "branch": "main",
          "exclude": false,
          "name": "storage-instance-a",
          "passwordSecret": "my-password-secret",
          "path": "/container/my-repository",
          "repository": "https://github.com/my-git/my-repo",
          "revision": "string",
          "secretKeyOfPassword": "Password",
          "secretKeyOfUser": "User",
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "exclude": false,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true
        }
      ],
      "nfs": [
        {
          "exclude": false,
          "mountPath": "/local/nfs",
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com"
        }
      ],
      "pvc": [
        {
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "claimName": "my-claim",
          "dataSharing": false,
          "ephemeral": false,
          "exclude": false,
          "existingPvc": false,
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "readOnly": false
        }
      ],
      "s3": [
        {
          "accessKeySecret": "my-access-key-secret",
          "bucket": "my-bucket",
          "exclude": false,
          "name": "storage-instance-a",
          "path": "/container/my-bucket",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "url": "https://s3.amazonaws.com"
        }
      ],
      "secretVolume": [
        {
          "defaultMode": "0644",
          "exclude": false,
          "mountPath": "string",
          "name": "storage-instance-a",
          "secret": "string"
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "string",
        "operator": "Equal",
        "key": "string",
        "value": "string",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  }
}
```

**SDK Code**

```python
import requests

url = "http://localhost:8080/api/v1/workload-templates/trainings/550e8400-e29b-41d4-a716-446655440000"

payload = { "meta": { "name": "my-template-name" } }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'http://localhost:8080/api/v1/workload-templates/trainings/550e8400-e29b-41d4-a716-446655440000';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"meta":{"name":"my-template-name"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "http://localhost:8080/api/v1/workload-templates/trainings/550e8400-e29b-41d4-a716-446655440000"

	payload := strings.NewReader("{\n  \"meta\": {\n    \"name\": \"my-template-name\"\n  }\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("http://localhost:8080/api/v1/workload-templates/trainings/550e8400-e29b-41d4-a716-446655440000")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"meta\": {\n    \"name\": \"my-template-name\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("http://localhost:8080/api/v1/workload-templates/trainings/550e8400-e29b-41d4-a716-446655440000")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"meta\": {\n    \"name\": \"my-template-name\"\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'http://localhost:8080/api/v1/workload-templates/trainings/550e8400-e29b-41d4-a716-446655440000', [
  'body' => '{
  "meta": {
    "name": "my-template-name"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("http://localhost:8080/api/v1/workload-templates/trainings/550e8400-e29b-41d4-a716-446655440000");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"meta\": {\n    \"name\": \"my-template-name\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["meta": ["name": "my-template-name"]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "http://localhost:8080/api/v1/workload-templates/trainings/550e8400-e29b-41d4-a716-446655440000")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```