gcore 0.3.0__py3-none-any.whl → 0.5.0__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 gcore might be problematic. Click here for more details.

Files changed (226) hide show
  1. gcore/__init__.py +2 -1
  2. gcore/_base_client.py +31 -2
  3. gcore/_client.py +18 -0
  4. gcore/_constants.py +2 -2
  5. gcore/_models.py +8 -5
  6. gcore/_version.py +1 -1
  7. gcore/pagination.py +252 -1
  8. gcore/resources/__init__.py +28 -0
  9. gcore/resources/cloud/baremetal/flavors.py +11 -137
  10. gcore/resources/cloud/baremetal/images.py +10 -12
  11. gcore/resources/cloud/baremetal/servers.py +33 -30
  12. gcore/resources/cloud/billing_reservations.py +2 -2
  13. gcore/resources/cloud/file_shares/file_shares.py +7 -8
  14. gcore/resources/cloud/floating_ips.py +7 -12
  15. gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +33 -22
  16. gcore/resources/cloud/gpu_baremetal_clusters/images.py +9 -10
  17. gcore/resources/cloud/gpu_baremetal_clusters/interfaces.py +2 -2
  18. gcore/resources/cloud/gpu_baremetal_clusters/servers.py +8 -4
  19. gcore/resources/cloud/inference/deployments/deployments.py +76 -35
  20. gcore/resources/cloud/inference/deployments/logs.py +7 -7
  21. gcore/resources/cloud/inference/inference.py +5 -5
  22. gcore/resources/cloud/inference/models.py +16 -15
  23. gcore/resources/cloud/inference/registry_credentials.py +18 -18
  24. gcore/resources/cloud/inference/secrets.py +12 -13
  25. gcore/resources/cloud/instances/flavors.py +9 -233
  26. gcore/resources/cloud/instances/images.py +47 -37
  27. gcore/resources/cloud/instances/instances.py +49 -34
  28. gcore/resources/cloud/instances/interfaces.py +2 -2
  29. gcore/resources/cloud/ip_ranges.py +34 -2
  30. gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +10 -2
  31. gcore/resources/cloud/load_balancers/listeners.py +17 -8
  32. gcore/resources/cloud/load_balancers/load_balancers.py +73 -21
  33. gcore/resources/cloud/load_balancers/metrics.py +2 -2
  34. gcore/resources/cloud/load_balancers/pools/health_monitors.py +2 -2
  35. gcore/resources/cloud/load_balancers/pools/members.py +6 -2
  36. gcore/resources/cloud/networks/networks.py +81 -17
  37. gcore/resources/cloud/networks/routers.py +18 -18
  38. gcore/resources/cloud/networks/subnets.py +51 -11
  39. gcore/resources/cloud/projects.py +38 -24
  40. gcore/resources/cloud/quotas/quotas.py +6 -6
  41. gcore/resources/cloud/quotas/requests.py +8 -8
  42. gcore/resources/cloud/registries/artifacts.py +4 -4
  43. gcore/resources/cloud/registries/registries.py +14 -16
  44. gcore/resources/cloud/registries/repositories.py +4 -4
  45. gcore/resources/cloud/registries/tags.py +2 -2
  46. gcore/resources/cloud/registries/users.py +21 -22
  47. gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +20 -20
  48. gcore/resources/cloud/reserved_fixed_ips/vip.py +10 -10
  49. gcore/resources/cloud/secrets.py +14 -224
  50. gcore/resources/cloud/security_groups/rules.py +6 -6
  51. gcore/resources/cloud/security_groups/security_groups.py +70 -31
  52. gcore/resources/cloud/tasks.py +34 -32
  53. gcore/resources/cloud/users/role_assignments.py +12 -14
  54. gcore/resources/cloud/volumes.py +139 -49
  55. gcore/resources/fastedge/__init__.py +103 -0
  56. gcore/resources/fastedge/apps/__init__.py +33 -0
  57. gcore/resources/fastedge/apps/apps.py +932 -0
  58. gcore/resources/fastedge/apps/logs.py +248 -0
  59. gcore/resources/fastedge/binaries.py +286 -0
  60. gcore/resources/fastedge/fastedge.py +327 -0
  61. gcore/resources/fastedge/kv_stores.py +523 -0
  62. gcore/resources/fastedge/secrets.py +687 -0
  63. gcore/resources/fastedge/statistics.py +347 -0
  64. gcore/resources/fastedge/templates.py +652 -0
  65. gcore/resources/iam/__init__.py +47 -0
  66. gcore/resources/iam/api_tokens.py +521 -0
  67. gcore/resources/iam/iam.py +199 -0
  68. gcore/resources/iam/users.py +642 -0
  69. gcore/resources/waap/__init__.py +0 -14
  70. gcore/resources/waap/waap.py +0 -32
  71. gcore/types/cloud/__init__.py +2 -28
  72. gcore/types/cloud/baremetal/__init__.py +0 -1
  73. gcore/types/cloud/baremetal/image_list_params.py +1 -5
  74. gcore/types/cloud/baremetal/server_create_params.py +5 -9
  75. gcore/types/cloud/baremetal/server_list_params.py +1 -5
  76. gcore/types/cloud/ddos_profile.py +9 -3
  77. gcore/types/cloud/file_share_create_params.py +3 -5
  78. gcore/types/cloud/floating_ip_create_params.py +2 -4
  79. gcore/types/cloud/floating_ip_list_params.py +1 -5
  80. gcore/types/cloud/gpu_baremetal_cluster_create_params.py +3 -4
  81. gcore/types/cloud/gpu_baremetal_clusters/image_upload_params.py +2 -4
  82. gcore/types/cloud/health_monitor.py +6 -1
  83. gcore/types/cloud/inference/__init__.py +12 -8
  84. gcore/types/cloud/inference/deployment_create_params.py +224 -7
  85. gcore/types/cloud/inference/deployment_update_params.py +24 -3
  86. gcore/types/cloud/inference/deployments/__init__.py +1 -0
  87. gcore/types/cloud/inference/{inference_log.py → deployments/inference_deployment_log.py} +3 -3
  88. gcore/types/cloud/inference/inference_deployment.py +266 -0
  89. gcore/types/cloud/inference/{inference_apikey_secret.py → inference_deployment_api_key.py} +2 -2
  90. gcore/types/cloud/inference/{mlcatalog_model_card.py → inference_model.py} +2 -2
  91. gcore/types/cloud/inference/{inference_registry_credential.py → inference_registry_credentials.py} +2 -2
  92. gcore/types/cloud/inference/{inference_registry_credential_full.py → inference_registry_credentials_create.py} +2 -2
  93. gcore/types/cloud/inference/inference_secret.py +10 -3
  94. gcore/types/cloud/inference/model_list_params.py +2 -4
  95. gcore/types/cloud/{container_probe.py → inference/probe.py} +9 -9
  96. gcore/types/cloud/{container_probe_config.py → inference/probe_config.py} +5 -5
  97. gcore/types/cloud/{container_probe_exec.py → inference/probe_exec.py} +3 -3
  98. gcore/types/cloud/{container_probe_http_get.py → inference/probe_http_get.py} +3 -3
  99. gcore/types/cloud/{container_probe_tcp_socket.py → inference/probe_tcp_socket.py} +3 -3
  100. gcore/types/cloud/inference/secret_create_params.py +10 -4
  101. gcore/types/cloud/inference/secret_replace_params.py +10 -4
  102. gcore/types/cloud/{region_capacity.py → inference_region_capacity.py} +10 -3
  103. gcore/types/cloud/{region_capacity_list.py → inference_region_capacity_list.py} +4 -4
  104. gcore/types/cloud/instance_create_params.py +8 -9
  105. gcore/types/cloud/instance_list_params.py +1 -5
  106. gcore/types/cloud/instances/__init__.py +0 -2
  107. gcore/types/cloud/instances/image_create_from_volume_params.py +2 -4
  108. gcore/types/cloud/instances/image_list_params.py +1 -5
  109. gcore/types/cloud/instances/image_upload_params.py +2 -4
  110. gcore/types/cloud/load_balancer_create_params.py +8 -4
  111. gcore/types/cloud/load_balancer_list_params.py +1 -5
  112. gcore/types/cloud/load_balancer_update_params.py +24 -0
  113. gcore/types/cloud/load_balancers/pool_create_params.py +6 -1
  114. gcore/types/cloud/load_balancers/pool_update_params.py +6 -1
  115. gcore/types/cloud/load_balancers/pools/member_add_params.py +6 -1
  116. gcore/types/cloud/member.py +6 -1
  117. gcore/types/cloud/network_create_params.py +2 -3
  118. gcore/types/cloud/network_list_params.py +4 -5
  119. gcore/types/cloud/network_update_params.py +28 -2
  120. gcore/types/cloud/networks/router_list_params.py +2 -2
  121. gcore/types/cloud/networks/subnet_create_params.py +2 -3
  122. gcore/types/cloud/networks/subnet_list_params.py +1 -5
  123. gcore/types/cloud/networks/subnet_update_params.py +25 -0
  124. gcore/types/cloud/registries/__init__.py +1 -0
  125. gcore/types/cloud/registries/user_refresh_secret_response.py +31 -0
  126. gcore/types/cloud/reserved_fixed_ip_list_params.py +2 -2
  127. gcore/types/cloud/security_group_list_params.py +3 -7
  128. gcore/types/cloud/security_group_update_params.py +25 -0
  129. gcore/types/cloud/tag_update_map_param.py +2 -2
  130. gcore/types/cloud/task_list_params.py +15 -14
  131. gcore/types/cloud/volume_list_params.py +1 -5
  132. gcore/types/cloud/volume_update_params.py +29 -3
  133. gcore/types/fastedge/__init__.py +48 -0
  134. gcore/types/fastedge/app.py +81 -0
  135. gcore/types/fastedge/app_create_params.py +56 -0
  136. gcore/types/fastedge/app_list_params.py +50 -0
  137. gcore/types/fastedge/app_param.py +56 -0
  138. gcore/types/fastedge/app_replace_params.py +17 -0
  139. gcore/types/fastedge/app_short.py +60 -0
  140. gcore/types/fastedge/app_update_params.py +56 -0
  141. gcore/types/fastedge/apps/__init__.py +6 -0
  142. gcore/types/fastedge/apps/log.py +28 -0
  143. gcore/types/fastedge/apps/log_list_params.py +37 -0
  144. gcore/types/fastedge/binary.py +40 -0
  145. gcore/types/fastedge/binary_list_response.py +12 -0
  146. gcore/types/fastedge/binary_short.py +32 -0
  147. gcore/types/fastedge/call_status.py +24 -0
  148. gcore/types/fastedge/client.py +57 -0
  149. gcore/types/fastedge/duration_stats.py +30 -0
  150. gcore/types/fastedge/kv_store.py +33 -0
  151. gcore/types/fastedge/kv_store_create_params.py +23 -0
  152. gcore/types/fastedge/kv_store_get_response.py +10 -0
  153. gcore/types/fastedge/kv_store_list_params.py +12 -0
  154. gcore/types/fastedge/kv_store_list_response.py +15 -0
  155. gcore/types/fastedge/kv_store_replace_params.py +23 -0
  156. gcore/types/fastedge/kv_store_short.py +19 -0
  157. gcore/types/fastedge/kv_store_stats.py +26 -0
  158. gcore/types/fastedge/secret.py +29 -0
  159. gcore/types/fastedge/secret_create_params.py +27 -0
  160. gcore/types/fastedge/secret_create_response.py +12 -0
  161. gcore/types/fastedge/secret_delete_params.py +12 -0
  162. gcore/types/fastedge/secret_list_params.py +15 -0
  163. gcore/types/{cloud → fastedge}/secret_list_response.py +2 -6
  164. gcore/types/fastedge/secret_replace_params.py +27 -0
  165. gcore/types/fastedge/secret_short.py +21 -0
  166. gcore/types/fastedge/secret_update_params.py +27 -0
  167. gcore/types/fastedge/statistic_get_call_series_params.py +28 -0
  168. gcore/types/fastedge/statistic_get_call_series_response.py +12 -0
  169. gcore/types/fastedge/statistic_get_duration_series_params.py +28 -0
  170. gcore/types/fastedge/statistic_get_duration_series_response.py +12 -0
  171. gcore/types/fastedge/template.py +31 -0
  172. gcore/types/fastedge/template_create_params.py +30 -0
  173. gcore/types/fastedge/template_delete_params.py +12 -0
  174. gcore/types/fastedge/template_list_params.py +25 -0
  175. gcore/types/fastedge/template_parameter.py +22 -0
  176. gcore/types/fastedge/template_parameter_param.py +21 -0
  177. gcore/types/fastedge/template_replace_params.py +30 -0
  178. gcore/types/fastedge/template_short.py +27 -0
  179. gcore/types/iam/__init__.py +17 -0
  180. gcore/types/iam/account_overview.py +488 -0
  181. gcore/types/iam/api_token.py +78 -0
  182. gcore/types/iam/api_token_create.py +15 -0
  183. gcore/types/iam/api_token_create_params.py +42 -0
  184. gcore/types/iam/api_token_list.py +81 -0
  185. gcore/types/iam/api_token_list_params.py +41 -0
  186. gcore/types/iam/user.py +86 -0
  187. gcore/types/iam/user_detailed.py +104 -0
  188. gcore/types/iam/user_invite.py +15 -0
  189. gcore/types/iam/user_invite_params.py +37 -0
  190. gcore/types/iam/user_list_params.py +15 -0
  191. gcore/types/iam/user_update.py +104 -0
  192. gcore/types/iam/user_update_params.py +52 -0
  193. gcore/types/waap/__init__.py +0 -1
  194. gcore/types/waap/domains/custom_rule_create_params.py +7 -3
  195. gcore/types/waap/domains/custom_rule_update_params.py +7 -3
  196. gcore/types/waap/waap_custom_rule.py +7 -3
  197. {gcore-0.3.0.dist-info → gcore-0.5.0.dist-info}/METADATA +44 -5
  198. {gcore-0.3.0.dist-info → gcore-0.5.0.dist-info}/RECORD +200 -151
  199. gcore/resources/waap/clients.py +0 -135
  200. gcore/types/cloud/aws_iam_data.py +0 -13
  201. gcore/types/cloud/aws_iam_data_param.py +0 -15
  202. gcore/types/cloud/baremetal/flavor_list_suitable_params.py +0 -22
  203. gcore/types/cloud/capacity.py +0 -13
  204. gcore/types/cloud/container_probe_config_create_param.py +0 -17
  205. gcore/types/cloud/container_probe_create_param.py +0 -38
  206. gcore/types/cloud/container_probe_exec_create_param.py +0 -13
  207. gcore/types/cloud/container_probe_http_get_create_param.py +0 -25
  208. gcore/types/cloud/container_probe_tcp_socket_create_param.py +0 -12
  209. gcore/types/cloud/container_scale.py +0 -25
  210. gcore/types/cloud/container_scale_trigger_rate.py +0 -13
  211. gcore/types/cloud/container_scale_trigger_sqs.py +0 -33
  212. gcore/types/cloud/container_scale_trigger_threshold.py +0 -10
  213. gcore/types/cloud/container_scale_triggers.py +0 -36
  214. gcore/types/cloud/deploy_status.py +0 -13
  215. gcore/types/cloud/inference/container.py +0 -26
  216. gcore/types/cloud/inference/inference.py +0 -95
  217. gcore/types/cloud/inference/mlcatalog_order_by_choices.py +0 -7
  218. gcore/types/cloud/inference_probes.py +0 -19
  219. gcore/types/cloud/ingress_opts_out.py +0 -16
  220. gcore/types/cloud/ingress_opts_param.py +0 -18
  221. gcore/types/cloud/instances/flavor_list_for_resize_params.py +0 -16
  222. gcore/types/cloud/instances/flavor_list_suitable_params.py +0 -59
  223. gcore/types/cloud/secret_create_params.py +0 -66
  224. gcore/types/waap/client_me_response.py +0 -34
  225. {gcore-0.3.0.dist-info → gcore-0.5.0.dist-info}/WHEEL +0 -0
  226. {gcore-0.3.0.dist-info → gcore-0.5.0.dist-info}/licenses/LICENSE +0 -0
