cribl-control-plane 0.0.17__py3-none-any.whl → 0.0.19__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/distributed.py +187 -0
- cribl_control_plane/errors/healthstatus_error.py +1 -1
- cribl_control_plane/groups_sdk.py +1291 -0
- cribl_control_plane/lake.py +479 -0
- cribl_control_plane/models/__init__.py +843 -3
- cribl_control_plane/models/appmode.py +13 -0
- cribl_control_plane/models/cacheconnection.py +44 -0
- cribl_control_plane/models/cacheconnectionbackfillstatus.py +12 -0
- cribl_control_plane/models/cloudprovider.py +9 -0
- cribl_control_plane/models/commit.py +30 -0
- cribl_control_plane/models/configgroup.py +116 -0
- cribl_control_plane/models/configgroupcloud.py +48 -0
- cribl_control_plane/models/configgrouplookups.py +34 -0
- cribl_control_plane/models/createcribllakedatasetbylakeidop.py +48 -0
- cribl_control_plane/models/createpacksop.py +24 -0
- cribl_control_plane/models/createproductsgroupsbyproductop.py +54 -0
- cribl_control_plane/models/createversioncommitop.py +24 -0
- cribl_control_plane/models/createversionpushop.py +23 -0
- cribl_control_plane/models/createversionrevertop.py +47 -0
- cribl_control_plane/models/createversionsyncop.py +23 -0
- cribl_control_plane/models/createversionundoop.py +37 -0
- cribl_control_plane/models/cribllakedataset.py +74 -0
- cribl_control_plane/models/datasetmetadata.py +39 -0
- cribl_control_plane/models/datasetmetadataruninfo.py +28 -0
- cribl_control_plane/models/deployrequest.py +18 -0
- cribl_control_plane/models/deployrequestlookups.py +28 -0
- cribl_control_plane/models/distributedsummary.py +63 -0
- cribl_control_plane/models/getcribllakedatasetbylakeidop.py +40 -0
- cribl_control_plane/models/getgroupsaclbyidop.py +63 -0
- cribl_control_plane/models/getgroupsbyidop.py +49 -0
- cribl_control_plane/models/getgroupsconfigversionbyidop.py +36 -0
- cribl_control_plane/models/getpacksop.py +40 -0
- cribl_control_plane/models/getproductsgroupsaclteamsbyproductandidop.py +78 -0
- cribl_control_plane/models/getproductsgroupsbyproductop.py +58 -0
- cribl_control_plane/models/getsummaryop.py +46 -0
- cribl_control_plane/models/getsummaryworkersop.py +39 -0
- cribl_control_plane/models/getversionbranchop.py +23 -0
- cribl_control_plane/models/getversioncountop.py +47 -0
- cribl_control_plane/models/getversioncurrentbranchop.py +23 -0
- cribl_control_plane/models/getversiondiffop.py +63 -0
- cribl_control_plane/models/getversionfilesop.py +48 -0
- cribl_control_plane/models/getversioninfoop.py +24 -0
- cribl_control_plane/models/getversionshowop.py +63 -0
- cribl_control_plane/models/getversionstatusop.py +38 -0
- cribl_control_plane/models/getworkersop.py +82 -0
- cribl_control_plane/models/gitcommitparams.py +23 -0
- cribl_control_plane/models/gitcommitsummary.py +68 -0
- cribl_control_plane/models/gitfile.py +20 -0
- cribl_control_plane/models/gitfilesresponse.py +22 -0
- cribl_control_plane/models/gitinfo.py +23 -0
- cribl_control_plane/models/gitrevertparams.py +20 -0
- cribl_control_plane/models/gitrevertresult.py +48 -0
- cribl_control_plane/models/gitstatusresult.py +73 -0
- cribl_control_plane/models/hbcriblinfo.py +80 -0
- cribl_control_plane/models/hbleaderinfo.py +23 -0
- cribl_control_plane/models/healthstatus.py +3 -3
- cribl_control_plane/models/heartbeatmetadata.py +122 -0
- cribl_control_plane/models/lakedatasetsearchconfig.py +18 -0
- cribl_control_plane/models/lakehouseconnectiontype.py +9 -0
- cribl_control_plane/models/lookupversions.py +13 -0
- cribl_control_plane/models/masterworkerentry.py +84 -0
- cribl_control_plane/models/nodeactiveupgradestatus.py +10 -0
- cribl_control_plane/models/nodefailedupgradestatus.py +9 -0
- cribl_control_plane/models/nodeprovidedinfo.py +184 -0
- cribl_control_plane/models/nodeskippedupgradestatus.py +11 -0
- cribl_control_plane/models/nodeupgradestate.py +11 -0
- cribl_control_plane/models/nodeupgradestatus.py +30 -0
- cribl_control_plane/models/packinfo.py +73 -0
- cribl_control_plane/models/packinstallinfo.py +76 -0
- cribl_control_plane/models/packrequestbody.py +75 -0
- cribl_control_plane/models/rbacresource.py +14 -0
- cribl_control_plane/models/resourcepolicy.py +24 -0
- cribl_control_plane/models/restartresponse.py +26 -0
- cribl_control_plane/models/teamaccesscontrollist.py +18 -0
- cribl_control_plane/models/updategroupsdeploybyidop.py +46 -0
- cribl_control_plane/models/updatepacksop.py +37 -0
- cribl_control_plane/models/updateworkersrestartop.py +24 -0
- cribl_control_plane/models/useraccesscontrollist.py +18 -0
- cribl_control_plane/packs.py +623 -0
- cribl_control_plane/sdk.py +28 -0
- cribl_control_plane/teams.py +203 -0
- cribl_control_plane/versioning.py +2309 -0
- cribl_control_plane/workers_sdk.py +555 -0
- {cribl_control_plane-0.0.17.dist-info → cribl_control_plane-0.0.19.dist-info}/METADATA +58 -8
- {cribl_control_plane-0.0.17.dist-info → cribl_control_plane-0.0.19.dist-info}/RECORD +87 -8
- {cribl_control_plane-0.0.17.dist-info → cribl_control_plane-0.0.19.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,1291 @@
|
|
|
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 GroupsSDK(BaseSDK):
|
|
13
|
+
r"""Actions related to Groups"""
|
|
14
|
+
|
|
15
|
+
def get_groups_config_version_by_id(
|
|
16
|
+
self,
|
|
17
|
+
*,
|
|
18
|
+
id: str,
|
|
19
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
20
|
+
server_url: Optional[str] = None,
|
|
21
|
+
timeout_ms: Optional[int] = None,
|
|
22
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
23
|
+
) -> models.GetGroupsConfigVersionByIDResponse:
|
|
24
|
+
r"""Get effective bundle version for given Group
|
|
25
|
+
|
|
26
|
+
Get effective bundle version for given Group
|
|
27
|
+
|
|
28
|
+
:param id: Group 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.GetGroupsConfigVersionByIDRequest(
|
|
45
|
+
id=id,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
req = self._build_request(
|
|
49
|
+
method="GET",
|
|
50
|
+
path="/master/groups/{id}/configVersion",
|
|
51
|
+
base_url=base_url,
|
|
52
|
+
url_variables=url_variables,
|
|
53
|
+
request=request,
|
|
54
|
+
request_body_required=False,
|
|
55
|
+
request_has_path_params=True,
|
|
56
|
+
request_has_query_params=True,
|
|
57
|
+
user_agent_header="user-agent",
|
|
58
|
+
accept_header_value="application/json",
|
|
59
|
+
http_headers=http_headers,
|
|
60
|
+
security=self.sdk_configuration.security,
|
|
61
|
+
timeout_ms=timeout_ms,
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
if retries == UNSET:
|
|
65
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
66
|
+
retries = self.sdk_configuration.retry_config
|
|
67
|
+
|
|
68
|
+
retry_config = None
|
|
69
|
+
if isinstance(retries, utils.RetryConfig):
|
|
70
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
71
|
+
|
|
72
|
+
http_res = self.do_request(
|
|
73
|
+
hook_ctx=HookContext(
|
|
74
|
+
config=self.sdk_configuration,
|
|
75
|
+
base_url=base_url or "",
|
|
76
|
+
operation_id="getGroupsConfigVersionById",
|
|
77
|
+
oauth2_scopes=[],
|
|
78
|
+
security_source=get_security_from_env(
|
|
79
|
+
self.sdk_configuration.security, models.Security
|
|
80
|
+
),
|
|
81
|
+
),
|
|
82
|
+
request=req,
|
|
83
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
84
|
+
retry_config=retry_config,
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
response_data: Any = None
|
|
88
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
89
|
+
return unmarshal_json_response(
|
|
90
|
+
models.GetGroupsConfigVersionByIDResponse, http_res
|
|
91
|
+
)
|
|
92
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
93
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
94
|
+
raise errors.Error(response_data, http_res)
|
|
95
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
96
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
97
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
98
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
99
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
100
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
101
|
+
|
|
102
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
103
|
+
|
|
104
|
+
async def get_groups_config_version_by_id_async(
|
|
105
|
+
self,
|
|
106
|
+
*,
|
|
107
|
+
id: str,
|
|
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.GetGroupsConfigVersionByIDResponse:
|
|
113
|
+
r"""Get effective bundle version for given Group
|
|
114
|
+
|
|
115
|
+
Get effective bundle version for given Group
|
|
116
|
+
|
|
117
|
+
:param id: Group ID
|
|
118
|
+
:param retries: Override the default retry configuration for this method
|
|
119
|
+
:param server_url: Override the default server URL for this method
|
|
120
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
121
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
122
|
+
"""
|
|
123
|
+
base_url = None
|
|
124
|
+
url_variables = None
|
|
125
|
+
if timeout_ms is None:
|
|
126
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
127
|
+
|
|
128
|
+
if server_url is not None:
|
|
129
|
+
base_url = server_url
|
|
130
|
+
else:
|
|
131
|
+
base_url = self._get_url(base_url, url_variables)
|
|
132
|
+
|
|
133
|
+
request = models.GetGroupsConfigVersionByIDRequest(
|
|
134
|
+
id=id,
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
req = self._build_request_async(
|
|
138
|
+
method="GET",
|
|
139
|
+
path="/master/groups/{id}/configVersion",
|
|
140
|
+
base_url=base_url,
|
|
141
|
+
url_variables=url_variables,
|
|
142
|
+
request=request,
|
|
143
|
+
request_body_required=False,
|
|
144
|
+
request_has_path_params=True,
|
|
145
|
+
request_has_query_params=True,
|
|
146
|
+
user_agent_header="user-agent",
|
|
147
|
+
accept_header_value="application/json",
|
|
148
|
+
http_headers=http_headers,
|
|
149
|
+
security=self.sdk_configuration.security,
|
|
150
|
+
timeout_ms=timeout_ms,
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
if retries == UNSET:
|
|
154
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
155
|
+
retries = self.sdk_configuration.retry_config
|
|
156
|
+
|
|
157
|
+
retry_config = None
|
|
158
|
+
if isinstance(retries, utils.RetryConfig):
|
|
159
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
160
|
+
|
|
161
|
+
http_res = await self.do_request_async(
|
|
162
|
+
hook_ctx=HookContext(
|
|
163
|
+
config=self.sdk_configuration,
|
|
164
|
+
base_url=base_url or "",
|
|
165
|
+
operation_id="getGroupsConfigVersionById",
|
|
166
|
+
oauth2_scopes=[],
|
|
167
|
+
security_source=get_security_from_env(
|
|
168
|
+
self.sdk_configuration.security, models.Security
|
|
169
|
+
),
|
|
170
|
+
),
|
|
171
|
+
request=req,
|
|
172
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
173
|
+
retry_config=retry_config,
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
response_data: Any = None
|
|
177
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
178
|
+
return unmarshal_json_response(
|
|
179
|
+
models.GetGroupsConfigVersionByIDResponse, http_res
|
|
180
|
+
)
|
|
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 create_products_groups_by_product(
|
|
194
|
+
self,
|
|
195
|
+
*,
|
|
196
|
+
product: models.CreateProductsGroupsByProductProduct,
|
|
197
|
+
config_version: str,
|
|
198
|
+
id: str,
|
|
199
|
+
cloud: Optional[
|
|
200
|
+
Union[models.ConfigGroupCloud, models.ConfigGroupCloudTypedDict]
|
|
201
|
+
] = None,
|
|
202
|
+
deploying_worker_count: Optional[float] = None,
|
|
203
|
+
description: Optional[str] = None,
|
|
204
|
+
estimated_ingest_rate: Optional[float] = None,
|
|
205
|
+
git: Optional[Union[models.Git, models.GitTypedDict]] = None,
|
|
206
|
+
incompatible_worker_count: Optional[float] = None,
|
|
207
|
+
inherits: Optional[str] = None,
|
|
208
|
+
is_fleet: Optional[bool] = None,
|
|
209
|
+
is_search: Optional[bool] = None,
|
|
210
|
+
lookup_deployments: Optional[
|
|
211
|
+
Union[
|
|
212
|
+
List[models.ConfigGroupLookups],
|
|
213
|
+
List[models.ConfigGroupLookupsTypedDict],
|
|
214
|
+
]
|
|
215
|
+
] = None,
|
|
216
|
+
max_worker_age: Optional[str] = None,
|
|
217
|
+
name: Optional[str] = None,
|
|
218
|
+
on_prem: Optional[bool] = None,
|
|
219
|
+
provisioned: Optional[bool] = None,
|
|
220
|
+
streamtags: Optional[List[str]] = None,
|
|
221
|
+
tags: Optional[str] = None,
|
|
222
|
+
type_: Optional[models.ConfigGroupType] = None,
|
|
223
|
+
upgrade_version: Optional[str] = None,
|
|
224
|
+
worker_count: Optional[float] = None,
|
|
225
|
+
worker_remote_access: Optional[bool] = None,
|
|
226
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
227
|
+
server_url: Optional[str] = None,
|
|
228
|
+
timeout_ms: Optional[int] = None,
|
|
229
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
230
|
+
) -> models.CreateProductsGroupsByProductResponse:
|
|
231
|
+
r"""Create a Fleet or Worker Group
|
|
232
|
+
|
|
233
|
+
Create a Fleet or Worker Group
|
|
234
|
+
|
|
235
|
+
:param product: Cribl Product
|
|
236
|
+
:param config_version:
|
|
237
|
+
:param id:
|
|
238
|
+
:param cloud:
|
|
239
|
+
:param deploying_worker_count:
|
|
240
|
+
:param description:
|
|
241
|
+
:param estimated_ingest_rate:
|
|
242
|
+
:param git:
|
|
243
|
+
:param incompatible_worker_count:
|
|
244
|
+
:param inherits:
|
|
245
|
+
:param is_fleet:
|
|
246
|
+
:param is_search:
|
|
247
|
+
:param lookup_deployments:
|
|
248
|
+
:param max_worker_age:
|
|
249
|
+
:param name:
|
|
250
|
+
:param on_prem:
|
|
251
|
+
:param provisioned:
|
|
252
|
+
:param streamtags:
|
|
253
|
+
:param tags:
|
|
254
|
+
:param type:
|
|
255
|
+
:param upgrade_version:
|
|
256
|
+
:param worker_count:
|
|
257
|
+
:param worker_remote_access:
|
|
258
|
+
:param retries: Override the default retry configuration for this method
|
|
259
|
+
:param server_url: Override the default server URL for this method
|
|
260
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
261
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
262
|
+
"""
|
|
263
|
+
base_url = None
|
|
264
|
+
url_variables = None
|
|
265
|
+
if timeout_ms is None:
|
|
266
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
267
|
+
|
|
268
|
+
if server_url is not None:
|
|
269
|
+
base_url = server_url
|
|
270
|
+
else:
|
|
271
|
+
base_url = self._get_url(base_url, url_variables)
|
|
272
|
+
|
|
273
|
+
request = models.CreateProductsGroupsByProductRequest(
|
|
274
|
+
product=product,
|
|
275
|
+
config_group=models.ConfigGroup(
|
|
276
|
+
cloud=utils.get_pydantic_model(
|
|
277
|
+
cloud, Optional[models.ConfigGroupCloud]
|
|
278
|
+
),
|
|
279
|
+
config_version=config_version,
|
|
280
|
+
deploying_worker_count=deploying_worker_count,
|
|
281
|
+
description=description,
|
|
282
|
+
estimated_ingest_rate=estimated_ingest_rate,
|
|
283
|
+
git=utils.get_pydantic_model(git, Optional[models.Git]),
|
|
284
|
+
id=id,
|
|
285
|
+
incompatible_worker_count=incompatible_worker_count,
|
|
286
|
+
inherits=inherits,
|
|
287
|
+
is_fleet=is_fleet,
|
|
288
|
+
is_search=is_search,
|
|
289
|
+
lookup_deployments=utils.get_pydantic_model(
|
|
290
|
+
lookup_deployments, Optional[List[models.ConfigGroupLookups]]
|
|
291
|
+
),
|
|
292
|
+
max_worker_age=max_worker_age,
|
|
293
|
+
name=name,
|
|
294
|
+
on_prem=on_prem,
|
|
295
|
+
provisioned=provisioned,
|
|
296
|
+
streamtags=streamtags,
|
|
297
|
+
tags=tags,
|
|
298
|
+
type=type_,
|
|
299
|
+
upgrade_version=upgrade_version,
|
|
300
|
+
worker_count=worker_count,
|
|
301
|
+
worker_remote_access=worker_remote_access,
|
|
302
|
+
),
|
|
303
|
+
)
|
|
304
|
+
|
|
305
|
+
req = self._build_request(
|
|
306
|
+
method="POST",
|
|
307
|
+
path="/products/{product}/groups",
|
|
308
|
+
base_url=base_url,
|
|
309
|
+
url_variables=url_variables,
|
|
310
|
+
request=request,
|
|
311
|
+
request_body_required=True,
|
|
312
|
+
request_has_path_params=True,
|
|
313
|
+
request_has_query_params=True,
|
|
314
|
+
user_agent_header="user-agent",
|
|
315
|
+
accept_header_value="application/json",
|
|
316
|
+
http_headers=http_headers,
|
|
317
|
+
security=self.sdk_configuration.security,
|
|
318
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
319
|
+
request.config_group, False, False, "json", models.ConfigGroup
|
|
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="createProductsGroupsByProduct",
|
|
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.CreateProductsGroupsByProductResponse, 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 create_products_groups_by_product_async(
|
|
365
|
+
self,
|
|
366
|
+
*,
|
|
367
|
+
product: models.CreateProductsGroupsByProductProduct,
|
|
368
|
+
config_version: str,
|
|
369
|
+
id: str,
|
|
370
|
+
cloud: Optional[
|
|
371
|
+
Union[models.ConfigGroupCloud, models.ConfigGroupCloudTypedDict]
|
|
372
|
+
] = None,
|
|
373
|
+
deploying_worker_count: Optional[float] = None,
|
|
374
|
+
description: Optional[str] = None,
|
|
375
|
+
estimated_ingest_rate: Optional[float] = None,
|
|
376
|
+
git: Optional[Union[models.Git, models.GitTypedDict]] = None,
|
|
377
|
+
incompatible_worker_count: Optional[float] = None,
|
|
378
|
+
inherits: Optional[str] = None,
|
|
379
|
+
is_fleet: Optional[bool] = None,
|
|
380
|
+
is_search: Optional[bool] = None,
|
|
381
|
+
lookup_deployments: Optional[
|
|
382
|
+
Union[
|
|
383
|
+
List[models.ConfigGroupLookups],
|
|
384
|
+
List[models.ConfigGroupLookupsTypedDict],
|
|
385
|
+
]
|
|
386
|
+
] = None,
|
|
387
|
+
max_worker_age: Optional[str] = None,
|
|
388
|
+
name: Optional[str] = None,
|
|
389
|
+
on_prem: Optional[bool] = None,
|
|
390
|
+
provisioned: Optional[bool] = None,
|
|
391
|
+
streamtags: Optional[List[str]] = None,
|
|
392
|
+
tags: Optional[str] = None,
|
|
393
|
+
type_: Optional[models.ConfigGroupType] = None,
|
|
394
|
+
upgrade_version: Optional[str] = None,
|
|
395
|
+
worker_count: Optional[float] = None,
|
|
396
|
+
worker_remote_access: Optional[bool] = None,
|
|
397
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
398
|
+
server_url: Optional[str] = None,
|
|
399
|
+
timeout_ms: Optional[int] = None,
|
|
400
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
401
|
+
) -> models.CreateProductsGroupsByProductResponse:
|
|
402
|
+
r"""Create a Fleet or Worker Group
|
|
403
|
+
|
|
404
|
+
Create a Fleet or Worker Group
|
|
405
|
+
|
|
406
|
+
:param product: Cribl Product
|
|
407
|
+
:param config_version:
|
|
408
|
+
:param id:
|
|
409
|
+
:param cloud:
|
|
410
|
+
:param deploying_worker_count:
|
|
411
|
+
:param description:
|
|
412
|
+
:param estimated_ingest_rate:
|
|
413
|
+
:param git:
|
|
414
|
+
:param incompatible_worker_count:
|
|
415
|
+
:param inherits:
|
|
416
|
+
:param is_fleet:
|
|
417
|
+
:param is_search:
|
|
418
|
+
:param lookup_deployments:
|
|
419
|
+
:param max_worker_age:
|
|
420
|
+
:param name:
|
|
421
|
+
:param on_prem:
|
|
422
|
+
:param provisioned:
|
|
423
|
+
:param streamtags:
|
|
424
|
+
:param tags:
|
|
425
|
+
:param type:
|
|
426
|
+
:param upgrade_version:
|
|
427
|
+
:param worker_count:
|
|
428
|
+
:param worker_remote_access:
|
|
429
|
+
:param retries: Override the default retry configuration for this method
|
|
430
|
+
:param server_url: Override the default server URL for this method
|
|
431
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
432
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
433
|
+
"""
|
|
434
|
+
base_url = None
|
|
435
|
+
url_variables = None
|
|
436
|
+
if timeout_ms is None:
|
|
437
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
438
|
+
|
|
439
|
+
if server_url is not None:
|
|
440
|
+
base_url = server_url
|
|
441
|
+
else:
|
|
442
|
+
base_url = self._get_url(base_url, url_variables)
|
|
443
|
+
|
|
444
|
+
request = models.CreateProductsGroupsByProductRequest(
|
|
445
|
+
product=product,
|
|
446
|
+
config_group=models.ConfigGroup(
|
|
447
|
+
cloud=utils.get_pydantic_model(
|
|
448
|
+
cloud, Optional[models.ConfigGroupCloud]
|
|
449
|
+
),
|
|
450
|
+
config_version=config_version,
|
|
451
|
+
deploying_worker_count=deploying_worker_count,
|
|
452
|
+
description=description,
|
|
453
|
+
estimated_ingest_rate=estimated_ingest_rate,
|
|
454
|
+
git=utils.get_pydantic_model(git, Optional[models.Git]),
|
|
455
|
+
id=id,
|
|
456
|
+
incompatible_worker_count=incompatible_worker_count,
|
|
457
|
+
inherits=inherits,
|
|
458
|
+
is_fleet=is_fleet,
|
|
459
|
+
is_search=is_search,
|
|
460
|
+
lookup_deployments=utils.get_pydantic_model(
|
|
461
|
+
lookup_deployments, Optional[List[models.ConfigGroupLookups]]
|
|
462
|
+
),
|
|
463
|
+
max_worker_age=max_worker_age,
|
|
464
|
+
name=name,
|
|
465
|
+
on_prem=on_prem,
|
|
466
|
+
provisioned=provisioned,
|
|
467
|
+
streamtags=streamtags,
|
|
468
|
+
tags=tags,
|
|
469
|
+
type=type_,
|
|
470
|
+
upgrade_version=upgrade_version,
|
|
471
|
+
worker_count=worker_count,
|
|
472
|
+
worker_remote_access=worker_remote_access,
|
|
473
|
+
),
|
|
474
|
+
)
|
|
475
|
+
|
|
476
|
+
req = self._build_request_async(
|
|
477
|
+
method="POST",
|
|
478
|
+
path="/products/{product}/groups",
|
|
479
|
+
base_url=base_url,
|
|
480
|
+
url_variables=url_variables,
|
|
481
|
+
request=request,
|
|
482
|
+
request_body_required=True,
|
|
483
|
+
request_has_path_params=True,
|
|
484
|
+
request_has_query_params=True,
|
|
485
|
+
user_agent_header="user-agent",
|
|
486
|
+
accept_header_value="application/json",
|
|
487
|
+
http_headers=http_headers,
|
|
488
|
+
security=self.sdk_configuration.security,
|
|
489
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
490
|
+
request.config_group, False, False, "json", models.ConfigGroup
|
|
491
|
+
),
|
|
492
|
+
timeout_ms=timeout_ms,
|
|
493
|
+
)
|
|
494
|
+
|
|
495
|
+
if retries == UNSET:
|
|
496
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
497
|
+
retries = self.sdk_configuration.retry_config
|
|
498
|
+
|
|
499
|
+
retry_config = None
|
|
500
|
+
if isinstance(retries, utils.RetryConfig):
|
|
501
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
502
|
+
|
|
503
|
+
http_res = await self.do_request_async(
|
|
504
|
+
hook_ctx=HookContext(
|
|
505
|
+
config=self.sdk_configuration,
|
|
506
|
+
base_url=base_url or "",
|
|
507
|
+
operation_id="createProductsGroupsByProduct",
|
|
508
|
+
oauth2_scopes=[],
|
|
509
|
+
security_source=get_security_from_env(
|
|
510
|
+
self.sdk_configuration.security, models.Security
|
|
511
|
+
),
|
|
512
|
+
),
|
|
513
|
+
request=req,
|
|
514
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
515
|
+
retry_config=retry_config,
|
|
516
|
+
)
|
|
517
|
+
|
|
518
|
+
response_data: Any = None
|
|
519
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
520
|
+
return unmarshal_json_response(
|
|
521
|
+
models.CreateProductsGroupsByProductResponse, http_res
|
|
522
|
+
)
|
|
523
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
524
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
525
|
+
raise errors.Error(response_data, http_res)
|
|
526
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
527
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
528
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
529
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
530
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
531
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
532
|
+
|
|
533
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
534
|
+
|
|
535
|
+
def get_products_groups_by_product(
|
|
536
|
+
self,
|
|
537
|
+
*,
|
|
538
|
+
product: models.GetProductsGroupsByProductProduct,
|
|
539
|
+
fields: Optional[str] = None,
|
|
540
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
541
|
+
server_url: Optional[str] = None,
|
|
542
|
+
timeout_ms: Optional[int] = None,
|
|
543
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
544
|
+
) -> models.GetProductsGroupsByProductResponse:
|
|
545
|
+
r"""Get a list of ConfigGroup objects
|
|
546
|
+
|
|
547
|
+
Get a list of ConfigGroup objects
|
|
548
|
+
|
|
549
|
+
:param product: Cribl Product
|
|
550
|
+
:param fields: fields to add to results: git.commit, git.localChanges, git.log
|
|
551
|
+
:param retries: Override the default retry configuration for this method
|
|
552
|
+
:param server_url: Override the default server URL for this method
|
|
553
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
554
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
555
|
+
"""
|
|
556
|
+
base_url = None
|
|
557
|
+
url_variables = None
|
|
558
|
+
if timeout_ms is None:
|
|
559
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
560
|
+
|
|
561
|
+
if server_url is not None:
|
|
562
|
+
base_url = server_url
|
|
563
|
+
else:
|
|
564
|
+
base_url = self._get_url(base_url, url_variables)
|
|
565
|
+
|
|
566
|
+
request = models.GetProductsGroupsByProductRequest(
|
|
567
|
+
fields=fields,
|
|
568
|
+
product=product,
|
|
569
|
+
)
|
|
570
|
+
|
|
571
|
+
req = self._build_request(
|
|
572
|
+
method="GET",
|
|
573
|
+
path="/products/{product}/groups",
|
|
574
|
+
base_url=base_url,
|
|
575
|
+
url_variables=url_variables,
|
|
576
|
+
request=request,
|
|
577
|
+
request_body_required=False,
|
|
578
|
+
request_has_path_params=True,
|
|
579
|
+
request_has_query_params=True,
|
|
580
|
+
user_agent_header="user-agent",
|
|
581
|
+
accept_header_value="application/json",
|
|
582
|
+
http_headers=http_headers,
|
|
583
|
+
security=self.sdk_configuration.security,
|
|
584
|
+
timeout_ms=timeout_ms,
|
|
585
|
+
)
|
|
586
|
+
|
|
587
|
+
if retries == UNSET:
|
|
588
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
589
|
+
retries = self.sdk_configuration.retry_config
|
|
590
|
+
|
|
591
|
+
retry_config = None
|
|
592
|
+
if isinstance(retries, utils.RetryConfig):
|
|
593
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
594
|
+
|
|
595
|
+
http_res = self.do_request(
|
|
596
|
+
hook_ctx=HookContext(
|
|
597
|
+
config=self.sdk_configuration,
|
|
598
|
+
base_url=base_url or "",
|
|
599
|
+
operation_id="getProductsGroupsByProduct",
|
|
600
|
+
oauth2_scopes=[],
|
|
601
|
+
security_source=get_security_from_env(
|
|
602
|
+
self.sdk_configuration.security, models.Security
|
|
603
|
+
),
|
|
604
|
+
),
|
|
605
|
+
request=req,
|
|
606
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
607
|
+
retry_config=retry_config,
|
|
608
|
+
)
|
|
609
|
+
|
|
610
|
+
response_data: Any = None
|
|
611
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
612
|
+
return unmarshal_json_response(
|
|
613
|
+
models.GetProductsGroupsByProductResponse, http_res
|
|
614
|
+
)
|
|
615
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
616
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
617
|
+
raise errors.Error(response_data, http_res)
|
|
618
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
619
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
620
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
621
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
622
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
623
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
624
|
+
|
|
625
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
626
|
+
|
|
627
|
+
async def get_products_groups_by_product_async(
|
|
628
|
+
self,
|
|
629
|
+
*,
|
|
630
|
+
product: models.GetProductsGroupsByProductProduct,
|
|
631
|
+
fields: Optional[str] = None,
|
|
632
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
633
|
+
server_url: Optional[str] = None,
|
|
634
|
+
timeout_ms: Optional[int] = None,
|
|
635
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
636
|
+
) -> models.GetProductsGroupsByProductResponse:
|
|
637
|
+
r"""Get a list of ConfigGroup objects
|
|
638
|
+
|
|
639
|
+
Get a list of ConfigGroup objects
|
|
640
|
+
|
|
641
|
+
:param product: Cribl Product
|
|
642
|
+
:param fields: fields to add to results: git.commit, git.localChanges, git.log
|
|
643
|
+
:param retries: Override the default retry configuration for this method
|
|
644
|
+
:param server_url: Override the default server URL for this method
|
|
645
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
646
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
647
|
+
"""
|
|
648
|
+
base_url = None
|
|
649
|
+
url_variables = None
|
|
650
|
+
if timeout_ms is None:
|
|
651
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
652
|
+
|
|
653
|
+
if server_url is not None:
|
|
654
|
+
base_url = server_url
|
|
655
|
+
else:
|
|
656
|
+
base_url = self._get_url(base_url, url_variables)
|
|
657
|
+
|
|
658
|
+
request = models.GetProductsGroupsByProductRequest(
|
|
659
|
+
fields=fields,
|
|
660
|
+
product=product,
|
|
661
|
+
)
|
|
662
|
+
|
|
663
|
+
req = self._build_request_async(
|
|
664
|
+
method="GET",
|
|
665
|
+
path="/products/{product}/groups",
|
|
666
|
+
base_url=base_url,
|
|
667
|
+
url_variables=url_variables,
|
|
668
|
+
request=request,
|
|
669
|
+
request_body_required=False,
|
|
670
|
+
request_has_path_params=True,
|
|
671
|
+
request_has_query_params=True,
|
|
672
|
+
user_agent_header="user-agent",
|
|
673
|
+
accept_header_value="application/json",
|
|
674
|
+
http_headers=http_headers,
|
|
675
|
+
security=self.sdk_configuration.security,
|
|
676
|
+
timeout_ms=timeout_ms,
|
|
677
|
+
)
|
|
678
|
+
|
|
679
|
+
if retries == UNSET:
|
|
680
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
681
|
+
retries = self.sdk_configuration.retry_config
|
|
682
|
+
|
|
683
|
+
retry_config = None
|
|
684
|
+
if isinstance(retries, utils.RetryConfig):
|
|
685
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
686
|
+
|
|
687
|
+
http_res = await self.do_request_async(
|
|
688
|
+
hook_ctx=HookContext(
|
|
689
|
+
config=self.sdk_configuration,
|
|
690
|
+
base_url=base_url or "",
|
|
691
|
+
operation_id="getProductsGroupsByProduct",
|
|
692
|
+
oauth2_scopes=[],
|
|
693
|
+
security_source=get_security_from_env(
|
|
694
|
+
self.sdk_configuration.security, models.Security
|
|
695
|
+
),
|
|
696
|
+
),
|
|
697
|
+
request=req,
|
|
698
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
699
|
+
retry_config=retry_config,
|
|
700
|
+
)
|
|
701
|
+
|
|
702
|
+
response_data: Any = None
|
|
703
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
704
|
+
return unmarshal_json_response(
|
|
705
|
+
models.GetProductsGroupsByProductResponse, http_res
|
|
706
|
+
)
|
|
707
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
708
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
709
|
+
raise errors.Error(response_data, http_res)
|
|
710
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
711
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
712
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
713
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
714
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
715
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
716
|
+
|
|
717
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
718
|
+
|
|
719
|
+
def update_groups_deploy_by_id(
|
|
720
|
+
self,
|
|
721
|
+
*,
|
|
722
|
+
id: str,
|
|
723
|
+
version: str,
|
|
724
|
+
lookups: Optional[
|
|
725
|
+
Union[
|
|
726
|
+
List[models.DeployRequestLookups],
|
|
727
|
+
List[models.DeployRequestLookupsTypedDict],
|
|
728
|
+
]
|
|
729
|
+
] = None,
|
|
730
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
731
|
+
server_url: Optional[str] = None,
|
|
732
|
+
timeout_ms: Optional[int] = None,
|
|
733
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
734
|
+
) -> models.UpdateGroupsDeployByIDResponse:
|
|
735
|
+
r"""Deploy commits for a Fleet or Worker Group
|
|
736
|
+
|
|
737
|
+
Deploy commits for a Fleet or Worker Group
|
|
738
|
+
|
|
739
|
+
:param id: Group ID
|
|
740
|
+
:param version:
|
|
741
|
+
:param lookups:
|
|
742
|
+
:param retries: Override the default retry configuration for this method
|
|
743
|
+
:param server_url: Override the default server URL for this method
|
|
744
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
745
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
746
|
+
"""
|
|
747
|
+
base_url = None
|
|
748
|
+
url_variables = None
|
|
749
|
+
if timeout_ms is None:
|
|
750
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
751
|
+
|
|
752
|
+
if server_url is not None:
|
|
753
|
+
base_url = server_url
|
|
754
|
+
else:
|
|
755
|
+
base_url = self._get_url(base_url, url_variables)
|
|
756
|
+
|
|
757
|
+
request = models.UpdateGroupsDeployByIDRequest(
|
|
758
|
+
id=id,
|
|
759
|
+
deploy_request=models.DeployRequest(
|
|
760
|
+
lookups=utils.get_pydantic_model(
|
|
761
|
+
lookups, Optional[List[models.DeployRequestLookups]]
|
|
762
|
+
),
|
|
763
|
+
version=version,
|
|
764
|
+
),
|
|
765
|
+
)
|
|
766
|
+
|
|
767
|
+
req = self._build_request(
|
|
768
|
+
method="PATCH",
|
|
769
|
+
path="/master/groups/{id}/deploy",
|
|
770
|
+
base_url=base_url,
|
|
771
|
+
url_variables=url_variables,
|
|
772
|
+
request=request,
|
|
773
|
+
request_body_required=True,
|
|
774
|
+
request_has_path_params=True,
|
|
775
|
+
request_has_query_params=True,
|
|
776
|
+
user_agent_header="user-agent",
|
|
777
|
+
accept_header_value="application/json",
|
|
778
|
+
http_headers=http_headers,
|
|
779
|
+
security=self.sdk_configuration.security,
|
|
780
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
781
|
+
request.deploy_request, False, False, "json", models.DeployRequest
|
|
782
|
+
),
|
|
783
|
+
timeout_ms=timeout_ms,
|
|
784
|
+
)
|
|
785
|
+
|
|
786
|
+
if retries == UNSET:
|
|
787
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
788
|
+
retries = self.sdk_configuration.retry_config
|
|
789
|
+
|
|
790
|
+
retry_config = None
|
|
791
|
+
if isinstance(retries, utils.RetryConfig):
|
|
792
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
793
|
+
|
|
794
|
+
http_res = self.do_request(
|
|
795
|
+
hook_ctx=HookContext(
|
|
796
|
+
config=self.sdk_configuration,
|
|
797
|
+
base_url=base_url or "",
|
|
798
|
+
operation_id="updateGroupsDeployById",
|
|
799
|
+
oauth2_scopes=[],
|
|
800
|
+
security_source=get_security_from_env(
|
|
801
|
+
self.sdk_configuration.security, models.Security
|
|
802
|
+
),
|
|
803
|
+
),
|
|
804
|
+
request=req,
|
|
805
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
806
|
+
retry_config=retry_config,
|
|
807
|
+
)
|
|
808
|
+
|
|
809
|
+
response_data: Any = None
|
|
810
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
811
|
+
return unmarshal_json_response(
|
|
812
|
+
models.UpdateGroupsDeployByIDResponse, http_res
|
|
813
|
+
)
|
|
814
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
815
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
816
|
+
raise errors.Error(response_data, http_res)
|
|
817
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
818
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
819
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
820
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
821
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
822
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
823
|
+
|
|
824
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
825
|
+
|
|
826
|
+
async def update_groups_deploy_by_id_async(
|
|
827
|
+
self,
|
|
828
|
+
*,
|
|
829
|
+
id: str,
|
|
830
|
+
version: str,
|
|
831
|
+
lookups: Optional[
|
|
832
|
+
Union[
|
|
833
|
+
List[models.DeployRequestLookups],
|
|
834
|
+
List[models.DeployRequestLookupsTypedDict],
|
|
835
|
+
]
|
|
836
|
+
] = None,
|
|
837
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
838
|
+
server_url: Optional[str] = None,
|
|
839
|
+
timeout_ms: Optional[int] = None,
|
|
840
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
841
|
+
) -> models.UpdateGroupsDeployByIDResponse:
|
|
842
|
+
r"""Deploy commits for a Fleet or Worker Group
|
|
843
|
+
|
|
844
|
+
Deploy commits for a Fleet or Worker Group
|
|
845
|
+
|
|
846
|
+
:param id: Group ID
|
|
847
|
+
:param version:
|
|
848
|
+
:param lookups:
|
|
849
|
+
:param retries: Override the default retry configuration for this method
|
|
850
|
+
:param server_url: Override the default server URL for this method
|
|
851
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
852
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
853
|
+
"""
|
|
854
|
+
base_url = None
|
|
855
|
+
url_variables = None
|
|
856
|
+
if timeout_ms is None:
|
|
857
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
858
|
+
|
|
859
|
+
if server_url is not None:
|
|
860
|
+
base_url = server_url
|
|
861
|
+
else:
|
|
862
|
+
base_url = self._get_url(base_url, url_variables)
|
|
863
|
+
|
|
864
|
+
request = models.UpdateGroupsDeployByIDRequest(
|
|
865
|
+
id=id,
|
|
866
|
+
deploy_request=models.DeployRequest(
|
|
867
|
+
lookups=utils.get_pydantic_model(
|
|
868
|
+
lookups, Optional[List[models.DeployRequestLookups]]
|
|
869
|
+
),
|
|
870
|
+
version=version,
|
|
871
|
+
),
|
|
872
|
+
)
|
|
873
|
+
|
|
874
|
+
req = self._build_request_async(
|
|
875
|
+
method="PATCH",
|
|
876
|
+
path="/master/groups/{id}/deploy",
|
|
877
|
+
base_url=base_url,
|
|
878
|
+
url_variables=url_variables,
|
|
879
|
+
request=request,
|
|
880
|
+
request_body_required=True,
|
|
881
|
+
request_has_path_params=True,
|
|
882
|
+
request_has_query_params=True,
|
|
883
|
+
user_agent_header="user-agent",
|
|
884
|
+
accept_header_value="application/json",
|
|
885
|
+
http_headers=http_headers,
|
|
886
|
+
security=self.sdk_configuration.security,
|
|
887
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
888
|
+
request.deploy_request, False, False, "json", models.DeployRequest
|
|
889
|
+
),
|
|
890
|
+
timeout_ms=timeout_ms,
|
|
891
|
+
)
|
|
892
|
+
|
|
893
|
+
if retries == UNSET:
|
|
894
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
895
|
+
retries = self.sdk_configuration.retry_config
|
|
896
|
+
|
|
897
|
+
retry_config = None
|
|
898
|
+
if isinstance(retries, utils.RetryConfig):
|
|
899
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
900
|
+
|
|
901
|
+
http_res = await self.do_request_async(
|
|
902
|
+
hook_ctx=HookContext(
|
|
903
|
+
config=self.sdk_configuration,
|
|
904
|
+
base_url=base_url or "",
|
|
905
|
+
operation_id="updateGroupsDeployById",
|
|
906
|
+
oauth2_scopes=[],
|
|
907
|
+
security_source=get_security_from_env(
|
|
908
|
+
self.sdk_configuration.security, models.Security
|
|
909
|
+
),
|
|
910
|
+
),
|
|
911
|
+
request=req,
|
|
912
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
913
|
+
retry_config=retry_config,
|
|
914
|
+
)
|
|
915
|
+
|
|
916
|
+
response_data: Any = None
|
|
917
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
918
|
+
return unmarshal_json_response(
|
|
919
|
+
models.UpdateGroupsDeployByIDResponse, http_res
|
|
920
|
+
)
|
|
921
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
922
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
923
|
+
raise errors.Error(response_data, http_res)
|
|
924
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
925
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
926
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
927
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
928
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
929
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
930
|
+
|
|
931
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
932
|
+
|
|
933
|
+
def get_groups_by_id(
|
|
934
|
+
self,
|
|
935
|
+
*,
|
|
936
|
+
id: str,
|
|
937
|
+
fields: Optional[str] = None,
|
|
938
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
939
|
+
server_url: Optional[str] = None,
|
|
940
|
+
timeout_ms: Optional[int] = None,
|
|
941
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
942
|
+
) -> models.GetGroupsByIDResponse:
|
|
943
|
+
r"""Get a specific ConfigGroup object
|
|
944
|
+
|
|
945
|
+
Get a specific ConfigGroup object
|
|
946
|
+
|
|
947
|
+
:param id: Group id
|
|
948
|
+
:param fields: fields to add to results: git.commit, git.localChanges, git.log
|
|
949
|
+
:param retries: Override the default retry configuration for this method
|
|
950
|
+
:param server_url: Override the default server URL for this method
|
|
951
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
952
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
953
|
+
"""
|
|
954
|
+
base_url = None
|
|
955
|
+
url_variables = None
|
|
956
|
+
if timeout_ms is None:
|
|
957
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
958
|
+
|
|
959
|
+
if server_url is not None:
|
|
960
|
+
base_url = server_url
|
|
961
|
+
else:
|
|
962
|
+
base_url = self._get_url(base_url, url_variables)
|
|
963
|
+
|
|
964
|
+
request = models.GetGroupsByIDRequest(
|
|
965
|
+
id=id,
|
|
966
|
+
fields=fields,
|
|
967
|
+
)
|
|
968
|
+
|
|
969
|
+
req = self._build_request(
|
|
970
|
+
method="GET",
|
|
971
|
+
path="/master/groups/{id}",
|
|
972
|
+
base_url=base_url,
|
|
973
|
+
url_variables=url_variables,
|
|
974
|
+
request=request,
|
|
975
|
+
request_body_required=False,
|
|
976
|
+
request_has_path_params=True,
|
|
977
|
+
request_has_query_params=True,
|
|
978
|
+
user_agent_header="user-agent",
|
|
979
|
+
accept_header_value="application/json",
|
|
980
|
+
http_headers=http_headers,
|
|
981
|
+
security=self.sdk_configuration.security,
|
|
982
|
+
timeout_ms=timeout_ms,
|
|
983
|
+
)
|
|
984
|
+
|
|
985
|
+
if retries == UNSET:
|
|
986
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
987
|
+
retries = self.sdk_configuration.retry_config
|
|
988
|
+
|
|
989
|
+
retry_config = None
|
|
990
|
+
if isinstance(retries, utils.RetryConfig):
|
|
991
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
992
|
+
|
|
993
|
+
http_res = self.do_request(
|
|
994
|
+
hook_ctx=HookContext(
|
|
995
|
+
config=self.sdk_configuration,
|
|
996
|
+
base_url=base_url or "",
|
|
997
|
+
operation_id="getGroupsById",
|
|
998
|
+
oauth2_scopes=[],
|
|
999
|
+
security_source=get_security_from_env(
|
|
1000
|
+
self.sdk_configuration.security, models.Security
|
|
1001
|
+
),
|
|
1002
|
+
),
|
|
1003
|
+
request=req,
|
|
1004
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
1005
|
+
retry_config=retry_config,
|
|
1006
|
+
)
|
|
1007
|
+
|
|
1008
|
+
response_data: Any = None
|
|
1009
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
1010
|
+
return unmarshal_json_response(models.GetGroupsByIDResponse, http_res)
|
|
1011
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
1012
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
1013
|
+
raise errors.Error(response_data, http_res)
|
|
1014
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
1015
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
1016
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1017
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
1018
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
1019
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1020
|
+
|
|
1021
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
1022
|
+
|
|
1023
|
+
async def get_groups_by_id_async(
|
|
1024
|
+
self,
|
|
1025
|
+
*,
|
|
1026
|
+
id: str,
|
|
1027
|
+
fields: Optional[str] = None,
|
|
1028
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1029
|
+
server_url: Optional[str] = None,
|
|
1030
|
+
timeout_ms: Optional[int] = None,
|
|
1031
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
1032
|
+
) -> models.GetGroupsByIDResponse:
|
|
1033
|
+
r"""Get a specific ConfigGroup object
|
|
1034
|
+
|
|
1035
|
+
Get a specific ConfigGroup object
|
|
1036
|
+
|
|
1037
|
+
:param id: Group id
|
|
1038
|
+
:param fields: fields to add to results: git.commit, git.localChanges, git.log
|
|
1039
|
+
:param retries: Override the default retry configuration for this method
|
|
1040
|
+
:param server_url: Override the default server URL for this method
|
|
1041
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
1042
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
1043
|
+
"""
|
|
1044
|
+
base_url = None
|
|
1045
|
+
url_variables = None
|
|
1046
|
+
if timeout_ms is None:
|
|
1047
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
1048
|
+
|
|
1049
|
+
if server_url is not None:
|
|
1050
|
+
base_url = server_url
|
|
1051
|
+
else:
|
|
1052
|
+
base_url = self._get_url(base_url, url_variables)
|
|
1053
|
+
|
|
1054
|
+
request = models.GetGroupsByIDRequest(
|
|
1055
|
+
id=id,
|
|
1056
|
+
fields=fields,
|
|
1057
|
+
)
|
|
1058
|
+
|
|
1059
|
+
req = self._build_request_async(
|
|
1060
|
+
method="GET",
|
|
1061
|
+
path="/master/groups/{id}",
|
|
1062
|
+
base_url=base_url,
|
|
1063
|
+
url_variables=url_variables,
|
|
1064
|
+
request=request,
|
|
1065
|
+
request_body_required=False,
|
|
1066
|
+
request_has_path_params=True,
|
|
1067
|
+
request_has_query_params=True,
|
|
1068
|
+
user_agent_header="user-agent",
|
|
1069
|
+
accept_header_value="application/json",
|
|
1070
|
+
http_headers=http_headers,
|
|
1071
|
+
security=self.sdk_configuration.security,
|
|
1072
|
+
timeout_ms=timeout_ms,
|
|
1073
|
+
)
|
|
1074
|
+
|
|
1075
|
+
if retries == UNSET:
|
|
1076
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
1077
|
+
retries = self.sdk_configuration.retry_config
|
|
1078
|
+
|
|
1079
|
+
retry_config = None
|
|
1080
|
+
if isinstance(retries, utils.RetryConfig):
|
|
1081
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
1082
|
+
|
|
1083
|
+
http_res = await self.do_request_async(
|
|
1084
|
+
hook_ctx=HookContext(
|
|
1085
|
+
config=self.sdk_configuration,
|
|
1086
|
+
base_url=base_url or "",
|
|
1087
|
+
operation_id="getGroupsById",
|
|
1088
|
+
oauth2_scopes=[],
|
|
1089
|
+
security_source=get_security_from_env(
|
|
1090
|
+
self.sdk_configuration.security, models.Security
|
|
1091
|
+
),
|
|
1092
|
+
),
|
|
1093
|
+
request=req,
|
|
1094
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
1095
|
+
retry_config=retry_config,
|
|
1096
|
+
)
|
|
1097
|
+
|
|
1098
|
+
response_data: Any = None
|
|
1099
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
1100
|
+
return unmarshal_json_response(models.GetGroupsByIDResponse, http_res)
|
|
1101
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
1102
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
1103
|
+
raise errors.Error(response_data, http_res)
|
|
1104
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
1105
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1106
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1107
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
1108
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1109
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1110
|
+
|
|
1111
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
1112
|
+
|
|
1113
|
+
def get_groups_acl_by_id(
|
|
1114
|
+
self,
|
|
1115
|
+
*,
|
|
1116
|
+
id: str,
|
|
1117
|
+
type_: Optional[models.GetGroupsACLByIDType] = None,
|
|
1118
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1119
|
+
server_url: Optional[str] = None,
|
|
1120
|
+
timeout_ms: Optional[int] = None,
|
|
1121
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
1122
|
+
) -> models.GetGroupsACLByIDResponse:
|
|
1123
|
+
r"""ACL of members with permissions for resources in this Group
|
|
1124
|
+
|
|
1125
|
+
ACL of members with permissions for resources in this Group
|
|
1126
|
+
|
|
1127
|
+
:param id: Group id
|
|
1128
|
+
:param type: resource type by which to filter access levels
|
|
1129
|
+
:param retries: Override the default retry configuration for this method
|
|
1130
|
+
:param server_url: Override the default server URL for this method
|
|
1131
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
1132
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
1133
|
+
"""
|
|
1134
|
+
base_url = None
|
|
1135
|
+
url_variables = None
|
|
1136
|
+
if timeout_ms is None:
|
|
1137
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
1138
|
+
|
|
1139
|
+
if server_url is not None:
|
|
1140
|
+
base_url = server_url
|
|
1141
|
+
else:
|
|
1142
|
+
base_url = self._get_url(base_url, url_variables)
|
|
1143
|
+
|
|
1144
|
+
request = models.GetGroupsACLByIDRequest(
|
|
1145
|
+
id=id,
|
|
1146
|
+
type=type_,
|
|
1147
|
+
)
|
|
1148
|
+
|
|
1149
|
+
req = self._build_request(
|
|
1150
|
+
method="GET",
|
|
1151
|
+
path="/master/groups/{id}/acl",
|
|
1152
|
+
base_url=base_url,
|
|
1153
|
+
url_variables=url_variables,
|
|
1154
|
+
request=request,
|
|
1155
|
+
request_body_required=False,
|
|
1156
|
+
request_has_path_params=True,
|
|
1157
|
+
request_has_query_params=True,
|
|
1158
|
+
user_agent_header="user-agent",
|
|
1159
|
+
accept_header_value="application/json",
|
|
1160
|
+
http_headers=http_headers,
|
|
1161
|
+
security=self.sdk_configuration.security,
|
|
1162
|
+
timeout_ms=timeout_ms,
|
|
1163
|
+
)
|
|
1164
|
+
|
|
1165
|
+
if retries == UNSET:
|
|
1166
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
1167
|
+
retries = self.sdk_configuration.retry_config
|
|
1168
|
+
|
|
1169
|
+
retry_config = None
|
|
1170
|
+
if isinstance(retries, utils.RetryConfig):
|
|
1171
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
1172
|
+
|
|
1173
|
+
http_res = self.do_request(
|
|
1174
|
+
hook_ctx=HookContext(
|
|
1175
|
+
config=self.sdk_configuration,
|
|
1176
|
+
base_url=base_url or "",
|
|
1177
|
+
operation_id="getGroupsAclById",
|
|
1178
|
+
oauth2_scopes=[],
|
|
1179
|
+
security_source=get_security_from_env(
|
|
1180
|
+
self.sdk_configuration.security, models.Security
|
|
1181
|
+
),
|
|
1182
|
+
),
|
|
1183
|
+
request=req,
|
|
1184
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
1185
|
+
retry_config=retry_config,
|
|
1186
|
+
)
|
|
1187
|
+
|
|
1188
|
+
response_data: Any = None
|
|
1189
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
1190
|
+
return unmarshal_json_response(models.GetGroupsACLByIDResponse, http_res)
|
|
1191
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
1192
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
1193
|
+
raise errors.Error(response_data, http_res)
|
|
1194
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
1195
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
1196
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1197
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
1198
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
1199
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1200
|
+
|
|
1201
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
1202
|
+
|
|
1203
|
+
async def get_groups_acl_by_id_async(
|
|
1204
|
+
self,
|
|
1205
|
+
*,
|
|
1206
|
+
id: str,
|
|
1207
|
+
type_: Optional[models.GetGroupsACLByIDType] = None,
|
|
1208
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1209
|
+
server_url: Optional[str] = None,
|
|
1210
|
+
timeout_ms: Optional[int] = None,
|
|
1211
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
1212
|
+
) -> models.GetGroupsACLByIDResponse:
|
|
1213
|
+
r"""ACL of members with permissions for resources in this Group
|
|
1214
|
+
|
|
1215
|
+
ACL of members with permissions for resources in this Group
|
|
1216
|
+
|
|
1217
|
+
:param id: Group id
|
|
1218
|
+
:param type: resource type by which to filter access levels
|
|
1219
|
+
:param retries: Override the default retry configuration for this method
|
|
1220
|
+
:param server_url: Override the default server URL for this method
|
|
1221
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
1222
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
1223
|
+
"""
|
|
1224
|
+
base_url = None
|
|
1225
|
+
url_variables = None
|
|
1226
|
+
if timeout_ms is None:
|
|
1227
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
1228
|
+
|
|
1229
|
+
if server_url is not None:
|
|
1230
|
+
base_url = server_url
|
|
1231
|
+
else:
|
|
1232
|
+
base_url = self._get_url(base_url, url_variables)
|
|
1233
|
+
|
|
1234
|
+
request = models.GetGroupsACLByIDRequest(
|
|
1235
|
+
id=id,
|
|
1236
|
+
type=type_,
|
|
1237
|
+
)
|
|
1238
|
+
|
|
1239
|
+
req = self._build_request_async(
|
|
1240
|
+
method="GET",
|
|
1241
|
+
path="/master/groups/{id}/acl",
|
|
1242
|
+
base_url=base_url,
|
|
1243
|
+
url_variables=url_variables,
|
|
1244
|
+
request=request,
|
|
1245
|
+
request_body_required=False,
|
|
1246
|
+
request_has_path_params=True,
|
|
1247
|
+
request_has_query_params=True,
|
|
1248
|
+
user_agent_header="user-agent",
|
|
1249
|
+
accept_header_value="application/json",
|
|
1250
|
+
http_headers=http_headers,
|
|
1251
|
+
security=self.sdk_configuration.security,
|
|
1252
|
+
timeout_ms=timeout_ms,
|
|
1253
|
+
)
|
|
1254
|
+
|
|
1255
|
+
if retries == UNSET:
|
|
1256
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
1257
|
+
retries = self.sdk_configuration.retry_config
|
|
1258
|
+
|
|
1259
|
+
retry_config = None
|
|
1260
|
+
if isinstance(retries, utils.RetryConfig):
|
|
1261
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
1262
|
+
|
|
1263
|
+
http_res = await self.do_request_async(
|
|
1264
|
+
hook_ctx=HookContext(
|
|
1265
|
+
config=self.sdk_configuration,
|
|
1266
|
+
base_url=base_url or "",
|
|
1267
|
+
operation_id="getGroupsAclById",
|
|
1268
|
+
oauth2_scopes=[],
|
|
1269
|
+
security_source=get_security_from_env(
|
|
1270
|
+
self.sdk_configuration.security, models.Security
|
|
1271
|
+
),
|
|
1272
|
+
),
|
|
1273
|
+
request=req,
|
|
1274
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
1275
|
+
retry_config=retry_config,
|
|
1276
|
+
)
|
|
1277
|
+
|
|
1278
|
+
response_data: Any = None
|
|
1279
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
1280
|
+
return unmarshal_json_response(models.GetGroupsACLByIDResponse, http_res)
|
|
1281
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
1282
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
1283
|
+
raise errors.Error(response_data, http_res)
|
|
1284
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
1285
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1286
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1287
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
1288
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1289
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1290
|
+
|
|
1291
|
+
raise errors.APIError("Unexpected response received", http_res)
|