cribl-control-plane 0.0.37a1__py3-none-any.whl → 0.0.38a1__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/commits.py +4 -4
- cribl_control_plane/cribl.py +513 -0
- cribl_control_plane/destinations.py +3 -3
- cribl_control_plane/{samples.py → destinations_samples.py} +1 -1
- cribl_control_plane/models/__init__.py +829 -189
- cribl_control_plane/models/authconfig.py +43 -0
- cribl_control_plane/models/commonservicelimitconfigs.py +14 -0
- cribl_control_plane/models/edgeheartbeatmetricsmode.py +11 -0
- cribl_control_plane/models/getpacksbyidop.py +37 -0
- cribl_control_plane/models/getsystemsettingsauthop.py +24 -0
- cribl_control_plane/models/getsystemsettingsconfop.py +24 -0
- cribl_control_plane/models/getsystemsettingsgitsettingsop.py +24 -0
- cribl_control_plane/models/gitopstype.py +10 -0
- cribl_control_plane/models/gitrevertparams.py +3 -3
- cribl_control_plane/models/gitsettings.py +70 -0
- cribl_control_plane/models/input.py +77 -76
- cribl_control_plane/models/inputgrafana.py +678 -67
- cribl_control_plane/models/inputsyslog.py +406 -37
- cribl_control_plane/models/inputwizwebhook.py +393 -0
- cribl_control_plane/models/jobsettings.py +83 -0
- cribl_control_plane/models/limits.py +127 -0
- cribl_control_plane/models/output.py +75 -77
- cribl_control_plane/models/outputgrafanacloud.py +565 -69
- cribl_control_plane/models/rediscachelimits.py +38 -0
- cribl_control_plane/models/redisconnectionlimits.py +20 -0
- cribl_control_plane/models/redislimits.py +14 -0
- cribl_control_plane/models/searchsettings.py +71 -0
- cribl_control_plane/models/serviceslimits.py +23 -0
- cribl_control_plane/models/systemsettings.py +358 -0
- cribl_control_plane/models/systemsettingsconf.py +311 -0
- cribl_control_plane/models/updatesystemsettingsauthop.py +24 -0
- cribl_control_plane/models/updatesystemsettingsconfop.py +24 -0
- cribl_control_plane/models/updatesystemsettingsgitsettingsop.py +24 -0
- cribl_control_plane/models/upgradegroupsettings.py +24 -0
- cribl_control_plane/models/upgradepackageurls.py +20 -0
- cribl_control_plane/models/upgradesettings.py +36 -0
- cribl_control_plane/packs.py +174 -0
- cribl_control_plane/sdk.py +3 -0
- cribl_control_plane/settings.py +23 -0
- cribl_control_plane/settings_auth.py +339 -0
- cribl_control_plane/settings_git.py +339 -0
- cribl_control_plane/system_sdk.py +17 -0
- {cribl_control_plane-0.0.37a1.dist-info → cribl_control_plane-0.0.38a1.dist-info}/METADATA +22 -5
- {cribl_control_plane-0.0.37a1.dist-info → cribl_control_plane-0.0.38a1.dist-info}/RECORD +46 -16
- {cribl_control_plane-0.0.37a1.dist-info → cribl_control_plane-0.0.38a1.dist-info}/WHEEL +0 -0
cribl_control_plane/_version.py
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import importlib.metadata
|
|
4
4
|
|
|
5
5
|
__title__: str = "cribl-control-plane"
|
|
6
|
-
__version__: str = "0.0.
|
|
7
|
-
__openapi_doc_version__: str = "4.14.0-alpha.
|
|
6
|
+
__version__: str = "0.0.38a1"
|
|
7
|
+
__openapi_doc_version__: str = "4.14.0-alpha.1755863151363-73823764"
|
|
8
8
|
__gen_version__: str = "2.686.7"
|
|
9
|
-
__user_agent__: str = "speakeasy-sdk/python 0.0.
|
|
9
|
+
__user_agent__: str = "speakeasy-sdk/python 0.0.38a1 2.686.7 4.14.0-alpha.1755863151363-73823764 cribl-control-plane"
|
|
10
10
|
|
|
11
11
|
try:
|
|
12
12
|
if __package__ is not None:
|
cribl_control_plane/commits.py
CHANGED
|
@@ -756,9 +756,9 @@ class Commits(BaseSDK):
|
|
|
756
756
|
self,
|
|
757
757
|
*,
|
|
758
758
|
commit: str,
|
|
759
|
-
message: str,
|
|
760
759
|
group: Optional[str] = None,
|
|
761
760
|
force: Optional[bool] = None,
|
|
761
|
+
message: Optional[str] = None,
|
|
762
762
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
763
763
|
server_url: Optional[str] = None,
|
|
764
764
|
timeout_ms: Optional[int] = None,
|
|
@@ -769,9 +769,9 @@ class Commits(BaseSDK):
|
|
|
769
769
|
Revert a commit in the local repository.
|
|
770
770
|
|
|
771
771
|
:param commit:
|
|
772
|
-
:param message:
|
|
773
772
|
:param group: Group ID
|
|
774
773
|
:param force:
|
|
774
|
+
:param message:
|
|
775
775
|
:param retries: Override the default retry configuration for this method
|
|
776
776
|
:param server_url: Override the default server URL for this method
|
|
777
777
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -857,9 +857,9 @@ class Commits(BaseSDK):
|
|
|
857
857
|
self,
|
|
858
858
|
*,
|
|
859
859
|
commit: str,
|
|
860
|
-
message: str,
|
|
861
860
|
group: Optional[str] = None,
|
|
862
861
|
force: Optional[bool] = None,
|
|
862
|
+
message: Optional[str] = None,
|
|
863
863
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
864
864
|
server_url: Optional[str] = None,
|
|
865
865
|
timeout_ms: Optional[int] = None,
|
|
@@ -870,9 +870,9 @@ class Commits(BaseSDK):
|
|
|
870
870
|
Revert a commit in the local repository.
|
|
871
871
|
|
|
872
872
|
:param commit:
|
|
873
|
-
:param message:
|
|
874
873
|
:param group: Group ID
|
|
875
874
|
:param force:
|
|
875
|
+
:param message:
|
|
876
876
|
:param retries: Override the default retry configuration for this method
|
|
877
877
|
:param server_url: Override the default server URL for this method
|
|
878
878
|
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
@@ -0,0 +1,513 @@
|
|
|
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, Union
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Cribl(BaseSDK):
|
|
13
|
+
def list(
|
|
14
|
+
self,
|
|
15
|
+
*,
|
|
16
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
17
|
+
server_url: Optional[str] = None,
|
|
18
|
+
timeout_ms: Optional[int] = None,
|
|
19
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
20
|
+
) -> models.GetSystemSettingsConfResponse:
|
|
21
|
+
r"""Get Cribl system settings
|
|
22
|
+
|
|
23
|
+
Get Cribl system settings
|
|
24
|
+
|
|
25
|
+
:param retries: Override the default retry configuration for this method
|
|
26
|
+
:param server_url: Override the default server URL for this method
|
|
27
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
28
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
29
|
+
"""
|
|
30
|
+
base_url = None
|
|
31
|
+
url_variables = None
|
|
32
|
+
if timeout_ms is None:
|
|
33
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
34
|
+
|
|
35
|
+
if server_url is not None:
|
|
36
|
+
base_url = server_url
|
|
37
|
+
else:
|
|
38
|
+
base_url = self._get_url(base_url, url_variables)
|
|
39
|
+
req = self._build_request(
|
|
40
|
+
method="GET",
|
|
41
|
+
path="/system/settings/conf",
|
|
42
|
+
base_url=base_url,
|
|
43
|
+
url_variables=url_variables,
|
|
44
|
+
request=None,
|
|
45
|
+
request_body_required=False,
|
|
46
|
+
request_has_path_params=False,
|
|
47
|
+
request_has_query_params=True,
|
|
48
|
+
user_agent_header="user-agent",
|
|
49
|
+
accept_header_value="application/json",
|
|
50
|
+
http_headers=http_headers,
|
|
51
|
+
security=self.sdk_configuration.security,
|
|
52
|
+
timeout_ms=timeout_ms,
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
if retries == UNSET:
|
|
56
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
57
|
+
retries = self.sdk_configuration.retry_config
|
|
58
|
+
|
|
59
|
+
retry_config = None
|
|
60
|
+
if isinstance(retries, utils.RetryConfig):
|
|
61
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
62
|
+
|
|
63
|
+
http_res = self.do_request(
|
|
64
|
+
hook_ctx=HookContext(
|
|
65
|
+
config=self.sdk_configuration,
|
|
66
|
+
base_url=base_url or "",
|
|
67
|
+
operation_id="getSystemSettingsConf",
|
|
68
|
+
oauth2_scopes=[],
|
|
69
|
+
security_source=get_security_from_env(
|
|
70
|
+
self.sdk_configuration.security, models.Security
|
|
71
|
+
),
|
|
72
|
+
),
|
|
73
|
+
request=req,
|
|
74
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
75
|
+
retry_config=retry_config,
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
response_data: Any = None
|
|
79
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
80
|
+
return unmarshal_json_response(
|
|
81
|
+
models.GetSystemSettingsConfResponse, http_res
|
|
82
|
+
)
|
|
83
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
84
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
85
|
+
raise errors.Error(response_data, http_res)
|
|
86
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
87
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
88
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
89
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
90
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
91
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
92
|
+
|
|
93
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
94
|
+
|
|
95
|
+
async def list_async(
|
|
96
|
+
self,
|
|
97
|
+
*,
|
|
98
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
99
|
+
server_url: Optional[str] = None,
|
|
100
|
+
timeout_ms: Optional[int] = None,
|
|
101
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
102
|
+
) -> models.GetSystemSettingsConfResponse:
|
|
103
|
+
r"""Get Cribl system settings
|
|
104
|
+
|
|
105
|
+
Get Cribl system settings
|
|
106
|
+
|
|
107
|
+
:param retries: Override the default retry configuration for this method
|
|
108
|
+
:param server_url: Override the default server URL for this method
|
|
109
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
110
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
111
|
+
"""
|
|
112
|
+
base_url = None
|
|
113
|
+
url_variables = None
|
|
114
|
+
if timeout_ms is None:
|
|
115
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
116
|
+
|
|
117
|
+
if server_url is not None:
|
|
118
|
+
base_url = server_url
|
|
119
|
+
else:
|
|
120
|
+
base_url = self._get_url(base_url, url_variables)
|
|
121
|
+
req = self._build_request_async(
|
|
122
|
+
method="GET",
|
|
123
|
+
path="/system/settings/conf",
|
|
124
|
+
base_url=base_url,
|
|
125
|
+
url_variables=url_variables,
|
|
126
|
+
request=None,
|
|
127
|
+
request_body_required=False,
|
|
128
|
+
request_has_path_params=False,
|
|
129
|
+
request_has_query_params=True,
|
|
130
|
+
user_agent_header="user-agent",
|
|
131
|
+
accept_header_value="application/json",
|
|
132
|
+
http_headers=http_headers,
|
|
133
|
+
security=self.sdk_configuration.security,
|
|
134
|
+
timeout_ms=timeout_ms,
|
|
135
|
+
)
|
|
136
|
+
|
|
137
|
+
if retries == UNSET:
|
|
138
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
139
|
+
retries = self.sdk_configuration.retry_config
|
|
140
|
+
|
|
141
|
+
retry_config = None
|
|
142
|
+
if isinstance(retries, utils.RetryConfig):
|
|
143
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
144
|
+
|
|
145
|
+
http_res = await self.do_request_async(
|
|
146
|
+
hook_ctx=HookContext(
|
|
147
|
+
config=self.sdk_configuration,
|
|
148
|
+
base_url=base_url or "",
|
|
149
|
+
operation_id="getSystemSettingsConf",
|
|
150
|
+
oauth2_scopes=[],
|
|
151
|
+
security_source=get_security_from_env(
|
|
152
|
+
self.sdk_configuration.security, models.Security
|
|
153
|
+
),
|
|
154
|
+
),
|
|
155
|
+
request=req,
|
|
156
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
157
|
+
retry_config=retry_config,
|
|
158
|
+
)
|
|
159
|
+
|
|
160
|
+
response_data: Any = None
|
|
161
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
162
|
+
return unmarshal_json_response(
|
|
163
|
+
models.GetSystemSettingsConfResponse, http_res
|
|
164
|
+
)
|
|
165
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
166
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
167
|
+
raise errors.Error(response_data, http_res)
|
|
168
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
169
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
170
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
171
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
172
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
173
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
174
|
+
|
|
175
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
176
|
+
|
|
177
|
+
def update(
|
|
178
|
+
self,
|
|
179
|
+
*,
|
|
180
|
+
api: Union[models.SystemSettingsConfAPI, models.SystemSettingsConfAPITypedDict],
|
|
181
|
+
backups: Union[
|
|
182
|
+
models.SystemSettingsConfBackups, models.SystemSettingsConfBackupsTypedDict
|
|
183
|
+
],
|
|
184
|
+
custom_logo: Union[
|
|
185
|
+
models.SystemSettingsConfCustomLogo,
|
|
186
|
+
models.SystemSettingsConfCustomLogoTypedDict,
|
|
187
|
+
],
|
|
188
|
+
pii: Union[models.SystemSettingsConfPii, models.SystemSettingsConfPiiTypedDict],
|
|
189
|
+
proxy: Union[
|
|
190
|
+
models.SystemSettingsConfProxy, models.SystemSettingsConfProxyTypedDict
|
|
191
|
+
],
|
|
192
|
+
rollback: Union[
|
|
193
|
+
models.SystemSettingsConfRollback,
|
|
194
|
+
models.SystemSettingsConfRollbackTypedDict,
|
|
195
|
+
],
|
|
196
|
+
shutdown: Union[
|
|
197
|
+
models.SystemSettingsConfShutdown,
|
|
198
|
+
models.SystemSettingsConfShutdownTypedDict,
|
|
199
|
+
],
|
|
200
|
+
sni: Union[models.SystemSettingsConfSni, models.SystemSettingsConfSniTypedDict],
|
|
201
|
+
system: Union[
|
|
202
|
+
models.SystemSettingsConfSystem, models.SystemSettingsConfSystemTypedDict
|
|
203
|
+
],
|
|
204
|
+
tls: Union[models.SystemSettingsConfTLS, models.SystemSettingsConfTLSTypedDict],
|
|
205
|
+
upgrade_group_settings: Union[
|
|
206
|
+
models.UpgradeGroupSettings, models.UpgradeGroupSettingsTypedDict
|
|
207
|
+
],
|
|
208
|
+
upgrade_settings: Union[
|
|
209
|
+
models.UpgradeSettings, models.UpgradeSettingsTypedDict
|
|
210
|
+
],
|
|
211
|
+
workers: Union[
|
|
212
|
+
models.SystemSettingsConfWorkers, models.SystemSettingsConfWorkersTypedDict
|
|
213
|
+
],
|
|
214
|
+
sockets: Optional[
|
|
215
|
+
Union[
|
|
216
|
+
models.SystemSettingsConfSockets,
|
|
217
|
+
models.SystemSettingsConfSocketsTypedDict,
|
|
218
|
+
]
|
|
219
|
+
] = None,
|
|
220
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
221
|
+
server_url: Optional[str] = None,
|
|
222
|
+
timeout_ms: Optional[int] = None,
|
|
223
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
224
|
+
) -> models.UpdateSystemSettingsConfResponse:
|
|
225
|
+
r"""Update Cribl system settings
|
|
226
|
+
|
|
227
|
+
Update Cribl system settings
|
|
228
|
+
|
|
229
|
+
:param api:
|
|
230
|
+
:param backups:
|
|
231
|
+
:param custom_logo:
|
|
232
|
+
:param pii:
|
|
233
|
+
:param proxy:
|
|
234
|
+
:param rollback:
|
|
235
|
+
:param shutdown:
|
|
236
|
+
:param sni:
|
|
237
|
+
:param system:
|
|
238
|
+
:param tls:
|
|
239
|
+
:param upgrade_group_settings:
|
|
240
|
+
:param upgrade_settings:
|
|
241
|
+
:param workers:
|
|
242
|
+
:param sockets:
|
|
243
|
+
:param retries: Override the default retry configuration for this method
|
|
244
|
+
:param server_url: Override the default server URL for this method
|
|
245
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
246
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
247
|
+
"""
|
|
248
|
+
base_url = None
|
|
249
|
+
url_variables = None
|
|
250
|
+
if timeout_ms is None:
|
|
251
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
252
|
+
|
|
253
|
+
if server_url is not None:
|
|
254
|
+
base_url = server_url
|
|
255
|
+
else:
|
|
256
|
+
base_url = self._get_url(base_url, url_variables)
|
|
257
|
+
|
|
258
|
+
request = models.SystemSettingsConf(
|
|
259
|
+
api=utils.get_pydantic_model(api, models.SystemSettingsConfAPI),
|
|
260
|
+
backups=utils.get_pydantic_model(backups, models.SystemSettingsConfBackups),
|
|
261
|
+
custom_logo=utils.get_pydantic_model(
|
|
262
|
+
custom_logo, models.SystemSettingsConfCustomLogo
|
|
263
|
+
),
|
|
264
|
+
pii=utils.get_pydantic_model(pii, models.SystemSettingsConfPii),
|
|
265
|
+
proxy=utils.get_pydantic_model(proxy, models.SystemSettingsConfProxy),
|
|
266
|
+
rollback=utils.get_pydantic_model(
|
|
267
|
+
rollback, models.SystemSettingsConfRollback
|
|
268
|
+
),
|
|
269
|
+
shutdown=utils.get_pydantic_model(
|
|
270
|
+
shutdown, models.SystemSettingsConfShutdown
|
|
271
|
+
),
|
|
272
|
+
sni=utils.get_pydantic_model(sni, models.SystemSettingsConfSni),
|
|
273
|
+
sockets=utils.get_pydantic_model(
|
|
274
|
+
sockets, Optional[models.SystemSettingsConfSockets]
|
|
275
|
+
),
|
|
276
|
+
system=utils.get_pydantic_model(system, models.SystemSettingsConfSystem),
|
|
277
|
+
tls=utils.get_pydantic_model(tls, models.SystemSettingsConfTLS),
|
|
278
|
+
upgrade_group_settings=utils.get_pydantic_model(
|
|
279
|
+
upgrade_group_settings, models.UpgradeGroupSettings
|
|
280
|
+
),
|
|
281
|
+
upgrade_settings=utils.get_pydantic_model(
|
|
282
|
+
upgrade_settings, models.UpgradeSettings
|
|
283
|
+
),
|
|
284
|
+
workers=utils.get_pydantic_model(workers, models.SystemSettingsConfWorkers),
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
req = self._build_request(
|
|
288
|
+
method="PATCH",
|
|
289
|
+
path="/system/settings/conf",
|
|
290
|
+
base_url=base_url,
|
|
291
|
+
url_variables=url_variables,
|
|
292
|
+
request=request,
|
|
293
|
+
request_body_required=True,
|
|
294
|
+
request_has_path_params=False,
|
|
295
|
+
request_has_query_params=True,
|
|
296
|
+
user_agent_header="user-agent",
|
|
297
|
+
accept_header_value="application/json",
|
|
298
|
+
http_headers=http_headers,
|
|
299
|
+
security=self.sdk_configuration.security,
|
|
300
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
301
|
+
request, False, False, "json", models.SystemSettingsConf
|
|
302
|
+
),
|
|
303
|
+
timeout_ms=timeout_ms,
|
|
304
|
+
)
|
|
305
|
+
|
|
306
|
+
if retries == UNSET:
|
|
307
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
308
|
+
retries = self.sdk_configuration.retry_config
|
|
309
|
+
|
|
310
|
+
retry_config = None
|
|
311
|
+
if isinstance(retries, utils.RetryConfig):
|
|
312
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
313
|
+
|
|
314
|
+
http_res = self.do_request(
|
|
315
|
+
hook_ctx=HookContext(
|
|
316
|
+
config=self.sdk_configuration,
|
|
317
|
+
base_url=base_url or "",
|
|
318
|
+
operation_id="updateSystemSettingsConf",
|
|
319
|
+
oauth2_scopes=[],
|
|
320
|
+
security_source=get_security_from_env(
|
|
321
|
+
self.sdk_configuration.security, models.Security
|
|
322
|
+
),
|
|
323
|
+
),
|
|
324
|
+
request=req,
|
|
325
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
326
|
+
retry_config=retry_config,
|
|
327
|
+
)
|
|
328
|
+
|
|
329
|
+
response_data: Any = None
|
|
330
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
331
|
+
return unmarshal_json_response(
|
|
332
|
+
models.UpdateSystemSettingsConfResponse, http_res
|
|
333
|
+
)
|
|
334
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
335
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
336
|
+
raise errors.Error(response_data, http_res)
|
|
337
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
338
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
339
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
340
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
341
|
+
http_res_text = utils.stream_to_text(http_res)
|
|
342
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
343
|
+
|
|
344
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
345
|
+
|
|
346
|
+
async def update_async(
|
|
347
|
+
self,
|
|
348
|
+
*,
|
|
349
|
+
api: Union[models.SystemSettingsConfAPI, models.SystemSettingsConfAPITypedDict],
|
|
350
|
+
backups: Union[
|
|
351
|
+
models.SystemSettingsConfBackups, models.SystemSettingsConfBackupsTypedDict
|
|
352
|
+
],
|
|
353
|
+
custom_logo: Union[
|
|
354
|
+
models.SystemSettingsConfCustomLogo,
|
|
355
|
+
models.SystemSettingsConfCustomLogoTypedDict,
|
|
356
|
+
],
|
|
357
|
+
pii: Union[models.SystemSettingsConfPii, models.SystemSettingsConfPiiTypedDict],
|
|
358
|
+
proxy: Union[
|
|
359
|
+
models.SystemSettingsConfProxy, models.SystemSettingsConfProxyTypedDict
|
|
360
|
+
],
|
|
361
|
+
rollback: Union[
|
|
362
|
+
models.SystemSettingsConfRollback,
|
|
363
|
+
models.SystemSettingsConfRollbackTypedDict,
|
|
364
|
+
],
|
|
365
|
+
shutdown: Union[
|
|
366
|
+
models.SystemSettingsConfShutdown,
|
|
367
|
+
models.SystemSettingsConfShutdownTypedDict,
|
|
368
|
+
],
|
|
369
|
+
sni: Union[models.SystemSettingsConfSni, models.SystemSettingsConfSniTypedDict],
|
|
370
|
+
system: Union[
|
|
371
|
+
models.SystemSettingsConfSystem, models.SystemSettingsConfSystemTypedDict
|
|
372
|
+
],
|
|
373
|
+
tls: Union[models.SystemSettingsConfTLS, models.SystemSettingsConfTLSTypedDict],
|
|
374
|
+
upgrade_group_settings: Union[
|
|
375
|
+
models.UpgradeGroupSettings, models.UpgradeGroupSettingsTypedDict
|
|
376
|
+
],
|
|
377
|
+
upgrade_settings: Union[
|
|
378
|
+
models.UpgradeSettings, models.UpgradeSettingsTypedDict
|
|
379
|
+
],
|
|
380
|
+
workers: Union[
|
|
381
|
+
models.SystemSettingsConfWorkers, models.SystemSettingsConfWorkersTypedDict
|
|
382
|
+
],
|
|
383
|
+
sockets: Optional[
|
|
384
|
+
Union[
|
|
385
|
+
models.SystemSettingsConfSockets,
|
|
386
|
+
models.SystemSettingsConfSocketsTypedDict,
|
|
387
|
+
]
|
|
388
|
+
] = None,
|
|
389
|
+
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
390
|
+
server_url: Optional[str] = None,
|
|
391
|
+
timeout_ms: Optional[int] = None,
|
|
392
|
+
http_headers: Optional[Mapping[str, str]] = None,
|
|
393
|
+
) -> models.UpdateSystemSettingsConfResponse:
|
|
394
|
+
r"""Update Cribl system settings
|
|
395
|
+
|
|
396
|
+
Update Cribl system settings
|
|
397
|
+
|
|
398
|
+
:param api:
|
|
399
|
+
:param backups:
|
|
400
|
+
:param custom_logo:
|
|
401
|
+
:param pii:
|
|
402
|
+
:param proxy:
|
|
403
|
+
:param rollback:
|
|
404
|
+
:param shutdown:
|
|
405
|
+
:param sni:
|
|
406
|
+
:param system:
|
|
407
|
+
:param tls:
|
|
408
|
+
:param upgrade_group_settings:
|
|
409
|
+
:param upgrade_settings:
|
|
410
|
+
:param workers:
|
|
411
|
+
:param sockets:
|
|
412
|
+
:param retries: Override the default retry configuration for this method
|
|
413
|
+
:param server_url: Override the default server URL for this method
|
|
414
|
+
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
415
|
+
:param http_headers: Additional headers to set or replace on requests.
|
|
416
|
+
"""
|
|
417
|
+
base_url = None
|
|
418
|
+
url_variables = None
|
|
419
|
+
if timeout_ms is None:
|
|
420
|
+
timeout_ms = self.sdk_configuration.timeout_ms
|
|
421
|
+
|
|
422
|
+
if server_url is not None:
|
|
423
|
+
base_url = server_url
|
|
424
|
+
else:
|
|
425
|
+
base_url = self._get_url(base_url, url_variables)
|
|
426
|
+
|
|
427
|
+
request = models.SystemSettingsConf(
|
|
428
|
+
api=utils.get_pydantic_model(api, models.SystemSettingsConfAPI),
|
|
429
|
+
backups=utils.get_pydantic_model(backups, models.SystemSettingsConfBackups),
|
|
430
|
+
custom_logo=utils.get_pydantic_model(
|
|
431
|
+
custom_logo, models.SystemSettingsConfCustomLogo
|
|
432
|
+
),
|
|
433
|
+
pii=utils.get_pydantic_model(pii, models.SystemSettingsConfPii),
|
|
434
|
+
proxy=utils.get_pydantic_model(proxy, models.SystemSettingsConfProxy),
|
|
435
|
+
rollback=utils.get_pydantic_model(
|
|
436
|
+
rollback, models.SystemSettingsConfRollback
|
|
437
|
+
),
|
|
438
|
+
shutdown=utils.get_pydantic_model(
|
|
439
|
+
shutdown, models.SystemSettingsConfShutdown
|
|
440
|
+
),
|
|
441
|
+
sni=utils.get_pydantic_model(sni, models.SystemSettingsConfSni),
|
|
442
|
+
sockets=utils.get_pydantic_model(
|
|
443
|
+
sockets, Optional[models.SystemSettingsConfSockets]
|
|
444
|
+
),
|
|
445
|
+
system=utils.get_pydantic_model(system, models.SystemSettingsConfSystem),
|
|
446
|
+
tls=utils.get_pydantic_model(tls, models.SystemSettingsConfTLS),
|
|
447
|
+
upgrade_group_settings=utils.get_pydantic_model(
|
|
448
|
+
upgrade_group_settings, models.UpgradeGroupSettings
|
|
449
|
+
),
|
|
450
|
+
upgrade_settings=utils.get_pydantic_model(
|
|
451
|
+
upgrade_settings, models.UpgradeSettings
|
|
452
|
+
),
|
|
453
|
+
workers=utils.get_pydantic_model(workers, models.SystemSettingsConfWorkers),
|
|
454
|
+
)
|
|
455
|
+
|
|
456
|
+
req = self._build_request_async(
|
|
457
|
+
method="PATCH",
|
|
458
|
+
path="/system/settings/conf",
|
|
459
|
+
base_url=base_url,
|
|
460
|
+
url_variables=url_variables,
|
|
461
|
+
request=request,
|
|
462
|
+
request_body_required=True,
|
|
463
|
+
request_has_path_params=False,
|
|
464
|
+
request_has_query_params=True,
|
|
465
|
+
user_agent_header="user-agent",
|
|
466
|
+
accept_header_value="application/json",
|
|
467
|
+
http_headers=http_headers,
|
|
468
|
+
security=self.sdk_configuration.security,
|
|
469
|
+
get_serialized_body=lambda: utils.serialize_request_body(
|
|
470
|
+
request, False, False, "json", models.SystemSettingsConf
|
|
471
|
+
),
|
|
472
|
+
timeout_ms=timeout_ms,
|
|
473
|
+
)
|
|
474
|
+
|
|
475
|
+
if retries == UNSET:
|
|
476
|
+
if self.sdk_configuration.retry_config is not UNSET:
|
|
477
|
+
retries = self.sdk_configuration.retry_config
|
|
478
|
+
|
|
479
|
+
retry_config = None
|
|
480
|
+
if isinstance(retries, utils.RetryConfig):
|
|
481
|
+
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
482
|
+
|
|
483
|
+
http_res = await self.do_request_async(
|
|
484
|
+
hook_ctx=HookContext(
|
|
485
|
+
config=self.sdk_configuration,
|
|
486
|
+
base_url=base_url or "",
|
|
487
|
+
operation_id="updateSystemSettingsConf",
|
|
488
|
+
oauth2_scopes=[],
|
|
489
|
+
security_source=get_security_from_env(
|
|
490
|
+
self.sdk_configuration.security, models.Security
|
|
491
|
+
),
|
|
492
|
+
),
|
|
493
|
+
request=req,
|
|
494
|
+
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
495
|
+
retry_config=retry_config,
|
|
496
|
+
)
|
|
497
|
+
|
|
498
|
+
response_data: Any = None
|
|
499
|
+
if utils.match_response(http_res, "200", "application/json"):
|
|
500
|
+
return unmarshal_json_response(
|
|
501
|
+
models.UpdateSystemSettingsConfResponse, http_res
|
|
502
|
+
)
|
|
503
|
+
if utils.match_response(http_res, "500", "application/json"):
|
|
504
|
+
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
505
|
+
raise errors.Error(response_data, http_res)
|
|
506
|
+
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
507
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
508
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
509
|
+
if utils.match_response(http_res, "5XX", "*"):
|
|
510
|
+
http_res_text = await utils.stream_to_text_async(http_res)
|
|
511
|
+
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
512
|
+
|
|
513
|
+
raise errors.APIError("Unexpected response received", http_res)
|
|
@@ -5,7 +5,7 @@ from .sdkconfiguration import SDKConfiguration
|
|
|
5
5
|
from cribl_control_plane import errors, models, utils
|
|
6
6
|
from cribl_control_plane._hooks import HookContext
|
|
7
7
|
from cribl_control_plane.destinations_pq import DestinationsPq
|
|
8
|
-
from cribl_control_plane.
|
|
8
|
+
from cribl_control_plane.destinations_samples import DestinationsSamples
|
|
9
9
|
from cribl_control_plane.types import BaseModel, OptionalNullable, UNSET
|
|
10
10
|
from cribl_control_plane.utils import get_security_from_env
|
|
11
11
|
from cribl_control_plane.utils.unmarshal_json_response import unmarshal_json_response
|
|
@@ -16,7 +16,7 @@ class Destinations(BaseSDK):
|
|
|
16
16
|
r"""Actions related to Destinations"""
|
|
17
17
|
|
|
18
18
|
pq: DestinationsPq
|
|
19
|
-
samples:
|
|
19
|
+
samples: DestinationsSamples
|
|
20
20
|
|
|
21
21
|
def __init__(self, sdk_config: SDKConfiguration) -> None:
|
|
22
22
|
BaseSDK.__init__(self, sdk_config)
|
|
@@ -25,7 +25,7 @@ class Destinations(BaseSDK):
|
|
|
25
25
|
|
|
26
26
|
def _init_sdks(self):
|
|
27
27
|
self.pq = DestinationsPq(self.sdk_configuration)
|
|
28
|
-
self.samples =
|
|
28
|
+
self.samples = DestinationsSamples(self.sdk_configuration)
|
|
29
29
|
|
|
30
30
|
def list(
|
|
31
31
|
self,
|