cribl-control-plane 0.0.26a1__py3-none-any.whl → 0.0.28__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.

Files changed (132) hide show
  1. cribl_control_plane/_hooks/clientcredentials.py +22 -7
  2. cribl_control_plane/_version.py +4 -4
  3. cribl_control_plane/acl.py +203 -0
  4. cribl_control_plane/auth_sdk.py +9 -176
  5. cribl_control_plane/branches.py +335 -0
  6. cribl_control_plane/commits.py +1141 -0
  7. cribl_control_plane/commits_files.py +371 -0
  8. cribl_control_plane/configs_versions.py +189 -0
  9. cribl_control_plane/destinations.py +18 -729
  10. cribl_control_plane/destinations_pq.py +359 -0
  11. cribl_control_plane/errors/__init__.py +3 -2
  12. cribl_control_plane/errors/healthstatus_error.py +1 -1
  13. cribl_control_plane/groups_configs.py +17 -0
  14. cribl_control_plane/groups_sdk.py +18 -551
  15. cribl_control_plane/{healthinfo.py → health.py} +3 -1
  16. cribl_control_plane/hectokens.py +479 -0
  17. cribl_control_plane/models/__init__.py +6 -37
  18. cribl_control_plane/models/healthstatus.py +3 -3
  19. cribl_control_plane/models/inputappscope.py +5 -5
  20. cribl_control_plane/models/inputcollection.py +2 -2
  21. cribl_control_plane/models/inputconfluentcloud.py +3 -3
  22. cribl_control_plane/models/inputcribl.py +5 -5
  23. cribl_control_plane/models/inputcriblhttp.py +3 -3
  24. cribl_control_plane/models/inputcribllakehttp.py +3 -3
  25. cribl_control_plane/models/inputcriblmetrics.py +5 -5
  26. cribl_control_plane/models/inputcribltcp.py +3 -3
  27. cribl_control_plane/models/inputdatadogagent.py +3 -3
  28. cribl_control_plane/models/inputedgeprometheus.py +3 -3
  29. cribl_control_plane/models/inputelastic.py +3 -3
  30. cribl_control_plane/models/inputeventhub.py +3 -3
  31. cribl_control_plane/models/inputfile.py +5 -5
  32. cribl_control_plane/models/inputfirehose.py +3 -3
  33. cribl_control_plane/models/inputgooglepubsub.py +3 -3
  34. cribl_control_plane/models/inputgrafana.py +6 -6
  35. cribl_control_plane/models/inputhttp.py +3 -3
  36. cribl_control_plane/models/inputhttpraw.py +3 -3
  37. cribl_control_plane/models/inputjournalfiles.py +3 -3
  38. cribl_control_plane/models/inputkafka.py +3 -3
  39. cribl_control_plane/models/inputkinesis.py +3 -3
  40. cribl_control_plane/models/inputkubeevents.py +5 -5
  41. cribl_control_plane/models/inputkubelogs.py +5 -5
  42. cribl_control_plane/models/inputkubemetrics.py +5 -5
  43. cribl_control_plane/models/inputloki.py +3 -3
  44. cribl_control_plane/models/inputmodeldriventelemetry.py +3 -3
  45. cribl_control_plane/models/inputmsk.py +3 -3
  46. cribl_control_plane/models/inputnetflow.py +3 -3
  47. cribl_control_plane/models/inputoffice365mgmt.py +3 -3
  48. cribl_control_plane/models/inputoffice365msgtrace.py +3 -3
  49. cribl_control_plane/models/inputoffice365service.py +3 -3
  50. cribl_control_plane/models/inputopentelemetry.py +3 -3
  51. cribl_control_plane/models/inputprometheus.py +3 -3
  52. cribl_control_plane/models/inputprometheusrw.py +3 -3
  53. cribl_control_plane/models/inputrawudp.py +3 -3
  54. cribl_control_plane/models/inputsnmp.py +3 -3
  55. cribl_control_plane/models/inputsplunk.py +3 -3
  56. cribl_control_plane/models/inputsplunkhec.py +3 -3
  57. cribl_control_plane/models/inputsplunksearch.py +3 -3
  58. cribl_control_plane/models/inputsqs.py +3 -3
  59. cribl_control_plane/models/inputsystemmetrics.py +5 -5
  60. cribl_control_plane/models/inputsystemstate.py +5 -5
  61. cribl_control_plane/models/inputtcp.py +3 -3
  62. cribl_control_plane/models/inputtcpjson.py +3 -3
  63. cribl_control_plane/models/inputwef.py +3 -3
  64. cribl_control_plane/models/inputwindowsmetrics.py +5 -5
  65. cribl_control_plane/models/inputwiz.py +3 -3
  66. cribl_control_plane/models/inputzscalerhec.py +3 -3
  67. cribl_control_plane/models/outputazureblob.py +3 -3
  68. cribl_control_plane/models/outputazuredataexplorer.py +3 -3
  69. cribl_control_plane/models/outputazureeventhub.py +3 -3
  70. cribl_control_plane/models/outputclickhouse.py +3 -3
  71. cribl_control_plane/models/outputcloudwatch.py +3 -3
  72. cribl_control_plane/models/outputconfluentcloud.py +3 -3
  73. cribl_control_plane/models/outputcriblhttp.py +5 -5
  74. cribl_control_plane/models/outputcribllake.py +5 -5
  75. cribl_control_plane/models/outputcribltcp.py +5 -5
  76. cribl_control_plane/models/outputcrowdstrikenextgensiem.py +3 -3
  77. cribl_control_plane/models/outputdatadog.py +5 -5
  78. cribl_control_plane/models/outputdataset.py +5 -5
  79. cribl_control_plane/models/outputdevnull.py +5 -5
  80. cribl_control_plane/models/outputdiskspool.py +5 -5
  81. cribl_control_plane/models/outputdls3.py +3 -3
  82. cribl_control_plane/models/outputdynatracehttp.py +3 -3
  83. cribl_control_plane/models/outputdynatraceotlp.py +3 -3
  84. cribl_control_plane/models/outputelasticcloud.py +3 -3
  85. cribl_control_plane/models/outputexabeam.py +3 -3
  86. cribl_control_plane/models/outputgooglecloudlogging.py +3 -3
  87. cribl_control_plane/models/outputgooglecloudstorage.py +3 -3
  88. cribl_control_plane/models/outputgrafanacloud.py +10 -10
  89. cribl_control_plane/models/outputgraphite.py +3 -3
  90. cribl_control_plane/models/outputhumiohec.py +3 -3
  91. cribl_control_plane/models/outputkafka.py +3 -3
  92. cribl_control_plane/models/outputkinesis.py +3 -3
  93. cribl_control_plane/models/outputminio.py +3 -3
  94. cribl_control_plane/models/outputmsk.py +3 -3
  95. cribl_control_plane/models/outputnewrelic.py +5 -5
  96. cribl_control_plane/models/outputnewrelicevents.py +3 -3
  97. cribl_control_plane/models/outputring.py +5 -5
  98. cribl_control_plane/models/outputs3.py +3 -3
  99. cribl_control_plane/models/outputsecuritylake.py +3 -3
  100. cribl_control_plane/models/outputsentinel.py +3 -3
  101. cribl_control_plane/models/outputsentineloneaisiem.py +3 -3
  102. cribl_control_plane/models/outputservicenow.py +3 -3
  103. cribl_control_plane/models/outputsns.py +3 -3
  104. cribl_control_plane/models/outputsplunk.py +3 -3
  105. cribl_control_plane/models/outputsplunkhec.py +5 -5
  106. cribl_control_plane/models/outputsqs.py +3 -3
  107. cribl_control_plane/models/outputstatsd.py +3 -3
  108. cribl_control_plane/models/outputstatsdext.py +3 -3
  109. cribl_control_plane/models/outputsyslog.py +5 -5
  110. cribl_control_plane/models/outputtcpjson.py +5 -5
  111. cribl_control_plane/models/outputwebhook.py +5 -5
  112. cribl_control_plane/models/outputxsiam.py +5 -5
  113. cribl_control_plane/models/schemeclientoauth.py +5 -0
  114. cribl_control_plane/nodes.py +90 -68
  115. cribl_control_plane/samples.py +391 -0
  116. cribl_control_plane/sdk.py +11 -17
  117. cribl_control_plane/sources.py +15 -469
  118. cribl_control_plane/{workers_sdk.py → statuses.py} +23 -25
  119. cribl_control_plane/{deployments.py → summaries.py} +3 -3
  120. cribl_control_plane/teams.py +201 -0
  121. cribl_control_plane/tokens.py +182 -0
  122. cribl_control_plane/utils/__init__.py +3 -2
  123. cribl_control_plane/utils/security.py +5 -0
  124. cribl_control_plane/versions.py +26 -0
  125. cribl_control_plane/versions_configs.py +171 -0
  126. {cribl_control_plane-0.0.26a1.dist-info → cribl_control_plane-0.0.28.dist-info}/METADATA +77 -38
  127. {cribl_control_plane-0.0.26a1.dist-info → cribl_control_plane-0.0.28.dist-info}/RECORD +128 -119
  128. cribl_control_plane/models/createversionsyncop.py +0 -23
  129. cribl_control_plane/models/restartresponse.py +0 -26
  130. cribl_control_plane/models/updateworkersrestartop.py +0 -24
  131. cribl_control_plane/versioning.py +0 -2309
  132. {cribl_control_plane-0.0.26a1.dist-info → cribl_control_plane-0.0.28.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)
