daytona_api_client 0.134.0.alpha.1 → 1.0.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/Gemfile +9 -0
- data/Gemfile.lock +101 -0
- data/daytona_api_client.gemspec +2 -2
- data/lib/daytona_api_client/api/audit_api.rb +66 -18
- data/lib/daytona_api_client/api/docker_registry_api.rb +0 -3
- data/lib/daytona_api_client/api/organizations_api.rb +29 -754
- data/lib/daytona_api_client/api/preview_api.rb +5 -74
- data/lib/daytona_api_client/api/runners_api.rb +20 -343
- data/lib/daytona_api_client/api/sandbox_api.rb +194 -558
- data/lib/daytona_api_client/api/snapshots_api.rb +0 -66
- data/lib/daytona_api_client/api/toolbox_api.rb +711 -711
- data/lib/daytona_api_client/api/workspace_api.rb +3 -3
- data/lib/daytona_api_client/models/build_info.rb +4 -31
- data/lib/daytona_api_client/models/{job.rb → create_audit_log.rb} +79 -166
- data/lib/daytona_api_client/models/create_organization.rb +4 -31
- data/lib/daytona_api_client/models/create_runner.rb +315 -31
- data/lib/daytona_api_client/models/create_sandbox.rb +1 -11
- data/lib/daytona_api_client/models/create_snapshot.rb +4 -14
- data/lib/daytona_api_client/models/create_user.rb +1 -10
- data/lib/daytona_api_client/models/daytona_configuration.rb +4 -41
- data/lib/daytona_api_client/models/organization.rb +85 -53
- data/lib/daytona_api_client/models/organization_usage_overview.rb +146 -18
- data/lib/daytona_api_client/models/paginated_audit_logs.rb +4 -14
- data/lib/daytona_api_client/models/{paginated_jobs.rb → paginated_snapshots_dto.rb} +4 -4
- data/lib/daytona_api_client/models/port_preview_url.rb +14 -31
- data/lib/daytona_api_client/models/region.rb +4 -178
- data/lib/daytona_api_client/models/runner.rb +117 -79
- data/lib/daytona_api_client/models/runner_snapshot_dto.rb +17 -0
- data/lib/daytona_api_client/models/sandbox.rb +14 -51
- data/lib/daytona_api_client/models/sandbox_volume.rb +4 -14
- data/lib/daytona_api_client/models/snapshot_dto.rb +4 -36
- data/lib/daytona_api_client/models/snapshot_state.rb +4 -1
- data/lib/daytona_api_client/models/ssh_access_dto.rb +4 -31
- data/lib/daytona_api_client/models/ssh_access_validation_dto.rb +24 -4
- data/lib/daytona_api_client/models/update_organization_quota.rb +41 -41
- data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +4 -24
- data/lib/daytona_api_client/models/workspace.rb +35 -45
- data/lib/daytona_api_client/version.rb +1 -1
- data/lib/daytona_api_client.rb +1 -30
- data/project.json +6 -34
- metadata +5 -38
- data/.gitignore +0 -39
- data/.openapi-generator/FILES +0 -194
- data/.openapi-generator/VERSION +0 -1
- data/.openapi-generator-ignore +0 -31
- data/.rspec +0 -2
- data/.rubocop.yml +0 -148
- data/fix-gemspec.sh +0 -11
- data/lib/daytona_api_client/api/admin_api.rb +0 -325
- data/lib/daytona_api_client/api/jobs_api.rb +0 -299
- data/lib/daytona_api_client/api/regions_api.rb +0 -77
- data/lib/daytona_api_client/models/admin_create_runner.rb +0 -385
- data/lib/daytona_api_client/models/create_region.rb +0 -269
- data/lib/daytona_api_client/models/create_region_response.rb +0 -280
- data/lib/daytona_api_client/models/create_runner_response.rb +0 -263
- data/lib/daytona_api_client/models/job_status.rb +0 -42
- data/lib/daytona_api_client/models/job_type.rb +0 -49
- data/lib/daytona_api_client/models/poll_jobs_response.rb +0 -238
- data/lib/daytona_api_client/models/rate_limit_config.rb +0 -249
- data/lib/daytona_api_client/models/rate_limit_entry.rb +0 -229
- data/lib/daytona_api_client/models/regenerate_api_key_response.rb +0 -236
- data/lib/daytona_api_client/models/region_quota.rb +0 -339
- data/lib/daytona_api_client/models/region_type.rb +0 -41
- data/lib/daytona_api_client/models/region_usage_overview.rb +0 -391
- data/lib/daytona_api_client/models/runner_full.rb +0 -779
- data/lib/daytona_api_client/models/runner_health_metrics.rb +0 -533
- data/lib/daytona_api_client/models/runner_healthcheck.rb +0 -276
- data/lib/daytona_api_client/models/signed_port_preview_url.rb +0 -317
- data/lib/daytona_api_client/models/snapshot_manager_credentials.rb +0 -263
- data/lib/daytona_api_client/models/toolbox_proxy_url.rb +0 -236
- data/lib/daytona_api_client/models/update_job_status.rb +0 -278
- data/lib/daytona_api_client/models/update_organization_default_region.rb +0 -236
- data/lib/daytona_api_client/models/update_organization_region_quota.rb +0 -245
- data/lib/daytona_api_client/models/update_region.rb +0 -242
- data/lib/daytona_api_client/models/url.rb +0 -236
- data/lib/daytona_api_client/models/workspace_port_preview_url.rb +0 -263
|
@@ -20,38 +20,36 @@ module DaytonaApiClient
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Archive sandbox
|
|
23
|
-
# @param
|
|
23
|
+
# @param sandbox_id [String]
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
25
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
26
|
-
# @return [
|
|
27
|
-
def archive_sandbox(
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
# @return [nil]
|
|
27
|
+
def archive_sandbox(sandbox_id, opts = {})
|
|
28
|
+
archive_sandbox_with_http_info(sandbox_id, opts)
|
|
29
|
+
nil
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# Archive sandbox
|
|
33
|
-
# @param
|
|
33
|
+
# @param sandbox_id [String]
|
|
34
34
|
# @param [Hash] opts the optional parameters
|
|
35
35
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
36
|
-
# @return [Array<(
|
|
37
|
-
def archive_sandbox_with_http_info(
|
|
36
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
37
|
+
def archive_sandbox_with_http_info(sandbox_id, opts = {})
|
|
38
38
|
if @api_client.config.debugging
|
|
39
39
|
@api_client.config.logger.debug 'Calling API: SandboxApi.archive_sandbox ...'
|
|
40
40
|
end
|
|
41
|
-
# verify the required parameter '
|
|
42
|
-
if @api_client.config.client_side_validation &&
|
|
43
|
-
fail ArgumentError, "Missing the required parameter '
|
|
41
|
+
# verify the required parameter 'sandbox_id' is set
|
|
42
|
+
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.archive_sandbox"
|
|
44
44
|
end
|
|
45
45
|
# resource path
|
|
46
|
-
local_var_path = '/sandbox/{
|
|
46
|
+
local_var_path = '/sandbox/{sandboxId}/archive'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
47
47
|
|
|
48
48
|
# query parameters
|
|
49
49
|
query_params = opts[:query_params] || {}
|
|
50
50
|
|
|
51
51
|
# header parameters
|
|
52
52
|
header_params = opts[:header_params] || {}
|
|
53
|
-
# HTTP header 'Accept' (if needed)
|
|
54
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
55
53
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
56
54
|
|
|
57
55
|
# form parameters
|
|
@@ -61,7 +59,7 @@ module DaytonaApiClient
|
|
|
61
59
|
post_body = opts[:debug_body]
|
|
62
60
|
|
|
63
61
|
# return_type
|
|
64
|
-
return_type = opts[:debug_return_type]
|
|
62
|
+
return_type = opts[:debug_return_type]
|
|
65
63
|
|
|
66
64
|
# auth_names
|
|
67
65
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
@@ -84,30 +82,30 @@ module DaytonaApiClient
|
|
|
84
82
|
end
|
|
85
83
|
|
|
86
84
|
# Create sandbox backup
|
|
87
|
-
# @param
|
|
85
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
88
86
|
# @param [Hash] opts the optional parameters
|
|
89
87
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
90
88
|
# @return [Sandbox]
|
|
91
|
-
def create_backup(
|
|
92
|
-
data, _status_code, _headers = create_backup_with_http_info(
|
|
89
|
+
def create_backup(sandbox_id, opts = {})
|
|
90
|
+
data, _status_code, _headers = create_backup_with_http_info(sandbox_id, opts)
|
|
93
91
|
data
|
|
94
92
|
end
|
|
95
93
|
|
|
96
94
|
# Create sandbox backup
|
|
97
|
-
# @param
|
|
95
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
98
96
|
# @param [Hash] opts the optional parameters
|
|
99
97
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
100
98
|
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
101
|
-
def create_backup_with_http_info(
|
|
99
|
+
def create_backup_with_http_info(sandbox_id, opts = {})
|
|
102
100
|
if @api_client.config.debugging
|
|
103
101
|
@api_client.config.logger.debug 'Calling API: SandboxApi.create_backup ...'
|
|
104
102
|
end
|
|
105
|
-
# verify the required parameter '
|
|
106
|
-
if @api_client.config.client_side_validation &&
|
|
107
|
-
fail ArgumentError, "Missing the required parameter '
|
|
103
|
+
# verify the required parameter 'sandbox_id' is set
|
|
104
|
+
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
105
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.create_backup"
|
|
108
106
|
end
|
|
109
107
|
# resource path
|
|
110
|
-
local_var_path = '/sandbox/{
|
|
108
|
+
local_var_path = '/sandbox/{sandboxId}/backup'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
111
109
|
|
|
112
110
|
# query parameters
|
|
113
111
|
query_params = opts[:query_params] || {}
|
|
@@ -217,32 +215,32 @@ module DaytonaApiClient
|
|
|
217
215
|
end
|
|
218
216
|
|
|
219
217
|
# Create SSH access for sandbox
|
|
220
|
-
# @param
|
|
218
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
221
219
|
# @param [Hash] opts the optional parameters
|
|
222
220
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
223
221
|
# @option opts [Float] :expires_in_minutes Expiration time in minutes (default: 60)
|
|
224
222
|
# @return [SshAccessDto]
|
|
225
|
-
def create_ssh_access(
|
|
226
|
-
data, _status_code, _headers = create_ssh_access_with_http_info(
|
|
223
|
+
def create_ssh_access(sandbox_id, opts = {})
|
|
224
|
+
data, _status_code, _headers = create_ssh_access_with_http_info(sandbox_id, opts)
|
|
227
225
|
data
|
|
228
226
|
end
|
|
229
227
|
|
|
230
228
|
# Create SSH access for sandbox
|
|
231
|
-
# @param
|
|
229
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
232
230
|
# @param [Hash] opts the optional parameters
|
|
233
231
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
234
232
|
# @option opts [Float] :expires_in_minutes Expiration time in minutes (default: 60)
|
|
235
233
|
# @return [Array<(SshAccessDto, Integer, Hash)>] SshAccessDto data, response status code and response headers
|
|
236
|
-
def create_ssh_access_with_http_info(
|
|
234
|
+
def create_ssh_access_with_http_info(sandbox_id, opts = {})
|
|
237
235
|
if @api_client.config.debugging
|
|
238
236
|
@api_client.config.logger.debug 'Calling API: SandboxApi.create_ssh_access ...'
|
|
239
237
|
end
|
|
240
|
-
# verify the required parameter '
|
|
241
|
-
if @api_client.config.client_side_validation &&
|
|
242
|
-
fail ArgumentError, "Missing the required parameter '
|
|
238
|
+
# verify the required parameter 'sandbox_id' is set
|
|
239
|
+
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
240
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.create_ssh_access"
|
|
243
241
|
end
|
|
244
242
|
# resource path
|
|
245
|
-
local_var_path = '/sandbox/{
|
|
243
|
+
local_var_path = '/sandbox/{sandboxId}/ssh-access'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
246
244
|
|
|
247
245
|
# query parameters
|
|
248
246
|
query_params = opts[:query_params] || {}
|
|
@@ -284,38 +282,36 @@ module DaytonaApiClient
|
|
|
284
282
|
end
|
|
285
283
|
|
|
286
284
|
# Delete sandbox
|
|
287
|
-
# @param
|
|
285
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
288
286
|
# @param [Hash] opts the optional parameters
|
|
289
287
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
290
|
-
# @return [
|
|
291
|
-
def delete_sandbox(
|
|
292
|
-
|
|
293
|
-
|
|
288
|
+
# @return [nil]
|
|
289
|
+
def delete_sandbox(sandbox_id, opts = {})
|
|
290
|
+
delete_sandbox_with_http_info(sandbox_id, opts)
|
|
291
|
+
nil
|
|
294
292
|
end
|
|
295
293
|
|
|
296
294
|
# Delete sandbox
|
|
297
|
-
# @param
|
|
295
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
298
296
|
# @param [Hash] opts the optional parameters
|
|
299
297
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
300
|
-
# @return [Array<(
|
|
301
|
-
def delete_sandbox_with_http_info(
|
|
298
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
299
|
+
def delete_sandbox_with_http_info(sandbox_id, opts = {})
|
|
302
300
|
if @api_client.config.debugging
|
|
303
301
|
@api_client.config.logger.debug 'Calling API: SandboxApi.delete_sandbox ...'
|
|
304
302
|
end
|
|
305
|
-
# verify the required parameter '
|
|
306
|
-
if @api_client.config.client_side_validation &&
|
|
307
|
-
fail ArgumentError, "Missing the required parameter '
|
|
303
|
+
# verify the required parameter 'sandbox_id' is set
|
|
304
|
+
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
305
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.delete_sandbox"
|
|
308
306
|
end
|
|
309
307
|
# resource path
|
|
310
|
-
local_var_path = '/sandbox/{
|
|
308
|
+
local_var_path = '/sandbox/{sandboxId}'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
311
309
|
|
|
312
310
|
# query parameters
|
|
313
311
|
query_params = opts[:query_params] || {}
|
|
314
312
|
|
|
315
313
|
# header parameters
|
|
316
314
|
header_params = opts[:header_params] || {}
|
|
317
|
-
# HTTP header 'Accept' (if needed)
|
|
318
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
319
315
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
320
316
|
|
|
321
317
|
# form parameters
|
|
@@ -325,7 +321,7 @@ module DaytonaApiClient
|
|
|
325
321
|
post_body = opts[:debug_body]
|
|
326
322
|
|
|
327
323
|
# return_type
|
|
328
|
-
return_type = opts[:debug_return_type]
|
|
324
|
+
return_type = opts[:debug_return_type]
|
|
329
325
|
|
|
330
326
|
# auth_names
|
|
331
327
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
@@ -347,109 +343,33 @@ module DaytonaApiClient
|
|
|
347
343
|
return data, status_code, headers
|
|
348
344
|
end
|
|
349
345
|
|
|
350
|
-
# Expire signed preview URL for a sandbox port
|
|
351
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
352
|
-
# @param port [Integer] Port number to expire signed preview URL for
|
|
353
|
-
# @param token [String] Token to expire signed preview URL for
|
|
354
|
-
# @param [Hash] opts the optional parameters
|
|
355
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
356
|
-
# @return [nil]
|
|
357
|
-
def expire_signed_port_preview_url(sandbox_id_or_name, port, token, opts = {})
|
|
358
|
-
expire_signed_port_preview_url_with_http_info(sandbox_id_or_name, port, token, opts)
|
|
359
|
-
nil
|
|
360
|
-
end
|
|
361
|
-
|
|
362
|
-
# Expire signed preview URL for a sandbox port
|
|
363
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
364
|
-
# @param port [Integer] Port number to expire signed preview URL for
|
|
365
|
-
# @param token [String] Token to expire signed preview URL for
|
|
366
|
-
# @param [Hash] opts the optional parameters
|
|
367
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
368
|
-
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
369
|
-
def expire_signed_port_preview_url_with_http_info(sandbox_id_or_name, port, token, opts = {})
|
|
370
|
-
if @api_client.config.debugging
|
|
371
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.expire_signed_port_preview_url ...'
|
|
372
|
-
end
|
|
373
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
374
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
375
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.expire_signed_port_preview_url"
|
|
376
|
-
end
|
|
377
|
-
# verify the required parameter 'port' is set
|
|
378
|
-
if @api_client.config.client_side_validation && port.nil?
|
|
379
|
-
fail ArgumentError, "Missing the required parameter 'port' when calling SandboxApi.expire_signed_port_preview_url"
|
|
380
|
-
end
|
|
381
|
-
# verify the required parameter 'token' is set
|
|
382
|
-
if @api_client.config.client_side_validation && token.nil?
|
|
383
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling SandboxApi.expire_signed_port_preview_url"
|
|
384
|
-
end
|
|
385
|
-
# resource path
|
|
386
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/ports/{port}/signed-preview-url/{token}/expire'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s)).sub('{' + 'port' + '}', CGI.escape(port.to_s)).sub('{' + 'token' + '}', CGI.escape(token.to_s))
|
|
387
|
-
|
|
388
|
-
# query parameters
|
|
389
|
-
query_params = opts[:query_params] || {}
|
|
390
|
-
|
|
391
|
-
# header parameters
|
|
392
|
-
header_params = opts[:header_params] || {}
|
|
393
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
394
|
-
|
|
395
|
-
# form parameters
|
|
396
|
-
form_params = opts[:form_params] || {}
|
|
397
|
-
|
|
398
|
-
# http body (model)
|
|
399
|
-
post_body = opts[:debug_body]
|
|
400
|
-
|
|
401
|
-
# return_type
|
|
402
|
-
return_type = opts[:debug_return_type]
|
|
403
|
-
|
|
404
|
-
# auth_names
|
|
405
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
406
|
-
|
|
407
|
-
new_options = opts.merge(
|
|
408
|
-
:operation => :"SandboxApi.expire_signed_port_preview_url",
|
|
409
|
-
:header_params => header_params,
|
|
410
|
-
:query_params => query_params,
|
|
411
|
-
:form_params => form_params,
|
|
412
|
-
:body => post_body,
|
|
413
|
-
:auth_names => auth_names,
|
|
414
|
-
:return_type => return_type
|
|
415
|
-
)
|
|
416
|
-
|
|
417
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
418
|
-
if @api_client.config.debugging
|
|
419
|
-
@api_client.config.logger.debug "API called: SandboxApi#expire_signed_port_preview_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
420
|
-
end
|
|
421
|
-
return data, status_code, headers
|
|
422
|
-
end
|
|
423
|
-
|
|
424
346
|
# Get build logs
|
|
425
|
-
#
|
|
426
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
347
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
427
348
|
# @param [Hash] opts the optional parameters
|
|
428
349
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
429
350
|
# @option opts [Boolean] :follow Whether to follow the logs stream
|
|
430
351
|
# @return [nil]
|
|
431
|
-
def get_build_logs(
|
|
432
|
-
get_build_logs_with_http_info(
|
|
352
|
+
def get_build_logs(sandbox_id, opts = {})
|
|
353
|
+
get_build_logs_with_http_info(sandbox_id, opts)
|
|
433
354
|
nil
|
|
434
355
|
end
|
|
435
356
|
|
|
436
357
|
# Get build logs
|
|
437
|
-
#
|
|
438
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
358
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
439
359
|
# @param [Hash] opts the optional parameters
|
|
440
360
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
441
361
|
# @option opts [Boolean] :follow Whether to follow the logs stream
|
|
442
362
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
443
|
-
def get_build_logs_with_http_info(
|
|
363
|
+
def get_build_logs_with_http_info(sandbox_id, opts = {})
|
|
444
364
|
if @api_client.config.debugging
|
|
445
365
|
@api_client.config.logger.debug 'Calling API: SandboxApi.get_build_logs ...'
|
|
446
366
|
end
|
|
447
|
-
# verify the required parameter '
|
|
448
|
-
if @api_client.config.client_side_validation &&
|
|
449
|
-
fail ArgumentError, "Missing the required parameter '
|
|
367
|
+
# verify the required parameter 'sandbox_id' is set
|
|
368
|
+
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
369
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_build_logs"
|
|
450
370
|
end
|
|
451
371
|
# resource path
|
|
452
|
-
local_var_path = '/sandbox/{
|
|
372
|
+
local_var_path = '/sandbox/{sandboxId}/build-logs'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
453
373
|
|
|
454
374
|
# query parameters
|
|
455
375
|
query_params = opts[:query_params] || {}
|
|
@@ -488,101 +408,37 @@ module DaytonaApiClient
|
|
|
488
408
|
return data, status_code, headers
|
|
489
409
|
end
|
|
490
410
|
|
|
491
|
-
# Get build logs URL
|
|
492
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
493
|
-
# @param [Hash] opts the optional parameters
|
|
494
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
495
|
-
# @return [Url]
|
|
496
|
-
def get_build_logs_url(sandbox_id_or_name, opts = {})
|
|
497
|
-
data, _status_code, _headers = get_build_logs_url_with_http_info(sandbox_id_or_name, opts)
|
|
498
|
-
data
|
|
499
|
-
end
|
|
500
|
-
|
|
501
|
-
# Get build logs URL
|
|
502
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
503
|
-
# @param [Hash] opts the optional parameters
|
|
504
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
505
|
-
# @return [Array<(Url, Integer, Hash)>] Url data, response status code and response headers
|
|
506
|
-
def get_build_logs_url_with_http_info(sandbox_id_or_name, opts = {})
|
|
507
|
-
if @api_client.config.debugging
|
|
508
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.get_build_logs_url ...'
|
|
509
|
-
end
|
|
510
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
511
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
512
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_build_logs_url"
|
|
513
|
-
end
|
|
514
|
-
# resource path
|
|
515
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/build-logs-url'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
516
|
-
|
|
517
|
-
# query parameters
|
|
518
|
-
query_params = opts[:query_params] || {}
|
|
519
|
-
|
|
520
|
-
# header parameters
|
|
521
|
-
header_params = opts[:header_params] || {}
|
|
522
|
-
# HTTP header 'Accept' (if needed)
|
|
523
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
524
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
525
|
-
|
|
526
|
-
# form parameters
|
|
527
|
-
form_params = opts[:form_params] || {}
|
|
528
|
-
|
|
529
|
-
# http body (model)
|
|
530
|
-
post_body = opts[:debug_body]
|
|
531
|
-
|
|
532
|
-
# return_type
|
|
533
|
-
return_type = opts[:debug_return_type] || 'Url'
|
|
534
|
-
|
|
535
|
-
# auth_names
|
|
536
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
537
|
-
|
|
538
|
-
new_options = opts.merge(
|
|
539
|
-
:operation => :"SandboxApi.get_build_logs_url",
|
|
540
|
-
:header_params => header_params,
|
|
541
|
-
:query_params => query_params,
|
|
542
|
-
:form_params => form_params,
|
|
543
|
-
:body => post_body,
|
|
544
|
-
:auth_names => auth_names,
|
|
545
|
-
:return_type => return_type
|
|
546
|
-
)
|
|
547
|
-
|
|
548
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
549
|
-
if @api_client.config.debugging
|
|
550
|
-
@api_client.config.logger.debug "API called: SandboxApi#get_build_logs_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
551
|
-
end
|
|
552
|
-
return data, status_code, headers
|
|
553
|
-
end
|
|
554
|
-
|
|
555
411
|
# Get preview URL for a sandbox port
|
|
556
|
-
# @param
|
|
412
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
557
413
|
# @param port [Float] Port number to get preview URL for
|
|
558
414
|
# @param [Hash] opts the optional parameters
|
|
559
415
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
560
416
|
# @return [PortPreviewUrl]
|
|
561
|
-
def get_port_preview_url(
|
|
562
|
-
data, _status_code, _headers = get_port_preview_url_with_http_info(
|
|
417
|
+
def get_port_preview_url(sandbox_id, port, opts = {})
|
|
418
|
+
data, _status_code, _headers = get_port_preview_url_with_http_info(sandbox_id, port, opts)
|
|
563
419
|
data
|
|
564
420
|
end
|
|
565
421
|
|
|
566
422
|
# Get preview URL for a sandbox port
|
|
567
|
-
# @param
|
|
423
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
568
424
|
# @param port [Float] Port number to get preview URL for
|
|
569
425
|
# @param [Hash] opts the optional parameters
|
|
570
426
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
571
427
|
# @return [Array<(PortPreviewUrl, Integer, Hash)>] PortPreviewUrl data, response status code and response headers
|
|
572
|
-
def get_port_preview_url_with_http_info(
|
|
428
|
+
def get_port_preview_url_with_http_info(sandbox_id, port, opts = {})
|
|
573
429
|
if @api_client.config.debugging
|
|
574
430
|
@api_client.config.logger.debug 'Calling API: SandboxApi.get_port_preview_url ...'
|
|
575
431
|
end
|
|
576
|
-
# verify the required parameter '
|
|
577
|
-
if @api_client.config.client_side_validation &&
|
|
578
|
-
fail ArgumentError, "Missing the required parameter '
|
|
432
|
+
# verify the required parameter 'sandbox_id' is set
|
|
433
|
+
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
434
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_port_preview_url"
|
|
579
435
|
end
|
|
580
436
|
# verify the required parameter 'port' is set
|
|
581
437
|
if @api_client.config.client_side_validation && port.nil?
|
|
582
438
|
fail ArgumentError, "Missing the required parameter 'port' when calling SandboxApi.get_port_preview_url"
|
|
583
439
|
end
|
|
584
440
|
# resource path
|
|
585
|
-
local_var_path = '/sandbox/{
|
|
441
|
+
local_var_path = '/sandbox/{sandboxId}/ports/{port}/preview-url'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s)).sub('{' + 'port' + '}', CGI.escape(port.to_s))
|
|
586
442
|
|
|
587
443
|
# query parameters
|
|
588
444
|
query_params = opts[:query_params] || {}
|
|
@@ -623,32 +479,32 @@ module DaytonaApiClient
|
|
|
623
479
|
end
|
|
624
480
|
|
|
625
481
|
# Get sandbox details
|
|
626
|
-
# @param
|
|
482
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
627
483
|
# @param [Hash] opts the optional parameters
|
|
628
484
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
629
485
|
# @option opts [Boolean] :verbose Include verbose output
|
|
630
486
|
# @return [Sandbox]
|
|
631
|
-
def get_sandbox(
|
|
632
|
-
data, _status_code, _headers = get_sandbox_with_http_info(
|
|
487
|
+
def get_sandbox(sandbox_id, opts = {})
|
|
488
|
+
data, _status_code, _headers = get_sandbox_with_http_info(sandbox_id, opts)
|
|
633
489
|
data
|
|
634
490
|
end
|
|
635
491
|
|
|
636
492
|
# Get sandbox details
|
|
637
|
-
# @param
|
|
493
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
638
494
|
# @param [Hash] opts the optional parameters
|
|
639
495
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
640
496
|
# @option opts [Boolean] :verbose Include verbose output
|
|
641
497
|
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
642
|
-
def get_sandbox_with_http_info(
|
|
498
|
+
def get_sandbox_with_http_info(sandbox_id, opts = {})
|
|
643
499
|
if @api_client.config.debugging
|
|
644
500
|
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox ...'
|
|
645
501
|
end
|
|
646
|
-
# verify the required parameter '
|
|
647
|
-
if @api_client.config.client_side_validation &&
|
|
648
|
-
fail ArgumentError, "Missing the required parameter '
|
|
502
|
+
# verify the required parameter 'sandbox_id' is set
|
|
503
|
+
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
504
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_sandbox"
|
|
649
505
|
end
|
|
650
506
|
# resource path
|
|
651
|
-
local_var_path = '/sandbox/{
|
|
507
|
+
local_var_path = '/sandbox/{sandboxId}'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
652
508
|
|
|
653
509
|
# query parameters
|
|
654
510
|
query_params = opts[:query_params] || {}
|
|
@@ -689,107 +545,28 @@ module DaytonaApiClient
|
|
|
689
545
|
return data, status_code, headers
|
|
690
546
|
end
|
|
691
547
|
|
|
692
|
-
#
|
|
693
|
-
# @param [Hash] opts the optional parameters
|
|
694
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
695
|
-
# @option opts [String] :states Comma-separated list of sandbox states to filter by
|
|
696
|
-
# @option opts [Boolean] :skip_reconciling_sandboxes Skip sandboxes where state differs from desired state
|
|
697
|
-
# @return [Array<Sandbox>]
|
|
698
|
-
def get_sandboxes_for_runner(opts = {})
|
|
699
|
-
data, _status_code, _headers = get_sandboxes_for_runner_with_http_info(opts)
|
|
700
|
-
data
|
|
701
|
-
end
|
|
702
|
-
|
|
703
|
-
# Get sandboxes for the authenticated runner
|
|
704
|
-
# @param [Hash] opts the optional parameters
|
|
705
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
706
|
-
# @option opts [String] :states Comma-separated list of sandbox states to filter by
|
|
707
|
-
# @option opts [Boolean] :skip_reconciling_sandboxes Skip sandboxes where state differs from desired state
|
|
708
|
-
# @return [Array<(Array<Sandbox>, Integer, Hash)>] Array<Sandbox> data, response status code and response headers
|
|
709
|
-
def get_sandboxes_for_runner_with_http_info(opts = {})
|
|
710
|
-
if @api_client.config.debugging
|
|
711
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandboxes_for_runner ...'
|
|
712
|
-
end
|
|
713
|
-
# resource path
|
|
714
|
-
local_var_path = '/sandbox/for-runner'
|
|
715
|
-
|
|
716
|
-
# query parameters
|
|
717
|
-
query_params = opts[:query_params] || {}
|
|
718
|
-
query_params[:'states'] = opts[:'states'] if !opts[:'states'].nil?
|
|
719
|
-
query_params[:'skipReconcilingSandboxes'] = opts[:'skip_reconciling_sandboxes'] if !opts[:'skip_reconciling_sandboxes'].nil?
|
|
720
|
-
|
|
721
|
-
# header parameters
|
|
722
|
-
header_params = opts[:header_params] || {}
|
|
723
|
-
# HTTP header 'Accept' (if needed)
|
|
724
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
725
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
726
|
-
|
|
727
|
-
# form parameters
|
|
728
|
-
form_params = opts[:form_params] || {}
|
|
729
|
-
|
|
730
|
-
# http body (model)
|
|
731
|
-
post_body = opts[:debug_body]
|
|
732
|
-
|
|
733
|
-
# return_type
|
|
734
|
-
return_type = opts[:debug_return_type] || 'Array<Sandbox>'
|
|
735
|
-
|
|
736
|
-
# auth_names
|
|
737
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
738
|
-
|
|
739
|
-
new_options = opts.merge(
|
|
740
|
-
:operation => :"SandboxApi.get_sandboxes_for_runner",
|
|
741
|
-
:header_params => header_params,
|
|
742
|
-
:query_params => query_params,
|
|
743
|
-
:form_params => form_params,
|
|
744
|
-
:body => post_body,
|
|
745
|
-
:auth_names => auth_names,
|
|
746
|
-
:return_type => return_type
|
|
747
|
-
)
|
|
748
|
-
|
|
749
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
750
|
-
if @api_client.config.debugging
|
|
751
|
-
@api_client.config.logger.debug "API called: SandboxApi#get_sandboxes_for_runner\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
752
|
-
end
|
|
753
|
-
return data, status_code, headers
|
|
754
|
-
end
|
|
755
|
-
|
|
756
|
-
# Get signed preview URL for a sandbox port
|
|
757
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
758
|
-
# @param port [Integer] Port number to get signed preview URL for
|
|
548
|
+
# List all regions where sandboxes have been created
|
|
759
549
|
# @param [Hash] opts the optional parameters
|
|
760
550
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
761
|
-
# @
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
data, _status_code, _headers = get_signed_port_preview_url_with_http_info(sandbox_id_or_name, port, opts)
|
|
551
|
+
# @return [Array<Region>]
|
|
552
|
+
def get_sandbox_regions(opts = {})
|
|
553
|
+
data, _status_code, _headers = get_sandbox_regions_with_http_info(opts)
|
|
765
554
|
data
|
|
766
555
|
end
|
|
767
556
|
|
|
768
|
-
#
|
|
769
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
770
|
-
# @param port [Integer] Port number to get signed preview URL for
|
|
557
|
+
# List all regions where sandboxes have been created
|
|
771
558
|
# @param [Hash] opts the optional parameters
|
|
772
559
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
773
|
-
# @
|
|
774
|
-
|
|
775
|
-
def get_signed_port_preview_url_with_http_info(sandbox_id_or_name, port, opts = {})
|
|
560
|
+
# @return [Array<(Array<Region>, Integer, Hash)>] Array<Region> data, response status code and response headers
|
|
561
|
+
def get_sandbox_regions_with_http_info(opts = {})
|
|
776
562
|
if @api_client.config.debugging
|
|
777
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
778
|
-
end
|
|
779
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
780
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
781
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_signed_port_preview_url"
|
|
782
|
-
end
|
|
783
|
-
# verify the required parameter 'port' is set
|
|
784
|
-
if @api_client.config.client_side_validation && port.nil?
|
|
785
|
-
fail ArgumentError, "Missing the required parameter 'port' when calling SandboxApi.get_signed_port_preview_url"
|
|
563
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_regions ...'
|
|
786
564
|
end
|
|
787
565
|
# resource path
|
|
788
|
-
local_var_path = '/sandbox/
|
|
566
|
+
local_var_path = '/sandbox/regions'
|
|
789
567
|
|
|
790
568
|
# query parameters
|
|
791
569
|
query_params = opts[:query_params] || {}
|
|
792
|
-
query_params[:'expiresInSeconds'] = opts[:'expires_in_seconds'] if !opts[:'expires_in_seconds'].nil?
|
|
793
570
|
|
|
794
571
|
# header parameters
|
|
795
572
|
header_params = opts[:header_params] || {}
|
|
@@ -804,13 +581,13 @@ module DaytonaApiClient
|
|
|
804
581
|
post_body = opts[:debug_body]
|
|
805
582
|
|
|
806
583
|
# return_type
|
|
807
|
-
return_type = opts[:debug_return_type] || '
|
|
584
|
+
return_type = opts[:debug_return_type] || 'Array<Region>'
|
|
808
585
|
|
|
809
586
|
# auth_names
|
|
810
587
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
811
588
|
|
|
812
589
|
new_options = opts.merge(
|
|
813
|
-
:operation => :"SandboxApi.
|
|
590
|
+
:operation => :"SandboxApi.get_sandbox_regions",
|
|
814
591
|
:header_params => header_params,
|
|
815
592
|
:query_params => query_params,
|
|
816
593
|
:form_params => form_params,
|
|
@@ -821,39 +598,39 @@ module DaytonaApiClient
|
|
|
821
598
|
|
|
822
599
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
823
600
|
if @api_client.config.debugging
|
|
824
|
-
@api_client.config.logger.debug "API called: SandboxApi#
|
|
601
|
+
@api_client.config.logger.debug "API called: SandboxApi#get_sandbox_regions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
825
602
|
end
|
|
826
603
|
return data, status_code, headers
|
|
827
604
|
end
|
|
828
605
|
|
|
829
|
-
# Get
|
|
830
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
606
|
+
# Get sandboxes for the authenticated runner
|
|
831
607
|
# @param [Hash] opts the optional parameters
|
|
832
608
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
833
|
-
# @
|
|
834
|
-
|
|
835
|
-
|
|
609
|
+
# @option opts [String] :states Comma-separated list of sandbox states to filter by
|
|
610
|
+
# @option opts [Boolean] :skip_reconciling_sandboxes Skip sandboxes where state differs from desired state
|
|
611
|
+
# @return [Array<Sandbox>]
|
|
612
|
+
def get_sandboxes_for_runner(opts = {})
|
|
613
|
+
data, _status_code, _headers = get_sandboxes_for_runner_with_http_info(opts)
|
|
836
614
|
data
|
|
837
615
|
end
|
|
838
616
|
|
|
839
|
-
# Get
|
|
840
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
617
|
+
# Get sandboxes for the authenticated runner
|
|
841
618
|
# @param [Hash] opts the optional parameters
|
|
842
619
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
843
|
-
# @
|
|
844
|
-
|
|
620
|
+
# @option opts [String] :states Comma-separated list of sandbox states to filter by
|
|
621
|
+
# @option opts [Boolean] :skip_reconciling_sandboxes Skip sandboxes where state differs from desired state
|
|
622
|
+
# @return [Array<(Array<Sandbox>, Integer, Hash)>] Array<Sandbox> data, response status code and response headers
|
|
623
|
+
def get_sandboxes_for_runner_with_http_info(opts = {})
|
|
845
624
|
if @api_client.config.debugging
|
|
846
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
847
|
-
end
|
|
848
|
-
# verify the required parameter 'sandbox_id' is set
|
|
849
|
-
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
850
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_toolbox_proxy_url"
|
|
625
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandboxes_for_runner ...'
|
|
851
626
|
end
|
|
852
627
|
# resource path
|
|
853
|
-
local_var_path = '/sandbox/
|
|
628
|
+
local_var_path = '/sandbox/for-runner'
|
|
854
629
|
|
|
855
630
|
# query parameters
|
|
856
631
|
query_params = opts[:query_params] || {}
|
|
632
|
+
query_params[:'states'] = opts[:'states'] if !opts[:'states'].nil?
|
|
633
|
+
query_params[:'skipReconcilingSandboxes'] = opts[:'skip_reconciling_sandboxes'] if !opts[:'skip_reconciling_sandboxes'].nil?
|
|
857
634
|
|
|
858
635
|
# header parameters
|
|
859
636
|
header_params = opts[:header_params] || {}
|
|
@@ -868,13 +645,13 @@ module DaytonaApiClient
|
|
|
868
645
|
post_body = opts[:debug_body]
|
|
869
646
|
|
|
870
647
|
# return_type
|
|
871
|
-
return_type = opts[:debug_return_type] || '
|
|
648
|
+
return_type = opts[:debug_return_type] || 'Array<Sandbox>'
|
|
872
649
|
|
|
873
650
|
# auth_names
|
|
874
651
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
875
652
|
|
|
876
653
|
new_options = opts.merge(
|
|
877
|
-
:operation => :"SandboxApi.
|
|
654
|
+
:operation => :"SandboxApi.get_sandboxes_for_runner",
|
|
878
655
|
:header_params => header_params,
|
|
879
656
|
:query_params => query_params,
|
|
880
657
|
:form_params => form_params,
|
|
@@ -885,7 +662,7 @@ module DaytonaApiClient
|
|
|
885
662
|
|
|
886
663
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
887
664
|
if @api_client.config.debugging
|
|
888
|
-
@api_client.config.logger.debug "API called: SandboxApi#
|
|
665
|
+
@api_client.config.logger.debug "API called: SandboxApi#get_sandboxes_for_runner\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
889
666
|
end
|
|
890
667
|
return data, status_code, headers
|
|
891
668
|
end
|
|
@@ -963,7 +740,6 @@ module DaytonaApiClient
|
|
|
963
740
|
# @option opts [Float] :page Page number of the results (default to 1)
|
|
964
741
|
# @option opts [Float] :limit Number of results per page (default to 100)
|
|
965
742
|
# @option opts [String] :id Filter by partial ID match
|
|
966
|
-
# @option opts [String] :name Filter by partial name match
|
|
967
743
|
# @option opts [String] :labels JSON encoded labels to filter by
|
|
968
744
|
# @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
|
|
969
745
|
# @option opts [Array<String>] :states List of states to filter by
|
|
@@ -991,7 +767,6 @@ module DaytonaApiClient
|
|
|
991
767
|
# @option opts [Float] :page Page number of the results (default to 1)
|
|
992
768
|
# @option opts [Float] :limit Number of results per page (default to 100)
|
|
993
769
|
# @option opts [String] :id Filter by partial ID match
|
|
994
|
-
# @option opts [String] :name Filter by partial name match
|
|
995
770
|
# @option opts [String] :labels JSON encoded labels to filter by
|
|
996
771
|
# @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
|
|
997
772
|
# @option opts [Array<String>] :states List of states to filter by
|
|
@@ -1052,7 +827,7 @@ module DaytonaApiClient
|
|
|
1052
827
|
fail ArgumentError, 'invalid value for "opts[:"max_disk_gi_b"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
|
|
1053
828
|
end
|
|
1054
829
|
|
|
1055
|
-
allowable_values = ["id", "
|
|
830
|
+
allowable_values = ["id", "state", "snapshot", "region", "updatedAt", "createdAt"]
|
|
1056
831
|
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
|
1057
832
|
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
|
1058
833
|
end
|
|
@@ -1068,7 +843,6 @@ module DaytonaApiClient
|
|
|
1068
843
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
1069
844
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1070
845
|
query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
|
|
1071
|
-
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
1072
846
|
query_params[:'labels'] = opts[:'labels'] if !opts[:'labels'].nil?
|
|
1073
847
|
query_params[:'includeErroredDeleted'] = opts[:'include_errored_deleted'] if !opts[:'include_errored_deleted'].nil?
|
|
1074
848
|
query_params[:'states'] = @api_client.build_collection_param(opts[:'states'], :multi) if !opts[:'states'].nil?
|
|
@@ -1120,101 +894,37 @@ module DaytonaApiClient
|
|
|
1120
894
|
return data, status_code, headers
|
|
1121
895
|
end
|
|
1122
896
|
|
|
1123
|
-
# Recover sandbox from error state
|
|
1124
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
1125
|
-
# @param [Hash] opts the optional parameters
|
|
1126
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1127
|
-
# @return [Sandbox]
|
|
1128
|
-
def recover_sandbox(sandbox_id_or_name, opts = {})
|
|
1129
|
-
data, _status_code, _headers = recover_sandbox_with_http_info(sandbox_id_or_name, opts)
|
|
1130
|
-
data
|
|
1131
|
-
end
|
|
1132
|
-
|
|
1133
|
-
# Recover sandbox from error state
|
|
1134
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
1135
|
-
# @param [Hash] opts the optional parameters
|
|
1136
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1137
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
1138
|
-
def recover_sandbox_with_http_info(sandbox_id_or_name, opts = {})
|
|
1139
|
-
if @api_client.config.debugging
|
|
1140
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.recover_sandbox ...'
|
|
1141
|
-
end
|
|
1142
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
1143
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
1144
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.recover_sandbox"
|
|
1145
|
-
end
|
|
1146
|
-
# resource path
|
|
1147
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/recover'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
1148
|
-
|
|
1149
|
-
# query parameters
|
|
1150
|
-
query_params = opts[:query_params] || {}
|
|
1151
|
-
|
|
1152
|
-
# header parameters
|
|
1153
|
-
header_params = opts[:header_params] || {}
|
|
1154
|
-
# HTTP header 'Accept' (if needed)
|
|
1155
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1156
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1157
|
-
|
|
1158
|
-
# form parameters
|
|
1159
|
-
form_params = opts[:form_params] || {}
|
|
1160
|
-
|
|
1161
|
-
# http body (model)
|
|
1162
|
-
post_body = opts[:debug_body]
|
|
1163
|
-
|
|
1164
|
-
# return_type
|
|
1165
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
1166
|
-
|
|
1167
|
-
# auth_names
|
|
1168
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1169
|
-
|
|
1170
|
-
new_options = opts.merge(
|
|
1171
|
-
:operation => :"SandboxApi.recover_sandbox",
|
|
1172
|
-
:header_params => header_params,
|
|
1173
|
-
:query_params => query_params,
|
|
1174
|
-
:form_params => form_params,
|
|
1175
|
-
:body => post_body,
|
|
1176
|
-
:auth_names => auth_names,
|
|
1177
|
-
:return_type => return_type
|
|
1178
|
-
)
|
|
1179
|
-
|
|
1180
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1181
|
-
if @api_client.config.debugging
|
|
1182
|
-
@api_client.config.logger.debug "API called: SandboxApi#recover_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1183
|
-
end
|
|
1184
|
-
return data, status_code, headers
|
|
1185
|
-
end
|
|
1186
|
-
|
|
1187
897
|
# Replace sandbox labels
|
|
1188
|
-
# @param
|
|
898
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1189
899
|
# @param sandbox_labels [SandboxLabels]
|
|
1190
900
|
# @param [Hash] opts the optional parameters
|
|
1191
901
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1192
902
|
# @return [SandboxLabels]
|
|
1193
|
-
def replace_labels(
|
|
1194
|
-
data, _status_code, _headers = replace_labels_with_http_info(
|
|
903
|
+
def replace_labels(sandbox_id, sandbox_labels, opts = {})
|
|
904
|
+
data, _status_code, _headers = replace_labels_with_http_info(sandbox_id, sandbox_labels, opts)
|
|
1195
905
|
data
|
|
1196
906
|
end
|
|
1197
907
|
|
|
1198
908
|
# Replace sandbox labels
|
|
1199
|
-
# @param
|
|
909
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1200
910
|
# @param sandbox_labels [SandboxLabels]
|
|
1201
911
|
# @param [Hash] opts the optional parameters
|
|
1202
912
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1203
913
|
# @return [Array<(SandboxLabels, Integer, Hash)>] SandboxLabels data, response status code and response headers
|
|
1204
|
-
def replace_labels_with_http_info(
|
|
914
|
+
def replace_labels_with_http_info(sandbox_id, sandbox_labels, opts = {})
|
|
1205
915
|
if @api_client.config.debugging
|
|
1206
916
|
@api_client.config.logger.debug 'Calling API: SandboxApi.replace_labels ...'
|
|
1207
917
|
end
|
|
1208
|
-
# verify the required parameter '
|
|
1209
|
-
if @api_client.config.client_side_validation &&
|
|
1210
|
-
fail ArgumentError, "Missing the required parameter '
|
|
918
|
+
# verify the required parameter 'sandbox_id' is set
|
|
919
|
+
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
920
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.replace_labels"
|
|
1211
921
|
end
|
|
1212
922
|
# verify the required parameter 'sandbox_labels' is set
|
|
1213
923
|
if @api_client.config.client_side_validation && sandbox_labels.nil?
|
|
1214
924
|
fail ArgumentError, "Missing the required parameter 'sandbox_labels' when calling SandboxApi.replace_labels"
|
|
1215
925
|
end
|
|
1216
926
|
# resource path
|
|
1217
|
-
local_var_path = '/sandbox/{
|
|
927
|
+
local_var_path = '/sandbox/{sandboxId}/labels'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
1218
928
|
|
|
1219
929
|
# query parameters
|
|
1220
930
|
query_params = opts[:query_params] || {}
|
|
@@ -1260,32 +970,32 @@ module DaytonaApiClient
|
|
|
1260
970
|
end
|
|
1261
971
|
|
|
1262
972
|
# Revoke SSH access for sandbox
|
|
1263
|
-
# @param
|
|
973
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1264
974
|
# @param [Hash] opts the optional parameters
|
|
1265
975
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1266
976
|
# @option opts [String] :token SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.
|
|
1267
|
-
# @return [
|
|
1268
|
-
def revoke_ssh_access(
|
|
1269
|
-
|
|
1270
|
-
|
|
977
|
+
# @return [nil]
|
|
978
|
+
def revoke_ssh_access(sandbox_id, opts = {})
|
|
979
|
+
revoke_ssh_access_with_http_info(sandbox_id, opts)
|
|
980
|
+
nil
|
|
1271
981
|
end
|
|
1272
982
|
|
|
1273
983
|
# Revoke SSH access for sandbox
|
|
1274
|
-
# @param
|
|
984
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1275
985
|
# @param [Hash] opts the optional parameters
|
|
1276
986
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1277
987
|
# @option opts [String] :token SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.
|
|
1278
|
-
# @return [Array<(
|
|
1279
|
-
def revoke_ssh_access_with_http_info(
|
|
988
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
989
|
+
def revoke_ssh_access_with_http_info(sandbox_id, opts = {})
|
|
1280
990
|
if @api_client.config.debugging
|
|
1281
991
|
@api_client.config.logger.debug 'Calling API: SandboxApi.revoke_ssh_access ...'
|
|
1282
992
|
end
|
|
1283
|
-
# verify the required parameter '
|
|
1284
|
-
if @api_client.config.client_side_validation &&
|
|
1285
|
-
fail ArgumentError, "Missing the required parameter '
|
|
993
|
+
# verify the required parameter 'sandbox_id' is set
|
|
994
|
+
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
995
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.revoke_ssh_access"
|
|
1286
996
|
end
|
|
1287
997
|
# resource path
|
|
1288
|
-
local_var_path = '/sandbox/{
|
|
998
|
+
local_var_path = '/sandbox/{sandboxId}/ssh-access'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
1289
999
|
|
|
1290
1000
|
# query parameters
|
|
1291
1001
|
query_params = opts[:query_params] || {}
|
|
@@ -1293,8 +1003,6 @@ module DaytonaApiClient
|
|
|
1293
1003
|
|
|
1294
1004
|
# header parameters
|
|
1295
1005
|
header_params = opts[:header_params] || {}
|
|
1296
|
-
# HTTP header 'Accept' (if needed)
|
|
1297
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1298
1006
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1299
1007
|
|
|
1300
1008
|
# form parameters
|
|
@@ -1304,7 +1012,7 @@ module DaytonaApiClient
|
|
|
1304
1012
|
post_body = opts[:debug_body]
|
|
1305
1013
|
|
|
1306
1014
|
# return_type
|
|
1307
|
-
return_type = opts[:debug_return_type]
|
|
1015
|
+
return_type = opts[:debug_return_type]
|
|
1308
1016
|
|
|
1309
1017
|
# auth_names
|
|
1310
1018
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
@@ -1327,44 +1035,42 @@ module DaytonaApiClient
|
|
|
1327
1035
|
end
|
|
1328
1036
|
|
|
1329
1037
|
# Set sandbox auto-archive interval
|
|
1330
|
-
# @param
|
|
1038
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1331
1039
|
# @param interval [Float] Auto-archive interval in minutes (0 means the maximum interval will be used)
|
|
1332
1040
|
# @param [Hash] opts the optional parameters
|
|
1333
1041
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1334
|
-
# @return [
|
|
1335
|
-
def set_auto_archive_interval(
|
|
1336
|
-
|
|
1337
|
-
|
|
1042
|
+
# @return [nil]
|
|
1043
|
+
def set_auto_archive_interval(sandbox_id, interval, opts = {})
|
|
1044
|
+
set_auto_archive_interval_with_http_info(sandbox_id, interval, opts)
|
|
1045
|
+
nil
|
|
1338
1046
|
end
|
|
1339
1047
|
|
|
1340
1048
|
# Set sandbox auto-archive interval
|
|
1341
|
-
# @param
|
|
1049
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1342
1050
|
# @param interval [Float] Auto-archive interval in minutes (0 means the maximum interval will be used)
|
|
1343
1051
|
# @param [Hash] opts the optional parameters
|
|
1344
1052
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1345
|
-
# @return [Array<(
|
|
1346
|
-
def set_auto_archive_interval_with_http_info(
|
|
1053
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1054
|
+
def set_auto_archive_interval_with_http_info(sandbox_id, interval, opts = {})
|
|
1347
1055
|
if @api_client.config.debugging
|
|
1348
1056
|
@api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_archive_interval ...'
|
|
1349
1057
|
end
|
|
1350
|
-
# verify the required parameter '
|
|
1351
|
-
if @api_client.config.client_side_validation &&
|
|
1352
|
-
fail ArgumentError, "Missing the required parameter '
|
|
1058
|
+
# verify the required parameter 'sandbox_id' is set
|
|
1059
|
+
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
1060
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.set_auto_archive_interval"
|
|
1353
1061
|
end
|
|
1354
1062
|
# verify the required parameter 'interval' is set
|
|
1355
1063
|
if @api_client.config.client_side_validation && interval.nil?
|
|
1356
1064
|
fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_auto_archive_interval"
|
|
1357
1065
|
end
|
|
1358
1066
|
# resource path
|
|
1359
|
-
local_var_path = '/sandbox/{
|
|
1067
|
+
local_var_path = '/sandbox/{sandboxId}/autoarchive/{interval}'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s)).sub('{' + 'interval' + '}', CGI.escape(interval.to_s))
|
|
1360
1068
|
|
|
1361
1069
|
# query parameters
|
|
1362
1070
|
query_params = opts[:query_params] || {}
|
|
1363
1071
|
|
|
1364
1072
|
# header parameters
|
|
1365
1073
|
header_params = opts[:header_params] || {}
|
|
1366
|
-
# HTTP header 'Accept' (if needed)
|
|
1367
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1368
1074
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1369
1075
|
|
|
1370
1076
|
# form parameters
|
|
@@ -1374,7 +1080,7 @@ module DaytonaApiClient
|
|
|
1374
1080
|
post_body = opts[:debug_body]
|
|
1375
1081
|
|
|
1376
1082
|
# return_type
|
|
1377
|
-
return_type = opts[:debug_return_type]
|
|
1083
|
+
return_type = opts[:debug_return_type]
|
|
1378
1084
|
|
|
1379
1085
|
# auth_names
|
|
1380
1086
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
@@ -1397,44 +1103,42 @@ module DaytonaApiClient
|
|
|
1397
1103
|
end
|
|
1398
1104
|
|
|
1399
1105
|
# Set sandbox auto-delete interval
|
|
1400
|
-
# @param
|
|
1106
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1401
1107
|
# @param interval [Float] Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
|
|
1402
1108
|
# @param [Hash] opts the optional parameters
|
|
1403
1109
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1404
|
-
# @return [
|
|
1405
|
-
def set_auto_delete_interval(
|
|
1406
|
-
|
|
1407
|
-
|
|
1110
|
+
# @return [nil]
|
|
1111
|
+
def set_auto_delete_interval(sandbox_id, interval, opts = {})
|
|
1112
|
+
set_auto_delete_interval_with_http_info(sandbox_id, interval, opts)
|
|
1113
|
+
nil
|
|
1408
1114
|
end
|
|
1409
1115
|
|
|
1410
1116
|
# Set sandbox auto-delete interval
|
|
1411
|
-
# @param
|
|
1117
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1412
1118
|
# @param interval [Float] Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
|
|
1413
1119
|
# @param [Hash] opts the optional parameters
|
|
1414
1120
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1415
|
-
# @return [Array<(
|
|
1416
|
-
def set_auto_delete_interval_with_http_info(
|
|
1121
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1122
|
+
def set_auto_delete_interval_with_http_info(sandbox_id, interval, opts = {})
|
|
1417
1123
|
if @api_client.config.debugging
|
|
1418
1124
|
@api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_delete_interval ...'
|
|
1419
1125
|
end
|
|
1420
|
-
# verify the required parameter '
|
|
1421
|
-
if @api_client.config.client_side_validation &&
|
|
1422
|
-
fail ArgumentError, "Missing the required parameter '
|
|
1126
|
+
# verify the required parameter 'sandbox_id' is set
|
|
1127
|
+
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
1128
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.set_auto_delete_interval"
|
|
1423
1129
|
end
|
|
1424
1130
|
# verify the required parameter 'interval' is set
|
|
1425
1131
|
if @api_client.config.client_side_validation && interval.nil?
|
|
1426
1132
|
fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_auto_delete_interval"
|
|
1427
1133
|
end
|
|
1428
1134
|
# resource path
|
|
1429
|
-
local_var_path = '/sandbox/{
|
|
1135
|
+
local_var_path = '/sandbox/{sandboxId}/autodelete/{interval}'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s)).sub('{' + 'interval' + '}', CGI.escape(interval.to_s))
|
|
1430
1136
|
|
|
1431
1137
|
# query parameters
|
|
1432
1138
|
query_params = opts[:query_params] || {}
|
|
1433
1139
|
|
|
1434
1140
|
# header parameters
|
|
1435
1141
|
header_params = opts[:header_params] || {}
|
|
1436
|
-
# HTTP header 'Accept' (if needed)
|
|
1437
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1438
1142
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1439
1143
|
|
|
1440
1144
|
# form parameters
|
|
@@ -1444,7 +1148,7 @@ module DaytonaApiClient
|
|
|
1444
1148
|
post_body = opts[:debug_body]
|
|
1445
1149
|
|
|
1446
1150
|
# return_type
|
|
1447
|
-
return_type = opts[:debug_return_type]
|
|
1151
|
+
return_type = opts[:debug_return_type]
|
|
1448
1152
|
|
|
1449
1153
|
# auth_names
|
|
1450
1154
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
@@ -1467,44 +1171,42 @@ module DaytonaApiClient
|
|
|
1467
1171
|
end
|
|
1468
1172
|
|
|
1469
1173
|
# Set sandbox auto-stop interval
|
|
1470
|
-
# @param
|
|
1174
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1471
1175
|
# @param interval [Float] Auto-stop interval in minutes (0 to disable)
|
|
1472
1176
|
# @param [Hash] opts the optional parameters
|
|
1473
1177
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1474
|
-
# @return [
|
|
1475
|
-
def set_autostop_interval(
|
|
1476
|
-
|
|
1477
|
-
|
|
1178
|
+
# @return [nil]
|
|
1179
|
+
def set_autostop_interval(sandbox_id, interval, opts = {})
|
|
1180
|
+
set_autostop_interval_with_http_info(sandbox_id, interval, opts)
|
|
1181
|
+
nil
|
|
1478
1182
|
end
|
|
1479
1183
|
|
|
1480
1184
|
# Set sandbox auto-stop interval
|
|
1481
|
-
# @param
|
|
1185
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1482
1186
|
# @param interval [Float] Auto-stop interval in minutes (0 to disable)
|
|
1483
1187
|
# @param [Hash] opts the optional parameters
|
|
1484
1188
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1485
|
-
# @return [Array<(
|
|
1486
|
-
def set_autostop_interval_with_http_info(
|
|
1189
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1190
|
+
def set_autostop_interval_with_http_info(sandbox_id, interval, opts = {})
|
|
1487
1191
|
if @api_client.config.debugging
|
|
1488
1192
|
@api_client.config.logger.debug 'Calling API: SandboxApi.set_autostop_interval ...'
|
|
1489
1193
|
end
|
|
1490
|
-
# verify the required parameter '
|
|
1491
|
-
if @api_client.config.client_side_validation &&
|
|
1492
|
-
fail ArgumentError, "Missing the required parameter '
|
|
1194
|
+
# verify the required parameter 'sandbox_id' is set
|
|
1195
|
+
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
1196
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.set_autostop_interval"
|
|
1493
1197
|
end
|
|
1494
1198
|
# verify the required parameter 'interval' is set
|
|
1495
1199
|
if @api_client.config.client_side_validation && interval.nil?
|
|
1496
1200
|
fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_autostop_interval"
|
|
1497
1201
|
end
|
|
1498
1202
|
# resource path
|
|
1499
|
-
local_var_path = '/sandbox/{
|
|
1203
|
+
local_var_path = '/sandbox/{sandboxId}/autostop/{interval}'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s)).sub('{' + 'interval' + '}', CGI.escape(interval.to_s))
|
|
1500
1204
|
|
|
1501
1205
|
# query parameters
|
|
1502
1206
|
query_params = opts[:query_params] || {}
|
|
1503
1207
|
|
|
1504
1208
|
# header parameters
|
|
1505
1209
|
header_params = opts[:header_params] || {}
|
|
1506
|
-
# HTTP header 'Accept' (if needed)
|
|
1507
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1508
1210
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1509
1211
|
|
|
1510
1212
|
# form parameters
|
|
@@ -1514,7 +1216,7 @@ module DaytonaApiClient
|
|
|
1514
1216
|
post_body = opts[:debug_body]
|
|
1515
1217
|
|
|
1516
1218
|
# return_type
|
|
1517
|
-
return_type = opts[:debug_return_type]
|
|
1219
|
+
return_type = opts[:debug_return_type]
|
|
1518
1220
|
|
|
1519
1221
|
# auth_names
|
|
1520
1222
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
@@ -1537,30 +1239,30 @@ module DaytonaApiClient
|
|
|
1537
1239
|
end
|
|
1538
1240
|
|
|
1539
1241
|
# Start sandbox
|
|
1540
|
-
# @param
|
|
1242
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1541
1243
|
# @param [Hash] opts the optional parameters
|
|
1542
1244
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1543
1245
|
# @return [Sandbox]
|
|
1544
|
-
def start_sandbox(
|
|
1545
|
-
data, _status_code, _headers = start_sandbox_with_http_info(
|
|
1246
|
+
def start_sandbox(sandbox_id, opts = {})
|
|
1247
|
+
data, _status_code, _headers = start_sandbox_with_http_info(sandbox_id, opts)
|
|
1546
1248
|
data
|
|
1547
1249
|
end
|
|
1548
1250
|
|
|
1549
1251
|
# Start sandbox
|
|
1550
|
-
# @param
|
|
1252
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1551
1253
|
# @param [Hash] opts the optional parameters
|
|
1552
1254
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1553
1255
|
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
1554
|
-
def start_sandbox_with_http_info(
|
|
1256
|
+
def start_sandbox_with_http_info(sandbox_id, opts = {})
|
|
1555
1257
|
if @api_client.config.debugging
|
|
1556
1258
|
@api_client.config.logger.debug 'Calling API: SandboxApi.start_sandbox ...'
|
|
1557
1259
|
end
|
|
1558
|
-
# verify the required parameter '
|
|
1559
|
-
if @api_client.config.client_side_validation &&
|
|
1560
|
-
fail ArgumentError, "Missing the required parameter '
|
|
1260
|
+
# verify the required parameter 'sandbox_id' is set
|
|
1261
|
+
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
1262
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.start_sandbox"
|
|
1561
1263
|
end
|
|
1562
1264
|
# resource path
|
|
1563
|
-
local_var_path = '/sandbox/{
|
|
1265
|
+
local_var_path = '/sandbox/{sandboxId}/start'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
1564
1266
|
|
|
1565
1267
|
# query parameters
|
|
1566
1268
|
query_params = opts[:query_params] || {}
|
|
@@ -1601,94 +1303,30 @@ module DaytonaApiClient
|
|
|
1601
1303
|
end
|
|
1602
1304
|
|
|
1603
1305
|
# Stop sandbox
|
|
1604
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
1605
|
-
# @param [Hash] opts the optional parameters
|
|
1606
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1607
|
-
# @return [Sandbox]
|
|
1608
|
-
def stop_sandbox(sandbox_id_or_name, opts = {})
|
|
1609
|
-
data, _status_code, _headers = stop_sandbox_with_http_info(sandbox_id_or_name, opts)
|
|
1610
|
-
data
|
|
1611
|
-
end
|
|
1612
|
-
|
|
1613
|
-
# Stop sandbox
|
|
1614
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
1615
|
-
# @param [Hash] opts the optional parameters
|
|
1616
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1617
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
1618
|
-
def stop_sandbox_with_http_info(sandbox_id_or_name, opts = {})
|
|
1619
|
-
if @api_client.config.debugging
|
|
1620
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.stop_sandbox ...'
|
|
1621
|
-
end
|
|
1622
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
1623
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
1624
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.stop_sandbox"
|
|
1625
|
-
end
|
|
1626
|
-
# resource path
|
|
1627
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/stop'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
1628
|
-
|
|
1629
|
-
# query parameters
|
|
1630
|
-
query_params = opts[:query_params] || {}
|
|
1631
|
-
|
|
1632
|
-
# header parameters
|
|
1633
|
-
header_params = opts[:header_params] || {}
|
|
1634
|
-
# HTTP header 'Accept' (if needed)
|
|
1635
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1636
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1637
|
-
|
|
1638
|
-
# form parameters
|
|
1639
|
-
form_params = opts[:form_params] || {}
|
|
1640
|
-
|
|
1641
|
-
# http body (model)
|
|
1642
|
-
post_body = opts[:debug_body]
|
|
1643
|
-
|
|
1644
|
-
# return_type
|
|
1645
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
1646
|
-
|
|
1647
|
-
# auth_names
|
|
1648
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1649
|
-
|
|
1650
|
-
new_options = opts.merge(
|
|
1651
|
-
:operation => :"SandboxApi.stop_sandbox",
|
|
1652
|
-
:header_params => header_params,
|
|
1653
|
-
:query_params => query_params,
|
|
1654
|
-
:form_params => form_params,
|
|
1655
|
-
:body => post_body,
|
|
1656
|
-
:auth_names => auth_names,
|
|
1657
|
-
:return_type => return_type
|
|
1658
|
-
)
|
|
1659
|
-
|
|
1660
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1661
|
-
if @api_client.config.debugging
|
|
1662
|
-
@api_client.config.logger.debug "API called: SandboxApi#stop_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1663
|
-
end
|
|
1664
|
-
return data, status_code, headers
|
|
1665
|
-
end
|
|
1666
|
-
|
|
1667
|
-
# Update sandbox last activity
|
|
1668
1306
|
# @param sandbox_id [String] ID of the sandbox
|
|
1669
1307
|
# @param [Hash] opts the optional parameters
|
|
1670
1308
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1671
1309
|
# @return [nil]
|
|
1672
|
-
def
|
|
1673
|
-
|
|
1310
|
+
def stop_sandbox(sandbox_id, opts = {})
|
|
1311
|
+
stop_sandbox_with_http_info(sandbox_id, opts)
|
|
1674
1312
|
nil
|
|
1675
1313
|
end
|
|
1676
1314
|
|
|
1677
|
-
#
|
|
1315
|
+
# Stop sandbox
|
|
1678
1316
|
# @param sandbox_id [String] ID of the sandbox
|
|
1679
1317
|
# @param [Hash] opts the optional parameters
|
|
1680
1318
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1681
1319
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1682
|
-
def
|
|
1320
|
+
def stop_sandbox_with_http_info(sandbox_id, opts = {})
|
|
1683
1321
|
if @api_client.config.debugging
|
|
1684
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
1322
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.stop_sandbox ...'
|
|
1685
1323
|
end
|
|
1686
1324
|
# verify the required parameter 'sandbox_id' is set
|
|
1687
1325
|
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
1688
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.
|
|
1326
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.stop_sandbox"
|
|
1689
1327
|
end
|
|
1690
1328
|
# resource path
|
|
1691
|
-
local_var_path = '/sandbox/{sandboxId}/
|
|
1329
|
+
local_var_path = '/sandbox/{sandboxId}/stop'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
1692
1330
|
|
|
1693
1331
|
# query parameters
|
|
1694
1332
|
query_params = opts[:query_params] || {}
|
|
@@ -1710,7 +1348,7 @@ module DaytonaApiClient
|
|
|
1710
1348
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1711
1349
|
|
|
1712
1350
|
new_options = opts.merge(
|
|
1713
|
-
:operation => :"SandboxApi.
|
|
1351
|
+
:operation => :"SandboxApi.stop_sandbox",
|
|
1714
1352
|
:header_params => header_params,
|
|
1715
1353
|
:query_params => query_params,
|
|
1716
1354
|
:form_params => form_params,
|
|
@@ -1721,50 +1359,48 @@ module DaytonaApiClient
|
|
|
1721
1359
|
|
|
1722
1360
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1723
1361
|
if @api_client.config.debugging
|
|
1724
|
-
@api_client.config.logger.debug "API called: SandboxApi#
|
|
1362
|
+
@api_client.config.logger.debug "API called: SandboxApi#stop_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1725
1363
|
end
|
|
1726
1364
|
return data, status_code, headers
|
|
1727
1365
|
end
|
|
1728
1366
|
|
|
1729
1367
|
# Update public status
|
|
1730
|
-
# @param
|
|
1368
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1731
1369
|
# @param is_public [Boolean] Public status to set
|
|
1732
1370
|
# @param [Hash] opts the optional parameters
|
|
1733
1371
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1734
|
-
# @return [
|
|
1735
|
-
def update_public_status(
|
|
1736
|
-
|
|
1737
|
-
|
|
1372
|
+
# @return [nil]
|
|
1373
|
+
def update_public_status(sandbox_id, is_public, opts = {})
|
|
1374
|
+
update_public_status_with_http_info(sandbox_id, is_public, opts)
|
|
1375
|
+
nil
|
|
1738
1376
|
end
|
|
1739
1377
|
|
|
1740
1378
|
# Update public status
|
|
1741
|
-
# @param
|
|
1379
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1742
1380
|
# @param is_public [Boolean] Public status to set
|
|
1743
1381
|
# @param [Hash] opts the optional parameters
|
|
1744
1382
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1745
|
-
# @return [Array<(
|
|
1746
|
-
def update_public_status_with_http_info(
|
|
1383
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1384
|
+
def update_public_status_with_http_info(sandbox_id, is_public, opts = {})
|
|
1747
1385
|
if @api_client.config.debugging
|
|
1748
1386
|
@api_client.config.logger.debug 'Calling API: SandboxApi.update_public_status ...'
|
|
1749
1387
|
end
|
|
1750
|
-
# verify the required parameter '
|
|
1751
|
-
if @api_client.config.client_side_validation &&
|
|
1752
|
-
fail ArgumentError, "Missing the required parameter '
|
|
1388
|
+
# verify the required parameter 'sandbox_id' is set
|
|
1389
|
+
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
1390
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.update_public_status"
|
|
1753
1391
|
end
|
|
1754
1392
|
# verify the required parameter 'is_public' is set
|
|
1755
1393
|
if @api_client.config.client_side_validation && is_public.nil?
|
|
1756
1394
|
fail ArgumentError, "Missing the required parameter 'is_public' when calling SandboxApi.update_public_status"
|
|
1757
1395
|
end
|
|
1758
1396
|
# resource path
|
|
1759
|
-
local_var_path = '/sandbox/{
|
|
1397
|
+
local_var_path = '/sandbox/{sandboxId}/public/{isPublic}'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s)).sub('{' + 'isPublic' + '}', CGI.escape(is_public.to_s))
|
|
1760
1398
|
|
|
1761
1399
|
# query parameters
|
|
1762
1400
|
query_params = opts[:query_params] || {}
|
|
1763
1401
|
|
|
1764
1402
|
# header parameters
|
|
1765
1403
|
header_params = opts[:header_params] || {}
|
|
1766
|
-
# HTTP header 'Accept' (if needed)
|
|
1767
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1768
1404
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1769
1405
|
|
|
1770
1406
|
# form parameters
|
|
@@ -1774,7 +1410,7 @@ module DaytonaApiClient
|
|
|
1774
1410
|
post_body = opts[:debug_body]
|
|
1775
1411
|
|
|
1776
1412
|
# return_type
|
|
1777
|
-
return_type = opts[:debug_return_type]
|
|
1413
|
+
return_type = opts[:debug_return_type]
|
|
1778
1414
|
|
|
1779
1415
|
# auth_names
|
|
1780
1416
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|