@@ -83,6 +83,20 @@ export class Instances extends APIResource {
8383 } ) ;
8484 }
8585
86+ /**
87+ * Demote a template back to standby so it can be restored or deleted
88+ *
89+ * @example
90+ * ```ts
91+ * const instance = await client.instances.demoteTemplate(
92+ * 'id',
93+ * );
94+ * ```
95+ */
96+ demoteTemplate ( id : string , options ?: RequestOptions ) : APIPromise < Instance > {
97+ return this . _client . post ( path `/instances/${ id } /demote-template` , options ) ;
98+ }
99+
86100 /**
87101 * Fork an instance from stopped, standby, or running (with from_running=true)
88102 *
@@ -138,6 +152,20 @@ export class Instances extends APIResource {
138152 } ) as APIPromise < Stream < InstanceLogsResponse > > ;
139153 }
140154
155+ /**
156+ * Promote a standby instance into a fork-only template
157+ *
158+ * @example
159+ * ```ts
160+ * const instance = await client.instances.promoteTemplate(
161+ * 'id',
162+ * );
163+ * ```
164+ */
165+ promoteTemplate ( id : string , options ?: RequestOptions ) : APIPromise < Instance > {
166+ return this . _client . post ( path `/instances/${ id } /promote-template` , options ) ;
167+ }
168+
141169 /**
142170 * Restore instance from standby
143171 *
@@ -377,9 +405,20 @@ export interface Instance {
377405 * - Shutdown: VM shut down but VMM exists (Cloud Hypervisor native)
378406 * - Stopped: No VMM running, no snapshot exists
379407 * - Standby: No VMM running, snapshot exists (can be restored)
408+ * - Template: Standby snapshot promoted to a fork-only parent; cannot wake while
409+ * forks exist
380410 * - Unknown: Failed to determine state (see state_error for details)
381411 */
382- state : 'Created' | 'Initializing' | 'Running' | 'Paused' | 'Shutdown' | 'Stopped' | 'Standby' | 'Unknown' ;
412+ state :
413+ | 'Created'
414+ | 'Initializing'
415+ | 'Running'
416+ | 'Paused'
417+ | 'Shutdown'
418+ | 'Stopped'
419+ | 'Standby'
420+ | 'Template'
421+ | 'Unknown' ;
383422
384423 /**
385424 * Linux-only automatic standby policy based on active inbound TCP connections
@@ -812,7 +851,16 @@ export interface WaitForStateResponse {
812851 /**
813852 * Current instance state when the wait completed
814853 */
815- state : 'Created' | 'Initializing' | 'Running' | 'Paused' | 'Shutdown' | 'Stopped' | 'Standby' | 'Unknown' ;
854+ state :
855+ | 'Created'
856+ | 'Initializing'
857+ | 'Running'
858+ | 'Paused'
859+ | 'Shutdown'
860+ | 'Stopped'
861+ | 'Standby'
862+ | 'Template'
863+ | 'Unknown' ;
816864
817865 /**
818866 * Whether the timeout expired before the target state was reached
@@ -1095,7 +1143,16 @@ export interface InstanceListParams {
10951143 /**
10961144 * Filter instances by state (e.g., Running, Stopped)
10971145 */
1098- state ?: 'Created' | 'Initializing' | 'Running' | 'Paused' | 'Shutdown' | 'Stopped' | 'Standby' | 'Unknown' ;
1146+ state ?:
1147+ | 'Created'
1148+ | 'Initializing'
1149+ | 'Running'
1150+ | 'Paused'
1151+ | 'Shutdown'
1152+ | 'Stopped'
1153+ | 'Standby'
1154+ | 'Template'
1155+ | 'Unknown' ;
10991156
11001157 /**
11011158 * Filter instances by tag key-value pairs. Uses deepObject style:
@@ -1189,7 +1246,16 @@ export interface InstanceWaitParams {
11891246 /**
11901247 * Target state to wait for
11911248 */
1192- state : 'Created' | 'Initializing' | 'Running' | 'Paused' | 'Shutdown' | 'Stopped' | 'Standby' | 'Unknown' ;
1249+ state :
1250+ | 'Created'
1251+ | 'Initializing'
1252+ | 'Running'
1253+ | 'Paused'
1254+ | 'Shutdown'
1255+ | 'Stopped'
1256+ | 'Standby'
1257+ | 'Template'
1258+ | 'Unknown' ;
11931259
11941260 /**
11951261 * Maximum duration to wait (Go duration format, e.g. "30s", "2m"). Capped at 5
0 commit comments