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.

Files changed (127) hide show
  1. cribl_control_plane/_version.py +3 -3
  2. cribl_control_plane/acl.py +203 -0
  3. cribl_control_plane/auth_sdk.py +9 -176
  4. cribl_control_plane/branches.py +335 -0
  5. cribl_control_plane/commits.py +1141 -0
  6. cribl_control_plane/commits_files.py +371 -0
  7. cribl_control_plane/configs_versions.py +189 -0
  8. cribl_control_plane/destinations.py +18 -729
  9. cribl_control_plane/destinations_pq.py +359 -0
  10. cribl_control_plane/errors/healthstatus_error.py +1 -1
  11. cribl_control_plane/groups_configs.py +17 -0
  12. cribl_control_plane/groups_sdk.py +18 -551
  13. cribl_control_plane/{healthinfo.py → health.py} +3 -1
  14. cribl_control_plane/hectokens.py +479 -0
  15. cribl_control_plane/models/__init__.py +3 -35
  16. cribl_control_plane/models/healthstatus.py +3 -3
  17. cribl_control_plane/models/inputappscope.py +5 -5
  18. cribl_control_plane/models/inputcollection.py +2 -2
  19. cribl_control_plane/models/inputconfluentcloud.py +3 -3
  20. cribl_control_plane/models/inputcribl.py +5 -5
  21. cribl_control_plane/models/inputcriblhttp.py +3 -3
  22. cribl_control_plane/models/inputcribllakehttp.py +3 -3
  23. cribl_control_plane/models/inputcriblmetrics.py +5 -5
  24. cribl_control_plane/models/inputcribltcp.py +3 -3
  25. cribl_control_plane/models/inputdatadogagent.py +3 -3
  26. cribl_control_plane/models/inputedgeprometheus.py +3 -3
  27. cribl_control_plane/models/inputelastic.py +3 -3
  28. cribl_control_plane/models/inputeventhub.py +3 -3
  29. cribl_control_plane/models/inputfile.py +5 -5
  30. cribl_control_plane/models/inputfirehose.py +3 -3
  31. cribl_control_plane/models/inputgooglepubsub.py +3 -3
  32. cribl_control_plane/models/inputgrafana.py +6 -6
  33. cribl_control_plane/models/inputhttp.py +3 -3
  34. cribl_control_plane/models/inputhttpraw.py +3 -3
  35. cribl_control_plane/models/inputjournalfiles.py +3 -3
  36. cribl_control_plane/models/inputkafka.py +3 -3
  37. cribl_control_plane/models/inputkinesis.py +3 -3
  38. cribl_control_plane/models/inputkubeevents.py +5 -5
  39. cribl_control_plane/models/inputkubelogs.py +5 -5
  40. cribl_control_plane/models/inputkubemetrics.py +5 -5
  41. cribl_control_plane/models/inputloki.py +3 -3
  42. cribl_control_plane/models/inputmodeldriventelemetry.py +3 -3
  43. cribl_control_plane/models/inputmsk.py +3 -3
  44. cribl_control_plane/models/inputnetflow.py +3 -3
  45. cribl_control_plane/models/inputoffice365mgmt.py +3 -3
  46. cribl_control_plane/models/inputoffice365msgtrace.py +3 -3
  47. cribl_control_plane/models/inputoffice365service.py +3 -3
  48. cribl_control_plane/models/inputopentelemetry.py +3 -3
  49. cribl_control_plane/models/inputprometheus.py +3 -3
  50. cribl_control_plane/models/inputprometheusrw.py +3 -3
  51. cribl_control_plane/models/inputrawudp.py +3 -3
  52. cribl_control_plane/models/inputsnmp.py +3 -3
  53. cribl_control_plane/models/inputsplunk.py +3 -3
  54. cribl_control_plane/models/inputsplunkhec.py +3 -3
  55. cribl_control_plane/models/inputsplunksearch.py +3 -3
  56. cribl_control_plane/models/inputsqs.py +3 -3
  57. cribl_control_plane/models/inputsystemmetrics.py +5 -5
  58. cribl_control_plane/models/inputsystemstate.py +5 -5
  59. cribl_control_plane/models/inputtcp.py +3 -3
  60. cribl_control_plane/models/inputtcpjson.py +3 -3
  61. cribl_control_plane/models/inputwef.py +3 -3
  62. cribl_control_plane/models/inputwindowsmetrics.py +5 -5
  63. cribl_control_plane/models/inputwiz.py +3 -3
  64. cribl_control_plane/models/inputzscalerhec.py +3 -3
  65. cribl_control_plane/models/outputazureblob.py +3 -3
  66. cribl_control_plane/models/outputazuredataexplorer.py +3 -3
  67. cribl_control_plane/models/outputazureeventhub.py +3 -3
  68. cribl_control_plane/models/outputclickhouse.py +3 -3
  69. cribl_control_plane/models/outputcloudwatch.py +3 -3
  70. cribl_control_plane/models/outputconfluentcloud.py +3 -3
  71. cribl_control_plane/models/outputcriblhttp.py +5 -5
  72. cribl_control_plane/models/outputcribllake.py +5 -5
  73. cribl_control_plane/models/outputcribltcp.py +5 -5
  74. cribl_control_plane/models/outputcrowdstrikenextgensiem.py +3 -3
  75. cribl_control_plane/models/outputdatadog.py +5 -5
  76. cribl_control_plane/models/outputdataset.py +5 -5
  77. cribl_control_plane/models/outputdevnull.py +5 -5
  78. cribl_control_plane/models/outputdiskspool.py +5 -5
  79. cribl_control_plane/models/outputdls3.py +3 -3
  80. cribl_control_plane/models/outputdynatracehttp.py +3 -3
  81. cribl_control_plane/models/outputdynatraceotlp.py +3 -3
  82. cribl_control_plane/models/outputelasticcloud.py +3 -3
  83. cribl_control_plane/models/outputexabeam.py +3 -3
  84. cribl_control_plane/models/outputgooglecloudlogging.py +3 -3
  85. cribl_control_plane/models/outputgooglecloudstorage.py +3 -3
  86. cribl_control_plane/models/outputgrafanacloud.py +10 -10
  87. cribl_control_plane/models/outputgraphite.py +3 -3
  88. cribl_control_plane/models/outputhumiohec.py +3 -3
  89. cribl_control_plane/models/outputkafka.py +3 -3
  90. cribl_control_plane/models/outputkinesis.py +3 -3
  91. cribl_control_plane/models/outputminio.py +3 -3
  92. cribl_control_plane/models/outputmsk.py +3 -3
  93. cribl_control_plane/models/outputnewrelic.py +5 -5
  94. cribl_control_plane/models/outputnewrelicevents.py +3 -3
  95. cribl_control_plane/models/outputring.py +5 -5
  96. cribl_control_plane/models/outputs3.py +3 -3
  97. cribl_control_plane/models/outputsecuritylake.py +3 -3
  98. cribl_control_plane/models/outputsentinel.py +3 -3
  99. cribl_control_plane/models/outputsentineloneaisiem.py +3 -3
  100. cribl_control_plane/models/outputservicenow.py +3 -3
  101. cribl_control_plane/models/outputsns.py +3 -3
  102. cribl_control_plane/models/outputsplunk.py +3 -3
  103. cribl_control_plane/models/outputsplunkhec.py +5 -5
  104. cribl_control_plane/models/outputsqs.py +3 -3
  105. cribl_control_plane/models/outputstatsd.py +3 -3
  106. cribl_control_plane/models/outputstatsdext.py +3 -3
  107. cribl_control_plane/models/outputsyslog.py +5 -5
  108. cribl_control_plane/models/outputtcpjson.py +5 -5
  109. cribl_control_plane/models/outputwebhook.py +5 -5
  110. cribl_control_plane/models/outputxsiam.py +5 -5
  111. cribl_control_plane/nodes.py +90 -68
  112. cribl_control_plane/samples.py +391 -0
  113. cribl_control_plane/sdk.py +11 -17
  114. cribl_control_plane/sources.py +15 -469
  115. cribl_control_plane/{workers_sdk.py → statuses.py} +23 -25
  116. cribl_control_plane/{deployments.py → summaries.py} +3 -3
  117. cribl_control_plane/teams.py +201 -0
  118. cribl_control_plane/tokens.py +182 -0
  119. cribl_control_plane/versions.py +26 -0
  120. cribl_control_plane/versions_configs.py +171 -0
  121. {cribl_control_plane-0.0.26a1.dist-info → cribl_control_plane-0.0.27.dist-info}/METADATA +67 -36
  122. {cribl_control_plane-0.0.26a1.dist-info → cribl_control_plane-0.0.27.dist-info}/RECORD +123 -114
  123. cribl_control_plane/models/createversionsyncop.py +0 -23
  124. cribl_control_plane/models/restartresponse.py +0 -26
  125. cribl_control_plane/models/updateworkersrestartop.py +0 -24
  126. cribl_control_plane/versioning.py +0 -2309
  127. {cribl_control_plane-0.0.26a1.dist-info → cribl_control_plane-0.0.27.dist-info}/WHEEL +0 -0
