mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add locked TTL field to template meta (#8020)
This commit is contained in:
+28
-24
@@ -1351,6 +1351,7 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
"failure_ttl_ms": 0,
|
||||
"icon": "string",
|
||||
"inactivity_ttl_ms": 0,
|
||||
"locked_ttl_ms": 0,
|
||||
"max_ttl_ms": 0,
|
||||
"name": "string",
|
||||
"template_version_id": "0ba39c92-1f1b-4c32-aa3e-9925d7713eb1"
|
||||
@@ -1370,7 +1371,8 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
| `display_name` | string | false | | Display name is the displayed name of the template. |
|
||||
| `failure_ttl_ms` | integer | false | | Failure ttl ms allows optionally specifying the max lifetime before Coder stops all resources for failed workspaces created from this template. |
|
||||
| `icon` | string | false | | Icon is a relative path or external URL that specifies an icon to be displayed in the dashboard. |
|
||||
| `inactivity_ttl_ms` | integer | false | | Inactivity ttl ms allows optionally specifying the max lifetime before Coder deletes inactive workspaces created from this template. |
|
||||
| `inactivity_ttl_ms` | integer | false | | Inactivity ttl ms allows optionally specifying the max lifetime before Coder locks inactive workspaces created from this template. |
|
||||
| `locked_ttl_ms` | integer | false | | Locked ttl ms allows optionally specifying the max lifetime before Coder permanently deletes locked workspaces created from this template. |
|
||||
| `max_ttl_ms` | integer | false | | Max ttl ms allows optionally specifying the max lifetime for workspaces created from this template. |
|
||||
| `name` | string | true | | Name is the name of the template. |
|
||||
| `template_version_id` | string | true | | Template version ID is an in-progress or completed job to use as an initial version of the template. |
|
||||
@@ -3733,6 +3735,7 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"inactivity_ttl_ms": 0,
|
||||
"locked_ttl_ms": 0,
|
||||
"max_ttl_ms": 0,
|
||||
"name": "string",
|
||||
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
|
||||
@@ -3743,29 +3746,30 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ---------------------------------- | ------------------------------------------------------------------ | -------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `active_user_count` | integer | false | | Active user count is set to -1 when loading. |
|
||||
| `active_version_id` | string | false | | |
|
||||
| `allow_user_autostart` | boolean | false | | Allow user autostart and AllowUserAutostop are enterprise-only. Their values are only used if your license is entitled to use the advanced template scheduling feature. |
|
||||
| `allow_user_autostop` | boolean | false | | |
|
||||
| `allow_user_cancel_workspace_jobs` | boolean | false | | |
|
||||
| `build_time_stats` | [codersdk.TemplateBuildTimeStats](#codersdktemplatebuildtimestats) | false | | |
|
||||
| `created_at` | string | false | | |
|
||||
| `created_by_id` | string | false | | |
|
||||
| `created_by_name` | string | false | | |
|
||||
| `default_ttl_ms` | integer | false | | |
|
||||
| `description` | string | false | | |
|
||||
| `display_name` | string | false | | |
|
||||
| `failure_ttl_ms` | integer | false | | Failure ttl ms and InactivityTTLMillis are enterprise-only. Their values are used if your license is entitled to use the advanced template scheduling feature. |
|
||||
| `icon` | string | false | | |
|
||||
| `id` | string | false | | |
|
||||
| `inactivity_ttl_ms` | integer | false | | |
|
||||
| `max_ttl_ms` | integer | false | | Max ttl ms is an enterprise feature. It's value is only used if your license is entitled to use the advanced template scheduling feature. |
|
||||
| `name` | string | false | | |
|
||||
| `organization_id` | string | false | | |
|
||||
| `provisioner` | string | false | | |
|
||||
| `updated_at` | string | false | | |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ---------------------------------- | ------------------------------------------------------------------ | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `active_user_count` | integer | false | | Active user count is set to -1 when loading. |
|
||||
| `active_version_id` | string | false | | |
|
||||
| `allow_user_autostart` | boolean | false | | Allow user autostart and AllowUserAutostop are enterprise-only. Their values are only used if your license is entitled to use the advanced template scheduling feature. |
|
||||
| `allow_user_autostop` | boolean | false | | |
|
||||
| `allow_user_cancel_workspace_jobs` | boolean | false | | |
|
||||
| `build_time_stats` | [codersdk.TemplateBuildTimeStats](#codersdktemplatebuildtimestats) | false | | |
|
||||
| `created_at` | string | false | | |
|
||||
| `created_by_id` | string | false | | |
|
||||
| `created_by_name` | string | false | | |
|
||||
| `default_ttl_ms` | integer | false | | |
|
||||
| `description` | string | false | | |
|
||||
| `display_name` | string | false | | |
|
||||
| `failure_ttl_ms` | integer | false | | Failure ttl ms InactivityTTLMillis, and LockedTTLMillis are enterprise-only. Their values are used if your license is entitled to use the advanced template scheduling feature. |
|
||||
| `icon` | string | false | | |
|
||||
| `id` | string | false | | |
|
||||
| `inactivity_ttl_ms` | integer | false | | |
|
||||
| `locked_ttl_ms` | integer | false | | |
|
||||
| `max_ttl_ms` | integer | false | | Max ttl ms is an enterprise feature. It's value is only used if your license is entitled to use the advanced template scheduling feature. |
|
||||
| `name` | string | false | | |
|
||||
| `organization_id` | string | false | | |
|
||||
| `provisioner` | string | false | | |
|
||||
| `updated_at` | string | false | | |
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
|
||||
+34
-27
@@ -51,6 +51,7 @@ curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/templat
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"inactivity_ttl_ms": 0,
|
||||
"locked_ttl_ms": 0,
|
||||
"max_ttl_ms": 0,
|
||||
"name": "string",
|
||||
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
|
||||
@@ -70,33 +71,34 @@ curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/templat
|
||||
|
||||
Status Code **200**
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------------------------------ | ---------------------------------------------------------------------------- | -------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `[array item]` | array | false | | |
|
||||
| `» active_user_count` | integer | false | | Active user count is set to -1 when loading. |
|
||||
| `» active_version_id` | string(uuid) | false | | |
|
||||
| `» allow_user_autostart` | boolean | false | | Allow user autostart and AllowUserAutostop are enterprise-only. Their values are only used if your license is entitled to use the advanced template scheduling feature. |
|
||||
| `» allow_user_autostop` | boolean | false | | |
|
||||
| `» allow_user_cancel_workspace_jobs` | boolean | false | | |
|
||||
| `» build_time_stats` | [codersdk.TemplateBuildTimeStats](schemas.md#codersdktemplatebuildtimestats) | false | | |
|
||||
| `»» [any property]` | [codersdk.TransitionStats](schemas.md#codersdktransitionstats) | false | | |
|
||||
| `»»» p50` | integer | false | | |
|
||||
| `»»» p95` | integer | false | | |
|
||||
| `» created_at` | string(date-time) | false | | |
|
||||
| `» created_by_id` | string(uuid) | false | | |
|
||||
| `» created_by_name` | string | false | | |
|
||||
| `» default_ttl_ms` | integer | false | | |
|
||||
| `» description` | string | false | | |
|
||||
| `» display_name` | string | false | | |
|
||||
| `» failure_ttl_ms` | integer | false | | Failure ttl ms and InactivityTTLMillis are enterprise-only. Their values are used if your license is entitled to use the advanced template scheduling feature. |
|
||||
| `» icon` | string | false | | |
|
||||
| `» id` | string(uuid) | false | | |
|
||||
| `» inactivity_ttl_ms` | integer | false | | |
|
||||
| `» max_ttl_ms` | integer | false | | Max ttl ms is an enterprise feature. It's value is only used if your license is entitled to use the advanced template scheduling feature. |
|
||||
| `» name` | string | false | | |
|
||||
| `» organization_id` | string(uuid) | false | | |
|
||||
| `» provisioner` | string | false | | |
|
||||
| `» updated_at` | string(date-time) | false | | |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------------------------------ | ---------------------------------------------------------------------------- | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `[array item]` | array | false | | |
|
||||
| `» active_user_count` | integer | false | | Active user count is set to -1 when loading. |
|
||||
| `» active_version_id` | string(uuid) | false | | |
|
||||
| `» allow_user_autostart` | boolean | false | | Allow user autostart and AllowUserAutostop are enterprise-only. Their values are only used if your license is entitled to use the advanced template scheduling feature. |
|
||||
| `» allow_user_autostop` | boolean | false | | |
|
||||
| `» allow_user_cancel_workspace_jobs` | boolean | false | | |
|
||||
| `» build_time_stats` | [codersdk.TemplateBuildTimeStats](schemas.md#codersdktemplatebuildtimestats) | false | | |
|
||||
| `»» [any property]` | [codersdk.TransitionStats](schemas.md#codersdktransitionstats) | false | | |
|
||||
| `»»» p50` | integer | false | | |
|
||||
| `»»» p95` | integer | false | | |
|
||||
| `» created_at` | string(date-time) | false | | |
|
||||
| `» created_by_id` | string(uuid) | false | | |
|
||||
| `» created_by_name` | string | false | | |
|
||||
| `» default_ttl_ms` | integer | false | | |
|
||||
| `» description` | string | false | | |
|
||||
| `» display_name` | string | false | | |
|
||||
| `» failure_ttl_ms` | integer | false | | Failure ttl ms InactivityTTLMillis, and LockedTTLMillis are enterprise-only. Their values are used if your license is entitled to use the advanced template scheduling feature. |
|
||||
| `» icon` | string | false | | |
|
||||
| `» id` | string(uuid) | false | | |
|
||||
| `» inactivity_ttl_ms` | integer | false | | |
|
||||
| `» locked_ttl_ms` | integer | false | | |
|
||||
| `» max_ttl_ms` | integer | false | | Max ttl ms is an enterprise feature. It's value is only used if your license is entitled to use the advanced template scheduling feature. |
|
||||
| `» name` | string | false | | |
|
||||
| `» organization_id` | string(uuid) | false | | |
|
||||
| `» provisioner` | string | false | | |
|
||||
| `» updated_at` | string(date-time) | false | | |
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
@@ -134,6 +136,7 @@ curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/templa
|
||||
"failure_ttl_ms": 0,
|
||||
"icon": "string",
|
||||
"inactivity_ttl_ms": 0,
|
||||
"locked_ttl_ms": 0,
|
||||
"max_ttl_ms": 0,
|
||||
"name": "string",
|
||||
"template_version_id": "0ba39c92-1f1b-4c32-aa3e-9925d7713eb1"
|
||||
@@ -178,6 +181,7 @@ curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/templa
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"inactivity_ttl_ms": 0,
|
||||
"locked_ttl_ms": 0,
|
||||
"max_ttl_ms": 0,
|
||||
"name": "string",
|
||||
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
|
||||
@@ -305,6 +309,7 @@ curl -X GET http://coder-server:8080/api/v2/organizations/{organization}/templat
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"inactivity_ttl_ms": 0,
|
||||
"locked_ttl_ms": 0,
|
||||
"max_ttl_ms": 0,
|
||||
"name": "string",
|
||||
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
|
||||
@@ -628,6 +633,7 @@ curl -X GET http://coder-server:8080/api/v2/templates/{template} \
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"inactivity_ttl_ms": 0,
|
||||
"locked_ttl_ms": 0,
|
||||
"max_ttl_ms": 0,
|
||||
"name": "string",
|
||||
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
|
||||
@@ -738,6 +744,7 @@ curl -X PATCH http://coder-server:8080/api/v2/templates/{template} \
|
||||
"icon": "string",
|
||||
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
|
||||
"inactivity_ttl_ms": 0,
|
||||
"locked_ttl_ms": 0,
|
||||
"max_ttl_ms": 0,
|
||||
"name": "string",
|
||||
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
|
||||
|
||||
Reference in New Issue
Block a user