daytona_api_client 0.167.0 → 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/api_keys_api.rb +1 -1
- data/lib/daytona_api_client/api/audit_api.rb +139 -9
- data/lib/daytona_api_client/api/docker_registry_api.rb +66 -5
- data/lib/daytona_api_client/api/health_api.rb +2 -53
- data/lib/daytona_api_client/api/organizations_api.rb +162 -953
- data/lib/daytona_api_client/api/preview_api.rb +7 -76
- data/lib/daytona_api_client/api/runners_api.rb +21 -408
- data/lib/daytona_api_client/api/sandbox_api.rb +214 -1462
- data/lib/daytona_api_client/api/snapshots_api.rb +110 -36
- data/lib/daytona_api_client/api/toolbox_api.rb +740 -740
- data/lib/daytona_api_client/api/users_api.rb +238 -1
- data/lib/daytona_api_client/api/volumes_api.rb +1 -1
- data/lib/daytona_api_client/api/webhooks_api.rb +267 -4
- data/lib/daytona_api_client/api/workspace_api.rb +5 -5
- data/lib/daytona_api_client/api_client.rb +1 -1
- data/lib/daytona_api_client/configuration.rb +1 -4
- data/lib/daytona_api_client/models/account_provider.rb +0 -2
- data/lib/daytona_api_client/models/announcement.rb +0 -2
- data/lib/daytona_api_client/models/api_key_list.rb +0 -2
- data/lib/daytona_api_client/models/api_key_response.rb +0 -2
- data/lib/daytona_api_client/models/audit_log.rb +1 -21
- data/lib/daytona_api_client/models/build_info.rb +4 -33
- data/lib/daytona_api_client/models/command.rb +0 -2
- data/lib/daytona_api_client/models/completion_context.rb +0 -2
- data/lib/daytona_api_client/models/completion_item.rb +0 -2
- data/lib/daytona_api_client/models/completion_list.rb +0 -2
- data/lib/daytona_api_client/models/compressed_screenshot_response.rb +0 -2
- data/lib/daytona_api_client/models/computer_use_start_response.rb +0 -2
- data/lib/daytona_api_client/models/computer_use_status_response.rb +0 -2
- data/lib/daytona_api_client/models/computer_use_stop_response.rb +0 -2
- data/lib/daytona_api_client/models/create_api_key.rb +1 -3
- data/lib/daytona_api_client/models/{job.rb → create_audit_log.rb} +79 -168
- data/lib/daytona_api_client/models/create_build_info.rb +0 -2
- data/lib/daytona_api_client/models/create_docker_registry.rb +65 -6
- data/lib/daytona_api_client/models/create_linked_account.rb +0 -2
- data/lib/daytona_api_client/models/create_organization.rb +4 -33
- data/lib/daytona_api_client/models/create_organization_invitation.rb +0 -2
- data/lib/daytona_api_client/models/create_organization_quota.rb +0 -2
- data/lib/daytona_api_client/models/create_organization_role.rb +0 -2
- data/lib/daytona_api_client/models/create_runner.rb +315 -33
- data/lib/daytona_api_client/models/create_sandbox.rb +1 -13
- data/lib/daytona_api_client/models/create_session_request.rb +0 -2
- data/lib/daytona_api_client/models/create_snapshot.rb +14 -16
- data/lib/daytona_api_client/models/create_user.rb +1 -12
- data/lib/daytona_api_client/models/create_volume.rb +0 -2
- data/lib/daytona_api_client/models/create_workspace.rb +0 -2
- data/lib/daytona_api_client/models/daytona_configuration.rb +4 -53
- data/lib/daytona_api_client/models/display_info_response.rb +0 -2
- data/lib/daytona_api_client/models/docker_registry.rb +0 -2
- data/lib/daytona_api_client/models/download_files.rb +0 -2
- data/lib/daytona_api_client/models/execute_request.rb +0 -2
- data/lib/daytona_api_client/models/execute_response.rb +0 -2
- data/lib/daytona_api_client/models/file_info.rb +0 -2
- data/lib/daytona_api_client/models/file_status.rb +0 -2
- data/lib/daytona_api_client/models/git_add_request.rb +0 -2
- data/lib/daytona_api_client/models/git_branch_request.rb +0 -2
- data/lib/daytona_api_client/models/git_checkout_request.rb +0 -2
- data/lib/daytona_api_client/models/git_clone_request.rb +0 -2
- data/lib/daytona_api_client/models/git_commit_info.rb +0 -2
- data/lib/daytona_api_client/models/git_commit_request.rb +0 -2
- data/lib/daytona_api_client/models/git_commit_response.rb +0 -2
- data/lib/daytona_api_client/models/git_delete_branch_request.rb +0 -2
- data/lib/daytona_api_client/models/git_repo_request.rb +0 -2
- data/lib/daytona_api_client/models/git_status.rb +0 -2
- data/lib/daytona_api_client/models/health_controller_check200_response.rb +0 -2
- data/lib/daytona_api_client/models/health_controller_check200_response_info_value.rb +0 -2
- data/lib/daytona_api_client/models/health_controller_check503_response.rb +0 -2
- data/lib/daytona_api_client/models/keyboard_hotkey_request.rb +0 -2
- data/lib/daytona_api_client/models/keyboard_press_request.rb +0 -2
- data/lib/daytona_api_client/models/keyboard_type_request.rb +0 -2
- data/lib/daytona_api_client/models/list_branch_response.rb +0 -2
- data/lib/daytona_api_client/models/lsp_completion_params.rb +0 -2
- data/lib/daytona_api_client/models/lsp_document_request.rb +0 -2
- data/lib/daytona_api_client/models/lsp_location.rb +0 -2
- data/lib/daytona_api_client/models/lsp_server_request.rb +0 -2
- data/lib/daytona_api_client/models/lsp_symbol.rb +0 -2
- data/lib/daytona_api_client/models/match.rb +0 -2
- data/lib/daytona_api_client/models/mouse_click_request.rb +0 -2
- data/lib/daytona_api_client/models/mouse_click_response.rb +0 -2
- data/lib/daytona_api_client/models/mouse_drag_request.rb +0 -2
- data/lib/daytona_api_client/models/mouse_drag_response.rb +0 -2
- data/lib/daytona_api_client/models/mouse_move_request.rb +0 -2
- data/lib/daytona_api_client/models/mouse_move_response.rb +0 -2
- data/lib/daytona_api_client/models/mouse_position.rb +0 -2
- data/lib/daytona_api_client/models/mouse_scroll_request.rb +0 -2
- data/lib/daytona_api_client/models/mouse_scroll_response.rb +0 -2
- data/lib/daytona_api_client/models/oidc_config.rb +0 -2
- data/lib/daytona_api_client/models/organization.rb +85 -148
- data/lib/daytona_api_client/models/organization_invitation.rb +0 -2
- data/lib/daytona_api_client/models/organization_role.rb +0 -2
- data/lib/daytona_api_client/models/organization_sandbox_default_limited_network_egress.rb +0 -2
- data/lib/daytona_api_client/models/organization_suspension.rb +5 -9
- data/lib/daytona_api_client/models/organization_usage_overview.rb +146 -20
- data/lib/daytona_api_client/models/organization_user.rb +0 -2
- data/lib/daytona_api_client/models/paginated_audit_logs.rb +4 -16
- data/lib/daytona_api_client/models/paginated_sandboxes.rb +0 -2
- data/lib/daytona_api_client/models/paginated_snapshots.rb +0 -2
- data/lib/daytona_api_client/models/{paginated_jobs.rb → paginated_snapshots_dto.rb} +4 -6
- data/lib/daytona_api_client/models/port_preview_url.rb +14 -33
- data/lib/daytona_api_client/models/position.rb +0 -2
- data/lib/daytona_api_client/models/posthog_config.rb +0 -2
- data/lib/daytona_api_client/models/process_errors_response.rb +0 -2
- data/lib/daytona_api_client/models/process_logs_response.rb +0 -2
- data/lib/daytona_api_client/models/process_restart_response.rb +0 -2
- data/lib/daytona_api_client/models/process_status_response.rb +0 -2
- data/lib/daytona_api_client/models/project_dir_response.rb +0 -2
- data/lib/daytona_api_client/models/pty_create_request.rb +0 -2
- data/lib/daytona_api_client/models/pty_create_response.rb +0 -2
- data/lib/daytona_api_client/models/pty_list_response.rb +0 -2
- data/lib/daytona_api_client/models/pty_resize_request.rb +0 -2
- data/lib/daytona_api_client/models/pty_session_info.rb +0 -2
- data/lib/daytona_api_client/models/range.rb +0 -2
- data/lib/daytona_api_client/models/region.rb +4 -180
- data/lib/daytona_api_client/models/region_screenshot_response.rb +0 -2
- data/lib/daytona_api_client/models/registry_push_access_dto.rb +0 -2
- data/lib/daytona_api_client/models/replace_request.rb +0 -2
- data/lib/daytona_api_client/models/replace_result.rb +0 -2
- data/lib/daytona_api_client/models/runner.rb +117 -108
- data/lib/daytona_api_client/models/runner_snapshot_dto.rb +17 -2
- data/lib/daytona_api_client/models/sandbox.rb +14 -80
- data/lib/daytona_api_client/models/sandbox_info.rb +0 -2
- data/lib/daytona_api_client/models/sandbox_labels.rb +0 -2
- data/lib/daytona_api_client/models/sandbox_state.rb +1 -4
- data/lib/daytona_api_client/models/sandbox_volume.rb +4 -16
- data/lib/daytona_api_client/models/screenshot_response.rb +0 -2
- data/lib/daytona_api_client/models/search_files_response.rb +0 -2
- data/lib/daytona_api_client/models/send_webhook_dto.rb +1 -25
- data/lib/daytona_api_client/models/session.rb +0 -2
- data/lib/daytona_api_client/models/session_execute_request.rb +0 -2
- data/lib/daytona_api_client/models/session_execute_response.rb +0 -2
- data/lib/daytona_api_client/models/set_snapshot_general_status_dto.rb +0 -2
- data/lib/daytona_api_client/models/snapshot_dto.rb +4 -38
- data/lib/daytona_api_client/models/snapshot_state.rb +4 -1
- data/lib/daytona_api_client/models/ssh_access_dto.rb +4 -33
- data/lib/daytona_api_client/models/ssh_access_validation_dto.rb +24 -6
- data/lib/daytona_api_client/models/storage_access_dto.rb +0 -2
- data/lib/daytona_api_client/models/update_docker_registry.rb +0 -2
- data/lib/daytona_api_client/models/update_organization_invitation.rb +0 -2
- data/lib/daytona_api_client/models/update_organization_member_access.rb +0 -2
- data/lib/daytona_api_client/models/update_organization_quota.rb +41 -92
- data/lib/daytona_api_client/models/update_organization_role.rb +0 -2
- data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +6 -28
- data/lib/daytona_api_client/models/user.rb +0 -2
- data/lib/daytona_api_client/models/user_home_dir_response.rb +0 -2
- data/lib/daytona_api_client/models/user_public_key.rb +0 -2
- data/lib/daytona_api_client/models/volume_dto.rb +0 -2
- data/lib/daytona_api_client/models/webhook_app_portal_access.rb +1 -30
- data/lib/daytona_api_client/models/{admin_get_webhook_status200_response.rb → webhook_controller_get_status200_response.rb} +3 -5
- data/lib/daytona_api_client/models/webhook_initialization_status.rb +0 -2
- data/lib/daytona_api_client/models/windows_response.rb +0 -2
- data/lib/daytona_api_client/models/work_dir_response.rb +0 -2
- data/lib/daytona_api_client/models/workspace.rb +27 -66
- data/lib/daytona_api_client/version.rb +1 -1
- data/lib/daytona_api_client.rb +2 -46
- data/project.json +11 -38
- metadata +6 -54
- data/.gitignore +0 -39
- data/.openapi-generator/FILES +0 -209
- 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 -1151
- 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 -387
- data/lib/daytona_api_client/models/create_region.rb +0 -271
- data/lib/daytona_api_client/models/create_region_response.rb +0 -282
- data/lib/daytona_api_client/models/create_runner_response.rb +0 -265
- data/lib/daytona_api_client/models/create_sandbox_snapshot.rb +0 -238
- data/lib/daytona_api_client/models/fork_sandbox.rb +0 -221
- data/lib/daytona_api_client/models/job_status.rb +0 -42
- data/lib/daytona_api_client/models/job_type.rb +0 -52
- data/lib/daytona_api_client/models/log_entry.rb +0 -407
- data/lib/daytona_api_client/models/metric_data_point.rb +0 -265
- data/lib/daytona_api_client/models/metric_series.rb +0 -267
- data/lib/daytona_api_client/models/metrics_response.rb +0 -240
- data/lib/daytona_api_client/models/otel_config.rb +0 -251
- data/lib/daytona_api_client/models/paginated_logs.rb +0 -321
- data/lib/daytona_api_client/models/paginated_traces.rb +0 -321
- data/lib/daytona_api_client/models/poll_jobs_response.rb +0 -240
- data/lib/daytona_api_client/models/rate_limit_config.rb +0 -251
- data/lib/daytona_api_client/models/rate_limit_entry.rb +0 -231
- data/lib/daytona_api_client/models/regenerate_api_key_response.rb +0 -238
- data/lib/daytona_api_client/models/region_quota.rb +0 -389
- data/lib/daytona_api_client/models/region_type.rb +0 -41
- data/lib/daytona_api_client/models/region_usage_overview.rb +0 -393
- data/lib/daytona_api_client/models/resize_sandbox.rb +0 -298
- data/lib/daytona_api_client/models/runner_class.rb +0 -40
- data/lib/daytona_api_client/models/runner_full.rb +0 -808
- data/lib/daytona_api_client/models/runner_health_metrics.rb +0 -535
- data/lib/daytona_api_client/models/runner_healthcheck.rb +0 -290
- data/lib/daytona_api_client/models/runner_service_health.rb +0 -275
- data/lib/daytona_api_client/models/signed_port_preview_url.rb +0 -319
- data/lib/daytona_api_client/models/snapshot_manager_credentials.rb +0 -265
- data/lib/daytona_api_client/models/toolbox_proxy_url.rb +0 -238
- data/lib/daytona_api_client/models/trace_span.rb +0 -405
- data/lib/daytona_api_client/models/trace_summary.rb +0 -383
- data/lib/daytona_api_client/models/update_job_status.rb +0 -280
- data/lib/daytona_api_client/models/update_organization_default_region.rb +0 -238
- data/lib/daytona_api_client/models/update_organization_region_quota.rb +0 -287
- data/lib/daytona_api_client/models/update_region.rb +0 -244
- data/lib/daytona_api_client/models/url.rb +0 -238
- data/lib/daytona_api_client/models/webhook_event.rb +0 -45
- data/lib/daytona_api_client/models/workspace_port_preview_url.rb +0 -265
|
@@ -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] || {}
|
|
@@ -183,7 +181,7 @@ module DaytonaApiClient
|
|
|
183
181
|
# HTTP header 'Content-Type'
|
|
184
182
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
185
183
|
if !content_type.nil?
|
|
186
|
-
|
|
184
|
+
header_params['Content-Type'] = content_type
|
|
187
185
|
end
|
|
188
186
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
189
187
|
|
|
@@ -216,108 +214,33 @@ module DaytonaApiClient
|
|
|
216
214
|
return data, status_code, headers
|
|
217
215
|
end
|
|
218
216
|
|
|
219
|
-
# Create a snapshot from a sandbox
|
|
220
|
-
# @param sandbox_id_or_name [String]
|
|
221
|
-
# @param create_sandbox_snapshot [CreateSandboxSnapshot]
|
|
222
|
-
# @param [Hash] opts the optional parameters
|
|
223
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
224
|
-
# @return [Sandbox]
|
|
225
|
-
def create_sandbox_snapshot(sandbox_id_or_name, create_sandbox_snapshot, opts = {})
|
|
226
|
-
data, _status_code, _headers = create_sandbox_snapshot_with_http_info(sandbox_id_or_name, create_sandbox_snapshot, opts)
|
|
227
|
-
data
|
|
228
|
-
end
|
|
229
|
-
|
|
230
|
-
# Create a snapshot from a sandbox
|
|
231
|
-
# @param sandbox_id_or_name [String]
|
|
232
|
-
# @param create_sandbox_snapshot [CreateSandboxSnapshot]
|
|
233
|
-
# @param [Hash] opts the optional parameters
|
|
234
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
235
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
236
|
-
def create_sandbox_snapshot_with_http_info(sandbox_id_or_name, create_sandbox_snapshot, opts = {})
|
|
237
|
-
if @api_client.config.debugging
|
|
238
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.create_sandbox_snapshot ...'
|
|
239
|
-
end
|
|
240
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
241
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
242
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.create_sandbox_snapshot"
|
|
243
|
-
end
|
|
244
|
-
# verify the required parameter 'create_sandbox_snapshot' is set
|
|
245
|
-
if @api_client.config.client_side_validation && create_sandbox_snapshot.nil?
|
|
246
|
-
fail ArgumentError, "Missing the required parameter 'create_sandbox_snapshot' when calling SandboxApi.create_sandbox_snapshot"
|
|
247
|
-
end
|
|
248
|
-
# resource path
|
|
249
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/snapshot'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
250
|
-
|
|
251
|
-
# query parameters
|
|
252
|
-
query_params = opts[:query_params] || {}
|
|
253
|
-
|
|
254
|
-
# header parameters
|
|
255
|
-
header_params = opts[:header_params] || {}
|
|
256
|
-
# HTTP header 'Accept' (if needed)
|
|
257
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
258
|
-
# HTTP header 'Content-Type'
|
|
259
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
260
|
-
if !content_type.nil?
|
|
261
|
-
header_params['Content-Type'] = content_type
|
|
262
|
-
end
|
|
263
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
264
|
-
|
|
265
|
-
# form parameters
|
|
266
|
-
form_params = opts[:form_params] || {}
|
|
267
|
-
|
|
268
|
-
# http body (model)
|
|
269
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_sandbox_snapshot)
|
|
270
|
-
|
|
271
|
-
# return_type
|
|
272
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
273
|
-
|
|
274
|
-
# auth_names
|
|
275
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
276
|
-
|
|
277
|
-
new_options = opts.merge(
|
|
278
|
-
:operation => :"SandboxApi.create_sandbox_snapshot",
|
|
279
|
-
:header_params => header_params,
|
|
280
|
-
:query_params => query_params,
|
|
281
|
-
:form_params => form_params,
|
|
282
|
-
:body => post_body,
|
|
283
|
-
:auth_names => auth_names,
|
|
284
|
-
:return_type => return_type
|
|
285
|
-
)
|
|
286
|
-
|
|
287
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
288
|
-
if @api_client.config.debugging
|
|
289
|
-
@api_client.config.logger.debug "API called: SandboxApi#create_sandbox_snapshot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
290
|
-
end
|
|
291
|
-
return data, status_code, headers
|
|
292
|
-
end
|
|
293
|
-
|
|
294
217
|
# Create SSH access for sandbox
|
|
295
|
-
# @param
|
|
218
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
296
219
|
# @param [Hash] opts the optional parameters
|
|
297
220
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
298
221
|
# @option opts [Float] :expires_in_minutes Expiration time in minutes (default: 60)
|
|
299
222
|
# @return [SshAccessDto]
|
|
300
|
-
def create_ssh_access(
|
|
301
|
-
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)
|
|
302
225
|
data
|
|
303
226
|
end
|
|
304
227
|
|
|
305
228
|
# Create SSH access for sandbox
|
|
306
|
-
# @param
|
|
229
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
307
230
|
# @param [Hash] opts the optional parameters
|
|
308
231
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
309
232
|
# @option opts [Float] :expires_in_minutes Expiration time in minutes (default: 60)
|
|
310
233
|
# @return [Array<(SshAccessDto, Integer, Hash)>] SshAccessDto data, response status code and response headers
|
|
311
|
-
def create_ssh_access_with_http_info(
|
|
234
|
+
def create_ssh_access_with_http_info(sandbox_id, opts = {})
|
|
312
235
|
if @api_client.config.debugging
|
|
313
236
|
@api_client.config.logger.debug 'Calling API: SandboxApi.create_ssh_access ...'
|
|
314
237
|
end
|
|
315
|
-
# verify the required parameter '
|
|
316
|
-
if @api_client.config.client_side_validation &&
|
|
317
|
-
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"
|
|
318
241
|
end
|
|
319
242
|
# resource path
|
|
320
|
-
local_var_path = '/sandbox/{
|
|
243
|
+
local_var_path = '/sandbox/{sandboxId}/ssh-access'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
321
244
|
|
|
322
245
|
# query parameters
|
|
323
246
|
query_params = opts[:query_params] || {}
|
|
@@ -359,38 +282,36 @@ module DaytonaApiClient
|
|
|
359
282
|
end
|
|
360
283
|
|
|
361
284
|
# Delete sandbox
|
|
362
|
-
# @param
|
|
285
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
363
286
|
# @param [Hash] opts the optional parameters
|
|
364
287
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
365
|
-
# @return [
|
|
366
|
-
def delete_sandbox(
|
|
367
|
-
|
|
368
|
-
|
|
288
|
+
# @return [nil]
|
|
289
|
+
def delete_sandbox(sandbox_id, opts = {})
|
|
290
|
+
delete_sandbox_with_http_info(sandbox_id, opts)
|
|
291
|
+
nil
|
|
369
292
|
end
|
|
370
293
|
|
|
371
294
|
# Delete sandbox
|
|
372
|
-
# @param
|
|
295
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
373
296
|
# @param [Hash] opts the optional parameters
|
|
374
297
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
375
|
-
# @return [Array<(
|
|
376
|
-
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 = {})
|
|
377
300
|
if @api_client.config.debugging
|
|
378
301
|
@api_client.config.logger.debug 'Calling API: SandboxApi.delete_sandbox ...'
|
|
379
302
|
end
|
|
380
|
-
# verify the required parameter '
|
|
381
|
-
if @api_client.config.client_side_validation &&
|
|
382
|
-
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"
|
|
383
306
|
end
|
|
384
307
|
# resource path
|
|
385
|
-
local_var_path = '/sandbox/{
|
|
308
|
+
local_var_path = '/sandbox/{sandboxId}'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
386
309
|
|
|
387
310
|
# query parameters
|
|
388
311
|
query_params = opts[:query_params] || {}
|
|
389
312
|
|
|
390
313
|
# header parameters
|
|
391
314
|
header_params = opts[:header_params] || {}
|
|
392
|
-
# HTTP header 'Accept' (if needed)
|
|
393
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
394
315
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
395
316
|
|
|
396
317
|
# form parameters
|
|
@@ -400,7 +321,7 @@ module DaytonaApiClient
|
|
|
400
321
|
post_body = opts[:debug_body]
|
|
401
322
|
|
|
402
323
|
# return_type
|
|
403
|
-
return_type = opts[:debug_return_type]
|
|
324
|
+
return_type = opts[:debug_return_type]
|
|
404
325
|
|
|
405
326
|
# auth_names
|
|
406
327
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
@@ -422,184 +343,33 @@ module DaytonaApiClient
|
|
|
422
343
|
return data, status_code, headers
|
|
423
344
|
end
|
|
424
345
|
|
|
425
|
-
# Expire signed preview URL for a sandbox port
|
|
426
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
427
|
-
# @param port [Integer] Port number to expire signed preview URL for
|
|
428
|
-
# @param token [String] Token to expire signed preview URL for
|
|
429
|
-
# @param [Hash] opts the optional parameters
|
|
430
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
431
|
-
# @return [nil]
|
|
432
|
-
def expire_signed_port_preview_url(sandbox_id_or_name, port, token, opts = {})
|
|
433
|
-
expire_signed_port_preview_url_with_http_info(sandbox_id_or_name, port, token, opts)
|
|
434
|
-
nil
|
|
435
|
-
end
|
|
436
|
-
|
|
437
|
-
# Expire signed preview URL for a sandbox port
|
|
438
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
439
|
-
# @param port [Integer] Port number to expire signed preview URL for
|
|
440
|
-
# @param token [String] Token to expire signed preview URL for
|
|
441
|
-
# @param [Hash] opts the optional parameters
|
|
442
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
443
|
-
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
444
|
-
def expire_signed_port_preview_url_with_http_info(sandbox_id_or_name, port, token, opts = {})
|
|
445
|
-
if @api_client.config.debugging
|
|
446
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.expire_signed_port_preview_url ...'
|
|
447
|
-
end
|
|
448
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
449
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
450
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.expire_signed_port_preview_url"
|
|
451
|
-
end
|
|
452
|
-
# verify the required parameter 'port' is set
|
|
453
|
-
if @api_client.config.client_side_validation && port.nil?
|
|
454
|
-
fail ArgumentError, "Missing the required parameter 'port' when calling SandboxApi.expire_signed_port_preview_url"
|
|
455
|
-
end
|
|
456
|
-
# verify the required parameter 'token' is set
|
|
457
|
-
if @api_client.config.client_side_validation && token.nil?
|
|
458
|
-
fail ArgumentError, "Missing the required parameter 'token' when calling SandboxApi.expire_signed_port_preview_url"
|
|
459
|
-
end
|
|
460
|
-
# resource path
|
|
461
|
-
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))
|
|
462
|
-
|
|
463
|
-
# query parameters
|
|
464
|
-
query_params = opts[:query_params] || {}
|
|
465
|
-
|
|
466
|
-
# header parameters
|
|
467
|
-
header_params = opts[:header_params] || {}
|
|
468
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
469
|
-
|
|
470
|
-
# form parameters
|
|
471
|
-
form_params = opts[:form_params] || {}
|
|
472
|
-
|
|
473
|
-
# http body (model)
|
|
474
|
-
post_body = opts[:debug_body]
|
|
475
|
-
|
|
476
|
-
# return_type
|
|
477
|
-
return_type = opts[:debug_return_type]
|
|
478
|
-
|
|
479
|
-
# auth_names
|
|
480
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
481
|
-
|
|
482
|
-
new_options = opts.merge(
|
|
483
|
-
:operation => :"SandboxApi.expire_signed_port_preview_url",
|
|
484
|
-
:header_params => header_params,
|
|
485
|
-
:query_params => query_params,
|
|
486
|
-
:form_params => form_params,
|
|
487
|
-
:body => post_body,
|
|
488
|
-
:auth_names => auth_names,
|
|
489
|
-
:return_type => return_type
|
|
490
|
-
)
|
|
491
|
-
|
|
492
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
493
|
-
if @api_client.config.debugging
|
|
494
|
-
@api_client.config.logger.debug "API called: SandboxApi#expire_signed_port_preview_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
495
|
-
end
|
|
496
|
-
return data, status_code, headers
|
|
497
|
-
end
|
|
498
|
-
|
|
499
|
-
# Fork a sandbox
|
|
500
|
-
# @param sandbox_id_or_name [String]
|
|
501
|
-
# @param fork_sandbox [ForkSandbox]
|
|
502
|
-
# @param [Hash] opts the optional parameters
|
|
503
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
504
|
-
# @return [Sandbox]
|
|
505
|
-
def fork_sandbox(sandbox_id_or_name, fork_sandbox, opts = {})
|
|
506
|
-
data, _status_code, _headers = fork_sandbox_with_http_info(sandbox_id_or_name, fork_sandbox, opts)
|
|
507
|
-
data
|
|
508
|
-
end
|
|
509
|
-
|
|
510
|
-
# Fork a sandbox
|
|
511
|
-
# @param sandbox_id_or_name [String]
|
|
512
|
-
# @param fork_sandbox [ForkSandbox]
|
|
513
|
-
# @param [Hash] opts the optional parameters
|
|
514
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
515
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
516
|
-
def fork_sandbox_with_http_info(sandbox_id_or_name, fork_sandbox, opts = {})
|
|
517
|
-
if @api_client.config.debugging
|
|
518
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.fork_sandbox ...'
|
|
519
|
-
end
|
|
520
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
521
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
522
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.fork_sandbox"
|
|
523
|
-
end
|
|
524
|
-
# verify the required parameter 'fork_sandbox' is set
|
|
525
|
-
if @api_client.config.client_side_validation && fork_sandbox.nil?
|
|
526
|
-
fail ArgumentError, "Missing the required parameter 'fork_sandbox' when calling SandboxApi.fork_sandbox"
|
|
527
|
-
end
|
|
528
|
-
# resource path
|
|
529
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/fork'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
530
|
-
|
|
531
|
-
# query parameters
|
|
532
|
-
query_params = opts[:query_params] || {}
|
|
533
|
-
|
|
534
|
-
# header parameters
|
|
535
|
-
header_params = opts[:header_params] || {}
|
|
536
|
-
# HTTP header 'Accept' (if needed)
|
|
537
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
538
|
-
# HTTP header 'Content-Type'
|
|
539
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
540
|
-
if !content_type.nil?
|
|
541
|
-
header_params['Content-Type'] = content_type
|
|
542
|
-
end
|
|
543
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
544
|
-
|
|
545
|
-
# form parameters
|
|
546
|
-
form_params = opts[:form_params] || {}
|
|
547
|
-
|
|
548
|
-
# http body (model)
|
|
549
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(fork_sandbox)
|
|
550
|
-
|
|
551
|
-
# return_type
|
|
552
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
553
|
-
|
|
554
|
-
# auth_names
|
|
555
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
556
|
-
|
|
557
|
-
new_options = opts.merge(
|
|
558
|
-
:operation => :"SandboxApi.fork_sandbox",
|
|
559
|
-
:header_params => header_params,
|
|
560
|
-
:query_params => query_params,
|
|
561
|
-
:form_params => form_params,
|
|
562
|
-
:body => post_body,
|
|
563
|
-
:auth_names => auth_names,
|
|
564
|
-
:return_type => return_type
|
|
565
|
-
)
|
|
566
|
-
|
|
567
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
568
|
-
if @api_client.config.debugging
|
|
569
|
-
@api_client.config.logger.debug "API called: SandboxApi#fork_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
570
|
-
end
|
|
571
|
-
return data, status_code, headers
|
|
572
|
-
end
|
|
573
|
-
|
|
574
346
|
# Get build logs
|
|
575
|
-
#
|
|
576
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
347
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
577
348
|
# @param [Hash] opts the optional parameters
|
|
578
349
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
579
350
|
# @option opts [Boolean] :follow Whether to follow the logs stream
|
|
580
351
|
# @return [nil]
|
|
581
|
-
def get_build_logs(
|
|
582
|
-
get_build_logs_with_http_info(
|
|
352
|
+
def get_build_logs(sandbox_id, opts = {})
|
|
353
|
+
get_build_logs_with_http_info(sandbox_id, opts)
|
|
583
354
|
nil
|
|
584
355
|
end
|
|
585
356
|
|
|
586
357
|
# Get build logs
|
|
587
|
-
#
|
|
588
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
358
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
589
359
|
# @param [Hash] opts the optional parameters
|
|
590
360
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
591
361
|
# @option opts [Boolean] :follow Whether to follow the logs stream
|
|
592
362
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
593
|
-
def get_build_logs_with_http_info(
|
|
363
|
+
def get_build_logs_with_http_info(sandbox_id, opts = {})
|
|
594
364
|
if @api_client.config.debugging
|
|
595
365
|
@api_client.config.logger.debug 'Calling API: SandboxApi.get_build_logs ...'
|
|
596
366
|
end
|
|
597
|
-
# verify the required parameter '
|
|
598
|
-
if @api_client.config.client_side_validation &&
|
|
599
|
-
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"
|
|
600
370
|
end
|
|
601
371
|
# resource path
|
|
602
|
-
local_var_path = '/sandbox/{
|
|
372
|
+
local_var_path = '/sandbox/{sandboxId}/build-logs'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
603
373
|
|
|
604
374
|
# query parameters
|
|
605
375
|
query_params = opts[:query_params] || {}
|
|
@@ -638,31 +408,37 @@ module DaytonaApiClient
|
|
|
638
408
|
return data, status_code, headers
|
|
639
409
|
end
|
|
640
410
|
|
|
641
|
-
# Get
|
|
642
|
-
# @param
|
|
411
|
+
# Get preview URL for a sandbox port
|
|
412
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
413
|
+
# @param port [Float] Port number to get preview URL for
|
|
643
414
|
# @param [Hash] opts the optional parameters
|
|
644
415
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
645
|
-
# @return [
|
|
646
|
-
def
|
|
647
|
-
data, _status_code, _headers =
|
|
416
|
+
# @return [PortPreviewUrl]
|
|
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)
|
|
648
419
|
data
|
|
649
420
|
end
|
|
650
421
|
|
|
651
|
-
# Get
|
|
652
|
-
# @param
|
|
422
|
+
# Get preview URL for a sandbox port
|
|
423
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
424
|
+
# @param port [Float] Port number to get preview URL for
|
|
653
425
|
# @param [Hash] opts the optional parameters
|
|
654
426
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
655
|
-
# @return [Array<(
|
|
656
|
-
def
|
|
427
|
+
# @return [Array<(PortPreviewUrl, Integer, Hash)>] PortPreviewUrl data, response status code and response headers
|
|
428
|
+
def get_port_preview_url_with_http_info(sandbox_id, port, opts = {})
|
|
657
429
|
if @api_client.config.debugging
|
|
658
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
430
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.get_port_preview_url ...'
|
|
431
|
+
end
|
|
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"
|
|
659
435
|
end
|
|
660
|
-
# verify the required parameter '
|
|
661
|
-
if @api_client.config.client_side_validation &&
|
|
662
|
-
fail ArgumentError, "Missing the required parameter '
|
|
436
|
+
# verify the required parameter 'port' is set
|
|
437
|
+
if @api_client.config.client_side_validation && port.nil?
|
|
438
|
+
fail ArgumentError, "Missing the required parameter 'port' when calling SandboxApi.get_port_preview_url"
|
|
663
439
|
end
|
|
664
440
|
# resource path
|
|
665
|
-
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))
|
|
666
442
|
|
|
667
443
|
# query parameters
|
|
668
444
|
query_params = opts[:query_params] || {}
|
|
@@ -680,13 +456,13 @@ module DaytonaApiClient
|
|
|
680
456
|
post_body = opts[:debug_body]
|
|
681
457
|
|
|
682
458
|
# return_type
|
|
683
|
-
return_type = opts[:debug_return_type] || '
|
|
459
|
+
return_type = opts[:debug_return_type] || 'PortPreviewUrl'
|
|
684
460
|
|
|
685
461
|
# auth_names
|
|
686
462
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
687
463
|
|
|
688
464
|
new_options = opts.merge(
|
|
689
|
-
:operation => :"SandboxApi.
|
|
465
|
+
:operation => :"SandboxApi.get_port_preview_url",
|
|
690
466
|
:header_params => header_params,
|
|
691
467
|
:query_params => query_params,
|
|
692
468
|
:form_params => form_params,
|
|
@@ -697,39 +473,42 @@ module DaytonaApiClient
|
|
|
697
473
|
|
|
698
474
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
699
475
|
if @api_client.config.debugging
|
|
700
|
-
@api_client.config.logger.debug "API called: SandboxApi#
|
|
476
|
+
@api_client.config.logger.debug "API called: SandboxApi#get_port_preview_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
701
477
|
end
|
|
702
478
|
return data, status_code, headers
|
|
703
479
|
end
|
|
704
480
|
|
|
705
|
-
# Get
|
|
481
|
+
# Get sandbox details
|
|
706
482
|
# @param sandbox_id [String] ID of the sandbox
|
|
707
483
|
# @param [Hash] opts the optional parameters
|
|
708
484
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
709
|
-
# @
|
|
710
|
-
|
|
711
|
-
|
|
485
|
+
# @option opts [Boolean] :verbose Include verbose output
|
|
486
|
+
# @return [Sandbox]
|
|
487
|
+
def get_sandbox(sandbox_id, opts = {})
|
|
488
|
+
data, _status_code, _headers = get_sandbox_with_http_info(sandbox_id, opts)
|
|
712
489
|
data
|
|
713
490
|
end
|
|
714
491
|
|
|
715
|
-
# Get
|
|
492
|
+
# Get sandbox details
|
|
716
493
|
# @param sandbox_id [String] ID of the sandbox
|
|
717
494
|
# @param [Hash] opts the optional parameters
|
|
718
495
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
719
|
-
# @
|
|
720
|
-
|
|
496
|
+
# @option opts [Boolean] :verbose Include verbose output
|
|
497
|
+
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
498
|
+
def get_sandbox_with_http_info(sandbox_id, opts = {})
|
|
721
499
|
if @api_client.config.debugging
|
|
722
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
500
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox ...'
|
|
723
501
|
end
|
|
724
502
|
# verify the required parameter 'sandbox_id' is set
|
|
725
503
|
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
726
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.
|
|
504
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_sandbox"
|
|
727
505
|
end
|
|
728
506
|
# resource path
|
|
729
|
-
local_var_path = '/sandbox/{sandboxId}
|
|
507
|
+
local_var_path = '/sandbox/{sandboxId}'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
730
508
|
|
|
731
509
|
# query parameters
|
|
732
510
|
query_params = opts[:query_params] || {}
|
|
511
|
+
query_params[:'verbose'] = opts[:'verbose'] if !opts[:'verbose'].nil?
|
|
733
512
|
|
|
734
513
|
# header parameters
|
|
735
514
|
header_params = opts[:header_params] || {}
|
|
@@ -744,13 +523,13 @@ module DaytonaApiClient
|
|
|
744
523
|
post_body = opts[:debug_body]
|
|
745
524
|
|
|
746
525
|
# return_type
|
|
747
|
-
return_type = opts[:debug_return_type] || '
|
|
526
|
+
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
748
527
|
|
|
749
528
|
# auth_names
|
|
750
529
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
751
530
|
|
|
752
531
|
new_options = opts.merge(
|
|
753
|
-
:operation => :"SandboxApi.
|
|
532
|
+
:operation => :"SandboxApi.get_sandbox",
|
|
754
533
|
:header_params => header_params,
|
|
755
534
|
:query_params => query_params,
|
|
756
535
|
:form_params => form_params,
|
|
@@ -761,42 +540,30 @@ module DaytonaApiClient
|
|
|
761
540
|
|
|
762
541
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
763
542
|
if @api_client.config.debugging
|
|
764
|
-
@api_client.config.logger.debug "API called: SandboxApi#
|
|
543
|
+
@api_client.config.logger.debug "API called: SandboxApi#get_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
765
544
|
end
|
|
766
545
|
return data, status_code, headers
|
|
767
546
|
end
|
|
768
547
|
|
|
769
|
-
#
|
|
770
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
771
|
-
# @param port [Float] Port number to get preview URL for
|
|
548
|
+
# List all regions where sandboxes have been created
|
|
772
549
|
# @param [Hash] opts the optional parameters
|
|
773
550
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
774
|
-
# @return [
|
|
775
|
-
def
|
|
776
|
-
data, _status_code, _headers =
|
|
551
|
+
# @return [Array<Region>]
|
|
552
|
+
def get_sandbox_regions(opts = {})
|
|
553
|
+
data, _status_code, _headers = get_sandbox_regions_with_http_info(opts)
|
|
777
554
|
data
|
|
778
555
|
end
|
|
779
556
|
|
|
780
|
-
#
|
|
781
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
782
|
-
# @param port [Float] Port number to get preview URL for
|
|
557
|
+
# List all regions where sandboxes have been created
|
|
783
558
|
# @param [Hash] opts the optional parameters
|
|
784
559
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
785
|
-
# @return [Array<(
|
|
786
|
-
def
|
|
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 = {})
|
|
787
562
|
if @api_client.config.debugging
|
|
788
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
789
|
-
end
|
|
790
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
791
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
792
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_port_preview_url"
|
|
793
|
-
end
|
|
794
|
-
# verify the required parameter 'port' is set
|
|
795
|
-
if @api_client.config.client_side_validation && port.nil?
|
|
796
|
-
fail ArgumentError, "Missing the required parameter 'port' when calling SandboxApi.get_port_preview_url"
|
|
563
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_regions ...'
|
|
797
564
|
end
|
|
798
565
|
# resource path
|
|
799
|
-
local_var_path = '/sandbox/
|
|
566
|
+
local_var_path = '/sandbox/regions'
|
|
800
567
|
|
|
801
568
|
# query parameters
|
|
802
569
|
query_params = opts[:query_params] || {}
|
|
@@ -814,13 +581,13 @@ module DaytonaApiClient
|
|
|
814
581
|
post_body = opts[:debug_body]
|
|
815
582
|
|
|
816
583
|
# return_type
|
|
817
|
-
return_type = opts[:debug_return_type] || '
|
|
584
|
+
return_type = opts[:debug_return_type] || 'Array<Region>'
|
|
818
585
|
|
|
819
586
|
# auth_names
|
|
820
587
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
821
588
|
|
|
822
589
|
new_options = opts.merge(
|
|
823
|
-
:operation => :"SandboxApi.
|
|
590
|
+
:operation => :"SandboxApi.get_sandbox_regions",
|
|
824
591
|
:header_params => header_params,
|
|
825
592
|
:query_params => query_params,
|
|
826
593
|
:form_params => form_params,
|
|
@@ -831,671 +598,12 @@ module DaytonaApiClient
|
|
|
831
598
|
|
|
832
599
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
833
600
|
if @api_client.config.debugging
|
|
834
|
-
@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}"
|
|
835
602
|
end
|
|
836
603
|
return data, status_code, headers
|
|
837
604
|
end
|
|
838
605
|
|
|
839
|
-
# Get
|
|
840
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
841
|
-
# @param [Hash] opts the optional parameters
|
|
842
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
843
|
-
# @return [RegionQuota]
|
|
844
|
-
def get_region_quota_by_sandbox_id(sandbox_id, opts = {})
|
|
845
|
-
data, _status_code, _headers = get_region_quota_by_sandbox_id_with_http_info(sandbox_id, opts)
|
|
846
|
-
data
|
|
847
|
-
end
|
|
848
|
-
|
|
849
|
-
# Get region quota by sandbox ID
|
|
850
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
851
|
-
# @param [Hash] opts the optional parameters
|
|
852
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
853
|
-
# @return [Array<(RegionQuota, Integer, Hash)>] RegionQuota data, response status code and response headers
|
|
854
|
-
def get_region_quota_by_sandbox_id_with_http_info(sandbox_id, opts = {})
|
|
855
|
-
if @api_client.config.debugging
|
|
856
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.get_region_quota_by_sandbox_id ...'
|
|
857
|
-
end
|
|
858
|
-
# verify the required parameter 'sandbox_id' is set
|
|
859
|
-
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
860
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_region_quota_by_sandbox_id"
|
|
861
|
-
end
|
|
862
|
-
# resource path
|
|
863
|
-
local_var_path = '/sandbox/{sandboxId}/region-quota'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
864
|
-
|
|
865
|
-
# query parameters
|
|
866
|
-
query_params = opts[:query_params] || {}
|
|
867
|
-
|
|
868
|
-
# header parameters
|
|
869
|
-
header_params = opts[:header_params] || {}
|
|
870
|
-
# HTTP header 'Accept' (if needed)
|
|
871
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
872
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
873
|
-
|
|
874
|
-
# form parameters
|
|
875
|
-
form_params = opts[:form_params] || {}
|
|
876
|
-
|
|
877
|
-
# http body (model)
|
|
878
|
-
post_body = opts[:debug_body]
|
|
879
|
-
|
|
880
|
-
# return_type
|
|
881
|
-
return_type = opts[:debug_return_type] || 'RegionQuota'
|
|
882
|
-
|
|
883
|
-
# auth_names
|
|
884
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
885
|
-
|
|
886
|
-
new_options = opts.merge(
|
|
887
|
-
:operation => :"SandboxApi.get_region_quota_by_sandbox_id",
|
|
888
|
-
:header_params => header_params,
|
|
889
|
-
:query_params => query_params,
|
|
890
|
-
:form_params => form_params,
|
|
891
|
-
:body => post_body,
|
|
892
|
-
:auth_names => auth_names,
|
|
893
|
-
:return_type => return_type
|
|
894
|
-
)
|
|
895
|
-
|
|
896
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
897
|
-
if @api_client.config.debugging
|
|
898
|
-
@api_client.config.logger.debug "API called: SandboxApi#get_region_quota_by_sandbox_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
899
|
-
end
|
|
900
|
-
return data, status_code, headers
|
|
901
|
-
end
|
|
902
|
-
|
|
903
|
-
# Get sandbox details
|
|
904
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
905
|
-
# @param [Hash] opts the optional parameters
|
|
906
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
907
|
-
# @option opts [Boolean] :verbose Include verbose output
|
|
908
|
-
# @return [Sandbox]
|
|
909
|
-
def get_sandbox(sandbox_id_or_name, opts = {})
|
|
910
|
-
data, _status_code, _headers = get_sandbox_with_http_info(sandbox_id_or_name, opts)
|
|
911
|
-
data
|
|
912
|
-
end
|
|
913
|
-
|
|
914
|
-
# Get sandbox details
|
|
915
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
916
|
-
# @param [Hash] opts the optional parameters
|
|
917
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
918
|
-
# @option opts [Boolean] :verbose Include verbose output
|
|
919
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
920
|
-
def get_sandbox_with_http_info(sandbox_id_or_name, opts = {})
|
|
921
|
-
if @api_client.config.debugging
|
|
922
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox ...'
|
|
923
|
-
end
|
|
924
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
925
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
926
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_sandbox"
|
|
927
|
-
end
|
|
928
|
-
# resource path
|
|
929
|
-
local_var_path = '/sandbox/{sandboxIdOrName}'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
930
|
-
|
|
931
|
-
# query parameters
|
|
932
|
-
query_params = opts[:query_params] || {}
|
|
933
|
-
query_params[:'verbose'] = opts[:'verbose'] if !opts[:'verbose'].nil?
|
|
934
|
-
|
|
935
|
-
# header parameters
|
|
936
|
-
header_params = opts[:header_params] || {}
|
|
937
|
-
# HTTP header 'Accept' (if needed)
|
|
938
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
939
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
940
|
-
|
|
941
|
-
# form parameters
|
|
942
|
-
form_params = opts[:form_params] || {}
|
|
943
|
-
|
|
944
|
-
# http body (model)
|
|
945
|
-
post_body = opts[:debug_body]
|
|
946
|
-
|
|
947
|
-
# return_type
|
|
948
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
949
|
-
|
|
950
|
-
# auth_names
|
|
951
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
952
|
-
|
|
953
|
-
new_options = opts.merge(
|
|
954
|
-
:operation => :"SandboxApi.get_sandbox",
|
|
955
|
-
:header_params => header_params,
|
|
956
|
-
:query_params => query_params,
|
|
957
|
-
:form_params => form_params,
|
|
958
|
-
:body => post_body,
|
|
959
|
-
:auth_names => auth_names,
|
|
960
|
-
:return_type => return_type
|
|
961
|
-
)
|
|
962
|
-
|
|
963
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
964
|
-
if @api_client.config.debugging
|
|
965
|
-
@api_client.config.logger.debug "API called: SandboxApi#get_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
966
|
-
end
|
|
967
|
-
return data, status_code, headers
|
|
968
|
-
end
|
|
969
|
-
|
|
970
|
-
# Get sandbox fork ancestor chain
|
|
971
|
-
# @param sandbox_id_or_name [String]
|
|
972
|
-
# @param [Hash] opts the optional parameters
|
|
973
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
974
|
-
# @return [Array<Sandbox>]
|
|
975
|
-
def get_sandbox_ancestors(sandbox_id_or_name, opts = {})
|
|
976
|
-
data, _status_code, _headers = get_sandbox_ancestors_with_http_info(sandbox_id_or_name, opts)
|
|
977
|
-
data
|
|
978
|
-
end
|
|
979
|
-
|
|
980
|
-
# Get sandbox fork ancestor chain
|
|
981
|
-
# @param sandbox_id_or_name [String]
|
|
982
|
-
# @param [Hash] opts the optional parameters
|
|
983
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
984
|
-
# @return [Array<(Array<Sandbox>, Integer, Hash)>] Array<Sandbox> data, response status code and response headers
|
|
985
|
-
def get_sandbox_ancestors_with_http_info(sandbox_id_or_name, opts = {})
|
|
986
|
-
if @api_client.config.debugging
|
|
987
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_ancestors ...'
|
|
988
|
-
end
|
|
989
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
990
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
991
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_sandbox_ancestors"
|
|
992
|
-
end
|
|
993
|
-
# resource path
|
|
994
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/ancestors'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
995
|
-
|
|
996
|
-
# query parameters
|
|
997
|
-
query_params = opts[:query_params] || {}
|
|
998
|
-
|
|
999
|
-
# header parameters
|
|
1000
|
-
header_params = opts[:header_params] || {}
|
|
1001
|
-
# HTTP header 'Accept' (if needed)
|
|
1002
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1003
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1004
|
-
|
|
1005
|
-
# form parameters
|
|
1006
|
-
form_params = opts[:form_params] || {}
|
|
1007
|
-
|
|
1008
|
-
# http body (model)
|
|
1009
|
-
post_body = opts[:debug_body]
|
|
1010
|
-
|
|
1011
|
-
# return_type
|
|
1012
|
-
return_type = opts[:debug_return_type] || 'Array<Sandbox>'
|
|
1013
|
-
|
|
1014
|
-
# auth_names
|
|
1015
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1016
|
-
|
|
1017
|
-
new_options = opts.merge(
|
|
1018
|
-
:operation => :"SandboxApi.get_sandbox_ancestors",
|
|
1019
|
-
:header_params => header_params,
|
|
1020
|
-
:query_params => query_params,
|
|
1021
|
-
:form_params => form_params,
|
|
1022
|
-
:body => post_body,
|
|
1023
|
-
:auth_names => auth_names,
|
|
1024
|
-
:return_type => return_type
|
|
1025
|
-
)
|
|
1026
|
-
|
|
1027
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1028
|
-
if @api_client.config.debugging
|
|
1029
|
-
@api_client.config.logger.debug "API called: SandboxApi#get_sandbox_ancestors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1030
|
-
end
|
|
1031
|
-
return data, status_code, headers
|
|
1032
|
-
end
|
|
1033
|
-
|
|
1034
|
-
# Get sandbox fork children
|
|
1035
|
-
# @param sandbox_id_or_name [String]
|
|
1036
|
-
# @param [Hash] opts the optional parameters
|
|
1037
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1038
|
-
# @option opts [Boolean] :include_destroyed
|
|
1039
|
-
# @return [Array<Sandbox>]
|
|
1040
|
-
def get_sandbox_forks(sandbox_id_or_name, opts = {})
|
|
1041
|
-
data, _status_code, _headers = get_sandbox_forks_with_http_info(sandbox_id_or_name, opts)
|
|
1042
|
-
data
|
|
1043
|
-
end
|
|
1044
|
-
|
|
1045
|
-
# Get sandbox fork children
|
|
1046
|
-
# @param sandbox_id_or_name [String]
|
|
1047
|
-
# @param [Hash] opts the optional parameters
|
|
1048
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1049
|
-
# @option opts [Boolean] :include_destroyed
|
|
1050
|
-
# @return [Array<(Array<Sandbox>, Integer, Hash)>] Array<Sandbox> data, response status code and response headers
|
|
1051
|
-
def get_sandbox_forks_with_http_info(sandbox_id_or_name, opts = {})
|
|
1052
|
-
if @api_client.config.debugging
|
|
1053
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_forks ...'
|
|
1054
|
-
end
|
|
1055
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
1056
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
1057
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_sandbox_forks"
|
|
1058
|
-
end
|
|
1059
|
-
# resource path
|
|
1060
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/forks'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
1061
|
-
|
|
1062
|
-
# query parameters
|
|
1063
|
-
query_params = opts[:query_params] || {}
|
|
1064
|
-
query_params[:'includeDestroyed'] = opts[:'include_destroyed'] if !opts[:'include_destroyed'].nil?
|
|
1065
|
-
|
|
1066
|
-
# header parameters
|
|
1067
|
-
header_params = opts[:header_params] || {}
|
|
1068
|
-
# HTTP header 'Accept' (if needed)
|
|
1069
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1070
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1071
|
-
|
|
1072
|
-
# form parameters
|
|
1073
|
-
form_params = opts[:form_params] || {}
|
|
1074
|
-
|
|
1075
|
-
# http body (model)
|
|
1076
|
-
post_body = opts[:debug_body]
|
|
1077
|
-
|
|
1078
|
-
# return_type
|
|
1079
|
-
return_type = opts[:debug_return_type] || 'Array<Sandbox>'
|
|
1080
|
-
|
|
1081
|
-
# auth_names
|
|
1082
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1083
|
-
|
|
1084
|
-
new_options = opts.merge(
|
|
1085
|
-
:operation => :"SandboxApi.get_sandbox_forks",
|
|
1086
|
-
:header_params => header_params,
|
|
1087
|
-
:query_params => query_params,
|
|
1088
|
-
:form_params => form_params,
|
|
1089
|
-
:body => post_body,
|
|
1090
|
-
:auth_names => auth_names,
|
|
1091
|
-
:return_type => return_type
|
|
1092
|
-
)
|
|
1093
|
-
|
|
1094
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1095
|
-
if @api_client.config.debugging
|
|
1096
|
-
@api_client.config.logger.debug "API called: SandboxApi#get_sandbox_forks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1097
|
-
end
|
|
1098
|
-
return data, status_code, headers
|
|
1099
|
-
end
|
|
1100
|
-
|
|
1101
|
-
# Get sandbox logs
|
|
1102
|
-
# Retrieve OTEL logs for a sandbox within a time range
|
|
1103
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
1104
|
-
# @param from [Time] Start of time range (ISO 8601)
|
|
1105
|
-
# @param to [Time] End of time range (ISO 8601)
|
|
1106
|
-
# @param [Hash] opts the optional parameters
|
|
1107
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1108
|
-
# @option opts [Float] :page Page number (1-indexed) (default to 1)
|
|
1109
|
-
# @option opts [Float] :limit Number of items per page (default to 100)
|
|
1110
|
-
# @option opts [Array<String>] :severities Filter by severity levels (DEBUG, INFO, WARN, ERROR)
|
|
1111
|
-
# @option opts [String] :search Search in log body
|
|
1112
|
-
# @return [PaginatedLogs]
|
|
1113
|
-
def get_sandbox_logs(sandbox_id, from, to, opts = {})
|
|
1114
|
-
data, _status_code, _headers = get_sandbox_logs_with_http_info(sandbox_id, from, to, opts)
|
|
1115
|
-
data
|
|
1116
|
-
end
|
|
1117
|
-
|
|
1118
|
-
# Get sandbox logs
|
|
1119
|
-
# Retrieve OTEL logs for a sandbox within a time range
|
|
1120
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
1121
|
-
# @param from [Time] Start of time range (ISO 8601)
|
|
1122
|
-
# @param to [Time] End of time range (ISO 8601)
|
|
1123
|
-
# @param [Hash] opts the optional parameters
|
|
1124
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1125
|
-
# @option opts [Float] :page Page number (1-indexed) (default to 1)
|
|
1126
|
-
# @option opts [Float] :limit Number of items per page (default to 100)
|
|
1127
|
-
# @option opts [Array<String>] :severities Filter by severity levels (DEBUG, INFO, WARN, ERROR)
|
|
1128
|
-
# @option opts [String] :search Search in log body
|
|
1129
|
-
# @return [Array<(PaginatedLogs, Integer, Hash)>] PaginatedLogs data, response status code and response headers
|
|
1130
|
-
def get_sandbox_logs_with_http_info(sandbox_id, from, to, opts = {})
|
|
1131
|
-
if @api_client.config.debugging
|
|
1132
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_logs ...'
|
|
1133
|
-
end
|
|
1134
|
-
# verify the required parameter 'sandbox_id' is set
|
|
1135
|
-
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
1136
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_sandbox_logs"
|
|
1137
|
-
end
|
|
1138
|
-
# verify the required parameter 'from' is set
|
|
1139
|
-
if @api_client.config.client_side_validation && from.nil?
|
|
1140
|
-
fail ArgumentError, "Missing the required parameter 'from' when calling SandboxApi.get_sandbox_logs"
|
|
1141
|
-
end
|
|
1142
|
-
# verify the required parameter 'to' is set
|
|
1143
|
-
if @api_client.config.client_side_validation && to.nil?
|
|
1144
|
-
fail ArgumentError, "Missing the required parameter 'to' when calling SandboxApi.get_sandbox_logs"
|
|
1145
|
-
end
|
|
1146
|
-
# resource path
|
|
1147
|
-
local_var_path = '/sandbox/{sandboxId}/telemetry/logs'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
1148
|
-
|
|
1149
|
-
# query parameters
|
|
1150
|
-
query_params = opts[:query_params] || {}
|
|
1151
|
-
query_params[:'from'] = from
|
|
1152
|
-
query_params[:'to'] = to
|
|
1153
|
-
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
1154
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1155
|
-
query_params[:'severities'] = @api_client.build_collection_param(opts[:'severities'], :multi) if !opts[:'severities'].nil?
|
|
1156
|
-
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
1157
|
-
|
|
1158
|
-
# header parameters
|
|
1159
|
-
header_params = opts[:header_params] || {}
|
|
1160
|
-
# HTTP header 'Accept' (if needed)
|
|
1161
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1162
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1163
|
-
|
|
1164
|
-
# form parameters
|
|
1165
|
-
form_params = opts[:form_params] || {}
|
|
1166
|
-
|
|
1167
|
-
# http body (model)
|
|
1168
|
-
post_body = opts[:debug_body]
|
|
1169
|
-
|
|
1170
|
-
# return_type
|
|
1171
|
-
return_type = opts[:debug_return_type] || 'PaginatedLogs'
|
|
1172
|
-
|
|
1173
|
-
# auth_names
|
|
1174
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1175
|
-
|
|
1176
|
-
new_options = opts.merge(
|
|
1177
|
-
:operation => :"SandboxApi.get_sandbox_logs",
|
|
1178
|
-
:header_params => header_params,
|
|
1179
|
-
:query_params => query_params,
|
|
1180
|
-
:form_params => form_params,
|
|
1181
|
-
:body => post_body,
|
|
1182
|
-
:auth_names => auth_names,
|
|
1183
|
-
:return_type => return_type
|
|
1184
|
-
)
|
|
1185
|
-
|
|
1186
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1187
|
-
if @api_client.config.debugging
|
|
1188
|
-
@api_client.config.logger.debug "API called: SandboxApi#get_sandbox_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1189
|
-
end
|
|
1190
|
-
return data, status_code, headers
|
|
1191
|
-
end
|
|
1192
|
-
|
|
1193
|
-
# Get sandbox metrics
|
|
1194
|
-
# Retrieve OTEL metrics for a sandbox within a time range
|
|
1195
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
1196
|
-
# @param from [Time] Start of time range (ISO 8601)
|
|
1197
|
-
# @param to [Time] End of time range (ISO 8601)
|
|
1198
|
-
# @param [Hash] opts the optional parameters
|
|
1199
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1200
|
-
# @option opts [Array<String>] :metric_names Filter by metric names
|
|
1201
|
-
# @return [MetricsResponse]
|
|
1202
|
-
def get_sandbox_metrics(sandbox_id, from, to, opts = {})
|
|
1203
|
-
data, _status_code, _headers = get_sandbox_metrics_with_http_info(sandbox_id, from, to, opts)
|
|
1204
|
-
data
|
|
1205
|
-
end
|
|
1206
|
-
|
|
1207
|
-
# Get sandbox metrics
|
|
1208
|
-
# Retrieve OTEL metrics for a sandbox within a time range
|
|
1209
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
1210
|
-
# @param from [Time] Start of time range (ISO 8601)
|
|
1211
|
-
# @param to [Time] End of time range (ISO 8601)
|
|
1212
|
-
# @param [Hash] opts the optional parameters
|
|
1213
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1214
|
-
# @option opts [Array<String>] :metric_names Filter by metric names
|
|
1215
|
-
# @return [Array<(MetricsResponse, Integer, Hash)>] MetricsResponse data, response status code and response headers
|
|
1216
|
-
def get_sandbox_metrics_with_http_info(sandbox_id, from, to, opts = {})
|
|
1217
|
-
if @api_client.config.debugging
|
|
1218
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_metrics ...'
|
|
1219
|
-
end
|
|
1220
|
-
# verify the required parameter 'sandbox_id' is set
|
|
1221
|
-
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
1222
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_sandbox_metrics"
|
|
1223
|
-
end
|
|
1224
|
-
# verify the required parameter 'from' is set
|
|
1225
|
-
if @api_client.config.client_side_validation && from.nil?
|
|
1226
|
-
fail ArgumentError, "Missing the required parameter 'from' when calling SandboxApi.get_sandbox_metrics"
|
|
1227
|
-
end
|
|
1228
|
-
# verify the required parameter 'to' is set
|
|
1229
|
-
if @api_client.config.client_side_validation && to.nil?
|
|
1230
|
-
fail ArgumentError, "Missing the required parameter 'to' when calling SandboxApi.get_sandbox_metrics"
|
|
1231
|
-
end
|
|
1232
|
-
# resource path
|
|
1233
|
-
local_var_path = '/sandbox/{sandboxId}/telemetry/metrics'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
1234
|
-
|
|
1235
|
-
# query parameters
|
|
1236
|
-
query_params = opts[:query_params] || {}
|
|
1237
|
-
query_params[:'from'] = from
|
|
1238
|
-
query_params[:'to'] = to
|
|
1239
|
-
query_params[:'metricNames'] = @api_client.build_collection_param(opts[:'metric_names'], :multi) if !opts[:'metric_names'].nil?
|
|
1240
|
-
|
|
1241
|
-
# header parameters
|
|
1242
|
-
header_params = opts[:header_params] || {}
|
|
1243
|
-
# HTTP header 'Accept' (if needed)
|
|
1244
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1245
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1246
|
-
|
|
1247
|
-
# form parameters
|
|
1248
|
-
form_params = opts[:form_params] || {}
|
|
1249
|
-
|
|
1250
|
-
# http body (model)
|
|
1251
|
-
post_body = opts[:debug_body]
|
|
1252
|
-
|
|
1253
|
-
# return_type
|
|
1254
|
-
return_type = opts[:debug_return_type] || 'MetricsResponse'
|
|
1255
|
-
|
|
1256
|
-
# auth_names
|
|
1257
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1258
|
-
|
|
1259
|
-
new_options = opts.merge(
|
|
1260
|
-
:operation => :"SandboxApi.get_sandbox_metrics",
|
|
1261
|
-
:header_params => header_params,
|
|
1262
|
-
:query_params => query_params,
|
|
1263
|
-
:form_params => form_params,
|
|
1264
|
-
:body => post_body,
|
|
1265
|
-
:auth_names => auth_names,
|
|
1266
|
-
:return_type => return_type
|
|
1267
|
-
)
|
|
1268
|
-
|
|
1269
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1270
|
-
if @api_client.config.debugging
|
|
1271
|
-
@api_client.config.logger.debug "API called: SandboxApi#get_sandbox_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1272
|
-
end
|
|
1273
|
-
return data, status_code, headers
|
|
1274
|
-
end
|
|
1275
|
-
|
|
1276
|
-
# Get sandbox fork parent
|
|
1277
|
-
# @param sandbox_id_or_name [String]
|
|
1278
|
-
# @param [Hash] opts the optional parameters
|
|
1279
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1280
|
-
# @return [Sandbox]
|
|
1281
|
-
def get_sandbox_parent(sandbox_id_or_name, opts = {})
|
|
1282
|
-
data, _status_code, _headers = get_sandbox_parent_with_http_info(sandbox_id_or_name, opts)
|
|
1283
|
-
data
|
|
1284
|
-
end
|
|
1285
|
-
|
|
1286
|
-
# Get sandbox fork parent
|
|
1287
|
-
# @param sandbox_id_or_name [String]
|
|
1288
|
-
# @param [Hash] opts the optional parameters
|
|
1289
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1290
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
1291
|
-
def get_sandbox_parent_with_http_info(sandbox_id_or_name, opts = {})
|
|
1292
|
-
if @api_client.config.debugging
|
|
1293
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_parent ...'
|
|
1294
|
-
end
|
|
1295
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
1296
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
1297
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_sandbox_parent"
|
|
1298
|
-
end
|
|
1299
|
-
# resource path
|
|
1300
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/parent'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
1301
|
-
|
|
1302
|
-
# query parameters
|
|
1303
|
-
query_params = opts[:query_params] || {}
|
|
1304
|
-
|
|
1305
|
-
# header parameters
|
|
1306
|
-
header_params = opts[:header_params] || {}
|
|
1307
|
-
# HTTP header 'Accept' (if needed)
|
|
1308
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1309
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1310
|
-
|
|
1311
|
-
# form parameters
|
|
1312
|
-
form_params = opts[:form_params] || {}
|
|
1313
|
-
|
|
1314
|
-
# http body (model)
|
|
1315
|
-
post_body = opts[:debug_body]
|
|
1316
|
-
|
|
1317
|
-
# return_type
|
|
1318
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
1319
|
-
|
|
1320
|
-
# auth_names
|
|
1321
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1322
|
-
|
|
1323
|
-
new_options = opts.merge(
|
|
1324
|
-
:operation => :"SandboxApi.get_sandbox_parent",
|
|
1325
|
-
:header_params => header_params,
|
|
1326
|
-
:query_params => query_params,
|
|
1327
|
-
:form_params => form_params,
|
|
1328
|
-
:body => post_body,
|
|
1329
|
-
:auth_names => auth_names,
|
|
1330
|
-
:return_type => return_type
|
|
1331
|
-
)
|
|
1332
|
-
|
|
1333
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1334
|
-
if @api_client.config.debugging
|
|
1335
|
-
@api_client.config.logger.debug "API called: SandboxApi#get_sandbox_parent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1336
|
-
end
|
|
1337
|
-
return data, status_code, headers
|
|
1338
|
-
end
|
|
1339
|
-
|
|
1340
|
-
# Get trace spans
|
|
1341
|
-
# Retrieve all spans for a specific trace
|
|
1342
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
1343
|
-
# @param trace_id [String] ID of the trace
|
|
1344
|
-
# @param [Hash] opts the optional parameters
|
|
1345
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1346
|
-
# @return [Array<TraceSpan>]
|
|
1347
|
-
def get_sandbox_trace_spans(sandbox_id, trace_id, opts = {})
|
|
1348
|
-
data, _status_code, _headers = get_sandbox_trace_spans_with_http_info(sandbox_id, trace_id, opts)
|
|
1349
|
-
data
|
|
1350
|
-
end
|
|
1351
|
-
|
|
1352
|
-
# Get trace spans
|
|
1353
|
-
# Retrieve all spans for a specific trace
|
|
1354
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
1355
|
-
# @param trace_id [String] ID of the trace
|
|
1356
|
-
# @param [Hash] opts the optional parameters
|
|
1357
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1358
|
-
# @return [Array<(Array<TraceSpan>, Integer, Hash)>] Array<TraceSpan> data, response status code and response headers
|
|
1359
|
-
def get_sandbox_trace_spans_with_http_info(sandbox_id, trace_id, opts = {})
|
|
1360
|
-
if @api_client.config.debugging
|
|
1361
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_trace_spans ...'
|
|
1362
|
-
end
|
|
1363
|
-
# verify the required parameter 'sandbox_id' is set
|
|
1364
|
-
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
1365
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_sandbox_trace_spans"
|
|
1366
|
-
end
|
|
1367
|
-
# verify the required parameter 'trace_id' is set
|
|
1368
|
-
if @api_client.config.client_side_validation && trace_id.nil?
|
|
1369
|
-
fail ArgumentError, "Missing the required parameter 'trace_id' when calling SandboxApi.get_sandbox_trace_spans"
|
|
1370
|
-
end
|
|
1371
|
-
# resource path
|
|
1372
|
-
local_var_path = '/sandbox/{sandboxId}/telemetry/traces/{traceId}'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s)).sub('{' + 'traceId' + '}', CGI.escape(trace_id.to_s))
|
|
1373
|
-
|
|
1374
|
-
# query parameters
|
|
1375
|
-
query_params = opts[:query_params] || {}
|
|
1376
|
-
|
|
1377
|
-
# header parameters
|
|
1378
|
-
header_params = opts[:header_params] || {}
|
|
1379
|
-
# HTTP header 'Accept' (if needed)
|
|
1380
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1381
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1382
|
-
|
|
1383
|
-
# form parameters
|
|
1384
|
-
form_params = opts[:form_params] || {}
|
|
1385
|
-
|
|
1386
|
-
# http body (model)
|
|
1387
|
-
post_body = opts[:debug_body]
|
|
1388
|
-
|
|
1389
|
-
# return_type
|
|
1390
|
-
return_type = opts[:debug_return_type] || 'Array<TraceSpan>'
|
|
1391
|
-
|
|
1392
|
-
# auth_names
|
|
1393
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1394
|
-
|
|
1395
|
-
new_options = opts.merge(
|
|
1396
|
-
:operation => :"SandboxApi.get_sandbox_trace_spans",
|
|
1397
|
-
:header_params => header_params,
|
|
1398
|
-
:query_params => query_params,
|
|
1399
|
-
:form_params => form_params,
|
|
1400
|
-
:body => post_body,
|
|
1401
|
-
:auth_names => auth_names,
|
|
1402
|
-
:return_type => return_type
|
|
1403
|
-
)
|
|
1404
|
-
|
|
1405
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1406
|
-
if @api_client.config.debugging
|
|
1407
|
-
@api_client.config.logger.debug "API called: SandboxApi#get_sandbox_trace_spans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1408
|
-
end
|
|
1409
|
-
return data, status_code, headers
|
|
1410
|
-
end
|
|
1411
|
-
|
|
1412
|
-
# Get sandbox traces
|
|
1413
|
-
# Retrieve OTEL traces for a sandbox within a time range
|
|
1414
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
1415
|
-
# @param from [Time] Start of time range (ISO 8601)
|
|
1416
|
-
# @param to [Time] End of time range (ISO 8601)
|
|
1417
|
-
# @param [Hash] opts the optional parameters
|
|
1418
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1419
|
-
# @option opts [Float] :page Page number (1-indexed) (default to 1)
|
|
1420
|
-
# @option opts [Float] :limit Number of items per page (default to 100)
|
|
1421
|
-
# @return [PaginatedTraces]
|
|
1422
|
-
def get_sandbox_traces(sandbox_id, from, to, opts = {})
|
|
1423
|
-
data, _status_code, _headers = get_sandbox_traces_with_http_info(sandbox_id, from, to, opts)
|
|
1424
|
-
data
|
|
1425
|
-
end
|
|
1426
|
-
|
|
1427
|
-
# Get sandbox traces
|
|
1428
|
-
# Retrieve OTEL traces for a sandbox within a time range
|
|
1429
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
1430
|
-
# @param from [Time] Start of time range (ISO 8601)
|
|
1431
|
-
# @param to [Time] End of time range (ISO 8601)
|
|
1432
|
-
# @param [Hash] opts the optional parameters
|
|
1433
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1434
|
-
# @option opts [Float] :page Page number (1-indexed) (default to 1)
|
|
1435
|
-
# @option opts [Float] :limit Number of items per page (default to 100)
|
|
1436
|
-
# @return [Array<(PaginatedTraces, Integer, Hash)>] PaginatedTraces data, response status code and response headers
|
|
1437
|
-
def get_sandbox_traces_with_http_info(sandbox_id, from, to, opts = {})
|
|
1438
|
-
if @api_client.config.debugging
|
|
1439
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_traces ...'
|
|
1440
|
-
end
|
|
1441
|
-
# verify the required parameter 'sandbox_id' is set
|
|
1442
|
-
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
1443
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_sandbox_traces"
|
|
1444
|
-
end
|
|
1445
|
-
# verify the required parameter 'from' is set
|
|
1446
|
-
if @api_client.config.client_side_validation && from.nil?
|
|
1447
|
-
fail ArgumentError, "Missing the required parameter 'from' when calling SandboxApi.get_sandbox_traces"
|
|
1448
|
-
end
|
|
1449
|
-
# verify the required parameter 'to' is set
|
|
1450
|
-
if @api_client.config.client_side_validation && to.nil?
|
|
1451
|
-
fail ArgumentError, "Missing the required parameter 'to' when calling SandboxApi.get_sandbox_traces"
|
|
1452
|
-
end
|
|
1453
|
-
# resource path
|
|
1454
|
-
local_var_path = '/sandbox/{sandboxId}/telemetry/traces'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
1455
|
-
|
|
1456
|
-
# query parameters
|
|
1457
|
-
query_params = opts[:query_params] || {}
|
|
1458
|
-
query_params[:'from'] = from
|
|
1459
|
-
query_params[:'to'] = to
|
|
1460
|
-
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
1461
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1462
|
-
|
|
1463
|
-
# header parameters
|
|
1464
|
-
header_params = opts[:header_params] || {}
|
|
1465
|
-
# HTTP header 'Accept' (if needed)
|
|
1466
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1467
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1468
|
-
|
|
1469
|
-
# form parameters
|
|
1470
|
-
form_params = opts[:form_params] || {}
|
|
1471
|
-
|
|
1472
|
-
# http body (model)
|
|
1473
|
-
post_body = opts[:debug_body]
|
|
1474
|
-
|
|
1475
|
-
# return_type
|
|
1476
|
-
return_type = opts[:debug_return_type] || 'PaginatedTraces'
|
|
1477
|
-
|
|
1478
|
-
# auth_names
|
|
1479
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1480
|
-
|
|
1481
|
-
new_options = opts.merge(
|
|
1482
|
-
:operation => :"SandboxApi.get_sandbox_traces",
|
|
1483
|
-
:header_params => header_params,
|
|
1484
|
-
:query_params => query_params,
|
|
1485
|
-
:form_params => form_params,
|
|
1486
|
-
:body => post_body,
|
|
1487
|
-
:auth_names => auth_names,
|
|
1488
|
-
:return_type => return_type
|
|
1489
|
-
)
|
|
1490
|
-
|
|
1491
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1492
|
-
if @api_client.config.debugging
|
|
1493
|
-
@api_client.config.logger.debug "API called: SandboxApi#get_sandbox_traces\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1494
|
-
end
|
|
1495
|
-
return data, status_code, headers
|
|
1496
|
-
end
|
|
1497
|
-
|
|
1498
|
-
# Get sandboxes for the authenticated runner
|
|
606
|
+
# Get sandboxes for the authenticated runner
|
|
1499
607
|
# @param [Hash] opts the optional parameters
|
|
1500
608
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1501
609
|
# @option opts [String] :states Comma-separated list of sandbox states to filter by
|
|
@@ -1506,160 +614,23 @@ module DaytonaApiClient
|
|
|
1506
614
|
data
|
|
1507
615
|
end
|
|
1508
616
|
|
|
1509
|
-
# Get sandboxes for the authenticated runner
|
|
1510
|
-
# @param [Hash] opts the optional parameters
|
|
1511
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1512
|
-
# @option opts [String] :states Comma-separated list of sandbox states to filter by
|
|
1513
|
-
# @option opts [Boolean] :skip_reconciling_sandboxes Skip sandboxes where state differs from desired state
|
|
1514
|
-
# @return [Array<(Array<Sandbox>, Integer, Hash)>] Array<Sandbox> data, response status code and response headers
|
|
1515
|
-
def get_sandboxes_for_runner_with_http_info(opts = {})
|
|
1516
|
-
if @api_client.config.debugging
|
|
1517
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandboxes_for_runner ...'
|
|
1518
|
-
end
|
|
1519
|
-
# resource path
|
|
1520
|
-
local_var_path = '/sandbox/for-runner'
|
|
1521
|
-
|
|
1522
|
-
# query parameters
|
|
1523
|
-
query_params = opts[:query_params] || {}
|
|
1524
|
-
query_params[:'states'] = opts[:'states'] if !opts[:'states'].nil?
|
|
1525
|
-
query_params[:'skipReconcilingSandboxes'] = opts[:'skip_reconciling_sandboxes'] if !opts[:'skip_reconciling_sandboxes'].nil?
|
|
1526
|
-
|
|
1527
|
-
# header parameters
|
|
1528
|
-
header_params = opts[:header_params] || {}
|
|
1529
|
-
# HTTP header 'Accept' (if needed)
|
|
1530
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1531
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1532
|
-
|
|
1533
|
-
# form parameters
|
|
1534
|
-
form_params = opts[:form_params] || {}
|
|
1535
|
-
|
|
1536
|
-
# http body (model)
|
|
1537
|
-
post_body = opts[:debug_body]
|
|
1538
|
-
|
|
1539
|
-
# return_type
|
|
1540
|
-
return_type = opts[:debug_return_type] || 'Array<Sandbox>'
|
|
1541
|
-
|
|
1542
|
-
# auth_names
|
|
1543
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1544
|
-
|
|
1545
|
-
new_options = opts.merge(
|
|
1546
|
-
:operation => :"SandboxApi.get_sandboxes_for_runner",
|
|
1547
|
-
:header_params => header_params,
|
|
1548
|
-
:query_params => query_params,
|
|
1549
|
-
:form_params => form_params,
|
|
1550
|
-
:body => post_body,
|
|
1551
|
-
:auth_names => auth_names,
|
|
1552
|
-
:return_type => return_type
|
|
1553
|
-
)
|
|
1554
|
-
|
|
1555
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1556
|
-
if @api_client.config.debugging
|
|
1557
|
-
@api_client.config.logger.debug "API called: SandboxApi#get_sandboxes_for_runner\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1558
|
-
end
|
|
1559
|
-
return data, status_code, headers
|
|
1560
|
-
end
|
|
1561
|
-
|
|
1562
|
-
# Get signed preview URL for a sandbox port
|
|
1563
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
1564
|
-
# @param port [Integer] Port number to get signed preview URL for
|
|
1565
|
-
# @param [Hash] opts the optional parameters
|
|
1566
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1567
|
-
# @option opts [Integer] :expires_in_seconds Expiration time in seconds (default: 60 seconds)
|
|
1568
|
-
# @return [SignedPortPreviewUrl]
|
|
1569
|
-
def get_signed_port_preview_url(sandbox_id_or_name, port, opts = {})
|
|
1570
|
-
data, _status_code, _headers = get_signed_port_preview_url_with_http_info(sandbox_id_or_name, port, opts)
|
|
1571
|
-
data
|
|
1572
|
-
end
|
|
1573
|
-
|
|
1574
|
-
# Get signed preview URL for a sandbox port
|
|
1575
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
1576
|
-
# @param port [Integer] Port number to get signed preview URL for
|
|
1577
|
-
# @param [Hash] opts the optional parameters
|
|
1578
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1579
|
-
# @option opts [Integer] :expires_in_seconds Expiration time in seconds (default: 60 seconds)
|
|
1580
|
-
# @return [Array<(SignedPortPreviewUrl, Integer, Hash)>] SignedPortPreviewUrl data, response status code and response headers
|
|
1581
|
-
def get_signed_port_preview_url_with_http_info(sandbox_id_or_name, port, opts = {})
|
|
1582
|
-
if @api_client.config.debugging
|
|
1583
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.get_signed_port_preview_url ...'
|
|
1584
|
-
end
|
|
1585
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
1586
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
1587
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_signed_port_preview_url"
|
|
1588
|
-
end
|
|
1589
|
-
# verify the required parameter 'port' is set
|
|
1590
|
-
if @api_client.config.client_side_validation && port.nil?
|
|
1591
|
-
fail ArgumentError, "Missing the required parameter 'port' when calling SandboxApi.get_signed_port_preview_url"
|
|
1592
|
-
end
|
|
1593
|
-
# resource path
|
|
1594
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/ports/{port}/signed-preview-url'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s)).sub('{' + 'port' + '}', CGI.escape(port.to_s))
|
|
1595
|
-
|
|
1596
|
-
# query parameters
|
|
1597
|
-
query_params = opts[:query_params] || {}
|
|
1598
|
-
query_params[:'expiresInSeconds'] = opts[:'expires_in_seconds'] if !opts[:'expires_in_seconds'].nil?
|
|
1599
|
-
|
|
1600
|
-
# header parameters
|
|
1601
|
-
header_params = opts[:header_params] || {}
|
|
1602
|
-
# HTTP header 'Accept' (if needed)
|
|
1603
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1604
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1605
|
-
|
|
1606
|
-
# form parameters
|
|
1607
|
-
form_params = opts[:form_params] || {}
|
|
1608
|
-
|
|
1609
|
-
# http body (model)
|
|
1610
|
-
post_body = opts[:debug_body]
|
|
1611
|
-
|
|
1612
|
-
# return_type
|
|
1613
|
-
return_type = opts[:debug_return_type] || 'SignedPortPreviewUrl'
|
|
1614
|
-
|
|
1615
|
-
# auth_names
|
|
1616
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1617
|
-
|
|
1618
|
-
new_options = opts.merge(
|
|
1619
|
-
:operation => :"SandboxApi.get_signed_port_preview_url",
|
|
1620
|
-
:header_params => header_params,
|
|
1621
|
-
:query_params => query_params,
|
|
1622
|
-
:form_params => form_params,
|
|
1623
|
-
:body => post_body,
|
|
1624
|
-
:auth_names => auth_names,
|
|
1625
|
-
:return_type => return_type
|
|
1626
|
-
)
|
|
1627
|
-
|
|
1628
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1629
|
-
if @api_client.config.debugging
|
|
1630
|
-
@api_client.config.logger.debug "API called: SandboxApi#get_signed_port_preview_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1631
|
-
end
|
|
1632
|
-
return data, status_code, headers
|
|
1633
|
-
end
|
|
1634
|
-
|
|
1635
|
-
# Get toolbox proxy URL for a sandbox
|
|
1636
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
1637
|
-
# @param [Hash] opts the optional parameters
|
|
1638
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1639
|
-
# @return [ToolboxProxyUrl]
|
|
1640
|
-
def get_toolbox_proxy_url(sandbox_id, opts = {})
|
|
1641
|
-
data, _status_code, _headers = get_toolbox_proxy_url_with_http_info(sandbox_id, opts)
|
|
1642
|
-
data
|
|
1643
|
-
end
|
|
1644
|
-
|
|
1645
|
-
# Get toolbox proxy URL for a sandbox
|
|
1646
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
617
|
+
# Get sandboxes for the authenticated runner
|
|
1647
618
|
# @param [Hash] opts the optional parameters
|
|
1648
619
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1649
|
-
# @
|
|
1650
|
-
|
|
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 = {})
|
|
1651
624
|
if @api_client.config.debugging
|
|
1652
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
1653
|
-
end
|
|
1654
|
-
# verify the required parameter 'sandbox_id' is set
|
|
1655
|
-
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
1656
|
-
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 ...'
|
|
1657
626
|
end
|
|
1658
627
|
# resource path
|
|
1659
|
-
local_var_path = '/sandbox/
|
|
628
|
+
local_var_path = '/sandbox/for-runner'
|
|
1660
629
|
|
|
1661
630
|
# query parameters
|
|
1662
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?
|
|
1663
634
|
|
|
1664
635
|
# header parameters
|
|
1665
636
|
header_params = opts[:header_params] || {}
|
|
@@ -1674,13 +645,13 @@ module DaytonaApiClient
|
|
|
1674
645
|
post_body = opts[:debug_body]
|
|
1675
646
|
|
|
1676
647
|
# return_type
|
|
1677
|
-
return_type = opts[:debug_return_type] || '
|
|
648
|
+
return_type = opts[:debug_return_type] || 'Array<Sandbox>'
|
|
1678
649
|
|
|
1679
650
|
# auth_names
|
|
1680
651
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1681
652
|
|
|
1682
653
|
new_options = opts.merge(
|
|
1683
|
-
:operation => :"SandboxApi.
|
|
654
|
+
:operation => :"SandboxApi.get_sandboxes_for_runner",
|
|
1684
655
|
:header_params => header_params,
|
|
1685
656
|
:query_params => query_params,
|
|
1686
657
|
:form_params => form_params,
|
|
@@ -1691,7 +662,7 @@ module DaytonaApiClient
|
|
|
1691
662
|
|
|
1692
663
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1693
664
|
if @api_client.config.debugging
|
|
1694
|
-
@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}"
|
|
1695
666
|
end
|
|
1696
667
|
return data, status_code, headers
|
|
1697
668
|
end
|
|
@@ -1769,7 +740,6 @@ module DaytonaApiClient
|
|
|
1769
740
|
# @option opts [Float] :page Page number of the results (default to 1)
|
|
1770
741
|
# @option opts [Float] :limit Number of results per page (default to 100)
|
|
1771
742
|
# @option opts [String] :id Filter by partial ID match
|
|
1772
|
-
# @option opts [String] :name Filter by partial name match
|
|
1773
743
|
# @option opts [String] :labels JSON encoded labels to filter by
|
|
1774
744
|
# @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
|
|
1775
745
|
# @option opts [Array<String>] :states List of states to filter by
|
|
@@ -1797,7 +767,6 @@ module DaytonaApiClient
|
|
|
1797
767
|
# @option opts [Float] :page Page number of the results (default to 1)
|
|
1798
768
|
# @option opts [Float] :limit Number of results per page (default to 100)
|
|
1799
769
|
# @option opts [String] :id Filter by partial ID match
|
|
1800
|
-
# @option opts [String] :name Filter by partial name match
|
|
1801
770
|
# @option opts [String] :labels JSON encoded labels to filter by
|
|
1802
771
|
# @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
|
|
1803
772
|
# @option opts [Array<String>] :states List of states to filter by
|
|
@@ -1830,7 +799,7 @@ module DaytonaApiClient
|
|
|
1830
799
|
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
|
|
1831
800
|
end
|
|
1832
801
|
|
|
1833
|
-
allowable_values = ["creating", "restoring", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving"
|
|
802
|
+
allowable_values = ["creating", "restoring", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving"]
|
|
1834
803
|
if @api_client.config.client_side_validation && opts[:'states'] && !opts[:'states'].all? { |item| allowable_values.include?(item) }
|
|
1835
804
|
fail ArgumentError, "invalid value for \"states\", must include one of #{allowable_values}"
|
|
1836
805
|
end
|
|
@@ -1858,7 +827,7 @@ module DaytonaApiClient
|
|
|
1858
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.'
|
|
1859
828
|
end
|
|
1860
829
|
|
|
1861
|
-
allowable_values = ["id", "
|
|
830
|
+
allowable_values = ["id", "state", "snapshot", "region", "updatedAt", "createdAt"]
|
|
1862
831
|
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
|
1863
832
|
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
|
1864
833
|
end
|
|
@@ -1874,7 +843,6 @@ module DaytonaApiClient
|
|
|
1874
843
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
1875
844
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1876
845
|
query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
|
|
1877
|
-
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
1878
846
|
query_params[:'labels'] = opts[:'labels'] if !opts[:'labels'].nil?
|
|
1879
847
|
query_params[:'includeErroredDeleted'] = opts[:'include_errored_deleted'] if !opts[:'include_errored_deleted'].nil?
|
|
1880
848
|
query_params[:'states'] = @api_client.build_collection_param(opts[:'states'], :multi) if !opts[:'states'].nil?
|
|
@@ -1926,101 +894,37 @@ module DaytonaApiClient
|
|
|
1926
894
|
return data, status_code, headers
|
|
1927
895
|
end
|
|
1928
896
|
|
|
1929
|
-
# Recover sandbox from error state
|
|
1930
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
1931
|
-
# @param [Hash] opts the optional parameters
|
|
1932
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1933
|
-
# @return [Sandbox]
|
|
1934
|
-
def recover_sandbox(sandbox_id_or_name, opts = {})
|
|
1935
|
-
data, _status_code, _headers = recover_sandbox_with_http_info(sandbox_id_or_name, opts)
|
|
1936
|
-
data
|
|
1937
|
-
end
|
|
1938
|
-
|
|
1939
|
-
# Recover sandbox from error state
|
|
1940
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
1941
|
-
# @param [Hash] opts the optional parameters
|
|
1942
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1943
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
1944
|
-
def recover_sandbox_with_http_info(sandbox_id_or_name, opts = {})
|
|
1945
|
-
if @api_client.config.debugging
|
|
1946
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.recover_sandbox ...'
|
|
1947
|
-
end
|
|
1948
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
1949
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
1950
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.recover_sandbox"
|
|
1951
|
-
end
|
|
1952
|
-
# resource path
|
|
1953
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/recover'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
1954
|
-
|
|
1955
|
-
# query parameters
|
|
1956
|
-
query_params = opts[:query_params] || {}
|
|
1957
|
-
|
|
1958
|
-
# header parameters
|
|
1959
|
-
header_params = opts[:header_params] || {}
|
|
1960
|
-
# HTTP header 'Accept' (if needed)
|
|
1961
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1962
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1963
|
-
|
|
1964
|
-
# form parameters
|
|
1965
|
-
form_params = opts[:form_params] || {}
|
|
1966
|
-
|
|
1967
|
-
# http body (model)
|
|
1968
|
-
post_body = opts[:debug_body]
|
|
1969
|
-
|
|
1970
|
-
# return_type
|
|
1971
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
1972
|
-
|
|
1973
|
-
# auth_names
|
|
1974
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1975
|
-
|
|
1976
|
-
new_options = opts.merge(
|
|
1977
|
-
:operation => :"SandboxApi.recover_sandbox",
|
|
1978
|
-
:header_params => header_params,
|
|
1979
|
-
:query_params => query_params,
|
|
1980
|
-
:form_params => form_params,
|
|
1981
|
-
:body => post_body,
|
|
1982
|
-
:auth_names => auth_names,
|
|
1983
|
-
:return_type => return_type
|
|
1984
|
-
)
|
|
1985
|
-
|
|
1986
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1987
|
-
if @api_client.config.debugging
|
|
1988
|
-
@api_client.config.logger.debug "API called: SandboxApi#recover_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1989
|
-
end
|
|
1990
|
-
return data, status_code, headers
|
|
1991
|
-
end
|
|
1992
|
-
|
|
1993
897
|
# Replace sandbox labels
|
|
1994
|
-
# @param
|
|
898
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1995
899
|
# @param sandbox_labels [SandboxLabels]
|
|
1996
900
|
# @param [Hash] opts the optional parameters
|
|
1997
901
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1998
902
|
# @return [SandboxLabels]
|
|
1999
|
-
def replace_labels(
|
|
2000
|
-
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)
|
|
2001
905
|
data
|
|
2002
906
|
end
|
|
2003
907
|
|
|
2004
908
|
# Replace sandbox labels
|
|
2005
|
-
# @param
|
|
909
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2006
910
|
# @param sandbox_labels [SandboxLabels]
|
|
2007
911
|
# @param [Hash] opts the optional parameters
|
|
2008
912
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2009
913
|
# @return [Array<(SandboxLabels, Integer, Hash)>] SandboxLabels data, response status code and response headers
|
|
2010
|
-
def replace_labels_with_http_info(
|
|
914
|
+
def replace_labels_with_http_info(sandbox_id, sandbox_labels, opts = {})
|
|
2011
915
|
if @api_client.config.debugging
|
|
2012
916
|
@api_client.config.logger.debug 'Calling API: SandboxApi.replace_labels ...'
|
|
2013
917
|
end
|
|
2014
|
-
# verify the required parameter '
|
|
2015
|
-
if @api_client.config.client_side_validation &&
|
|
2016
|
-
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"
|
|
2017
921
|
end
|
|
2018
922
|
# verify the required parameter 'sandbox_labels' is set
|
|
2019
923
|
if @api_client.config.client_side_validation && sandbox_labels.nil?
|
|
2020
924
|
fail ArgumentError, "Missing the required parameter 'sandbox_labels' when calling SandboxApi.replace_labels"
|
|
2021
925
|
end
|
|
2022
926
|
# resource path
|
|
2023
|
-
local_var_path = '/sandbox/{
|
|
927
|
+
local_var_path = '/sandbox/{sandboxId}/labels'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
2024
928
|
|
|
2025
929
|
# query parameters
|
|
2026
930
|
query_params = opts[:query_params] || {}
|
|
@@ -2032,7 +936,7 @@ module DaytonaApiClient
|
|
|
2032
936
|
# HTTP header 'Content-Type'
|
|
2033
937
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2034
938
|
if !content_type.nil?
|
|
2035
|
-
|
|
939
|
+
header_params['Content-Type'] = content_type
|
|
2036
940
|
end
|
|
2037
941
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2038
942
|
|
|
@@ -2065,108 +969,33 @@ module DaytonaApiClient
|
|
|
2065
969
|
return data, status_code, headers
|
|
2066
970
|
end
|
|
2067
971
|
|
|
2068
|
-
# Resize sandbox resources
|
|
2069
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2070
|
-
# @param resize_sandbox [ResizeSandbox]
|
|
2071
|
-
# @param [Hash] opts the optional parameters
|
|
2072
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2073
|
-
# @return [Sandbox]
|
|
2074
|
-
def resize_sandbox(sandbox_id_or_name, resize_sandbox, opts = {})
|
|
2075
|
-
data, _status_code, _headers = resize_sandbox_with_http_info(sandbox_id_or_name, resize_sandbox, opts)
|
|
2076
|
-
data
|
|
2077
|
-
end
|
|
2078
|
-
|
|
2079
|
-
# Resize sandbox resources
|
|
2080
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2081
|
-
# @param resize_sandbox [ResizeSandbox]
|
|
2082
|
-
# @param [Hash] opts the optional parameters
|
|
2083
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2084
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2085
|
-
def resize_sandbox_with_http_info(sandbox_id_or_name, resize_sandbox, opts = {})
|
|
2086
|
-
if @api_client.config.debugging
|
|
2087
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.resize_sandbox ...'
|
|
2088
|
-
end
|
|
2089
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2090
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2091
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.resize_sandbox"
|
|
2092
|
-
end
|
|
2093
|
-
# verify the required parameter 'resize_sandbox' is set
|
|
2094
|
-
if @api_client.config.client_side_validation && resize_sandbox.nil?
|
|
2095
|
-
fail ArgumentError, "Missing the required parameter 'resize_sandbox' when calling SandboxApi.resize_sandbox"
|
|
2096
|
-
end
|
|
2097
|
-
# resource path
|
|
2098
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/resize'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
2099
|
-
|
|
2100
|
-
# query parameters
|
|
2101
|
-
query_params = opts[:query_params] || {}
|
|
2102
|
-
|
|
2103
|
-
# header parameters
|
|
2104
|
-
header_params = opts[:header_params] || {}
|
|
2105
|
-
# HTTP header 'Accept' (if needed)
|
|
2106
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2107
|
-
# HTTP header 'Content-Type'
|
|
2108
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2109
|
-
if !content_type.nil?
|
|
2110
|
-
header_params['Content-Type'] = content_type
|
|
2111
|
-
end
|
|
2112
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2113
|
-
|
|
2114
|
-
# form parameters
|
|
2115
|
-
form_params = opts[:form_params] || {}
|
|
2116
|
-
|
|
2117
|
-
# http body (model)
|
|
2118
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(resize_sandbox)
|
|
2119
|
-
|
|
2120
|
-
# return_type
|
|
2121
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
2122
|
-
|
|
2123
|
-
# auth_names
|
|
2124
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2125
|
-
|
|
2126
|
-
new_options = opts.merge(
|
|
2127
|
-
:operation => :"SandboxApi.resize_sandbox",
|
|
2128
|
-
:header_params => header_params,
|
|
2129
|
-
:query_params => query_params,
|
|
2130
|
-
:form_params => form_params,
|
|
2131
|
-
:body => post_body,
|
|
2132
|
-
:auth_names => auth_names,
|
|
2133
|
-
:return_type => return_type
|
|
2134
|
-
)
|
|
2135
|
-
|
|
2136
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2137
|
-
if @api_client.config.debugging
|
|
2138
|
-
@api_client.config.logger.debug "API called: SandboxApi#resize_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2139
|
-
end
|
|
2140
|
-
return data, status_code, headers
|
|
2141
|
-
end
|
|
2142
|
-
|
|
2143
972
|
# Revoke SSH access for sandbox
|
|
2144
|
-
# @param
|
|
973
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2145
974
|
# @param [Hash] opts the optional parameters
|
|
2146
975
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2147
976
|
# @option opts [String] :token SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.
|
|
2148
|
-
# @return [
|
|
2149
|
-
def revoke_ssh_access(
|
|
2150
|
-
|
|
2151
|
-
|
|
977
|
+
# @return [nil]
|
|
978
|
+
def revoke_ssh_access(sandbox_id, opts = {})
|
|
979
|
+
revoke_ssh_access_with_http_info(sandbox_id, opts)
|
|
980
|
+
nil
|
|
2152
981
|
end
|
|
2153
982
|
|
|
2154
983
|
# Revoke SSH access for sandbox
|
|
2155
|
-
# @param
|
|
984
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2156
985
|
# @param [Hash] opts the optional parameters
|
|
2157
986
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2158
987
|
# @option opts [String] :token SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.
|
|
2159
|
-
# @return [Array<(
|
|
2160
|
-
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 = {})
|
|
2161
990
|
if @api_client.config.debugging
|
|
2162
991
|
@api_client.config.logger.debug 'Calling API: SandboxApi.revoke_ssh_access ...'
|
|
2163
992
|
end
|
|
2164
|
-
# verify the required parameter '
|
|
2165
|
-
if @api_client.config.client_side_validation &&
|
|
2166
|
-
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"
|
|
2167
996
|
end
|
|
2168
997
|
# resource path
|
|
2169
|
-
local_var_path = '/sandbox/{
|
|
998
|
+
local_var_path = '/sandbox/{sandboxId}/ssh-access'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
2170
999
|
|
|
2171
1000
|
# query parameters
|
|
2172
1001
|
query_params = opts[:query_params] || {}
|
|
@@ -2174,8 +1003,6 @@ module DaytonaApiClient
|
|
|
2174
1003
|
|
|
2175
1004
|
# header parameters
|
|
2176
1005
|
header_params = opts[:header_params] || {}
|
|
2177
|
-
# HTTP header 'Accept' (if needed)
|
|
2178
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2179
1006
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2180
1007
|
|
|
2181
1008
|
# form parameters
|
|
@@ -2185,7 +1012,7 @@ module DaytonaApiClient
|
|
|
2185
1012
|
post_body = opts[:debug_body]
|
|
2186
1013
|
|
|
2187
1014
|
# return_type
|
|
2188
|
-
return_type = opts[:debug_return_type]
|
|
1015
|
+
return_type = opts[:debug_return_type]
|
|
2189
1016
|
|
|
2190
1017
|
# auth_names
|
|
2191
1018
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
@@ -2208,44 +1035,42 @@ module DaytonaApiClient
|
|
|
2208
1035
|
end
|
|
2209
1036
|
|
|
2210
1037
|
# Set sandbox auto-archive interval
|
|
2211
|
-
# @param
|
|
1038
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2212
1039
|
# @param interval [Float] Auto-archive interval in minutes (0 means the maximum interval will be used)
|
|
2213
1040
|
# @param [Hash] opts the optional parameters
|
|
2214
1041
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2215
|
-
# @return [
|
|
2216
|
-
def set_auto_archive_interval(
|
|
2217
|
-
|
|
2218
|
-
|
|
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
|
|
2219
1046
|
end
|
|
2220
1047
|
|
|
2221
1048
|
# Set sandbox auto-archive interval
|
|
2222
|
-
# @param
|
|
1049
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2223
1050
|
# @param interval [Float] Auto-archive interval in minutes (0 means the maximum interval will be used)
|
|
2224
1051
|
# @param [Hash] opts the optional parameters
|
|
2225
1052
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2226
|
-
# @return [Array<(
|
|
2227
|
-
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 = {})
|
|
2228
1055
|
if @api_client.config.debugging
|
|
2229
1056
|
@api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_archive_interval ...'
|
|
2230
1057
|
end
|
|
2231
|
-
# verify the required parameter '
|
|
2232
|
-
if @api_client.config.client_side_validation &&
|
|
2233
|
-
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"
|
|
2234
1061
|
end
|
|
2235
1062
|
# verify the required parameter 'interval' is set
|
|
2236
1063
|
if @api_client.config.client_side_validation && interval.nil?
|
|
2237
1064
|
fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_auto_archive_interval"
|
|
2238
1065
|
end
|
|
2239
1066
|
# resource path
|
|
2240
|
-
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))
|
|
2241
1068
|
|
|
2242
1069
|
# query parameters
|
|
2243
1070
|
query_params = opts[:query_params] || {}
|
|
2244
1071
|
|
|
2245
1072
|
# header parameters
|
|
2246
1073
|
header_params = opts[:header_params] || {}
|
|
2247
|
-
# HTTP header 'Accept' (if needed)
|
|
2248
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2249
1074
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2250
1075
|
|
|
2251
1076
|
# form parameters
|
|
@@ -2255,7 +1080,7 @@ module DaytonaApiClient
|
|
|
2255
1080
|
post_body = opts[:debug_body]
|
|
2256
1081
|
|
|
2257
1082
|
# return_type
|
|
2258
|
-
return_type = opts[:debug_return_type]
|
|
1083
|
+
return_type = opts[:debug_return_type]
|
|
2259
1084
|
|
|
2260
1085
|
# auth_names
|
|
2261
1086
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
@@ -2278,44 +1103,42 @@ module DaytonaApiClient
|
|
|
2278
1103
|
end
|
|
2279
1104
|
|
|
2280
1105
|
# Set sandbox auto-delete interval
|
|
2281
|
-
# @param
|
|
1106
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2282
1107
|
# @param interval [Float] Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
|
|
2283
1108
|
# @param [Hash] opts the optional parameters
|
|
2284
1109
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2285
|
-
# @return [
|
|
2286
|
-
def set_auto_delete_interval(
|
|
2287
|
-
|
|
2288
|
-
|
|
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
|
|
2289
1114
|
end
|
|
2290
1115
|
|
|
2291
1116
|
# Set sandbox auto-delete interval
|
|
2292
|
-
# @param
|
|
1117
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2293
1118
|
# @param interval [Float] Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
|
|
2294
1119
|
# @param [Hash] opts the optional parameters
|
|
2295
1120
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2296
|
-
# @return [Array<(
|
|
2297
|
-
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 = {})
|
|
2298
1123
|
if @api_client.config.debugging
|
|
2299
1124
|
@api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_delete_interval ...'
|
|
2300
1125
|
end
|
|
2301
|
-
# verify the required parameter '
|
|
2302
|
-
if @api_client.config.client_side_validation &&
|
|
2303
|
-
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"
|
|
2304
1129
|
end
|
|
2305
1130
|
# verify the required parameter 'interval' is set
|
|
2306
1131
|
if @api_client.config.client_side_validation && interval.nil?
|
|
2307
1132
|
fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_auto_delete_interval"
|
|
2308
1133
|
end
|
|
2309
1134
|
# resource path
|
|
2310
|
-
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))
|
|
2311
1136
|
|
|
2312
1137
|
# query parameters
|
|
2313
1138
|
query_params = opts[:query_params] || {}
|
|
2314
1139
|
|
|
2315
1140
|
# header parameters
|
|
2316
1141
|
header_params = opts[:header_params] || {}
|
|
2317
|
-
# HTTP header 'Accept' (if needed)
|
|
2318
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2319
1142
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2320
1143
|
|
|
2321
1144
|
# form parameters
|
|
@@ -2325,7 +1148,7 @@ module DaytonaApiClient
|
|
|
2325
1148
|
post_body = opts[:debug_body]
|
|
2326
1149
|
|
|
2327
1150
|
# return_type
|
|
2328
|
-
return_type = opts[:debug_return_type]
|
|
1151
|
+
return_type = opts[:debug_return_type]
|
|
2329
1152
|
|
|
2330
1153
|
# auth_names
|
|
2331
1154
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
@@ -2348,44 +1171,42 @@ module DaytonaApiClient
|
|
|
2348
1171
|
end
|
|
2349
1172
|
|
|
2350
1173
|
# Set sandbox auto-stop interval
|
|
2351
|
-
# @param
|
|
1174
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2352
1175
|
# @param interval [Float] Auto-stop interval in minutes (0 to disable)
|
|
2353
1176
|
# @param [Hash] opts the optional parameters
|
|
2354
1177
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2355
|
-
# @return [
|
|
2356
|
-
def set_autostop_interval(
|
|
2357
|
-
|
|
2358
|
-
|
|
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
|
|
2359
1182
|
end
|
|
2360
1183
|
|
|
2361
1184
|
# Set sandbox auto-stop interval
|
|
2362
|
-
# @param
|
|
1185
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2363
1186
|
# @param interval [Float] Auto-stop interval in minutes (0 to disable)
|
|
2364
1187
|
# @param [Hash] opts the optional parameters
|
|
2365
1188
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2366
|
-
# @return [Array<(
|
|
2367
|
-
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 = {})
|
|
2368
1191
|
if @api_client.config.debugging
|
|
2369
1192
|
@api_client.config.logger.debug 'Calling API: SandboxApi.set_autostop_interval ...'
|
|
2370
1193
|
end
|
|
2371
|
-
# verify the required parameter '
|
|
2372
|
-
if @api_client.config.client_side_validation &&
|
|
2373
|
-
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"
|
|
2374
1197
|
end
|
|
2375
1198
|
# verify the required parameter 'interval' is set
|
|
2376
1199
|
if @api_client.config.client_side_validation && interval.nil?
|
|
2377
1200
|
fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_autostop_interval"
|
|
2378
1201
|
end
|
|
2379
1202
|
# resource path
|
|
2380
|
-
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))
|
|
2381
1204
|
|
|
2382
1205
|
# query parameters
|
|
2383
1206
|
query_params = opts[:query_params] || {}
|
|
2384
1207
|
|
|
2385
1208
|
# header parameters
|
|
2386
1209
|
header_params = opts[:header_params] || {}
|
|
2387
|
-
# HTTP header 'Accept' (if needed)
|
|
2388
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2389
1210
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2390
1211
|
|
|
2391
1212
|
# form parameters
|
|
@@ -2395,7 +1216,7 @@ module DaytonaApiClient
|
|
|
2395
1216
|
post_body = opts[:debug_body]
|
|
2396
1217
|
|
|
2397
1218
|
# return_type
|
|
2398
|
-
return_type = opts[:debug_return_type]
|
|
1219
|
+
return_type = opts[:debug_return_type]
|
|
2399
1220
|
|
|
2400
1221
|
# auth_names
|
|
2401
1222
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
@@ -2418,30 +1239,30 @@ module DaytonaApiClient
|
|
|
2418
1239
|
end
|
|
2419
1240
|
|
|
2420
1241
|
# Start sandbox
|
|
2421
|
-
# @param
|
|
1242
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2422
1243
|
# @param [Hash] opts the optional parameters
|
|
2423
1244
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2424
1245
|
# @return [Sandbox]
|
|
2425
|
-
def start_sandbox(
|
|
2426
|
-
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)
|
|
2427
1248
|
data
|
|
2428
1249
|
end
|
|
2429
1250
|
|
|
2430
1251
|
# Start sandbox
|
|
2431
|
-
# @param
|
|
1252
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2432
1253
|
# @param [Hash] opts the optional parameters
|
|
2433
1254
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2434
1255
|
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2435
|
-
def start_sandbox_with_http_info(
|
|
1256
|
+
def start_sandbox_with_http_info(sandbox_id, opts = {})
|
|
2436
1257
|
if @api_client.config.debugging
|
|
2437
1258
|
@api_client.config.logger.debug 'Calling API: SandboxApi.start_sandbox ...'
|
|
2438
1259
|
end
|
|
2439
|
-
# verify the required parameter '
|
|
2440
|
-
if @api_client.config.client_side_validation &&
|
|
2441
|
-
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"
|
|
2442
1263
|
end
|
|
2443
1264
|
# resource path
|
|
2444
|
-
local_var_path = '/sandbox/{
|
|
1265
|
+
local_var_path = '/sandbox/{sandboxId}/start'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
2445
1266
|
|
|
2446
1267
|
# query parameters
|
|
2447
1268
|
query_params = opts[:query_params] || {}
|
|
@@ -2482,97 +1303,30 @@ module DaytonaApiClient
|
|
|
2482
1303
|
end
|
|
2483
1304
|
|
|
2484
1305
|
# Stop sandbox
|
|
2485
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2486
|
-
# @param [Hash] opts the optional parameters
|
|
2487
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2488
|
-
# @option opts [Boolean] :force Force stop the sandbox using SIGKILL instead of SIGTERM
|
|
2489
|
-
# @return [Sandbox]
|
|
2490
|
-
def stop_sandbox(sandbox_id_or_name, opts = {})
|
|
2491
|
-
data, _status_code, _headers = stop_sandbox_with_http_info(sandbox_id_or_name, opts)
|
|
2492
|
-
data
|
|
2493
|
-
end
|
|
2494
|
-
|
|
2495
|
-
# Stop sandbox
|
|
2496
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2497
|
-
# @param [Hash] opts the optional parameters
|
|
2498
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2499
|
-
# @option opts [Boolean] :force Force stop the sandbox using SIGKILL instead of SIGTERM
|
|
2500
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2501
|
-
def stop_sandbox_with_http_info(sandbox_id_or_name, opts = {})
|
|
2502
|
-
if @api_client.config.debugging
|
|
2503
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.stop_sandbox ...'
|
|
2504
|
-
end
|
|
2505
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2506
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2507
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.stop_sandbox"
|
|
2508
|
-
end
|
|
2509
|
-
# resource path
|
|
2510
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/stop'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
2511
|
-
|
|
2512
|
-
# query parameters
|
|
2513
|
-
query_params = opts[:query_params] || {}
|
|
2514
|
-
query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil?
|
|
2515
|
-
|
|
2516
|
-
# header parameters
|
|
2517
|
-
header_params = opts[:header_params] || {}
|
|
2518
|
-
# HTTP header 'Accept' (if needed)
|
|
2519
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2520
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2521
|
-
|
|
2522
|
-
# form parameters
|
|
2523
|
-
form_params = opts[:form_params] || {}
|
|
2524
|
-
|
|
2525
|
-
# http body (model)
|
|
2526
|
-
post_body = opts[:debug_body]
|
|
2527
|
-
|
|
2528
|
-
# return_type
|
|
2529
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
2530
|
-
|
|
2531
|
-
# auth_names
|
|
2532
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2533
|
-
|
|
2534
|
-
new_options = opts.merge(
|
|
2535
|
-
:operation => :"SandboxApi.stop_sandbox",
|
|
2536
|
-
:header_params => header_params,
|
|
2537
|
-
:query_params => query_params,
|
|
2538
|
-
:form_params => form_params,
|
|
2539
|
-
:body => post_body,
|
|
2540
|
-
:auth_names => auth_names,
|
|
2541
|
-
:return_type => return_type
|
|
2542
|
-
)
|
|
2543
|
-
|
|
2544
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2545
|
-
if @api_client.config.debugging
|
|
2546
|
-
@api_client.config.logger.debug "API called: SandboxApi#stop_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2547
|
-
end
|
|
2548
|
-
return data, status_code, headers
|
|
2549
|
-
end
|
|
2550
|
-
|
|
2551
|
-
# Update sandbox last activity
|
|
2552
1306
|
# @param sandbox_id [String] ID of the sandbox
|
|
2553
1307
|
# @param [Hash] opts the optional parameters
|
|
2554
1308
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2555
1309
|
# @return [nil]
|
|
2556
|
-
def
|
|
2557
|
-
|
|
1310
|
+
def stop_sandbox(sandbox_id, opts = {})
|
|
1311
|
+
stop_sandbox_with_http_info(sandbox_id, opts)
|
|
2558
1312
|
nil
|
|
2559
1313
|
end
|
|
2560
1314
|
|
|
2561
|
-
#
|
|
1315
|
+
# Stop sandbox
|
|
2562
1316
|
# @param sandbox_id [String] ID of the sandbox
|
|
2563
1317
|
# @param [Hash] opts the optional parameters
|
|
2564
1318
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2565
1319
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
2566
|
-
def
|
|
1320
|
+
def stop_sandbox_with_http_info(sandbox_id, opts = {})
|
|
2567
1321
|
if @api_client.config.debugging
|
|
2568
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
1322
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.stop_sandbox ...'
|
|
2569
1323
|
end
|
|
2570
1324
|
# verify the required parameter 'sandbox_id' is set
|
|
2571
1325
|
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
2572
|
-
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"
|
|
2573
1327
|
end
|
|
2574
1328
|
# resource path
|
|
2575
|
-
local_var_path = '/sandbox/{sandboxId}/
|
|
1329
|
+
local_var_path = '/sandbox/{sandboxId}/stop'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
2576
1330
|
|
|
2577
1331
|
# query parameters
|
|
2578
1332
|
query_params = opts[:query_params] || {}
|
|
@@ -2594,7 +1348,7 @@ module DaytonaApiClient
|
|
|
2594
1348
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2595
1349
|
|
|
2596
1350
|
new_options = opts.merge(
|
|
2597
|
-
:operation => :"SandboxApi.
|
|
1351
|
+
:operation => :"SandboxApi.stop_sandbox",
|
|
2598
1352
|
:header_params => header_params,
|
|
2599
1353
|
:query_params => query_params,
|
|
2600
1354
|
:form_params => form_params,
|
|
@@ -2605,50 +1359,48 @@ module DaytonaApiClient
|
|
|
2605
1359
|
|
|
2606
1360
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2607
1361
|
if @api_client.config.debugging
|
|
2608
|
-
@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}"
|
|
2609
1363
|
end
|
|
2610
1364
|
return data, status_code, headers
|
|
2611
1365
|
end
|
|
2612
1366
|
|
|
2613
1367
|
# Update public status
|
|
2614
|
-
# @param
|
|
1368
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2615
1369
|
# @param is_public [Boolean] Public status to set
|
|
2616
1370
|
# @param [Hash] opts the optional parameters
|
|
2617
1371
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2618
|
-
# @return [
|
|
2619
|
-
def update_public_status(
|
|
2620
|
-
|
|
2621
|
-
|
|
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
|
|
2622
1376
|
end
|
|
2623
1377
|
|
|
2624
1378
|
# Update public status
|
|
2625
|
-
# @param
|
|
1379
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2626
1380
|
# @param is_public [Boolean] Public status to set
|
|
2627
1381
|
# @param [Hash] opts the optional parameters
|
|
2628
1382
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2629
|
-
# @return [Array<(
|
|
2630
|
-
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 = {})
|
|
2631
1385
|
if @api_client.config.debugging
|
|
2632
1386
|
@api_client.config.logger.debug 'Calling API: SandboxApi.update_public_status ...'
|
|
2633
1387
|
end
|
|
2634
|
-
# verify the required parameter '
|
|
2635
|
-
if @api_client.config.client_side_validation &&
|
|
2636
|
-
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"
|
|
2637
1391
|
end
|
|
2638
1392
|
# verify the required parameter 'is_public' is set
|
|
2639
1393
|
if @api_client.config.client_side_validation && is_public.nil?
|
|
2640
1394
|
fail ArgumentError, "Missing the required parameter 'is_public' when calling SandboxApi.update_public_status"
|
|
2641
1395
|
end
|
|
2642
1396
|
# resource path
|
|
2643
|
-
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))
|
|
2644
1398
|
|
|
2645
1399
|
# query parameters
|
|
2646
1400
|
query_params = opts[:query_params] || {}
|
|
2647
1401
|
|
|
2648
1402
|
# header parameters
|
|
2649
1403
|
header_params = opts[:header_params] || {}
|
|
2650
|
-
# HTTP header 'Accept' (if needed)
|
|
2651
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2652
1404
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2653
1405
|
|
|
2654
1406
|
# form parameters
|
|
@@ -2658,7 +1410,7 @@ module DaytonaApiClient
|
|
|
2658
1410
|
post_body = opts[:debug_body]
|
|
2659
1411
|
|
|
2660
1412
|
# return_type
|
|
2661
|
-
return_type = opts[:debug_return_type]
|
|
1413
|
+
return_type = opts[:debug_return_type]
|
|
2662
1414
|
|
|
2663
1415
|
# auth_names
|
|
2664
1416
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
@@ -2720,7 +1472,7 @@ module DaytonaApiClient
|
|
|
2720
1472
|
# HTTP header 'Content-Type'
|
|
2721
1473
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2722
1474
|
if !content_type.nil?
|
|
2723
|
-
|
|
1475
|
+
header_params['Content-Type'] = content_type
|
|
2724
1476
|
end
|
|
2725
1477
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2726
1478
|
|