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.

Files changed (46) hide show
  1. cribl_control_plane/_version.py +3 -3
  2. cribl_control_plane/commits.py +4 -4
  3. cribl_control_plane/cribl.py +513 -0
  4. cribl_control_plane/destinations.py +3 -3
  5. cribl_control_plane/{samples.py → destinations_samples.py} +1 -1
  6. cribl_control_plane/models/__init__.py +829 -189
  7. cribl_control_plane/models/authconfig.py +43 -0
  8. cribl_control_plane/models/commonservicelimitconfigs.py +14 -0
  9. cribl_control_plane/models/edgeheartbeatmetricsmode.py +11 -0
  10. cribl_control_plane/models/getpacksbyidop.py +37 -0
  11. cribl_control_plane/models/getsystemsettingsauthop.py +24 -0
  12. cribl_control_plane/models/getsystemsettingsconfop.py +24 -0
  13. cribl_control_plane/models/getsystemsettingsgitsettingsop.py +24 -0
  14. cribl_control_plane/models/gitopstype.py +10 -0
  15. cribl_control_plane/models/gitrevertparams.py +3 -3
  16. cribl_control_plane/models/gitsettings.py +70 -0
  17. cribl_control_plane/models/input.py +77 -76
  18. cribl_control_plane/models/inputgrafana.py +678 -67
  19. cribl_control_plane/models/inputsyslog.py +406 -37
  20. cribl_control_plane/models/inputwizwebhook.py +393 -0
  21. cribl_control_plane/models/jobsettings.py +83 -0
  22. cribl_control_plane/models/limits.py +127 -0
  23. cribl_control_plane/models/output.py +75 -77
  24. cribl_control_plane/models/outputgrafanacloud.py +565 -69
  25. cribl_control_plane/models/rediscachelimits.py +38 -0
  26. cribl_control_plane/models/redisconnectionlimits.py +20 -0
  27. cribl_control_plane/models/redislimits.py +14 -0
  28. cribl_control_plane/models/searchsettings.py +71 -0
  29. cribl_control_plane/models/serviceslimits.py +23 -0
  30. cribl_control_plane/models/systemsettings.py +358 -0
  31. cribl_control_plane/models/systemsettingsconf.py +311 -0
  32. cribl_control_plane/models/updatesystemsettingsauthop.py +24 -0
  33. cribl_control_plane/models/updatesystemsettingsconfop.py +24 -0
  34. cribl_control_plane/models/updatesystemsettingsgitsettingsop.py +24 -0
  35. cribl_control_plane/models/upgradegroupsettings.py +24 -0
  36. cribl_control_plane/models/upgradepackageurls.py +20 -0
  37. cribl_control_plane/models/upgradesettings.py +36 -0
  38. cribl_control_plane/packs.py +174 -0
  39. cribl_control_plane/sdk.py +3 -0
  40. cribl_control_plane/settings.py +23 -0
  41. cribl_control_plane/settings_auth.py +339 -0
  42. cribl_control_plane/settings_git.py +339 -0
  43. cribl_control_plane/system_sdk.py +17 -0
  44. {cribl_control_plane-0.0.37a1.dist-info → cribl_control_plane-0.0.38a1.dist-info}/METADATA +22 -5
  45. {cribl_control_plane-0.0.37a1.dist-info → cribl_control_plane-0.0.38a1.dist-info}/RECORD +46 -16
  46. {cribl_control_plane-0.0.37a1.dist-info → cribl_control_plane-0.0.38a1.dist-info}/WHEEL +0 -0
