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
|
@@ -0,0 +1,479 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
|
|
3
|
+
from .basesdk import BaseSDK
|
|
4
|
+
from cribl_control_plane import errors, models, utils
|
|
5
|
+
from cribl_control_plane._hooks import HookContext
|
|
6
|
+
from cribl_control_plane.types import OptionalNullable, UNSET
|
|
7
|
+
from cribl_control_plane.utils import get_security_from_env
|
|
8
|
+
from cribl_control_plane.utils.unmarshal_json_response import unmarshal_json_response
|
|
9
|
+
from typing import Any, List, Mapping, Optional, Union
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class HecTokens(BaseSDK):
|
|
13
|
+
def create(
|
|
14
|
+
self,
|
|
15
|
+
*,
|
|
16
|
+
id: str,
|
|
17
|
+
token: str,
|
|
18
|
+
description: Optional[str] = None,
|
|
19
|
+
enabled: Optional[bool] = None,
|
|
20
|
+
metadata: Optional[
|
|
21
|
+
Union[
|
|
22
|
+
List[models.AddHecTokenRequestMetadatum],
|
|
23
|
+
List[models.AddHecTokenRequestMetadatumTypedDict],
|
|
24
|
+
]
|
|
25
|
+
] = None,
|
|
26
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
27
|
+
server_url: Optional[str] = None,
|
|
28
|
+
timeout_ms: Optional[int] = None,
|
|
29
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
30
|
+
) -> models.CreateInputHecTokenByIDResponse:
|
|
31
|
+
r"""Add an HEC token and optional metadata to a Splunk HEC Source
|
|
32
|
+
|
|
33
|
+
Add token and optional metadata to an existing HEC Source
|
|
34
|
+
|
|
35
|
+
:param id: HEC Source id
|
|
36
|
+
:param token:
|
|
37
|
+
:param description:
|
|
38
|
+
:param enabled:
|
|
39
|
+
:param metadata:
|
|
40
|
+
:param retries: Override the default retry configuration for this method
|
|
41
|
+
:param server_url: Override the default server URL for this method
|
|
42
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
43
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
44
|
+
"""
|
|
45
|
+
base_url = None
|
|
46
|
+
url_variables = None
|
|
47
|
+
if timeout_ms is None:
|
|
48
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
49
|
+
|
|
50
|
+
if server_url is not None:
|
|
51
|
+
base_url = server_url
|
|
52
|
+
else:
|
|
53
|
+
base_url = self._get_url(base_url, url_variables)
|
|
54
|
+
|
|
55
|
+
request = models.CreateInputHecTokenByIDRequest(
|
|
56
|
+
id=id,
|
|
57
|
+
add_hec_token_request=models.AddHecTokenRequest(
|
|
58
|
+
description=description,
|
|
59
|
+
enabled=enabled,
|
|
60
|
+
metadata=utils.get_pydantic_model(
|
|
61
|
+
metadata, Optional[List[models.AddHecTokenRequestMetadatum]]
|
|
62
|
+
),
|
|
63
|
+
token=token,
|
|
64
|
+
),
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
req = self._build_request(
|
|
68
|
+
method="POST",
|
|
69
|
+
path="/system/inputs/{id}/hectoken",
|
|
70
|
+
base_url=base_url,
|
|
71
|
+
url_variables=url_variables,
|
|
72
|
+
request=request,
|
|
73
|
+
request_body_required=True,
|
|
74
|
+
request_has_path_params=True,
|
|
75
|
+
request_has_query_params=True,
|
|
76
|
+
user_agent_header="user-agent",
|
|
77
|
+
accept_header_value="application/json",
|
|
78
|
+
http_headers=http_headers,
|
|
79
|
+
security=self.sdk_configuration.security,
|
|
80
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
81
|
+
request.add_hec_token_request,
|
|
82
|
+
False,
|
|
83
|
+
False,
|
|
84
|
+
"json",
|
|
85
|
+
models.AddHecTokenRequest,
|
|
86
|
+
),
|
|
87
|
+
timeout_ms=timeout_ms,
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
if retries == UNSET:
|
|
91
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
92
|
+
retries = self.sdk_configuration.retry_config
|
|
93
|
+
|
|
94
|
+
retry_config = None
|
|
95
|
+
if isinstance(retries, utils.RetryConfig):
|
|
96
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
97
|
+
|
|
98
|
+
http_res = self.do_request(
|
|
99
|
+
hook_ctx=HookContext(
|
|
100
|
+
config=self.sdk_configuration,
|
|
101
|
+
base_url=base_url or "",
|
|
102
|
+
operation_id="createInputHecTokenById",
|
|
103
|
+
oauth2_scopes=[],
|
|
104
|
+
security_source=get_security_from_env(
|
|
105
|
+
self.sdk_configuration.security, models.Security
|
|
106
|
+
),
|
|
107
|
+
),
|
|
108
|
+
request=req,
|
|
109
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
110
|
+
retry_config=retry_config,
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
response_data: Any = None
|
|
114
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
115
|
+
return unmarshal_json_response(
|
|
116
|
+
models.CreateInputHecTokenByIDResponse, http_res
|
|
117
|
+
)
|
|
118
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
119
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
120
|
+
raise errors.Error(response_data, http_res)
|
|
121
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
122
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
123
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
124
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
125
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
126
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
127
|
+
|
|
128
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
129
|
+
|
|
130
|
+
async def create_async(
|
|
131
|
+
self,
|
|
132
|
+
*,
|
|
133
|
+
id: str,
|
|
134
|
+
token: str,
|
|
135
|
+
description: Optional[str] = None,
|
|
136
|
+
enabled: Optional[bool] = None,
|
|
137
|
+
metadata: Optional[
|
|
138
|
+
Union[
|
|
139
|
+
List[models.AddHecTokenRequestMetadatum],
|
|
140
|
+
List[models.AddHecTokenRequestMetadatumTypedDict],
|
|
141
|
+
]
|
|
142
|
+
] = None,
|
|
143
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
144
|
+
server_url: Optional[str] = None,
|
|
145
|
+
timeout_ms: Optional[int] = None,
|
|
146
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
147
|
+
) -> models.CreateInputHecTokenByIDResponse:
|
|
148
|
+
r"""Add an HEC token and optional metadata to a Splunk HEC Source
|
|
149
|
+
|
|
150
|
+
Add token and optional metadata to an existing HEC Source
|
|
151
|
+
|
|
152
|
+
:param id: HEC Source id
|
|
153
|
+
:param token:
|
|
154
|
+
:param description:
|
|
155
|
+
:param enabled:
|
|
156
|
+
:param metadata:
|
|
157
|
+
:param retries: Override the default retry configuration for this method
|
|
158
|
+
:param server_url: Override the default server URL for this method
|
|
159
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
160
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
161
|
+
"""
|
|
162
|
+
base_url = None
|
|
163
|
+
url_variables = None
|
|
164
|
+
if timeout_ms is None:
|
|
165
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
166
|
+
|
|
167
|
+
if server_url is not None:
|
|
168
|
+
base_url = server_url
|
|
169
|
+
else:
|
|
170
|
+
base_url = self._get_url(base_url, url_variables)
|
|
171
|
+
|
|
172
|
+
request = models.CreateInputHecTokenByIDRequest(
|
|
173
|
+
id=id,
|
|
174
|
+
add_hec_token_request=models.AddHecTokenRequest(
|
|
175
|
+
description=description,
|
|
176
|
+
enabled=enabled,
|
|
177
|
+
metadata=utils.get_pydantic_model(
|
|
178
|
+
metadata, Optional[List[models.AddHecTokenRequestMetadatum]]
|
|
179
|
+
),
|
|
180
|
+
token=token,
|
|
181
|
+
),
|
|
182
|
+
)
|
|
183
|
+
|
|
184
|
+
req = self._build_request_async(
|
|
185
|
+
method="POST",
|
|
186
|
+
path="/system/inputs/{id}/hectoken",
|
|
187
|
+
base_url=base_url,
|
|
188
|
+
url_variables=url_variables,
|
|
189
|
+
request=request,
|
|
190
|
+
request_body_required=True,
|
|
191
|
+
request_has_path_params=True,
|
|
192
|
+
request_has_query_params=True,
|
|
193
|
+
user_agent_header="user-agent",
|
|
194
|
+
accept_header_value="application/json",
|
|
195
|
+
http_headers=http_headers,
|
|
196
|
+
security=self.sdk_configuration.security,
|
|
197
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
198
|
+
request.add_hec_token_request,
|
|
199
|
+
False,
|
|
200
|
+
False,
|
|
201
|
+
"json",
|
|
202
|
+
models.AddHecTokenRequest,
|
|
203
|
+
),
|
|
204
|
+
timeout_ms=timeout_ms,
|
|
205
|
+
)
|
|
206
|
+
|
|
207
|
+
if retries == UNSET:
|
|
208
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
209
|
+
retries = self.sdk_configuration.retry_config
|
|
210
|
+
|
|
211
|
+
retry_config = None
|
|
212
|
+
if isinstance(retries, utils.RetryConfig):
|
|
213
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
214
|
+
|
|
215
|
+
http_res = await self.do_request_async(
|
|
216
|
+
hook_ctx=HookContext(
|
|
217
|
+
config=self.sdk_configuration,
|
|
218
|
+
base_url=base_url or "",
|
|
219
|
+
operation_id="createInputHecTokenById",
|
|
220
|
+
oauth2_scopes=[],
|
|
221
|
+
security_source=get_security_from_env(
|
|
222
|
+
self.sdk_configuration.security, models.Security
|
|
223
|
+
),
|
|
224
|
+
),
|
|
225
|
+
request=req,
|
|
226
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
227
|
+
retry_config=retry_config,
|
|
228
|
+
)
|
|
229
|
+
|
|
230
|
+
response_data: Any = None
|
|
231
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
232
|
+
return unmarshal_json_response(
|
|
233
|
+
models.CreateInputHecTokenByIDResponse, http_res
|
|
234
|
+
)
|
|
235
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
236
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
237
|
+
raise errors.Error(response_data, http_res)
|
|
238
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
239
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
240
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
241
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
242
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
243
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
244
|
+
|
|
245
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
246
|
+
|
|
247
|
+
def update(
|
|
248
|
+
self,
|
|
249
|
+
*,
|
|
250
|
+
id: str,
|
|
251
|
+
token: str,
|
|
252
|
+
description: Optional[str] = None,
|
|
253
|
+
enabled: Optional[bool] = None,
|
|
254
|
+
metadata: Optional[
|
|
255
|
+
Union[
|
|
256
|
+
List[models.UpdateHecTokenRequestMetadatum],
|
|
257
|
+
List[models.UpdateHecTokenRequestMetadatumTypedDict],
|
|
258
|
+
]
|
|
259
|
+
] = None,
|
|
260
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
261
|
+
server_url: Optional[str] = None,
|
|
262
|
+
timeout_ms: Optional[int] = None,
|
|
263
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
264
|
+
) -> models.UpdateInputHecTokenByIDAndTokenResponse:
|
|
265
|
+
r"""Update metadata for an HEC token for a Splunk HEC Source
|
|
266
|
+
|
|
267
|
+
Update token metadata on existing HEC Source
|
|
268
|
+
|
|
269
|
+
:param id: HEC Source id
|
|
270
|
+
:param token: token to update
|
|
271
|
+
:param description:
|
|
272
|
+
:param enabled:
|
|
273
|
+
:param metadata:
|
|
274
|
+
:param retries: Override the default retry configuration for this method
|
|
275
|
+
:param server_url: Override the default server URL for this method
|
|
276
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
277
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
278
|
+
"""
|
|
279
|
+
base_url = None
|
|
280
|
+
url_variables = None
|
|
281
|
+
if timeout_ms is None:
|
|
282
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
283
|
+
|
|
284
|
+
if server_url is not None:
|
|
285
|
+
base_url = server_url
|
|
286
|
+
else:
|
|
287
|
+
base_url = self._get_url(base_url, url_variables)
|
|
288
|
+
|
|
289
|
+
request = models.UpdateInputHecTokenByIDAndTokenRequest(
|
|
290
|
+
id=id,
|
|
291
|
+
token=token,
|
|
292
|
+
update_hec_token_request=models.UpdateHecTokenRequest(
|
|
293
|
+
description=description,
|
|
294
|
+
enabled=enabled,
|
|
295
|
+
metadata=utils.get_pydantic_model(
|
|
296
|
+
metadata, Optional[List[models.UpdateHecTokenRequestMetadatum]]
|
|
297
|
+
),
|
|
298
|
+
),
|
|
299
|
+
)
|
|
300
|
+
|
|
301
|
+
req = self._build_request(
|
|
302
|
+
method="PATCH",
|
|
303
|
+
path="/system/inputs/{id}/hectoken/{token}",
|
|
304
|
+
base_url=base_url,
|
|
305
|
+
url_variables=url_variables,
|
|
306
|
+
request=request,
|
|
307
|
+
request_body_required=True,
|
|
308
|
+
request_has_path_params=True,
|
|
309
|
+
request_has_query_params=True,
|
|
310
|
+
user_agent_header="user-agent",
|
|
311
|
+
accept_header_value="application/json",
|
|
312
|
+
http_headers=http_headers,
|
|
313
|
+
security=self.sdk_configuration.security,
|
|
314
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
315
|
+
request.update_hec_token_request,
|
|
316
|
+
False,
|
|
317
|
+
False,
|
|
318
|
+
"json",
|
|
319
|
+
models.UpdateHecTokenRequest,
|
|
320
|
+
),
|
|
321
|
+
timeout_ms=timeout_ms,
|
|
322
|
+
)
|
|
323
|
+
|
|
324
|
+
if retries == UNSET:
|
|
325
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
326
|
+
retries = self.sdk_configuration.retry_config
|
|
327
|
+
|
|
328
|
+
retry_config = None
|
|
329
|
+
if isinstance(retries, utils.RetryConfig):
|
|
330
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
331
|
+
|
|
332
|
+
http_res = self.do_request(
|
|
333
|
+
hook_ctx=HookContext(
|
|
334
|
+
config=self.sdk_configuration,
|
|
335
|
+
base_url=base_url or "",
|
|
336
|
+
operation_id="updateInputHecTokenByIdAndToken",
|
|
337
|
+
oauth2_scopes=[],
|
|
338
|
+
security_source=get_security_from_env(
|
|
339
|
+
self.sdk_configuration.security, models.Security
|
|
340
|
+
),
|
|
341
|
+
),
|
|
342
|
+
request=req,
|
|
343
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
344
|
+
retry_config=retry_config,
|
|
345
|
+
)
|
|
346
|
+
|
|
347
|
+
response_data: Any = None
|
|
348
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
349
|
+
return unmarshal_json_response(
|
|
350
|
+
models.UpdateInputHecTokenByIDAndTokenResponse, http_res
|
|
351
|
+
)
|
|
352
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
353
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
354
|
+
raise errors.Error(response_data, http_res)
|
|
355
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
356
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
357
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
358
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
359
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
360
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
361
|
+
|
|
362
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
363
|
+
|
|
364
|
+
async def update_async(
|
|
365
|
+
self,
|
|
366
|
+
*,
|
|
367
|
+
id: str,
|
|
368
|
+
token: str,
|
|
369
|
+
description: Optional[str] = None,
|
|
370
|
+
enabled: Optional[bool] = None,
|
|
371
|
+
metadata: Optional[
|
|
372
|
+
Union[
|
|
373
|
+
List[models.UpdateHecTokenRequestMetadatum],
|
|
374
|
+
List[models.UpdateHecTokenRequestMetadatumTypedDict],
|
|
375
|
+
]
|
|
376
|
+
] = None,
|
|
377
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
378
|
+
server_url: Optional[str] = None,
|
|
379
|
+
timeout_ms: Optional[int] = None,
|
|
380
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
381
|
+
) -> models.UpdateInputHecTokenByIDAndTokenResponse:
|
|
382
|
+
r"""Update metadata for an HEC token for a Splunk HEC Source
|
|
383
|
+
|
|
384
|
+
Update token metadata on existing HEC Source
|
|
385
|
+
|
|
386
|
+
:param id: HEC Source id
|
|
387
|
+
:param token: token to update
|
|
388
|
+
:param description:
|
|
389
|
+
:param enabled:
|
|
390
|
+
:param metadata:
|
|
391
|
+
:param retries: Override the default retry configuration for this method
|
|
392
|
+
:param server_url: Override the default server URL for this method
|
|
393
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
394
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
395
|
+
"""
|
|
396
|
+
base_url = None
|
|
397
|
+
url_variables = None
|
|
398
|
+
if timeout_ms is None:
|
|
399
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
400
|
+
|
|
401
|
+
if server_url is not None:
|
|
402
|
+
base_url = server_url
|
|
403
|
+
else:
|
|
404
|
+
base_url = self._get_url(base_url, url_variables)
|
|
405
|
+
|
|
406
|
+
request = models.UpdateInputHecTokenByIDAndTokenRequest(
|
|
407
|
+
id=id,
|
|
408
|
+
token=token,
|
|
409
|
+
update_hec_token_request=models.UpdateHecTokenRequest(
|
|
410
|
+
description=description,
|
|
411
|
+
enabled=enabled,
|
|
412
|
+
metadata=utils.get_pydantic_model(
|
|
413
|
+
metadata, Optional[List[models.UpdateHecTokenRequestMetadatum]]
|
|
414
|
+
),
|
|
415
|
+
),
|
|
416
|
+
)
|
|
417
|
+
|
|
418
|
+
req = self._build_request_async(
|
|
419
|
+
method="PATCH",
|
|
420
|
+
path="/system/inputs/{id}/hectoken/{token}",
|
|
421
|
+
base_url=base_url,
|
|
422
|
+
url_variables=url_variables,
|
|
423
|
+
request=request,
|
|
424
|
+
request_body_required=True,
|
|
425
|
+
request_has_path_params=True,
|
|
426
|
+
request_has_query_params=True,
|
|
427
|
+
user_agent_header="user-agent",
|
|
428
|
+
accept_header_value="application/json",
|
|
429
|
+
http_headers=http_headers,
|
|
430
|
+
security=self.sdk_configuration.security,
|
|
431
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
432
|
+
request.update_hec_token_request,
|
|
433
|
+
False,
|
|
434
|
+
False,
|
|
435
|
+
"json",
|
|
436
|
+
models.UpdateHecTokenRequest,
|
|
437
|
+
),
|
|
438
|
+
timeout_ms=timeout_ms,
|
|
439
|
+
)
|
|
440
|
+
|
|
441
|
+
if retries == UNSET:
|
|
442
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
443
|
+
retries = self.sdk_configuration.retry_config
|
|
444
|
+
|
|
445
|
+
retry_config = None
|
|
446
|
+
if isinstance(retries, utils.RetryConfig):
|
|
447
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
448
|
+
|
|
449
|
+
http_res = await self.do_request_async(
|
|
450
|
+
hook_ctx=HookContext(
|
|
451
|
+
config=self.sdk_configuration,
|
|
452
|
+
base_url=base_url or "",
|
|
453
|
+
operation_id="updateInputHecTokenByIdAndToken",
|
|
454
|
+
oauth2_scopes=[],
|
|
455
|
+
security_source=get_security_from_env(
|
|
456
|
+
self.sdk_configuration.security, models.Security
|
|
457
|
+
),
|
|
458
|
+
),
|
|
459
|
+
request=req,
|
|
460
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
461
|
+
retry_config=retry_config,
|
|
462
|
+
)
|
|
463
|
+
|
|
464
|
+
response_data: Any = None
|
|
465
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
466
|
+
return unmarshal_json_response(
|
|
467
|
+
models.UpdateInputHecTokenByIDAndTokenResponse, http_res
|
|
468
|
+
)
|
|
469
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
470
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
471
|
+
raise errors.Error(response_data, http_res)
|
|
472
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
473
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
474
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
475
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
476
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
477
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
478
|
+
|
|
479
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
@@ -82,10 +82,6 @@ if TYPE_CHECKING:
|
|
|
82
82
|
CreateVersionRevertResponse,
|
|
83
83
|
CreateVersionRevertResponseTypedDict,
|
|
84
84
|
)
|
|
85
|
-
from .createversionsyncop import (
|
|
86
|
-
CreateVersionSyncResponse,
|
|
87
|
-
CreateVersionSyncResponseTypedDict,
|
|
88
|
-
)
|
|
89
85
|
from .createversionundoop import (
|
|
90
86
|
CreateVersionUndoRequest,
|
|
91
87
|
CreateVersionUndoRequestTypedDict,
|
|
@@ -342,12 +338,7 @@ if TYPE_CHECKING:
|
|
|
342
338
|
)
|
|
343
339
|
from .hbcriblinfo import Config, ConfigTypedDict, HBCriblInfo, HBCriblInfoTypedDict
|
|
344
340
|
from .hbleaderinfo import HBLeaderInfo, HBLeaderInfoTypedDict
|
|
345
|
-
from .healthstatus import
|
|
346
|
-
HealthStatus,
|
|
347
|
-
HealthStatusStatus,
|
|
348
|
-
HealthStatusTypedDict,
|
|
349
|
-
Role,
|
|
350
|
-
)
|
|
341
|
+
from .healthstatus import HealthStatus, HealthStatusTypedDict, Role, Status
|
|
351
342
|
from .heartbeatmetadata import (
|
|
352
343
|
HeartbeatMetadata,
|
|
353
344
|
HeartbeatMetadataAws,
|
|
@@ -2944,11 +2935,6 @@ if TYPE_CHECKING:
|
|
|
2944
2935
|
)
|
|
2945
2936
|
from .rbacresource import RbacResource
|
|
2946
2937
|
from .resourcepolicy import ResourcePolicy, ResourcePolicyTypedDict
|
|
2947
|
-
from .restartresponse import (
|
|
2948
|
-
RestartResponse,
|
|
2949
|
-
RestartResponseStatus,
|
|
2950
|
-
RestartResponseTypedDict,
|
|
2951
|
-
)
|
|
2952
2938
|
from .routecloneconf import RouteCloneConf, RouteCloneConfTypedDict
|
|
2953
2939
|
from .routeconf import RouteConf, RouteConfTypedDict
|
|
2954
2940
|
from .routes import (
|
|
@@ -3026,10 +3012,6 @@ if TYPE_CHECKING:
|
|
|
3026
3012
|
UpdateRoutesByIDResponse,
|
|
3027
3013
|
UpdateRoutesByIDResponseTypedDict,
|
|
3028
3014
|
)
|
|
3029
|
-
from .updateworkersrestartop import (
|
|
3030
|
-
UpdateWorkersRestartResponse,
|
|
3031
|
-
UpdateWorkersRestartResponseTypedDict,
|
|
3032
|
-
)
|
|
3033
3015
|
from .useraccesscontrollist import (
|
|
3034
3016
|
UserAccessControlList,
|
|
3035
3017
|
UserAccessControlListTypedDict,
|
|
@@ -3123,8 +3105,6 @@ __all__ = [
|
|
|
3123
3105
|
"CreateVersionRevertRequestTypedDict",
|
|
3124
3106
|
"CreateVersionRevertResponse",
|
|
3125
3107
|
"CreateVersionRevertResponseTypedDict",
|
|
3126
|
-
"CreateVersionSyncResponse",
|
|
3127
|
-
"CreateVersionSyncResponseTypedDict",
|
|
3128
3108
|
"CreateVersionUndoRequest",
|
|
3129
3109
|
"CreateVersionUndoRequestTypedDict",
|
|
3130
3110
|
"CreateVersionUndoResponse",
|
|
@@ -3336,7 +3316,6 @@ __all__ = [
|
|
|
3336
3316
|
"HBLeaderInfo",
|
|
3337
3317
|
"HBLeaderInfoTypedDict",
|
|
3338
3318
|
"HealthStatus",
|
|
3339
|
-
"HealthStatusStatus",
|
|
3340
3319
|
"HealthStatusTypedDict",
|
|
3341
3320
|
"HeartbeatMetadata",
|
|
3342
3321
|
"HeartbeatMetadataAws",
|
|
@@ -5616,9 +5595,6 @@ __all__ = [
|
|
|
5616
5595
|
"ResourcePolicyTypedDict",
|
|
5617
5596
|
"ResourceTypeLabel",
|
|
5618
5597
|
"ResourceTypeLabelTypedDict",
|
|
5619
|
-
"RestartResponse",
|
|
5620
|
-
"RestartResponseStatus",
|
|
5621
|
-
"RestartResponseTypedDict",
|
|
5622
5598
|
"Role",
|
|
5623
5599
|
"RouteCloneConf",
|
|
5624
5600
|
"RouteCloneConfTypedDict",
|
|
@@ -5648,6 +5624,7 @@ __all__ = [
|
|
|
5648
5624
|
"ServicesTypedDict",
|
|
5649
5625
|
"ShardIteratorStart",
|
|
5650
5626
|
"ShardLoadBalancing",
|
|
5627
|
+
"Status",
|
|
5651
5628
|
"Subscription",
|
|
5652
5629
|
"SubscriptionMetadatum",
|
|
5653
5630
|
"SubscriptionMetadatumTypedDict",
|
|
@@ -5702,8 +5679,6 @@ __all__ = [
|
|
|
5702
5679
|
"UpdateRoutesByIDRequestTypedDict",
|
|
5703
5680
|
"UpdateRoutesByIDResponse",
|
|
5704
5681
|
"UpdateRoutesByIDResponseTypedDict",
|
|
5705
|
-
"UpdateWorkersRestartResponse",
|
|
5706
|
-
"UpdateWorkersRestartResponseTypedDict",
|
|
5707
5682
|
"UserAccessControlList",
|
|
5708
5683
|
"UserAccessControlListTypedDict",
|
|
5709
5684
|
"UsersAndGroups",
|
|
@@ -5775,8 +5750,6 @@ _dynamic_imports: dict[str, str] = {
|
|
|
5775
5750
|
"CreateVersionRevertRequestTypedDict": ".createversionrevertop",
|
|
5776
5751
|
"CreateVersionRevertResponse": ".createversionrevertop",
|
|
5777
5752
|
"CreateVersionRevertResponseTypedDict": ".createversionrevertop",
|
|
5778
|
-
"CreateVersionSyncResponse": ".createversionsyncop",
|
|
5779
|
-
"CreateVersionSyncResponseTypedDict": ".createversionsyncop",
|
|
5780
5753
|
"CreateVersionUndoRequest": ".createversionundoop",
|
|
5781
5754
|
"CreateVersionUndoRequestTypedDict": ".createversionundoop",
|
|
5782
5755
|
"CreateVersionUndoResponse": ".createversionundoop",
|
|
@@ -5969,9 +5942,9 @@ _dynamic_imports: dict[str, str] = {
|
|
|
5969
5942
|
"HBLeaderInfo": ".hbleaderinfo",
|
|
5970
5943
|
"HBLeaderInfoTypedDict": ".hbleaderinfo",
|
|
5971
5944
|
"HealthStatus": ".healthstatus",
|
|
5972
|
-
"HealthStatusStatus": ".healthstatus",
|
|
5973
5945
|
"HealthStatusTypedDict": ".healthstatus",
|
|
5974
5946
|
"Role": ".healthstatus",
|
|
5947
|
+
"Status": ".healthstatus",
|
|
5975
5948
|
"HeartbeatMetadata": ".heartbeatmetadata",
|
|
5976
5949
|
"HeartbeatMetadataAws": ".heartbeatmetadata",
|
|
5977
5950
|
"HeartbeatMetadataAwsTypedDict": ".heartbeatmetadata",
|
|
@@ -8324,9 +8297,6 @@ _dynamic_imports: dict[str, str] = {
|
|
|
8324
8297
|
"RbacResource": ".rbacresource",
|
|
8325
8298
|
"ResourcePolicy": ".resourcepolicy",
|
|
8326
8299
|
"ResourcePolicyTypedDict": ".resourcepolicy",
|
|
8327
|
-
"RestartResponse": ".restartresponse",
|
|
8328
|
-
"RestartResponseStatus": ".restartresponse",
|
|
8329
|
-
"RestartResponseTypedDict": ".restartresponse",
|
|
8330
8300
|
"RouteCloneConf": ".routecloneconf",
|
|
8331
8301
|
"RouteCloneConfTypedDict": ".routecloneconf",
|
|
8332
8302
|
"RouteConf": ".routeconf",
|
|
@@ -8385,8 +8355,6 @@ _dynamic_imports: dict[str, str] = {
|
|
|
8385
8355
|
"UpdateRoutesByIDRequestTypedDict": ".updateroutesbyidop",
|
|
8386
8356
|
"UpdateRoutesByIDResponse": ".updateroutesbyidop",
|
|
8387
8357
|
"UpdateRoutesByIDResponseTypedDict": ".updateroutesbyidop",
|
|
8388
|
-
"UpdateWorkersRestartResponse": ".updateworkersrestartop",
|
|
8389
|
-
"UpdateWorkersRestartResponseTypedDict": ".updateworkersrestartop",
|
|
8390
8358
|
"UserAccessControlList": ".useraccesscontrollist",
|
|
8391
8359
|
"UserAccessControlListTypedDict": ".useraccesscontrollist",
|
|
8392
8360
|
}
|
|
@@ -13,20 +13,20 @@ class Role(str, Enum):
|
|
|
13
13
|
STANDBY = "standby"
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
class
|
|
16
|
+
class Status(str, Enum):
|
|
17
17
|
HEALTHY = "healthy"
|
|
18
18
|
SHUTTING_DOWN = "shutting down"
|
|
19
19
|
STANDBY = "standby"
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
class HealthStatusTypedDict(TypedDict):
|
|
23
|
-
status:
|
|
23
|
+
status: Status
|
|
24
24
|
start_time: float
|
|
25
25
|
role: NotRequired[Role]
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
class HealthStatus(BaseModel):
|
|
29
|
-
status:
|
|
29
|
+
status: Status
|
|
30
30
|
|
|
31
31
|
start_time: Annotated[float, pydantic.Field(alias="startTime")]
|
|
32
32
|
|
|
@@ -255,9 +255,9 @@ class InputAppscopeTLSSettingsServerSide(BaseModel):
|
|
|
255
255
|
|
|
256
256
|
|
|
257
257
|
class InputAppscopeTypedDict(TypedDict):
|
|
258
|
-
id: str
|
|
259
|
-
r"""Unique ID for this input"""
|
|
260
258
|
type: InputAppscopeType
|
|
259
|
+
id: NotRequired[str]
|
|
260
|
+
r"""Unique ID for this input"""
|
|
261
261
|
disabled: NotRequired[bool]
|
|
262
262
|
pipeline: NotRequired[str]
|
|
263
263
|
r"""Pipeline to process data from this Source before sending it through the Routes"""
|
|
@@ -313,11 +313,11 @@ class InputAppscopeTypedDict(TypedDict):
|
|
|
313
313
|
|
|
314
314
|
|
|
315
315
|
class InputAppscope(BaseModel):
|
|
316
|
-
id: str
|
|
317
|
-
r"""Unique ID for this input"""
|
|
318
|
-
|
|
319
316
|
type: InputAppscopeType
|
|
320
317
|
|
|
318
|
+
id: Optional[str] = None
|
|
319
|
+
r"""Unique ID for this input"""
|
|
320
|
+
|
|
321
321
|
disabled: Optional[bool] = False
|
|
322
322
|
|
|
323
323
|
pipeline: Optional[str] = None
|
|
@@ -115,7 +115,7 @@ class InputCollectionMetadatum(BaseModel):
|
|
|
115
115
|
|
|
116
116
|
|
|
117
117
|
class InputCollectionTypedDict(TypedDict):
|
|
118
|
-
id: str
|
|
118
|
+
id: NotRequired[str]
|
|
119
119
|
r"""Unique ID for this input"""
|
|
120
120
|
type: NotRequired[InputCollectionType]
|
|
121
121
|
disabled: NotRequired[bool]
|
|
@@ -146,7 +146,7 @@ class InputCollectionTypedDict(TypedDict):
|
|
|
146
146
|
|
|
147
147
|
|
|
148
148
|
class InputCollection(BaseModel):
|
|
149
|
-
id: str
|
|
149
|
+
id: Optional[str] = None
|
|
150
150
|
r"""Unique ID for this input"""
|
|
151
151
|
|
|
152
152
|
type: Optional[InputCollectionType] = InputCollectionType.COLLECTION
|