daytona_api_client 0.216.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +9 -0
- data/Gemfile.lock +101 -0
- data/daytona_api_client.gemspec +4 -4
- data/lib/daytona_api_client/api/api_keys_api.rb +2 -2
- data/lib/daytona_api_client/api/audit_api.rb +102 -59
- 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 +279 -1591
- 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 +429 -2200
- data/lib/daytona_api_client/api/snapshots_api.rb +117 -46
- data/lib/daytona_api_client/api/toolbox_api.rb +5108 -0
- data/lib/daytona_api_client/api/users_api.rb +172 -100
- 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 +93 -51
- data/lib/daytona_api_client/models/announcement.rb +74 -3
- data/lib/daytona_api_client/models/api_key_list.rb +78 -17
- 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/{audit_target_scenario.rb → computer_use_status_response.rb} +96 -44
- 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 +290 -0
- data/lib/daytona_api_client/models/create_organization_role.rb +74 -3
- data/lib/daytona_api_client/models/create_runner.rb +361 -51
- 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/{volume_created_webhook.rb → create_user.rb} +113 -131
- 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 -140
- 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/{oidc_id_p_config.rb → download_files.rb} +95 -86
- data/lib/daytona_api_client/models/{create_warm_pool.rb → execute_request.rb} +106 -62
- data/lib/daytona_api_client/models/{metric_data_point.rb → execute_response.rb} +109 -38
- data/lib/daytona_api_client/models/file_info.rb +417 -0
- data/lib/daytona_api_client/models/{snapshot_removed_webhook.rb → file_status.rb} +133 -142
- data/lib/daytona_api_client/models/git_add_request.rb +264 -0
- data/lib/daytona_api_client/models/{create_secret.rb → git_branch_request.rb} +106 -59
- 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/{snapshot_created_webhook.rb → git_commit_info.rb} +151 -161
- 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_region.rb → git_delete_branch_request.rb} +106 -54
- 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/{gpu_capacity.rb → lsp_server_request.rb} +109 -104
- data/lib/daytona_api_client/models/{secret.rb → lsp_symbol.rb} +121 -146
- 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/{available_sandbox_class.rb → mouse_position.rb} +109 -95
- 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 +78 -68
- data/lib/daytona_api_client/models/organization.rb +159 -307
- 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 +236 -0
- data/lib/daytona_api_client/models/organization_suspension.rb +290 -0
- 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 +80 -19
- data/lib/daytona_api_client/models/{paginated_jobs.rb → paginated_sandboxes.rb} +80 -9
- data/lib/daytona_api_client/models/paginated_snapshots.rb +77 -6
- data/lib/daytona_api_client/models/{paginated_logs.rb → paginated_snapshots_dto.rb} +80 -13
- 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/{sandbox_identity.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/replace_result.rb +236 -0
- 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 +105 -210
- 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_sandbox_snapshot.rb → sandbox_info.rb} +113 -17
- 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/{gpu_capacity_response.rb → search_files_response.rb} +93 -49
- data/lib/daytona_api_client/models/send_webhook_dto.rb +273 -0
- 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/session_execute_response.rb +239 -0
- data/lib/daytona_api_client/models/{generate_workos_admin_portal_link.rb → set_snapshot_general_status_dto.rb} +93 -44
- 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 +317 -0
- 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 -51
- 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} +303 -226
- data/lib/daytona_api_client/version.rb +2 -2
- data/lib/daytona_api_client.rb +83 -93
- data/project.json +13 -38
- metadata +88 -102
- data/.gitignore +0 -39
- data/.openapi-generator/FILES +0 -175
- 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/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/audit_scenarios.rb +0 -167
- data/lib/daytona_api_client/models/create_identity_provider.rb +0 -269
- data/lib/daytona_api_client/models/create_runner_sandbox_class.rb +0 -42
- 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 -45
- 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/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_created_webhook.rb +0 -349
- 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/sandbox_state_updated_webhook.rb +0 -349
- data/lib/daytona_api_client/models/snapshot_state_updated_webhook.rb +0 -376
- 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_span.rb +0 -332
- 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_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/volume_state_updated_webhook.rb +0 -376
- data/lib/daytona_api_client/models/warm_pool.rb +0 -490
- data/lib/daytona_api_client/models/webhook_event.rb +0 -46
- data/lib/daytona_api_client/models/workos_admin_portal_intent.rb +0 -41
- data/lib/daytona_api_client/models/workos_admin_portal_link.rb +0 -165
- data/lib/daytona_api_client/models/workos_sso_connection.rb +0 -329
|
@@ -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,108 +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
|
-
|
|
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 = {})
|
|
857
787
|
if @api_client.config.debugging
|
|
858
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
788
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.list_sandboxes_paginated ...'
|
|
859
789
|
end
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.get_region_quota_by_sandbox_id"
|
|
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.'
|
|
863
792
|
end
|
|
864
|
-
# resource path
|
|
865
|
-
local_var_path = '/sandbox/{sandboxId}/region-quota'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
866
793
|
|
|
867
|
-
|
|
868
|
-
|
|
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.'
|
|
796
|
+
end
|
|
869
797
|
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
874
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
875
|
-
|
|
876
|
-
# form parameters
|
|
877
|
-
form_params = opts[:form_params] || {}
|
|
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.'
|
|
800
|
+
end
|
|
878
801
|
|
|
879
|
-
|
|
880
|
-
|
|
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}"
|
|
805
|
+
end
|
|
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.'
|
|
808
|
+
end
|
|
881
809
|
|
|
882
|
-
|
|
883
|
-
|
|
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.'
|
|
812
|
+
end
|
|
884
813
|
|
|
885
|
-
|
|
886
|
-
|
|
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.'
|
|
816
|
+
end
|
|
887
817
|
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
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
|
-
)
|
|
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.'
|
|
820
|
+
end
|
|
897
821
|
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
@api_client.config.logger.debug "API called: SandboxApi#get_region_quota_by_sandbox_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
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.'
|
|
901
824
|
end
|
|
902
|
-
return data, status_code, headers
|
|
903
|
-
end
|
|
904
825
|
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
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
|
|
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.'
|
|
828
|
+
end
|
|
916
829
|
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
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 ...'
|
|
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}"
|
|
927
833
|
end
|
|
928
|
-
|
|
929
|
-
if @api_client.config.client_side_validation &&
|
|
930
|
-
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}"
|
|
931
837
|
end
|
|
932
838
|
# resource path
|
|
933
|
-
local_var_path = '/sandbox/
|
|
839
|
+
local_var_path = '/sandbox/paginated'
|
|
934
840
|
|
|
935
841
|
# query parameters
|
|
936
842
|
query_params = opts[:query_params] || {}
|
|
937
|
-
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?
|
|
938
861
|
|
|
939
862
|
# header parameters
|
|
940
863
|
header_params = opts[:header_params] || {}
|
|
@@ -949,13 +872,13 @@ module DaytonaApiClient
|
|
|
949
872
|
post_body = opts[:debug_body]
|
|
950
873
|
|
|
951
874
|
# return_type
|
|
952
|
-
return_type = opts[:debug_return_type] || '
|
|
875
|
+
return_type = opts[:debug_return_type] || 'PaginatedSandboxes'
|
|
953
876
|
|
|
954
877
|
# auth_names
|
|
955
878
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
956
879
|
|
|
957
880
|
new_options = opts.merge(
|
|
958
|
-
:operation => :"SandboxApi.
|
|
881
|
+
:operation => :"SandboxApi.list_sandboxes_paginated",
|
|
959
882
|
:header_params => header_params,
|
|
960
883
|
:query_params => query_params,
|
|
961
884
|
:form_params => form_params,
|
|
@@ -966,36 +889,42 @@ module DaytonaApiClient
|
|
|
966
889
|
|
|
967
890
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
968
891
|
if @api_client.config.debugging
|
|
969
|
-
@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}"
|
|
970
893
|
end
|
|
971
894
|
return data, status_code, headers
|
|
972
895
|
end
|
|
973
896
|
|
|
974
|
-
#
|
|
975
|
-
# @param
|
|
897
|
+
# Replace sandbox labels
|
|
898
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
899
|
+
# @param sandbox_labels [SandboxLabels]
|
|
976
900
|
# @param [Hash] opts the optional parameters
|
|
977
901
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
978
|
-
# @return [
|
|
979
|
-
def
|
|
980
|
-
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)
|
|
981
905
|
data
|
|
982
906
|
end
|
|
983
907
|
|
|
984
|
-
#
|
|
985
|
-
# @param
|
|
908
|
+
# Replace sandbox labels
|
|
909
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
910
|
+
# @param sandbox_labels [SandboxLabels]
|
|
986
911
|
# @param [Hash] opts the optional parameters
|
|
987
912
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
988
|
-
# @return [Array<(
|
|
989
|
-
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 = {})
|
|
990
915
|
if @api_client.config.debugging
|
|
991
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
916
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.replace_labels ...'
|
|
917
|
+
end
|
|
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"
|
|
992
921
|
end
|
|
993
|
-
# verify the required parameter '
|
|
994
|
-
if @api_client.config.client_side_validation &&
|
|
995
|
-
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"
|
|
996
925
|
end
|
|
997
926
|
# resource path
|
|
998
|
-
local_var_path = '/sandbox/{
|
|
927
|
+
local_var_path = '/sandbox/{sandboxId}/labels'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
999
928
|
|
|
1000
929
|
# query parameters
|
|
1001
930
|
query_params = opts[:query_params] || {}
|
|
@@ -1004,22 +933,27 @@ module DaytonaApiClient
|
|
|
1004
933
|
header_params = opts[:header_params] || {}
|
|
1005
934
|
# HTTP header 'Accept' (if needed)
|
|
1006
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
|
|
1007
941
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1008
942
|
|
|
1009
943
|
# form parameters
|
|
1010
944
|
form_params = opts[:form_params] || {}
|
|
1011
945
|
|
|
1012
946
|
# http body (model)
|
|
1013
|
-
post_body = opts[:debug_body]
|
|
947
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_labels)
|
|
1014
948
|
|
|
1015
949
|
# return_type
|
|
1016
|
-
return_type = opts[:debug_return_type] || '
|
|
950
|
+
return_type = opts[:debug_return_type] || 'SandboxLabels'
|
|
1017
951
|
|
|
1018
952
|
# auth_names
|
|
1019
953
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1020
954
|
|
|
1021
955
|
new_options = opts.merge(
|
|
1022
|
-
:operation => :"SandboxApi.
|
|
956
|
+
:operation => :"SandboxApi.replace_labels",
|
|
1023
957
|
:header_params => header_params,
|
|
1024
958
|
:query_params => query_params,
|
|
1025
959
|
:form_params => form_params,
|
|
@@ -1028,49 +962,47 @@ module DaytonaApiClient
|
|
|
1028
962
|
:return_type => return_type
|
|
1029
963
|
)
|
|
1030
964
|
|
|
1031
|
-
data, status_code, headers = @api_client.call_api(:
|
|
965
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
1032
966
|
if @api_client.config.debugging
|
|
1033
|
-
@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}"
|
|
1034
968
|
end
|
|
1035
969
|
return data, status_code, headers
|
|
1036
970
|
end
|
|
1037
971
|
|
|
1038
|
-
#
|
|
1039
|
-
# @param
|
|
972
|
+
# Revoke SSH access for sandbox
|
|
973
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1040
974
|
# @param [Hash] opts the optional parameters
|
|
1041
975
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1042
|
-
# @option opts [
|
|
1043
|
-
# @return [
|
|
1044
|
-
def
|
|
1045
|
-
|
|
1046
|
-
|
|
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
|
|
1047
981
|
end
|
|
1048
982
|
|
|
1049
|
-
#
|
|
1050
|
-
# @param
|
|
983
|
+
# Revoke SSH access for sandbox
|
|
984
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1051
985
|
# @param [Hash] opts the optional parameters
|
|
1052
986
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1053
|
-
# @option opts [
|
|
1054
|
-
# @return [Array<(
|
|
1055
|
-
def
|
|
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 = {})
|
|
1056
990
|
if @api_client.config.debugging
|
|
1057
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
991
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.revoke_ssh_access ...'
|
|
1058
992
|
end
|
|
1059
|
-
# verify the required parameter '
|
|
1060
|
-
if @api_client.config.client_side_validation &&
|
|
1061
|
-
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"
|
|
1062
996
|
end
|
|
1063
997
|
# resource path
|
|
1064
|
-
local_var_path = '/sandbox/{
|
|
998
|
+
local_var_path = '/sandbox/{sandboxId}/ssh-access'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
1065
999
|
|
|
1066
1000
|
# query parameters
|
|
1067
1001
|
query_params = opts[:query_params] || {}
|
|
1068
|
-
query_params[:'
|
|
1002
|
+
query_params[:'token'] = opts[:'token'] if !opts[:'token'].nil?
|
|
1069
1003
|
|
|
1070
1004
|
# header parameters
|
|
1071
1005
|
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
1006
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1075
1007
|
|
|
1076
1008
|
# form parameters
|
|
@@ -1080,13 +1012,13 @@ module DaytonaApiClient
|
|
|
1080
1012
|
post_body = opts[:debug_body]
|
|
1081
1013
|
|
|
1082
1014
|
# return_type
|
|
1083
|
-
return_type = opts[:debug_return_type]
|
|
1015
|
+
return_type = opts[:debug_return_type]
|
|
1084
1016
|
|
|
1085
1017
|
# auth_names
|
|
1086
1018
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1087
1019
|
|
|
1088
1020
|
new_options = opts.merge(
|
|
1089
|
-
:operation => :"SandboxApi.
|
|
1021
|
+
:operation => :"SandboxApi.revoke_ssh_access",
|
|
1090
1022
|
:header_params => header_params,
|
|
1091
1023
|
:query_params => query_params,
|
|
1092
1024
|
:form_params => form_params,
|
|
@@ -1095,74 +1027,50 @@ module DaytonaApiClient
|
|
|
1095
1027
|
:return_type => return_type
|
|
1096
1028
|
)
|
|
1097
1029
|
|
|
1098
|
-
data, status_code, headers = @api_client.call_api(:
|
|
1030
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
1099
1031
|
if @api_client.config.debugging
|
|
1100
|
-
@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}"
|
|
1101
1033
|
end
|
|
1102
1034
|
return data, status_code, headers
|
|
1103
1035
|
end
|
|
1104
1036
|
|
|
1105
|
-
#
|
|
1106
|
-
# Retrieve OTEL logs for a sandbox within a time range
|
|
1037
|
+
# Set sandbox auto-archive interval
|
|
1107
1038
|
# @param sandbox_id [String] ID of the sandbox
|
|
1108
|
-
# @param
|
|
1109
|
-
# @param to [Time] End of time range (ISO 8601)
|
|
1039
|
+
# @param interval [Float] Auto-archive interval in minutes (0 means the maximum interval will be used)
|
|
1110
1040
|
# @param [Hash] opts the optional parameters
|
|
1111
1041
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1112
|
-
# @
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
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
|
|
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
|
|
1120
1046
|
end
|
|
1121
1047
|
|
|
1122
|
-
#
|
|
1123
|
-
# Retrieve OTEL logs for a sandbox within a time range
|
|
1048
|
+
# Set sandbox auto-archive interval
|
|
1124
1049
|
# @param sandbox_id [String] ID of the sandbox
|
|
1125
|
-
# @param
|
|
1126
|
-
# @param to [Time] End of time range (ISO 8601)
|
|
1050
|
+
# @param interval [Float] Auto-archive interval in minutes (0 means the maximum interval will be used)
|
|
1127
1051
|
# @param [Hash] opts the optional parameters
|
|
1128
1052
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1129
|
-
# @
|
|
1130
|
-
|
|
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 = {})
|
|
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 = {})
|
|
1135
1055
|
if @api_client.config.debugging
|
|
1136
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
1056
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_archive_interval ...'
|
|
1137
1057
|
end
|
|
1138
1058
|
# verify the required parameter 'sandbox_id' is set
|
|
1139
1059
|
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
1140
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.
|
|
1060
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.set_auto_archive_interval"
|
|
1141
1061
|
end
|
|
1142
|
-
# verify the required parameter '
|
|
1143
|
-
if @api_client.config.client_side_validation &&
|
|
1144
|
-
fail ArgumentError, "Missing the required parameter '
|
|
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"
|
|
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"
|
|
1149
1065
|
end
|
|
1150
1066
|
# resource path
|
|
1151
|
-
local_var_path = '/sandbox/{sandboxId}/
|
|
1067
|
+
local_var_path = '/sandbox/{sandboxId}/autoarchive/{interval}'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s)).sub('{' + 'interval' + '}', CGI.escape(interval.to_s))
|
|
1152
1068
|
|
|
1153
1069
|
# query parameters
|
|
1154
1070
|
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
1071
|
|
|
1162
1072
|
# header parameters
|
|
1163
1073
|
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
1074
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1167
1075
|
|
|
1168
1076
|
# form parameters
|
|
@@ -1172,13 +1080,13 @@ module DaytonaApiClient
|
|
|
1172
1080
|
post_body = opts[:debug_body]
|
|
1173
1081
|
|
|
1174
1082
|
# return_type
|
|
1175
|
-
return_type = opts[:debug_return_type]
|
|
1083
|
+
return_type = opts[:debug_return_type]
|
|
1176
1084
|
|
|
1177
1085
|
# auth_names
|
|
1178
1086
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1179
1087
|
|
|
1180
1088
|
new_options = opts.merge(
|
|
1181
|
-
:operation => :"SandboxApi.
|
|
1089
|
+
:operation => :"SandboxApi.set_auto_archive_interval",
|
|
1182
1090
|
:header_params => header_params,
|
|
1183
1091
|
:query_params => query_params,
|
|
1184
1092
|
:form_params => form_params,
|
|
@@ -1187,65 +1095,50 @@ module DaytonaApiClient
|
|
|
1187
1095
|
:return_type => return_type
|
|
1188
1096
|
)
|
|
1189
1097
|
|
|
1190
|
-
data, status_code, headers = @api_client.call_api(:
|
|
1098
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1191
1099
|
if @api_client.config.debugging
|
|
1192
|
-
@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}"
|
|
1193
1101
|
end
|
|
1194
1102
|
return data, status_code, headers
|
|
1195
1103
|
end
|
|
1196
1104
|
|
|
1197
|
-
#
|
|
1198
|
-
# Retrieve OTEL metrics for a sandbox within a time range
|
|
1105
|
+
# Set sandbox auto-delete interval
|
|
1199
1106
|
# @param sandbox_id [String] ID of the sandbox
|
|
1200
|
-
# @param
|
|
1201
|
-
# @param to [Time] End of time range (ISO 8601)
|
|
1107
|
+
# @param interval [Float] Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
|
|
1202
1108
|
# @param [Hash] opts the optional parameters
|
|
1203
1109
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1204
|
-
# @
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
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
|
|
1209
1114
|
end
|
|
1210
1115
|
|
|
1211
|
-
#
|
|
1212
|
-
# Retrieve OTEL metrics for a sandbox within a time range
|
|
1116
|
+
# Set sandbox auto-delete interval
|
|
1213
1117
|
# @param sandbox_id [String] ID of the sandbox
|
|
1214
|
-
# @param
|
|
1215
|
-
# @param to [Time] End of time range (ISO 8601)
|
|
1118
|
+
# @param interval [Float] Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
|
|
1216
1119
|
# @param [Hash] opts the optional parameters
|
|
1217
1120
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1218
|
-
# @
|
|
1219
|
-
|
|
1220
|
-
def get_sandbox_metrics_with_http_info(sandbox_id, from, to, 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 = {})
|
|
1221
1123
|
if @api_client.config.debugging
|
|
1222
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
1124
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_delete_interval ...'
|
|
1223
1125
|
end
|
|
1224
1126
|
# verify the required parameter 'sandbox_id' is set
|
|
1225
1127
|
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
1226
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.
|
|
1128
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.set_auto_delete_interval"
|
|
1227
1129
|
end
|
|
1228
|
-
# verify the required parameter '
|
|
1229
|
-
if @api_client.config.client_side_validation &&
|
|
1230
|
-
fail ArgumentError, "Missing the required parameter '
|
|
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"
|
|
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"
|
|
1235
1133
|
end
|
|
1236
1134
|
# resource path
|
|
1237
|
-
local_var_path = '/sandbox/{sandboxId}/
|
|
1135
|
+
local_var_path = '/sandbox/{sandboxId}/autodelete/{interval}'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s)).sub('{' + 'interval' + '}', CGI.escape(interval.to_s))
|
|
1238
1136
|
|
|
1239
1137
|
# query parameters
|
|
1240
1138
|
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
1139
|
|
|
1245
1140
|
# header parameters
|
|
1246
1141
|
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
1142
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1250
1143
|
|
|
1251
1144
|
# form parameters
|
|
@@ -1255,13 +1148,13 @@ module DaytonaApiClient
|
|
|
1255
1148
|
post_body = opts[:debug_body]
|
|
1256
1149
|
|
|
1257
1150
|
# return_type
|
|
1258
|
-
return_type = opts[:debug_return_type]
|
|
1151
|
+
return_type = opts[:debug_return_type]
|
|
1259
1152
|
|
|
1260
1153
|
# auth_names
|
|
1261
1154
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1262
1155
|
|
|
1263
1156
|
new_options = opts.merge(
|
|
1264
|
-
:operation => :"SandboxApi.
|
|
1157
|
+
:operation => :"SandboxApi.set_auto_delete_interval",
|
|
1265
1158
|
:header_params => header_params,
|
|
1266
1159
|
:query_params => query_params,
|
|
1267
1160
|
:form_params => form_params,
|
|
@@ -1270,46 +1163,50 @@ module DaytonaApiClient
|
|
|
1270
1163
|
:return_type => return_type
|
|
1271
1164
|
)
|
|
1272
1165
|
|
|
1273
|
-
data, status_code, headers = @api_client.call_api(:
|
|
1166
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1274
1167
|
if @api_client.config.debugging
|
|
1275
|
-
@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}"
|
|
1276
1169
|
end
|
|
1277
1170
|
return data, status_code, headers
|
|
1278
1171
|
end
|
|
1279
1172
|
|
|
1280
|
-
#
|
|
1281
|
-
# @param
|
|
1173
|
+
# Set sandbox auto-stop interval
|
|
1174
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1175
|
+
# @param interval [Float] Auto-stop interval in minutes (0 to disable)
|
|
1282
1176
|
# @param [Hash] opts the optional parameters
|
|
1283
1177
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1284
|
-
# @return [
|
|
1285
|
-
def
|
|
1286
|
-
|
|
1287
|
-
|
|
1178
|
+
# @return [nil]
|
|
1179
|
+
def set_autostop_interval(sandbox_id, interval, opts = {})
|
|
1180
|
+
set_autostop_interval_with_http_info(sandbox_id, interval, opts)
|
|
1181
|
+
nil
|
|
1288
1182
|
end
|
|
1289
1183
|
|
|
1290
|
-
#
|
|
1291
|
-
# @param
|
|
1184
|
+
# Set sandbox auto-stop interval
|
|
1185
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1186
|
+
# @param interval [Float] Auto-stop interval in minutes (0 to disable)
|
|
1292
1187
|
# @param [Hash] opts the optional parameters
|
|
1293
1188
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1294
|
-
# @return [Array<(
|
|
1295
|
-
def
|
|
1189
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1190
|
+
def set_autostop_interval_with_http_info(sandbox_id, interval, opts = {})
|
|
1296
1191
|
if @api_client.config.debugging
|
|
1297
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
1192
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.set_autostop_interval ...'
|
|
1193
|
+
end
|
|
1194
|
+
# verify the required parameter 'sandbox_id' is set
|
|
1195
|
+
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
1196
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.set_autostop_interval"
|
|
1298
1197
|
end
|
|
1299
|
-
# verify the required parameter '
|
|
1300
|
-
if @api_client.config.client_side_validation &&
|
|
1301
|
-
fail ArgumentError, "Missing the required parameter '
|
|
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"
|
|
1302
1201
|
end
|
|
1303
1202
|
# resource path
|
|
1304
|
-
local_var_path = '/sandbox/{
|
|
1203
|
+
local_var_path = '/sandbox/{sandboxId}/autostop/{interval}'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s)).sub('{' + 'interval' + '}', CGI.escape(interval.to_s))
|
|
1305
1204
|
|
|
1306
1205
|
# query parameters
|
|
1307
1206
|
query_params = opts[:query_params] || {}
|
|
1308
1207
|
|
|
1309
1208
|
# header parameters
|
|
1310
1209
|
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
1210
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1314
1211
|
|
|
1315
1212
|
# form parameters
|
|
@@ -1319,13 +1216,13 @@ module DaytonaApiClient
|
|
|
1319
1216
|
post_body = opts[:debug_body]
|
|
1320
1217
|
|
|
1321
1218
|
# return_type
|
|
1322
|
-
return_type = opts[:debug_return_type]
|
|
1219
|
+
return_type = opts[:debug_return_type]
|
|
1323
1220
|
|
|
1324
1221
|
# auth_names
|
|
1325
1222
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1326
1223
|
|
|
1327
1224
|
new_options = opts.merge(
|
|
1328
|
-
:operation => :"SandboxApi.
|
|
1225
|
+
:operation => :"SandboxApi.set_autostop_interval",
|
|
1329
1226
|
:header_params => header_params,
|
|
1330
1227
|
:query_params => query_params,
|
|
1331
1228
|
:form_params => form_params,
|
|
@@ -1334,38 +1231,38 @@ module DaytonaApiClient
|
|
|
1334
1231
|
:return_type => return_type
|
|
1335
1232
|
)
|
|
1336
1233
|
|
|
1337
|
-
data, status_code, headers = @api_client.call_api(:
|
|
1234
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1338
1235
|
if @api_client.config.debugging
|
|
1339
|
-
@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}"
|
|
1340
1237
|
end
|
|
1341
1238
|
return data, status_code, headers
|
|
1342
1239
|
end
|
|
1343
1240
|
|
|
1344
|
-
#
|
|
1241
|
+
# Start sandbox
|
|
1345
1242
|
# @param sandbox_id [String] ID of the sandbox
|
|
1346
1243
|
# @param [Hash] opts the optional parameters
|
|
1347
1244
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1348
|
-
# @return [
|
|
1349
|
-
def
|
|
1350
|
-
data, _status_code, _headers =
|
|
1245
|
+
# @return [Sandbox]
|
|
1246
|
+
def start_sandbox(sandbox_id, opts = {})
|
|
1247
|
+
data, _status_code, _headers = start_sandbox_with_http_info(sandbox_id, opts)
|
|
1351
1248
|
data
|
|
1352
1249
|
end
|
|
1353
1250
|
|
|
1354
|
-
#
|
|
1251
|
+
# Start sandbox
|
|
1355
1252
|
# @param sandbox_id [String] ID of the sandbox
|
|
1356
1253
|
# @param [Hash] opts the optional parameters
|
|
1357
1254
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1358
|
-
# @return [Array<(
|
|
1359
|
-
def
|
|
1255
|
+
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
1256
|
+
def start_sandbox_with_http_info(sandbox_id, opts = {})
|
|
1360
1257
|
if @api_client.config.debugging
|
|
1361
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
1258
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.start_sandbox ...'
|
|
1362
1259
|
end
|
|
1363
1260
|
# verify the required parameter 'sandbox_id' is set
|
|
1364
1261
|
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
1365
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.
|
|
1262
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.start_sandbox"
|
|
1366
1263
|
end
|
|
1367
1264
|
# resource path
|
|
1368
|
-
local_var_path = '/sandbox/{sandboxId}/
|
|
1265
|
+
local_var_path = '/sandbox/{sandboxId}/start'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
1369
1266
|
|
|
1370
1267
|
# query parameters
|
|
1371
1268
|
query_params = opts[:query_params] || {}
|
|
@@ -1383,13 +1280,13 @@ module DaytonaApiClient
|
|
|
1383
1280
|
post_body = opts[:debug_body]
|
|
1384
1281
|
|
|
1385
1282
|
# return_type
|
|
1386
|
-
return_type = opts[:debug_return_type] || '
|
|
1283
|
+
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
1387
1284
|
|
|
1388
1285
|
# auth_names
|
|
1389
1286
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1390
1287
|
|
|
1391
1288
|
new_options = opts.merge(
|
|
1392
|
-
:operation => :"SandboxApi.
|
|
1289
|
+
:operation => :"SandboxApi.start_sandbox",
|
|
1393
1290
|
:header_params => header_params,
|
|
1394
1291
|
:query_params => query_params,
|
|
1395
1292
|
:form_params => form_params,
|
|
@@ -1398,54 +1295,44 @@ module DaytonaApiClient
|
|
|
1398
1295
|
:return_type => return_type
|
|
1399
1296
|
)
|
|
1400
1297
|
|
|
1401
|
-
data, status_code, headers = @api_client.call_api(:
|
|
1298
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1402
1299
|
if @api_client.config.debugging
|
|
1403
|
-
@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}"
|
|
1404
1301
|
end
|
|
1405
1302
|
return data, status_code, headers
|
|
1406
1303
|
end
|
|
1407
1304
|
|
|
1408
|
-
#
|
|
1409
|
-
# Retrieve all spans for a specific trace
|
|
1305
|
+
# Stop sandbox
|
|
1410
1306
|
# @param sandbox_id [String] ID of the sandbox
|
|
1411
|
-
# @param trace_id [String] ID of the trace
|
|
1412
1307
|
# @param [Hash] opts the optional parameters
|
|
1413
1308
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1414
|
-
# @return [
|
|
1415
|
-
def
|
|
1416
|
-
|
|
1417
|
-
|
|
1309
|
+
# @return [nil]
|
|
1310
|
+
def stop_sandbox(sandbox_id, opts = {})
|
|
1311
|
+
stop_sandbox_with_http_info(sandbox_id, opts)
|
|
1312
|
+
nil
|
|
1418
1313
|
end
|
|
1419
1314
|
|
|
1420
|
-
#
|
|
1421
|
-
# Retrieve all spans for a specific trace
|
|
1315
|
+
# Stop sandbox
|
|
1422
1316
|
# @param sandbox_id [String] ID of the sandbox
|
|
1423
|
-
# @param trace_id [String] ID of the trace
|
|
1424
1317
|
# @param [Hash] opts the optional parameters
|
|
1425
1318
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1426
|
-
# @return [Array<(
|
|
1427
|
-
def
|
|
1319
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1320
|
+
def stop_sandbox_with_http_info(sandbox_id, opts = {})
|
|
1428
1321
|
if @api_client.config.debugging
|
|
1429
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
1322
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.stop_sandbox ...'
|
|
1430
1323
|
end
|
|
1431
1324
|
# verify the required parameter 'sandbox_id' is set
|
|
1432
1325
|
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
1433
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.
|
|
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"
|
|
1326
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.stop_sandbox"
|
|
1438
1327
|
end
|
|
1439
1328
|
# resource path
|
|
1440
|
-
local_var_path = '/sandbox/{sandboxId}/
|
|
1329
|
+
local_var_path = '/sandbox/{sandboxId}/stop'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
1441
1330
|
|
|
1442
1331
|
# query parameters
|
|
1443
1332
|
query_params = opts[:query_params] || {}
|
|
1444
1333
|
|
|
1445
1334
|
# header parameters
|
|
1446
1335
|
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
1336
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1450
1337
|
|
|
1451
1338
|
# form parameters
|
|
@@ -1455,13 +1342,13 @@ module DaytonaApiClient
|
|
|
1455
1342
|
post_body = opts[:debug_body]
|
|
1456
1343
|
|
|
1457
1344
|
# return_type
|
|
1458
|
-
return_type = opts[:debug_return_type]
|
|
1345
|
+
return_type = opts[:debug_return_type]
|
|
1459
1346
|
|
|
1460
1347
|
# auth_names
|
|
1461
1348
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1462
1349
|
|
|
1463
1350
|
new_options = opts.merge(
|
|
1464
|
-
:operation => :"SandboxApi.
|
|
1351
|
+
:operation => :"SandboxApi.stop_sandbox",
|
|
1465
1352
|
:header_params => header_params,
|
|
1466
1353
|
:query_params => query_params,
|
|
1467
1354
|
:form_params => form_params,
|
|
@@ -1470,68 +1357,50 @@ module DaytonaApiClient
|
|
|
1470
1357
|
:return_type => return_type
|
|
1471
1358
|
)
|
|
1472
1359
|
|
|
1473
|
-
data, status_code, headers = @api_client.call_api(:
|
|
1360
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1474
1361
|
if @api_client.config.debugging
|
|
1475
|
-
@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}"
|
|
1476
1363
|
end
|
|
1477
1364
|
return data, status_code, headers
|
|
1478
1365
|
end
|
|
1479
1366
|
|
|
1480
|
-
#
|
|
1481
|
-
# Retrieve OTEL traces for a sandbox within a time range
|
|
1367
|
+
# Update public status
|
|
1482
1368
|
# @param sandbox_id [String] ID of the sandbox
|
|
1483
|
-
# @param
|
|
1484
|
-
# @param to [Time] End of time range (ISO 8601)
|
|
1369
|
+
# @param is_public [Boolean] Public status to set
|
|
1485
1370
|
# @param [Hash] opts the optional parameters
|
|
1486
1371
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1487
|
-
# @
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
data, _status_code, _headers = get_sandbox_traces_with_http_info(sandbox_id, from, to, opts)
|
|
1492
|
-
data
|
|
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
|
|
1493
1376
|
end
|
|
1494
1377
|
|
|
1495
|
-
#
|
|
1496
|
-
# Retrieve OTEL traces for a sandbox within a time range
|
|
1378
|
+
# Update public status
|
|
1497
1379
|
# @param sandbox_id [String] ID of the sandbox
|
|
1498
|
-
# @param
|
|
1499
|
-
# @param to [Time] End of time range (ISO 8601)
|
|
1380
|
+
# @param is_public [Boolean] Public status to set
|
|
1500
1381
|
# @param [Hash] opts the optional parameters
|
|
1501
1382
|
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1502
|
-
# @
|
|
1503
|
-
|
|
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 = {})
|
|
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 = {})
|
|
1506
1385
|
if @api_client.config.debugging
|
|
1507
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.
|
|
1386
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.update_public_status ...'
|
|
1508
1387
|
end
|
|
1509
1388
|
# verify the required parameter 'sandbox_id' is set
|
|
1510
1389
|
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
1511
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.
|
|
1390
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.update_public_status"
|
|
1512
1391
|
end
|
|
1513
|
-
# verify the required parameter '
|
|
1514
|
-
if @api_client.config.client_side_validation &&
|
|
1515
|
-
fail ArgumentError, "Missing the required parameter '
|
|
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"
|
|
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"
|
|
1520
1395
|
end
|
|
1521
1396
|
# resource path
|
|
1522
|
-
local_var_path = '/sandbox/{sandboxId}/
|
|
1397
|
+
local_var_path = '/sandbox/{sandboxId}/public/{isPublic}'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s)).sub('{' + 'isPublic' + '}', CGI.escape(is_public.to_s))
|
|
1523
1398
|
|
|
1524
1399
|
# query parameters
|
|
1525
1400
|
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
1401
|
|
|
1531
1402
|
# header parameters
|
|
1532
1403
|
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
1404
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1536
1405
|
|
|
1537
1406
|
# form parameters
|
|
@@ -1541,13 +1410,13 @@ module DaytonaApiClient
|
|
|
1541
1410
|
post_body = opts[:debug_body]
|
|
1542
1411
|
|
|
1543
1412
|
# return_type
|
|
1544
|
-
return_type = opts[:debug_return_type]
|
|
1413
|
+
return_type = opts[:debug_return_type]
|
|
1545
1414
|
|
|
1546
1415
|
# auth_names
|
|
1547
1416
|
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1548
1417
|
|
|
1549
1418
|
new_options = opts.merge(
|
|
1550
|
-
:operation => :"SandboxApi.
|
|
1419
|
+
:operation => :"SandboxApi.update_public_status",
|
|
1551
1420
|
:header_params => header_params,
|
|
1552
1421
|
:query_params => query_params,
|
|
1553
1422
|
:form_params => form_params,
|
|
@@ -1556,1653 +1425,13 @@ module DaytonaApiClient
|
|
|
1556
1425
|
:return_type => return_type
|
|
1557
1426
|
)
|
|
1558
1427
|
|
|
1559
|
-
data, status_code, headers = @api_client.call_api(:
|
|
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 [Integer] :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 [Float] :min_gpu Minimum GPU
|
|
1789
|
-
# @option opts [Float] :max_gpu Maximum GPU
|
|
1790
|
-
# @option opts [Boolean] :is_public Filter by public status
|
|
1791
|
-
# @option opts [Boolean] :is_recoverable Filter by recoverable status
|
|
1792
|
-
# @option opts [Time] :created_at_after Include items created after this timestamp
|
|
1793
|
-
# @option opts [Time] :created_at_before Include items created before this timestamp
|
|
1794
|
-
# @option opts [Time] :last_event_after Include items with last event after this timestamp
|
|
1795
|
-
# @option opts [Time] :last_event_before Include items with last event before this timestamp
|
|
1796
|
-
# @option opts [Time] :auto_destroy_at_after Include items scheduled for auto destroy after this timestamp
|
|
1797
|
-
# @option opts [Time] :auto_destroy_at_before Include items scheduled for auto destroy before this timestamp
|
|
1798
|
-
# @option opts [SandboxListSortField] :sort Field to sort by
|
|
1799
|
-
# @option opts [SandboxListSortDirection] :order Direction to sort by
|
|
1800
|
-
# @return [ListSandboxesResponse]
|
|
1801
|
-
def list_sandboxes(opts = {})
|
|
1802
|
-
data, _status_code, _headers = list_sandboxes_with_http_info(opts)
|
|
1803
|
-
data
|
|
1804
|
-
end
|
|
1805
|
-
|
|
1806
|
-
# List sandboxes
|
|
1807
|
-
# Advanced filtering and ordering. Eventually consistent.
|
|
1808
|
-
# @param [Hash] opts the optional parameters
|
|
1809
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1810
|
-
# @option opts [String] :cursor Pagination cursor from a previous response
|
|
1811
|
-
# @option opts [Integer] :limit Number of results per page (default to 100)
|
|
1812
|
-
# @option opts [String] :id Filter by ID prefix (case-insensitive)
|
|
1813
|
-
# @option opts [String] :name Filter by name prefix (case-insensitive)
|
|
1814
|
-
# @option opts [String] :labels JSON encoded labels to filter by
|
|
1815
|
-
# @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
|
|
1816
|
-
# @option opts [Boolean] :include_warm Include unclaimed warm pool sandboxes (excluded by default) (default to false)
|
|
1817
|
-
# @option opts [Array<SandboxState>] :states List of states to filter by.
|
|
1818
|
-
# @option opts [Array<String>] :snapshots List of snapshot names to filter by
|
|
1819
|
-
# @option opts [Array<String>] :region_ids List of regions IDs to filter by
|
|
1820
|
-
# @option opts [Array<SandboxClass>] :sandbox_classes List of sandbox classes to filter by
|
|
1821
|
-
# @option opts [Float] :min_cpu Minimum CPU
|
|
1822
|
-
# @option opts [Float] :max_cpu Maximum CPU
|
|
1823
|
-
# @option opts [Float] :min_memory_gi_b Minimum memory in GiB
|
|
1824
|
-
# @option opts [Float] :max_memory_gi_b Maximum memory in GiB
|
|
1825
|
-
# @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
|
|
1826
|
-
# @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
|
|
1827
|
-
# @option opts [Float] :min_gpu Minimum GPU
|
|
1828
|
-
# @option opts [Float] :max_gpu Maximum GPU
|
|
1829
|
-
# @option opts [Boolean] :is_public Filter by public status
|
|
1830
|
-
# @option opts [Boolean] :is_recoverable Filter by recoverable status
|
|
1831
|
-
# @option opts [Time] :created_at_after Include items created after this timestamp
|
|
1832
|
-
# @option opts [Time] :created_at_before Include items created before this timestamp
|
|
1833
|
-
# @option opts [Time] :last_event_after Include items with last event after this timestamp
|
|
1834
|
-
# @option opts [Time] :last_event_before Include items with last event before this timestamp
|
|
1835
|
-
# @option opts [Time] :auto_destroy_at_after Include items scheduled for auto destroy after this timestamp
|
|
1836
|
-
# @option opts [Time] :auto_destroy_at_before Include items scheduled for auto destroy before this timestamp
|
|
1837
|
-
# @option opts [SandboxListSortField] :sort Field to sort by
|
|
1838
|
-
# @option opts [SandboxListSortDirection] :order Direction to sort by
|
|
1839
|
-
# @return [Array<(ListSandboxesResponse, Integer, Hash)>] ListSandboxesResponse data, response status code and response headers
|
|
1840
|
-
def list_sandboxes_with_http_info(opts = {})
|
|
1841
|
-
if @api_client.config.debugging
|
|
1842
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.list_sandboxes ...'
|
|
1843
|
-
end
|
|
1844
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
|
|
1845
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes, must be smaller than or equal to 200.'
|
|
1846
|
-
end
|
|
1847
|
-
|
|
1848
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
1849
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" 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[:'min_cpu'].nil? && opts[:'min_cpu'] < 1
|
|
1853
|
-
fail ArgumentError, 'invalid value for "opts[:"min_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[:'max_cpu'].nil? && opts[:'max_cpu'] < 1
|
|
1857
|
-
fail ArgumentError, 'invalid value for "opts[:"max_cpu"]" 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[:'min_memory_gi_b'].nil? && opts[:'min_memory_gi_b'] < 1
|
|
1861
|
-
fail ArgumentError, 'invalid value for "opts[:"min_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[:'max_memory_gi_b'].nil? && opts[:'max_memory_gi_b'] < 1
|
|
1865
|
-
fail ArgumentError, 'invalid value for "opts[:"max_memory_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[:'min_disk_gi_b'].nil? && opts[:'min_disk_gi_b'] < 1
|
|
1869
|
-
fail ArgumentError, 'invalid value for "opts[:"min_disk_gi_b"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
|
|
1870
|
-
end
|
|
1871
|
-
|
|
1872
|
-
if @api_client.config.client_side_validation && !opts[:'max_disk_gi_b'].nil? && opts[:'max_disk_gi_b'] < 1
|
|
1873
|
-
fail ArgumentError, 'invalid value for "opts[:"max_disk_gi_b"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 1.'
|
|
1874
|
-
end
|
|
1875
|
-
|
|
1876
|
-
if @api_client.config.client_side_validation && !opts[:'min_gpu'].nil? && opts[:'min_gpu'] < 0
|
|
1877
|
-
fail ArgumentError, 'invalid value for "opts[:"min_gpu"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 0.'
|
|
1878
|
-
end
|
|
1879
|
-
|
|
1880
|
-
if @api_client.config.client_side_validation && !opts[:'max_gpu'].nil? && opts[:'max_gpu'] < 0
|
|
1881
|
-
fail ArgumentError, 'invalid value for "opts[:"max_gpu"]" when calling SandboxApi.list_sandboxes, must be greater than or equal to 0.'
|
|
1882
|
-
end
|
|
1883
|
-
|
|
1884
|
-
# resource path
|
|
1885
|
-
local_var_path = '/sandbox'
|
|
1886
|
-
|
|
1887
|
-
# query parameters
|
|
1888
|
-
query_params = opts[:query_params] || {}
|
|
1889
|
-
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
1890
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
1891
|
-
query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
|
|
1892
|
-
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
1893
|
-
query_params[:'labels'] = opts[:'labels'] if !opts[:'labels'].nil?
|
|
1894
|
-
query_params[:'includeErroredDeleted'] = opts[:'include_errored_deleted'] if !opts[:'include_errored_deleted'].nil?
|
|
1895
|
-
query_params[:'includeWarm'] = opts[:'include_warm'] if !opts[:'include_warm'].nil?
|
|
1896
|
-
query_params[:'states'] = @api_client.build_collection_param(opts[:'states'], :multi) if !opts[:'states'].nil?
|
|
1897
|
-
query_params[:'snapshots'] = @api_client.build_collection_param(opts[:'snapshots'], :multi) if !opts[:'snapshots'].nil?
|
|
1898
|
-
query_params[:'regionIds'] = @api_client.build_collection_param(opts[:'region_ids'], :multi) if !opts[:'region_ids'].nil?
|
|
1899
|
-
query_params[:'sandboxClasses'] = @api_client.build_collection_param(opts[:'sandbox_classes'], :multi) if !opts[:'sandbox_classes'].nil?
|
|
1900
|
-
query_params[:'minCpu'] = opts[:'min_cpu'] if !opts[:'min_cpu'].nil?
|
|
1901
|
-
query_params[:'maxCpu'] = opts[:'max_cpu'] if !opts[:'max_cpu'].nil?
|
|
1902
|
-
query_params[:'minMemoryGiB'] = opts[:'min_memory_gi_b'] if !opts[:'min_memory_gi_b'].nil?
|
|
1903
|
-
query_params[:'maxMemoryGiB'] = opts[:'max_memory_gi_b'] if !opts[:'max_memory_gi_b'].nil?
|
|
1904
|
-
query_params[:'minDiskGiB'] = opts[:'min_disk_gi_b'] if !opts[:'min_disk_gi_b'].nil?
|
|
1905
|
-
query_params[:'maxDiskGiB'] = opts[:'max_disk_gi_b'] if !opts[:'max_disk_gi_b'].nil?
|
|
1906
|
-
query_params[:'minGpu'] = opts[:'min_gpu'] if !opts[:'min_gpu'].nil?
|
|
1907
|
-
query_params[:'maxGpu'] = opts[:'max_gpu'] if !opts[:'max_gpu'].nil?
|
|
1908
|
-
query_params[:'isPublic'] = opts[:'is_public'] if !opts[:'is_public'].nil?
|
|
1909
|
-
query_params[:'isRecoverable'] = opts[:'is_recoverable'] if !opts[:'is_recoverable'].nil?
|
|
1910
|
-
query_params[:'createdAtAfter'] = opts[:'created_at_after'] if !opts[:'created_at_after'].nil?
|
|
1911
|
-
query_params[:'createdAtBefore'] = opts[:'created_at_before'] if !opts[:'created_at_before'].nil?
|
|
1912
|
-
query_params[:'lastEventAfter'] = opts[:'last_event_after'] if !opts[:'last_event_after'].nil?
|
|
1913
|
-
query_params[:'lastEventBefore'] = opts[:'last_event_before'] if !opts[:'last_event_before'].nil?
|
|
1914
|
-
query_params[:'autoDestroyAtAfter'] = opts[:'auto_destroy_at_after'] if !opts[:'auto_destroy_at_after'].nil?
|
|
1915
|
-
query_params[:'autoDestroyAtBefore'] = opts[:'auto_destroy_at_before'] if !opts[:'auto_destroy_at_before'].nil?
|
|
1916
|
-
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
1917
|
-
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
|
1918
|
-
|
|
1919
|
-
# header parameters
|
|
1920
|
-
header_params = opts[:header_params] || {}
|
|
1921
|
-
# HTTP header 'Accept' (if needed)
|
|
1922
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1923
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1924
|
-
|
|
1925
|
-
# form parameters
|
|
1926
|
-
form_params = opts[:form_params] || {}
|
|
1927
|
-
|
|
1928
|
-
# http body (model)
|
|
1929
|
-
post_body = opts[:debug_body]
|
|
1930
|
-
|
|
1931
|
-
# return_type
|
|
1932
|
-
return_type = opts[:debug_return_type] || 'ListSandboxesResponse'
|
|
1933
|
-
|
|
1934
|
-
# auth_names
|
|
1935
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1936
|
-
|
|
1937
|
-
new_options = opts.merge(
|
|
1938
|
-
:operation => :"SandboxApi.list_sandboxes",
|
|
1939
|
-
:header_params => header_params,
|
|
1940
|
-
:query_params => query_params,
|
|
1941
|
-
:form_params => form_params,
|
|
1942
|
-
:body => post_body,
|
|
1943
|
-
:auth_names => auth_names,
|
|
1944
|
-
:return_type => return_type
|
|
1945
|
-
)
|
|
1946
|
-
|
|
1947
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1948
|
-
if @api_client.config.debugging
|
|
1949
|
-
@api_client.config.logger.debug "API called: SandboxApi#list_sandboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1950
|
-
end
|
|
1951
|
-
return data, status_code, headers
|
|
1952
|
-
end
|
|
1953
|
-
|
|
1954
|
-
# Pause sandbox
|
|
1955
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
1956
|
-
# @param [Hash] opts the optional parameters
|
|
1957
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1958
|
-
# @return [Sandbox]
|
|
1959
|
-
def pause_sandbox(sandbox_id_or_name, opts = {})
|
|
1960
|
-
data, _status_code, _headers = pause_sandbox_with_http_info(sandbox_id_or_name, opts)
|
|
1961
|
-
data
|
|
1962
|
-
end
|
|
1963
|
-
|
|
1964
|
-
# Pause sandbox
|
|
1965
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
1966
|
-
# @param [Hash] opts the optional parameters
|
|
1967
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1968
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
1969
|
-
def pause_sandbox_with_http_info(sandbox_id_or_name, opts = {})
|
|
1970
|
-
if @api_client.config.debugging
|
|
1971
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.pause_sandbox ...'
|
|
1972
|
-
end
|
|
1973
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
1974
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
1975
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.pause_sandbox"
|
|
1976
|
-
end
|
|
1977
|
-
# resource path
|
|
1978
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/pause'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
1979
|
-
|
|
1980
|
-
# query parameters
|
|
1981
|
-
query_params = opts[:query_params] || {}
|
|
1982
|
-
|
|
1983
|
-
# header parameters
|
|
1984
|
-
header_params = opts[:header_params] || {}
|
|
1985
|
-
# HTTP header 'Accept' (if needed)
|
|
1986
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1987
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1988
|
-
|
|
1989
|
-
# form parameters
|
|
1990
|
-
form_params = opts[:form_params] || {}
|
|
1991
|
-
|
|
1992
|
-
# http body (model)
|
|
1993
|
-
post_body = opts[:debug_body]
|
|
1994
|
-
|
|
1995
|
-
# return_type
|
|
1996
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
1997
|
-
|
|
1998
|
-
# auth_names
|
|
1999
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2000
|
-
|
|
2001
|
-
new_options = opts.merge(
|
|
2002
|
-
:operation => :"SandboxApi.pause_sandbox",
|
|
2003
|
-
:header_params => header_params,
|
|
2004
|
-
:query_params => query_params,
|
|
2005
|
-
:form_params => form_params,
|
|
2006
|
-
:body => post_body,
|
|
2007
|
-
:auth_names => auth_names,
|
|
2008
|
-
:return_type => return_type
|
|
2009
|
-
)
|
|
2010
|
-
|
|
2011
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2012
|
-
if @api_client.config.debugging
|
|
2013
|
-
@api_client.config.logger.debug "API called: SandboxApi#pause_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2014
|
-
end
|
|
2015
|
-
return data, status_code, headers
|
|
2016
|
-
end
|
|
2017
|
-
|
|
2018
|
-
# Recover sandbox from error state
|
|
2019
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2020
|
-
# @param [Hash] opts the optional parameters
|
|
2021
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2022
|
-
# @option opts [Boolean] :skip_start If true, the sandbox is left in STOPPED after recovery instead of being started.
|
|
2023
|
-
# @return [Sandbox]
|
|
2024
|
-
def recover_sandbox(sandbox_id_or_name, opts = {})
|
|
2025
|
-
data, _status_code, _headers = recover_sandbox_with_http_info(sandbox_id_or_name, opts)
|
|
2026
|
-
data
|
|
2027
|
-
end
|
|
2028
|
-
|
|
2029
|
-
# Recover sandbox from error state
|
|
2030
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2031
|
-
# @param [Hash] opts the optional parameters
|
|
2032
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2033
|
-
# @option opts [Boolean] :skip_start If true, the sandbox is left in STOPPED after recovery instead of being started.
|
|
2034
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2035
|
-
def recover_sandbox_with_http_info(sandbox_id_or_name, opts = {})
|
|
2036
|
-
if @api_client.config.debugging
|
|
2037
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.recover_sandbox ...'
|
|
2038
|
-
end
|
|
2039
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2040
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2041
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.recover_sandbox"
|
|
2042
|
-
end
|
|
2043
|
-
# resource path
|
|
2044
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/recover'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
2045
|
-
|
|
2046
|
-
# query parameters
|
|
2047
|
-
query_params = opts[:query_params] || {}
|
|
2048
|
-
query_params[:'skipStart'] = opts[:'skip_start'] if !opts[:'skip_start'].nil?
|
|
2049
|
-
|
|
2050
|
-
# header parameters
|
|
2051
|
-
header_params = opts[:header_params] || {}
|
|
2052
|
-
# HTTP header 'Accept' (if needed)
|
|
2053
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2054
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2055
|
-
|
|
2056
|
-
# form parameters
|
|
2057
|
-
form_params = opts[:form_params] || {}
|
|
2058
|
-
|
|
2059
|
-
# http body (model)
|
|
2060
|
-
post_body = opts[:debug_body]
|
|
2061
|
-
|
|
2062
|
-
# return_type
|
|
2063
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
2064
|
-
|
|
2065
|
-
# auth_names
|
|
2066
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2067
|
-
|
|
2068
|
-
new_options = opts.merge(
|
|
2069
|
-
:operation => :"SandboxApi.recover_sandbox",
|
|
2070
|
-
:header_params => header_params,
|
|
2071
|
-
:query_params => query_params,
|
|
2072
|
-
:form_params => form_params,
|
|
2073
|
-
:body => post_body,
|
|
2074
|
-
:auth_names => auth_names,
|
|
2075
|
-
:return_type => return_type
|
|
2076
|
-
)
|
|
2077
|
-
|
|
2078
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2079
|
-
if @api_client.config.debugging
|
|
2080
|
-
@api_client.config.logger.debug "API called: SandboxApi#recover_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2081
|
-
end
|
|
2082
|
-
return data, status_code, headers
|
|
2083
|
-
end
|
|
2084
|
-
|
|
2085
|
-
# Replace sandbox labels
|
|
2086
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2087
|
-
# @param sandbox_labels [SandboxLabels]
|
|
2088
|
-
# @param [Hash] opts the optional parameters
|
|
2089
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2090
|
-
# @return [SandboxLabels]
|
|
2091
|
-
def replace_labels(sandbox_id_or_name, sandbox_labels, opts = {})
|
|
2092
|
-
data, _status_code, _headers = replace_labels_with_http_info(sandbox_id_or_name, sandbox_labels, opts)
|
|
2093
|
-
data
|
|
2094
|
-
end
|
|
2095
|
-
|
|
2096
|
-
# Replace sandbox labels
|
|
2097
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2098
|
-
# @param sandbox_labels [SandboxLabels]
|
|
2099
|
-
# @param [Hash] opts the optional parameters
|
|
2100
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2101
|
-
# @return [Array<(SandboxLabels, Integer, Hash)>] SandboxLabels data, response status code and response headers
|
|
2102
|
-
def replace_labels_with_http_info(sandbox_id_or_name, sandbox_labels, opts = {})
|
|
2103
|
-
if @api_client.config.debugging
|
|
2104
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.replace_labels ...'
|
|
2105
|
-
end
|
|
2106
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2107
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2108
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.replace_labels"
|
|
2109
|
-
end
|
|
2110
|
-
# verify the required parameter 'sandbox_labels' is set
|
|
2111
|
-
if @api_client.config.client_side_validation && sandbox_labels.nil?
|
|
2112
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_labels' when calling SandboxApi.replace_labels"
|
|
2113
|
-
end
|
|
2114
|
-
# resource path
|
|
2115
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/labels'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
2116
|
-
|
|
2117
|
-
# query parameters
|
|
2118
|
-
query_params = opts[:query_params] || {}
|
|
2119
|
-
|
|
2120
|
-
# header parameters
|
|
2121
|
-
header_params = opts[:header_params] || {}
|
|
2122
|
-
# HTTP header 'Accept' (if needed)
|
|
2123
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2124
|
-
# HTTP header 'Content-Type'
|
|
2125
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2126
|
-
if !content_type.nil?
|
|
2127
|
-
header_params['Content-Type'] = content_type
|
|
2128
|
-
end
|
|
2129
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2130
|
-
|
|
2131
|
-
# form parameters
|
|
2132
|
-
form_params = opts[:form_params] || {}
|
|
2133
|
-
|
|
2134
|
-
# http body (model)
|
|
2135
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_labels)
|
|
2136
|
-
|
|
2137
|
-
# return_type
|
|
2138
|
-
return_type = opts[:debug_return_type] || 'SandboxLabels'
|
|
2139
|
-
|
|
2140
|
-
# auth_names
|
|
2141
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2142
|
-
|
|
2143
|
-
new_options = opts.merge(
|
|
2144
|
-
:operation => :"SandboxApi.replace_labels",
|
|
2145
|
-
:header_params => header_params,
|
|
2146
|
-
:query_params => query_params,
|
|
2147
|
-
:form_params => form_params,
|
|
2148
|
-
:body => post_body,
|
|
2149
|
-
:auth_names => auth_names,
|
|
2150
|
-
:return_type => return_type
|
|
2151
|
-
)
|
|
2152
|
-
|
|
2153
|
-
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2154
|
-
if @api_client.config.debugging
|
|
2155
|
-
@api_client.config.logger.debug "API called: SandboxApi#replace_labels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2156
|
-
end
|
|
2157
|
-
return data, status_code, headers
|
|
2158
|
-
end
|
|
2159
|
-
|
|
2160
|
-
# Resize sandbox resources
|
|
2161
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2162
|
-
# @param resize_sandbox [ResizeSandbox]
|
|
2163
|
-
# @param [Hash] opts the optional parameters
|
|
2164
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2165
|
-
# @return [Sandbox]
|
|
2166
|
-
def resize_sandbox(sandbox_id_or_name, resize_sandbox, opts = {})
|
|
2167
|
-
data, _status_code, _headers = resize_sandbox_with_http_info(sandbox_id_or_name, resize_sandbox, opts)
|
|
2168
|
-
data
|
|
2169
|
-
end
|
|
2170
|
-
|
|
2171
|
-
# Resize sandbox resources
|
|
2172
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2173
|
-
# @param resize_sandbox [ResizeSandbox]
|
|
2174
|
-
# @param [Hash] opts the optional parameters
|
|
2175
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2176
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2177
|
-
def resize_sandbox_with_http_info(sandbox_id_or_name, resize_sandbox, opts = {})
|
|
2178
|
-
if @api_client.config.debugging
|
|
2179
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.resize_sandbox ...'
|
|
2180
|
-
end
|
|
2181
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2182
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2183
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.resize_sandbox"
|
|
2184
|
-
end
|
|
2185
|
-
# verify the required parameter 'resize_sandbox' is set
|
|
2186
|
-
if @api_client.config.client_side_validation && resize_sandbox.nil?
|
|
2187
|
-
fail ArgumentError, "Missing the required parameter 'resize_sandbox' when calling SandboxApi.resize_sandbox"
|
|
2188
|
-
end
|
|
2189
|
-
# resource path
|
|
2190
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/resize'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
2191
|
-
|
|
2192
|
-
# query parameters
|
|
2193
|
-
query_params = opts[:query_params] || {}
|
|
2194
|
-
|
|
2195
|
-
# header parameters
|
|
2196
|
-
header_params = opts[:header_params] || {}
|
|
2197
|
-
# HTTP header 'Accept' (if needed)
|
|
2198
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2199
|
-
# HTTP header 'Content-Type'
|
|
2200
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2201
|
-
if !content_type.nil?
|
|
2202
|
-
header_params['Content-Type'] = content_type
|
|
2203
|
-
end
|
|
2204
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2205
|
-
|
|
2206
|
-
# form parameters
|
|
2207
|
-
form_params = opts[:form_params] || {}
|
|
2208
|
-
|
|
2209
|
-
# http body (model)
|
|
2210
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(resize_sandbox)
|
|
2211
|
-
|
|
2212
|
-
# return_type
|
|
2213
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
2214
|
-
|
|
2215
|
-
# auth_names
|
|
2216
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2217
|
-
|
|
2218
|
-
new_options = opts.merge(
|
|
2219
|
-
:operation => :"SandboxApi.resize_sandbox",
|
|
2220
|
-
:header_params => header_params,
|
|
2221
|
-
:query_params => query_params,
|
|
2222
|
-
:form_params => form_params,
|
|
2223
|
-
:body => post_body,
|
|
2224
|
-
:auth_names => auth_names,
|
|
2225
|
-
:return_type => return_type
|
|
2226
|
-
)
|
|
2227
|
-
|
|
2228
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2229
|
-
if @api_client.config.debugging
|
|
2230
|
-
@api_client.config.logger.debug "API called: SandboxApi#resize_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2231
|
-
end
|
|
2232
|
-
return data, status_code, headers
|
|
2233
|
-
end
|
|
2234
|
-
|
|
2235
|
-
# Resolve sandbox secrets
|
|
2236
|
-
# @param sandbox_id [String] Sandbox ID
|
|
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 [Array<ResolveSandboxSecrets200ResponseInner>]
|
|
2240
|
-
def resolve_sandbox_secrets(sandbox_id, opts = {})
|
|
2241
|
-
data, _status_code, _headers = resolve_sandbox_secrets_with_http_info(sandbox_id, opts)
|
|
2242
|
-
data
|
|
2243
|
-
end
|
|
2244
|
-
|
|
2245
|
-
# Resolve sandbox secrets
|
|
2246
|
-
# @param sandbox_id [String] Sandbox ID
|
|
2247
|
-
# @param [Hash] opts the optional parameters
|
|
2248
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2249
|
-
# @return [Array<(Array<ResolveSandboxSecrets200ResponseInner>, Integer, Hash)>] Array<ResolveSandboxSecrets200ResponseInner> data, response status code and response headers
|
|
2250
|
-
def resolve_sandbox_secrets_with_http_info(sandbox_id, opts = {})
|
|
2251
|
-
if @api_client.config.debugging
|
|
2252
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.resolve_sandbox_secrets ...'
|
|
2253
|
-
end
|
|
2254
|
-
# verify the required parameter 'sandbox_id' is set
|
|
2255
|
-
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
2256
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.resolve_sandbox_secrets"
|
|
2257
|
-
end
|
|
2258
|
-
# resource path
|
|
2259
|
-
local_var_path = '/sandbox/{sandboxId}/secrets'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
2260
|
-
|
|
2261
|
-
# query parameters
|
|
2262
|
-
query_params = opts[:query_params] || {}
|
|
2263
|
-
|
|
2264
|
-
# header parameters
|
|
2265
|
-
header_params = opts[:header_params] || {}
|
|
2266
|
-
# HTTP header 'Accept' (if needed)
|
|
2267
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2268
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2269
|
-
|
|
2270
|
-
# form parameters
|
|
2271
|
-
form_params = opts[:form_params] || {}
|
|
2272
|
-
|
|
2273
|
-
# http body (model)
|
|
2274
|
-
post_body = opts[:debug_body]
|
|
2275
|
-
|
|
2276
|
-
# return_type
|
|
2277
|
-
return_type = opts[:debug_return_type] || 'Array<ResolveSandboxSecrets200ResponseInner>'
|
|
2278
|
-
|
|
2279
|
-
# auth_names
|
|
2280
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2281
|
-
|
|
2282
|
-
new_options = opts.merge(
|
|
2283
|
-
:operation => :"SandboxApi.resolve_sandbox_secrets",
|
|
2284
|
-
:header_params => header_params,
|
|
2285
|
-
:query_params => query_params,
|
|
2286
|
-
:form_params => form_params,
|
|
2287
|
-
:body => post_body,
|
|
2288
|
-
:auth_names => auth_names,
|
|
2289
|
-
:return_type => return_type
|
|
2290
|
-
)
|
|
2291
|
-
|
|
2292
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2293
|
-
if @api_client.config.debugging
|
|
2294
|
-
@api_client.config.logger.debug "API called: SandboxApi#resolve_sandbox_secrets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2295
|
-
end
|
|
2296
|
-
return data, status_code, headers
|
|
2297
|
-
end
|
|
2298
|
-
|
|
2299
|
-
# Revoke SSH access for sandbox
|
|
2300
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2301
|
-
# @param [Hash] opts the optional parameters
|
|
2302
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2303
|
-
# @option opts [String] :token SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.
|
|
2304
|
-
# @return [Sandbox]
|
|
2305
|
-
def revoke_ssh_access(sandbox_id_or_name, opts = {})
|
|
2306
|
-
data, _status_code, _headers = revoke_ssh_access_with_http_info(sandbox_id_or_name, opts)
|
|
2307
|
-
data
|
|
2308
|
-
end
|
|
2309
|
-
|
|
2310
|
-
# Revoke SSH access for sandbox
|
|
2311
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2312
|
-
# @param [Hash] opts the optional parameters
|
|
2313
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2314
|
-
# @option opts [String] :token SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.
|
|
2315
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2316
|
-
def revoke_ssh_access_with_http_info(sandbox_id_or_name, opts = {})
|
|
2317
|
-
if @api_client.config.debugging
|
|
2318
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.revoke_ssh_access ...'
|
|
2319
|
-
end
|
|
2320
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2321
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2322
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.revoke_ssh_access"
|
|
2323
|
-
end
|
|
2324
|
-
# resource path
|
|
2325
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/ssh-access'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
2326
|
-
|
|
2327
|
-
# query parameters
|
|
2328
|
-
query_params = opts[:query_params] || {}
|
|
2329
|
-
query_params[:'token'] = opts[:'token'] if !opts[:'token'].nil?
|
|
2330
|
-
|
|
2331
|
-
# header parameters
|
|
2332
|
-
header_params = opts[:header_params] || {}
|
|
2333
|
-
# HTTP header 'Accept' (if needed)
|
|
2334
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2335
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2336
|
-
|
|
2337
|
-
# form parameters
|
|
2338
|
-
form_params = opts[:form_params] || {}
|
|
2339
|
-
|
|
2340
|
-
# http body (model)
|
|
2341
|
-
post_body = opts[:debug_body]
|
|
2342
|
-
|
|
2343
|
-
# return_type
|
|
2344
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
2345
|
-
|
|
2346
|
-
# auth_names
|
|
2347
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2348
|
-
|
|
2349
|
-
new_options = opts.merge(
|
|
2350
|
-
:operation => :"SandboxApi.revoke_ssh_access",
|
|
2351
|
-
:header_params => header_params,
|
|
2352
|
-
:query_params => query_params,
|
|
2353
|
-
:form_params => form_params,
|
|
2354
|
-
:body => post_body,
|
|
2355
|
-
:auth_names => auth_names,
|
|
2356
|
-
:return_type => return_type
|
|
2357
|
-
)
|
|
2358
|
-
|
|
2359
|
-
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
2360
|
-
if @api_client.config.debugging
|
|
2361
|
-
@api_client.config.logger.debug "API called: SandboxApi#revoke_ssh_access\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2362
|
-
end
|
|
2363
|
-
return data, status_code, headers
|
|
2364
|
-
end
|
|
2365
|
-
|
|
2366
|
-
# Rotate the signing key, invalidating all previously signed URLs
|
|
2367
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
2368
|
-
# @param [Hash] opts the optional parameters
|
|
2369
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2370
|
-
# @return [String]
|
|
2371
|
-
def rotate_signing_key(sandbox_id, opts = {})
|
|
2372
|
-
data, _status_code, _headers = rotate_signing_key_with_http_info(sandbox_id, opts)
|
|
2373
|
-
data
|
|
2374
|
-
end
|
|
2375
|
-
|
|
2376
|
-
# Rotate the signing key, invalidating all previously signed URLs
|
|
2377
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
2378
|
-
# @param [Hash] opts the optional parameters
|
|
2379
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2380
|
-
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
|
2381
|
-
def rotate_signing_key_with_http_info(sandbox_id, opts = {})
|
|
2382
|
-
if @api_client.config.debugging
|
|
2383
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.rotate_signing_key ...'
|
|
2384
|
-
end
|
|
2385
|
-
# verify the required parameter 'sandbox_id' is set
|
|
2386
|
-
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
2387
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.rotate_signing_key"
|
|
2388
|
-
end
|
|
2389
|
-
# resource path
|
|
2390
|
-
local_var_path = '/sandbox/{sandboxId}/signing-key/rotate'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
2391
|
-
|
|
2392
|
-
# query parameters
|
|
2393
|
-
query_params = opts[:query_params] || {}
|
|
2394
|
-
|
|
2395
|
-
# header parameters
|
|
2396
|
-
header_params = opts[:header_params] || {}
|
|
2397
|
-
# HTTP header 'Accept' (if needed)
|
|
2398
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2399
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2400
|
-
|
|
2401
|
-
# form parameters
|
|
2402
|
-
form_params = opts[:form_params] || {}
|
|
2403
|
-
|
|
2404
|
-
# http body (model)
|
|
2405
|
-
post_body = opts[:debug_body]
|
|
2406
|
-
|
|
2407
|
-
# return_type
|
|
2408
|
-
return_type = opts[:debug_return_type] || 'String'
|
|
2409
|
-
|
|
2410
|
-
# auth_names
|
|
2411
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2412
|
-
|
|
2413
|
-
new_options = opts.merge(
|
|
2414
|
-
:operation => :"SandboxApi.rotate_signing_key",
|
|
2415
|
-
:header_params => header_params,
|
|
2416
|
-
:query_params => query_params,
|
|
2417
|
-
:form_params => form_params,
|
|
2418
|
-
:body => post_body,
|
|
2419
|
-
:auth_names => auth_names,
|
|
2420
|
-
:return_type => return_type
|
|
2421
|
-
)
|
|
2422
|
-
|
|
2423
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2424
|
-
if @api_client.config.debugging
|
|
2425
|
-
@api_client.config.logger.debug "API called: SandboxApi#rotate_signing_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2426
|
-
end
|
|
2427
|
-
return data, status_code, headers
|
|
2428
|
-
end
|
|
2429
|
-
|
|
2430
|
-
# Set sandbox auto-archive interval
|
|
2431
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2432
|
-
# @param interval [Float] Auto-archive interval in minutes (0 means the maximum interval will be used)
|
|
2433
|
-
# @param [Hash] opts the optional parameters
|
|
2434
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2435
|
-
# @return [Sandbox]
|
|
2436
|
-
def set_auto_archive_interval(sandbox_id_or_name, interval, opts = {})
|
|
2437
|
-
data, _status_code, _headers = set_auto_archive_interval_with_http_info(sandbox_id_or_name, interval, opts)
|
|
2438
|
-
data
|
|
2439
|
-
end
|
|
2440
|
-
|
|
2441
|
-
# Set sandbox auto-archive interval
|
|
2442
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2443
|
-
# @param interval [Float] Auto-archive interval in minutes (0 means the maximum interval will be used)
|
|
2444
|
-
# @param [Hash] opts the optional parameters
|
|
2445
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2446
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2447
|
-
def set_auto_archive_interval_with_http_info(sandbox_id_or_name, interval, opts = {})
|
|
2448
|
-
if @api_client.config.debugging
|
|
2449
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_archive_interval ...'
|
|
2450
|
-
end
|
|
2451
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2452
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2453
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.set_auto_archive_interval"
|
|
2454
|
-
end
|
|
2455
|
-
# verify the required parameter 'interval' is set
|
|
2456
|
-
if @api_client.config.client_side_validation && interval.nil?
|
|
2457
|
-
fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_auto_archive_interval"
|
|
2458
|
-
end
|
|
2459
|
-
# resource path
|
|
2460
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/autoarchive/{interval}'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s)).sub('{' + 'interval' + '}', CGI.escape(interval.to_s))
|
|
2461
|
-
|
|
2462
|
-
# query parameters
|
|
2463
|
-
query_params = opts[:query_params] || {}
|
|
2464
|
-
|
|
2465
|
-
# header parameters
|
|
2466
|
-
header_params = opts[:header_params] || {}
|
|
2467
|
-
# HTTP header 'Accept' (if needed)
|
|
2468
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2469
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2470
|
-
|
|
2471
|
-
# form parameters
|
|
2472
|
-
form_params = opts[:form_params] || {}
|
|
2473
|
-
|
|
2474
|
-
# http body (model)
|
|
2475
|
-
post_body = opts[:debug_body]
|
|
2476
|
-
|
|
2477
|
-
# return_type
|
|
2478
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
2479
|
-
|
|
2480
|
-
# auth_names
|
|
2481
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2482
|
-
|
|
2483
|
-
new_options = opts.merge(
|
|
2484
|
-
:operation => :"SandboxApi.set_auto_archive_interval",
|
|
2485
|
-
:header_params => header_params,
|
|
2486
|
-
:query_params => query_params,
|
|
2487
|
-
:form_params => form_params,
|
|
2488
|
-
:body => post_body,
|
|
2489
|
-
:auth_names => auth_names,
|
|
2490
|
-
:return_type => return_type
|
|
2491
|
-
)
|
|
2492
|
-
|
|
2493
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2494
|
-
if @api_client.config.debugging
|
|
2495
|
-
@api_client.config.logger.debug "API called: SandboxApi#set_auto_archive_interval\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2496
|
-
end
|
|
2497
|
-
return data, status_code, headers
|
|
2498
|
-
end
|
|
2499
|
-
|
|
2500
|
-
# Set sandbox auto-delete interval
|
|
2501
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2502
|
-
# @param interval [Float] Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
|
|
2503
|
-
# @param [Hash] opts the optional parameters
|
|
2504
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2505
|
-
# @return [Sandbox]
|
|
2506
|
-
def set_auto_delete_interval(sandbox_id_or_name, interval, opts = {})
|
|
2507
|
-
data, _status_code, _headers = set_auto_delete_interval_with_http_info(sandbox_id_or_name, interval, opts)
|
|
2508
|
-
data
|
|
2509
|
-
end
|
|
2510
|
-
|
|
2511
|
-
# Set sandbox auto-delete interval
|
|
2512
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2513
|
-
# @param interval [Float] Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
|
|
2514
|
-
# @param [Hash] opts the optional parameters
|
|
2515
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2516
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2517
|
-
def set_auto_delete_interval_with_http_info(sandbox_id_or_name, interval, opts = {})
|
|
2518
|
-
if @api_client.config.debugging
|
|
2519
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_delete_interval ...'
|
|
2520
|
-
end
|
|
2521
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2522
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2523
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.set_auto_delete_interval"
|
|
2524
|
-
end
|
|
2525
|
-
# verify the required parameter 'interval' is set
|
|
2526
|
-
if @api_client.config.client_side_validation && interval.nil?
|
|
2527
|
-
fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_auto_delete_interval"
|
|
2528
|
-
end
|
|
2529
|
-
# resource path
|
|
2530
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/autodelete/{interval}'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s)).sub('{' + 'interval' + '}', CGI.escape(interval.to_s))
|
|
2531
|
-
|
|
2532
|
-
# query parameters
|
|
2533
|
-
query_params = opts[:query_params] || {}
|
|
2534
|
-
|
|
2535
|
-
# header parameters
|
|
2536
|
-
header_params = opts[:header_params] || {}
|
|
2537
|
-
# HTTP header 'Accept' (if needed)
|
|
2538
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2539
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2540
|
-
|
|
2541
|
-
# form parameters
|
|
2542
|
-
form_params = opts[:form_params] || {}
|
|
2543
|
-
|
|
2544
|
-
# http body (model)
|
|
2545
|
-
post_body = opts[:debug_body]
|
|
2546
|
-
|
|
2547
|
-
# return_type
|
|
2548
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
2549
|
-
|
|
2550
|
-
# auth_names
|
|
2551
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2552
|
-
|
|
2553
|
-
new_options = opts.merge(
|
|
2554
|
-
:operation => :"SandboxApi.set_auto_delete_interval",
|
|
2555
|
-
:header_params => header_params,
|
|
2556
|
-
:query_params => query_params,
|
|
2557
|
-
:form_params => form_params,
|
|
2558
|
-
:body => post_body,
|
|
2559
|
-
:auth_names => auth_names,
|
|
2560
|
-
:return_type => return_type
|
|
2561
|
-
)
|
|
2562
|
-
|
|
2563
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2564
|
-
if @api_client.config.debugging
|
|
2565
|
-
@api_client.config.logger.debug "API called: SandboxApi#set_auto_delete_interval\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2566
|
-
end
|
|
2567
|
-
return data, status_code, headers
|
|
2568
|
-
end
|
|
2569
|
-
|
|
2570
|
-
# Set sandbox auto-pause interval
|
|
2571
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2572
|
-
# @param interval [Float] Auto-pause interval in minutes (0 to disable)
|
|
2573
|
-
# @param [Hash] opts the optional parameters
|
|
2574
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2575
|
-
# @return [Sandbox]
|
|
2576
|
-
def set_auto_pause_interval(sandbox_id_or_name, interval, opts = {})
|
|
2577
|
-
data, _status_code, _headers = set_auto_pause_interval_with_http_info(sandbox_id_or_name, interval, opts)
|
|
2578
|
-
data
|
|
2579
|
-
end
|
|
2580
|
-
|
|
2581
|
-
# Set sandbox auto-pause interval
|
|
2582
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2583
|
-
# @param interval [Float] Auto-pause interval in minutes (0 to disable)
|
|
2584
|
-
# @param [Hash] opts the optional parameters
|
|
2585
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2586
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2587
|
-
def set_auto_pause_interval_with_http_info(sandbox_id_or_name, interval, opts = {})
|
|
2588
|
-
if @api_client.config.debugging
|
|
2589
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_pause_interval ...'
|
|
2590
|
-
end
|
|
2591
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2592
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2593
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.set_auto_pause_interval"
|
|
2594
|
-
end
|
|
2595
|
-
# verify the required parameter 'interval' is set
|
|
2596
|
-
if @api_client.config.client_side_validation && interval.nil?
|
|
2597
|
-
fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_auto_pause_interval"
|
|
2598
|
-
end
|
|
2599
|
-
# resource path
|
|
2600
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/autopause/{interval}'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s)).sub('{' + 'interval' + '}', CGI.escape(interval.to_s))
|
|
2601
|
-
|
|
2602
|
-
# query parameters
|
|
2603
|
-
query_params = opts[:query_params] || {}
|
|
2604
|
-
|
|
2605
|
-
# header parameters
|
|
2606
|
-
header_params = opts[:header_params] || {}
|
|
2607
|
-
# HTTP header 'Accept' (if needed)
|
|
2608
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2609
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2610
|
-
|
|
2611
|
-
# form parameters
|
|
2612
|
-
form_params = opts[:form_params] || {}
|
|
2613
|
-
|
|
2614
|
-
# http body (model)
|
|
2615
|
-
post_body = opts[:debug_body]
|
|
2616
|
-
|
|
2617
|
-
# return_type
|
|
2618
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
2619
|
-
|
|
2620
|
-
# auth_names
|
|
2621
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2622
|
-
|
|
2623
|
-
new_options = opts.merge(
|
|
2624
|
-
:operation => :"SandboxApi.set_auto_pause_interval",
|
|
2625
|
-
:header_params => header_params,
|
|
2626
|
-
:query_params => query_params,
|
|
2627
|
-
:form_params => form_params,
|
|
2628
|
-
:body => post_body,
|
|
2629
|
-
:auth_names => auth_names,
|
|
2630
|
-
:return_type => return_type
|
|
2631
|
-
)
|
|
2632
|
-
|
|
2633
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2634
|
-
if @api_client.config.debugging
|
|
2635
|
-
@api_client.config.logger.debug "API called: SandboxApi#set_auto_pause_interval\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2636
|
-
end
|
|
2637
|
-
return data, status_code, headers
|
|
2638
|
-
end
|
|
2639
|
-
|
|
2640
|
-
# Set sandbox auto-stop interval
|
|
2641
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2642
|
-
# @param interval [Float] Auto-stop interval in minutes (0 to disable)
|
|
2643
|
-
# @param [Hash] opts the optional parameters
|
|
2644
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2645
|
-
# @return [Sandbox]
|
|
2646
|
-
def set_autostop_interval(sandbox_id_or_name, interval, opts = {})
|
|
2647
|
-
data, _status_code, _headers = set_autostop_interval_with_http_info(sandbox_id_or_name, interval, opts)
|
|
2648
|
-
data
|
|
2649
|
-
end
|
|
2650
|
-
|
|
2651
|
-
# Set sandbox auto-stop interval
|
|
2652
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2653
|
-
# @param interval [Float] Auto-stop interval in minutes (0 to disable)
|
|
2654
|
-
# @param [Hash] opts the optional parameters
|
|
2655
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2656
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2657
|
-
def set_autostop_interval_with_http_info(sandbox_id_or_name, interval, opts = {})
|
|
2658
|
-
if @api_client.config.debugging
|
|
2659
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.set_autostop_interval ...'
|
|
2660
|
-
end
|
|
2661
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2662
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2663
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.set_autostop_interval"
|
|
2664
|
-
end
|
|
2665
|
-
# verify the required parameter 'interval' is set
|
|
2666
|
-
if @api_client.config.client_side_validation && interval.nil?
|
|
2667
|
-
fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_autostop_interval"
|
|
2668
|
-
end
|
|
2669
|
-
# resource path
|
|
2670
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/autostop/{interval}'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s)).sub('{' + 'interval' + '}', CGI.escape(interval.to_s))
|
|
2671
|
-
|
|
2672
|
-
# query parameters
|
|
2673
|
-
query_params = opts[:query_params] || {}
|
|
2674
|
-
|
|
2675
|
-
# header parameters
|
|
2676
|
-
header_params = opts[:header_params] || {}
|
|
2677
|
-
# HTTP header 'Accept' (if needed)
|
|
2678
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2679
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2680
|
-
|
|
2681
|
-
# form parameters
|
|
2682
|
-
form_params = opts[:form_params] || {}
|
|
2683
|
-
|
|
2684
|
-
# http body (model)
|
|
2685
|
-
post_body = opts[:debug_body]
|
|
2686
|
-
|
|
2687
|
-
# return_type
|
|
2688
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
2689
|
-
|
|
2690
|
-
# auth_names
|
|
2691
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2692
|
-
|
|
2693
|
-
new_options = opts.merge(
|
|
2694
|
-
:operation => :"SandboxApi.set_autostop_interval",
|
|
2695
|
-
:header_params => header_params,
|
|
2696
|
-
:query_params => query_params,
|
|
2697
|
-
:form_params => form_params,
|
|
2698
|
-
:body => post_body,
|
|
2699
|
-
:auth_names => auth_names,
|
|
2700
|
-
:return_type => return_type
|
|
2701
|
-
)
|
|
2702
|
-
|
|
2703
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2704
|
-
if @api_client.config.debugging
|
|
2705
|
-
@api_client.config.logger.debug "API called: SandboxApi#set_autostop_interval\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2706
|
-
end
|
|
2707
|
-
return data, status_code, headers
|
|
2708
|
-
end
|
|
2709
|
-
|
|
2710
|
-
# Set sandbox TTL
|
|
2711
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2712
|
-
# @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
|
|
2713
|
-
# @param [Hash] opts the optional parameters
|
|
2714
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2715
|
-
# @return [Sandbox]
|
|
2716
|
-
def set_ttl(sandbox_id_or_name, ttl_minutes, opts = {})
|
|
2717
|
-
data, _status_code, _headers = set_ttl_with_http_info(sandbox_id_or_name, ttl_minutes, opts)
|
|
2718
|
-
data
|
|
2719
|
-
end
|
|
2720
|
-
|
|
2721
|
-
# Set sandbox TTL
|
|
2722
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2723
|
-
# @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
|
|
2724
|
-
# @param [Hash] opts the optional parameters
|
|
2725
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2726
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2727
|
-
def set_ttl_with_http_info(sandbox_id_or_name, ttl_minutes, opts = {})
|
|
2728
|
-
if @api_client.config.debugging
|
|
2729
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.set_ttl ...'
|
|
2730
|
-
end
|
|
2731
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2732
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2733
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.set_ttl"
|
|
2734
|
-
end
|
|
2735
|
-
# verify the required parameter 'ttl_minutes' is set
|
|
2736
|
-
if @api_client.config.client_side_validation && ttl_minutes.nil?
|
|
2737
|
-
fail ArgumentError, "Missing the required parameter 'ttl_minutes' when calling SandboxApi.set_ttl"
|
|
2738
|
-
end
|
|
2739
|
-
# resource path
|
|
2740
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/ttl/{ttlMinutes}'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s)).sub('{' + 'ttlMinutes' + '}', CGI.escape(ttl_minutes.to_s))
|
|
2741
|
-
|
|
2742
|
-
# query parameters
|
|
2743
|
-
query_params = opts[:query_params] || {}
|
|
2744
|
-
|
|
2745
|
-
# header parameters
|
|
2746
|
-
header_params = opts[:header_params] || {}
|
|
2747
|
-
# HTTP header 'Accept' (if needed)
|
|
2748
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2749
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2750
|
-
|
|
2751
|
-
# form parameters
|
|
2752
|
-
form_params = opts[:form_params] || {}
|
|
2753
|
-
|
|
2754
|
-
# http body (model)
|
|
2755
|
-
post_body = opts[:debug_body]
|
|
2756
|
-
|
|
2757
|
-
# return_type
|
|
2758
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
2759
|
-
|
|
2760
|
-
# auth_names
|
|
2761
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2762
|
-
|
|
2763
|
-
new_options = opts.merge(
|
|
2764
|
-
:operation => :"SandboxApi.set_ttl",
|
|
2765
|
-
:header_params => header_params,
|
|
2766
|
-
:query_params => query_params,
|
|
2767
|
-
:form_params => form_params,
|
|
2768
|
-
:body => post_body,
|
|
2769
|
-
:auth_names => auth_names,
|
|
2770
|
-
:return_type => return_type
|
|
2771
|
-
)
|
|
2772
|
-
|
|
2773
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2774
|
-
if @api_client.config.debugging
|
|
2775
|
-
@api_client.config.logger.debug "API called: SandboxApi#set_ttl\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2776
|
-
end
|
|
2777
|
-
return data, status_code, headers
|
|
2778
|
-
end
|
|
2779
|
-
|
|
2780
|
-
# Start or resume sandbox
|
|
2781
|
-
# Starts a stopped or archived sandbox, or resumes a paused sandbox. The transition taken depends on the current sandbox state.
|
|
2782
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2783
|
-
# @param [Hash] opts the optional parameters
|
|
2784
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2785
|
-
# @return [Sandbox]
|
|
2786
|
-
def start_sandbox(sandbox_id_or_name, opts = {})
|
|
2787
|
-
data, _status_code, _headers = start_sandbox_with_http_info(sandbox_id_or_name, opts)
|
|
2788
|
-
data
|
|
2789
|
-
end
|
|
2790
|
-
|
|
2791
|
-
# Start or resume sandbox
|
|
2792
|
-
# Starts a stopped or archived sandbox, or resumes a paused sandbox. The transition taken depends on the current sandbox state.
|
|
2793
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2794
|
-
# @param [Hash] opts the optional parameters
|
|
2795
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2796
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2797
|
-
def start_sandbox_with_http_info(sandbox_id_or_name, opts = {})
|
|
2798
|
-
if @api_client.config.debugging
|
|
2799
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.start_sandbox ...'
|
|
2800
|
-
end
|
|
2801
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2802
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2803
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.start_sandbox"
|
|
2804
|
-
end
|
|
2805
|
-
# resource path
|
|
2806
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/start'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
2807
|
-
|
|
2808
|
-
# query parameters
|
|
2809
|
-
query_params = opts[:query_params] || {}
|
|
2810
|
-
|
|
2811
|
-
# header parameters
|
|
2812
|
-
header_params = opts[:header_params] || {}
|
|
2813
|
-
# HTTP header 'Accept' (if needed)
|
|
2814
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2815
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2816
|
-
|
|
2817
|
-
# form parameters
|
|
2818
|
-
form_params = opts[:form_params] || {}
|
|
2819
|
-
|
|
2820
|
-
# http body (model)
|
|
2821
|
-
post_body = opts[:debug_body]
|
|
2822
|
-
|
|
2823
|
-
# return_type
|
|
2824
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
2825
|
-
|
|
2826
|
-
# auth_names
|
|
2827
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2828
|
-
|
|
2829
|
-
new_options = opts.merge(
|
|
2830
|
-
:operation => :"SandboxApi.start_sandbox",
|
|
2831
|
-
:header_params => header_params,
|
|
2832
|
-
:query_params => query_params,
|
|
2833
|
-
:form_params => form_params,
|
|
2834
|
-
:body => post_body,
|
|
2835
|
-
:auth_names => auth_names,
|
|
2836
|
-
:return_type => return_type
|
|
2837
|
-
)
|
|
2838
|
-
|
|
2839
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2840
|
-
if @api_client.config.debugging
|
|
2841
|
-
@api_client.config.logger.debug "API called: SandboxApi#start_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2842
|
-
end
|
|
2843
|
-
return data, status_code, headers
|
|
2844
|
-
end
|
|
2845
|
-
|
|
2846
|
-
# Stop sandbox
|
|
2847
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2848
|
-
# @param [Hash] opts the optional parameters
|
|
2849
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2850
|
-
# @option opts [Boolean] :force Force stop the sandbox using SIGKILL instead of SIGTERM
|
|
2851
|
-
# @return [Sandbox]
|
|
2852
|
-
def stop_sandbox(sandbox_id_or_name, opts = {})
|
|
2853
|
-
data, _status_code, _headers = stop_sandbox_with_http_info(sandbox_id_or_name, opts)
|
|
2854
|
-
data
|
|
2855
|
-
end
|
|
2856
|
-
|
|
2857
|
-
# Stop sandbox
|
|
2858
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2859
|
-
# @param [Hash] opts the optional parameters
|
|
2860
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2861
|
-
# @option opts [Boolean] :force Force stop the sandbox using SIGKILL instead of SIGTERM
|
|
2862
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
2863
|
-
def stop_sandbox_with_http_info(sandbox_id_or_name, opts = {})
|
|
2864
|
-
if @api_client.config.debugging
|
|
2865
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.stop_sandbox ...'
|
|
2866
|
-
end
|
|
2867
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
2868
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
2869
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.stop_sandbox"
|
|
2870
|
-
end
|
|
2871
|
-
# resource path
|
|
2872
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/stop'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
2873
|
-
|
|
2874
|
-
# query parameters
|
|
2875
|
-
query_params = opts[:query_params] || {}
|
|
2876
|
-
query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil?
|
|
2877
|
-
|
|
2878
|
-
# header parameters
|
|
2879
|
-
header_params = opts[:header_params] || {}
|
|
2880
|
-
# HTTP header 'Accept' (if needed)
|
|
2881
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2882
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2883
|
-
|
|
2884
|
-
# form parameters
|
|
2885
|
-
form_params = opts[:form_params] || {}
|
|
2886
|
-
|
|
2887
|
-
# http body (model)
|
|
2888
|
-
post_body = opts[:debug_body]
|
|
2889
|
-
|
|
2890
|
-
# return_type
|
|
2891
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
2892
|
-
|
|
2893
|
-
# auth_names
|
|
2894
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2895
|
-
|
|
2896
|
-
new_options = opts.merge(
|
|
2897
|
-
:operation => :"SandboxApi.stop_sandbox",
|
|
2898
|
-
:header_params => header_params,
|
|
2899
|
-
:query_params => query_params,
|
|
2900
|
-
:form_params => form_params,
|
|
2901
|
-
:body => post_body,
|
|
2902
|
-
:auth_names => auth_names,
|
|
2903
|
-
:return_type => return_type
|
|
2904
|
-
)
|
|
2905
|
-
|
|
2906
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2907
|
-
if @api_client.config.debugging
|
|
2908
|
-
@api_client.config.logger.debug "API called: SandboxApi#stop_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2909
|
-
end
|
|
2910
|
-
return data, status_code, headers
|
|
2911
|
-
end
|
|
2912
|
-
|
|
2913
|
-
# Update sandbox last activity
|
|
2914
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
2915
|
-
# @param [Hash] opts the optional parameters
|
|
2916
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2917
|
-
# @option opts [UpdateLastActivity] :update_last_activity
|
|
2918
|
-
# @return [nil]
|
|
2919
|
-
def update_last_activity(sandbox_id, opts = {})
|
|
2920
|
-
update_last_activity_with_http_info(sandbox_id, opts)
|
|
2921
|
-
nil
|
|
2922
|
-
end
|
|
2923
|
-
|
|
2924
|
-
# Update sandbox last activity
|
|
2925
|
-
# @param sandbox_id [String] ID of the sandbox
|
|
2926
|
-
# @param [Hash] opts the optional parameters
|
|
2927
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2928
|
-
# @option opts [UpdateLastActivity] :update_last_activity
|
|
2929
|
-
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
2930
|
-
def update_last_activity_with_http_info(sandbox_id, opts = {})
|
|
2931
|
-
if @api_client.config.debugging
|
|
2932
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.update_last_activity ...'
|
|
2933
|
-
end
|
|
2934
|
-
# verify the required parameter 'sandbox_id' is set
|
|
2935
|
-
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
2936
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.update_last_activity"
|
|
2937
|
-
end
|
|
2938
|
-
# resource path
|
|
2939
|
-
local_var_path = '/sandbox/{sandboxId}/last-activity'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
2940
|
-
|
|
2941
|
-
# query parameters
|
|
2942
|
-
query_params = opts[:query_params] || {}
|
|
2943
|
-
|
|
2944
|
-
# header parameters
|
|
2945
|
-
header_params = opts[:header_params] || {}
|
|
2946
|
-
# HTTP header 'Content-Type'
|
|
2947
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2948
|
-
if !content_type.nil?
|
|
2949
|
-
header_params['Content-Type'] = content_type
|
|
2950
|
-
end
|
|
2951
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2952
|
-
|
|
2953
|
-
# form parameters
|
|
2954
|
-
form_params = opts[:form_params] || {}
|
|
2955
|
-
|
|
2956
|
-
# http body (model)
|
|
2957
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_last_activity'])
|
|
2958
|
-
|
|
2959
|
-
# return_type
|
|
2960
|
-
return_type = opts[:debug_return_type]
|
|
2961
|
-
|
|
2962
|
-
# auth_names
|
|
2963
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2964
|
-
|
|
2965
|
-
new_options = opts.merge(
|
|
2966
|
-
:operation => :"SandboxApi.update_last_activity",
|
|
2967
|
-
:header_params => header_params,
|
|
2968
|
-
:query_params => query_params,
|
|
2969
|
-
:form_params => form_params,
|
|
2970
|
-
:body => post_body,
|
|
2971
|
-
:auth_names => auth_names,
|
|
2972
|
-
:return_type => return_type
|
|
2973
|
-
)
|
|
2974
|
-
|
|
2975
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2976
|
-
if @api_client.config.debugging
|
|
2977
|
-
@api_client.config.logger.debug "API called: SandboxApi#update_last_activity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2978
|
-
end
|
|
2979
|
-
return data, status_code, headers
|
|
2980
|
-
end
|
|
2981
|
-
|
|
2982
|
-
# Update sandbox network settings
|
|
2983
|
-
# Changes outbound network policy on the runner for a running sandbox (for example block all traffic, restore access, or set a CIDR allow list).
|
|
2984
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2985
|
-
# @param update_sandbox_network_settings [UpdateSandboxNetworkSettings]
|
|
2986
|
-
# @param [Hash] opts the optional parameters
|
|
2987
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2988
|
-
# @return [Sandbox]
|
|
2989
|
-
def update_network_settings(sandbox_id_or_name, update_sandbox_network_settings, opts = {})
|
|
2990
|
-
data, _status_code, _headers = update_network_settings_with_http_info(sandbox_id_or_name, update_sandbox_network_settings, opts)
|
|
2991
|
-
data
|
|
2992
|
-
end
|
|
2993
|
-
|
|
2994
|
-
# Update sandbox network settings
|
|
2995
|
-
# Changes outbound network policy on the runner for a running sandbox (for example block all traffic, restore access, or set a CIDR allow list).
|
|
2996
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2997
|
-
# @param update_sandbox_network_settings [UpdateSandboxNetworkSettings]
|
|
2998
|
-
# @param [Hash] opts the optional parameters
|
|
2999
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
3000
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
3001
|
-
def update_network_settings_with_http_info(sandbox_id_or_name, update_sandbox_network_settings, opts = {})
|
|
3002
|
-
if @api_client.config.debugging
|
|
3003
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.update_network_settings ...'
|
|
3004
|
-
end
|
|
3005
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
3006
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
3007
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.update_network_settings"
|
|
3008
|
-
end
|
|
3009
|
-
# verify the required parameter 'update_sandbox_network_settings' is set
|
|
3010
|
-
if @api_client.config.client_side_validation && update_sandbox_network_settings.nil?
|
|
3011
|
-
fail ArgumentError, "Missing the required parameter 'update_sandbox_network_settings' when calling SandboxApi.update_network_settings"
|
|
3012
|
-
end
|
|
3013
|
-
# resource path
|
|
3014
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/network-settings'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
3015
|
-
|
|
3016
|
-
# query parameters
|
|
3017
|
-
query_params = opts[:query_params] || {}
|
|
3018
|
-
|
|
3019
|
-
# header parameters
|
|
3020
|
-
header_params = opts[:header_params] || {}
|
|
3021
|
-
# HTTP header 'Accept' (if needed)
|
|
3022
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3023
|
-
# HTTP header 'Content-Type'
|
|
3024
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3025
|
-
if !content_type.nil?
|
|
3026
|
-
header_params['Content-Type'] = content_type
|
|
3027
|
-
end
|
|
3028
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
3029
|
-
|
|
3030
|
-
# form parameters
|
|
3031
|
-
form_params = opts[:form_params] || {}
|
|
3032
|
-
|
|
3033
|
-
# http body (model)
|
|
3034
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_sandbox_network_settings)
|
|
3035
|
-
|
|
3036
|
-
# return_type
|
|
3037
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
3038
|
-
|
|
3039
|
-
# auth_names
|
|
3040
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
3041
|
-
|
|
3042
|
-
new_options = opts.merge(
|
|
3043
|
-
:operation => :"SandboxApi.update_network_settings",
|
|
3044
|
-
:header_params => header_params,
|
|
3045
|
-
:query_params => query_params,
|
|
3046
|
-
:form_params => form_params,
|
|
3047
|
-
:body => post_body,
|
|
3048
|
-
:auth_names => auth_names,
|
|
3049
|
-
:return_type => return_type
|
|
3050
|
-
)
|
|
3051
|
-
|
|
3052
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3053
|
-
if @api_client.config.debugging
|
|
3054
|
-
@api_client.config.logger.debug "API called: SandboxApi#update_network_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3055
|
-
end
|
|
3056
|
-
return data, status_code, headers
|
|
3057
|
-
end
|
|
3058
|
-
|
|
3059
|
-
# Update public status
|
|
3060
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
3061
|
-
# @param is_public [Boolean] Public status to set
|
|
3062
|
-
# @param [Hash] opts the optional parameters
|
|
3063
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
3064
|
-
# @return [Sandbox]
|
|
3065
|
-
def update_public_status(sandbox_id_or_name, is_public, opts = {})
|
|
3066
|
-
data, _status_code, _headers = update_public_status_with_http_info(sandbox_id_or_name, is_public, opts)
|
|
3067
|
-
data
|
|
3068
|
-
end
|
|
3069
|
-
|
|
3070
|
-
# Update public status
|
|
3071
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
3072
|
-
# @param is_public [Boolean] Public status to set
|
|
3073
|
-
# @param [Hash] opts the optional parameters
|
|
3074
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
3075
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
3076
|
-
def update_public_status_with_http_info(sandbox_id_or_name, is_public, opts = {})
|
|
3077
|
-
if @api_client.config.debugging
|
|
3078
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.update_public_status ...'
|
|
3079
|
-
end
|
|
3080
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
3081
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
3082
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.update_public_status"
|
|
3083
|
-
end
|
|
3084
|
-
# verify the required parameter 'is_public' is set
|
|
3085
|
-
if @api_client.config.client_side_validation && is_public.nil?
|
|
3086
|
-
fail ArgumentError, "Missing the required parameter 'is_public' when calling SandboxApi.update_public_status"
|
|
3087
|
-
end
|
|
3088
|
-
# resource path
|
|
3089
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/public/{isPublic}'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s)).sub('{' + 'isPublic' + '}', CGI.escape(is_public.to_s))
|
|
3090
|
-
|
|
3091
|
-
# query parameters
|
|
3092
|
-
query_params = opts[:query_params] || {}
|
|
3093
|
-
|
|
3094
|
-
# header parameters
|
|
3095
|
-
header_params = opts[:header_params] || {}
|
|
3096
|
-
# HTTP header 'Accept' (if needed)
|
|
3097
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3098
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
3099
|
-
|
|
3100
|
-
# form parameters
|
|
3101
|
-
form_params = opts[:form_params] || {}
|
|
3102
|
-
|
|
3103
|
-
# http body (model)
|
|
3104
|
-
post_body = opts[:debug_body]
|
|
3105
|
-
|
|
3106
|
-
# return_type
|
|
3107
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
3108
|
-
|
|
3109
|
-
# auth_names
|
|
3110
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
3111
|
-
|
|
3112
|
-
new_options = opts.merge(
|
|
3113
|
-
:operation => :"SandboxApi.update_public_status",
|
|
3114
|
-
:header_params => header_params,
|
|
3115
|
-
:query_params => query_params,
|
|
3116
|
-
:form_params => form_params,
|
|
3117
|
-
:body => post_body,
|
|
3118
|
-
:auth_names => auth_names,
|
|
3119
|
-
:return_type => return_type
|
|
3120
|
-
)
|
|
3121
|
-
|
|
3122
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1428
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
3123
1429
|
if @api_client.config.debugging
|
|
3124
1430
|
@api_client.config.logger.debug "API called: SandboxApi#update_public_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3125
1431
|
end
|
|
3126
1432
|
return data, status_code, headers
|
|
3127
1433
|
end
|
|
3128
1434
|
|
|
3129
|
-
# Update sandbox secrets
|
|
3130
|
-
# Replaces the set of vault secrets mounted in the sandbox. Attached, detached and rotated secrets take effect for outbound requests within seconds. New env vars become visible to processes spawned after the update; a sandbox created without any secrets must be restarted for newly attached secrets to work.
|
|
3131
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
3132
|
-
# @param update_sandbox_secrets [UpdateSandboxSecrets]
|
|
3133
|
-
# @param [Hash] opts the optional parameters
|
|
3134
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
3135
|
-
# @return [Sandbox]
|
|
3136
|
-
def update_sandbox_secrets(sandbox_id_or_name, update_sandbox_secrets, opts = {})
|
|
3137
|
-
data, _status_code, _headers = update_sandbox_secrets_with_http_info(sandbox_id_or_name, update_sandbox_secrets, opts)
|
|
3138
|
-
data
|
|
3139
|
-
end
|
|
3140
|
-
|
|
3141
|
-
# Update sandbox secrets
|
|
3142
|
-
# Replaces the set of vault secrets mounted in the sandbox. Attached, detached and rotated secrets take effect for outbound requests within seconds. New env vars become visible to processes spawned after the update; a sandbox created without any secrets must be restarted for newly attached secrets to work.
|
|
3143
|
-
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
3144
|
-
# @param update_sandbox_secrets [UpdateSandboxSecrets]
|
|
3145
|
-
# @param [Hash] opts the optional parameters
|
|
3146
|
-
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
3147
|
-
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
3148
|
-
def update_sandbox_secrets_with_http_info(sandbox_id_or_name, update_sandbox_secrets, opts = {})
|
|
3149
|
-
if @api_client.config.debugging
|
|
3150
|
-
@api_client.config.logger.debug 'Calling API: SandboxApi.update_sandbox_secrets ...'
|
|
3151
|
-
end
|
|
3152
|
-
# verify the required parameter 'sandbox_id_or_name' is set
|
|
3153
|
-
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
3154
|
-
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.update_sandbox_secrets"
|
|
3155
|
-
end
|
|
3156
|
-
# verify the required parameter 'update_sandbox_secrets' is set
|
|
3157
|
-
if @api_client.config.client_side_validation && update_sandbox_secrets.nil?
|
|
3158
|
-
fail ArgumentError, "Missing the required parameter 'update_sandbox_secrets' when calling SandboxApi.update_sandbox_secrets"
|
|
3159
|
-
end
|
|
3160
|
-
# resource path
|
|
3161
|
-
local_var_path = '/sandbox/{sandboxIdOrName}/secrets'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
3162
|
-
|
|
3163
|
-
# query parameters
|
|
3164
|
-
query_params = opts[:query_params] || {}
|
|
3165
|
-
|
|
3166
|
-
# header parameters
|
|
3167
|
-
header_params = opts[:header_params] || {}
|
|
3168
|
-
# HTTP header 'Accept' (if needed)
|
|
3169
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3170
|
-
# HTTP header 'Content-Type'
|
|
3171
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3172
|
-
if !content_type.nil?
|
|
3173
|
-
header_params['Content-Type'] = content_type
|
|
3174
|
-
end
|
|
3175
|
-
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
3176
|
-
|
|
3177
|
-
# form parameters
|
|
3178
|
-
form_params = opts[:form_params] || {}
|
|
3179
|
-
|
|
3180
|
-
# http body (model)
|
|
3181
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_sandbox_secrets)
|
|
3182
|
-
|
|
3183
|
-
# return_type
|
|
3184
|
-
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
3185
|
-
|
|
3186
|
-
# auth_names
|
|
3187
|
-
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
3188
|
-
|
|
3189
|
-
new_options = opts.merge(
|
|
3190
|
-
:operation => :"SandboxApi.update_sandbox_secrets",
|
|
3191
|
-
:header_params => header_params,
|
|
3192
|
-
:query_params => query_params,
|
|
3193
|
-
:form_params => form_params,
|
|
3194
|
-
:body => post_body,
|
|
3195
|
-
:auth_names => auth_names,
|
|
3196
|
-
:return_type => return_type
|
|
3197
|
-
)
|
|
3198
|
-
|
|
3199
|
-
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3200
|
-
if @api_client.config.debugging
|
|
3201
|
-
@api_client.config.logger.debug "API called: SandboxApi#update_sandbox_secrets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3202
|
-
end
|
|
3203
|
-
return data, status_code, headers
|
|
3204
|
-
end
|
|
3205
|
-
|
|
3206
1435
|
# Update sandbox state
|
|
3207
1436
|
# @param sandbox_id [String] ID of the sandbox
|
|
3208
1437
|
# @param update_sandbox_state_dto [UpdateSandboxStateDto]
|
|
@@ -3243,7 +1472,7 @@ module DaytonaApiClient
|
|
|
3243
1472
|
# HTTP header 'Content-Type'
|
|
3244
1473
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3245
1474
|
if !content_type.nil?
|
|
3246
|
-
|
|
1475
|
+
header_params['Content-Type'] = content_type
|
|
3247
1476
|
end
|
|
3248
1477
|
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
3249
1478
|
|