@@ -2,6 +2,7 @@
2
2
 
3
3
  from typing import TYPE_CHECKING
4
4
  from importlib import import_module
5
+ import builtins
5
6
 
6
7
  if TYPE_CHECKING:
7
8
  from .addhectokenrequest import (
@@ -82,10 +83,6 @@ if TYPE_CHECKING:
82
83
  CreateVersionRevertResponse,
83
84
  CreateVersionRevertResponseTypedDict,
84
85
  )
85
- from .createversionsyncop import (
86
- CreateVersionSyncResponse,
87
- CreateVersionSyncResponseTypedDict,
88
- )
89
86
  from .createversionundoop import (
90
87
  CreateVersionUndoRequest,
91
88
  CreateVersionUndoRequestTypedDict,
@@ -342,12 +339,7 @@ if TYPE_CHECKING:
342
339
  )
343
340
  from .hbcriblinfo import Config, ConfigTypedDict, HBCriblInfo, HBCriblInfoTypedDict
344
341
  from .hbleaderinfo import HBLeaderInfo, HBLeaderInfoTypedDict
345
- from .healthstatus import (
346
- HealthStatus,
347
- HealthStatusStatus,
348
- HealthStatusTypedDict,
349
- Role,
350
- )
342
+ from .healthstatus import HealthStatus, HealthStatusTypedDict, Role, Status
351
343
  from .heartbeatmetadata import (
352
344
  HeartbeatMetadata,
353
345
  HeartbeatMetadataAws,
@@ -2944,11 +2936,6 @@ if TYPE_CHECKING:
2944
2936
  )
