cribl-control-plane 0.2.1rc6__py3-none-any.whl → 0.3.0a1__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 +5 -8
- cribl_control_plane/errors/{healthserverstatus_error.py → healthstatus_error.py} +9 -10
- cribl_control_plane/groups_sdk.py +30 -54
- cribl_control_plane/health.py +16 -22
- cribl_control_plane/models/__init__.py +50 -103
- cribl_control_plane/models/appmode.py +14 -0
- cribl_control_plane/models/authtoken.py +1 -5
- cribl_control_plane/models/configgroup.py +6 -35
- cribl_control_plane/models/createconfiggroupbyproductop.py +7 -8
- cribl_control_plane/models/createroutesappendbyidop.py +2 -2
- cribl_control_plane/models/createversionundoop.py +3 -3
- cribl_control_plane/models/deleteoutputpqbyidop.py +2 -2
- cribl_control_plane/models/distributedsummary.py +0 -6
- cribl_control_plane/models/error.py +16 -0
- cribl_control_plane/models/gethealthinfoop.py +17 -0
- cribl_control_plane/models/hbcriblinfo.py +3 -14
- cribl_control_plane/models/{healthserverstatus.py → healthstatus.py} +7 -7
- cribl_control_plane/models/heartbeatmetadata.py +0 -3
- cribl_control_plane/models/input.py +63 -65
- cribl_control_plane/models/inputappscope.py +0 -4
- cribl_control_plane/models/inputazureblob.py +0 -4
- cribl_control_plane/models/inputcollection.py +0 -4
- cribl_control_plane/models/inputconfluentcloud.py +18 -8
- cribl_control_plane/models/inputcribl.py +0 -4
- cribl_control_plane/models/inputcriblhttp.py +0 -4
- cribl_control_plane/models/inputcribllakehttp.py +0 -4
- cribl_control_plane/models/inputcriblmetrics.py +0 -4
- cribl_control_plane/models/inputcribltcp.py +0 -4
- cribl_control_plane/models/inputcrowdstrike.py +0 -7
- cribl_control_plane/models/inputdatadogagent.py +0 -4
- cribl_control_plane/models/inputdatagen.py +0 -4
- cribl_control_plane/models/inputedgeprometheus.py +0 -12
- cribl_control_plane/models/inputelastic.py +0 -11
- cribl_control_plane/models/inputeventhub.py +0 -6
- cribl_control_plane/models/inputexec.py +0 -4
- cribl_control_plane/models/inputfile.py +0 -6
- cribl_control_plane/models/inputfirehose.py +0 -4
- cribl_control_plane/models/inputgooglepubsub.py +0 -7
- cribl_control_plane/models/inputgrafana.py +0 -8
- cribl_control_plane/models/inputhttp.py +0 -4
- cribl_control_plane/models/inputhttpraw.py +0 -4
- cribl_control_plane/models/inputjournalfiles.py +0 -4
- cribl_control_plane/models/inputkafka.py +17 -8
- cribl_control_plane/models/inputkinesis.py +0 -15
- cribl_control_plane/models/inputkubeevents.py +0 -4
- cribl_control_plane/models/inputkubelogs.py +0 -4
- cribl_control_plane/models/inputkubemetrics.py +0 -4
- cribl_control_plane/models/inputloki.py +0 -4
- cribl_control_plane/models/inputmetrics.py +0 -4
- cribl_control_plane/models/inputmodeldriventelemetry.py +0 -4
- cribl_control_plane/models/inputmsk.py +17 -7
- cribl_control_plane/models/inputnetflow.py +0 -4
- cribl_control_plane/models/inputoffice365mgmt.py +0 -11
- cribl_control_plane/models/inputoffice365msgtrace.py +0 -11
- cribl_control_plane/models/inputoffice365service.py +0 -11
- cribl_control_plane/models/inputopentelemetry.py +0 -8
- cribl_control_plane/models/inputprometheus.py +0 -10
- cribl_control_plane/models/inputprometheusrw.py +0 -4
- cribl_control_plane/models/inputrawudp.py +0 -4
- cribl_control_plane/models/inputs3.py +0 -7
- cribl_control_plane/models/inputs3inventory.py +0 -7
- cribl_control_plane/models/inputsecuritylake.py +0 -7
- cribl_control_plane/models/inputsnmp.py +0 -11
- cribl_control_plane/models/inputsplunk.py +0 -9
- cribl_control_plane/models/inputsplunkhec.py +0 -4
- cribl_control_plane/models/inputsplunksearch.py +0 -7
- cribl_control_plane/models/inputsqs.py +0 -9
- cribl_control_plane/models/inputsyslog.py +0 -8
- cribl_control_plane/models/inputsystemmetrics.py +0 -32
- cribl_control_plane/models/inputsystemstate.py +0 -4
- cribl_control_plane/models/inputtcp.py +0 -4
- cribl_control_plane/models/inputtcpjson.py +0 -4
- cribl_control_plane/models/inputwef.py +0 -6
- cribl_control_plane/models/inputwindowsmetrics.py +0 -28
- cribl_control_plane/models/inputwineventlogs.py +0 -8
- cribl_control_plane/models/inputwiz.py +0 -7
- cribl_control_plane/models/inputwizwebhook.py +0 -4
- cribl_control_plane/models/inputzscalerhec.py +0 -4
- cribl_control_plane/models/jobinfo.py +1 -4
- cribl_control_plane/models/logininfo.py +3 -3
- cribl_control_plane/models/nodeprovidedinfo.py +1 -11
- cribl_control_plane/models/output.py +72 -77
- cribl_control_plane/models/outputazureblob.py +0 -20
- cribl_control_plane/models/outputazuredataexplorer.py +0 -28
- cribl_control_plane/models/outputazureeventhub.py +0 -17
- cribl_control_plane/models/outputazurelogs.py +0 -13
- cribl_control_plane/models/outputchronicle.py +0 -13
- cribl_control_plane/models/outputclickhouse.py +0 -17
- cribl_control_plane/models/outputcloudwatch.py +0 -13
- cribl_control_plane/models/outputconfluentcloud.py +18 -24
- cribl_control_plane/models/outputcriblhttp.py +0 -15
- cribl_control_plane/models/outputcribllake.py +0 -21
- cribl_control_plane/models/outputcribltcp.py +0 -12
- cribl_control_plane/models/outputcrowdstrikenextgensiem.py +0 -15
- cribl_control_plane/models/outputdatadog.py +0 -30
- cribl_control_plane/models/outputdataset.py +0 -23
- cribl_control_plane/models/outputdls3.py +0 -35
- cribl_control_plane/models/outputdynatracehttp.py +0 -22
- cribl_control_plane/models/outputdynatraceotlp.py +0 -22
- cribl_control_plane/models/outputelastic.py +0 -18
- cribl_control_plane/models/outputelasticcloud.py +0 -13
- cribl_control_plane/models/outputexabeam.py +0 -14
- cribl_control_plane/models/outputfilesystem.py +0 -15
- cribl_control_plane/models/outputgooglechronicle.py +0 -21
- cribl_control_plane/models/outputgooglecloudlogging.py +0 -19
- cribl_control_plane/models/outputgooglecloudstorage.py +0 -28
- cribl_control_plane/models/outputgooglepubsub.py +0 -13
- cribl_control_plane/models/outputgrafanacloud.py +0 -50
- cribl_control_plane/models/outputgraphite.py +0 -12
- cribl_control_plane/models/outputhoneycomb.py +0 -13
- cribl_control_plane/models/outputhumiohec.py +0 -15
- cribl_control_plane/models/outputinfluxdb.py +0 -19
- cribl_control_plane/models/outputkafka.py +17 -24
- cribl_control_plane/models/outputkinesis.py +0 -15
- cribl_control_plane/models/outputloki.py +0 -20
- cribl_control_plane/models/outputminio.py +0 -28
- cribl_control_plane/models/outputmsk.py +17 -23
- cribl_control_plane/models/outputnewrelic.py +0 -16
- cribl_control_plane/models/outputnewrelicevents.py +0 -16
- cribl_control_plane/models/outputopentelemetry.py +0 -22
- cribl_control_plane/models/outputprometheus.py +0 -13
- cribl_control_plane/models/outputring.py +0 -2
- cribl_control_plane/models/outputs3.py +0 -35
- cribl_control_plane/models/outputsecuritylake.py +0 -29
- cribl_control_plane/models/outputsentinel.py +0 -15
- cribl_control_plane/models/outputsentineloneaisiem.py +0 -13
- cribl_control_plane/models/outputservicenow.py +0 -21
- cribl_control_plane/models/outputsignalfx.py +0 -13
- cribl_control_plane/models/outputsns.py +0 -13
- cribl_control_plane/models/outputsplunk.py +0 -15
- cribl_control_plane/models/outputsplunkhec.py +0 -13
- cribl_control_plane/models/outputsplunklb.py +0 -15
- cribl_control_plane/models/outputsqs.py +0 -15
- cribl_control_plane/models/outputstatsd.py +0 -12
- cribl_control_plane/models/outputstatsdext.py +0 -12
- cribl_control_plane/models/outputsumologic.py +0 -15
- cribl_control_plane/models/outputsyslog.py +0 -24
- cribl_control_plane/models/outputtcpjson.py +0 -12
- cribl_control_plane/models/outputwavefront.py +0 -13
- cribl_control_plane/models/outputwebhook.py +0 -23
- cribl_control_plane/models/outputxsiam.py +0 -13
- cribl_control_plane/models/packinfo.py +5 -8
- cribl_control_plane/models/packinstallinfo.py +5 -8
- cribl_control_plane/models/{uploadpackresponse.py → routecloneconf.py} +4 -4
- cribl_control_plane/models/routeconf.py +4 -3
- cribl_control_plane/models/runnablejobcollection.py +0 -4
- cribl_control_plane/packs.py +7 -202
- cribl_control_plane/routes_sdk.py +6 -6
- cribl_control_plane/tokens.py +15 -23
- {cribl_control_plane-0.2.1rc6.dist-info → cribl_control_plane-0.3.0a1.dist-info}/METADATA +9 -50
- {cribl_control_plane-0.2.1rc6.dist-info → cribl_control_plane-0.3.0a1.dist-info}/RECORD +153 -154
- cribl_control_plane/models/groupcreaterequest.py +0 -152
- cribl_control_plane/models/outpostnodeinfo.py +0 -16
- cribl_control_plane/models/outputdatabricks.py +0 -411
- cribl_control_plane/models/updatepacksop.py +0 -25
- {cribl_control_plane-0.2.1rc6.dist-info → cribl_control_plane-0.3.0a1.dist-info}/WHEEL +0 -0
cribl_control_plane/packs.py
CHANGED
|
@@ -6,8 +6,7 @@ from cribl_control_plane._hooks import HookContext
|
|
|
6
6
|
from cribl_control_plane.types import BaseModel, OptionalNullable, UNSET
|
|
7
7
|
from cribl_control_plane.utils import get_security_from_env
|
|
8
8
|
from cribl_control_plane.utils.unmarshal_json_response import unmarshal_json_response
|
|
9
|
-
import
|
|
10
|
-
from typing import Any, IO, Mapping, Optional, Union, cast
|
|
9
|
+
from typing import Any, Mapping, Optional, Union, cast
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
class Packs(BaseSDK):
|
|
@@ -24,9 +23,9 @@ class Packs(BaseSDK):
|
|
|
24
23
|
timeout_ms: Optional[int] = None,
|
|
25
24
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
26
25
|
) -> models.CreatePacksResponse:
|
|
27
|
-
r"""
|
|
26
|
+
r"""Create or install a Pack
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
Create or install a Pack.
|
|
30
29
|
|
|
31
30
|
:param request: The request object to send.
|
|
32
31
|
:param retries: Override the default retry configuration for this method
|
|
@@ -116,9 +115,9 @@ class Packs(BaseSDK):
|
|
|
116
115
|
timeout_ms: Optional[int] = None,
|
|
117
116
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
118
117
|
) -> models.CreatePacksResponse:
|
|
119
|
-
r"""
|
|
118
|
+
r"""Create or install a Pack
|
|
120
119
|
|
|
121
|
-
|
|
120
|
+
Create or install a Pack.
|
|
122
121
|
|
|
123
122
|
:param request: The request object to send.
|
|
124
123
|
:param retries: Override the default retry configuration for this method
|
|
@@ -371,200 +370,6 @@ class Packs(BaseSDK):
|
|
|
371
370
|
|
|
372
371
|
raise errors.APIError("Unexpected response received", http_res)
|
|
373
372
|
|
|
374
|
-
def upload(
|
|
375
|
-
self,
|
|
376
|
-
*,
|
|
377
|
-
filename: str,
|
|
378
|
-
request_body: Union[bytes, IO[bytes], io.BufferedReader],
|
|
379
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
380
|
-
server_url: Optional[str] = None,
|
|
381
|
-
timeout_ms: Optional[int] = None,
|
|
382
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
383
|
-
) -> models.UploadPackResponse:
|
|
384
|
-
r"""Upload a Pack file
|
|
385
|
-
|
|
386
|
-
Upload a Pack file. Returns the <code>source</code> ID needed to install the Pack with <code>POST /packs source</code>, which you must call separately.
|
|
387
|
-
|
|
388
|
-
:param filename: Filename of the Pack file to upload.
|
|
389
|
-
:param request_body:
|
|
390
|
-
:param retries: Override the default retry configuration for this method
|
|
391
|
-
:param server_url: Override the default server URL for this method
|
|
392
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
393
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
394
|
-
"""
|
|
395
|
-
base_url = None
|
|
396
|
-
url_variables = None
|
|
397
|
-
if timeout_ms is None:
|
|
398
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
399
|
-
|
|
400
|
-
if server_url is not None:
|
|
401
|
-
base_url = server_url
|
|
402
|
-
else:
|
|
403
|
-
base_url = self._get_url(base_url, url_variables)
|
|
404
|
-
|
|
405
|
-
request = models.UpdatePacksRequest(
|
|
406
|
-
filename=filename,
|
|
407
|
-
request_body=request_body,
|
|
408
|
-
)
|
|
409
|
-
|
|
410
|
-
req = self._build_request(
|
|
411
|
-
method="PUT",
|
|
412
|
-
path="/packs",
|
|
413
|
-
base_url=base_url,
|
|
414
|
-
url_variables=url_variables,
|
|
415
|
-
request=request,
|
|
416
|
-
request_body_required=True,
|
|
417
|
-
request_has_path_params=False,
|
|
418
|
-
request_has_query_params=True,
|
|
419
|
-
user_agent_header="user-agent",
|
|
420
|
-
accept_header_value="application/json",
|
|
421
|
-
http_headers=http_headers,
|
|
422
|
-
security=self.sdk_configuration.security,
|
|
423
|
-
get_serialized_body=lambda: utils.serialize_request_body(
|
|
424
|
-
request.request_body,
|
|
425
|
-
False,
|
|
426
|
-
False,
|
|
427
|
-
"raw",
|
|
428
|
-
Union[bytes, IO[bytes], io.BufferedReader],
|
|
429
|
-
),
|
|
430
|
-
timeout_ms=timeout_ms,
|
|
431
|
-
)
|
|
432
|
-
|
|
433
|
-
if retries == UNSET:
|
|
434
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
435
|
-
retries = self.sdk_configuration.retry_config
|
|
436
|
-
|
|
437
|
-
retry_config = None
|
|
438
|
-
if isinstance(retries, utils.RetryConfig):
|
|
439
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
440
|
-
|
|
441
|
-
http_res = self.do_request(
|
|
442
|
-
hook_ctx=HookContext(
|
|
443
|
-
config=self.sdk_configuration,
|
|
444
|
-
base_url=base_url or "",
|
|
445
|
-
operation_id="updatePacks",
|
|
446
|
-
oauth2_scopes=[],
|
|
447
|
-
security_source=get_security_from_env(
|
|
448
|
-
self.sdk_configuration.security, models.Security
|
|
449
|
-
),
|
|
450
|
-
),
|
|
451
|
-
request=req,
|
|
452
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
453
|
-
retry_config=retry_config,
|
|
454
|
-
)
|
|
455
|
-
|
|
456
|
-
response_data: Any = None
|
|
457
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
458
|
-
return unmarshal_json_response(models.UploadPackResponse, http_res)
|
|
459
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
460
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
461
|
-
raise errors.Error(response_data, http_res)
|
|
462
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
463
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
464
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
465
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
466
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
467
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
468
|
-
|
|
469
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
470
|
-
|
|
471
|
-
async def upload_async(
|
|
472
|
-
self,
|
|
473
|
-
*,
|
|
474
|
-
filename: str,
|
|
475
|
-
request_body: Union[bytes, IO[bytes], io.BufferedReader],
|
|
476
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
477
|
-
server_url: Optional[str] = None,
|
|
478
|
-
timeout_ms: Optional[int] = None,
|
|
479
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
480
|
-
) -> models.UploadPackResponse:
|
|
481
|
-
r"""Upload a Pack file
|
|
482
|
-
|
|
483
|
-
Upload a Pack file. Returns the <code>source</code> ID needed to install the Pack with <code>POST /packs source</code>, which you must call separately.
|
|
484
|
-
|
|
485
|
-
:param filename: Filename of the Pack file to upload.
|
|
486
|
-
:param request_body:
|
|
487
|
-
:param retries: Override the default retry configuration for this method
|
|
488
|
-
:param server_url: Override the default server URL for this method
|
|
489
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
490
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
491
|
-
"""
|
|
492
|
-
base_url = None
|
|
493
|
-
url_variables = None
|
|
494
|
-
if timeout_ms is None:
|
|
495
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
496
|
-
|
|
497
|
-
if server_url is not None:
|
|
498
|
-
base_url = server_url
|
|
499
|
-
else:
|
|
500
|
-
base_url = self._get_url(base_url, url_variables)
|
|
501
|
-
|
|
502
|
-
request = models.UpdatePacksRequest(
|
|
503
|
-
filename=filename,
|
|
504
|
-
request_body=request_body,
|
|
505
|
-
)
|
|
506
|
-
|
|
507
|
-
req = self._build_request_async(
|
|
508
|
-
method="PUT",
|
|
509
|
-
path="/packs",
|
|
510
|
-
base_url=base_url,
|
|
511
|
-
url_variables=url_variables,
|
|
512
|
-
request=request,
|
|
513
|
-
request_body_required=True,
|
|
514
|
-
request_has_path_params=False,
|
|
515
|
-
request_has_query_params=True,
|
|
516
|
-
user_agent_header="user-agent",
|
|
517
|
-
accept_header_value="application/json",
|
|
518
|
-
http_headers=http_headers,
|
|
519
|
-
security=self.sdk_configuration.security,
|
|
520
|
-
get_serialized_body=lambda: utils.serialize_request_body(
|
|
521
|
-
request.request_body,
|
|
522
|
-
False,
|
|
523
|
-
False,
|
|
524
|
-
"raw",
|
|
525
|
-
Union[bytes, IO[bytes], io.BufferedReader],
|
|
526
|
-
),
|
|
527
|
-
timeout_ms=timeout_ms,
|
|
528
|
-
)
|
|
529
|
-
|
|
530
|
-
if retries == UNSET:
|
|
531
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
532
|
-
retries = self.sdk_configuration.retry_config
|
|
533
|
-
|
|
534
|
-
retry_config = None
|
|
535
|
-
if isinstance(retries, utils.RetryConfig):
|
|
536
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
537
|
-
|
|
538
|
-
http_res = await self.do_request_async(
|
|
539
|
-
hook_ctx=HookContext(
|
|
540
|
-
config=self.sdk_configuration,
|
|
541
|
-
base_url=base_url or "",
|
|
542
|
-
operation_id="updatePacks",
|
|
543
|
-
oauth2_scopes=[],
|
|
544
|
-
security_source=get_security_from_env(
|
|
545
|
-
self.sdk_configuration.security, models.Security
|
|
546
|
-
),
|
|
547
|
-
),
|
|
548
|
-
request=req,
|
|
549
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
550
|
-
retry_config=retry_config,
|
|
551
|
-
)
|
|
552
|
-
|
|
553
|
-
response_data: Any = None
|
|
554
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
555
|
-
return unmarshal_json_response(models.UploadPackResponse, http_res)
|
|
556
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
557
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
558
|
-
raise errors.Error(response_data, http_res)
|
|
559
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
560
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
561
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
562
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
563
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
564
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
565
|
-
|
|
566
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
567
|
-
|
|
568
373
|
def delete(
|
|
569
374
|
self,
|
|
570
375
|
*,
|
|
@@ -928,7 +733,7 @@ class Packs(BaseSDK):
|
|
|
928
733
|
) -> models.UpdatePacksByIDResponse:
|
|
929
734
|
r"""Upgrade a Pack
|
|
930
735
|
|
|
931
|
-
Upgrade the specified Pack.</br></br>If the Pack includes any user–modified versions of default Cribl Knowledge resources such as lookups, copy the modified files locally for safekeeping before upgrading the Pack.Copy the modified files back to the upgraded Pack after you install it with <code>POST /packs</code> to overwrite the default versions in the Pack.</br></br>After you upgrade the Pack, update any Routes, Pipelines, Sources, and Destinations that use the previous Pack version so that they reference the upgraded Pack.
|
|
736
|
+
Upgrade the specified Pack.</br></br>If the Pack includes any user–modified versions of default Cribl Knowledge resources such as lookups, copy the modified files locally for safekeeping before upgrading the Pack. Copy the modified files back to the upgraded Pack after you install it with <code>POST /packs</code> to overwrite the default versions in the Pack.</br></br>After you upgrade the Pack, update any Routes, Pipelines, Sources, and Destinations that use the previous Pack version so that they reference the upgraded Pack.
|
|
932
737
|
|
|
933
738
|
:param id: The <code>id</code> of the Pack to upgrade.
|
|
934
739
|
:param source:
|
|
@@ -1036,7 +841,7 @@ class Packs(BaseSDK):
|
|
|
1036
841
|
) -> models.UpdatePacksByIDResponse:
|
|
1037
842
|
r"""Upgrade a Pack
|
|
1038
843
|
|
|
1039
|
-
Upgrade the specified Pack.</br></br>If the Pack includes any user–modified versions of default Cribl Knowledge resources such as lookups, copy the modified files locally for safekeeping before upgrading the Pack.Copy the modified files back to the upgraded Pack after you install it with <code>POST /packs</code> to overwrite the default versions in the Pack.</br></br>After you upgrade the Pack, update any Routes, Pipelines, Sources, and Destinations that use the previous Pack version so that they reference the upgraded Pack.
|
|
844
|
+
Upgrade the specified Pack.</br></br>If the Pack includes any user–modified versions of default Cribl Knowledge resources such as lookups, copy the modified files locally for safekeeping before upgrading the Pack. Copy the modified files back to the upgraded Pack after you install it with <code>POST /packs</code> to overwrite the default versions in the Pack.</br></br>After you upgrade the Pack, update any Routes, Pipelines, Sources, and Destinations that use the previous Pack version so that they reference the upgraded Pack.
|
|
1040
845
|
|
|
1041
846
|
:param id: The <code>id</code> of the Pack to upgrade.
|
|
1042
847
|
:param source:
|
|
@@ -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"""Append a Route to the end of the Routing table
|
|
588
588
|
|
|
589
|
-
|
|
589
|
+
Append a Route to the end of the specified Routing table.</br></br>Provide a complete representation of the Routing table, including the Route that you want to append, in the request body. Cribl removes any omitted Routes and fields in the Routing table when appending the Route.</br></br>Confirm that the configuration in your request body is correct before sending the request. If the configuration is incorrect, the Routing table might not function as expected.
|
|
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 append 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"""Append a Route to the end of the Routing table
|
|
683
683
|
|
|
684
|
-
|
|
684
|
+
Append a Route to the end of the specified Routing table.</br></br>Provide a complete representation of the Routing table, including the Route that you want to append, in the request body. Cribl removes any omitted Routes and fields in the Routing table when appending the Route.</br></br>Confirm that the configuration in your request body is correct before sending the request. If the configuration is incorrect, the Routing table might not function as expected.
|
|
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 append 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
|
|
8
|
+
from typing import Mapping, Optional
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class Tokens(BaseSDK):
|
|
12
12
|
def get(
|
|
13
13
|
self,
|
|
14
14
|
*,
|
|
15
|
-
password: str,
|
|
16
15
|
username: str,
|
|
16
|
+
password: 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.Instead, follow the instructions at https://docs.cribl.io/stream/api-tutorials/#criblcloud to get an Auth token for 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 password:
|
|
27
26
|
:param username:
|
|
27
|
+
:param password:
|
|
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
|
-
password=password,
|
|
45
44
|
username=username,
|
|
45
|
+
password=password,
|
|
46
46
|
)
|
|
47
47
|
|
|
48
48
|
req = self._build_request(
|
|
@@ -75,22 +75,18 @@ 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="login",
|
|
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", "403", "429", "4XX", "5XX"],
|
|
84
84
|
retry_config=retry_config,
|
|
85
85
|
)
|
|
86
86
|
|
|
87
|
-
response_data: Any = None
|
|
88
87
|
if utils.match_response(http_res, "200", "application/json"):
|
|
89
88
|
return unmarshal_json_response(models.AuthToken, http_res)
|
|
90
|
-
if utils.match_response(http_res, "
|
|
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"], "*"):
|
|
89
|
+
if utils.match_response(http_res, ["401", "403", "429", "4XX"], "*"):
|
|
94
90
|
http_res_text = utils.stream_to_text(http_res)
|
|
95
91
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
96
92
|
if utils.match_response(http_res, "5XX", "*"):
|
|
@@ -102,8 +98,8 @@ class Tokens(BaseSDK):
|
|
|
102
98
|
async def get_async(
|
|
103
99
|
self,
|
|
104
100
|
*,
|
|
105
|
-
password: str,
|
|
106
101
|
username: str,
|
|
102
|
+
password: str,
|
|
107
103
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
108
104
|
server_url: Optional[str] = None,
|
|
109
105
|
timeout_ms: Optional[int] = None,
|
|
@@ -111,10 +107,10 @@ class Tokens(BaseSDK):
|
|
|
111
107
|
) -> models.AuthToken:
|
|
112
108
|
r"""Log in and fetch an authentication token
|
|
113
109
|
|
|
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.
|
|
110
|
+
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.
|
|
115
111
|
|
|
116
|
-
:param password:
|
|
117
112
|
:param username:
|
|
113
|
+
:param password:
|
|
118
114
|
:param retries: Override the default retry configuration for this method
|
|
119
115
|
:param server_url: Override the default server URL for this method
|
|
120
116
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -131,8 +127,8 @@ class Tokens(BaseSDK):
|
|
|
131
127
|
base_url = self._get_url(base_url, url_variables)
|
|
132
128
|
|
|
133
129
|
request = models.LoginInfo(
|
|
134
|
-
password=password,
|
|
135
130
|
username=username,
|
|
131
|
+
password=password,
|
|
136
132
|
)
|
|
137
133
|
|
|
138
134
|
req = self._build_request_async(
|
|
@@ -165,22 +161,18 @@ class Tokens(BaseSDK):
|
|
|
165
161
|
hook_ctx=HookContext(
|
|
166
162
|
config=self.sdk_configuration,
|
|
167
163
|
base_url=base_url or "",
|
|
168
|
-
operation_id="
|
|
164
|
+
operation_id="login",
|
|
169
165
|
oauth2_scopes=[],
|
|
170
166
|
security_source=None,
|
|
171
167
|
),
|
|
172
168
|
request=req,
|
|
173
|
-
error_status_codes=["401", "
|
|
169
|
+
error_status_codes=["401", "403", "429", "4XX", "5XX"],
|
|
174
170
|
retry_config=retry_config,
|
|
175
171
|
)
|
|
176
172
|
|
|
177
|
-
response_data: Any = None
|
|
178
173
|
if utils.match_response(http_res, "200", "application/json"):
|
|
179
174
|
return unmarshal_json_response(models.AuthToken, http_res)
|
|
180
|
-
if utils.match_response(http_res, "
|
|
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"], "*"):
|
|
175
|
+
if utils.match_response(http_res, ["401", "403", "429", "4XX"], "*"):
|
|
184
176
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
185
177
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
186
178
|
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.
|
|
3
|
+
Version: 0.3.0a1
|
|
4
4
|
Summary: Python Client SDK Generated by Speakeasy.
|
|
5
5
|
Author: Speakeasy
|
|
6
6
|
Requires-Python: >=3.9.2
|
|
@@ -17,20 +17,11 @@ Project-URL: Repository, https://github.com/criblio/cribl_control_plane_sdk_pyth
|
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
18
|
|
|
19
19
|
# cribl_control_plane_sdk_python
|
|
20
|
+
<!-- Start Summary [summary] -->
|
|
21
|
+
## Summary
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
In addition to the usage examples in this repository, the Cribl documentation includes [code examples for common use cases](https://docs.cribl.io/cribl-as-code/code-examples).
|
|
24
|
-
|
|
25
|
-
Complementary API reference documentation is available at https://docs.cribl.io/cribl-as-code/api-reference. Product documentation is available at https://docs.cribl.io.
|
|
26
|
-
|
|
27
|
-
> [!IMPORTANT]
|
|
28
|
-
> **Preview Feature**
|
|
29
|
-
> The Cribl SDKs are Preview features that are still being developed. We do not recommend using them in a production environment, because the features might not be fully tested or optimized for performance, and related documentation could be incomplete.
|
|
30
|
-
>
|
|
31
|
-
> Please continue to submit feedback through normal Cribl support channels, but assistance might be limited while the features remain in Preview.
|
|
32
|
-
|
|
33
|
-
<!-- No Summary [summary] -->
|
|
23
|
+
Cribl API Reference: This API Reference lists available REST endpoints, along with their supported operations for accessing, creating, updating, or deleting resources. See our complementary product documentation at [docs.cribl.io](http://docs.cribl.io).
|
|
24
|
+
<!-- End Summary [summary] -->
|
|
34
25
|
|
|
35
26
|
<!-- Start Table of Contents [toc] -->
|
|
36
27
|
## Table of Contents
|
|
@@ -41,7 +32,6 @@ Complementary API reference documentation is available at https://docs.cribl.io/
|
|
|
41
32
|
* [SDK Example Usage](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/#sdk-example-usage)
|
|
42
33
|
* [Authentication](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/#authentication)
|
|
43
34
|
* [Available Resources and Operations](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/#available-resources-and-operations)
|
|
44
|
-
* [File uploads](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/#file-uploads)
|
|
45
35
|
* [Retries](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/#retries)
|
|
46
36
|
* [Error Handling](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/#error-handling)
|
|
47
37
|
* [Custom HTTP Client](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/#custom-http-client)
|
|
@@ -382,9 +372,8 @@ with CriblControlPlane(
|
|
|
382
372
|
|
|
383
373
|
### [packs](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/packs/README.md)
|
|
384
374
|
|
|
385
|
-
* [install](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/packs/README.md#install) -
|
|
375
|
+
* [install](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/packs/README.md#install) - Create or install a Pack
|
|
386
376
|
* [list](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/packs/README.md#list) - List all Packs
|
|
387
|
-
* [upload](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/packs/README.md#upload) - Upload a Pack file
|
|
388
377
|
* [delete](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/packs/README.md#delete) - Uninstall a Pack
|
|
389
378
|
* [get](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/packs/README.md#get) - Get a Pack
|
|
390
379
|
* [update](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/packs/README.md#update) - Upgrade a Pack
|
|
@@ -402,7 +391,7 @@ with CriblControlPlane(
|
|
|
402
391
|
* [list](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/routessdk/README.md#list) - List all Routes
|
|
403
392
|
* [get](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/routessdk/README.md#get) - Get a Routing table
|
|
404
393
|
* [update](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/routessdk/README.md#update) - Update a Route
|
|
405
|
-
* [append](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/routessdk/README.md#append) -
|
|
394
|
+
* [append](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/routessdk/README.md#append) - Append a Route to the end of the Routing table
|
|
406
395
|
|
|
407
396
|
### [sources](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/sources/README.md)
|
|
408
397
|
|
|
@@ -448,36 +437,6 @@ with CriblControlPlane(
|
|
|
448
437
|
</details>
|
|
449
438
|
<!-- End Available Resources and Operations [operations] -->
|
|
450
439
|
|
|
451
|
-
<!-- Start File uploads [file-upload] -->
|
|
452
|
-
## File uploads
|
|
453
|
-
|
|
454
|
-
Certain SDK methods accept file objects as part of a request body or multi-part request. It is possible and typically recommended to upload files as a stream rather than reading the entire contents into memory. This avoids excessive memory consumption and potentially crashing with out-of-memory errors when working with very large files. The following example demonstrates how to attach a file stream to a request.
|
|
455
|
-
|
|
456
|
-
> [!TIP]
|
|
457
|
-
>
|
|
458
|
-
> For endpoints that handle file uploads bytes arrays can also be used. However, using streams is recommended for large files.
|
|
459
|
-
>
|
|
460
|
-
|
|
461
|
-
```python
|
|
462
|
-
from cribl_control_plane import CriblControlPlane, models
|
|
463
|
-
import os
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
with CriblControlPlane(
|
|
467
|
-
server_url="https://api.example.com",
|
|
468
|
-
security=models.Security(
|
|
469
|
-
bearer_auth=os.getenv("CRIBLCONTROLPLANE_BEARER_AUTH", ""),
|
|
470
|
-
),
|
|
471
|
-
) as ccp_client:
|
|
472
|
-
|
|
473
|
-
res = ccp_client.packs.upload(filename="example.file", request_body=open("example.file", "rb"))
|
|
474
|
-
|
|
475
|
-
# Handle response
|
|
476
|
-
print(res)
|
|
477
|
-
|
|
478
|
-
```
|
|
479
|
-
<!-- End File uploads [file-upload] -->
|
|
480
|
-
|
|
481
440
|
<!-- Start Retries [retries] -->
|
|
482
441
|
## Retries
|
|
483
442
|
|
|
@@ -678,7 +637,7 @@ with CriblControlPlane(
|
|
|
678
637
|
### Error Classes
|
|
679
638
|
**Primary errors:**
|
|
680
639
|
* [`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.
|
|
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`.
|
|
640
|
+
* [`Error`](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/./src/cribl_control_plane/errors/error.py): Unexpected error. Status code `500`. *
|
|
682
641
|
|
|
683
642
|
<details><summary>Less common errors (6)</summary>
|
|
684
643
|
|
|
@@ -691,7 +650,7 @@ with CriblControlPlane(
|
|
|
691
650
|
|
|
692
651
|
|
|
693
652
|
**Inherit from [`CriblControlPlaneError`](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/./src/cribl_control_plane/errors/criblcontrolplaneerror.py)**:
|
|
694
|
-
* [`
|
|
653
|
+
* [`HealthStatusError`](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/./src/cribl_control_plane/errors/healthstatuserror.py): Healthy status. Status code `420`. Applicable to 1 of 62 methods.*
|
|
695
654
|
* [`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.
|
|
696
655
|
|
|
697
656
|
</details>
|