daytona_api_client 0.198.0 → 0.199.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/daytona_api_client/api/sandbox_api.rb +70 -0
- data/lib/daytona_api_client/models/create_sandbox.rb +11 -1
- data/lib/daytona_api_client/models/sandbox.rb +11 -1
- data/lib/daytona_api_client/models/sandbox_list_item.rb +11 -1
- data/lib/daytona_api_client/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 764d1b223ccc9689f92260d11e14e6d4020f7d4b7ecebcb81a82cbf5deaf47e5
|
|
4
|
+
data.tar.gz: f8acb0781414a81be5fe1a104885423d073075413144587542f214db7a70aab8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 742e2e34d18ff38e08ec8cba6c5b4ddbd7e856084b51bd9f2a57ee5fd9c1b60da84307c54e6771b4e61350d3c2610b72525a8e3148d815b13c6f833a979c502e
|
|
7
|
+
data.tar.gz: 8c2ec3dde252299a81fe30b8be9d67ccd4b0206b5a5665ddbf9caea14b1f88fb5d6d33ea64c7aff1dbb4248264f5d1a031d6fd949a356584868a88b5136524e6
|
|
@@ -2715,6 +2715,76 @@ module DaytonaApiClient
|
|
|
2715
2715
|
return data, status_code, headers
|
|
2716
2716
|
end
|
|
2717
2717
|
|
|
2718
|
+
# Set sandbox TTL
|
|
2719
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2720
|
+
# @param ttl_minutes [Float] Maximum time to live in minutes, re-anchored from the current time (0 to disable). When it elapses the sandbox is destroyed, even if it is stopped, paused, or archived
|
|
2721
|
+
# @param [Hash] opts the optional parameters
|
|
2722
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2723
|
+
# @return [Sandbox]
|
|
2724
|
+
def set_ttl(sandbox_id_or_name, ttl_minutes, opts = {})
|
|
2725
|
+
data, _status_code, _headers = set_ttl_with_http_info(sandbox_id_or_name, ttl_minutes, opts)
|
|
2726
|
+
data
|
|
2727
|
+
end
|
|
2728
|
+
|
|
2729
|
+
# Set sandbox TTL
|
|
2730
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2731
|
+
# @param ttl_minutes [Float] Maximum time to live in minutes, re-anchored from the current time (0 to disable). When it elapses the sandbox is destroyed, even if it is stopped, paused, or archived
|
|
2732
|
+
# @param [Hash] opts the optional parameters
|
|
2733
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2734
|
+
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2735
|
+
def set_ttl_with_http_info(sandbox_id_or_name, ttl_minutes, opts = {})
|
|
2736
|
+
if @api_client.config.debugging
|
|
2737
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.set_ttl ...'
|
|
2738
|
+
end
|
|
2739
|
+
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2740
|
+
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2741
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.set_ttl"
|
|
2742
|
+
end
|
|
2743
|
+
# verify the required parameter 'ttl_minutes' is set
|
|
2744
|
+
if @api_client.config.client_side_validation && ttl_minutes.nil?
|
|
2745
|
+
fail ArgumentError, "Missing the required parameter 'ttl_minutes' when calling SandboxApi.set_ttl"
|
|
2746
|
+
end
|
|
2747
|
+
# resource path
|
|
2748
|
+
local_var_path = '/sandbox/{sandboxIdOrName}/ttl/{ttlMinutes}'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s)).sub('{' + 'ttlMinutes' + '}', CGI.escape(ttl_minutes.to_s))
|
|
2749
|
+
|
|
2750
|
+
# query parameters
|
|
2751
|
+
query_params = opts[:query_params] || {}
|
|
2752
|
+
|
|
2753
|
+
# header parameters
|
|
2754
|
+
header_params = opts[:header_params] || {}
|
|
2755
|
+
# HTTP header 'Accept' (if needed)
|
|
2756
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2757
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2758
|
+
|
|
2759
|
+
# form parameters
|
|
2760
|
+
form_params = opts[:form_params] || {}
|
|
2761
|
+
|
|
2762
|
+
# http body (model)
|
|
2763
|
+
post_body = opts[:debug_body]
|
|
2764
|
+
|
|
2765
|
+
# return_type
|
|
2766
|
+
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
2767
|
+
|
|
2768
|
+
# auth_names
|
|
2769
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2770
|
+
|
|
2771
|
+
new_options = opts.merge(
|
|
2772
|
+
:operation => :"SandboxApi.set_ttl",
|
|
2773
|
+
:header_params => header_params,
|
|
2774
|
+
:query_params => query_params,
|
|
2775
|
+
:form_params => form_params,
|
|
2776
|
+
:body => post_body,
|
|
2777
|
+
:auth_names => auth_names,
|
|
2778
|
+
:return_type => return_type
|
|
2779
|
+
)
|
|
2780
|
+
|
|
2781
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2782
|
+
if @api_client.config.debugging
|
|
2783
|
+
@api_client.config.logger.debug "API called: SandboxApi#set_ttl\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2784
|
+
end
|
|
2785
|
+
return data, status_code, headers
|
|
2786
|
+
end
|
|
2787
|
+
|
|
2718
2788
|
# Start or resume sandbox
|
|
2719
2789
|
# Starts a stopped or archived sandbox, or resumes a paused sandbox. The transition taken depends on the current sandbox state.
|
|
2720
2790
|
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
@@ -72,6 +72,9 @@ module DaytonaApiClient
|
|
|
72
72
|
# Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
|
|
73
73
|
attr_accessor :auto_delete_interval
|
|
74
74
|
|
|
75
|
+
# Maximum time to live in minutes, counted as wall-clock time since creation regardless of sandbox state (0 means disabled). When it elapses the sandbox is destroyed, even if it is stopped, paused, or archived.
|
|
76
|
+
attr_accessor :ttl_minutes
|
|
77
|
+
|
|
75
78
|
# Array of volumes to attach to the sandbox
|
|
76
79
|
attr_accessor :volumes
|
|
77
80
|
|
|
@@ -106,6 +109,7 @@ module DaytonaApiClient
|
|
|
106
109
|
:'auto_pause_interval' => :'autoPauseInterval',
|
|
107
110
|
:'auto_archive_interval' => :'autoArchiveInterval',
|
|
108
111
|
:'auto_delete_interval' => :'autoDeleteInterval',
|
|
112
|
+
:'ttl_minutes' => :'ttlMinutes',
|
|
109
113
|
:'volumes' => :'volumes',
|
|
110
114
|
:'build_info' => :'buildInfo',
|
|
111
115
|
:'linked_sandbox' => :'linkedSandbox',
|
|
@@ -145,6 +149,7 @@ module DaytonaApiClient
|
|
|
145
149
|
:'auto_pause_interval' => :'Integer',
|
|
146
150
|
:'auto_archive_interval' => :'Integer',
|
|
147
151
|
:'auto_delete_interval' => :'Integer',
|
|
152
|
+
:'ttl_minutes' => :'Integer',
|
|
148
153
|
:'volumes' => :'Array<SandboxVolume>',
|
|
149
154
|
:'build_info' => :'CreateBuildInfo',
|
|
150
155
|
:'linked_sandbox' => :'String',
|
|
@@ -256,6 +261,10 @@ module DaytonaApiClient
|
|
|
256
261
|
self.auto_delete_interval = attributes[:'auto_delete_interval']
|
|
257
262
|
end
|
|
258
263
|
|
|
264
|
+
if attributes.key?(:'ttl_minutes')
|
|
265
|
+
self.ttl_minutes = attributes[:'ttl_minutes']
|
|
266
|
+
end
|
|
267
|
+
|
|
259
268
|
if attributes.key?(:'volumes')
|
|
260
269
|
if (value = attributes[:'volumes']).is_a?(Array)
|
|
261
270
|
self.volumes = value
|
|
@@ -316,6 +325,7 @@ module DaytonaApiClient
|
|
|
316
325
|
auto_pause_interval == o.auto_pause_interval &&
|
|
317
326
|
auto_archive_interval == o.auto_archive_interval &&
|
|
318
327
|
auto_delete_interval == o.auto_delete_interval &&
|
|
328
|
+
ttl_minutes == o.ttl_minutes &&
|
|
319
329
|
volumes == o.volumes &&
|
|
320
330
|
build_info == o.build_info &&
|
|
321
331
|
linked_sandbox == o.linked_sandbox &&
|
|
@@ -331,7 +341,7 @@ module DaytonaApiClient
|
|
|
331
341
|
# Calculates hash code according to all attributes.
|
|
332
342
|
# @return [Integer] Hash code
|
|
333
343
|
def hash
|
|
334
|
-
[name, snapshot, user, env, labels, public, network_block_all, network_allow_list, domain_allow_list, target, cpu, gpu, gpu_type, memory, disk, auto_stop_interval, auto_pause_interval, auto_archive_interval, auto_delete_interval, volumes, build_info, linked_sandbox, secrets].hash
|
|
344
|
+
[name, snapshot, user, env, labels, public, network_block_all, network_allow_list, domain_allow_list, target, cpu, gpu, gpu_type, memory, disk, auto_stop_interval, auto_pause_interval, auto_archive_interval, auto_delete_interval, ttl_minutes, volumes, build_info, linked_sandbox, secrets].hash
|
|
335
345
|
end
|
|
336
346
|
|
|
337
347
|
# Builds the object from hash
|
|
@@ -96,6 +96,9 @@ module DaytonaApiClient
|
|
|
96
96
|
# Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
|
|
97
97
|
attr_accessor :auto_delete_interval
|
|
98
98
|
|
|
99
|
+
# When the sandbox will be automatically destroyed, regardless of its state (only set when a TTL is configured)
|
|
100
|
+
attr_accessor :auto_destroy_at
|
|
101
|
+
|
|
99
102
|
# Array of volumes attached to the sandbox
|
|
100
103
|
attr_accessor :volumes
|
|
101
104
|
|
|
@@ -178,6 +181,7 @@ module DaytonaApiClient
|
|
|
178
181
|
:'auto_pause_interval' => :'autoPauseInterval',
|
|
179
182
|
:'auto_archive_interval' => :'autoArchiveInterval',
|
|
180
183
|
:'auto_delete_interval' => :'autoDeleteInterval',
|
|
184
|
+
:'auto_destroy_at' => :'autoDestroyAt',
|
|
181
185
|
:'volumes' => :'volumes',
|
|
182
186
|
:'build_info' => :'buildInfo',
|
|
183
187
|
:'created_at' => :'createdAt',
|
|
@@ -231,6 +235,7 @@ module DaytonaApiClient
|
|
|
231
235
|
:'auto_pause_interval' => :'Float',
|
|
232
236
|
:'auto_archive_interval' => :'Float',
|
|
233
237
|
:'auto_delete_interval' => :'Float',
|
|
238
|
+
:'auto_destroy_at' => :'String',
|
|
234
239
|
:'volumes' => :'Array<SandboxVolume>',
|
|
235
240
|
:'build_info' => :'BuildInfo',
|
|
236
241
|
:'created_at' => :'String',
|
|
@@ -404,6 +409,10 @@ module DaytonaApiClient
|
|
|
404
409
|
self.auto_delete_interval = attributes[:'auto_delete_interval']
|
|
405
410
|
end
|
|
406
411
|
|
|
412
|
+
if attributes.key?(:'auto_destroy_at')
|
|
413
|
+
self.auto_destroy_at = attributes[:'auto_destroy_at']
|
|
414
|
+
end
|
|
415
|
+
|
|
407
416
|
if attributes.key?(:'volumes')
|
|
408
417
|
if (value = attributes[:'volumes']).is_a?(Array)
|
|
409
418
|
self.volumes = value
|
|
@@ -730,6 +739,7 @@ module DaytonaApiClient
|
|
|
730
739
|
auto_pause_interval == o.auto_pause_interval &&
|
|
731
740
|
auto_archive_interval == o.auto_archive_interval &&
|
|
732
741
|
auto_delete_interval == o.auto_delete_interval &&
|
|
742
|
+
auto_destroy_at == o.auto_destroy_at &&
|
|
733
743
|
volumes == o.volumes &&
|
|
734
744
|
build_info == o.build_info &&
|
|
735
745
|
created_at == o.created_at &&
|
|
@@ -751,7 +761,7 @@ module DaytonaApiClient
|
|
|
751
761
|
# Calculates hash code according to all attributes.
|
|
752
762
|
# @return [Integer] Hash code
|
|
753
763
|
def hash
|
|
754
|
-
[id, organization_id, name, snapshot, user, env, labels, public, network_block_all, network_allow_list, domain_allow_list, target, cpu, gpu, gpu_type, memory, disk, state, desired_state, error_reason, recoverable, backup_state, backup_created_at, auto_stop_interval, auto_pause_interval, auto_archive_interval, auto_delete_interval, volumes, build_info, created_at, updated_at, last_activity_at, sandbox_class, daemon_version, runner_id, linked_sandbox_id, toolbox_proxy_url].hash
|
|
764
|
+
[id, organization_id, name, snapshot, user, env, labels, public, network_block_all, network_allow_list, domain_allow_list, target, cpu, gpu, gpu_type, memory, disk, state, desired_state, error_reason, recoverable, backup_state, backup_created_at, auto_stop_interval, auto_pause_interval, auto_archive_interval, auto_delete_interval, auto_destroy_at, volumes, build_info, created_at, updated_at, last_activity_at, sandbox_class, daemon_version, runner_id, linked_sandbox_id, toolbox_proxy_url].hash
|
|
755
765
|
end
|
|
756
766
|
|
|
757
767
|
# Builds the object from hash
|
|
@@ -87,6 +87,9 @@ module DaytonaApiClient
|
|
|
87
87
|
# Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
|
|
88
88
|
attr_accessor :auto_delete_interval
|
|
89
89
|
|
|
90
|
+
# When the sandbox will be automatically destroyed, regardless of its state (only set when a TTL is configured)
|
|
91
|
+
attr_accessor :auto_destroy_at
|
|
92
|
+
|
|
90
93
|
# The creation timestamp of the sandbox
|
|
91
94
|
attr_accessor :created_at
|
|
92
95
|
|
|
@@ -151,6 +154,7 @@ module DaytonaApiClient
|
|
|
151
154
|
:'auto_pause_interval' => :'autoPauseInterval',
|
|
152
155
|
:'auto_archive_interval' => :'autoArchiveInterval',
|
|
153
156
|
:'auto_delete_interval' => :'autoDeleteInterval',
|
|
157
|
+
:'auto_destroy_at' => :'autoDestroyAt',
|
|
154
158
|
:'created_at' => :'createdAt',
|
|
155
159
|
:'updated_at' => :'updatedAt',
|
|
156
160
|
:'last_activity_at' => :'lastActivityAt',
|
|
@@ -196,6 +200,7 @@ module DaytonaApiClient
|
|
|
196
200
|
:'auto_pause_interval' => :'Float',
|
|
197
201
|
:'auto_archive_interval' => :'Float',
|
|
198
202
|
:'auto_delete_interval' => :'Float',
|
|
203
|
+
:'auto_destroy_at' => :'String',
|
|
199
204
|
:'created_at' => :'String',
|
|
200
205
|
:'updated_at' => :'String',
|
|
201
206
|
:'last_activity_at' => :'String',
|
|
@@ -346,6 +351,10 @@ module DaytonaApiClient
|
|
|
346
351
|
self.auto_delete_interval = attributes[:'auto_delete_interval']
|
|
347
352
|
end
|
|
348
353
|
|
|
354
|
+
if attributes.key?(:'auto_destroy_at')
|
|
355
|
+
self.auto_destroy_at = attributes[:'auto_destroy_at']
|
|
356
|
+
end
|
|
357
|
+
|
|
349
358
|
if attributes.key?(:'created_at')
|
|
350
359
|
self.created_at = attributes[:'created_at']
|
|
351
360
|
end
|
|
@@ -605,6 +614,7 @@ module DaytonaApiClient
|
|
|
605
614
|
auto_pause_interval == o.auto_pause_interval &&
|
|
606
615
|
auto_archive_interval == o.auto_archive_interval &&
|
|
607
616
|
auto_delete_interval == o.auto_delete_interval &&
|
|
617
|
+
auto_destroy_at == o.auto_destroy_at &&
|
|
608
618
|
created_at == o.created_at &&
|
|
609
619
|
updated_at == o.updated_at &&
|
|
610
620
|
last_activity_at == o.last_activity_at &&
|
|
@@ -621,7 +631,7 @@ module DaytonaApiClient
|
|
|
621
631
|
# Calculates hash code according to all attributes.
|
|
622
632
|
# @return [Integer] Hash code
|
|
623
633
|
def hash
|
|
624
|
-
[id, organization_id, name, target, runner_id, sandbox_class, state, desired_state, snapshot, user, error_reason, recoverable, public, cpu, gpu, gpu_type, memory, disk, labels, backup_state, auto_stop_interval, auto_pause_interval, auto_archive_interval, auto_delete_interval, created_at, updated_at, last_activity_at, daemon_version, toolbox_proxy_url].hash
|
|
634
|
+
[id, organization_id, name, target, runner_id, sandbox_class, state, desired_state, snapshot, user, error_reason, recoverable, public, cpu, gpu, gpu_type, memory, disk, labels, backup_state, auto_stop_interval, auto_pause_interval, auto_archive_interval, auto_delete_interval, auto_destroy_at, created_at, updated_at, last_activity_at, daemon_version, toolbox_proxy_url].hash
|
|
625
635
|
end
|
|
626
636
|
|
|
627
637
|
# Builds the object from hash
|