cribl-control-plane 0.2.1rc1__py3-none-any.whl → 0.2.1rc2__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/errors/__init__.py +8 -5
- cribl_control_plane/errors/{healthstatus_error.py → healthserverstatus_error.py} +10 -9
- cribl_control_plane/groups_sdk.py +48 -27
- cribl_control_plane/health.py +22 -16
- cribl_control_plane/models/__init__.py +47 -156
- 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/models/pipeline.py +4 -4
- cribl_control_plane/pipelines.py +8 -8
- 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.1rc2.dist-info}/METADATA +4 -13
- {cribl_control_plane-0.2.1rc1.dist-info → cribl_control_plane-0.2.1rc2.dist-info}/RECORD +21 -31
- cribl_control_plane/mappings.py +0 -1185
- cribl_control_plane/models/createadminproductsmappingsactivatebyproductop.py +0 -52
- 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/rulesetid.py +0 -13
- cribl_control_plane/models/updateadminproductsmappingsbyproductandidop.py +0 -63
- {cribl_control_plane-0.2.1rc1.dist-info → cribl_control_plane-0.2.1rc2.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from .commit import Commit, CommitTypedDict
|
|
5
|
+
from .configgroupcloud import ConfigGroupCloud, ConfigGroupCloudTypedDict
|
|
6
|
+
from .configgrouplookups import ConfigGroupLookups, ConfigGroupLookupsTypedDict
|
|
7
|
+
from cribl_control_plane import utils
|
|
8
|
+
from cribl_control_plane.types import BaseModel
|
|
9
|
+
from cribl_control_plane.utils import validate_open_enum
|
|
10
|
+
from enum import Enum
|
|
11
|
+
import pydantic
|
|
12
|
+
from pydantic.functional_validators import PlainValidator
|
|
13
|
+
from typing import List, Optional
|
|
14
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class GroupCreateRequestEstimatedIngestRate(int, Enum, metaclass=utils.OpenEnumMeta):
|
|
18
|
+
r"""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.)"""
|
|
19
|
+
|
|
20
|
+
# 12 MB/sec
|
|
21
|
+
RATE12_MB_PER_SEC = 1024
|
|
22
|
+
# 24 MB/sec
|
|
23
|
+
RATE24_MB_PER_SEC = 2048
|
|
24
|
+
# 36 MB/sec
|
|
25
|
+
RATE36_MB_PER_SEC = 3072
|
|
26
|
+
# 48 MB/sec
|
|
27
|
+
RATE48_MB_PER_SEC = 4096
|
|
28
|
+
# 60 MB/sec
|
|
29
|
+
RATE60_MB_PER_SEC = 5120
|
|
30
|
+
# 84 MB/sec
|
|
31
|
+
RATE84_MB_PER_SEC = 7168
|
|
32
|
+
# 120 MB/sec
|
|
33
|
+
RATE120_MB_PER_SEC = 10240
|
|
34
|
+
# 156 MB/sec
|
|
35
|
+
RATE156_MB_PER_SEC = 13312
|
|
36
|
+
# 180 MB/sec
|
|
37
|
+
RATE180_MB_PER_SEC = 15360
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class GroupCreateRequestGitTypedDict(TypedDict):
|
|
41
|
+
commit: NotRequired[str]
|
|
42
|
+
local_changes: NotRequired[float]
|
|
43
|
+
log: NotRequired[List[CommitTypedDict]]
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class GroupCreateRequestGit(BaseModel):
|
|
47
|
+
commit: Optional[str] = None
|
|
48
|
+
|
|
49
|
+
local_changes: Annotated[Optional[float], pydantic.Field(alias="localChanges")] = (
|
|
50
|
+
None
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
log: Optional[List[Commit]] = None
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class GroupCreateRequestType(str, Enum, metaclass=utils.OpenEnumMeta):
|
|
57
|
+
LAKE_ACCESS = "lake_access"
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
class GroupCreateRequestTypedDict(TypedDict):
|
|
61
|
+
id: str
|
|
62
|
+
cloud: NotRequired[ConfigGroupCloudTypedDict]
|
|
63
|
+
deploying_worker_count: NotRequired[float]
|
|
64
|
+
description: NotRequired[str]
|
|
65
|
+
estimated_ingest_rate: NotRequired[GroupCreateRequestEstimatedIngestRate]
|
|
66
|
+
r"""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.)"""
|
|
67
|
+
git: NotRequired[GroupCreateRequestGitTypedDict]
|
|
68
|
+
incompatible_worker_count: NotRequired[float]
|
|
69
|
+
inherits: NotRequired[str]
|
|
70
|
+
is_fleet: NotRequired[bool]
|
|
71
|
+
is_search: NotRequired[bool]
|
|
72
|
+
lookup_deployments: NotRequired[List[ConfigGroupLookupsTypedDict]]
|
|
73
|
+
max_worker_age: NotRequired[str]
|
|
74
|
+
name: NotRequired[str]
|
|
75
|
+
on_prem: NotRequired[bool]
|
|
76
|
+
provisioned: NotRequired[bool]
|
|
77
|
+
source_group_id: NotRequired[str]
|
|
78
|
+
streamtags: NotRequired[List[str]]
|
|
79
|
+
tags: NotRequired[str]
|
|
80
|
+
type: NotRequired[GroupCreateRequestType]
|
|
81
|
+
upgrade_version: NotRequired[str]
|
|
82
|
+
worker_count: NotRequired[float]
|
|
83
|
+
worker_remote_access: NotRequired[bool]
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
class GroupCreateRequest(BaseModel):
|
|
87
|
+
id: str
|
|
88
|
+
|
|
89
|
+
cloud: Optional[ConfigGroupCloud] = None
|
|
90
|
+
|
|
91
|
+
deploying_worker_count: Annotated[
|
|
92
|
+
Optional[float], pydantic.Field(alias="deployingWorkerCount")
|
|
93
|
+
] = None
|
|
94
|
+
|
|
95
|
+
description: Optional[str] = None
|
|
96
|
+
|
|
97
|
+
estimated_ingest_rate: Annotated[
|
|
98
|
+
Annotated[
|
|
99
|
+
Optional[GroupCreateRequestEstimatedIngestRate],
|
|
100
|
+
PlainValidator(validate_open_enum(True)),
|
|
101
|
+
],
|
|
102
|
+
pydantic.Field(alias="estimatedIngestRate"),
|
|
103
|
+
] = None
|
|
104
|
+
r"""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.)"""
|
|
105
|
+
|
|
106
|
+
git: Optional[GroupCreateRequestGit] = None
|
|
107
|
+
|
|
108
|
+
incompatible_worker_count: Annotated[
|
|
109
|
+
Optional[float], pydantic.Field(alias="incompatibleWorkerCount")
|
|
110
|
+
] = None
|
|
111
|
+
|
|
112
|
+
inherits: Optional[str] = None
|
|
113
|
+
|
|
114
|
+
is_fleet: Annotated[Optional[bool], pydantic.Field(alias="isFleet")] = None
|
|
115
|
+
|
|
116
|
+
is_search: Annotated[Optional[bool], pydantic.Field(alias="isSearch")] = None
|
|
117
|
+
|
|
118
|
+
lookup_deployments: Annotated[
|
|
119
|
+
Optional[List[ConfigGroupLookups]], pydantic.Field(alias="lookupDeployments")
|
|
120
|
+
] = None
|
|
121
|
+
|
|
122
|
+
max_worker_age: Annotated[Optional[str], pydantic.Field(alias="maxWorkerAge")] = (
|
|
123
|
+
None
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
name: Optional[str] = None
|
|
127
|
+
|
|
128
|
+
on_prem: Annotated[Optional[bool], pydantic.Field(alias="onPrem")] = None
|
|
129
|
+
|
|
130
|
+
provisioned: Optional[bool] = None
|
|
131
|
+
|
|
132
|
+
source_group_id: Annotated[Optional[str], pydantic.Field(alias="sourceGroupId")] = (
|
|
133
|
+
None
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
streamtags: Optional[List[str]] = None
|
|
137
|
+
|
|
138
|
+
tags: Optional[str] = None
|
|
139
|
+
|
|
140
|
+
type: Annotated[
|
|
141
|
+
Optional[GroupCreateRequestType], PlainValidator(validate_open_enum(False))
|
|
142
|
+
] = None
|
|
143
|
+
|
|
144
|
+
upgrade_version: Annotated[
|
|
145
|
+
Optional[str], pydantic.Field(alias="upgradeVersion")
|
|
146
|
+
] = None
|
|
147
|
+
|
|
148
|
+
worker_count: Annotated[Optional[float], pydantic.Field(alias="workerCount")] = None
|
|
149
|
+
|
|
150
|
+
worker_remote_access: Annotated[
|
|
151
|
+
Optional[bool], pydantic.Field(alias="workerRemoteAccess")
|
|
152
|
+
] = None
|
|
@@ -12,25 +12,25 @@ from typing_extensions import Annotated, NotRequired, TypedDict
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
class Role(str, Enum, metaclass=utils.OpenEnumMeta):
|
|
15
|
-
PRIMARY = "primary"
|
|
16
15
|
STANDBY = "standby"
|
|
16
|
+
PRIMARY = "primary"
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
class Status(str, Enum, metaclass=utils.OpenEnumMeta):
|
|
20
|
-
HEALTHY = "healthy"
|
|
21
20
|
SHUTTING_DOWN = "shutting down"
|
|
21
|
+
HEALTHY = "healthy"
|
|
22
22
|
STANDBY = "standby"
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
class
|
|
26
|
-
status: Status
|
|
25
|
+
class HealthServerStatusTypedDict(TypedDict):
|
|
27
26
|
start_time: float
|
|
27
|
+
status: Status
|
|
28
28
|
role: NotRequired[Role]
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
class
|
|
32
|
-
status: Annotated[Status, PlainValidator(validate_open_enum(False))]
|
|
33
|
-
|
|
31
|
+
class HealthServerStatus(BaseModel):
|
|
34
32
|
start_time: Annotated[float, pydantic.Field(alias="startTime")]
|
|
35
33
|
|
|
34
|
+
status: Annotated[Status, PlainValidator(validate_open_enum(False))]
|
|
35
|
+
|
|
36
36
|
role: Annotated[Optional[Role], PlainValidator(validate_open_enum(False))] = None
|
|
@@ -26,7 +26,7 @@ class PipelineGroups(BaseModel):
|
|
|
26
26
|
r"""Whether this group is disabled"""
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
class
|
|
29
|
+
class ConfTypedDict(TypedDict):
|
|
30
30
|
async_func_timeout: NotRequired[int]
|
|
31
31
|
r"""Time (in ms) to wait for an async function to complete processing of a data item"""
|
|
32
32
|
output: NotRequired[str]
|
|
@@ -39,7 +39,7 @@ class PipelineConfTypedDict(TypedDict):
|
|
|
39
39
|
groups: NotRequired[Dict[str, PipelineGroupsTypedDict]]
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
class
|
|
42
|
+
class Conf(BaseModel):
|
|
43
43
|
async_func_timeout: Annotated[
|
|
44
44
|
Optional[int], pydantic.Field(alias="asyncFuncTimeout")
|
|
45
45
|
] = None
|
|
@@ -61,10 +61,10 @@ class PipelineConf(BaseModel):
|
|
|
61
61
|
|
|
62
62
|
class PipelineTypedDict(TypedDict):
|
|
63
63
|
id: str
|
|
64
|
-
conf:
|
|
64
|
+
conf: ConfTypedDict
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
class Pipeline(BaseModel):
|
|
68
68
|
id: str
|
|
69
69
|
|
|
70
|
-
conf:
|
|
70
|
+
conf: Conf
|
cribl_control_plane/pipelines.py
CHANGED
|
@@ -176,7 +176,7 @@ class Pipelines(BaseSDK):
|
|
|
176
176
|
self,
|
|
177
177
|
*,
|
|
178
178
|
id: str,
|
|
179
|
-
conf: Union[models.
|
|
179
|
+
conf: Union[models.Conf, models.ConfTypedDict],
|
|
180
180
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
181
181
|
server_url: Optional[str] = None,
|
|
182
182
|
timeout_ms: Optional[int] = None,
|
|
@@ -205,7 +205,7 @@ class Pipelines(BaseSDK):
|
|
|
205
205
|
|
|
206
206
|
request = models.Pipeline(
|
|
207
207
|
id=id,
|
|
208
|
-
conf=utils.get_pydantic_model(conf, models.
|
|
208
|
+
conf=utils.get_pydantic_model(conf, models.Conf),
|
|
209
209
|
)
|
|
210
210
|
|
|
211
211
|
req = self._build_request(
|
|
@@ -269,7 +269,7 @@ class Pipelines(BaseSDK):
|
|
|
269
269
|
self,
|
|
270
270
|
*,
|
|
271
271
|
id: str,
|
|
272
|
-
conf: Union[models.
|
|
272
|
+
conf: Union[models.Conf, models.ConfTypedDict],
|
|
273
273
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
274
274
|
server_url: Optional[str] = None,
|
|
275
275
|
timeout_ms: Optional[int] = None,
|
|
@@ -298,7 +298,7 @@ class Pipelines(BaseSDK):
|
|
|
298
298
|
|
|
299
299
|
request = models.Pipeline(
|
|
300
300
|
id=id,
|
|
301
|
-
conf=utils.get_pydantic_model(conf, models.
|
|
301
|
+
conf=utils.get_pydantic_model(conf, models.Conf),
|
|
302
302
|
)
|
|
303
303
|
|
|
304
304
|
req = self._build_request_async(
|
|
@@ -537,7 +537,7 @@ class Pipelines(BaseSDK):
|
|
|
537
537
|
*,
|
|
538
538
|
id_param: str,
|
|
539
539
|
id: str,
|
|
540
|
-
conf: Union[models.
|
|
540
|
+
conf: Union[models.Conf, models.ConfTypedDict],
|
|
541
541
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
542
542
|
server_url: Optional[str] = None,
|
|
543
543
|
timeout_ms: Optional[int] = None,
|
|
@@ -569,7 +569,7 @@ class Pipelines(BaseSDK):
|
|
|
569
569
|
id_param=id_param,
|
|
570
570
|
pipeline=models.Pipeline(
|
|
571
571
|
id=id,
|
|
572
|
-
conf=utils.get_pydantic_model(conf, models.
|
|
572
|
+
conf=utils.get_pydantic_model(conf, models.Conf),
|
|
573
573
|
),
|
|
574
574
|
)
|
|
575
575
|
|
|
@@ -635,7 +635,7 @@ class Pipelines(BaseSDK):
|
|
|
635
635
|
*,
|
|
636
636
|
id_param: str,
|
|
637
637
|
id: str,
|
|
638
|
-
conf: Union[models.
|
|
638
|
+
conf: Union[models.Conf, models.ConfTypedDict],
|
|
639
639
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
640
640
|
server_url: Optional[str] = None,
|
|
641
641
|
timeout_ms: Optional[int] = None,
|
|
@@ -667,7 +667,7 @@ class Pipelines(BaseSDK):
|
|
|
667
667
|
id_param=id_param,
|
|
668
668
|
pipeline=models.Pipeline(
|
|
669
669
|
id=id,
|
|
670
|
-
conf=utils.get_pydantic_model(conf, models.
|
|
670
|
+
conf=utils.get_pydantic_model(conf, models.Conf),
|
|
671
671
|
),
|
|
672
672
|
)
|
|
673
673
|
|
|
@@ -584,11 +584,11 @@ class RoutesSDK(BaseSDK):
|
|
|
584
584
|
timeout_ms: Optional[int] = None,
|
|
585
585
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
586
586
|
) -> models.CreateRoutesAppendByIDResponse:
|
|
587
|
-
r"""
|
|
587
|
+
r"""Add a Route to the end of the Routing table
|
|
588
588
|
|
|
589
|
-
|
|
589
|
+
Add a Route to the end of the specified Routing table.
|
|
590
590
|
|
|
591
|
-
:param id: The <code>id</code> of the Routing table to
|
|
591
|
+
:param id: The <code>id</code> of the Routing table to add the Route to. The supported value is <code>default</code>.
|
|
592
592
|
:param request_body: RouteDefinitions object
|
|
593
593
|
:param retries: Override the default retry configuration for this method
|
|
594
594
|
:param server_url: Override the default server URL for this method
|
|
@@ -679,11 +679,11 @@ class RoutesSDK(BaseSDK):
|
|
|
679
679
|
timeout_ms: Optional[int] = None,
|
|
680
680
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
681
681
|
) -> models.CreateRoutesAppendByIDResponse:
|
|
682
|
-
r"""
|
|
682
|
+
r"""Add a Route to the end of the Routing table
|
|
683
683
|
|
|
684
|
-
|
|
684
|
+
Add a Route to the end of the specified Routing table.
|
|
685
685
|
|
|
686
|
-
:param id: The <code>id</code> of the Routing table to
|
|
686
|
+
:param id: The <code>id</code> of the Routing table to add the Route to. The supported value is <code>default</code>.
|
|
687
687
|
:param request_body: RouteDefinitions object
|
|
688
688
|
:param retries: Override the default retry configuration for this method
|
|
689
689
|
:param server_url: Override the default server URL for this method
|
cribl_control_plane/tokens.py
CHANGED
|
@@ -5,15 +5,15 @@ from cribl_control_plane import errors, models, utils
|
|
|
5
5
|
from cribl_control_plane._hooks import HookContext
|
|
6
6
|
from cribl_control_plane.types import OptionalNullable, UNSET
|
|
7
7
|
from cribl_control_plane.utils.unmarshal_json_response import unmarshal_json_response
|
|
8
|
-
from typing import Mapping, Optional
|
|
8
|
+
from typing import Any, Mapping, Optional
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class Tokens(BaseSDK):
|
|
12
12
|
def get(
|
|
13
13
|
self,
|
|
14
14
|
*,
|
|
15
|
-
username: str,
|
|
16
15
|
password: str,
|
|
16
|
+
username: str,
|
|
17
17
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
18
18
|
server_url: Optional[str] = None,
|
|
19
19
|
timeout_ms: Optional[int] = None,
|
|
@@ -21,10 +21,10 @@ class Tokens(BaseSDK):
|
|
|
21
21
|
) -> models.AuthToken:
|
|
22
22
|
r"""Log in and fetch an authentication token
|
|
23
23
|
|
|
24
|
-
This endpoint is unavailable on Cribl.Cloud.
|
|
24
|
+
This endpoint is unavailable on Cribl.Cloud.Instead, follow the instructions at https://docs.cribl.io/stream/api-tutorials/#criblcloud to get an Auth token for Cribl.Cloud.
|
|
25
25
|
|
|
26
|
-
:param username:
|
|
27
26
|
:param password:
|
|
27
|
+
:param username:
|
|
28
28
|
:param retries: Override the default retry configuration for this method
|
|
29
29
|
:param server_url: Override the default server URL for this method
|
|
30
30
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -41,8 +41,8 @@ class Tokens(BaseSDK):
|
|
|
41
41
|
base_url = self._get_url(base_url, url_variables)
|
|
42
42
|
|
|
43
43
|
request = models.LoginInfo(
|
|
44
|
-
username=username,
|
|
45
44
|
password=password,
|
|
45
|
+
username=username,
|
|
46
46
|
)
|
|
47
47
|
|
|
48
48
|
req = self._build_request(
|
|
@@ -75,18 +75,22 @@ class Tokens(BaseSDK):
|
|
|
75
75
|
hook_ctx=HookContext(
|
|
76
76
|
config=self.sdk_configuration,
|
|
77
77
|
base_url=base_url or "",
|
|
78
|
-
operation_id="
|
|
78
|
+
operation_id="createAuthLogin",
|
|
79
79
|
oauth2_scopes=[],
|
|
80
80
|
security_source=None,
|
|
81
81
|
),
|
|
82
82
|
request=req,
|
|
83
|
-
error_status_codes=["401", "
|
|
83
|
+
error_status_codes=["401", "429", "4XX", "500", "5XX"],
|
|
84
84
|
retry_config=retry_config,
|
|
85
85
|
)
|
|
86
86
|
|
|
87
|
+
response_data: Any = None
|
|
87
88
|
if utils.match_response(http_res, "200", "application/json"):
|
|
88
89
|
return unmarshal_json_response(models.AuthToken, http_res)
|
|
89
|
-
if utils.match_response(http_res,
|
|
90
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
91
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
92
|
+
raise errors.Error(response_data, http_res)
|
|
93
|
+
if utils.match_response(http_res, ["401", "429", "4XX"], "*"):
|
|
90
94
|
http_res_text = utils.stream_to_text(http_res)
|
|
91
95
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
92
96
|
if utils.match_response(http_res, "5XX", "*"):
|
|
@@ -98,8 +102,8 @@ class Tokens(BaseSDK):
|
|
|
98
102
|
async def get_async(
|
|
99
103
|
self,
|
|
100
104
|
*,
|
|
101
|
-
username: str,
|
|
102
105
|
password: str,
|
|
106
|
+
username: str,
|
|
103
107
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
104
108
|
server_url: Optional[str] = None,
|
|
105
109
|
timeout_ms: Optional[int] = None,
|
|
@@ -107,10 +111,10 @@ class Tokens(BaseSDK):
|
|
|
107
111
|
) -> models.AuthToken:
|
|
108
112
|
r"""Log in and fetch an authentication token
|
|
109
113
|
|
|
110
|
-
This endpoint is unavailable on Cribl.Cloud.
|
|
114
|
+
This endpoint is unavailable on Cribl.Cloud.Instead, follow the instructions at https://docs.cribl.io/stream/api-tutorials/#criblcloud to get an Auth token for Cribl.Cloud.
|
|
111
115
|
|
|
112
|
-
:param username:
|
|
113
116
|
:param password:
|
|
117
|
+
:param username:
|
|
114
118
|
:param retries: Override the default retry configuration for this method
|
|
115
119
|
:param server_url: Override the default server URL for this method
|
|
116
120
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -127,8 +131,8 @@ class Tokens(BaseSDK):
|
|
|
127
131
|
base_url = self._get_url(base_url, url_variables)
|
|
128
132
|
|
|
129
133
|
request = models.LoginInfo(
|
|
130
|
-
username=username,
|
|
131
134
|
password=password,
|
|
135
|
+
username=username,
|
|
132
136
|
)
|
|
133
137
|
|
|
134
138
|
req = self._build_request_async(
|
|
@@ -161,18 +165,22 @@ class Tokens(BaseSDK):
|
|
|
161
165
|
hook_ctx=HookContext(
|
|
162
166
|
config=self.sdk_configuration,
|
|
163
167
|
base_url=base_url or "",
|
|
164
|
-
operation_id="
|
|
168
|
+
operation_id="createAuthLogin",
|
|
165
169
|
oauth2_scopes=[],
|
|
166
170
|
security_source=None,
|
|
167
171
|
),
|
|
168
172
|
request=req,
|
|
169
|
-
error_status_codes=["401", "
|
|
173
|
+
error_status_codes=["401", "429", "4XX", "500", "5XX"],
|
|
170
174
|
retry_config=retry_config,
|
|
171
175
|
)
|
|
172
176
|
|
|
177
|
+
response_data: Any = None
|
|
173
178
|
if utils.match_response(http_res, "200", "application/json"):
|
|
174
179
|
return unmarshal_json_response(models.AuthToken, http_res)
|
|
175
|
-
if utils.match_response(http_res,
|
|
180
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
181
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
182
|
+
raise errors.Error(response_data, http_res)
|
|
183
|
+
if utils.match_response(http_res, ["401", "429", "4XX"], "*"):
|
|
176
184
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
177
185
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
178
186
|
if utils.match_response(http_res, "5XX", "*"):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cribl-control-plane
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1rc2
|
|
4
4
|
Summary: Python Client SDK Generated by Speakeasy.
|
|
5
5
|
Author: Speakeasy
|
|
6
6
|
Requires-Python: >=3.9.2
|
|
@@ -359,15 +359,6 @@ with CriblControlPlane(
|
|
|
359
359
|
|
|
360
360
|
* [get](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/configsversions/README.md#get) - Get the configuration version for a Worker Group or Edge Fleet
|
|
361
361
|
|
|
362
|
-
#### [groups.mappings](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/mappings/README.md)
|
|
363
|
-
|
|
364
|
-
* [activate](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/mappings/README.md#activate) - Set a Mapping Ruleset as the active configuration for the specified Cribl product
|
|
365
|
-
* [create](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/mappings/README.md#create) - Create a new Mapping Ruleset for the specified Cribl product
|
|
366
|
-
* [list](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/mappings/README.md#list) - List all Mapping Rulesets for the specified Cribl product
|
|
367
|
-
* [delete](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/mappings/README.md#delete) - Delete the specified Mapping Ruleset from the Worker Group or Edge Fleet
|
|
368
|
-
* [get](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/mappings/README.md#get) - Retrieve a Specific Mapping Ruleset
|
|
369
|
-
* [update](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/mappings/README.md#update) - Update an existing Mapping Ruleset for a Worker Group or Edge Fleet
|
|
370
|
-
|
|
371
362
|
### [health](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/health/README.md)
|
|
372
363
|
|
|
373
364
|
* [get](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/health/README.md#get) - Retrieve health status of the server
|
|
@@ -411,7 +402,7 @@ with CriblControlPlane(
|
|
|
411
402
|
* [list](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/routessdk/README.md#list) - List all Routes
|
|
412
403
|
* [get](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/routessdk/README.md#get) - Get a Routing table
|
|
413
404
|
* [update](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/routessdk/README.md#update) - Update a Route
|
|
414
|
-
* [append](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/routessdk/README.md#append) -
|
|
405
|
+
* [append](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/routessdk/README.md#append) - Add a Route to the end of the Routing table
|
|
415
406
|
|
|
416
407
|
### [sources](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/sources/README.md)
|
|
417
408
|
|
|
@@ -687,7 +678,7 @@ with CriblControlPlane(
|
|
|
687
678
|
### Error Classes
|
|
688
679
|
**Primary errors:**
|
|
689
680
|
* [`CriblControlPlaneError`](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/./src/cribl_control_plane/errors/criblcontrolplaneerror.py): The base class for HTTP error responses.
|
|
690
|
-
* [`Error`](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/./src/cribl_control_plane/errors/error.py): Unexpected error. Status code `500`.
|
|
681
|
+
* [`Error`](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/./src/cribl_control_plane/errors/error.py): Unexpected error. Status code `500`.
|
|
691
682
|
|
|
692
683
|
<details><summary>Less common errors (6)</summary>
|
|
693
684
|
|
|
@@ -700,7 +691,7 @@ with CriblControlPlane(
|
|
|
700
691
|
|
|
701
692
|
|
|
702
693
|
**Inherit from [`CriblControlPlaneError`](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/./src/cribl_control_plane/errors/criblcontrolplaneerror.py)**:
|
|
703
|
-
* [`
|
|
694
|
+
* [`HealthServerStatusError`](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/./src/cribl_control_plane/errors/healthserverstatuserror.py): Healthy status. Status code `420`. Applicable to 1 of 63 methods.*
|
|
704
695
|
* [`ResponseValidationError`](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/./src/cribl_control_plane/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute.
|
|
705
696
|
|
|
706
697
|
</details>
|