@@ -0,0 +1,311 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .upgradegroupsettings import UpgradeGroupSettings, UpgradeGroupSettingsTypedDict
5
+ from .upgradesettings import UpgradeSettings, UpgradeSettingsTypedDict
6
+ from cribl_control_plane.types import BaseModel
7
+ from enum import Enum
8
+ import pydantic
9
+ from typing import List, Optional
10
+ from typing_extensions import Annotated, NotRequired, TypedDict
11
+
12
+
13
+ class SystemSettingsConfHeadersTypedDict(TypedDict):
14
+ pass
15
+
16
+
17
+ class SystemSettingsConfHeaders(BaseModel):
18
+ pass
19
+
20
+
21
+ class SystemSettingsConfSslTypedDict(TypedDict):
22
+ cert_path: str
23
+ disabled: bool
24
+ passphrase: str
25
+ priv_key_path: str
26
+ ca_path: NotRequired[str]
27
+
28
+
29
+ class SystemSettingsConfSsl(BaseModel):
30
+ cert_path: Annotated[str, pydantic.Field(alias="certPath")]
31
+
32
+ disabled: bool
33
+
34
+ passphrase: str
35
+
36
+ priv_key_path: Annotated[str, pydantic.Field(alias="privKeyPath")]
37
+
38
+ ca_path: Annotated[Optional[str], pydantic.Field(alias="caPath")] = None
39
+
40
+
41
+ class SystemSettingsConfAPITypedDict(TypedDict):
42
+ disabled: bool
43
+ host: str
44
+ port: float
45
+ protocol: str
46
+ ssl: SystemSettingsConfSslTypedDict
47
+ worker_remote_access: bool
48
+ base_url: NotRequired[str]
49
+ disable_api_cache: NotRequired[bool]
50
+ headers: NotRequired[SystemSettingsConfHeadersTypedDict]
51
+ idle_session_ttl: NotRequired[float]
52
+ listen_on_port: NotRequired[bool]
53
+ login_rate_limit: NotRequired[str]
54
+ scripts: NotRequired[bool]
55
+ sensitive_fields: NotRequired[List[str]]
56
+ sso_rate_limit: NotRequired[str]
57
+
58
+
59
+ class SystemSettingsConfAPI(BaseModel):
60
+ disabled: bool
61
+
62
+ host: str
63
+
64
+ port: float
65
+
66
+ protocol: str
67
+
68
+ ssl: SystemSettingsConfSsl
69
+
70
+ worker_remote_access: Annotated[bool, pydantic.Field(alias="workerRemoteAccess")]
71
+
72
+ base_url: Annotated[Optional[str], pydantic.Field(alias="baseUrl")] = None
73
+
74
+ disable_api_cache: Annotated[
75
+ Optional[bool], pydantic.Field(alias="disableApiCache")
76
+ ] = None
77
+
78
+ headers: Optional[SystemSettingsConfHeaders] = None
79
+
80
+ idle_session_ttl: Annotated[
81
+ Optional[float], pydantic.Field(alias="idleSessionTTL")
82
+ ] = None
83
+
84
+ listen_on_port: Annotated[Optional[bool], pydantic.Field(alias="listenOnPort")] = (
85
+ None
86
+ )
87
+
88
+ login_rate_limit: Annotated[
89
+ Optional[str], pydantic.Field(alias="loginRateLimit")
90
+ ] = None
91
+
92
+ scripts: Optional[bool] = None
93
+
94
+ sensitive_fields: Annotated[
95
+ Optional[List[str]], pydantic.Field(alias="sensitiveFields")
96
+ ] = None
97
+
98
+ sso_rate_limit: Annotated[Optional[str], pydantic.Field(alias="ssoRateLimit")] = (
99
+ None
100
+ )
101
+
102
+
103
+ class SystemSettingsConfBackupsTypedDict(TypedDict):
104
+ backup_persistence: str
105
+ backups_directory: str
106
+
107
+
108
+ class SystemSettingsConfBackups(BaseModel):
109
+ backup_persistence: Annotated[str, pydantic.Field(alias="backupPersistence")]
110
+
111
+ backups_directory: Annotated[str, pydantic.Field(alias="backupsDirectory")]
112
+
113
+
114
+ class SystemSettingsConfCustomLogoTypedDict(TypedDict):
115
+ enabled: bool
116
+ logo_description: str
117
+ logo_image: str
118
+
119
+
120
+ class SystemSettingsConfCustomLogo(BaseModel):
121
+ enabled: bool
122
+
123
+ logo_description: Annotated[str, pydantic.Field(alias="logoDescription")]
124
+
125
+ logo_image: Annotated[str, pydantic.Field(alias="logoImage")]
126
+
127
+
128
+ class SystemSettingsConfPiiTypedDict(TypedDict):
129
+ enable_pii_detection: bool
130
+
131
+
132
+ class SystemSettingsConfPii(BaseModel):
133
+ enable_pii_detection: Annotated[bool, pydantic.Field(alias="enablePiiDetection")]
134
+
135
+
136
+ class SystemSettingsConfProxyTypedDict(TypedDict):
137
+ use_env_vars: bool
138
+
139
+
140
+ class SystemSettingsConfProxy(BaseModel):
141
+ use_env_vars: Annotated[bool, pydantic.Field(alias="useEnvVars")]
142
+
143
+
144
+ class SystemSettingsConfRollbackTypedDict(TypedDict):
145
+ rollback_enabled: bool
146
+ rollback_retries: NotRequired[float]
147
+ rollback_timeout: NotRequired[float]
148
+
149
+
150
+ class SystemSettingsConfRollback(BaseModel):
151
+ rollback_enabled: Annotated[bool, pydantic.Field(alias="rollbackEnabled")]
152
+
153
+ rollback_retries: Annotated[
154
+ Optional[float], pydantic.Field(alias="rollbackRetries")
155
+ ] = None
156
+
157
+ rollback_timeout: Annotated[
158
+ Optional[float], pydantic.Field(alias="rollbackTimeout")
159
+ ] = None
160
+
161
+
162
+ class SystemSettingsConfShutdownTypedDict(TypedDict):
163
+ drain_timeout: float
164
+
165
+
166
+ class SystemSettingsConfShutdown(BaseModel):
167
+ drain_timeout: Annotated[float, pydantic.Field(alias="drainTimeout")]
168
+
169
+
170
+ class SystemSettingsConfSniTypedDict(TypedDict):
171
+ disable_sni_routing: bool
172
+
173
+
174
+ class SystemSettingsConfSni(BaseModel):
175
+ disable_sni_routing: Annotated[bool, pydantic.Field(alias="disableSNIRouting")]
176
+
177
+
178
+ class SystemSettingsConfSocketsTypedDict(TypedDict):
179
+ directory: NotRequired[str]
180
+
181
+
182
+ class SystemSettingsConfSockets(BaseModel):
183
+ directory: Optional[str] = None
184
+
185
+
186
+ class SystemSettingsConfUpgrade(str, Enum):
187
+ FALSE = "false"
188
+ API = "api"
189
+
190
+
191
+ class SystemSettingsConfSystemTypedDict(TypedDict):
192
+ intercom: bool
193
+ upgrade: SystemSettingsConfUpgrade
194
+
195
+
196
+ class SystemSettingsConfSystem(BaseModel):
197
+ intercom: bool
198
+
199
+ upgrade: SystemSettingsConfUpgrade
200
+
201
+
202
+ class SystemSettingsConfTLSTypedDict(TypedDict):
203
+ default_cipher_list: str
204
+ default_ecdh_curve: str
205
+ max_version: str
206
+ min_version: str
207
+ reject_unauthorized: bool
208
+
209
+
210
+ class SystemSettingsConfTLS(BaseModel):
211
+ default_cipher_list: Annotated[str, pydantic.Field(alias="defaultCipherList")]
212
+
213
+ default_ecdh_curve: Annotated[str, pydantic.Field(alias="defaultEcdhCurve")]
214
+
215
+ max_version: Annotated[str, pydantic.Field(alias="maxVersion")]
216
+
217
+ min_version: Annotated[str, pydantic.Field(alias="minVersion")]
218
+
219
+ reject_unauthorized: Annotated[bool, pydantic.Field(alias="rejectUnauthorized")]
220
+
221
+
222
+ class SystemSettingsConfWorkersTypedDict(TypedDict):
223
+ count: float
224
+ memory: float
225
+ minimum: float
226
+ enable_heap_snapshots: NotRequired[bool]
227
+ load_throttle_perc: NotRequired[float]
228
+ startup_max_conns: NotRequired[float]
229
+ startup_throttle_timeout: NotRequired[float]
230
+ v8_single_thread: NotRequired[bool]
231
+
232
+
233
+ class SystemSettingsConfWorkers(BaseModel):
234
+ count: float
235
+
236
+ memory: float
237
+
238
+ minimum: float
239
+
240
+ enable_heap_snapshots: Annotated[
241
+ Optional[bool], pydantic.Field(alias="enableHeapSnapshots")
242
+ ] = None
243
+
244
+ load_throttle_perc: Annotated[
245
+ Optional[float], pydantic.Field(alias="loadThrottlePerc")
246
+ ] = None
247
+
248
+ startup_max_conns: Annotated[
249
+ Optional[float], pydantic.Field(alias="startupMaxConns")
250
+ ] = None
251
+
252
+ startup_throttle_timeout: Annotated[
253
+ Optional[float], pydantic.Field(alias="startupThrottleTimeout")
254
+ ] = None
255
+
256
+ v8_single_thread: Annotated[
257
+ Optional[bool], pydantic.Field(alias="v8SingleThread")
258
+ ] = None
259
+
260
+
261
+ class SystemSettingsConfTypedDict(TypedDict):
262
+ api: SystemSettingsConfAPITypedDict
263
+ backups: SystemSettingsConfBackupsTypedDict
264
+ custom_logo: SystemSettingsConfCustomLogoTypedDict
265
+ pii: SystemSettingsConfPiiTypedDict
266
+ proxy: SystemSettingsConfProxyTypedDict
267
+ rollback: SystemSettingsConfRollbackTypedDict
268
+ shutdown: SystemSettingsConfShutdownTypedDict
269
+ sni: SystemSettingsConfSniTypedDict
270
+ system: SystemSettingsConfSystemTypedDict
271
+ tls: SystemSettingsConfTLSTypedDict
272
+ upgrade_group_settings: UpgradeGroupSettingsTypedDict
273
+ upgrade_settings: UpgradeSettingsTypedDict
274
+ workers: SystemSettingsConfWorkersTypedDict
275
+ sockets: NotRequired[SystemSettingsConfSocketsTypedDict]
276
+
277
+
278
+ class SystemSettingsConf(BaseModel):
279
+ api: SystemSettingsConfAPI
280
+
281
+ backups: SystemSettingsConfBackups
282
+
283
+ custom_logo: Annotated[
284
+ SystemSettingsConfCustomLogo, pydantic.Field(alias="customLogo")
285
+ ]
286
+
287
+ pii: SystemSettingsConfPii
288
+
289
+ proxy: SystemSettingsConfProxy
290
+
291
+ rollback: SystemSettingsConfRollback
292
+
293
+ shutdown: SystemSettingsConfShutdown
294
+
295
+ sni: SystemSettingsConfSni
296
+
297
+ system: SystemSettingsConfSystem
298
+
299
+ tls: SystemSettingsConfTLS
300
+
301
+ upgrade_group_settings: Annotated[
302
+ UpgradeGroupSettings, pydantic.Field(alias="upgradeGroupSettings")
303
+ ]
304
+
305
+ upgrade_settings: Annotated[
306
+ UpgradeSettings, pydantic.Field(alias="upgradeSettings")
307
+ ]
308
+
309
+ workers: SystemSettingsConfWorkers
310
+
311
+ sockets: Optional[SystemSettingsConfSockets] = None
@@ -0,0 +1,24 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .authconfig import AuthConfig, AuthConfigTypedDict
5
+ from cribl_control_plane.types import BaseModel
6
+ from typing import List, Optional
7
+ from typing_extensions import NotRequired, TypedDict
8
+
9
+
10
+ class UpdateSystemSettingsAuthResponseTypedDict(TypedDict):
11
+ r"""a list of AuthConfig objects"""
12
+
13
+ count: NotRequired[int]
14
+ r"""number of items present in the items array"""
15
+ items: NotRequired[List[AuthConfigTypedDict]]
16
+
17
+
18
+ class UpdateSystemSettingsAuthResponse(BaseModel):
19
+ r"""a list of AuthConfig objects"""
20
+
21
+ count: Optional[int] = None
22
+ r"""number of items present in the items array"""
23
+
24
+ items: Optional[List[AuthConfig]] = None
@@ -0,0 +1,24 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .systemsettings import SystemSettings, SystemSettingsTypedDict
5
+ from cribl_control_plane.types import BaseModel
6
+ from typing import List, Optional
7
+ from typing_extensions import NotRequired, TypedDict
8
+
9
+
10
+ class UpdateSystemSettingsConfResponseTypedDict(TypedDict):
11
+ r"""a list of SystemSettings objects"""
12
+
13
+ count: NotRequired[int]
14
+ r"""number of items present in the items array"""
15
+ items: NotRequired[List[SystemSettingsTypedDict]]
16
+
17
+
18
+ class UpdateSystemSettingsConfResponse(BaseModel):
19
+ r"""a list of SystemSettings objects"""
20
+
21
+ count: Optional[int] = None
22
+ r"""number of items present in the items array"""
23
+
24
+ items: Optional[List[SystemSettings]] = None
@@ -0,0 +1,24 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .gitsettings import GitSettings, GitSettingsTypedDict
5
+ from cribl_control_plane.types import BaseModel
6
+ from typing import List, Optional
7
+ from typing_extensions import NotRequired, TypedDict
8
+
9
+
10
+ class UpdateSystemSettingsGitSettingsResponseTypedDict(TypedDict):
11
+ r"""a list of GitSettings objects"""
12
+
13
+ count: NotRequired[int]
14
+ r"""number of items present in the items array"""
15
+ items: NotRequired[List[GitSettingsTypedDict]]
16
+
17
+
18
+ class UpdateSystemSettingsGitSettingsResponse(BaseModel):
19
+ r"""a list of GitSettings objects"""
20
+
21
+ count: Optional[int] = None
22
+ r"""number of items present in the items array"""
23
+
24
+ items: Optional[List[GitSettings]] = None
@@ -0,0 +1,24 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from cribl_control_plane.types import BaseModel
5
+ import pydantic
6
+ from typing import Optional
7
+ from typing_extensions import Annotated, NotRequired, TypedDict
8
+
9
+
10
+ class UpgradeGroupSettingsTypedDict(TypedDict):
11
+ is_rolling: NotRequired[bool]
12
+ quantity: NotRequired[float]
13
+ retry_count: NotRequired[float]
14
+ retry_delay: NotRequired[float]
15
+
16
+
17
+ class UpgradeGroupSettings(BaseModel):
18
+ is_rolling: Annotated[Optional[bool], pydantic.Field(alias="isRolling")] = None
19
+
20
+ quantity: Optional[float] = None
21
+
22
+ retry_count: Annotated[Optional[float], pydantic.Field(alias="retryCount")] = None
23
+
24
+ retry_delay: Annotated[Optional[float], pydantic.Field(alias="retryDelay")] = None
@@ -0,0 +1,20 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from cribl_control_plane.types import BaseModel
5
+ import pydantic
6
+ from typing import Optional
7
+ from typing_extensions import Annotated, NotRequired, TypedDict
8
+
9
+
10
+ class UpgradePackageUrlsTypedDict(TypedDict):
11
+ package_url: str
12
+ package_hash_url: NotRequired[str]
13
+
14
+
15
+ class UpgradePackageUrls(BaseModel):
16
+ package_url: Annotated[str, pydantic.Field(alias="packageUrl")]
17
+
18
+ package_hash_url: Annotated[
19
+ Optional[str], pydantic.Field(alias="packageHashUrl")
20
+ ] = None
@@ -0,0 +1,36 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from __future__ import annotations
4
+ from .upgradepackageurls import UpgradePackageUrls, UpgradePackageUrlsTypedDict
5
+ from cribl_control_plane.types import BaseModel
6
+ import pydantic
7
+ from typing import List, Optional
8
+ from typing_extensions import Annotated, NotRequired, TypedDict
9
+
10
+
11
+ class UpgradeSettingsTypedDict(TypedDict):
12
+ disable_automatic_upgrade: bool
13
+ enable_legacy_edge_upgrade: bool
14
+ upgrade_source: str
15
+ automatic_upgrade_check_period: NotRequired[str]
16
+ package_urls: NotRequired[List[UpgradePackageUrlsTypedDict]]
17
+
18
+
19
+ class UpgradeSettings(BaseModel):
20
+ disable_automatic_upgrade: Annotated[
21
+ bool, pydantic.Field(alias="disableAutomaticUpgrade")
22
+ ]
23
+
24
+ enable_legacy_edge_upgrade: Annotated[
25
+ bool, pydantic.Field(alias="enableLegacyEdgeUpgrade")
26
+ ]
27
+
28
+ upgrade_source: Annotated[str, pydantic.Field(alias="upgradeSource")]
29
+
30
+ automatic_upgrade_check_period: Annotated[
31
+ Optional[str], pydantic.Field(alias="automaticUpgradeCheckPeriod")
32
+ ] = None
33
+
34
+ package_urls: Annotated[
35
+ Optional[List[UpgradePackageUrls]], pydantic.Field(alias="packageUrls")
36
+ ] = None
@@ -622,6 +622,180 @@ class Packs(BaseSDK):
622
622
 
