cribl-control-plane 0.0.26__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 +16 -729
- cribl_control_plane/destinations_pq.py +359 -0
- cribl_control_plane/groups_configs.py +17 -0
- cribl_control_plane/groups_sdk.py +12 -545
- cribl_control_plane/hectokens.py +479 -0
- cribl_control_plane/models/__init__.py +0 -8
- cribl_control_plane/nodes.py +9 -171
- cribl_control_plane/samples.py +391 -0
- cribl_control_plane/sdk.py +3 -5
- cribl_control_plane/sources.py +13 -469
- cribl_control_plane/statuses.py +185 -0
- cribl_control_plane/summaries.py +185 -0
- 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.26.dist-info → cribl_control_plane-0.0.27.dist-info}/METADATA +67 -29
- {cribl_control_plane-0.0.26.dist-info → cribl_control_plane-0.0.27.dist-info}/RECORD +26 -13
- cribl_control_plane/models/createversionsyncop.py +0 -23
- cribl_control_plane/versioning.py +0 -2309
- {cribl_control_plane-0.0.26.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)
|