@@ -6,9 +6,7 @@ from typing import Dict, List, Iterable, Optional
6
6
  from typing_extensions import Required, Annotated, TypedDict
7
7
 
8
8
  from ...._utils import PropertyInfo
9
- from ..ingress_opts_param import IngressOptsParam
10
9
  from ..laas_index_retention_policy_param import LaasIndexRetentionPolicyParam
11
- from ..container_probe_config_create_param import ContainerProbeConfigCreateParam
12
10
 
13
11
  __all__ = [
14
12
  "DeploymentCreateParams",
@@ -21,8 +19,24 @@ __all__ = [
21
19
  "ContainerScaleTriggersHTTP",
22
20
  "ContainerScaleTriggersMemory",
23
21
  "ContainerScaleTriggersSqs",
22
+ "IngressOpts",
24
23
  "Logging",
25
24
  "Probes",
25
+ "ProbesLivenessProbe",
26
+ "ProbesLivenessProbeProbe",
27
+ "ProbesLivenessProbeProbeExec",
28
+ "ProbesLivenessProbeProbeHTTPGet",
29
+ "ProbesLivenessProbeProbeTcpSocket",
30
+ "ProbesReadinessProbe",
31
+ "ProbesReadinessProbeProbe",
32
+ "ProbesReadinessProbeProbeExec",
33
+ "ProbesReadinessProbeProbeHTTPGet",
34
+ "ProbesReadinessProbeProbeTcpSocket",
35
+ "ProbesStartupProbe",
36
+ "ProbesStartupProbeProbe",
37
+ "ProbesStartupProbeProbeExec",
38
+ "ProbesStartupProbeProbeHTTPGet",
39
+ "ProbesStartupProbeProbeTcpSocket",
26
40
  ]
27
41
 
28
42
 
@@ -50,11 +64,20 @@ class DeploymentCreateParams(TypedDict, total=False):
50
64
  name: Required[str]
51
65
  """Inference instance name."""
52
66
 
67
+ api_keys: List[str]
68
+ """List of API keys for the inference instance.
69
+
70
+ Multiple keys can be attached to one deployment.If `auth_enabled` and `api_keys`
71
+ are both specified, a ValidationError will be raised.
72
+ """
73
+
53
74
  auth_enabled: bool
54
75
  """Set to `true` to enable API key authentication for the inference instance.
55
76
 
56
77
  `"Authorization": "Bearer ****\\**"` or `"X-Api-Key": "****\\**"` header is required
57
- for the requests to the instance if enabled
78
+ for the requests to the instance if enabled. This field is deprecated and will
79
+ be removed in the future. Use `api_keys` field instead.If `auth_enabled` and
80
+ `api_keys` are both specified, a ValidationError will be raised.
58
81
  """
59
82
 
60
83
  command: Optional[List[str]]
@@ -69,7 +92,7 @@ class DeploymentCreateParams(TypedDict, total=False):
69
92
  envs: Dict[str, str]
70
93
  """Environment variables for the inference instance."""
71
94
 
72
- ingress_opts: Optional[IngressOptsParam]
95
+ ingress_opts: Optional[IngressOpts]
73
96
  """Ingress options for the inference instance"""
74
97
 
75
98
  logging: Optional[Logging]
@@ -197,6 +220,17 @@ class Container(TypedDict, total=False):
197
220
  """Scale for the container"""
198
221
 
199
222
 
223
+ class IngressOpts(TypedDict, total=False):
224
+ disable_response_buffering: bool
225
+ """Disable response buffering if true.
226
+
227
+ A client usually has a much slower connection and can not consume the response
228
+ data as fast as it is produced by an upstream application. Ingress tries to
229
+ buffer the whole response in order to release the upstream application as soon
230
+ as possible.By default, the response buffering is enabled.
231
+ """
232
+
233
+
200
234
  class Logging(TypedDict, total=False):
201
235
  destination_region_id: Optional[int]
202
236
  """ID of the region in which the logs will be stored"""
@@ -211,12 +245,195 @@ class Logging(TypedDict, total=False):
211
245
  """The topic name to stream logs to"""
212
246
 
213
247
 
248
+ class ProbesLivenessProbeProbeExec(TypedDict, total=False):
249
+ command: Required[List[str]]
250
+ """Command to be executed inside the running container."""
251
+
252
+
253
+ class ProbesLivenessProbeProbeHTTPGet(TypedDict, total=False):
254
+ port: Required[int]
255
+ """Port number the probe should connect to."""
256
+
257
+ headers: Dict[str, str]
258
+ """HTTP headers to be sent with the request."""
259
+
260
+ host: Optional[str]
261
+ """Host name to send HTTP request to."""
262
+
263
+ path: str
264
+ """The endpoint to send the HTTP request to."""
265
+
266
+ schema: str
267
+ """Schema to use for the HTTP request."""
268
+
269
+
270
+ class ProbesLivenessProbeProbeTcpSocket(TypedDict, total=False):
271
+ port: Required[int]
272
+ """Port number to check if it's open."""
273
+
274
+
275
+ class ProbesLivenessProbeProbe(TypedDict, total=False):
276
+ exec: Optional[ProbesLivenessProbeProbeExec]
277
+ """Exec probe configuration"""
278
+
279
+ failure_threshold: int
280
+ """The number of consecutive probe failures that mark the container as unhealthy."""
281
+
282
+ http_get: Optional[ProbesLivenessProbeProbeHTTPGet]
283
+ """HTTP GET probe configuration"""
284
+
285
+ initial_delay_seconds: int
286
+ """The initial delay before starting the first probe."""
287
+
288
+ period_seconds: int
289
+ """How often (in seconds) to perform the probe."""
290
+
291
+ success_threshold: int
292
+ """The number of consecutive successful probes that mark the container as healthy."""
293
+
294
+ tcp_socket: Optional[ProbesLivenessProbeProbeTcpSocket]
295
+ """TCP socket probe configuration"""
296
+
297
+ timeout_seconds: int
298
+ """The timeout for each probe."""
299
+
300
+
301
+ class ProbesLivenessProbe(TypedDict, total=False):
302
+ enabled: Required[bool]
303
+ """Whether the probe is enabled or not."""
304
+
305
+ probe: ProbesLivenessProbeProbe
306
+ """Probe configuration (exec, `http_get` or `tcp_socket`)"""
307
+
308
+
309
+ class ProbesReadinessProbeProbeExec(TypedDict, total=False):
310
+ command: Required[List[str]]
311
+ """Command to be executed inside the running container."""
312
+
313
+
314
+ class ProbesReadinessProbeProbeHTTPGet(TypedDict, total=False):
315
+ port: Required[int]
316
+ """Port number the probe should connect to."""
317
+
318
+ headers: Dict[str, str]
319
+ """HTTP headers to be sent with the request."""
320
+
321
+ host: Optional[str]
322
+ """Host name to send HTTP request to."""
323
+
324
+ path: str
325
+ """The endpoint to send the HTTP request to."""
326
+
327
+ schema: str
328
+ """Schema to use for the HTTP request."""
329
+
330
+
331
+ class ProbesReadinessProbeProbeTcpSocket(TypedDict, total=False):
332
+ port: Required[int]
333
+ """Port number to check if it's open."""
334
+
335
+
336
+ class ProbesReadinessProbeProbe(TypedDict, total=False):
337
+ exec: Optional[ProbesReadinessProbeProbeExec]
338
+ """Exec probe configuration"""
339
+
340
+ failure_threshold: int
341
+ """The number of consecutive probe failures that mark the container as unhealthy."""
342
+
343
+ http_get: Optional[ProbesReadinessProbeProbeHTTPGet]
344
+ """HTTP GET probe configuration"""
345
+
346
+ initial_delay_seconds: int
347
+ """The initial delay before starting the first probe."""
348
+
349
+ period_seconds: int
350
+ """How often (in seconds) to perform the probe."""
351
+
352
+ success_threshold: int
353
+ """The number of consecutive successful probes that mark the container as healthy."""
354
+
355
+ tcp_socket: Optional[ProbesReadinessProbeProbeTcpSocket]
356
+ """TCP socket probe configuration"""
357
+
358
+ timeout_seconds: int
359
+ """The timeout for each probe."""
360
+
361
+
362
+ class ProbesReadinessProbe(TypedDict, total=False):
363
+ enabled: Required[bool]
364
+ """Whether the probe is enabled or not."""
365
+
366
+ probe: ProbesReadinessProbeProbe
367
+ """Probe configuration (exec, `http_get` or `tcp_socket`)"""
368
+
369
+
370
+ class ProbesStartupProbeProbeExec(TypedDict, total=False):
371
+ command: Required[List[str]]
372
+ """Command to be executed inside the running container."""
373
+
374
+
375
+ class ProbesStartupProbeProbeHTTPGet(TypedDict, total=False):
376
+ port: Required[int]
377
+ """Port number the probe should connect to."""
378
+
379
+ headers: Dict[str, str]
380
+ """HTTP headers to be sent with the request."""
381
+
382
+ host: Optional[str]
383
+ """Host name to send HTTP request to."""
384
+
385
+ path: str
386
+ """The endpoint to send the HTTP request to."""
387
+
388
+ schema: str
389
+ """Schema to use for the HTTP request."""
390
+
391
+
392
+ class ProbesStartupProbeProbeTcpSocket(TypedDict, total=False):
393
+ port: Required[int]
394
+ """Port number to check if it's open."""
395
+
396
+
397
+ class ProbesStartupProbeProbe(TypedDict, total=False):
398
+ exec: Optional[ProbesStartupProbeProbeExec]
399
+ """Exec probe configuration"""
400
+
401
+ failure_threshold: int
402
+ """The number of consecutive probe failures that mark the container as unhealthy."""
403
+
404
+ http_get: Optional[ProbesStartupProbeProbeHTTPGet]
405
+ """HTTP GET probe configuration"""
406
+
407
+ initial_delay_seconds: int
408
+ """The initial delay before starting the first probe."""
409
+
410
+ period_seconds: int
411
+ """How often (in seconds) to perform the probe."""
412
+
413
+ success_threshold: int
414
+ """The number of consecutive successful probes that mark the container as healthy."""
415
+
416
+ tcp_socket: Optional[ProbesStartupProbeProbeTcpSocket]
417
+ """TCP socket probe configuration"""
418
+
419
+ timeout_seconds: int
420
+ """The timeout for each probe."""
421
+
422
+
423
+ class ProbesStartupProbe(TypedDict, total=False):
424
+ enabled: Required[bool]
425
+ """Whether the probe is enabled or not."""
426
+
427
+ probe: ProbesStartupProbeProbe
428
+ """Probe configuration (exec, `http_get` or `tcp_socket`)"""
429
+
430
+
214
431
  class Probes(TypedDict, total=False):
215
- liveness_probe: Optional[ContainerProbeConfigCreateParam]
432
+ liveness_probe: Optional[ProbesLivenessProbe]
216
433
  """Liveness probe configuration"""
217
434
 
218
- readiness_probe: Optional[ContainerProbeConfigCreateParam]
435
+ readiness_probe: Optional[ProbesReadinessProbe]
219
436
  """Readiness probe configuration"""
220
437
 
221
- startup_probe: Optional[ContainerProbeConfigCreateParam]
438
+ startup_probe: Optional[ProbesStartupProbe]
222
439
  """Startup probe configuration"""
@@ -6,7 +6,6 @@ from typing import Dict, List, Iterable, Optional
6
6
  from typing_extensions import Required, Annotated, TypedDict
7
7
 
8
8
  from ...._utils import PropertyInfo
9
- from ..ingress_opts_param import IngressOptsParam
10
9
  from ..laas_index_retention_policy_param import LaasIndexRetentionPolicyParam
11
10
 
12
11
  __all__ = [
@@ -20,6 +19,7 @@ __all__ = [
20
19
  "ContainerScaleTriggersHTTP",
21
20
  "ContainerScaleTriggersMemory",
22
21
  "ContainerScaleTriggersSqs",
22
+ "IngressOpts",
23
23
  "Logging",
24
24
  "Probes",
25
25
  "ProbesLivenessProbe",
@@ -44,11 +44,21 @@ class DeploymentUpdateParams(TypedDict, total=False):
44
44
  project_id: int
45
45
  """Project ID"""
46
46
 
47
+ api_keys: Optional[List[str]]
48
+ """List of API keys for the inference instance.
49
+
50
+ Multiple keys can be attached to one deployment.If `auth_enabled` and `api_keys`
51
+ are both specified, a ValidationError will be raised.If `[]` is provided, the
52
+ API keys will be removed and auth will be disabled on the deployment.
53
+ """
54
+
47
55
  auth_enabled: bool
48
56
  """Set to `true` to enable API key authentication for the inference instance.
49
57
 
50
58
  `"Authorization": "Bearer ****\\**"` or `"X-Api-Key": "****\\**"` header is required
51
- for the requests to the instance if enabled
59
+ for the requests to the instance if enabled. This field is deprecated and will
60
+ be removed in the future. Use `api_keys` field instead.If `auth_enabled` and
61
+ `api_keys` are both specified, a ValidationError will be raised.
52
62
  """
53
63
 
54
64
  command: Optional[List[str]]
@@ -77,7 +87,7 @@ class DeploymentUpdateParams(TypedDict, total=False):
77
87
  accessible Docker image URL can be specified.
78
88
  """
79
89
 
80
- ingress_opts: Optional[IngressOptsParam]
90
+ ingress_opts: Optional[IngressOpts]
81
91
  """Ingress options for the inference instance"""
82
92
 
83
93
  listening_port: Optional[int]
@@ -204,6 +214,17 @@ class Container(TypedDict, total=False):
204
214
  """Scale for the container"""
205
215
 
206
216
 
217
+ class IngressOpts(TypedDict, total=False):
218
+ disable_response_buffering: bool
219
+ """Disable response buffering if true.
220
+
221
+ A client usually has a much slower connection and can not consume the response
222
+ data as fast as it is produced by an upstream application. Ingress tries to
223
+ buffer the whole response in order to release the upstream application as soon
224
+ as possible.By default, the response buffering is enabled.
225
+ """
226
+
227
+
207
228
  class Logging(TypedDict, total=False):
208
229
  destination_region_id: Optional[int]
209
230
  """ID of the region in which the logs will be stored"""
@@ -3,3 +3,4 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from .log_list_params import LogListParams as LogListParams
6
+ from .inference_deployment_log import InferenceDeploymentLog as InferenceDeploymentLog
@@ -2,12 +2,12 @@
2
2
 
3
3
  from datetime import datetime
4
4
 
5
- from ...._models import BaseModel
5
+ from ....._models import BaseModel
6
6
 
7
- __all__ = ["InferenceLog"]
7
+ __all__ = ["InferenceDeploymentLog"]
8
8
 
9
9
 
10
- class InferenceLog(BaseModel):
10
+ class InferenceDeploymentLog(BaseModel):
11
11
  message: str
12
12
  """Log message."""
13
13
 
@@ -0,0 +1,266 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Dict, List, Optional
4
+ from typing_extensions import Literal
5
+
6
+ from ..logging import Logging
7
+ from ...._models import BaseModel
8
+ from .probe_config import ProbeConfig
9
+
10
+ __all__ = [
11
+ "InferenceDeployment",
12
+ "Container",
13
+ "ContainerDeployStatus",
14
+ "ContainerScale",
15
+ "ContainerScaleTriggers",
16
+ "ContainerScaleTriggersCPU",
17
+ "ContainerScaleTriggersGPUMemory",
18
+ "ContainerScaleTriggersGPUUtilization",
19
+ "ContainerScaleTriggersHTTP",
20
+ "ContainerScaleTriggersMemory",
21
+ "ContainerScaleTriggersSqs",
22
+ "IngressOpts",
23
+ "ObjectReference",
24
+ "Probes",
25
+ ]
26
+
27
+
28
+ class ContainerDeployStatus(BaseModel):
29
+ ready: int
30
+ """Number of ready instances"""
31
+
32
+ total: int
33
+ """Total number of instances"""
34
+
35
+
36
+ class ContainerScaleTriggersCPU(BaseModel):
37
+ threshold: int
38
+ """Threshold value for the trigger in percentage"""
39
+
40
+
41
+ class ContainerScaleTriggersGPUMemory(BaseModel):
42
+ threshold: int
43
+ """Threshold value for the trigger in percentage"""
44
+
45
+
46
+ class ContainerScaleTriggersGPUUtilization(BaseModel):
47
+ threshold: int
48
+ """Threshold value for the trigger in percentage"""
49
+
50
+
51
+ class ContainerScaleTriggersHTTP(BaseModel):
52
+ rate: int
53
+ """Request count per 'window' seconds for the http trigger"""
54
+
55
+ window: int
56
+ """Time window for rate calculation in seconds"""
57
+
58
+
59
+ class ContainerScaleTriggersMemory(BaseModel):
60
+ threshold: int
61
+ """Threshold value for the trigger in percentage"""
62
+
63
+
64
+ class ContainerScaleTriggersSqs(BaseModel):
65
+ activation_queue_length: int
66
+ """Number of messages for activation"""
67
+
68
+ aws_endpoint: Optional[str] = None
69
+ """Custom AWS endpoint"""
70
+
71
+ aws_region: str
72
+ """AWS region"""
73
+
74
+ queue_length: int
75
+ """Number of messages for one replica"""
76
+
77
+ queue_url: str
78
+ """SQS queue URL"""
79
+
80
+ scale_on_delayed: bool
81
+ """Scale on delayed messages"""
82
+
83
+ scale_on_flight: bool
84
+ """Scale on in-flight messages"""
85
+
86
+ secret_name: str
87
+ """Auth secret name"""
88
+
89
+
90
+ class ContainerScaleTriggers(BaseModel):
91
+ cpu: Optional[ContainerScaleTriggersCPU] = None
92
+ """CPU trigger configuration"""
93
+
94
+ gpu_memory: Optional[ContainerScaleTriggersGPUMemory] = None
95
+ """GPU memory trigger configuration.
96
+
97
+ Calculated by `DCGM_FI_DEV_MEM_COPY_UTIL` metric
98
+ """
99
+
100
+ gpu_utilization: Optional[ContainerScaleTriggersGPUUtilization] = None
101
+ """GPU utilization trigger configuration.
102
+
103
+ Calculated by `DCGM_FI_DEV_GPU_UTIL` metric
104
+ """
105
+
106
+ http: Optional[ContainerScaleTriggersHTTP] = None
107
+ """HTTP trigger configuration"""
108
+
109
+ memory: Optional[ContainerScaleTriggersMemory] = None
110
+ """Memory trigger configuration"""
111
+
112
+ sqs: Optional[ContainerScaleTriggersSqs] = None
113
+ """SQS trigger configuration"""
114
+
115
+
116
+ class ContainerScale(BaseModel):
117
+ cooldown_period: Optional[int] = None
118
+ """Cooldown period between scaling actions in seconds"""
119
+
120
+ max: int
121
+ """Maximum scale for the container"""
122
+
123
+ min: int
124
+ """Minimum scale for the container"""
125
+
126
+ polling_interval: Optional[int] = None
127
+ """Polling interval for scaling triggers in seconds"""
128
+
129
+ triggers: ContainerScaleTriggers
130
+ """Triggers for scaling actions"""
131
+
132
+
133
+ class Container(BaseModel):
134
+ address: Optional[str] = None
135
+ """Address of the inference instance"""
136
+
137
+ deploy_status: ContainerDeployStatus
138
+ """Status of the containers deployment"""
139
+
140
+ error_message: Optional[str] = None
141
+ """Error message if the container deployment failed"""
142
+
143
+ region_id: int
144
+ """Region name for the container"""
145
+
146
+ scale: ContainerScale
147
+ """Scale for the container"""
148
+
149
+
150
+ class IngressOpts(BaseModel):
151
+ disable_response_buffering: bool
152
+ """Disable response buffering if true.
153
+
154
+ A client usually has a much slower connection and can not consume the response
155
+ data as fast as it is produced by an upstream application. Ingress tries to
156
+ buffer the whole response in order to release the upstream application as soon
157
+ as possible.By default, the response buffering is enabled.
158
+ """
159
+
160
+
161
+ class ObjectReference(BaseModel):
162
+ kind: Literal["AppDeployment"]
163
+ """Kind of the inference object to be referenced"""
164
+
165
+ name: str
166
+ """Name of the inference object to be referenced"""
167
+
168
+
169
+ class Probes(BaseModel):
170
+ liveness_probe: Optional[ProbeConfig] = None
171
+ """Liveness probe configuration"""
172
+
173
+ readiness_probe: Optional[ProbeConfig] = None
174
+ """Readiness probe configuration"""
175
+
176
+ startup_probe: Optional[ProbeConfig] = None
177
+ """Startup probe configuration"""
178
+
179
+
180
+ class InferenceDeployment(BaseModel):
181
+ address: Optional[str] = None
182
+ """Address of the inference instance"""
183
+
184
+ auth_enabled: bool
185
+ """`true` if instance uses API key authentication.
186
+
187
+ `"Authorization": "Bearer ****\\**"` or `"X-Api-Key": "****\\**"` header is required
188
+ for the requests to the instance if enabled.
189
+ """
190
+
191
+ command: Optional[str] = None
192
+ """Command to be executed when running a container from an image."""
193
+
194
+ containers: List[Container]
195
+ """List of containers for the inference instance"""
196
+
197
+ created_at: Optional[str] = None
198
+ """Inference instance creation date in ISO 8601 format."""
199
+
200
+ credentials_name: str
201
+ """Registry credentials name"""
202
+
203
+ description: str
204
+ """Inference instance description."""
205
+
206
+ envs: Optional[Dict[str, str]] = None
207
+ """Environment variables for the inference instance"""
208
+
209
+ flavor_name: str
210
+ """Flavor name for the inference instance"""
211
+
212
+ image: str
213
+ """Docker image for the inference instance.
214
+
215
+ This field should contain the image name and tag in the format 'name:tag', e.g.,
216
+ 'nginx:latest'. It defaults to Docker Hub as the image registry, but any
217
+ accessible Docker image URL can be specified.
218
+ """
219
+
220
+ ingress_opts: Optional[IngressOpts] = None
221
+ """Ingress options for the inference instance"""
222
+
223
+ listening_port: int
224
+ """Listening port for the inference instance."""
225
+
226
+ logging: Optional[Logging] = None
227
+ """Logging configuration for the inference instance"""
228
+
229
+ name: str
230
+ """Inference instance name."""
231
+
232
+ object_references: List[ObjectReference]
233
+ """Indicates to which parent object this inference belongs to."""
234
+
235
+ probes: Optional[Probes] = None
236
+ """Probes configured for all containers of the inference instance."""
237
+
238
+ project_id: int
239
+ """Project ID. If not provided, your default project ID will be used."""
240
+
241
+ status: Literal["ACTIVE", "DELETING", "DEPLOYING", "DISABLED", "PARTIALLYDEPLOYED", "PENDING"]
242
+ """Inference instance status. Value can be one of the following:
243
+
244
+ - `DEPLOYING` - The instance is being deployed. Containers are not yet created.
245
+ - `PARTIALLYDEPLOYED` - All containers have been created, but some may not be
246
+ ready yet. Instances stuck in this state typically indicate either image being
247
+ pulled, or a failure of some kind. In the latter case, the `error_message`
248
+ field of the respective container object in the `containers` collection
249
+ explains the failure reason.
250
+ - `ACTIVE` - The instance is running and ready to accept requests.
251
+ - `DISABLED` - The instance is disabled and not accepting any requests.
252
+ - `PENDING` - The instance is running but scaled to zero. It will be
253
+ automatically scaled up when a request is made.
254
+ - `DELETING` - The instance is being deleted.
255
+ """
256
+
257
+ timeout: Optional[int] = None
258
+ """
259
+ Specifies the duration in seconds without any requests after which the
260
+ containers will be downscaled to their minimum scale value as defined by
261
+ `scale.min`. If set, this helps in optimizing resource usage by reducing the
262
+ number of container instances during periods of inactivity.
263
+ """
264
+
265
+ api_keys: Optional[List[str]] = None
266
+ """List of API keys for the inference instance"""
@@ -4,10 +4,10 @@ from typing_extensions import Literal
4
4
 
5
5
  from ...._models import BaseModel
6
6
 
7
- __all__ = ["InferenceApikeySecret"]
7
+ __all__ = ["InferenceDeploymentAPIKey"]
8
8
 
9
9
 
10
- class InferenceApikeySecret(BaseModel):
10
+ class InferenceDeploymentAPIKey(BaseModel):
11
11
  secret: str
12
12
  """API key secret"""
13
13
 
@@ -6,10 +6,10 @@ from pydantic import Field as FieldInfo
6
6
 
7
7
  from ...._models import BaseModel
8
8
 
9
- __all__ = ["MlcatalogModelCard"]
9
+ __all__ = ["InferenceModel"]
10
10
 
11
11
 
12
- class MlcatalogModelCard(BaseModel):
12
+ class InferenceModel(BaseModel):
13
13
  id: str
14
14
  """Model ID."""
15
15
 
@@ -2,10 +2,10 @@
2
2
 
3
3
  from ...._models import BaseModel
4
4
 
5
- __all__ = ["InferenceRegistryCredential"]
5
+ __all__ = ["InferenceRegistryCredentials"]
6
6
 
7
7
 
8
- class InferenceRegistryCredential(BaseModel):
8
+ class InferenceRegistryCredentials(BaseModel):
9
9
  name: str
10
10
  """Registry credential name."""
11
11
 
@@ -2,10 +2,10 @@
2
2
 
3
3
  from ...._models import BaseModel
4
4
 
5
- __all__ = ["InferenceRegistryCredentialFull"]
5
+ __all__ = ["InferenceRegistryCredentialsCreate"]
6
6
 
7
7
 
8
- class InferenceRegistryCredentialFull(BaseModel):
8
+ class InferenceRegistryCredentialsCreate(BaseModel):
9
9
  name: str
10
10
  """Registry credential name."""
11
11