623
623
  raise errors.APIError("Unexpected response received", http_res)
624
624
 
625
+ def get(
626
+ self,
627
+ *,
628
+ id: str,
629
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
630
+ server_url: Optional[str] = None,
631
+ timeout_ms: Optional[int] = None,
632
+ http_headers: Optional[Mapping[str, str]] = None,
633
+ ) -> models.GetPacksByIDResponse:
634
+ r"""Get a Pack
635
+
636
+ Get the specified Pack.
637
+
638
+ :param id: The <code>id</code> of the Pack to get.
639
+ :param retries: Override the default retry configuration for this method
640
+ :param server_url: Override the default server URL for this method
641
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
642
+ :param http_headers: Additional headers to set or replace on requests.
643
+ """
644
+ base_url = None
645
+ url_variables = None
646
+ if timeout_ms is None:
647
+ timeout_ms = self.sdk_configuration.timeout_ms
648
+
649
+ if server_url is not None:
650
+ base_url = server_url
651
+ else:
652
+ base_url = self._get_url(base_url, url_variables)
653
+
654
+ request = models.GetPacksByIDRequest(
655
+ id=id,
656
+ )
657
+
658
+ req = self._build_request(
659
+ method="GET",
660
+ path="/packs/{id}",
661
+ base_url=base_url,
662
+ url_variables=url_variables,
663
+ request=request,
664
+ request_body_required=False,
665
+ request_has_path_params=True,
666
+ request_has_query_params=True,
667
+ user_agent_header="user-agent",
668
+ accept_header_value="application/json",
669
+ http_headers=http_headers,
670
+ security=self.sdk_configuration.security,
671
+ timeout_ms=timeout_ms,
672
+ )
673
+
674
+ if retries == UNSET:
675
+ if self.sdk_configuration.retry_config is not UNSET:
676
+ retries = self.sdk_configuration.retry_config
677
+
678
+ retry_config = None
679
+ if isinstance(retries, utils.RetryConfig):
680
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
681
+
682
+ http_res = self.do_request(
683
+ hook_ctx=HookContext(
684
+ config=self.sdk_configuration,
685
+ base_url=base_url or "",
686
+ operation_id="getPacksById",
687
+ oauth2_scopes=[],
688
+ security_source=get_security_from_env(
689
+ self.sdk_configuration.security, models.Security
690
+ ),
691
+ ),
692
+ request=req,
693
+ error_status_codes=["401", "4XX", "500", "5XX"],
694
+ retry_config=retry_config,
695
+ )
696
+
697
+ response_data: Any = None
698
+ if utils.match_response(http_res, "200", "application/json"):
699
+ return unmarshal_json_response(models.GetPacksByIDResponse, http_res)
700
+ if utils.match_response(http_res, "500", "application/json"):
701
+ response_data = unmarshal_json_response(errors.ErrorData, http_res)
702
+ raise errors.Error(response_data, http_res)
703
+ if utils.match_response(http_res, ["401", "4XX"], "*"):
704
+ http_res_text = utils.stream_to_text(http_res)
705
+ raise errors.APIError("API error occurred", http_res, http_res_text)
706
+ if utils.match_response(http_res, "5XX", "*"):
707
+ http_res_text = utils.stream_to_text(http_res)
708
+ raise errors.APIError("API error occurred", http_res, http_res_text)
709
+
710
+ raise errors.APIError("Unexpected response received", http_res)
711
+
712
+ async def get_async(
713
+ self,
714
+ *,
715
+ id: str,
716
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
717
+ server_url: Optional[str] = None,
718
+ timeout_ms: Optional[int] = None,
719
+ http_headers: Optional[Mapping[str, str]] = None,
720
+ ) -> models.GetPacksByIDResponse:
721
+ r"""Get a Pack
722
+
723
+ Get the specified Pack.
724
+
725
+ :param id: The <code>id</code> of the Pack to get.
726
+ :param retries: Override the default retry configuration for this method
727
+ :param server_url: Override the default server URL for this method
728
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
729
+ :param http_headers: Additional headers to set or replace on requests.
730
+ """
731
+ base_url = None
732
+ url_variables = None
733
+ if timeout_ms is None:
734
+ timeout_ms = self.sdk_configuration.timeout_ms
735
+
736
+ if server_url is not None:
737
+ base_url = server_url
738
+ else:
739
+ base_url = self._get_url(base_url, url_variables)
740
+
741
+ request = models.GetPacksByIDRequest(
742
+ id=id,
743
+ )
744
+
745
+ req = self._build_request_async(
746
+ method="GET",
747
+ path="/packs/{id}",
748
+ base_url=base_url,
749
+ url_variables=url_variables,
750
+ request=request,
751
+ request_body_required=False,
752
+ request_has_path_params=True,
753
+ request_has_query_params=True,
754
+ user_agent_header="user-agent",
755
+ accept_header_value="application/json",
756
+ http_headers=http_headers,
757
+ security=self.sdk_configuration.security,
758
+ timeout_ms=timeout_ms,
759
+ )
760
+
761
+ if retries == UNSET:
762
+ if self.sdk_configuration.retry_config is not UNSET:
763
+ retries = self.sdk_configuration.retry_config
764
+
765
+ retry_config = None
766
+ if isinstance(retries, utils.RetryConfig):
767
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
768
+
769
+ http_res = await self.do_request_async(
770
+ hook_ctx=HookContext(
771
+ config=self.sdk_configuration,
772
+ base_url=base_url or "",
773
+ operation_id="getPacksById",
774
+ oauth2_scopes=[],
775
+ security_source=get_security_from_env(
776
+ self.sdk_configuration.security, models.Security
777
+ ),
778
+ ),
779
+ request=req,
780
+ error_status_codes=["401", "4XX", "500", "5XX"],
781
+ retry_config=retry_config,
782
+ )
783
+
784
+ response_data: Any = None
785
+ if utils.match_response(http_res, "200", "application/json"):
786
+ return unmarshal_json_response(models.GetPacksByIDResponse, http_res)
787
+ if utils.match_response(http_res, "500", "application/json"):
788
+ response_data = unmarshal_json_response(errors.ErrorData, http_res)
789
+ raise errors.Error(response_data, http_res)
790
+ if utils.match_response(http_res, ["401", "4XX"], "*"):
791
+ http_res_text = await utils.stream_to_text_async(http_res)
792
+ raise errors.APIError("API error occurred", http_res, http_res_text)
793
+ if utils.match_response(http_res, "5XX", "*"):
794
+ http_res_text = await utils.stream_to_text_async(http_res)
795
+ raise errors.APIError("API error occurred", http_res, http_res_text)
796
+
797
+ raise errors.APIError("Unexpected response received", http_res)
798
+
625
799
  def update(
626
800
  self,
627
801
  *,
@@ -24,6 +24,7 @@ if TYPE_CHECKING:
24
24
  from cribl_control_plane.pipelines import Pipelines
25
25
  from cribl_control_plane.routes_sdk import RoutesSDK
26
26
  from cribl_control_plane.sources import Sources
27
+ from cribl_control_plane.system_sdk import SystemSDK
27
28
  from cribl_control_plane.versions import Versions
28
29
 
29
30
 
@@ -45,6 +46,7 @@ class CriblControlPlane(BaseSDK):
45
46
  r"""Actions related to REST server health"""
46
47
  packs: "Packs"
47
48
  r"""Actions related to Packs"""
49
+ system: "SystemSDK"
48
50
  versions: "Versions"
49
51
  groups: "GroupsSDK"
50
52
  r"""Actions related to Groups"""
@@ -58,6 +60,7 @@ class CriblControlPlane(BaseSDK):
58
60
  "nodes": ("cribl_control_plane.nodes", "Nodes"),
59
61
  "health": ("cribl_control_plane.health", "Health"),
60
62
  "packs": ("cribl_control_plane.packs", "Packs"),
63
+ "system": ("cribl_control_plane.system_sdk", "SystemSDK"),
61
64
  "versions": ("cribl_control_plane.versions", "Versions"),
62
65
  "groups": ("cribl_control_plane.groups_sdk", "GroupsSDK"),
63
66
  }
@@ -0,0 +1,23 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+
3
+ from .basesdk import BaseSDK
4
+ from .sdkconfiguration import SDKConfiguration
5
+ from cribl_control_plane.cribl import Cribl
6
+ from cribl_control_plane.settings_auth import SettingsAuth
7
+ from cribl_control_plane.settings_git import SettingsGit
8
+
9
+
10
+ class Settings(BaseSDK):
11
+ auth: SettingsAuth
12
+ cribl: Cribl
13
+ git: SettingsGit
14
+
15
+ def __init__(self, sdk_config: SDKConfiguration) -> None:
16
+ BaseSDK.__init__(self, sdk_config)
17
+ self.sdk_configuration = sdk_config
18
+ self._init_sdks()
19
+
20
+ def _init_sdks(self):
21
+ self.auth = SettingsAuth(self.sdk_configuration)
22
+ self.cribl = Cribl(self.sdk_configuration)
23
+ self.git = SettingsGit(self.sdk_configuration)