cribl-control-plane 0.0.19__py3-none-any.whl → 0.0.21a1__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/lake.py +662 -0
- cribl_control_plane/models/__init__.py +70 -0
- cribl_control_plane/models/deletecribllakedatasetbylakeidandidop.py +47 -0
- cribl_control_plane/models/deletepacksbyidop.py +37 -0
- cribl_control_plane/models/getcribllakedatasetbylakeidandidop.py +47 -0
- cribl_control_plane/models/updatecribllakedatasetbylakeidandidop.py +57 -0
- cribl_control_plane/models/updatepacksbyidop.py +65 -0
- cribl_control_plane/models/updatepacksop.py +16 -1
- cribl_control_plane/packs.py +396 -3
- {cribl_control_plane-0.0.19.dist-info → cribl_control_plane-0.0.21a1.dist-info}/METADATA +38 -2
- {cribl_control_plane-0.0.19.dist-info → cribl_control_plane-0.0.21a1.dist-info}/RECORD +13 -8
- {cribl_control_plane-0.0.19.dist-info → cribl_control_plane-0.0.21a1.dist-info}/WHEEL +0 -0
cribl_control_plane/packs.py
CHANGED
|
@@ -6,7 +6,8 @@ from cribl_control_plane._hooks import HookContext
|
|
|
6
6
|
from cribl_control_plane.types import 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
|
-
|
|
9
|
+
import io
|
|
10
|
+
from typing import Any, IO, List, Mapping, Optional, Union
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
class Packs(BaseSDK):
|
|
@@ -451,6 +452,8 @@ class Packs(BaseSDK):
|
|
|
451
452
|
def update_packs(
|
|
452
453
|
self,
|
|
453
454
|
*,
|
|
455
|
+
size: int,
|
|
456
|
+
request_body: Union[bytes, IO[bytes], io.BufferedReader],
|
|
454
457
|
filename: Optional[str] = None,
|
|
455
458
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
456
459
|
server_url: Optional[str] = None,
|
|
@@ -461,6 +464,8 @@ class Packs(BaseSDK):
|
|
|
461
464
|
|
|
462
465
|
Upload Pack
|
|
463
466
|
|
|
467
|
+
:param size: Size of the pack file in bytes
|
|
468
|
+
:param request_body: file data
|
|
464
469
|
:param filename: the file to upload
|
|
465
470
|
:param retries: Override the default retry configuration for this method
|
|
466
471
|
:param server_url: Override the default server URL for this method
|
|
@@ -479,6 +484,8 @@ class Packs(BaseSDK):
|
|
|
479
484
|
|
|
480
485
|
request = models.UpdatePacksRequest(
|
|
481
486
|
filename=filename,
|
|
487
|
+
size=size,
|
|
488
|
+
request_body=request_body,
|
|
482
489
|
)
|
|
483
490
|
|
|
484
491
|
req = self._build_request(
|
|
@@ -487,13 +494,20 @@ class Packs(BaseSDK):
|
|
|
487
494
|
base_url=base_url,
|
|
488
495
|
url_variables=url_variables,
|
|
489
496
|
request=request,
|
|
490
|
-
request_body_required=
|
|
497
|
+
request_body_required=True,
|
|
491
498
|
request_has_path_params=False,
|
|
492
499
|
request_has_query_params=True,
|
|
493
500
|
user_agent_header="user-agent",
|
|
494
501
|
accept_header_value="application/json",
|
|
495
502
|
http_headers=http_headers,
|
|
496
503
|
security=self.sdk_configuration.security,
|
|
504
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
505
|
+
request.request_body,
|
|
506
|
+
False,
|
|
507
|
+
False,
|
|
508
|
+
"raw",
|
|
509
|
+
Union[bytes, IO[bytes], io.BufferedReader],
|
|
510
|
+
),
|
|
497
511
|
timeout_ms=timeout_ms,
|
|
498
512
|
)
|
|
499
513
|
|
|
@@ -538,6 +552,8 @@ class Packs(BaseSDK):
|
|
|
538
552
|
async def update_packs_async(
|
|
539
553
|
self,
|
|
540
554
|
*,
|
|
555
|
+
size: int,
|
|
556
|
+
request_body: Union[bytes, IO[bytes], io.BufferedReader],
|
|
541
557
|
filename: Optional[str] = None,
|
|
542
558
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
543
559
|
server_url: Optional[str] = None,
|
|
@@ -548,6 +564,8 @@ class Packs(BaseSDK):
|
|
|
548
564
|
|
|
549
565
|
Upload Pack
|
|
550
566
|
|
|
567
|
+
:param size: Size of the pack file in bytes
|
|
568
|
+
:param request_body: file data
|
|
551
569
|
:param filename: the file to upload
|
|
552
570
|
:param retries: Override the default retry configuration for this method
|
|
553
571
|
:param server_url: Override the default server URL for this method
|
|
@@ -566,6 +584,8 @@ class Packs(BaseSDK):
|
|
|
566
584
|
|
|
567
585
|
request = models.UpdatePacksRequest(
|
|
568
586
|
filename=filename,
|
|
587
|
+
size=size,
|
|
588
|
+
request_body=request_body,
|
|
569
589
|
)
|
|
570
590
|
|
|
571
591
|
req = self._build_request_async(
|
|
@@ -574,13 +594,20 @@ class Packs(BaseSDK):
|
|
|
574
594
|
base_url=base_url,
|
|
575
595
|
url_variables=url_variables,
|
|
576
596
|
request=request,
|
|
577
|
-
request_body_required=
|
|
597
|
+
request_body_required=True,
|
|
578
598
|
request_has_path_params=False,
|
|
579
599
|
request_has_query_params=True,
|
|
580
600
|
user_agent_header="user-agent",
|
|
581
601
|
accept_header_value="application/json",
|
|
582
602
|
http_headers=http_headers,
|
|
583
603
|
security=self.sdk_configuration.security,
|
|
604
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
605
|
+
request.request_body,
|
|
606
|
+
False,
|
|
607
|
+
False,
|
|
608
|
+
"raw",
|
|
609
|
+
Union[bytes, IO[bytes], io.BufferedReader],
|
|
610
|
+
),
|
|
584
611
|
timeout_ms=timeout_ms,
|
|
585
612
|
)
|
|
586
613
|
|
|
@@ -621,3 +648,369 @@ class Packs(BaseSDK):
|
|
|
621
648
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
622
649
|
|
|
623
650
|
raise errors.APIError("Unexpected response received", http_res)
|
|
651
|
+
|
|
652
|
+
def delete_packs_by_id(
|
|
653
|
+
self,
|
|
654
|
+
*,
|
|
655
|
+
id: str,
|
|
656
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
657
|
+
server_url: Optional[str] = None,
|
|
658
|
+
timeout_ms: Optional[int] = None,
|
|
659
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
660
|
+
) -> models.DeletePacksByIDResponse:
|
|
661
|
+
r"""Uninstall Pack from the system
|
|
662
|
+
|
|
663
|
+
Uninstall Pack from the system
|
|
664
|
+
|
|
665
|
+
:param id: Pack name
|
|
666
|
+
:param retries: Override the default retry configuration for this method
|
|
667
|
+
:param server_url: Override the default server URL for this method
|
|
668
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
669
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
670
|
+
"""
|
|
671
|
+
base_url = None
|
|
672
|
+
url_variables = None
|
|
673
|
+
if timeout_ms is None:
|
|
674
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
675
|
+
|
|
676
|
+
if server_url is not None:
|
|
677
|
+
base_url = server_url
|
|
678
|
+
else:
|
|
679
|
+
base_url = self._get_url(base_url, url_variables)
|
|
680
|
+
|
|
681
|
+
request = models.DeletePacksByIDRequest(
|
|
682
|
+
id=id,
|
|
683
|
+
)
|
|
684
|
+
|
|
685
|
+
req = self._build_request(
|
|
686
|
+
method="DELETE",
|
|
687
|
+
path="/packs/{id}",
|
|
688
|
+
base_url=base_url,
|
|
689
|
+
url_variables=url_variables,
|
|
690
|
+
request=request,
|
|
691
|
+
request_body_required=False,
|
|
692
|
+
request_has_path_params=True,
|
|
693
|
+
request_has_query_params=True,
|
|
694
|
+
user_agent_header="user-agent",
|
|
695
|
+
accept_header_value="application/json",
|
|
696
|
+
http_headers=http_headers,
|
|
697
|
+
security=self.sdk_configuration.security,
|
|
698
|
+
timeout_ms=timeout_ms,
|
|
699
|
+
)
|
|
700
|
+
|
|
701
|
+
if retries == UNSET:
|
|
702
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
703
|
+
retries = self.sdk_configuration.retry_config
|
|
704
|
+
|
|
705
|
+
retry_config = None
|
|
706
|
+
if isinstance(retries, utils.RetryConfig):
|
|
707
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
708
|
+
|
|
709
|
+
http_res = self.do_request(
|
|
710
|
+
hook_ctx=HookContext(
|
|
711
|
+
config=self.sdk_configuration,
|
|
712
|
+
base_url=base_url or "",
|
|
713
|
+
operation_id="deletePacksById",
|
|
714
|
+
oauth2_scopes=[],
|
|
715
|
+
security_source=get_security_from_env(
|
|
716
|
+
self.sdk_configuration.security, models.Security
|
|
717
|
+
),
|
|
718
|
+
),
|
|
719
|
+
request=req,
|
|
720
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
721
|
+
retry_config=retry_config,
|
|
722
|
+
)
|
|
723
|
+
|
|
724
|
+
response_data: Any = None
|
|
725
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
726
|
+
return unmarshal_json_response(models.DeletePacksByIDResponse, http_res)
|
|
727
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
728
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
729
|
+
raise errors.Error(response_data, http_res)
|
|
730
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
731
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
732
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
733
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
734
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
735
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
736
|
+
|
|
737
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
738
|
+
|
|
739
|
+
async def delete_packs_by_id_async(
|
|
740
|
+
self,
|
|
741
|
+
*,
|
|
742
|
+
id: str,
|
|
743
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
744
|
+
server_url: Optional[str] = None,
|
|
745
|
+
timeout_ms: Optional[int] = None,
|
|
746
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
747
|
+
) -> models.DeletePacksByIDResponse:
|
|
748
|
+
r"""Uninstall Pack from the system
|
|
749
|
+
|
|
750
|
+
Uninstall Pack from the system
|
|
751
|
+
|
|
752
|
+
:param id: Pack name
|
|
753
|
+
:param retries: Override the default retry configuration for this method
|
|
754
|
+
:param server_url: Override the default server URL for this method
|
|
755
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
756
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
757
|
+
"""
|
|
758
|
+
base_url = None
|
|
759
|
+
url_variables = None
|
|
760
|
+
if timeout_ms is None:
|
|
761
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
762
|
+
|
|
763
|
+
if server_url is not None:
|
|
764
|
+
base_url = server_url
|
|
765
|
+
else:
|
|
766
|
+
base_url = self._get_url(base_url, url_variables)
|
|
767
|
+
|
|
768
|
+
request = models.DeletePacksByIDRequest(
|
|
769
|
+
id=id,
|
|
770
|
+
)
|
|
771
|
+
|
|
772
|
+
req = self._build_request_async(
|
|
773
|
+
method="DELETE",
|
|
774
|
+
path="/packs/{id}",
|
|
775
|
+
base_url=base_url,
|
|
776
|
+
url_variables=url_variables,
|
|
777
|
+
request=request,
|
|
778
|
+
request_body_required=False,
|
|
779
|
+
request_has_path_params=True,
|
|
780
|
+
request_has_query_params=True,
|
|
781
|
+
user_agent_header="user-agent",
|
|
782
|
+
accept_header_value="application/json",
|
|
783
|
+
http_headers=http_headers,
|
|
784
|
+
security=self.sdk_configuration.security,
|
|
785
|
+
timeout_ms=timeout_ms,
|
|
786
|
+
)
|
|
787
|
+
|
|
788
|
+
if retries == UNSET:
|
|
789
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
790
|
+
retries = self.sdk_configuration.retry_config
|
|
791
|
+
|
|
792
|
+
retry_config = None
|
|
793
|
+
if isinstance(retries, utils.RetryConfig):
|
|
794
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
795
|
+
|
|
796
|
+
http_res = await self.do_request_async(
|
|
797
|
+
hook_ctx=HookContext(
|
|
798
|
+
config=self.sdk_configuration,
|
|
799
|
+
base_url=base_url or "",
|
|
800
|
+
operation_id="deletePacksById",
|
|
801
|
+
oauth2_scopes=[],
|
|
802
|
+
security_source=get_security_from_env(
|
|
803
|
+
self.sdk_configuration.security, models.Security
|
|
804
|
+
),
|
|
805
|
+
),
|
|
806
|
+
request=req,
|
|
807
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
808
|
+
retry_config=retry_config,
|
|
809
|
+
)
|
|
810
|
+
|
|
811
|
+
response_data: Any = None
|
|
812
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
813
|
+
return unmarshal_json_response(models.DeletePacksByIDResponse, http_res)
|
|
814
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
815
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
816
|
+
raise errors.Error(response_data, http_res)
|
|
817
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
818
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
819
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
820
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
821
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
822
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
823
|
+
|
|
824
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
825
|
+
|
|
826
|
+
def update_packs_by_id(
|
|
827
|
+
self,
|
|
828
|
+
*,
|
|
829
|
+
id: str,
|
|
830
|
+
source: Optional[str] = None,
|
|
831
|
+
minor: Optional[str] = None,
|
|
832
|
+
spec: Optional[str] = None,
|
|
833
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
834
|
+
server_url: Optional[str] = None,
|
|
835
|
+
timeout_ms: Optional[int] = None,
|
|
836
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
837
|
+
) -> models.UpdatePacksByIDResponse:
|
|
838
|
+
r"""Upgrade Pack
|
|
839
|
+
|
|
840
|
+
Upgrade Pack
|
|
841
|
+
|
|
842
|
+
:param id: Pack name
|
|
843
|
+
:param source: body string required Pack source
|
|
844
|
+
:param minor: body boolean optional Only upgrade to minor/patch versions
|
|
845
|
+
:param spec: body string optional Specify a branch, tag or a semver spec
|
|
846
|
+
:param retries: Override the default retry configuration for this method
|
|
847
|
+
:param server_url: Override the default server URL for this method
|
|
848
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
849
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
850
|
+
"""
|
|
851
|
+
base_url = None
|
|
852
|
+
url_variables = None
|
|
853
|
+
if timeout_ms is None:
|
|
854
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
855
|
+
|
|
856
|
+
if server_url is not None:
|
|
857
|
+
base_url = server_url
|
|
858
|
+
else:
|
|
859
|
+
base_url = self._get_url(base_url, url_variables)
|
|
860
|
+
|
|
861
|
+
request = models.UpdatePacksByIDRequest(
|
|
862
|
+
id=id,
|
|
863
|
+
source=source,
|
|
864
|
+
minor=minor,
|
|
865
|
+
spec=spec,
|
|
866
|
+
)
|
|
867
|
+
|
|
868
|
+
req = self._build_request(
|
|
869
|
+
method="PATCH",
|
|
870
|
+
path="/packs/{id}",
|
|
871
|
+
base_url=base_url,
|
|
872
|
+
url_variables=url_variables,
|
|
873
|
+
request=request,
|
|
874
|
+
request_body_required=False,
|
|
875
|
+
request_has_path_params=True,
|
|
876
|
+
request_has_query_params=True,
|
|
877
|
+
user_agent_header="user-agent",
|
|
878
|
+
accept_header_value="application/json",
|
|
879
|
+
http_headers=http_headers,
|
|
880
|
+
security=self.sdk_configuration.security,
|
|
881
|
+
timeout_ms=timeout_ms,
|
|
882
|
+
)
|
|
883
|
+
|
|
884
|
+
if retries == UNSET:
|
|
885
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
886
|
+
retries = self.sdk_configuration.retry_config
|
|
887
|
+
|
|
888
|
+
retry_config = None
|
|
889
|
+
if isinstance(retries, utils.RetryConfig):
|
|
890
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
891
|
+
|
|
892
|
+
http_res = self.do_request(
|
|
893
|
+
hook_ctx=HookContext(
|
|
894
|
+
config=self.sdk_configuration,
|
|
895
|
+
base_url=base_url or "",
|
|
896
|
+
operation_id="updatePacksById",
|
|
897
|
+
oauth2_scopes=[],
|
|
898
|
+
security_source=get_security_from_env(
|
|
899
|
+
self.sdk_configuration.security, models.Security
|
|
900
|
+
),
|
|
901
|
+
),
|
|
902
|
+
request=req,
|
|
903
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
904
|
+
retry_config=retry_config,
|
|
905
|
+
)
|
|
906
|
+
|
|
907
|
+
response_data: Any = None
|
|
908
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
909
|
+
return unmarshal_json_response(models.UpdatePacksByIDResponse, http_res)
|
|
910
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
911
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
912
|
+
raise errors.Error(response_data, http_res)
|
|
913
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
914
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
915
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
916
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
917
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
918
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
919
|
+
|
|
920
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
921
|
+
|
|
922
|
+
async def update_packs_by_id_async(
|
|
923
|
+
self,
|
|
924
|
+
*,
|
|
925
|
+
id: str,
|
|
926
|
+
source: Optional[str] = None,
|
|
927
|
+
minor: Optional[str] = None,
|
|
928
|
+
spec: Optional[str] = None,
|
|
929
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
930
|
+
server_url: Optional[str] = None,
|
|
931
|
+
timeout_ms: Optional[int] = None,
|
|
932
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
933
|
+
) -> models.UpdatePacksByIDResponse:
|
|
934
|
+
r"""Upgrade Pack
|
|
935
|
+
|
|
936
|
+
Upgrade Pack
|
|
937
|
+
|
|
938
|
+
:param id: Pack name
|
|
939
|
+
:param source: body string required Pack source
|
|
940
|
+
:param minor: body boolean optional Only upgrade to minor/patch versions
|
|
941
|
+
:param spec: body string optional Specify a branch, tag or a semver spec
|
|
942
|
+
:param retries: Override the default retry configuration for this method
|
|
943
|
+
:param server_url: Override the default server URL for this method
|
|
944
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
945
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
946
|
+
"""
|
|
947
|
+
base_url = None
|
|
948
|
+
url_variables = None
|
|
949
|
+
if timeout_ms is None:
|
|
950
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
951
|
+
|
|
952
|
+
if server_url is not None:
|
|
953
|
+
base_url = server_url
|
|
954
|
+
else:
|
|
955
|
+
base_url = self._get_url(base_url, url_variables)
|
|
956
|
+
|
|
957
|
+
request = models.UpdatePacksByIDRequest(
|
|
958
|
+
id=id,
|
|
959
|
+
source=source,
|
|
960
|
+
minor=minor,
|
|
961
|
+
spec=spec,
|
|
962
|
+
)
|
|
963
|
+
|
|
964
|
+
req = self._build_request_async(
|
|
965
|
+
method="PATCH",
|
|
966
|
+
path="/packs/{id}",
|
|
967
|
+
base_url=base_url,
|
|
968
|
+
url_variables=url_variables,
|
|
969
|
+
request=request,
|
|
970
|
+
request_body_required=False,
|
|
971
|
+
request_has_path_params=True,
|
|
972
|
+
request_has_query_params=True,
|
|
973
|
+
user_agent_header="user-agent",
|
|
974
|
+
accept_header_value="application/json",
|
|
975
|
+
http_headers=http_headers,
|
|
976
|
+
security=self.sdk_configuration.security,
|
|
977
|
+
timeout_ms=timeout_ms,
|
|
978
|
+
)
|
|
979
|
+
|
|
980
|
+
if retries == UNSET:
|
|
981
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
982
|
+
retries = self.sdk_configuration.retry_config
|
|
983
|
+
|
|
984
|
+
retry_config = None
|
|
985
|
+
if isinstance(retries, utils.RetryConfig):
|
|
986
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
987
|
+
|
|
988
|
+
http_res = await self.do_request_async(
|
|
989
|
+
hook_ctx=HookContext(
|
|
990
|
+
config=self.sdk_configuration,
|
|
991
|
+
base_url=base_url or "",
|
|
992
|
+
operation_id="updatePacksById",
|
|
993
|
+
oauth2_scopes=[],
|
|
994
|
+
security_source=get_security_from_env(
|
|
995
|
+
self.sdk_configuration.security, models.Security
|
|
996
|
+
),
|
|
997
|
+
),
|
|
998
|
+
request=req,
|
|
999
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
1000
|
+
retry_config=retry_config,
|
|
1001
|
+
)
|
|
1002
|
+
|
|
1003
|
+
response_data: Any = None
|
|
1004
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
1005
|
+
return unmarshal_json_response(models.UpdatePacksByIDResponse, http_res)
|
|
1006
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
1007
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
1008
|
+
raise errors.Error(response_data, http_res)
|
|
1009
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
1010
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1011
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1012
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
1013
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1014
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1015
|
+
|
|
1016
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: cribl-control-plane
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.21a1
|
|
4
4
|
Summary: Python Client SDK Generated by Speakeasy.
|
|
5
5
|
Author: Speakeasy
|
|
6
6
|
Requires-Python: >=3.9.2
|
|
@@ -31,6 +31,7 @@ Cribl API Reference: This API Reference lists available REST endpoints, along wi
|
|
|
31
31
|
* [SDK Example Usage](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/#sdk-example-usage)
|
|
32
32
|
* [Authentication](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/#authentication)
|
|
33
33
|
* [Available Resources and Operations](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/#available-resources-and-operations)
|
|
34
|
+
* [File uploads](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/#file-uploads)
|
|
34
35
|
* [Retries](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/#retries)
|
|
35
36
|
* [Error Handling](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/#error-handling)
|
|
36
37
|
* [Custom HTTP Client](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/#custom-http-client)
|
|
@@ -235,12 +236,17 @@ with CriblControlPlane(
|
|
|
235
236
|
|
|
236
237
|
* [create_cribl_lake_dataset_by_lake_id](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/lake/README.md#create_cribl_lake_dataset_by_lake_id) - Create a Dataset in the specified Lake
|
|
237
238
|
* [get_cribl_lake_dataset_by_lake_id](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/lake/README.md#get_cribl_lake_dataset_by_lake_id) - Get the list of Dataset contained in the specified Lake
|
|
239
|
+
* [delete_cribl_lake_dataset_by_lake_id_and_id](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/lake/README.md#delete_cribl_lake_dataset_by_lake_id_and_id) - Delete a Dataset in the specified Lake
|
|
240
|
+
* [get_cribl_lake_dataset_by_lake_id_and_id](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/lake/README.md#get_cribl_lake_dataset_by_lake_id_and_id) - Get a Dataset in the specified Lake
|
|
241
|
+
* [update_cribl_lake_dataset_by_lake_id_and_id](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/lake/README.md#update_cribl_lake_dataset_by_lake_id_and_id) - Update a Dataset in the specified Lake
|
|
238
242
|
|
|
239
243
|
### [packs](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/packs/README.md)
|
|
240
244
|
|
|
241
245
|
* [create_packs](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/packs/README.md#create_packs) - Install Pack
|
|
242
246
|
* [get_packs](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/packs/README.md#get_packs) - Get info on packs
|
|
243
247
|
* [update_packs](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/packs/README.md#update_packs) - Upload Pack
|
|
248
|
+
* [delete_packs_by_id](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/packs/README.md#delete_packs_by_id) - Uninstall Pack from the system
|
|
249
|
+
* [update_packs_by_id](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/packs/README.md#update_packs_by_id) - Upgrade Pack
|
|
244
250
|
|
|
245
251
|
### [pipelines](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/docs/sdks/pipelines/README.md)
|
|
246
252
|
|
|
@@ -296,6 +302,36 @@ with CriblControlPlane(
|
|
|
296
302
|
</details>
|
|
297
303
|
<!-- End Available Resources and Operations [operations] -->
|
|
298
304
|
|
|
305
|
+
<!-- Start File uploads [file-upload] -->
|
|
306
|
+
## File uploads
|
|
307
|
+
|
|
308
|
+
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.
|
|
309
|
+
|
|
310
|
+
> [!TIP]
|
|
311
|
+
>
|
|
312
|
+
> For endpoints that handle file uploads bytes arrays can also be used. However, using streams is recommended for large files.
|
|
313
|
+
>
|
|
314
|
+
|
|
315
|
+
```python
|
|
316
|
+
from cribl_control_plane import CriblControlPlane, models
|
|
317
|
+
import os
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
with CriblControlPlane(
|
|
321
|
+
server_url="https://api.example.com",
|
|
322
|
+
security=models.Security(
|
|
323
|
+
bearer_auth=os.getenv("CRIBLCONTROLPLANE_BEARER_AUTH", ""),
|
|
324
|
+
),
|
|
325
|
+
) as ccp_client:
|
|
326
|
+
|
|
327
|
+
res = ccp_client.packs.update_packs(size=779474, request_body=open("example.file", "rb"))
|
|
328
|
+
|
|
329
|
+
# Handle response
|
|
330
|
+
print(res)
|
|
331
|
+
|
|
332
|
+
```
|
|
333
|
+
<!-- End File uploads [file-upload] -->
|
|
334
|
+
|
|
299
335
|
<!-- Start Retries [retries] -->
|
|
300
336
|
## Retries
|
|
301
337
|
|
|
@@ -410,7 +446,7 @@ with CriblControlPlane(
|
|
|
410
446
|
|
|
411
447
|
|
|
412
448
|
**Inherit from [`CriblControlPlaneError`](https://github.com/criblio/cribl_control_plane_sdk_python/blob/master/./src/cribl_control_plane/errors/criblcontrolplaneerror.py)**:
|
|
413
|
-
* [`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
|
|
449
|
+
* [`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 61 methods.*
|
|
414
450
|
* [`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.
|
|
415
451
|
|
|
416
452
|
</details>
|
|
@@ -4,7 +4,7 @@ cribl_control_plane/_hooks/clientcredentials.py,sha256=gVQkktlv3q4-AHOdbQl5r8i-G
|
|
|
4
4
|
cribl_control_plane/_hooks/registration.py,sha256=1QZB41w6If7I9dXiOSQx6dhSc6BPWrnI5Q5bMOr4iVA,624
|
|
5
5
|
cribl_control_plane/_hooks/sdkhooks.py,sha256=ggXjME1_Rdv8CVCg1XHqB83eYtbxzKyhXyfQ36Yc1gA,2816
|
|
6
6
|
cribl_control_plane/_hooks/types.py,sha256=Tw_C4zTZm01rW_89VDEUpvQ8KQr1WxN0Gu_-s_fYSPc,2998
|
|
7
|
-
cribl_control_plane/_version.py,sha256=
|
|
7
|
+
cribl_control_plane/_version.py,sha256=ZnqjqZBFBwWWPOslk2weR_VRAOHrHngTOGA1eeRqZmw,546
|
|
8
8
|
cribl_control_plane/auth_sdk.py,sha256=Jxw8hPHbBFay5eXcaRBtgdCC06mh5XHkRbZcIM0vvB8,7431
|
|
9
9
|
cribl_control_plane/basesdk.py,sha256=amvvB5iPT7c-L6NLo2Rhu2f7xWaapsa6OfQ37SICXOw,11954
|
|
10
10
|
cribl_control_plane/destinations.py,sha256=9L_VzqiAh8xAN4JNBsU7FT7ZFRiBuhtf-5mJBCbZj-g,65733
|
|
@@ -19,8 +19,8 @@ cribl_control_plane/errors/responsevalidationerror.py,sha256=TvZ9dOsy-oFBYA_wZCO
|
|
|
19
19
|
cribl_control_plane/groups_sdk.py,sha256=9tFiyKLd65XO-eTsLs74bUqE3g_0CJYeJ--vK-Hc0Vs,51967
|
|
20
20
|
cribl_control_plane/health.py,sha256=nK_Q4lDXi8zkfAqcIv9X4zBGi8BzomaBQWBD7TsSwLk,6743
|
|
21
21
|
cribl_control_plane/httpclient.py,sha256=Eu73urOAiZQtdUIyOUnPccxCiBbWEKrXG-JrRG3SLM4,3946
|
|
22
|
-
cribl_control_plane/lake.py,sha256=
|
|
23
|
-
cribl_control_plane/models/__init__.py,sha256=
|
|
22
|
+
cribl_control_plane/lake.py,sha256=dHWnoO4KKOO8fncrdOqnc2sN4nGAWc6nX4UdNP4kx40,46484
|
|
23
|
+
cribl_control_plane/models/__init__.py,sha256=2pUh9ZsWJQst_D0X5TOslvdnn91HiuBqY8hfu1AVNwI,577721
|
|
24
24
|
cribl_control_plane/models/addhectokenrequest.py,sha256=mzQLKrMWlwxNheqEs5SM_yrT-gyenfCWgHKhmb5oXFQ,800
|
|
25
25
|
cribl_control_plane/models/appmode.py,sha256=5xRJz9oP5ah4b6dcay4Q1IbQ9irm6k6x2BrTNysIMY4,300
|
|
26
26
|
cribl_control_plane/models/authtoken.py,sha256=uW0aIs8j14CQzFM2ueY5GIWFulna91cigBWQ3oPlDgY,295
|
|
@@ -49,13 +49,16 @@ cribl_control_plane/models/criblevent.py,sha256=eT6WbxhOOCx5OQLkAfhwG6IeSUuUmF7h
|
|
|
49
49
|
cribl_control_plane/models/cribllakedataset.py,sha256=4txRkDEkM-9fLG0my7Sl9IhEW0v6RYdH0FNW5gtUE-g,2303
|
|
50
50
|
cribl_control_plane/models/datasetmetadata.py,sha256=NfKeMQnTgrt-xLQ5LfDr-LrtPArJ8fbzUHd2yF_p3fc,1090
|
|
51
51
|
cribl_control_plane/models/datasetmetadataruninfo.py,sha256=4UrKPwg1oCs7uk3s24dsVzyNXE8TpDJE9vCioZyK7t0,937
|
|
52
|
+
cribl_control_plane/models/deletecribllakedatasetbylakeidandidop.py,sha256=japgQTynnoD5EJvCQ0Wme8oAqXJGWvSmOJhDbLiswFw,1511
|
|
52
53
|
cribl_control_plane/models/deleteinputbyidop.py,sha256=8mFzAyTUv6EJ-5Ivm4TSklARGQVim5busV7u51zHyzo,1067
|
|
53
54
|
cribl_control_plane/models/deleteoutputbyidop.py,sha256=1tNS3O5EK9V0DaWcvvUr-KOQhhpslk_aydhf36pyYfs,1086
|
|
54
55
|
cribl_control_plane/models/deleteoutputpqbyidop.py,sha256=jLy8wreVzCsTTifXL3rHPXnku3G97ZCnbHPGamw-t9g,1042
|
|
56
|
+
cribl_control_plane/models/deletepacksbyidop.py,sha256=RXbMek9nUEXGTlO4zgIgvUnaTG7QqDMhmtIsTe32zCw,1115
|
|
55
57
|
cribl_control_plane/models/deletepipelinebyidop.py,sha256=2TPgET3YUtlqvAjW-iZXcx0yQVBLqVf9UjjgGJzAZ9E,1098
|
|
56
58
|
cribl_control_plane/models/deployrequest.py,sha256=zSl96WkkLVHACFRYUdPT4w7WhCaOv_V7_nMLcSGRYwE,560
|
|
57
59
|
cribl_control_plane/models/deployrequestlookups.py,sha256=WJQf_uL_22Lj7_TIBZ0pZxspYnkfZu9ABNGBLG35tpA,613
|
|
58
60
|
cribl_control_plane/models/distributedsummary.py,sha256=H3vkBqmL3vbQIggXyfWqqrm3d27b3kgqBt9t9e-Vlz4,1359
|
|
61
|
+
cribl_control_plane/models/getcribllakedatasetbylakeidandidop.py,sha256=GB7VQUDOW_jJcqF3e7YnBmTMlfRXFBAh3-L83cADXb8,1493
|
|
59
62
|
cribl_control_plane/models/getcribllakedatasetbylakeidop.py,sha256=lUHq_FQwQUL_3RhRIG6ftRLBgFdqq_G0-hJPpNOE3Rk,1295
|
|
60
63
|
cribl_control_plane/models/getgroupsaclbyidop.py,sha256=8qEObYqYhPbnrFFmF5-j09rPFPFAtVo3WqQaXJKz6XA,1854
|
|
61
64
|
cribl_control_plane/models/getgroupsbyidop.py,sha256=dG2_lux0BILljbzjJhnMdcWnCdu2ZQX08wRmap8c20o,1430
|
|
@@ -250,17 +253,19 @@ cribl_control_plane/models/routesroute_input.py,sha256=VmRpoMuLE5_8yavR_Q8lpHEmE
|
|
|
250
253
|
cribl_control_plane/models/schemeclientoauth.py,sha256=MaZs9lOB3_y8uTZNTHIuAG_X66ZrEpRj0qZGAsBfXFM,712
|
|
251
254
|
cribl_control_plane/models/security.py,sha256=l8rMit25V2MUVLptnexODsL6wP-3l50g8D4kwRsAQvY,1097
|
|
252
255
|
cribl_control_plane/models/teamaccesscontrollist.py,sha256=HLMck-wyuJYiKD-adSS5ti4yLbHE2snZaOAI0GwgfOI,483
|
|
256
|
+
cribl_control_plane/models/updatecribllakedatasetbylakeidandidop.py,sha256=q_bOMXSkfqyNSNFN-qsseimaFl9xfRsbvjdMfAPAERI,1852
|
|
253
257
|
cribl_control_plane/models/updategroupsdeploybyidop.py,sha256=BUuemFukk3IdNR31zi3vFhT6YZr8_9JYV_nJoaLRfp8,1442
|
|
254
258
|
cribl_control_plane/models/updatehectokenrequest.py,sha256=Pq0JnAZuDqdU_g6mmCvfxfMgeK9Pu3uVXfD9sFWfjKQ,787
|
|
255
259
|
cribl_control_plane/models/updateinputbyidop.py,sha256=DtufjoD9UEPnKT2QOggfMDB1Pv2rwj9cEVuAJKbv39U,1300
|
|
256
260
|
cribl_control_plane/models/updateinputhectokenbyidandtokenop.py,sha256=-Q8ZP1yDmQmB9aylQNTs4zR1q6NH-Gi2fhlyiDyqWKI,1677
|
|
257
261
|
cribl_control_plane/models/updateoutputbyidop.py,sha256=odGoTLgvR_AEYizuVMKjcDeB4Uua3BX_U-7OHw7wHiU,1333
|
|
258
|
-
cribl_control_plane/models/
|
|
262
|
+
cribl_control_plane/models/updatepacksbyidop.py,sha256=nQeRQF-NTOCRMWz_gXfYlN0-I2OMM8Rovh_vAq73wzw,1965
|
|
263
|
+
cribl_control_plane/models/updatepacksop.py,sha256=G5UhEf4aAXRQVTH8ZogiuTo3QpcrDfYbdqG7-i9QWUk,1520
|
|
259
264
|
cribl_control_plane/models/updatepipelinebyidop.py,sha256=CPCiszliWVcewMyZ26_R8OvtbJA8RwrEj_XQFoZTSJg,1420
|
|
260
265
|
cribl_control_plane/models/updateroutesbyidop.py,sha256=k6vejvOHHqyfp1oR3aDXEXYIUu6NeRHBl7s9k-jcyiE,1440
|
|
261
266
|
cribl_control_plane/models/updateworkersrestartop.py,sha256=OwX1snIrUTfghc0Pb2PpI5IO6NS-aL0BOMzWqLl8GAA,787
|
|
262
267
|
cribl_control_plane/models/useraccesscontrollist.py,sha256=UNM3mdqFByd9GAovAi26z9y-5H15hrKDzw0M-f-Pn2o,483
|
|
263
|
-
cribl_control_plane/packs.py,sha256=
|
|
268
|
+
cribl_control_plane/packs.py,sha256=syPegLRmrD9ERdPv4w8IamWqcZGhoTudXVtL1BPQHgI,39822
|
|
264
269
|
cribl_control_plane/pipelines.py,sha256=L-HbP4gyl05hxb4-HNvkFrk1w6xFccfNr4-AJy3Vjxo,36038
|
|
265
270
|
cribl_control_plane/py.typed,sha256=zrp19r0G21lr2yRiMC0f8MFkQFGj9wMpSbboePMg8KM,59
|
|
266
271
|
cribl_control_plane/routes_sdk.py,sha256=bxL7KZKdw4Ot78Q3V4Ea5SWrhnEM0fHdRUwQRDeF0Oc,31227
|
|
@@ -289,6 +294,6 @@ cribl_control_plane/utils/url.py,sha256=BgGPgcTA6MRK4bF8fjP2dUopN3NzEzxWMXPBVg8N
|
|
|
289
294
|
cribl_control_plane/utils/values.py,sha256=CcaCXEa3xHhkUDROyXZocN8f0bdITftv9Y0P9lTf0YM,3517
|
|
290
295
|
cribl_control_plane/versioning.py,sha256=-bUutXEf__ewPHzgZshBImZZyQILigzXp1H8ZBCFBbQ,93847
|
|
291
296
|
cribl_control_plane/workers_sdk.py,sha256=qEt_s-Zfg8zyzWEHnOtqYzTiNzFSwEalG-1lSYzVJWc,22666
|
|
292
|
-
cribl_control_plane-0.0.
|
|
293
|
-
cribl_control_plane-0.0.
|
|
294
|
-
cribl_control_plane-0.0.
|
|
297
|
+
cribl_control_plane-0.0.21a1.dist-info/METADATA,sha256=xDWVKkC0ywSAGo0f1RE4b4kfNMMRPCGiJXRcSPKgJsw,32011
|
|
298
|
+
cribl_control_plane-0.0.21a1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
299
|
+
cribl_control_plane-0.0.21a1.dist-info/RECORD,,
|
|
File without changes
|