hatchet-sdk 0.10.0 → 0.11.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/CHANGELOG.md +12 -0
- data/lib/hatchet/clients/grpc/admin.rb +20 -0
- data/lib/hatchet/clients/rest/.openapi-generator/FILES +10 -0
- data/lib/hatchet/clients/rest/README.md +16 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/serverless_api.rb +405 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/streams_api.rb +80 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/api/tenant_api.rb +71 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/rate_limit.rb +14 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/tenant_entitlements.rb +367 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_create_serverless_endpoint_request.rb +411 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_serverless_endpoint.rb +556 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_serverless_endpoint_kind.rb +40 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_serverless_endpoint_list.rb +231 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_serverless_endpoint_status.rb +271 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_stream_topic.rb +343 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_stream_topic_list.rb +292 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/v1_update_serverless_endpoint_request.rb +354 -0
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest/models/workflow.rb +14 -4
- data/lib/hatchet/clients/rest/lib/hatchet-sdk-rest.rb +10 -0
- data/lib/hatchet/context.rb +13 -0
- data/lib/hatchet/contracts/v1/dispatcher_pb.rb +2 -1
- data/lib/hatchet/contracts/workflows/workflows_pb.rb +3 -1
- data/lib/hatchet/contracts/workflows/workflows_services_pb.rb +1 -0
- data/lib/hatchet/features/rate_limits.rb +13 -0
- data/lib/hatchet/version.rb +1 -1
- data/lib/hatchet/worker/durable_event_listener.rb +5 -5
- data/lib/hatchet/worker/received_satisfied_orders.rb +49 -0
- data/lib/hatchet/worker/runner.rb +6 -2
- data/lib/hatchet-sdk.rb +1 -0
- data/sig/hatchet/clients/grpc/admin.rbs +1 -0
- data/sig/hatchet/context.rbs +1 -0
- data/sig/hatchet/features/rate_limits.rbs +1 -0
- data/sig/hatchet/worker/received_satisfied_orders.rbs +11 -0
- metadata +14 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8061a1ca79c9741890e7228b266aba4551c91408c3edede118e8be8e108d73fd
|
|
4
|
+
data.tar.gz: 3878c4f5d3e5c4c270cecd0b54ea08ef47cfbd540fe5e37c58f34211dd5905e0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5cb383edd73867ef24a2bb282963d32e83b1bd92840ca28e946c9b334f2656ca960e59804076cd13c5af3fd2c0d0fe1c7440bd440f5ee88a10a5af55a5f0512a
|
|
7
|
+
data.tar.gz: a03d970376c65133dc0438b4f8315460924676b2bcb4dc5728343d8ec13af00f8417c48a1634f3bde9d1ec31b67100a2d49bcb692ab4a6c91fd1b1a041333ee6
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ All notable changes to Hatchet's Ruby SDK will be documented in this changelog.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.11.1] - 2026-10-23
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- [Durable tasks](https://docs.hatchet.run/v1/durable-tasks) no longer stall after the worker's durable stream reconnects in the middle of a wait. The worker now reports the last completion it received in its status requests, so the engine resumes delivery from there instead of holding later completions until the task is evicted and replayed.
|
|
13
|
+
|
|
14
|
+
## [0.11.0] - 2026-10-14
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- Adds `hatchet.rate_limits.pause(key:, until_time:)` and `Context#pause_rate_limit(key, until_time:)`, which keep queued runs that consume a rate limit key from starting until a given time.
|
|
19
|
+
|
|
8
20
|
## [0.10.0] - 2026-10-08
|
|
9
21
|
|
|
10
22
|
### Added
|
|
@@ -250,6 +250,26 @@ module Hatchet
|
|
|
250
250
|
@v0_stub.put_rate_limit(request, metadata: @config.auth_metadata)
|
|
251
251
|
end
|
|
252
252
|
|
|
253
|
+
# Pause a rate limit key via v0 WorkflowService.
|
|
254
|
+
#
|
|
255
|
+
# @param key [String] Rendered rate limit key
|
|
256
|
+
# @param until_time [Time] Time to pause the key until
|
|
257
|
+
# @return [Time] The time the key is paused until
|
|
258
|
+
def pause_rate_limit(key:, until_time:)
|
|
259
|
+
ensure_connected!
|
|
260
|
+
|
|
261
|
+
until_time = until_time.to_time
|
|
262
|
+
|
|
263
|
+
request = ::PauseRateLimitRequest.new(
|
|
264
|
+
key: key,
|
|
265
|
+
paused_until: Google::Protobuf::Timestamp.new(seconds: until_time.to_i, nanos: until_time.nsec),
|
|
266
|
+
)
|
|
267
|
+
|
|
268
|
+
response = @v0_stub.pause_rate_limit(request, metadata: @config.auth_metadata)
|
|
269
|
+
|
|
270
|
+
Time.at(response.paused_until.seconds, response.paused_until.nanos, :nsec).utc
|
|
271
|
+
end
|
|
272
|
+
|
|
253
273
|
# Close the connection.
|
|
254
274
|
def close
|
|
255
275
|
@v0_stub = nil
|
|
@@ -22,6 +22,7 @@ lib/hatchet-sdk-rest/api/log_api.rb
|
|
|
22
22
|
lib/hatchet-sdk-rest/api/metadata_api.rb
|
|
23
23
|
lib/hatchet-sdk-rest/api/observability_api.rb
|
|
24
24
|
lib/hatchet-sdk-rest/api/rate_limits_api.rb
|
|
25
|
+
lib/hatchet-sdk-rest/api/serverless_api.rb
|
|
25
26
|
lib/hatchet-sdk-rest/api/slack_api.rb
|
|
26
27
|
lib/hatchet-sdk-rest/api/sns_api.rb
|
|
27
28
|
lib/hatchet-sdk-rest/api/step_run_api.rb
|
|
@@ -144,6 +145,7 @@ lib/hatchet-sdk-rest/models/tenant.rb
|
|
|
144
145
|
lib/hatchet-sdk-rest/models/tenant_alert_email_group.rb
|
|
145
146
|
lib/hatchet-sdk-rest/models/tenant_alert_email_group_list.rb
|
|
146
147
|
lib/hatchet-sdk-rest/models/tenant_alerting_settings.rb
|
|
148
|
+
lib/hatchet-sdk-rest/models/tenant_entitlements.rb
|
|
147
149
|
lib/hatchet-sdk-rest/models/tenant_environment.rb
|
|
148
150
|
lib/hatchet-sdk-rest/models/tenant_invite.rb
|
|
149
151
|
lib/hatchet-sdk-rest/models/tenant_invite_list.rb
|
|
@@ -181,6 +183,7 @@ lib/hatchet-sdk-rest/models/v1_cel_debug_request.rb
|
|
|
181
183
|
lib/hatchet-sdk-rest/models/v1_cel_debug_response.rb
|
|
182
184
|
lib/hatchet-sdk-rest/models/v1_cel_debug_response_status.rb
|
|
183
185
|
lib/hatchet-sdk-rest/models/v1_create_filter_request.rb
|
|
186
|
+
lib/hatchet-sdk-rest/models/v1_create_serverless_endpoint_request.rb
|
|
184
187
|
lib/hatchet-sdk-rest/models/v1_create_webhook_request.rb
|
|
185
188
|
lib/hatchet-sdk-rest/models/v1_create_webhook_request_api_key.rb
|
|
186
189
|
lib/hatchet-sdk-rest/models/v1_create_webhook_request_base.rb
|
|
@@ -208,7 +211,13 @@ lib/hatchet-sdk-rest/models/v1_replayed_tasks.rb
|
|
|
208
211
|
lib/hatchet-sdk-rest/models/v1_restore_task_response.rb
|
|
209
212
|
lib/hatchet-sdk-rest/models/v1_running_detail_count.rb
|
|
210
213
|
lib/hatchet-sdk-rest/models/v1_running_filter.rb
|
|
214
|
+
lib/hatchet-sdk-rest/models/v1_serverless_endpoint.rb
|
|
215
|
+
lib/hatchet-sdk-rest/models/v1_serverless_endpoint_kind.rb
|
|
216
|
+
lib/hatchet-sdk-rest/models/v1_serverless_endpoint_list.rb
|
|
217
|
+
lib/hatchet-sdk-rest/models/v1_serverless_endpoint_status.rb
|
|
211
218
|
lib/hatchet-sdk-rest/models/v1_stream_payload_ref.rb
|
|
219
|
+
lib/hatchet-sdk-rest/models/v1_stream_topic.rb
|
|
220
|
+
lib/hatchet-sdk-rest/models/v1_stream_topic_list.rb
|
|
212
221
|
lib/hatchet-sdk-rest/models/v1_task_event.rb
|
|
213
222
|
lib/hatchet-sdk-rest/models/v1_task_event_list.rb
|
|
214
223
|
lib/hatchet-sdk-rest/models/v1_task_event_type.rb
|
|
@@ -224,6 +233,7 @@ lib/hatchet-sdk-rest/models/v1_task_timing.rb
|
|
|
224
233
|
lib/hatchet-sdk-rest/models/v1_task_timing_list.rb
|
|
225
234
|
lib/hatchet-sdk-rest/models/v1_trigger_workflow_run_request.rb
|
|
226
235
|
lib/hatchet-sdk-rest/models/v1_update_filter_request.rb
|
|
236
|
+
lib/hatchet-sdk-rest/models/v1_update_serverless_endpoint_request.rb
|
|
227
237
|
lib/hatchet-sdk-rest/models/v1_update_webhook_request.rb
|
|
228
238
|
lib/hatchet-sdk-rest/models/v1_wait_item.rb
|
|
229
239
|
lib/hatchet-sdk-rest/models/v1_webhook.rb
|
|
@@ -142,6 +142,11 @@ Class | Method | HTTP request | Description
|
|
|
142
142
|
*HatchetSdkRest::SNSApi* | [**sns_create**](docs/SNSApi.md#sns_create) | **POST** /api/v1/tenants/{tenant}/sns | Create SNS integration
|
|
143
143
|
*HatchetSdkRest::SNSApi* | [**sns_delete**](docs/SNSApi.md#sns_delete) | **DELETE** /api/v1/sns/{sns} | Delete SNS integration
|
|
144
144
|
*HatchetSdkRest::SNSApi* | [**sns_list**](docs/SNSApi.md#sns_list) | **GET** /api/v1/tenants/{tenant}/sns | List SNS integrations
|
|
145
|
+
*HatchetSdkRest::ServerlessApi* | [**v1_serverless_endpoint_create**](docs/ServerlessApi.md#v1_serverless_endpoint_create) | **POST** /api/v1/stable/tenants/{tenant}/serverless/endpoints | Create a serverless endpoint
|
|
146
|
+
*HatchetSdkRest::ServerlessApi* | [**v1_serverless_endpoint_delete**](docs/ServerlessApi.md#v1_serverless_endpoint_delete) | **DELETE** /api/v1/stable/serverless/endpoints/{v1-serverless-endpoint} | Delete a serverless endpoint
|
|
147
|
+
*HatchetSdkRest::ServerlessApi* | [**v1_serverless_endpoint_get**](docs/ServerlessApi.md#v1_serverless_endpoint_get) | **GET** /api/v1/stable/serverless/endpoints/{v1-serverless-endpoint} | Get a serverless endpoint
|
|
148
|
+
*HatchetSdkRest::ServerlessApi* | [**v1_serverless_endpoint_list**](docs/ServerlessApi.md#v1_serverless_endpoint_list) | **GET** /api/v1/stable/tenants/{tenant}/serverless/endpoints | List serverless endpoints
|
|
149
|
+
*HatchetSdkRest::ServerlessApi* | [**v1_serverless_endpoint_update**](docs/ServerlessApi.md#v1_serverless_endpoint_update) | **PATCH** /api/v1/stable/serverless/endpoints/{v1-serverless-endpoint} | Update a serverless endpoint
|
|
145
150
|
*HatchetSdkRest::SlackApi* | [**slack_webhook_delete**](docs/SlackApi.md#slack_webhook_delete) | **DELETE** /api/v1/slack/{slack} | Delete Slack webhook
|
|
146
151
|
*HatchetSdkRest::SlackApi* | [**slack_webhook_list**](docs/SlackApi.md#slack_webhook_list) | **GET** /api/v1/tenants/{tenant}/slack | List Slack integrations
|
|
147
152
|
*HatchetSdkRest::StepRunApi* | [**step_run_get**](docs/StepRunApi.md#step_run_get) | **GET** /api/v1/tenants/{tenant}/step-runs/{step-run} | Get step run
|
|
@@ -153,6 +158,7 @@ Class | Method | HTTP request | Description
|
|
|
153
158
|
*HatchetSdkRest::StepRunApi* | [**workflow_run_list_step_run_events**](docs/StepRunApi.md#workflow_run_list_step_run_events) | **GET** /api/v1/tenants/{tenant}/workflow-runs/{workflow-run}/step-run-events | List events for all step runs for a workflow run
|
|
154
159
|
*HatchetSdkRest::StreamsApi* | [**v1_stream_payload_get**](docs/StreamsApi.md#v1_stream_payload_get) | **GET** /api/v1/stable/tenants/{tenant}/streams/payloads | Get stream payload
|
|
155
160
|
*HatchetSdkRest::StreamsApi* | [**v1_stream_payload_upload**](docs/StreamsApi.md#v1_stream_payload_upload) | **POST** /api/v1/stable/tenants/{tenant}/streams/payloads | Upload stream payload
|
|
161
|
+
*HatchetSdkRest::StreamsApi* | [**v1_stream_topic_list**](docs/StreamsApi.md#v1_stream_topic_list) | **GET** /api/v1/stable/tenants/{tenant}/streams/topics | List stream topics
|
|
156
162
|
*HatchetSdkRest::TaskApi* | [**v1_dag_list_tasks**](docs/TaskApi.md#v1_dag_list_tasks) | **GET** /api/v1/stable/dags/tasks | List tasks
|
|
157
163
|
*HatchetSdkRest::TaskApi* | [**v1_task_cancel**](docs/TaskApi.md#v1_task_cancel) | **POST** /api/v1/stable/tenants/{tenant}/tasks/cancel | Cancel tasks
|
|
158
164
|
*HatchetSdkRest::TaskApi* | [**v1_task_event_list**](docs/TaskApi.md#v1_task_event_list) | **GET** /api/v1/stable/tasks/{task}/task-events | List events for a task
|
|
@@ -167,6 +173,7 @@ Class | Method | HTTP request | Description
|
|
|
167
173
|
*HatchetSdkRest::TenantApi* | [**alert_email_group_update**](docs/TenantApi.md#alert_email_group_update) | **PATCH** /api/v1/alerting-email-groups/{alert-email-group} | Update tenant alert email group
|
|
168
174
|
*HatchetSdkRest::TenantApi* | [**tenant_alerting_settings_get**](docs/TenantApi.md#tenant_alerting_settings_get) | **GET** /api/v1/tenants/{tenant}/alerting/settings | Get tenant alerting settings
|
|
169
175
|
*HatchetSdkRest::TenantApi* | [**tenant_create**](docs/TenantApi.md#tenant_create) | **POST** /api/v1/tenants | Create tenant
|
|
176
|
+
*HatchetSdkRest::TenantApi* | [**tenant_entitlements_get**](docs/TenantApi.md#tenant_entitlements_get) | **GET** /api/v1/tenants/{tenant}/entitlements | Get tenant entitlements
|
|
170
177
|
*HatchetSdkRest::TenantApi* | [**tenant_get**](docs/TenantApi.md#tenant_get) | **GET** /api/v1/tenants/{tenant} | Get tenant
|
|
171
178
|
*HatchetSdkRest::TenantApi* | [**tenant_get_prometheus_metrics**](docs/TenantApi.md#tenant_get_prometheus_metrics) | **GET** /api/v1/tenants/{tenant}/prometheus-metrics | Get prometheus metrics
|
|
172
179
|
*HatchetSdkRest::TenantApi* | [**tenant_get_step_run_queue_metrics**](docs/TenantApi.md#tenant_get_step_run_queue_metrics) | **GET** /api/v1/tenants/{tenant}/step-run-queue-metrics | Get step run metrics
|
|
@@ -353,6 +360,7 @@ Class | Method | HTTP request | Description
|
|
|
353
360
|
- [HatchetSdkRest::TenantAlertEmailGroup](docs/TenantAlertEmailGroup.md)
|
|
354
361
|
- [HatchetSdkRest::TenantAlertEmailGroupList](docs/TenantAlertEmailGroupList.md)
|
|
355
362
|
- [HatchetSdkRest::TenantAlertingSettings](docs/TenantAlertingSettings.md)
|
|
363
|
+
- [HatchetSdkRest::TenantEntitlements](docs/TenantEntitlements.md)
|
|
356
364
|
- [HatchetSdkRest::TenantEnvironment](docs/TenantEnvironment.md)
|
|
357
365
|
- [HatchetSdkRest::TenantInvite](docs/TenantInvite.md)
|
|
358
366
|
- [HatchetSdkRest::TenantInviteList](docs/TenantInviteList.md)
|
|
@@ -390,6 +398,7 @@ Class | Method | HTTP request | Description
|
|
|
390
398
|
- [HatchetSdkRest::V1CancelTaskRequest](docs/V1CancelTaskRequest.md)
|
|
391
399
|
- [HatchetSdkRest::V1CancelledTasks](docs/V1CancelledTasks.md)
|
|
392
400
|
- [HatchetSdkRest::V1CreateFilterRequest](docs/V1CreateFilterRequest.md)
|
|
401
|
+
- [HatchetSdkRest::V1CreateServerlessEndpointRequest](docs/V1CreateServerlessEndpointRequest.md)
|
|
393
402
|
- [HatchetSdkRest::V1CreateWebhookRequest](docs/V1CreateWebhookRequest.md)
|
|
394
403
|
- [HatchetSdkRest::V1CreateWebhookRequestAPIKey](docs/V1CreateWebhookRequestAPIKey.md)
|
|
395
404
|
- [HatchetSdkRest::V1CreateWebhookRequestBase](docs/V1CreateWebhookRequestBase.md)
|
|
@@ -417,7 +426,13 @@ Class | Method | HTTP request | Description
|
|
|
417
426
|
- [HatchetSdkRest::V1RestoreTaskResponse](docs/V1RestoreTaskResponse.md)
|
|
418
427
|
- [HatchetSdkRest::V1RunningDetailCount](docs/V1RunningDetailCount.md)
|
|
419
428
|
- [HatchetSdkRest::V1RunningFilter](docs/V1RunningFilter.md)
|
|
429
|
+
- [HatchetSdkRest::V1ServerlessEndpoint](docs/V1ServerlessEndpoint.md)
|
|
430
|
+
- [HatchetSdkRest::V1ServerlessEndpointKind](docs/V1ServerlessEndpointKind.md)
|
|
431
|
+
- [HatchetSdkRest::V1ServerlessEndpointList](docs/V1ServerlessEndpointList.md)
|
|
432
|
+
- [HatchetSdkRest::V1ServerlessEndpointStatus](docs/V1ServerlessEndpointStatus.md)
|
|
420
433
|
- [HatchetSdkRest::V1StreamPayloadRef](docs/V1StreamPayloadRef.md)
|
|
434
|
+
- [HatchetSdkRest::V1StreamTopic](docs/V1StreamTopic.md)
|
|
435
|
+
- [HatchetSdkRest::V1StreamTopicList](docs/V1StreamTopicList.md)
|
|
421
436
|
- [HatchetSdkRest::V1TaskEvent](docs/V1TaskEvent.md)
|
|
422
437
|
- [HatchetSdkRest::V1TaskEventList](docs/V1TaskEventList.md)
|
|
423
438
|
- [HatchetSdkRest::V1TaskEventType](docs/V1TaskEventType.md)
|
|
@@ -433,6 +448,7 @@ Class | Method | HTTP request | Description
|
|
|
433
448
|
- [HatchetSdkRest::V1TaskTimingList](docs/V1TaskTimingList.md)
|
|
434
449
|
- [HatchetSdkRest::V1TriggerWorkflowRunRequest](docs/V1TriggerWorkflowRunRequest.md)
|
|
435
450
|
- [HatchetSdkRest::V1UpdateFilterRequest](docs/V1UpdateFilterRequest.md)
|
|
451
|
+
- [HatchetSdkRest::V1UpdateServerlessEndpointRequest](docs/V1UpdateServerlessEndpointRequest.md)
|
|
436
452
|
- [HatchetSdkRest::V1UpdateWebhookRequest](docs/V1UpdateWebhookRequest.md)
|
|
437
453
|
- [HatchetSdkRest::V1WaitItem](docs/V1WaitItem.md)
|
|
438
454
|
- [HatchetSdkRest::V1Webhook](docs/V1Webhook.md)
|
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Hatchet API
|
|
3
|
+
|
|
4
|
+
#The Hatchet API
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.14.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module HatchetSdkRest
|
|
16
|
+
class ServerlessApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create a serverless endpoint
|
|
23
|
+
# Create a serverless endpoint
|
|
24
|
+
# @param tenant [String] The tenant id
|
|
25
|
+
# @param v1_create_serverless_endpoint_request [V1CreateServerlessEndpointRequest] The input to the serverless endpoint creation
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @return [V1ServerlessEndpoint]
|
|
28
|
+
def v1_serverless_endpoint_create(tenant, v1_create_serverless_endpoint_request, opts = {})
|
|
29
|
+
data, _status_code, _headers = v1_serverless_endpoint_create_with_http_info(tenant, v1_create_serverless_endpoint_request, opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Create a serverless endpoint
|
|
34
|
+
# Create a serverless endpoint
|
|
35
|
+
# @param tenant [String] The tenant id
|
|
36
|
+
# @param v1_create_serverless_endpoint_request [V1CreateServerlessEndpointRequest] The input to the serverless endpoint creation
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @return [Array<(V1ServerlessEndpoint, Integer, Hash)>] V1ServerlessEndpoint data, response status code and response headers
|
|
39
|
+
def v1_serverless_endpoint_create_with_http_info(tenant, v1_create_serverless_endpoint_request, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: ServerlessApi.v1_serverless_endpoint_create ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'tenant' is set
|
|
44
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling ServerlessApi.v1_serverless_endpoint_create"
|
|
46
|
+
end
|
|
47
|
+
if @api_client.config.client_side_validation && tenant.to_s.length > 36
|
|
48
|
+
fail ArgumentError, 'invalid value for "tenant" when calling ServerlessApi.v1_serverless_endpoint_create, the character length must be smaller than or equal to 36.'
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
if @api_client.config.client_side_validation && tenant.to_s.length < 36
|
|
52
|
+
fail ArgumentError, 'invalid value for "tenant" when calling ServerlessApi.v1_serverless_endpoint_create, the character length must be greater than or equal to 36.'
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# verify the required parameter 'v1_create_serverless_endpoint_request' is set
|
|
56
|
+
if @api_client.config.client_side_validation && v1_create_serverless_endpoint_request.nil?
|
|
57
|
+
fail ArgumentError, "Missing the required parameter 'v1_create_serverless_endpoint_request' when calling ServerlessApi.v1_serverless_endpoint_create"
|
|
58
|
+
end
|
|
59
|
+
# resource path
|
|
60
|
+
local_var_path = '/api/v1/stable/tenants/{tenant}/serverless/endpoints'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s))
|
|
61
|
+
|
|
62
|
+
# query parameters
|
|
63
|
+
query_params = opts[:query_params] || {}
|
|
64
|
+
|
|
65
|
+
# header parameters
|
|
66
|
+
header_params = opts[:header_params] || {}
|
|
67
|
+
# HTTP header 'Accept' (if needed)
|
|
68
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
69
|
+
# HTTP header 'Content-Type'
|
|
70
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
71
|
+
if !content_type.nil?
|
|
72
|
+
header_params['Content-Type'] = content_type
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# form parameters
|
|
76
|
+
form_params = opts[:form_params] || {}
|
|
77
|
+
|
|
78
|
+
# http body (model)
|
|
79
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(v1_create_serverless_endpoint_request)
|
|
80
|
+
|
|
81
|
+
# return_type
|
|
82
|
+
return_type = opts[:debug_return_type] || 'V1ServerlessEndpoint'
|
|
83
|
+
|
|
84
|
+
# auth_names
|
|
85
|
+
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
|
|
86
|
+
|
|
87
|
+
new_options = opts.merge(
|
|
88
|
+
:operation => :"ServerlessApi.v1_serverless_endpoint_create",
|
|
89
|
+
:header_params => header_params,
|
|
90
|
+
:query_params => query_params,
|
|
91
|
+
:form_params => form_params,
|
|
92
|
+
:body => post_body,
|
|
93
|
+
:auth_names => auth_names,
|
|
94
|
+
:return_type => return_type
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
98
|
+
if @api_client.config.debugging
|
|
99
|
+
@api_client.config.logger.debug "API called: ServerlessApi#v1_serverless_endpoint_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
100
|
+
end
|
|
101
|
+
return data, status_code, headers
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Delete a serverless endpoint
|
|
105
|
+
# Delete a serverless endpoint
|
|
106
|
+
# @param v1_serverless_endpoint [String] The id of the serverless endpoint to delete
|
|
107
|
+
# @param [Hash] opts the optional parameters
|
|
108
|
+
# @return [V1ServerlessEndpoint]
|
|
109
|
+
def v1_serverless_endpoint_delete(v1_serverless_endpoint, opts = {})
|
|
110
|
+
data, _status_code, _headers = v1_serverless_endpoint_delete_with_http_info(v1_serverless_endpoint, opts)
|
|
111
|
+
data
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Delete a serverless endpoint
|
|
115
|
+
# Delete a serverless endpoint
|
|
116
|
+
# @param v1_serverless_endpoint [String] The id of the serverless endpoint to delete
|
|
117
|
+
# @param [Hash] opts the optional parameters
|
|
118
|
+
# @return [Array<(V1ServerlessEndpoint, Integer, Hash)>] V1ServerlessEndpoint data, response status code and response headers
|
|
119
|
+
def v1_serverless_endpoint_delete_with_http_info(v1_serverless_endpoint, opts = {})
|
|
120
|
+
if @api_client.config.debugging
|
|
121
|
+
@api_client.config.logger.debug 'Calling API: ServerlessApi.v1_serverless_endpoint_delete ...'
|
|
122
|
+
end
|
|
123
|
+
# verify the required parameter 'v1_serverless_endpoint' is set
|
|
124
|
+
if @api_client.config.client_side_validation && v1_serverless_endpoint.nil?
|
|
125
|
+
fail ArgumentError, "Missing the required parameter 'v1_serverless_endpoint' when calling ServerlessApi.v1_serverless_endpoint_delete"
|
|
126
|
+
end
|
|
127
|
+
if @api_client.config.client_side_validation && v1_serverless_endpoint.to_s.length > 36
|
|
128
|
+
fail ArgumentError, 'invalid value for "v1_serverless_endpoint" when calling ServerlessApi.v1_serverless_endpoint_delete, the character length must be smaller than or equal to 36.'
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if @api_client.config.client_side_validation && v1_serverless_endpoint.to_s.length < 36
|
|
132
|
+
fail ArgumentError, 'invalid value for "v1_serverless_endpoint" when calling ServerlessApi.v1_serverless_endpoint_delete, the character length must be greater than or equal to 36.'
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# resource path
|
|
136
|
+
local_var_path = '/api/v1/stable/serverless/endpoints/{v1-serverless-endpoint}'.sub('{' + 'v1-serverless-endpoint' + '}', CGI.escape(v1_serverless_endpoint.to_s))
|
|
137
|
+
|
|
138
|
+
# query parameters
|
|
139
|
+
query_params = opts[:query_params] || {}
|
|
140
|
+
|
|
141
|
+
# header parameters
|
|
142
|
+
header_params = opts[:header_params] || {}
|
|
143
|
+
# HTTP header 'Accept' (if needed)
|
|
144
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
145
|
+
|
|
146
|
+
# form parameters
|
|
147
|
+
form_params = opts[:form_params] || {}
|
|
148
|
+
|
|
149
|
+
# http body (model)
|
|
150
|
+
post_body = opts[:debug_body]
|
|
151
|
+
|
|
152
|
+
# return_type
|
|
153
|
+
return_type = opts[:debug_return_type] || 'V1ServerlessEndpoint'
|
|
154
|
+
|
|
155
|
+
# auth_names
|
|
156
|
+
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
|
|
157
|
+
|
|
158
|
+
new_options = opts.merge(
|
|
159
|
+
:operation => :"ServerlessApi.v1_serverless_endpoint_delete",
|
|
160
|
+
:header_params => header_params,
|
|
161
|
+
:query_params => query_params,
|
|
162
|
+
:form_params => form_params,
|
|
163
|
+
:body => post_body,
|
|
164
|
+
:auth_names => auth_names,
|
|
165
|
+
:return_type => return_type
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
169
|
+
if @api_client.config.debugging
|
|
170
|
+
@api_client.config.logger.debug "API called: ServerlessApi#v1_serverless_endpoint_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
171
|
+
end
|
|
172
|
+
return data, status_code, headers
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Get a serverless endpoint
|
|
176
|
+
# Get a serverless endpoint by its id
|
|
177
|
+
# @param v1_serverless_endpoint [String] The serverless endpoint id
|
|
178
|
+
# @param [Hash] opts the optional parameters
|
|
179
|
+
# @return [V1ServerlessEndpoint]
|
|
180
|
+
def v1_serverless_endpoint_get(v1_serverless_endpoint, opts = {})
|
|
181
|
+
data, _status_code, _headers = v1_serverless_endpoint_get_with_http_info(v1_serverless_endpoint, opts)
|
|
182
|
+
data
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Get a serverless endpoint
|
|
186
|
+
# Get a serverless endpoint by its id
|
|
187
|
+
# @param v1_serverless_endpoint [String] The serverless endpoint id
|
|
188
|
+
# @param [Hash] opts the optional parameters
|
|
189
|
+
# @return [Array<(V1ServerlessEndpoint, Integer, Hash)>] V1ServerlessEndpoint data, response status code and response headers
|
|
190
|
+
def v1_serverless_endpoint_get_with_http_info(v1_serverless_endpoint, opts = {})
|
|
191
|
+
if @api_client.config.debugging
|
|
192
|
+
@api_client.config.logger.debug 'Calling API: ServerlessApi.v1_serverless_endpoint_get ...'
|
|
193
|
+
end
|
|
194
|
+
# verify the required parameter 'v1_serverless_endpoint' is set
|
|
195
|
+
if @api_client.config.client_side_validation && v1_serverless_endpoint.nil?
|
|
196
|
+
fail ArgumentError, "Missing the required parameter 'v1_serverless_endpoint' when calling ServerlessApi.v1_serverless_endpoint_get"
|
|
197
|
+
end
|
|
198
|
+
if @api_client.config.client_side_validation && v1_serverless_endpoint.to_s.length > 36
|
|
199
|
+
fail ArgumentError, 'invalid value for "v1_serverless_endpoint" when calling ServerlessApi.v1_serverless_endpoint_get, the character length must be smaller than or equal to 36.'
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
if @api_client.config.client_side_validation && v1_serverless_endpoint.to_s.length < 36
|
|
203
|
+
fail ArgumentError, 'invalid value for "v1_serverless_endpoint" when calling ServerlessApi.v1_serverless_endpoint_get, the character length must be greater than or equal to 36.'
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# resource path
|
|
207
|
+
local_var_path = '/api/v1/stable/serverless/endpoints/{v1-serverless-endpoint}'.sub('{' + 'v1-serverless-endpoint' + '}', CGI.escape(v1_serverless_endpoint.to_s))
|
|
208
|
+
|
|
209
|
+
# query parameters
|
|
210
|
+
query_params = opts[:query_params] || {}
|
|
211
|
+
|
|
212
|
+
# header parameters
|
|
213
|
+
header_params = opts[:header_params] || {}
|
|
214
|
+
# HTTP header 'Accept' (if needed)
|
|
215
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
216
|
+
|
|
217
|
+
# form parameters
|
|
218
|
+
form_params = opts[:form_params] || {}
|
|
219
|
+
|
|
220
|
+
# http body (model)
|
|
221
|
+
post_body = opts[:debug_body]
|
|
222
|
+
|
|
223
|
+
# return_type
|
|
224
|
+
return_type = opts[:debug_return_type] || 'V1ServerlessEndpoint'
|
|
225
|
+
|
|
226
|
+
# auth_names
|
|
227
|
+
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
|
|
228
|
+
|
|
229
|
+
new_options = opts.merge(
|
|
230
|
+
:operation => :"ServerlessApi.v1_serverless_endpoint_get",
|
|
231
|
+
:header_params => header_params,
|
|
232
|
+
:query_params => query_params,
|
|
233
|
+
:form_params => form_params,
|
|
234
|
+
:body => post_body,
|
|
235
|
+
:auth_names => auth_names,
|
|
236
|
+
:return_type => return_type
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
240
|
+
if @api_client.config.debugging
|
|
241
|
+
@api_client.config.logger.debug "API called: ServerlessApi#v1_serverless_endpoint_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
242
|
+
end
|
|
243
|
+
return data, status_code, headers
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
# List serverless endpoints
|
|
247
|
+
# Lists the serverless endpoints of a tenant.
|
|
248
|
+
# @param tenant [String] The tenant id
|
|
249
|
+
# @param [Hash] opts the optional parameters
|
|
250
|
+
# @option opts [Integer] :offset The number to skip
|
|
251
|
+
# @option opts [Integer] :limit The number to limit by
|
|
252
|
+
# @return [V1ServerlessEndpointList]
|
|
253
|
+
def v1_serverless_endpoint_list(tenant, opts = {})
|
|
254
|
+
data, _status_code, _headers = v1_serverless_endpoint_list_with_http_info(tenant, opts)
|
|
255
|
+
data
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
# List serverless endpoints
|
|
259
|
+
# Lists the serverless endpoints of a tenant.
|
|
260
|
+
# @param tenant [String] The tenant id
|
|
261
|
+
# @param [Hash] opts the optional parameters
|
|
262
|
+
# @option opts [Integer] :offset The number to skip
|
|
263
|
+
# @option opts [Integer] :limit The number to limit by
|
|
264
|
+
# @return [Array<(V1ServerlessEndpointList, Integer, Hash)>] V1ServerlessEndpointList data, response status code and response headers
|
|
265
|
+
def v1_serverless_endpoint_list_with_http_info(tenant, opts = {})
|
|
266
|
+
if @api_client.config.debugging
|
|
267
|
+
@api_client.config.logger.debug 'Calling API: ServerlessApi.v1_serverless_endpoint_list ...'
|
|
268
|
+
end
|
|
269
|
+
# verify the required parameter 'tenant' is set
|
|
270
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
271
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling ServerlessApi.v1_serverless_endpoint_list"
|
|
272
|
+
end
|
|
273
|
+
if @api_client.config.client_side_validation && tenant.to_s.length > 36
|
|
274
|
+
fail ArgumentError, 'invalid value for "tenant" when calling ServerlessApi.v1_serverless_endpoint_list, the character length must be smaller than or equal to 36.'
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
if @api_client.config.client_side_validation && tenant.to_s.length < 36
|
|
278
|
+
fail ArgumentError, 'invalid value for "tenant" when calling ServerlessApi.v1_serverless_endpoint_list, the character length must be greater than or equal to 36.'
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# resource path
|
|
282
|
+
local_var_path = '/api/v1/stable/tenants/{tenant}/serverless/endpoints'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s))
|
|
283
|
+
|
|
284
|
+
# query parameters
|
|
285
|
+
query_params = opts[:query_params] || {}
|
|
286
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
287
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
288
|
+
|
|
289
|
+
# header parameters
|
|
290
|
+
header_params = opts[:header_params] || {}
|
|
291
|
+
# HTTP header 'Accept' (if needed)
|
|
292
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
293
|
+
|
|
294
|
+
# form parameters
|
|
295
|
+
form_params = opts[:form_params] || {}
|
|
296
|
+
|
|
297
|
+
# http body (model)
|
|
298
|
+
post_body = opts[:debug_body]
|
|
299
|
+
|
|
300
|
+
# return_type
|
|
301
|
+
return_type = opts[:debug_return_type] || 'V1ServerlessEndpointList'
|
|
302
|
+
|
|
303
|
+
# auth_names
|
|
304
|
+
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
|
|
305
|
+
|
|
306
|
+
new_options = opts.merge(
|
|
307
|
+
:operation => :"ServerlessApi.v1_serverless_endpoint_list",
|
|
308
|
+
:header_params => header_params,
|
|
309
|
+
:query_params => query_params,
|
|
310
|
+
:form_params => form_params,
|
|
311
|
+
:body => post_body,
|
|
312
|
+
:auth_names => auth_names,
|
|
313
|
+
:return_type => return_type
|
|
314
|
+
)
|
|
315
|
+
|
|
316
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
317
|
+
if @api_client.config.debugging
|
|
318
|
+
@api_client.config.logger.debug "API called: ServerlessApi#v1_serverless_endpoint_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
319
|
+
end
|
|
320
|
+
return data, status_code, headers
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
# Update a serverless endpoint
|
|
324
|
+
# Update a serverless endpoint
|
|
325
|
+
# @param v1_serverless_endpoint [String] The id of the serverless endpoint to update
|
|
326
|
+
# @param v1_update_serverless_endpoint_request [V1UpdateServerlessEndpointRequest] The fields to update on the serverless endpoint
|
|
327
|
+
# @param [Hash] opts the optional parameters
|
|
328
|
+
# @return [V1ServerlessEndpoint]
|
|
329
|
+
def v1_serverless_endpoint_update(v1_serverless_endpoint, v1_update_serverless_endpoint_request, opts = {})
|
|
330
|
+
data, _status_code, _headers = v1_serverless_endpoint_update_with_http_info(v1_serverless_endpoint, v1_update_serverless_endpoint_request, opts)
|
|
331
|
+
data
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
# Update a serverless endpoint
|
|
335
|
+
# Update a serverless endpoint
|
|
336
|
+
# @param v1_serverless_endpoint [String] The id of the serverless endpoint to update
|
|
337
|
+
# @param v1_update_serverless_endpoint_request [V1UpdateServerlessEndpointRequest] The fields to update on the serverless endpoint
|
|
338
|
+
# @param [Hash] opts the optional parameters
|
|
339
|
+
# @return [Array<(V1ServerlessEndpoint, Integer, Hash)>] V1ServerlessEndpoint data, response status code and response headers
|
|
340
|
+
def v1_serverless_endpoint_update_with_http_info(v1_serverless_endpoint, v1_update_serverless_endpoint_request, opts = {})
|
|
341
|
+
if @api_client.config.debugging
|
|
342
|
+
@api_client.config.logger.debug 'Calling API: ServerlessApi.v1_serverless_endpoint_update ...'
|
|
343
|
+
end
|
|
344
|
+
# verify the required parameter 'v1_serverless_endpoint' is set
|
|
345
|
+
if @api_client.config.client_side_validation && v1_serverless_endpoint.nil?
|
|
346
|
+
fail ArgumentError, "Missing the required parameter 'v1_serverless_endpoint' when calling ServerlessApi.v1_serverless_endpoint_update"
|
|
347
|
+
end
|
|
348
|
+
if @api_client.config.client_side_validation && v1_serverless_endpoint.to_s.length > 36
|
|
349
|
+
fail ArgumentError, 'invalid value for "v1_serverless_endpoint" when calling ServerlessApi.v1_serverless_endpoint_update, the character length must be smaller than or equal to 36.'
|
|
350
|
+
end
|
|
351
|
+
|
|
352
|
+
if @api_client.config.client_side_validation && v1_serverless_endpoint.to_s.length < 36
|
|
353
|
+
fail ArgumentError, 'invalid value for "v1_serverless_endpoint" when calling ServerlessApi.v1_serverless_endpoint_update, the character length must be greater than or equal to 36.'
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
# verify the required parameter 'v1_update_serverless_endpoint_request' is set
|
|
357
|
+
if @api_client.config.client_side_validation && v1_update_serverless_endpoint_request.nil?
|
|
358
|
+
fail ArgumentError, "Missing the required parameter 'v1_update_serverless_endpoint_request' when calling ServerlessApi.v1_serverless_endpoint_update"
|
|
359
|
+
end
|
|
360
|
+
# resource path
|
|
361
|
+
local_var_path = '/api/v1/stable/serverless/endpoints/{v1-serverless-endpoint}'.sub('{' + 'v1-serverless-endpoint' + '}', CGI.escape(v1_serverless_endpoint.to_s))
|
|
362
|
+
|
|
363
|
+
# query parameters
|
|
364
|
+
query_params = opts[:query_params] || {}
|
|
365
|
+
|
|
366
|
+
# header parameters
|
|
367
|
+
header_params = opts[:header_params] || {}
|
|
368
|
+
# HTTP header 'Accept' (if needed)
|
|
369
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
370
|
+
# HTTP header 'Content-Type'
|
|
371
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
372
|
+
if !content_type.nil?
|
|
373
|
+
header_params['Content-Type'] = content_type
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
# form parameters
|
|
377
|
+
form_params = opts[:form_params] || {}
|
|
378
|
+
|
|
379
|
+
# http body (model)
|
|
380
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(v1_update_serverless_endpoint_request)
|
|
381
|
+
|
|
382
|
+
# return_type
|
|
383
|
+
return_type = opts[:debug_return_type] || 'V1ServerlessEndpoint'
|
|
384
|
+
|
|
385
|
+
# auth_names
|
|
386
|
+
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
|
|
387
|
+
|
|
388
|
+
new_options = opts.merge(
|
|
389
|
+
:operation => :"ServerlessApi.v1_serverless_endpoint_update",
|
|
390
|
+
:header_params => header_params,
|
|
391
|
+
:query_params => query_params,
|
|
392
|
+
:form_params => form_params,
|
|
393
|
+
:body => post_body,
|
|
394
|
+
:auth_names => auth_names,
|
|
395
|
+
:return_type => return_type
|
|
396
|
+
)
|
|
397
|
+
|
|
398
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
399
|
+
if @api_client.config.debugging
|
|
400
|
+
@api_client.config.logger.debug "API called: ServerlessApi#v1_serverless_endpoint_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
401
|
+
end
|
|
402
|
+
return data, status_code, headers
|
|
403
|
+
end
|
|
404
|
+
end
|
|
405
|
+
end
|
|
@@ -179,5 +179,85 @@ module HatchetSdkRest
|
|
|
179
179
|
end
|
|
180
180
|
return data, status_code, headers
|
|
181
181
|
end
|
|
182
|
+
|
|
183
|
+
# List stream topics
|
|
184
|
+
# List the tenant's durable stream topics, with the number of messages each has within the tenant's retention.
|
|
185
|
+
# @param tenant [String] The tenant id
|
|
186
|
+
# @param [Hash] opts the optional parameters
|
|
187
|
+
# @option opts [Integer] :offset The number to skip
|
|
188
|
+
# @option opts [Integer] :limit The number to limit by
|
|
189
|
+
# @option opts [String] :search Matches topics or namespaces containing it
|
|
190
|
+
# @return [V1StreamTopicList]
|
|
191
|
+
def v1_stream_topic_list(tenant, opts = {})
|
|
192
|
+
data, _status_code, _headers = v1_stream_topic_list_with_http_info(tenant, opts)
|
|
193
|
+
data
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# List stream topics
|
|
197
|
+
# List the tenant's durable stream topics, with the number of messages each has within the tenant's retention.
|
|
198
|
+
# @param tenant [String] The tenant id
|
|
199
|
+
# @param [Hash] opts the optional parameters
|
|
200
|
+
# @option opts [Integer] :offset The number to skip
|
|
201
|
+
# @option opts [Integer] :limit The number to limit by
|
|
202
|
+
# @option opts [String] :search Matches topics or namespaces containing it
|
|
203
|
+
# @return [Array<(V1StreamTopicList, Integer, Hash)>] V1StreamTopicList data, response status code and response headers
|
|
204
|
+
def v1_stream_topic_list_with_http_info(tenant, opts = {})
|
|
205
|
+
if @api_client.config.debugging
|
|
206
|
+
@api_client.config.logger.debug 'Calling API: StreamsApi.v1_stream_topic_list ...'
|
|
207
|
+
end
|
|
208
|
+
# verify the required parameter 'tenant' is set
|
|
209
|
+
if @api_client.config.client_side_validation && tenant.nil?
|
|
210
|
+
fail ArgumentError, "Missing the required parameter 'tenant' when calling StreamsApi.v1_stream_topic_list"
|
|
211
|
+
end
|
|
212
|
+
if @api_client.config.client_side_validation && tenant.to_s.length > 36
|
|
213
|
+
fail ArgumentError, 'invalid value for "tenant" when calling StreamsApi.v1_stream_topic_list, the character length must be smaller than or equal to 36.'
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
if @api_client.config.client_side_validation && tenant.to_s.length < 36
|
|
217
|
+
fail ArgumentError, 'invalid value for "tenant" when calling StreamsApi.v1_stream_topic_list, the character length must be greater than or equal to 36.'
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# resource path
|
|
221
|
+
local_var_path = '/api/v1/stable/tenants/{tenant}/streams/topics'.sub('{' + 'tenant' + '}', CGI.escape(tenant.to_s))
|
|
222
|
+
|
|
223
|
+
# query parameters
|
|
224
|
+
query_params = opts[:query_params] || {}
|
|
225
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
226
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
227
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
228
|
+
|
|
229
|
+
# header parameters
|
|
230
|
+
header_params = opts[:header_params] || {}
|
|
231
|
+
# HTTP header 'Accept' (if needed)
|
|
232
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
233
|
+
|
|
234
|
+
# form parameters
|
|
235
|
+
form_params = opts[:form_params] || {}
|
|
236
|
+
|
|
237
|
+
# http body (model)
|
|
238
|
+
post_body = opts[:debug_body]
|
|
239
|
+
|
|
240
|
+
# return_type
|
|
241
|
+
return_type = opts[:debug_return_type] || 'V1StreamTopicList'
|
|
242
|
+
|
|
243
|
+
# auth_names
|
|
244
|
+
auth_names = opts[:debug_auth_names] || ['cookieAuth', 'bearerAuth']
|
|
245
|
+
|
|
246
|
+
new_options = opts.merge(
|
|
247
|
+
:operation => :"StreamsApi.v1_stream_topic_list",
|
|
248
|
+
:header_params => header_params,
|
|
249
|
+
:query_params => query_params,
|
|
250
|
+
:form_params => form_params,
|
|
251
|
+
:body => post_body,
|
|
252
|
+
:auth_names => auth_names,
|
|
253
|
+
:return_type => return_type
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
257
|
+
if @api_client.config.debugging
|
|
258
|
+
@api_client.config.logger.debug "API called: StreamsApi#v1_stream_topic_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
259
|
+
end
|
|
260
|
+
return data, status_code, headers
|
|
261
|
+
end
|
|
182
262
|
end
|
|
183
263
|
end
|