daytona_api_client 0.126.0.pre.alpha.5 → 0.134.0.alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.openapi-generator/FILES +23 -0
- data/.openapi-generator-ignore +0 -2
- data/daytona_api_client.gemspec +1 -1
- data/fix-gemspec.sh +1 -1
- data/lib/daytona_api_client/api/admin_api.rb +325 -0
- data/lib/daytona_api_client/api/docker_registry_api.rb +3 -0
- data/lib/daytona_api_client/api/jobs_api.rb +299 -0
- data/lib/daytona_api_client/api/organizations_api.rb +518 -0
- data/lib/daytona_api_client/api/preview_api.rb +67 -0
- data/lib/daytona_api_client/api/regions_api.rb +9 -15
- data/lib/daytona_api_client/api/runners_api.rb +291 -23
- data/lib/daytona_api_client/api/sandbox_api.rb +277 -0
- data/lib/daytona_api_client/api/snapshots_api.rb +66 -0
- data/lib/daytona_api_client/models/admin_create_runner.rb +385 -0
- data/lib/daytona_api_client/models/build_info.rb +31 -4
- data/lib/daytona_api_client/models/create_region.rb +269 -0
- data/lib/daytona_api_client/models/create_region_response.rb +280 -0
- data/lib/daytona_api_client/models/create_runner.rb +31 -315
- data/lib/daytona_api_client/models/create_runner_response.rb +263 -0
- data/lib/daytona_api_client/models/create_snapshot.rb +14 -4
- data/lib/daytona_api_client/models/{create_audit_log.rb → job.rb} +166 -79
- data/lib/daytona_api_client/models/job_status.rb +42 -0
- data/lib/daytona_api_client/models/job_type.rb +49 -0
- data/lib/daytona_api_client/models/{paginated_snapshots_dto.rb → paginated_jobs.rb} +4 -4
- data/lib/daytona_api_client/models/poll_jobs_response.rb +238 -0
- data/lib/daytona_api_client/models/regenerate_api_key_response.rb +236 -0
- data/lib/daytona_api_client/models/region.rb +86 -4
- data/lib/daytona_api_client/models/region_type.rb +41 -0
- data/lib/daytona_api_client/models/runner.rb +79 -117
- data/lib/daytona_api_client/models/runner_full.rb +779 -0
- data/lib/daytona_api_client/models/runner_health_metrics.rb +533 -0
- data/lib/daytona_api_client/models/runner_healthcheck.rb +276 -0
- data/lib/daytona_api_client/models/runner_snapshot_dto.rb +0 -17
- data/lib/daytona_api_client/models/sandbox.rb +14 -4
- data/lib/daytona_api_client/models/signed_port_preview_url.rb +317 -0
- data/lib/daytona_api_client/models/snapshot_dto.rb +36 -4
- data/lib/daytona_api_client/models/snapshot_manager_credentials.rb +263 -0
- data/lib/daytona_api_client/models/ssh_access_dto.rb +31 -4
- data/lib/daytona_api_client/models/toolbox_proxy_url.rb +236 -0
- data/lib/daytona_api_client/models/update_job_status.rb +278 -0
- data/lib/daytona_api_client/models/update_region.rb +242 -0
- data/lib/daytona_api_client/models/update_sandbox_state_dto.rb +14 -4
- data/lib/daytona_api_client/models/url.rb +236 -0
- data/lib/daytona_api_client/models/workspace.rb +11 -1
- data/lib/daytona_api_client/version.rb +1 -1
- data/lib/daytona_api_client.rb +22 -0
- data/project.json +10 -4
- metadata +23 -5
- data/Gemfile +0 -9
- data/Gemfile.lock +0 -101
|
@@ -355,6 +355,75 @@ module DaytonaApiClient
|
|
|
355
355
|
return data, status_code, headers
|
|
356
356
|
end
|
|
357
357
|
|
|
358
|
+
# Create a new region
|
|
359
|
+
# @param create_region [CreateRegion]
|
|
360
|
+
# @param [Hash] opts the optional parameters
|
|
361
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
362
|
+
# @return [CreateRegionResponse]
|
|
363
|
+
def create_region(create_region, opts = {})
|
|
364
|
+
data, _status_code, _headers = create_region_with_http_info(create_region, opts)
|
|
365
|
+
data
|
|
366
|
+
end
|
|
367
|
+
|
|
368
|
+
# Create a new region
|
|
369
|
+
# @param create_region [CreateRegion]
|
|
370
|
+
# @param [Hash] opts the optional parameters
|
|
371
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
372
|
+
# @return [Array<(CreateRegionResponse, Integer, Hash)>] CreateRegionResponse data, response status code and response headers
|
|
373
|
+
def create_region_with_http_info(create_region, opts = {})
|
|
374
|
+
if @api_client.config.debugging
|
|
375
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.create_region ...'
|
|
376
|
+
end
|
|
377
|
+
# verify the required parameter 'create_region' is set
|
|
378
|
+
if @api_client.config.client_side_validation && create_region.nil?
|
|
379
|
+
fail ArgumentError, "Missing the required parameter 'create_region' when calling OrganizationsApi.create_region"
|
|
380
|
+
end
|
|
381
|
+
# resource path
|
|
382
|
+
local_var_path = '/regions'
|
|
383
|
+
|
|
384
|
+
# query parameters
|
|
385
|
+
query_params = opts[:query_params] || {}
|
|
386
|
+
|
|
387
|
+
# header parameters
|
|
388
|
+
header_params = opts[:header_params] || {}
|
|
389
|
+
# HTTP header 'Accept' (if needed)
|
|
390
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
391
|
+
# HTTP header 'Content-Type'
|
|
392
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
393
|
+
if !content_type.nil?
|
|
394
|
+
header_params['Content-Type'] = content_type
|
|
395
|
+
end
|
|
396
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
397
|
+
|
|
398
|
+
# form parameters
|
|
399
|
+
form_params = opts[:form_params] || {}
|
|
400
|
+
|
|
401
|
+
# http body (model)
|
|
402
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_region)
|
|
403
|
+
|
|
404
|
+
# return_type
|
|
405
|
+
return_type = opts[:debug_return_type] || 'CreateRegionResponse'
|
|
406
|
+
|
|
407
|
+
# auth_names
|
|
408
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
409
|
+
|
|
410
|
+
new_options = opts.merge(
|
|
411
|
+
:operation => :"OrganizationsApi.create_region",
|
|
412
|
+
:header_params => header_params,
|
|
413
|
+
:query_params => query_params,
|
|
414
|
+
:form_params => form_params,
|
|
415
|
+
:body => post_body,
|
|
416
|
+
:auth_names => auth_names,
|
|
417
|
+
:return_type => return_type
|
|
418
|
+
)
|
|
419
|
+
|
|
420
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
421
|
+
if @api_client.config.debugging
|
|
422
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#create_region\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
423
|
+
end
|
|
424
|
+
return data, status_code, headers
|
|
425
|
+
end
|
|
426
|
+
|
|
358
427
|
# Decline organization invitation
|
|
359
428
|
# @param invitation_id [String] Invitation ID
|
|
360
429
|
# @param [Hash] opts the optional parameters
|
|
@@ -603,6 +672,68 @@ module DaytonaApiClient
|
|
|
603
672
|
return data, status_code, headers
|
|
604
673
|
end
|
|
605
674
|
|
|
675
|
+
# Delete a region
|
|
676
|
+
# @param id [String] Region ID
|
|
677
|
+
# @param [Hash] opts the optional parameters
|
|
678
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
679
|
+
# @return [nil]
|
|
680
|
+
def delete_region(id, opts = {})
|
|
681
|
+
delete_region_with_http_info(id, opts)
|
|
682
|
+
nil
|
|
683
|
+
end
|
|
684
|
+
|
|
685
|
+
# Delete a region
|
|
686
|
+
# @param id [String] Region ID
|
|
687
|
+
# @param [Hash] opts the optional parameters
|
|
688
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
689
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
690
|
+
def delete_region_with_http_info(id, opts = {})
|
|
691
|
+
if @api_client.config.debugging
|
|
692
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.delete_region ...'
|
|
693
|
+
end
|
|
694
|
+
# verify the required parameter 'id' is set
|
|
695
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
696
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationsApi.delete_region"
|
|
697
|
+
end
|
|
698
|
+
# resource path
|
|
699
|
+
local_var_path = '/regions/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
700
|
+
|
|
701
|
+
# query parameters
|
|
702
|
+
query_params = opts[:query_params] || {}
|
|
703
|
+
|
|
704
|
+
# header parameters
|
|
705
|
+
header_params = opts[:header_params] || {}
|
|
706
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
707
|
+
|
|
708
|
+
# form parameters
|
|
709
|
+
form_params = opts[:form_params] || {}
|
|
710
|
+
|
|
711
|
+
# http body (model)
|
|
712
|
+
post_body = opts[:debug_body]
|
|
713
|
+
|
|
714
|
+
# return_type
|
|
715
|
+
return_type = opts[:debug_return_type]
|
|
716
|
+
|
|
717
|
+
# auth_names
|
|
718
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
719
|
+
|
|
720
|
+
new_options = opts.merge(
|
|
721
|
+
:operation => :"OrganizationsApi.delete_region",
|
|
722
|
+
:header_params => header_params,
|
|
723
|
+
:query_params => query_params,
|
|
724
|
+
:form_params => form_params,
|
|
725
|
+
:body => post_body,
|
|
726
|
+
:auth_names => auth_names,
|
|
727
|
+
:return_type => return_type
|
|
728
|
+
)
|
|
729
|
+
|
|
730
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
731
|
+
if @api_client.config.debugging
|
|
732
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#delete_region\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
733
|
+
end
|
|
734
|
+
return data, status_code, headers
|
|
735
|
+
end
|
|
736
|
+
|
|
606
737
|
# Get organization by ID
|
|
607
738
|
# @param organization_id [String] Organization ID
|
|
608
739
|
# @param [Hash] opts the optional parameters
|
|
@@ -841,6 +972,70 @@ module DaytonaApiClient
|
|
|
841
972
|
return data, status_code, headers
|
|
842
973
|
end
|
|
843
974
|
|
|
975
|
+
# Get region by ID
|
|
976
|
+
# @param id [String] Region ID
|
|
977
|
+
# @param [Hash] opts the optional parameters
|
|
978
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
979
|
+
# @return [Region]
|
|
980
|
+
def get_region_by_id(id, opts = {})
|
|
981
|
+
data, _status_code, _headers = get_region_by_id_with_http_info(id, opts)
|
|
982
|
+
data
|
|
983
|
+
end
|
|
984
|
+
|
|
985
|
+
# Get region by ID
|
|
986
|
+
# @param id [String] Region ID
|
|
987
|
+
# @param [Hash] opts the optional parameters
|
|
988
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
989
|
+
# @return [Array<(Region, Integer, Hash)>] Region data, response status code and response headers
|
|
990
|
+
def get_region_by_id_with_http_info(id, opts = {})
|
|
991
|
+
if @api_client.config.debugging
|
|
992
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.get_region_by_id ...'
|
|
993
|
+
end
|
|
994
|
+
# verify the required parameter 'id' is set
|
|
995
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
996
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationsApi.get_region_by_id"
|
|
997
|
+
end
|
|
998
|
+
# resource path
|
|
999
|
+
local_var_path = '/regions/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
1000
|
+
|
|
1001
|
+
# query parameters
|
|
1002
|
+
query_params = opts[:query_params] || {}
|
|
1003
|
+
|
|
1004
|
+
# header parameters
|
|
1005
|
+
header_params = opts[:header_params] || {}
|
|
1006
|
+
# HTTP header 'Accept' (if needed)
|
|
1007
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1008
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1009
|
+
|
|
1010
|
+
# form parameters
|
|
1011
|
+
form_params = opts[:form_params] || {}
|
|
1012
|
+
|
|
1013
|
+
# http body (model)
|
|
1014
|
+
post_body = opts[:debug_body]
|
|
1015
|
+
|
|
1016
|
+
# return_type
|
|
1017
|
+
return_type = opts[:debug_return_type] || 'Region'
|
|
1018
|
+
|
|
1019
|
+
# auth_names
|
|
1020
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1021
|
+
|
|
1022
|
+
new_options = opts.merge(
|
|
1023
|
+
:operation => :"OrganizationsApi.get_region_by_id",
|
|
1024
|
+
:header_params => header_params,
|
|
1025
|
+
:query_params => query_params,
|
|
1026
|
+
:form_params => form_params,
|
|
1027
|
+
:body => post_body,
|
|
1028
|
+
:auth_names => auth_names,
|
|
1029
|
+
:return_type => return_type
|
|
1030
|
+
)
|
|
1031
|
+
|
|
1032
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1033
|
+
if @api_client.config.debugging
|
|
1034
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#get_region_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1035
|
+
end
|
|
1036
|
+
return data, status_code, headers
|
|
1037
|
+
end
|
|
1038
|
+
|
|
844
1039
|
# Get region quota by sandbox ID
|
|
845
1040
|
# @param sandbox_id [String] Sandbox ID
|
|
846
1041
|
# @param [Hash] opts the optional parameters
|
|
@@ -961,6 +1156,64 @@ module DaytonaApiClient
|
|
|
961
1156
|
return data, status_code, headers
|
|
962
1157
|
end
|
|
963
1158
|
|
|
1159
|
+
# List all available regions for the organization
|
|
1160
|
+
# @param [Hash] opts the optional parameters
|
|
1161
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1162
|
+
# @return [Array<Region>]
|
|
1163
|
+
def list_available_regions(opts = {})
|
|
1164
|
+
data, _status_code, _headers = list_available_regions_with_http_info(opts)
|
|
1165
|
+
data
|
|
1166
|
+
end
|
|
1167
|
+
|
|
1168
|
+
# List all available regions for the organization
|
|
1169
|
+
# @param [Hash] opts the optional parameters
|
|
1170
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1171
|
+
# @return [Array<(Array<Region>, Integer, Hash)>] Array<Region> data, response status code and response headers
|
|
1172
|
+
def list_available_regions_with_http_info(opts = {})
|
|
1173
|
+
if @api_client.config.debugging
|
|
1174
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.list_available_regions ...'
|
|
1175
|
+
end
|
|
1176
|
+
# resource path
|
|
1177
|
+
local_var_path = '/regions'
|
|
1178
|
+
|
|
1179
|
+
# query parameters
|
|
1180
|
+
query_params = opts[:query_params] || {}
|
|
1181
|
+
|
|
1182
|
+
# header parameters
|
|
1183
|
+
header_params = opts[:header_params] || {}
|
|
1184
|
+
# HTTP header 'Accept' (if needed)
|
|
1185
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1186
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1187
|
+
|
|
1188
|
+
# form parameters
|
|
1189
|
+
form_params = opts[:form_params] || {}
|
|
1190
|
+
|
|
1191
|
+
# http body (model)
|
|
1192
|
+
post_body = opts[:debug_body]
|
|
1193
|
+
|
|
1194
|
+
# return_type
|
|
1195
|
+
return_type = opts[:debug_return_type] || 'Array<Region>'
|
|
1196
|
+
|
|
1197
|
+
# auth_names
|
|
1198
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1199
|
+
|
|
1200
|
+
new_options = opts.merge(
|
|
1201
|
+
:operation => :"OrganizationsApi.list_available_regions",
|
|
1202
|
+
:header_params => header_params,
|
|
1203
|
+
:query_params => query_params,
|
|
1204
|
+
:form_params => form_params,
|
|
1205
|
+
:body => post_body,
|
|
1206
|
+
:auth_names => auth_names,
|
|
1207
|
+
:return_type => return_type
|
|
1208
|
+
)
|
|
1209
|
+
|
|
1210
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1211
|
+
if @api_client.config.debugging
|
|
1212
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#list_available_regions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1213
|
+
end
|
|
1214
|
+
return data, status_code, headers
|
|
1215
|
+
end
|
|
1216
|
+
|
|
964
1217
|
# List pending organization invitations
|
|
965
1218
|
# @param organization_id [String] Organization ID
|
|
966
1219
|
# @param [Hash] opts the optional parameters
|
|
@@ -1254,6 +1507,198 @@ module DaytonaApiClient
|
|
|
1254
1507
|
return data, status_code, headers
|
|
1255
1508
|
end
|
|
1256
1509
|
|
|
1510
|
+
# Regenerate proxy API key for a region
|
|
1511
|
+
# @param id [String] Region ID
|
|
1512
|
+
# @param [Hash] opts the optional parameters
|
|
1513
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1514
|
+
# @return [RegenerateApiKeyResponse]
|
|
1515
|
+
def regenerate_proxy_api_key(id, opts = {})
|
|
1516
|
+
data, _status_code, _headers = regenerate_proxy_api_key_with_http_info(id, opts)
|
|
1517
|
+
data
|
|
1518
|
+
end
|
|
1519
|
+
|
|
1520
|
+
# Regenerate proxy API key for a region
|
|
1521
|
+
# @param id [String] Region ID
|
|
1522
|
+
# @param [Hash] opts the optional parameters
|
|
1523
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1524
|
+
# @return [Array<(RegenerateApiKeyResponse, Integer, Hash)>] RegenerateApiKeyResponse data, response status code and response headers
|
|
1525
|
+
def regenerate_proxy_api_key_with_http_info(id, opts = {})
|
|
1526
|
+
if @api_client.config.debugging
|
|
1527
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.regenerate_proxy_api_key ...'
|
|
1528
|
+
end
|
|
1529
|
+
# verify the required parameter 'id' is set
|
|
1530
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1531
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationsApi.regenerate_proxy_api_key"
|
|
1532
|
+
end
|
|
1533
|
+
# resource path
|
|
1534
|
+
local_var_path = '/regions/{id}/regenerate-proxy-api-key'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
1535
|
+
|
|
1536
|
+
# query parameters
|
|
1537
|
+
query_params = opts[:query_params] || {}
|
|
1538
|
+
|
|
1539
|
+
# header parameters
|
|
1540
|
+
header_params = opts[:header_params] || {}
|
|
1541
|
+
# HTTP header 'Accept' (if needed)
|
|
1542
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1543
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1544
|
+
|
|
1545
|
+
# form parameters
|
|
1546
|
+
form_params = opts[:form_params] || {}
|
|
1547
|
+
|
|
1548
|
+
# http body (model)
|
|
1549
|
+
post_body = opts[:debug_body]
|
|
1550
|
+
|
|
1551
|
+
# return_type
|
|
1552
|
+
return_type = opts[:debug_return_type] || 'RegenerateApiKeyResponse'
|
|
1553
|
+
|
|
1554
|
+
# auth_names
|
|
1555
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1556
|
+
|
|
1557
|
+
new_options = opts.merge(
|
|
1558
|
+
:operation => :"OrganizationsApi.regenerate_proxy_api_key",
|
|
1559
|
+
:header_params => header_params,
|
|
1560
|
+
:query_params => query_params,
|
|
1561
|
+
:form_params => form_params,
|
|
1562
|
+
:body => post_body,
|
|
1563
|
+
:auth_names => auth_names,
|
|
1564
|
+
:return_type => return_type
|
|
1565
|
+
)
|
|
1566
|
+
|
|
1567
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1568
|
+
if @api_client.config.debugging
|
|
1569
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#regenerate_proxy_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1570
|
+
end
|
|
1571
|
+
return data, status_code, headers
|
|
1572
|
+
end
|
|
1573
|
+
|
|
1574
|
+
# Regenerate snapshot manager credentials for a region
|
|
1575
|
+
# @param id [String] Region ID
|
|
1576
|
+
# @param [Hash] opts the optional parameters
|
|
1577
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1578
|
+
# @return [SnapshotManagerCredentials]
|
|
1579
|
+
def regenerate_snapshot_manager_credentials(id, opts = {})
|
|
1580
|
+
data, _status_code, _headers = regenerate_snapshot_manager_credentials_with_http_info(id, opts)
|
|
1581
|
+
data
|
|
1582
|
+
end
|
|
1583
|
+
|
|
1584
|
+
# Regenerate snapshot manager credentials for a region
|
|
1585
|
+
# @param id [String] Region ID
|
|
1586
|
+
# @param [Hash] opts the optional parameters
|
|
1587
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1588
|
+
# @return [Array<(SnapshotManagerCredentials, Integer, Hash)>] SnapshotManagerCredentials data, response status code and response headers
|
|
1589
|
+
def regenerate_snapshot_manager_credentials_with_http_info(id, opts = {})
|
|
1590
|
+
if @api_client.config.debugging
|
|
1591
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.regenerate_snapshot_manager_credentials ...'
|
|
1592
|
+
end
|
|
1593
|
+
# verify the required parameter 'id' is set
|
|
1594
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1595
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationsApi.regenerate_snapshot_manager_credentials"
|
|
1596
|
+
end
|
|
1597
|
+
# resource path
|
|
1598
|
+
local_var_path = '/regions/{id}/regenerate-snapshot-manager-credentials'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
1599
|
+
|
|
1600
|
+
# query parameters
|
|
1601
|
+
query_params = opts[:query_params] || {}
|
|
1602
|
+
|
|
1603
|
+
# header parameters
|
|
1604
|
+
header_params = opts[:header_params] || {}
|
|
1605
|
+
# HTTP header 'Accept' (if needed)
|
|
1606
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1607
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1608
|
+
|
|
1609
|
+
# form parameters
|
|
1610
|
+
form_params = opts[:form_params] || {}
|
|
1611
|
+
|
|
1612
|
+
# http body (model)
|
|
1613
|
+
post_body = opts[:debug_body]
|
|
1614
|
+
|
|
1615
|
+
# return_type
|
|
1616
|
+
return_type = opts[:debug_return_type] || 'SnapshotManagerCredentials'
|
|
1617
|
+
|
|
1618
|
+
# auth_names
|
|
1619
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1620
|
+
|
|
1621
|
+
new_options = opts.merge(
|
|
1622
|
+
:operation => :"OrganizationsApi.regenerate_snapshot_manager_credentials",
|
|
1623
|
+
:header_params => header_params,
|
|
1624
|
+
:query_params => query_params,
|
|
1625
|
+
:form_params => form_params,
|
|
1626
|
+
:body => post_body,
|
|
1627
|
+
:auth_names => auth_names,
|
|
1628
|
+
:return_type => return_type
|
|
1629
|
+
)
|
|
1630
|
+
|
|
1631
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1632
|
+
if @api_client.config.debugging
|
|
1633
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#regenerate_snapshot_manager_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1634
|
+
end
|
|
1635
|
+
return data, status_code, headers
|
|
1636
|
+
end
|
|
1637
|
+
|
|
1638
|
+
# Regenerate SSH gateway API key for a region
|
|
1639
|
+
# @param id [String] Region ID
|
|
1640
|
+
# @param [Hash] opts the optional parameters
|
|
1641
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1642
|
+
# @return [RegenerateApiKeyResponse]
|
|
1643
|
+
def regenerate_ssh_gateway_api_key(id, opts = {})
|
|
1644
|
+
data, _status_code, _headers = regenerate_ssh_gateway_api_key_with_http_info(id, opts)
|
|
1645
|
+
data
|
|
1646
|
+
end
|
|
1647
|
+
|
|
1648
|
+
# Regenerate SSH gateway API key for a region
|
|
1649
|
+
# @param id [String] Region ID
|
|
1650
|
+
# @param [Hash] opts the optional parameters
|
|
1651
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
1652
|
+
# @return [Array<(RegenerateApiKeyResponse, Integer, Hash)>] RegenerateApiKeyResponse data, response status code and response headers
|
|
1653
|
+
def regenerate_ssh_gateway_api_key_with_http_info(id, opts = {})
|
|
1654
|
+
if @api_client.config.debugging
|
|
1655
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.regenerate_ssh_gateway_api_key ...'
|
|
1656
|
+
end
|
|
1657
|
+
# verify the required parameter 'id' is set
|
|
1658
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
1659
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationsApi.regenerate_ssh_gateway_api_key"
|
|
1660
|
+
end
|
|
1661
|
+
# resource path
|
|
1662
|
+
local_var_path = '/regions/{id}/regenerate-ssh-gateway-api-key'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
1663
|
+
|
|
1664
|
+
# query parameters
|
|
1665
|
+
query_params = opts[:query_params] || {}
|
|
1666
|
+
|
|
1667
|
+
# header parameters
|
|
1668
|
+
header_params = opts[:header_params] || {}
|
|
1669
|
+
# HTTP header 'Accept' (if needed)
|
|
1670
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1671
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
1672
|
+
|
|
1673
|
+
# form parameters
|
|
1674
|
+
form_params = opts[:form_params] || {}
|
|
1675
|
+
|
|
1676
|
+
# http body (model)
|
|
1677
|
+
post_body = opts[:debug_body]
|
|
1678
|
+
|
|
1679
|
+
# return_type
|
|
1680
|
+
return_type = opts[:debug_return_type] || 'RegenerateApiKeyResponse'
|
|
1681
|
+
|
|
1682
|
+
# auth_names
|
|
1683
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
1684
|
+
|
|
1685
|
+
new_options = opts.merge(
|
|
1686
|
+
:operation => :"OrganizationsApi.regenerate_ssh_gateway_api_key",
|
|
1687
|
+
:header_params => header_params,
|
|
1688
|
+
:query_params => query_params,
|
|
1689
|
+
:form_params => form_params,
|
|
1690
|
+
:body => post_body,
|
|
1691
|
+
:auth_names => auth_names,
|
|
1692
|
+
:return_type => return_type
|
|
1693
|
+
)
|
|
1694
|
+
|
|
1695
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1696
|
+
if @api_client.config.debugging
|
|
1697
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#regenerate_ssh_gateway_api_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1698
|
+
end
|
|
1699
|
+
return data, status_code, headers
|
|
1700
|
+
end
|
|
1701
|
+
|
|
1257
1702
|
# Set default region for organization
|
|
1258
1703
|
# @param organization_id [String] Organization ID
|
|
1259
1704
|
# @param update_organization_default_region [UpdateOrganizationDefaultRegion]
|
|
@@ -1829,6 +2274,79 @@ module DaytonaApiClient
|
|
|
1829
2274
|
return data, status_code, headers
|
|
1830
2275
|
end
|
|
1831
2276
|
|
|
2277
|
+
# Update region configuration
|
|
2278
|
+
# @param id [String] Region ID
|
|
2279
|
+
# @param update_region [UpdateRegion]
|
|
2280
|
+
# @param [Hash] opts the optional parameters
|
|
2281
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2282
|
+
# @return [nil]
|
|
2283
|
+
def update_region(id, update_region, opts = {})
|
|
2284
|
+
update_region_with_http_info(id, update_region, opts)
|
|
2285
|
+
nil
|
|
2286
|
+
end
|
|
2287
|
+
|
|
2288
|
+
# Update region configuration
|
|
2289
|
+
# @param id [String] Region ID
|
|
2290
|
+
# @param update_region [UpdateRegion]
|
|
2291
|
+
# @param [Hash] opts the optional parameters
|
|
2292
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2293
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
2294
|
+
def update_region_with_http_info(id, update_region, opts = {})
|
|
2295
|
+
if @api_client.config.debugging
|
|
2296
|
+
@api_client.config.logger.debug 'Calling API: OrganizationsApi.update_region ...'
|
|
2297
|
+
end
|
|
2298
|
+
# verify the required parameter 'id' is set
|
|
2299
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
2300
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling OrganizationsApi.update_region"
|
|
2301
|
+
end
|
|
2302
|
+
# verify the required parameter 'update_region' is set
|
|
2303
|
+
if @api_client.config.client_side_validation && update_region.nil?
|
|
2304
|
+
fail ArgumentError, "Missing the required parameter 'update_region' when calling OrganizationsApi.update_region"
|
|
2305
|
+
end
|
|
2306
|
+
# resource path
|
|
2307
|
+
local_var_path = '/regions/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
|
2308
|
+
|
|
2309
|
+
# query parameters
|
|
2310
|
+
query_params = opts[:query_params] || {}
|
|
2311
|
+
|
|
2312
|
+
# header parameters
|
|
2313
|
+
header_params = opts[:header_params] || {}
|
|
2314
|
+
# HTTP header 'Content-Type'
|
|
2315
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2316
|
+
if !content_type.nil?
|
|
2317
|
+
header_params['Content-Type'] = content_type
|
|
2318
|
+
end
|
|
2319
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2320
|
+
|
|
2321
|
+
# form parameters
|
|
2322
|
+
form_params = opts[:form_params] || {}
|
|
2323
|
+
|
|
2324
|
+
# http body (model)
|
|
2325
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_region)
|
|
2326
|
+
|
|
2327
|
+
# return_type
|
|
2328
|
+
return_type = opts[:debug_return_type]
|
|
2329
|
+
|
|
2330
|
+
# auth_names
|
|
2331
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2332
|
+
|
|
2333
|
+
new_options = opts.merge(
|
|
2334
|
+
:operation => :"OrganizationsApi.update_region",
|
|
2335
|
+
:header_params => header_params,
|
|
2336
|
+
:query_params => query_params,
|
|
2337
|
+
:form_params => form_params,
|
|
2338
|
+
:body => post_body,
|
|
2339
|
+
:auth_names => auth_names,
|
|
2340
|
+
:return_type => return_type
|
|
2341
|
+
)
|
|
2342
|
+
|
|
2343
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
2344
|
+
if @api_client.config.debugging
|
|
2345
|
+
@api_client.config.logger.debug "API called: OrganizationsApi#update_region\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2346
|
+
end
|
|
2347
|
+
return data, status_code, headers
|
|
2348
|
+
end
|
|
2349
|
+
|
|
1832
2350
|
# Update sandbox default limited network egress
|
|
1833
2351
|
# @param organization_id [String] Organization ID
|
|
1834
2352
|
# @param organization_sandbox_default_limited_network_egress [OrganizationSandboxDefaultLimitedNetworkEgress]
|
|
@@ -19,6 +19,73 @@ module DaytonaApiClient
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
+
# Get sandbox ID from signed preview URL token
|
|
23
|
+
# @param signed_preview_token [String] Signed preview URL token
|
|
24
|
+
# @param port [Float] Port number to get sandbox ID from signed preview URL token
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [String]
|
|
27
|
+
def get_sandbox_id_from_signed_preview_url_token(signed_preview_token, port, opts = {})
|
|
28
|
+
data, _status_code, _headers = get_sandbox_id_from_signed_preview_url_token_with_http_info(signed_preview_token, port, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Get sandbox ID from signed preview URL token
|
|
33
|
+
# @param signed_preview_token [String] Signed preview URL token
|
|
34
|
+
# @param port [Float] Port number to get sandbox ID from signed preview URL token
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
|
37
|
+
def get_sandbox_id_from_signed_preview_url_token_with_http_info(signed_preview_token, port, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: PreviewApi.get_sandbox_id_from_signed_preview_url_token ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'signed_preview_token' is set
|
|
42
|
+
if @api_client.config.client_side_validation && signed_preview_token.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'signed_preview_token' when calling PreviewApi.get_sandbox_id_from_signed_preview_url_token"
|
|
44
|
+
end
|
|
45
|
+
# verify the required parameter 'port' is set
|
|
46
|
+
if @api_client.config.client_side_validation && port.nil?
|
|
47
|
+
fail ArgumentError, "Missing the required parameter 'port' when calling PreviewApi.get_sandbox_id_from_signed_preview_url_token"
|
|
48
|
+
end
|
|
49
|
+
# resource path
|
|
50
|
+
local_var_path = '/preview/{signedPreviewToken}/{port}/sandbox-id'.sub('{' + 'signedPreviewToken' + '}', CGI.escape(signed_preview_token.to_s)).sub('{' + 'port' + '}', CGI.escape(port.to_s))
|
|
51
|
+
|
|
52
|
+
# query parameters
|
|
53
|
+
query_params = opts[:query_params] || {}
|
|
54
|
+
|
|
55
|
+
# header parameters
|
|
56
|
+
header_params = opts[:header_params] || {}
|
|
57
|
+
# HTTP header 'Accept' (if needed)
|
|
58
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
59
|
+
|
|
60
|
+
# form parameters
|
|
61
|
+
form_params = opts[:form_params] || {}
|
|
62
|
+
|
|
63
|
+
# http body (model)
|
|
64
|
+
post_body = opts[:debug_body]
|
|
65
|
+
|
|
66
|
+
# return_type
|
|
67
|
+
return_type = opts[:debug_return_type] || 'String'
|
|
68
|
+
|
|
69
|
+
# auth_names
|
|
70
|
+
auth_names = opts[:debug_auth_names] || []
|
|
71
|
+
|
|
72
|
+
new_options = opts.merge(
|
|
73
|
+
:operation => :"PreviewApi.get_sandbox_id_from_signed_preview_url_token",
|
|
74
|
+
:header_params => header_params,
|
|
75
|
+
:query_params => query_params,
|
|
76
|
+
:form_params => form_params,
|
|
77
|
+
:body => post_body,
|
|
78
|
+
:auth_names => auth_names,
|
|
79
|
+
:return_type => return_type
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
83
|
+
if @api_client.config.debugging
|
|
84
|
+
@api_client.config.logger.debug "API called: PreviewApi#get_sandbox_id_from_signed_preview_url_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
85
|
+
end
|
|
86
|
+
return data, status_code, headers
|
|
87
|
+
end
|
|
88
|
+
|
|
22
89
|
# Check if user has access to the sandbox
|
|
23
90
|
# @param sandbox_id [String]
|
|
24
91
|
# @param [Hash] opts the optional parameters
|