cribl-control-plane 0.2.1rc1__py3-none-any.whl → 0.2.1rc3__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 +4 -4
- cribl_control_plane/errors/__init__.py +8 -5
- cribl_control_plane/errors/{healthstatus_error.py → healthserverstatus_error.py} +10 -9
- cribl_control_plane/groups_sdk.py +48 -24
- cribl_control_plane/health.py +22 -16
- cribl_control_plane/mappings.py +1 -981
- cribl_control_plane/models/__init__.py +41 -131
- cribl_control_plane/models/authtoken.py +4 -7
- cribl_control_plane/models/configgroup.py +8 -7
- cribl_control_plane/models/createconfiggroupbyproductop.py +6 -5
- cribl_control_plane/models/createroutesappendbyidop.py +2 -2
- cribl_control_plane/models/deleteoutputpqbyidop.py +2 -2
- cribl_control_plane/models/groupcreaterequest.py +152 -0
- cribl_control_plane/models/{healthstatus.py → healthserverstatus.py} +7 -7
- cribl_control_plane/models/logininfo.py +3 -3
- cribl_control_plane/routes_sdk.py +6 -6
- cribl_control_plane/tokens.py +23 -15
- {cribl_control_plane-0.2.1rc1.dist-info → cribl_control_plane-0.2.1rc3.dist-info}/METADATA +4 -9
- {cribl_control_plane-0.2.1rc1.dist-info → cribl_control_plane-0.2.1rc3.dist-info}/RECORD +20 -27
- cribl_control_plane/models/createadminproductsmappingsbyproductop.py +0 -53
- cribl_control_plane/models/deleteadminproductsmappingsbyproductandidop.py +0 -51
- cribl_control_plane/models/error.py +0 -16
- cribl_control_plane/models/getadminproductsmappingsbyproductandidop.py +0 -51
- cribl_control_plane/models/getadminproductsmappingsbyproductop.py +0 -44
- cribl_control_plane/models/gethealthinfoop.py +0 -17
- cribl_control_plane/models/mappingruleset.py +0 -95
- cribl_control_plane/models/updateadminproductsmappingsbyproductandidop.py +0 -63
- {cribl_control_plane-0.2.1rc1.dist-info → cribl_control_plane-0.2.1rc3.dist-info}/WHEEL +0 -0
cribl_control_plane/_version.py
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import importlib.metadata
|
|
4
4
|
|
|
5
5
|
__title__: str = "cribl-control-plane"
|
|
6
|
-
__version__: str = "0.2.
|
|
7
|
-
__openapi_doc_version__: str = "4.15.0-alpha.
|
|
8
|
-
__gen_version__: str = "2.
|
|
9
|
-
__user_agent__: str = "speakeasy-sdk/python 0.2.
|
|
6
|
+
__version__: str = "0.2.1rc3"
|
|
7
|
+
__openapi_doc_version__: str = "4.15.0-alpha.1761655977097-59e6cf2e"
|
|
8
|
+
__gen_version__: str = "2.731.4"
|
|
9
|
+
__user_agent__: str = "speakeasy-sdk/python 0.2.1rc3 2.731.4 4.15.0-alpha.1761655977097-59e6cf2e cribl-control-plane"
|
|
10
10
|
|
|
11
11
|
try:
|
|
12
12
|
if __package__ is not None:
|
|
@@ -9,7 +9,10 @@ import sys
|
|
|
9
9
|
if TYPE_CHECKING:
|
|
10
10
|
from .apierror import APIError
|
|
11
11
|
from .error import Error, ErrorData
|
|
12
|
-
from .
|
|
12
|
+
from .healthserverstatus_error import (
|
|
13
|
+
HealthServerStatusError,
|
|
14
|
+
HealthServerStatusErrorData,
|
|
15
|
+
)
|
|
13
16
|
from .no_response_error import NoResponseError
|
|
14
17
|
from .responsevalidationerror import ResponseValidationError
|
|
15
18
|
|
|
@@ -18,8 +21,8 @@ __all__ = [
|
|
|
18
21
|
"CriblControlPlaneError",
|
|
19
22
|
"Error",
|
|
20
23
|
"ErrorData",
|
|
21
|
-
"
|
|
22
|
-
"
|
|
24
|
+
"HealthServerStatusError",
|
|
25
|
+
"HealthServerStatusErrorData",
|
|
23
26
|
"NoResponseError",
|
|
24
27
|
"ResponseValidationError",
|
|
25
28
|
]
|
|
@@ -28,8 +31,8 @@ _dynamic_imports: dict[str, str] = {
|
|
|
28
31
|
"APIError": ".apierror",
|
|
29
32
|
"Error": ".error",
|
|
30
33
|
"ErrorData": ".error",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
34
|
+
"HealthServerStatusError": ".healthserverstatus_error",
|
|
35
|
+
"HealthServerStatusErrorData": ".healthserverstatus_error",
|
|
33
36
|
"NoResponseError": ".no_response_error",
|
|
34
37
|
"ResponseValidationError": ".responsevalidationerror",
|
|
35
38
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from cribl_control_plane.errors import CriblControlPlaneError
|
|
5
|
-
from cribl_control_plane.models import
|
|
5
|
+
from cribl_control_plane.models import healthserverstatus as models_healthserverstatus
|
|
6
6
|
from cribl_control_plane.types import BaseModel
|
|
7
7
|
from cribl_control_plane.utils import validate_open_enum
|
|
8
8
|
from dataclasses import dataclass, field
|
|
@@ -13,25 +13,26 @@ from typing import Optional
|
|
|
13
13
|
from typing_extensions import Annotated
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
class
|
|
16
|
+
class HealthServerStatusErrorData(BaseModel):
|
|
17
|
+
start_time: Annotated[float, pydantic.Field(alias="startTime")]
|
|
18
|
+
|
|
17
19
|
status: Annotated[
|
|
18
|
-
|
|
20
|
+
models_healthserverstatus.Status, PlainValidator(validate_open_enum(False))
|
|
19
21
|
]
|
|
20
22
|
|
|
21
|
-
start_time: Annotated[float, pydantic.Field(alias="startTime")]
|
|
22
|
-
|
|
23
23
|
role: Annotated[
|
|
24
|
-
Optional[
|
|
24
|
+
Optional[models_healthserverstatus.Role],
|
|
25
|
+
PlainValidator(validate_open_enum(False)),
|
|
25
26
|
] = None
|
|
26
27
|
|
|
27
28
|
|
|
28
29
|
@dataclass(unsafe_hash=True)
|
|
29
|
-
class
|
|
30
|
-
data:
|
|
30
|
+
class HealthServerStatusError(CriblControlPlaneError):
|
|
31
|
+
data: HealthServerStatusErrorData = field(hash=False)
|
|
31
32
|
|
|
32
33
|
def __init__(
|
|
33
34
|
self,
|
|
34
|
-
data:
|
|
35
|
+
data: HealthServerStatusErrorData,
|
|
35
36
|
raw_response: httpx.Response,
|
|
36
37
|
body: Optional[str] = None,
|
|
37
38
|
):
|
|
@@ -224,11 +224,14 @@ class GroupsSDK(BaseSDK):
|
|
|
224
224
|
cloud: Optional[
|
|
225
225
|
Union[models.ConfigGroupCloud, models.ConfigGroupCloudTypedDict]
|
|
226
226
|
] = None,
|
|
227
|
-
config_version: Optional[str] = None,
|
|
228
227
|
deploying_worker_count: Optional[float] = None,
|
|
229
228
|
description: Optional[str] = None,
|
|
230
|
-
estimated_ingest_rate: Optional[
|
|
231
|
-
|
|
229
|
+
estimated_ingest_rate: Optional[
|
|
230
|
+
models.GroupCreateRequestEstimatedIngestRate
|
|
231
|
+
] = None,
|
|
232
|
+
git: Optional[
|
|
233
|
+
Union[models.GroupCreateRequestGit, models.GroupCreateRequestGitTypedDict]
|
|
234
|
+
] = None,
|
|
232
235
|
incompatible_worker_count: Optional[float] = None,
|
|
233
236
|
inherits: Optional[str] = None,
|
|
234
237
|
is_fleet: Optional[bool] = None,
|
|
@@ -243,9 +246,10 @@ class GroupsSDK(BaseSDK):
|
|
|
243
246
|
name: Optional[str] = None,
|
|
244
247
|
on_prem: Optional[bool] = None,
|
|
245
248
|
provisioned: Optional[bool] = None,
|
|
249
|
+
source_group_id: Optional[str] = None,
|
|
246
250
|
streamtags: Optional[List[str]] = None,
|
|
247
251
|
tags: Optional[str] = None,
|
|
248
|
-
type_: Optional[models.
|
|
252
|
+
type_: Optional[models.GroupCreateRequestType] = None,
|
|
249
253
|
upgrade_version: Optional[str] = None,
|
|
250
254
|
worker_count: Optional[float] = None,
|
|
251
255
|
worker_remote_access: Optional[bool] = None,
|
|
@@ -261,7 +265,6 @@ class GroupsSDK(BaseSDK):
|
|
|
261
265
|
:param product: Name of the Cribl product to add the Worker Group or Edge Fleet to.
|
|
262
266
|
:param id:
|
|
263
267
|
:param cloud:
|
|
264
|
-
:param config_version:
|
|
265
268
|
:param deploying_worker_count:
|
|
266
269
|
:param description:
|
|
267
270
|
:param estimated_ingest_rate: Maximum expected volume of data ingested by the @{group}. (This setting is available only on @{group}s consisting of Cribl-managed Cribl.Cloud @{node}s.)
|
|
@@ -275,6 +278,7 @@ class GroupsSDK(BaseSDK):
|
|
|
275
278
|
:param name:
|
|
276
279
|
:param on_prem:
|
|
277
280
|
:param provisioned:
|
|
281
|
+
:param source_group_id:
|
|
278
282
|
:param streamtags:
|
|
279
283
|
:param tags:
|
|
280
284
|
:param type:
|
|
@@ -298,15 +302,16 @@ class GroupsSDK(BaseSDK):
|
|
|
298
302
|
|
|
299
303
|
request = models.CreateConfigGroupByProductRequest(
|
|
300
304
|
product=product,
|
|
301
|
-
|
|
305
|
+
group_create_request=models.GroupCreateRequest(
|
|
302
306
|
cloud=utils.get_pydantic_model(
|
|
303
307
|
cloud, Optional[models.ConfigGroupCloud]
|
|
304
308
|
),
|
|
305
|
-
config_version=config_version,
|
|
306
309
|
deploying_worker_count=deploying_worker_count,
|
|
307
310
|
description=description,
|
|
308
311
|
estimated_ingest_rate=estimated_ingest_rate,
|
|
309
|
-
git=utils.get_pydantic_model(
|
|
312
|
+
git=utils.get_pydantic_model(
|
|
313
|
+
git, Optional[models.GroupCreateRequestGit]
|
|
314
|
+
),
|
|
310
315
|
id=id,
|
|
311
316
|
incompatible_worker_count=incompatible_worker_count,
|
|
312
317
|
inherits=inherits,
|
|
@@ -319,6 +324,7 @@ class GroupsSDK(BaseSDK):
|
|
|
319
324
|
name=name,
|
|
320
325
|
on_prem=on_prem,
|
|
321
326
|
provisioned=provisioned,
|
|
327
|
+
source_group_id=source_group_id,
|
|
322
328
|
streamtags=streamtags,
|
|
323
329
|
tags=tags,
|
|
324
330
|
type=type_,
|
|
@@ -342,7 +348,11 @@ class GroupsSDK(BaseSDK):
|
|
|
342
348
|
http_headers=http_headers,
|
|
343
349
|
security=self.sdk_configuration.security,
|
|
344
350
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
345
|
-
request.
|
|
351
|
+
request.group_create_request,
|
|
352
|
+
False,
|
|
353
|
+
False,
|
|
354
|
+
"json",
|
|
355
|
+
models.GroupCreateRequest,
|
|
346
356
|
),
|
|
347
357
|
timeout_ms=timeout_ms,
|
|
348
358
|
)
|
|
@@ -395,11 +405,14 @@ class GroupsSDK(BaseSDK):
|
|
|
395
405
|
cloud: Optional[
|
|
396
406
|
Union[models.ConfigGroupCloud, models.ConfigGroupCloudTypedDict]
|
|
397
407
|
] = None,
|
|
398
|
-
config_version: Optional[str] = None,
|
|
399
408
|
deploying_worker_count: Optional[float] = None,
|
|
400
409
|
description: Optional[str] = None,
|
|
401
|
-
estimated_ingest_rate: Optional[
|
|
402
|
-
|
|
410
|
+
estimated_ingest_rate: Optional[
|
|
411
|
+
models.GroupCreateRequestEstimatedIngestRate
|
|
412
|
+
] = None,
|
|
413
|
+
git: Optional[
|
|
414
|
+
Union[models.GroupCreateRequestGit, models.GroupCreateRequestGitTypedDict]
|
|
415
|
+
] = None,
|
|
403
416
|
incompatible_worker_count: Optional[float] = None,
|
|
404
417
|
inherits: Optional[str] = None,
|
|
405
418
|
is_fleet: Optional[bool] = None,
|
|
@@ -414,9 +427,10 @@ class GroupsSDK(BaseSDK):
|
|
|
414
427
|
name: Optional[str] = None,
|
|
415
428
|
on_prem: Optional[bool] = None,
|
|
416
429
|
provisioned: Optional[bool] = None,
|
|
430
|
+
source_group_id: Optional[str] = None,
|
|
417
431
|
streamtags: Optional[List[str]] = None,
|
|
418
432
|
tags: Optional[str] = None,
|
|
419
|
-
type_: Optional[models.
|
|
433
|
+
type_: Optional[models.GroupCreateRequestType] = None,
|
|
420
434
|
upgrade_version: Optional[str] = None,
|
|
421
435
|
worker_count: Optional[float] = None,
|
|
422
436
|
worker_remote_access: Optional[bool] = None,
|
|
@@ -432,7 +446,6 @@ class GroupsSDK(BaseSDK):
|
|
|
432
446
|
:param product: Name of the Cribl product to add the Worker Group or Edge Fleet to.
|
|
433
447
|
:param id:
|
|
434
448
|
:param cloud:
|
|
435
|
-
:param config_version:
|
|
436
449
|
:param deploying_worker_count:
|
|
437
450
|
:param description:
|
|
438
451
|
:param estimated_ingest_rate: Maximum expected volume of data ingested by the @{group}. (This setting is available only on @{group}s consisting of Cribl-managed Cribl.Cloud @{node}s.)
|
|
@@ -446,6 +459,7 @@ class GroupsSDK(BaseSDK):
|
|
|
446
459
|
:param name:
|
|
447
460
|
:param on_prem:
|
|
448
461
|
:param provisioned:
|
|
462
|
+
:param source_group_id:
|
|
449
463
|
:param streamtags:
|
|
450
464
|
:param tags:
|
|
451
465
|
:param type:
|
|
@@ -469,15 +483,16 @@ class GroupsSDK(BaseSDK):
|
|
|
469
483
|
|
|
470
484
|
request = models.CreateConfigGroupByProductRequest(
|
|
471
485
|
product=product,
|
|
472
|
-
|
|
486
|
+
group_create_request=models.GroupCreateRequest(
|
|
473
487
|
cloud=utils.get_pydantic_model(
|
|
474
488
|
cloud, Optional[models.ConfigGroupCloud]
|
|
475
489
|
),
|
|
476
|
-
config_version=config_version,
|
|
477
490
|
deploying_worker_count=deploying_worker_count,
|
|
478
491
|
description=description,
|
|
479
492
|
estimated_ingest_rate=estimated_ingest_rate,
|
|
480
|
-
git=utils.get_pydantic_model(
|
|
493
|
+
git=utils.get_pydantic_model(
|
|
494
|
+
git, Optional[models.GroupCreateRequestGit]
|
|
495
|
+
),
|
|
481
496
|
id=id,
|
|
482
497
|
incompatible_worker_count=incompatible_worker_count,
|
|
483
498
|
inherits=inherits,
|
|
@@ -490,6 +505,7 @@ class GroupsSDK(BaseSDK):
|
|
|
490
505
|
name=name,
|
|
491
506
|
on_prem=on_prem,
|
|
492
507
|
provisioned=provisioned,
|
|
508
|
+
source_group_id=source_group_id,
|
|
493
509
|
streamtags=streamtags,
|
|
494
510
|
tags=tags,
|
|
495
511
|
type=type_,
|
|
@@ -513,7 +529,11 @@ class GroupsSDK(BaseSDK):
|
|
|
513
529
|
http_headers=http_headers,
|
|
514
530
|
security=self.sdk_configuration.security,
|
|
515
531
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
516
|
-
request.
|
|
532
|
+
request.group_create_request,
|
|
533
|
+
False,
|
|
534
|
+
False,
|
|
535
|
+
"json",
|
|
536
|
+
models.GroupCreateRequest,
|
|
517
537
|
),
|
|
518
538
|
timeout_ms=timeout_ms,
|
|
519
539
|
)
|
|
@@ -760,8 +780,10 @@ class GroupsSDK(BaseSDK):
|
|
|
760
780
|
config_version: Optional[str] = None,
|
|
761
781
|
deploying_worker_count: Optional[float] = None,
|
|
762
782
|
description: Optional[str] = None,
|
|
763
|
-
estimated_ingest_rate: Optional[models.
|
|
764
|
-
git: Optional[
|
|
783
|
+
estimated_ingest_rate: Optional[models.ConfigGroupEstimatedIngestRate] = None,
|
|
784
|
+
git: Optional[
|
|
785
|
+
Union[models.ConfigGroupGit, models.ConfigGroupGitTypedDict]
|
|
786
|
+
] = None,
|
|
765
787
|
incompatible_worker_count: Optional[float] = None,
|
|
766
788
|
inherits: Optional[str] = None,
|
|
767
789
|
is_fleet: Optional[bool] = None,
|
|
@@ -841,7 +863,7 @@ class GroupsSDK(BaseSDK):
|
|
|
841
863
|
deploying_worker_count=deploying_worker_count,
|
|
842
864
|
description=description,
|
|
843
865
|
estimated_ingest_rate=estimated_ingest_rate,
|
|
844
|
-
git=utils.get_pydantic_model(git, Optional[models.
|
|
866
|
+
git=utils.get_pydantic_model(git, Optional[models.ConfigGroupGit]),
|
|
845
867
|
id=id,
|
|
846
868
|
incompatible_worker_count=incompatible_worker_count,
|
|
847
869
|
inherits=inherits,
|
|
@@ -934,8 +956,10 @@ class GroupsSDK(BaseSDK):
|
|
|
934
956
|
config_version: Optional[str] = None,
|
|
935
957
|
deploying_worker_count: Optional[float] = None,
|
|
936
958
|
description: Optional[str] = None,
|
|
937
|
-
estimated_ingest_rate: Optional[models.
|
|
938
|
-
git: Optional[
|
|
959
|
+
estimated_ingest_rate: Optional[models.ConfigGroupEstimatedIngestRate] = None,
|
|
960
|
+
git: Optional[
|
|
961
|
+
Union[models.ConfigGroupGit, models.ConfigGroupGitTypedDict]
|
|
962
|
+
] = None,
|
|
939
963
|
incompatible_worker_count: Optional[float] = None,
|
|
940
964
|
inherits: Optional[str] = None,
|
|
941
965
|
is_fleet: Optional[bool] = None,
|
|
@@ -1015,7 +1039,7 @@ class GroupsSDK(BaseSDK):
|
|
|
1015
1039
|
deploying_worker_count=deploying_worker_count,
|
|
1016
1040
|
description=description,
|
|
1017
1041
|
estimated_ingest_rate=estimated_ingest_rate,
|
|
1018
|
-
git=utils.get_pydantic_model(git, Optional[models.
|
|
1042
|
+
git=utils.get_pydantic_model(git, Optional[models.ConfigGroupGit]),
|
|
1019
1043
|
id=id,
|
|
1020
1044
|
incompatible_worker_count=incompatible_worker_count,
|
|
1021
1045
|
inherits=inherits,
|
cribl_control_plane/health.py
CHANGED
|
@@ -18,9 +18,11 @@ class Health(BaseSDK):
|
|
|
18
18
|
server_url: Optional[str] = None,
|
|
19
19
|
timeout_ms: Optional[int] = None,
|
|
20
20
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
21
|
-
) -> models.
|
|
21
|
+
) -> models.HealthServerStatus:
|
|
22
22
|
r"""Retrieve health status of the server
|
|
23
23
|
|
|
24
|
+
Get the current health status of the server.
|
|
25
|
+
|
|
24
26
|
:param retries: Override the default retry configuration for this method
|
|
25
27
|
:param server_url: Override the default server URL for this method
|
|
26
28
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -62,31 +64,32 @@ class Health(BaseSDK):
|
|
|
62
64
|
hook_ctx=HookContext(
|
|
63
65
|
config=self.sdk_configuration,
|
|
64
66
|
base_url=base_url or "",
|
|
65
|
-
operation_id="
|
|
67
|
+
operation_id="getHealth",
|
|
66
68
|
oauth2_scopes=[],
|
|
67
69
|
security_source=None,
|
|
68
70
|
),
|
|
69
71
|
request=req,
|
|
70
|
-
error_status_codes=["420", "4XX", "5XX"],
|
|
72
|
+
error_status_codes=["420", "4XX", "500", "5XX"],
|
|
71
73
|
retry_config=retry_config,
|
|
72
74
|
)
|
|
73
75
|
|
|
74
76
|
response_data: Any = None
|
|
75
77
|
if utils.match_response(http_res, "200", "application/json"):
|
|
76
|
-
return unmarshal_json_response(models.
|
|
78
|
+
return unmarshal_json_response(models.HealthServerStatus, http_res)
|
|
77
79
|
if utils.match_response(http_res, "420", "application/json"):
|
|
78
80
|
response_data = unmarshal_json_response(
|
|
79
|
-
errors.
|
|
81
|
+
errors.HealthServerStatusErrorData, http_res
|
|
80
82
|
)
|
|
81
|
-
raise errors.
|
|
83
|
+
raise errors.HealthServerStatusError(response_data, http_res)
|
|
84
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
85
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
86
|
+
raise errors.Error(response_data, http_res)
|
|
82
87
|
if utils.match_response(http_res, "4XX", "*"):
|
|
83
88
|
http_res_text = utils.stream_to_text(http_res)
|
|
84
89
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
85
90
|
if utils.match_response(http_res, "5XX", "*"):
|
|
86
91
|
http_res_text = utils.stream_to_text(http_res)
|
|
87
92
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
88
|
-
if utils.match_response(http_res, "default", "application/json"):
|
|
89
|
-
return unmarshal_json_response(models.Error, http_res)
|
|
90
93
|
|
|
91
94
|
raise errors.APIError("Unexpected response received", http_res)
|
|
92
95
|
|
|
@@ -97,9 +100,11 @@ class Health(BaseSDK):
|
|
|
97
100
|
server_url: Optional[str] = None,
|
|
98
101
|
timeout_ms: Optional[int] = None,
|
|
99
102
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
100
|
-
) -> models.
|
|
103
|
+
) -> models.HealthServerStatus:
|
|
101
104
|
r"""Retrieve health status of the server
|
|
102
105
|
|
|
106
|
+
Get the current health status of the server.
|
|
107
|
+
|
|
103
108
|
:param retries: Override the default retry configuration for this method
|
|
104
109
|
:param server_url: Override the default server URL for this method
|
|
105
110
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -141,30 +146,31 @@ class Health(BaseSDK):
|
|
|
141
146
|
hook_ctx=HookContext(
|
|
142
147
|
config=self.sdk_configuration,
|
|
143
148
|
base_url=base_url or "",
|
|
144
|
-
operation_id="
|
|
149
|
+
operation_id="getHealth",
|
|
145
150
|
oauth2_scopes=[],
|
|
146
151
|
security_source=None,
|
|
147
152
|
),
|
|
148
153
|
request=req,
|
|
149
|
-
error_status_codes=["420", "4XX", "5XX"],
|
|
154
|
+
error_status_codes=["420", "4XX", "500", "5XX"],
|
|
150
155
|
retry_config=retry_config,
|
|
151
156
|
)
|
|
152
157
|
|
|
153
158
|
response_data: Any = None
|
|
154
159
|
if utils.match_response(http_res, "200", "application/json"):
|
|
155
|
-
return unmarshal_json_response(models.
|
|
160
|
+
return unmarshal_json_response(models.HealthServerStatus, http_res)
|
|
156
161
|
if utils.match_response(http_res, "420", "application/json"):
|
|
157
162
|
response_data = unmarshal_json_response(
|
|
158
|
-
errors.
|
|
163
|
+
errors.HealthServerStatusErrorData, http_res
|
|
159
164
|
)
|
|
160
|
-
raise errors.
|
|
165
|
+
raise errors.HealthServerStatusError(response_data, http_res)
|
|
166
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
167
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
168
|
+
raise errors.Error(response_data, http_res)
|
|
161
169
|
if utils.match_response(http_res, "4XX", "*"):
|
|
162
170
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
163
171
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
164
172
|
if utils.match_response(http_res, "5XX", "*"):
|
|
165
173
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
166
174
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
167
|
-
if utils.match_response(http_res, "default", "application/json"):
|
|
168
|
-
return unmarshal_json_response(models.Error, http_res)
|
|
169
175
|
|
|
170
176
|
raise errors.APIError("Unexpected response received", http_res)
|