daytona_api_client 0.182.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 -1729
- 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 +77 -16
- data/lib/daytona_api_client/models/create_session_request.rb +74 -3
- data/lib/daytona_api_client/models/create_snapshot.rb +88 -17
- 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 +191 -138
- 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 +92 -95
- data/lib/daytona_api_client/models/sandbox_class.rb +3 -4
- 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 -39
- 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 -170
- data/lib/daytona_api_client/version.rb +2 -2
- data/lib/daytona_api_client.rb +8 -53
- data/project.json +11 -42
- metadata +11 -60
- data/.gitignore +0 -39
- data/.openapi-generator/FILES +0 -210
- data/.openapi-generator/VERSION +0 -1
- data/.openapi-generator-ignore +0 -31
- data/.rspec +0 -2
- data/.rubocop.yml +0 -148
- data/fix-gemspec.sh +0 -11
- data/lib/daytona_api_client/api/admin_api.rb +0 -1151
- data/lib/daytona_api_client/api/jobs_api.rb +0 -299
- data/lib/daytona_api_client/api/regions_api.rb +0 -77
- data/lib/daytona_api_client/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_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/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 -378
- data/lib/daytona_api_client/models/region_type.rb +0 -42
- data/lib/daytona_api_client/models/region_usage_overview.rb +0 -456
- 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 -764
- 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 -256
- 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,1067 +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 [Float] :min_cpu Minimum CPU
|
|
1713
|
-
# @option opts [Float] :max_cpu Maximum CPU
|
|
1714
|
-
# @option opts [Float] :min_memory_gi_b Minimum memory in GiB
|
|
1715
|
-
# @option opts [Float] :max_memory_gi_b Maximum memory in GiB
|
|
1716
|
-
# @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
|
|
1717
|
-
# @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
|
|
1718
|
-
# @option opts [Boolean] :is_public Filter by public status
|
|
1719
|
-
# @option opts [Boolean] :is_recoverable Filter by recoverable status
|
|
1720
|
-
# @option opts [Time] :created_at_after Include items created after this timestamp
|
|
1721
|
-
# @option opts [Time] :created_at_before Include items created before this timestamp
|
|
1722
|
-
# @option opts [Time] :last_event_after Include items with last event after this timestamp
|
|
1723
|
-
# @option opts [Time] :last_event_before Include items with last event before this timestamp
|
|
1724
|
-
# @option opts [SandboxListSortField] :sort Field to sort by
|
|
1725
|
-
# @option opts [SandboxListSortDirection] :order Direction to sort by
|
|
1726
|
-
# @return [ListSandboxesResponse]
|
|
1727
|
-
def list_sandboxes(opts = {})
|
|
1728
|
-
data, _status_code, _headers = list_sandboxes_with_http_info(opts)
|
|
1729
|
-
data
|
|
1730
|
-
end
|
|
1731
|
-
|
|
1732
|
-
# List sandboxes
|
|
1733
|
-
# Advanced filtering and ordering. Eventually consistent.
|
|
1734
|
-
# @param [Hash] opts the optional parameters
|
|
1735
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1736
|
-
# @option opts [String] :cursor Pagination cursor from a previous response
|
|
1737
|
-
# @option opts [Float] :limit Number of results per page (default to 100)
|
|
1738
|
-
# @option opts [String] :id Filter by ID prefix (case-insensitive)
|
|
1739
|
-
# @option opts [String] :name Filter by name prefix (case-insensitive)
|
|
1740
|
-
# @option opts [String] :labels JSON encoded labels to filter by
|
|
1741
|
-
# @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
|
|
1742
|
-
# @option opts [Array<SandboxState>] :states List of states to filter by.
|
|
1743
|
-
# @option opts [Array<String>] :snapshots List of snapshot names to filter by
|
|
1744
|
-
# @option opts [Array<String>] :region_ids List of regions IDs to filter by
|
|
1745
|
-
# @option opts [Float] :min_cpu Minimum CPU
|
|
1746
|
-
# @option opts [Float] :max_cpu Maximum CPU
|
|
1747
|
-
# @option opts [Float] :min_memory_gi_b Minimum memory in GiB
|
|
1748
|
-
# @option opts [Float] :max_memory_gi_b Maximum memory in GiB
|
|
1749
|
-
# @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
|
|
1750
|
-
# @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
|
|
1751
|
-
# @option opts [Boolean] :is_public Filter by public status
|
|
1752
|
-
# @option opts [Boolean] :is_recoverable Filter by recoverable status
|
|
1753
|
-
# @option opts [Time] :created_at_after Include items created after this timestamp
|
|
1754
|
-
# @option opts [Time] :created_at_before Include items created before this timestamp
|
|
1755
|
-
# @option opts [Time] :last_event_after Include items with last event after this timestamp
|
|
1756
|
-
# @option opts [Time] :last_event_before Include items with last event before this timestamp
|
|
1757
|
-
# @option opts [SandboxListSortField] :sort Field to sort by
|
|
1758
|
-
# @option opts [SandboxListSortDirection] :order Direction to sort by
|
|
1759
|
-
# @return [Array<(ListSandboxesResponse, Integer, Hash)>] ListSandboxesResponse data, response status code and response headers
|
|
1760
|
-
def list_sandboxes_with_http_info(opts = {})
|
|
1761
|
-
if @api_client.config.debugging
|
|
1762
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.list_sandboxes ...'
|
|
1763
|
-
end
|
|
1764
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
|
|
1765
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes, must be smaller than or equal to 200.'
|
|
1766
|
-
end
|
|
1767
|
-
|
|
1768
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
1769
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
|
|
1770
|
-
end
|
|
1771
|
-
|
|
1772
|
-
if @api_client.config.client_side_validation && !opts[:'min_cpu'].nil? && opts[:'min_cpu'] < 1
|
|
1773
|
-
fail ArgumentError, 'invalid value for "opts[:"min_cpu"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
|
|
1774
|
-
end
|
|
1775
|
-
|
|
1776
|
-
if @api_client.config.client_side_validation && !opts[:'max_cpu'].nil? && opts[:'max_cpu'] < 1
|
|
1777
|
-
fail ArgumentError, 'invalid value for "opts[:"max_cpu"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
|
|
1778
|
-
end
|
|
1779
|
-
|
|
1780
|
-
if @api_client.config.client_side_validation && !opts[:'min_memory_gi_b'].nil? && opts[:'min_memory_gi_b'] < 1
|
|
1781
|
-
fail ArgumentError, 'invalid value for "opts[:"min_memory_gi_b"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
|
|
1782
|
-
end
|
|
1783
|
-
|
|
1784
|
-
if @api_client.config.client_side_validation && !opts[:'max_memory_gi_b'].nil? && opts[:'max_memory_gi_b'] < 1
|
|
1785
|
-
fail ArgumentError, 'invalid value for "opts[:"max_memory_gi_b"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
|
|
1786
|
-
end
|
|
1787
|
-
|
|
1788
|
-
if @api_client.config.client_side_validation && !opts[:'min_disk_gi_b'].nil? && opts[:'min_disk_gi_b'] < 1
|
|
1789
|
-
fail ArgumentError, 'invalid value for "opts[:"min_disk_gi_b"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
|
|
1790
|
-
end
|
|
1791
|
-
|
|
1792
|
-
if @api_client.config.client_side_validation && !opts[:'max_disk_gi_b'].nil? && opts[:'max_disk_gi_b'] < 1
|
|
1793
|
-
fail ArgumentError, 'invalid value for "opts[:"max_disk_gi_b"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
|
|
1794
|
-
end
|
|
1795
|
-
|
|
1796
|
-
# resource path
|
|
1797
|
-
local_var_path = '/sandbox'
|
|
1798
|
-
|
|
1799
|
-
# query parameters
|
|
1800
|
-
query_params = opts[:query_params] || {}
|
|
1801
|
-
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
1802
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1803
|
-
query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
|
|
1804
|
-
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
1805
|
-
query_params[:'labels'] = opts[:'labels'] if !opts[:'labels'].nil?
|
|
1806
|
-
query_params[:'includeErroredDeleted'] = opts[:'include_errored_deleted'] if !opts[:'include_errored_deleted'].nil?
|
|
1807
|
-
query_params[:'states'] = @api_client.build_collection_param(opts[:'states'], :multi) if !opts[:'states'].nil?
|
|
1808
|
-
query_params[:'snapshots'] = @api_client.build_collection_param(opts[:'snapshots'], :multi) if !opts[:'snapshots'].nil?
|
|
1809
|
-
query_params[:'regionIds'] = @api_client.build_collection_param(opts[:'region_ids'], :multi) if !opts[:'region_ids'].nil?
|
|
1810
|
-
query_params[:'minCpu'] = opts[:'min_cpu'] if !opts[:'min_cpu'].nil?
|
|
1811
|
-
query_params[:'maxCpu'] = opts[:'max_cpu'] if !opts[:'max_cpu'].nil?
|
|
1812
|
-
query_params[:'minMemoryGiB'] = opts[:'min_memory_gi_b'] if !opts[:'min_memory_gi_b'].nil?
|
|
1813
|
-
query_params[:'maxMemoryGiB'] = opts[:'max_memory_gi_b'] if !opts[:'max_memory_gi_b'].nil?
|
|
1814
|
-
query_params[:'minDiskGiB'] = opts[:'min_disk_gi_b'] if !opts[:'min_disk_gi_b'].nil?
|
|
1815
|
-
query_params[:'maxDiskGiB'] = opts[:'max_disk_gi_b'] if !opts[:'max_disk_gi_b'].nil?
|
|
1816
|
-
query_params[:'isPublic'] = opts[:'is_public'] if !opts[:'is_public'].nil?
|
|
1817
|
-
query_params[:'isRecoverable'] = opts[:'is_recoverable'] if !opts[:'is_recoverable'].nil?
|
|
1818
|
-
query_params[:'createdAtAfter'] = opts[:'created_at_after'] if !opts[:'created_at_after'].nil?
|
|
1819
|
-
query_params[:'createdAtBefore'] = opts[:'created_at_before'] if !opts[:'created_at_before'].nil?
|
|
1820
|
-
query_params[:'lastEventAfter'] = opts[:'last_event_after'] if !opts[:'last_event_after'].nil?
|
|
1821
|
-
query_params[:'lastEventBefore'] = opts[:'last_event_before'] if !opts[:'last_event_before'].nil?
|
|
1822
|
-
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
1823
|
-
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
|
1824
|
-
|
|
1825
|
-
# header parameters
|
|
1826
|
-
header_params = opts[:header_params] || {}
|
|
1827
|
-
# HTTP header 'Accept' (if needed)
|
|
1828
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1829
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1830
|
-
|
|
1831
|
-
# form parameters
|
|
1832
|
-
form_params = opts[:form_params] || {}
|
|
1833
|
-
|
|
1834
|
-
# http body (model)
|
|
1835
|
-
post_body = opts[:debug_body]
|
|
1836
|
-
|
|
1837
|
-
# return_type
|
|
1838
|
-
return_type = opts[:debug_return_type] || 'ListSandboxesResponse'
|
|
1839
|
-
|
|
1840
|
-
# auth_names
|
|
1841
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1842
|
-
|
|
1843
|
-
new_options = opts.merge(
|
|
1844
|
-
:operation => :"SandboxApi.list_sandboxes",
|
|
1845
|
-
:header_params => header_params,
|
|
1846
|
-
:query_params => query_params,
|
|
1847
|
-
:form_params => form_params,
|
|
1848
|
-
:body => post_body,
|
|
1849
|
-
:auth_names => auth_names,
|
|
1850
|
-
:return_type => return_type
|
|
1851
|
-
)
|
|
1852
|
-
|
|
1853
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1854
|
-
if @api_client.config.debugging
|
|
1855
|
-
@api_client.config.logger.debug "API called: SandboxApi#list_sandboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1856
|
-
end
|
|
1857
|
-
return data, status_code, headers
|
|
1858
|
-
end
|
|
1859
|
-
|
|
1860
|
-
# [DEPRECATED] List all sandboxes paginated
|
|
1861
|
-
# @param [Hash] opts the optional parameters
|
|
1862
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1863
|
-
# @option opts [Float] :page Page number of the results (default to 1)
|
|
1864
|
-
# @option opts [Float] :limit Number of results per page (default to 100)
|
|
1865
|
-
# @option opts [String] :id Filter by partial ID match
|
|
1866
|
-
# @option opts [String] :name Filter by partial name match
|
|
1867
|
-
# @option opts [String] :labels JSON encoded labels to filter by
|
|
1868
|
-
# @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
|
|
1869
|
-
# @option opts [Array<String>] :states List of states to filter by
|
|
1870
|
-
# @option opts [Array<String>] :snapshots List of snapshot names to filter by
|
|
1871
|
-
# @option opts [Array<String>] :regions List of regions to filter by
|
|
1872
|
-
# @option opts [Float] :min_cpu Minimum CPU
|
|
1873
|
-
# @option opts [Float] :max_cpu Maximum CPU
|
|
1874
|
-
# @option opts [Float] :min_memory_gi_b Minimum memory in GiB
|
|
1875
|
-
# @option opts [Float] :max_memory_gi_b Maximum memory in GiB
|
|
1876
|
-
# @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
|
|
1877
|
-
# @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
|
|
1878
|
-
# @option opts [Time] :last_event_after Include items with last event after this timestamp
|
|
1879
|
-
# @option opts [Time] :last_event_before Include items with last event before this timestamp
|
|
1880
|
-
# @option opts [String] :sort Field to sort by (default to 'createdAt')
|
|
1881
|
-
# @option opts [String] :order Direction to sort by (default to 'desc')
|
|
1882
|
-
# @return [PaginatedSandboxesDeprecated]
|
|
1883
|
-
def list_sandboxes_paginated_deprecated(opts = {})
|
|
1884
|
-
data, _status_code, _headers = list_sandboxes_paginated_deprecated_with_http_info(opts)
|
|
1885
|
-
data
|
|
1886
|
-
end
|
|
1887
|
-
|
|
1888
|
-
# [DEPRECATED] List all sandboxes paginated
|
|
764
|
+
# List all sandboxes paginated
|
|
1889
765
|
# @param [Hash] opts the optional parameters
|
|
1890
766
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1891
767
|
# @option opts [Float] :page Page number of the results (default to 1)
|
|
1892
768
|
# @option opts [Float] :limit Number of results per page (default to 100)
|
|
1893
769
|
# @option opts [String] :id Filter by partial ID match
|
|
1894
|
-
# @option opts [String] :name Filter by partial name match
|
|
1895
770
|
# @option opts [String] :labels JSON encoded labels to filter by
|
|
1896
771
|
# @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
|
|
1897
772
|
# @option opts [Array<String>] :states List of states to filter by
|
|
@@ -1907,56 +782,56 @@ module DaytonaApiClient
|
|
|
1907
782
|
# @option opts [Time] :last_event_before Include items with last event before this timestamp
|
|
1908
783
|
# @option opts [String] :sort Field to sort by (default to 'createdAt')
|
|
1909
784
|
# @option opts [String] :order Direction to sort by (default to 'desc')
|
|
1910
|
-
# @return [Array<(
|
|
1911
|
-
def
|
|
785
|
+
# @return [Array<(PaginatedSandboxes, Integer, Hash)>] PaginatedSandboxes data, response status code and response headers
|
|
786
|
+
def list_sandboxes_paginated_with_http_info(opts = {})
|
|
1912
787
|
if @api_client.config.debugging
|
|
1913
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
788
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.list_sandboxes_paginated ...'
|
|
1914
789
|
end
|
|
1915
790
|
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
1916
|
-
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.'
|
|
1917
792
|
end
|
|
1918
793
|
|
|
1919
794
|
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
|
|
1920
|
-
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.'
|
|
1921
796
|
end
|
|
1922
797
|
|
|
1923
798
|
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
1924
|
-
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.'
|
|
1925
800
|
end
|
|
1926
801
|
|
|
1927
|
-
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"]
|
|
1928
803
|
if @api_client.config.client_side_validation && opts[:'states'] && !opts[:'states'].all? { |item| allowable_values.include?(item) }
|
|
1929
804
|
fail ArgumentError, "invalid value for \"states\", must include one of #{allowable_values}"
|
|
1930
805
|
end
|
|
1931
806
|
if @api_client.config.client_side_validation && !opts[:'min_cpu'].nil? && opts[:'min_cpu'] < 1
|
|
1932
|
-
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.'
|
|
1933
808
|
end
|
|
1934
809
|
|
|
1935
810
|
if @api_client.config.client_side_validation && !opts[:'max_cpu'].nil? && opts[:'max_cpu'] < 1
|
|
1936
|
-
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.'
|
|
1937
812
|
end
|
|
1938
813
|
|
|
1939
814
|
if @api_client.config.client_side_validation && !opts[:'min_memory_gi_b'].nil? && opts[:'min_memory_gi_b'] < 1
|
|
1940
|
-
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.'
|
|
1941
816
|
end
|
|
1942
817
|
|
|
1943
818
|
if @api_client.config.client_side_validation && !opts[:'max_memory_gi_b'].nil? && opts[:'max_memory_gi_b'] < 1
|
|
1944
|
-
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.'
|
|
1945
820
|
end
|
|
1946
821
|
|
|
1947
822
|
if @api_client.config.client_side_validation && !opts[:'min_disk_gi_b'].nil? && opts[:'min_disk_gi_b'] < 1
|
|
1948
|
-
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.'
|
|
1949
824
|
end
|
|
1950
825
|
|
|
1951
826
|
if @api_client.config.client_side_validation && !opts[:'max_disk_gi_b'].nil? && opts[:'max_disk_gi_b'] < 1
|
|
1952
|
-
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.'
|
|
1953
828
|
end
|
|
1954
829
|
|
|
1955
|
-
allowable_values = ["id", "
|
|
830
|
+
allowable_values = ["id", "state", "snapshot", "region", "updatedAt", "createdAt"]
|
|
1956
831
|
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
|
1957
832
|
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
|
1958
833
|
end
|
|
1959
|
-
allowable_values = ["asc", "desc"
|
|
834
|
+
allowable_values = ["asc", "desc"]
|
|
1960
835
|
if @api_client.config.client_side_validation && opts[:'order'] && !allowable_values.include?(opts[:'order'])
|
|
1961
836
|
fail ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
|
|
1962
837
|
end
|
|
@@ -1968,89 +843,21 @@ module DaytonaApiClient
|
|
|
1968
843
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
1969
844
|
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1970
845
|
query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
|
|
1971
|
-
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
1972
846
|
query_params[:'labels'] = opts[:'labels'] if !opts[:'labels'].nil?
|
|
1973
847
|
query_params[:'includeErroredDeleted'] = opts[:'include_errored_deleted'] if !opts[:'include_errored_deleted'].nil?
|
|
1974
848
|
query_params[:'states'] = @api_client.build_collection_param(opts[:'states'], :multi) if !opts[:'states'].nil?
|
|
1975
849
|
query_params[:'snapshots'] = @api_client.build_collection_param(opts[:'snapshots'], :multi) if !opts[:'snapshots'].nil?
|
|
1976
850
|
query_params[:'regions'] = @api_client.build_collection_param(opts[:'regions'], :multi) if !opts[:'regions'].nil?
|
|
1977
851
|
query_params[:'minCpu'] = opts[:'min_cpu'] if !opts[:'min_cpu'].nil?
|
|
1978
|
-
query_params[:'maxCpu'] = opts[:'max_cpu'] if !opts[:'max_cpu'].nil?
|
|
1979
|
-
query_params[:'minMemoryGiB'] = opts[:'min_memory_gi_b'] if !opts[:'min_memory_gi_b'].nil?
|
|
1980
|
-
query_params[:'maxMemoryGiB'] = opts[:'max_memory_gi_b'] if !opts[:'max_memory_gi_b'].nil?
|
|
1981
|
-
query_params[:'minDiskGiB'] = opts[:'min_disk_gi_b'] if !opts[:'min_disk_gi_b'].nil?
|
|
1982
|
-
query_params[:'maxDiskGiB'] = opts[:'max_disk_gi_b'] if !opts[:'max_disk_gi_b'].nil?
|
|
1983
|
-
query_params[:'lastEventAfter'] = opts[:'last_event_after'] if !opts[:'last_event_after'].nil?
|
|
1984
|
-
query_params[:'lastEventBefore'] = opts[:'last_event_before'] if !opts[:'last_event_before'].nil?
|
|
1985
|
-
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
1986
|
-
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
|
1987
|
-
|
|
1988
|
-
# header parameters
|
|
1989
|
-
header_params = opts[:header_params] || {}
|
|
1990
|
-
# HTTP header 'Accept' (if needed)
|
|
1991
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1992
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1993
|
-
|
|
1994
|
-
# form parameters
|
|
1995
|
-
form_params = opts[:form_params] || {}
|
|
1996
|
-
|
|
1997
|
-
# http body (model)
|
|
1998
|
-
post_body = opts[:debug_body]
|
|
1999
|
-
|
|
2000
|
-
# return_type
|
|
2001
|
-
return_type = opts[:debug_return_type] || 'PaginatedSandboxesDeprecated'
|
|
2002
|
-
|
|
2003
|
-
# auth_names
|
|
2004
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2005
|
-
|
|
2006
|
-
new_options = opts.merge(
|
|
2007
|
-
:operation => :"SandboxApi.list_sandboxes_paginated_deprecated",
|
|
2008
|
-
:header_params => header_params,
|
|
2009
|
-
:query_params => query_params,
|
|
2010
|
-
:form_params => form_params,
|
|
2011
|
-
:body => post_body,
|
|
2012
|
-
:auth_names => auth_names,
|
|
2013
|
-
:return_type => return_type
|
|
2014
|
-
)
|
|
2015
|
-
|
|
2016
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2017
|
-
if @api_client.config.debugging
|
|
2018
|
-
@api_client.config.logger.debug "API called: SandboxApi#list_sandboxes_paginated_deprecated\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2019
|
-
end
|
|
2020
|
-
return data, status_code, headers
|
|
2021
|
-
end
|
|
2022
|
-
|
|
2023
|
-
# Recover sandbox from error state
|
|
2024
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2025
|
-
# @param [Hash] opts the optional parameters
|
|
2026
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2027
|
-
# @option opts [Boolean] :skip_start If true, the sandbox is left in STOPPED after recovery instead of being started.
|
|
2028
|
-
# @return [Sandbox]
|
|
2029
|
-
def recover_sandbox(sandbox_id_or_name, opts = {})
|
|
2030
|
-
data, _status_code, _headers = recover_sandbox_with_http_info(sandbox_id_or_name, opts)
|
|
2031
|
-
data
|
|
2032
|
-
end
|
|
2033
|
-
|
|
2034
|
-
# Recover sandbox from error state
|
|
2035
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2036
|
-
# @param [Hash] opts the optional parameters
|
|
2037
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2038
|
-
# @option opts [Boolean] :skip_start If true, the sandbox is left in STOPPED after recovery instead of being started.
|
|
2039
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2040
|
-
def recover_sandbox_with_http_info(sandbox_id_or_name, opts = {})
|
|
2041
|
-
if @api_client.config.debugging
|
|
2042
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.recover_sandbox ...'
|
|
2043
|
-
end
|
|
2044
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2045
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2046
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.recover_sandbox"
|
|
2047
|
-
end
|
|
2048
|
-
# resource path
|
|
2049
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/recover'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
2050
|
-
|
|
2051
|
-
# query parameters
|
|
2052
|
-
query_params = opts[:query_params] || {}
|
|
2053
|
-
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?
|
|
2054
861
|
|
|
2055
862
|
# header parameters
|
|
2056
863
|
header_params = opts[:header_params] || {}
|
|
@@ -2065,13 +872,13 @@ module DaytonaApiClient
|
|
|
2065
872
|
post_body = opts[:debug_body]
|
|
2066
873
|
|
|
2067
874
|
# return_type
|
|
2068
|
-
return_type = opts[:debug_return_type] || '
|
|
875
|
+
return_type = opts[:debug_return_type] || 'PaginatedSandboxes'
|
|
2069
876
|
|
|
2070
877
|
# auth_names
|
|
2071
878
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2072
879
|
|
|
2073
880
|
new_options = opts.merge(
|
|
2074
|
-
:operation => :"SandboxApi.
|
|
881
|
+
:operation => :"SandboxApi.list_sandboxes_paginated",
|
|
2075
882
|
:header_params => header_params,
|
|
2076
883
|
:query_params => query_params,
|
|
2077
884
|
:form_params => form_params,
|
|
@@ -2080,44 +887,44 @@ module DaytonaApiClient
|
|
|
2080
887
|
:return_type => return_type
|
|
2081
888
|
)
|
|
2082
889
|
|
|
2083
|
-
data, status_code, headers = @api_client.call_api(:
|
|
890
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2084
891
|
if @api_client.config.debugging
|
|
2085
|
-
@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}"
|
|
2086
893
|
end
|
|
2087
894
|
return data, status_code, headers
|
|
2088
895
|
end
|
|
2089
896
|
|
|
2090
897
|
# Replace sandbox labels
|
|
2091
|
-
# @param
|
|
898
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2092
899
|
# @param sandbox_labels [SandboxLabels]
|
|
2093
900
|
# @param [Hash] opts the optional parameters
|
|
2094
901
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2095
902
|
# @return [SandboxLabels]
|
|
2096
|
-
def replace_labels(
|
|
2097
|
-
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)
|
|
2098
905
|
data
|
|
2099
906
|
end
|
|
2100
907
|
|
|
2101
908
|
# Replace sandbox labels
|
|
2102
|
-
# @param
|
|
909
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2103
910
|
# @param sandbox_labels [SandboxLabels]
|
|
2104
911
|
# @param [Hash] opts the optional parameters
|
|
2105
912
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2106
913
|
# @return [Array<(SandboxLabels, Integer, Hash)>] SandboxLabels data, response status code and response headers
|
|
2107
|
-
def replace_labels_with_http_info(
|
|
914
|
+
def replace_labels_with_http_info(sandbox_id, sandbox_labels, opts = {})
|
|
2108
915
|
if @api_client.config.debugging
|
|
2109
916
|
@api_client.config.logger.debug 'Calling API: SandboxApi.replace_labels ...'
|
|
2110
917
|
end
|
|
2111
|
-
# verify the required parameter '
|
|
2112
|
-
if @api_client.config.client_side_validation &&
|
|
2113
|
-
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"
|
|
2114
921
|
end
|
|
2115
922
|
# verify the required parameter 'sandbox_labels' is set
|
|
2116
923
|
if @api_client.config.client_side_validation && sandbox_labels.nil?
|
|
2117
924
|
fail ArgumentError, "Missing the required parameter 'sandbox_labels' when calling SandboxApi.replace_labels"
|
|
2118
925
|
end
|
|
2119
926
|
# resource path
|
|
2120
|
-
local_var_path = '/sandbox/{
|
|
927
|
+
local_var_path = '/sandbox/{sandboxId}/labels'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
2121
928
|
|
|
2122
929
|
# query parameters
|
|
2123
930
|
query_params = opts[:query_params] || {}
|
|
@@ -2129,7 +936,7 @@ module DaytonaApiClient
|
|
|
2129
936
|
# HTTP header 'Content-Type'
|
|
2130
937
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2131
938
|
if !content_type.nil?
|
|
2132
|
-
|
|
939
|
+
header_params['Content-Type'] = content_type
|
|
2133
940
|
end
|
|
2134
941
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2135
942
|
|
|
@@ -2162,108 +969,33 @@ module DaytonaApiClient
|
|
|
2162
969
|
return data, status_code, headers
|
|
2163
970
|
end
|
|
2164
971
|
|
|
2165
|
-
# Resize sandbox resources
|
|
2166
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2167
|
-
# @param resize_sandbox [ResizeSandbox]
|
|
2168
|
-
# @param [Hash] opts the optional parameters
|
|
2169
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2170
|
-
# @return [Sandbox]
|
|
2171
|
-
def resize_sandbox(sandbox_id_or_name, resize_sandbox, opts = {})
|
|
2172
|
-
data, _status_code, _headers = resize_sandbox_with_http_info(sandbox_id_or_name, resize_sandbox, opts)
|
|
2173
|
-
data
|
|
2174
|
-
end
|
|
2175
|
-
|
|
2176
|
-
# Resize sandbox resources
|
|
2177
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2178
|
-
# @param resize_sandbox [ResizeSandbox]
|
|
2179
|
-
# @param [Hash] opts the optional parameters
|
|
2180
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2181
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2182
|
-
def resize_sandbox_with_http_info(sandbox_id_or_name, resize_sandbox, opts = {})
|
|
2183
|
-
if @api_client.config.debugging
|
|
2184
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.resize_sandbox ...'
|
|
2185
|
-
end
|
|
2186
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2187
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2188
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.resize_sandbox"
|
|
2189
|
-
end
|
|
2190
|
-
# verify the required parameter 'resize_sandbox' is set
|
|
2191
|
-
if @api_client.config.client_side_validation && resize_sandbox.nil?
|
|
2192
|
-
fail ArgumentError, "Missing the required parameter 'resize_sandbox' when calling SandboxApi.resize_sandbox"
|
|
2193
|
-
end
|
|
2194
|
-
# resource path
|
|
2195
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/resize'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
2196
|
-
|
|
2197
|
-
# query parameters
|
|
2198
|
-
query_params = opts[:query_params] || {}
|
|
2199
|
-
|
|
2200
|
-
# header parameters
|
|
2201
|
-
header_params = opts[:header_params] || {}
|
|
2202
|
-
# HTTP header 'Accept' (if needed)
|
|
2203
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2204
|
-
# HTTP header 'Content-Type'
|
|
2205
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2206
|
-
if !content_type.nil?
|
|
2207
|
-
header_params['Content-Type'] = content_type
|
|
2208
|
-
end
|
|
2209
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2210
|
-
|
|
2211
|
-
# form parameters
|
|
2212
|
-
form_params = opts[:form_params] || {}
|
|
2213
|
-
|
|
2214
|
-
# http body (model)
|
|
2215
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(resize_sandbox)
|
|
2216
|
-
|
|
2217
|
-
# return_type
|
|
2218
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
2219
|
-
|
|
2220
|
-
# auth_names
|
|
2221
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2222
|
-
|
|
2223
|
-
new_options = opts.merge(
|
|
2224
|
-
:operation => :"SandboxApi.resize_sandbox",
|
|
2225
|
-
:header_params => header_params,
|
|
2226
|
-
:query_params => query_params,
|
|
2227
|
-
:form_params => form_params,
|
|
2228
|
-
:body => post_body,
|
|
2229
|
-
:auth_names => auth_names,
|
|
2230
|
-
:return_type => return_type
|
|
2231
|
-
)
|
|
2232
|
-
|
|
2233
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2234
|
-
if @api_client.config.debugging
|
|
2235
|
-
@api_client.config.logger.debug "API called: SandboxApi#resize_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2236
|
-
end
|
|
2237
|
-
return data, status_code, headers
|
|
2238
|
-
end
|
|
2239
|
-
|
|
2240
972
|
# Revoke SSH access for sandbox
|
|
2241
|
-
# @param
|
|
973
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2242
974
|
# @param [Hash] opts the optional parameters
|
|
2243
975
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2244
976
|
# @option opts [String] :token SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.
|
|
2245
|
-
# @return [
|
|
2246
|
-
def revoke_ssh_access(
|
|
2247
|
-
|
|
2248
|
-
|
|
977
|
+
# @return [nil]
|
|
978
|
+
def revoke_ssh_access(sandbox_id, opts = {})
|
|
979
|
+
revoke_ssh_access_with_http_info(sandbox_id, opts)
|
|
980
|
+
nil
|
|
2249
981
|
end
|
|
2250
982
|
|
|
2251
983
|
# Revoke SSH access for sandbox
|
|
2252
|
-
# @param
|
|
984
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2253
985
|
# @param [Hash] opts the optional parameters
|
|
2254
986
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2255
987
|
# @option opts [String] :token SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.
|
|
2256
|
-
# @return [Array<(
|
|
2257
|
-
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 = {})
|
|
2258
990
|
if @api_client.config.debugging
|
|
2259
991
|
@api_client.config.logger.debug 'Calling API: SandboxApi.revoke_ssh_access ...'
|
|
2260
992
|
end
|
|
2261
|
-
# verify the required parameter '
|
|
2262
|
-
if @api_client.config.client_side_validation &&
|
|
2263
|
-
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"
|
|
2264
996
|
end
|
|
2265
997
|
# resource path
|
|
2266
|
-
local_var_path = '/sandbox/{
|
|
998
|
+
local_var_path = '/sandbox/{sandboxId}/ssh-access'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
2267
999
|
|
|
2268
1000
|
# query parameters
|
|
2269
1001
|
query_params = opts[:query_params] || {}
|
|
@@ -2271,8 +1003,6 @@ module DaytonaApiClient
|
|
|
2271
1003
|
|
|
2272
1004
|
# header parameters
|
|
2273
1005
|
header_params = opts[:header_params] || {}
|
|
2274
|
-
# HTTP header 'Accept' (if needed)
|
|
2275
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2276
1006
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2277
1007
|
|
|
2278
1008
|
# form parameters
|
|
@@ -2282,7 +1012,7 @@ module DaytonaApiClient
|
|
|
2282
1012
|
post_body = opts[:debug_body]
|
|
2283
1013
|
|
|
2284
1014
|
# return_type
|
|
2285
|
-
return_type = opts[:debug_return_type]
|
|
1015
|
+
return_type = opts[:debug_return_type]
|
|
2286
1016
|
|
|
2287
1017
|
# auth_names
|
|
2288
1018
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
@@ -2305,44 +1035,42 @@ module DaytonaApiClient
|
|
|
2305
1035
|
end
|
|
2306
1036
|
|
|
2307
1037
|
# Set sandbox auto-archive interval
|
|
2308
|
-
# @param
|
|
1038
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2309
1039
|
# @param interval [Float] Auto-archive interval in minutes (0 means the maximum interval will be used)
|
|
2310
1040
|
# @param [Hash] opts the optional parameters
|
|
2311
1041
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2312
|
-
# @return [
|
|
2313
|
-
def set_auto_archive_interval(
|
|
2314
|
-
|
|
2315
|
-
|
|
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
|
|
2316
1046
|
end
|
|
2317
1047
|
|
|
2318
1048
|
# Set sandbox auto-archive interval
|
|
2319
|
-
# @param
|
|
1049
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2320
1050
|
# @param interval [Float] Auto-archive interval in minutes (0 means the maximum interval will be used)
|
|
2321
1051
|
# @param [Hash] opts the optional parameters
|
|
2322
1052
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2323
|
-
# @return [Array<(
|
|
2324
|
-
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 = {})
|
|
2325
1055
|
if @api_client.config.debugging
|
|
2326
1056
|
@api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_archive_interval ...'
|
|
2327
1057
|
end
|
|
2328
|
-
# verify the required parameter '
|
|
2329
|
-
if @api_client.config.client_side_validation &&
|
|
2330
|
-
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"
|
|
2331
1061
|
end
|
|
2332
1062
|
# verify the required parameter 'interval' is set
|
|
2333
1063
|
if @api_client.config.client_side_validation && interval.nil?
|
|
2334
1064
|
fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_auto_archive_interval"
|
|
2335
1065
|
end
|
|
2336
1066
|
# resource path
|
|
2337
|
-
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))
|
|
2338
1068
|
|
|
2339
1069
|
# query parameters
|
|
2340
1070
|
query_params = opts[:query_params] || {}
|
|
2341
1071
|
|
|
2342
1072
|
# header parameters
|
|
2343
1073
|
header_params = opts[:header_params] || {}
|
|
2344
|
-
# HTTP header 'Accept' (if needed)
|
|
2345
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2346
1074
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2347
1075
|
|
|
2348
1076
|
# form parameters
|
|
@@ -2352,7 +1080,7 @@ module DaytonaApiClient
|
|
|
2352
1080
|
post_body = opts[:debug_body]
|
|
2353
1081
|
|
|
2354
1082
|
# return_type
|
|
2355
|
-
return_type = opts[:debug_return_type]
|
|
1083
|
+
return_type = opts[:debug_return_type]
|
|
2356
1084
|
|
|
2357
1085
|
# auth_names
|
|
2358
1086
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
@@ -2375,44 +1103,42 @@ module DaytonaApiClient
|
|
|
2375
1103
|
end
|
|
2376
1104
|
|
|
2377
1105
|
# Set sandbox auto-delete interval
|
|
2378
|
-
# @param
|
|
1106
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2379
1107
|
# @param interval [Float] Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
|
|
2380
1108
|
# @param [Hash] opts the optional parameters
|
|
2381
1109
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2382
|
-
# @return [
|
|
2383
|
-
def set_auto_delete_interval(
|
|
2384
|
-
|
|
2385
|
-
|
|
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
|
|
2386
1114
|
end
|
|
2387
1115
|
|
|
2388
1116
|
# Set sandbox auto-delete interval
|
|
2389
|
-
# @param
|
|
1117
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2390
1118
|
# @param interval [Float] Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
|
|
2391
1119
|
# @param [Hash] opts the optional parameters
|
|
2392
1120
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2393
|
-
# @return [Array<(
|
|
2394
|
-
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 = {})
|
|
2395
1123
|
if @api_client.config.debugging
|
|
2396
1124
|
@api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_delete_interval ...'
|
|
2397
1125
|
end
|
|
2398
|
-
# verify the required parameter '
|
|
2399
|
-
if @api_client.config.client_side_validation &&
|
|
2400
|
-
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"
|
|
2401
1129
|
end
|
|
2402
1130
|
# verify the required parameter 'interval' is set
|
|
2403
1131
|
if @api_client.config.client_side_validation && interval.nil?
|
|
2404
1132
|
fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_auto_delete_interval"
|
|
2405
1133
|
end
|
|
2406
1134
|
# resource path
|
|
2407
|
-
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))
|
|
2408
1136
|
|
|
2409
1137
|
# query parameters
|
|
2410
1138
|
query_params = opts[:query_params] || {}
|
|
2411
1139
|
|
|
2412
1140
|
# header parameters
|
|
2413
1141
|
header_params = opts[:header_params] || {}
|
|
2414
|
-
# HTTP header 'Accept' (if needed)
|
|
2415
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2416
1142
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2417
1143
|
|
|
2418
1144
|
# form parameters
|
|
@@ -2422,7 +1148,7 @@ module DaytonaApiClient
|
|
|
2422
1148
|
post_body = opts[:debug_body]
|
|
2423
1149
|
|
|
2424
1150
|
# return_type
|
|
2425
|
-
return_type = opts[:debug_return_type]
|
|
1151
|
+
return_type = opts[:debug_return_type]
|
|
2426
1152
|
|
|
2427
1153
|
# auth_names
|
|
2428
1154
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
@@ -2445,44 +1171,42 @@ module DaytonaApiClient
|
|
|
2445
1171
|
end
|
|
2446
1172
|
|
|
2447
1173
|
# Set sandbox auto-stop interval
|
|
2448
|
-
# @param
|
|
1174
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2449
1175
|
# @param interval [Float] Auto-stop interval in minutes (0 to disable)
|
|
2450
1176
|
# @param [Hash] opts the optional parameters
|
|
2451
1177
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2452
|
-
# @return [
|
|
2453
|
-
def set_autostop_interval(
|
|
2454
|
-
|
|
2455
|
-
|
|
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
|
|
2456
1182
|
end
|
|
2457
1183
|
|
|
2458
1184
|
# Set sandbox auto-stop interval
|
|
2459
|
-
# @param
|
|
1185
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2460
1186
|
# @param interval [Float] Auto-stop interval in minutes (0 to disable)
|
|
2461
1187
|
# @param [Hash] opts the optional parameters
|
|
2462
1188
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2463
|
-
# @return [Array<(
|
|
2464
|
-
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 = {})
|
|
2465
1191
|
if @api_client.config.debugging
|
|
2466
1192
|
@api_client.config.logger.debug 'Calling API: SandboxApi.set_autostop_interval ...'
|
|
2467
1193
|
end
|
|
2468
|
-
# verify the required parameter '
|
|
2469
|
-
if @api_client.config.client_side_validation &&
|
|
2470
|
-
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"
|
|
2471
1197
|
end
|
|
2472
1198
|
# verify the required parameter 'interval' is set
|
|
2473
1199
|
if @api_client.config.client_side_validation && interval.nil?
|
|
2474
1200
|
fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_autostop_interval"
|
|
2475
1201
|
end
|
|
2476
1202
|
# resource path
|
|
2477
|
-
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))
|
|
2478
1204
|
|
|
2479
1205
|
# query parameters
|
|
2480
1206
|
query_params = opts[:query_params] || {}
|
|
2481
1207
|
|
|
2482
1208
|
# header parameters
|
|
2483
1209
|
header_params = opts[:header_params] || {}
|
|
2484
|
-
# HTTP header 'Accept' (if needed)
|
|
2485
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2486
1210
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2487
1211
|
|
|
2488
1212
|
# form parameters
|
|
@@ -2492,7 +1216,7 @@ module DaytonaApiClient
|
|
|
2492
1216
|
post_body = opts[:debug_body]
|
|
2493
1217
|
|
|
2494
1218
|
# return_type
|
|
2495
|
-
return_type = opts[:debug_return_type]
|
|
1219
|
+
return_type = opts[:debug_return_type]
|
|
2496
1220
|
|
|
2497
1221
|
# auth_names
|
|
2498
1222
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
@@ -2515,30 +1239,30 @@ module DaytonaApiClient
|
|
|
2515
1239
|
end
|
|
2516
1240
|
|
|
2517
1241
|
# Start sandbox
|
|
2518
|
-
# @param
|
|
1242
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2519
1243
|
# @param [Hash] opts the optional parameters
|
|
2520
1244
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2521
1245
|
# @return [Sandbox]
|
|
2522
|
-
def start_sandbox(
|
|
2523
|
-
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)
|
|
2524
1248
|
data
|
|
2525
1249
|
end
|
|
2526
1250
|
|
|
2527
1251
|
# Start sandbox
|
|
2528
|
-
# @param
|
|
1252
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2529
1253
|
# @param [Hash] opts the optional parameters
|
|
2530
1254
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2531
1255
|
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2532
|
-
def start_sandbox_with_http_info(
|
|
1256
|
+
def start_sandbox_with_http_info(sandbox_id, opts = {})
|
|
2533
1257
|
if @api_client.config.debugging
|
|
2534
1258
|
@api_client.config.logger.debug 'Calling API: SandboxApi.start_sandbox ...'
|
|
2535
1259
|
end
|
|
2536
|
-
# verify the required parameter '
|
|
2537
|
-
if @api_client.config.client_side_validation &&
|
|
2538
|
-
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"
|
|
2539
1263
|
end
|
|
2540
1264
|
# resource path
|
|
2541
|
-
local_var_path = '/sandbox/{
|
|
1265
|
+
local_var_path = '/sandbox/{sandboxId}/start'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
2542
1266
|
|
|
2543
1267
|
# query parameters
|
|
2544
1268
|
query_params = opts[:query_params] || {}
|
|
@@ -2579,97 +1303,30 @@ module DaytonaApiClient
|
|
|
2579
1303
|
end
|
|
2580
1304
|
|
|
2581
1305
|
# Stop sandbox
|
|
2582
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2583
|
-
# @param [Hash] opts the optional parameters
|
|
2584
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2585
|
-
# @option opts [Boolean] :force Force stop the sandbox using SIGKILL instead of SIGTERM
|
|
2586
|
-
# @return [Sandbox]
|
|
2587
|
-
def stop_sandbox(sandbox_id_or_name, opts = {})
|
|
2588
|
-
data, _status_code, _headers = stop_sandbox_with_http_info(sandbox_id_or_name, opts)
|
|
2589
|
-
data
|
|
2590
|
-
end
|
|
2591
|
-
|
|
2592
|
-
# Stop sandbox
|
|
2593
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2594
|
-
# @param [Hash] opts the optional parameters
|
|
2595
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2596
|
-
# @option opts [Boolean] :force Force stop the sandbox using SIGKILL instead of SIGTERM
|
|
2597
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2598
|
-
def stop_sandbox_with_http_info(sandbox_id_or_name, opts = {})
|
|
2599
|
-
if @api_client.config.debugging
|
|
2600
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.stop_sandbox ...'
|
|
2601
|
-
end
|
|
2602
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2603
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2604
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.stop_sandbox"
|
|
2605
|
-
end
|
|
2606
|
-
# resource path
|
|
2607
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/stop'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
2608
|
-
|
|
2609
|
-
# query parameters
|
|
2610
|
-
query_params = opts[:query_params] || {}
|
|
2611
|
-
query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil?
|
|
2612
|
-
|
|
2613
|
-
# header parameters
|
|
2614
|
-
header_params = opts[:header_params] || {}
|
|
2615
|
-
# HTTP header 'Accept' (if needed)
|
|
2616
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2617
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2618
|
-
|
|
2619
|
-
# form parameters
|
|
2620
|
-
form_params = opts[:form_params] || {}
|
|
2621
|
-
|
|
2622
|
-
# http body (model)
|
|
2623
|
-
post_body = opts[:debug_body]
|
|
2624
|
-
|
|
2625
|
-
# return_type
|
|
2626
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
2627
|
-
|
|
2628
|
-
# auth_names
|
|
2629
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2630
|
-
|
|
2631
|
-
new_options = opts.merge(
|
|
2632
|
-
:operation => :"SandboxApi.stop_sandbox",
|
|
2633
|
-
:header_params => header_params,
|
|
2634
|
-
:query_params => query_params,
|
|
2635
|
-
:form_params => form_params,
|
|
2636
|
-
:body => post_body,
|
|
2637
|
-
:auth_names => auth_names,
|
|
2638
|
-
:return_type => return_type
|
|
2639
|
-
)
|
|
2640
|
-
|
|
2641
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2642
|
-
if @api_client.config.debugging
|
|
2643
|
-
@api_client.config.logger.debug "API called: SandboxApi#stop_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2644
|
-
end
|
|
2645
|
-
return data, status_code, headers
|
|
2646
|
-
end
|
|
2647
|
-
|
|
2648
|
-
# Update sandbox last activity
|
|
2649
1306
|
# @param sandbox_id [String] ID of the sandbox
|
|
2650
1307
|
# @param [Hash] opts the optional parameters
|
|
2651
1308
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2652
1309
|
# @return [nil]
|
|
2653
|
-
def
|
|
2654
|
-
|
|
1310
|
+
def stop_sandbox(sandbox_id, opts = {})
|
|
1311
|
+
stop_sandbox_with_http_info(sandbox_id, opts)
|
|
2655
1312
|
nil
|
|
2656
1313
|
end
|
|
2657
1314
|
|
|
2658
|
-
#
|
|
1315
|
+
# Stop sandbox
|
|
2659
1316
|
# @param sandbox_id [String] ID of the sandbox
|
|
2660
1317
|
# @param [Hash] opts the optional parameters
|
|
2661
1318
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2662
1319
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
2663
|
-
def
|
|
1320
|
+
def stop_sandbox_with_http_info(sandbox_id, opts = {})
|
|
2664
1321
|
if @api_client.config.debugging
|
|
2665
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
1322
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.stop_sandbox ...'
|
|
2666
1323
|
end
|
|
2667
1324
|
# verify the required parameter 'sandbox_id' is set
|
|
2668
1325
|
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
2669
|
-
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"
|
|
2670
1327
|
end
|
|
2671
1328
|
# resource path
|
|
2672
|
-
local_var_path = '/sandbox/{sandboxId}/
|
|
1329
|
+
local_var_path = '/sandbox/{sandboxId}/stop'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
2673
1330
|
|
|
2674
1331
|
# query parameters
|
|
2675
1332
|
query_params = opts[:query_params] || {}
|
|
@@ -2691,84 +1348,7 @@ module DaytonaApiClient
|
|
|
2691
1348
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2692
1349
|
|
|
2693
1350
|
new_options = opts.merge(
|
|
2694
|
-
:operation => :"SandboxApi.
|
|
2695
|
-
:header_params => header_params,
|
|
2696
|
-
:query_params => query_params,
|
|
2697
|
-
:form_params => form_params,
|
|
2698
|
-
:body => post_body,
|
|
2699
|
-
:auth_names => auth_names,
|
|
2700
|
-
:return_type => return_type
|
|
2701
|
-
)
|
|
2702
|
-
|
|
2703
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2704
|
-
if @api_client.config.debugging
|
|
2705
|
-
@api_client.config.logger.debug "API called: SandboxApi#update_last_activity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2706
|
-
end
|
|
2707
|
-
return data, status_code, headers
|
|
2708
|
-
end
|
|
2709
|
-
|
|
2710
|
-
# Update sandbox network settings
|
|
2711
|
-
# Changes outbound network policy on the runner for a running sandbox (for example block all traffic, restore access, or set a CIDR allow list).
|
|
2712
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2713
|
-
# @param update_sandbox_network_settings [UpdateSandboxNetworkSettings]
|
|
2714
|
-
# @param [Hash] opts the optional parameters
|
|
2715
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2716
|
-
# @return [Sandbox]
|
|
2717
|
-
def update_network_settings(sandbox_id_or_name, update_sandbox_network_settings, opts = {})
|
|
2718
|
-
data, _status_code, _headers = update_network_settings_with_http_info(sandbox_id_or_name, update_sandbox_network_settings, opts)
|
|
2719
|
-
data
|
|
2720
|
-
end
|
|
2721
|
-
|
|
2722
|
-
# Update sandbox network settings
|
|
2723
|
-
# Changes outbound network policy on the runner for a running sandbox (for example block all traffic, restore access, or set a CIDR allow list).
|
|
2724
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2725
|
-
# @param update_sandbox_network_settings [UpdateSandboxNetworkSettings]
|
|
2726
|
-
# @param [Hash] opts the optional parameters
|
|
2727
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2728
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2729
|
-
def update_network_settings_with_http_info(sandbox_id_or_name, update_sandbox_network_settings, opts = {})
|
|
2730
|
-
if @api_client.config.debugging
|
|
2731
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.update_network_settings ...'
|
|
2732
|
-
end
|
|
2733
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2734
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2735
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.update_network_settings"
|
|
2736
|
-
end
|
|
2737
|
-
# verify the required parameter 'update_sandbox_network_settings' is set
|
|
2738
|
-
if @api_client.config.client_side_validation && update_sandbox_network_settings.nil?
|
|
2739
|
-
fail ArgumentError, "Missing the required parameter 'update_sandbox_network_settings' when calling SandboxApi.update_network_settings"
|
|
2740
|
-
end
|
|
2741
|
-
# resource path
|
|
2742
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/network-settings'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
2743
|
-
|
|
2744
|
-
# query parameters
|
|
2745
|
-
query_params = opts[:query_params] || {}
|
|
2746
|
-
|
|
2747
|
-
# header parameters
|
|
2748
|
-
header_params = opts[:header_params] || {}
|
|
2749
|
-
# HTTP header 'Accept' (if needed)
|
|
2750
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2751
|
-
# HTTP header 'Content-Type'
|
|
2752
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2753
|
-
if !content_type.nil?
|
|
2754
|
-
header_params['Content-Type'] = content_type
|
|
2755
|
-
end
|
|
2756
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2757
|
-
|
|
2758
|
-
# form parameters
|
|
2759
|
-
form_params = opts[:form_params] || {}
|
|
2760
|
-
|
|
2761
|
-
# http body (model)
|
|
2762
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_sandbox_network_settings)
|
|
2763
|
-
|
|
2764
|
-
# return_type
|
|
2765
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
2766
|
-
|
|
2767
|
-
# auth_names
|
|
2768
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2769
|
-
|
|
2770
|
-
new_options = opts.merge(
|
|
2771
|
-
:operation => :"SandboxApi.update_network_settings",
|
|
1351
|
+
:operation => :"SandboxApi.stop_sandbox",
|
|
2772
1352
|
:header_params => header_params,
|
|
2773
1353
|
:query_params => query_params,
|
|
2774
1354
|
:form_params => form_params,
|
|
@@ -2779,50 +1359,48 @@ module DaytonaApiClient
|
|
|
2779
1359
|
|
|
2780
1360
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2781
1361
|
if @api_client.config.debugging
|
|
2782
|
-
@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}"
|
|
2783
1363
|
end
|
|
2784
1364
|
return data, status_code, headers
|
|
2785
1365
|
end
|
|
2786
1366
|
|
|
2787
1367
|
# Update public status
|
|
2788
|
-
# @param
|
|
1368
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2789
1369
|
# @param is_public [Boolean] Public status to set
|
|
2790
1370
|
# @param [Hash] opts the optional parameters
|
|
2791
1371
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2792
|
-
# @return [
|
|
2793
|
-
def update_public_status(
|
|
2794
|
-
|
|
2795
|
-
|
|
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
|
|
2796
1376
|
end
|
|
2797
1377
|
|
|
2798
1378
|
# Update public status
|
|
2799
|
-
# @param
|
|
1379
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2800
1380
|
# @param is_public [Boolean] Public status to set
|
|
2801
1381
|
# @param [Hash] opts the optional parameters
|
|
2802
1382
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2803
|
-
# @return [Array<(
|
|
2804
|
-
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 = {})
|
|
2805
1385
|
if @api_client.config.debugging
|
|
2806
1386
|
@api_client.config.logger.debug 'Calling API: SandboxApi.update_public_status ...'
|
|
2807
1387
|
end
|
|
2808
|
-
# verify the required parameter '
|
|
2809
|
-
if @api_client.config.client_side_validation &&
|
|
2810
|
-
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"
|
|
2811
1391
|
end
|
|
2812
1392
|
# verify the required parameter 'is_public' is set
|
|
2813
1393
|
if @api_client.config.client_side_validation && is_public.nil?
|
|
2814
1394
|
fail ArgumentError, "Missing the required parameter 'is_public' when calling SandboxApi.update_public_status"
|
|
2815
1395
|
end
|
|
2816
1396
|
# resource path
|
|
2817
|
-
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))
|
|
2818
1398
|
|
|
2819
1399
|
# query parameters
|
|
2820
1400
|
query_params = opts[:query_params] || {}
|
|
2821
1401
|
|
|
2822
1402
|
# header parameters
|
|
2823
1403
|
header_params = opts[:header_params] || {}
|
|
2824
|
-
# HTTP header 'Accept' (if needed)
|
|
2825
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2826
1404
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2827
1405
|
|
|
2828
1406
|
# form parameters
|
|
@@ -2832,7 +1410,7 @@ module DaytonaApiClient
|
|
|
2832
1410
|
post_body = opts[:debug_body]
|
|
2833
1411
|
|
|
2834
1412
|
# return_type
|
|
2835
|
-
return_type = opts[:debug_return_type]
|
|
1413
|
+
return_type = opts[:debug_return_type]
|
|
2836
1414
|
|
|
2837
1415
|
# auth_names
|
|
2838
1416
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
@@ -2894,7 +1472,7 @@ module DaytonaApiClient
|
|
|
2894
1472
|
# HTTP header 'Content-Type'
|
|
2895
1473
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2896
1474
|
if !content_type.nil?
|
|
2897
|
-
|
|
1475
|
+
header_params['Content-Type'] = content_type
|
|
2898
1476
|
end
|
|
2899
1477
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2900
1478
|
|