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,971 +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 (
|
|
19
|
-
Field,
|
|
20
|
-
StrictFloat,
|
|
21
|
-
StrictInt,
|
|
22
|
-
StrictStr,
|
|
23
|
-
field_validator,
|
|
24
|
-
validate_call,
|
|
25
|
-
)
|
|
26
|
-
from typing_extensions import Annotated
|
|
27
|
-
|
|
28
|
-
from hatchet_sdk.clients.cloud_rest.api_client import ApiClient, RequestSerialized
|
|
29
|
-
from hatchet_sdk.clients.cloud_rest.api_response import ApiResponse
|
|
30
|
-
from hatchet_sdk.clients.cloud_rest.models.log_create_request_inner import (
|
|
31
|
-
LogCreateRequestInner,
|
|
32
|
-
)
|
|
33
|
-
from hatchet_sdk.clients.cloud_rest.models.log_list200_response import (
|
|
34
|
-
LogList200Response,
|
|
35
|
-
)
|
|
36
|
-
from hatchet_sdk.clients.cloud_rest.rest import RESTResponseType
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
class LogApi:
|
|
40
|
-
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
41
|
-
Ref: https://openapi-generator.tech
|
|
42
|
-
|
|
43
|
-
Do not edit the class manually.
|
|
44
|
-
"""
|
|
45
|
-
|
|
46
|
-
def __init__(self, api_client=None) -> None:
|
|
47
|
-
if api_client is None:
|
|
48
|
-
api_client = ApiClient.get_default()
|
|
49
|
-
self.api_client = api_client
|
|
50
|
-
|
|
51
|
-
@validate_call
|
|
52
|
-
async def build_logs_list(
|
|
53
|
-
self,
|
|
54
|
-
build: Annotated[
|
|
55
|
-
str,
|
|
56
|
-
Field(
|
|
57
|
-
min_length=36, strict=True, max_length=36, description="The build id"
|
|
58
|
-
),
|
|
59
|
-
],
|
|
60
|
-
_request_timeout: Union[
|
|
61
|
-
None,
|
|
62
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
63
|
-
Tuple[
|
|
64
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
65
|
-
],
|
|
66
|
-
] = None,
|
|
67
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
68
|
-
_content_type: Optional[StrictStr] = None,
|
|
69
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
70
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
71
|
-
) -> LogList200Response:
|
|
72
|
-
"""Get Build Logs
|
|
73
|
-
|
|
74
|
-
Get the build logs for a specific build of a managed worker
|
|
75
|
-
|
|
76
|
-
:param build: The build id (required)
|
|
77
|
-
:type build: str
|
|
78
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
79
|
-
number provided, it will be total request
|
|
80
|
-
timeout. It can also be a pair (tuple) of
|
|
81
|
-
(connection, read) timeouts.
|
|
82
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
83
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
84
|
-
request; this effectively ignores the
|
|
85
|
-
authentication in the spec for a single request.
|
|
86
|
-
:type _request_auth: dict, optional
|
|
87
|
-
:param _content_type: force content-type for the request.
|
|
88
|
-
:type _content_type: str, Optional
|
|
89
|
-
:param _headers: set to override the headers for a single
|
|
90
|
-
request; this effectively ignores the headers
|
|
91
|
-
in the spec for a single request.
|
|
92
|
-
:type _headers: dict, optional
|
|
93
|
-
:param _host_index: set to override the host_index for a single
|
|
94
|
-
request; this effectively ignores the host_index
|
|
95
|
-
in the spec for a single request.
|
|
96
|
-
:type _host_index: int, optional
|
|
97
|
-
:return: Returns the result object.
|
|
98
|
-
""" # noqa: E501
|
|
99
|
-
|
|
100
|
-
_param = self._build_logs_list_serialize(
|
|
101
|
-
build=build,
|
|
102
|
-
_request_auth=_request_auth,
|
|
103
|
-
_content_type=_content_type,
|
|
104
|
-
_headers=_headers,
|
|
105
|
-
_host_index=_host_index,
|
|
106
|
-
)
|
|
107
|
-
|
|
108
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
109
|
-
"200": "LogList200Response",
|
|
110
|
-
"400": "MetadataGet400Response",
|
|
111
|
-
"403": "MetadataGet400Response",
|
|
112
|
-
}
|
|
113
|
-
response_data = await self.api_client.call_api(
|
|
114
|
-
*_param, _request_timeout=_request_timeout
|
|
115
|
-
)
|
|
116
|
-
await response_data.read()
|
|
117
|
-
return self.api_client.response_deserialize(
|
|
118
|
-
response_data=response_data,
|
|
119
|
-
response_types_map=_response_types_map,
|
|
120
|
-
).data
|
|
121
|
-
|
|
122
|
-
@validate_call
|
|
123
|
-
async def build_logs_list_with_http_info(
|
|
124
|
-
self,
|
|
125
|
-
build: Annotated[
|
|
126
|
-
str,
|
|
127
|
-
Field(
|
|
128
|
-
min_length=36, strict=True, max_length=36, description="The build id"
|
|
129
|
-
),
|
|
130
|
-
],
|
|
131
|
-
_request_timeout: Union[
|
|
132
|
-
None,
|
|
133
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
134
|
-
Tuple[
|
|
135
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
136
|
-
],
|
|
137
|
-
] = None,
|
|
138
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
139
|
-
_content_type: Optional[StrictStr] = None,
|
|
140
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
141
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
142
|
-
) -> ApiResponse[LogList200Response]:
|
|
143
|
-
"""Get Build Logs
|
|
144
|
-
|
|
145
|
-
Get the build logs for a specific build of a managed worker
|
|
146
|
-
|
|
147
|
-
:param build: The build id (required)
|
|
148
|
-
:type build: str
|
|
149
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
150
|
-
number provided, it will be total request
|
|
151
|
-
timeout. It can also be a pair (tuple) of
|
|
152
|
-
(connection, read) timeouts.
|
|
153
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
154
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
155
|
-
request; this effectively ignores the
|
|
156
|
-
authentication in the spec for a single request.
|
|
157
|
-
:type _request_auth: dict, optional
|
|
158
|
-
:param _content_type: force content-type for the request.
|
|
159
|
-
:type _content_type: str, Optional
|
|
160
|
-
:param _headers: set to override the headers for a single
|
|
161
|
-
request; this effectively ignores the headers
|
|
162
|
-
in the spec for a single request.
|
|
163
|
-
:type _headers: dict, optional
|
|
164
|
-
:param _host_index: set to override the host_index for a single
|
|
165
|
-
request; this effectively ignores the host_index
|
|
166
|
-
in the spec for a single request.
|
|
167
|
-
:type _host_index: int, optional
|
|
168
|
-
:return: Returns the result object.
|
|
169
|
-
""" # noqa: E501
|
|
170
|
-
|
|
171
|
-
_param = self._build_logs_list_serialize(
|
|
172
|
-
build=build,
|
|
173
|
-
_request_auth=_request_auth,
|
|
174
|
-
_content_type=_content_type,
|
|
175
|
-
_headers=_headers,
|
|
176
|
-
_host_index=_host_index,
|
|
177
|
-
)
|
|
178
|
-
|
|
179
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
180
|
-
"200": "LogList200Response",
|
|
181
|
-
"400": "MetadataGet400Response",
|
|
182
|
-
"403": "MetadataGet400Response",
|
|
183
|
-
}
|
|
184
|
-
response_data = await self.api_client.call_api(
|
|
185
|
-
*_param, _request_timeout=_request_timeout
|
|
186
|
-
)
|
|
187
|
-
await response_data.read()
|
|
188
|
-
return self.api_client.response_deserialize(
|
|
189
|
-
response_data=response_data,
|
|
190
|
-
response_types_map=_response_types_map,
|
|
191
|
-
)
|
|
192
|
-
|
|
193
|
-
@validate_call
|
|
194
|
-
async def build_logs_list_without_preload_content(
|
|
195
|
-
self,
|
|
196
|
-
build: Annotated[
|
|
197
|
-
str,
|
|
198
|
-
Field(
|
|
199
|
-
min_length=36, strict=True, max_length=36, description="The build id"
|
|
200
|
-
),
|
|
201
|
-
],
|
|
202
|
-
_request_timeout: Union[
|
|
203
|
-
None,
|
|
204
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
205
|
-
Tuple[
|
|
206
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
207
|
-
],
|
|
208
|
-
] = None,
|
|
209
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
210
|
-
_content_type: Optional[StrictStr] = None,
|
|
211
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
212
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
213
|
-
) -> RESTResponseType:
|
|
214
|
-
"""Get Build Logs
|
|
215
|
-
|
|
216
|
-
Get the build logs for a specific build of a managed worker
|
|
217
|
-
|
|
218
|
-
:param build: The build id (required)
|
|
219
|
-
:type build: str
|
|
220
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
221
|
-
number provided, it will be total request
|
|
222
|
-
timeout. It can also be a pair (tuple) of
|
|
223
|
-
(connection, read) timeouts.
|
|
224
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
225
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
226
|
-
request; this effectively ignores the
|
|
227
|
-
authentication in the spec for a single request.
|
|
228
|
-
:type _request_auth: dict, optional
|
|
229
|
-
:param _content_type: force content-type for the request.
|
|
230
|
-
:type _content_type: str, Optional
|
|
231
|
-
:param _headers: set to override the headers for a single
|
|
232
|
-
request; this effectively ignores the headers
|
|
233
|
-
in the spec for a single request.
|
|
234
|
-
:type _headers: dict, optional
|
|
235
|
-
:param _host_index: set to override the host_index for a single
|
|
236
|
-
request; this effectively ignores the host_index
|
|
237
|
-
in the spec for a single request.
|
|
238
|
-
:type _host_index: int, optional
|
|
239
|
-
:return: Returns the result object.
|
|
240
|
-
""" # noqa: E501
|
|
241
|
-
|
|
242
|
-
_param = self._build_logs_list_serialize(
|
|
243
|
-
build=build,
|
|
244
|
-
_request_auth=_request_auth,
|
|
245
|
-
_content_type=_content_type,
|
|
246
|
-
_headers=_headers,
|
|
247
|
-
_host_index=_host_index,
|
|
248
|
-
)
|
|
249
|
-
|
|
250
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
251
|
-
"200": "LogList200Response",
|
|
252
|
-
"400": "MetadataGet400Response",
|
|
253
|
-
"403": "MetadataGet400Response",
|
|
254
|
-
}
|
|
255
|
-
response_data = await self.api_client.call_api(
|
|
256
|
-
*_param, _request_timeout=_request_timeout
|
|
257
|
-
)
|
|
258
|
-
return response_data.response
|
|
259
|
-
|
|
260
|
-
def _build_logs_list_serialize(
|
|
261
|
-
self,
|
|
262
|
-
build,
|
|
263
|
-
_request_auth,
|
|
264
|
-
_content_type,
|
|
265
|
-
_headers,
|
|
266
|
-
_host_index,
|
|
267
|
-
) -> RequestSerialized:
|
|
268
|
-
|
|
269
|
-
_host = None
|
|
270
|
-
|
|
271
|
-
_collection_formats: Dict[str, str] = {}
|
|
272
|
-
|
|
273
|
-
_path_params: Dict[str, str] = {}
|
|
274
|
-
_query_params: List[Tuple[str, str]] = []
|
|
275
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
276
|
-
_form_params: List[Tuple[str, str]] = []
|
|
277
|
-
_files: Dict[str, Union[str, bytes]] = {}
|
|
278
|
-
_body_params: Optional[bytes] = None
|
|
279
|
-
|
|
280
|
-
# process the path parameters
|
|
281
|
-
if build is not None:
|
|
282
|
-
_path_params["build"] = build
|
|
283
|
-
# process the query parameters
|
|
284
|
-
# process the header parameters
|
|
285
|
-
# process the form parameters
|
|
286
|
-
# process the body parameter
|
|
287
|
-
|
|
288
|
-
# set the HTTP header `Accept`
|
|
289
|
-
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
290
|
-
["application/json"]
|
|
291
|
-
)
|
|
292
|
-
|
|
293
|
-
# authentication setting
|
|
294
|
-
_auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
|
|
295
|
-
|
|
296
|
-
return self.api_client.param_serialize(
|
|
297
|
-
method="GET",
|
|
298
|
-
resource_path="/api/v1/cloud/build/{build}/logs",
|
|
299
|
-
path_params=_path_params,
|
|
300
|
-
query_params=_query_params,
|
|
301
|
-
header_params=_header_params,
|
|
302
|
-
body=_body_params,
|
|
303
|
-
post_params=_form_params,
|
|
304
|
-
files=_files,
|
|
305
|
-
auth_settings=_auth_settings,
|
|
306
|
-
collection_formats=_collection_formats,
|
|
307
|
-
_host=_host,
|
|
308
|
-
_request_auth=_request_auth,
|
|
309
|
-
)
|
|
310
|
-
|
|
311
|
-
@validate_call
|
|
312
|
-
async def log_create(
|
|
313
|
-
self,
|
|
314
|
-
tenant: Annotated[
|
|
315
|
-
str,
|
|
316
|
-
Field(
|
|
317
|
-
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
318
|
-
),
|
|
319
|
-
],
|
|
320
|
-
log_create_request_inner: Optional[List[LogCreateRequestInner]] = None,
|
|
321
|
-
_request_timeout: Union[
|
|
322
|
-
None,
|
|
323
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
324
|
-
Tuple[
|
|
325
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
326
|
-
],
|
|
327
|
-
] = None,
|
|
328
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
329
|
-
_content_type: Optional[StrictStr] = None,
|
|
330
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
331
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
332
|
-
) -> None:
|
|
333
|
-
"""Push Log Entry
|
|
334
|
-
|
|
335
|
-
Push a log entry for the tenant
|
|
336
|
-
|
|
337
|
-
:param tenant: The tenant id (required)
|
|
338
|
-
:type tenant: str
|
|
339
|
-
:param log_create_request_inner:
|
|
340
|
-
:type log_create_request_inner: List[LogCreateRequestInner]
|
|
341
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
342
|
-
number provided, it will be total request
|
|
343
|
-
timeout. It can also be a pair (tuple) of
|
|
344
|
-
(connection, read) timeouts.
|
|
345
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
346
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
347
|
-
request; this effectively ignores the
|
|
348
|
-
authentication in the spec for a single request.
|
|
349
|
-
:type _request_auth: dict, optional
|
|
350
|
-
:param _content_type: force content-type for the request.
|
|
351
|
-
:type _content_type: str, Optional
|
|
352
|
-
:param _headers: set to override the headers for a single
|
|
353
|
-
request; this effectively ignores the headers
|
|
354
|
-
in the spec for a single request.
|
|
355
|
-
:type _headers: dict, optional
|
|
356
|
-
:param _host_index: set to override the host_index for a single
|
|
357
|
-
request; this effectively ignores the host_index
|
|
358
|
-
in the spec for a single request.
|
|
359
|
-
:type _host_index: int, optional
|
|
360
|
-
:return: Returns the result object.
|
|
361
|
-
""" # noqa: E501
|
|
362
|
-
|
|
363
|
-
_param = self._log_create_serialize(
|
|
364
|
-
tenant=tenant,
|
|
365
|
-
log_create_request_inner=log_create_request_inner,
|
|
366
|
-
_request_auth=_request_auth,
|
|
367
|
-
_content_type=_content_type,
|
|
368
|
-
_headers=_headers,
|
|
369
|
-
_host_index=_host_index,
|
|
370
|
-
)
|
|
371
|
-
|
|
372
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
373
|
-
"200": None,
|
|
374
|
-
"400": "MetadataGet400Response",
|
|
375
|
-
"403": "MetadataGet400Response",
|
|
376
|
-
}
|
|
377
|
-
response_data = await self.api_client.call_api(
|
|
378
|
-
*_param, _request_timeout=_request_timeout
|
|
379
|
-
)
|
|
380
|
-
await response_data.read()
|
|
381
|
-
return self.api_client.response_deserialize(
|
|
382
|
-
response_data=response_data,
|
|
383
|
-
response_types_map=_response_types_map,
|
|
384
|
-
).data
|
|
385
|
-
|
|
386
|
-
@validate_call
|
|
387
|
-
async def log_create_with_http_info(
|
|
388
|
-
self,
|
|
389
|
-
tenant: Annotated[
|
|
390
|
-
str,
|
|
391
|
-
Field(
|
|
392
|
-
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
393
|
-
),
|
|
394
|
-
],
|
|
395
|
-
log_create_request_inner: Optional[List[LogCreateRequestInner]] = None,
|
|
396
|
-
_request_timeout: Union[
|
|
397
|
-
None,
|
|
398
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
399
|
-
Tuple[
|
|
400
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
401
|
-
],
|
|
402
|
-
] = None,
|
|
403
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
404
|
-
_content_type: Optional[StrictStr] = None,
|
|
405
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
406
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
407
|
-
) -> ApiResponse[None]:
|
|
408
|
-
"""Push Log Entry
|
|
409
|
-
|
|
410
|
-
Push a log entry for the tenant
|
|
411
|
-
|
|
412
|
-
:param tenant: The tenant id (required)
|
|
413
|
-
:type tenant: str
|
|
414
|
-
:param log_create_request_inner:
|
|
415
|
-
:type log_create_request_inner: List[LogCreateRequestInner]
|
|
416
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
417
|
-
number provided, it will be total request
|
|
418
|
-
timeout. It can also be a pair (tuple) of
|
|
419
|
-
(connection, read) timeouts.
|
|
420
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
421
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
422
|
-
request; this effectively ignores the
|
|
423
|
-
authentication in the spec for a single request.
|
|
424
|
-
:type _request_auth: dict, optional
|
|
425
|
-
:param _content_type: force content-type for the request.
|
|
426
|
-
:type _content_type: str, Optional
|
|
427
|
-
:param _headers: set to override the headers for a single
|
|
428
|
-
request; this effectively ignores the headers
|
|
429
|
-
in the spec for a single request.
|
|
430
|
-
:type _headers: dict, optional
|
|
431
|
-
:param _host_index: set to override the host_index for a single
|
|
432
|
-
request; this effectively ignores the host_index
|
|
433
|
-
in the spec for a single request.
|
|
434
|
-
:type _host_index: int, optional
|
|
435
|
-
:return: Returns the result object.
|
|
436
|
-
""" # noqa: E501
|
|
437
|
-
|
|
438
|
-
_param = self._log_create_serialize(
|
|
439
|
-
tenant=tenant,
|
|
440
|
-
log_create_request_inner=log_create_request_inner,
|
|
441
|
-
_request_auth=_request_auth,
|
|
442
|
-
_content_type=_content_type,
|
|
443
|
-
_headers=_headers,
|
|
444
|
-
_host_index=_host_index,
|
|
445
|
-
)
|
|
446
|
-
|
|
447
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
448
|
-
"200": None,
|
|
449
|
-
"400": "MetadataGet400Response",
|
|
450
|
-
"403": "MetadataGet400Response",
|
|
451
|
-
}
|
|
452
|
-
response_data = await self.api_client.call_api(
|
|
453
|
-
*_param, _request_timeout=_request_timeout
|
|
454
|
-
)
|
|
455
|
-
await response_data.read()
|
|
456
|
-
return self.api_client.response_deserialize(
|
|
457
|
-
response_data=response_data,
|
|
458
|
-
response_types_map=_response_types_map,
|
|
459
|
-
)
|
|
460
|
-
|
|
461
|
-
@validate_call
|
|
462
|
-
async def log_create_without_preload_content(
|
|
463
|
-
self,
|
|
464
|
-
tenant: Annotated[
|
|
465
|
-
str,
|
|
466
|
-
Field(
|
|
467
|
-
min_length=36, strict=True, max_length=36, description="The tenant id"
|
|
468
|
-
),
|
|
469
|
-
],
|
|
470
|
-
log_create_request_inner: Optional[List[LogCreateRequestInner]] = None,
|
|
471
|
-
_request_timeout: Union[
|
|
472
|
-
None,
|
|
473
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
474
|
-
Tuple[
|
|
475
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
476
|
-
],
|
|
477
|
-
] = None,
|
|
478
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
479
|
-
_content_type: Optional[StrictStr] = None,
|
|
480
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
481
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
482
|
-
) -> RESTResponseType:
|
|
483
|
-
"""Push Log Entry
|
|
484
|
-
|
|
485
|
-
Push a log entry for the tenant
|
|
486
|
-
|
|
487
|
-
:param tenant: The tenant id (required)
|
|
488
|
-
:type tenant: str
|
|
489
|
-
:param log_create_request_inner:
|
|
490
|
-
:type log_create_request_inner: List[LogCreateRequestInner]
|
|
491
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
492
|
-
number provided, it will be total request
|
|
493
|
-
timeout. It can also be a pair (tuple) of
|
|
494
|
-
(connection, read) timeouts.
|
|
495
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
496
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
497
|
-
request; this effectively ignores the
|
|
498
|
-
authentication in the spec for a single request.
|
|
499
|
-
:type _request_auth: dict, optional
|
|
500
|
-
:param _content_type: force content-type for the request.
|
|
501
|
-
:type _content_type: str, Optional
|
|
502
|
-
:param _headers: set to override the headers for a single
|
|
503
|
-
request; this effectively ignores the headers
|
|
504
|
-
in the spec for a single request.
|
|
505
|
-
:type _headers: dict, optional
|
|
506
|
-
:param _host_index: set to override the host_index for a single
|
|
507
|
-
request; this effectively ignores the host_index
|
|
508
|
-
in the spec for a single request.
|
|
509
|
-
:type _host_index: int, optional
|
|
510
|
-
:return: Returns the result object.
|
|
511
|
-
""" # noqa: E501
|
|
512
|
-
|
|
513
|
-
_param = self._log_create_serialize(
|
|
514
|
-
tenant=tenant,
|
|
515
|
-
log_create_request_inner=log_create_request_inner,
|
|
516
|
-
_request_auth=_request_auth,
|
|
517
|
-
_content_type=_content_type,
|
|
518
|
-
_headers=_headers,
|
|
519
|
-
_host_index=_host_index,
|
|
520
|
-
)
|
|
521
|
-
|
|
522
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
523
|
-
"200": None,
|
|
524
|
-
"400": "MetadataGet400Response",
|
|
525
|
-
"403": "MetadataGet400Response",
|
|
526
|
-
}
|
|
527
|
-
response_data = await self.api_client.call_api(
|
|
528
|
-
*_param, _request_timeout=_request_timeout
|
|
529
|
-
)
|
|
530
|
-
return response_data.response
|
|
531
|
-
|
|
532
|
-
def _log_create_serialize(
|
|
533
|
-
self,
|
|
534
|
-
tenant,
|
|
535
|
-
log_create_request_inner,
|
|
536
|
-
_request_auth,
|
|
537
|
-
_content_type,
|
|
538
|
-
_headers,
|
|
539
|
-
_host_index,
|
|
540
|
-
) -> RequestSerialized:
|
|
541
|
-
|
|
542
|
-
_host = None
|
|
543
|
-
|
|
544
|
-
_collection_formats: Dict[str, str] = {
|
|
545
|
-
"LogCreateRequestInner": "",
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
_path_params: Dict[str, str] = {}
|
|
549
|
-
_query_params: List[Tuple[str, str]] = []
|
|
550
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
551
|
-
_form_params: List[Tuple[str, str]] = []
|
|
552
|
-
_files: Dict[str, Union[str, bytes]] = {}
|
|
553
|
-
_body_params: Optional[bytes] = None
|
|
554
|
-
|
|
555
|
-
# process the path parameters
|
|
556
|
-
if tenant is not None:
|
|
557
|
-
_path_params["tenant"] = tenant
|
|
558
|
-
# process the query parameters
|
|
559
|
-
# process the header parameters
|
|
560
|
-
# process the form parameters
|
|
561
|
-
# process the body parameter
|
|
562
|
-
if log_create_request_inner is not None:
|
|
563
|
-
_body_params = log_create_request_inner
|
|
564
|
-
|
|
565
|
-
# set the HTTP header `Accept`
|
|
566
|
-
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
567
|
-
["application/json"]
|
|
568
|
-
)
|
|
569
|
-
|
|
570
|
-
# set the HTTP header `Content-Type`
|
|
571
|
-
if _content_type:
|
|
572
|
-
_header_params["Content-Type"] = _content_type
|
|
573
|
-
else:
|
|
574
|
-
_default_content_type = self.api_client.select_header_content_type(
|
|
575
|
-
["application/json"]
|
|
576
|
-
)
|
|
577
|
-
if _default_content_type is not None:
|
|
578
|
-
_header_params["Content-Type"] = _default_content_type
|
|
579
|
-
|
|
580
|
-
# authentication setting
|
|
581
|
-
_auth_settings: List[str] = ["bearerAuth"]
|
|
582
|
-
|
|
583
|
-
return self.api_client.param_serialize(
|
|
584
|
-
method="POST",
|
|
585
|
-
resource_path="/api/v1/cloud/tenants/{tenant}/logs",
|
|
586
|
-
path_params=_path_params,
|
|
587
|
-
query_params=_query_params,
|
|
588
|
-
header_params=_header_params,
|
|
589
|
-
body=_body_params,
|
|
590
|
-
post_params=_form_params,
|
|
591
|
-
files=_files,
|
|
592
|
-
auth_settings=_auth_settings,
|
|
593
|
-
collection_formats=_collection_formats,
|
|
594
|
-
_host=_host,
|
|
595
|
-
_request_auth=_request_auth,
|
|
596
|
-
)
|
|
597
|
-
|
|
598
|
-
@validate_call
|
|
599
|
-
async def log_list(
|
|
600
|
-
self,
|
|
601
|
-
managed_worker: Annotated[
|
|
602
|
-
str,
|
|
603
|
-
Field(
|
|
604
|
-
min_length=36,
|
|
605
|
-
strict=True,
|
|
606
|
-
max_length=36,
|
|
607
|
-
description="The managed worker id",
|
|
608
|
-
),
|
|
609
|
-
],
|
|
610
|
-
after: Annotated[
|
|
611
|
-
Optional[datetime], Field(description="When the logs should start")
|
|
612
|
-
] = None,
|
|
613
|
-
before: Annotated[
|
|
614
|
-
Optional[datetime], Field(description="When the logs should end")
|
|
615
|
-
] = None,
|
|
616
|
-
search: Annotated[
|
|
617
|
-
Optional[StrictStr], Field(description="The search query to filter for")
|
|
618
|
-
] = None,
|
|
619
|
-
direction: Annotated[
|
|
620
|
-
Optional[StrictStr], Field(description="The direction to sort the logs")
|
|
621
|
-
] = None,
|
|
622
|
-
_request_timeout: Union[
|
|
623
|
-
None,
|
|
624
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
625
|
-
Tuple[
|
|
626
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
627
|
-
],
|
|
628
|
-
] = None,
|
|
629
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
630
|
-
_content_type: Optional[StrictStr] = None,
|
|
631
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
632
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
633
|
-
) -> LogList200Response:
|
|
634
|
-
"""List Logs
|
|
635
|
-
|
|
636
|
-
Lists logs for a managed worker
|
|
637
|
-
|
|
638
|
-
:param managed_worker: The managed worker id (required)
|
|
639
|
-
:type managed_worker: str
|
|
640
|
-
:param after: When the logs should start
|
|
641
|
-
:type after: datetime
|
|
642
|
-
:param before: When the logs should end
|
|
643
|
-
:type before: datetime
|
|
644
|
-
:param search: The search query to filter for
|
|
645
|
-
:type search: str
|
|
646
|
-
:param direction: The direction to sort the logs
|
|
647
|
-
:type direction: str
|
|
648
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
649
|
-
number provided, it will be total request
|
|
650
|
-
timeout. It can also be a pair (tuple) of
|
|
651
|
-
(connection, read) timeouts.
|
|
652
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
653
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
654
|
-
request; this effectively ignores the
|
|
655
|
-
authentication in the spec for a single request.
|
|
656
|
-
:type _request_auth: dict, optional
|
|
657
|
-
:param _content_type: force content-type for the request.
|
|
658
|
-
:type _content_type: str, Optional
|
|
659
|
-
:param _headers: set to override the headers for a single
|
|
660
|
-
request; this effectively ignores the headers
|
|
661
|
-
in the spec for a single request.
|
|
662
|
-
:type _headers: dict, optional
|
|
663
|
-
:param _host_index: set to override the host_index for a single
|
|
664
|
-
request; this effectively ignores the host_index
|
|
665
|
-
in the spec for a single request.
|
|
666
|
-
:type _host_index: int, optional
|
|
667
|
-
:return: Returns the result object.
|
|
668
|
-
""" # noqa: E501
|
|
669
|
-
|
|
670
|
-
_param = self._log_list_serialize(
|
|
671
|
-
managed_worker=managed_worker,
|
|
672
|
-
after=after,
|
|
673
|
-
before=before,
|
|
674
|
-
search=search,
|
|
675
|
-
direction=direction,
|
|
676
|
-
_request_auth=_request_auth,
|
|
677
|
-
_content_type=_content_type,
|
|
678
|
-
_headers=_headers,
|
|
679
|
-
_host_index=_host_index,
|
|
680
|
-
)
|
|
681
|
-
|
|
682
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
683
|
-
"200": "LogList200Response",
|
|
684
|
-
"400": "MetadataGet400Response",
|
|
685
|
-
"403": "MetadataGet400Response",
|
|
686
|
-
}
|
|
687
|
-
response_data = await self.api_client.call_api(
|
|
688
|
-
*_param, _request_timeout=_request_timeout
|
|
689
|
-
)
|
|
690
|
-
await response_data.read()
|
|
691
|
-
return self.api_client.response_deserialize(
|
|
692
|
-
response_data=response_data,
|
|
693
|
-
response_types_map=_response_types_map,
|
|
694
|
-
).data
|
|
695
|
-
|
|
696
|
-
@validate_call
|
|
697
|
-
async def log_list_with_http_info(
|
|
698
|
-
self,
|
|
699
|
-
managed_worker: Annotated[
|
|
700
|
-
str,
|
|
701
|
-
Field(
|
|
702
|
-
min_length=36,
|
|
703
|
-
strict=True,
|
|
704
|
-
max_length=36,
|
|
705
|
-
description="The managed worker id",
|
|
706
|
-
),
|
|
707
|
-
],
|
|
708
|
-
after: Annotated[
|
|
709
|
-
Optional[datetime], Field(description="When the logs should start")
|
|
710
|
-
] = None,
|
|
711
|
-
before: Annotated[
|
|
712
|
-
Optional[datetime], Field(description="When the logs should end")
|
|
713
|
-
] = None,
|
|
714
|
-
search: Annotated[
|
|
715
|
-
Optional[StrictStr], Field(description="The search query to filter for")
|
|
716
|
-
] = None,
|
|
717
|
-
direction: Annotated[
|
|
718
|
-
Optional[StrictStr], Field(description="The direction to sort the logs")
|
|
719
|
-
] = None,
|
|
720
|
-
_request_timeout: Union[
|
|
721
|
-
None,
|
|
722
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
723
|
-
Tuple[
|
|
724
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
725
|
-
],
|
|
726
|
-
] = None,
|
|
727
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
728
|
-
_content_type: Optional[StrictStr] = None,
|
|
729
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
730
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
731
|
-
) -> ApiResponse[LogList200Response]:
|
|
732
|
-
"""List Logs
|
|
733
|
-
|
|
734
|
-
Lists logs for a managed worker
|
|
735
|
-
|
|
736
|
-
:param managed_worker: The managed worker id (required)
|
|
737
|
-
:type managed_worker: str
|
|
738
|
-
:param after: When the logs should start
|
|
739
|
-
:type after: datetime
|
|
740
|
-
:param before: When the logs should end
|
|
741
|
-
:type before: datetime
|
|
742
|
-
:param search: The search query to filter for
|
|
743
|
-
:type search: str
|
|
744
|
-
:param direction: The direction to sort the logs
|
|
745
|
-
:type direction: str
|
|
746
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
747
|
-
number provided, it will be total request
|
|
748
|
-
timeout. It can also be a pair (tuple) of
|
|
749
|
-
(connection, read) timeouts.
|
|
750
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
751
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
752
|
-
request; this effectively ignores the
|
|
753
|
-
authentication in the spec for a single request.
|
|
754
|
-
:type _request_auth: dict, optional
|
|
755
|
-
:param _content_type: force content-type for the request.
|
|
756
|
-
:type _content_type: str, Optional
|
|
757
|
-
:param _headers: set to override the headers for a single
|
|
758
|
-
request; this effectively ignores the headers
|
|
759
|
-
in the spec for a single request.
|
|
760
|
-
:type _headers: dict, optional
|
|
761
|
-
:param _host_index: set to override the host_index for a single
|
|
762
|
-
request; this effectively ignores the host_index
|
|
763
|
-
in the spec for a single request.
|
|
764
|
-
:type _host_index: int, optional
|
|
765
|
-
:return: Returns the result object.
|
|
766
|
-
""" # noqa: E501
|
|
767
|
-
|
|
768
|
-
_param = self._log_list_serialize(
|
|
769
|
-
managed_worker=managed_worker,
|
|
770
|
-
after=after,
|
|
771
|
-
before=before,
|
|
772
|
-
search=search,
|
|
773
|
-
direction=direction,
|
|
774
|
-
_request_auth=_request_auth,
|
|
775
|
-
_content_type=_content_type,
|
|
776
|
-
_headers=_headers,
|
|
777
|
-
_host_index=_host_index,
|
|
778
|
-
)
|
|
779
|
-
|
|
780
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
781
|
-
"200": "LogList200Response",
|
|
782
|
-
"400": "MetadataGet400Response",
|
|
783
|
-
"403": "MetadataGet400Response",
|
|
784
|
-
}
|
|
785
|
-
response_data = await self.api_client.call_api(
|
|
786
|
-
*_param, _request_timeout=_request_timeout
|
|
787
|
-
)
|
|
788
|
-
await response_data.read()
|
|
789
|
-
return self.api_client.response_deserialize(
|
|
790
|
-
response_data=response_data,
|
|
791
|
-
response_types_map=_response_types_map,
|
|
792
|
-
)
|
|
793
|
-
|
|
794
|
-
@validate_call
|
|
795
|
-
async def log_list_without_preload_content(
|
|
796
|
-
self,
|
|
797
|
-
managed_worker: Annotated[
|
|
798
|
-
str,
|
|
799
|
-
Field(
|
|
800
|
-
min_length=36,
|
|
801
|
-
strict=True,
|
|
802
|
-
max_length=36,
|
|
803
|
-
description="The managed worker id",
|
|
804
|
-
),
|
|
805
|
-
],
|
|
806
|
-
after: Annotated[
|
|
807
|
-
Optional[datetime], Field(description="When the logs should start")
|
|
808
|
-
] = None,
|
|
809
|
-
before: Annotated[
|
|
810
|
-
Optional[datetime], Field(description="When the logs should end")
|
|
811
|
-
] = None,
|
|
812
|
-
search: Annotated[
|
|
813
|
-
Optional[StrictStr], Field(description="The search query to filter for")
|
|
814
|
-
] = None,
|
|
815
|
-
direction: Annotated[
|
|
816
|
-
Optional[StrictStr], Field(description="The direction to sort the logs")
|
|
817
|
-
] = None,
|
|
818
|
-
_request_timeout: Union[
|
|
819
|
-
None,
|
|
820
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
821
|
-
Tuple[
|
|
822
|
-
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
|
823
|
-
],
|
|
824
|
-
] = None,
|
|
825
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
826
|
-
_content_type: Optional[StrictStr] = None,
|
|
827
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
828
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
829
|
-
) -> RESTResponseType:
|
|
830
|
-
"""List Logs
|
|
831
|
-
|
|
832
|
-
Lists logs for a managed worker
|
|
833
|
-
|
|
834
|
-
:param managed_worker: The managed worker id (required)
|
|
835
|
-
:type managed_worker: str
|
|
836
|
-
:param after: When the logs should start
|
|
837
|
-
:type after: datetime
|
|
838
|
-
:param before: When the logs should end
|
|
839
|
-
:type before: datetime
|
|
840
|
-
:param search: The search query to filter for
|
|
841
|
-
:type search: str
|
|
842
|
-
:param direction: The direction to sort the logs
|
|
843
|
-
:type direction: str
|
|
844
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
845
|
-
number provided, it will be total request
|
|
846
|
-
timeout. It can also be a pair (tuple) of
|
|
847
|
-
(connection, read) timeouts.
|
|
848
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
849
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
850
|
-
request; this effectively ignores the
|
|
851
|
-
authentication in the spec for a single request.
|
|
852
|
-
:type _request_auth: dict, optional
|
|
853
|
-
:param _content_type: force content-type for the request.
|
|
854
|
-
:type _content_type: str, Optional
|
|
855
|
-
:param _headers: set to override the headers for a single
|
|
856
|
-
request; this effectively ignores the headers
|
|
857
|
-
in the spec for a single request.
|
|
858
|
-
:type _headers: dict, optional
|
|
859
|
-
:param _host_index: set to override the host_index for a single
|
|
860
|
-
request; this effectively ignores the host_index
|
|
861
|
-
in the spec for a single request.
|
|
862
|
-
:type _host_index: int, optional
|
|
863
|
-
:return: Returns the result object.
|
|
864
|
-
""" # noqa: E501
|
|
865
|
-
|
|
866
|
-
_param = self._log_list_serialize(
|
|
867
|
-
managed_worker=managed_worker,
|
|
868
|
-
after=after,
|
|
869
|
-
before=before,
|
|
870
|
-
search=search,
|
|
871
|
-
direction=direction,
|
|
872
|
-
_request_auth=_request_auth,
|
|
873
|
-
_content_type=_content_type,
|
|
874
|
-
_headers=_headers,
|
|
875
|
-
_host_index=_host_index,
|
|
876
|
-
)
|
|
877
|
-
|
|
878
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
879
|
-
"200": "LogList200Response",
|
|
880
|
-
"400": "MetadataGet400Response",
|
|
881
|
-
"403": "MetadataGet400Response",
|
|
882
|
-
}
|
|
883
|
-
response_data = await self.api_client.call_api(
|
|
884
|
-
*_param, _request_timeout=_request_timeout
|
|
885
|
-
)
|
|
886
|
-
return response_data.response
|
|
887
|
-
|
|
888
|
-
def _log_list_serialize(
|
|
889
|
-
self,
|
|
890
|
-
managed_worker,
|
|
891
|
-
after,
|
|
892
|
-
before,
|
|
893
|
-
search,
|
|
894
|
-
direction,
|
|
895
|
-
_request_auth,
|
|
896
|
-
_content_type,
|
|
897
|
-
_headers,
|
|
898
|
-
_host_index,
|
|
899
|
-
) -> RequestSerialized:
|
|
900
|
-
|
|
901
|
-
_host = None
|
|
902
|
-
|
|
903
|
-
_collection_formats: Dict[str, str] = {}
|
|
904
|
-
|
|
905
|
-
_path_params: Dict[str, str] = {}
|
|
906
|
-
_query_params: List[Tuple[str, str]] = []
|
|
907
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
908
|
-
_form_params: List[Tuple[str, str]] = []
|
|
909
|
-
_files: Dict[str, Union[str, bytes]] = {}
|
|
910
|
-
_body_params: Optional[bytes] = None
|
|
911
|
-
|
|
912
|
-
# process the path parameters
|
|
913
|
-
if managed_worker is not None:
|
|
914
|
-
_path_params["managed-worker"] = managed_worker
|
|
915
|
-
# process the query parameters
|
|
916
|
-
if after is not None:
|
|
917
|
-
if isinstance(after, datetime):
|
|
918
|
-
_query_params.append(
|
|
919
|
-
(
|
|
920
|
-
"after",
|
|
921
|
-
after.strftime(self.api_client.configuration.datetime_format),
|
|
922
|
-
)
|
|
923
|
-
)
|
|
924
|
-
else:
|
|
925
|
-
_query_params.append(("after", after))
|
|
926
|
-
|
|
927
|
-
if before is not None:
|
|
928
|
-
if isinstance(before, datetime):
|
|
929
|
-
_query_params.append(
|
|
930
|
-
(
|
|
931
|
-
"before",
|
|
932
|
-
before.strftime(self.api_client.configuration.datetime_format),
|
|
933
|
-
)
|
|
934
|
-
)
|
|
935
|
-
else:
|
|
936
|
-
_query_params.append(("before", before))
|
|
937
|
-
|
|
938
|
-
if search is not None:
|
|
939
|
-
|
|
940
|
-
_query_params.append(("search", search))
|
|
941
|
-
|
|
942
|
-
if direction is not None:
|
|
943
|
-
|
|
944
|
-
_query_params.append(("direction", direction))
|
|
945
|
-
|
|
946
|
-
# process the header parameters
|
|
947
|
-
# process the form parameters
|
|
948
|
-
# process the body parameter
|
|
949
|
-
|
|
950
|
-
# set the HTTP header `Accept`
|
|
951
|
-
_header_params["Accept"] = self.api_client.select_header_accept(
|
|
952
|
-
["application/json"]
|
|
953
|
-
)
|
|
954
|
-
|
|
955
|
-
# authentication setting
|
|
956
|
-
_auth_settings: List[str] = ["cookieAuth", "bearerAuth"]
|
|
957
|
-
|
|
958
|
-
return self.api_client.param_serialize(
|
|
959
|
-
method="GET",
|
|
960
|
-
resource_path="/api/v1/cloud/managed-worker/{managed-worker}/logs",
|
|
961
|
-
path_params=_path_params,
|
|
962
|
-
query_params=_query_params,
|
|
963
|
-
header_params=_header_params,
|
|
964
|
-
body=_body_params,
|
|
965
|
-
post_params=_form_params,
|
|
966
|
-
files=_files,
|
|
967
|
-
auth_settings=_auth_settings,
|
|
968
|
-
collection_formats=_collection_formats,
|
|
969
|
-
_host=_host,
|
|
970
|
-
_request_auth=_request_auth,
|
|
971
|
-
)
|