cribl-control-plane 0.0.18__py3-none-any.whl → 0.0.20__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 +1141 -0
- cribl_control_plane/models/__init__.py +672 -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/cribllakedataset.py +74 -0
- cribl_control_plane/models/datasetmetadata.py +39 -0
- cribl_control_plane/models/datasetmetadataruninfo.py +28 -0
- cribl_control_plane/models/deletecribllakedatasetbylakeidandidop.py +47 -0
- cribl_control_plane/models/deletepacksbyidop.py +37 -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/getcribllakedatasetbylakeidandidop.py +47 -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/getworkersop.py +82 -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/updatecribllakedatasetbylakeidandidop.py +57 -0
- cribl_control_plane/models/updategroupsdeploybyidop.py +46 -0
- cribl_control_plane/models/updatepacksbyidop.py +65 -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 +989 -0
- cribl_control_plane/sdk.py +24 -0
- cribl_control_plane/teams.py +203 -0
- cribl_control_plane/workers_sdk.py +555 -0
- {cribl_control_plane-0.0.18.dist-info → cribl_control_plane-0.0.20.dist-info}/METADATA +47 -8
- {cribl_control_plane-0.0.18.dist-info → cribl_control_plane-0.0.20.dist-info}/RECORD +70 -8
- {cribl_control_plane-0.0.18.dist-info → cribl_control_plane-0.0.20.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,989 @@
|
|
|
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)
|
|
624
|
+
|
|
625
|
+
def delete_packs_by_id(
|
|
626
|
+
self,
|
|
627
|
+
*,
|
|
628
|
+
id: str,
|
|
629
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
630
|
+
server_url: Optional[str] = None,
|
|
631
|
+
timeout_ms: Optional[int] = None,
|
|
632
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
633
|
+
) -> models.DeletePacksByIDResponse:
|
|
634
|
+
r"""Uninstall Pack from the system
|
|
635
|
+
|
|
636
|
+
Uninstall Pack from the system
|
|
637
|
+
|
|
638
|
+
:param id: Pack name
|
|
639
|
+
:param retries: Override the default retry configuration for this method
|
|
640
|
+
:param server_url: Override the default server URL for this method
|
|
641
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
642
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
643
|
+
"""
|
|
644
|
+
base_url = None
|
|
645
|
+
url_variables = None
|
|
646
|
+
if timeout_ms is None:
|
|
647
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
648
|
+
|
|
649
|
+
if server_url is not None:
|
|
650
|
+
base_url = server_url
|
|
651
|
+
else:
|
|
652
|
+
base_url = self._get_url(base_url, url_variables)
|
|
653
|
+
|
|
654
|
+
request = models.DeletePacksByIDRequest(
|
|
655
|
+
id=id,
|
|
656
|
+
)
|
|
657
|
+
|
|
658
|
+
req = self._build_request(
|
|
659
|
+
method="DELETE",
|
|
660
|
+
path="/packs/{id}",
|
|
661
|
+
base_url=base_url,
|
|
662
|
+
url_variables=url_variables,
|
|
663
|
+
request=request,
|
|
664
|
+
request_body_required=False,
|
|
665
|
+
request_has_path_params=True,
|
|
666
|
+
request_has_query_params=True,
|
|
667
|
+
user_agent_header="user-agent",
|
|
668
|
+
accept_header_value="application/json",
|
|
669
|
+
http_headers=http_headers,
|
|
670
|
+
security=self.sdk_configuration.security,
|
|
671
|
+
timeout_ms=timeout_ms,
|
|
672
|
+
)
|
|
673
|
+
|
|
674
|
+
if retries == UNSET:
|
|
675
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
676
|
+
retries = self.sdk_configuration.retry_config
|
|
677
|
+
|
|
678
|
+
retry_config = None
|
|
679
|
+
if isinstance(retries, utils.RetryConfig):
|
|
680
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
681
|
+
|
|
682
|
+
http_res = self.do_request(
|
|
683
|
+
hook_ctx=HookContext(
|
|
684
|
+
config=self.sdk_configuration,
|
|
685
|
+
base_url=base_url or "",
|
|
686
|
+
operation_id="deletePacksById",
|
|
687
|
+
oauth2_scopes=[],
|
|
688
|
+
security_source=get_security_from_env(
|
|
689
|
+
self.sdk_configuration.security, models.Security
|
|
690
|
+
),
|
|
691
|
+
),
|
|
692
|
+
request=req,
|
|
693
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
694
|
+
retry_config=retry_config,
|
|
695
|
+
)
|
|
696
|
+
|
|
697
|
+
response_data: Any = None
|
|
698
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
699
|
+
return unmarshal_json_response(models.DeletePacksByIDResponse, http_res)
|
|
700
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
701
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
702
|
+
raise errors.Error(response_data, http_res)
|
|
703
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
704
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
705
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
706
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
707
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
708
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
709
|
+
|
|
710
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
711
|
+
|
|
712
|
+
async def delete_packs_by_id_async(
|
|
713
|
+
self,
|
|
714
|
+
*,
|
|
715
|
+
id: str,
|
|
716
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
717
|
+
server_url: Optional[str] = None,
|
|
718
|
+
timeout_ms: Optional[int] = None,
|
|
719
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
720
|
+
) -> models.DeletePacksByIDResponse:
|
|
721
|
+
r"""Uninstall Pack from the system
|
|
722
|
+
|
|
723
|
+
Uninstall Pack from the system
|
|
724
|
+
|
|
725
|
+
:param id: Pack name
|
|
726
|
+
:param retries: Override the default retry configuration for this method
|
|
727
|
+
:param server_url: Override the default server URL for this method
|
|
728
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
729
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
730
|
+
"""
|
|
731
|
+
base_url = None
|
|
732
|
+
url_variables = None
|
|
733
|
+
if timeout_ms is None:
|
|
734
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
735
|
+
|
|
736
|
+
if server_url is not None:
|
|
737
|
+
base_url = server_url
|
|
738
|
+
else:
|
|
739
|
+
base_url = self._get_url(base_url, url_variables)
|
|
740
|
+
|
|
741
|
+
request = models.DeletePacksByIDRequest(
|
|
742
|
+
id=id,
|
|
743
|
+
)
|
|
744
|
+
|
|
745
|
+
req = self._build_request_async(
|
|
746
|
+
method="DELETE",
|
|
747
|
+
path="/packs/{id}",
|
|
748
|
+
base_url=base_url,
|
|
749
|
+
url_variables=url_variables,
|
|
750
|
+
request=request,
|
|
751
|
+
request_body_required=False,
|
|
752
|
+
request_has_path_params=True,
|
|
753
|
+
request_has_query_params=True,
|
|
754
|
+
user_agent_header="user-agent",
|
|
755
|
+
accept_header_value="application/json",
|
|
756
|
+
http_headers=http_headers,
|
|
757
|
+
security=self.sdk_configuration.security,
|
|
758
|
+
timeout_ms=timeout_ms,
|
|
759
|
+
)
|
|
760
|
+
|
|
761
|
+
if retries == UNSET:
|
|
762
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
763
|
+
retries = self.sdk_configuration.retry_config
|
|
764
|
+
|
|
765
|
+
retry_config = None
|
|
766
|
+
if isinstance(retries, utils.RetryConfig):
|
|
767
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
768
|
+
|
|
769
|
+
http_res = await self.do_request_async(
|
|
770
|
+
hook_ctx=HookContext(
|
|
771
|
+
config=self.sdk_configuration,
|
|
772
|
+
base_url=base_url or "",
|
|
773
|
+
operation_id="deletePacksById",
|
|
774
|
+
oauth2_scopes=[],
|
|
775
|
+
security_source=get_security_from_env(
|
|
776
|
+
self.sdk_configuration.security, models.Security
|
|
777
|
+
),
|
|
778
|
+
),
|
|
779
|
+
request=req,
|
|
780
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
781
|
+
retry_config=retry_config,
|
|
782
|
+
)
|
|
783
|
+
|
|
784
|
+
response_data: Any = None
|
|
785
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
786
|
+
return unmarshal_json_response(models.DeletePacksByIDResponse, http_res)
|
|
787
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
788
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
789
|
+
raise errors.Error(response_data, http_res)
|
|
790
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
791
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
792
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
793
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
794
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
795
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
796
|
+
|
|
797
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
798
|
+
|
|
799
|
+
def update_packs_by_id(
|
|
800
|
+
self,
|
|
801
|
+
*,
|
|
802
|
+
id: str,
|
|
803
|
+
source: Optional[str] = None,
|
|
804
|
+
minor: Optional[str] = None,
|
|
805
|
+
spec: Optional[str] = None,
|
|
806
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
807
|
+
server_url: Optional[str] = None,
|
|
808
|
+
timeout_ms: Optional[int] = None,
|
|
809
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
810
|
+
) -> models.UpdatePacksByIDResponse:
|
|
811
|
+
r"""Upgrade Pack
|
|
812
|
+
|
|
813
|
+
Upgrade Pack
|
|
814
|
+
|
|
815
|
+
:param id: Pack name
|
|
816
|
+
:param source: body string required Pack source
|
|
817
|
+
:param minor: body boolean optional Only upgrade to minor/patch versions
|
|
818
|
+
:param spec: body string optional Specify a branch, tag or a semver spec
|
|
819
|
+
:param retries: Override the default retry configuration for this method
|
|
820
|
+
:param server_url: Override the default server URL for this method
|
|
821
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
822
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
823
|
+
"""
|
|
824
|
+
base_url = None
|
|
825
|
+
url_variables = None
|
|
826
|
+
if timeout_ms is None:
|
|
827
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
828
|
+
|
|
829
|
+
if server_url is not None:
|
|
830
|
+
base_url = server_url
|
|
831
|
+
else:
|
|
832
|
+
base_url = self._get_url(base_url, url_variables)
|
|
833
|
+
|
|
834
|
+
request = models.UpdatePacksByIDRequest(
|
|
835
|
+
id=id,
|
|
836
|
+
source=source,
|
|
837
|
+
minor=minor,
|
|
838
|
+
spec=spec,
|
|
839
|
+
)
|
|
840
|
+
|
|
841
|
+
req = self._build_request(
|
|
842
|
+
method="PATCH",
|
|
843
|
+
path="/packs/{id}",
|
|
844
|
+
base_url=base_url,
|
|
845
|
+
url_variables=url_variables,
|
|
846
|
+
request=request,
|
|
847
|
+
request_body_required=False,
|
|
848
|
+
request_has_path_params=True,
|
|
849
|
+
request_has_query_params=True,
|
|
850
|
+
user_agent_header="user-agent",
|
|
851
|
+
accept_header_value="application/json",
|
|
852
|
+
http_headers=http_headers,
|
|
853
|
+
security=self.sdk_configuration.security,
|
|
854
|
+
timeout_ms=timeout_ms,
|
|
855
|
+
)
|
|
856
|
+
|
|
857
|
+
if retries == UNSET:
|
|
858
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
859
|
+
retries = self.sdk_configuration.retry_config
|
|
860
|
+
|
|
861
|
+
retry_config = None
|
|
862
|
+
if isinstance(retries, utils.RetryConfig):
|
|
863
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
864
|
+
|
|
865
|
+
http_res = self.do_request(
|
|
866
|
+
hook_ctx=HookContext(
|
|
867
|
+
config=self.sdk_configuration,
|
|
868
|
+
base_url=base_url or "",
|
|
869
|
+
operation_id="updatePacksById",
|
|
870
|
+
oauth2_scopes=[],
|
|
871
|
+
security_source=get_security_from_env(
|
|
872
|
+
self.sdk_configuration.security, models.Security
|
|
873
|
+
),
|
|
874
|
+
),
|
|
875
|
+
request=req,
|
|
876
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
877
|
+
retry_config=retry_config,
|
|
878
|
+
)
|
|
879
|
+
|
|
880
|
+
response_data: Any = None
|
|
881
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
882
|
+
return unmarshal_json_response(models.UpdatePacksByIDResponse, http_res)
|
|
883
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
884
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
885
|
+
raise errors.Error(response_data, http_res)
|
|
886
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
887
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
888
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
889
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
890
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
891
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
892
|
+
|
|
893
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
894
|
+
|
|
895
|
+
async def update_packs_by_id_async(
|
|
896
|
+
self,
|
|
897
|
+
*,
|
|
898
|
+
id: str,
|
|
899
|
+
source: Optional[str] = None,
|
|
900
|
+
minor: Optional[str] = None,
|
|
901
|
+
spec: Optional[str] = None,
|
|
902
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
903
|
+
server_url: Optional[str] = None,
|
|
904
|
+
timeout_ms: Optional[int] = None,
|
|
905
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
906
|
+
) -> models.UpdatePacksByIDResponse:
|
|
907
|
+
r"""Upgrade Pack
|
|
908
|
+
|
|
909
|
+
Upgrade Pack
|
|
910
|
+
|
|
911
|
+
:param id: Pack name
|
|
912
|
+
:param source: body string required Pack source
|
|
913
|
+
:param minor: body boolean optional Only upgrade to minor/patch versions
|
|
914
|
+
:param spec: body string optional Specify a branch, tag or a semver spec
|
|
915
|
+
:param retries: Override the default retry configuration for this method
|
|
916
|
+
:param server_url: Override the default server URL for this method
|
|
917
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
918
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
919
|
+
"""
|
|
920
|
+
base_url = None
|
|
921
|
+
url_variables = None
|
|
922
|
+
if timeout_ms is None:
|
|
923
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
924
|
+
|
|
925
|
+
if server_url is not None:
|
|
926
|
+
base_url = server_url
|
|
927
|
+
else:
|
|
928
|
+
base_url = self._get_url(base_url, url_variables)
|
|
929
|
+
|
|
930
|
+
request = models.UpdatePacksByIDRequest(
|
|
931
|
+
id=id,
|
|
932
|
+
source=source,
|
|
933
|
+
minor=minor,
|
|
934
|
+
spec=spec,
|
|
935
|
+
)
|
|
936
|
+
|
|
937
|
+
req = self._build_request_async(
|
|
938
|
+
method="PATCH",
|
|
939
|
+
path="/packs/{id}",
|
|
940
|
+
base_url=base_url,
|
|
941
|
+
url_variables=url_variables,
|
|
942
|
+
request=request,
|
|
943
|
+
request_body_required=False,
|
|
944
|
+
request_has_path_params=True,
|
|
945
|
+
request_has_query_params=True,
|
|
946
|
+
user_agent_header="user-agent",
|
|
947
|
+
accept_header_value="application/json",
|
|
948
|
+
http_headers=http_headers,
|
|
949
|
+
security=self.sdk_configuration.security,
|
|
950
|
+
timeout_ms=timeout_ms,
|
|
951
|
+
)
|
|
952
|
+
|
|
953
|
+
if retries == UNSET:
|
|
954
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
955
|
+
retries = self.sdk_configuration.retry_config
|
|
956
|
+
|
|
957
|
+
retry_config = None
|
|
958
|
+
if isinstance(retries, utils.RetryConfig):
|
|
959
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
960
|
+
|
|
961
|
+
http_res = await self.do_request_async(
|
|
962
|
+
hook_ctx=HookContext(
|
|
963
|
+
config=self.sdk_configuration,
|
|
964
|
+
base_url=base_url or "",
|
|
965
|
+
operation_id="updatePacksById",
|
|
966
|
+
oauth2_scopes=[],
|
|
967
|
+
security_source=get_security_from_env(
|
|
968
|
+
self.sdk_configuration.security, models.Security
|
|
969
|
+
),
|
|
970
|
+
),
|
|
971
|
+
request=req,
|
|
972
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
973
|
+
retry_config=retry_config,
|
|
974
|
+
)
|
|
975
|
+
|
|
976
|
+
response_data: Any = None
|
|
977
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
978
|
+
return unmarshal_json_response(models.UpdatePacksByIDResponse, http_res)
|
|
979
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
980
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
981
|
+
raise errors.Error(response_data, http_res)
|
|
982
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
983
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
984
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
985
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
986
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
987
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
988
|
+
|
|
989
|
+
raise errors.APIError("Unexpected response received", http_res)
|