cribl-control-plane 0.0.22__py3-none-any.whl → 0.0.23__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/destinations.py +10 -10
- cribl_control_plane/models/__init__.py +125 -5382
- cribl_control_plane/models/createinputop.py +2 -18216
- cribl_control_plane/models/createoutputop.py +2 -18415
- cribl_control_plane/models/input.py +6 -6
- cribl_control_plane/models/inputedgeprometheus.py +7 -10
- cribl_control_plane/models/{inputgrafana_union.py → inputgrafana.py} +4 -4
- cribl_control_plane/models/{inputsyslog_union.py → inputsyslog.py} +4 -4
- cribl_control_plane/models/inputwef.py +4 -4
- cribl_control_plane/models/outputgooglepubsub.py +3 -3
- cribl_control_plane/models/outputsplunklb.py +8 -8
- cribl_control_plane/models/routes.py +0 -24
- cribl_control_plane/models/updateinputbyidop.py +2 -2
- cribl_control_plane/models/updateoutputbyidop.py +2 -2
- cribl_control_plane/models/updateroutesbyidop.py +3 -4
- cribl_control_plane/packs.py +0 -174
- cribl_control_plane/routes_sdk.py +8 -12
- cribl_control_plane/sources.py +10 -10
- {cribl_control_plane-0.0.22.dist-info → cribl_control_plane-0.0.23.dist-info}/METADATA +2 -3
- {cribl_control_plane-0.0.22.dist-info → cribl_control_plane-0.0.23.dist-info}/RECORD +22 -24
- cribl_control_plane/models/routesroute_input.py +0 -67
- cribl_control_plane/models/updatepacksop.py +0 -37
- {cribl_control_plane-0.0.22.dist-info → cribl_control_plane-0.0.23.dist-info}/WHEEL +0 -0
|
@@ -20,7 +20,7 @@ from .inputexec import InputExec, InputExecTypedDict
|
|
|
20
20
|
from .inputfile import InputFile, InputFileTypedDict
|
|
21
21
|
from .inputfirehose import InputFirehose, InputFirehoseTypedDict
|
|
22
22
|
from .inputgooglepubsub import InputGooglePubsub, InputGooglePubsubTypedDict
|
|
23
|
-
from .
|
|
23
|
+
from .inputgrafana import InputGrafana, InputGrafanaTypedDict
|
|
24
24
|
from .inputhttp import InputHTTP, InputHTTPTypedDict
|
|
25
25
|
from .inputhttpraw import InputHTTPRaw, InputHTTPRawTypedDict
|
|
26
26
|
from .inputjournalfiles import InputJournalFiles, InputJournalFilesTypedDict
|
|
@@ -55,7 +55,7 @@ from .inputsplunk import InputSplunk, InputSplunkTypedDict
|
|
|
55
55
|
from .inputsplunkhec import InputSplunkHec, InputSplunkHecTypedDict
|
|
56
56
|
from .inputsplunksearch import InputSplunkSearch, InputSplunkSearchTypedDict
|
|
57
57
|
from .inputsqs import InputSqs, InputSqsTypedDict
|
|
58
|
-
from .
|
|
58
|
+
from .inputsyslog import InputSyslog, InputSyslogTypedDict
|
|
59
59
|
from .inputsystemmetrics import InputSystemMetrics, InputSystemMetricsTypedDict
|
|
60
60
|
from .inputsystemstate import InputSystemState, InputSystemStateTypedDict
|
|
61
61
|
from .inputtcp import InputTCP, InputTCPTypedDict
|
|
@@ -128,8 +128,8 @@ InputTypedDict = TypeAliasType(
|
|
|
128
128
|
InputS3InventoryTypedDict,
|
|
129
129
|
InputMskTypedDict,
|
|
130
130
|
InputSplunkSearchTypedDict,
|
|
131
|
-
|
|
132
|
-
|
|
131
|
+
InputSyslogTypedDict,
|
|
132
|
+
InputGrafanaTypedDict,
|
|
133
133
|
],
|
|
134
134
|
)
|
|
135
135
|
|
|
@@ -193,7 +193,7 @@ Input = TypeAliasType(
|
|
|
193
193
|
InputS3Inventory,
|
|
194
194
|
InputMsk,
|
|
195
195
|
InputSplunkSearch,
|
|
196
|
-
|
|
197
|
-
|
|
196
|
+
InputSyslog,
|
|
197
|
+
InputGrafana,
|
|
198
198
|
],
|
|
199
199
|
)
|
|
@@ -155,7 +155,7 @@ class InputEdgePrometheusAuthTypeAuthenticationMethod(str, Enum):
|
|
|
155
155
|
KUBERNETES = "kubernetes"
|
|
156
156
|
|
|
157
157
|
|
|
158
|
-
class
|
|
158
|
+
class TargetProtocol(str, Enum):
|
|
159
159
|
r"""Protocol to use when collecting metrics"""
|
|
160
160
|
|
|
161
161
|
HTTP = "http"
|
|
@@ -165,7 +165,7 @@ class InputEdgePrometheusTargetProtocol(str, Enum):
|
|
|
165
165
|
class TargetTypedDict(TypedDict):
|
|
166
166
|
host: str
|
|
167
167
|
r"""Name of host from which to pull metrics."""
|
|
168
|
-
protocol: NotRequired[
|
|
168
|
+
protocol: NotRequired[TargetProtocol]
|
|
169
169
|
r"""Protocol to use when collecting metrics"""
|
|
170
170
|
port: NotRequired[float]
|
|
171
171
|
r"""The port number in the metrics URL for discovered targets."""
|
|
@@ -177,9 +177,7 @@ class Target(BaseModel):
|
|
|
177
177
|
host: str
|
|
178
178
|
r"""Name of host from which to pull metrics."""
|
|
179
179
|
|
|
180
|
-
protocol: Optional[
|
|
181
|
-
InputEdgePrometheusTargetProtocol.HTTP
|
|
182
|
-
)
|
|
180
|
+
protocol: Optional[TargetProtocol] = TargetProtocol.HTTP
|
|
183
181
|
r"""Protocol to use when collecting metrics"""
|
|
184
182
|
|
|
185
183
|
port: Optional[float] = 9090
|
|
@@ -197,7 +195,7 @@ class InputEdgePrometheusRecordType(str, Enum):
|
|
|
197
195
|
AAAA = "AAAA"
|
|
198
196
|
|
|
199
197
|
|
|
200
|
-
class
|
|
198
|
+
class ScrapeProtocolProtocol(str, Enum):
|
|
201
199
|
r"""Protocol to use when collecting metrics"""
|
|
202
200
|
|
|
203
201
|
HTTP = "http"
|
|
@@ -286,7 +284,7 @@ class InputEdgePrometheusTypedDict(TypedDict):
|
|
|
286
284
|
r"""List of DNS names to resolve"""
|
|
287
285
|
record_type: NotRequired[InputEdgePrometheusRecordType]
|
|
288
286
|
r"""DNS Record type to resolve"""
|
|
289
|
-
scrape_protocol: NotRequired[
|
|
287
|
+
scrape_protocol: NotRequired[ScrapeProtocolProtocol]
|
|
290
288
|
r"""Protocol to use when collecting metrics"""
|
|
291
289
|
scrape_path: NotRequired[str]
|
|
292
290
|
r"""Path to use when collecting metrics from discovered targets"""
|
|
@@ -410,9 +408,8 @@ class InputEdgePrometheus(BaseModel):
|
|
|
410
408
|
r"""DNS Record type to resolve"""
|
|
411
409
|
|
|
412
410
|
scrape_protocol: Annotated[
|
|
413
|
-
Optional[
|
|
414
|
-
|
|
415
|
-
] = InputEdgePrometheusScrapeProtocolProtocol.HTTP
|
|
411
|
+
Optional[ScrapeProtocolProtocol], pydantic.Field(alias="scrapeProtocol")
|
|
412
|
+
] = ScrapeProtocolProtocol.HTTP
|
|
416
413
|
r"""Protocol to use when collecting metrics"""
|
|
417
414
|
|
|
418
415
|
scrape_path: Annotated[Optional[str], pydantic.Field(alias="scrapePath")] = (
|
|
@@ -1194,12 +1194,12 @@ class InputGrafanaGrafana1(BaseModel):
|
|
|
1194
1194
|
description: Optional[str] = None
|
|
1195
1195
|
|
|
1196
1196
|
|
|
1197
|
-
|
|
1198
|
-
"
|
|
1197
|
+
InputGrafanaTypedDict = TypeAliasType(
|
|
1198
|
+
"InputGrafanaTypedDict",
|
|
1199
1199
|
Union[InputGrafanaGrafana1TypedDict, InputGrafanaGrafana2TypedDict],
|
|
1200
1200
|
)
|
|
1201
1201
|
|
|
1202
1202
|
|
|
1203
|
-
|
|
1204
|
-
"
|
|
1203
|
+
InputGrafana = TypeAliasType(
|
|
1204
|
+
"InputGrafana", Union[InputGrafanaGrafana1, InputGrafanaGrafana2]
|
|
1205
1205
|
)
|
|
@@ -724,12 +724,12 @@ class InputSyslogSyslog1(BaseModel):
|
|
|
724
724
|
r"""When enabled, parses PROXY protocol headers during the TLS handshake. Disable if compatibility issues arise."""
|
|
725
725
|
|
|
726
726
|
|
|
727
|
-
|
|
728
|
-
"
|
|
727
|
+
InputSyslogTypedDict = TypeAliasType(
|
|
728
|
+
"InputSyslogTypedDict",
|
|
729
729
|
Union[InputSyslogSyslog1TypedDict, InputSyslogSyslog2TypedDict],
|
|
730
730
|
)
|
|
731
731
|
|
|
732
732
|
|
|
733
|
-
|
|
734
|
-
"
|
|
733
|
+
InputSyslog = TypeAliasType(
|
|
734
|
+
"InputSyslog", Union[InputSyslogSyslog1, InputSyslogSyslog2]
|
|
735
735
|
)
|
|
@@ -200,13 +200,13 @@ class QueryBuilderMode(str, Enum):
|
|
|
200
200
|
XML = "xml"
|
|
201
201
|
|
|
202
202
|
|
|
203
|
-
class
|
|
203
|
+
class SubscriptionMetadatumTypedDict(TypedDict):
|
|
204
204
|
name: str
|
|
205
205
|
value: str
|
|
206
206
|
r"""JavaScript expression to compute field's value, enclosed in quotes or backticks. (Can evaluate to a constant.)"""
|
|
207
207
|
|
|
208
208
|
|
|
209
|
-
class
|
|
209
|
+
class SubscriptionMetadatum(BaseModel):
|
|
210
210
|
name: str
|
|
211
211
|
|
|
212
212
|
value: str
|
|
@@ -234,7 +234,7 @@ class SubscriptionTypedDict(TypedDict):
|
|
|
234
234
|
locale: NotRequired[str]
|
|
235
235
|
r"""The RFC-3066 locale the Windows clients should use when sending events. Defaults to \"en-US\"."""
|
|
236
236
|
query_selector: NotRequired[QueryBuilderMode]
|
|
237
|
-
metadata: NotRequired[List[
|
|
237
|
+
metadata: NotRequired[List[SubscriptionMetadatumTypedDict]]
|
|
238
238
|
r"""Fields to add to events ingested under this subscription"""
|
|
239
239
|
|
|
240
240
|
|
|
@@ -280,7 +280,7 @@ class Subscription(BaseModel):
|
|
|
280
280
|
Optional[QueryBuilderMode], pydantic.Field(alias="querySelector")
|
|
281
281
|
] = QueryBuilderMode.SIMPLE
|
|
282
282
|
|
|
283
|
-
metadata: Optional[List[
|
|
283
|
+
metadata: Optional[List[SubscriptionMetadatum]] = None
|
|
284
284
|
r"""Fields to add to events ingested under this subscription"""
|
|
285
285
|
|
|
286
286
|
|
|
@@ -20,21 +20,21 @@ class OutputGooglePubsubGoogleAuthenticationMethod(str, Enum):
|
|
|
20
20
|
SECRET = "secret"
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
class
|
|
23
|
+
class FlushPeriodSecType(str, Enum):
|
|
24
24
|
NUMBER = "number"
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
class FlushPeriodSecTypedDict(TypedDict):
|
|
28
28
|
r"""Maximum time to wait before sending a batch (when batch size limit is not reached)."""
|
|
29
29
|
|
|
30
|
-
type: NotRequired[
|
|
30
|
+
type: NotRequired[FlushPeriodSecType]
|
|
31
31
|
default: NotRequired[float]
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
class FlushPeriodSec(BaseModel):
|
|
35
35
|
r"""Maximum time to wait before sending a batch (when batch size limit is not reached)."""
|
|
36
36
|
|
|
37
|
-
type: Optional[
|
|
37
|
+
type: Optional[FlushPeriodSecType] = None
|
|
38
38
|
|
|
39
39
|
default: Optional[float] = None
|
|
40
40
|
|
|
@@ -124,7 +124,7 @@ class OutputSplunkLbCompressCompression(str, Enum):
|
|
|
124
124
|
ALWAYS = "always"
|
|
125
125
|
|
|
126
126
|
|
|
127
|
-
class
|
|
127
|
+
class IndexerDiscoveryConfigsAuthTokenAuthenticationMethod(str, Enum):
|
|
128
128
|
r"""Select Manual to enter an auth token directly, or select Secret to use a text secret to authenticate"""
|
|
129
129
|
|
|
130
130
|
MANUAL = "manual"
|
|
@@ -132,19 +132,19 @@ class OutputSplunkLbAuthTokenAuthenticationMethod(str, Enum):
|
|
|
132
132
|
|
|
133
133
|
|
|
134
134
|
class OutputSplunkLbAuthTokenTypedDict(TypedDict):
|
|
135
|
-
auth_type: NotRequired[
|
|
135
|
+
auth_type: NotRequired[IndexerDiscoveryConfigsAuthTokenAuthenticationMethod]
|
|
136
136
|
r"""Select Manual to enter an auth token directly, or select Secret to use a text secret to authenticate"""
|
|
137
137
|
|
|
138
138
|
|
|
139
139
|
class OutputSplunkLbAuthToken(BaseModel):
|
|
140
140
|
auth_type: Annotated[
|
|
141
|
-
Optional[
|
|
141
|
+
Optional[IndexerDiscoveryConfigsAuthTokenAuthenticationMethod],
|
|
142
142
|
pydantic.Field(alias="authType"),
|
|
143
|
-
] =
|
|
143
|
+
] = IndexerDiscoveryConfigsAuthTokenAuthenticationMethod.MANUAL
|
|
144
144
|
r"""Select Manual to enter an auth token directly, or select Secret to use a text secret to authenticate"""
|
|
145
145
|
|
|
146
146
|
|
|
147
|
-
class
|
|
147
|
+
class IndexerDiscoveryConfigsAuthenticationMethod(str, Enum):
|
|
148
148
|
r"""Select Manual to enter an auth token directly, or select Secret to use a text secret to authenticate"""
|
|
149
149
|
|
|
150
150
|
MANUAL = "manual"
|
|
@@ -164,7 +164,7 @@ class IndexerDiscoveryConfigsTypedDict(TypedDict):
|
|
|
164
164
|
r"""During indexer discovery, reject cluster manager certificates that are not authorized by the system's CA. Disable to allow untrusted (for example, self-signed) certificates."""
|
|
165
165
|
auth_tokens: NotRequired[List[OutputSplunkLbAuthTokenTypedDict]]
|
|
166
166
|
r"""Tokens required to authenticate to cluster manager for indexer discovery"""
|
|
167
|
-
auth_type: NotRequired[
|
|
167
|
+
auth_type: NotRequired[IndexerDiscoveryConfigsAuthenticationMethod]
|
|
168
168
|
r"""Select Manual to enter an auth token directly, or select Secret to use a text secret to authenticate"""
|
|
169
169
|
auth_token: NotRequired[str]
|
|
170
170
|
r"""Shared secret to be provided by any client (in authToken header field). If empty, unauthorized access is permitted."""
|
|
@@ -197,9 +197,9 @@ class IndexerDiscoveryConfigs(BaseModel):
|
|
|
197
197
|
r"""Tokens required to authenticate to cluster manager for indexer discovery"""
|
|
198
198
|
|
|
199
199
|
auth_type: Annotated[
|
|
200
|
-
Optional[
|
|
200
|
+
Optional[IndexerDiscoveryConfigsAuthenticationMethod],
|
|
201
201
|
pydantic.Field(alias="authType"),
|
|
202
|
-
] =
|
|
202
|
+
] = IndexerDiscoveryConfigsAuthenticationMethod.MANUAL
|
|
203
203
|
r"""Select Manual to enter an auth token directly, or select Secret to use a text secret to authenticate"""
|
|
204
204
|
|
|
205
205
|
auth_token: Annotated[Optional[str], pydantic.Field(alias="authToken")] = ""
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
from .routesroute import RoutesRoute, RoutesRouteTypedDict
|
|
5
|
-
from .routesroute_input import RoutesRouteInput, RoutesRouteInputTypedDict
|
|
6
5
|
from cribl_control_plane.types import BaseModel
|
|
7
6
|
import pydantic
|
|
8
7
|
from pydantic import ConfigDict
|
|
@@ -72,26 +71,3 @@ class Routes(BaseModel):
|
|
|
72
71
|
|
|
73
72
|
comments: Optional[List[Comment]] = None
|
|
74
73
|
r"""Comments"""
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
class RoutesInputTypedDict(TypedDict):
|
|
78
|
-
routes: List[RoutesRouteInputTypedDict]
|
|
79
|
-
r"""Pipeline routing rules"""
|
|
80
|
-
id: NotRequired[str]
|
|
81
|
-
r"""Routes ID"""
|
|
82
|
-
groups: NotRequired[Dict[str, RoutesGroupsTypedDict]]
|
|
83
|
-
comments: NotRequired[List[CommentTypedDict]]
|
|
84
|
-
r"""Comments"""
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
class RoutesInput(BaseModel):
|
|
88
|
-
routes: List[RoutesRouteInput]
|
|
89
|
-
r"""Pipeline routing rules"""
|
|
90
|
-
|
|
91
|
-
id: Optional[str] = None
|
|
92
|
-
r"""Routes ID"""
|
|
93
|
-
|
|
94
|
-
groups: Optional[Dict[str, RoutesGroups]] = None
|
|
95
|
-
|
|
96
|
-
comments: Optional[List[Comment]] = None
|
|
97
|
-
r"""Comments"""
|
|
@@ -12,7 +12,7 @@ class UpdateInputByIDRequestTypedDict(TypedDict):
|
|
|
12
12
|
id: str
|
|
13
13
|
r"""Unique ID to PATCH"""
|
|
14
14
|
input: InputTypedDict
|
|
15
|
-
r"""
|
|
15
|
+
r"""Input object"""
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
class UpdateInputByIDRequest(BaseModel):
|
|
@@ -24,7 +24,7 @@ class UpdateInputByIDRequest(BaseModel):
|
|
|
24
24
|
input: Annotated[
|
|
25
25
|
Input, FieldMetadata(request=RequestMetadata(media_type="application/json"))
|
|
26
26
|
]
|
|
27
|
-
r"""
|
|
27
|
+
r"""Input object"""
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
class UpdateInputByIDResponseTypedDict(TypedDict):
|
|
@@ -12,7 +12,7 @@ class UpdateOutputByIDRequestTypedDict(TypedDict):
|
|
|
12
12
|
id: str
|
|
13
13
|
r"""Unique ID to PATCH"""
|
|
14
14
|
output: OutputTypedDict
|
|
15
|
-
r"""
|
|
15
|
+
r"""Output object"""
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
class UpdateOutputByIDRequest(BaseModel):
|
|
@@ -24,7 +24,7 @@ class UpdateOutputByIDRequest(BaseModel):
|
|
|
24
24
|
output: Annotated[
|
|
25
25
|
Output, FieldMetadata(request=RequestMetadata(media_type="application/json"))
|
|
26
26
|
]
|
|
27
|
-
r"""
|
|
27
|
+
r"""Output object"""
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
class UpdateOutputByIDResponseTypedDict(TypedDict):
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
from .routes import Routes,
|
|
4
|
+
from .routes import Routes, RoutesTypedDict
|
|
5
5
|
from cribl_control_plane.types import BaseModel
|
|
6
6
|
from cribl_control_plane.utils import FieldMetadata, PathParamMetadata, RequestMetadata
|
|
7
7
|
import pydantic
|
|
@@ -12,7 +12,7 @@ from typing_extensions import Annotated, NotRequired, TypedDict
|
|
|
12
12
|
class UpdateRoutesByIDRequestTypedDict(TypedDict):
|
|
13
13
|
id_param: str
|
|
14
14
|
r"""Unique ID to PATCH"""
|
|
15
|
-
routes:
|
|
15
|
+
routes: RoutesTypedDict
|
|
16
16
|
r"""Routes object to be updated"""
|
|
17
17
|
|
|
18
18
|
|
|
@@ -25,8 +25,7 @@ class UpdateRoutesByIDRequest(BaseModel):
|
|
|
25
25
|
r"""Unique ID to PATCH"""
|
|
26
26
|
|
|
27
27
|
routes: Annotated[
|
|
28
|
-
|
|
29
|
-
FieldMetadata(request=RequestMetadata(media_type="application/json")),
|
|
28
|
+
Routes, FieldMetadata(request=RequestMetadata(media_type="application/json"))
|
|
30
29
|
]
|
|
31
30
|
r"""Routes object to be updated"""
|
|
32
31
|
|
cribl_control_plane/packs.py
CHANGED
|
@@ -448,180 +448,6 @@ class Packs(BaseSDK):
|
|
|
448
448
|
|
|
449
449
|
raise errors.APIError("Unexpected response received", http_res)
|
|
450
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
451
|
def delete_packs_by_id(
|
|
626
452
|
self,
|
|
627
453
|
*,
|
|
@@ -350,9 +350,7 @@ class RoutesSDK(BaseSDK):
|
|
|
350
350
|
self,
|
|
351
351
|
*,
|
|
352
352
|
id_param: str,
|
|
353
|
-
routes: Union[
|
|
354
|
-
List[models.RoutesRouteInput], List[models.RoutesRouteInputTypedDict]
|
|
355
|
-
],
|
|
353
|
+
routes: Union[List[models.RoutesRoute], List[models.RoutesRouteTypedDict]],
|
|
356
354
|
id: Optional[str] = None,
|
|
357
355
|
groups: Optional[
|
|
358
356
|
Union[
|
|
@@ -393,9 +391,9 @@ class RoutesSDK(BaseSDK):
|
|
|
393
391
|
|
|
394
392
|
request = models.UpdateRoutesByIDRequest(
|
|
395
393
|
id_param=id_param,
|
|
396
|
-
routes=models.
|
|
394
|
+
routes=models.Routes(
|
|
397
395
|
id=id,
|
|
398
|
-
routes=utils.get_pydantic_model(routes, List[models.
|
|
396
|
+
routes=utils.get_pydantic_model(routes, List[models.RoutesRoute]),
|
|
399
397
|
groups=utils.get_pydantic_model(
|
|
400
398
|
groups, Optional[Dict[str, models.RoutesGroups]]
|
|
401
399
|
),
|
|
@@ -419,7 +417,7 @@ class RoutesSDK(BaseSDK):
|
|
|
419
417
|
http_headers=http_headers,
|
|
420
418
|
security=self.sdk_configuration.security,
|
|
421
419
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
422
|
-
request.routes, False, False, "json", models.
|
|
420
|
+
request.routes, False, False, "json", models.Routes
|
|
423
421
|
),
|
|
424
422
|
timeout_ms=timeout_ms,
|
|
425
423
|
)
|
|
@@ -466,9 +464,7 @@ class RoutesSDK(BaseSDK):
|
|
|
466
464
|
self,
|
|
467
465
|
*,
|
|
468
466
|
id_param: str,
|
|
469
|
-
routes: Union[
|
|
470
|
-
List[models.RoutesRouteInput], List[models.RoutesRouteInputTypedDict]
|
|
471
|
-
],
|
|
467
|
+
routes: Union[List[models.RoutesRoute], List[models.RoutesRouteTypedDict]],
|
|
472
468
|
id: Optional[str] = None,
|
|
473
469
|
groups: Optional[
|
|
474
470
|
Union[
|
|
@@ -509,9 +505,9 @@ class RoutesSDK(BaseSDK):
|
|
|
509
505
|
|
|
510
506
|
request = models.UpdateRoutesByIDRequest(
|
|
511
507
|
id_param=id_param,
|
|
512
|
-
routes=models.
|
|
508
|
+
routes=models.Routes(
|
|
513
509
|
id=id,
|
|
514
|
-
routes=utils.get_pydantic_model(routes, List[models.
|
|
510
|
+
routes=utils.get_pydantic_model(routes, List[models.RoutesRoute]),
|
|
515
511
|
groups=utils.get_pydantic_model(
|
|
516
512
|
groups, Optional[Dict[str, models.RoutesGroups]]
|
|
517
513
|
),
|
|
@@ -535,7 +531,7 @@ class RoutesSDK(BaseSDK):
|
|
|
535
531
|
http_headers=http_headers,
|
|
536
532
|
security=self.sdk_configuration.security,
|
|
537
533
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
538
|
-
request.routes, False, False, "json", models.
|
|
534
|
+
request.routes, False, False, "json", models.Routes
|
|
539
535
|
),
|
|
540
536
|
timeout_ms=timeout_ms,
|
|
541
537
|
)
|
cribl_control_plane/sources.py
CHANGED
|
@@ -173,7 +173,7 @@ class Sources(BaseSDK):
|
|
|
173
173
|
def create_source(
|
|
174
174
|
self,
|
|
175
175
|
*,
|
|
176
|
-
request: Union[models.
|
|
176
|
+
request: Union[models.Input, models.InputTypedDict],
|
|
177
177
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
178
178
|
server_url: Optional[str] = None,
|
|
179
179
|
timeout_ms: Optional[int] = None,
|
|
@@ -200,8 +200,8 @@ class Sources(BaseSDK):
|
|
|
200
200
|
base_url = self._get_url(base_url, url_variables)
|
|
201
201
|
|
|
202
202
|
if not isinstance(request, BaseModel):
|
|
203
|
-
request = utils.unmarshal(request, models.
|
|
204
|
-
request = cast(models.
|
|
203
|
+
request = utils.unmarshal(request, models.Input)
|
|
204
|
+
request = cast(models.Input, request)
|
|
205
205
|
|
|
206
206
|
req = self._build_request(
|
|
207
207
|
method="POST",
|
|
@@ -217,7 +217,7 @@ class Sources(BaseSDK):
|
|
|
217
217
|
http_headers=http_headers,
|
|
218
218
|
security=self.sdk_configuration.security,
|
|
219
219
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
220
|
-
request, False, False, "json", models.
|
|
220
|
+
request, False, False, "json", models.Input
|
|
221
221
|
),
|
|
222
222
|
timeout_ms=timeout_ms,
|
|
223
223
|
)
|
|
@@ -263,7 +263,7 @@ class Sources(BaseSDK):
|
|
|
263
263
|
async def create_source_async(
|
|
264
264
|
self,
|
|
265
265
|
*,
|
|
266
|
-
request: Union[models.
|
|
266
|
+
request: Union[models.Input, models.InputTypedDict],
|
|
267
267
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
268
268
|
server_url: Optional[str] = None,
|
|
269
269
|
timeout_ms: Optional[int] = None,
|
|
@@ -290,8 +290,8 @@ class Sources(BaseSDK):
|
|
|
290
290
|
base_url = self._get_url(base_url, url_variables)
|
|
291
291
|
|
|
292
292
|
if not isinstance(request, BaseModel):
|
|
293
|
-
request = utils.unmarshal(request, models.
|
|
294
|
-
request = cast(models.
|
|
293
|
+
request = utils.unmarshal(request, models.Input)
|
|
294
|
+
request = cast(models.Input, request)
|
|
295
295
|
|
|
296
296
|
req = self._build_request_async(
|
|
297
297
|
method="POST",
|
|
@@ -307,7 +307,7 @@ class Sources(BaseSDK):
|
|
|
307
307
|
http_headers=http_headers,
|
|
308
308
|
security=self.sdk_configuration.security,
|
|
309
309
|
get_serialized_body=lambda: utils.serialize_request_body(
|
|
310
|
-
request, False, False, "json", models.
|
|
310
|
+
request, False, False, "json", models.Input
|
|
311
311
|
),
|
|
312
312
|
timeout_ms=timeout_ms,
|
|
313
313
|
)
|
|
@@ -539,7 +539,7 @@ class Sources(BaseSDK):
|
|
|
539
539
|
Update Source
|
|
540
540
|
|
|
541
541
|
:param id: Unique ID to PATCH
|
|
542
|
-
:param input:
|
|
542
|
+
:param input: Input object
|
|
543
543
|
:param retries: Override the default retry configuration for this method
|
|
544
544
|
:param server_url: Override the default server URL for this method
|
|
545
545
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -632,7 +632,7 @@ class Sources(BaseSDK):
|
|
|
632
632
|
Update Source
|
|
633
633
|
|
|
634
634
|
:param id: Unique ID to PATCH
|
|
635
|
-
:param input:
|
|
635
|
+
:param input: Input object
|
|
636
636
|
:param retries: Override the default retry configuration for this method
|
|
637
637
|
:param server_url: Override the default server URL for this method
|
|
638
638
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|