daytona_api_client 0.126.0.alpha.6
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 +7 -0
- data/.gitignore +39 -0
- data/.openapi-generator/FILES +171 -0
- data/.openapi-generator/VERSION +1 -0
- data/.openapi-generator-ignore +33 -0
- data/.rspec +2 -0
- data/.rubocop.yml +148 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +101 -0
- data/Rakefile +10 -0
- data/daytona_api_client.gemspec +39 -0
- data/fix-gemspec.sh +11 -0
- data/lib/daytona_api_client/api/api_keys_api.rb +401 -0
- data/lib/daytona_api_client/api/audit_api.rb +192 -0
- data/lib/daytona_api_client/api/config_api.rb +77 -0
- data/lib/daytona_api_client/api/docker_registry_api.rb +472 -0
- data/lib/daytona_api_client/api/health_api.rb +75 -0
- data/lib/daytona_api_client/api/object_storage_api.rb +80 -0
- data/lib/daytona_api_client/api/organizations_api.rb +1902 -0
- data/lib/daytona_api_client/api/preview_api.rb +211 -0
- data/lib/daytona_api_client/api/regions_api.rb +83 -0
- data/lib/daytona_api_client/api/runners_api.rb +376 -0
- data/lib/daytona_api_client/api/sandbox_api.rb +1660 -0
- data/lib/daytona_api_client/api/snapshots_api.rb +641 -0
- data/lib/daytona_api_client/api/toolbox_api.rb +5108 -0
- data/lib/daytona_api_client/api/users_api.rb +553 -0
- data/lib/daytona_api_client/api/volumes_api.rb +342 -0
- data/lib/daytona_api_client/api/webhooks_api.rb +413 -0
- data/lib/daytona_api_client/api/workspace_api.rb +955 -0
- data/lib/daytona_api_client/api_client.rb +393 -0
- data/lib/daytona_api_client/api_error.rb +58 -0
- data/lib/daytona_api_client/configuration.rb +306 -0
- data/lib/daytona_api_client/models/account_provider.rb +261 -0
- data/lib/daytona_api_client/models/announcement.rb +246 -0
- data/lib/daytona_api_client/models/api_key_list.rb +384 -0
- data/lib/daytona_api_client/models/api_key_response.rb +344 -0
- data/lib/daytona_api_client/models/audit_log.rb +422 -0
- data/lib/daytona_api_client/models/build_info.rb +285 -0
- data/lib/daytona_api_client/models/command.rb +273 -0
- 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/completion_list.rb +263 -0
- 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/computer_use_status_response.rb +260 -0
- data/lib/daytona_api_client/models/computer_use_stop_response.rb +263 -0
- data/lib/daytona_api_client/models/create_api_key.rb +288 -0
- data/lib/daytona_api_client/models/create_audit_log.rb +350 -0
- data/lib/daytona_api_client/models/create_build_info.rb +248 -0
- data/lib/daytona_api_client/models/create_docker_registry.rb +388 -0
- data/lib/daytona_api_client/models/create_linked_account.rb +263 -0
- data/lib/daytona_api_client/models/create_organization.rb +263 -0
- data/lib/daytona_api_client/models/create_organization_invitation.rb +326 -0
- data/lib/daytona_api_client/models/create_organization_quota.rb +290 -0
- data/lib/daytona_api_client/models/create_organization_role.rb +304 -0
- data/lib/daytona_api_client/models/create_runner.rb +545 -0
- data/lib/daytona_api_client/models/create_sandbox.rb +439 -0
- data/lib/daytona_api_client/models/create_session_request.rb +236 -0
- data/lib/daytona_api_client/models/create_snapshot.rb +318 -0
- data/lib/daytona_api_client/models/create_user.rb +340 -0
- data/lib/daytona_api_client/models/create_volume.rb +235 -0
- data/lib/daytona_api_client/models/create_workspace.rb +411 -0
- data/lib/daytona_api_client/models/daytona_configuration.rb +568 -0
- data/lib/daytona_api_client/models/display_info_response.rb +238 -0
- data/lib/daytona_api_client/models/docker_registry.rb +449 -0
- data/lib/daytona_api_client/models/download_files.rb +238 -0
- data/lib/daytona_api_client/models/execute_request.rb +255 -0
- data/lib/daytona_api_client/models/execute_response.rb +263 -0
- data/lib/daytona_api_client/models/file_info.rb +417 -0
- data/lib/daytona_api_client/models/file_status.rb +313 -0
- data/lib/daytona_api_client/models/git_add_request.rb +264 -0
- data/lib/daytona_api_client/models/git_branch_request.rb +261 -0
- data/lib/daytona_api_client/models/git_checkout_request.rb +261 -0
- data/lib/daytona_api_client/models/git_clone_request.rb +297 -0
- data/lib/daytona_api_client/models/git_commit_info.rb +339 -0
- data/lib/daytona_api_client/models/git_commit_request.rb +325 -0
- data/lib/daytona_api_client/models/git_commit_response.rb +235 -0
- data/lib/daytona_api_client/models/git_delete_branch_request.rb +261 -0
- data/lib/daytona_api_client/models/git_repo_request.rb +253 -0
- data/lib/daytona_api_client/models/git_status.rb +290 -0
- data/lib/daytona_api_client/models/health_controller_check200_response.rb +253 -0
- data/lib/daytona_api_client/models/health_controller_check200_response_info_value.rb +235 -0
- data/lib/daytona_api_client/models/health_controller_check503_response.rb +253 -0
- data/lib/daytona_api_client/models/keyboard_hotkey_request.rb +236 -0
- data/lib/daytona_api_client/models/keyboard_press_request.rb +248 -0
- data/lib/daytona_api_client/models/keyboard_type_request.rb +246 -0
- data/lib/daytona_api_client/models/list_branch_response.rb +237 -0
- data/lib/daytona_api_client/models/lsp_completion_params.rb +325 -0
- data/lib/daytona_api_client/models/lsp_document_request.rb +290 -0
- data/lib/daytona_api_client/models/lsp_location.rb +261 -0
- data/lib/daytona_api_client/models/lsp_server_request.rb +263 -0
- data/lib/daytona_api_client/models/lsp_symbol.rb +287 -0
- data/lib/daytona_api_client/models/match.rb +287 -0
- data/lib/daytona_api_client/models/mouse_click_request.rb +283 -0
- data/lib/daytona_api_client/models/mouse_click_response.rb +263 -0
- data/lib/daytona_api_client/models/mouse_drag_request.rb +327 -0
- data/lib/daytona_api_client/models/mouse_drag_response.rb +263 -0
- data/lib/daytona_api_client/models/mouse_move_request.rb +263 -0
- data/lib/daytona_api_client/models/mouse_move_response.rb +263 -0
- data/lib/daytona_api_client/models/mouse_position.rb +263 -0
- data/lib/daytona_api_client/models/mouse_scroll_request.rb +300 -0
- data/lib/daytona_api_client/models/mouse_scroll_response.rb +236 -0
- data/lib/daytona_api_client/models/oidc_config.rb +290 -0
- data/lib/daytona_api_client/models/organization.rb +663 -0
- data/lib/daytona_api_client/models/organization_invitation.rb +534 -0
- data/lib/daytona_api_client/models/organization_role.rb +412 -0
- 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 +341 -0
- data/lib/daytona_api_client/models/organization_user.rb +451 -0
- data/lib/daytona_api_client/models/paginated_audit_logs.rb +325 -0
- data/lib/daytona_api_client/models/paginated_sandboxes.rb +315 -0
- data/lib/daytona_api_client/models/paginated_snapshots.rb +315 -0
- data/lib/daytona_api_client/models/paginated_snapshots_dto.rb +315 -0
- data/lib/daytona_api_client/models/port_preview_url.rb +290 -0
- data/lib/daytona_api_client/models/position.rb +261 -0
- data/lib/daytona_api_client/models/posthog_config.rb +263 -0
- 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/project_dir_response.rb +218 -0
- data/lib/daytona_api_client/models/pty_create_request.rb +288 -0
- data/lib/daytona_api_client/models/pty_create_response.rb +236 -0
- data/lib/daytona_api_client/models/pty_list_response.rb +238 -0
- 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/rate_limit_config.rb +249 -0
- data/lib/daytona_api_client/models/rate_limit_entry.rb +229 -0
- data/lib/daytona_api_client/models/region.rb +328 -0
- data/lib/daytona_api_client/models/region_quota.rb +339 -0
- data/lib/daytona_api_client/models/region_screenshot_response.rb +256 -0
- data/lib/daytona_api_client/models/region_usage_overview.rb +391 -0
- data/lib/daytona_api_client/models/registry_push_access_dto.rb +371 -0
- 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 +780 -0
- data/lib/daytona_api_client/models/runner_snapshot_dto.rb +290 -0
- data/lib/daytona_api_client/models/runner_state.rb +43 -0
- data/lib/daytona_api_client/models/sandbox.rb +782 -0
- data/lib/daytona_api_client/models/sandbox_class.rb +41 -0
- data/lib/daytona_api_client/models/sandbox_desired_state.rb +43 -0
- data/lib/daytona_api_client/models/sandbox_info.rb +273 -0
- data/lib/daytona_api_client/models/sandbox_labels.rb +238 -0
- data/lib/daytona_api_client/models/sandbox_state.rb +54 -0
- data/lib/daytona_api_client/models/sandbox_volume.rb +273 -0
- data/lib/daytona_api_client/models/screenshot_response.rb +256 -0
- data/lib/daytona_api_client/models/search_files_response.rb +237 -0
- 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/session_execute_request.rb +256 -0
- data/lib/daytona_api_client/models/session_execute_response.rb +239 -0
- data/lib/daytona_api_client/models/set_snapshot_general_status_dto.rb +236 -0
- data/lib/daytona_api_client/models/snapshot_dto.rb +569 -0
- data/lib/daytona_api_client/models/snapshot_state.rb +46 -0
- data/lib/daytona_api_client/models/ssh_access_dto.rb +371 -0
- data/lib/daytona_api_client/models/ssh_access_validation_dto.rb +263 -0
- data/lib/daytona_api_client/models/storage_access_dto.rb +371 -0
- data/lib/daytona_api_client/models/update_docker_registry.rb +310 -0
- data/lib/daytona_api_client/models/update_organization_default_region.rb +236 -0
- data/lib/daytona_api_client/models/update_organization_invitation.rb +299 -0
- data/lib/daytona_api_client/models/update_organization_member_access.rb +289 -0
- data/lib/daytona_api_client/models/update_organization_quota.rb +317 -0
- data/lib/daytona_api_client/models/update_organization_region_quota.rb +245 -0
- data/lib/daytona_api_client/models/update_organization_role.rb +304 -0
- data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +270 -0
- data/lib/daytona_api_client/models/user.rb +346 -0
- data/lib/daytona_api_client/models/user_home_dir_response.rb +218 -0
- data/lib/daytona_api_client/models/user_public_key.rb +263 -0
- data/lib/daytona_api_client/models/volume_dto.rb +417 -0
- data/lib/daytona_api_client/models/volume_state.rb +45 -0
- data/lib/daytona_api_client/models/webhook_app_portal_access.rb +236 -0
- data/lib/daytona_api_client/models/webhook_controller_get_status200_response.rb +218 -0
- data/lib/daytona_api_client/models/webhook_initialization_status.rb +343 -0
- data/lib/daytona_api_client/models/windows_response.rb +265 -0
- data/lib/daytona_api_client/models/work_dir_response.rb +218 -0
- data/lib/daytona_api_client/models/workspace.rb +834 -0
- data/lib/daytona_api_client/models/workspace_port_preview_url.rb +263 -0
- data/lib/daytona_api_client/version.rb +15 -0
- data/lib/daytona_api_client.rb +201 -0
- data/project.json +59 -0
- metadata +261 -0
|
@@ -0,0 +1,1660 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Daytona
|
|
3
|
+
|
|
4
|
+
#Daytona AI platform API Docs
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: support@daytona.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.12.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module DaytonaApiClient
|
|
16
|
+
class SandboxApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Archive sandbox
|
|
23
|
+
# @param sandbox_id_or_name [String]
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
26
|
+
# @return [Sandbox]
|
|
27
|
+
def archive_sandbox(sandbox_id_or_name, opts = {})
|
|
28
|
+
data, _status_code, _headers = archive_sandbox_with_http_info(sandbox_id_or_name, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Archive sandbox
|
|
33
|
+
# @param sandbox_id_or_name [String]
|
|
34
|
+
# @param [Hash] opts the optional parameters
|
|
35
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
36
|
+
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
37
|
+
def archive_sandbox_with_http_info(sandbox_id_or_name, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.archive_sandbox ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'sandbox_id_or_name' is set
|
|
42
|
+
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.archive_sandbox"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/sandbox/{sandboxIdOrName}/archive'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
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
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
56
|
+
|
|
57
|
+
# form parameters
|
|
58
|
+
form_params = opts[:form_params] || {}
|
|
59
|
+
|
|
60
|
+
# http body (model)
|
|
61
|
+
post_body = opts[:debug_body]
|
|
62
|
+
|
|
63
|
+
# return_type
|
|
64
|
+
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
65
|
+
|
|
66
|
+
# auth_names
|
|
67
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
68
|
+
|
|
69
|
+
new_options = opts.merge(
|
|
70
|
+
:operation => :"SandboxApi.archive_sandbox",
|
|
71
|
+
:header_params => header_params,
|
|
72
|
+
:query_params => query_params,
|
|
73
|
+
:form_params => form_params,
|
|
74
|
+
:body => post_body,
|
|
75
|
+
:auth_names => auth_names,
|
|
76
|
+
:return_type => return_type
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
80
|
+
if @api_client.config.debugging
|
|
81
|
+
@api_client.config.logger.debug "API called: SandboxApi#archive_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
82
|
+
end
|
|
83
|
+
return data, status_code, headers
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Create sandbox backup
|
|
87
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
88
|
+
# @param [Hash] opts the optional parameters
|
|
89
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
90
|
+
# @return [Sandbox]
|
|
91
|
+
def create_backup(sandbox_id_or_name, opts = {})
|
|
92
|
+
data, _status_code, _headers = create_backup_with_http_info(sandbox_id_or_name, opts)
|
|
93
|
+
data
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Create sandbox backup
|
|
97
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
98
|
+
# @param [Hash] opts the optional parameters
|
|
99
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
100
|
+
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
101
|
+
def create_backup_with_http_info(sandbox_id_or_name, opts = {})
|
|
102
|
+
if @api_client.config.debugging
|
|
103
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.create_backup ...'
|
|
104
|
+
end
|
|
105
|
+
# verify the required parameter 'sandbox_id_or_name' is set
|
|
106
|
+
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
107
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.create_backup"
|
|
108
|
+
end
|
|
109
|
+
# resource path
|
|
110
|
+
local_var_path = '/sandbox/{sandboxIdOrName}/backup'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
111
|
+
|
|
112
|
+
# query parameters
|
|
113
|
+
query_params = opts[:query_params] || {}
|
|
114
|
+
|
|
115
|
+
# header parameters
|
|
116
|
+
header_params = opts[:header_params] || {}
|
|
117
|
+
# HTTP header 'Accept' (if needed)
|
|
118
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
119
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
120
|
+
|
|
121
|
+
# form parameters
|
|
122
|
+
form_params = opts[:form_params] || {}
|
|
123
|
+
|
|
124
|
+
# http body (model)
|
|
125
|
+
post_body = opts[:debug_body]
|
|
126
|
+
|
|
127
|
+
# return_type
|
|
128
|
+
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
129
|
+
|
|
130
|
+
# auth_names
|
|
131
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
132
|
+
|
|
133
|
+
new_options = opts.merge(
|
|
134
|
+
:operation => :"SandboxApi.create_backup",
|
|
135
|
+
:header_params => header_params,
|
|
136
|
+
:query_params => query_params,
|
|
137
|
+
:form_params => form_params,
|
|
138
|
+
:body => post_body,
|
|
139
|
+
:auth_names => auth_names,
|
|
140
|
+
:return_type => return_type
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
144
|
+
if @api_client.config.debugging
|
|
145
|
+
@api_client.config.logger.debug "API called: SandboxApi#create_backup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
146
|
+
end
|
|
147
|
+
return data, status_code, headers
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Create a new sandbox
|
|
151
|
+
# @param create_sandbox [CreateSandbox]
|
|
152
|
+
# @param [Hash] opts the optional parameters
|
|
153
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
154
|
+
# @return [Sandbox]
|
|
155
|
+
def create_sandbox(create_sandbox, opts = {})
|
|
156
|
+
data, _status_code, _headers = create_sandbox_with_http_info(create_sandbox, opts)
|
|
157
|
+
data
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Create a new sandbox
|
|
161
|
+
# @param create_sandbox [CreateSandbox]
|
|
162
|
+
# @param [Hash] opts the optional parameters
|
|
163
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
164
|
+
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
165
|
+
def create_sandbox_with_http_info(create_sandbox, opts = {})
|
|
166
|
+
if @api_client.config.debugging
|
|
167
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.create_sandbox ...'
|
|
168
|
+
end
|
|
169
|
+
# verify the required parameter 'create_sandbox' is set
|
|
170
|
+
if @api_client.config.client_side_validation && create_sandbox.nil?
|
|
171
|
+
fail ArgumentError, "Missing the required parameter 'create_sandbox' when calling SandboxApi.create_sandbox"
|
|
172
|
+
end
|
|
173
|
+
# resource path
|
|
174
|
+
local_var_path = '/sandbox'
|
|
175
|
+
|
|
176
|
+
# query parameters
|
|
177
|
+
query_params = opts[:query_params] || {}
|
|
178
|
+
|
|
179
|
+
# header parameters
|
|
180
|
+
header_params = opts[:header_params] || {}
|
|
181
|
+
# HTTP header 'Accept' (if needed)
|
|
182
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
183
|
+
# HTTP header 'Content-Type'
|
|
184
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
185
|
+
if !content_type.nil?
|
|
186
|
+
header_params['Content-Type'] = content_type
|
|
187
|
+
end
|
|
188
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
189
|
+
|
|
190
|
+
# form parameters
|
|
191
|
+
form_params = opts[:form_params] || {}
|
|
192
|
+
|
|
193
|
+
# http body (model)
|
|
194
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_sandbox)
|
|
195
|
+
|
|
196
|
+
# return_type
|
|
197
|
+
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
198
|
+
|
|
199
|
+
# auth_names
|
|
200
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
201
|
+
|
|
202
|
+
new_options = opts.merge(
|
|
203
|
+
:operation => :"SandboxApi.create_sandbox",
|
|
204
|
+
:header_params => header_params,
|
|
205
|
+
:query_params => query_params,
|
|
206
|
+
:form_params => form_params,
|
|
207
|
+
:body => post_body,
|
|
208
|
+
:auth_names => auth_names,
|
|
209
|
+
:return_type => return_type
|
|
210
|
+
)
|
|
211
|
+
|
|
212
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
213
|
+
if @api_client.config.debugging
|
|
214
|
+
@api_client.config.logger.debug "API called: SandboxApi#create_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
215
|
+
end
|
|
216
|
+
return data, status_code, headers
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Create SSH access for sandbox
|
|
220
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
221
|
+
# @param [Hash] opts the optional parameters
|
|
222
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
223
|
+
# @option opts [Float] :expires_in_minutes Expiration time in minutes (default: 60)
|
|
224
|
+
# @return [SshAccessDto]
|
|
225
|
+
def create_ssh_access(sandbox_id_or_name, opts = {})
|
|
226
|
+
data, _status_code, _headers = create_ssh_access_with_http_info(sandbox_id_or_name, opts)
|
|
227
|
+
data
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# Create SSH access for sandbox
|
|
231
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
232
|
+
# @param [Hash] opts the optional parameters
|
|
233
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
234
|
+
# @option opts [Float] :expires_in_minutes Expiration time in minutes (default: 60)
|
|
235
|
+
# @return [Array<(SshAccessDto, Integer, Hash)>] SshAccessDto data, response status code and response headers
|
|
236
|
+
def create_ssh_access_with_http_info(sandbox_id_or_name, opts = {})
|
|
237
|
+
if @api_client.config.debugging
|
|
238
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.create_ssh_access ...'
|
|
239
|
+
end
|
|
240
|
+
# verify the required parameter 'sandbox_id_or_name' is set
|
|
241
|
+
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
242
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.create_ssh_access"
|
|
243
|
+
end
|
|
244
|
+
# resource path
|
|
245
|
+
local_var_path = '/sandbox/{sandboxIdOrName}/ssh-access'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
246
|
+
|
|
247
|
+
# query parameters
|
|
248
|
+
query_params = opts[:query_params] || {}
|
|
249
|
+
query_params[:'expiresInMinutes'] = opts[:'expires_in_minutes'] if !opts[:'expires_in_minutes'].nil?
|
|
250
|
+
|
|
251
|
+
# header parameters
|
|
252
|
+
header_params = opts[:header_params] || {}
|
|
253
|
+
# HTTP header 'Accept' (if needed)
|
|
254
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
255
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
256
|
+
|
|
257
|
+
# form parameters
|
|
258
|
+
form_params = opts[:form_params] || {}
|
|
259
|
+
|
|
260
|
+
# http body (model)
|
|
261
|
+
post_body = opts[:debug_body]
|
|
262
|
+
|
|
263
|
+
# return_type
|
|
264
|
+
return_type = opts[:debug_return_type] || 'SshAccessDto'
|
|
265
|
+
|
|
266
|
+
# auth_names
|
|
267
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
268
|
+
|
|
269
|
+
new_options = opts.merge(
|
|
270
|
+
:operation => :"SandboxApi.create_ssh_access",
|
|
271
|
+
:header_params => header_params,
|
|
272
|
+
:query_params => query_params,
|
|
273
|
+
:form_params => form_params,
|
|
274
|
+
:body => post_body,
|
|
275
|
+
:auth_names => auth_names,
|
|
276
|
+
:return_type => return_type
|
|
277
|
+
)
|
|
278
|
+
|
|
279
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
280
|
+
if @api_client.config.debugging
|
|
281
|
+
@api_client.config.logger.debug "API called: SandboxApi#create_ssh_access\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
282
|
+
end
|
|
283
|
+
return data, status_code, headers
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
# Delete sandbox
|
|
287
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
288
|
+
# @param [Hash] opts the optional parameters
|
|
289
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
290
|
+
# @return [Sandbox]
|
|
291
|
+
def delete_sandbox(sandbox_id_or_name, opts = {})
|
|
292
|
+
data, _status_code, _headers = delete_sandbox_with_http_info(sandbox_id_or_name, opts)
|
|
293
|
+
data
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# Delete sandbox
|
|
297
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
298
|
+
# @param [Hash] opts the optional parameters
|
|
299
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
300
|
+
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
301
|
+
def delete_sandbox_with_http_info(sandbox_id_or_name, opts = {})
|
|
302
|
+
if @api_client.config.debugging
|
|
303
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.delete_sandbox ...'
|
|
304
|
+
end
|
|
305
|
+
# verify the required parameter 'sandbox_id_or_name' is set
|
|
306
|
+
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
307
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.delete_sandbox"
|
|
308
|
+
end
|
|
309
|
+
# resource path
|
|
310
|
+
local_var_path = '/sandbox/{sandboxIdOrName}'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
311
|
+
|
|
312
|
+
# query parameters
|
|
313
|
+
query_params = opts[:query_params] || {}
|
|
314
|
+
|
|
315
|
+
# header parameters
|
|
316
|
+
header_params = opts[:header_params] || {}
|
|
317
|
+
# HTTP header 'Accept' (if needed)
|
|
318
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
319
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
320
|
+
|
|
321
|
+
# form parameters
|
|
322
|
+
form_params = opts[:form_params] || {}
|
|
323
|
+
|
|
324
|
+
# http body (model)
|
|
325
|
+
post_body = opts[:debug_body]
|
|
326
|
+
|
|
327
|
+
# return_type
|
|
328
|
+
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
329
|
+
|
|
330
|
+
# auth_names
|
|
331
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
332
|
+
|
|
333
|
+
new_options = opts.merge(
|
|
334
|
+
:operation => :"SandboxApi.delete_sandbox",
|
|
335
|
+
:header_params => header_params,
|
|
336
|
+
:query_params => query_params,
|
|
337
|
+
:form_params => form_params,
|
|
338
|
+
:body => post_body,
|
|
339
|
+
:auth_names => auth_names,
|
|
340
|
+
:return_type => return_type
|
|
341
|
+
)
|
|
342
|
+
|
|
343
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
344
|
+
if @api_client.config.debugging
|
|
345
|
+
@api_client.config.logger.debug "API called: SandboxApi#delete_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
346
|
+
end
|
|
347
|
+
return data, status_code, headers
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
# Get build logs
|
|
351
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
352
|
+
# @param [Hash] opts the optional parameters
|
|
353
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
354
|
+
# @option opts [Boolean] :follow Whether to follow the logs stream
|
|
355
|
+
# @return [nil]
|
|
356
|
+
def get_build_logs(sandbox_id_or_name, opts = {})
|
|
357
|
+
get_build_logs_with_http_info(sandbox_id_or_name, opts)
|
|
358
|
+
nil
|
|
359
|
+
end
|
|
360
|
+
|
|
361
|
+
# Get build logs
|
|
362
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
363
|
+
# @param [Hash] opts the optional parameters
|
|
364
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
365
|
+
# @option opts [Boolean] :follow Whether to follow the logs stream
|
|
366
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
367
|
+
def get_build_logs_with_http_info(sandbox_id_or_name, opts = {})
|
|
368
|
+
if @api_client.config.debugging
|
|
369
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.get_build_logs ...'
|
|
370
|
+
end
|
|
371
|
+
# verify the required parameter 'sandbox_id_or_name' is set
|
|
372
|
+
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
373
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_build_logs"
|
|
374
|
+
end
|
|
375
|
+
# resource path
|
|
376
|
+
local_var_path = '/sandbox/{sandboxIdOrName}/build-logs'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
377
|
+
|
|
378
|
+
# query parameters
|
|
379
|
+
query_params = opts[:query_params] || {}
|
|
380
|
+
query_params[:'follow'] = opts[:'follow'] if !opts[:'follow'].nil?
|
|
381
|
+
|
|
382
|
+
# header parameters
|
|
383
|
+
header_params = opts[:header_params] || {}
|
|
384
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
385
|
+
|
|
386
|
+
# form parameters
|
|
387
|
+
form_params = opts[:form_params] || {}
|
|
388
|
+
|
|
389
|
+
# http body (model)
|
|
390
|
+
post_body = opts[:debug_body]
|
|
391
|
+
|
|
392
|
+
# return_type
|
|
393
|
+
return_type = opts[:debug_return_type]
|
|
394
|
+
|
|
395
|
+
# auth_names
|
|
396
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
397
|
+
|
|
398
|
+
new_options = opts.merge(
|
|
399
|
+
:operation => :"SandboxApi.get_build_logs",
|
|
400
|
+
:header_params => header_params,
|
|
401
|
+
:query_params => query_params,
|
|
402
|
+
:form_params => form_params,
|
|
403
|
+
:body => post_body,
|
|
404
|
+
:auth_names => auth_names,
|
|
405
|
+
:return_type => return_type
|
|
406
|
+
)
|
|
407
|
+
|
|
408
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
409
|
+
if @api_client.config.debugging
|
|
410
|
+
@api_client.config.logger.debug "API called: SandboxApi#get_build_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
411
|
+
end
|
|
412
|
+
return data, status_code, headers
|
|
413
|
+
end
|
|
414
|
+
|
|
415
|
+
# Get preview URL for a sandbox port
|
|
416
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
417
|
+
# @param port [Float] Port number to get preview URL for
|
|
418
|
+
# @param [Hash] opts the optional parameters
|
|
419
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
420
|
+
# @return [PortPreviewUrl]
|
|
421
|
+
def get_port_preview_url(sandbox_id_or_name, port, opts = {})
|
|
422
|
+
data, _status_code, _headers = get_port_preview_url_with_http_info(sandbox_id_or_name, port, opts)
|
|
423
|
+
data
|
|
424
|
+
end
|
|
425
|
+
|
|
426
|
+
# Get preview URL for a sandbox port
|
|
427
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
428
|
+
# @param port [Float] Port number to get preview URL for
|
|
429
|
+
# @param [Hash] opts the optional parameters
|
|
430
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
431
|
+
# @return [Array<(PortPreviewUrl, Integer, Hash)>] PortPreviewUrl data, response status code and response headers
|
|
432
|
+
def get_port_preview_url_with_http_info(sandbox_id_or_name, port, opts = {})
|
|
433
|
+
if @api_client.config.debugging
|
|
434
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.get_port_preview_url ...'
|
|
435
|
+
end
|
|
436
|
+
# verify the required parameter 'sandbox_id_or_name' is set
|
|
437
|
+
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
438
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_port_preview_url"
|
|
439
|
+
end
|
|
440
|
+
# verify the required parameter 'port' is set
|
|
441
|
+
if @api_client.config.client_side_validation && port.nil?
|
|
442
|
+
fail ArgumentError, "Missing the required parameter 'port' when calling SandboxApi.get_port_preview_url"
|
|
443
|
+
end
|
|
444
|
+
# resource path
|
|
445
|
+
local_var_path = '/sandbox/{sandboxIdOrName}/ports/{port}/preview-url'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s)).sub('{' + 'port' + '}', CGI.escape(port.to_s))
|
|
446
|
+
|
|
447
|
+
# query parameters
|
|
448
|
+
query_params = opts[:query_params] || {}
|
|
449
|
+
|
|
450
|
+
# header parameters
|
|
451
|
+
header_params = opts[:header_params] || {}
|
|
452
|
+
# HTTP header 'Accept' (if needed)
|
|
453
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
454
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
455
|
+
|
|
456
|
+
# form parameters
|
|
457
|
+
form_params = opts[:form_params] || {}
|
|
458
|
+
|
|
459
|
+
# http body (model)
|
|
460
|
+
post_body = opts[:debug_body]
|
|
461
|
+
|
|
462
|
+
# return_type
|
|
463
|
+
return_type = opts[:debug_return_type] || 'PortPreviewUrl'
|
|
464
|
+
|
|
465
|
+
# auth_names
|
|
466
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
467
|
+
|
|
468
|
+
new_options = opts.merge(
|
|
469
|
+
:operation => :"SandboxApi.get_port_preview_url",
|
|
470
|
+
:header_params => header_params,
|
|
471
|
+
:query_params => query_params,
|
|
472
|
+
:form_params => form_params,
|
|
473
|
+
:body => post_body,
|
|
474
|
+
:auth_names => auth_names,
|
|
475
|
+
:return_type => return_type
|
|
476
|
+
)
|
|
477
|
+
|
|
478
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
479
|
+
if @api_client.config.debugging
|
|
480
|
+
@api_client.config.logger.debug "API called: SandboxApi#get_port_preview_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
481
|
+
end
|
|
482
|
+
return data, status_code, headers
|
|
483
|
+
end
|
|
484
|
+
|
|
485
|
+
# Get sandbox details
|
|
486
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
487
|
+
# @param [Hash] opts the optional parameters
|
|
488
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
489
|
+
# @option opts [Boolean] :verbose Include verbose output
|
|
490
|
+
# @return [Sandbox]
|
|
491
|
+
def get_sandbox(sandbox_id_or_name, opts = {})
|
|
492
|
+
data, _status_code, _headers = get_sandbox_with_http_info(sandbox_id_or_name, opts)
|
|
493
|
+
data
|
|
494
|
+
end
|
|
495
|
+
|
|
496
|
+
# Get sandbox details
|
|
497
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
498
|
+
# @param [Hash] opts the optional parameters
|
|
499
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
500
|
+
# @option opts [Boolean] :verbose Include verbose output
|
|
501
|
+
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
502
|
+
def get_sandbox_with_http_info(sandbox_id_or_name, opts = {})
|
|
503
|
+
if @api_client.config.debugging
|
|
504
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandbox ...'
|
|
505
|
+
end
|
|
506
|
+
# verify the required parameter 'sandbox_id_or_name' is set
|
|
507
|
+
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
508
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.get_sandbox"
|
|
509
|
+
end
|
|
510
|
+
# resource path
|
|
511
|
+
local_var_path = '/sandbox/{sandboxIdOrName}'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
512
|
+
|
|
513
|
+
# query parameters
|
|
514
|
+
query_params = opts[:query_params] || {}
|
|
515
|
+
query_params[:'verbose'] = opts[:'verbose'] if !opts[:'verbose'].nil?
|
|
516
|
+
|
|
517
|
+
# header parameters
|
|
518
|
+
header_params = opts[:header_params] || {}
|
|
519
|
+
# HTTP header 'Accept' (if needed)
|
|
520
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
521
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
522
|
+
|
|
523
|
+
# form parameters
|
|
524
|
+
form_params = opts[:form_params] || {}
|
|
525
|
+
|
|
526
|
+
# http body (model)
|
|
527
|
+
post_body = opts[:debug_body]
|
|
528
|
+
|
|
529
|
+
# return_type
|
|
530
|
+
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
531
|
+
|
|
532
|
+
# auth_names
|
|
533
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
534
|
+
|
|
535
|
+
new_options = opts.merge(
|
|
536
|
+
:operation => :"SandboxApi.get_sandbox",
|
|
537
|
+
:header_params => header_params,
|
|
538
|
+
:query_params => query_params,
|
|
539
|
+
:form_params => form_params,
|
|
540
|
+
:body => post_body,
|
|
541
|
+
:auth_names => auth_names,
|
|
542
|
+
:return_type => return_type
|
|
543
|
+
)
|
|
544
|
+
|
|
545
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
546
|
+
if @api_client.config.debugging
|
|
547
|
+
@api_client.config.logger.debug "API called: SandboxApi#get_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
548
|
+
end
|
|
549
|
+
return data, status_code, headers
|
|
550
|
+
end
|
|
551
|
+
|
|
552
|
+
# Get sandboxes for the authenticated runner
|
|
553
|
+
# @param [Hash] opts the optional parameters
|
|
554
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
555
|
+
# @option opts [String] :states Comma-separated list of sandbox states to filter by
|
|
556
|
+
# @option opts [Boolean] :skip_reconciling_sandboxes Skip sandboxes where state differs from desired state
|
|
557
|
+
# @return [Array<Sandbox>]
|
|
558
|
+
def get_sandboxes_for_runner(opts = {})
|
|
559
|
+
data, _status_code, _headers = get_sandboxes_for_runner_with_http_info(opts)
|
|
560
|
+
data
|
|
561
|
+
end
|
|
562
|
+
|
|
563
|
+
# Get sandboxes for the authenticated runner
|
|
564
|
+
# @param [Hash] opts the optional parameters
|
|
565
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
566
|
+
# @option opts [String] :states Comma-separated list of sandbox states to filter by
|
|
567
|
+
# @option opts [Boolean] :skip_reconciling_sandboxes Skip sandboxes where state differs from desired state
|
|
568
|
+
# @return [Array<(Array<Sandbox>, Integer, Hash)>] Array<Sandbox> data, response status code and response headers
|
|
569
|
+
def get_sandboxes_for_runner_with_http_info(opts = {})
|
|
570
|
+
if @api_client.config.debugging
|
|
571
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.get_sandboxes_for_runner ...'
|
|
572
|
+
end
|
|
573
|
+
# resource path
|
|
574
|
+
local_var_path = '/sandbox/for-runner'
|
|
575
|
+
|
|
576
|
+
# query parameters
|
|
577
|
+
query_params = opts[:query_params] || {}
|
|
578
|
+
query_params[:'states'] = opts[:'states'] if !opts[:'states'].nil?
|
|
579
|
+
query_params[:'skipReconcilingSandboxes'] = opts[:'skip_reconciling_sandboxes'] if !opts[:'skip_reconciling_sandboxes'].nil?
|
|
580
|
+
|
|
581
|
+
# header parameters
|
|
582
|
+
header_params = opts[:header_params] || {}
|
|
583
|
+
# HTTP header 'Accept' (if needed)
|
|
584
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
585
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
586
|
+
|
|
587
|
+
# form parameters
|
|
588
|
+
form_params = opts[:form_params] || {}
|
|
589
|
+
|
|
590
|
+
# http body (model)
|
|
591
|
+
post_body = opts[:debug_body]
|
|
592
|
+
|
|
593
|
+
# return_type
|
|
594
|
+
return_type = opts[:debug_return_type] || 'Array<Sandbox>'
|
|
595
|
+
|
|
596
|
+
# auth_names
|
|
597
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
598
|
+
|
|
599
|
+
new_options = opts.merge(
|
|
600
|
+
:operation => :"SandboxApi.get_sandboxes_for_runner",
|
|
601
|
+
:header_params => header_params,
|
|
602
|
+
:query_params => query_params,
|
|
603
|
+
:form_params => form_params,
|
|
604
|
+
:body => post_body,
|
|
605
|
+
:auth_names => auth_names,
|
|
606
|
+
:return_type => return_type
|
|
607
|
+
)
|
|
608
|
+
|
|
609
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
610
|
+
if @api_client.config.debugging
|
|
611
|
+
@api_client.config.logger.debug "API called: SandboxApi#get_sandboxes_for_runner\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
612
|
+
end
|
|
613
|
+
return data, status_code, headers
|
|
614
|
+
end
|
|
615
|
+
|
|
616
|
+
# List all sandboxes
|
|
617
|
+
# @param [Hash] opts the optional parameters
|
|
618
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
619
|
+
# @option opts [Boolean] :verbose Include verbose output
|
|
620
|
+
# @option opts [String] :labels JSON encoded labels to filter by
|
|
621
|
+
# @option opts [Boolean] :include_errored_deleted Include errored and deleted sandboxes
|
|
622
|
+
# @return [Array<Sandbox>]
|
|
623
|
+
def list_sandboxes(opts = {})
|
|
624
|
+
data, _status_code, _headers = list_sandboxes_with_http_info(opts)
|
|
625
|
+
data
|
|
626
|
+
end
|
|
627
|
+
|
|
628
|
+
# List all sandboxes
|
|
629
|
+
# @param [Hash] opts the optional parameters
|
|
630
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
631
|
+
# @option opts [Boolean] :verbose Include verbose output
|
|
632
|
+
# @option opts [String] :labels JSON encoded labels to filter by
|
|
633
|
+
# @option opts [Boolean] :include_errored_deleted Include errored and deleted sandboxes
|
|
634
|
+
# @return [Array<(Array<Sandbox>, Integer, Hash)>] Array<Sandbox> data, response status code and response headers
|
|
635
|
+
def list_sandboxes_with_http_info(opts = {})
|
|
636
|
+
if @api_client.config.debugging
|
|
637
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.list_sandboxes ...'
|
|
638
|
+
end
|
|
639
|
+
# resource path
|
|
640
|
+
local_var_path = '/sandbox'
|
|
641
|
+
|
|
642
|
+
# query parameters
|
|
643
|
+
query_params = opts[:query_params] || {}
|
|
644
|
+
query_params[:'verbose'] = opts[:'verbose'] if !opts[:'verbose'].nil?
|
|
645
|
+
query_params[:'labels'] = opts[:'labels'] if !opts[:'labels'].nil?
|
|
646
|
+
query_params[:'includeErroredDeleted'] = opts[:'include_errored_deleted'] if !opts[:'include_errored_deleted'].nil?
|
|
647
|
+
|
|
648
|
+
# header parameters
|
|
649
|
+
header_params = opts[:header_params] || {}
|
|
650
|
+
# HTTP header 'Accept' (if needed)
|
|
651
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
652
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
653
|
+
|
|
654
|
+
# form parameters
|
|
655
|
+
form_params = opts[:form_params] || {}
|
|
656
|
+
|
|
657
|
+
# http body (model)
|
|
658
|
+
post_body = opts[:debug_body]
|
|
659
|
+
|
|
660
|
+
# return_type
|
|
661
|
+
return_type = opts[:debug_return_type] || 'Array<Sandbox>'
|
|
662
|
+
|
|
663
|
+
# auth_names
|
|
664
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
665
|
+
|
|
666
|
+
new_options = opts.merge(
|
|
667
|
+
:operation => :"SandboxApi.list_sandboxes",
|
|
668
|
+
:header_params => header_params,
|
|
669
|
+
:query_params => query_params,
|
|
670
|
+
:form_params => form_params,
|
|
671
|
+
:body => post_body,
|
|
672
|
+
:auth_names => auth_names,
|
|
673
|
+
:return_type => return_type
|
|
674
|
+
)
|
|
675
|
+
|
|
676
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
677
|
+
if @api_client.config.debugging
|
|
678
|
+
@api_client.config.logger.debug "API called: SandboxApi#list_sandboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
679
|
+
end
|
|
680
|
+
return data, status_code, headers
|
|
681
|
+
end
|
|
682
|
+
|
|
683
|
+
# List all sandboxes paginated
|
|
684
|
+
# @param [Hash] opts the optional parameters
|
|
685
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
686
|
+
# @option opts [Float] :page Page number of the results (default to 1)
|
|
687
|
+
# @option opts [Float] :limit Number of results per page (default to 100)
|
|
688
|
+
# @option opts [String] :id Filter by partial ID match
|
|
689
|
+
# @option opts [String] :name Filter by partial name match
|
|
690
|
+
# @option opts [String] :labels JSON encoded labels to filter by
|
|
691
|
+
# @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
|
|
692
|
+
# @option opts [Array<String>] :states List of states to filter by
|
|
693
|
+
# @option opts [Array<String>] :snapshots List of snapshot names to filter by
|
|
694
|
+
# @option opts [Array<String>] :regions List of regions to filter by
|
|
695
|
+
# @option opts [Float] :min_cpu Minimum CPU
|
|
696
|
+
# @option opts [Float] :max_cpu Maximum CPU
|
|
697
|
+
# @option opts [Float] :min_memory_gi_b Minimum memory in GiB
|
|
698
|
+
# @option opts [Float] :max_memory_gi_b Maximum memory in GiB
|
|
699
|
+
# @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
|
|
700
|
+
# @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
|
|
701
|
+
# @option opts [Time] :last_event_after Include items with last event after this timestamp
|
|
702
|
+
# @option opts [Time] :last_event_before Include items with last event before this timestamp
|
|
703
|
+
# @option opts [String] :sort Field to sort by (default to 'createdAt')
|
|
704
|
+
# @option opts [String] :order Direction to sort by (default to 'desc')
|
|
705
|
+
# @return [PaginatedSandboxes]
|
|
706
|
+
def list_sandboxes_paginated(opts = {})
|
|
707
|
+
data, _status_code, _headers = list_sandboxes_paginated_with_http_info(opts)
|
|
708
|
+
data
|
|
709
|
+
end
|
|
710
|
+
|
|
711
|
+
# List all sandboxes paginated
|
|
712
|
+
# @param [Hash] opts the optional parameters
|
|
713
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
714
|
+
# @option opts [Float] :page Page number of the results (default to 1)
|
|
715
|
+
# @option opts [Float] :limit Number of results per page (default to 100)
|
|
716
|
+
# @option opts [String] :id Filter by partial ID match
|
|
717
|
+
# @option opts [String] :name Filter by partial name match
|
|
718
|
+
# @option opts [String] :labels JSON encoded labels to filter by
|
|
719
|
+
# @option opts [Boolean] :include_errored_deleted Include results with errored state and deleted desired state (default to false)
|
|
720
|
+
# @option opts [Array<String>] :states List of states to filter by
|
|
721
|
+
# @option opts [Array<String>] :snapshots List of snapshot names to filter by
|
|
722
|
+
# @option opts [Array<String>] :regions List of regions to filter by
|
|
723
|
+
# @option opts [Float] :min_cpu Minimum CPU
|
|
724
|
+
# @option opts [Float] :max_cpu Maximum CPU
|
|
725
|
+
# @option opts [Float] :min_memory_gi_b Minimum memory in GiB
|
|
726
|
+
# @option opts [Float] :max_memory_gi_b Maximum memory in GiB
|
|
727
|
+
# @option opts [Float] :min_disk_gi_b Minimum disk space in GiB
|
|
728
|
+
# @option opts [Float] :max_disk_gi_b Maximum disk space in GiB
|
|
729
|
+
# @option opts [Time] :last_event_after Include items with last event after this timestamp
|
|
730
|
+
# @option opts [Time] :last_event_before Include items with last event before this timestamp
|
|
731
|
+
# @option opts [String] :sort Field to sort by (default to 'createdAt')
|
|
732
|
+
# @option opts [String] :order Direction to sort by (default to 'desc')
|
|
733
|
+
# @return [Array<(PaginatedSandboxes, Integer, Hash)>] PaginatedSandboxes data, response status code and response headers
|
|
734
|
+
def list_sandboxes_paginated_with_http_info(opts = {})
|
|
735
|
+
if @api_client.config.debugging
|
|
736
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.list_sandboxes_paginated ...'
|
|
737
|
+
end
|
|
738
|
+
if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
|
|
739
|
+
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
|
|
740
|
+
end
|
|
741
|
+
|
|
742
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 200
|
|
743
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes_paginated, must be smaller than or equal to 200.'
|
|
744
|
+
end
|
|
745
|
+
|
|
746
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
747
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
|
|
748
|
+
end
|
|
749
|
+
|
|
750
|
+
allowable_values = ["creating", "restoring", "destroying", "started", "stopped", "starting", "stopping", "error", "build_failed", "pending_build", "building_snapshot", "unknown", "pulling_snapshot", "archived", "archiving"]
|
|
751
|
+
if @api_client.config.client_side_validation && opts[:'states'] && !opts[:'states'].all? { |item| allowable_values.include?(item) }
|
|
752
|
+
fail ArgumentError, "invalid value for \"states\", must include one of #{allowable_values}"
|
|
753
|
+
end
|
|
754
|
+
if @api_client.config.client_side_validation && !opts[:'min_cpu'].nil? && opts[:'min_cpu'] < 1
|
|
755
|
+
fail ArgumentError, 'invalid value for "opts[:"min_cpu"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
|
|
756
|
+
end
|
|
757
|
+
|
|
758
|
+
if @api_client.config.client_side_validation && !opts[:'max_cpu'].nil? && opts[:'max_cpu'] < 1
|
|
759
|
+
fail ArgumentError, 'invalid value for "opts[:"max_cpu"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
|
|
760
|
+
end
|
|
761
|
+
|
|
762
|
+
if @api_client.config.client_side_validation && !opts[:'min_memory_gi_b'].nil? && opts[:'min_memory_gi_b'] < 1
|
|
763
|
+
fail ArgumentError, 'invalid value for "opts[:"min_memory_gi_b"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
|
|
764
|
+
end
|
|
765
|
+
|
|
766
|
+
if @api_client.config.client_side_validation && !opts[:'max_memory_gi_b'].nil? && opts[:'max_memory_gi_b'] < 1
|
|
767
|
+
fail ArgumentError, 'invalid value for "opts[:"max_memory_gi_b"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
|
|
768
|
+
end
|
|
769
|
+
|
|
770
|
+
if @api_client.config.client_side_validation && !opts[:'min_disk_gi_b'].nil? && opts[:'min_disk_gi_b'] < 1
|
|
771
|
+
fail ArgumentError, 'invalid value for "opts[:"min_disk_gi_b"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
|
|
772
|
+
end
|
|
773
|
+
|
|
774
|
+
if @api_client.config.client_side_validation && !opts[:'max_disk_gi_b'].nil? && opts[:'max_disk_gi_b'] < 1
|
|
775
|
+
fail ArgumentError, 'invalid value for "opts[:"max_disk_gi_b"]" when calling SandboxApi.list_sandboxes_paginated, must be greater than or equal to 1.'
|
|
776
|
+
end
|
|
777
|
+
|
|
778
|
+
allowable_values = ["id", "name", "state", "snapshot", "region", "updatedAt", "createdAt"]
|
|
779
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
|
780
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
|
781
|
+
end
|
|
782
|
+
allowable_values = ["asc", "desc"]
|
|
783
|
+
if @api_client.config.client_side_validation && opts[:'order'] && !allowable_values.include?(opts[:'order'])
|
|
784
|
+
fail ArgumentError, "invalid value for \"order\", must be one of #{allowable_values}"
|
|
785
|
+
end
|
|
786
|
+
# resource path
|
|
787
|
+
local_var_path = '/sandbox/paginated'
|
|
788
|
+
|
|
789
|
+
# query parameters
|
|
790
|
+
query_params = opts[:query_params] || {}
|
|
791
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
792
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
793
|
+
query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
|
|
794
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
795
|
+
query_params[:'labels'] = opts[:'labels'] if !opts[:'labels'].nil?
|
|
796
|
+
query_params[:'includeErroredDeleted'] = opts[:'include_errored_deleted'] if !opts[:'include_errored_deleted'].nil?
|
|
797
|
+
query_params[:'states'] = @api_client.build_collection_param(opts[:'states'], :multi) if !opts[:'states'].nil?
|
|
798
|
+
query_params[:'snapshots'] = @api_client.build_collection_param(opts[:'snapshots'], :multi) if !opts[:'snapshots'].nil?
|
|
799
|
+
query_params[:'regions'] = @api_client.build_collection_param(opts[:'regions'], :multi) if !opts[:'regions'].nil?
|
|
800
|
+
query_params[:'minCpu'] = opts[:'min_cpu'] if !opts[:'min_cpu'].nil?
|
|
801
|
+
query_params[:'maxCpu'] = opts[:'max_cpu'] if !opts[:'max_cpu'].nil?
|
|
802
|
+
query_params[:'minMemoryGiB'] = opts[:'min_memory_gi_b'] if !opts[:'min_memory_gi_b'].nil?
|
|
803
|
+
query_params[:'maxMemoryGiB'] = opts[:'max_memory_gi_b'] if !opts[:'max_memory_gi_b'].nil?
|
|
804
|
+
query_params[:'minDiskGiB'] = opts[:'min_disk_gi_b'] if !opts[:'min_disk_gi_b'].nil?
|
|
805
|
+
query_params[:'maxDiskGiB'] = opts[:'max_disk_gi_b'] if !opts[:'max_disk_gi_b'].nil?
|
|
806
|
+
query_params[:'lastEventAfter'] = opts[:'last_event_after'] if !opts[:'last_event_after'].nil?
|
|
807
|
+
query_params[:'lastEventBefore'] = opts[:'last_event_before'] if !opts[:'last_event_before'].nil?
|
|
808
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
|
809
|
+
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
|
810
|
+
|
|
811
|
+
# header parameters
|
|
812
|
+
header_params = opts[:header_params] || {}
|
|
813
|
+
# HTTP header 'Accept' (if needed)
|
|
814
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
815
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
816
|
+
|
|
817
|
+
# form parameters
|
|
818
|
+
form_params = opts[:form_params] || {}
|
|
819
|
+
|
|
820
|
+
# http body (model)
|
|
821
|
+
post_body = opts[:debug_body]
|
|
822
|
+
|
|
823
|
+
# return_type
|
|
824
|
+
return_type = opts[:debug_return_type] || 'PaginatedSandboxes'
|
|
825
|
+
|
|
826
|
+
# auth_names
|
|
827
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
828
|
+
|
|
829
|
+
new_options = opts.merge(
|
|
830
|
+
:operation => :"SandboxApi.list_sandboxes_paginated",
|
|
831
|
+
:header_params => header_params,
|
|
832
|
+
:query_params => query_params,
|
|
833
|
+
:form_params => form_params,
|
|
834
|
+
:body => post_body,
|
|
835
|
+
:auth_names => auth_names,
|
|
836
|
+
:return_type => return_type
|
|
837
|
+
)
|
|
838
|
+
|
|
839
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
840
|
+
if @api_client.config.debugging
|
|
841
|
+
@api_client.config.logger.debug "API called: SandboxApi#list_sandboxes_paginated\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
842
|
+
end
|
|
843
|
+
return data, status_code, headers
|
|
844
|
+
end
|
|
845
|
+
|
|
846
|
+
# Recover sandbox from error state
|
|
847
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
848
|
+
# @param [Hash] opts the optional parameters
|
|
849
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
850
|
+
# @return [Sandbox]
|
|
851
|
+
def recover_sandbox(sandbox_id_or_name, opts = {})
|
|
852
|
+
data, _status_code, _headers = recover_sandbox_with_http_info(sandbox_id_or_name, opts)
|
|
853
|
+
data
|
|
854
|
+
end
|
|
855
|
+
|
|
856
|
+
# Recover sandbox from error state
|
|
857
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
858
|
+
# @param [Hash] opts the optional parameters
|
|
859
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
860
|
+
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
861
|
+
def recover_sandbox_with_http_info(sandbox_id_or_name, opts = {})
|
|
862
|
+
if @api_client.config.debugging
|
|
863
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.recover_sandbox ...'
|
|
864
|
+
end
|
|
865
|
+
# verify the required parameter 'sandbox_id_or_name' is set
|
|
866
|
+
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
867
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.recover_sandbox"
|
|
868
|
+
end
|
|
869
|
+
# resource path
|
|
870
|
+
local_var_path = '/sandbox/{sandboxIdOrName}/recover'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
871
|
+
|
|
872
|
+
# query parameters
|
|
873
|
+
query_params = opts[:query_params] || {}
|
|
874
|
+
|
|
875
|
+
# header parameters
|
|
876
|
+
header_params = opts[:header_params] || {}
|
|
877
|
+
# HTTP header 'Accept' (if needed)
|
|
878
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
879
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
880
|
+
|
|
881
|
+
# form parameters
|
|
882
|
+
form_params = opts[:form_params] || {}
|
|
883
|
+
|
|
884
|
+
# http body (model)
|
|
885
|
+
post_body = opts[:debug_body]
|
|
886
|
+
|
|
887
|
+
# return_type
|
|
888
|
+
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
889
|
+
|
|
890
|
+
# auth_names
|
|
891
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
892
|
+
|
|
893
|
+
new_options = opts.merge(
|
|
894
|
+
:operation => :"SandboxApi.recover_sandbox",
|
|
895
|
+
:header_params => header_params,
|
|
896
|
+
:query_params => query_params,
|
|
897
|
+
:form_params => form_params,
|
|
898
|
+
:body => post_body,
|
|
899
|
+
:auth_names => auth_names,
|
|
900
|
+
:return_type => return_type
|
|
901
|
+
)
|
|
902
|
+
|
|
903
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
904
|
+
if @api_client.config.debugging
|
|
905
|
+
@api_client.config.logger.debug "API called: SandboxApi#recover_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
906
|
+
end
|
|
907
|
+
return data, status_code, headers
|
|
908
|
+
end
|
|
909
|
+
|
|
910
|
+
# Replace sandbox labels
|
|
911
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
912
|
+
# @param sandbox_labels [SandboxLabels]
|
|
913
|
+
# @param [Hash] opts the optional parameters
|
|
914
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
915
|
+
# @return [SandboxLabels]
|
|
916
|
+
def replace_labels(sandbox_id_or_name, sandbox_labels, opts = {})
|
|
917
|
+
data, _status_code, _headers = replace_labels_with_http_info(sandbox_id_or_name, sandbox_labels, opts)
|
|
918
|
+
data
|
|
919
|
+
end
|
|
920
|
+
|
|
921
|
+
# Replace sandbox labels
|
|
922
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
923
|
+
# @param sandbox_labels [SandboxLabels]
|
|
924
|
+
# @param [Hash] opts the optional parameters
|
|
925
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
926
|
+
# @return [Array<(SandboxLabels, Integer, Hash)>] SandboxLabels data, response status code and response headers
|
|
927
|
+
def replace_labels_with_http_info(sandbox_id_or_name, sandbox_labels, opts = {})
|
|
928
|
+
if @api_client.config.debugging
|
|
929
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.replace_labels ...'
|
|
930
|
+
end
|
|
931
|
+
# verify the required parameter 'sandbox_id_or_name' is set
|
|
932
|
+
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
933
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.replace_labels"
|
|
934
|
+
end
|
|
935
|
+
# verify the required parameter 'sandbox_labels' is set
|
|
936
|
+
if @api_client.config.client_side_validation && sandbox_labels.nil?
|
|
937
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_labels' when calling SandboxApi.replace_labels"
|
|
938
|
+
end
|
|
939
|
+
# resource path
|
|
940
|
+
local_var_path = '/sandbox/{sandboxIdOrName}/labels'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
941
|
+
|
|
942
|
+
# query parameters
|
|
943
|
+
query_params = opts[:query_params] || {}
|
|
944
|
+
|
|
945
|
+
# header parameters
|
|
946
|
+
header_params = opts[:header_params] || {}
|
|
947
|
+
# HTTP header 'Accept' (if needed)
|
|
948
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
949
|
+
# HTTP header 'Content-Type'
|
|
950
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
951
|
+
if !content_type.nil?
|
|
952
|
+
header_params['Content-Type'] = content_type
|
|
953
|
+
end
|
|
954
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
955
|
+
|
|
956
|
+
# form parameters
|
|
957
|
+
form_params = opts[:form_params] || {}
|
|
958
|
+
|
|
959
|
+
# http body (model)
|
|
960
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(sandbox_labels)
|
|
961
|
+
|
|
962
|
+
# return_type
|
|
963
|
+
return_type = opts[:debug_return_type] || 'SandboxLabels'
|
|
964
|
+
|
|
965
|
+
# auth_names
|
|
966
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
967
|
+
|
|
968
|
+
new_options = opts.merge(
|
|
969
|
+
:operation => :"SandboxApi.replace_labels",
|
|
970
|
+
:header_params => header_params,
|
|
971
|
+
:query_params => query_params,
|
|
972
|
+
:form_params => form_params,
|
|
973
|
+
:body => post_body,
|
|
974
|
+
:auth_names => auth_names,
|
|
975
|
+
:return_type => return_type
|
|
976
|
+
)
|
|
977
|
+
|
|
978
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
979
|
+
if @api_client.config.debugging
|
|
980
|
+
@api_client.config.logger.debug "API called: SandboxApi#replace_labels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
981
|
+
end
|
|
982
|
+
return data, status_code, headers
|
|
983
|
+
end
|
|
984
|
+
|
|
985
|
+
# Revoke SSH access for sandbox
|
|
986
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
987
|
+
# @param [Hash] opts the optional parameters
|
|
988
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
989
|
+
# @option opts [String] :token SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.
|
|
990
|
+
# @return [Sandbox]
|
|
991
|
+
def revoke_ssh_access(sandbox_id_or_name, opts = {})
|
|
992
|
+
data, _status_code, _headers = revoke_ssh_access_with_http_info(sandbox_id_or_name, opts)
|
|
993
|
+
data
|
|
994
|
+
end
|
|
995
|
+
|
|
996
|
+
# Revoke SSH access for sandbox
|
|
997
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
998
|
+
# @param [Hash] opts the optional parameters
|
|
999
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1000
|
+
# @option opts [String] :token SSH access token to revoke. If not provided, all SSH access for the sandbox will be revoked.
|
|
1001
|
+
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
1002
|
+
def revoke_ssh_access_with_http_info(sandbox_id_or_name, opts = {})
|
|
1003
|
+
if @api_client.config.debugging
|
|
1004
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.revoke_ssh_access ...'
|
|
1005
|
+
end
|
|
1006
|
+
# verify the required parameter 'sandbox_id_or_name' is set
|
|
1007
|
+
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
1008
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.revoke_ssh_access"
|
|
1009
|
+
end
|
|
1010
|
+
# resource path
|
|
1011
|
+
local_var_path = '/sandbox/{sandboxIdOrName}/ssh-access'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
1012
|
+
|
|
1013
|
+
# query parameters
|
|
1014
|
+
query_params = opts[:query_params] || {}
|
|
1015
|
+
query_params[:'token'] = opts[:'token'] if !opts[:'token'].nil?
|
|
1016
|
+
|
|
1017
|
+
# header parameters
|
|
1018
|
+
header_params = opts[:header_params] || {}
|
|
1019
|
+
# HTTP header 'Accept' (if needed)
|
|
1020
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1021
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1022
|
+
|
|
1023
|
+
# form parameters
|
|
1024
|
+
form_params = opts[:form_params] || {}
|
|
1025
|
+
|
|
1026
|
+
# http body (model)
|
|
1027
|
+
post_body = opts[:debug_body]
|
|
1028
|
+
|
|
1029
|
+
# return_type
|
|
1030
|
+
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
1031
|
+
|
|
1032
|
+
# auth_names
|
|
1033
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1034
|
+
|
|
1035
|
+
new_options = opts.merge(
|
|
1036
|
+
:operation => :"SandboxApi.revoke_ssh_access",
|
|
1037
|
+
:header_params => header_params,
|
|
1038
|
+
:query_params => query_params,
|
|
1039
|
+
:form_params => form_params,
|
|
1040
|
+
:body => post_body,
|
|
1041
|
+
:auth_names => auth_names,
|
|
1042
|
+
:return_type => return_type
|
|
1043
|
+
)
|
|
1044
|
+
|
|
1045
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
1046
|
+
if @api_client.config.debugging
|
|
1047
|
+
@api_client.config.logger.debug "API called: SandboxApi#revoke_ssh_access\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1048
|
+
end
|
|
1049
|
+
return data, status_code, headers
|
|
1050
|
+
end
|
|
1051
|
+
|
|
1052
|
+
# Set sandbox auto-archive interval
|
|
1053
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
1054
|
+
# @param interval [Float] Auto-archive interval in minutes (0 means the maximum interval will be used)
|
|
1055
|
+
# @param [Hash] opts the optional parameters
|
|
1056
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1057
|
+
# @return [Sandbox]
|
|
1058
|
+
def set_auto_archive_interval(sandbox_id_or_name, interval, opts = {})
|
|
1059
|
+
data, _status_code, _headers = set_auto_archive_interval_with_http_info(sandbox_id_or_name, interval, opts)
|
|
1060
|
+
data
|
|
1061
|
+
end
|
|
1062
|
+
|
|
1063
|
+
# Set sandbox auto-archive interval
|
|
1064
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
1065
|
+
# @param interval [Float] Auto-archive interval in minutes (0 means the maximum interval will be used)
|
|
1066
|
+
# @param [Hash] opts the optional parameters
|
|
1067
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1068
|
+
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
1069
|
+
def set_auto_archive_interval_with_http_info(sandbox_id_or_name, interval, opts = {})
|
|
1070
|
+
if @api_client.config.debugging
|
|
1071
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_archive_interval ...'
|
|
1072
|
+
end
|
|
1073
|
+
# verify the required parameter 'sandbox_id_or_name' is set
|
|
1074
|
+
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
1075
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.set_auto_archive_interval"
|
|
1076
|
+
end
|
|
1077
|
+
# verify the required parameter 'interval' is set
|
|
1078
|
+
if @api_client.config.client_side_validation && interval.nil?
|
|
1079
|
+
fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_auto_archive_interval"
|
|
1080
|
+
end
|
|
1081
|
+
# resource path
|
|
1082
|
+
local_var_path = '/sandbox/{sandboxIdOrName}/autoarchive/{interval}'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s)).sub('{' + 'interval' + '}', CGI.escape(interval.to_s))
|
|
1083
|
+
|
|
1084
|
+
# query parameters
|
|
1085
|
+
query_params = opts[:query_params] || {}
|
|
1086
|
+
|
|
1087
|
+
# header parameters
|
|
1088
|
+
header_params = opts[:header_params] || {}
|
|
1089
|
+
# HTTP header 'Accept' (if needed)
|
|
1090
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1091
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1092
|
+
|
|
1093
|
+
# form parameters
|
|
1094
|
+
form_params = opts[:form_params] || {}
|
|
1095
|
+
|
|
1096
|
+
# http body (model)
|
|
1097
|
+
post_body = opts[:debug_body]
|
|
1098
|
+
|
|
1099
|
+
# return_type
|
|
1100
|
+
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
1101
|
+
|
|
1102
|
+
# auth_names
|
|
1103
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1104
|
+
|
|
1105
|
+
new_options = opts.merge(
|
|
1106
|
+
:operation => :"SandboxApi.set_auto_archive_interval",
|
|
1107
|
+
:header_params => header_params,
|
|
1108
|
+
:query_params => query_params,
|
|
1109
|
+
:form_params => form_params,
|
|
1110
|
+
:body => post_body,
|
|
1111
|
+
:auth_names => auth_names,
|
|
1112
|
+
:return_type => return_type
|
|
1113
|
+
)
|
|
1114
|
+
|
|
1115
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1116
|
+
if @api_client.config.debugging
|
|
1117
|
+
@api_client.config.logger.debug "API called: SandboxApi#set_auto_archive_interval\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1118
|
+
end
|
|
1119
|
+
return data, status_code, headers
|
|
1120
|
+
end
|
|
1121
|
+
|
|
1122
|
+
# Set sandbox auto-delete interval
|
|
1123
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
1124
|
+
# @param interval [Float] Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
|
|
1125
|
+
# @param [Hash] opts the optional parameters
|
|
1126
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1127
|
+
# @return [Sandbox]
|
|
1128
|
+
def set_auto_delete_interval(sandbox_id_or_name, interval, opts = {})
|
|
1129
|
+
data, _status_code, _headers = set_auto_delete_interval_with_http_info(sandbox_id_or_name, interval, opts)
|
|
1130
|
+
data
|
|
1131
|
+
end
|
|
1132
|
+
|
|
1133
|
+
# Set sandbox auto-delete interval
|
|
1134
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
1135
|
+
# @param interval [Float] Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)
|
|
1136
|
+
# @param [Hash] opts the optional parameters
|
|
1137
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1138
|
+
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
1139
|
+
def set_auto_delete_interval_with_http_info(sandbox_id_or_name, interval, opts = {})
|
|
1140
|
+
if @api_client.config.debugging
|
|
1141
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.set_auto_delete_interval ...'
|
|
1142
|
+
end
|
|
1143
|
+
# verify the required parameter 'sandbox_id_or_name' is set
|
|
1144
|
+
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
1145
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.set_auto_delete_interval"
|
|
1146
|
+
end
|
|
1147
|
+
# verify the required parameter 'interval' is set
|
|
1148
|
+
if @api_client.config.client_side_validation && interval.nil?
|
|
1149
|
+
fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_auto_delete_interval"
|
|
1150
|
+
end
|
|
1151
|
+
# resource path
|
|
1152
|
+
local_var_path = '/sandbox/{sandboxIdOrName}/autodelete/{interval}'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s)).sub('{' + 'interval' + '}', CGI.escape(interval.to_s))
|
|
1153
|
+
|
|
1154
|
+
# query parameters
|
|
1155
|
+
query_params = opts[:query_params] || {}
|
|
1156
|
+
|
|
1157
|
+
# header parameters
|
|
1158
|
+
header_params = opts[:header_params] || {}
|
|
1159
|
+
# HTTP header 'Accept' (if needed)
|
|
1160
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1161
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1162
|
+
|
|
1163
|
+
# form parameters
|
|
1164
|
+
form_params = opts[:form_params] || {}
|
|
1165
|
+
|
|
1166
|
+
# http body (model)
|
|
1167
|
+
post_body = opts[:debug_body]
|
|
1168
|
+
|
|
1169
|
+
# return_type
|
|
1170
|
+
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
1171
|
+
|
|
1172
|
+
# auth_names
|
|
1173
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1174
|
+
|
|
1175
|
+
new_options = opts.merge(
|
|
1176
|
+
:operation => :"SandboxApi.set_auto_delete_interval",
|
|
1177
|
+
:header_params => header_params,
|
|
1178
|
+
:query_params => query_params,
|
|
1179
|
+
:form_params => form_params,
|
|
1180
|
+
:body => post_body,
|
|
1181
|
+
:auth_names => auth_names,
|
|
1182
|
+
:return_type => return_type
|
|
1183
|
+
)
|
|
1184
|
+
|
|
1185
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1186
|
+
if @api_client.config.debugging
|
|
1187
|
+
@api_client.config.logger.debug "API called: SandboxApi#set_auto_delete_interval\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1188
|
+
end
|
|
1189
|
+
return data, status_code, headers
|
|
1190
|
+
end
|
|
1191
|
+
|
|
1192
|
+
# Set sandbox auto-stop interval
|
|
1193
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
1194
|
+
# @param interval [Float] Auto-stop interval in minutes (0 to disable)
|
|
1195
|
+
# @param [Hash] opts the optional parameters
|
|
1196
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1197
|
+
# @return [Sandbox]
|
|
1198
|
+
def set_autostop_interval(sandbox_id_or_name, interval, opts = {})
|
|
1199
|
+
data, _status_code, _headers = set_autostop_interval_with_http_info(sandbox_id_or_name, interval, opts)
|
|
1200
|
+
data
|
|
1201
|
+
end
|
|
1202
|
+
|
|
1203
|
+
# Set sandbox auto-stop interval
|
|
1204
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
1205
|
+
# @param interval [Float] Auto-stop interval in minutes (0 to disable)
|
|
1206
|
+
# @param [Hash] opts the optional parameters
|
|
1207
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1208
|
+
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
1209
|
+
def set_autostop_interval_with_http_info(sandbox_id_or_name, interval, opts = {})
|
|
1210
|
+
if @api_client.config.debugging
|
|
1211
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.set_autostop_interval ...'
|
|
1212
|
+
end
|
|
1213
|
+
# verify the required parameter 'sandbox_id_or_name' is set
|
|
1214
|
+
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
1215
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.set_autostop_interval"
|
|
1216
|
+
end
|
|
1217
|
+
# verify the required parameter 'interval' is set
|
|
1218
|
+
if @api_client.config.client_side_validation && interval.nil?
|
|
1219
|
+
fail ArgumentError, "Missing the required parameter 'interval' when calling SandboxApi.set_autostop_interval"
|
|
1220
|
+
end
|
|
1221
|
+
# resource path
|
|
1222
|
+
local_var_path = '/sandbox/{sandboxIdOrName}/autostop/{interval}'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s)).sub('{' + 'interval' + '}', CGI.escape(interval.to_s))
|
|
1223
|
+
|
|
1224
|
+
# query parameters
|
|
1225
|
+
query_params = opts[:query_params] || {}
|
|
1226
|
+
|
|
1227
|
+
# header parameters
|
|
1228
|
+
header_params = opts[:header_params] || {}
|
|
1229
|
+
# HTTP header 'Accept' (if needed)
|
|
1230
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1231
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1232
|
+
|
|
1233
|
+
# form parameters
|
|
1234
|
+
form_params = opts[:form_params] || {}
|
|
1235
|
+
|
|
1236
|
+
# http body (model)
|
|
1237
|
+
post_body = opts[:debug_body]
|
|
1238
|
+
|
|
1239
|
+
# return_type
|
|
1240
|
+
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
1241
|
+
|
|
1242
|
+
# auth_names
|
|
1243
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1244
|
+
|
|
1245
|
+
new_options = opts.merge(
|
|
1246
|
+
:operation => :"SandboxApi.set_autostop_interval",
|
|
1247
|
+
:header_params => header_params,
|
|
1248
|
+
:query_params => query_params,
|
|
1249
|
+
:form_params => form_params,
|
|
1250
|
+
:body => post_body,
|
|
1251
|
+
:auth_names => auth_names,
|
|
1252
|
+
:return_type => return_type
|
|
1253
|
+
)
|
|
1254
|
+
|
|
1255
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1256
|
+
if @api_client.config.debugging
|
|
1257
|
+
@api_client.config.logger.debug "API called: SandboxApi#set_autostop_interval\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1258
|
+
end
|
|
1259
|
+
return data, status_code, headers
|
|
1260
|
+
end
|
|
1261
|
+
|
|
1262
|
+
# Start sandbox
|
|
1263
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
1264
|
+
# @param [Hash] opts the optional parameters
|
|
1265
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1266
|
+
# @return [Sandbox]
|
|
1267
|
+
def start_sandbox(sandbox_id_or_name, opts = {})
|
|
1268
|
+
data, _status_code, _headers = start_sandbox_with_http_info(sandbox_id_or_name, opts)
|
|
1269
|
+
data
|
|
1270
|
+
end
|
|
1271
|
+
|
|
1272
|
+
# Start sandbox
|
|
1273
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
1274
|
+
# @param [Hash] opts the optional parameters
|
|
1275
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1276
|
+
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
1277
|
+
def start_sandbox_with_http_info(sandbox_id_or_name, opts = {})
|
|
1278
|
+
if @api_client.config.debugging
|
|
1279
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.start_sandbox ...'
|
|
1280
|
+
end
|
|
1281
|
+
# verify the required parameter 'sandbox_id_or_name' is set
|
|
1282
|
+
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
1283
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.start_sandbox"
|
|
1284
|
+
end
|
|
1285
|
+
# resource path
|
|
1286
|
+
local_var_path = '/sandbox/{sandboxIdOrName}/start'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
1287
|
+
|
|
1288
|
+
# query parameters
|
|
1289
|
+
query_params = opts[:query_params] || {}
|
|
1290
|
+
|
|
1291
|
+
# header parameters
|
|
1292
|
+
header_params = opts[:header_params] || {}
|
|
1293
|
+
# HTTP header 'Accept' (if needed)
|
|
1294
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1295
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1296
|
+
|
|
1297
|
+
# form parameters
|
|
1298
|
+
form_params = opts[:form_params] || {}
|
|
1299
|
+
|
|
1300
|
+
# http body (model)
|
|
1301
|
+
post_body = opts[:debug_body]
|
|
1302
|
+
|
|
1303
|
+
# return_type
|
|
1304
|
+
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
1305
|
+
|
|
1306
|
+
# auth_names
|
|
1307
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1308
|
+
|
|
1309
|
+
new_options = opts.merge(
|
|
1310
|
+
:operation => :"SandboxApi.start_sandbox",
|
|
1311
|
+
:header_params => header_params,
|
|
1312
|
+
:query_params => query_params,
|
|
1313
|
+
:form_params => form_params,
|
|
1314
|
+
:body => post_body,
|
|
1315
|
+
:auth_names => auth_names,
|
|
1316
|
+
:return_type => return_type
|
|
1317
|
+
)
|
|
1318
|
+
|
|
1319
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1320
|
+
if @api_client.config.debugging
|
|
1321
|
+
@api_client.config.logger.debug "API called: SandboxApi#start_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1322
|
+
end
|
|
1323
|
+
return data, status_code, headers
|
|
1324
|
+
end
|
|
1325
|
+
|
|
1326
|
+
# Stop sandbox
|
|
1327
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
1328
|
+
# @param [Hash] opts the optional parameters
|
|
1329
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1330
|
+
# @return [Sandbox]
|
|
1331
|
+
def stop_sandbox(sandbox_id_or_name, opts = {})
|
|
1332
|
+
data, _status_code, _headers = stop_sandbox_with_http_info(sandbox_id_or_name, opts)
|
|
1333
|
+
data
|
|
1334
|
+
end
|
|
1335
|
+
|
|
1336
|
+
# Stop sandbox
|
|
1337
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
1338
|
+
# @param [Hash] opts the optional parameters
|
|
1339
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1340
|
+
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
1341
|
+
def stop_sandbox_with_http_info(sandbox_id_or_name, opts = {})
|
|
1342
|
+
if @api_client.config.debugging
|
|
1343
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.stop_sandbox ...'
|
|
1344
|
+
end
|
|
1345
|
+
# verify the required parameter 'sandbox_id_or_name' is set
|
|
1346
|
+
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
1347
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.stop_sandbox"
|
|
1348
|
+
end
|
|
1349
|
+
# resource path
|
|
1350
|
+
local_var_path = '/sandbox/{sandboxIdOrName}/stop'.sub('{' + 'sandboxIdOrName' + '}', CGI.escape(sandbox_id_or_name.to_s))
|
|
1351
|
+
|
|
1352
|
+
# query parameters
|
|
1353
|
+
query_params = opts[:query_params] || {}
|
|
1354
|
+
|
|
1355
|
+
# header parameters
|
|
1356
|
+
header_params = opts[:header_params] || {}
|
|
1357
|
+
# HTTP header 'Accept' (if needed)
|
|
1358
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1359
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1360
|
+
|
|
1361
|
+
# form parameters
|
|
1362
|
+
form_params = opts[:form_params] || {}
|
|
1363
|
+
|
|
1364
|
+
# http body (model)
|
|
1365
|
+
post_body = opts[:debug_body]
|
|
1366
|
+
|
|
1367
|
+
# return_type
|
|
1368
|
+
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
1369
|
+
|
|
1370
|
+
# auth_names
|
|
1371
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1372
|
+
|
|
1373
|
+
new_options = opts.merge(
|
|
1374
|
+
:operation => :"SandboxApi.stop_sandbox",
|
|
1375
|
+
:header_params => header_params,
|
|
1376
|
+
:query_params => query_params,
|
|
1377
|
+
:form_params => form_params,
|
|
1378
|
+
:body => post_body,
|
|
1379
|
+
:auth_names => auth_names,
|
|
1380
|
+
:return_type => return_type
|
|
1381
|
+
)
|
|
1382
|
+
|
|
1383
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1384
|
+
if @api_client.config.debugging
|
|
1385
|
+
@api_client.config.logger.debug "API called: SandboxApi#stop_sandbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1386
|
+
end
|
|
1387
|
+
return data, status_code, headers
|
|
1388
|
+
end
|
|
1389
|
+
|
|
1390
|
+
# Update sandbox last activity
|
|
1391
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1392
|
+
# @param [Hash] opts the optional parameters
|
|
1393
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1394
|
+
# @return [nil]
|
|
1395
|
+
def update_last_activity(sandbox_id, opts = {})
|
|
1396
|
+
update_last_activity_with_http_info(sandbox_id, opts)
|
|
1397
|
+
nil
|
|
1398
|
+
end
|
|
1399
|
+
|
|
1400
|
+
# Update sandbox last activity
|
|
1401
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1402
|
+
# @param [Hash] opts the optional parameters
|
|
1403
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1404
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1405
|
+
def update_last_activity_with_http_info(sandbox_id, opts = {})
|
|
1406
|
+
if @api_client.config.debugging
|
|
1407
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.update_last_activity ...'
|
|
1408
|
+
end
|
|
1409
|
+
# verify the required parameter 'sandbox_id' is set
|
|
1410
|
+
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
1411
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.update_last_activity"
|
|
1412
|
+
end
|
|
1413
|
+
# resource path
|
|
1414
|
+
local_var_path = '/sandbox/{sandboxId}/last-activity'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
1415
|
+
|
|
1416
|
+
# query parameters
|
|
1417
|
+
query_params = opts[:query_params] || {}
|
|
1418
|
+
|
|
1419
|
+
# header parameters
|
|
1420
|
+
header_params = opts[:header_params] || {}
|
|
1421
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1422
|
+
|
|
1423
|
+
# form parameters
|
|
1424
|
+
form_params = opts[:form_params] || {}
|
|
1425
|
+
|
|
1426
|
+
# http body (model)
|
|
1427
|
+
post_body = opts[:debug_body]
|
|
1428
|
+
|
|
1429
|
+
# return_type
|
|
1430
|
+
return_type = opts[:debug_return_type]
|
|
1431
|
+
|
|
1432
|
+
# auth_names
|
|
1433
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1434
|
+
|
|
1435
|
+
new_options = opts.merge(
|
|
1436
|
+
:operation => :"SandboxApi.update_last_activity",
|
|
1437
|
+
:header_params => header_params,
|
|
1438
|
+
:query_params => query_params,
|
|
1439
|
+
:form_params => form_params,
|
|
1440
|
+
:body => post_body,
|
|
1441
|
+
:auth_names => auth_names,
|
|
1442
|
+
:return_type => return_type
|
|
1443
|
+
)
|
|
1444
|
+
|
|
1445
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1446
|
+
if @api_client.config.debugging
|
|
1447
|
+
@api_client.config.logger.debug "API called: SandboxApi#update_last_activity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1448
|
+
end
|
|
1449
|
+
return data, status_code, headers
|
|
1450
|
+
end
|
|
1451
|
+
|
|
1452
|
+
# Update public status
|
|
1453
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
1454
|
+
# @param is_public [Boolean] Public status to set
|
|
1455
|
+
# @param [Hash] opts the optional parameters
|
|
1456
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1457
|
+
# @return [Sandbox]
|
|
1458
|
+
def update_public_status(sandbox_id_or_name, is_public, opts = {})
|
|
1459
|
+
data, _status_code, _headers = update_public_status_with_http_info(sandbox_id_or_name, is_public, opts)
|
|
1460
|
+
data
|
|
1461
|
+
end
|
|
1462
|
+
|
|
1463
|
+
# Update public status
|
|
1464
|
+
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
1465
|
+
# @param is_public [Boolean] Public status to set
|
|
1466
|
+
# @param [Hash] opts the optional parameters
|
|
1467
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1468
|
+
# @return [Array<(Sandbox, Integer, Hash)>] Sandbox data, response status code and response headers
|
|
1469
|
+
def update_public_status_with_http_info(sandbox_id_or_name, is_public, opts = {})
|
|
1470
|
+
if @api_client.config.debugging
|
|
1471
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.update_public_status ...'
|
|
1472
|
+
end
|
|
1473
|
+
# verify the required parameter 'sandbox_id_or_name' is set
|
|
1474
|
+
if @api_client.config.client_side_validation && sandbox_id_or_name.nil?
|
|
1475
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id_or_name' when calling SandboxApi.update_public_status"
|
|
1476
|
+
end
|
|
1477
|
+
# verify the required parameter 'is_public' is set
|
|
1478
|
+
if @api_client.config.client_side_validation && is_public.nil?
|
|
1479
|
+
fail ArgumentError, "Missing the required parameter 'is_public' when calling SandboxApi.update_public_status"
|
|
1480
|
+
end
|
|
1481
|
+
# resource path
|
|
1482
|
+
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))
|
|
1483
|
+
|
|
1484
|
+
# query parameters
|
|
1485
|
+
query_params = opts[:query_params] || {}
|
|
1486
|
+
|
|
1487
|
+
# header parameters
|
|
1488
|
+
header_params = opts[:header_params] || {}
|
|
1489
|
+
# HTTP header 'Accept' (if needed)
|
|
1490
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1491
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1492
|
+
|
|
1493
|
+
# form parameters
|
|
1494
|
+
form_params = opts[:form_params] || {}
|
|
1495
|
+
|
|
1496
|
+
# http body (model)
|
|
1497
|
+
post_body = opts[:debug_body]
|
|
1498
|
+
|
|
1499
|
+
# return_type
|
|
1500
|
+
return_type = opts[:debug_return_type] || 'Sandbox'
|
|
1501
|
+
|
|
1502
|
+
# auth_names
|
|
1503
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1504
|
+
|
|
1505
|
+
new_options = opts.merge(
|
|
1506
|
+
:operation => :"SandboxApi.update_public_status",
|
|
1507
|
+
:header_params => header_params,
|
|
1508
|
+
:query_params => query_params,
|
|
1509
|
+
:form_params => form_params,
|
|
1510
|
+
:body => post_body,
|
|
1511
|
+
:auth_names => auth_names,
|
|
1512
|
+
:return_type => return_type
|
|
1513
|
+
)
|
|
1514
|
+
|
|
1515
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1516
|
+
if @api_client.config.debugging
|
|
1517
|
+
@api_client.config.logger.debug "API called: SandboxApi#update_public_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1518
|
+
end
|
|
1519
|
+
return data, status_code, headers
|
|
1520
|
+
end
|
|
1521
|
+
|
|
1522
|
+
# Update sandbox state
|
|
1523
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1524
|
+
# @param update_sandbox_state_dto [UpdateSandboxStateDto]
|
|
1525
|
+
# @param [Hash] opts the optional parameters
|
|
1526
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1527
|
+
# @return [nil]
|
|
1528
|
+
def update_sandbox_state(sandbox_id, update_sandbox_state_dto, opts = {})
|
|
1529
|
+
update_sandbox_state_with_http_info(sandbox_id, update_sandbox_state_dto, opts)
|
|
1530
|
+
nil
|
|
1531
|
+
end
|
|
1532
|
+
|
|
1533
|
+
# Update sandbox state
|
|
1534
|
+
# @param sandbox_id [String] ID of the sandbox
|
|
1535
|
+
# @param update_sandbox_state_dto [UpdateSandboxStateDto]
|
|
1536
|
+
# @param [Hash] opts the optional parameters
|
|
1537
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1538
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1539
|
+
def update_sandbox_state_with_http_info(sandbox_id, update_sandbox_state_dto, opts = {})
|
|
1540
|
+
if @api_client.config.debugging
|
|
1541
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.update_sandbox_state ...'
|
|
1542
|
+
end
|
|
1543
|
+
# verify the required parameter 'sandbox_id' is set
|
|
1544
|
+
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
1545
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.update_sandbox_state"
|
|
1546
|
+
end
|
|
1547
|
+
# verify the required parameter 'update_sandbox_state_dto' is set
|
|
1548
|
+
if @api_client.config.client_side_validation && update_sandbox_state_dto.nil?
|
|
1549
|
+
fail ArgumentError, "Missing the required parameter 'update_sandbox_state_dto' when calling SandboxApi.update_sandbox_state"
|
|
1550
|
+
end
|
|
1551
|
+
# resource path
|
|
1552
|
+
local_var_path = '/sandbox/{sandboxId}/state'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
1553
|
+
|
|
1554
|
+
# query parameters
|
|
1555
|
+
query_params = opts[:query_params] || {}
|
|
1556
|
+
|
|
1557
|
+
# header parameters
|
|
1558
|
+
header_params = opts[:header_params] || {}
|
|
1559
|
+
# HTTP header 'Content-Type'
|
|
1560
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1561
|
+
if !content_type.nil?
|
|
1562
|
+
header_params['Content-Type'] = content_type
|
|
1563
|
+
end
|
|
1564
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1565
|
+
|
|
1566
|
+
# form parameters
|
|
1567
|
+
form_params = opts[:form_params] || {}
|
|
1568
|
+
|
|
1569
|
+
# http body (model)
|
|
1570
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_sandbox_state_dto)
|
|
1571
|
+
|
|
1572
|
+
# return_type
|
|
1573
|
+
return_type = opts[:debug_return_type]
|
|
1574
|
+
|
|
1575
|
+
# auth_names
|
|
1576
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1577
|
+
|
|
1578
|
+
new_options = opts.merge(
|
|
1579
|
+
:operation => :"SandboxApi.update_sandbox_state",
|
|
1580
|
+
:header_params => header_params,
|
|
1581
|
+
:query_params => query_params,
|
|
1582
|
+
:form_params => form_params,
|
|
1583
|
+
:body => post_body,
|
|
1584
|
+
:auth_names => auth_names,
|
|
1585
|
+
:return_type => return_type
|
|
1586
|
+
)
|
|
1587
|
+
|
|
1588
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
1589
|
+
if @api_client.config.debugging
|
|
1590
|
+
@api_client.config.logger.debug "API called: SandboxApi#update_sandbox_state\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1591
|
+
end
|
|
1592
|
+
return data, status_code, headers
|
|
1593
|
+
end
|
|
1594
|
+
|
|
1595
|
+
# Validate SSH access for sandbox
|
|
1596
|
+
# @param token [String] SSH access token to validate
|
|
1597
|
+
# @param [Hash] opts the optional parameters
|
|
1598
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1599
|
+
# @return [SshAccessValidationDto]
|
|
1600
|
+
def validate_ssh_access(token, opts = {})
|
|
1601
|
+
data, _status_code, _headers = validate_ssh_access_with_http_info(token, opts)
|
|
1602
|
+
data
|
|
1603
|
+
end
|
|
1604
|
+
|
|
1605
|
+
# Validate SSH access for sandbox
|
|
1606
|
+
# @param token [String] SSH access token to validate
|
|
1607
|
+
# @param [Hash] opts the optional parameters
|
|
1608
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1609
|
+
# @return [Array<(SshAccessValidationDto, Integer, Hash)>] SshAccessValidationDto data, response status code and response headers
|
|
1610
|
+
def validate_ssh_access_with_http_info(token, opts = {})
|
|
1611
|
+
if @api_client.config.debugging
|
|
1612
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.validate_ssh_access ...'
|
|
1613
|
+
end
|
|
1614
|
+
# verify the required parameter 'token' is set
|
|
1615
|
+
if @api_client.config.client_side_validation && token.nil?
|
|
1616
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling SandboxApi.validate_ssh_access"
|
|
1617
|
+
end
|
|
1618
|
+
# resource path
|
|
1619
|
+
local_var_path = '/sandbox/ssh-access/validate'
|
|
1620
|
+
|
|
1621
|
+
# query parameters
|
|
1622
|
+
query_params = opts[:query_params] || {}
|
|
1623
|
+
query_params[:'token'] = token
|
|
1624
|
+
|
|
1625
|
+
# header parameters
|
|
1626
|
+
header_params = opts[:header_params] || {}
|
|
1627
|
+
# HTTP header 'Accept' (if needed)
|
|
1628
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1629
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1630
|
+
|
|
1631
|
+
# form parameters
|
|
1632
|
+
form_params = opts[:form_params] || {}
|
|
1633
|
+
|
|
1634
|
+
# http body (model)
|
|
1635
|
+
post_body = opts[:debug_body]
|
|
1636
|
+
|
|
1637
|
+
# return_type
|
|
1638
|
+
return_type = opts[:debug_return_type] || 'SshAccessValidationDto'
|
|
1639
|
+
|
|
1640
|
+
# auth_names
|
|
1641
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1642
|
+
|
|
1643
|
+
new_options = opts.merge(
|
|
1644
|
+
:operation => :"SandboxApi.validate_ssh_access",
|
|
1645
|
+
:header_params => header_params,
|
|
1646
|
+
:query_params => query_params,
|
|
1647
|
+
:form_params => form_params,
|
|
1648
|
+
:body => post_body,
|
|
1649
|
+
:auth_names => auth_names,
|
|
1650
|
+
:return_type => return_type
|
|
1651
|
+
)
|
|
1652
|
+
|
|
1653
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1654
|
+
if @api_client.config.debugging
|
|
1655
|
+
@api_client.config.logger.debug "API called: SandboxApi#validate_ssh_access\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1656
|
+
end
|
|
1657
|
+
return data, status_code, headers
|
|
1658
|
+
end
|
|
1659
|
+
end
|
|
1660
|
+
end
|