daytona_api_client 0.205.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 +4 -4
- data/lib/daytona_api_client/api/api_keys_api.rb +2 -2
- data/lib/daytona_api_client/api/audit_api.rb +98 -55
- 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 +310 -1846
- data/lib/daytona_api_client/api/preview_api.rb +8 -202
- data/lib/daytona_api_client/api/runners_api.rb +22 -470
- data/lib/daytona_api_client/api/sandbox_api.rb +434 -2354
- data/lib/daytona_api_client/api/snapshots_api.rb +113 -42
- data/lib/daytona_api_client/api/toolbox_api.rb +5108 -0
- data/lib/daytona_api_client/api/users_api.rb +153 -89
- 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/{create_runner_response.rb → command.rb} +104 -23
- data/lib/daytona_api_client/models/completion_context.rb +244 -0
- data/lib/daytona_api_client/models/completion_item.rb +289 -0
- data/lib/daytona_api_client/models/{paginated_traces.rb → completion_list.rb} +106 -91
- data/lib/daytona_api_client/models/compressed_screenshot_response.rb +256 -0
- data/lib/daytona_api_client/models/computer_use_start_response.rb +263 -0
- data/lib/daytona_api_client/models/{available_sandbox_class.rb → computer_use_status_response.rb} +97 -86
- data/lib/daytona_api_client/models/computer_use_stop_response.rb +263 -0
- 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 +78 -26
- 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 +117 -108
- data/lib/daytona_api_client/models/{signed_port_preview_url.rb → create_session_request.rb} +93 -103
- data/lib/daytona_api_client/models/create_snapshot.rb +88 -61
- data/lib/daytona_api_client/models/create_user.rb +97 -40
- 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 -96
- data/lib/daytona_api_client/models/{runner_service_health.rb → display_info_response.rb} +95 -59
- data/lib/daytona_api_client/models/docker_registry.rb +76 -5
- data/lib/daytona_api_client/models/{paginated_jobs.rb → download_files.rb} +94 -100
- data/lib/daytona_api_client/models/{create_warm_pool.rb → execute_request.rb} +106 -62
- data/lib/daytona_api_client/models/execute_response.rb +263 -0
- data/lib/daytona_api_client/models/file_info.rb +417 -0
- data/lib/daytona_api_client/models/{secret.rb → file_status.rb} +122 -121
- data/lib/daytona_api_client/models/git_add_request.rb +264 -0
- data/lib/daytona_api_client/models/{admin_create_organization.rb → git_branch_request.rb} +95 -53
- data/lib/daytona_api_client/models/git_checkout_request.rb +261 -0
- data/lib/daytona_api_client/models/{toolbox_proxy_url.rb → git_clone_request.rb} +142 -10
- data/lib/daytona_api_client/models/{trace_span.rb → git_commit_info.rb} +148 -141
- data/lib/daytona_api_client/models/git_commit_request.rb +325 -0
- data/lib/daytona_api_client/models/{runner_healthcheck.rb → git_commit_response.rb} +92 -74
- data/lib/daytona_api_client/models/{create_secret.rb → git_delete_branch_request.rb} +106 -59
- data/lib/daytona_api_client/models/{snapshot_manager_credentials.rb → git_repo_request.rb} +96 -35
- data/lib/daytona_api_client/models/git_status.rb +290 -0
- 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/{oidc_id_p_config_response.rb → keyboard_hotkey_request.rb} +93 -59
- data/lib/daytona_api_client/models/{create_region_response.rb → keyboard_press_request.rb} +102 -63
- data/lib/daytona_api_client/models/keyboard_type_request.rb +246 -0
- data/lib/daytona_api_client/models/list_branch_response.rb +237 -0
- data/lib/daytona_api_client/models/lsp_completion_params.rb +325 -0
- data/lib/daytona_api_client/models/lsp_document_request.rb +290 -0
- data/lib/daytona_api_client/models/lsp_location.rb +261 -0
- data/lib/daytona_api_client/models/lsp_server_request.rb +263 -0
- data/lib/daytona_api_client/models/{create_sandbox_snapshot.rb → lsp_symbol.rb} +132 -22
- data/lib/daytona_api_client/models/match.rb +287 -0
- data/lib/daytona_api_client/models/mouse_click_request.rb +283 -0
- data/lib/daytona_api_client/models/mouse_click_response.rb +263 -0
- data/lib/daytona_api_client/models/mouse_drag_request.rb +327 -0
- data/lib/daytona_api_client/models/mouse_drag_response.rb +263 -0
- data/lib/daytona_api_client/models/mouse_move_request.rb +263 -0
- data/lib/daytona_api_client/models/mouse_move_response.rb +263 -0
- data/lib/daytona_api_client/models/mouse_position.rb +263 -0
- data/lib/daytona_api_client/models/mouse_scroll_request.rb +300 -0
- data/lib/daytona_api_client/models/{test_identity_provider_connection_response.rb → mouse_scroll_response.rb} +81 -30
- data/lib/daytona_api_client/models/oidc_config.rb +74 -3
- data/lib/daytona_api_client/models/organization.rb +159 -270
- 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_logs.rb → paginated_snapshots_dto.rb} +77 -10
- data/lib/daytona_api_client/models/port_preview_url.rb +88 -34
- data/lib/daytona_api_client/models/position.rb +261 -0
- data/lib/daytona_api_client/models/posthog_config.rb +74 -3
- data/lib/daytona_api_client/models/process_errors_response.rb +263 -0
- data/lib/daytona_api_client/models/process_logs_response.rb +263 -0
- data/lib/daytona_api_client/models/process_restart_response.rb +263 -0
- data/lib/daytona_api_client/models/process_status_response.rb +263 -0
- data/lib/daytona_api_client/models/{update_last_activity.rb → project_dir_response.rb} +83 -13
- data/lib/daytona_api_client/models/{pending_sso_link.rb → pty_create_request.rb} +114 -109
- data/lib/daytona_api_client/models/pty_create_response.rb +236 -0
- data/lib/daytona_api_client/models/{metric_data_point.rb → pty_list_response.rb} +95 -49
- data/lib/daytona_api_client/models/pty_resize_request.rb +263 -0
- data/lib/daytona_api_client/models/pty_session_info.rb +425 -0
- data/lib/daytona_api_client/models/range.rb +261 -0
- data/lib/daytona_api_client/models/region.rb +78 -192
- data/lib/daytona_api_client/models/{regenerate_api_key_response.rb → region_screenshot_response.rb} +113 -22
- data/lib/daytona_api_client/models/registry_push_access_dto.rb +74 -3
- data/lib/daytona_api_client/models/replace_request.rb +289 -0
- data/lib/daytona_api_client/models/{oidc_id_p_config.rb → replace_result.rb} +95 -88
- data/lib/daytona_api_client/models/runner.rb +215 -155
- 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 +101 -206
- data/lib/daytona_api_client/models/sandbox_class.rb +6 -8
- data/lib/daytona_api_client/models/sandbox_desired_state.rb +3 -5
- data/lib/daytona_api_client/models/{create_region.rb → sandbox_info.rb} +113 -49
- data/lib/daytona_api_client/models/sandbox_labels.rb +74 -3
- data/lib/daytona_api_client/models/sandbox_state.rb +3 -10
- data/lib/daytona_api_client/models/sandbox_volume.rb +79 -18
- data/lib/daytona_api_client/models/screenshot_response.rb +256 -0
- data/lib/daytona_api_client/models/{audit_target_scenario.rb → search_files_response.rb} +95 -66
- data/lib/daytona_api_client/models/send_webhook_dto.rb +75 -26
- data/lib/daytona_api_client/models/session.rb +251 -0
- data/lib/daytona_api_client/models/{list_sandboxes_response.rb → session_execute_request.rb} +110 -34
- data/lib/daytona_api_client/models/{organization_sso_enabled.rb → session_execute_response.rb} +104 -30
- data/lib/daytona_api_client/models/set_snapshot_general_status_dto.rb +74 -3
- data/lib/daytona_api_client/models/snapshot_dto.rb +78 -84
- data/lib/daytona_api_client/models/snapshot_state.rb +6 -5
- 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 +78 -34
- 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 -131
- 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 +75 -41
- data/lib/daytona_api_client/models/{list_secrets_response.rb → user_home_dir_response.rb} +83 -72
- 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/{preview_warning.rb → webhook_controller_get_status200_response.rb} +76 -23
- data/lib/daytona_api_client/models/webhook_initialization_status.rb +74 -3
- data/lib/daytona_api_client/models/windows_response.rb +265 -0
- data/lib/daytona_api_client/models/{update_job_status.rb → work_dir_response.rb} +83 -72
- data/lib/daytona_api_client/models/{sandbox_list_item.rb → workspace.rb} +299 -222
- data/lib/daytona_api_client/version.rb +2 -2
- data/lib/daytona_api_client.rb +76 -87
- data/project.json +13 -38
- metadata +83 -98
- data/.gitignore +0 -39
- data/.openapi-generator/FILES +0 -176
- 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 -1618
- 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/secret_api.rb +0 -441
- data/lib/daytona_api_client/api/warm_pools_api.rb +0 -286
- 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/admin_get_webhook_status200_response.rb +0 -147
- data/lib/daytona_api_client/models/audit_scenarios.rb +0 -167
- data/lib/daytona_api_client/models/create_identity_provider.rb +0 -269
- data/lib/daytona_api_client/models/create_organization_region_quota.rb +0 -386
- data/lib/daytona_api_client/models/date_filter.rb +0 -178
- data/lib/daytona_api_client/models/fork_sandbox.rb +0 -148
- data/lib/daytona_api_client/models/gpu_type.rb +0 -44
- data/lib/daytona_api_client/models/identity_provider.rb +0 -439
- data/lib/daytona_api_client/models/int_filter.rb +0 -222
- 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 -55
- data/lib/daytona_api_client/models/log_entry.rb +0 -334
- 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/organization_preview_warning.rb +0 -165
- data/lib/daytona_api_client/models/otel_config.rb +0 -188
- data/lib/daytona_api_client/models/poll_jobs_response.rb +0 -167
- data/lib/daytona_api_client/models/rate_limit_config.rb +0 -188
- data/lib/daytona_api_client/models/rate_limit_entry.rb +0 -158
- data/lib/daytona_api_client/models/region_quota.rb +0 -453
- data/lib/daytona_api_client/models/region_type.rb +0 -42
- data/lib/daytona_api_client/models/region_usage_overview.rb +0 -518
- data/lib/daytona_api_client/models/resize_sandbox.rb +0 -225
- data/lib/daytona_api_client/models/resolve_sandbox_secrets200_response_inner.rb +0 -176
- data/lib/daytona_api_client/models/runner_class.rb +0 -40
- data/lib/daytona_api_client/models/runner_full.rb +0 -757
- data/lib/daytona_api_client/models/runner_health_metrics.rb +0 -482
- 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/sso_oidc_config.rb +0 -192
- data/lib/daytona_api_client/models/string_filter.rb +0 -182
- data/lib/daytona_api_client/models/test_identity_provider_connection.rb +0 -165
- data/lib/daytona_api_client/models/trace_summary.rb +0 -310
- data/lib/daytona_api_client/models/update_identity_provider.rb +0 -212
- data/lib/daytona_api_client/models/update_oidc_id_p_config.rb +0 -178
- 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 -313
- data/lib/daytona_api_client/models/update_region.rb +0 -182
- data/lib/daytona_api_client/models/update_sandbox_network_settings.rb +0 -168
- data/lib/daytona_api_client/models/update_sandbox_secrets.rb +0 -167
- data/lib/daytona_api_client/models/update_secret.rb +0 -170
- data/lib/daytona_api_client/models/update_warm_pool.rb +0 -174
- data/lib/daytona_api_client/models/url.rb +0 -165
- data/lib/daytona_api_client/models/warm_pool.rb +0 -490
- 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,32 +82,30 @@ module DaytonaApiClient
|
|
|
84
82
|
end
|
|
85
83
|
|
|
86
84
|
# Create sandbox backup
|
|
87
|
-
#
|
|
88
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
85
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
89
86
|
# @param [Hash] opts the optional parameters
|
|
90
87
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
91
88
|
# @return [Sandbox]
|
|
92
|
-
def create_backup(
|
|
93
|
-
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)
|
|
94
91
|
data
|
|
95
92
|
end
|
|
96
93
|
|
|
97
94
|
# Create sandbox backup
|
|
98
|
-
#
|
|
99
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
95
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
100
96
|
# @param [Hash] opts the optional parameters
|
|
101
97
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
102
98
|
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
103
|
-
def create_backup_with_http_info(
|
|
99
|
+
def create_backup_with_http_info(sandbox_id, opts = {})
|
|
104
100
|
if @api_client.config.debugging
|
|
105
101
|
@api_client.config.logger.debug 'Calling API: SandboxApi.create_backup ...'
|
|
106
102
|
end
|
|
107
|
-
# verify the required parameter '
|
|
108
|
-
if @api_client.config.client_side_validation &&
|
|
109
|
-
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"
|
|
110
106
|
end
|
|
111
107
|
# resource path
|
|
112
|
-
local_var_path = '/sandbox/{
|
|
108
|
+
local_var_path = '/sandbox/{sandboxId}/backup'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
113
109
|
|
|
114
110
|
# query parameters
|
|
115
111
|
query_params = opts[:query_params] || {}
|
|
@@ -185,7 +181,7 @@ module DaytonaApiClient
|
|
|
185
181
|
# HTTP header 'Content-Type'
|
|
186
182
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
187
183
|
if !content_type.nil?
|
|
188
|
-
|
|
184
|
+
header_params['Content-Type'] = content_type
|
|
189
185
|
end
|
|
190
186
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
191
187
|
|
|
@@ -218,108 +214,33 @@ module DaytonaApiClient
|
|
|
218
214
|
return data, status_code, headers
|
|
219
215
|
end
|
|
220
216
|
|
|
221
|
-
# Create a snapshot from a sandbox
|
|
222
|
-
# @param sandbox_id_or_name [String]
|
|
223
|
-
# @param create_sandbox_snapshot [CreateSandboxSnapshot]
|
|
224
|
-
# @param [Hash] opts the optional parameters
|
|
225
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
226
|
-
# @return [Sandbox]
|
|
227
|
-
def create_sandbox_snapshot(sandbox_id_or_name, create_sandbox_snapshot, opts = {})
|
|
228
|
-
data, _status_code, _headers = create_sandbox_snapshot_with_http_info(sandbox_id_or_name, create_sandbox_snapshot, opts)
|
|
229
|
-
data
|
|
230
|
-
end
|
|
231
|
-
|
|
232
|
-
# Create a snapshot from a sandbox
|
|
233
|
-
# @param sandbox_id_or_name [String]
|
|
234
|
-
# @param create_sandbox_snapshot [CreateSandboxSnapshot]
|
|
235
|
-
# @param [Hash] opts the optional parameters
|
|
236
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
237
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
238
|
-
def create_sandbox_snapshot_with_http_info(sandbox_id_or_name, create_sandbox_snapshot, opts = {})
|
|
239
|
-
if @api_client.config.debugging
|
|
240
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.create_sandbox_snapshot ...'
|
|
241
|
-
end
|
|
242
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
243
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
244
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.create_sandbox_snapshot"
|
|
245
|
-
end
|
|
246
|
-
# verify the required parameter 'create_sandbox_snapshot' is set
|
|
247
|
-
if @api_client.config.client_side_validation && create_sandbox_snapshot.nil?
|
|
248
|
-
fail ArgumentError, "Missing the required parameter 'create_sandbox_snapshot' when calling SandboxApi.create_sandbox_snapshot"
|
|
249
|
-
end
|
|
250
|
-
# resource path
|
|
251
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/snapshot'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
252
|
-
|
|
253
|
-
# query parameters
|
|
254
|
-
query_params = opts[:query_params] || {}
|
|
255
|
-
|
|
256
|
-
# header parameters
|
|
257
|
-
header_params = opts[:header_params] || {}
|
|
258
|
-
# HTTP header 'Accept' (if needed)
|
|
259
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
260
|
-
# HTTP header 'Content-Type'
|
|
261
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
262
|
-
if !content_type.nil?
|
|
263
|
-
header_params['Content-Type'] = content_type
|
|
264
|
-
end
|
|
265
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
266
|
-
|
|
267
|
-
# form parameters
|
|
268
|
-
form_params = opts[:form_params] || {}
|
|
269
|
-
|
|
270
|
-
# http body (model)
|
|
271
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_sandbox_snapshot)
|
|
272
|
-
|
|
273
|
-
# return_type
|
|
274
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
275
|
-
|
|
276
|
-
# auth_names
|
|
277
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
278
|
-
|
|
279
|
-
new_options = opts.merge(
|
|
280
|
-
:operation => :"SandboxApi.create_sandbox_snapshot",
|
|
281
|
-
:header_params => header_params,
|
|
282
|
-
:query_params => query_params,
|
|
283
|
-
:form_params => form_params,
|
|
284
|
-
:body => post_body,
|
|
285
|
-
:auth_names => auth_names,
|
|
286
|
-
:return_type => return_type
|
|
287
|
-
)
|
|
288
|
-
|
|
289
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
290
|
-
if @api_client.config.debugging
|
|
291
|
-
@api_client.config.logger.debug "API called: SandboxApi#create_sandbox_snapshot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
292
|
-
end
|
|
293
|
-
return data, status_code, headers
|
|
294
|
-
end
|
|
295
|
-
|
|
296
217
|
# Create SSH access for sandbox
|
|
297
|
-
# @param
|
|
218
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
298
219
|
# @param [Hash] opts the optional parameters
|
|
299
220
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
300
221
|
# @option opts [Float] :expires_in_minutes Expiration time in minutes (default: 60)
|
|
301
222
|
# @return [SshAccessDto]
|
|
302
|
-
def create_ssh_access(
|
|
303
|
-
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)
|
|
304
225
|
data
|
|
305
226
|
end
|
|
306
227
|
|
|
307
228
|
# Create SSH access for sandbox
|
|
308
|
-
# @param
|
|
229
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
309
230
|
# @param [Hash] opts the optional parameters
|
|
310
231
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
311
232
|
# @option opts [Float] :expires_in_minutes Expiration time in minutes (default: 60)
|
|
312
233
|
# @return [Array<(SshAccessDto, Integer, Hash)>] SshAccessDto data, response status code and response headers
|
|
313
|
-
def create_ssh_access_with_http_info(
|
|
234
|
+
def create_ssh_access_with_http_info(sandbox_id, opts = {})
|
|
314
235
|
if @api_client.config.debugging
|
|
315
236
|
@api_client.config.logger.debug 'Calling API: SandboxApi.create_ssh_access ...'
|
|
316
237
|
end
|
|
317
|
-
# verify the required parameter '
|
|
318
|
-
if @api_client.config.client_side_validation &&
|
|
319
|
-
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"
|
|
320
241
|
end
|
|
321
242
|
# resource path
|
|
322
|
-
local_var_path = '/sandbox/{
|
|
243
|
+
local_var_path = '/sandbox/{sandboxId}/ssh-access'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
323
244
|
|
|
324
245
|
# query parameters
|
|
325
246
|
query_params = opts[:query_params] || {}
|
|
@@ -361,38 +282,36 @@ module DaytonaApiClient
|
|
|
361
282
|
end
|
|
362
283
|
|
|
363
284
|
# Delete sandbox
|
|
364
|
-
# @param
|
|
285
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
365
286
|
# @param [Hash] opts the optional parameters
|
|
366
287
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
367
|
-
# @return [
|
|
368
|
-
def delete_sandbox(
|
|
369
|
-
|
|
370
|
-
|
|
288
|
+
# @return [nil]
|
|
289
|
+
def delete_sandbox(sandbox_id, opts = {})
|
|
290
|
+
delete_sandbox_with_http_info(sandbox_id, opts)
|
|
291
|
+
nil
|
|
371
292
|
end
|
|
372
293
|
|
|
373
294
|
# Delete sandbox
|
|
374
|
-
# @param
|
|
295
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
375
296
|
# @param [Hash] opts the optional parameters
|
|
376
297
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
377
|
-
# @return [Array<(
|
|
378
|
-
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 = {})
|
|
379
300
|
if @api_client.config.debugging
|
|
380
301
|
@api_client.config.logger.debug 'Calling API: SandboxApi.delete_sandbox ...'
|
|
381
302
|
end
|
|
382
|
-
# verify the required parameter '
|
|
383
|
-
if @api_client.config.client_side_validation &&
|
|
384
|
-
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"
|
|
385
306
|
end
|
|
386
307
|
# resource path
|
|
387
|
-
local_var_path = '/sandbox/{
|
|
308
|
+
local_var_path = '/sandbox/{sandboxId}'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
388
309
|
|
|
389
310
|
# query parameters
|
|
390
311
|
query_params = opts[:query_params] || {}
|
|
391
312
|
|
|
392
313
|
# header parameters
|
|
393
314
|
header_params = opts[:header_params] || {}
|
|
394
|
-
# HTTP header 'Accept' (if needed)
|
|
395
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
396
315
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
397
316
|
|
|
398
317
|
# form parameters
|
|
@@ -402,7 +321,7 @@ module DaytonaApiClient
|
|
|
402
321
|
post_body = opts[:debug_body]
|
|
403
322
|
|
|
404
323
|
# return_type
|
|
405
|
-
return_type = opts[:debug_return_type]
|
|
324
|
+
return_type = opts[:debug_return_type]
|
|
406
325
|
|
|
407
326
|
# auth_names
|
|
408
327
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
@@ -424,46 +343,37 @@ module DaytonaApiClient
|
|
|
424
343
|
return data, status_code, headers
|
|
425
344
|
end
|
|
426
345
|
|
|
427
|
-
#
|
|
428
|
-
# @param
|
|
429
|
-
# @param port [Integer] Port number to expire signed preview URL for
|
|
430
|
-
# @param token [String] Token to expire signed preview URL for
|
|
346
|
+
# Get build logs
|
|
347
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
431
348
|
# @param [Hash] opts the optional parameters
|
|
432
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
|
|
433
351
|
# @return [nil]
|
|
434
|
-
def
|
|
435
|
-
|
|
352
|
+
def get_build_logs(sandbox_id, opts = {})
|
|
353
|
+
get_build_logs_with_http_info(sandbox_id, opts)
|
|
436
354
|
nil
|
|
437
355
|
end
|
|
438
356
|
|
|
439
|
-
#
|
|
440
|
-
# @param
|
|
441
|
-
# @param port [Integer] Port number to expire signed preview URL for
|
|
442
|
-
# @param token [String] Token to expire signed preview URL for
|
|
357
|
+
# Get build logs
|
|
358
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
443
359
|
# @param [Hash] opts the optional parameters
|
|
444
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
|
|
445
362
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
446
|
-
def
|
|
363
|
+
def get_build_logs_with_http_info(sandbox_id, opts = {})
|
|
447
364
|
if @api_client.config.debugging
|
|
448
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
449
|
-
end
|
|
450
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
451
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
452
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.expire_signed_port_preview_url"
|
|
453
|
-
end
|
|
454
|
-
# verify the required parameter 'port' is set
|
|
455
|
-
if @api_client.config.client_side_validation && port.nil?
|
|
456
|
-
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 ...'
|
|
457
366
|
end
|
|
458
|
-
# verify the required parameter '
|
|
459
|
-
if @api_client.config.client_side_validation &&
|
|
460
|
-
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"
|
|
461
370
|
end
|
|
462
371
|
# resource path
|
|
463
|
-
local_var_path = '/sandbox/{
|
|
372
|
+
local_var_path = '/sandbox/{sandboxId}/build-logs'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
464
373
|
|
|
465
374
|
# query parameters
|
|
466
375
|
query_params = opts[:query_params] || {}
|
|
376
|
+
query_params[:'follow'] = opts[:'follow'] if !opts[:'follow'].nil?
|
|
467
377
|
|
|
468
378
|
# header parameters
|
|
469
379
|
header_params = opts[:header_params] || {}
|
|
@@ -482,7 +392,7 @@ module DaytonaApiClient
|
|
|
482
392
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
483
393
|
|
|
484
394
|
new_options = opts.merge(
|
|
485
|
-
:operation => :"SandboxApi.
|
|
395
|
+
:operation => :"SandboxApi.get_build_logs",
|
|
486
396
|
:header_params => header_params,
|
|
487
397
|
:query_params => query_params,
|
|
488
398
|
:form_params => form_params,
|
|
@@ -491,44 +401,44 @@ module DaytonaApiClient
|
|
|
491
401
|
:return_type => return_type
|
|
492
402
|
)
|
|
493
403
|
|
|
494
|
-
data, status_code, headers = @api_client.call_api(:
|
|
404
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
495
405
|
if @api_client.config.debugging
|
|
496
|
-
@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}"
|
|
497
407
|
end
|
|
498
408
|
return data, status_code, headers
|
|
499
409
|
end
|
|
500
410
|
|
|
501
|
-
#
|
|
502
|
-
# @param
|
|
503
|
-
# @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
|
|
504
414
|
# @param [Hash] opts the optional parameters
|
|
505
415
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
506
|
-
# @return [
|
|
507
|
-
def
|
|
508
|
-
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)
|
|
509
419
|
data
|
|
510
420
|
end
|
|
511
421
|
|
|
512
|
-
#
|
|
513
|
-
# @param
|
|
514
|
-
# @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
|
|
515
425
|
# @param [Hash] opts the optional parameters
|
|
516
426
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
517
|
-
# @return [Array<(
|
|
518
|
-
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 = {})
|
|
519
429
|
if @api_client.config.debugging
|
|
520
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
430
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.get_port_preview_url ...'
|
|
521
431
|
end
|
|
522
|
-
# verify the required parameter '
|
|
523
|
-
if @api_client.config.client_side_validation &&
|
|
524
|
-
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"
|
|
525
435
|
end
|
|
526
|
-
# verify the required parameter '
|
|
527
|
-
if @api_client.config.client_side_validation &&
|
|
528
|
-
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"
|
|
529
439
|
end
|
|
530
440
|
# resource path
|
|
531
|
-
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))
|
|
532
442
|
|
|
533
443
|
# query parameters
|
|
534
444
|
query_params = opts[:query_params] || {}
|
|
@@ -537,27 +447,22 @@ module DaytonaApiClient
|
|
|
537
447
|
header_params = opts[:header_params] || {}
|
|
538
448
|
# HTTP header 'Accept' (if needed)
|
|
539
449
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
540
|
-
# HTTP header 'Content-Type'
|
|
541
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
542
|
-
if !content_type.nil?
|
|
543
|
-
header_params['Content-Type'] = content_type
|
|
544
|
-
end
|
|
545
450
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
546
451
|
|
|
547
452
|
# form parameters
|
|
548
453
|
form_params = opts[:form_params] || {}
|
|
549
454
|
|
|
550
455
|
# http body (model)
|
|
551
|
-
post_body = opts[:debug_body]
|
|
456
|
+
post_body = opts[:debug_body]
|
|
552
457
|
|
|
553
458
|
# return_type
|
|
554
|
-
return_type = opts[:debug_return_type] || '
|
|
459
|
+
return_type = opts[:debug_return_type] || 'PortPreviewUrl'
|
|
555
460
|
|
|
556
461
|
# auth_names
|
|
557
462
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
558
463
|
|
|
559
464
|
new_options = opts.merge(
|
|
560
|
-
:operation => :"SandboxApi.
|
|
465
|
+
:operation => :"SandboxApi.get_port_preview_url",
|
|
561
466
|
:header_params => header_params,
|
|
562
467
|
:query_params => query_params,
|
|
563
468
|
:form_params => form_params,
|
|
@@ -566,49 +471,49 @@ module DaytonaApiClient
|
|
|
566
471
|
:return_type => return_type
|
|
567
472
|
)
|
|
568
473
|
|
|
569
|
-
data, status_code, headers = @api_client.call_api(:
|
|
474
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
570
475
|
if @api_client.config.debugging
|
|
571
|
-
@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}"
|
|
572
477
|
end
|
|
573
478
|
return data, status_code, headers
|
|
574
479
|
end
|
|
575
480
|
|
|
576
|
-
# Get
|
|
577
|
-
#
|
|
578
|
-
# @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
|
|
579
483
|
# @param [Hash] opts the optional parameters
|
|
580
484
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
581
|
-
# @option opts [Boolean] :
|
|
582
|
-
# @return [
|
|
583
|
-
def
|
|
584
|
-
|
|
585
|
-
|
|
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
|
|
586
490
|
end
|
|
587
491
|
|
|
588
|
-
# Get
|
|
589
|
-
#
|
|
590
|
-
# @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
|
|
591
494
|
# @param [Hash] opts the optional parameters
|
|
592
495
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
593
|
-
# @option opts [Boolean] :
|
|
594
|
-
# @return [Array<(
|
|
595
|
-
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 = {})
|
|
596
499
|
if @api_client.config.debugging
|
|
597
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
500
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox ...'
|
|
598
501
|
end
|
|
599
|
-
# verify the required parameter '
|
|
600
|
-
if @api_client.config.client_side_validation &&
|
|
601
|
-
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"
|
|
602
505
|
end
|
|
603
506
|
# resource path
|
|
604
|
-
local_var_path = '/sandbox/{
|
|
507
|
+
local_var_path = '/sandbox/{sandboxId}'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
605
508
|
|
|
606
509
|
# query parameters
|
|
607
510
|
query_params = opts[:query_params] || {}
|
|
608
|
-
query_params[:'
|
|
511
|
+
query_params[:'verbose'] = opts[:'verbose'] if !opts[:'verbose'].nil?
|
|
609
512
|
|
|
610
513
|
# header parameters
|
|
611
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']
|
|
612
517
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
613
518
|
|
|
614
519
|
# form parameters
|
|
@@ -618,13 +523,13 @@ module DaytonaApiClient
|
|
|
618
523
|
post_body = opts[:debug_body]
|
|
619
524
|
|
|
620
525
|
# return_type
|
|
621
|
-
return_type = opts[:debug_return_type]
|
|
526
|
+
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
622
527
|
|
|
623
528
|
# auth_names
|
|
624
529
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
625
530
|
|
|
626
531
|
new_options = opts.merge(
|
|
627
|
-
:operation => :"SandboxApi.
|
|
532
|
+
:operation => :"SandboxApi.get_sandbox",
|
|
628
533
|
:header_params => header_params,
|
|
629
534
|
:query_params => query_params,
|
|
630
535
|
:form_params => form_params,
|
|
@@ -635,36 +540,30 @@ module DaytonaApiClient
|
|
|
635
540
|
|
|
636
541
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
637
542
|
if @api_client.config.debugging
|
|
638
|
-
@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}"
|
|
639
544
|
end
|
|
640
545
|
return data, status_code, headers
|
|
641
546
|
end
|
|
642
547
|
|
|
643
|
-
#
|
|
644
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
548
|
+
# List all regions where sandboxes have been created
|
|
645
549
|
# @param [Hash] opts the optional parameters
|
|
646
550
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
647
|
-
# @return [
|
|
648
|
-
def
|
|
649
|
-
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)
|
|
650
554
|
data
|
|
651
555
|
end
|
|
652
556
|
|
|
653
|
-
#
|
|
654
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
557
|
+
# List all regions where sandboxes have been created
|
|
655
558
|
# @param [Hash] opts the optional parameters
|
|
656
559
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
657
|
-
# @return [Array<(
|
|
658
|
-
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 = {})
|
|
659
562
|
if @api_client.config.debugging
|
|
660
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
661
|
-
end
|
|
662
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
663
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
664
|
-
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 ...'
|
|
665
564
|
end
|
|
666
565
|
# resource path
|
|
667
|
-
local_var_path = '/sandbox/
|
|
566
|
+
local_var_path = '/sandbox/regions'
|
|
668
567
|
|
|
669
568
|
# query parameters
|
|
670
569
|
query_params = opts[:query_params] || {}
|
|
@@ -682,13 +581,13 @@ module DaytonaApiClient
|
|
|
682
581
|
post_body = opts[:debug_body]
|
|
683
582
|
|
|
684
583
|
# return_type
|
|
685
|
-
return_type = opts[:debug_return_type] || '
|
|
584
|
+
return_type = opts[:debug_return_type] || 'Array<Region>'
|
|
686
585
|
|
|
687
586
|
# auth_names
|
|
688
587
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
689
588
|
|
|
690
589
|
new_options = opts.merge(
|
|
691
|
-
:operation => :"SandboxApi.
|
|
590
|
+
:operation => :"SandboxApi.get_sandbox_regions",
|
|
692
591
|
:header_params => header_params,
|
|
693
592
|
:query_params => query_params,
|
|
694
593
|
:form_params => form_params,
|
|
@@ -699,39 +598,39 @@ module DaytonaApiClient
|
|
|
699
598
|
|
|
700
599
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
701
600
|
if @api_client.config.debugging
|
|
702
|
-
@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}"
|
|
703
602
|
end
|
|
704
603
|
return data, status_code, headers
|
|
705
604
|
end
|
|
706
605
|
|
|
707
|
-
# Get
|
|
708
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
606
|
+
# Get sandboxes for the authenticated runner
|
|
709
607
|
# @param [Hash] opts the optional parameters
|
|
710
608
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
711
|
-
# @
|
|
712
|
-
|
|
713
|
-
|
|
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)
|
|
714
614
|
data
|
|
715
615
|
end
|
|
716
616
|
|
|
717
|
-
# Get
|
|
718
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
617
|
+
# Get sandboxes for the authenticated runner
|
|
719
618
|
# @param [Hash] opts the optional parameters
|
|
720
619
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
721
|
-
# @
|
|
722
|
-
|
|
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 = {})
|
|
723
624
|
if @api_client.config.debugging
|
|
724
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
725
|
-
end
|
|
726
|
-
# verify the required parameter 'sandbox_id' is set
|
|
727
|
-
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
728
|
-
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 ...'
|
|
729
626
|
end
|
|
730
627
|
# resource path
|
|
731
|
-
local_var_path = '/sandbox/
|
|
628
|
+
local_var_path = '/sandbox/for-runner'
|
|
732
629
|
|
|
733
630
|
# query parameters
|
|
734
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?
|
|
735
634
|
|
|
736
635
|
# header parameters
|
|
737
636
|
header_params = opts[:header_params] || {}
|
|
@@ -746,13 +645,13 @@ module DaytonaApiClient
|
|
|
746
645
|
post_body = opts[:debug_body]
|
|
747
646
|
|
|
748
647
|
# return_type
|
|
749
|
-
return_type = opts[:debug_return_type] || '
|
|
648
|
+
return_type = opts[:debug_return_type] || 'Array<Sandbox>'
|
|
750
649
|
|
|
751
650
|
# auth_names
|
|
752
651
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
753
652
|
|
|
754
653
|
new_options = opts.merge(
|
|
755
|
-
:operation => :"SandboxApi.
|
|
654
|
+
:operation => :"SandboxApi.get_sandboxes_for_runner",
|
|
756
655
|
:header_params => header_params,
|
|
757
656
|
:query_params => query_params,
|
|
758
657
|
:form_params => form_params,
|
|
@@ -763,45 +662,42 @@ module DaytonaApiClient
|
|
|
763
662
|
|
|
764
663
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
765
664
|
if @api_client.config.debugging
|
|
766
|
-
@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}"
|
|
767
666
|
end
|
|
768
667
|
return data, status_code, headers
|
|
769
668
|
end
|
|
770
669
|
|
|
771
|
-
#
|
|
772
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
773
|
-
# @param port [Float] Port number to get preview URL for
|
|
670
|
+
# List all sandboxes
|
|
774
671
|
# @param [Hash] opts the optional parameters
|
|
775
672
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
776
|
-
# @
|
|
777
|
-
|
|
778
|
-
|
|
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)
|
|
779
679
|
data
|
|
780
680
|
end
|
|
781
681
|
|
|
782
|
-
#
|
|
783
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
784
|
-
# @param port [Float] Port number to get preview URL for
|
|
682
|
+
# List all sandboxes
|
|
785
683
|
# @param [Hash] opts the optional parameters
|
|
786
684
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
787
|
-
# @
|
|
788
|
-
|
|
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 = {})
|
|
789
690
|
if @api_client.config.debugging
|
|
790
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
791
|
-
end
|
|
792
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
793
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
794
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_port_preview_url"
|
|
795
|
-
end
|
|
796
|
-
# verify the required parameter 'port' is set
|
|
797
|
-
if @api_client.config.client_side_validation && port.nil?
|
|
798
|
-
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 ...'
|
|
799
692
|
end
|
|
800
693
|
# resource path
|
|
801
|
-
local_var_path = '/sandbox
|
|
694
|
+
local_var_path = '/sandbox'
|
|
802
695
|
|
|
803
696
|
# query parameters
|
|
804
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?
|
|
805
701
|
|
|
806
702
|
# header parameters
|
|
807
703
|
header_params = opts[:header_params] || {}
|
|
@@ -816,13 +712,13 @@ module DaytonaApiClient
|
|
|
816
712
|
post_body = opts[:debug_body]
|
|
817
713
|
|
|
818
714
|
# return_type
|
|
819
|
-
return_type = opts[:debug_return_type] || '
|
|
715
|
+
return_type = opts[:debug_return_type] || 'Array<Sandbox>'
|
|
820
716
|
|
|
821
717
|
# auth_names
|
|
822
718
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
823
719
|
|
|
824
720
|
new_options = opts.merge(
|
|
825
|
-
:operation => :"SandboxApi.
|
|
721
|
+
:operation => :"SandboxApi.list_sandboxes",
|
|
826
722
|
:header_params => header_params,
|
|
827
723
|
:query_params => query_params,
|
|
828
724
|
:form_params => form_params,
|
|
@@ -833,1923 +729,135 @@ module DaytonaApiClient
|
|
|
833
729
|
|
|
834
730
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
835
731
|
if @api_client.config.debugging
|
|
836
|
-
@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}"
|
|
837
733
|
end
|
|
838
734
|
return data, status_code, headers
|
|
839
735
|
end
|
|
840
736
|
|
|
841
|
-
#
|
|
842
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
737
|
+
# List all sandboxes paginated
|
|
843
738
|
# @param [Hash] opts the optional parameters
|
|
844
739
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
845
|
-
# @
|
|
846
|
-
|
|
847
|
-
|
|
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)
|
|
848
761
|
data
|
|
849
762
|
end
|
|
850
763
|
|
|
851
|
-
#
|
|
852
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
764
|
+
# List all sandboxes paginated
|
|
853
765
|
# @param [Hash] opts the optional parameters
|
|
854
766
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
855
|
-
# @
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
# form parameters
|
|
877
|
-
form_params = opts[:form_params] || {}
|
|
878
|
-
|
|
879
|
-
# http body (model)
|
|
880
|
-
post_body = opts[:debug_body]
|
|
881
|
-
|
|
882
|
-
# return_type
|
|
883
|
-
return_type = opts[:debug_return_type] || 'RegionQuota'
|
|
884
|
-
|
|
885
|
-
# auth_names
|
|
886
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
887
|
-
|
|
888
|
-
new_options = opts.merge(
|
|
889
|
-
:operation => :"SandboxApi.get_region_quota_by_sandbox_id",
|
|
890
|
-
:header_params => header_params,
|
|
891
|
-
:query_params => query_params,
|
|
892
|
-
:form_params => form_params,
|
|
893
|
-
:body => post_body,
|
|
894
|
-
:auth_names => auth_names,
|
|
895
|
-
:return_type => return_type
|
|
896
|
-
)
|
|
897
|
-
|
|
898
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
899
|
-
if @api_client.config.debugging
|
|
900
|
-
@api_client.config.logger.debug "API called: SandboxApi#get_region_quota_by_sandbox_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
901
|
-
end
|
|
902
|
-
return data, status_code, headers
|
|
903
|
-
end
|
|
904
|
-
|
|
905
|
-
# Get sandbox details
|
|
906
|
-
# Sandboxes destroyed by spot preemption remain retrievable for 24 hours so `spotEvictedAt` can be read.
|
|
907
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
908
|
-
# @param [Hash] opts the optional parameters
|
|
909
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
910
|
-
# @option opts [Boolean] :verbose Include verbose output
|
|
911
|
-
# @return [Sandbox]
|
|
912
|
-
def get_sandbox(sandbox_id_or_name, opts = {})
|
|
913
|
-
data, _status_code, _headers = get_sandbox_with_http_info(sandbox_id_or_name, opts)
|
|
914
|
-
data
|
|
915
|
-
end
|
|
916
|
-
|
|
917
|
-
# Get sandbox details
|
|
918
|
-
# Sandboxes destroyed by spot preemption remain retrievable for 24 hours so `spotEvictedAt` can be read.
|
|
919
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
920
|
-
# @param [Hash] opts the optional parameters
|
|
921
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
922
|
-
# @option opts [Boolean] :verbose Include verbose output
|
|
923
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
924
|
-
def get_sandbox_with_http_info(sandbox_id_or_name, opts = {})
|
|
925
|
-
if @api_client.config.debugging
|
|
926
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox ...'
|
|
927
|
-
end
|
|
928
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
929
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
930
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_sandbox"
|
|
931
|
-
end
|
|
932
|
-
# resource path
|
|
933
|
-
local_var_path = '/sandbox/{sandboxIdOrName}'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
934
|
-
|
|
935
|
-
# query parameters
|
|
936
|
-
query_params = opts[:query_params] || {}
|
|
937
|
-
query_params[:'verbose'] = opts[:'verbose'] if !opts[:'verbose'].nil?
|
|
938
|
-
|
|
939
|
-
# header parameters
|
|
940
|
-
header_params = opts[:header_params] || {}
|
|
941
|
-
# HTTP header 'Accept' (if needed)
|
|
942
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
943
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
944
|
-
|
|
945
|
-
# form parameters
|
|
946
|
-
form_params = opts[:form_params] || {}
|
|
947
|
-
|
|
948
|
-
# http body (model)
|
|
949
|
-
post_body = opts[:debug_body]
|
|
950
|
-
|
|
951
|
-
# return_type
|
|
952
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
953
|
-
|
|
954
|
-
# auth_names
|
|
955
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
956
|
-
|
|
957
|
-
new_options = opts.merge(
|
|
958
|
-
:operation => :"SandboxApi.get_sandbox",
|
|
959
|
-
:header_params => header_params,
|
|
960
|
-
:query_params => query_params,
|
|
961
|
-
:form_params => form_params,
|
|
962
|
-
:body => post_body,
|
|
963
|
-
:auth_names => auth_names,
|
|
964
|
-
:return_type => return_type
|
|
965
|
-
)
|
|
966
|
-
|
|
967
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
968
|
-
if @api_client.config.debugging
|
|
969
|
-
@api_client.config.logger.debug "API called: SandboxApi#get_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
970
|
-
end
|
|
971
|
-
return data, status_code, headers
|
|
972
|
-
end
|
|
973
|
-
|
|
974
|
-
# Get sandbox fork ancestor chain
|
|
975
|
-
# @param sandbox_id_or_name [String]
|
|
976
|
-
# @param [Hash] opts the optional parameters
|
|
977
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
978
|
-
# @return [Array<Sandbox>]
|
|
979
|
-
def get_sandbox_ancestors(sandbox_id_or_name, opts = {})
|
|
980
|
-
data, _status_code, _headers = get_sandbox_ancestors_with_http_info(sandbox_id_or_name, opts)
|
|
981
|
-
data
|
|
982
|
-
end
|
|
983
|
-
|
|
984
|
-
# Get sandbox fork ancestor chain
|
|
985
|
-
# @param sandbox_id_or_name [String]
|
|
986
|
-
# @param [Hash] opts the optional parameters
|
|
987
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
988
|
-
# @return [Array<(Array<Sandbox>, Integer, Hash)>] Array<Sandbox> data, response status code and response headers
|
|
989
|
-
def get_sandbox_ancestors_with_http_info(sandbox_id_or_name, opts = {})
|
|
990
|
-
if @api_client.config.debugging
|
|
991
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_ancestors ...'
|
|
992
|
-
end
|
|
993
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
994
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
995
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_sandbox_ancestors"
|
|
996
|
-
end
|
|
997
|
-
# resource path
|
|
998
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/ancestors'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
999
|
-
|
|
1000
|
-
# query parameters
|
|
1001
|
-
query_params = opts[:query_params] || {}
|
|
1002
|
-
|
|
1003
|
-
# header parameters
|
|
1004
|
-
header_params = opts[:header_params] || {}
|
|
1005
|
-
# HTTP header 'Accept' (if needed)
|
|
1006
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1007
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1008
|
-
|
|
1009
|
-
# form parameters
|
|
1010
|
-
form_params = opts[:form_params] || {}
|
|
1011
|
-
|
|
1012
|
-
# http body (model)
|
|
1013
|
-
post_body = opts[:debug_body]
|
|
1014
|
-
|
|
1015
|
-
# return_type
|
|
1016
|
-
return_type = opts[:debug_return_type] || 'Array<Sandbox>'
|
|
1017
|
-
|
|
1018
|
-
# auth_names
|
|
1019
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1020
|
-
|
|
1021
|
-
new_options = opts.merge(
|
|
1022
|
-
:operation => :"SandboxApi.get_sandbox_ancestors",
|
|
1023
|
-
:header_params => header_params,
|
|
1024
|
-
:query_params => query_params,
|
|
1025
|
-
:form_params => form_params,
|
|
1026
|
-
:body => post_body,
|
|
1027
|
-
:auth_names => auth_names,
|
|
1028
|
-
:return_type => return_type
|
|
1029
|
-
)
|
|
1030
|
-
|
|
1031
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1032
|
-
if @api_client.config.debugging
|
|
1033
|
-
@api_client.config.logger.debug "API called: SandboxApi#get_sandbox_ancestors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1034
|
-
end
|
|
1035
|
-
return data, status_code, headers
|
|
1036
|
-
end
|
|
1037
|
-
|
|
1038
|
-
# Get sandbox fork children
|
|
1039
|
-
# @param sandbox_id_or_name [String]
|
|
1040
|
-
# @param [Hash] opts the optional parameters
|
|
1041
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1042
|
-
# @option opts [Boolean] :include_destroyed
|
|
1043
|
-
# @return [Array<Sandbox>]
|
|
1044
|
-
def get_sandbox_forks(sandbox_id_or_name, opts = {})
|
|
1045
|
-
data, _status_code, _headers = get_sandbox_forks_with_http_info(sandbox_id_or_name, opts)
|
|
1046
|
-
data
|
|
1047
|
-
end
|
|
1048
|
-
|
|
1049
|
-
# Get sandbox fork children
|
|
1050
|
-
# @param sandbox_id_or_name [String]
|
|
1051
|
-
# @param [Hash] opts the optional parameters
|
|
1052
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1053
|
-
# @option opts [Boolean] :include_destroyed
|
|
1054
|
-
# @return [Array<(Array<Sandbox>, Integer, Hash)>] Array<Sandbox> data, response status code and response headers
|
|
1055
|
-
def get_sandbox_forks_with_http_info(sandbox_id_or_name, opts = {})
|
|
1056
|
-
if @api_client.config.debugging
|
|
1057
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_forks ...'
|
|
1058
|
-
end
|
|
1059
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
1060
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
1061
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_sandbox_forks"
|
|
1062
|
-
end
|
|
1063
|
-
# resource path
|
|
1064
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/forks'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
1065
|
-
|
|
1066
|
-
# query parameters
|
|
1067
|
-
query_params = opts[:query_params] || {}
|
|
1068
|
-
query_params[:'includeDestroyed'] = opts[:'include_destroyed'] if !opts[:'include_destroyed'].nil?
|
|
1069
|
-
|
|
1070
|
-
# header parameters
|
|
1071
|
-
header_params = opts[:header_params] || {}
|
|
1072
|
-
# HTTP header 'Accept' (if needed)
|
|
1073
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1074
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1075
|
-
|
|
1076
|
-
# form parameters
|
|
1077
|
-
form_params = opts[:form_params] || {}
|
|
1078
|
-
|
|
1079
|
-
# http body (model)
|
|
1080
|
-
post_body = opts[:debug_body]
|
|
1081
|
-
|
|
1082
|
-
# return_type
|
|
1083
|
-
return_type = opts[:debug_return_type] || 'Array<Sandbox>'
|
|
1084
|
-
|
|
1085
|
-
# auth_names
|
|
1086
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1087
|
-
|
|
1088
|
-
new_options = opts.merge(
|
|
1089
|
-
:operation => :"SandboxApi.get_sandbox_forks",
|
|
1090
|
-
:header_params => header_params,
|
|
1091
|
-
:query_params => query_params,
|
|
1092
|
-
:form_params => form_params,
|
|
1093
|
-
:body => post_body,
|
|
1094
|
-
:auth_names => auth_names,
|
|
1095
|
-
:return_type => return_type
|
|
1096
|
-
)
|
|
1097
|
-
|
|
1098
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1099
|
-
if @api_client.config.debugging
|
|
1100
|
-
@api_client.config.logger.debug "API called: SandboxApi#get_sandbox_forks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1101
|
-
end
|
|
1102
|
-
return data, status_code, headers
|
|
1103
|
-
end
|
|
1104
|
-
|
|
1105
|
-
# Get sandbox logs
|
|
1106
|
-
# Retrieve OTEL logs for a sandbox within a time range
|
|
1107
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
1108
|
-
# @param from [Time] Start of time range (ISO 8601)
|
|
1109
|
-
# @param to [Time] End of time range (ISO 8601)
|
|
1110
|
-
# @param [Hash] opts the optional parameters
|
|
1111
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1112
|
-
# @option opts [Float] :page Page number (1-indexed) (default to 1)
|
|
1113
|
-
# @option opts [Float] :limit Number of items per page (default to 100)
|
|
1114
|
-
# @option opts [Array<String>] :severities Filter by severity levels (DEBUG, INFO, WARN, ERROR)
|
|
1115
|
-
# @option opts [String] :search Search in log body
|
|
1116
|
-
# @return [PaginatedLogs]
|
|
1117
|
-
def get_sandbox_logs(sandbox_id, from, to, opts = {})
|
|
1118
|
-
data, _status_code, _headers = get_sandbox_logs_with_http_info(sandbox_id, from, to, opts)
|
|
1119
|
-
data
|
|
1120
|
-
end
|
|
1121
|
-
|
|
1122
|
-
# Get sandbox logs
|
|
1123
|
-
# Retrieve OTEL logs for a sandbox within a time range
|
|
1124
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
1125
|
-
# @param from [Time] Start of time range (ISO 8601)
|
|
1126
|
-
# @param to [Time] End of time range (ISO 8601)
|
|
1127
|
-
# @param [Hash] opts the optional parameters
|
|
1128
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1129
|
-
# @option opts [Float] :page Page number (1-indexed) (default to 1)
|
|
1130
|
-
# @option opts [Float] :limit Number of items per page (default to 100)
|
|
1131
|
-
# @option opts [Array<String>] :severities Filter by severity levels (DEBUG, INFO, WARN, ERROR)
|
|
1132
|
-
# @option opts [String] :search Search in log body
|
|
1133
|
-
# @return [Array<(PaginatedLogs, Integer, Hash)>] PaginatedLogs data, response status code and response headers
|
|
1134
|
-
def get_sandbox_logs_with_http_info(sandbox_id, from, to, opts = {})
|
|
1135
|
-
if @api_client.config.debugging
|
|
1136
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_logs ...'
|
|
1137
|
-
end
|
|
1138
|
-
# verify the required parameter 'sandbox_id' is set
|
|
1139
|
-
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
1140
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_sandbox_logs"
|
|
1141
|
-
end
|
|
1142
|
-
# verify the required parameter 'from' is set
|
|
1143
|
-
if @api_client.config.client_side_validation && from.nil?
|
|
1144
|
-
fail ArgumentError, "Missing the required parameter 'from' when calling SandboxApi.get_sandbox_logs"
|
|
1145
|
-
end
|
|
1146
|
-
# verify the required parameter 'to' is set
|
|
1147
|
-
if @api_client.config.client_side_validation && to.nil?
|
|
1148
|
-
fail ArgumentError, "Missing the required parameter 'to' when calling SandboxApi.get_sandbox_logs"
|
|
1149
|
-
end
|
|
1150
|
-
# resource path
|
|
1151
|
-
local_var_path = '/sandbox/{sandboxId}/telemetry/logs'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
1152
|
-
|
|
1153
|
-
# query parameters
|
|
1154
|
-
query_params = opts[:query_params] || {}
|
|
1155
|
-
query_params[:'from'] = from
|
|
1156
|
-
query_params[:'to'] = to
|
|
1157
|
-
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
1158
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1159
|
-
query_params[:'severities'] = @api_client.build_collection_param(opts[:'severities'], :multi) if !opts[:'severities'].nil?
|
|
1160
|
-
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
1161
|
-
|
|
1162
|
-
# header parameters
|
|
1163
|
-
header_params = opts[:header_params] || {}
|
|
1164
|
-
# HTTP header 'Accept' (if needed)
|
|
1165
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1166
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1167
|
-
|
|
1168
|
-
# form parameters
|
|
1169
|
-
form_params = opts[:form_params] || {}
|
|
1170
|
-
|
|
1171
|
-
# http body (model)
|
|
1172
|
-
post_body = opts[:debug_body]
|
|
1173
|
-
|
|
1174
|
-
# return_type
|
|
1175
|
-
return_type = opts[:debug_return_type] || 'PaginatedLogs'
|
|
1176
|
-
|
|
1177
|
-
# auth_names
|
|
1178
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1179
|
-
|
|
1180
|
-
new_options = opts.merge(
|
|
1181
|
-
:operation => :"SandboxApi.get_sandbox_logs",
|
|
1182
|
-
:header_params => header_params,
|
|
1183
|
-
:query_params => query_params,
|
|
1184
|
-
:form_params => form_params,
|
|
1185
|
-
:body => post_body,
|
|
1186
|
-
:auth_names => auth_names,
|
|
1187
|
-
:return_type => return_type
|
|
1188
|
-
)
|
|
1189
|
-
|
|
1190
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1191
|
-
if @api_client.config.debugging
|
|
1192
|
-
@api_client.config.logger.debug "API called: SandboxApi#get_sandbox_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1193
|
-
end
|
|
1194
|
-
return data, status_code, headers
|
|
1195
|
-
end
|
|
1196
|
-
|
|
1197
|
-
# Get sandbox metrics
|
|
1198
|
-
# Retrieve OTEL metrics for a sandbox within a time range
|
|
1199
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
1200
|
-
# @param from [Time] Start of time range (ISO 8601)
|
|
1201
|
-
# @param to [Time] End of time range (ISO 8601)
|
|
1202
|
-
# @param [Hash] opts the optional parameters
|
|
1203
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1204
|
-
# @option opts [Array<String>] :metric_names Filter by metric names
|
|
1205
|
-
# @return [MetricsResponse]
|
|
1206
|
-
def get_sandbox_metrics(sandbox_id, from, to, opts = {})
|
|
1207
|
-
data, _status_code, _headers = get_sandbox_metrics_with_http_info(sandbox_id, from, to, opts)
|
|
1208
|
-
data
|
|
1209
|
-
end
|
|
1210
|
-
|
|
1211
|
-
# Get sandbox metrics
|
|
1212
|
-
# Retrieve OTEL metrics for a sandbox within a time range
|
|
1213
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
1214
|
-
# @param from [Time] Start of time range (ISO 8601)
|
|
1215
|
-
# @param to [Time] End of time range (ISO 8601)
|
|
1216
|
-
# @param [Hash] opts the optional parameters
|
|
1217
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1218
|
-
# @option opts [Array<String>] :metric_names Filter by metric names
|
|
1219
|
-
# @return [Array<(MetricsResponse, Integer, Hash)>] MetricsResponse data, response status code and response headers
|
|
1220
|
-
def get_sandbox_metrics_with_http_info(sandbox_id, from, to, opts = {})
|
|
1221
|
-
if @api_client.config.debugging
|
|
1222
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_metrics ...'
|
|
1223
|
-
end
|
|
1224
|
-
# verify the required parameter 'sandbox_id' is set
|
|
1225
|
-
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
1226
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_sandbox_metrics"
|
|
1227
|
-
end
|
|
1228
|
-
# verify the required parameter 'from' is set
|
|
1229
|
-
if @api_client.config.client_side_validation && from.nil?
|
|
1230
|
-
fail ArgumentError, "Missing the required parameter 'from' when calling SandboxApi.get_sandbox_metrics"
|
|
1231
|
-
end
|
|
1232
|
-
# verify the required parameter 'to' is set
|
|
1233
|
-
if @api_client.config.client_side_validation && to.nil?
|
|
1234
|
-
fail ArgumentError, "Missing the required parameter 'to' when calling SandboxApi.get_sandbox_metrics"
|
|
1235
|
-
end
|
|
1236
|
-
# resource path
|
|
1237
|
-
local_var_path = '/sandbox/{sandboxId}/telemetry/metrics'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
1238
|
-
|
|
1239
|
-
# query parameters
|
|
1240
|
-
query_params = opts[:query_params] || {}
|
|
1241
|
-
query_params[:'from'] = from
|
|
1242
|
-
query_params[:'to'] = to
|
|
1243
|
-
query_params[:'metricNames'] = @api_client.build_collection_param(opts[:'metric_names'], :multi) if !opts[:'metric_names'].nil?
|
|
1244
|
-
|
|
1245
|
-
# header parameters
|
|
1246
|
-
header_params = opts[:header_params] || {}
|
|
1247
|
-
# HTTP header 'Accept' (if needed)
|
|
1248
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1249
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1250
|
-
|
|
1251
|
-
# form parameters
|
|
1252
|
-
form_params = opts[:form_params] || {}
|
|
1253
|
-
|
|
1254
|
-
# http body (model)
|
|
1255
|
-
post_body = opts[:debug_body]
|
|
1256
|
-
|
|
1257
|
-
# return_type
|
|
1258
|
-
return_type = opts[:debug_return_type] || 'MetricsResponse'
|
|
1259
|
-
|
|
1260
|
-
# auth_names
|
|
1261
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1262
|
-
|
|
1263
|
-
new_options = opts.merge(
|
|
1264
|
-
:operation => :"SandboxApi.get_sandbox_metrics",
|
|
1265
|
-
:header_params => header_params,
|
|
1266
|
-
:query_params => query_params,
|
|
1267
|
-
:form_params => form_params,
|
|
1268
|
-
:body => post_body,
|
|
1269
|
-
:auth_names => auth_names,
|
|
1270
|
-
:return_type => return_type
|
|
1271
|
-
)
|
|
1272
|
-
|
|
1273
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1274
|
-
if @api_client.config.debugging
|
|
1275
|
-
@api_client.config.logger.debug "API called: SandboxApi#get_sandbox_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1276
|
-
end
|
|
1277
|
-
return data, status_code, headers
|
|
1278
|
-
end
|
|
1279
|
-
|
|
1280
|
-
# Get sandbox fork parent
|
|
1281
|
-
# @param sandbox_id_or_name [String]
|
|
1282
|
-
# @param [Hash] opts the optional parameters
|
|
1283
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1284
|
-
# @return [Sandbox]
|
|
1285
|
-
def get_sandbox_parent(sandbox_id_or_name, opts = {})
|
|
1286
|
-
data, _status_code, _headers = get_sandbox_parent_with_http_info(sandbox_id_or_name, opts)
|
|
1287
|
-
data
|
|
1288
|
-
end
|
|
1289
|
-
|
|
1290
|
-
# Get sandbox fork parent
|
|
1291
|
-
# @param sandbox_id_or_name [String]
|
|
1292
|
-
# @param [Hash] opts the optional parameters
|
|
1293
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1294
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
1295
|
-
def get_sandbox_parent_with_http_info(sandbox_id_or_name, opts = {})
|
|
1296
|
-
if @api_client.config.debugging
|
|
1297
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_parent ...'
|
|
1298
|
-
end
|
|
1299
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
1300
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
1301
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_sandbox_parent"
|
|
1302
|
-
end
|
|
1303
|
-
# resource path
|
|
1304
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/parent'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
1305
|
-
|
|
1306
|
-
# query parameters
|
|
1307
|
-
query_params = opts[:query_params] || {}
|
|
1308
|
-
|
|
1309
|
-
# header parameters
|
|
1310
|
-
header_params = opts[:header_params] || {}
|
|
1311
|
-
# HTTP header 'Accept' (if needed)
|
|
1312
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1313
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1314
|
-
|
|
1315
|
-
# form parameters
|
|
1316
|
-
form_params = opts[:form_params] || {}
|
|
1317
|
-
|
|
1318
|
-
# http body (model)
|
|
1319
|
-
post_body = opts[:debug_body]
|
|
1320
|
-
|
|
1321
|
-
# return_type
|
|
1322
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
1323
|
-
|
|
1324
|
-
# auth_names
|
|
1325
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1326
|
-
|
|
1327
|
-
new_options = opts.merge(
|
|
1328
|
-
:operation => :"SandboxApi.get_sandbox_parent",
|
|
1329
|
-
:header_params => header_params,
|
|
1330
|
-
:query_params => query_params,
|
|
1331
|
-
:form_params => form_params,
|
|
1332
|
-
:body => post_body,
|
|
1333
|
-
:auth_names => auth_names,
|
|
1334
|
-
:return_type => return_type
|
|
1335
|
-
)
|
|
1336
|
-
|
|
1337
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1338
|
-
if @api_client.config.debugging
|
|
1339
|
-
@api_client.config.logger.debug "API called: SandboxApi#get_sandbox_parent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1340
|
-
end
|
|
1341
|
-
return data, status_code, headers
|
|
1342
|
-
end
|
|
1343
|
-
|
|
1344
|
-
# Get the signing key for a sandbox
|
|
1345
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
1346
|
-
# @param [Hash] opts the optional parameters
|
|
1347
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1348
|
-
# @return [String]
|
|
1349
|
-
def get_sandbox_signing_key(sandbox_id, opts = {})
|
|
1350
|
-
data, _status_code, _headers = get_sandbox_signing_key_with_http_info(sandbox_id, opts)
|
|
1351
|
-
data
|
|
1352
|
-
end
|
|
1353
|
-
|
|
1354
|
-
# Get the signing key for a sandbox
|
|
1355
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
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<(String, Integer, Hash)>] String data, response status code and response headers
|
|
1359
|
-
def get_sandbox_signing_key_with_http_info(sandbox_id, opts = {})
|
|
1360
|
-
if @api_client.config.debugging
|
|
1361
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_signing_key ...'
|
|
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_signing_key"
|
|
1366
|
-
end
|
|
1367
|
-
# resource path
|
|
1368
|
-
local_var_path = '/sandbox/{sandboxId}/signing-key'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
1369
|
-
|
|
1370
|
-
# query parameters
|
|
1371
|
-
query_params = opts[:query_params] || {}
|
|
1372
|
-
|
|
1373
|
-
# header parameters
|
|
1374
|
-
header_params = opts[:header_params] || {}
|
|
1375
|
-
# HTTP header 'Accept' (if needed)
|
|
1376
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1377
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1378
|
-
|
|
1379
|
-
# form parameters
|
|
1380
|
-
form_params = opts[:form_params] || {}
|
|
1381
|
-
|
|
1382
|
-
# http body (model)
|
|
1383
|
-
post_body = opts[:debug_body]
|
|
1384
|
-
|
|
1385
|
-
# return_type
|
|
1386
|
-
return_type = opts[:debug_return_type] || 'String'
|
|
1387
|
-
|
|
1388
|
-
# auth_names
|
|
1389
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1390
|
-
|
|
1391
|
-
new_options = opts.merge(
|
|
1392
|
-
:operation => :"SandboxApi.get_sandbox_signing_key",
|
|
1393
|
-
:header_params => header_params,
|
|
1394
|
-
:query_params => query_params,
|
|
1395
|
-
:form_params => form_params,
|
|
1396
|
-
:body => post_body,
|
|
1397
|
-
:auth_names => auth_names,
|
|
1398
|
-
:return_type => return_type
|
|
1399
|
-
)
|
|
1400
|
-
|
|
1401
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1402
|
-
if @api_client.config.debugging
|
|
1403
|
-
@api_client.config.logger.debug "API called: SandboxApi#get_sandbox_signing_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1404
|
-
end
|
|
1405
|
-
return data, status_code, headers
|
|
1406
|
-
end
|
|
1407
|
-
|
|
1408
|
-
# Get trace spans
|
|
1409
|
-
# Retrieve all spans for a specific trace
|
|
1410
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
1411
|
-
# @param trace_id [String] ID of the trace
|
|
1412
|
-
# @param [Hash] opts the optional parameters
|
|
1413
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1414
|
-
# @return [Array<TraceSpan>]
|
|
1415
|
-
def get_sandbox_trace_spans(sandbox_id, trace_id, opts = {})
|
|
1416
|
-
data, _status_code, _headers = get_sandbox_trace_spans_with_http_info(sandbox_id, trace_id, opts)
|
|
1417
|
-
data
|
|
1418
|
-
end
|
|
1419
|
-
|
|
1420
|
-
# Get trace spans
|
|
1421
|
-
# Retrieve all spans for a specific trace
|
|
1422
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
1423
|
-
# @param trace_id [String] ID of the trace
|
|
1424
|
-
# @param [Hash] opts the optional parameters
|
|
1425
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1426
|
-
# @return [Array<(Array<TraceSpan>, Integer, Hash)>] Array<TraceSpan> data, response status code and response headers
|
|
1427
|
-
def get_sandbox_trace_spans_with_http_info(sandbox_id, trace_id, opts = {})
|
|
1428
|
-
if @api_client.config.debugging
|
|
1429
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_trace_spans ...'
|
|
1430
|
-
end
|
|
1431
|
-
# verify the required parameter 'sandbox_id' is set
|
|
1432
|
-
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
1433
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_sandbox_trace_spans"
|
|
1434
|
-
end
|
|
1435
|
-
# verify the required parameter 'trace_id' is set
|
|
1436
|
-
if @api_client.config.client_side_validation && trace_id.nil?
|
|
1437
|
-
fail ArgumentError, "Missing the required parameter 'trace_id' when calling SandboxApi.get_sandbox_trace_spans"
|
|
1438
|
-
end
|
|
1439
|
-
# resource path
|
|
1440
|
-
local_var_path = '/sandbox/{sandboxId}/telemetry/traces/{traceId}'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s)).sub('{' + 'traceId' + '}', CGI.escape(trace_id.to_s))
|
|
1441
|
-
|
|
1442
|
-
# query parameters
|
|
1443
|
-
query_params = opts[:query_params] || {}
|
|
1444
|
-
|
|
1445
|
-
# header parameters
|
|
1446
|
-
header_params = opts[:header_params] || {}
|
|
1447
|
-
# HTTP header 'Accept' (if needed)
|
|
1448
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1449
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1450
|
-
|
|
1451
|
-
# form parameters
|
|
1452
|
-
form_params = opts[:form_params] || {}
|
|
1453
|
-
|
|
1454
|
-
# http body (model)
|
|
1455
|
-
post_body = opts[:debug_body]
|
|
1456
|
-
|
|
1457
|
-
# return_type
|
|
1458
|
-
return_type = opts[:debug_return_type] || 'Array<TraceSpan>'
|
|
1459
|
-
|
|
1460
|
-
# auth_names
|
|
1461
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1462
|
-
|
|
1463
|
-
new_options = opts.merge(
|
|
1464
|
-
:operation => :"SandboxApi.get_sandbox_trace_spans",
|
|
1465
|
-
:header_params => header_params,
|
|
1466
|
-
:query_params => query_params,
|
|
1467
|
-
:form_params => form_params,
|
|
1468
|
-
:body => post_body,
|
|
1469
|
-
:auth_names => auth_names,
|
|
1470
|
-
:return_type => return_type
|
|
1471
|
-
)
|
|
1472
|
-
|
|
1473
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1474
|
-
if @api_client.config.debugging
|
|
1475
|
-
@api_client.config.logger.debug "API called: SandboxApi#get_sandbox_trace_spans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1476
|
-
end
|
|
1477
|
-
return data, status_code, headers
|
|
1478
|
-
end
|
|
1479
|
-
|
|
1480
|
-
# Get sandbox traces
|
|
1481
|
-
# Retrieve OTEL traces for a sandbox within a time range
|
|
1482
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
1483
|
-
# @param from [Time] Start of time range (ISO 8601)
|
|
1484
|
-
# @param to [Time] End of time range (ISO 8601)
|
|
1485
|
-
# @param [Hash] opts the optional parameters
|
|
1486
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1487
|
-
# @option opts [Float] :page Page number (1-indexed) (default to 1)
|
|
1488
|
-
# @option opts [Float] :limit Number of items per page (default to 100)
|
|
1489
|
-
# @return [PaginatedTraces]
|
|
1490
|
-
def get_sandbox_traces(sandbox_id, from, to, opts = {})
|
|
1491
|
-
data, _status_code, _headers = get_sandbox_traces_with_http_info(sandbox_id, from, to, opts)
|
|
1492
|
-
data
|
|
1493
|
-
end
|
|
1494
|
-
|
|
1495
|
-
# Get sandbox traces
|
|
1496
|
-
# Retrieve OTEL traces for a sandbox within a time range
|
|
1497
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
1498
|
-
# @param from [Time] Start of time range (ISO 8601)
|
|
1499
|
-
# @param to [Time] End of time range (ISO 8601)
|
|
1500
|
-
# @param [Hash] opts the optional parameters
|
|
1501
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1502
|
-
# @option opts [Float] :page Page number (1-indexed) (default to 1)
|
|
1503
|
-
# @option opts [Float] :limit Number of items per page (default to 100)
|
|
1504
|
-
# @return [Array<(PaginatedTraces, Integer, Hash)>] PaginatedTraces data, response status code and response headers
|
|
1505
|
-
def get_sandbox_traces_with_http_info(sandbox_id, from, to, opts = {})
|
|
1506
|
-
if @api_client.config.debugging
|
|
1507
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox_traces ...'
|
|
1508
|
-
end
|
|
1509
|
-
# verify the required parameter 'sandbox_id' is set
|
|
1510
|
-
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
1511
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_sandbox_traces"
|
|
1512
|
-
end
|
|
1513
|
-
# verify the required parameter 'from' is set
|
|
1514
|
-
if @api_client.config.client_side_validation && from.nil?
|
|
1515
|
-
fail ArgumentError, "Missing the required parameter 'from' when calling SandboxApi.get_sandbox_traces"
|
|
1516
|
-
end
|
|
1517
|
-
# verify the required parameter 'to' is set
|
|
1518
|
-
if @api_client.config.client_side_validation && to.nil?
|
|
1519
|
-
fail ArgumentError, "Missing the required parameter 'to' when calling SandboxApi.get_sandbox_traces"
|
|
1520
|
-
end
|
|
1521
|
-
# resource path
|
|
1522
|
-
local_var_path = '/sandbox/{sandboxId}/telemetry/traces'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
1523
|
-
|
|
1524
|
-
# query parameters
|
|
1525
|
-
query_params = opts[:query_params] || {}
|
|
1526
|
-
query_params[:'from'] = from
|
|
1527
|
-
query_params[:'to'] = to
|
|
1528
|
-
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
1529
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1530
|
-
|
|
1531
|
-
# header parameters
|
|
1532
|
-
header_params = opts[:header_params] || {}
|
|
1533
|
-
# HTTP header 'Accept' (if needed)
|
|
1534
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1535
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1536
|
-
|
|
1537
|
-
# form parameters
|
|
1538
|
-
form_params = opts[:form_params] || {}
|
|
1539
|
-
|
|
1540
|
-
# http body (model)
|
|
1541
|
-
post_body = opts[:debug_body]
|
|
1542
|
-
|
|
1543
|
-
# return_type
|
|
1544
|
-
return_type = opts[:debug_return_type] || 'PaginatedTraces'
|
|
1545
|
-
|
|
1546
|
-
# auth_names
|
|
1547
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1548
|
-
|
|
1549
|
-
new_options = opts.merge(
|
|
1550
|
-
:operation => :"SandboxApi.get_sandbox_traces",
|
|
1551
|
-
:header_params => header_params,
|
|
1552
|
-
:query_params => query_params,
|
|
1553
|
-
:form_params => form_params,
|
|
1554
|
-
:body => post_body,
|
|
1555
|
-
:auth_names => auth_names,
|
|
1556
|
-
:return_type => return_type
|
|
1557
|
-
)
|
|
1558
|
-
|
|
1559
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1560
|
-
if @api_client.config.debugging
|
|
1561
|
-
@api_client.config.logger.debug "API called: SandboxApi#get_sandbox_traces\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1562
|
-
end
|
|
1563
|
-
return data, status_code, headers
|
|
1564
|
-
end
|
|
1565
|
-
|
|
1566
|
-
# Get sandboxes for the authenticated runner
|
|
1567
|
-
# @param [Hash] opts the optional parameters
|
|
1568
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1569
|
-
# @option opts [String] :states Comma-separated list of sandbox states to filter by
|
|
1570
|
-
# @option opts [Boolean] :skip_reconciling_sandboxes Skip sandboxes where state differs from desired state
|
|
1571
|
-
# @return [Array<Sandbox>]
|
|
1572
|
-
def get_sandboxes_for_runner(opts = {})
|
|
1573
|
-
data, _status_code, _headers = get_sandboxes_for_runner_with_http_info(opts)
|
|
1574
|
-
data
|
|
1575
|
-
end
|
|
1576
|
-
|
|
1577
|
-
# Get sandboxes for the authenticated runner
|
|
1578
|
-
# @param [Hash] opts the optional parameters
|
|
1579
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1580
|
-
# @option opts [String] :states Comma-separated list of sandbox states to filter by
|
|
1581
|
-
# @option opts [Boolean] :skip_reconciling_sandboxes Skip sandboxes where state differs from desired state
|
|
1582
|
-
# @return [Array<(Array<Sandbox>, Integer, Hash)>] Array<Sandbox> data, response status code and response headers
|
|
1583
|
-
def get_sandboxes_for_runner_with_http_info(opts = {})
|
|
1584
|
-
if @api_client.config.debugging
|
|
1585
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandboxes_for_runner ...'
|
|
1586
|
-
end
|
|
1587
|
-
# resource path
|
|
1588
|
-
local_var_path = '/sandbox/for-runner'
|
|
1589
|
-
|
|
1590
|
-
# query parameters
|
|
1591
|
-
query_params = opts[:query_params] || {}
|
|
1592
|
-
query_params[:'states'] = opts[:'states'] if !opts[:'states'].nil?
|
|
1593
|
-
query_params[:'skipReconcilingSandboxes'] = opts[:'skip_reconciling_sandboxes'] if !opts[:'skip_reconciling_sandboxes'].nil?
|
|
1594
|
-
|
|
1595
|
-
# header parameters
|
|
1596
|
-
header_params = opts[:header_params] || {}
|
|
1597
|
-
# HTTP header 'Accept' (if needed)
|
|
1598
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1599
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1600
|
-
|
|
1601
|
-
# form parameters
|
|
1602
|
-
form_params = opts[:form_params] || {}
|
|
1603
|
-
|
|
1604
|
-
# http body (model)
|
|
1605
|
-
post_body = opts[:debug_body]
|
|
1606
|
-
|
|
1607
|
-
# return_type
|
|
1608
|
-
return_type = opts[:debug_return_type] || 'Array<Sandbox>'
|
|
1609
|
-
|
|
1610
|
-
# auth_names
|
|
1611
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1612
|
-
|
|
1613
|
-
new_options = opts.merge(
|
|
1614
|
-
:operation => :"SandboxApi.get_sandboxes_for_runner",
|
|
1615
|
-
:header_params => header_params,
|
|
1616
|
-
:query_params => query_params,
|
|
1617
|
-
:form_params => form_params,
|
|
1618
|
-
:body => post_body,
|
|
1619
|
-
:auth_names => auth_names,
|
|
1620
|
-
:return_type => return_type
|
|
1621
|
-
)
|
|
1622
|
-
|
|
1623
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1624
|
-
if @api_client.config.debugging
|
|
1625
|
-
@api_client.config.logger.debug "API called: SandboxApi#get_sandboxes_for_runner\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1626
|
-
end
|
|
1627
|
-
return data, status_code, headers
|
|
1628
|
-
end
|
|
1629
|
-
|
|
1630
|
-
# Get signed preview URL for a sandbox port
|
|
1631
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
1632
|
-
# @param port [Integer] Port number to get signed preview URL for
|
|
1633
|
-
# @param [Hash] opts the optional parameters
|
|
1634
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1635
|
-
# @option opts [Integer] :expires_in_seconds Expiration time in seconds (default: 60 seconds)
|
|
1636
|
-
# @return [SignedPortPreviewUrl]
|
|
1637
|
-
def get_signed_port_preview_url(sandbox_id_or_name, port, opts = {})
|
|
1638
|
-
data, _status_code, _headers = get_signed_port_preview_url_with_http_info(sandbox_id_or_name, port, opts)
|
|
1639
|
-
data
|
|
1640
|
-
end
|
|
1641
|
-
|
|
1642
|
-
# Get signed preview URL for a sandbox port
|
|
1643
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
1644
|
-
# @param port [Integer] Port number to get signed preview URL for
|
|
1645
|
-
# @param [Hash] opts the optional parameters
|
|
1646
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1647
|
-
# @option opts [Integer] :expires_in_seconds Expiration time in seconds (default: 60 seconds)
|
|
1648
|
-
# @return [Array<(SignedPortPreviewUrl, Integer, Hash)>] SignedPortPreviewUrl data, response status code and response headers
|
|
1649
|
-
def get_signed_port_preview_url_with_http_info(sandbox_id_or_name, port, opts = {})
|
|
1650
|
-
if @api_client.config.debugging
|
|
1651
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.get_signed_port_preview_url ...'
|
|
1652
|
-
end
|
|
1653
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
1654
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
1655
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_signed_port_preview_url"
|
|
1656
|
-
end
|
|
1657
|
-
# verify the required parameter 'port' is set
|
|
1658
|
-
if @api_client.config.client_side_validation && port.nil?
|
|
1659
|
-
fail ArgumentError, "Missing the required parameter 'port' when calling SandboxApi.get_signed_port_preview_url"
|
|
1660
|
-
end
|
|
1661
|
-
# resource path
|
|
1662
|
-
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))
|
|
1663
|
-
|
|
1664
|
-
# query parameters
|
|
1665
|
-
query_params = opts[:query_params] || {}
|
|
1666
|
-
query_params[:'expiresInSeconds'] = opts[:'expires_in_seconds'] if !opts[:'expires_in_seconds'].nil?
|
|
1667
|
-
|
|
1668
|
-
# header parameters
|
|
1669
|
-
header_params = opts[:header_params] || {}
|
|
1670
|
-
# HTTP header 'Accept' (if needed)
|
|
1671
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1672
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1673
|
-
|
|
1674
|
-
# form parameters
|
|
1675
|
-
form_params = opts[:form_params] || {}
|
|
1676
|
-
|
|
1677
|
-
# http body (model)
|
|
1678
|
-
post_body = opts[:debug_body]
|
|
1679
|
-
|
|
1680
|
-
# return_type
|
|
1681
|
-
return_type = opts[:debug_return_type] || 'SignedPortPreviewUrl'
|
|
1682
|
-
|
|
1683
|
-
# auth_names
|
|
1684
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1685
|
-
|
|
1686
|
-
new_options = opts.merge(
|
|
1687
|
-
:operation => :"SandboxApi.get_signed_port_preview_url",
|
|
1688
|
-
:header_params => header_params,
|
|
1689
|
-
:query_params => query_params,
|
|
1690
|
-
:form_params => form_params,
|
|
1691
|
-
:body => post_body,
|
|
1692
|
-
:auth_names => auth_names,
|
|
1693
|
-
:return_type => return_type
|
|
1694
|
-
)
|
|
1695
|
-
|
|
1696
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1697
|
-
if @api_client.config.debugging
|
|
1698
|
-
@api_client.config.logger.debug "API called: SandboxApi#get_signed_port_preview_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1699
|
-
end
|
|
1700
|
-
return data, status_code, headers
|
|
1701
|
-
end
|
|
1702
|
-
|
|
1703
|
-
# Get toolbox proxy URL for a sandbox
|
|
1704
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
1705
|
-
# @param [Hash] opts the optional parameters
|
|
1706
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1707
|
-
# @return [ToolboxProxyUrl]
|
|
1708
|
-
def get_toolbox_proxy_url(sandbox_id, opts = {})
|
|
1709
|
-
data, _status_code, _headers = get_toolbox_proxy_url_with_http_info(sandbox_id, opts)
|
|
1710
|
-
data
|
|
1711
|
-
end
|
|
1712
|
-
|
|
1713
|
-
# Get toolbox proxy URL for a sandbox
|
|
1714
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
1715
|
-
# @param [Hash] opts the optional parameters
|
|
1716
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1717
|
-
# @return [Array<(ToolboxProxyUrl, Integer, Hash)>] ToolboxProxyUrl data, response status code and response headers
|
|
1718
|
-
def get_toolbox_proxy_url_with_http_info(sandbox_id, opts = {})
|
|
1719
|
-
if @api_client.config.debugging
|
|
1720
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.get_toolbox_proxy_url ...'
|
|
1721
|
-
end
|
|
1722
|
-
# verify the required parameter 'sandbox_id' is set
|
|
1723
|
-
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
1724
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_toolbox_proxy_url"
|
|
1725
|
-
end
|
|
1726
|
-
# resource path
|
|
1727
|
-
local_var_path = '/sandbox/{sandboxId}/toolbox-proxy-url'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
1728
|
-
|
|
1729
|
-
# query parameters
|
|
1730
|
-
query_params = opts[:query_params] || {}
|
|
1731
|
-
|
|
1732
|
-
# header parameters
|
|
1733
|
-
header_params = opts[:header_params] || {}
|
|
1734
|
-
# HTTP header 'Accept' (if needed)
|
|
1735
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1736
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1737
|
-
|
|
1738
|
-
# form parameters
|
|
1739
|
-
form_params = opts[:form_params] || {}
|
|
1740
|
-
|
|
1741
|
-
# http body (model)
|
|
1742
|
-
post_body = opts[:debug_body]
|
|
1743
|
-
|
|
1744
|
-
# return_type
|
|
1745
|
-
return_type = opts[:debug_return_type] || 'ToolboxProxyUrl'
|
|
1746
|
-
|
|
1747
|
-
# auth_names
|
|
1748
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1749
|
-
|
|
1750
|
-
new_options = opts.merge(
|
|
1751
|
-
:operation => :"SandboxApi.get_toolbox_proxy_url",
|
|
1752
|
-
:header_params => header_params,
|
|
1753
|
-
:query_params => query_params,
|
|
1754
|
-
:form_params => form_params,
|
|
1755
|
-
:body => post_body,
|
|
1756
|
-
:auth_names => auth_names,
|
|
1757
|
-
:return_type => return_type
|
|
1758
|
-
)
|
|
1759
|
-
|
|
1760
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1761
|
-
if @api_client.config.debugging
|
|
1762
|
-
@api_client.config.logger.debug "API called: SandboxApi#get_toolbox_proxy_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1763
|
-
end
|
|
1764
|
-
return data, status_code, headers
|
|
1765
|
-
end
|
|
1766
|
-
|
|
1767
|
-
# List sandboxes
|
|
1768
|
-
# Advanced filtering and ordering. Eventually consistent.
|
|
1769
|
-
# @param [Hash] opts the optional parameters
|
|
1770
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1771
|
-
# @option opts [String] :cursor Pagination cursor from a previous response
|
|
1772
|
-
# @option opts [Float] :limit Number of results per page (default to 100)
|
|
1773
|
-
# @option opts [String] :id Filter by ID prefix (case-insensitive)
|
|
1774
|
-
# @option opts [String] :name Filter by name prefix (case-insensitive)
|
|
1775
|
-
# @option opts [String] :labels JSON encoded labels to filter by
|
|
1776
|
-
# @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
|
|
1777
|
-
# @option opts [Boolean] :include_warm Include unclaimed warm pool sandboxes (excluded by default) (default to false)
|
|
1778
|
-
# @option opts [Array<SandboxState>] :states List of states to filter by.
|
|
1779
|
-
# @option opts [Array<String>] :snapshots List of snapshot names to filter by
|
|
1780
|
-
# @option opts [Array<String>] :region_ids List of regions IDs to filter by
|
|
1781
|
-
# @option opts [Array<SandboxClass>] :sandbox_classes List of sandbox classes to filter by
|
|
1782
|
-
# @option opts [Float] :min_cpu Minimum CPU
|
|
1783
|
-
# @option opts [Float] :max_cpu Maximum CPU
|
|
1784
|
-
# @option opts [Float] :min_memory_gi_b Minimum memory in GiB
|
|
1785
|
-
# @option opts [Float] :max_memory_gi_b Maximum memory in GiB
|
|
1786
|
-
# @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
|
|
1787
|
-
# @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
|
|
1788
|
-
# @option opts [Boolean] :is_public Filter by public status
|
|
1789
|
-
# @option opts [Boolean] :is_recoverable Filter by recoverable status
|
|
1790
|
-
# @option opts [Time] :created_at_after Include items created after this timestamp
|
|
1791
|
-
# @option opts [Time] :created_at_before Include items created before this timestamp
|
|
1792
|
-
# @option opts [Time] :last_event_after Include items with last event after this timestamp
|
|
1793
|
-
# @option opts [Time] :last_event_before Include items with last event before this timestamp
|
|
1794
|
-
# @option opts [Time] :auto_destroy_at_after Include items scheduled for auto destroy after this timestamp
|
|
1795
|
-
# @option opts [Time] :auto_destroy_at_before Include items scheduled for auto destroy before this timestamp
|
|
1796
|
-
# @option opts [SandboxListSortField] :sort Field to sort by
|
|
1797
|
-
# @option opts [SandboxListSortDirection] :order Direction to sort by
|
|
1798
|
-
# @return [ListSandboxesResponse]
|
|
1799
|
-
def list_sandboxes(opts = {})
|
|
1800
|
-
data, _status_code, _headers = list_sandboxes_with_http_info(opts)
|
|
1801
|
-
data
|
|
1802
|
-
end
|
|
1803
|
-
|
|
1804
|
-
# List sandboxes
|
|
1805
|
-
# Advanced filtering and ordering. Eventually consistent.
|
|
1806
|
-
# @param [Hash] opts the optional parameters
|
|
1807
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1808
|
-
# @option opts [String] :cursor Pagination cursor from a previous response
|
|
1809
|
-
# @option opts [Float] :limit Number of results per page (default to 100)
|
|
1810
|
-
# @option opts [String] :id Filter by ID prefix (case-insensitive)
|
|
1811
|
-
# @option opts [String] :name Filter by name prefix (case-insensitive)
|
|
1812
|
-
# @option opts [String] :labels JSON encoded labels to filter by
|
|
1813
|
-
# @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
|
|
1814
|
-
# @option opts [Boolean] :include_warm Include unclaimed warm pool sandboxes (excluded by default) (default to false)
|
|
1815
|
-
# @option opts [Array<SandboxState>] :states List of states to filter by.
|
|
1816
|
-
# @option opts [Array<String>] :snapshots List of snapshot names to filter by
|
|
1817
|
-
# @option opts [Array<String>] :region_ids List of regions IDs to filter by
|
|
1818
|
-
# @option opts [Array<SandboxClass>] :sandbox_classes List of sandbox classes to filter by
|
|
1819
|
-
# @option opts [Float] :min_cpu Minimum CPU
|
|
1820
|
-
# @option opts [Float] :max_cpu Maximum CPU
|
|
1821
|
-
# @option opts [Float] :min_memory_gi_b Minimum memory in GiB
|
|
1822
|
-
# @option opts [Float] :max_memory_gi_b Maximum memory in GiB
|
|
1823
|
-
# @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
|
|
1824
|
-
# @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
|
|
1825
|
-
# @option opts [Boolean] :is_public Filter by public status
|
|
1826
|
-
# @option opts [Boolean] :is_recoverable Filter by recoverable status
|
|
1827
|
-
# @option opts [Time] :created_at_after Include items created after this timestamp
|
|
1828
|
-
# @option opts [Time] :created_at_before Include items created before this timestamp
|
|
1829
|
-
# @option opts [Time] :last_event_after Include items with last event after this timestamp
|
|
1830
|
-
# @option opts [Time] :last_event_before Include items with last event before this timestamp
|
|
1831
|
-
# @option opts [Time] :auto_destroy_at_after Include items scheduled for auto destroy after this timestamp
|
|
1832
|
-
# @option opts [Time] :auto_destroy_at_before Include items scheduled for auto destroy before this timestamp
|
|
1833
|
-
# @option opts [SandboxListSortField] :sort Field to sort by
|
|
1834
|
-
# @option opts [SandboxListSortDirection] :order Direction to sort by
|
|
1835
|
-
# @return [Array<(ListSandboxesResponse, Integer, Hash)>] ListSandboxesResponse data, response status code and response headers
|
|
1836
|
-
def list_sandboxes_with_http_info(opts = {})
|
|
1837
|
-
if @api_client.config.debugging
|
|
1838
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.list_sandboxes ...'
|
|
1839
|
-
end
|
|
1840
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
|
|
1841
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes, must be smaller than or equal to 200.'
|
|
1842
|
-
end
|
|
1843
|
-
|
|
1844
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
1845
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
|
|
1846
|
-
end
|
|
1847
|
-
|
|
1848
|
-
if @api_client.config.client_side_validation && !opts[:'min_cpu'].nil? && opts[:'min_cpu'] < 1
|
|
1849
|
-
fail ArgumentError, 'invalid value for "opts[:"min_cpu"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
|
|
1850
|
-
end
|
|
1851
|
-
|
|
1852
|
-
if @api_client.config.client_side_validation && !opts[:'max_cpu'].nil? && opts[:'max_cpu'] < 1
|
|
1853
|
-
fail ArgumentError, 'invalid value for "opts[:"max_cpu"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
|
|
1854
|
-
end
|
|
1855
|
-
|
|
1856
|
-
if @api_client.config.client_side_validation && !opts[:'min_memory_gi_b'].nil? && opts[:'min_memory_gi_b'] < 1
|
|
1857
|
-
fail ArgumentError, 'invalid value for "opts[:"min_memory_gi_b"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
|
|
1858
|
-
end
|
|
1859
|
-
|
|
1860
|
-
if @api_client.config.client_side_validation && !opts[:'max_memory_gi_b'].nil? && opts[:'max_memory_gi_b'] < 1
|
|
1861
|
-
fail ArgumentError, 'invalid value for "opts[:"max_memory_gi_b"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
|
|
1862
|
-
end
|
|
1863
|
-
|
|
1864
|
-
if @api_client.config.client_side_validation && !opts[:'min_disk_gi_b'].nil? && opts[:'min_disk_gi_b'] < 1
|
|
1865
|
-
fail ArgumentError, 'invalid value for "opts[:"min_disk_gi_b"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
|
|
1866
|
-
end
|
|
1867
|
-
|
|
1868
|
-
if @api_client.config.client_side_validation && !opts[:'max_disk_gi_b'].nil? && opts[:'max_disk_gi_b'] < 1
|
|
1869
|
-
fail ArgumentError, 'invalid value for "opts[:"max_disk_gi_b"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
|
|
1870
|
-
end
|
|
1871
|
-
|
|
1872
|
-
# resource path
|
|
1873
|
-
local_var_path = '/sandbox'
|
|
1874
|
-
|
|
1875
|
-
# query parameters
|
|
1876
|
-
query_params = opts[:query_params] || {}
|
|
1877
|
-
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
1878
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1879
|
-
query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
|
|
1880
|
-
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
1881
|
-
query_params[:'labels'] = opts[:'labels'] if !opts[:'labels'].nil?
|
|
1882
|
-
query_params[:'includeErroredDeleted'] = opts[:'include_errored_deleted'] if !opts[:'include_errored_deleted'].nil?
|
|
1883
|
-
query_params[:'includeWarm'] = opts[:'include_warm'] if !opts[:'include_warm'].nil?
|
|
1884
|
-
query_params[:'states'] = @api_client.build_collection_param(opts[:'states'], :multi) if !opts[:'states'].nil?
|
|
1885
|
-
query_params[:'snapshots'] = @api_client.build_collection_param(opts[:'snapshots'], :multi) if !opts[:'snapshots'].nil?
|
|
1886
|
-
query_params[:'regionIds'] = @api_client.build_collection_param(opts[:'region_ids'], :multi) if !opts[:'region_ids'].nil?
|
|
1887
|
-
query_params[:'sandboxClasses'] = @api_client.build_collection_param(opts[:'sandbox_classes'], :multi) if !opts[:'sandbox_classes'].nil?
|
|
1888
|
-
query_params[:'minCpu'] = opts[:'min_cpu'] if !opts[:'min_cpu'].nil?
|
|
1889
|
-
query_params[:'maxCpu'] = opts[:'max_cpu'] if !opts[:'max_cpu'].nil?
|
|
1890
|
-
query_params[:'minMemoryGiB'] = opts[:'min_memory_gi_b'] if !opts[:'min_memory_gi_b'].nil?
|
|
1891
|
-
query_params[:'maxMemoryGiB'] = opts[:'max_memory_gi_b'] if !opts[:'max_memory_gi_b'].nil?
|
|
1892
|
-
query_params[:'minDiskGiB'] = opts[:'min_disk_gi_b'] if !opts[:'min_disk_gi_b'].nil?
|
|
1893
|
-
query_params[:'maxDiskGiB'] = opts[:'max_disk_gi_b'] if !opts[:'max_disk_gi_b'].nil?
|
|
1894
|
-
query_params[:'isPublic'] = opts[:'is_public'] if !opts[:'is_public'].nil?
|
|
1895
|
-
query_params[:'isRecoverable'] = opts[:'is_recoverable'] if !opts[:'is_recoverable'].nil?
|
|
1896
|
-
query_params[:'createdAtAfter'] = opts[:'created_at_after'] if !opts[:'created_at_after'].nil?
|
|
1897
|
-
query_params[:'createdAtBefore'] = opts[:'created_at_before'] if !opts[:'created_at_before'].nil?
|
|
1898
|
-
query_params[:'lastEventAfter'] = opts[:'last_event_after'] if !opts[:'last_event_after'].nil?
|
|
1899
|
-
query_params[:'lastEventBefore'] = opts[:'last_event_before'] if !opts[:'last_event_before'].nil?
|
|
1900
|
-
query_params[:'autoDestroyAtAfter'] = opts[:'auto_destroy_at_after'] if !opts[:'auto_destroy_at_after'].nil?
|
|
1901
|
-
query_params[:'autoDestroyAtBefore'] = opts[:'auto_destroy_at_before'] if !opts[:'auto_destroy_at_before'].nil?
|
|
1902
|
-
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
1903
|
-
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
|
1904
|
-
|
|
1905
|
-
# header parameters
|
|
1906
|
-
header_params = opts[:header_params] || {}
|
|
1907
|
-
# HTTP header 'Accept' (if needed)
|
|
1908
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1909
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1910
|
-
|
|
1911
|
-
# form parameters
|
|
1912
|
-
form_params = opts[:form_params] || {}
|
|
1913
|
-
|
|
1914
|
-
# http body (model)
|
|
1915
|
-
post_body = opts[:debug_body]
|
|
1916
|
-
|
|
1917
|
-
# return_type
|
|
1918
|
-
return_type = opts[:debug_return_type] || 'ListSandboxesResponse'
|
|
1919
|
-
|
|
1920
|
-
# auth_names
|
|
1921
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1922
|
-
|
|
1923
|
-
new_options = opts.merge(
|
|
1924
|
-
:operation => :"SandboxApi.list_sandboxes",
|
|
1925
|
-
:header_params => header_params,
|
|
1926
|
-
:query_params => query_params,
|
|
1927
|
-
:form_params => form_params,
|
|
1928
|
-
:body => post_body,
|
|
1929
|
-
:auth_names => auth_names,
|
|
1930
|
-
:return_type => return_type
|
|
1931
|
-
)
|
|
1932
|
-
|
|
1933
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1934
|
-
if @api_client.config.debugging
|
|
1935
|
-
@api_client.config.logger.debug "API called: SandboxApi#list_sandboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1936
|
-
end
|
|
1937
|
-
return data, status_code, headers
|
|
1938
|
-
end
|
|
1939
|
-
|
|
1940
|
-
# [DEPRECATED] List all sandboxes paginated
|
|
1941
|
-
# @param [Hash] opts the optional parameters
|
|
1942
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1943
|
-
# @option opts [Float] :page Page number of the results (default to 1)
|
|
1944
|
-
# @option opts [Float] :limit Number of results per page (default to 100)
|
|
1945
|
-
# @option opts [String] :id Filter by partial ID match
|
|
1946
|
-
# @option opts [String] :name Filter by partial name match
|
|
1947
|
-
# @option opts [String] :labels JSON encoded labels to filter by
|
|
1948
|
-
# @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
|
|
1949
|
-
# @option opts [Array<String>] :states List of states to filter by
|
|
1950
|
-
# @option opts [Array<String>] :snapshots List of snapshot names to filter by
|
|
1951
|
-
# @option opts [Array<String>] :regions List of regions to filter by
|
|
1952
|
-
# @option opts [Float] :min_cpu Minimum CPU
|
|
1953
|
-
# @option opts [Float] :max_cpu Maximum CPU
|
|
1954
|
-
# @option opts [Float] :min_memory_gi_b Minimum memory in GiB
|
|
1955
|
-
# @option opts [Float] :max_memory_gi_b Maximum memory in GiB
|
|
1956
|
-
# @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
|
|
1957
|
-
# @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
|
|
1958
|
-
# @option opts [Time] :last_event_after Include items with last event after this timestamp
|
|
1959
|
-
# @option opts [Time] :last_event_before Include items with last event before this timestamp
|
|
1960
|
-
# @option opts [String] :sort Field to sort by (default to 'createdAt')
|
|
1961
|
-
# @option opts [String] :order Direction to sort by (default to 'desc')
|
|
1962
|
-
# @return [PaginatedSandboxesDeprecated]
|
|
1963
|
-
def list_sandboxes_paginated_deprecated(opts = {})
|
|
1964
|
-
data, _status_code, _headers = list_sandboxes_paginated_deprecated_with_http_info(opts)
|
|
1965
|
-
data
|
|
1966
|
-
end
|
|
1967
|
-
|
|
1968
|
-
# [DEPRECATED] List all sandboxes paginated
|
|
1969
|
-
# @param [Hash] opts the optional parameters
|
|
1970
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1971
|
-
# @option opts [Float] :page Page number of the results (default to 1)
|
|
1972
|
-
# @option opts [Float] :limit Number of results per page (default to 100)
|
|
1973
|
-
# @option opts [String] :id Filter by partial ID match
|
|
1974
|
-
# @option opts [String] :name Filter by partial name match
|
|
1975
|
-
# @option opts [String] :labels JSON encoded labels to filter by
|
|
1976
|
-
# @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
|
|
1977
|
-
# @option opts [Array<String>] :states List of states to filter by
|
|
1978
|
-
# @option opts [Array<String>] :snapshots List of snapshot names to filter by
|
|
1979
|
-
# @option opts [Array<String>] :regions List of regions to filter by
|
|
1980
|
-
# @option opts [Float] :min_cpu Minimum CPU
|
|
1981
|
-
# @option opts [Float] :max_cpu Maximum CPU
|
|
1982
|
-
# @option opts [Float] :min_memory_gi_b Minimum memory in GiB
|
|
1983
|
-
# @option opts [Float] :max_memory_gi_b Maximum memory in GiB
|
|
1984
|
-
# @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
|
|
1985
|
-
# @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
|
|
1986
|
-
# @option opts [Time] :last_event_after Include items with last event after this timestamp
|
|
1987
|
-
# @option opts [Time] :last_event_before Include items with last event before this timestamp
|
|
1988
|
-
# @option opts [String] :sort Field to sort by (default to 'createdAt')
|
|
1989
|
-
# @option opts [String] :order Direction to sort by (default to 'desc')
|
|
1990
|
-
# @return [Array<(PaginatedSandboxesDeprecated, Integer, Hash)>] PaginatedSandboxesDeprecated data, response status code and response headers
|
|
1991
|
-
def list_sandboxes_paginated_deprecated_with_http_info(opts = {})
|
|
1992
|
-
if @api_client.config.debugging
|
|
1993
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.list_sandboxes_paginated_deprecated ...'
|
|
1994
|
-
end
|
|
1995
|
-
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
1996
|
-
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
|
|
1997
|
-
end
|
|
1998
|
-
|
|
1999
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
|
|
2000
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be smaller than or equal to 200.'
|
|
2001
|
-
end
|
|
2002
|
-
|
|
2003
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
2004
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
|
|
2005
|
-
end
|
|
2006
|
-
|
|
2007
|
-
allowable_values = ["creating", "restoring", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving", "resizing", "snapshotting", "forking", "pausing", "paused", "resuming", "unknown_default_open_api"]
|
|
2008
|
-
if @api_client.config.client_side_validation && opts[:'states'] && !opts[:'states'].all? { |item| allowable_values.include?(item) }
|
|
2009
|
-
fail ArgumentError, "invalid value for \"states\", must include one of #{allowable_values}"
|
|
2010
|
-
end
|
|
2011
|
-
if @api_client.config.client_side_validation && !opts[:'min_cpu'].nil? && opts[:'min_cpu'] < 1
|
|
2012
|
-
fail ArgumentError, 'invalid value for "opts[:"min_cpu"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
|
|
2013
|
-
end
|
|
2014
|
-
|
|
2015
|
-
if @api_client.config.client_side_validation && !opts[:'max_cpu'].nil? && opts[:'max_cpu'] < 1
|
|
2016
|
-
fail ArgumentError, 'invalid value for "opts[:"max_cpu"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
|
|
2017
|
-
end
|
|
2018
|
-
|
|
2019
|
-
if @api_client.config.client_side_validation && !opts[:'min_memory_gi_b'].nil? && opts[:'min_memory_gi_b'] < 1
|
|
2020
|
-
fail ArgumentError, 'invalid value for "opts[:"min_memory_gi_b"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
|
|
2021
|
-
end
|
|
2022
|
-
|
|
2023
|
-
if @api_client.config.client_side_validation && !opts[:'max_memory_gi_b'].nil? && opts[:'max_memory_gi_b'] < 1
|
|
2024
|
-
fail ArgumentError, 'invalid value for "opts[:"max_memory_gi_b"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
|
|
2025
|
-
end
|
|
2026
|
-
|
|
2027
|
-
if @api_client.config.client_side_validation && !opts[:'min_disk_gi_b'].nil? && opts[:'min_disk_gi_b'] < 1
|
|
2028
|
-
fail ArgumentError, 'invalid value for "opts[:"min_disk_gi_b"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
|
|
2029
|
-
end
|
|
2030
|
-
|
|
2031
|
-
if @api_client.config.client_side_validation && !opts[:'max_disk_gi_b'].nil? && opts[:'max_disk_gi_b'] < 1
|
|
2032
|
-
fail ArgumentError, 'invalid value for "opts[:"max_disk_gi_b"]" when calling SandboxApi.list_sandboxes_paginated_deprecated, must be greater than or equal to 1.'
|
|
2033
|
-
end
|
|
2034
|
-
|
|
2035
|
-
allowable_values = ["id", "name", "state", "snapshot", "region", "updatedAt", "createdAt", "lastActivityAt", "unknown_default_open_api"]
|
|
2036
|
-
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
|
2037
|
-
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
|
2038
|
-
end
|
|
2039
|
-
allowable_values = ["asc", "desc", "unknown_default_open_api"]
|
|
2040
|
-
if @api_client.config.client_side_validation && opts[:'order'] && !allowable_values.include?(opts[:'order'])
|
|
2041
|
-
fail ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
|
|
2042
|
-
end
|
|
2043
|
-
# resource path
|
|
2044
|
-
local_var_path = '/sandbox/paginated'
|
|
2045
|
-
|
|
2046
|
-
# query parameters
|
|
2047
|
-
query_params = opts[:query_params] || {}
|
|
2048
|
-
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
2049
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
2050
|
-
query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
|
|
2051
|
-
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
2052
|
-
query_params[:'labels'] = opts[:'labels'] if !opts[:'labels'].nil?
|
|
2053
|
-
query_params[:'includeErroredDeleted'] = opts[:'include_errored_deleted'] if !opts[:'include_errored_deleted'].nil?
|
|
2054
|
-
query_params[:'states'] = @api_client.build_collection_param(opts[:'states'], :multi) if !opts[:'states'].nil?
|
|
2055
|
-
query_params[:'snapshots'] = @api_client.build_collection_param(opts[:'snapshots'], :multi) if !opts[:'snapshots'].nil?
|
|
2056
|
-
query_params[:'regions'] = @api_client.build_collection_param(opts[:'regions'], :multi) if !opts[:'regions'].nil?
|
|
2057
|
-
query_params[:'minCpu'] = opts[:'min_cpu'] if !opts[:'min_cpu'].nil?
|
|
2058
|
-
query_params[:'maxCpu'] = opts[:'max_cpu'] if !opts[:'max_cpu'].nil?
|
|
2059
|
-
query_params[:'minMemoryGiB'] = opts[:'min_memory_gi_b'] if !opts[:'min_memory_gi_b'].nil?
|
|
2060
|
-
query_params[:'maxMemoryGiB'] = opts[:'max_memory_gi_b'] if !opts[:'max_memory_gi_b'].nil?
|
|
2061
|
-
query_params[:'minDiskGiB'] = opts[:'min_disk_gi_b'] if !opts[:'min_disk_gi_b'].nil?
|
|
2062
|
-
query_params[:'maxDiskGiB'] = opts[:'max_disk_gi_b'] if !opts[:'max_disk_gi_b'].nil?
|
|
2063
|
-
query_params[:'lastEventAfter'] = opts[:'last_event_after'] if !opts[:'last_event_after'].nil?
|
|
2064
|
-
query_params[:'lastEventBefore'] = opts[:'last_event_before'] if !opts[:'last_event_before'].nil?
|
|
2065
|
-
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
2066
|
-
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
|
2067
|
-
|
|
2068
|
-
# header parameters
|
|
2069
|
-
header_params = opts[:header_params] || {}
|
|
2070
|
-
# HTTP header 'Accept' (if needed)
|
|
2071
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2072
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2073
|
-
|
|
2074
|
-
# form parameters
|
|
2075
|
-
form_params = opts[:form_params] || {}
|
|
2076
|
-
|
|
2077
|
-
# http body (model)
|
|
2078
|
-
post_body = opts[:debug_body]
|
|
2079
|
-
|
|
2080
|
-
# return_type
|
|
2081
|
-
return_type = opts[:debug_return_type] || 'PaginatedSandboxesDeprecated'
|
|
2082
|
-
|
|
2083
|
-
# auth_names
|
|
2084
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2085
|
-
|
|
2086
|
-
new_options = opts.merge(
|
|
2087
|
-
:operation => :"SandboxApi.list_sandboxes_paginated_deprecated",
|
|
2088
|
-
:header_params => header_params,
|
|
2089
|
-
:query_params => query_params,
|
|
2090
|
-
:form_params => form_params,
|
|
2091
|
-
:body => post_body,
|
|
2092
|
-
:auth_names => auth_names,
|
|
2093
|
-
:return_type => return_type
|
|
2094
|
-
)
|
|
2095
|
-
|
|
2096
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2097
|
-
if @api_client.config.debugging
|
|
2098
|
-
@api_client.config.logger.debug "API called: SandboxApi#list_sandboxes_paginated_deprecated\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2099
|
-
end
|
|
2100
|
-
return data, status_code, headers
|
|
2101
|
-
end
|
|
2102
|
-
|
|
2103
|
-
# Pause sandbox
|
|
2104
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2105
|
-
# @param [Hash] opts the optional parameters
|
|
2106
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2107
|
-
# @return [Sandbox]
|
|
2108
|
-
def pause_sandbox(sandbox_id_or_name, opts = {})
|
|
2109
|
-
data, _status_code, _headers = pause_sandbox_with_http_info(sandbox_id_or_name, opts)
|
|
2110
|
-
data
|
|
2111
|
-
end
|
|
2112
|
-
|
|
2113
|
-
# Pause sandbox
|
|
2114
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2115
|
-
# @param [Hash] opts the optional parameters
|
|
2116
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2117
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2118
|
-
def pause_sandbox_with_http_info(sandbox_id_or_name, opts = {})
|
|
2119
|
-
if @api_client.config.debugging
|
|
2120
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.pause_sandbox ...'
|
|
2121
|
-
end
|
|
2122
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2123
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2124
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.pause_sandbox"
|
|
2125
|
-
end
|
|
2126
|
-
# resource path
|
|
2127
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/pause'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
2128
|
-
|
|
2129
|
-
# query parameters
|
|
2130
|
-
query_params = opts[:query_params] || {}
|
|
2131
|
-
|
|
2132
|
-
# header parameters
|
|
2133
|
-
header_params = opts[:header_params] || {}
|
|
2134
|
-
# HTTP header 'Accept' (if needed)
|
|
2135
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2136
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2137
|
-
|
|
2138
|
-
# form parameters
|
|
2139
|
-
form_params = opts[:form_params] || {}
|
|
2140
|
-
|
|
2141
|
-
# http body (model)
|
|
2142
|
-
post_body = opts[:debug_body]
|
|
2143
|
-
|
|
2144
|
-
# return_type
|
|
2145
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
2146
|
-
|
|
2147
|
-
# auth_names
|
|
2148
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2149
|
-
|
|
2150
|
-
new_options = opts.merge(
|
|
2151
|
-
:operation => :"SandboxApi.pause_sandbox",
|
|
2152
|
-
:header_params => header_params,
|
|
2153
|
-
:query_params => query_params,
|
|
2154
|
-
:form_params => form_params,
|
|
2155
|
-
:body => post_body,
|
|
2156
|
-
:auth_names => auth_names,
|
|
2157
|
-
:return_type => return_type
|
|
2158
|
-
)
|
|
2159
|
-
|
|
2160
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2161
|
-
if @api_client.config.debugging
|
|
2162
|
-
@api_client.config.logger.debug "API called: SandboxApi#pause_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2163
|
-
end
|
|
2164
|
-
return data, status_code, headers
|
|
2165
|
-
end
|
|
2166
|
-
|
|
2167
|
-
# Recover sandbox from error state
|
|
2168
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2169
|
-
# @param [Hash] opts the optional parameters
|
|
2170
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2171
|
-
# @option opts [Boolean] :skip_start If true, the sandbox is left in STOPPED after recovery instead of being started.
|
|
2172
|
-
# @return [Sandbox]
|
|
2173
|
-
def recover_sandbox(sandbox_id_or_name, opts = {})
|
|
2174
|
-
data, _status_code, _headers = recover_sandbox_with_http_info(sandbox_id_or_name, opts)
|
|
2175
|
-
data
|
|
2176
|
-
end
|
|
2177
|
-
|
|
2178
|
-
# Recover sandbox from error state
|
|
2179
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2180
|
-
# @param [Hash] opts the optional parameters
|
|
2181
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2182
|
-
# @option opts [Boolean] :skip_start If true, the sandbox is left in STOPPED after recovery instead of being started.
|
|
2183
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2184
|
-
def recover_sandbox_with_http_info(sandbox_id_or_name, opts = {})
|
|
2185
|
-
if @api_client.config.debugging
|
|
2186
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.recover_sandbox ...'
|
|
2187
|
-
end
|
|
2188
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2189
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2190
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.recover_sandbox"
|
|
2191
|
-
end
|
|
2192
|
-
# resource path
|
|
2193
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/recover'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
2194
|
-
|
|
2195
|
-
# query parameters
|
|
2196
|
-
query_params = opts[:query_params] || {}
|
|
2197
|
-
query_params[:'skipStart'] = opts[:'skip_start'] if !opts[:'skip_start'].nil?
|
|
2198
|
-
|
|
2199
|
-
# header parameters
|
|
2200
|
-
header_params = opts[:header_params] || {}
|
|
2201
|
-
# HTTP header 'Accept' (if needed)
|
|
2202
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2203
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2204
|
-
|
|
2205
|
-
# form parameters
|
|
2206
|
-
form_params = opts[:form_params] || {}
|
|
2207
|
-
|
|
2208
|
-
# http body (model)
|
|
2209
|
-
post_body = opts[:debug_body]
|
|
2210
|
-
|
|
2211
|
-
# return_type
|
|
2212
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
2213
|
-
|
|
2214
|
-
# auth_names
|
|
2215
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2216
|
-
|
|
2217
|
-
new_options = opts.merge(
|
|
2218
|
-
:operation => :"SandboxApi.recover_sandbox",
|
|
2219
|
-
:header_params => header_params,
|
|
2220
|
-
:query_params => query_params,
|
|
2221
|
-
:form_params => form_params,
|
|
2222
|
-
:body => post_body,
|
|
2223
|
-
:auth_names => auth_names,
|
|
2224
|
-
:return_type => return_type
|
|
2225
|
-
)
|
|
2226
|
-
|
|
2227
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2228
|
-
if @api_client.config.debugging
|
|
2229
|
-
@api_client.config.logger.debug "API called: SandboxApi#recover_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2230
|
-
end
|
|
2231
|
-
return data, status_code, headers
|
|
2232
|
-
end
|
|
2233
|
-
|
|
2234
|
-
# Replace sandbox labels
|
|
2235
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2236
|
-
# @param sandbox_labels [SandboxLabels]
|
|
2237
|
-
# @param [Hash] opts the optional parameters
|
|
2238
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2239
|
-
# @return [SandboxLabels]
|
|
2240
|
-
def replace_labels(sandbox_id_or_name, sandbox_labels, opts = {})
|
|
2241
|
-
data, _status_code, _headers = replace_labels_with_http_info(sandbox_id_or_name, sandbox_labels, opts)
|
|
2242
|
-
data
|
|
2243
|
-
end
|
|
2244
|
-
|
|
2245
|
-
# Replace sandbox labels
|
|
2246
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2247
|
-
# @param sandbox_labels [SandboxLabels]
|
|
2248
|
-
# @param [Hash] opts the optional parameters
|
|
2249
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2250
|
-
# @return [Array<(SandboxLabels, Integer, Hash)>] SandboxLabels data, response status code and response headers
|
|
2251
|
-
def replace_labels_with_http_info(sandbox_id_or_name, sandbox_labels, opts = {})
|
|
2252
|
-
if @api_client.config.debugging
|
|
2253
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.replace_labels ...'
|
|
2254
|
-
end
|
|
2255
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2256
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2257
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.replace_labels"
|
|
2258
|
-
end
|
|
2259
|
-
# verify the required parameter 'sandbox_labels' is set
|
|
2260
|
-
if @api_client.config.client_side_validation && sandbox_labels.nil?
|
|
2261
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_labels' when calling SandboxApi.replace_labels"
|
|
2262
|
-
end
|
|
2263
|
-
# resource path
|
|
2264
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/labels'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
2265
|
-
|
|
2266
|
-
# query parameters
|
|
2267
|
-
query_params = opts[:query_params] || {}
|
|
2268
|
-
|
|
2269
|
-
# header parameters
|
|
2270
|
-
header_params = opts[:header_params] || {}
|
|
2271
|
-
# HTTP header 'Accept' (if needed)
|
|
2272
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2273
|
-
# HTTP header 'Content-Type'
|
|
2274
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2275
|
-
if !content_type.nil?
|
|
2276
|
-
header_params['Content-Type'] = content_type
|
|
2277
|
-
end
|
|
2278
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2279
|
-
|
|
2280
|
-
# form parameters
|
|
2281
|
-
form_params = opts[:form_params] || {}
|
|
2282
|
-
|
|
2283
|
-
# http body (model)
|
|
2284
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_labels)
|
|
2285
|
-
|
|
2286
|
-
# return_type
|
|
2287
|
-
return_type = opts[:debug_return_type] || 'SandboxLabels'
|
|
2288
|
-
|
|
2289
|
-
# auth_names
|
|
2290
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2291
|
-
|
|
2292
|
-
new_options = opts.merge(
|
|
2293
|
-
:operation => :"SandboxApi.replace_labels",
|
|
2294
|
-
:header_params => header_params,
|
|
2295
|
-
:query_params => query_params,
|
|
2296
|
-
:form_params => form_params,
|
|
2297
|
-
:body => post_body,
|
|
2298
|
-
:auth_names => auth_names,
|
|
2299
|
-
:return_type => return_type
|
|
2300
|
-
)
|
|
2301
|
-
|
|
2302
|
-
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2303
|
-
if @api_client.config.debugging
|
|
2304
|
-
@api_client.config.logger.debug "API called: SandboxApi#replace_labels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2305
|
-
end
|
|
2306
|
-
return data, status_code, headers
|
|
2307
|
-
end
|
|
2308
|
-
|
|
2309
|
-
# Resize sandbox resources
|
|
2310
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2311
|
-
# @param resize_sandbox [ResizeSandbox]
|
|
2312
|
-
# @param [Hash] opts the optional parameters
|
|
2313
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2314
|
-
# @return [Sandbox]
|
|
2315
|
-
def resize_sandbox(sandbox_id_or_name, resize_sandbox, opts = {})
|
|
2316
|
-
data, _status_code, _headers = resize_sandbox_with_http_info(sandbox_id_or_name, resize_sandbox, opts)
|
|
2317
|
-
data
|
|
2318
|
-
end
|
|
2319
|
-
|
|
2320
|
-
# Resize sandbox resources
|
|
2321
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2322
|
-
# @param resize_sandbox [ResizeSandbox]
|
|
2323
|
-
# @param [Hash] opts the optional parameters
|
|
2324
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2325
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2326
|
-
def resize_sandbox_with_http_info(sandbox_id_or_name, resize_sandbox, opts = {})
|
|
2327
|
-
if @api_client.config.debugging
|
|
2328
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.resize_sandbox ...'
|
|
2329
|
-
end
|
|
2330
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2331
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2332
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.resize_sandbox"
|
|
2333
|
-
end
|
|
2334
|
-
# verify the required parameter 'resize_sandbox' is set
|
|
2335
|
-
if @api_client.config.client_side_validation && resize_sandbox.nil?
|
|
2336
|
-
fail ArgumentError, "Missing the required parameter 'resize_sandbox' when calling SandboxApi.resize_sandbox"
|
|
2337
|
-
end
|
|
2338
|
-
# resource path
|
|
2339
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/resize'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
2340
|
-
|
|
2341
|
-
# query parameters
|
|
2342
|
-
query_params = opts[:query_params] || {}
|
|
2343
|
-
|
|
2344
|
-
# header parameters
|
|
2345
|
-
header_params = opts[:header_params] || {}
|
|
2346
|
-
# HTTP header 'Accept' (if needed)
|
|
2347
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2348
|
-
# HTTP header 'Content-Type'
|
|
2349
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2350
|
-
if !content_type.nil?
|
|
2351
|
-
header_params['Content-Type'] = content_type
|
|
2352
|
-
end
|
|
2353
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2354
|
-
|
|
2355
|
-
# form parameters
|
|
2356
|
-
form_params = opts[:form_params] || {}
|
|
2357
|
-
|
|
2358
|
-
# http body (model)
|
|
2359
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(resize_sandbox)
|
|
2360
|
-
|
|
2361
|
-
# return_type
|
|
2362
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
2363
|
-
|
|
2364
|
-
# auth_names
|
|
2365
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2366
|
-
|
|
2367
|
-
new_options = opts.merge(
|
|
2368
|
-
:operation => :"SandboxApi.resize_sandbox",
|
|
2369
|
-
:header_params => header_params,
|
|
2370
|
-
:query_params => query_params,
|
|
2371
|
-
:form_params => form_params,
|
|
2372
|
-
:body => post_body,
|
|
2373
|
-
:auth_names => auth_names,
|
|
2374
|
-
:return_type => return_type
|
|
2375
|
-
)
|
|
2376
|
-
|
|
2377
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2378
|
-
if @api_client.config.debugging
|
|
2379
|
-
@api_client.config.logger.debug "API called: SandboxApi#resize_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2380
|
-
end
|
|
2381
|
-
return data, status_code, headers
|
|
2382
|
-
end
|
|
2383
|
-
|
|
2384
|
-
# Resolve sandbox secrets
|
|
2385
|
-
# @param sandbox_id [String] Sandbox ID
|
|
2386
|
-
# @param [Hash] opts the optional parameters
|
|
2387
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2388
|
-
# @return [Array<ResolveSandboxSecrets200ResponseInner>]
|
|
2389
|
-
def resolve_sandbox_secrets(sandbox_id, opts = {})
|
|
2390
|
-
data, _status_code, _headers = resolve_sandbox_secrets_with_http_info(sandbox_id, opts)
|
|
2391
|
-
data
|
|
2392
|
-
end
|
|
2393
|
-
|
|
2394
|
-
# Resolve sandbox secrets
|
|
2395
|
-
# @param sandbox_id [String] Sandbox ID
|
|
2396
|
-
# @param [Hash] opts the optional parameters
|
|
2397
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2398
|
-
# @return [Array<(Array<ResolveSandboxSecrets200ResponseInner>, Integer, Hash)>] Array<ResolveSandboxSecrets200ResponseInner> data, response status code and response headers
|
|
2399
|
-
def resolve_sandbox_secrets_with_http_info(sandbox_id, opts = {})
|
|
2400
|
-
if @api_client.config.debugging
|
|
2401
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.resolve_sandbox_secrets ...'
|
|
2402
|
-
end
|
|
2403
|
-
# verify the required parameter 'sandbox_id' is set
|
|
2404
|
-
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
2405
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.resolve_sandbox_secrets"
|
|
2406
|
-
end
|
|
2407
|
-
# resource path
|
|
2408
|
-
local_var_path = '/sandbox/{sandboxId}/secrets'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
2409
|
-
|
|
2410
|
-
# query parameters
|
|
2411
|
-
query_params = opts[:query_params] || {}
|
|
2412
|
-
|
|
2413
|
-
# header parameters
|
|
2414
|
-
header_params = opts[:header_params] || {}
|
|
2415
|
-
# HTTP header 'Accept' (if needed)
|
|
2416
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2417
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2418
|
-
|
|
2419
|
-
# form parameters
|
|
2420
|
-
form_params = opts[:form_params] || {}
|
|
2421
|
-
|
|
2422
|
-
# http body (model)
|
|
2423
|
-
post_body = opts[:debug_body]
|
|
2424
|
-
|
|
2425
|
-
# return_type
|
|
2426
|
-
return_type = opts[:debug_return_type] || 'Array<ResolveSandboxSecrets200ResponseInner>'
|
|
2427
|
-
|
|
2428
|
-
# auth_names
|
|
2429
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2430
|
-
|
|
2431
|
-
new_options = opts.merge(
|
|
2432
|
-
:operation => :"SandboxApi.resolve_sandbox_secrets",
|
|
2433
|
-
:header_params => header_params,
|
|
2434
|
-
:query_params => query_params,
|
|
2435
|
-
:form_params => form_params,
|
|
2436
|
-
:body => post_body,
|
|
2437
|
-
:auth_names => auth_names,
|
|
2438
|
-
:return_type => return_type
|
|
2439
|
-
)
|
|
2440
|
-
|
|
2441
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2442
|
-
if @api_client.config.debugging
|
|
2443
|
-
@api_client.config.logger.debug "API called: SandboxApi#resolve_sandbox_secrets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2444
|
-
end
|
|
2445
|
-
return data, status_code, headers
|
|
2446
|
-
end
|
|
2447
|
-
|
|
2448
|
-
# Revoke SSH access for sandbox
|
|
2449
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2450
|
-
# @param [Hash] opts the optional parameters
|
|
2451
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2452
|
-
# @option opts [String] :token SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.
|
|
2453
|
-
# @return [Sandbox]
|
|
2454
|
-
def revoke_ssh_access(sandbox_id_or_name, opts = {})
|
|
2455
|
-
data, _status_code, _headers = revoke_ssh_access_with_http_info(sandbox_id_or_name, opts)
|
|
2456
|
-
data
|
|
2457
|
-
end
|
|
2458
|
-
|
|
2459
|
-
# Revoke SSH access for sandbox
|
|
2460
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2461
|
-
# @param [Hash] opts the optional parameters
|
|
2462
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2463
|
-
# @option opts [String] :token SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.
|
|
2464
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2465
|
-
def revoke_ssh_access_with_http_info(sandbox_id_or_name, opts = {})
|
|
767
|
+
# @option opts [Float] :page Page number of the results (default to 1)
|
|
768
|
+
# @option opts [Float] :limit Number of results per page (default to 100)
|
|
769
|
+
# @option opts [String] :id Filter by partial ID match
|
|
770
|
+
# @option opts [String] :labels JSON encoded labels to filter by
|
|
771
|
+
# @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
|
|
772
|
+
# @option opts [Array<String>] :states List of states to filter by
|
|
773
|
+
# @option opts [Array<String>] :snapshots List of snapshot names to filter by
|
|
774
|
+
# @option opts [Array<String>] :regions List of regions to filter by
|
|
775
|
+
# @option opts [Float] :min_cpu Minimum CPU
|
|
776
|
+
# @option opts [Float] :max_cpu Maximum CPU
|
|
777
|
+
# @option opts [Float] :min_memory_gi_b Minimum memory in GiB
|
|
778
|
+
# @option opts [Float] :max_memory_gi_b Maximum memory in GiB
|
|
779
|
+
# @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
|
|
780
|
+
# @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
|
|
781
|
+
# @option opts [Time] :last_event_after Include items with last event after this timestamp
|
|
782
|
+
# @option opts [Time] :last_event_before Include items with last event before this timestamp
|
|
783
|
+
# @option opts [String] :sort Field to sort by (default to 'createdAt')
|
|
784
|
+
# @option opts [String] :order Direction to sort by (default to 'desc')
|
|
785
|
+
# @return [Array<(PaginatedSandboxes, Integer, Hash)>] PaginatedSandboxes data, response status code and response headers
|
|
786
|
+
def list_sandboxes_paginated_with_http_info(opts = {})
|
|
2466
787
|
if @api_client.config.debugging
|
|
2467
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
2468
|
-
end
|
|
2469
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2470
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2471
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.revoke_ssh_access"
|
|
788
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.list_sandboxes_paginated ...'
|
|
2472
789
|
end
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
# query parameters
|
|
2477
|
-
query_params = opts[:query_params] || {}
|
|
2478
|
-
query_params[:'token'] = opts[:'token'] if !opts[:'token'].nil?
|
|
2479
|
-
|
|
2480
|
-
# header parameters
|
|
2481
|
-
header_params = opts[:header_params] || {}
|
|
2482
|
-
# HTTP header 'Accept' (if needed)
|
|
2483
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2484
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2485
|
-
|
|
2486
|
-
# form parameters
|
|
2487
|
-
form_params = opts[:form_params] || {}
|
|
2488
|
-
|
|
2489
|
-
# http body (model)
|
|
2490
|
-
post_body = opts[:debug_body]
|
|
2491
|
-
|
|
2492
|
-
# return_type
|
|
2493
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
2494
|
-
|
|
2495
|
-
# auth_names
|
|
2496
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2497
|
-
|
|
2498
|
-
new_options = opts.merge(
|
|
2499
|
-
:operation => :"SandboxApi.revoke_ssh_access",
|
|
2500
|
-
:header_params => header_params,
|
|
2501
|
-
:query_params => query_params,
|
|
2502
|
-
:form_params => form_params,
|
|
2503
|
-
:body => post_body,
|
|
2504
|
-
:auth_names => auth_names,
|
|
2505
|
-
:return_type => return_type
|
|
2506
|
-
)
|
|
2507
|
-
|
|
2508
|
-
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
2509
|
-
if @api_client.config.debugging
|
|
2510
|
-
@api_client.config.logger.debug "API called: SandboxApi#revoke_ssh_access\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
790
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
791
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
|
|
2511
792
|
end
|
|
2512
|
-
return data, status_code, headers
|
|
2513
|
-
end
|
|
2514
|
-
|
|
2515
|
-
# Rotate the signing key, invalidating all previously signed URLs
|
|
2516
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
2517
|
-
# @param [Hash] opts the optional parameters
|
|
2518
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2519
|
-
# @return [String]
|
|
2520
|
-
def rotate_signing_key(sandbox_id, opts = {})
|
|
2521
|
-
data, _status_code, _headers = rotate_signing_key_with_http_info(sandbox_id, opts)
|
|
2522
|
-
data
|
|
2523
|
-
end
|
|
2524
793
|
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
# @param [Hash] opts the optional parameters
|
|
2528
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2529
|
-
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
|
2530
|
-
def rotate_signing_key_with_http_info(sandbox_id, opts = {})
|
|
2531
|
-
if @api_client.config.debugging
|
|
2532
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.rotate_signing_key ...'
|
|
2533
|
-
end
|
|
2534
|
-
# verify the required parameter 'sandbox_id' is set
|
|
2535
|
-
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
2536
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.rotate_signing_key"
|
|
794
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
|
|
795
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes_paginated, must be smaller than or equal to 200.'
|
|
2537
796
|
end
|
|
2538
|
-
# resource path
|
|
2539
|
-
local_var_path = '/sandbox/{sandboxId}/signing-key/rotate'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
2540
|
-
|
|
2541
|
-
# query parameters
|
|
2542
|
-
query_params = opts[:query_params] || {}
|
|
2543
|
-
|
|
2544
|
-
# header parameters
|
|
2545
|
-
header_params = opts[:header_params] || {}
|
|
2546
|
-
# HTTP header 'Accept' (if needed)
|
|
2547
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2548
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2549
|
-
|
|
2550
|
-
# form parameters
|
|
2551
|
-
form_params = opts[:form_params] || {}
|
|
2552
|
-
|
|
2553
|
-
# http body (model)
|
|
2554
|
-
post_body = opts[:debug_body]
|
|
2555
|
-
|
|
2556
|
-
# return_type
|
|
2557
|
-
return_type = opts[:debug_return_type] || 'String'
|
|
2558
|
-
|
|
2559
|
-
# auth_names
|
|
2560
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2561
|
-
|
|
2562
|
-
new_options = opts.merge(
|
|
2563
|
-
:operation => :"SandboxApi.rotate_signing_key",
|
|
2564
|
-
:header_params => header_params,
|
|
2565
|
-
:query_params => query_params,
|
|
2566
|
-
:form_params => form_params,
|
|
2567
|
-
:body => post_body,
|
|
2568
|
-
:auth_names => auth_names,
|
|
2569
|
-
:return_type => return_type
|
|
2570
|
-
)
|
|
2571
797
|
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
@api_client.config.logger.debug "API called: SandboxApi#rotate_signing_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
798
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
799
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
|
|
2575
800
|
end
|
|
2576
|
-
return data, status_code, headers
|
|
2577
|
-
end
|
|
2578
|
-
|
|
2579
|
-
# Set sandbox auto-archive interval
|
|
2580
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2581
|
-
# @param interval [Float] Auto-archive interval in minutes (0 means the maximum interval will be used)
|
|
2582
|
-
# @param [Hash] opts the optional parameters
|
|
2583
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2584
|
-
# @return [Sandbox]
|
|
2585
|
-
def set_auto_archive_interval(sandbox_id_or_name, interval, opts = {})
|
|
2586
|
-
data, _status_code, _headers = set_auto_archive_interval_with_http_info(sandbox_id_or_name, interval, opts)
|
|
2587
|
-
data
|
|
2588
|
-
end
|
|
2589
801
|
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
# @param [Hash] opts the optional parameters
|
|
2594
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2595
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2596
|
-
def set_auto_archive_interval_with_http_info(sandbox_id_or_name, interval, opts = {})
|
|
2597
|
-
if @api_client.config.debugging
|
|
2598
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_archive_interval ...'
|
|
2599
|
-
end
|
|
2600
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2601
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2602
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.set_auto_archive_interval"
|
|
802
|
+
allowable_values = ["creating", "restoring", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving"]
|
|
803
|
+
if @api_client.config.client_side_validation && opts[:'states'] && !opts[:'states'].all? { |item| allowable_values.include?(item) }
|
|
804
|
+
fail ArgumentError, "invalid value for \"states\", must include one of #{allowable_values}"
|
|
2603
805
|
end
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_auto_archive_interval"
|
|
806
|
+
if @api_client.config.client_side_validation && !opts[:'min_cpu'].nil? && opts[:'min_cpu'] < 1
|
|
807
|
+
fail ArgumentError, 'invalid value for "opts[:"min_cpu"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
|
|
2607
808
|
end
|
|
2608
|
-
# resource path
|
|
2609
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/autoarchive/{interval}'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s)).sub('{' + 'interval' + '}', CGI.escape(interval.to_s))
|
|
2610
|
-
|
|
2611
|
-
# query parameters
|
|
2612
|
-
query_params = opts[:query_params] || {}
|
|
2613
|
-
|
|
2614
|
-
# header parameters
|
|
2615
|
-
header_params = opts[:header_params] || {}
|
|
2616
|
-
# HTTP header 'Accept' (if needed)
|
|
2617
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2618
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2619
|
-
|
|
2620
|
-
# form parameters
|
|
2621
|
-
form_params = opts[:form_params] || {}
|
|
2622
|
-
|
|
2623
|
-
# http body (model)
|
|
2624
|
-
post_body = opts[:debug_body]
|
|
2625
|
-
|
|
2626
|
-
# return_type
|
|
2627
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
2628
|
-
|
|
2629
|
-
# auth_names
|
|
2630
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2631
|
-
|
|
2632
|
-
new_options = opts.merge(
|
|
2633
|
-
:operation => :"SandboxApi.set_auto_archive_interval",
|
|
2634
|
-
:header_params => header_params,
|
|
2635
|
-
:query_params => query_params,
|
|
2636
|
-
:form_params => form_params,
|
|
2637
|
-
:body => post_body,
|
|
2638
|
-
:auth_names => auth_names,
|
|
2639
|
-
:return_type => return_type
|
|
2640
|
-
)
|
|
2641
809
|
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
@api_client.config.logger.debug "API called: SandboxApi#set_auto_archive_interval\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
810
|
+
if @api_client.config.client_side_validation && !opts[:'max_cpu'].nil? && opts[:'max_cpu'] < 1
|
|
811
|
+
fail ArgumentError, 'invalid value for "opts[:"max_cpu"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
|
|
2645
812
|
end
|
|
2646
|
-
return data, status_code, headers
|
|
2647
|
-
end
|
|
2648
|
-
|
|
2649
|
-
# Set sandbox auto-delete interval
|
|
2650
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2651
|
-
# @param interval [Float] Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
|
|
2652
|
-
# @param [Hash] opts the optional parameters
|
|
2653
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2654
|
-
# @return [Sandbox]
|
|
2655
|
-
def set_auto_delete_interval(sandbox_id_or_name, interval, opts = {})
|
|
2656
|
-
data, _status_code, _headers = set_auto_delete_interval_with_http_info(sandbox_id_or_name, interval, opts)
|
|
2657
|
-
data
|
|
2658
|
-
end
|
|
2659
813
|
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
# @param interval [Float] Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
|
|
2663
|
-
# @param [Hash] opts the optional parameters
|
|
2664
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2665
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2666
|
-
def set_auto_delete_interval_with_http_info(sandbox_id_or_name, interval, opts = {})
|
|
2667
|
-
if @api_client.config.debugging
|
|
2668
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_delete_interval ...'
|
|
2669
|
-
end
|
|
2670
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2671
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2672
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.set_auto_delete_interval"
|
|
2673
|
-
end
|
|
2674
|
-
# verify the required parameter 'interval' is set
|
|
2675
|
-
if @api_client.config.client_side_validation && interval.nil?
|
|
2676
|
-
fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_auto_delete_interval"
|
|
814
|
+
if @api_client.config.client_side_validation && !opts[:'min_memory_gi_b'].nil? && opts[:'min_memory_gi_b'] < 1
|
|
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.'
|
|
2677
816
|
end
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
# query parameters
|
|
2682
|
-
query_params = opts[:query_params] || {}
|
|
2683
|
-
|
|
2684
|
-
# header parameters
|
|
2685
|
-
header_params = opts[:header_params] || {}
|
|
2686
|
-
# HTTP header 'Accept' (if needed)
|
|
2687
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2688
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2689
|
-
|
|
2690
|
-
# form parameters
|
|
2691
|
-
form_params = opts[:form_params] || {}
|
|
2692
|
-
|
|
2693
|
-
# http body (model)
|
|
2694
|
-
post_body = opts[:debug_body]
|
|
2695
|
-
|
|
2696
|
-
# return_type
|
|
2697
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
2698
|
-
|
|
2699
|
-
# auth_names
|
|
2700
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2701
|
-
|
|
2702
|
-
new_options = opts.merge(
|
|
2703
|
-
:operation => :"SandboxApi.set_auto_delete_interval",
|
|
2704
|
-
:header_params => header_params,
|
|
2705
|
-
:query_params => query_params,
|
|
2706
|
-
:form_params => form_params,
|
|
2707
|
-
:body => post_body,
|
|
2708
|
-
:auth_names => auth_names,
|
|
2709
|
-
:return_type => return_type
|
|
2710
|
-
)
|
|
2711
|
-
|
|
2712
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2713
|
-
if @api_client.config.debugging
|
|
2714
|
-
@api_client.config.logger.debug "API called: SandboxApi#set_auto_delete_interval\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
817
|
+
|
|
818
|
+
if @api_client.config.client_side_validation && !opts[:'max_memory_gi_b'].nil? && opts[:'max_memory_gi_b'] < 1
|
|
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.'
|
|
2715
820
|
end
|
|
2716
|
-
return data, status_code, headers
|
|
2717
|
-
end
|
|
2718
821
|
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
# @param [Hash] opts the optional parameters
|
|
2723
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2724
|
-
# @return [Sandbox]
|
|
2725
|
-
def set_auto_pause_interval(sandbox_id_or_name, interval, opts = {})
|
|
2726
|
-
data, _status_code, _headers = set_auto_pause_interval_with_http_info(sandbox_id_or_name, interval, opts)
|
|
2727
|
-
data
|
|
2728
|
-
end
|
|
822
|
+
if @api_client.config.client_side_validation && !opts[:'min_disk_gi_b'].nil? && opts[:'min_disk_gi_b'] < 1
|
|
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.'
|
|
824
|
+
end
|
|
2729
825
|
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
# @param interval [Float] Auto-pause interval in minutes (0 to disable)
|
|
2733
|
-
# @param [Hash] opts the optional parameters
|
|
2734
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2735
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2736
|
-
def set_auto_pause_interval_with_http_info(sandbox_id_or_name, interval, opts = {})
|
|
2737
|
-
if @api_client.config.debugging
|
|
2738
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_pause_interval ...'
|
|
826
|
+
if @api_client.config.client_side_validation && !opts[:'max_disk_gi_b'].nil? && opts[:'max_disk_gi_b'] < 1
|
|
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.'
|
|
2739
828
|
end
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
829
|
+
|
|
830
|
+
allowable_values = ["id", "state", "snapshot", "region", "updatedAt", "createdAt"]
|
|
831
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
|
832
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
|
2743
833
|
end
|
|
2744
|
-
|
|
2745
|
-
if @api_client.config.client_side_validation &&
|
|
2746
|
-
fail ArgumentError, "
|
|
834
|
+
allowable_values = ["asc", "desc"]
|
|
835
|
+
if @api_client.config.client_side_validation && opts[:'order'] && !allowable_values.include?(opts[:'order'])
|
|
836
|
+
fail ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
|
|
2747
837
|
end
|
|
2748
838
|
# resource path
|
|
2749
|
-
local_var_path = '/sandbox/
|
|
839
|
+
local_var_path = '/sandbox/paginated'
|
|
2750
840
|
|
|
2751
841
|
# query parameters
|
|
2752
842
|
query_params = opts[:query_params] || {}
|
|
843
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
844
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
845
|
+
query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
|
|
846
|
+
query_params[:'labels'] = opts[:'labels'] if !opts[:'labels'].nil?
|
|
847
|
+
query_params[:'includeErroredDeleted'] = opts[:'include_errored_deleted'] if !opts[:'include_errored_deleted'].nil?
|
|
848
|
+
query_params[:'states'] = @api_client.build_collection_param(opts[:'states'], :multi) if !opts[:'states'].nil?
|
|
849
|
+
query_params[:'snapshots'] = @api_client.build_collection_param(opts[:'snapshots'], :multi) if !opts[:'snapshots'].nil?
|
|
850
|
+
query_params[:'regions'] = @api_client.build_collection_param(opts[:'regions'], :multi) if !opts[:'regions'].nil?
|
|
851
|
+
query_params[:'minCpu'] = opts[:'min_cpu'] if !opts[:'min_cpu'].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?
|
|
2753
861
|
|
|
2754
862
|
# header parameters
|
|
2755
863
|
header_params = opts[:header_params] || {}
|
|
@@ -2764,13 +872,13 @@ module DaytonaApiClient
|
|
|
2764
872
|
post_body = opts[:debug_body]
|
|
2765
873
|
|
|
2766
874
|
# return_type
|
|
2767
|
-
return_type = opts[:debug_return_type] || '
|
|
875
|
+
return_type = opts[:debug_return_type] || 'PaginatedSandboxes'
|
|
2768
876
|
|
|
2769
877
|
# auth_names
|
|
2770
878
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2771
879
|
|
|
2772
880
|
new_options = opts.merge(
|
|
2773
|
-
:operation => :"SandboxApi.
|
|
881
|
+
:operation => :"SandboxApi.list_sandboxes_paginated",
|
|
2774
882
|
:header_params => header_params,
|
|
2775
883
|
:query_params => query_params,
|
|
2776
884
|
:form_params => form_params,
|
|
@@ -2779,44 +887,44 @@ module DaytonaApiClient
|
|
|
2779
887
|
:return_type => return_type
|
|
2780
888
|
)
|
|
2781
889
|
|
|
2782
|
-
data, status_code, headers = @api_client.call_api(:
|
|
890
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2783
891
|
if @api_client.config.debugging
|
|
2784
|
-
@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}"
|
|
2785
893
|
end
|
|
2786
894
|
return data, status_code, headers
|
|
2787
895
|
end
|
|
2788
896
|
|
|
2789
|
-
#
|
|
2790
|
-
# @param
|
|
2791
|
-
# @param
|
|
897
|
+
# Replace sandbox labels
|
|
898
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
899
|
+
# @param sandbox_labels [SandboxLabels]
|
|
2792
900
|
# @param [Hash] opts the optional parameters
|
|
2793
901
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2794
|
-
# @return [
|
|
2795
|
-
def
|
|
2796
|
-
data, _status_code, _headers =
|
|
902
|
+
# @return [SandboxLabels]
|
|
903
|
+
def replace_labels(sandbox_id, sandbox_labels, opts = {})
|
|
904
|
+
data, _status_code, _headers = replace_labels_with_http_info(sandbox_id, sandbox_labels, opts)
|
|
2797
905
|
data
|
|
2798
906
|
end
|
|
2799
907
|
|
|
2800
|
-
#
|
|
2801
|
-
# @param
|
|
2802
|
-
# @param
|
|
908
|
+
# Replace sandbox labels
|
|
909
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
910
|
+
# @param sandbox_labels [SandboxLabels]
|
|
2803
911
|
# @param [Hash] opts the optional parameters
|
|
2804
912
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2805
|
-
# @return [Array<(
|
|
2806
|
-
def
|
|
913
|
+
# @return [Array<(SandboxLabels, Integer, Hash)>] SandboxLabels data, response status code and response headers
|
|
914
|
+
def replace_labels_with_http_info(sandbox_id, sandbox_labels, opts = {})
|
|
2807
915
|
if @api_client.config.debugging
|
|
2808
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
916
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.replace_labels ...'
|
|
2809
917
|
end
|
|
2810
|
-
# verify the required parameter '
|
|
2811
|
-
if @api_client.config.client_side_validation &&
|
|
2812
|
-
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"
|
|
2813
921
|
end
|
|
2814
|
-
# verify the required parameter '
|
|
2815
|
-
if @api_client.config.client_side_validation &&
|
|
2816
|
-
fail ArgumentError, "Missing the required parameter '
|
|
922
|
+
# verify the required parameter 'sandbox_labels' is set
|
|
923
|
+
if @api_client.config.client_side_validation && sandbox_labels.nil?
|
|
924
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_labels' when calling SandboxApi.replace_labels"
|
|
2817
925
|
end
|
|
2818
926
|
# resource path
|
|
2819
|
-
local_var_path = '/sandbox/{
|
|
927
|
+
local_var_path = '/sandbox/{sandboxId}/labels'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
2820
928
|
|
|
2821
929
|
# query parameters
|
|
2822
930
|
query_params = opts[:query_params] || {}
|
|
@@ -2825,22 +933,27 @@ module DaytonaApiClient
|
|
|
2825
933
|
header_params = opts[:header_params] || {}
|
|
2826
934
|
# HTTP header 'Accept' (if needed)
|
|
2827
935
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
936
|
+
# HTTP header 'Content-Type'
|
|
937
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
938
|
+
if !content_type.nil?
|
|
939
|
+
header_params['Content-Type'] = content_type
|
|
940
|
+
end
|
|
2828
941
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2829
942
|
|
|
2830
943
|
# form parameters
|
|
2831
944
|
form_params = opts[:form_params] || {}
|
|
2832
945
|
|
|
2833
946
|
# http body (model)
|
|
2834
|
-
post_body = opts[:debug_body]
|
|
947
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_labels)
|
|
2835
948
|
|
|
2836
949
|
# return_type
|
|
2837
|
-
return_type = opts[:debug_return_type] || '
|
|
950
|
+
return_type = opts[:debug_return_type] || 'SandboxLabels'
|
|
2838
951
|
|
|
2839
952
|
# auth_names
|
|
2840
953
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2841
954
|
|
|
2842
955
|
new_options = opts.merge(
|
|
2843
|
-
:operation => :"SandboxApi.
|
|
956
|
+
:operation => :"SandboxApi.replace_labels",
|
|
2844
957
|
:header_params => header_params,
|
|
2845
958
|
:query_params => query_params,
|
|
2846
959
|
:form_params => form_params,
|
|
@@ -2849,52 +962,47 @@ module DaytonaApiClient
|
|
|
2849
962
|
:return_type => return_type
|
|
2850
963
|
)
|
|
2851
964
|
|
|
2852
|
-
data, status_code, headers = @api_client.call_api(:
|
|
965
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2853
966
|
if @api_client.config.debugging
|
|
2854
|
-
@api_client.config.logger.debug "API called: SandboxApi#
|
|
967
|
+
@api_client.config.logger.debug "API called: SandboxApi#replace_labels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2855
968
|
end
|
|
2856
969
|
return data, status_code, headers
|
|
2857
970
|
end
|
|
2858
971
|
|
|
2859
|
-
#
|
|
2860
|
-
# @param
|
|
2861
|
-
# @param ttl_minutes [Float] Maximum time to live in minutes, re-anchored from the current time (0 to disable). When it elapses the sandbox is destroyed, even if it is stopped, paused, or archived
|
|
972
|
+
# Revoke SSH access for sandbox
|
|
973
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2862
974
|
# @param [Hash] opts the optional parameters
|
|
2863
975
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2864
|
-
# @
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
976
|
+
# @option opts [String] :token SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.
|
|
977
|
+
# @return [nil]
|
|
978
|
+
def revoke_ssh_access(sandbox_id, opts = {})
|
|
979
|
+
revoke_ssh_access_with_http_info(sandbox_id, opts)
|
|
980
|
+
nil
|
|
2868
981
|
end
|
|
2869
982
|
|
|
2870
|
-
#
|
|
2871
|
-
# @param
|
|
2872
|
-
# @param ttl_minutes [Float] Maximum time to live in minutes, re-anchored from the current time (0 to disable). When it elapses the sandbox is destroyed, even if it is stopped, paused, or archived
|
|
983
|
+
# Revoke SSH access for sandbox
|
|
984
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
2873
985
|
# @param [Hash] opts the optional parameters
|
|
2874
986
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2875
|
-
# @
|
|
2876
|
-
|
|
987
|
+
# @option opts [String] :token SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.
|
|
988
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
989
|
+
def revoke_ssh_access_with_http_info(sandbox_id, opts = {})
|
|
2877
990
|
if @api_client.config.debugging
|
|
2878
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
2879
|
-
end
|
|
2880
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2881
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2882
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.set_ttl"
|
|
991
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.revoke_ssh_access ...'
|
|
2883
992
|
end
|
|
2884
|
-
# verify the required parameter '
|
|
2885
|
-
if @api_client.config.client_side_validation &&
|
|
2886
|
-
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"
|
|
2887
996
|
end
|
|
2888
997
|
# resource path
|
|
2889
|
-
local_var_path = '/sandbox/{
|
|
998
|
+
local_var_path = '/sandbox/{sandboxId}/ssh-access'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
2890
999
|
|
|
2891
1000
|
# query parameters
|
|
2892
1001
|
query_params = opts[:query_params] || {}
|
|
1002
|
+
query_params[:'token'] = opts[:'token'] if !opts[:'token'].nil?
|
|
2893
1003
|
|
|
2894
1004
|
# header parameters
|
|
2895
1005
|
header_params = opts[:header_params] || {}
|
|
2896
|
-
# HTTP header 'Accept' (if needed)
|
|
2897
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2898
1006
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2899
1007
|
|
|
2900
1008
|
# form parameters
|
|
@@ -2904,13 +1012,13 @@ module DaytonaApiClient
|
|
|
2904
1012
|
post_body = opts[:debug_body]
|
|
2905
1013
|
|
|
2906
1014
|
# return_type
|
|
2907
|
-
return_type = opts[:debug_return_type]
|
|
1015
|
+
return_type = opts[:debug_return_type]
|
|
2908
1016
|
|
|
2909
1017
|
# auth_names
|
|
2910
1018
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2911
1019
|
|
|
2912
1020
|
new_options = opts.merge(
|
|
2913
|
-
:operation => :"SandboxApi.
|
|
1021
|
+
:operation => :"SandboxApi.revoke_ssh_access",
|
|
2914
1022
|
:header_params => header_params,
|
|
2915
1023
|
:query_params => query_params,
|
|
2916
1024
|
:form_params => form_params,
|
|
@@ -2919,48 +1027,50 @@ module DaytonaApiClient
|
|
|
2919
1027
|
:return_type => return_type
|
|
2920
1028
|
)
|
|
2921
1029
|
|
|
2922
|
-
data, status_code, headers = @api_client.call_api(:
|
|
1030
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
2923
1031
|
if @api_client.config.debugging
|
|
2924
|
-
@api_client.config.logger.debug "API called: SandboxApi#
|
|
1032
|
+
@api_client.config.logger.debug "API called: SandboxApi#revoke_ssh_access\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2925
1033
|
end
|
|
2926
1034
|
return data, status_code, headers
|
|
2927
1035
|
end
|
|
2928
1036
|
|
|
2929
|
-
#
|
|
2930
|
-
#
|
|
2931
|
-
# @param
|
|
1037
|
+
# Set sandbox auto-archive interval
|
|
1038
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1039
|
+
# @param interval [Float] Auto-archive interval in minutes (0 means the maximum interval will be used)
|
|
2932
1040
|
# @param [Hash] opts the optional parameters
|
|
2933
1041
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2934
|
-
# @return [
|
|
2935
|
-
def
|
|
2936
|
-
|
|
2937
|
-
|
|
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
|
|
2938
1046
|
end
|
|
2939
1047
|
|
|
2940
|
-
#
|
|
2941
|
-
#
|
|
2942
|
-
# @param
|
|
1048
|
+
# Set sandbox auto-archive interval
|
|
1049
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1050
|
+
# @param interval [Float] Auto-archive interval in minutes (0 means the maximum interval will be used)
|
|
2943
1051
|
# @param [Hash] opts the optional parameters
|
|
2944
1052
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2945
|
-
# @return [Array<(
|
|
2946
|
-
def
|
|
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 = {})
|
|
2947
1055
|
if @api_client.config.debugging
|
|
2948
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
1056
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_archive_interval ...'
|
|
1057
|
+
end
|
|
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"
|
|
2949
1061
|
end
|
|
2950
|
-
# verify the required parameter '
|
|
2951
|
-
if @api_client.config.client_side_validation &&
|
|
2952
|
-
fail ArgumentError, "Missing the required parameter '
|
|
1062
|
+
# verify the required parameter 'interval' is set
|
|
1063
|
+
if @api_client.config.client_side_validation && interval.nil?
|
|
1064
|
+
fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_auto_archive_interval"
|
|
2953
1065
|
end
|
|
2954
1066
|
# resource path
|
|
2955
|
-
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))
|
|
2956
1068
|
|
|
2957
1069
|
# query parameters
|
|
2958
1070
|
query_params = opts[:query_params] || {}
|
|
2959
1071
|
|
|
2960
1072
|
# header parameters
|
|
2961
1073
|
header_params = opts[:header_params] || {}
|
|
2962
|
-
# HTTP header 'Accept' (if needed)
|
|
2963
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2964
1074
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2965
1075
|
|
|
2966
1076
|
# form parameters
|
|
@@ -2970,13 +1080,13 @@ module DaytonaApiClient
|
|
|
2970
1080
|
post_body = opts[:debug_body]
|
|
2971
1081
|
|
|
2972
1082
|
# return_type
|
|
2973
|
-
return_type = opts[:debug_return_type]
|
|
1083
|
+
return_type = opts[:debug_return_type]
|
|
2974
1084
|
|
|
2975
1085
|
# auth_names
|
|
2976
1086
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2977
1087
|
|
|
2978
1088
|
new_options = opts.merge(
|
|
2979
|
-
:operation => :"SandboxApi.
|
|
1089
|
+
:operation => :"SandboxApi.set_auto_archive_interval",
|
|
2980
1090
|
:header_params => header_params,
|
|
2981
1091
|
:query_params => query_params,
|
|
2982
1092
|
:form_params => form_params,
|
|
@@ -2987,47 +1097,48 @@ module DaytonaApiClient
|
|
|
2987
1097
|
|
|
2988
1098
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2989
1099
|
if @api_client.config.debugging
|
|
2990
|
-
@api_client.config.logger.debug "API called: SandboxApi#
|
|
1100
|
+
@api_client.config.logger.debug "API called: SandboxApi#set_auto_archive_interval\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2991
1101
|
end
|
|
2992
1102
|
return data, status_code, headers
|
|
2993
1103
|
end
|
|
2994
1104
|
|
|
2995
|
-
#
|
|
2996
|
-
# @param
|
|
1105
|
+
# Set sandbox auto-delete interval
|
|
1106
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1107
|
+
# @param interval [Float] Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
|
|
2997
1108
|
# @param [Hash] opts the optional parameters
|
|
2998
1109
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2999
|
-
# @
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
data
|
|
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
|
|
3004
1114
|
end
|
|
3005
1115
|
|
|
3006
|
-
#
|
|
3007
|
-
# @param
|
|
1116
|
+
# Set sandbox auto-delete interval
|
|
1117
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1118
|
+
# @param interval [Float] Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
|
|
3008
1119
|
# @param [Hash] opts the optional parameters
|
|
3009
1120
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
3010
|
-
# @
|
|
3011
|
-
|
|
3012
|
-
def stop_sandbox_with_http_info(sandbox_id_or_name, opts = {})
|
|
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 = {})
|
|
3013
1123
|
if @api_client.config.debugging
|
|
3014
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
1124
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_delete_interval ...'
|
|
3015
1125
|
end
|
|
3016
|
-
# verify the required parameter '
|
|
3017
|
-
if @api_client.config.client_side_validation &&
|
|
3018
|
-
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"
|
|
1129
|
+
end
|
|
1130
|
+
# verify the required parameter 'interval' is set
|
|
1131
|
+
if @api_client.config.client_side_validation && interval.nil?
|
|
1132
|
+
fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_auto_delete_interval"
|
|
3019
1133
|
end
|
|
3020
1134
|
# resource path
|
|
3021
|
-
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))
|
|
3022
1136
|
|
|
3023
1137
|
# query parameters
|
|
3024
1138
|
query_params = opts[:query_params] || {}
|
|
3025
|
-
query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil?
|
|
3026
1139
|
|
|
3027
1140
|
# header parameters
|
|
3028
1141
|
header_params = opts[:header_params] || {}
|
|
3029
|
-
# HTTP header 'Accept' (if needed)
|
|
3030
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3031
1142
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
3032
1143
|
|
|
3033
1144
|
# form parameters
|
|
@@ -3037,13 +1148,13 @@ module DaytonaApiClient
|
|
|
3037
1148
|
post_body = opts[:debug_body]
|
|
3038
1149
|
|
|
3039
1150
|
# return_type
|
|
3040
|
-
return_type = opts[:debug_return_type]
|
|
1151
|
+
return_type = opts[:debug_return_type]
|
|
3041
1152
|
|
|
3042
1153
|
# auth_names
|
|
3043
1154
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
3044
1155
|
|
|
3045
1156
|
new_options = opts.merge(
|
|
3046
|
-
:operation => :"SandboxApi.
|
|
1157
|
+
:operation => :"SandboxApi.set_auto_delete_interval",
|
|
3047
1158
|
:header_params => header_params,
|
|
3048
1159
|
:query_params => query_params,
|
|
3049
1160
|
:form_params => form_params,
|
|
@@ -3054,56 +1165,55 @@ module DaytonaApiClient
|
|
|
3054
1165
|
|
|
3055
1166
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3056
1167
|
if @api_client.config.debugging
|
|
3057
|
-
@api_client.config.logger.debug "API called: SandboxApi#
|
|
1168
|
+
@api_client.config.logger.debug "API called: SandboxApi#set_auto_delete_interval\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3058
1169
|
end
|
|
3059
1170
|
return data, status_code, headers
|
|
3060
1171
|
end
|
|
3061
1172
|
|
|
3062
|
-
#
|
|
1173
|
+
# Set sandbox auto-stop interval
|
|
3063
1174
|
# @param sandbox_id [String] ID of the sandbox
|
|
1175
|
+
# @param interval [Float] Auto-stop interval in minutes (0 to disable)
|
|
3064
1176
|
# @param [Hash] opts the optional parameters
|
|
3065
1177
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
3066
|
-
# @option opts [UpdateLastActivity] :update_last_activity
|
|
3067
1178
|
# @return [nil]
|
|
3068
|
-
def
|
|
3069
|
-
|
|
1179
|
+
def set_autostop_interval(sandbox_id, interval, opts = {})
|
|
1180
|
+
set_autostop_interval_with_http_info(sandbox_id, interval, opts)
|
|
3070
1181
|
nil
|
|
3071
1182
|
end
|
|
3072
1183
|
|
|
3073
|
-
#
|
|
1184
|
+
# Set sandbox auto-stop interval
|
|
3074
1185
|
# @param sandbox_id [String] ID of the sandbox
|
|
1186
|
+
# @param interval [Float] Auto-stop interval in minutes (0 to disable)
|
|
3075
1187
|
# @param [Hash] opts the optional parameters
|
|
3076
1188
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
3077
|
-
# @option opts [UpdateLastActivity] :update_last_activity
|
|
3078
1189
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
3079
|
-
def
|
|
1190
|
+
def set_autostop_interval_with_http_info(sandbox_id, interval, opts = {})
|
|
3080
1191
|
if @api_client.config.debugging
|
|
3081
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
1192
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.set_autostop_interval ...'
|
|
3082
1193
|
end
|
|
3083
1194
|
# verify the required parameter 'sandbox_id' is set
|
|
3084
1195
|
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
3085
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.
|
|
1196
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.set_autostop_interval"
|
|
1197
|
+
end
|
|
1198
|
+
# verify the required parameter 'interval' is set
|
|
1199
|
+
if @api_client.config.client_side_validation && interval.nil?
|
|
1200
|
+
fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_autostop_interval"
|
|
3086
1201
|
end
|
|
3087
1202
|
# resource path
|
|
3088
|
-
local_var_path = '/sandbox/{sandboxId}/
|
|
1203
|
+
local_var_path = '/sandbox/{sandboxId}/autostop/{interval}'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s)).sub('{' + 'interval' + '}', CGI.escape(interval.to_s))
|
|
3089
1204
|
|
|
3090
1205
|
# query parameters
|
|
3091
1206
|
query_params = opts[:query_params] || {}
|
|
3092
1207
|
|
|
3093
1208
|
# header parameters
|
|
3094
1209
|
header_params = opts[:header_params] || {}
|
|
3095
|
-
# HTTP header 'Content-Type'
|
|
3096
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3097
|
-
if !content_type.nil?
|
|
3098
|
-
header_params['Content-Type'] = content_type
|
|
3099
|
-
end
|
|
3100
1210
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
3101
1211
|
|
|
3102
1212
|
# form parameters
|
|
3103
1213
|
form_params = opts[:form_params] || {}
|
|
3104
1214
|
|
|
3105
1215
|
# http body (model)
|
|
3106
|
-
post_body = opts[:debug_body]
|
|
1216
|
+
post_body = opts[:debug_body]
|
|
3107
1217
|
|
|
3108
1218
|
# return_type
|
|
3109
1219
|
return_type = opts[:debug_return_type]
|
|
@@ -3112,7 +1222,7 @@ module DaytonaApiClient
|
|
|
3112
1222
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
3113
1223
|
|
|
3114
1224
|
new_options = opts.merge(
|
|
3115
|
-
:operation => :"SandboxApi.
|
|
1225
|
+
:operation => :"SandboxApi.set_autostop_interval",
|
|
3116
1226
|
:header_params => header_params,
|
|
3117
1227
|
:query_params => query_params,
|
|
3118
1228
|
:form_params => form_params,
|
|
@@ -3123,44 +1233,36 @@ module DaytonaApiClient
|
|
|
3123
1233
|
|
|
3124
1234
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3125
1235
|
if @api_client.config.debugging
|
|
3126
|
-
@api_client.config.logger.debug "API called: SandboxApi#
|
|
1236
|
+
@api_client.config.logger.debug "API called: SandboxApi#set_autostop_interval\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3127
1237
|
end
|
|
3128
1238
|
return data, status_code, headers
|
|
3129
1239
|
end
|
|
3130
1240
|
|
|
3131
|
-
#
|
|
3132
|
-
#
|
|
3133
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
3134
|
-
# @param update_sandbox_network_settings [UpdateSandboxNetworkSettings]
|
|
1241
|
+
# Start sandbox
|
|
1242
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
3135
1243
|
# @param [Hash] opts the optional parameters
|
|
3136
1244
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
3137
1245
|
# @return [Sandbox]
|
|
3138
|
-
def
|
|
3139
|
-
data, _status_code, _headers =
|
|
1246
|
+
def start_sandbox(sandbox_id, opts = {})
|
|
1247
|
+
data, _status_code, _headers = start_sandbox_with_http_info(sandbox_id, opts)
|
|
3140
1248
|
data
|
|
3141
1249
|
end
|
|
3142
1250
|
|
|
3143
|
-
#
|
|
3144
|
-
#
|
|
3145
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
3146
|
-
# @param update_sandbox_network_settings [UpdateSandboxNetworkSettings]
|
|
1251
|
+
# Start sandbox
|
|
1252
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
3147
1253
|
# @param [Hash] opts the optional parameters
|
|
3148
1254
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
3149
1255
|
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
3150
|
-
def
|
|
1256
|
+
def start_sandbox_with_http_info(sandbox_id, opts = {})
|
|
3151
1257
|
if @api_client.config.debugging
|
|
3152
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
3153
|
-
end
|
|
3154
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
3155
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
3156
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.update_network_settings"
|
|
1258
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.start_sandbox ...'
|
|
3157
1259
|
end
|
|
3158
|
-
# verify the required parameter '
|
|
3159
|
-
if @api_client.config.client_side_validation &&
|
|
3160
|
-
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"
|
|
3161
1263
|
end
|
|
3162
1264
|
# resource path
|
|
3163
|
-
local_var_path = '/sandbox/{
|
|
1265
|
+
local_var_path = '/sandbox/{sandboxId}/start'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
3164
1266
|
|
|
3165
1267
|
# query parameters
|
|
3166
1268
|
query_params = opts[:query_params] || {}
|
|
@@ -3169,18 +1271,13 @@ module DaytonaApiClient
|
|
|
3169
1271
|
header_params = opts[:header_params] || {}
|
|
3170
1272
|
# HTTP header 'Accept' (if needed)
|
|
3171
1273
|
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3172
|
-
# HTTP header 'Content-Type'
|
|
3173
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3174
|
-
if !content_type.nil?
|
|
3175
|
-
header_params['Content-Type'] = content_type
|
|
3176
|
-
end
|
|
3177
1274
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
3178
1275
|
|
|
3179
1276
|
# form parameters
|
|
3180
1277
|
form_params = opts[:form_params] || {}
|
|
3181
1278
|
|
|
3182
1279
|
# http body (model)
|
|
3183
|
-
post_body = opts[:debug_body]
|
|
1280
|
+
post_body = opts[:debug_body]
|
|
3184
1281
|
|
|
3185
1282
|
# return_type
|
|
3186
1283
|
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
@@ -3189,7 +1286,7 @@ module DaytonaApiClient
|
|
|
3189
1286
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
3190
1287
|
|
|
3191
1288
|
new_options = opts.merge(
|
|
3192
|
-
:operation => :"SandboxApi.
|
|
1289
|
+
:operation => :"SandboxApi.start_sandbox",
|
|
3193
1290
|
:header_params => header_params,
|
|
3194
1291
|
:query_params => query_params,
|
|
3195
1292
|
:form_params => form_params,
|
|
@@ -3200,50 +1297,42 @@ module DaytonaApiClient
|
|
|
3200
1297
|
|
|
3201
1298
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3202
1299
|
if @api_client.config.debugging
|
|
3203
|
-
@api_client.config.logger.debug "API called: SandboxApi#
|
|
1300
|
+
@api_client.config.logger.debug "API called: SandboxApi#start_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3204
1301
|
end
|
|
3205
1302
|
return data, status_code, headers
|
|
3206
1303
|
end
|
|
3207
1304
|
|
|
3208
|
-
#
|
|
3209
|
-
# @param
|
|
3210
|
-
# @param is_public [Boolean] Public status to set
|
|
1305
|
+
# Stop sandbox
|
|
1306
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
3211
1307
|
# @param [Hash] opts the optional parameters
|
|
3212
1308
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
3213
|
-
# @return [
|
|
3214
|
-
def
|
|
3215
|
-
|
|
3216
|
-
|
|
1309
|
+
# @return [nil]
|
|
1310
|
+
def stop_sandbox(sandbox_id, opts = {})
|
|
1311
|
+
stop_sandbox_with_http_info(sandbox_id, opts)
|
|
1312
|
+
nil
|
|
3217
1313
|
end
|
|
3218
1314
|
|
|
3219
|
-
#
|
|
3220
|
-
# @param
|
|
3221
|
-
# @param is_public [Boolean] Public status to set
|
|
1315
|
+
# Stop sandbox
|
|
1316
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
3222
1317
|
# @param [Hash] opts the optional parameters
|
|
3223
1318
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
3224
|
-
# @return [Array<(
|
|
3225
|
-
def
|
|
1319
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1320
|
+
def stop_sandbox_with_http_info(sandbox_id, opts = {})
|
|
3226
1321
|
if @api_client.config.debugging
|
|
3227
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
3228
|
-
end
|
|
3229
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
3230
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
3231
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.update_public_status"
|
|
1322
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.stop_sandbox ...'
|
|
3232
1323
|
end
|
|
3233
|
-
# verify the required parameter '
|
|
3234
|
-
if @api_client.config.client_side_validation &&
|
|
3235
|
-
fail ArgumentError, "Missing the required parameter '
|
|
1324
|
+
# verify the required parameter 'sandbox_id' is set
|
|
1325
|
+
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
1326
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.stop_sandbox"
|
|
3236
1327
|
end
|
|
3237
1328
|
# resource path
|
|
3238
|
-
local_var_path = '/sandbox/{
|
|
1329
|
+
local_var_path = '/sandbox/{sandboxId}/stop'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
3239
1330
|
|
|
3240
1331
|
# query parameters
|
|
3241
1332
|
query_params = opts[:query_params] || {}
|
|
3242
1333
|
|
|
3243
1334
|
# header parameters
|
|
3244
1335
|
header_params = opts[:header_params] || {}
|
|
3245
|
-
# HTTP header 'Accept' (if needed)
|
|
3246
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3247
1336
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
3248
1337
|
|
|
3249
1338
|
# form parameters
|
|
@@ -3253,13 +1342,13 @@ module DaytonaApiClient
|
|
|
3253
1342
|
post_body = opts[:debug_body]
|
|
3254
1343
|
|
|
3255
1344
|
# return_type
|
|
3256
|
-
return_type = opts[:debug_return_type]
|
|
1345
|
+
return_type = opts[:debug_return_type]
|
|
3257
1346
|
|
|
3258
1347
|
# auth_names
|
|
3259
1348
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
3260
1349
|
|
|
3261
1350
|
new_options = opts.merge(
|
|
3262
|
-
:operation => :"SandboxApi.
|
|
1351
|
+
:operation => :"SandboxApi.stop_sandbox",
|
|
3263
1352
|
:header_params => header_params,
|
|
3264
1353
|
:query_params => query_params,
|
|
3265
1354
|
:form_params => form_params,
|
|
@@ -3270,73 +1359,64 @@ module DaytonaApiClient
|
|
|
3270
1359
|
|
|
3271
1360
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3272
1361
|
if @api_client.config.debugging
|
|
3273
|
-
@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}"
|
|
3274
1363
|
end
|
|
3275
1364
|
return data, status_code, headers
|
|
3276
1365
|
end
|
|
3277
1366
|
|
|
3278
|
-
# Update
|
|
3279
|
-
#
|
|
3280
|
-
# @param
|
|
3281
|
-
# @param update_sandbox_secrets [UpdateSandboxSecrets]
|
|
1367
|
+
# Update public status
|
|
1368
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1369
|
+
# @param is_public [Boolean] Public status to set
|
|
3282
1370
|
# @param [Hash] opts the optional parameters
|
|
3283
1371
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
3284
|
-
# @return [
|
|
3285
|
-
def
|
|
3286
|
-
|
|
3287
|
-
|
|
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
|
|
3288
1376
|
end
|
|
3289
1377
|
|
|
3290
|
-
# Update
|
|
3291
|
-
#
|
|
3292
|
-
# @param
|
|
3293
|
-
# @param update_sandbox_secrets [UpdateSandboxSecrets]
|
|
1378
|
+
# Update public status
|
|
1379
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1380
|
+
# @param is_public [Boolean] Public status to set
|
|
3294
1381
|
# @param [Hash] opts the optional parameters
|
|
3295
1382
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
3296
|
-
# @return [Array<(
|
|
3297
|
-
def
|
|
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 = {})
|
|
3298
1385
|
if @api_client.config.debugging
|
|
3299
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
1386
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.update_public_status ...'
|
|
3300
1387
|
end
|
|
3301
|
-
# verify the required parameter '
|
|
3302
|
-
if @api_client.config.client_side_validation &&
|
|
3303
|
-
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"
|
|
3304
1391
|
end
|
|
3305
|
-
# verify the required parameter '
|
|
3306
|
-
if @api_client.config.client_side_validation &&
|
|
3307
|
-
fail ArgumentError, "Missing the required parameter '
|
|
1392
|
+
# verify the required parameter 'is_public' is set
|
|
1393
|
+
if @api_client.config.client_side_validation && is_public.nil?
|
|
1394
|
+
fail ArgumentError, "Missing the required parameter 'is_public' when calling SandboxApi.update_public_status"
|
|
3308
1395
|
end
|
|
3309
1396
|
# resource path
|
|
3310
|
-
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))
|
|
3311
1398
|
|
|
3312
1399
|
# query parameters
|
|
3313
1400
|
query_params = opts[:query_params] || {}
|
|
3314
1401
|
|
|
3315
1402
|
# header parameters
|
|
3316
1403
|
header_params = opts[:header_params] || {}
|
|
3317
|
-
# HTTP header 'Accept' (if needed)
|
|
3318
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3319
|
-
# HTTP header 'Content-Type'
|
|
3320
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3321
|
-
if !content_type.nil?
|
|
3322
|
-
header_params['Content-Type'] = content_type
|
|
3323
|
-
end
|
|
3324
1404
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
3325
1405
|
|
|
3326
1406
|
# form parameters
|
|
3327
1407
|
form_params = opts[:form_params] || {}
|
|
3328
1408
|
|
|
3329
1409
|
# http body (model)
|
|
3330
|
-
post_body = opts[:debug_body]
|
|
1410
|
+
post_body = opts[:debug_body]
|
|
3331
1411
|
|
|
3332
1412
|
# return_type
|
|
3333
|
-
return_type = opts[:debug_return_type]
|
|
1413
|
+
return_type = opts[:debug_return_type]
|
|
3334
1414
|
|
|
3335
1415
|
# auth_names
|
|
3336
1416
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
3337
1417
|
|
|
3338
1418
|
new_options = opts.merge(
|
|
3339
|
-
:operation => :"SandboxApi.
|
|
1419
|
+
:operation => :"SandboxApi.update_public_status",
|
|
3340
1420
|
:header_params => header_params,
|
|
3341
1421
|
:query_params => query_params,
|
|
3342
1422
|
:form_params => form_params,
|
|
@@ -3345,9 +1425,9 @@ module DaytonaApiClient
|
|
|
3345
1425
|
:return_type => return_type
|
|
3346
1426
|
)
|
|
3347
1427
|
|
|
3348
|
-
data, status_code, headers = @api_client.call_api(:
|
|
1428
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3349
1429
|
if @api_client.config.debugging
|
|
3350
|
-
@api_client.config.logger.debug "API called: SandboxApi#
|
|
1430
|
+
@api_client.config.logger.debug "API called: SandboxApi#update_public_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3351
1431
|
end
|
|
3352
1432
|
return data, status_code, headers
|
|
3353
1433
|
end
|
|
@@ -3392,7 +1472,7 @@ module DaytonaApiClient
|
|
|
3392
1472
|
# HTTP header 'Content-Type'
|
|
3393
1473
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3394
1474
|
if !content_type.nil?
|
|
3395
|
-
|
|
1475
|
+
header_params['Content-Type'] = content_type
|
|
3396
1476
|
end
|
|
3397
1477
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
3398
1478
|
|