cribl-control-plane 0.0.17__py3-none-any.whl → 0.0.19__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 cribl-control-plane might be problematic. Click here for more details.
- cribl_control_plane/_version.py +3 -3
- cribl_control_plane/distributed.py +187 -0
- cribl_control_plane/errors/healthstatus_error.py +1 -1
- cribl_control_plane/groups_sdk.py +1291 -0
- cribl_control_plane/lake.py +479 -0
- cribl_control_plane/models/__init__.py +843 -3
- cribl_control_plane/models/appmode.py +13 -0
- cribl_control_plane/models/cacheconnection.py +44 -0
- cribl_control_plane/models/cacheconnectionbackfillstatus.py +12 -0
- cribl_control_plane/models/cloudprovider.py +9 -0
- cribl_control_plane/models/commit.py +30 -0
- cribl_control_plane/models/configgroup.py +116 -0
- cribl_control_plane/models/configgroupcloud.py +48 -0
- cribl_control_plane/models/configgrouplookups.py +34 -0
- cribl_control_plane/models/createcribllakedatasetbylakeidop.py +48 -0
- cribl_control_plane/models/createpacksop.py +24 -0
- cribl_control_plane/models/createproductsgroupsbyproductop.py +54 -0
- cribl_control_plane/models/createversioncommitop.py +24 -0
- cribl_control_plane/models/createversionpushop.py +23 -0
- cribl_control_plane/models/createversionrevertop.py +47 -0
- cribl_control_plane/models/createversionsyncop.py +23 -0
- cribl_control_plane/models/createversionundoop.py +37 -0
- cribl_control_plane/models/cribllakedataset.py +74 -0
- cribl_control_plane/models/datasetmetadata.py +39 -0
- cribl_control_plane/models/datasetmetadataruninfo.py +28 -0
- cribl_control_plane/models/deployrequest.py +18 -0
- cribl_control_plane/models/deployrequestlookups.py +28 -0
- cribl_control_plane/models/distributedsummary.py +63 -0
- cribl_control_plane/models/getcribllakedatasetbylakeidop.py +40 -0
- cribl_control_plane/models/getgroupsaclbyidop.py +63 -0
- cribl_control_plane/models/getgroupsbyidop.py +49 -0
- cribl_control_plane/models/getgroupsconfigversionbyidop.py +36 -0
- cribl_control_plane/models/getpacksop.py +40 -0
- cribl_control_plane/models/getproductsgroupsaclteamsbyproductandidop.py +78 -0
- cribl_control_plane/models/getproductsgroupsbyproductop.py +58 -0
- cribl_control_plane/models/getsummaryop.py +46 -0
- cribl_control_plane/models/getsummaryworkersop.py +39 -0
- cribl_control_plane/models/getversionbranchop.py +23 -0
- cribl_control_plane/models/getversioncountop.py +47 -0
- cribl_control_plane/models/getversioncurrentbranchop.py +23 -0
- cribl_control_plane/models/getversiondiffop.py +63 -0
- cribl_control_plane/models/getversionfilesop.py +48 -0
- cribl_control_plane/models/getversioninfoop.py +24 -0
- cribl_control_plane/models/getversionshowop.py +63 -0
- cribl_control_plane/models/getversionstatusop.py +38 -0
- cribl_control_plane/models/getworkersop.py +82 -0
- cribl_control_plane/models/gitcommitparams.py +23 -0
- cribl_control_plane/models/gitcommitsummary.py +68 -0
- cribl_control_plane/models/gitfile.py +20 -0
- cribl_control_plane/models/gitfilesresponse.py +22 -0
- cribl_control_plane/models/gitinfo.py +23 -0
- cribl_control_plane/models/gitrevertparams.py +20 -0
- cribl_control_plane/models/gitrevertresult.py +48 -0
- cribl_control_plane/models/gitstatusresult.py +73 -0
- cribl_control_plane/models/hbcriblinfo.py +80 -0
- cribl_control_plane/models/hbleaderinfo.py +23 -0
- cribl_control_plane/models/healthstatus.py +3 -3
- cribl_control_plane/models/heartbeatmetadata.py +122 -0
- cribl_control_plane/models/lakedatasetsearchconfig.py +18 -0
- cribl_control_plane/models/lakehouseconnectiontype.py +9 -0
- cribl_control_plane/models/lookupversions.py +13 -0
- cribl_control_plane/models/masterworkerentry.py +84 -0
- cribl_control_plane/models/nodeactiveupgradestatus.py +10 -0
- cribl_control_plane/models/nodefailedupgradestatus.py +9 -0
- cribl_control_plane/models/nodeprovidedinfo.py +184 -0
- cribl_control_plane/models/nodeskippedupgradestatus.py +11 -0
- cribl_control_plane/models/nodeupgradestate.py +11 -0
- cribl_control_plane/models/nodeupgradestatus.py +30 -0
- cribl_control_plane/models/packinfo.py +73 -0
- cribl_control_plane/models/packinstallinfo.py +76 -0
- cribl_control_plane/models/packrequestbody.py +75 -0
- cribl_control_plane/models/rbacresource.py +14 -0
- cribl_control_plane/models/resourcepolicy.py +24 -0
- cribl_control_plane/models/restartresponse.py +26 -0
- cribl_control_plane/models/teamaccesscontrollist.py +18 -0
- cribl_control_plane/models/updategroupsdeploybyidop.py +46 -0
- cribl_control_plane/models/updatepacksop.py +37 -0
- cribl_control_plane/models/updateworkersrestartop.py +24 -0
- cribl_control_plane/models/useraccesscontrollist.py +18 -0
- cribl_control_plane/packs.py +623 -0
- cribl_control_plane/sdk.py +28 -0
- cribl_control_plane/teams.py +203 -0
- cribl_control_plane/versioning.py +2309 -0
- cribl_control_plane/workers_sdk.py +555 -0
- {cribl_control_plane-0.0.17.dist-info → cribl_control_plane-0.0.19.dist-info}/METADATA +58 -8
- {cribl_control_plane-0.0.17.dist-info → cribl_control_plane-0.0.19.dist-info}/RECORD +87 -8
- {cribl_control_plane-0.0.17.dist-info → cribl_control_plane-0.0.19.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,623 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from .basesdk import BaseSDK
|
|
4
|
+
from cribl_control_plane import errors, models, utils
|
|
5
|
+
from cribl_control_plane._hooks import HookContext
|
|
6
|
+
from cribl_control_plane.types import OptionalNullable, UNSET
|
|
7
|
+
from cribl_control_plane.utils import get_security_from_env
|
|
8
|
+
from cribl_control_plane.utils.unmarshal_json_response import unmarshal_json_response
|
|
9
|
+
from typing import Any, List, Mapping, Optional, Union
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Packs(BaseSDK):
|
|
13
|
+
r"""Actions related to Packs"""
|
|
14
|
+
|
|
15
|
+
def create_packs(
|
|
16
|
+
self,
|
|
17
|
+
*,
|
|
18
|
+
id: str,
|
|
19
|
+
source: str,
|
|
20
|
+
allow_custom_functions: Optional[bool] = None,
|
|
21
|
+
author: Optional[str] = None,
|
|
22
|
+
description: Optional[str] = None,
|
|
23
|
+
display_name: Optional[str] = None,
|
|
24
|
+
exports: Optional[List[str]] = None,
|
|
25
|
+
force: Optional[bool] = None,
|
|
26
|
+
inputs: Optional[float] = None,
|
|
27
|
+
min_log_stream_version: Optional[str] = None,
|
|
28
|
+
outputs: Optional[float] = None,
|
|
29
|
+
spec: Optional[str] = None,
|
|
30
|
+
tags: Optional[
|
|
31
|
+
Union[models.PackRequestBodyTags, models.PackRequestBodyTagsTypedDict]
|
|
32
|
+
] = None,
|
|
33
|
+
version: Optional[str] = None,
|
|
34
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
35
|
+
server_url: Optional[str] = None,
|
|
36
|
+
timeout_ms: Optional[int] = None,
|
|
37
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
38
|
+
) -> models.CreatePacksResponse:
|
|
39
|
+
r"""Install Pack
|
|
40
|
+
|
|
41
|
+
Install Pack
|
|
42
|
+
|
|
43
|
+
:param id:
|
|
44
|
+
:param source:
|
|
45
|
+
:param allow_custom_functions:
|
|
46
|
+
:param author:
|
|
47
|
+
:param description:
|
|
48
|
+
:param display_name:
|
|
49
|
+
:param exports:
|
|
50
|
+
:param force:
|
|
51
|
+
:param inputs:
|
|
52
|
+
:param min_log_stream_version:
|
|
53
|
+
:param outputs:
|
|
54
|
+
:param spec:
|
|
55
|
+
:param tags:
|
|
56
|
+
:param version:
|
|
57
|
+
:param retries: Override the default retry configuration for this method
|
|
58
|
+
:param server_url: Override the default server URL for this method
|
|
59
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
60
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
61
|
+
"""
|
|
62
|
+
base_url = None
|
|
63
|
+
url_variables = None
|
|
64
|
+
if timeout_ms is None:
|
|
65
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
66
|
+
|
|
67
|
+
if server_url is not None:
|
|
68
|
+
base_url = server_url
|
|
69
|
+
else:
|
|
70
|
+
base_url = self._get_url(base_url, url_variables)
|
|
71
|
+
|
|
72
|
+
request = models.PackRequestBody(
|
|
73
|
+
allow_custom_functions=allow_custom_functions,
|
|
74
|
+
author=author,
|
|
75
|
+
description=description,
|
|
76
|
+
display_name=display_name,
|
|
77
|
+
exports=exports,
|
|
78
|
+
force=force,
|
|
79
|
+
id=id,
|
|
80
|
+
inputs=inputs,
|
|
81
|
+
min_log_stream_version=min_log_stream_version,
|
|
82
|
+
outputs=outputs,
|
|
83
|
+
source=source,
|
|
84
|
+
spec=spec,
|
|
85
|
+
tags=utils.get_pydantic_model(tags, Optional[models.PackRequestBodyTags]),
|
|
86
|
+
version=version,
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
req = self._build_request(
|
|
90
|
+
method="POST",
|
|
91
|
+
path="/packs",
|
|
92
|
+
base_url=base_url,
|
|
93
|
+
url_variables=url_variables,
|
|
94
|
+
request=request,
|
|
95
|
+
request_body_required=True,
|
|
96
|
+
request_has_path_params=False,
|
|
97
|
+
request_has_query_params=True,
|
|
98
|
+
user_agent_header="user-agent",
|
|
99
|
+
accept_header_value="application/json",
|
|
100
|
+
http_headers=http_headers,
|
|
101
|
+
security=self.sdk_configuration.security,
|
|
102
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
103
|
+
request, False, False, "json", models.PackRequestBody
|
|
104
|
+
),
|
|
105
|
+
timeout_ms=timeout_ms,
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
if retries == UNSET:
|
|
109
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
110
|
+
retries = self.sdk_configuration.retry_config
|
|
111
|
+
|
|
112
|
+
retry_config = None
|
|
113
|
+
if isinstance(retries, utils.RetryConfig):
|
|
114
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
115
|
+
|
|
116
|
+
http_res = self.do_request(
|
|
117
|
+
hook_ctx=HookContext(
|
|
118
|
+
config=self.sdk_configuration,
|
|
119
|
+
base_url=base_url or "",
|
|
120
|
+
operation_id="createPacks",
|
|
121
|
+
oauth2_scopes=[],
|
|
122
|
+
security_source=get_security_from_env(
|
|
123
|
+
self.sdk_configuration.security, models.Security
|
|
124
|
+
),
|
|
125
|
+
),
|
|
126
|
+
request=req,
|
|
127
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
128
|
+
retry_config=retry_config,
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
response_data: Any = None
|
|
132
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
133
|
+
return unmarshal_json_response(models.CreatePacksResponse, http_res)
|
|
134
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
135
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
136
|
+
raise errors.Error(response_data, http_res)
|
|
137
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
138
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
139
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
140
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
141
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
142
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
143
|
+
|
|
144
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
145
|
+
|
|
146
|
+
async def create_packs_async(
|
|
147
|
+
self,
|
|
148
|
+
*,
|
|
149
|
+
id: str,
|
|
150
|
+
source: str,
|
|
151
|
+
allow_custom_functions: Optional[bool] = None,
|
|
152
|
+
author: Optional[str] = None,
|
|
153
|
+
description: Optional[str] = None,
|
|
154
|
+
display_name: Optional[str] = None,
|
|
155
|
+
exports: Optional[List[str]] = None,
|
|
156
|
+
force: Optional[bool] = None,
|
|
157
|
+
inputs: Optional[float] = None,
|
|
158
|
+
min_log_stream_version: Optional[str] = None,
|
|
159
|
+
outputs: Optional[float] = None,
|
|
160
|
+
spec: Optional[str] = None,
|
|
161
|
+
tags: Optional[
|
|
162
|
+
Union[models.PackRequestBodyTags, models.PackRequestBodyTagsTypedDict]
|
|
163
|
+
] = None,
|
|
164
|
+
version: Optional[str] = None,
|
|
165
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
166
|
+
server_url: Optional[str] = None,
|
|
167
|
+
timeout_ms: Optional[int] = None,
|
|
168
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
169
|
+
) -> models.CreatePacksResponse:
|
|
170
|
+
r"""Install Pack
|
|
171
|
+
|
|
172
|
+
Install Pack
|
|
173
|
+
|
|
174
|
+
:param id:
|
|
175
|
+
:param source:
|
|
176
|
+
:param allow_custom_functions:
|
|
177
|
+
:param author:
|
|
178
|
+
:param description:
|
|
179
|
+
:param display_name:
|
|
180
|
+
:param exports:
|
|
181
|
+
:param force:
|
|
182
|
+
:param inputs:
|
|
183
|
+
:param min_log_stream_version:
|
|
184
|
+
:param outputs:
|
|
185
|
+
:param spec:
|
|
186
|
+
:param tags:
|
|
187
|
+
:param version:
|
|
188
|
+
:param retries: Override the default retry configuration for this method
|
|
189
|
+
:param server_url: Override the default server URL for this method
|
|
190
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
191
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
192
|
+
"""
|
|
193
|
+
base_url = None
|
|
194
|
+
url_variables = None
|
|
195
|
+
if timeout_ms is None:
|
|
196
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
197
|
+
|
|
198
|
+
if server_url is not None:
|
|
199
|
+
base_url = server_url
|
|
200
|
+
else:
|
|
201
|
+
base_url = self._get_url(base_url, url_variables)
|
|
202
|
+
|
|
203
|
+
request = models.PackRequestBody(
|
|
204
|
+
allow_custom_functions=allow_custom_functions,
|
|
205
|
+
author=author,
|
|
206
|
+
description=description,
|
|
207
|
+
display_name=display_name,
|
|
208
|
+
exports=exports,
|
|
209
|
+
force=force,
|
|
210
|
+
id=id,
|
|
211
|
+
inputs=inputs,
|
|
212
|
+
min_log_stream_version=min_log_stream_version,
|
|
213
|
+
outputs=outputs,
|
|
214
|
+
source=source,
|
|
215
|
+
spec=spec,
|
|
216
|
+
tags=utils.get_pydantic_model(tags, Optional[models.PackRequestBodyTags]),
|
|
217
|
+
version=version,
|
|
218
|
+
)
|
|
219
|
+
|
|
220
|
+
req = self._build_request_async(
|
|
221
|
+
method="POST",
|
|
222
|
+
path="/packs",
|
|
223
|
+
base_url=base_url,
|
|
224
|
+
url_variables=url_variables,
|
|
225
|
+
request=request,
|
|
226
|
+
request_body_required=True,
|
|
227
|
+
request_has_path_params=False,
|
|
228
|
+
request_has_query_params=True,
|
|
229
|
+
user_agent_header="user-agent",
|
|
230
|
+
accept_header_value="application/json",
|
|
231
|
+
http_headers=http_headers,
|
|
232
|
+
security=self.sdk_configuration.security,
|
|
233
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
234
|
+
request, False, False, "json", models.PackRequestBody
|
|
235
|
+
),
|
|
236
|
+
timeout_ms=timeout_ms,
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
if retries == UNSET:
|
|
240
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
241
|
+
retries = self.sdk_configuration.retry_config
|
|
242
|
+
|
|
243
|
+
retry_config = None
|
|
244
|
+
if isinstance(retries, utils.RetryConfig):
|
|
245
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
246
|
+
|
|
247
|
+
http_res = await self.do_request_async(
|
|
248
|
+
hook_ctx=HookContext(
|
|
249
|
+
config=self.sdk_configuration,
|
|
250
|
+
base_url=base_url or "",
|
|
251
|
+
operation_id="createPacks",
|
|
252
|
+
oauth2_scopes=[],
|
|
253
|
+
security_source=get_security_from_env(
|
|
254
|
+
self.sdk_configuration.security, models.Security
|
|
255
|
+
),
|
|
256
|
+
),
|
|
257
|
+
request=req,
|
|
258
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
259
|
+
retry_config=retry_config,
|
|
260
|
+
)
|
|
261
|
+
|
|
262
|
+
response_data: Any = None
|
|
263
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
264
|
+
return unmarshal_json_response(models.CreatePacksResponse, http_res)
|
|
265
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
266
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
267
|
+
raise errors.Error(response_data, http_res)
|
|
268
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
269
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
270
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
271
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
272
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
273
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
274
|
+
|
|
275
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
276
|
+
|
|
277
|
+
def get_packs(
|
|
278
|
+
self,
|
|
279
|
+
*,
|
|
280
|
+
with_: Optional[str] = None,
|
|
281
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
282
|
+
server_url: Optional[str] = None,
|
|
283
|
+
timeout_ms: Optional[int] = None,
|
|
284
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
285
|
+
) -> models.GetPacksResponse:
|
|
286
|
+
r"""Get info on packs
|
|
287
|
+
|
|
288
|
+
Get info on packs
|
|
289
|
+
|
|
290
|
+
:param with_: Comma separated list of entities, \"outputs\", \"inputs\"
|
|
291
|
+
:param retries: Override the default retry configuration for this method
|
|
292
|
+
:param server_url: Override the default server URL for this method
|
|
293
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
294
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
295
|
+
"""
|
|
296
|
+
base_url = None
|
|
297
|
+
url_variables = None
|
|
298
|
+
if timeout_ms is None:
|
|
299
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
300
|
+
|
|
301
|
+
if server_url is not None:
|
|
302
|
+
base_url = server_url
|
|
303
|
+
else:
|
|
304
|
+
base_url = self._get_url(base_url, url_variables)
|
|
305
|
+
|
|
306
|
+
request = models.GetPacksRequest(
|
|
307
|
+
with_=with_,
|
|
308
|
+
)
|
|
309
|
+
|
|
310
|
+
req = self._build_request(
|
|
311
|
+
method="GET",
|
|
312
|
+
path="/packs",
|
|
313
|
+
base_url=base_url,
|
|
314
|
+
url_variables=url_variables,
|
|
315
|
+
request=request,
|
|
316
|
+
request_body_required=False,
|
|
317
|
+
request_has_path_params=False,
|
|
318
|
+
request_has_query_params=True,
|
|
319
|
+
user_agent_header="user-agent",
|
|
320
|
+
accept_header_value="application/json",
|
|
321
|
+
http_headers=http_headers,
|
|
322
|
+
security=self.sdk_configuration.security,
|
|
323
|
+
timeout_ms=timeout_ms,
|
|
324
|
+
)
|
|
325
|
+
|
|
326
|
+
if retries == UNSET:
|
|
327
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
328
|
+
retries = self.sdk_configuration.retry_config
|
|
329
|
+
|
|
330
|
+
retry_config = None
|
|
331
|
+
if isinstance(retries, utils.RetryConfig):
|
|
332
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
333
|
+
|
|
334
|
+
http_res = self.do_request(
|
|
335
|
+
hook_ctx=HookContext(
|
|
336
|
+
config=self.sdk_configuration,
|
|
337
|
+
base_url=base_url or "",
|
|
338
|
+
operation_id="getPacks",
|
|
339
|
+
oauth2_scopes=[],
|
|
340
|
+
security_source=get_security_from_env(
|
|
341
|
+
self.sdk_configuration.security, models.Security
|
|
342
|
+
),
|
|
343
|
+
),
|
|
344
|
+
request=req,
|
|
345
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
346
|
+
retry_config=retry_config,
|
|
347
|
+
)
|
|
348
|
+
|
|
349
|
+
response_data: Any = None
|
|
350
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
351
|
+
return unmarshal_json_response(models.GetPacksResponse, http_res)
|
|
352
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
353
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
354
|
+
raise errors.Error(response_data, http_res)
|
|
355
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
356
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
357
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
358
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
359
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
360
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
361
|
+
|
|
362
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
363
|
+
|
|
364
|
+
async def get_packs_async(
|
|
365
|
+
self,
|
|
366
|
+
*,
|
|
367
|
+
with_: Optional[str] = None,
|
|
368
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
369
|
+
server_url: Optional[str] = None,
|
|
370
|
+
timeout_ms: Optional[int] = None,
|
|
371
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
372
|
+
) -> models.GetPacksResponse:
|
|
373
|
+
r"""Get info on packs
|
|
374
|
+
|
|
375
|
+
Get info on packs
|
|
376
|
+
|
|
377
|
+
:param with_: Comma separated list of entities, \"outputs\", \"inputs\"
|
|
378
|
+
:param retries: Override the default retry configuration for this method
|
|
379
|
+
:param server_url: Override the default server URL for this method
|
|
380
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
381
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
382
|
+
"""
|
|
383
|
+
base_url = None
|
|
384
|
+
url_variables = None
|
|
385
|
+
if timeout_ms is None:
|
|
386
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
387
|
+
|
|
388
|
+
if server_url is not None:
|
|
389
|
+
base_url = server_url
|
|
390
|
+
else:
|
|
391
|
+
base_url = self._get_url(base_url, url_variables)
|
|
392
|
+
|
|
393
|
+
request = models.GetPacksRequest(
|
|
394
|
+
with_=with_,
|
|
395
|
+
)
|
|
396
|
+
|
|
397
|
+
req = self._build_request_async(
|
|
398
|
+
method="GET",
|
|
399
|
+
path="/packs",
|
|
400
|
+
base_url=base_url,
|
|
401
|
+
url_variables=url_variables,
|
|
402
|
+
request=request,
|
|
403
|
+
request_body_required=False,
|
|
404
|
+
request_has_path_params=False,
|
|
405
|
+
request_has_query_params=True,
|
|
406
|
+
user_agent_header="user-agent",
|
|
407
|
+
accept_header_value="application/json",
|
|
408
|
+
http_headers=http_headers,
|
|
409
|
+
security=self.sdk_configuration.security,
|
|
410
|
+
timeout_ms=timeout_ms,
|
|
411
|
+
)
|
|
412
|
+
|
|
413
|
+
if retries == UNSET:
|
|
414
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
415
|
+
retries = self.sdk_configuration.retry_config
|
|
416
|
+
|
|
417
|
+
retry_config = None
|
|
418
|
+
if isinstance(retries, utils.RetryConfig):
|
|
419
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
420
|
+
|
|
421
|
+
http_res = await self.do_request_async(
|
|
422
|
+
hook_ctx=HookContext(
|
|
423
|
+
config=self.sdk_configuration,
|
|
424
|
+
base_url=base_url or "",
|
|
425
|
+
operation_id="getPacks",
|
|
426
|
+
oauth2_scopes=[],
|
|
427
|
+
security_source=get_security_from_env(
|
|
428
|
+
self.sdk_configuration.security, models.Security
|
|
429
|
+
),
|
|
430
|
+
),
|
|
431
|
+
request=req,
|
|
432
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
433
|
+
retry_config=retry_config,
|
|
434
|
+
)
|
|
435
|
+
|
|
436
|
+
response_data: Any = None
|
|
437
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
438
|
+
return unmarshal_json_response(models.GetPacksResponse, http_res)
|
|
439
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
440
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
441
|
+
raise errors.Error(response_data, http_res)
|
|
442
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
443
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
444
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
445
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
446
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
447
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
448
|
+
|
|
449
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
450
|
+
|
|
451
|
+
def update_packs(
|
|
452
|
+
self,
|
|
453
|
+
*,
|
|
454
|
+
filename: Optional[str] = None,
|
|
455
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
456
|
+
server_url: Optional[str] = None,
|
|
457
|
+
timeout_ms: Optional[int] = None,
|
|
458
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
459
|
+
) -> models.UpdatePacksResponse:
|
|
460
|
+
r"""Upload Pack
|
|
461
|
+
|
|
462
|
+
Upload Pack
|
|
463
|
+
|
|
464
|
+
:param filename: the file to upload
|
|
465
|
+
:param retries: Override the default retry configuration for this method
|
|
466
|
+
:param server_url: Override the default server URL for this method
|
|
467
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
468
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
469
|
+
"""
|
|
470
|
+
base_url = None
|
|
471
|
+
url_variables = None
|
|
472
|
+
if timeout_ms is None:
|
|
473
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
474
|
+
|
|
475
|
+
if server_url is not None:
|
|
476
|
+
base_url = server_url
|
|
477
|
+
else:
|
|
478
|
+
base_url = self._get_url(base_url, url_variables)
|
|
479
|
+
|
|
480
|
+
request = models.UpdatePacksRequest(
|
|
481
|
+
filename=filename,
|
|
482
|
+
)
|
|
483
|
+
|
|
484
|
+
req = self._build_request(
|
|
485
|
+
method="PUT",
|
|
486
|
+
path="/packs",
|
|
487
|
+
base_url=base_url,
|
|
488
|
+
url_variables=url_variables,
|
|
489
|
+
request=request,
|
|
490
|
+
request_body_required=False,
|
|
491
|
+
request_has_path_params=False,
|
|
492
|
+
request_has_query_params=True,
|
|
493
|
+
user_agent_header="user-agent",
|
|
494
|
+
accept_header_value="application/json",
|
|
495
|
+
http_headers=http_headers,
|
|
496
|
+
security=self.sdk_configuration.security,
|
|
497
|
+
timeout_ms=timeout_ms,
|
|
498
|
+
)
|
|
499
|
+
|
|
500
|
+
if retries == UNSET:
|
|
501
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
502
|
+
retries = self.sdk_configuration.retry_config
|
|
503
|
+
|
|
504
|
+
retry_config = None
|
|
505
|
+
if isinstance(retries, utils.RetryConfig):
|
|
506
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
507
|
+
|
|
508
|
+
http_res = self.do_request(
|
|
509
|
+
hook_ctx=HookContext(
|
|
510
|
+
config=self.sdk_configuration,
|
|
511
|
+
base_url=base_url or "",
|
|
512
|
+
operation_id="updatePacks",
|
|
513
|
+
oauth2_scopes=[],
|
|
514
|
+
security_source=get_security_from_env(
|
|
515
|
+
self.sdk_configuration.security, models.Security
|
|
516
|
+
),
|
|
517
|
+
),
|
|
518
|
+
request=req,
|
|
519
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
520
|
+
retry_config=retry_config,
|
|
521
|
+
)
|
|
522
|
+
|
|
523
|
+
response_data: Any = None
|
|
524
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
525
|
+
return unmarshal_json_response(models.UpdatePacksResponse, http_res)
|
|
526
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
527
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
528
|
+
raise errors.Error(response_data, http_res)
|
|
529
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
530
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
531
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
532
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
533
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
534
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
535
|
+
|
|
536
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
537
|
+
|
|
538
|
+
async def update_packs_async(
|
|
539
|
+
self,
|
|
540
|
+
*,
|
|
541
|
+
filename: Optional[str] = None,
|
|
542
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
543
|
+
server_url: Optional[str] = None,
|
|
544
|
+
timeout_ms: Optional[int] = None,
|
|
545
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
546
|
+
) -> models.UpdatePacksResponse:
|
|
547
|
+
r"""Upload Pack
|
|
548
|
+
|
|
549
|
+
Upload Pack
|
|
550
|
+
|
|
551
|
+
:param filename: the file to upload
|
|
552
|
+
:param retries: Override the default retry configuration for this method
|
|
553
|
+
:param server_url: Override the default server URL for this method
|
|
554
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
555
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
556
|
+
"""
|
|
557
|
+
base_url = None
|
|
558
|
+
url_variables = None
|
|
559
|
+
if timeout_ms is None:
|
|
560
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
561
|
+
|
|
562
|
+
if server_url is not None:
|
|
563
|
+
base_url = server_url
|
|
564
|
+
else:
|
|
565
|
+
base_url = self._get_url(base_url, url_variables)
|
|
566
|
+
|
|
567
|
+
request = models.UpdatePacksRequest(
|
|
568
|
+
filename=filename,
|
|
569
|
+
)
|
|
570
|
+
|
|
571
|
+
req = self._build_request_async(
|
|
572
|
+
method="PUT",
|
|
573
|
+
path="/packs",
|
|
574
|
+
base_url=base_url,
|
|
575
|
+
url_variables=url_variables,
|
|
576
|
+
request=request,
|
|
577
|
+
request_body_required=False,
|
|
578
|
+
request_has_path_params=False,
|
|
579
|
+
request_has_query_params=True,
|
|
580
|
+
user_agent_header="user-agent",
|
|
581
|
+
accept_header_value="application/json",
|
|
582
|
+
http_headers=http_headers,
|
|
583
|
+
security=self.sdk_configuration.security,
|
|
584
|
+
timeout_ms=timeout_ms,
|
|
585
|
+
)
|
|
586
|
+
|
|
587
|
+
if retries == UNSET:
|
|
588
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
589
|
+
retries = self.sdk_configuration.retry_config
|
|
590
|
+
|
|
591
|
+
retry_config = None
|
|
592
|
+
if isinstance(retries, utils.RetryConfig):
|
|
593
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
594
|
+
|
|
595
|
+
http_res = await self.do_request_async(
|
|
596
|
+
hook_ctx=HookContext(
|
|
597
|
+
config=self.sdk_configuration,
|
|
598
|
+
base_url=base_url or "",
|
|
599
|
+
operation_id="updatePacks",
|
|
600
|
+
oauth2_scopes=[],
|
|
601
|
+
security_source=get_security_from_env(
|
|
602
|
+
self.sdk_configuration.security, models.Security
|
|
603
|
+
),
|
|
604
|
+
),
|
|
605
|
+
request=req,
|
|
606
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
607
|
+
retry_config=retry_config,
|
|
608
|
+
)
|
|
609
|
+
|
|
610
|
+
response_data: Any = None
|
|
611
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
612
|
+
return unmarshal_json_response(models.UpdatePacksResponse, http_res)
|
|
613
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
614
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
615
|
+
raise errors.Error(response_data, http_res)
|
|
616
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
617
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
618
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
619
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
620
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
621
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
622
|
+
|
|
623
|
+
raise errors.APIError("Unexpected response received", http_res)
|
cribl_control_plane/sdk.py
CHANGED
|
@@ -16,15 +16,24 @@ import weakref
|
|
|
16
16
|
if TYPE_CHECKING:
|
|
17
17
|
from cribl_control_plane.auth_sdk import AuthSDK
|
|
18
18
|
from cribl_control_plane.destinations import Destinations
|
|
19
|
+
from cribl_control_plane.distributed import Distributed
|
|
20
|
+
from cribl_control_plane.groups_sdk import GroupsSDK
|
|
19
21
|
from cribl_control_plane.health import Health
|
|
22
|
+
from cribl_control_plane.lake import Lake
|
|
23
|
+
from cribl_control_plane.packs import Packs
|
|
20
24
|
from cribl_control_plane.pipelines import Pipelines
|
|
21
25
|
from cribl_control_plane.routes_sdk import RoutesSDK
|
|
22
26
|
from cribl_control_plane.sources import Sources
|
|
27
|
+
from cribl_control_plane.teams import Teams
|
|
28
|
+
from cribl_control_plane.versioning import Versioning
|
|
29
|
+
from cribl_control_plane.workers_sdk import WorkersSDK
|
|
23
30
|
|
|
24
31
|
|
|
25
32
|
class CriblControlPlane(BaseSDK):
|
|
26
33
|
r"""Cribl API Reference: This API Reference lists available REST endpoints, along with their supported operations for accessing, creating, updating, or deleting resources. See our complementary product documentation at [docs.cribl.io](http://docs.cribl.io)."""
|
|
27
34
|
|
|
35
|
+
lake: "Lake"
|
|
36
|
+
r"""Actions related to Lake"""
|
|
28
37
|
sources: "Sources"
|
|
29
38
|
destinations: "Destinations"
|
|
30
39
|
pipelines: "Pipelines"
|
|
@@ -33,15 +42,34 @@ class CriblControlPlane(BaseSDK):
|
|
|
33
42
|
r"""Actions related to Routes"""
|
|
34
43
|
auth: "AuthSDK"
|
|
35
44
|
r"""Actions related to authentication. Do not use the /auth endpoints in Cribl.Cloud deployments. Instead, follow the instructions at https://docs.cribl.io/stream/api-tutorials/#criblcloud to authenticate for Cribl.Cloud."""
|
|
45
|
+
workers: "WorkersSDK"
|
|
46
|
+
r"""Actions related to Workers"""
|
|
47
|
+
distributed: "Distributed"
|
|
48
|
+
r"""Actions related to Distributed"""
|
|
36
49
|
health: "Health"
|
|
37
50
|
r"""Actions related to REST server health"""
|
|
51
|
+
packs: "Packs"
|
|
52
|
+
r"""Actions related to Packs"""
|
|
53
|
+
versioning: "Versioning"
|
|
54
|
+
r"""Actions related to Versioning"""
|
|
55
|
+
groups: "GroupsSDK"
|
|
56
|
+
r"""Actions related to Groups"""
|
|
57
|
+
teams: "Teams"
|
|
58
|
+
r"""Actions related to Teams"""
|
|
38
59
|
_sub_sdk_map = {
|
|
60
|
+
"lake": ("cribl_control_plane.lake", "Lake"),
|
|
39
61
|
"sources": ("cribl_control_plane.sources", "Sources"),
|
|
40
62
|
"destinations": ("cribl_control_plane.destinations", "Destinations"),
|
|
41
63
|
"pipelines": ("cribl_control_plane.pipelines", "Pipelines"),
|
|
42
64
|
"routes": ("cribl_control_plane.routes_sdk", "RoutesSDK"),
|
|
43
65
|
"auth": ("cribl_control_plane.auth_sdk", "AuthSDK"),
|
|
66
|
+
"workers": ("cribl_control_plane.workers_sdk", "WorkersSDK"),
|
|
67
|
+
"distributed": ("cribl_control_plane.distributed", "Distributed"),
|
|
44
68
|
"health": ("cribl_control_plane.health", "Health"),
|
|
69
|
+
"packs": ("cribl_control_plane.packs", "Packs"),
|
|
70
|
+
"versioning": ("cribl_control_plane.versioning", "Versioning"),
|
|
71
|
+
"groups": ("cribl_control_plane.groups_sdk", "GroupsSDK"),
|
|
72
|
+
"teams": ("cribl_control_plane.teams", "Teams"),
|
|
45
73
|
}
|
|
46
74
|
|
|
47
75
|
def __init__(
|