@@ -0,0 +1,371 @@
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, Mapping, Optional
10
+
11
+
12
+ class CommitsFiles(BaseSDK):
13
+ def count(
14
+ self,
15
+ *,
16
+ group: Optional[str] = None,
17
+ id: Optional[str] = None,
18
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
19
+ server_url: Optional[str] = None,
20
+ timeout_ms: Optional[int] = None,
21
+ http_headers: Optional[Mapping[str, str]] = None,
22
+ ) -> models.GetVersionCountResponse:
23
+ r"""Retrieve a count of files that changed since a commit
24
+
25
+ get the count of files of changed
26
+
27
+ :param group: Group ID
28
+ :param id: Commit ID
29
+ :param retries: Override the default retry configuration for this method
30
+ :param server_url: Override the default server URL for this method
31
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
32
+ :param http_headers: Additional headers to set or replace on requests.
33
+ """
34
+ base_url = None
35
+ url_variables = None
36
+ if timeout_ms is None:
37
+ timeout_ms = self.sdk_configuration.timeout_ms
38
+
39
+ if server_url is not None:
40
+ base_url = server_url
41
+ else:
42
+ base_url = self._get_url(base_url, url_variables)
43
+
44
+ request = models.GetVersionCountRequest(
45
+ group=group,
46
+ id=id,
47
+ )
48
+
49
+ req = self._build_request(
50
+ method="GET",
51
+ path="/version/count",
52
+ base_url=base_url,
53
+ url_variables=url_variables,
54
+ request=request,
55
+ request_body_required=False,
56
+ request_has_path_params=False,
57
+ request_has_query_params=True,
58
+ user_agent_header="user-agent",
59
+ accept_header_value="application/json",
60
+ http_headers=http_headers,
61
+ security=self.sdk_configuration.security,
62
+ timeout_ms=timeout_ms,
63
+ )
64
+
65
+ if retries == UNSET:
66
+ if self.sdk_configuration.retry_config is not UNSET:
67
+ retries = self.sdk_configuration.retry_config
68
+
69
+ retry_config = None
70
+ if isinstance(retries, utils.RetryConfig):
71
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
72
+
73
+ http_res = self.do_request(
74
+ hook_ctx=HookContext(
75
+ config=self.sdk_configuration,
76
+ base_url=base_url or "",
77
+ operation_id="getVersionCount",
78
+ oauth2_scopes=[],
79
+ security_source=get_security_from_env(
80
+ self.sdk_configuration.security, models.Security
81
+ ),
82
+ ),
83
+ request=req,
84
+ error_status_codes=["401", "4XX", "500", "5XX"],
85
+ retry_config=retry_config,
86
+ )
87
+
88
+ response_data: Any = None
89
+ if utils.match_response(http_res, "200", "application/json"):
90
+ return unmarshal_json_response(models.GetVersionCountResponse, http_res)
91
+ if utils.match_response(http_res, "500", "application/json"):
92
+ response_data = unmarshal_json_response(errors.ErrorData, http_res)
93
+ raise errors.Error(response_data, http_res)
94
+ if utils.match_response(http_res, ["401", "4XX"], "*"):
95
+ http_res_text = utils.stream_to_text(http_res)
96
+ raise errors.APIError("API error occurred", http_res, http_res_text)
97
+ if utils.match_response(http_res, "5XX", "*"):
98
+ http_res_text = utils.stream_to_text(http_res)
99
+ raise errors.APIError("API error occurred", http_res, http_res_text)
100
+
101
+ raise errors.APIError("Unexpected response received", http_res)
102
+
103
+ async def count_async(
104
+ self,
105
+ *,
106
+ group: Optional[str] = None,
107
+ id: Optional[str] = None,
108
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
109
+ server_url: Optional[str] = None,
110
+ timeout_ms: Optional[int] = None,
111
+ http_headers: Optional[Mapping[str, str]] = None,
112
+ ) -> models.GetVersionCountResponse:
113
+ r"""Retrieve a count of files that changed since a commit
114
+
115
+ get the count of files of changed
116
+
117
+ :param group: Group ID
118
+ :param id: Commit ID
119
+ :param retries: Override the default retry configuration for this method
120
+ :param server_url: Override the default server URL for this method
121
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
122
+ :param http_headers: Additional headers to set or replace on requests.
123
+ """
124
+ base_url = None
125
+ url_variables = None
126
+ if timeout_ms is None:
127
+ timeout_ms = self.sdk_configuration.timeout_ms
128
+
129
+ if server_url is not None:
130
+ base_url = server_url
131
+ else:
132
+ base_url = self._get_url(base_url, url_variables)
133
+
134
+ request = models.GetVersionCountRequest(
135
+ group=group,
136
+ id=id,
137
+ )
138
+
139
+ req = self._build_request_async(
140
+ method="GET",
141
+ path="/version/count",
142
+ base_url=base_url,
143
+ url_variables=url_variables,
144
+ request=request,
145
+ request_body_required=False,
146
+ request_has_path_params=False,
147
+ request_has_query_params=True,
148
+ user_agent_header="user-agent",
149
+ accept_header_value="application/json",
150
+ http_headers=http_headers,
151
+ security=self.sdk_configuration.security,
152
+ timeout_ms=timeout_ms,
153
+ )
154
+
155
+ if retries == UNSET:
156
+ if self.sdk_configuration.retry_config is not UNSET:
157
+ retries = self.sdk_configuration.retry_config
158
+
159
+ retry_config = None
160
+ if isinstance(retries, utils.RetryConfig):
161
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
162
+
163
+ http_res = await self.do_request_async(
164
+ hook_ctx=HookContext(
165
+ config=self.sdk_configuration,
166
+ base_url=base_url or "",
167
+ operation_id="getVersionCount",
168
+ oauth2_scopes=[],
169
+ security_source=get_security_from_env(
170
+ self.sdk_configuration.security, models.Security
171
+ ),
172
+ ),
173
+ request=req,
174
+ error_status_codes=["401", "4XX", "500", "5XX"],
175
+ retry_config=retry_config,
176
+ )
177
+
178
+ response_data: Any = None
179
+ if utils.match_response(http_res, "200", "application/json"):
180
+ return unmarshal_json_response(models.GetVersionCountResponse, http_res)
181
+ if utils.match_response(http_res, "500", "application/json"):
182
+ response_data = unmarshal_json_response(errors.ErrorData, http_res)
183
+ raise errors.Error(response_data, http_res)
184
+ if utils.match_response(http_res, ["401", "4XX"], "*"):
185
+ http_res_text = await utils.stream_to_text_async(http_res)
186
+ raise errors.APIError("API error occurred", http_res, http_res_text)
187
+ if utils.match_response(http_res, "5XX", "*"):
188
+ http_res_text = await utils.stream_to_text_async(http_res)
189
+ raise errors.APIError("API error occurred", http_res, http_res_text)
190
+
191
+ raise errors.APIError("Unexpected response received", http_res)
192
+
193
+ def list(
194
+ self,
195
+ *,
196
+ group: Optional[str] = None,
197
+ id: Optional[str] = None,
198
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
199
+ server_url: Optional[str] = None,
200
+ timeout_ms: Optional[int] = None,
201
+ http_headers: Optional[Mapping[str, str]] = None,
202
+ ) -> models.GetVersionFilesResponse:
203
+ r"""Retrieve the names and statuses of files that changed since a commit
204
+
205
+ get the files changed
206
+
207
+ :param group: Group ID
208
+ :param id: Commit ID
209
+ :param retries: Override the default retry configuration for this method
210
+ :param server_url: Override the default server URL for this method
211
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
212
+ :param http_headers: Additional headers to set or replace on requests.
213
+ """
214
+ base_url = None
215
+ url_variables = None
216
+ if timeout_ms is None:
217
+ timeout_ms = self.sdk_configuration.timeout_ms
218
+
219
+ if server_url is not None:
220
+ base_url = server_url
221
+ else:
222
+ base_url = self._get_url(base_url, url_variables)
223
+
224
+ request = models.GetVersionFilesRequest(
225
+ group=group,
226
+ id=id,
227
+ )
228
+
229
+ req = self._build_request(
230
+ method="GET",
231
+ path="/version/files",
232
+ base_url=base_url,
233
+ url_variables=url_variables,
234
+ request=request,
235
+ request_body_required=False,
236
+ request_has_path_params=False,
237
+ request_has_query_params=True,
238
+ user_agent_header="user-agent",
239
+ accept_header_value="application/json",
240
+ http_headers=http_headers,
241
+ security=self.sdk_configuration.security,
242
+ timeout_ms=timeout_ms,
243
+ )
244
+
245
+ if retries == UNSET:
246
+ if self.sdk_configuration.retry_config is not UNSET:
247
+ retries = self.sdk_configuration.retry_config
248
+
249
+ retry_config = None
250
+ if isinstance(retries, utils.RetryConfig):
251
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
252
+
253
+ http_res = self.do_request(
254
+ hook_ctx=HookContext(
255
+ config=self.sdk_configuration,
256
+ base_url=base_url or "",
257
+ operation_id="getVersionFiles",
258
+ oauth2_scopes=[],
259
+ security_source=get_security_from_env(
260
+ self.sdk_configuration.security, models.Security
261
+ ),
262
+ ),
263
+ request=req,
264
+ error_status_codes=["401", "4XX", "500", "5XX"],
265
+ retry_config=retry_config,
266
+ )
267
+
268
+ response_data: Any = None
269
+ if utils.match_response(http_res, "200", "application/json"):
270
+ return unmarshal_json_response(models.GetVersionFilesResponse, http_res)
271
+ if utils.match_response(http_res, "500", "application/json"):
272
+ response_data = unmarshal_json_response(errors.ErrorData, http_res)
273
+ raise errors.Error(response_data, http_res)
274
+ if utils.match_response(http_res, ["401", "4XX"], "*"):
275
+ http_res_text = utils.stream_to_text(http_res)
276
+ raise errors.APIError("API error occurred", http_res, http_res_text)
277
+ if utils.match_response(http_res, "5XX", "*"):
278
+ http_res_text = utils.stream_to_text(http_res)
279
+ raise errors.APIError("API error occurred", http_res, http_res_text)
280
+
281
+ raise errors.APIError("Unexpected response received", http_res)
282
+
283
+ async def list_async(
284
+ self,
285
+ *,
286
+ group: Optional[str] = None,
287
+ id: Optional[str] = None,
288
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
289
+ server_url: Optional[str] = None,
290
+ timeout_ms: Optional[int] = None,
291
+ http_headers: Optional[Mapping[str, str]] = None,
292
+ ) -> models.GetVersionFilesResponse:
293
+ r"""Retrieve the names and statuses of files that changed since a commit
294
+
295
+ get the files changed
296
+
297
+ :param group: Group ID
298
+ :param id: Commit ID
299
+ :param retries: Override the default retry configuration for this method
300
+ :param server_url: Override the default server URL for this method
301
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
302
+ :param http_headers: Additional headers to set or replace on requests.
303
+ """
304
+ base_url = None
305
+ url_variables = None
306
+ if timeout_ms is None:
307
+ timeout_ms = self.sdk_configuration.timeout_ms
308
+
309
+ if server_url is not None:
310
+ base_url = server_url
311
+ else:
312
+ base_url = self._get_url(base_url, url_variables)
313
+
314
+ request = models.GetVersionFilesRequest(
315
+ group=group,
316
+ id=id,
317
+ )
318
+
319
+ req = self._build_request_async(
320
+ method="GET",
321
+ path="/version/files",
322
+ base_url=base_url,
323
+ url_variables=url_variables,
324
+ request=request,
325
+ request_body_required=False,
326
+ request_has_path_params=False,
327
+ request_has_query_params=True,
328
+ user_agent_header="user-agent",
329
+ accept_header_value="application/json",
330
+ http_headers=http_headers,
331
+ security=self.sdk_configuration.security,
332
+ timeout_ms=timeout_ms,
333
+ )
334
+
335
+ if retries == UNSET:
336
+ if self.sdk_configuration.retry_config is not UNSET:
337
+ retries = self.sdk_configuration.retry_config
338
+
339
+ retry_config = None
340
+ if isinstance(retries, utils.RetryConfig):
341
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
342
+
343
+ http_res = await self.do_request_async(
344
+ hook_ctx=HookContext(
345
+ config=self.sdk_configuration,
346
+ base_url=base_url or "",
347
+ operation_id="getVersionFiles",
348
+ oauth2_scopes=[],
349
+ security_source=get_security_from_env(
350
+ self.sdk_configuration.security, models.Security
351
+ ),
352
+ ),
353
+ request=req,
354
+ error_status_codes=["401", "4XX", "500", "5XX"],
355
+ retry_config=retry_config,
356
+ )
357
+
358
+ response_data: Any = None
359
+ if utils.match_response(http_res, "200", "application/json"):
360
+ return unmarshal_json_response(models.GetVersionFilesResponse, http_res)
361
+ if utils.match_response(http_res, "500", "application/json"):
362
+ response_data = unmarshal_json_response(errors.ErrorData, http_res)
363
+ raise errors.Error(response_data, http_res)
364
+ if utils.match_response(http_res, ["401", "4XX"], "*"):
365
+ http_res_text = await utils.stream_to_text_async(http_res)
366
+ raise errors.APIError("API error occurred", http_res, http_res_text)
367
+ if utils.match_response(http_res, "5XX", "*"):
368
+ http_res_text = await utils.stream_to_text_async(http_res)
369
+ raise errors.APIError("API error occurred", http_res, http_res_text)
370
+
371
+ raise errors.APIError("Unexpected response received", http_res)
@@ -0,0 +1,189 @@
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, Mapping, Optional
10
+
11
+
12
+ class ConfigsVersions(BaseSDK):
13
+ def get(
14
+ self,
15
+ *,
16
+ id: str,
17
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
18
+ server_url: Optional[str] = None,
19
+ timeout_ms: Optional[int] = None,
20
+ http_headers: Optional[Mapping[str, str]] = None,
21
+ ) -> models.GetGroupsConfigVersionByIDResponse:
22
+ r"""Retrieve the configuration version for a Worker Group or Edge Fleet
23
+
24
+ Get effective bundle version for given Group
25
+
26
+ :param id: Group ID
27
+ :param retries: Override the default retry configuration for this method
28
+ :param server_url: Override the default server URL for this method
29
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
30
+ :param http_headers: Additional headers to set or replace on requests.
31
+ """
32
+ base_url = None
33
+ url_variables = None
34
+ if timeout_ms is None:
35
+ timeout_ms = self.sdk_configuration.timeout_ms
36
+
37
+ if server_url is not None:
38
+ base_url = server_url
39
+ else:
40
+ base_url = self._get_url(base_url, url_variables)
41
+
42
+ request = models.GetGroupsConfigVersionByIDRequest(
43
+ id=id,
44
+ )
45
+
46
+ req = self._build_request(
47
+ method="GET",
48
+ path="/master/groups/{id}/configVersion",
49
+ base_url=base_url,
50
+ url_variables=url_variables,
51
+ request=request,
52
+ request_body_required=False,
53
+ request_has_path_params=True,
54
+ request_has_query_params=True,
55
+ user_agent_header="user-agent",
56
+ accept_header_value="application/json",
57
+ http_headers=http_headers,
58
+ security=self.sdk_configuration.security,
59
+ timeout_ms=timeout_ms,
60
+ )
61
+
62
+ if retries == UNSET:
63
+ if self.sdk_configuration.retry_config is not UNSET:
64
+ retries = self.sdk_configuration.retry_config
65
+
66
+ retry_config = None
67
+ if isinstance(retries, utils.RetryConfig):
68
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
69
+
70
+ http_res = self.do_request(
71
+ hook_ctx=HookContext(
72
+ config=self.sdk_configuration,
73
+ base_url=base_url or "",
74
+ operation_id="getGroupsConfigVersionById",
75
+ oauth2_scopes=[],
76
+ security_source=get_security_from_env(
77
+ self.sdk_configuration.security, models.Security
78
+ ),
79
+ ),
80
+ request=req,
81
+ error_status_codes=["401", "4XX", "500", "5XX"],
82
+ retry_config=retry_config,
83
+ )
84
+
85
+ response_data: Any = None
86
+ if utils.match_response(http_res, "200", "application/json"):
87
+ return unmarshal_json_response(
88
+ models.GetGroupsConfigVersionByIDResponse, http_res
89
+ )
90
+ if utils.match_response(http_res, "500", "application/json"):
91
+ response_data = unmarshal_json_response(errors.ErrorData, http_res)
92
+ raise errors.Error(response_data, http_res)
93
+ if utils.match_response(http_res, ["401", "4XX"], "*"):
94
+ http_res_text = utils.stream_to_text(http_res)
95
+ raise errors.APIError("API error occurred", http_res, http_res_text)
96
+ if utils.match_response(http_res, "5XX", "*"):
97
+ http_res_text = utils.stream_to_text(http_res)
98
+ raise errors.APIError("API error occurred", http_res, http_res_text)
99
+
100
+ raise errors.APIError("Unexpected response received", http_res)
101
+
102
+ async def get_async(
103
+ self,
104
+ *,
105
+ id: str,
106
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
107
+ server_url: Optional[str] = None,
108
+ timeout_ms: Optional[int] = None,
109
+ http_headers: Optional[Mapping[str, str]] = None,
110
+ ) -> models.GetGroupsConfigVersionByIDResponse:
111
+ r"""Retrieve the configuration version for a Worker Group or Edge Fleet
112
+
113
+ Get effective bundle version for given Group
114
+
115
+ :param id: Group ID
116
+ :param retries: Override the default retry configuration for this method
117
+ :param server_url: Override the default server URL for this method
118
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
119
+ :param http_headers: Additional headers to set or replace on requests.
120
+ """
121
+ base_url = None
122
+ url_variables = None
123
+ if timeout_ms is None:
124
+ timeout_ms = self.sdk_configuration.timeout_ms
125
+
126
+ if server_url is not None:
127
+ base_url = server_url
128
+ else:
129
+ base_url = self._get_url(base_url, url_variables)
130
+
131
+ request = models.GetGroupsConfigVersionByIDRequest(
132
+ id=id,
133
+ )
134
+
135
+ req = self._build_request_async(
136
+ method="GET",
137
+ path="/master/groups/{id}/configVersion",
138
+ base_url=base_url,
139
+ url_variables=url_variables,
140
+ request=request,
141
+ request_body_required=False,
142
+ request_has_path_params=True,
143
+ request_has_query_params=True,
144
+ user_agent_header="user-agent",
145
+ accept_header_value="application/json",
146
+ http_headers=http_headers,
147
+ security=self.sdk_configuration.security,
148
+ timeout_ms=timeout_ms,
149
+ )
150
+
151
+ if retries == UNSET:
152
+ if self.sdk_configuration.retry_config is not UNSET:
153
+ retries = self.sdk_configuration.retry_config
154
+
155
+ retry_config = None
156
+ if isinstance(retries, utils.RetryConfig):
157
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
158
+
159
+ http_res = await self.do_request_async(
160
+ hook_ctx=HookContext(
161
+ config=self.sdk_configuration,
162
+ base_url=base_url or "",
163
+ operation_id="getGroupsConfigVersionById",
164
+ oauth2_scopes=[],
165
+ security_source=get_security_from_env(
166
+ self.sdk_configuration.security, models.Security
167
+ ),
168
+ ),
169
+ request=req,
170
+ error_status_codes=["401", "4XX", "500", "5XX"],
171
+ retry_config=retry_config,
172
+ )
173
+
174
+ response_data: Any = None
175
+ if utils.match_response(http_res, "200", "application/json"):
176
+ return unmarshal_json_response(
177
+ models.GetGroupsConfigVersionByIDResponse, http_res
178
+ )
179
+ if utils.match_response(http_res, "500", "application/json"):
180
+ response_data = unmarshal_json_response(errors.ErrorData, http_res)
181
+ raise errors.Error(response_data, http_res)
182
+ if utils.match_response(http_res, ["401", "4XX"], "*"):
183
+ http_res_text = await utils.stream_to_text_async(http_res)
184
+ raise errors.APIError("API error occurred", http_res, http_res_text)
185
+ if utils.match_response(http_res, "5XX", "*"):
186
+ http_res_text = await utils.stream_to_text_async(http_res)
187
+ raise errors.APIError("API error occurred", http_res, http_res_text)
188
+
189
+ raise errors.APIError("Unexpected response received", http_res)