2945
2937
  from .rbacresource import RbacResource
2946
2938
  from .resourcepolicy import ResourcePolicy, ResourcePolicyTypedDict
2947
- from .restartresponse import (
2948
- RestartResponse,
2949
- RestartResponseStatus,
2950
- RestartResponseTypedDict,
2951
- )
2952
2939
  from .routecloneconf import RouteCloneConf, RouteCloneConfTypedDict
2953
2940
  from .routeconf import RouteConf, RouteConfTypedDict
2954
2941
  from .routes import (
@@ -3026,10 +3013,6 @@ if TYPE_CHECKING:
3026
3013
  UpdateRoutesByIDResponse,
3027
3014
  UpdateRoutesByIDResponseTypedDict,
3028
3015
  )
3029
- from .updateworkersrestartop import (
3030
- UpdateWorkersRestartResponse,
3031
- UpdateWorkersRestartResponseTypedDict,
3032
- )
3033
3016
  from .useraccesscontrollist import (
3034
3017
  UserAccessControlList,
3035
3018
  UserAccessControlListTypedDict,
@@ -3123,8 +3106,6 @@ __all__ = [
3123
3106
  "CreateVersionRevertRequestTypedDict",
3124
3107
  "CreateVersionRevertResponse",
3125
3108
  "CreateVersionRevertResponseTypedDict",
3126
- "CreateVersionSyncResponse",
3127
- "CreateVersionSyncResponseTypedDict",
3128
3109
  "CreateVersionUndoRequest",
3129
3110
  "CreateVersionUndoRequestTypedDict",
3130
3111
  "CreateVersionUndoResponse",
@@ -3336,7 +3317,6 @@ __all__ = [
3336
3317
  "HBLeaderInfo",
3337
3318
  "HBLeaderInfoTypedDict",
3338
3319
  "HealthStatus",
3339
- "HealthStatusStatus",
3340
3320
  "HealthStatusTypedDict",
3341
3321
  "HeartbeatMetadata",
3342
3322
  "HeartbeatMetadataAws",
@@ -5616,9 +5596,6 @@ __all__ = [
5616
5596
  "ResourcePolicyTypedDict",
5617
5597
  "ResourceTypeLabel",
5618
5598
  "ResourceTypeLabelTypedDict",
5619
- "RestartResponse",
5620
- "RestartResponseStatus",
5621
- "RestartResponseTypedDict",
5622
5599
  "Role",
5623
5600
  "RouteCloneConf",
5624
5601
  "RouteCloneConfTypedDict",
@@ -5648,6 +5625,7 @@ __all__ = [
5648
5625
  "ServicesTypedDict",
5649
5626
  "ShardIteratorStart",
5650
5627
  "ShardLoadBalancing",
5628
+ "Status",
5651
5629
  "Subscription",
5652
5630
  "SubscriptionMetadatum",
5653
5631
  "SubscriptionMetadatumTypedDict",
@@ -5702,8 +5680,6 @@ __all__ = [
5702
5680
  "UpdateRoutesByIDRequestTypedDict",
5703
5681
  "UpdateRoutesByIDResponse",
5704
5682
  "UpdateRoutesByIDResponseTypedDict",
5705
- "UpdateWorkersRestartResponse",
5706
- "UpdateWorkersRestartResponseTypedDict",
5707
5683
  "UserAccessControlList",
5708
5684
  "UserAccessControlListTypedDict",
5709
5685
  "UsersAndGroups",
@@ -5775,8 +5751,6 @@ _dynamic_imports: dict[str, str] = {
5775
5751
  "CreateVersionRevertRequestTypedDict": ".createversionrevertop",
5776
5752
  "CreateVersionRevertResponse": ".createversionrevertop",
5777
5753
  "CreateVersionRevertResponseTypedDict": ".createversionrevertop",
5778
- "CreateVersionSyncResponse": ".createversionsyncop",
5779
- "CreateVersionSyncResponseTypedDict": ".createversionsyncop",
5780
5754
  "CreateVersionUndoRequest": ".createversionundoop",
5781
5755
  "CreateVersionUndoRequestTypedDict": ".createversionundoop",
5782
5756
  "CreateVersionUndoResponse": ".createversionundoop",
@@ -5969,9 +5943,9 @@ _dynamic_imports: dict[str, str] = {
5969
5943
  "HBLeaderInfo": ".hbleaderinfo",
5970
5944
  "HBLeaderInfoTypedDict": ".hbleaderinfo",
5971
5945
  "HealthStatus": ".healthstatus",
5972
- "HealthStatusStatus": ".healthstatus",
5973
5946
  "HealthStatusTypedDict": ".healthstatus",
5974
5947
  "Role": ".healthstatus",
5948
+ "Status": ".healthstatus",
5975
5949
  "HeartbeatMetadata": ".heartbeatmetadata",
5976
5950
  "HeartbeatMetadataAws": ".heartbeatmetadata",
5977
5951
  "HeartbeatMetadataAwsTypedDict": ".heartbeatmetadata",
@@ -8324,9 +8298,6 @@ _dynamic_imports: dict[str, str] = {
8324
8298
  "RbacResource": ".rbacresource",
8325
8299
  "ResourcePolicy": ".resourcepolicy",
8326
8300
  "ResourcePolicyTypedDict": ".resourcepolicy",
8327
- "RestartResponse": ".restartresponse",
8328
- "RestartResponseStatus": ".restartresponse",
8329
- "RestartResponseTypedDict": ".restartresponse",
8330
8301
  "RouteCloneConf": ".routecloneconf",
8331
8302
  "RouteCloneConfTypedDict": ".routecloneconf",
8332
8303
  "RouteConf": ".routeconf",
@@ -8385,8 +8356,6 @@ _dynamic_imports: dict[str, str] = {
8385
8356
  "UpdateRoutesByIDRequestTypedDict": ".updateroutesbyidop",
8386
8357
  "UpdateRoutesByIDResponse": ".updateroutesbyidop",
8387
8358
  "UpdateRoutesByIDResponseTypedDict": ".updateroutesbyidop",
8388
- "UpdateWorkersRestartResponse": ".updateworkersrestartop",
8389
- "UpdateWorkersRestartResponseTypedDict": ".updateworkersrestartop",
8390
8359
  "UserAccessControlList": ".useraccesscontrollist",
8391
8360
  "UserAccessControlListTypedDict": ".useraccesscontrollist",
8392
8361
  }
@@ -8414,5 +8383,5 @@ def __getattr__(attr_name: str) -> object:
8414
8383
 
8415
8384
 
8416
8385
  def __dir__():
8417
- lazy_attrs = list(_dynamic_imports.keys())
8418
- return sorted(lazy_attrs)
8386
+ lazy_attrs = builtins.list(_dynamic_imports.keys())
8387
+ return builtins.sorted(lazy_attrs)
@@ -13,20 +13,20 @@ class Role(str, Enum):
13
13
  STANDBY = "standby"
14
14
 
15
15
 
16
- class HealthStatusStatus(str, Enum):
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: HealthStatusStatus
23
+ status: Status
24
24
  start_time: float
25
25
  role: NotRequired[Role]
26
26
 
27
27
 
28
28
  class HealthStatus(BaseModel):
29
- status: HealthStatusStatus
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