hatchet-sdk 0.40.0a9__py3-none-any.whl → 0.41.0__py3-none-any.whl
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.
Potentially problematic release.
This version of hatchet-sdk might be problematic. Click here for more details.
- hatchet_sdk/clients/admin.py +129 -59
- hatchet_sdk/clients/dispatcher/action_listener.py +25 -2
- hatchet_sdk/clients/events.py +91 -52
- hatchet_sdk/clients/rest/__init__.py +21 -0
- hatchet_sdk/clients/rest/api/api_token_api.py +12 -9
- hatchet_sdk/clients/rest/api/default_api.py +24 -18
- hatchet_sdk/clients/rest/api/event_api.py +32 -24
- hatchet_sdk/clients/rest/api/github_api.py +4 -3
- hatchet_sdk/clients/rest/api/log_api.py +4 -3
- hatchet_sdk/clients/rest/api/metadata_api.py +12 -9
- hatchet_sdk/clients/rest/api/rate_limits_api.py +7 -4
- hatchet_sdk/clients/rest/api/slack_api.py +8 -6
- hatchet_sdk/clients/rest/api/sns_api.py +12 -9
- hatchet_sdk/clients/rest/api/step_run_api.py +28 -21
- hatchet_sdk/clients/rest/api/tenant_api.py +67 -49
- hatchet_sdk/clients/rest/api/user_api.py +24 -18
- hatchet_sdk/clients/rest/api/worker_api.py +12 -9
- hatchet_sdk/clients/rest/api/workflow_api.py +3073 -936
- hatchet_sdk/clients/rest/api/workflow_run_api.py +669 -21
- hatchet_sdk/clients/rest/api_client.py +34 -11
- hatchet_sdk/clients/rest/configuration.py +161 -36
- hatchet_sdk/clients/rest/models/__init__.py +21 -0
- hatchet_sdk/clients/rest/models/api_errors.py +3 -3
- hatchet_sdk/clients/rest/models/bulk_create_event_request.py +3 -3
- hatchet_sdk/clients/rest/models/bulk_create_event_response.py +3 -3
- hatchet_sdk/clients/{cloud_rest/models/managed_worker_create_request_build_config_steps_inner.py → rest/models/create_cron_workflow_trigger_request.py} +18 -14
- hatchet_sdk/clients/{cloud_rest/models/github_app_list_installations200_response_rows_inner.py → rest/models/cron_workflows.py} +54 -21
- hatchet_sdk/clients/{cloud_rest/models/log_list200_response.py → rest/models/cron_workflows_list.py} +13 -22
- hatchet_sdk/clients/rest/models/cron_workflows_order_by_field.py +37 -0
- hatchet_sdk/clients/rest/models/event_list.py +3 -3
- hatchet_sdk/clients/rest/models/get_step_run_diff_response.py +3 -3
- hatchet_sdk/clients/rest/models/job.py +3 -3
- hatchet_sdk/clients/rest/models/job_run.py +3 -3
- hatchet_sdk/clients/rest/models/list_api_tokens_response.py +3 -3
- hatchet_sdk/clients/rest/models/list_pull_requests_response.py +3 -3
- hatchet_sdk/clients/rest/models/list_slack_webhooks.py +3 -3
- hatchet_sdk/clients/rest/models/list_sns_integrations.py +3 -3
- hatchet_sdk/clients/rest/models/log_line_list.py +3 -3
- hatchet_sdk/clients/rest/models/rate_limit_list.py +3 -3
- hatchet_sdk/clients/rest/models/replay_workflow_runs_response.py +3 -3
- hatchet_sdk/clients/{cloud_rest/models/log_list200_response_rows_inner.py → rest/models/schedule_workflow_run_request.py} +12 -12
- hatchet_sdk/clients/rest/models/scheduled_run_status.py +42 -0
- hatchet_sdk/clients/rest/models/scheduled_workflows.py +153 -0
- hatchet_sdk/clients/{cloud_rest/models/managed_worker_list200_response.py → rest/models/scheduled_workflows_list.py} +13 -22
- hatchet_sdk/clients/rest/models/scheduled_workflows_order_by_field.py +37 -0
- hatchet_sdk/clients/rest/models/step_run_archive_list.py +3 -3
- hatchet_sdk/clients/rest/models/step_run_event_list.py +3 -3
- hatchet_sdk/clients/rest/models/tenant_alert_email_group_list.py +3 -3
- hatchet_sdk/clients/rest/models/tenant_invite_list.py +3 -3
- hatchet_sdk/clients/rest/models/tenant_list.py +3 -3
- hatchet_sdk/clients/rest/models/tenant_member_list.py +3 -3
- hatchet_sdk/clients/rest/models/tenant_queue_metrics.py +16 -0
- hatchet_sdk/clients/rest/models/tenant_resource_policy.py +3 -3
- hatchet_sdk/clients/rest/models/tenant_step_run_queue_metrics.py +1 -1
- hatchet_sdk/clients/rest/models/user_tenant_memberships_list.py +3 -3
- hatchet_sdk/clients/rest/models/webhook_worker_list_response.py +3 -3
- hatchet_sdk/clients/rest/models/webhook_worker_request_list_response.py +3 -3
- hatchet_sdk/clients/rest/models/worker.py +20 -9
- hatchet_sdk/clients/rest/models/worker_list.py +3 -3
- hatchet_sdk/clients/{cloud_rest/models/tenant_billing_state_get200_response_payment_methods_inner.py → rest/models/worker_runtime_info.py} +23 -19
- hatchet_sdk/clients/rest/models/worker_runtime_sdks.py +38 -0
- hatchet_sdk/clients/rest/models/workflow.py +9 -9
- hatchet_sdk/clients/rest/models/workflow_list.py +3 -3
- hatchet_sdk/clients/rest/models/workflow_run.py +3 -3
- hatchet_sdk/clients/rest/models/workflow_run_list.py +3 -3
- hatchet_sdk/clients/rest/models/workflow_run_shape.py +3 -3
- hatchet_sdk/clients/rest/models/workflow_runs_metrics.py +1 -5
- hatchet_sdk/clients/rest/models/workflow_triggers.py +6 -6
- hatchet_sdk/clients/rest/models/workflow_version.py +3 -3
- hatchet_sdk/clients/rest/rest.py +3 -3
- hatchet_sdk/clients/rest_client.py +200 -21
- hatchet_sdk/contracts/dispatcher_pb2.pyi +2 -0
- hatchet_sdk/contracts/events_pb2.pyi +2 -0
- hatchet_sdk/contracts/workflows_pb2.pyi +2 -0
- hatchet_sdk/features/cron.py +286 -0
- hatchet_sdk/features/scheduled.py +248 -0
- hatchet_sdk/hatchet.py +71 -79
- hatchet_sdk/loader.py +37 -14
- hatchet_sdk/utils/serialization.py +15 -0
- hatchet_sdk/utils/tracing.py +67 -0
- hatchet_sdk/worker/runner/runner.py +158 -112
- hatchet_sdk/worker/worker.py +1 -17
- {hatchet_sdk-0.40.0a9.dist-info → hatchet_sdk-0.41.0.dist-info}/METADATA +8 -2
- {hatchet_sdk-0.40.0a9.dist-info → hatchet_sdk-0.41.0.dist-info}/RECORD +86 -140
- {hatchet_sdk-0.40.0a9.dist-info → hatchet_sdk-0.41.0.dist-info}/entry_points.txt +0 -1
- hatchet_sdk/clients/cloud_rest/__init__.py +0 -186
- hatchet_sdk/clients/cloud_rest/api/__init__.py +0 -14
- hatchet_sdk/clients/cloud_rest/api/billing_api.py +0 -819
- hatchet_sdk/clients/cloud_rest/api/build_api.py +0 -298
- hatchet_sdk/clients/cloud_rest/api/feature_flags_api.py +0 -295
- hatchet_sdk/clients/cloud_rest/api/github_api.py +0 -1347
- hatchet_sdk/clients/cloud_rest/api/log_api.py +0 -971
- hatchet_sdk/clients/cloud_rest/api/managed_worker_api.py +0 -2546
- hatchet_sdk/clients/cloud_rest/api/metadata_api.py +0 -265
- hatchet_sdk/clients/cloud_rest/api/metrics_api.py +0 -1026
- hatchet_sdk/clients/cloud_rest/api/tenant_api.py +0 -301
- hatchet_sdk/clients/cloud_rest/api/user_api.py +0 -473
- hatchet_sdk/clients/cloud_rest/api/workflow_api.py +0 -369
- hatchet_sdk/clients/cloud_rest/api_client.py +0 -727
- hatchet_sdk/clients/cloud_rest/api_response.py +0 -22
- hatchet_sdk/clients/cloud_rest/configuration.py +0 -488
- hatchet_sdk/clients/cloud_rest/exceptions.py +0 -200
- hatchet_sdk/clients/cloud_rest/models/__init__.py +0 -157
- hatchet_sdk/clients/cloud_rest/models/billing_portal_link_get200_response.py +0 -85
- hatchet_sdk/clients/cloud_rest/models/build_get200_response.py +0 -121
- hatchet_sdk/clients/cloud_rest/models/github_app_list_branches200_response_inner.py +0 -86
- hatchet_sdk/clients/cloud_rest/models/github_app_list_installations200_response.py +0 -119
- hatchet_sdk/clients/cloud_rest/models/github_app_list_installations200_response_pagination.py +0 -95
- hatchet_sdk/clients/cloud_rest/models/github_app_list_installations200_response_rows_inner_metadata.py +0 -98
- hatchet_sdk/clients/cloud_rest/models/github_app_list_repos200_response_inner.py +0 -86
- hatchet_sdk/clients/cloud_rest/models/infra_as_code_create_request.py +0 -107
- hatchet_sdk/clients/cloud_rest/models/log_create_request_inner.py +0 -136
- hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_event.py +0 -83
- hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_fly.py +0 -100
- hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_fly_app.py +0 -86
- hatchet_sdk/clients/cloud_rest/models/log_create_request_inner_log.py +0 -83
- hatchet_sdk/clients/cloud_rest/models/managed_worker_create_request.py +0 -128
- hatchet_sdk/clients/cloud_rest/models/managed_worker_create_request_build_config.py +0 -121
- hatchet_sdk/clients/cloud_rest/models/managed_worker_create_request_runtime_config.py +0 -166
- hatchet_sdk/clients/cloud_rest/models/managed_worker_events_list200_response.py +0 -119
- hatchet_sdk/clients/cloud_rest/models/managed_worker_events_list200_response_rows_inner.py +0 -117
- hatchet_sdk/clients/cloud_rest/models/managed_worker_instances_list200_response.py +0 -119
- hatchet_sdk/clients/cloud_rest/models/managed_worker_instances_list200_response_rows_inner.py +0 -113
- hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner.py +0 -154
- hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner_build_config.py +0 -151
- hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner_build_config_steps_inner.py +0 -109
- hatchet_sdk/clients/cloud_rest/models/managed_worker_list200_response_rows_inner_runtime_configs_inner.py +0 -171
- hatchet_sdk/clients/cloud_rest/models/managed_worker_update_request.py +0 -131
- hatchet_sdk/clients/cloud_rest/models/metadata_get200_response.py +0 -101
- hatchet_sdk/clients/cloud_rest/models/metadata_get400_response.py +0 -105
- hatchet_sdk/clients/cloud_rest/models/metadata_get400_response_errors_inner.py +0 -102
- hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner.py +0 -108
- hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner_histograms_inner.py +0 -102
- hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner_histograms_inner_histogram.py +0 -113
- hatchet_sdk/clients/cloud_rest/models/metrics_cpu_get200_response_inner_histograms_inner_histogram_buckets_inner.py +0 -93
- hatchet_sdk/clients/cloud_rest/models/runtime_config_list_actions200_response.py +0 -83
- hatchet_sdk/clients/cloud_rest/models/subscription_upsert200_response.py +0 -114
- hatchet_sdk/clients/cloud_rest/models/subscription_upsert_request.py +0 -88
- hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response.py +0 -170
- hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response_coupons_inner.py +0 -137
- hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response_plans_inner.py +0 -103
- hatchet_sdk/clients/cloud_rest/models/tenant_billing_state_get200_response_subscription.py +0 -114
- hatchet_sdk/clients/cloud_rest/models/workflow_run_events_get_metrics200_response.py +0 -107
- hatchet_sdk/clients/cloud_rest/models/workflow_run_events_get_metrics200_response_results_inner.py +0 -105
- hatchet_sdk/clients/cloud_rest/rest.py +0 -182
- hatchet_sdk/compute/__init__.py +0 -0
- hatchet_sdk/compute/configs.py +0 -34
- hatchet_sdk/compute/managed_compute.py +0 -111
- {hatchet_sdk-0.40.0a9.dist-info → hatchet_sdk-0.41.0.dist-info}/WHEEL +0 -0
|
@@ -1,369 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
Hatchet API
|
|
5
|
-
|
|
6
|
-
The Hatchet API
|
|
7
|
-
|
|
8
|
-
The version of the OpenAPI document: 1.0.0
|
|
9
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
-
|
|
11
|
-
Do not edit the class manually.
|
|
12
|
-
""" # noqa: E501
|
|
13
|
-
|
|
14
|
-
import warnings
|
|
15
|
-
from datetime import datetime
|
|
16
|
-
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
17
|
-
|
|
18
|
-
from pydantic import Field, StrictFloat, StrictInt, StrictStr, validate_call
|
|
19
|
-
from typing_extensions import Annotated
|
|
20
|
-
|
|
21
|
-
from hatchet_sdk.clients.cloud_rest.api_client import ApiClient, RequestSerialized
|
|
22
|
-
from hatchet_sdk.clients.cloud_rest.api_response import ApiResponse
|
|
23
|
-
from hatchet_sdk.clients.cloud_rest.models.workflow_run_events_get_metrics200_response import (
|
|
24
|
-
WorkflowRunEventsGetMetrics200Response,
|
|
25
|
-
)
|
|
26
|
-
from hatchet_sdk.clients.cloud_rest.rest import RESTResponseType
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
class WorkflowApi:
|
|
30
|
-
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
31
|
-
Ref: https://openapi-generator.tech
|
|
32
|
-
|
|
33
|
-
Do not edit the class manually.
|
|
34
|
-
"""
|
|
35
|
-
|
|
36
|
-
def __init__(self, api_client=None) -> None:
|
|
37
|
-
if api_client is None:
|
|
38
|
-
api_client = ApiClient.get_default()
|
|
39
|
-
self.api_client = api_client
|
|
40
|
-
|
|
41
|
-
@validate_call
|
|
42
|
-
async def workflow_run_events_get_metrics(
|
|
43
|
-
self,
|
|
44
|
-
tenant: Annotated[
|
|
45
|
-
str,
|
|
46
|
-
Field(
|
|
47
|
-
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
48
|
-
),
|
|
49
|
-
],
|
|
50
|
-
created_after: Annotated[
|
|
51
|
-
Optional[datetime],
|
|
52
|
-
Field(description="The time after the workflow run was created"),
|
|
53
|
-
] = None,
|
|
54
|
-
finished_before: Annotated[
|
|
55
|
-
Optional[datetime],
|
|
56
|
-
Field(description="The time before the workflow run was completed"),
|
|
57
|
-
] = None,
|
|
58
|
-
_request_timeout: Union[
|
|
59
|
-
None,
|
|
60
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
61
|
-
Tuple[
|
|
62
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
63
|
-
],
|
|
64
|
-
] = None,
|
|
65
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
66
|
-
_content_type: Optional[StrictStr] = None,
|
|
67
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
68
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
69
|
-
) -> WorkflowRunEventsGetMetrics200Response:
|
|
70
|
-
"""Get workflow runs
|
|
71
|
-
|
|
72
|
-
Get a minute by minute breakdown of workflow run metrics for a tenant
|
|
73
|
-
|
|
74
|
-
:param tenant: The tenant id (required)
|
|
75
|
-
:type tenant: str
|
|
76
|
-
:param created_after: The time after the workflow run was created
|
|
77
|
-
:type created_after: datetime
|
|
78
|
-
:param finished_before: The time before the workflow run was completed
|
|
79
|
-
:type finished_before: datetime
|
|
80
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
81
|
-
number provided, it will be total request
|
|
82
|
-
timeout. It can also be a pair (tuple) of
|
|
83
|
-
(connection, read) timeouts.
|
|
84
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
85
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
86
|
-
request; this effectively ignores the
|
|
87
|
-
authentication in the spec for a single request.
|
|
88
|
-
:type _request_auth: dict, optional
|
|
89
|
-
:param _content_type: force content-type for the request.
|
|
90
|
-
:type _content_type: str, Optional
|
|
91
|
-
:param _headers: set to override the headers for a single
|
|
92
|
-
request; this effectively ignores the headers
|
|
93
|
-
in the spec for a single request.
|
|
94
|
-
:type _headers: dict, optional
|
|
95
|
-
:param _host_index: set to override the host_index for a single
|
|
96
|
-
request; this effectively ignores the host_index
|
|
97
|
-
in the spec for a single request.
|
|
98
|
-
:type _host_index: int, optional
|
|
99
|
-
:return: Returns the result object.
|
|
100
|
-
""" # noqa: E501
|
|
101
|
-
|
|
102
|
-
_param = self._workflow_run_events_get_metrics_serialize(
|
|
103
|
-
tenant=tenant,
|
|
104
|
-
created_after=created_after,
|
|
105
|
-
finished_before=finished_before,
|
|
106
|
-
_request_auth=_request_auth,
|
|
107
|
-
_content_type=_content_type,
|
|
108
|
-
_headers=_headers,
|
|
109
|
-
_host_index=_host_index,
|
|
110
|
-
)
|
|
111
|
-
|
|
112
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
113
|
-
"200": "WorkflowRunEventsGetMetrics200Response",
|
|
114
|
-
"400": "MetadataGet400Response",
|
|
115
|
-
"403": "MetadataGet400Response",
|
|
116
|
-
}
|
|
117
|
-
response_data = await self.api_client.call_api(
|
|
118
|
-
*_param, _request_timeout=_request_timeout
|
|
119
|
-
)
|
|
120
|
-
await response_data.read()
|
|
121
|
-
return self.api_client.response_deserialize(
|
|
122
|
-
response_data=response_data,
|
|
123
|
-
response_types_map=_response_types_map,
|
|
124
|
-
).data
|
|
125
|
-
|
|
126
|
-
@validate_call
|
|
127
|
-
async def workflow_run_events_get_metrics_with_http_info(
|
|
128
|
-
self,
|
|
129
|
-
tenant: Annotated[
|
|
130
|
-
str,
|
|
131
|
-
Field(
|
|
132
|
-
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
133
|
-
),
|
|
134
|
-
],
|
|
135
|
-
created_after: Annotated[
|
|
136
|
-
Optional[datetime],
|
|
137
|
-
Field(description="The time after the workflow run was created"),
|
|
138
|
-
] = None,
|
|
139
|
-
finished_before: Annotated[
|
|
140
|
-
Optional[datetime],
|
|
141
|
-
Field(description="The time before the workflow run was completed"),
|
|
142
|
-
] = None,
|
|
143
|
-
_request_timeout: Union[
|
|
144
|
-
None,
|
|
145
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
146
|
-
Tuple[
|
|
147
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
148
|
-
],
|
|
149
|
-
] = None,
|
|
150
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
151
|
-
_content_type: Optional[StrictStr] = None,
|
|
152
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
153
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
154
|
-
) -> ApiResponse[WorkflowRunEventsGetMetrics200Response]:
|
|
155
|
-
"""Get workflow runs
|
|
156
|
-
|
|
157
|
-
Get a minute by minute breakdown of workflow run metrics for a tenant
|
|
158
|
-
|
|
159
|
-
:param tenant: The tenant id (required)
|
|
160
|
-
:type tenant: str
|
|
161
|
-
:param created_after: The time after the workflow run was created
|
|
162
|
-
:type created_after: datetime
|
|
163
|
-
:param finished_before: The time before the workflow run was completed
|
|
164
|
-
:type finished_before: datetime
|
|
165
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
166
|
-
number provided, it will be total request
|
|
167
|
-
timeout. It can also be a pair (tuple) of
|
|
168
|
-
(connection, read) timeouts.
|
|
169
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
170
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
171
|
-
request; this effectively ignores the
|
|
172
|
-
authentication in the spec for a single request.
|
|
173
|
-
:type _request_auth: dict, optional
|
|
174
|
-
:param _content_type: force content-type for the request.
|
|
175
|
-
:type _content_type: str, Optional
|
|
176
|
-
:param _headers: set to override the headers for a single
|
|
177
|
-
request; this effectively ignores the headers
|
|
178
|
-
in the spec for a single request.
|
|
179
|
-
:type _headers: dict, optional
|
|
180
|
-
:param _host_index: set to override the host_index for a single
|
|
181
|
-
request; this effectively ignores the host_index
|
|
182
|
-
in the spec for a single request.
|
|
183
|
-
:type _host_index: int, optional
|
|
184
|
-
:return: Returns the result object.
|
|
185
|
-
""" # noqa: E501
|
|
186
|
-
|
|
187
|
-
_param = self._workflow_run_events_get_metrics_serialize(
|
|
188
|
-
tenant=tenant,
|
|
189
|
-
created_after=created_after,
|
|
190
|
-
finished_before=finished_before,
|
|
191
|
-
_request_auth=_request_auth,
|
|
192
|
-
_content_type=_content_type,
|
|
193
|
-
_headers=_headers,
|
|
194
|
-
_host_index=_host_index,
|
|
195
|
-
)
|
|
196
|
-
|
|
197
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
198
|
-
"200": "WorkflowRunEventsGetMetrics200Response",
|
|
199
|
-
"400": "MetadataGet400Response",
|
|
200
|
-
"403": "MetadataGet400Response",
|
|
201
|
-
}
|
|
202
|
-
response_data = await self.api_client.call_api(
|
|
203
|
-
*_param, _request_timeout=_request_timeout
|
|
204
|
-
)
|
|
205
|
-
await response_data.read()
|
|
206
|
-
return self.api_client.response_deserialize(
|
|
207
|
-
response_data=response_data,
|
|
208
|
-
response_types_map=_response_types_map,
|
|
209
|
-
)
|
|
210
|
-
|
|
211
|
-
@validate_call
|
|
212
|
-
async def workflow_run_events_get_metrics_without_preload_content(
|
|
213
|
-
self,
|
|
214
|
-
tenant: Annotated[
|
|
215
|
-
str,
|
|
216
|
-
Field(
|
|
217
|
-
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
218
|
-
),
|
|
219
|
-
],
|
|
220
|
-
created_after: Annotated[
|
|
221
|
-
Optional[datetime],
|
|
222
|
-
Field(description="The time after the workflow run was created"),
|
|
223
|
-
] = None,
|
|
224
|
-
finished_before: Annotated[
|
|
225
|
-
Optional[datetime],
|
|
226
|
-
Field(description="The time before the workflow run was completed"),
|
|
227
|
-
] = None,
|
|
228
|
-
_request_timeout: Union[
|
|
229
|
-
None,
|
|
230
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
231
|
-
Tuple[
|
|
232
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
233
|
-
],
|
|
234
|
-
] = None,
|
|
235
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
236
|
-
_content_type: Optional[StrictStr] = None,
|
|
237
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
238
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
239
|
-
) -> RESTResponseType:
|
|
240
|
-
"""Get workflow runs
|
|
241
|
-
|
|
242
|
-
Get a minute by minute breakdown of workflow run metrics for a tenant
|
|
243
|
-
|
|
244
|
-
:param tenant: The tenant id (required)
|
|
245
|
-
:type tenant: str
|
|
246
|
-
:param created_after: The time after the workflow run was created
|
|
247
|
-
:type created_after: datetime
|
|
248
|
-
:param finished_before: The time before the workflow run was completed
|
|
249
|
-
:type finished_before: datetime
|
|
250
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
251
|
-
number provided, it will be total request
|
|
252
|
-
timeout. It can also be a pair (tuple) of
|
|
253
|
-
(connection, read) timeouts.
|
|
254
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
255
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
256
|
-
request; this effectively ignores the
|
|
257
|
-
authentication in the spec for a single request.
|
|
258
|
-
:type _request_auth: dict, optional
|
|
259
|
-
:param _content_type: force content-type for the request.
|
|
260
|
-
:type _content_type: str, Optional
|
|
261
|
-
:param _headers: set to override the headers for a single
|
|
262
|
-
request; this effectively ignores the headers
|
|
263
|
-
in the spec for a single request.
|
|
264
|
-
:type _headers: dict, optional
|
|
265
|
-
:param _host_index: set to override the host_index for a single
|
|
266
|
-
request; this effectively ignores the host_index
|
|
267
|
-
in the spec for a single request.
|
|
268
|
-
:type _host_index: int, optional
|
|
269
|
-
:return: Returns the result object.
|
|
270
|
-
""" # noqa: E501
|
|
271
|
-
|
|
272
|
-
_param = self._workflow_run_events_get_metrics_serialize(
|
|
273
|
-
tenant=tenant,
|
|
274
|
-
created_after=created_after,
|
|
275
|
-
finished_before=finished_before,
|
|
276
|
-
_request_auth=_request_auth,
|
|
277
|
-
_content_type=_content_type,
|
|
278
|
-
_headers=_headers,
|
|
279
|
-
_host_index=_host_index,
|
|
280
|
-
)
|
|
281
|
-
|
|
282
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
283
|
-
"200": "WorkflowRunEventsGetMetrics200Response",
|
|
284
|
-
"400": "MetadataGet400Response",
|
|
285
|
-
"403": "MetadataGet400Response",
|
|
286
|
-
}
|
|
287
|
-
response_data = await self.api_client.call_api(
|
|
288
|
-
*_param, _request_timeout=_request_timeout
|
|
289
|
-
)
|
|
290
|
-
return response_data.response
|
|
291
|
-
|
|
292
|
-
def _workflow_run_events_get_metrics_serialize(
|
|
293
|
-
self,
|
|
294
|
-
tenant,
|
|
295
|
-
created_after,
|
|
296
|
-
finished_before,
|
|
297
|
-
_request_auth,
|
|
298
|
-
_content_type,
|
|
299
|
-
_headers,
|
|
300
|
-
_host_index,
|
|
301
|
-
) -> RequestSerialized:
|
|
302
|
-
|
|
303
|
-
_host = None
|
|
304
|
-
|
|
305
|
-
_collection_formats: Dict[str, str] = {}
|
|
306
|
-
|
|
307
|
-
_path_params: Dict[str, str] = {}
|
|
308
|
-
_query_params: List[Tuple[str, str]] = []
|
|
309
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
310
|
-
_form_params: List[Tuple[str, str]] = []
|
|
311
|
-
_files: Dict[str, Union[str, bytes]] = {}
|
|
312
|
-
_body_params: Optional[bytes] = None
|
|
313
|
-
|
|
314
|
-
# process the path parameters
|
|
315
|
-
if tenant is not None:
|
|
316
|
-
_path_params["tenant"] = tenant
|
|
317
|
-
# process the query parameters
|
|
318
|
-
if created_after is not None:
|
|
319
|
-
if isinstance(created_after, datetime):
|
|
320
|
-
_query_params.append(
|
|
321
|
-
(
|
|
322
|
-
"createdAfter",
|
|
323
|
-
created_after.strftime(
|
|
324
|
-
self.api_client.configuration.datetime_format
|
|
325
|
-
),
|
|
326
|
-
)
|
|
327
|
-
)
|
|
328
|
-
else:
|
|
329
|
-
_query_params.append(("createdAfter", created_after))
|
|
330
|
-
|
|
331
|
-
if finished_before is not None:
|
|
332
|
-
if isinstance(finished_before, datetime):
|
|
333
|
-
_query_params.append(
|
|
334
|
-
(
|
|
335
|
-
"finishedBefore",
|
|
336
|
-
finished_before.strftime(
|
|
337
|
-
self.api_client.configuration.datetime_format
|
|
338
|
-
),
|
|
339
|
-
)
|
|
340
|
-
)
|
|
341
|
-
else:
|
|
342
|
-
_query_params.append(("finishedBefore", finished_before))
|
|
343
|
-
|
|
344
|
-
# process the header parameters
|
|
345
|
-
# process the form parameters
|
|
346
|
-
# process the body parameter
|
|
347
|
-
|
|
348
|
-
# set the HTTP header `Accept`
|
|
349
|
-
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
350
|
-
["application/json"]
|
|
351
|
-
)
|
|
352
|
-
|
|
353
|
-
# authentication setting
|
|
354
|
-
_auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
|
|
355
|
-
|
|
356
|
-
return self.api_client.param_serialize(
|
|
357
|
-
method="GET",
|
|
358
|
-
resource_path="/api/v1/cloud/tenants/{tenant}/runs-metrics",
|
|
359
|
-
path_params=_path_params,
|
|
360
|
-
query_params=_query_params,
|
|
361
|
-
header_params=_header_params,
|
|
362
|
-
body=_body_params,
|
|
363
|
-
post_params=_form_params,
|
|
364
|
-
files=_files,
|
|
365
|
-
auth_settings=_auth_settings,
|
|
366
|
-
collection_formats=_collection_formats,
|
|
367
|
-
_host=_host,
|
|
368
|
-
_request_auth=_request_auth,
|
|
369
|
-
)
|