daytona_api_client 0.191.0 → 0.192.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.openapi-generator/FILES +8 -0
- data/lib/daytona_api_client/api/admin_api.rb +34 -4
- data/lib/daytona_api_client/api/audit_api.rb +34 -4
- data/lib/daytona_api_client/api/sandbox_api.rb +64 -0
- data/lib/daytona_api_client/api/secret_api.rb +350 -0
- data/lib/daytona_api_client/models/create_sandbox.rb +16 -4
- data/lib/daytona_api_client/models/create_secret.rb +214 -0
- data/lib/daytona_api_client/models/date_filter.rb +178 -0
- data/lib/daytona_api_client/models/int_filter.rb +222 -0
- data/lib/daytona_api_client/models/resolve_sandbox_secrets200_response_inner.rb +176 -0
- data/lib/daytona_api_client/models/secret.rb +312 -0
- data/lib/daytona_api_client/models/string_filter.rb +182 -0
- data/lib/daytona_api_client/models/update_secret.rb +170 -0
- data/lib/daytona_api_client/version.rb +1 -1
- data/lib/daytona_api_client.rb +8 -0
- metadata +9 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '0936b664bcbad82eaa2c0883eb74d6385d64e9fd02c764b707f258f4675412c1'
|
|
4
|
+
data.tar.gz: 2b1de00c7f7ceced34014e2232f6d7fac7041770feb7f433d4bf907a2658eb7d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2a2d36bb817a6d8161a07156b7f14c22908760f43f48dcdc4f2c85958296c152fc1745798f58aaa426f48af1a444a9a9a8e4d9e0bb2ce200986305fc03e3ce0d
|
|
7
|
+
data.tar.gz: f8aa9dbd1f283498fc6d31f5ff420ea3b0aeb9a9a08334faf9ac20693b486c209e6f47b9785cb14d233ccc03565a3c826bad5a9062a8edff392c90dfa570ebee
|
data/.openapi-generator/FILES
CHANGED
|
@@ -17,6 +17,7 @@ lib/daytona_api_client/api/preview_api.rb
|
|
|
17
17
|
lib/daytona_api_client/api/regions_api.rb
|
|
18
18
|
lib/daytona_api_client/api/runners_api.rb
|
|
19
19
|
lib/daytona_api_client/api/sandbox_api.rb
|
|
20
|
+
lib/daytona_api_client/api/secret_api.rb
|
|
20
21
|
lib/daytona_api_client/api/snapshots_api.rb
|
|
21
22
|
lib/daytona_api_client/api/toolbox_api.rb
|
|
22
23
|
lib/daytona_api_client/api/users_api.rb
|
|
@@ -57,10 +58,12 @@ lib/daytona_api_client/models/create_runner.rb
|
|
|
57
58
|
lib/daytona_api_client/models/create_runner_response.rb
|
|
58
59
|
lib/daytona_api_client/models/create_sandbox.rb
|
|
59
60
|
lib/daytona_api_client/models/create_sandbox_snapshot.rb
|
|
61
|
+
lib/daytona_api_client/models/create_secret.rb
|
|
60
62
|
lib/daytona_api_client/models/create_session_request.rb
|
|
61
63
|
lib/daytona_api_client/models/create_snapshot.rb
|
|
62
64
|
lib/daytona_api_client/models/create_user.rb
|
|
63
65
|
lib/daytona_api_client/models/create_volume.rb
|
|
66
|
+
lib/daytona_api_client/models/date_filter.rb
|
|
64
67
|
lib/daytona_api_client/models/daytona_configuration.rb
|
|
65
68
|
lib/daytona_api_client/models/display_info_response.rb
|
|
66
69
|
lib/daytona_api_client/models/docker_registry.rb
|
|
@@ -84,6 +87,7 @@ lib/daytona_api_client/models/gpu_type.rb
|
|
|
84
87
|
lib/daytona_api_client/models/health_controller_check200_response.rb
|
|
85
88
|
lib/daytona_api_client/models/health_controller_check200_response_info_value.rb
|
|
86
89
|
lib/daytona_api_client/models/health_controller_check503_response.rb
|
|
90
|
+
lib/daytona_api_client/models/int_filter.rb
|
|
87
91
|
lib/daytona_api_client/models/job.rb
|
|
88
92
|
lib/daytona_api_client/models/job_status.rb
|
|
89
93
|
lib/daytona_api_client/models/job_type.rb
|
|
@@ -153,6 +157,7 @@ lib/daytona_api_client/models/registry_push_access_dto.rb
|
|
|
153
157
|
lib/daytona_api_client/models/replace_request.rb
|
|
154
158
|
lib/daytona_api_client/models/replace_result.rb
|
|
155
159
|
lib/daytona_api_client/models/resize_sandbox.rb
|
|
160
|
+
lib/daytona_api_client/models/resolve_sandbox_secrets200_response_inner.rb
|
|
156
161
|
lib/daytona_api_client/models/runner.rb
|
|
157
162
|
lib/daytona_api_client/models/runner_class.rb
|
|
158
163
|
lib/daytona_api_client/models/runner_full.rb
|
|
@@ -172,6 +177,7 @@ lib/daytona_api_client/models/sandbox_state.rb
|
|
|
172
177
|
lib/daytona_api_client/models/sandbox_volume.rb
|
|
173
178
|
lib/daytona_api_client/models/screenshot_response.rb
|
|
174
179
|
lib/daytona_api_client/models/search_files_response.rb
|
|
180
|
+
lib/daytona_api_client/models/secret.rb
|
|
175
181
|
lib/daytona_api_client/models/send_webhook_dto.rb
|
|
176
182
|
lib/daytona_api_client/models/session.rb
|
|
177
183
|
lib/daytona_api_client/models/session_execute_request.rb
|
|
@@ -184,6 +190,7 @@ lib/daytona_api_client/models/snapshot_state.rb
|
|
|
184
190
|
lib/daytona_api_client/models/ssh_access_dto.rb
|
|
185
191
|
lib/daytona_api_client/models/ssh_access_validation_dto.rb
|
|
186
192
|
lib/daytona_api_client/models/storage_access_dto.rb
|
|
193
|
+
lib/daytona_api_client/models/string_filter.rb
|
|
187
194
|
lib/daytona_api_client/models/toolbox_proxy_url.rb
|
|
188
195
|
lib/daytona_api_client/models/trace_span.rb
|
|
189
196
|
lib/daytona_api_client/models/trace_summary.rb
|
|
@@ -198,6 +205,7 @@ lib/daytona_api_client/models/update_organization_role.rb
|
|
|
198
205
|
lib/daytona_api_client/models/update_region.rb
|
|
199
206
|
lib/daytona_api_client/models/update_sandbox_network_settings.rb
|
|
200
207
|
lib/daytona_api_client/models/update_sandbox_state_dto.rb
|
|
208
|
+
lib/daytona_api_client/models/update_secret.rb
|
|
201
209
|
lib/daytona_api_client/models/url.rb
|
|
202
210
|
lib/daytona_api_client/models/user.rb
|
|
203
211
|
lib/daytona_api_client/models/user_home_dir_response.rb
|
|
@@ -423,9 +423,19 @@ module DaytonaApiClient
|
|
|
423
423
|
# @param [Hash] opts the optional parameters
|
|
424
424
|
# @option opts [Float] :page Page number of the results (default to 1)
|
|
425
425
|
# @option opts [Float] :limit Number of results per page (default to 100)
|
|
426
|
-
# @option opts [Time] :from From date (ISO 8601 format)
|
|
427
|
-
# @option opts [Time] :to To date (ISO 8601 format)
|
|
426
|
+
# @option opts [Time] :from Deprecated alias for `createdAt[gte]`. From date (ISO 8601 format).
|
|
427
|
+
# @option opts [Time] :to Deprecated alias for `createdAt[lte]`. To date (ISO 8601 format).
|
|
428
428
|
# @option opts [String] :next_token Token for cursor-based pagination. When provided, takes precedence over page parameter.
|
|
429
|
+
# @option opts [StringFilter] :id Filter by audit log ID.
|
|
430
|
+
# @option opts [StringFilter] :actor_id Filter by actor user ID.
|
|
431
|
+
# @option opts [StringFilter] :actor_email Filter by actor email.
|
|
432
|
+
# @option opts [StringFilter] :actor_api_key_prefix Filter by actor API key prefix.
|
|
433
|
+
# @option opts [StringFilter] :actor_api_key_suffix Filter by actor API key suffix.
|
|
434
|
+
# @option opts [StringFilter] :action Filter by action.
|
|
435
|
+
# @option opts [StringFilter] :target_type Filter by target type.
|
|
436
|
+
# @option opts [StringFilter] :target_id Filter by target ID.
|
|
437
|
+
# @option opts [IntFilter] :status_code Filter by HTTP status code.
|
|
438
|
+
# @option opts [DateFilter] :created_at Filter by creation timestamp.
|
|
429
439
|
# @return [PaginatedAuditLogs]
|
|
430
440
|
def admin_get_all_audit_logs(opts = {})
|
|
431
441
|
data, _status_code, _headers = admin_get_all_audit_logs_with_http_info(opts)
|
|
@@ -436,9 +446,19 @@ module DaytonaApiClient
|
|
|
436
446
|
# @param [Hash] opts the optional parameters
|
|
437
447
|
# @option opts [Float] :page Page number of the results (default to 1)
|
|
438
448
|
# @option opts [Float] :limit Number of results per page (default to 100)
|
|
439
|
-
# @option opts [Time] :from From date (ISO 8601 format)
|
|
440
|
-
# @option opts [Time] :to To date (ISO 8601 format)
|
|
449
|
+
# @option opts [Time] :from Deprecated alias for `createdAt[gte]`. From date (ISO 8601 format).
|
|
450
|
+
# @option opts [Time] :to Deprecated alias for `createdAt[lte]`. To date (ISO 8601 format).
|
|
441
451
|
# @option opts [String] :next_token Token for cursor-based pagination. When provided, takes precedence over page parameter.
|
|
452
|
+
# @option opts [StringFilter] :id Filter by audit log ID.
|
|
453
|
+
# @option opts [StringFilter] :actor_id Filter by actor user ID.
|
|
454
|
+
# @option opts [StringFilter] :actor_email Filter by actor email.
|
|
455
|
+
# @option opts [StringFilter] :actor_api_key_prefix Filter by actor API key prefix.
|
|
456
|
+
# @option opts [StringFilter] :actor_api_key_suffix Filter by actor API key suffix.
|
|
457
|
+
# @option opts [StringFilter] :action Filter by action.
|
|
458
|
+
# @option opts [StringFilter] :target_type Filter by target type.
|
|
459
|
+
# @option opts [StringFilter] :target_id Filter by target ID.
|
|
460
|
+
# @option opts [IntFilter] :status_code Filter by HTTP status code.
|
|
461
|
+
# @option opts [DateFilter] :created_at Filter by creation timestamp.
|
|
442
462
|
# @return [Array<(PaginatedAuditLogs, Integer, Hash)>] PaginatedAuditLogs data, response status code and response headers
|
|
443
463
|
def admin_get_all_audit_logs_with_http_info(opts = {})
|
|
444
464
|
if @api_client.config.debugging
|
|
@@ -466,6 +486,16 @@ module DaytonaApiClient
|
|
|
466
486
|
query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
|
|
467
487
|
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
|
|
468
488
|
query_params[:'nextToken'] = opts[:'next_token'] if !opts[:'next_token'].nil?
|
|
489
|
+
query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
|
|
490
|
+
query_params[:'actorId'] = opts[:'actor_id'] if !opts[:'actor_id'].nil?
|
|
491
|
+
query_params[:'actorEmail'] = opts[:'actor_email'] if !opts[:'actor_email'].nil?
|
|
492
|
+
query_params[:'actorApiKeyPrefix'] = opts[:'actor_api_key_prefix'] if !opts[:'actor_api_key_prefix'].nil?
|
|
493
|
+
query_params[:'actorApiKeySuffix'] = opts[:'actor_api_key_suffix'] if !opts[:'actor_api_key_suffix'].nil?
|
|
494
|
+
query_params[:'action'] = opts[:'action'] if !opts[:'action'].nil?
|
|
495
|
+
query_params[:'targetType'] = opts[:'target_type'] if !opts[:'target_type'].nil?
|
|
496
|
+
query_params[:'targetId'] = opts[:'target_id'] if !opts[:'target_id'].nil?
|
|
497
|
+
query_params[:'statusCode'] = opts[:'status_code'] if !opts[:'status_code'].nil?
|
|
498
|
+
query_params[:'createdAt'] = opts[:'created_at'] if !opts[:'created_at'].nil?
|
|
469
499
|
|
|
470
500
|
# header parameters
|
|
471
501
|
header_params = opts[:header_params] || {}
|
|
@@ -24,9 +24,19 @@ module DaytonaApiClient
|
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
25
|
# @option opts [Float] :page Page number of the results (default to 1)
|
|
26
26
|
# @option opts [Float] :limit Number of results per page (default to 100)
|
|
27
|
-
# @option opts [Time] :from From date (ISO 8601 format)
|
|
28
|
-
# @option opts [Time] :to To date (ISO 8601 format)
|
|
27
|
+
# @option opts [Time] :from Deprecated alias for `createdAt[gte]`. From date (ISO 8601 format).
|
|
28
|
+
# @option opts [Time] :to Deprecated alias for `createdAt[lte]`. To date (ISO 8601 format).
|
|
29
29
|
# @option opts [String] :next_token Token for cursor-based pagination. When provided, takes precedence over page parameter.
|
|
30
|
+
# @option opts [StringFilter] :id Filter by audit log ID.
|
|
31
|
+
# @option opts [StringFilter] :actor_id Filter by actor user ID.
|
|
32
|
+
# @option opts [StringFilter] :actor_email Filter by actor email.
|
|
33
|
+
# @option opts [StringFilter] :actor_api_key_prefix Filter by actor API key prefix.
|
|
34
|
+
# @option opts [StringFilter] :actor_api_key_suffix Filter by actor API key suffix.
|
|
35
|
+
# @option opts [StringFilter] :action Filter by action.
|
|
36
|
+
# @option opts [StringFilter] :target_type Filter by target type.
|
|
37
|
+
# @option opts [StringFilter] :target_id Filter by target ID.
|
|
38
|
+
# @option opts [IntFilter] :status_code Filter by HTTP status code.
|
|
39
|
+
# @option opts [DateFilter] :created_at Filter by creation timestamp.
|
|
30
40
|
# @return [PaginatedAuditLogs]
|
|
31
41
|
def get_organization_audit_logs(organization_id, opts = {})
|
|
32
42
|
data, _status_code, _headers = get_organization_audit_logs_with_http_info(organization_id, opts)
|
|
@@ -38,9 +48,19 @@ module DaytonaApiClient
|
|
|
38
48
|
# @param [Hash] opts the optional parameters
|
|
39
49
|
# @option opts [Float] :page Page number of the results (default to 1)
|
|
40
50
|
# @option opts [Float] :limit Number of results per page (default to 100)
|
|
41
|
-
# @option opts [Time] :from From date (ISO 8601 format)
|
|
42
|
-
# @option opts [Time] :to To date (ISO 8601 format)
|
|
51
|
+
# @option opts [Time] :from Deprecated alias for `createdAt[gte]`. From date (ISO 8601 format).
|
|
52
|
+
# @option opts [Time] :to Deprecated alias for `createdAt[lte]`. To date (ISO 8601 format).
|
|
43
53
|
# @option opts [String] :next_token Token for cursor-based pagination. When provided, takes precedence over page parameter.
|
|
54
|
+
# @option opts [StringFilter] :id Filter by audit log ID.
|
|
55
|
+
# @option opts [StringFilter] :actor_id Filter by actor user ID.
|
|
56
|
+
# @option opts [StringFilter] :actor_email Filter by actor email.
|
|
57
|
+
# @option opts [StringFilter] :actor_api_key_prefix Filter by actor API key prefix.
|
|
58
|
+
# @option opts [StringFilter] :actor_api_key_suffix Filter by actor API key suffix.
|
|
59
|
+
# @option opts [StringFilter] :action Filter by action.
|
|
60
|
+
# @option opts [StringFilter] :target_type Filter by target type.
|
|
61
|
+
# @option opts [StringFilter] :target_id Filter by target ID.
|
|
62
|
+
# @option opts [IntFilter] :status_code Filter by HTTP status code.
|
|
63
|
+
# @option opts [DateFilter] :created_at Filter by creation timestamp.
|
|
44
64
|
# @return [Array<(PaginatedAuditLogs, Integer, Hash)>] PaginatedAuditLogs data, response status code and response headers
|
|
45
65
|
def get_organization_audit_logs_with_http_info(organization_id, opts = {})
|
|
46
66
|
if @api_client.config.debugging
|
|
@@ -72,6 +92,16 @@ module DaytonaApiClient
|
|
|
72
92
|
query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
|
|
73
93
|
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
|
|
74
94
|
query_params[:'nextToken'] = opts[:'next_token'] if !opts[:'next_token'].nil?
|
|
95
|
+
query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
|
|
96
|
+
query_params[:'actorId'] = opts[:'actor_id'] if !opts[:'actor_id'].nil?
|
|
97
|
+
query_params[:'actorEmail'] = opts[:'actor_email'] if !opts[:'actor_email'].nil?
|
|
98
|
+
query_params[:'actorApiKeyPrefix'] = opts[:'actor_api_key_prefix'] if !opts[:'actor_api_key_prefix'].nil?
|
|
99
|
+
query_params[:'actorApiKeySuffix'] = opts[:'actor_api_key_suffix'] if !opts[:'actor_api_key_suffix'].nil?
|
|
100
|
+
query_params[:'action'] = opts[:'action'] if !opts[:'action'].nil?
|
|
101
|
+
query_params[:'targetType'] = opts[:'target_type'] if !opts[:'target_type'].nil?
|
|
102
|
+
query_params[:'targetId'] = opts[:'target_id'] if !opts[:'target_id'].nil?
|
|
103
|
+
query_params[:'statusCode'] = opts[:'status_code'] if !opts[:'status_code'].nil?
|
|
104
|
+
query_params[:'createdAt'] = opts[:'created_at'] if !opts[:'created_at'].nil?
|
|
75
105
|
|
|
76
106
|
# header parameters
|
|
77
107
|
header_params = opts[:header_params] || {}
|
|
@@ -2304,6 +2304,70 @@ module DaytonaApiClient
|
|
|
2304
2304
|
return data, status_code, headers
|
|
2305
2305
|
end
|
|
2306
2306
|
|
|
2307
|
+
# Resolve sandbox secrets
|
|
2308
|
+
# @param sandbox_id [String] Sandbox ID
|
|
2309
|
+
# @param [Hash] opts the optional parameters
|
|
2310
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2311
|
+
# @return [Array<ResolveSandboxSecrets200ResponseInner>]
|
|
2312
|
+
def resolve_sandbox_secrets(sandbox_id, opts = {})
|
|
2313
|
+
data, _status_code, _headers = resolve_sandbox_secrets_with_http_info(sandbox_id, opts)
|
|
2314
|
+
data
|
|
2315
|
+
end
|
|
2316
|
+
|
|
2317
|
+
# Resolve sandbox secrets
|
|
2318
|
+
# @param sandbox_id [String] Sandbox ID
|
|
2319
|
+
# @param [Hash] opts the optional parameters
|
|
2320
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
2321
|
+
# @return [Array<(Array<ResolveSandboxSecrets200ResponseInner>, Integer, Hash)>] Array<ResolveSandboxSecrets200ResponseInner> data, response status code and response headers
|
|
2322
|
+
def resolve_sandbox_secrets_with_http_info(sandbox_id, opts = {})
|
|
2323
|
+
if @api_client.config.debugging
|
|
2324
|
+
@api_client.config.logger.debug 'Calling API: SandboxApi.resolve_sandbox_secrets ...'
|
|
2325
|
+
end
|
|
2326
|
+
# verify the required parameter 'sandbox_id' is set
|
|
2327
|
+
if @api_client.config.client_side_validation && sandbox_id.nil?
|
|
2328
|
+
fail ArgumentError, "Missing the required parameter 'sandbox_id' when calling SandboxApi.resolve_sandbox_secrets"
|
|
2329
|
+
end
|
|
2330
|
+
# resource path
|
|
2331
|
+
local_var_path = '/sandbox/{sandboxId}/secrets'.sub('{' + 'sandboxId' + '}', CGI.escape(sandbox_id.to_s))
|
|
2332
|
+
|
|
2333
|
+
# query parameters
|
|
2334
|
+
query_params = opts[:query_params] || {}
|
|
2335
|
+
|
|
2336
|
+
# header parameters
|
|
2337
|
+
header_params = opts[:header_params] || {}
|
|
2338
|
+
# HTTP header 'Accept' (if needed)
|
|
2339
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2340
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
2341
|
+
|
|
2342
|
+
# form parameters
|
|
2343
|
+
form_params = opts[:form_params] || {}
|
|
2344
|
+
|
|
2345
|
+
# http body (model)
|
|
2346
|
+
post_body = opts[:debug_body]
|
|
2347
|
+
|
|
2348
|
+
# return_type
|
|
2349
|
+
return_type = opts[:debug_return_type] || 'Array<ResolveSandboxSecrets200ResponseInner>'
|
|
2350
|
+
|
|
2351
|
+
# auth_names
|
|
2352
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
2353
|
+
|
|
2354
|
+
new_options = opts.merge(
|
|
2355
|
+
:operation => :"SandboxApi.resolve_sandbox_secrets",
|
|
2356
|
+
:header_params => header_params,
|
|
2357
|
+
:query_params => query_params,
|
|
2358
|
+
:form_params => form_params,
|
|
2359
|
+
:body => post_body,
|
|
2360
|
+
:auth_names => auth_names,
|
|
2361
|
+
:return_type => return_type
|
|
2362
|
+
)
|
|
2363
|
+
|
|
2364
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2365
|
+
if @api_client.config.debugging
|
|
2366
|
+
@api_client.config.logger.debug "API called: SandboxApi#resolve_sandbox_secrets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2367
|
+
end
|
|
2368
|
+
return data, status_code, headers
|
|
2369
|
+
end
|
|
2370
|
+
|
|
2307
2371
|
# Revoke SSH access for sandbox
|
|
2308
2372
|
# @param sandbox_id_or_name [String] ID or name of the sandbox
|
|
2309
2373
|
# @param [Hash] opts the optional parameters
|
|
@@ -0,0 +1,350 @@
|
|
|
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.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module DaytonaApiClient
|
|
16
|
+
class SecretApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create secret
|
|
23
|
+
# @param create_secret [CreateSecret]
|
|
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 [Secret]
|
|
27
|
+
def create_secret(create_secret, opts = {})
|
|
28
|
+
data, _status_code, _headers = create_secret_with_http_info(create_secret, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Create secret
|
|
33
|
+
# @param create_secret [CreateSecret]
|
|
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<(Secret, Integer, Hash)>] Secret data, response status code and response headers
|
|
37
|
+
def create_secret_with_http_info(create_secret, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: SecretApi.create_secret ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'create_secret' is set
|
|
42
|
+
if @api_client.config.client_side_validation && create_secret.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'create_secret' when calling SecretApi.create_secret"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/secret'
|
|
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
|
+
# HTTP header 'Content-Type'
|
|
56
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
57
|
+
if !content_type.nil?
|
|
58
|
+
header_params['Content-Type'] = content_type
|
|
59
|
+
end
|
|
60
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
61
|
+
|
|
62
|
+
# form parameters
|
|
63
|
+
form_params = opts[:form_params] || {}
|
|
64
|
+
|
|
65
|
+
# http body (model)
|
|
66
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_secret)
|
|
67
|
+
|
|
68
|
+
# return_type
|
|
69
|
+
return_type = opts[:debug_return_type] || 'Secret'
|
|
70
|
+
|
|
71
|
+
# auth_names
|
|
72
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
73
|
+
|
|
74
|
+
new_options = opts.merge(
|
|
75
|
+
:operation => :"SecretApi.create_secret",
|
|
76
|
+
:header_params => header_params,
|
|
77
|
+
:query_params => query_params,
|
|
78
|
+
:form_params => form_params,
|
|
79
|
+
:body => post_body,
|
|
80
|
+
:auth_names => auth_names,
|
|
81
|
+
:return_type => return_type
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
85
|
+
if @api_client.config.debugging
|
|
86
|
+
@api_client.config.logger.debug "API called: SecretApi#create_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
87
|
+
end
|
|
88
|
+
return data, status_code, headers
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Delete secret
|
|
92
|
+
# @param secret_id [String] ID of the secret
|
|
93
|
+
# @param [Hash] opts the optional parameters
|
|
94
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
95
|
+
# @return [nil]
|
|
96
|
+
def delete_secret(secret_id, opts = {})
|
|
97
|
+
delete_secret_with_http_info(secret_id, opts)
|
|
98
|
+
nil
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Delete secret
|
|
102
|
+
# @param secret_id [String] ID of the secret
|
|
103
|
+
# @param [Hash] opts the optional parameters
|
|
104
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
105
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
106
|
+
def delete_secret_with_http_info(secret_id, opts = {})
|
|
107
|
+
if @api_client.config.debugging
|
|
108
|
+
@api_client.config.logger.debug 'Calling API: SecretApi.delete_secret ...'
|
|
109
|
+
end
|
|
110
|
+
# verify the required parameter 'secret_id' is set
|
|
111
|
+
if @api_client.config.client_side_validation && secret_id.nil?
|
|
112
|
+
fail ArgumentError, "Missing the required parameter 'secret_id' when calling SecretApi.delete_secret"
|
|
113
|
+
end
|
|
114
|
+
# resource path
|
|
115
|
+
local_var_path = '/secret/{secretId}'.sub('{' + 'secretId' + '}', CGI.escape(secret_id.to_s))
|
|
116
|
+
|
|
117
|
+
# query parameters
|
|
118
|
+
query_params = opts[:query_params] || {}
|
|
119
|
+
|
|
120
|
+
# header parameters
|
|
121
|
+
header_params = opts[:header_params] || {}
|
|
122
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
123
|
+
|
|
124
|
+
# form parameters
|
|
125
|
+
form_params = opts[:form_params] || {}
|
|
126
|
+
|
|
127
|
+
# http body (model)
|
|
128
|
+
post_body = opts[:debug_body]
|
|
129
|
+
|
|
130
|
+
# return_type
|
|
131
|
+
return_type = opts[:debug_return_type]
|
|
132
|
+
|
|
133
|
+
# auth_names
|
|
134
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
135
|
+
|
|
136
|
+
new_options = opts.merge(
|
|
137
|
+
:operation => :"SecretApi.delete_secret",
|
|
138
|
+
:header_params => header_params,
|
|
139
|
+
:query_params => query_params,
|
|
140
|
+
:form_params => form_params,
|
|
141
|
+
:body => post_body,
|
|
142
|
+
:auth_names => auth_names,
|
|
143
|
+
:return_type => return_type
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
147
|
+
if @api_client.config.debugging
|
|
148
|
+
@api_client.config.logger.debug "API called: SecretApi#delete_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
149
|
+
end
|
|
150
|
+
return data, status_code, headers
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Get secret
|
|
154
|
+
# @param secret_id [String] ID of the secret
|
|
155
|
+
# @param [Hash] opts the optional parameters
|
|
156
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
157
|
+
# @return [Secret]
|
|
158
|
+
def get_secret(secret_id, opts = {})
|
|
159
|
+
data, _status_code, _headers = get_secret_with_http_info(secret_id, opts)
|
|
160
|
+
data
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Get secret
|
|
164
|
+
# @param secret_id [String] ID of the secret
|
|
165
|
+
# @param [Hash] opts the optional parameters
|
|
166
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
167
|
+
# @return [Array<(Secret, Integer, Hash)>] Secret data, response status code and response headers
|
|
168
|
+
def get_secret_with_http_info(secret_id, opts = {})
|
|
169
|
+
if @api_client.config.debugging
|
|
170
|
+
@api_client.config.logger.debug 'Calling API: SecretApi.get_secret ...'
|
|
171
|
+
end
|
|
172
|
+
# verify the required parameter 'secret_id' is set
|
|
173
|
+
if @api_client.config.client_side_validation && secret_id.nil?
|
|
174
|
+
fail ArgumentError, "Missing the required parameter 'secret_id' when calling SecretApi.get_secret"
|
|
175
|
+
end
|
|
176
|
+
# resource path
|
|
177
|
+
local_var_path = '/secret/{secretId}'.sub('{' + 'secretId' + '}', CGI.escape(secret_id.to_s))
|
|
178
|
+
|
|
179
|
+
# query parameters
|
|
180
|
+
query_params = opts[:query_params] || {}
|
|
181
|
+
|
|
182
|
+
# header parameters
|
|
183
|
+
header_params = opts[:header_params] || {}
|
|
184
|
+
# HTTP header 'Accept' (if needed)
|
|
185
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
186
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
187
|
+
|
|
188
|
+
# form parameters
|
|
189
|
+
form_params = opts[:form_params] || {}
|
|
190
|
+
|
|
191
|
+
# http body (model)
|
|
192
|
+
post_body = opts[:debug_body]
|
|
193
|
+
|
|
194
|
+
# return_type
|
|
195
|
+
return_type = opts[:debug_return_type] || 'Secret'
|
|
196
|
+
|
|
197
|
+
# auth_names
|
|
198
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
199
|
+
|
|
200
|
+
new_options = opts.merge(
|
|
201
|
+
:operation => :"SecretApi.get_secret",
|
|
202
|
+
:header_params => header_params,
|
|
203
|
+
:query_params => query_params,
|
|
204
|
+
:form_params => form_params,
|
|
205
|
+
:body => post_body,
|
|
206
|
+
:auth_names => auth_names,
|
|
207
|
+
:return_type => return_type
|
|
208
|
+
)
|
|
209
|
+
|
|
210
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
211
|
+
if @api_client.config.debugging
|
|
212
|
+
@api_client.config.logger.debug "API called: SecretApi#get_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
213
|
+
end
|
|
214
|
+
return data, status_code, headers
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# List secrets
|
|
218
|
+
# @param [Hash] opts the optional parameters
|
|
219
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
220
|
+
# @return [Array<Secret>]
|
|
221
|
+
def list_secrets(opts = {})
|
|
222
|
+
data, _status_code, _headers = list_secrets_with_http_info(opts)
|
|
223
|
+
data
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# List secrets
|
|
227
|
+
# @param [Hash] opts the optional parameters
|
|
228
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
229
|
+
# @return [Array<(Array<Secret>, Integer, Hash)>] Array<Secret> data, response status code and response headers
|
|
230
|
+
def list_secrets_with_http_info(opts = {})
|
|
231
|
+
if @api_client.config.debugging
|
|
232
|
+
@api_client.config.logger.debug 'Calling API: SecretApi.list_secrets ...'
|
|
233
|
+
end
|
|
234
|
+
# resource path
|
|
235
|
+
local_var_path = '/secret'
|
|
236
|
+
|
|
237
|
+
# query parameters
|
|
238
|
+
query_params = opts[:query_params] || {}
|
|
239
|
+
|
|
240
|
+
# header parameters
|
|
241
|
+
header_params = opts[:header_params] || {}
|
|
242
|
+
# HTTP header 'Accept' (if needed)
|
|
243
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
244
|
+
header_params[:'X-Daytona-Organization-ID'] = opts[:'x_daytona_organization_id'] if !opts[:'x_daytona_organization_id'].nil?
|
|
245
|
+
|
|
246
|
+
# form parameters
|
|
247
|
+
form_params = opts[:form_params] || {}
|
|
248
|
+
|
|
249
|
+
# http body (model)
|
|
250
|
+
post_body = opts[:debug_body]
|
|
251
|
+
|
|
252
|
+
# return_type
|
|
253
|
+
return_type = opts[:debug_return_type] || 'Array<Secret>'
|
|
254
|
+
|
|
255
|
+
# auth_names
|
|
256
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
257
|
+
|
|
258
|
+
new_options = opts.merge(
|
|
259
|
+
:operation => :"SecretApi.list_secrets",
|
|
260
|
+
:header_params => header_params,
|
|
261
|
+
:query_params => query_params,
|
|
262
|
+
:form_params => form_params,
|
|
263
|
+
:body => post_body,
|
|
264
|
+
:auth_names => auth_names,
|
|
265
|
+
:return_type => return_type
|
|
266
|
+
)
|
|
267
|
+
|
|
268
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
269
|
+
if @api_client.config.debugging
|
|
270
|
+
@api_client.config.logger.debug "API called: SecretApi#list_secrets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
271
|
+
end
|
|
272
|
+
return data, status_code, headers
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
# Update secret
|
|
276
|
+
# @param secret_id [String] ID of the secret
|
|
277
|
+
# @param update_secret [UpdateSecret]
|
|
278
|
+
# @param [Hash] opts the optional parameters
|
|
279
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
280
|
+
# @return [Secret]
|
|
281
|
+
def update_secret(secret_id, update_secret, opts = {})
|
|
282
|
+
data, _status_code, _headers = update_secret_with_http_info(secret_id, update_secret, opts)
|
|
283
|
+
data
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
# Update secret
|
|
287
|
+
# @param secret_id [String] ID of the secret
|
|
288
|
+
# @param update_secret [UpdateSecret]
|
|
289
|
+
# @param [Hash] opts the optional parameters
|
|
290
|
+
# @option opts [String] :x_daytona_organization_id Use with JWT to specify the organization ID
|
|
291
|
+
# @return [Array<(Secret, Integer, Hash)>] Secret data, response status code and response headers
|
|
292
|
+
def update_secret_with_http_info(secret_id, update_secret, opts = {})
|
|
293
|
+
if @api_client.config.debugging
|
|
294
|
+
@api_client.config.logger.debug 'Calling API: SecretApi.update_secret ...'
|
|
295
|
+
end
|
|
296
|
+
# verify the required parameter 'secret_id' is set
|
|
297
|
+
if @api_client.config.client_side_validation && secret_id.nil?
|
|
298
|
+
fail ArgumentError, "Missing the required parameter 'secret_id' when calling SecretApi.update_secret"
|
|
299
|
+
end
|
|
300
|
+
# verify the required parameter 'update_secret' is set
|
|
301
|
+
if @api_client.config.client_side_validation && update_secret.nil?
|
|
302
|
+
fail ArgumentError, "Missing the required parameter 'update_secret' when calling SecretApi.update_secret"
|
|
303
|
+
end
|
|
304
|
+
# resource path
|
|
305
|
+
local_var_path = '/secret/{secretId}'.sub('{' + 'secretId' + '}', CGI.escape(secret_id.to_s))
|
|
306
|
+
|
|
307
|
+
# query parameters
|
|
308
|
+
query_params = opts[:query_params] || {}
|
|
309
|
+
|
|
310
|
+
# header parameters
|
|
311
|
+
header_params = opts[:header_params] || {}
|
|
312
|
+
# HTTP header 'Accept' (if needed)
|
|
313
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
314
|
+
# HTTP header 'Content-Type'
|
|
315
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
316
|
+
if !content_type.nil?
|
|
317
|
+
header_params['Content-Type'] = content_type
|
|
318
|
+
end
|
|
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] || @api_client.object_to_http_body(update_secret)
|
|
326
|
+
|
|
327
|
+
# return_type
|
|
328
|
+
return_type = opts[:debug_return_type] || 'Secret'
|
|
329
|
+
|
|
330
|
+
# auth_names
|
|
331
|
+
auth_names = opts[:debug_auth_names] || ['bearer', 'oauth2']
|
|
332
|
+
|
|
333
|
+
new_options = opts.merge(
|
|
334
|
+
:operation => :"SecretApi.update_secret",
|
|
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(:PATCH, local_var_path, new_options)
|
|
344
|
+
if @api_client.config.debugging
|
|
345
|
+
@api_client.config.logger.debug "API called: SecretApi#update_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
346
|
+
end
|
|
347
|
+
return data, status_code, headers
|
|
348
|
+
end
|
|
349
|
+
end
|
|
350
|
+
end
|