cribl-control-plane 0.0.26a1__py3-none-any.whl → 0.0.27__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/acl.py +203 -0
- cribl_control_plane/auth_sdk.py +9 -176
- cribl_control_plane/branches.py +335 -0
- cribl_control_plane/commits.py +1141 -0
- cribl_control_plane/commits_files.py +371 -0
- cribl_control_plane/configs_versions.py +189 -0
- cribl_control_plane/destinations.py +18 -729
- cribl_control_plane/destinations_pq.py +359 -0
- cribl_control_plane/errors/healthstatus_error.py +1 -1
- cribl_control_plane/groups_configs.py +17 -0
- cribl_control_plane/groups_sdk.py +18 -551
- cribl_control_plane/{healthinfo.py → health.py} +3 -1
- cribl_control_plane/hectokens.py +479 -0
- cribl_control_plane/models/__init__.py +3 -35
- cribl_control_plane/models/healthstatus.py +3 -3
- cribl_control_plane/models/inputappscope.py +5 -5
- cribl_control_plane/models/inputcollection.py +2 -2
- cribl_control_plane/models/inputconfluentcloud.py +3 -3
- cribl_control_plane/models/inputcribl.py +5 -5
- cribl_control_plane/models/inputcriblhttp.py +3 -3
- cribl_control_plane/models/inputcribllakehttp.py +3 -3
- cribl_control_plane/models/inputcriblmetrics.py +5 -5
- cribl_control_plane/models/inputcribltcp.py +3 -3
- cribl_control_plane/models/inputdatadogagent.py +3 -3
- cribl_control_plane/models/inputedgeprometheus.py +3 -3
- cribl_control_plane/models/inputelastic.py +3 -3
- cribl_control_plane/models/inputeventhub.py +3 -3
- cribl_control_plane/models/inputfile.py +5 -5
- cribl_control_plane/models/inputfirehose.py +3 -3
- cribl_control_plane/models/inputgooglepubsub.py +3 -3
- cribl_control_plane/models/inputgrafana.py +6 -6
- cribl_control_plane/models/inputhttp.py +3 -3
- cribl_control_plane/models/inputhttpraw.py +3 -3
- cribl_control_plane/models/inputjournalfiles.py +3 -3
- cribl_control_plane/models/inputkafka.py +3 -3
- cribl_control_plane/models/inputkinesis.py +3 -3
- cribl_control_plane/models/inputkubeevents.py +5 -5
- cribl_control_plane/models/inputkubelogs.py +5 -5
- cribl_control_plane/models/inputkubemetrics.py +5 -5
- cribl_control_plane/models/inputloki.py +3 -3
- cribl_control_plane/models/inputmodeldriventelemetry.py +3 -3
- cribl_control_plane/models/inputmsk.py +3 -3
- cribl_control_plane/models/inputnetflow.py +3 -3
- cribl_control_plane/models/inputoffice365mgmt.py +3 -3
- cribl_control_plane/models/inputoffice365msgtrace.py +3 -3
- cribl_control_plane/models/inputoffice365service.py +3 -3
- cribl_control_plane/models/inputopentelemetry.py +3 -3
- cribl_control_plane/models/inputprometheus.py +3 -3
- cribl_control_plane/models/inputprometheusrw.py +3 -3
- cribl_control_plane/models/inputrawudp.py +3 -3
- cribl_control_plane/models/inputsnmp.py +3 -3
- cribl_control_plane/models/inputsplunk.py +3 -3
- cribl_control_plane/models/inputsplunkhec.py +3 -3
- cribl_control_plane/models/inputsplunksearch.py +3 -3
- cribl_control_plane/models/inputsqs.py +3 -3
- cribl_control_plane/models/inputsystemmetrics.py +5 -5
- cribl_control_plane/models/inputsystemstate.py +5 -5
- cribl_control_plane/models/inputtcp.py +3 -3
- cribl_control_plane/models/inputtcpjson.py +3 -3
- cribl_control_plane/models/inputwef.py +3 -3
- cribl_control_plane/models/inputwindowsmetrics.py +5 -5
- cribl_control_plane/models/inputwiz.py +3 -3
- cribl_control_plane/models/inputzscalerhec.py +3 -3
- cribl_control_plane/models/outputazureblob.py +3 -3
- cribl_control_plane/models/outputazuredataexplorer.py +3 -3
- cribl_control_plane/models/outputazureeventhub.py +3 -3
- cribl_control_plane/models/outputclickhouse.py +3 -3
- cribl_control_plane/models/outputcloudwatch.py +3 -3
- cribl_control_plane/models/outputconfluentcloud.py +3 -3
- cribl_control_plane/models/outputcriblhttp.py +5 -5
- cribl_control_plane/models/outputcribllake.py +5 -5
- cribl_control_plane/models/outputcribltcp.py +5 -5
- cribl_control_plane/models/outputcrowdstrikenextgensiem.py +3 -3
- cribl_control_plane/models/outputdatadog.py +5 -5
- cribl_control_plane/models/outputdataset.py +5 -5
- cribl_control_plane/models/outputdevnull.py +5 -5
- cribl_control_plane/models/outputdiskspool.py +5 -5
- cribl_control_plane/models/outputdls3.py +3 -3
- cribl_control_plane/models/outputdynatracehttp.py +3 -3
- cribl_control_plane/models/outputdynatraceotlp.py +3 -3
- cribl_control_plane/models/outputelasticcloud.py +3 -3
- cribl_control_plane/models/outputexabeam.py +3 -3
- cribl_control_plane/models/outputgooglecloudlogging.py +3 -3
- cribl_control_plane/models/outputgooglecloudstorage.py +3 -3
- cribl_control_plane/models/outputgrafanacloud.py +10 -10
- cribl_control_plane/models/outputgraphite.py +3 -3
- cribl_control_plane/models/outputhumiohec.py +3 -3
- cribl_control_plane/models/outputkafka.py +3 -3
- cribl_control_plane/models/outputkinesis.py +3 -3
- cribl_control_plane/models/outputminio.py +3 -3
- cribl_control_plane/models/outputmsk.py +3 -3
- cribl_control_plane/models/outputnewrelic.py +5 -5
- cribl_control_plane/models/outputnewrelicevents.py +3 -3
- cribl_control_plane/models/outputring.py +5 -5
- cribl_control_plane/models/outputs3.py +3 -3
- cribl_control_plane/models/outputsecuritylake.py +3 -3
- cribl_control_plane/models/outputsentinel.py +3 -3
- cribl_control_plane/models/outputsentineloneaisiem.py +3 -3
- cribl_control_plane/models/outputservicenow.py +3 -3
- cribl_control_plane/models/outputsns.py +3 -3
- cribl_control_plane/models/outputsplunk.py +3 -3
- cribl_control_plane/models/outputsplunkhec.py +5 -5
- cribl_control_plane/models/outputsqs.py +3 -3
- cribl_control_plane/models/outputstatsd.py +3 -3
- cribl_control_plane/models/outputstatsdext.py +3 -3
- cribl_control_plane/models/outputsyslog.py +5 -5
- cribl_control_plane/models/outputtcpjson.py +5 -5
- cribl_control_plane/models/outputwebhook.py +5 -5
- cribl_control_plane/models/outputxsiam.py +5 -5
- cribl_control_plane/nodes.py +90 -68
- cribl_control_plane/samples.py +391 -0
- cribl_control_plane/sdk.py +11 -17
- cribl_control_plane/sources.py +15 -469
- cribl_control_plane/{workers_sdk.py → statuses.py} +23 -25
- cribl_control_plane/{deployments.py → summaries.py} +3 -3
- cribl_control_plane/teams.py +201 -0
- cribl_control_plane/tokens.py +182 -0
- cribl_control_plane/versions.py +26 -0
- cribl_control_plane/versions_configs.py +171 -0
- {cribl_control_plane-0.0.26a1.dist-info → cribl_control_plane-0.0.27.dist-info}/METADATA +67 -36
- {cribl_control_plane-0.0.26a1.dist-info → cribl_control_plane-0.0.27.dist-info}/RECORD +123 -114
- cribl_control_plane/models/createversionsyncop.py +0 -23
- cribl_control_plane/models/restartresponse.py +0 -26
- cribl_control_plane/models/updateworkersrestartop.py +0 -24
- cribl_control_plane/versioning.py +0 -2309
- {cribl_control_plane-0.0.26a1.dist-info → cribl_control_plane-0.0.27.dist-info}/WHEEL +0 -0
cribl_control_plane/sources.py
CHANGED
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
2
|
|
|
3
3
|
from .basesdk import BaseSDK
|
|
4
|
+
from .sdkconfiguration import SDKConfiguration
|
|
4
5
|
from cribl_control_plane import errors, models, utils
|
|
5
6
|
from cribl_control_plane._hooks import HookContext
|
|
7
|
+
from cribl_control_plane.hectokens import HecTokens
|
|
6
8
|
from cribl_control_plane.types import BaseModel, OptionalNullable, UNSET
|
|
7
9
|
from cribl_control_plane.utils import get_security_from_env
|
|
8
10
|
from cribl_control_plane.utils.unmarshal_json_response import unmarshal_json_response
|
|
9
|
-
from typing import Any,
|
|
11
|
+
from typing import Any, Mapping, Optional, Union, cast
|
|
10
12
|
|
|
11
13
|
|
|
12
14
|
class Sources(BaseSDK):
|
|
15
|
+
r"""Actions related to Sources"""
|
|
16
|
+
|
|
17
|
+
hec_tokens: HecTokens
|
|
18
|
+
|
|
19
|
+
def __init__(self, sdk_config: SDKConfiguration) -> None:
|
|
20
|
+
BaseSDK.__init__(self, sdk_config)
|
|
21
|
+
self.sdk_configuration = sdk_config
|
|
22
|
+
self._init_sdks()
|
|
23
|
+
|
|
24
|
+
def _init_sdks(self):
|
|
25
|
+
self.hec_tokens = HecTokens(self.sdk_configuration)
|
|
26
|
+
|
|
13
27
|
def list(
|
|
14
28
|
self,
|
|
15
29
|
*,
|
|
@@ -883,471 +897,3 @@ class Sources(BaseSDK):
|
|
|
883
897
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
884
898
|
|
|
885
899
|
raise errors.APIError("Unexpected response received", http_res)
|
|
886
|
-
|
|
887
|
-
def create_hec_token(
|
|
888
|
-
self,
|
|
889
|
-
*,
|
|
890
|
-
id: str,
|
|
891
|
-
token: str,
|
|
892
|
-
description: Optional[str] = None,
|
|
893
|
-
enabled: Optional[bool] = None,
|
|
894
|
-
metadata: Optional[
|
|
895
|
-
Union[
|
|
896
|
-
List[models.AddHecTokenRequestMetadatum],
|
|
897
|
-
List[models.AddHecTokenRequestMetadatumTypedDict],
|
|
898
|
-
]
|
|
899
|
-
] = None,
|
|
900
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
901
|
-
server_url: Optional[str] = None,
|
|
902
|
-
timeout_ms: Optional[int] = None,
|
|
903
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
904
|
-
) -> models.CreateInputHecTokenByIDResponse:
|
|
905
|
-
r"""Add an HEC token and optional metadata to a Splunk HEC Source
|
|
906
|
-
|
|
907
|
-
Add token and optional metadata to an existing HEC Source
|
|
908
|
-
|
|
909
|
-
:param id: HEC Source id
|
|
910
|
-
:param token:
|
|
911
|
-
:param description:
|
|
912
|
-
:param enabled:
|
|
913
|
-
:param metadata:
|
|
914
|
-
:param retries: Override the default retry configuration for this method
|
|
915
|
-
:param server_url: Override the default server URL for this method
|
|
916
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
917
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
918
|
-
"""
|
|
919
|
-
base_url = None
|
|
920
|
-
url_variables = None
|
|
921
|
-
if timeout_ms is None:
|
|
922
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
923
|
-
|
|
924
|
-
if server_url is not None:
|
|
925
|
-
base_url = server_url
|
|
926
|
-
else:
|
|
927
|
-
base_url = self._get_url(base_url, url_variables)
|
|
928
|
-
|
|
929
|
-
request = models.CreateInputHecTokenByIDRequest(
|
|
930
|
-
id=id,
|
|
931
|
-
add_hec_token_request=models.AddHecTokenRequest(
|
|
932
|
-
description=description,
|
|
933
|
-
enabled=enabled,
|
|
934
|
-
metadata=utils.get_pydantic_model(
|
|
935
|
-
metadata, Optional[List[models.AddHecTokenRequestMetadatum]]
|
|
936
|
-
),
|
|
937
|
-
token=token,
|
|
938
|
-
),
|
|
939
|
-
)
|
|
940
|
-
|
|
941
|
-
req = self._build_request(
|
|
942
|
-
method="POST",
|
|
943
|
-
path="/system/inputs/{id}/hectoken",
|
|
944
|
-
base_url=base_url,
|
|
945
|
-
url_variables=url_variables,
|
|
946
|
-
request=request,
|
|
947
|
-
request_body_required=True,
|
|
948
|
-
request_has_path_params=True,
|
|
949
|
-
request_has_query_params=True,
|
|
950
|
-
user_agent_header="user-agent",
|
|
951
|
-
accept_header_value="application/json",
|
|
952
|
-
http_headers=http_headers,
|
|
953
|
-
security=self.sdk_configuration.security,
|
|
954
|
-
get_serialized_body=lambda: utils.serialize_request_body(
|
|
955
|
-
request.add_hec_token_request,
|
|
956
|
-
False,
|
|
957
|
-
False,
|
|
958
|
-
"json",
|
|
959
|
-
models.AddHecTokenRequest,
|
|
960
|
-
),
|
|
961
|
-
timeout_ms=timeout_ms,
|
|
962
|
-
)
|
|
963
|
-
|
|
964
|
-
if retries == UNSET:
|
|
965
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
966
|
-
retries = self.sdk_configuration.retry_config
|
|
967
|
-
|
|
968
|
-
retry_config = None
|
|
969
|
-
if isinstance(retries, utils.RetryConfig):
|
|
970
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
971
|
-
|
|
972
|
-
http_res = self.do_request(
|
|
973
|
-
hook_ctx=HookContext(
|
|
974
|
-
config=self.sdk_configuration,
|
|
975
|
-
base_url=base_url or "",
|
|
976
|
-
operation_id="createInputHecTokenById",
|
|
977
|
-
oauth2_scopes=[],
|
|
978
|
-
security_source=get_security_from_env(
|
|
979
|
-
self.sdk_configuration.security, models.Security
|
|
980
|
-
),
|
|
981
|
-
),
|
|
982
|
-
request=req,
|
|
983
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
984
|
-
retry_config=retry_config,
|
|
985
|
-
)
|
|
986
|
-
|
|
987
|
-
response_data: Any = None
|
|
988
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
989
|
-
return unmarshal_json_response(
|
|
990
|
-
models.CreateInputHecTokenByIDResponse, http_res
|
|
991
|
-
)
|
|
992
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
993
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
994
|
-
raise errors.Error(response_data, http_res)
|
|
995
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
996
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
997
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
998
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
999
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
1000
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1001
|
-
|
|
1002
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
1003
|
-
|
|
1004
|
-
async def create_hec_token_async(
|
|
1005
|
-
self,
|
|
1006
|
-
*,
|
|
1007
|
-
id: str,
|
|
1008
|
-
token: str,
|
|
1009
|
-
description: Optional[str] = None,
|
|
1010
|
-
enabled: Optional[bool] = None,
|
|
1011
|
-
metadata: Optional[
|
|
1012
|
-
Union[
|
|
1013
|
-
List[models.AddHecTokenRequestMetadatum],
|
|
1014
|
-
List[models.AddHecTokenRequestMetadatumTypedDict],
|
|
1015
|
-
]
|
|
1016
|
-
] = None,
|
|
1017
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1018
|
-
server_url: Optional[str] = None,
|
|
1019
|
-
timeout_ms: Optional[int] = None,
|
|
1020
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
1021
|
-
) -> models.CreateInputHecTokenByIDResponse:
|
|
1022
|
-
r"""Add an HEC token and optional metadata to a Splunk HEC Source
|
|
1023
|
-
|
|
1024
|
-
Add token and optional metadata to an existing HEC Source
|
|
1025
|
-
|
|
1026
|
-
:param id: HEC Source id
|
|
1027
|
-
:param token:
|
|
1028
|
-
:param description:
|
|
1029
|
-
:param enabled:
|
|
1030
|
-
:param metadata:
|
|
1031
|
-
:param retries: Override the default retry configuration for this method
|
|
1032
|
-
:param server_url: Override the default server URL for this method
|
|
1033
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
1034
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
1035
|
-
"""
|
|
1036
|
-
base_url = None
|
|
1037
|
-
url_variables = None
|
|
1038
|
-
if timeout_ms is None:
|
|
1039
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
1040
|
-
|
|
1041
|
-
if server_url is not None:
|
|
1042
|
-
base_url = server_url
|
|
1043
|
-
else:
|
|
1044
|
-
base_url = self._get_url(base_url, url_variables)
|
|
1045
|
-
|
|
1046
|
-
request = models.CreateInputHecTokenByIDRequest(
|
|
1047
|
-
id=id,
|
|
1048
|
-
add_hec_token_request=models.AddHecTokenRequest(
|
|
1049
|
-
description=description,
|
|
1050
|
-
enabled=enabled,
|
|
1051
|
-
metadata=utils.get_pydantic_model(
|
|
1052
|
-
metadata, Optional[List[models.AddHecTokenRequestMetadatum]]
|
|
1053
|
-
),
|
|
1054
|
-
token=token,
|
|
1055
|
-
),
|
|
1056
|
-
)
|
|
1057
|
-
|
|
1058
|
-
req = self._build_request_async(
|
|
1059
|
-
method="POST",
|
|
1060
|
-
path="/system/inputs/{id}/hectoken",
|
|
1061
|
-
base_url=base_url,
|
|
1062
|
-
url_variables=url_variables,
|
|
1063
|
-
request=request,
|
|
1064
|
-
request_body_required=True,
|
|
1065
|
-
request_has_path_params=True,
|
|
1066
|
-
request_has_query_params=True,
|
|
1067
|
-
user_agent_header="user-agent",
|
|
1068
|
-
accept_header_value="application/json",
|
|
1069
|
-
http_headers=http_headers,
|
|
1070
|
-
security=self.sdk_configuration.security,
|
|
1071
|
-
get_serialized_body=lambda: utils.serialize_request_body(
|
|
1072
|
-
request.add_hec_token_request,
|
|
1073
|
-
False,
|
|
1074
|
-
False,
|
|
1075
|
-
"json",
|
|
1076
|
-
models.AddHecTokenRequest,
|
|
1077
|
-
),
|
|
1078
|
-
timeout_ms=timeout_ms,
|
|
1079
|
-
)
|
|
1080
|
-
|
|
1081
|
-
if retries == UNSET:
|
|
1082
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
1083
|
-
retries = self.sdk_configuration.retry_config
|
|
1084
|
-
|
|
1085
|
-
retry_config = None
|
|
1086
|
-
if isinstance(retries, utils.RetryConfig):
|
|
1087
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
1088
|
-
|
|
1089
|
-
http_res = await self.do_request_async(
|
|
1090
|
-
hook_ctx=HookContext(
|
|
1091
|
-
config=self.sdk_configuration,
|
|
1092
|
-
base_url=base_url or "",
|
|
1093
|
-
operation_id="createInputHecTokenById",
|
|
1094
|
-
oauth2_scopes=[],
|
|
1095
|
-
security_source=get_security_from_env(
|
|
1096
|
-
self.sdk_configuration.security, models.Security
|
|
1097
|
-
),
|
|
1098
|
-
),
|
|
1099
|
-
request=req,
|
|
1100
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
1101
|
-
retry_config=retry_config,
|
|
1102
|
-
)
|
|
1103
|
-
|
|
1104
|
-
response_data: Any = None
|
|
1105
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
1106
|
-
return unmarshal_json_response(
|
|
1107
|
-
models.CreateInputHecTokenByIDResponse, http_res
|
|
1108
|
-
)
|
|
1109
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
1110
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
1111
|
-
raise errors.Error(response_data, http_res)
|
|
1112
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
1113
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1114
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1115
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
1116
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1117
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1118
|
-
|
|
1119
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
1120
|
-
|
|
1121
|
-
def update_hec_token_metadata(
|
|
1122
|
-
self,
|
|
1123
|
-
*,
|
|
1124
|
-
id: str,
|
|
1125
|
-
token: str,
|
|
1126
|
-
description: Optional[str] = None,
|
|
1127
|
-
enabled: Optional[bool] = None,
|
|
1128
|
-
metadata: Optional[
|
|
1129
|
-
Union[
|
|
1130
|
-
List[models.UpdateHecTokenRequestMetadatum],
|
|
1131
|
-
List[models.UpdateHecTokenRequestMetadatumTypedDict],
|
|
1132
|
-
]
|
|
1133
|
-
] = None,
|
|
1134
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1135
|
-
server_url: Optional[str] = None,
|
|
1136
|
-
timeout_ms: Optional[int] = None,
|
|
1137
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
1138
|
-
) -> models.UpdateInputHecTokenByIDAndTokenResponse:
|
|
1139
|
-
r"""Update metadata for an HEC token for a Splunk HEC Source
|
|
1140
|
-
|
|
1141
|
-
Update token metadata on existing HEC Source
|
|
1142
|
-
|
|
1143
|
-
:param id: HEC Source id
|
|
1144
|
-
:param token: token to update
|
|
1145
|
-
:param description:
|
|
1146
|
-
:param enabled:
|
|
1147
|
-
:param metadata:
|
|
1148
|
-
:param retries: Override the default retry configuration for this method
|
|
1149
|
-
:param server_url: Override the default server URL for this method
|
|
1150
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
1151
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
1152
|
-
"""
|
|
1153
|
-
base_url = None
|
|
1154
|
-
url_variables = None
|
|
1155
|
-
if timeout_ms is None:
|
|
1156
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
1157
|
-
|
|
1158
|
-
if server_url is not None:
|
|
1159
|
-
base_url = server_url
|
|
1160
|
-
else:
|
|
1161
|
-
base_url = self._get_url(base_url, url_variables)
|
|
1162
|
-
|
|
1163
|
-
request = models.UpdateInputHecTokenByIDAndTokenRequest(
|
|
1164
|
-
id=id,
|
|
1165
|
-
token=token,
|
|
1166
|
-
update_hec_token_request=models.UpdateHecTokenRequest(
|
|
1167
|
-
description=description,
|
|
1168
|
-
enabled=enabled,
|
|
1169
|
-
metadata=utils.get_pydantic_model(
|
|
1170
|
-
metadata, Optional[List[models.UpdateHecTokenRequestMetadatum]]
|
|
1171
|
-
),
|
|
1172
|
-
),
|
|
1173
|
-
)
|
|
1174
|
-
|
|
1175
|
-
req = self._build_request(
|
|
1176
|
-
method="PATCH",
|
|
1177
|
-
path="/system/inputs/{id}/hectoken/{token}",
|
|
1178
|
-
base_url=base_url,
|
|
1179
|
-
url_variables=url_variables,
|
|
1180
|
-
request=request,
|
|
1181
|
-
request_body_required=True,
|
|
1182
|
-
request_has_path_params=True,
|
|
1183
|
-
request_has_query_params=True,
|
|
1184
|
-
user_agent_header="user-agent",
|
|
1185
|
-
accept_header_value="application/json",
|
|
1186
|
-
http_headers=http_headers,
|
|
1187
|
-
security=self.sdk_configuration.security,
|
|
1188
|
-
get_serialized_body=lambda: utils.serialize_request_body(
|
|
1189
|
-
request.update_hec_token_request,
|
|
1190
|
-
False,
|
|
1191
|
-
False,
|
|
1192
|
-
"json",
|
|
1193
|
-
models.UpdateHecTokenRequest,
|
|
1194
|
-
),
|
|
1195
|
-
timeout_ms=timeout_ms,
|
|
1196
|
-
)
|
|
1197
|
-
|
|
1198
|
-
if retries == UNSET:
|
|
1199
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
1200
|
-
retries = self.sdk_configuration.retry_config
|
|
1201
|
-
|
|
1202
|
-
retry_config = None
|
|
1203
|
-
if isinstance(retries, utils.RetryConfig):
|
|
1204
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
1205
|
-
|
|
1206
|
-
http_res = self.do_request(
|
|
1207
|
-
hook_ctx=HookContext(
|
|
1208
|
-
config=self.sdk_configuration,
|
|
1209
|
-
base_url=base_url or "",
|
|
1210
|
-
operation_id="updateInputHecTokenByIdAndToken",
|
|
1211
|
-
oauth2_scopes=[],
|
|
1212
|
-
security_source=get_security_from_env(
|
|
1213
|
-
self.sdk_configuration.security, models.Security
|
|
1214
|
-
),
|
|
1215
|
-
),
|
|
1216
|
-
request=req,
|
|
1217
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
1218
|
-
retry_config=retry_config,
|
|
1219
|
-
)
|
|
1220
|
-
|
|
1221
|
-
response_data: Any = None
|
|
1222
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
1223
|
-
return unmarshal_json_response(
|
|
1224
|
-
models.UpdateInputHecTokenByIDAndTokenResponse, http_res
|
|
1225
|
-
)
|
|
1226
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
1227
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
1228
|
-
raise errors.Error(response_data, http_res)
|
|
1229
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
1230
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
1231
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1232
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
1233
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
1234
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1235
|
-
|
|
1236
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
1237
|
-
|
|
1238
|
-
async def update_hec_token_metadata_async(
|
|
1239
|
-
self,
|
|
1240
|
-
*,
|
|
1241
|
-
id: str,
|
|
1242
|
-
token: str,
|
|
1243
|
-
description: Optional[str] = None,
|
|
1244
|
-
enabled: Optional[bool] = None,
|
|
1245
|
-
metadata: Optional[
|
|
1246
|
-
Union[
|
|
1247
|
-
List[models.UpdateHecTokenRequestMetadatum],
|
|
1248
|
-
List[models.UpdateHecTokenRequestMetadatumTypedDict],
|
|
1249
|
-
]
|
|
1250
|
-
] = None,
|
|
1251
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1252
|
-
server_url: Optional[str] = None,
|
|
1253
|
-
timeout_ms: Optional[int] = None,
|
|
1254
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
1255
|
-
) -> models.UpdateInputHecTokenByIDAndTokenResponse:
|
|
1256
|
-
r"""Update metadata for an HEC token for a Splunk HEC Source
|
|
1257
|
-
|
|
1258
|
-
Update token metadata on existing HEC Source
|
|
1259
|
-
|
|
1260
|
-
:param id: HEC Source id
|
|
1261
|
-
:param token: token to update
|
|
1262
|
-
:param description:
|
|
1263
|
-
:param enabled:
|
|
1264
|
-
:param metadata:
|
|
1265
|
-
:param retries: Override the default retry configuration for this method
|
|
1266
|
-
:param server_url: Override the default server URL for this method
|
|
1267
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
1268
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
1269
|
-
"""
|
|
1270
|
-
base_url = None
|
|
1271
|
-
url_variables = None
|
|
1272
|
-
if timeout_ms is None:
|
|
1273
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
1274
|
-
|
|
1275
|
-
if server_url is not None:
|
|
1276
|
-
base_url = server_url
|
|
1277
|
-
else:
|
|
1278
|
-
base_url = self._get_url(base_url, url_variables)
|
|
1279
|
-
|
|
1280
|
-
request = models.UpdateInputHecTokenByIDAndTokenRequest(
|
|
1281
|
-
id=id,
|
|
1282
|
-
token=token,
|
|
1283
|
-
update_hec_token_request=models.UpdateHecTokenRequest(
|
|
1284
|
-
description=description,
|
|
1285
|
-
enabled=enabled,
|
|
1286
|
-
metadata=utils.get_pydantic_model(
|
|
1287
|
-
metadata, Optional[List[models.UpdateHecTokenRequestMetadatum]]
|
|
1288
|
-
),
|
|
1289
|
-
),
|
|
1290
|
-
)
|
|
1291
|
-
|
|
1292
|
-
req = self._build_request_async(
|
|
1293
|
-
method="PATCH",
|
|
1294
|
-
path="/system/inputs/{id}/hectoken/{token}",
|
|
1295
|
-
base_url=base_url,
|
|
1296
|
-
url_variables=url_variables,
|
|
1297
|
-
request=request,
|
|
1298
|
-
request_body_required=True,
|
|
1299
|
-
request_has_path_params=True,
|
|
1300
|
-
request_has_query_params=True,
|
|
1301
|
-
user_agent_header="user-agent",
|
|
1302
|
-
accept_header_value="application/json",
|
|
1303
|
-
http_headers=http_headers,
|
|
1304
|
-
security=self.sdk_configuration.security,
|
|
1305
|
-
get_serialized_body=lambda: utils.serialize_request_body(
|
|
1306
|
-
request.update_hec_token_request,
|
|
1307
|
-
False,
|
|
1308
|
-
False,
|
|
1309
|
-
"json",
|
|
1310
|
-
models.UpdateHecTokenRequest,
|
|
1311
|
-
),
|
|
1312
|
-
timeout_ms=timeout_ms,
|
|
1313
|
-
)
|
|
1314
|
-
|
|
1315
|
-
if retries == UNSET:
|
|
1316
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
1317
|
-
retries = self.sdk_configuration.retry_config
|
|
1318
|
-
|
|
1319
|
-
retry_config = None
|
|
1320
|
-
if isinstance(retries, utils.RetryConfig):
|
|
1321
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
1322
|
-
|
|
1323
|
-
http_res = await self.do_request_async(
|
|
1324
|
-
hook_ctx=HookContext(
|
|
1325
|
-
config=self.sdk_configuration,
|
|
1326
|
-
base_url=base_url or "",
|
|
1327
|
-
operation_id="updateInputHecTokenByIdAndToken",
|
|
1328
|
-
oauth2_scopes=[],
|
|
1329
|
-
security_source=get_security_from_env(
|
|
1330
|
-
self.sdk_configuration.security, models.Security
|
|
1331
|
-
),
|
|
1332
|
-
),
|
|
1333
|
-
request=req,
|
|
1334
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
1335
|
-
retry_config=retry_config,
|
|
1336
|
-
)
|
|
1337
|
-
|
|
1338
|
-
response_data: Any = None
|
|
1339
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
1340
|
-
return unmarshal_json_response(
|
|
1341
|
-
models.UpdateInputHecTokenByIDAndTokenResponse, http_res
|
|
1342
|
-
)
|
|
1343
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
1344
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
1345
|
-
raise errors.Error(response_data, http_res)
|
|
1346
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
1347
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1348
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1349
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
1350
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1351
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1352
|
-
|
|
1353
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
@@ -9,23 +9,21 @@ from cribl_control_plane.utils.unmarshal_json_response import unmarshal_json_res
|
|
|
9
9
|
from typing import Any, Mapping, Optional
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
class
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def get_summary_workers(
|
|
12
|
+
class Statuses(BaseSDK):
|
|
13
|
+
def get(
|
|
16
14
|
self,
|
|
17
15
|
*,
|
|
18
|
-
|
|
16
|
+
group: Optional[str] = None,
|
|
19
17
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
20
18
|
server_url: Optional[str] = None,
|
|
21
19
|
timeout_ms: Optional[int] = None,
|
|
22
20
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
23
|
-
) -> models.
|
|
24
|
-
r"""Retrieve
|
|
21
|
+
) -> models.GetVersionStatusResponse:
|
|
22
|
+
r"""Retrieve the status of the current working tree
|
|
25
23
|
|
|
26
|
-
get
|
|
24
|
+
get the the working tree status
|
|
27
25
|
|
|
28
|
-
:param
|
|
26
|
+
:param group: Group ID
|
|
29
27
|
:param retries: Override the default retry configuration for this method
|
|
30
28
|
:param server_url: Override the default server URL for this method
|
|
31
29
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -41,13 +39,13 @@ class WorkersSDK(BaseSDK):
|
|
|
41
39
|
else:
|
|
42
40
|
base_url = self._get_url(base_url, url_variables)
|
|
43
41
|
|
|
44
|
-
request = models.
|
|
45
|
-
|
|
42
|
+
request = models.GetVersionStatusRequest(
|
|
43
|
+
group=group,
|
|
46
44
|
)
|
|
47
45
|
|
|
48
46
|
req = self._build_request(
|
|
49
47
|
method="GET",
|
|
50
|
-
path="/
|
|
48
|
+
path="/version/status",
|
|
51
49
|
base_url=base_url,
|
|
52
50
|
url_variables=url_variables,
|
|
53
51
|
request=request,
|
|
@@ -73,7 +71,7 @@ class WorkersSDK(BaseSDK):
|
|
|
73
71
|
hook_ctx=HookContext(
|
|
74
72
|
config=self.sdk_configuration,
|
|
75
73
|
base_url=base_url or "",
|
|
76
|
-
operation_id="
|
|
74
|
+
operation_id="getVersionStatus",
|
|
77
75
|
oauth2_scopes=[],
|
|
78
76
|
security_source=get_security_from_env(
|
|
79
77
|
self.sdk_configuration.security, models.Security
|
|
@@ -86,7 +84,7 @@ class WorkersSDK(BaseSDK):
|
|
|
86
84
|
|
|
87
85
|
response_data: Any = None
|
|
88
86
|
if utils.match_response(http_res, "200", "application/json"):
|
|
89
|
-
return unmarshal_json_response(models.
|
|
87
|
+
return unmarshal_json_response(models.GetVersionStatusResponse, http_res)
|
|
90
88
|
if utils.match_response(http_res, "500", "application/json"):
|
|
91
89
|
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
92
90
|
raise errors.Error(response_data, http_res)
|
|
@@ -99,20 +97,20 @@ class WorkersSDK(BaseSDK):
|
|
|
99
97
|
|
|
100
98
|
raise errors.APIError("Unexpected response received", http_res)
|
|
101
99
|
|
|
102
|
-
async def
|
|
100
|
+
async def get_async(
|
|
103
101
|
self,
|
|
104
102
|
*,
|
|
105
|
-
|
|
103
|
+
group: Optional[str] = None,
|
|
106
104
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
107
105
|
server_url: Optional[str] = None,
|
|
108
106
|
timeout_ms: Optional[int] = None,
|
|
109
107
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
110
|
-
) -> models.
|
|
111
|
-
r"""Retrieve
|
|
108
|
+
) -> models.GetVersionStatusResponse:
|
|
109
|
+
r"""Retrieve the status of the current working tree
|
|
112
110
|
|
|
113
|
-
get
|
|
111
|
+
get the the working tree status
|
|
114
112
|
|
|
115
|
-
:param
|
|
113
|
+
:param group: Group ID
|
|
116
114
|
:param retries: Override the default retry configuration for this method
|
|
117
115
|
:param server_url: Override the default server URL for this method
|
|
118
116
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -128,13 +126,13 @@ class WorkersSDK(BaseSDK):
|
|
|
128
126
|
else:
|
|
129
127
|
base_url = self._get_url(base_url, url_variables)
|
|
130
128
|
|
|
131
|
-
request = models.
|
|
132
|
-
|
|
129
|
+
request = models.GetVersionStatusRequest(
|
|
130
|
+
group=group,
|
|
133
131
|
)
|
|
134
132
|
|
|
135
133
|
req = self._build_request_async(
|
|
136
134
|
method="GET",
|
|
137
|
-
path="/
|
|
135
|
+
path="/version/status",
|
|
138
136
|
base_url=base_url,
|
|
139
137
|
url_variables=url_variables,
|
|
140
138
|
request=request,
|
|
@@ -160,7 +158,7 @@ class WorkersSDK(BaseSDK):
|
|
|
160
158
|
hook_ctx=HookContext(
|
|
161
159
|
config=self.sdk_configuration,
|
|
162
160
|
base_url=base_url or "",
|
|
163
|
-
operation_id="
|
|
161
|
+
operation_id="getVersionStatus",
|
|
164
162
|
oauth2_scopes=[],
|
|
165
163
|
security_source=get_security_from_env(
|
|
166
164
|
self.sdk_configuration.security, models.Security
|
|
@@ -173,7 +171,7 @@ class WorkersSDK(BaseSDK):
|
|
|
173
171
|
|
|
174
172
|
response_data: Any = None
|
|
175
173
|
if utils.match_response(http_res, "200", "application/json"):
|
|
176
|
-
return unmarshal_json_response(models.
|
|
174
|
+
return unmarshal_json_response(models.GetVersionStatusResponse, http_res)
|
|
177
175
|
if utils.match_response(http_res, "500", "application/json"):
|
|
178
176
|
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
179
177
|
raise errors.Error(response_data, http_res)
|
|
@@ -9,8 +9,8 @@ from cribl_control_plane.utils.unmarshal_json_response import unmarshal_json_res
|
|
|
9
9
|
from typing import Any, Mapping, Optional
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
class
|
|
13
|
-
def
|
|
12
|
+
class Summaries(BaseSDK):
|
|
13
|
+
def get(
|
|
14
14
|
self,
|
|
15
15
|
*,
|
|
16
16
|
mode: Optional[models.GetSummaryMode] = None,
|
|
@@ -97,7 +97,7 @@ class Deployments(BaseSDK):
|
|
|
97
97
|
|
|
98
98
|
raise errors.APIError("Unexpected response received", http_res)
|
|
99
99
|
|
|
100
|
-
async def
|
|
100
|
+
async def get_async(
|
|
101
101
|
self,
|
|
102
102
|
*,
|
|
103
103
|
mode: Optional[models.GetSummaryMode] = None,
|