daytona_api_client 0.184.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 +2 -2
- data/lib/daytona_api_client/api/audit_api.rb +140 -10
- data/lib/daytona_api_client/api/config_api.rb +1 -1
- data/lib/daytona_api_client/api/docker_registry_api.rb +67 -6
- data/lib/daytona_api_client/api/health_api.rb +3 -54
- data/lib/daytona_api_client/api/object_storage_api.rb +1 -1
- data/lib/daytona_api_client/api/organizations_api.rb +155 -1075
- data/lib/daytona_api_client/api/preview_api.rb +8 -77
- data/lib/daytona_api_client/api/runners_api.rb +22 -412
- data/lib/daytona_api_client/api/sandbox_api.rb +307 -1732
- data/lib/daytona_api_client/api/snapshots_api.rb +113 -39
- data/lib/daytona_api_client/api/toolbox_api.rb +741 -741
- data/lib/daytona_api_client/api/users_api.rb +239 -2
- data/lib/daytona_api_client/api/volumes_api.rb +2 -2
- data/lib/daytona_api_client/api/webhooks_api.rb +164 -27
- data/lib/daytona_api_client/api/workspace_api.rb +955 -0
- data/lib/daytona_api_client/api_client.rb +4 -8
- data/lib/daytona_api_client/api_error.rb +1 -1
- data/lib/daytona_api_client/configuration.rb +2 -5
- data/lib/daytona_api_client/models/account_provider.rb +74 -3
- data/lib/daytona_api_client/models/announcement.rb +74 -3
- data/lib/daytona_api_client/models/api_key_list.rb +74 -3
- data/lib/daytona_api_client/models/api_key_response.rb +74 -3
- data/lib/daytona_api_client/models/audit_log.rb +75 -22
- data/lib/daytona_api_client/models/build_info.rb +78 -34
- data/lib/daytona_api_client/models/command.rb +74 -3
- data/lib/daytona_api_client/models/completion_context.rb +74 -3
- data/lib/daytona_api_client/models/completion_item.rb +74 -3
- data/lib/daytona_api_client/models/completion_list.rb +74 -3
- data/lib/daytona_api_client/models/compressed_screenshot_response.rb +74 -3
- data/lib/daytona_api_client/models/computer_use_start_response.rb +74 -3
- data/lib/daytona_api_client/models/computer_use_status_response.rb +76 -5
- data/lib/daytona_api_client/models/computer_use_stop_response.rb +74 -3
- data/lib/daytona_api_client/models/create_api_key.rb +75 -4
- data/lib/daytona_api_client/models/create_audit_log.rb +350 -0
- data/lib/daytona_api_client/models/create_build_info.rb +74 -3
- data/lib/daytona_api_client/models/create_docker_registry.rb +139 -7
- data/lib/daytona_api_client/models/create_linked_account.rb +74 -3
- data/lib/daytona_api_client/models/create_organization.rb +78 -34
- data/lib/daytona_api_client/models/create_organization_invitation.rb +76 -5
- data/lib/daytona_api_client/models/create_organization_quota.rb +74 -3
- data/lib/daytona_api_client/models/create_organization_role.rb +74 -3
- data/lib/daytona_api_client/models/create_runner.rb +386 -43
- data/lib/daytona_api_client/models/create_sandbox.rb +121 -38
- data/lib/daytona_api_client/models/create_session_request.rb +74 -3
- data/lib/daytona_api_client/models/create_snapshot.rb +88 -61
- data/lib/daytona_api_client/models/create_user.rb +77 -15
- data/lib/daytona_api_client/models/create_volume.rb +74 -3
- data/lib/daytona_api_client/models/create_workspace.rb +411 -0
- data/lib/daytona_api_client/models/daytona_configuration.rb +78 -54
- data/lib/daytona_api_client/models/display_info_response.rb +74 -3
- data/lib/daytona_api_client/models/docker_registry.rb +76 -5
- data/lib/daytona_api_client/models/download_files.rb +74 -3
- data/lib/daytona_api_client/models/execute_request.rb +74 -3
- data/lib/daytona_api_client/models/execute_response.rb +74 -3
- data/lib/daytona_api_client/models/file_info.rb +74 -3
- data/lib/daytona_api_client/models/file_status.rb +74 -3
- data/lib/daytona_api_client/models/git_add_request.rb +74 -3
- data/lib/daytona_api_client/models/git_branch_request.rb +74 -3
- data/lib/daytona_api_client/models/git_checkout_request.rb +74 -3
- data/lib/daytona_api_client/models/git_clone_request.rb +74 -3
- data/lib/daytona_api_client/models/git_commit_info.rb +74 -3
- data/lib/daytona_api_client/models/git_commit_request.rb +74 -3
- data/lib/daytona_api_client/models/git_commit_response.rb +74 -3
- data/lib/daytona_api_client/models/git_delete_branch_request.rb +74 -3
- data/lib/daytona_api_client/models/git_repo_request.rb +74 -3
- data/lib/daytona_api_client/models/git_status.rb +74 -3
- data/lib/daytona_api_client/models/health_controller_check200_response.rb +74 -3
- data/lib/daytona_api_client/models/health_controller_check200_response_info_value.rb +74 -3
- data/lib/daytona_api_client/models/health_controller_check503_response.rb +74 -3
- data/lib/daytona_api_client/models/keyboard_hotkey_request.rb +74 -3
- data/lib/daytona_api_client/models/keyboard_press_request.rb +74 -3
- data/lib/daytona_api_client/models/keyboard_type_request.rb +74 -3
- data/lib/daytona_api_client/models/list_branch_response.rb +74 -3
- data/lib/daytona_api_client/models/lsp_completion_params.rb +74 -3
- data/lib/daytona_api_client/models/lsp_document_request.rb +74 -3
- data/lib/daytona_api_client/models/lsp_location.rb +74 -3
- data/lib/daytona_api_client/models/lsp_server_request.rb +74 -3
- data/lib/daytona_api_client/models/lsp_symbol.rb +74 -3
- data/lib/daytona_api_client/models/match.rb +74 -3
- data/lib/daytona_api_client/models/mouse_click_request.rb +74 -3
- data/lib/daytona_api_client/models/mouse_click_response.rb +74 -3
- data/lib/daytona_api_client/models/mouse_drag_request.rb +74 -3
- data/lib/daytona_api_client/models/mouse_drag_response.rb +74 -3
- data/lib/daytona_api_client/models/mouse_move_request.rb +74 -3
- data/lib/daytona_api_client/models/mouse_move_response.rb +74 -3
- data/lib/daytona_api_client/models/mouse_position.rb +74 -3
- data/lib/daytona_api_client/models/mouse_scroll_request.rb +74 -3
- data/lib/daytona_api_client/models/mouse_scroll_response.rb +74 -3
- data/lib/daytona_api_client/models/oidc_config.rb +74 -3
- data/lib/daytona_api_client/models/organization.rb +159 -162
- data/lib/daytona_api_client/models/organization_invitation.rb +78 -7
- data/lib/daytona_api_client/models/organization_role.rb +74 -3
- data/lib/daytona_api_client/models/organization_sandbox_default_limited_network_egress.rb +74 -3
- data/lib/daytona_api_client/models/organization_suspension.rb +79 -10
- data/lib/daytona_api_client/models/organization_usage_overview.rb +220 -21
- data/lib/daytona_api_client/models/organization_user.rb +76 -5
- data/lib/daytona_api_client/models/paginated_audit_logs.rb +78 -17
- data/lib/daytona_api_client/models/{paginated_sandboxes_deprecated.rb → paginated_sandboxes.rb} +76 -5
- data/lib/daytona_api_client/models/paginated_snapshots.rb +74 -3
- data/lib/daytona_api_client/models/{paginated_jobs.rb → paginated_snapshots_dto.rb} +77 -6
- data/lib/daytona_api_client/models/port_preview_url.rb +88 -34
- data/lib/daytona_api_client/models/position.rb +74 -3
- data/lib/daytona_api_client/models/posthog_config.rb +74 -3
- data/lib/daytona_api_client/models/process_errors_response.rb +74 -3
- data/lib/daytona_api_client/models/process_logs_response.rb +74 -3
- data/lib/daytona_api_client/models/process_restart_response.rb +74 -3
- data/lib/daytona_api_client/models/process_status_response.rb +74 -3
- data/lib/daytona_api_client/models/project_dir_response.rb +74 -3
- data/lib/daytona_api_client/models/pty_create_request.rb +74 -3
- data/lib/daytona_api_client/models/pty_create_response.rb +74 -3
- data/lib/daytona_api_client/models/pty_list_response.rb +74 -3
- data/lib/daytona_api_client/models/pty_resize_request.rb +74 -3
- data/lib/daytona_api_client/models/pty_session_info.rb +74 -3
- data/lib/daytona_api_client/models/range.rb +74 -3
- data/lib/daytona_api_client/models/region.rb +78 -181
- data/lib/daytona_api_client/models/region_screenshot_response.rb +74 -3
- data/lib/daytona_api_client/models/registry_push_access_dto.rb +74 -3
- data/lib/daytona_api_client/models/replace_request.rb +74 -3
- data/lib/daytona_api_client/models/replace_result.rb +74 -3
- data/lib/daytona_api_client/models/runner.rb +215 -145
- data/lib/daytona_api_client/models/runner_snapshot_dto.rb +91 -3
- data/lib/daytona_api_client/models/runner_state.rb +3 -4
- data/lib/daytona_api_client/models/sandbox.rb +104 -127
- data/lib/daytona_api_client/models/sandbox_class.rb +6 -8
- data/lib/daytona_api_client/models/sandbox_desired_state.rb +3 -4
- data/lib/daytona_api_client/models/{create_region.rb → sandbox_info.rb} +113 -38
- data/lib/daytona_api_client/models/sandbox_labels.rb +74 -3
- data/lib/daytona_api_client/models/sandbox_state.rb +3 -7
- data/lib/daytona_api_client/models/sandbox_volume.rb +78 -17
- data/lib/daytona_api_client/models/screenshot_response.rb +74 -3
- data/lib/daytona_api_client/models/search_files_response.rb +74 -3
- data/lib/daytona_api_client/models/send_webhook_dto.rb +75 -26
- data/lib/daytona_api_client/models/session.rb +74 -3
- data/lib/daytona_api_client/models/session_execute_request.rb +74 -3
- data/lib/daytona_api_client/models/session_execute_response.rb +74 -3
- data/lib/daytona_api_client/models/set_snapshot_general_status_dto.rb +74 -3
- data/lib/daytona_api_client/models/snapshot_dto.rb +78 -71
- data/lib/daytona_api_client/models/snapshot_state.rb +6 -4
- data/lib/daytona_api_client/models/ssh_access_dto.rb +78 -34
- data/lib/daytona_api_client/models/ssh_access_validation_dto.rb +98 -7
- data/lib/daytona_api_client/models/storage_access_dto.rb +74 -3
- data/lib/daytona_api_client/models/update_docker_registry.rb +74 -3
- data/lib/daytona_api_client/models/update_organization_invitation.rb +76 -5
- data/lib/daytona_api_client/models/update_organization_member_access.rb +76 -5
- data/lib/daytona_api_client/models/update_organization_quota.rb +115 -93
- data/lib/daytona_api_client/models/update_organization_role.rb +74 -3
- data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +80 -29
- data/lib/daytona_api_client/models/user.rb +74 -3
- data/lib/daytona_api_client/models/user_home_dir_response.rb +74 -3
- data/lib/daytona_api_client/models/user_public_key.rb +74 -3
- data/lib/daytona_api_client/models/volume_dto.rb +74 -3
- data/lib/daytona_api_client/models/volume_state.rb +3 -4
- data/lib/daytona_api_client/models/webhook_app_portal_access.rb +75 -31
- data/lib/daytona_api_client/models/{admin_get_webhook_status200_response.rb → webhook_controller_get_status200_response.rb} +76 -5
- data/lib/daytona_api_client/models/webhook_initialization_status.rb +74 -3
- data/lib/daytona_api_client/models/windows_response.rb +74 -3
- data/lib/daytona_api_client/models/work_dir_response.rb +74 -3
- data/lib/daytona_api_client/models/{sandbox_list_item.rb → workspace.rb} +344 -180
- data/lib/daytona_api_client/version.rb +2 -2
- data/lib/daytona_api_client.rb +8 -55
- data/project.json +11 -42
- metadata +11 -62
- data/.gitignore +0 -39
- data/.openapi-generator/FILES +0 -212
- 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 -1449
- 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/api_model_base.rb +0 -88
- data/lib/daytona_api_client/models/admin_create_runner.rb +0 -326
- data/lib/daytona_api_client/models/create_organization_region_quota.rb +0 -372
- data/lib/daytona_api_client/models/create_region_response.rb +0 -209
- data/lib/daytona_api_client/models/create_runner_response.rb +0 -192
- data/lib/daytona_api_client/models/create_sandbox_snapshot.rb +0 -165
- data/lib/daytona_api_client/models/fork_sandbox.rb +0 -148
- data/lib/daytona_api_client/models/gpu_type.rb +0 -41
- data/lib/daytona_api_client/models/job.rb +0 -366
- data/lib/daytona_api_client/models/job_status.rb +0 -43
- data/lib/daytona_api_client/models/job_type.rb +0 -53
- data/lib/daytona_api_client/models/list_sandboxes_response.rb +0 -180
- data/lib/daytona_api_client/models/log_entry.rb +0 -334
- data/lib/daytona_api_client/models/metric_data_point.rb +0 -192
- data/lib/daytona_api_client/models/metric_series.rb +0 -194
- data/lib/daytona_api_client/models/metrics_response.rb +0 -167
- data/lib/daytona_api_client/models/otel_config.rb +0 -178
- data/lib/daytona_api_client/models/paginated_logs.rb +0 -248
- data/lib/daytona_api_client/models/paginated_traces.rb +0 -248
- data/lib/daytona_api_client/models/poll_jobs_response.rb +0 -167
- data/lib/daytona_api_client/models/rate_limit_config.rb +0 -178
- data/lib/daytona_api_client/models/rate_limit_entry.rb +0 -158
- data/lib/daytona_api_client/models/regenerate_api_key_response.rb +0 -165
- data/lib/daytona_api_client/models/region_quota.rb +0 -437
- data/lib/daytona_api_client/models/region_type.rb +0 -42
- data/lib/daytona_api_client/models/region_usage_overview.rb +0 -515
- data/lib/daytona_api_client/models/resize_sandbox.rb +0 -225
- data/lib/daytona_api_client/models/runner_class.rb +0 -41
- data/lib/daytona_api_client/models/runner_full.rb +0 -747
- data/lib/daytona_api_client/models/runner_health_metrics.rb +0 -482
- data/lib/daytona_api_client/models/runner_healthcheck.rb +0 -217
- data/lib/daytona_api_client/models/runner_service_health.rb +0 -202
- data/lib/daytona_api_client/models/sandbox_list_sort_direction.rb +0 -41
- data/lib/daytona_api_client/models/sandbox_list_sort_field.rb +0 -45
- data/lib/daytona_api_client/models/signed_port_preview_url.rb +0 -246
- data/lib/daytona_api_client/models/snapshot_manager_credentials.rb +0 -192
- data/lib/daytona_api_client/models/toolbox_proxy_url.rb +0 -165
- data/lib/daytona_api_client/models/trace_span.rb +0 -332
- data/lib/daytona_api_client/models/trace_summary.rb +0 -310
- data/lib/daytona_api_client/models/update_job_status.rb +0 -207
- data/lib/daytona_api_client/models/update_organization_default_region.rb +0 -165
- data/lib/daytona_api_client/models/update_organization_region_quota.rb +0 -299
- data/lib/daytona_api_client/models/update_region.rb +0 -171
- data/lib/daytona_api_client/models/update_sandbox_network_settings.rb +0 -158
- data/lib/daytona_api_client/models/url.rb +0 -165
- data/lib/daytona_api_client/models/webhook_event.rb +0 -46
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
|
7
7
|
Contact: support@daytona.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
Generator version: 7.
|
|
9
|
+
Generator version: 7.12.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -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,46 +343,37 @@ module DaytonaApiClient
|
|
|
422
343
|
return data, status_code, headers
|
|
423
344
|
end
|
|
424
345
|
|
|
425
|
-
#
|
|
426
|
-
# @param
|
|
427
|
-
# @param port [Integer] Port number to expire signed preview URL for
|
|
428
|
-
# @param token [String] Token to expire signed preview URL for
|
|
346
|
+
# Get build logs
|
|
347
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
429
348
|
# @param [Hash] opts the optional parameters
|
|
430
349
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
350
|
+
# @option opts [Boolean] :follow Whether to follow the logs stream
|
|
431
351
|
# @return [nil]
|
|
432
|
-
def
|
|
433
|
-
|
|
352
|
+
def get_build_logs(sandbox_id, opts = {})
|
|
353
|
+
get_build_logs_with_http_info(sandbox_id, opts)
|
|
434
354
|
nil
|
|
435
355
|
end
|
|
436
356
|
|
|
437
|
-
#
|
|
438
|
-
# @param
|
|
439
|
-
# @param port [Integer] Port number to expire signed preview URL for
|
|
440
|
-
# @param token [String] Token to expire signed preview URL for
|
|
357
|
+
# Get build logs
|
|
358
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
441
359
|
# @param [Hash] opts the optional parameters
|
|
442
360
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
361
|
+
# @option opts [Boolean] :follow Whether to follow the logs stream
|
|
443
362
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
444
|
-
def
|
|
363
|
+
def get_build_logs_with_http_info(sandbox_id, opts = {})
|
|
445
364
|
if @api_client.config.debugging
|
|
446
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
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"
|
|
365
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.get_build_logs ...'
|
|
455
366
|
end
|
|
456
|
-
# verify the required parameter '
|
|
457
|
-
if @api_client.config.client_side_validation &&
|
|
458
|
-
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"
|
|
459
370
|
end
|
|
460
371
|
# resource path
|
|
461
|
-
local_var_path = '/sandbox/{
|
|
372
|
+
local_var_path = '/sandbox/{sandboxId}/build-logs'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
462
373
|
|
|
463
374
|
# query parameters
|
|
464
375
|
query_params = opts[:query_params] || {}
|
|
376
|
+
query_params[:'follow'] = opts[:'follow'] if !opts[:'follow'].nil?
|
|
465
377
|
|
|
466
378
|
# header parameters
|
|
467
379
|
header_params = opts[:header_params] || {}
|
|
@@ -480,7 +392,7 @@ module DaytonaApiClient
|
|
|
480
392
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
481
393
|
|
|
482
394
|
new_options = opts.merge(
|
|
483
|
-
:operation => :"SandboxApi.
|
|
395
|
+
:operation => :"SandboxApi.get_build_logs",
|
|
484
396
|
:header_params => header_params,
|
|
485
397
|
:query_params => query_params,
|
|
486
398
|
:form_params => form_params,
|
|
@@ -489,44 +401,44 @@ module DaytonaApiClient
|
|
|
489
401
|
:return_type => return_type
|
|
490
402
|
)
|
|
491
403
|
|
|
492
|
-
data, status_code, headers = @api_client.call_api(:
|
|
404
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
493
405
|
if @api_client.config.debugging
|
|
494
|
-
@api_client.config.logger.debug "API called: SandboxApi#
|
|
406
|
+
@api_client.config.logger.debug "API called: SandboxApi#get_build_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
495
407
|
end
|
|
496
408
|
return data, status_code, headers
|
|
497
409
|
end
|
|
498
410
|
|
|
499
|
-
#
|
|
500
|
-
# @param
|
|
501
|
-
# @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
|
|
502
414
|
# @param [Hash] opts the optional parameters
|
|
503
415
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
504
|
-
# @return [
|
|
505
|
-
def
|
|
506
|
-
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)
|
|
507
419
|
data
|
|
508
420
|
end
|
|
509
421
|
|
|
510
|
-
#
|
|
511
|
-
# @param
|
|
512
|
-
# @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
|
|
513
425
|
# @param [Hash] opts the optional parameters
|
|
514
426
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
515
|
-
# @return [Array<(
|
|
516
|
-
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 = {})
|
|
517
429
|
if @api_client.config.debugging
|
|
518
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
430
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.get_port_preview_url ...'
|
|
519
431
|
end
|
|
520
|
-
# verify the required parameter '
|
|
521
|
-
if @api_client.config.client_side_validation &&
|
|
522
|
-
fail ArgumentError, "Missing the required parameter '
|
|
432
|
+
# verify the required parameter 'sandbox_id' is set
|
|
433
|
+
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
434
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_port_preview_url"
|
|
523
435
|
end
|
|
524
|
-
# verify the required parameter '
|
|
525
|
-
if @api_client.config.client_side_validation &&
|
|
526
|
-
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"
|
|
527
439
|
end
|
|
528
440
|
# resource path
|
|
529
|
-
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))
|
|
530
442
|
|
|
531
443
|
# query parameters
|
|
532
444
|
query_params = opts[:query_params] || {}
|
|
@@ -535,27 +447,22 @@ module DaytonaApiClient
|
|
|
535
447
|
header_params = opts[:header_params] || {}
|
|
536
448
|
# HTTP header 'Accept' (if needed)
|
|
537
449
|
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
450
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
544
451
|
|
|
545
452
|
# form parameters
|
|
546
453
|
form_params = opts[:form_params] || {}
|
|
547
454
|
|
|
548
455
|
# http body (model)
|
|
549
|
-
post_body = opts[:debug_body]
|
|
456
|
+
post_body = opts[:debug_body]
|
|
550
457
|
|
|
551
458
|
# return_type
|
|
552
|
-
return_type = opts[:debug_return_type] || '
|
|
459
|
+
return_type = opts[:debug_return_type] || 'PortPreviewUrl'
|
|
553
460
|
|
|
554
461
|
# auth_names
|
|
555
462
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
556
463
|
|
|
557
464
|
new_options = opts.merge(
|
|
558
|
-
:operation => :"SandboxApi.
|
|
465
|
+
:operation => :"SandboxApi.get_port_preview_url",
|
|
559
466
|
:header_params => header_params,
|
|
560
467
|
:query_params => query_params,
|
|
561
468
|
:form_params => form_params,
|
|
@@ -564,49 +471,49 @@ module DaytonaApiClient
|
|
|
564
471
|
:return_type => return_type
|
|
565
472
|
)
|
|
566
473
|
|
|
567
|
-
data, status_code, headers = @api_client.call_api(:
|
|
474
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
568
475
|
if @api_client.config.debugging
|
|
569
|
-
@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}"
|
|
570
477
|
end
|
|
571
478
|
return data, status_code, headers
|
|
572
479
|
end
|
|
573
480
|
|
|
574
|
-
# Get
|
|
575
|
-
#
|
|
576
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
481
|
+
# Get sandbox details
|
|
482
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
577
483
|
# @param [Hash] opts the optional parameters
|
|
578
484
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
579
|
-
# @option opts [Boolean] :
|
|
580
|
-
# @return [
|
|
581
|
-
def
|
|
582
|
-
|
|
583
|
-
|
|
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)
|
|
489
|
+
data
|
|
584
490
|
end
|
|
585
491
|
|
|
586
|
-
# Get
|
|
587
|
-
#
|
|
588
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
492
|
+
# Get sandbox details
|
|
493
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
589
494
|
# @param [Hash] opts the optional parameters
|
|
590
495
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
591
|
-
# @option opts [Boolean] :
|
|
592
|
-
# @return [Array<(
|
|
593
|
-
def
|
|
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 = {})
|
|
594
499
|
if @api_client.config.debugging
|
|
595
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
500
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox ...'
|
|
596
501
|
end
|
|
597
|
-
# verify the required parameter '
|
|
598
|
-
if @api_client.config.client_side_validation &&
|
|
599
|
-
fail ArgumentError, "Missing the required parameter '
|
|
502
|
+
# verify the required parameter 'sandbox_id' is set
|
|
503
|
+
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
504
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_sandbox"
|
|
600
505
|
end
|
|
601
506
|
# resource path
|
|
602
|
-
local_var_path = '/sandbox/{
|
|
507
|
+
local_var_path = '/sandbox/{sandboxId}'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
603
508
|
|
|
604
509
|
# query parameters
|
|
605
510
|
query_params = opts[:query_params] || {}
|
|
606
|
-
query_params[:'
|
|
511
|
+
query_params[:'verbose'] = opts[:'verbose'] if !opts[:'verbose'].nil?
|
|
607
512
|
|
|
608
513
|
# header parameters
|
|
609
514
|
header_params = opts[:header_params] || {}
|
|
515
|
+
# HTTP header 'Accept' (if needed)
|
|
516
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
610
517
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
611
518
|
|
|
612
519
|
# form parameters
|
|
@@ -616,13 +523,13 @@ module DaytonaApiClient
|
|
|
616
523
|
post_body = opts[:debug_body]
|
|
617
524
|
|
|
618
525
|
# return_type
|
|
619
|
-
return_type = opts[:debug_return_type]
|
|
526
|
+
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
620
527
|
|
|
621
528
|
# auth_names
|
|
622
529
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
623
530
|
|
|
624
531
|
new_options = opts.merge(
|
|
625
|
-
:operation => :"SandboxApi.
|
|
532
|
+
:operation => :"SandboxApi.get_sandbox",
|
|
626
533
|
:header_params => header_params,
|
|
627
534
|
:query_params => query_params,
|
|
628
535
|
:form_params => form_params,
|
|
@@ -633,36 +540,30 @@ module DaytonaApiClient
|
|
|
633
540
|
|
|
634
541
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
635
542
|
if @api_client.config.debugging
|
|
636
|
-
@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}"
|
|
637
544
|
end
|
|
638
545
|
return data, status_code, headers
|
|
639
546
|
end
|
|
640
547
|
|
|
641
|
-
#
|
|
642
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
548
|
+
# List all regions where sandboxes have been created
|
|
643
549
|
# @param [Hash] opts the optional parameters
|
|
644
550
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
645
|
-
# @return [
|
|
646
|
-
def
|
|
647
|
-
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)
|
|
648
554
|
data
|
|
649
555
|
end
|
|
650
556
|
|
|
651
|
-
#
|
|
652
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
557
|
+
# List all regions where sandboxes have been created
|
|
653
558
|
# @param [Hash] opts the optional parameters
|
|
654
559
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
655
|
-
# @return [Array<(
|
|
656
|
-
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 = {})
|
|
657
562
|
if @api_client.config.debugging
|
|
658
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
659
|
-
end
|
|
660
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
661
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
662
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_build_logs_url"
|
|
563
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_regions ...'
|
|
663
564
|
end
|
|
664
565
|
# resource path
|
|
665
|
-
local_var_path = '/sandbox/
|
|
566
|
+
local_var_path = '/sandbox/regions'
|
|
666
567
|
|
|
667
568
|
# query parameters
|
|
668
569
|
query_params = opts[:query_params] || {}
|
|
@@ -680,13 +581,13 @@ module DaytonaApiClient
|
|
|
680
581
|
post_body = opts[:debug_body]
|
|
681
582
|
|
|
682
583
|
# return_type
|
|
683
|
-
return_type = opts[:debug_return_type] || '
|
|
584
|
+
return_type = opts[:debug_return_type] || 'Array<Region>'
|
|
684
585
|
|
|
685
586
|
# auth_names
|
|
686
587
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
687
588
|
|
|
688
589
|
new_options = opts.merge(
|
|
689
|
-
:operation => :"SandboxApi.
|
|
590
|
+
:operation => :"SandboxApi.get_sandbox_regions",
|
|
690
591
|
:header_params => header_params,
|
|
691
592
|
:query_params => query_params,
|
|
692
593
|
:form_params => form_params,
|
|
@@ -697,39 +598,39 @@ module DaytonaApiClient
|
|
|
697
598
|
|
|
698
599
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
699
600
|
if @api_client.config.debugging
|
|
700
|
-
@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}"
|
|
701
602
|
end
|
|
702
603
|
return data, status_code, headers
|
|
703
604
|
end
|
|
704
605
|
|
|
705
|
-
# Get
|
|
706
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
606
|
+
# Get sandboxes for the authenticated runner
|
|
707
607
|
# @param [Hash] opts the optional parameters
|
|
708
608
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
709
|
-
# @
|
|
710
|
-
|
|
711
|
-
|
|
609
|
+
# @option opts [String] :states Comma-separated list of sandbox states to filter by
|
|
610
|
+
# @option opts [Boolean] :skip_reconciling_sandboxes Skip sandboxes where state differs from desired state
|
|
611
|
+
# @return [Array<Sandbox>]
|
|
612
|
+
def get_sandboxes_for_runner(opts = {})
|
|
613
|
+
data, _status_code, _headers = get_sandboxes_for_runner_with_http_info(opts)
|
|
712
614
|
data
|
|
713
615
|
end
|
|
714
616
|
|
|
715
|
-
# Get
|
|
716
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
617
|
+
# Get sandboxes for the authenticated runner
|
|
717
618
|
# @param [Hash] opts the optional parameters
|
|
718
619
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
719
|
-
# @
|
|
720
|
-
|
|
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 = {})
|
|
721
624
|
if @api_client.config.debugging
|
|
722
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
723
|
-
end
|
|
724
|
-
# verify the required parameter 'sandbox_id' is set
|
|
725
|
-
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
726
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_organization_by_sandbox_id"
|
|
625
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandboxes_for_runner ...'
|
|
727
626
|
end
|
|
728
627
|
# resource path
|
|
729
|
-
local_var_path = '/sandbox/
|
|
628
|
+
local_var_path = '/sandbox/for-runner'
|
|
730
629
|
|
|
731
630
|
# query parameters
|
|
732
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?
|
|
733
634
|
|
|
734
635
|
# header parameters
|
|
735
636
|
header_params = opts[:header_params] || {}
|
|
@@ -744,13 +645,13 @@ module DaytonaApiClient
|
|
|
744
645
|
post_body = opts[:debug_body]
|
|
745
646
|
|
|
746
647
|
# return_type
|
|
747
|
-
return_type = opts[:debug_return_type] || '
|
|
648
|
+
return_type = opts[:debug_return_type] || 'Array<Sandbox>'
|
|
748
649
|
|
|
749
650
|
# auth_names
|
|
750
651
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
751
652
|
|
|
752
653
|
new_options = opts.merge(
|
|
753
|
-
:operation => :"SandboxApi.
|
|
654
|
+
:operation => :"SandboxApi.get_sandboxes_for_runner",
|
|
754
655
|
:header_params => header_params,
|
|
755
656
|
:query_params => query_params,
|
|
756
657
|
:form_params => form_params,
|
|
@@ -761,45 +662,42 @@ module DaytonaApiClient
|
|
|
761
662
|
|
|
762
663
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
763
664
|
if @api_client.config.debugging
|
|
764
|
-
@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}"
|
|
765
666
|
end
|
|
766
667
|
return data, status_code, headers
|
|
767
668
|
end
|
|
768
669
|
|
|
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
|
|
670
|
+
# List all sandboxes
|
|
772
671
|
# @param [Hash] opts the optional parameters
|
|
773
672
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
774
|
-
# @
|
|
775
|
-
|
|
776
|
-
|
|
673
|
+
# @option opts [Boolean] :verbose Include verbose output
|
|
674
|
+
# @option opts [String] :labels JSON encoded labels to filter by
|
|
675
|
+
# @option opts [Boolean] :include_errored_deleted Include errored and deleted sandboxes
|
|
676
|
+
# @return [Array<Sandbox>]
|
|
677
|
+
def list_sandboxes(opts = {})
|
|
678
|
+
data, _status_code, _headers = list_sandboxes_with_http_info(opts)
|
|
777
679
|
data
|
|
778
680
|
end
|
|
779
681
|
|
|
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
|
|
682
|
+
# List all sandboxes
|
|
783
683
|
# @param [Hash] opts the optional parameters
|
|
784
684
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
785
|
-
# @
|
|
786
|
-
|
|
685
|
+
# @option opts [Boolean] :verbose Include verbose output
|
|
686
|
+
# @option opts [String] :labels JSON encoded labels to filter by
|
|
687
|
+
# @option opts [Boolean] :include_errored_deleted Include errored and deleted sandboxes
|
|
688
|
+
# @return [Array<(Array<Sandbox>, Integer, Hash)>] Array<Sandbox> data, response status code and response headers
|
|
689
|
+
def list_sandboxes_with_http_info(opts = {})
|
|
787
690
|
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"
|
|
691
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.list_sandboxes ...'
|
|
797
692
|
end
|
|
798
693
|
# resource path
|
|
799
|
-
local_var_path = '/sandbox
|
|
694
|
+
local_var_path = '/sandbox'
|
|
800
695
|
|
|
801
696
|
# query parameters
|
|
802
697
|
query_params = opts[:query_params] || {}
|
|
698
|
+
query_params[:'verbose'] = opts[:'verbose'] if !opts[:'verbose'].nil?
|
|
699
|
+
query_params[:'labels'] = opts[:'labels'] if !opts[:'labels'].nil?
|
|
700
|
+
query_params[:'includeErroredDeleted'] = opts[:'include_errored_deleted'] if !opts[:'include_errored_deleted'].nil?
|
|
803
701
|
|
|
804
702
|
# header parameters
|
|
805
703
|
header_params = opts[:header_params] || {}
|
|
@@ -814,13 +712,13 @@ module DaytonaApiClient
|
|
|
814
712
|
post_body = opts[:debug_body]
|
|
815
713
|
|
|
816
714
|
# return_type
|
|
817
|
-
return_type = opts[:debug_return_type] || '
|
|
715
|
+
return_type = opts[:debug_return_type] || 'Array<Sandbox>'
|
|
818
716
|
|
|
819
717
|
# auth_names
|
|
820
718
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
821
719
|
|
|
822
720
|
new_options = opts.merge(
|
|
823
|
-
:operation => :"SandboxApi.
|
|
721
|
+
:operation => :"SandboxApi.list_sandboxes",
|
|
824
722
|
:header_params => header_params,
|
|
825
723
|
:query_params => query_params,
|
|
826
724
|
:form_params => form_params,
|
|
@@ -831,1070 +729,44 @@ module DaytonaApiClient
|
|
|
831
729
|
|
|
832
730
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
833
731
|
if @api_client.config.debugging
|
|
834
|
-
@api_client.config.logger.debug "API called: SandboxApi#
|
|
732
|
+
@api_client.config.logger.debug "API called: SandboxApi#list_sandboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
835
733
|
end
|
|
836
734
|
return data, status_code, headers
|
|
837
735
|
end
|
|
838
736
|
|
|
839
|
-
#
|
|
840
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
737
|
+
# List all sandboxes paginated
|
|
841
738
|
# @param [Hash] opts the optional parameters
|
|
842
739
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
843
|
-
# @
|
|
844
|
-
|
|
845
|
-
|
|
740
|
+
# @option opts [Float] :page Page number of the results (default to 1)
|
|
741
|
+
# @option opts [Float] :limit Number of results per page (default to 100)
|
|
742
|
+
# @option opts [String] :id Filter by partial ID match
|
|
743
|
+
# @option opts [String] :labels JSON encoded labels to filter by
|
|
744
|
+
# @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
|
|
745
|
+
# @option opts [Array<String>] :states List of states to filter by
|
|
746
|
+
# @option opts [Array<String>] :snapshots List of snapshot names to filter by
|
|
747
|
+
# @option opts [Array<String>] :regions List of regions to filter by
|
|
748
|
+
# @option opts [Float] :min_cpu Minimum CPU
|
|
749
|
+
# @option opts [Float] :max_cpu Maximum CPU
|
|
750
|
+
# @option opts [Float] :min_memory_gi_b Minimum memory in GiB
|
|
751
|
+
# @option opts [Float] :max_memory_gi_b Maximum memory in GiB
|
|
752
|
+
# @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
|
|
753
|
+
# @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
|
|
754
|
+
# @option opts [Time] :last_event_after Include items with last event after this timestamp
|
|
755
|
+
# @option opts [Time] :last_event_before Include items with last event before this timestamp
|
|
756
|
+
# @option opts [String] :sort Field to sort by (default to 'createdAt')
|
|
757
|
+
# @option opts [String] :order Direction to sort by (default to 'desc')
|
|
758
|
+
# @return [PaginatedSandboxes]
|
|
759
|
+
def list_sandboxes_paginated(opts = {})
|
|
760
|
+
data, _status_code, _headers = list_sandboxes_paginated_with_http_info(opts)
|
|
846
761
|
data
|
|
847
762
|
end
|
|
848
763
|
|
|
849
|
-
#
|
|
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
|
|
1499
|
-
# @param [Hash] opts the optional parameters
|
|
1500
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1501
|
-
# @option opts [String] :states Comma-separated list of sandbox states to filter by
|
|
1502
|
-
# @option opts [Boolean] :skip_reconciling_sandboxes Skip sandboxes where state differs from desired state
|
|
1503
|
-
# @return [Array<Sandbox>]
|
|
1504
|
-
def get_sandboxes_for_runner(opts = {})
|
|
1505
|
-
data, _status_code, _headers = get_sandboxes_for_runner_with_http_info(opts)
|
|
1506
|
-
data
|
|
1507
|
-
end
|
|
1508
|
-
|
|
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
|
|
1647
|
-
# @param [Hash] opts the optional parameters
|
|
1648
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1649
|
-
# @return [Array<(ToolboxProxyUrl, Integer, Hash)>] ToolboxProxyUrl data, response status code and response headers
|
|
1650
|
-
def get_toolbox_proxy_url_with_http_info(sandbox_id, opts = {})
|
|
1651
|
-
if @api_client.config.debugging
|
|
1652
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.get_toolbox_proxy_url ...'
|
|
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"
|
|
1657
|
-
end
|
|
1658
|
-
# resource path
|
|
1659
|
-
local_var_path = '/sandbox/{sandboxId}/toolbox-proxy-url'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
1660
|
-
|
|
1661
|
-
# query parameters
|
|
1662
|
-
query_params = opts[:query_params] || {}
|
|
1663
|
-
|
|
1664
|
-
# header parameters
|
|
1665
|
-
header_params = opts[:header_params] || {}
|
|
1666
|
-
# HTTP header 'Accept' (if needed)
|
|
1667
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1668
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1669
|
-
|
|
1670
|
-
# form parameters
|
|
1671
|
-
form_params = opts[:form_params] || {}
|
|
1672
|
-
|
|
1673
|
-
# http body (model)
|
|
1674
|
-
post_body = opts[:debug_body]
|
|
1675
|
-
|
|
1676
|
-
# return_type
|
|
1677
|
-
return_type = opts[:debug_return_type] || 'ToolboxProxyUrl'
|
|
1678
|
-
|
|
1679
|
-
# auth_names
|
|
1680
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1681
|
-
|
|
1682
|
-
new_options = opts.merge(
|
|
1683
|
-
:operation => :"SandboxApi.get_toolbox_proxy_url",
|
|
1684
|
-
:header_params => header_params,
|
|
1685
|
-
:query_params => query_params,
|
|
1686
|
-
:form_params => form_params,
|
|
1687
|
-
:body => post_body,
|
|
1688
|
-
:auth_names => auth_names,
|
|
1689
|
-
:return_type => return_type
|
|
1690
|
-
)
|
|
1691
|
-
|
|
1692
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1693
|
-
if @api_client.config.debugging
|
|
1694
|
-
@api_client.config.logger.debug "API called: SandboxApi#get_toolbox_proxy_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1695
|
-
end
|
|
1696
|
-
return data, status_code, headers
|
|
1697
|
-
end
|
|
1698
|
-
|
|
1699
|
-
# List sandboxes
|
|
1700
|
-
# Advanced filtering and ordering. Eventually consistent.
|
|
1701
|
-
# @param [Hash] opts the optional parameters
|
|
1702
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1703
|
-
# @option opts [String] :cursor Pagination cursor from a previous response
|
|
1704
|
-
# @option opts [Float] :limit Number of results per page (default to 100)
|
|
1705
|
-
# @option opts [String] :id Filter by ID prefix (case-insensitive)
|
|
1706
|
-
# @option opts [String] :name Filter by name prefix (case-insensitive)
|
|
1707
|
-
# @option opts [String] :labels JSON encoded labels to filter by
|
|
1708
|
-
# @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
|
|
1709
|
-
# @option opts [Array<SandboxState>] :states List of states to filter by.
|
|
1710
|
-
# @option opts [Array<String>] :snapshots List of snapshot names to filter by
|
|
1711
|
-
# @option opts [Array<String>] :region_ids List of regions IDs to filter by
|
|
1712
|
-
# @option opts [Array<SandboxClass>] :sandbox_classes List of sandbox classes to filter by
|
|
1713
|
-
# @option opts [Float] :min_cpu Minimum CPU
|
|
1714
|
-
# @option opts [Float] :max_cpu Maximum CPU
|
|
1715
|
-
# @option opts [Float] :min_memory_gi_b Minimum memory in GiB
|
|
1716
|
-
# @option opts [Float] :max_memory_gi_b Maximum memory in GiB
|
|
1717
|
-
# @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
|
|
1718
|
-
# @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
|
|
1719
|
-
# @option opts [Boolean] :is_public Filter by public status
|
|
1720
|
-
# @option opts [Boolean] :is_recoverable Filter by recoverable status
|
|
1721
|
-
# @option opts [Time] :created_at_after Include items created after this timestamp
|
|
1722
|
-
# @option opts [Time] :created_at_before Include items created before this timestamp
|
|
1723
|
-
# @option opts [Time] :last_event_after Include items with last event after this timestamp
|
|
1724
|
-
# @option opts [Time] :last_event_before Include items with last event before this timestamp
|
|
1725
|
-
# @option opts [SandboxListSortField] :sort Field to sort by
|
|
1726
|
-
# @option opts [SandboxListSortDirection] :order Direction to sort by
|
|
1727
|
-
# @return [ListSandboxesResponse]
|
|
1728
|
-
def list_sandboxes(opts = {})
|
|
1729
|
-
data, _status_code, _headers = list_sandboxes_with_http_info(opts)
|
|
1730
|
-
data
|
|
1731
|
-
end
|
|
1732
|
-
|
|
1733
|
-
# List sandboxes
|
|
1734
|
-
# Advanced filtering and ordering. Eventually consistent.
|
|
1735
|
-
# @param [Hash] opts the optional parameters
|
|
1736
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1737
|
-
# @option opts [String] :cursor Pagination cursor from a previous response
|
|
1738
|
-
# @option opts [Float] :limit Number of results per page (default to 100)
|
|
1739
|
-
# @option opts [String] :id Filter by ID prefix (case-insensitive)
|
|
1740
|
-
# @option opts [String] :name Filter by name prefix (case-insensitive)
|
|
1741
|
-
# @option opts [String] :labels JSON encoded labels to filter by
|
|
1742
|
-
# @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
|
|
1743
|
-
# @option opts [Array<SandboxState>] :states List of states to filter by.
|
|
1744
|
-
# @option opts [Array<String>] :snapshots List of snapshot names to filter by
|
|
1745
|
-
# @option opts [Array<String>] :region_ids List of regions IDs to filter by
|
|
1746
|
-
# @option opts [Array<SandboxClass>] :sandbox_classes List of sandbox classes to filter by
|
|
1747
|
-
# @option opts [Float] :min_cpu Minimum CPU
|
|
1748
|
-
# @option opts [Float] :max_cpu Maximum CPU
|
|
1749
|
-
# @option opts [Float] :min_memory_gi_b Minimum memory in GiB
|
|
1750
|
-
# @option opts [Float] :max_memory_gi_b Maximum memory in GiB
|
|
1751
|
-
# @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
|
|
1752
|
-
# @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
|
|
1753
|
-
# @option opts [Boolean] :is_public Filter by public status
|
|
1754
|
-
# @option opts [Boolean] :is_recoverable Filter by recoverable status
|
|
1755
|
-
# @option opts [Time] :created_at_after Include items created after this timestamp
|
|
1756
|
-
# @option opts [Time] :created_at_before Include items created before this timestamp
|
|
1757
|
-
# @option opts [Time] :last_event_after Include items with last event after this timestamp
|
|
1758
|
-
# @option opts [Time] :last_event_before Include items with last event before this timestamp
|
|
1759
|
-
# @option opts [SandboxListSortField] :sort Field to sort by
|
|
1760
|
-
# @option opts [SandboxListSortDirection] :order Direction to sort by
|
|
1761
|
-
# @return [Array<(ListSandboxesResponse, Integer, Hash)>] ListSandboxesResponse data, response status code and response headers
|
|
1762
|
-
def list_sandboxes_with_http_info(opts = {})
|
|
1763
|
-
if @api_client.config.debugging
|
|
1764
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.list_sandboxes ...'
|
|
1765
|
-
end
|
|
1766
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
|
|
1767
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes, must be smaller than or equal to 200.'
|
|
1768
|
-
end
|
|
1769
|
-
|
|
1770
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
1771
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
|
|
1772
|
-
end
|
|
1773
|
-
|
|
1774
|
-
if @api_client.config.client_side_validation && !opts[:'min_cpu'].nil? && opts[:'min_cpu'] < 1
|
|
1775
|
-
fail ArgumentError, 'invalid value for "opts[:"min_cpu"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
|
|
1776
|
-
end
|
|
1777
|
-
|
|
1778
|
-
if @api_client.config.client_side_validation && !opts[:'max_cpu'].nil? && opts[:'max_cpu'] < 1
|
|
1779
|
-
fail ArgumentError, 'invalid value for "opts[:"max_cpu"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
|
|
1780
|
-
end
|
|
1781
|
-
|
|
1782
|
-
if @api_client.config.client_side_validation && !opts[:'min_memory_gi_b'].nil? && opts[:'min_memory_gi_b'] < 1
|
|
1783
|
-
fail ArgumentError, 'invalid value for "opts[:"min_memory_gi_b"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
|
|
1784
|
-
end
|
|
1785
|
-
|
|
1786
|
-
if @api_client.config.client_side_validation && !opts[:'max_memory_gi_b'].nil? && opts[:'max_memory_gi_b'] < 1
|
|
1787
|
-
fail ArgumentError, 'invalid value for "opts[:"max_memory_gi_b"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
|
|
1788
|
-
end
|
|
1789
|
-
|
|
1790
|
-
if @api_client.config.client_side_validation && !opts[:'min_disk_gi_b'].nil? && opts[:'min_disk_gi_b'] < 1
|
|
1791
|
-
fail ArgumentError, 'invalid value for "opts[:"min_disk_gi_b"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
|
|
1792
|
-
end
|
|
1793
|
-
|
|
1794
|
-
if @api_client.config.client_side_validation && !opts[:'max_disk_gi_b'].nil? && opts[:'max_disk_gi_b'] < 1
|
|
1795
|
-
fail ArgumentError, 'invalid value for "opts[:"max_disk_gi_b"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
|
|
1796
|
-
end
|
|
1797
|
-
|
|
1798
|
-
# resource path
|
|
1799
|
-
local_var_path = '/sandbox'
|
|
1800
|
-
|
|
1801
|
-
# query parameters
|
|
1802
|
-
query_params = opts[:query_params] || {}
|
|
1803
|
-
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
1804
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1805
|
-
query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
|
|
1806
|
-
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
1807
|
-
query_params[:'labels'] = opts[:'labels'] if !opts[:'labels'].nil?
|
|
1808
|
-
query_params[:'includeErroredDeleted'] = opts[:'include_errored_deleted'] if !opts[:'include_errored_deleted'].nil?
|
|
1809
|
-
query_params[:'states'] = @api_client.build_collection_param(opts[:'states'], :multi) if !opts[:'states'].nil?
|
|
1810
|
-
query_params[:'snapshots'] = @api_client.build_collection_param(opts[:'snapshots'], :multi) if !opts[:'snapshots'].nil?
|
|
1811
|
-
query_params[:'regionIds'] = @api_client.build_collection_param(opts[:'region_ids'], :multi) if !opts[:'region_ids'].nil?
|
|
1812
|
-
query_params[:'sandboxClasses'] = @api_client.build_collection_param(opts[:'sandbox_classes'], :multi) if !opts[:'sandbox_classes'].nil?
|
|
1813
|
-
query_params[:'minCpu'] = opts[:'min_cpu'] if !opts[:'min_cpu'].nil?
|
|
1814
|
-
query_params[:'maxCpu'] = opts[:'max_cpu'] if !opts[:'max_cpu'].nil?
|
|
1815
|
-
query_params[:'minMemoryGiB'] = opts[:'min_memory_gi_b'] if !opts[:'min_memory_gi_b'].nil?
|
|
1816
|
-
query_params[:'maxMemoryGiB'] = opts[:'max_memory_gi_b'] if !opts[:'max_memory_gi_b'].nil?
|
|
1817
|
-
query_params[:'minDiskGiB'] = opts[:'min_disk_gi_b'] if !opts[:'min_disk_gi_b'].nil?
|
|
1818
|
-
query_params[:'maxDiskGiB'] = opts[:'max_disk_gi_b'] if !opts[:'max_disk_gi_b'].nil?
|
|
1819
|
-
query_params[:'isPublic'] = opts[:'is_public'] if !opts[:'is_public'].nil?
|
|
1820
|
-
query_params[:'isRecoverable'] = opts[:'is_recoverable'] if !opts[:'is_recoverable'].nil?
|
|
1821
|
-
query_params[:'createdAtAfter'] = opts[:'created_at_after'] if !opts[:'created_at_after'].nil?
|
|
1822
|
-
query_params[:'createdAtBefore'] = opts[:'created_at_before'] if !opts[:'created_at_before'].nil?
|
|
1823
|
-
query_params[:'lastEventAfter'] = opts[:'last_event_after'] if !opts[:'last_event_after'].nil?
|
|
1824
|
-
query_params[:'lastEventBefore'] = opts[:'last_event_before'] if !opts[:'last_event_before'].nil?
|
|
1825
|
-
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
1826
|
-
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
|
1827
|
-
|
|
1828
|
-
# header parameters
|
|
1829
|
-
header_params = opts[:header_params] || {}
|
|
1830
|
-
# HTTP header 'Accept' (if needed)
|
|
1831
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1832
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1833
|
-
|
|
1834
|
-
# form parameters
|
|
1835
|
-
form_params = opts[:form_params] || {}
|
|
1836
|
-
|
|
1837
|
-
# http body (model)
|
|
1838
|
-
post_body = opts[:debug_body]
|
|
1839
|
-
|
|
1840
|
-
# return_type
|
|
1841
|
-
return_type = opts[:debug_return_type] || 'ListSandboxesResponse'
|
|
1842
|
-
|
|
1843
|
-
# auth_names
|
|
1844
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1845
|
-
|
|
1846
|
-
new_options = opts.merge(
|
|
1847
|
-
:operation => :"SandboxApi.list_sandboxes",
|
|
1848
|
-
:header_params => header_params,
|
|
1849
|
-
:query_params => query_params,
|
|
1850
|
-
:form_params => form_params,
|
|
1851
|
-
:body => post_body,
|
|
1852
|
-
:auth_names => auth_names,
|
|
1853
|
-
:return_type => return_type
|
|
1854
|
-
)
|
|
1855
|
-
|
|
1856
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1857
|
-
if @api_client.config.debugging
|
|
1858
|
-
@api_client.config.logger.debug "API called: SandboxApi#list_sandboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1859
|
-
end
|
|
1860
|
-
return data, status_code, headers
|
|
1861
|
-
end
|
|
1862
|
-
|
|
1863
|
-
# [DEPRECATED] List all sandboxes paginated
|
|
1864
|
-
# @param [Hash] opts the optional parameters
|
|
1865
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1866
|
-
# @option opts [Float] :page Page number of the results (default to 1)
|
|
1867
|
-
# @option opts [Float] :limit Number of results per page (default to 100)
|
|
1868
|
-
# @option opts [String] :id Filter by partial ID match
|
|
1869
|
-
# @option opts [String] :name Filter by partial name match
|
|
1870
|
-
# @option opts [String] :labels JSON encoded labels to filter by
|
|
1871
|
-
# @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
|
|
1872
|
-
# @option opts [Array<String>] :states List of states to filter by
|
|
1873
|
-
# @option opts [Array<String>] :snapshots List of snapshot names to filter by
|
|
1874
|
-
# @option opts [Array<String>] :regions List of regions to filter by
|
|
1875
|
-
# @option opts [Float] :min_cpu Minimum CPU
|
|
1876
|
-
# @option opts [Float] :max_cpu Maximum CPU
|
|
1877
|
-
# @option opts [Float] :min_memory_gi_b Minimum memory in GiB
|
|
1878
|
-
# @option opts [Float] :max_memory_gi_b Maximum memory in GiB
|
|
1879
|
-
# @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
|
|
1880
|
-
# @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
|
|
1881
|
-
# @option opts [Time] :last_event_after Include items with last event after this timestamp
|
|
1882
|
-
# @option opts [Time] :last_event_before Include items with last event before this timestamp
|
|
1883
|
-
# @option opts [String] :sort Field to sort by (default to 'createdAt')
|
|
1884
|
-
# @option opts [String] :order Direction to sort by (default to 'desc')
|
|
1885
|
-
# @return [PaginatedSandboxesDeprecated]
|
|
1886
|
-
def list_sandboxes_paginated_deprecated(opts = {})
|
|
1887
|
-
data, _status_code, _headers = list_sandboxes_paginated_deprecated_with_http_info(opts)
|
|
1888
|
-
data
|
|
1889
|
-
end
|
|
1890
|
-
|
|
1891
|
-
# [DEPRECATED] List all sandboxes paginated
|
|
764
|
+
# List all sandboxes paginated
|
|
1892
765
|
# @param [Hash] opts the optional parameters
|
|
1893
766
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1894
767
|
# @option opts [Float] :page Page number of the results (default to 1)
|
|
1895
768
|
# @option opts [Float] :limit Number of results per page (default to 100)
|
|
1896
769
|
# @option opts [String] :id Filter by partial ID match
|
|
1897
|
-
# @option opts [String] :name Filter by partial name match
|
|
1898
770
|
# @option opts [String] :labels JSON encoded labels to filter by
|
|
1899
771
|
# @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
|
|
1900
772
|
# @option opts [Array<String>] :states List of states to filter by
|
|
@@ -1910,56 +782,56 @@ module DaytonaApiClient
|
|
|
1910
782
|
# @option opts [Time] :last_event_before Include items with last event before this timestamp
|
|
1911
783
|
# @option opts [String] :sort Field to sort by (default to 'createdAt')
|
|
1912
784
|
# @option opts [String] :order Direction to sort by (default to 'desc')
|
|
1913
|
-
# @return [Array<(
|
|
1914
|
-
def
|
|
785
|
+
# @return [Array<(PaginatedSandboxes, Integer, Hash)>] PaginatedSandboxes data, response status code and response headers
|
|
786
|
+
def list_sandboxes_paginated_with_http_info(opts = {})
|
|
1915
787
|
if @api_client.config.debugging
|
|
1916
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
788
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.list_sandboxes_paginated ...'
|
|
1917
789
|
end
|
|
1918
790
|
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
1919
|
-
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling SandboxApi.
|
|
791
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
|
|
1920
792
|
end
|
|
1921
793
|
|
|
1922
794
|
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
|
|
1923
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.
|
|
795
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes_paginated, must be smaller than or equal to 200.'
|
|
1924
796
|
end
|
|
1925
797
|
|
|
1926
798
|
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
1927
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.
|
|
799
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
|
|
1928
800
|
end
|
|
1929
801
|
|
|
1930
|
-
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"]
|
|
1931
803
|
if @api_client.config.client_side_validation && opts[:'states'] && !opts[:'states'].all? { |item| allowable_values.include?(item) }
|
|
1932
804
|
fail ArgumentError, "invalid value for \"states\", must include one of #{allowable_values}"
|
|
1933
805
|
end
|
|
1934
806
|
if @api_client.config.client_side_validation && !opts[:'min_cpu'].nil? && opts[:'min_cpu'] < 1
|
|
1935
|
-
fail ArgumentError, 'invalid value for "opts[:"min_cpu"]" when calling SandboxApi.
|
|
807
|
+
fail ArgumentError, 'invalid value for "opts[:"min_cpu"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
|
|
1936
808
|
end
|
|
1937
809
|
|
|
1938
810
|
if @api_client.config.client_side_validation && !opts[:'max_cpu'].nil? && opts[:'max_cpu'] < 1
|
|
1939
|
-
fail ArgumentError, 'invalid value for "opts[:"max_cpu"]" when calling SandboxApi.
|
|
811
|
+
fail ArgumentError, 'invalid value for "opts[:"max_cpu"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
|
|
1940
812
|
end
|
|
1941
813
|
|
|
1942
814
|
if @api_client.config.client_side_validation && !opts[:'min_memory_gi_b'].nil? && opts[:'min_memory_gi_b'] < 1
|
|
1943
|
-
fail ArgumentError, 'invalid value for "opts[:"min_memory_gi_b"]" when calling SandboxApi.
|
|
815
|
+
fail ArgumentError, 'invalid value for "opts[:"min_memory_gi_b"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
|
|
1944
816
|
end
|
|
1945
817
|
|
|
1946
818
|
if @api_client.config.client_side_validation && !opts[:'max_memory_gi_b'].nil? && opts[:'max_memory_gi_b'] < 1
|
|
1947
|
-
fail ArgumentError, 'invalid value for "opts[:"max_memory_gi_b"]" when calling SandboxApi.
|
|
819
|
+
fail ArgumentError, 'invalid value for "opts[:"max_memory_gi_b"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
|
|
1948
820
|
end
|
|
1949
821
|
|
|
1950
822
|
if @api_client.config.client_side_validation && !opts[:'min_disk_gi_b'].nil? && opts[:'min_disk_gi_b'] < 1
|
|
1951
|
-
fail ArgumentError, 'invalid value for "opts[:"min_disk_gi_b"]" when calling SandboxApi.
|
|
823
|
+
fail ArgumentError, 'invalid value for "opts[:"min_disk_gi_b"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
|
|
1952
824
|
end
|
|
1953
825
|
|
|
1954
826
|
if @api_client.config.client_side_validation && !opts[:'max_disk_gi_b'].nil? && opts[:'max_disk_gi_b'] < 1
|
|
1955
|
-
fail ArgumentError, 'invalid value for "opts[:"max_disk_gi_b"]" when calling SandboxApi.
|
|
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.'
|
|
1956
828
|
end
|
|
1957
829
|
|
|
1958
|
-
allowable_values = ["id", "
|
|
830
|
+
allowable_values = ["id", "state", "snapshot", "region", "updatedAt", "createdAt"]
|
|
1959
831
|
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
|
1960
832
|
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
|
1961
833
|
end
|
|
1962
|
-
allowable_values = ["asc", "desc"
|
|
834
|
+
allowable_values = ["asc", "desc"]
|
|
1963
835
|
if @api_client.config.client_side_validation && opts[:'order'] && !allowable_values.include?(opts[:'order'])
|
|
1964
836
|
fail ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
|
|
1965
837
|
end
|
|
@@ -1971,89 +843,21 @@ module DaytonaApiClient
|
|
|
1971
843
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
1972
844
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1973
845
|
query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
|
|
1974
|
-
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
1975
846
|
query_params[:'labels'] = opts[:'labels'] if !opts[:'labels'].nil?
|
|
1976
847
|
query_params[:'includeErroredDeleted'] = opts[:'include_errored_deleted'] if !opts[:'include_errored_deleted'].nil?
|
|
1977
848
|
query_params[:'states'] = @api_client.build_collection_param(opts[:'states'], :multi) if !opts[:'states'].nil?
|
|
1978
849
|
query_params[:'snapshots'] = @api_client.build_collection_param(opts[:'snapshots'], :multi) if !opts[:'snapshots'].nil?
|
|
1979
850
|
query_params[:'regions'] = @api_client.build_collection_param(opts[:'regions'], :multi) if !opts[:'regions'].nil?
|
|
1980
851
|
query_params[:'minCpu'] = opts[:'min_cpu'] if !opts[:'min_cpu'].nil?
|
|
1981
|
-
query_params[:'maxCpu'] = opts[:'max_cpu'] if !opts[:'max_cpu'].nil?
|
|
1982
|
-
query_params[:'minMemoryGiB'] = opts[:'min_memory_gi_b'] if !opts[:'min_memory_gi_b'].nil?
|
|
1983
|
-
query_params[:'maxMemoryGiB'] = opts[:'max_memory_gi_b'] if !opts[:'max_memory_gi_b'].nil?
|
|
1984
|
-
query_params[:'minDiskGiB'] = opts[:'min_disk_gi_b'] if !opts[:'min_disk_gi_b'].nil?
|
|
1985
|
-
query_params[:'maxDiskGiB'] = opts[:'max_disk_gi_b'] if !opts[:'max_disk_gi_b'].nil?
|
|
1986
|
-
query_params[:'lastEventAfter'] = opts[:'last_event_after'] if !opts[:'last_event_after'].nil?
|
|
1987
|
-
query_params[:'lastEventBefore'] = opts[:'last_event_before'] if !opts[:'last_event_before'].nil?
|
|
1988
|
-
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
1989
|
-
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
|
1990
|
-
|
|
1991
|
-
# header parameters
|
|
1992
|
-
header_params = opts[:header_params] || {}
|
|
1993
|
-
# HTTP header 'Accept' (if needed)
|
|
1994
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1995
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1996
|
-
|
|
1997
|
-
# form parameters
|
|
1998
|
-
form_params = opts[:form_params] || {}
|
|
1999
|
-
|
|
2000
|
-
# http body (model)
|
|
2001
|
-
post_body = opts[:debug_body]
|
|
2002
|
-
|
|
2003
|
-
# return_type
|
|
2004
|
-
return_type = opts[:debug_return_type] || 'PaginatedSandboxesDeprecated'
|
|
2005
|
-
|
|
2006
|
-
# auth_names
|
|
2007
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2008
|
-
|
|
2009
|
-
new_options = opts.merge(
|
|
2010
|
-
:operation => :"SandboxApi.list_sandboxes_paginated_deprecated",
|
|
2011
|
-
:header_params => header_params,
|
|
2012
|
-
:query_params => query_params,
|
|
2013
|
-
:form_params => form_params,
|
|
2014
|
-
:body => post_body,
|
|
2015
|
-
:auth_names => auth_names,
|
|
2016
|
-
:return_type => return_type
|
|
2017
|
-
)
|
|
2018
|
-
|
|
2019
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2020
|
-
if @api_client.config.debugging
|
|
2021
|
-
@api_client.config.logger.debug "API called: SandboxApi#list_sandboxes_paginated_deprecated\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2022
|
-
end
|
|
2023
|
-
return data, status_code, headers
|
|
2024
|
-
end
|
|
2025
|
-
|
|
2026
|
-
# Recover sandbox from error state
|
|
2027
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2028
|
-
# @param [Hash] opts the optional parameters
|
|
2029
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2030
|
-
# @option opts [Boolean] :skip_start If true, the sandbox is left in STOPPED after recovery instead of being started.
|
|
2031
|
-
# @return [Sandbox]
|
|
2032
|
-
def recover_sandbox(sandbox_id_or_name, opts = {})
|
|
2033
|
-
data, _status_code, _headers = recover_sandbox_with_http_info(sandbox_id_or_name, opts)
|
|
2034
|
-
data
|
|
2035
|
-
end
|
|
2036
|
-
|
|
2037
|
-
# Recover sandbox from error state
|
|
2038
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2039
|
-
# @param [Hash] opts the optional parameters
|
|
2040
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2041
|
-
# @option opts [Boolean] :skip_start If true, the sandbox is left in STOPPED after recovery instead of being started.
|
|
2042
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2043
|
-
def recover_sandbox_with_http_info(sandbox_id_or_name, opts = {})
|
|
2044
|
-
if @api_client.config.debugging
|
|
2045
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.recover_sandbox ...'
|
|
2046
|
-
end
|
|
2047
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2048
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2049
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.recover_sandbox"
|
|
2050
|
-
end
|
|
2051
|
-
# resource path
|
|
2052
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/recover'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
2053
|
-
|
|
2054
|
-
# query parameters
|
|
2055
|
-
query_params = opts[:query_params] || {}
|
|
2056
|
-
query_params[:'skipStart'] = opts[:'skip_start'] if !opts[:'skip_start'].nil?
|
|
852
|
+
query_params[:'maxCpu'] = opts[:'max_cpu'] if !opts[:'max_cpu'].nil?
|
|
853
|
+
query_params[:'minMemoryGiB'] = opts[:'min_memory_gi_b'] if !opts[:'min_memory_gi_b'].nil?
|
|
854
|
+
query_params[:'maxMemoryGiB'] = opts[:'max_memory_gi_b'] if !opts[:'max_memory_gi_b'].nil?
|
|
855
|
+
query_params[:'minDiskGiB'] = opts[:'min_disk_gi_b'] if !opts[:'min_disk_gi_b'].nil?
|
|
856
|
+
query_params[:'maxDiskGiB'] = opts[:'max_disk_gi_b'] if !opts[:'max_disk_gi_b'].nil?
|
|
857
|
+
query_params[:'lastEventAfter'] = opts[:'last_event_after'] if !opts[:'last_event_after'].nil?
|
|
858
|
+
query_params[:'lastEventBefore'] = opts[:'last_event_before'] if !opts[:'last_event_before'].nil?
|
|
859
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
860
|
+
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
|
2057
861
|
|
|
2058
862
|
# header parameters
|
|
2059
863
|
header_params = opts[:header_params] || {}
|
|
@@ -2068,13 +872,13 @@ module DaytonaApiClient
|
|
|
2068
872
|
post_body = opts[:debug_body]
|
|
2069
873
|
|
|
2070
874
|
# return_type
|
|
2071
|
-
return_type = opts[:debug_return_type] || '
|
|
875
|
+
return_type = opts[:debug_return_type] || 'PaginatedSandboxes'
|
|
2072
876
|
|
|
2073
877
|
# auth_names
|
|
2074
878
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2075
879
|
|
|
2076
880
|
new_options = opts.merge(
|
|
2077
|
-
:operation => :"SandboxApi.
|
|
881
|
+
:operation => :"SandboxApi.list_sandboxes_paginated",
|
|
2078
882
|
:header_params => header_params,
|
|
2079
883
|
:query_params => query_params,
|
|
2080
884
|
:form_params => form_params,
|
|
@@ -2083,44 +887,44 @@ module DaytonaApiClient
|
|
|
2083
887
|
:return_type => return_type
|
|
2084
888
|
)
|
|
2085
889
|
|
|
2086
|
-
data, status_code, headers = @api_client.call_api(:
|
|
890
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2087
891
|
if @api_client.config.debugging
|
|
2088
|
-
@api_client.config.logger.debug "API called: SandboxApi#
|
|
892
|
+
@api_client.config.logger.debug "API called: SandboxApi#list_sandboxes_paginated\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2089
893
|
end
|
|
2090
894
|
return data, status_code, headers
|
|
2091
895
|
end
|
|
2092
896
|
|
|
2093
897
|
# Replace sandbox labels
|
|
2094
|
-
# @param
|
|
898
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2095
899
|
# @param sandbox_labels [SandboxLabels]
|
|
2096
900
|
# @param [Hash] opts the optional parameters
|
|
2097
901
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2098
902
|
# @return [SandboxLabels]
|
|
2099
|
-
def replace_labels(
|
|
2100
|
-
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)
|
|
2101
905
|
data
|
|
2102
906
|
end
|
|
2103
907
|
|
|
2104
908
|
# Replace sandbox labels
|
|
2105
|
-
# @param
|
|
909
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2106
910
|
# @param sandbox_labels [SandboxLabels]
|
|
2107
911
|
# @param [Hash] opts the optional parameters
|
|
2108
912
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2109
913
|
# @return [Array<(SandboxLabels, Integer, Hash)>] SandboxLabels data, response status code and response headers
|
|
2110
|
-
def replace_labels_with_http_info(
|
|
914
|
+
def replace_labels_with_http_info(sandbox_id, sandbox_labels, opts = {})
|
|
2111
915
|
if @api_client.config.debugging
|
|
2112
916
|
@api_client.config.logger.debug 'Calling API: SandboxApi.replace_labels ...'
|
|
2113
917
|
end
|
|
2114
|
-
# verify the required parameter '
|
|
2115
|
-
if @api_client.config.client_side_validation &&
|
|
2116
|
-
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"
|
|
2117
921
|
end
|
|
2118
922
|
# verify the required parameter 'sandbox_labels' is set
|
|
2119
923
|
if @api_client.config.client_side_validation && sandbox_labels.nil?
|
|
2120
924
|
fail ArgumentError, "Missing the required parameter 'sandbox_labels' when calling SandboxApi.replace_labels"
|
|
2121
925
|
end
|
|
2122
926
|
# resource path
|
|
2123
|
-
local_var_path = '/sandbox/{
|
|
927
|
+
local_var_path = '/sandbox/{sandboxId}/labels'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
2124
928
|
|
|
2125
929
|
# query parameters
|
|
2126
930
|
query_params = opts[:query_params] || {}
|
|
@@ -2132,7 +936,7 @@ module DaytonaApiClient
|
|
|
2132
936
|
# HTTP header 'Content-Type'
|
|
2133
937
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2134
938
|
if !content_type.nil?
|
|
2135
|
-
|
|
939
|
+
header_params['Content-Type'] = content_type
|
|
2136
940
|
end
|
|
2137
941
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2138
942
|
|
|
@@ -2165,108 +969,33 @@ module DaytonaApiClient
|
|
|
2165
969
|
return data, status_code, headers
|
|
2166
970
|
end
|
|
2167
971
|
|
|
2168
|
-
# Resize sandbox resources
|
|
2169
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2170
|
-
# @param resize_sandbox [ResizeSandbox]
|
|
2171
|
-
# @param [Hash] opts the optional parameters
|
|
2172
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2173
|
-
# @return [Sandbox]
|
|
2174
|
-
def resize_sandbox(sandbox_id_or_name, resize_sandbox, opts = {})
|
|
2175
|
-
data, _status_code, _headers = resize_sandbox_with_http_info(sandbox_id_or_name, resize_sandbox, opts)
|
|
2176
|
-
data
|
|
2177
|
-
end
|
|
2178
|
-
|
|
2179
|
-
# Resize sandbox resources
|
|
2180
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2181
|
-
# @param resize_sandbox [ResizeSandbox]
|
|
2182
|
-
# @param [Hash] opts the optional parameters
|
|
2183
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2184
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2185
|
-
def resize_sandbox_with_http_info(sandbox_id_or_name, resize_sandbox, opts = {})
|
|
2186
|
-
if @api_client.config.debugging
|
|
2187
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.resize_sandbox ...'
|
|
2188
|
-
end
|
|
2189
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2190
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2191
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.resize_sandbox"
|
|
2192
|
-
end
|
|
2193
|
-
# verify the required parameter 'resize_sandbox' is set
|
|
2194
|
-
if @api_client.config.client_side_validation && resize_sandbox.nil?
|
|
2195
|
-
fail ArgumentError, "Missing the required parameter 'resize_sandbox' when calling SandboxApi.resize_sandbox"
|
|
2196
|
-
end
|
|
2197
|
-
# resource path
|
|
2198
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/resize'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
2199
|
-
|
|
2200
|
-
# query parameters
|
|
2201
|
-
query_params = opts[:query_params] || {}
|
|
2202
|
-
|
|
2203
|
-
# header parameters
|
|
2204
|
-
header_params = opts[:header_params] || {}
|
|
2205
|
-
# HTTP header 'Accept' (if needed)
|
|
2206
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2207
|
-
# HTTP header 'Content-Type'
|
|
2208
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2209
|
-
if !content_type.nil?
|
|
2210
|
-
header_params['Content-Type'] = content_type
|
|
2211
|
-
end
|
|
2212
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2213
|
-
|
|
2214
|
-
# form parameters
|
|
2215
|
-
form_params = opts[:form_params] || {}
|
|
2216
|
-
|
|
2217
|
-
# http body (model)
|
|
2218
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(resize_sandbox)
|
|
2219
|
-
|
|
2220
|
-
# return_type
|
|
2221
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
2222
|
-
|
|
2223
|
-
# auth_names
|
|
2224
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2225
|
-
|
|
2226
|
-
new_options = opts.merge(
|
|
2227
|
-
:operation => :"SandboxApi.resize_sandbox",
|
|
2228
|
-
:header_params => header_params,
|
|
2229
|
-
:query_params => query_params,
|
|
2230
|
-
:form_params => form_params,
|
|
2231
|
-
:body => post_body,
|
|
2232
|
-
:auth_names => auth_names,
|
|
2233
|
-
:return_type => return_type
|
|
2234
|
-
)
|
|
2235
|
-
|
|
2236
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2237
|
-
if @api_client.config.debugging
|
|
2238
|
-
@api_client.config.logger.debug "API called: SandboxApi#resize_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2239
|
-
end
|
|
2240
|
-
return data, status_code, headers
|
|
2241
|
-
end
|
|
2242
|
-
|
|
2243
972
|
# Revoke SSH access for sandbox
|
|
2244
|
-
# @param
|
|
973
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2245
974
|
# @param [Hash] opts the optional parameters
|
|
2246
975
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2247
976
|
# @option opts [String] :token SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.
|
|
2248
|
-
# @return [
|
|
2249
|
-
def revoke_ssh_access(
|
|
2250
|
-
|
|
2251
|
-
|
|
977
|
+
# @return [nil]
|
|
978
|
+
def revoke_ssh_access(sandbox_id, opts = {})
|
|
979
|
+
revoke_ssh_access_with_http_info(sandbox_id, opts)
|
|
980
|
+
nil
|
|
2252
981
|
end
|
|
2253
982
|
|
|
2254
983
|
# Revoke SSH access for sandbox
|
|
2255
|
-
# @param
|
|
984
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2256
985
|
# @param [Hash] opts the optional parameters
|
|
2257
986
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2258
987
|
# @option opts [String] :token SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.
|
|
2259
|
-
# @return [Array<(
|
|
2260
|
-
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 = {})
|
|
2261
990
|
if @api_client.config.debugging
|
|
2262
991
|
@api_client.config.logger.debug 'Calling API: SandboxApi.revoke_ssh_access ...'
|
|
2263
992
|
end
|
|
2264
|
-
# verify the required parameter '
|
|
2265
|
-
if @api_client.config.client_side_validation &&
|
|
2266
|
-
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"
|
|
2267
996
|
end
|
|
2268
997
|
# resource path
|
|
2269
|
-
local_var_path = '/sandbox/{
|
|
998
|
+
local_var_path = '/sandbox/{sandboxId}/ssh-access'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
2270
999
|
|
|
2271
1000
|
# query parameters
|
|
2272
1001
|
query_params = opts[:query_params] || {}
|
|
@@ -2274,8 +1003,6 @@ module DaytonaApiClient
|
|
|
2274
1003
|
|
|
2275
1004
|
# header parameters
|
|
2276
1005
|
header_params = opts[:header_params] || {}
|
|
2277
|
-
# HTTP header 'Accept' (if needed)
|
|
2278
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2279
1006
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2280
1007
|
|
|
2281
1008
|
# form parameters
|
|
@@ -2285,7 +1012,7 @@ module DaytonaApiClient
|
|
|
2285
1012
|
post_body = opts[:debug_body]
|
|
2286
1013
|
|
|
2287
1014
|
# return_type
|
|
2288
|
-
return_type = opts[:debug_return_type]
|
|
1015
|
+
return_type = opts[:debug_return_type]
|
|
2289
1016
|
|
|
2290
1017
|
# auth_names
|
|
2291
1018
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
@@ -2308,44 +1035,42 @@ module DaytonaApiClient
|
|
|
2308
1035
|
end
|
|
2309
1036
|
|
|
2310
1037
|
# Set sandbox auto-archive interval
|
|
2311
|
-
# @param
|
|
1038
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2312
1039
|
# @param interval [Float] Auto-archive interval in minutes (0 means the maximum interval will be used)
|
|
2313
1040
|
# @param [Hash] opts the optional parameters
|
|
2314
1041
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2315
|
-
# @return [
|
|
2316
|
-
def set_auto_archive_interval(
|
|
2317
|
-
|
|
2318
|
-
|
|
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
|
|
2319
1046
|
end
|
|
2320
1047
|
|
|
2321
1048
|
# Set sandbox auto-archive interval
|
|
2322
|
-
# @param
|
|
1049
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2323
1050
|
# @param interval [Float] Auto-archive interval in minutes (0 means the maximum interval will be used)
|
|
2324
1051
|
# @param [Hash] opts the optional parameters
|
|
2325
1052
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2326
|
-
# @return [Array<(
|
|
2327
|
-
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 = {})
|
|
2328
1055
|
if @api_client.config.debugging
|
|
2329
1056
|
@api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_archive_interval ...'
|
|
2330
1057
|
end
|
|
2331
|
-
# verify the required parameter '
|
|
2332
|
-
if @api_client.config.client_side_validation &&
|
|
2333
|
-
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"
|
|
2334
1061
|
end
|
|
2335
1062
|
# verify the required parameter 'interval' is set
|
|
2336
1063
|
if @api_client.config.client_side_validation && interval.nil?
|
|
2337
1064
|
fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_auto_archive_interval"
|
|
2338
1065
|
end
|
|
2339
1066
|
# resource path
|
|
2340
|
-
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))
|
|
2341
1068
|
|
|
2342
1069
|
# query parameters
|
|
2343
1070
|
query_params = opts[:query_params] || {}
|
|
2344
1071
|
|
|
2345
1072
|
# header parameters
|
|
2346
1073
|
header_params = opts[:header_params] || {}
|
|
2347
|
-
# HTTP header 'Accept' (if needed)
|
|
2348
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2349
1074
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2350
1075
|
|
|
2351
1076
|
# form parameters
|
|
@@ -2355,7 +1080,7 @@ module DaytonaApiClient
|
|
|
2355
1080
|
post_body = opts[:debug_body]
|
|
2356
1081
|
|
|
2357
1082
|
# return_type
|
|
2358
|
-
return_type = opts[:debug_return_type]
|
|
1083
|
+
return_type = opts[:debug_return_type]
|
|
2359
1084
|
|
|
2360
1085
|
# auth_names
|
|
2361
1086
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
@@ -2378,44 +1103,42 @@ module DaytonaApiClient
|
|
|
2378
1103
|
end
|
|
2379
1104
|
|
|
2380
1105
|
# Set sandbox auto-delete interval
|
|
2381
|
-
# @param
|
|
1106
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2382
1107
|
# @param interval [Float] Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
|
|
2383
1108
|
# @param [Hash] opts the optional parameters
|
|
2384
1109
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2385
|
-
# @return [
|
|
2386
|
-
def set_auto_delete_interval(
|
|
2387
|
-
|
|
2388
|
-
|
|
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
|
|
2389
1114
|
end
|
|
2390
1115
|
|
|
2391
1116
|
# Set sandbox auto-delete interval
|
|
2392
|
-
# @param
|
|
1117
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2393
1118
|
# @param interval [Float] Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
|
|
2394
1119
|
# @param [Hash] opts the optional parameters
|
|
2395
1120
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2396
|
-
# @return [Array<(
|
|
2397
|
-
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 = {})
|
|
2398
1123
|
if @api_client.config.debugging
|
|
2399
1124
|
@api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_delete_interval ...'
|
|
2400
1125
|
end
|
|
2401
|
-
# verify the required parameter '
|
|
2402
|
-
if @api_client.config.client_side_validation &&
|
|
2403
|
-
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"
|
|
2404
1129
|
end
|
|
2405
1130
|
# verify the required parameter 'interval' is set
|
|
2406
1131
|
if @api_client.config.client_side_validation && interval.nil?
|
|
2407
1132
|
fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_auto_delete_interval"
|
|
2408
1133
|
end
|
|
2409
1134
|
# resource path
|
|
2410
|
-
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))
|
|
2411
1136
|
|
|
2412
1137
|
# query parameters
|
|
2413
1138
|
query_params = opts[:query_params] || {}
|
|
2414
1139
|
|
|
2415
1140
|
# header parameters
|
|
2416
1141
|
header_params = opts[:header_params] || {}
|
|
2417
|
-
# HTTP header 'Accept' (if needed)
|
|
2418
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2419
1142
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2420
1143
|
|
|
2421
1144
|
# form parameters
|
|
@@ -2425,7 +1148,7 @@ module DaytonaApiClient
|
|
|
2425
1148
|
post_body = opts[:debug_body]
|
|
2426
1149
|
|
|
2427
1150
|
# return_type
|
|
2428
|
-
return_type = opts[:debug_return_type]
|
|
1151
|
+
return_type = opts[:debug_return_type]
|
|
2429
1152
|
|
|
2430
1153
|
# auth_names
|
|
2431
1154
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
@@ -2448,44 +1171,42 @@ module DaytonaApiClient
|
|
|
2448
1171
|
end
|
|
2449
1172
|
|
|
2450
1173
|
# Set sandbox auto-stop interval
|
|
2451
|
-
# @param
|
|
1174
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2452
1175
|
# @param interval [Float] Auto-stop interval in minutes (0 to disable)
|
|
2453
1176
|
# @param [Hash] opts the optional parameters
|
|
2454
1177
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2455
|
-
# @return [
|
|
2456
|
-
def set_autostop_interval(
|
|
2457
|
-
|
|
2458
|
-
|
|
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
|
|
2459
1182
|
end
|
|
2460
1183
|
|
|
2461
1184
|
# Set sandbox auto-stop interval
|
|
2462
|
-
# @param
|
|
1185
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2463
1186
|
# @param interval [Float] Auto-stop interval in minutes (0 to disable)
|
|
2464
1187
|
# @param [Hash] opts the optional parameters
|
|
2465
1188
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2466
|
-
# @return [Array<(
|
|
2467
|
-
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 = {})
|
|
2468
1191
|
if @api_client.config.debugging
|
|
2469
1192
|
@api_client.config.logger.debug 'Calling API: SandboxApi.set_autostop_interval ...'
|
|
2470
1193
|
end
|
|
2471
|
-
# verify the required parameter '
|
|
2472
|
-
if @api_client.config.client_side_validation &&
|
|
2473
|
-
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"
|
|
2474
1197
|
end
|
|
2475
1198
|
# verify the required parameter 'interval' is set
|
|
2476
1199
|
if @api_client.config.client_side_validation && interval.nil?
|
|
2477
1200
|
fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_autostop_interval"
|
|
2478
1201
|
end
|
|
2479
1202
|
# resource path
|
|
2480
|
-
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))
|
|
2481
1204
|
|
|
2482
1205
|
# query parameters
|
|
2483
1206
|
query_params = opts[:query_params] || {}
|
|
2484
1207
|
|
|
2485
1208
|
# header parameters
|
|
2486
1209
|
header_params = opts[:header_params] || {}
|
|
2487
|
-
# HTTP header 'Accept' (if needed)
|
|
2488
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2489
1210
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2490
1211
|
|
|
2491
1212
|
# form parameters
|
|
@@ -2495,7 +1216,7 @@ module DaytonaApiClient
|
|
|
2495
1216
|
post_body = opts[:debug_body]
|
|
2496
1217
|
|
|
2497
1218
|
# return_type
|
|
2498
|
-
return_type = opts[:debug_return_type]
|
|
1219
|
+
return_type = opts[:debug_return_type]
|
|
2499
1220
|
|
|
2500
1221
|
# auth_names
|
|
2501
1222
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
@@ -2518,30 +1239,30 @@ module DaytonaApiClient
|
|
|
2518
1239
|
end
|
|
2519
1240
|
|
|
2520
1241
|
# Start sandbox
|
|
2521
|
-
# @param
|
|
1242
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2522
1243
|
# @param [Hash] opts the optional parameters
|
|
2523
1244
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2524
1245
|
# @return [Sandbox]
|
|
2525
|
-
def start_sandbox(
|
|
2526
|
-
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)
|
|
2527
1248
|
data
|
|
2528
1249
|
end
|
|
2529
1250
|
|
|
2530
1251
|
# Start sandbox
|
|
2531
|
-
# @param
|
|
1252
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2532
1253
|
# @param [Hash] opts the optional parameters
|
|
2533
1254
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2534
1255
|
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2535
|
-
def start_sandbox_with_http_info(
|
|
1256
|
+
def start_sandbox_with_http_info(sandbox_id, opts = {})
|
|
2536
1257
|
if @api_client.config.debugging
|
|
2537
1258
|
@api_client.config.logger.debug 'Calling API: SandboxApi.start_sandbox ...'
|
|
2538
1259
|
end
|
|
2539
|
-
# verify the required parameter '
|
|
2540
|
-
if @api_client.config.client_side_validation &&
|
|
2541
|
-
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"
|
|
2542
1263
|
end
|
|
2543
1264
|
# resource path
|
|
2544
|
-
local_var_path = '/sandbox/{
|
|
1265
|
+
local_var_path = '/sandbox/{sandboxId}/start'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
2545
1266
|
|
|
2546
1267
|
# query parameters
|
|
2547
1268
|
query_params = opts[:query_params] || {}
|
|
@@ -2582,97 +1303,30 @@ module DaytonaApiClient
|
|
|
2582
1303
|
end
|
|
2583
1304
|
|
|
2584
1305
|
# Stop sandbox
|
|
2585
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2586
|
-
# @param [Hash] opts the optional parameters
|
|
2587
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2588
|
-
# @option opts [Boolean] :force Force stop the sandbox using SIGKILL instead of SIGTERM
|
|
2589
|
-
# @return [Sandbox]
|
|
2590
|
-
def stop_sandbox(sandbox_id_or_name, opts = {})
|
|
2591
|
-
data, _status_code, _headers = stop_sandbox_with_http_info(sandbox_id_or_name, opts)
|
|
2592
|
-
data
|
|
2593
|
-
end
|
|
2594
|
-
|
|
2595
|
-
# Stop sandbox
|
|
2596
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2597
|
-
# @param [Hash] opts the optional parameters
|
|
2598
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2599
|
-
# @option opts [Boolean] :force Force stop the sandbox using SIGKILL instead of SIGTERM
|
|
2600
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2601
|
-
def stop_sandbox_with_http_info(sandbox_id_or_name, opts = {})
|
|
2602
|
-
if @api_client.config.debugging
|
|
2603
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.stop_sandbox ...'
|
|
2604
|
-
end
|
|
2605
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2606
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2607
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.stop_sandbox"
|
|
2608
|
-
end
|
|
2609
|
-
# resource path
|
|
2610
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/stop'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
2611
|
-
|
|
2612
|
-
# query parameters
|
|
2613
|
-
query_params = opts[:query_params] || {}
|
|
2614
|
-
query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil?
|
|
2615
|
-
|
|
2616
|
-
# header parameters
|
|
2617
|
-
header_params = opts[:header_params] || {}
|
|
2618
|
-
# HTTP header 'Accept' (if needed)
|
|
2619
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2620
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2621
|
-
|
|
2622
|
-
# form parameters
|
|
2623
|
-
form_params = opts[:form_params] || {}
|
|
2624
|
-
|
|
2625
|
-
# http body (model)
|
|
2626
|
-
post_body = opts[:debug_body]
|
|
2627
|
-
|
|
2628
|
-
# return_type
|
|
2629
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
2630
|
-
|
|
2631
|
-
# auth_names
|
|
2632
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2633
|
-
|
|
2634
|
-
new_options = opts.merge(
|
|
2635
|
-
:operation => :"SandboxApi.stop_sandbox",
|
|
2636
|
-
:header_params => header_params,
|
|
2637
|
-
:query_params => query_params,
|
|
2638
|
-
:form_params => form_params,
|
|
2639
|
-
:body => post_body,
|
|
2640
|
-
:auth_names => auth_names,
|
|
2641
|
-
:return_type => return_type
|
|
2642
|
-
)
|
|
2643
|
-
|
|
2644
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2645
|
-
if @api_client.config.debugging
|
|
2646
|
-
@api_client.config.logger.debug "API called: SandboxApi#stop_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2647
|
-
end
|
|
2648
|
-
return data, status_code, headers
|
|
2649
|
-
end
|
|
2650
|
-
|
|
2651
|
-
# Update sandbox last activity
|
|
2652
1306
|
# @param sandbox_id [String] ID of the sandbox
|
|
2653
1307
|
# @param [Hash] opts the optional parameters
|
|
2654
1308
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2655
1309
|
# @return [nil]
|
|
2656
|
-
def
|
|
2657
|
-
|
|
1310
|
+
def stop_sandbox(sandbox_id, opts = {})
|
|
1311
|
+
stop_sandbox_with_http_info(sandbox_id, opts)
|
|
2658
1312
|
nil
|
|
2659
1313
|
end
|
|
2660
1314
|
|
|
2661
|
-
#
|
|
1315
|
+
# Stop sandbox
|
|
2662
1316
|
# @param sandbox_id [String] ID of the sandbox
|
|
2663
1317
|
# @param [Hash] opts the optional parameters
|
|
2664
1318
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2665
1319
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
2666
|
-
def
|
|
1320
|
+
def stop_sandbox_with_http_info(sandbox_id, opts = {})
|
|
2667
1321
|
if @api_client.config.debugging
|
|
2668
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
1322
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.stop_sandbox ...'
|
|
2669
1323
|
end
|
|
2670
1324
|
# verify the required parameter 'sandbox_id' is set
|
|
2671
1325
|
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
2672
|
-
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"
|
|
2673
1327
|
end
|
|
2674
1328
|
# resource path
|
|
2675
|
-
local_var_path = '/sandbox/{sandboxId}/
|
|
1329
|
+
local_var_path = '/sandbox/{sandboxId}/stop'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
2676
1330
|
|
|
2677
1331
|
# query parameters
|
|
2678
1332
|
query_params = opts[:query_params] || {}
|
|
@@ -2694,84 +1348,7 @@ module DaytonaApiClient
|
|
|
2694
1348
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2695
1349
|
|
|
2696
1350
|
new_options = opts.merge(
|
|
2697
|
-
:operation => :"SandboxApi.
|
|
2698
|
-
:header_params => header_params,
|
|
2699
|
-
:query_params => query_params,
|
|
2700
|
-
:form_params => form_params,
|
|
2701
|
-
:body => post_body,
|
|
2702
|
-
:auth_names => auth_names,
|
|
2703
|
-
:return_type => return_type
|
|
2704
|
-
)
|
|
2705
|
-
|
|
2706
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2707
|
-
if @api_client.config.debugging
|
|
2708
|
-
@api_client.config.logger.debug "API called: SandboxApi#update_last_activity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2709
|
-
end
|
|
2710
|
-
return data, status_code, headers
|
|
2711
|
-
end
|
|
2712
|
-
|
|
2713
|
-
# Update sandbox network settings
|
|
2714
|
-
# Changes outbound network policy on the runner for a running sandbox (for example block all traffic, restore access, or set a CIDR allow list).
|
|
2715
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2716
|
-
# @param update_sandbox_network_settings [UpdateSandboxNetworkSettings]
|
|
2717
|
-
# @param [Hash] opts the optional parameters
|
|
2718
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2719
|
-
# @return [Sandbox]
|
|
2720
|
-
def update_network_settings(sandbox_id_or_name, update_sandbox_network_settings, opts = {})
|
|
2721
|
-
data, _status_code, _headers = update_network_settings_with_http_info(sandbox_id_or_name, update_sandbox_network_settings, opts)
|
|
2722
|
-
data
|
|
2723
|
-
end
|
|
2724
|
-
|
|
2725
|
-
# Update sandbox network settings
|
|
2726
|
-
# Changes outbound network policy on the runner for a running sandbox (for example block all traffic, restore access, or set a CIDR allow list).
|
|
2727
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2728
|
-
# @param update_sandbox_network_settings [UpdateSandboxNetworkSettings]
|
|
2729
|
-
# @param [Hash] opts the optional parameters
|
|
2730
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2731
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2732
|
-
def update_network_settings_with_http_info(sandbox_id_or_name, update_sandbox_network_settings, opts = {})
|
|
2733
|
-
if @api_client.config.debugging
|
|
2734
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.update_network_settings ...'
|
|
2735
|
-
end
|
|
2736
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2737
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2738
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.update_network_settings"
|
|
2739
|
-
end
|
|
2740
|
-
# verify the required parameter 'update_sandbox_network_settings' is set
|
|
2741
|
-
if @api_client.config.client_side_validation && update_sandbox_network_settings.nil?
|
|
2742
|
-
fail ArgumentError, "Missing the required parameter 'update_sandbox_network_settings' when calling SandboxApi.update_network_settings"
|
|
2743
|
-
end
|
|
2744
|
-
# resource path
|
|
2745
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/network-settings'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
2746
|
-
|
|
2747
|
-
# query parameters
|
|
2748
|
-
query_params = opts[:query_params] || {}
|
|
2749
|
-
|
|
2750
|
-
# header parameters
|
|
2751
|
-
header_params = opts[:header_params] || {}
|
|
2752
|
-
# HTTP header 'Accept' (if needed)
|
|
2753
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2754
|
-
# HTTP header 'Content-Type'
|
|
2755
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2756
|
-
if !content_type.nil?
|
|
2757
|
-
header_params['Content-Type'] = content_type
|
|
2758
|
-
end
|
|
2759
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2760
|
-
|
|
2761
|
-
# form parameters
|
|
2762
|
-
form_params = opts[:form_params] || {}
|
|
2763
|
-
|
|
2764
|
-
# http body (model)
|
|
2765
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_sandbox_network_settings)
|
|
2766
|
-
|
|
2767
|
-
# return_type
|
|
2768
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
2769
|
-
|
|
2770
|
-
# auth_names
|
|
2771
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2772
|
-
|
|
2773
|
-
new_options = opts.merge(
|
|
2774
|
-
:operation => :"SandboxApi.update_network_settings",
|
|
1351
|
+
:operation => :"SandboxApi.stop_sandbox",
|
|
2775
1352
|
:header_params => header_params,
|
|
2776
1353
|
:query_params => query_params,
|
|
2777
1354
|
:form_params => form_params,
|
|
@@ -2782,50 +1359,48 @@ module DaytonaApiClient
|
|
|
2782
1359
|
|
|
2783
1360
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2784
1361
|
if @api_client.config.debugging
|
|
2785
|
-
@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}"
|
|
2786
1363
|
end
|
|
2787
1364
|
return data, status_code, headers
|
|
2788
1365
|
end
|
|
2789
1366
|
|
|
2790
1367
|
# Update public status
|
|
2791
|
-
# @param
|
|
1368
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2792
1369
|
# @param is_public [Boolean] Public status to set
|
|
2793
1370
|
# @param [Hash] opts the optional parameters
|
|
2794
1371
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2795
|
-
# @return [
|
|
2796
|
-
def update_public_status(
|
|
2797
|
-
|
|
2798
|
-
|
|
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
|
|
2799
1376
|
end
|
|
2800
1377
|
|
|
2801
1378
|
# Update public status
|
|
2802
|
-
# @param
|
|
1379
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2803
1380
|
# @param is_public [Boolean] Public status to set
|
|
2804
1381
|
# @param [Hash] opts the optional parameters
|
|
2805
1382
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2806
|
-
# @return [Array<(
|
|
2807
|
-
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 = {})
|
|
2808
1385
|
if @api_client.config.debugging
|
|
2809
1386
|
@api_client.config.logger.debug 'Calling API: SandboxApi.update_public_status ...'
|
|
2810
1387
|
end
|
|
2811
|
-
# verify the required parameter '
|
|
2812
|
-
if @api_client.config.client_side_validation &&
|
|
2813
|
-
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"
|
|
2814
1391
|
end
|
|
2815
1392
|
# verify the required parameter 'is_public' is set
|
|
2816
1393
|
if @api_client.config.client_side_validation && is_public.nil?
|
|
2817
1394
|
fail ArgumentError, "Missing the required parameter 'is_public' when calling SandboxApi.update_public_status"
|
|
2818
1395
|
end
|
|
2819
1396
|
# resource path
|
|
2820
|
-
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))
|
|
2821
1398
|
|
|
2822
1399
|
# query parameters
|
|
2823
1400
|
query_params = opts[:query_params] || {}
|
|
2824
1401
|
|
|
2825
1402
|
# header parameters
|
|
2826
1403
|
header_params = opts[:header_params] || {}
|
|
2827
|
-
# HTTP header 'Accept' (if needed)
|
|
2828
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2829
1404
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2830
1405
|
|
|
2831
1406
|
# form parameters
|
|
@@ -2835,7 +1410,7 @@ module DaytonaApiClient
|
|
|
2835
1410
|
post_body = opts[:debug_body]
|
|
2836
1411
|
|
|
2837
1412
|
# return_type
|
|
2838
|
-
return_type = opts[:debug_return_type]
|
|
1413
|
+
return_type = opts[:debug_return_type]
|
|
2839
1414
|
|
|
2840
1415
|
# auth_names
|
|
2841
1416
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
@@ -2897,7 +1472,7 @@ module DaytonaApiClient
|
|
|
2897
1472
|
# HTTP header 'Content-Type'
|
|
2898
1473
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2899
1474
|
if !content_type.nil?
|
|
2900
|
-
|
|
1475
|
+
header_params['Content-Type'] = content_type
|
|
2901
1476
|
end
|
|
2902
1477
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2903
1478
|
|