gcore 0.4.0__py3-none-any.whl → 0.6.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.
- gcore/_base_client.py +9 -2
- gcore/_client.py +9 -0
- gcore/_constants.py +2 -2
- gcore/_models.py +8 -5
- gcore/_version.py +1 -1
- gcore/pagination.py +192 -1
- gcore/resources/__init__.py +14 -0
- gcore/resources/cloud/__init__.py +14 -0
- gcore/resources/cloud/audit_logs.py +480 -0
- gcore/resources/cloud/baremetal/servers.py +2 -2
- gcore/resources/cloud/cloud.py +32 -0
- gcore/resources/cloud/file_shares/file_shares.py +64 -9
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +2 -2
- gcore/resources/cloud/inference/__init__.py +14 -0
- gcore/resources/cloud/inference/api_keys.py +621 -0
- gcore/resources/cloud/inference/deployments/deployments.py +66 -33
- gcore/resources/cloud/inference/deployments/logs.py +7 -7
- gcore/resources/cloud/inference/inference.py +37 -5
- gcore/resources/cloud/inference/models.py +16 -15
- gcore/resources/cloud/inference/registry_credentials.py +16 -16
- gcore/resources/cloud/inference/secrets.py +4 -5
- gcore/resources/cloud/instances/instances.py +2 -2
- gcore/resources/cloud/load_balancers/pools/members.py +22 -6
- gcore/resources/cloud/secrets.py +14 -224
- gcore/resources/cloud/tasks.py +30 -28
- gcore/resources/fastedge/__init__.py +103 -0
- gcore/resources/fastedge/apps/__init__.py +33 -0
- gcore/resources/fastedge/apps/apps.py +932 -0
- gcore/resources/fastedge/apps/logs.py +248 -0
- gcore/resources/fastedge/binaries.py +286 -0
- gcore/resources/fastedge/fastedge.py +327 -0
- gcore/resources/fastedge/kv_stores.py +523 -0
- gcore/resources/fastedge/secrets.py +687 -0
- gcore/resources/fastedge/statistics.py +347 -0
- gcore/resources/fastedge/templates.py +652 -0
- gcore/types/cloud/__init__.py +4 -28
- gcore/types/cloud/audit_log_entry.py +254 -0
- gcore/types/cloud/audit_log_list_params.py +158 -0
- gcore/types/cloud/baremetal/server_create_params.py +1 -1
- gcore/types/cloud/file_share_update_params.py +29 -3
- gcore/types/cloud/gpu_baremetal_cluster_create_params.py +1 -1
- gcore/types/cloud/inference/__init__.py +17 -8
- gcore/types/cloud/inference/api_key_create_params.py +21 -0
- gcore/types/cloud/inference/api_key_list_params.py +21 -0
- gcore/types/cloud/inference/api_key_update_params.py +16 -0
- gcore/types/cloud/inference/deployment_create_params.py +224 -7
- gcore/types/cloud/inference/deployment_update_params.py +24 -3
- gcore/types/cloud/inference/deployments/__init__.py +1 -0
- gcore/types/cloud/inference/{inference_log.py → deployments/inference_deployment_log.py} +3 -3
- gcore/types/cloud/inference/inference_api_key.py +24 -0
- gcore/types/cloud/inference/inference_api_key_create.py +27 -0
- gcore/types/cloud/inference/inference_deployment.py +266 -0
- gcore/types/cloud/inference/{inference_apikey_secret.py → inference_deployment_api_key.py} +2 -2
- gcore/types/cloud/inference/{mlcatalog_model_card.py → inference_model.py} +2 -2
- gcore/types/cloud/inference/{inference_registry_credential.py → inference_registry_credentials.py} +2 -2
- gcore/types/cloud/inference/{inference_registry_credential_full.py → inference_registry_credentials_create.py} +2 -2
- gcore/types/cloud/inference/inference_secret.py +10 -3
- gcore/types/cloud/inference/model_list_params.py +2 -4
- gcore/types/cloud/{container_probe.py → inference/probe.py} +9 -9
- gcore/types/cloud/{container_probe_config.py → inference/probe_config.py} +5 -5
- gcore/types/cloud/{container_probe_exec.py → inference/probe_exec.py} +3 -3
- gcore/types/cloud/{container_probe_http_get.py → inference/probe_http_get.py} +3 -3
- gcore/types/cloud/{container_probe_tcp_socket.py → inference/probe_tcp_socket.py} +3 -3
- gcore/types/cloud/inference/secret_create_params.py +10 -4
- gcore/types/cloud/inference/secret_replace_params.py +10 -4
- gcore/types/cloud/{region_capacity.py → inference_region_capacity.py} +10 -3
- gcore/types/cloud/{region_capacity_list.py → inference_region_capacity_list.py} +4 -4
- gcore/types/cloud/instance_create_params.py +1 -1
- gcore/types/cloud/load_balancer_create_params.py +14 -3
- gcore/types/cloud/load_balancers/pool_create_params.py +14 -3
- gcore/types/cloud/load_balancers/pool_update_params.py +14 -3
- gcore/types/cloud/load_balancers/pools/member_add_params.py +14 -3
- gcore/types/cloud/member.py +12 -4
- gcore/types/cloud/task_list_params.py +15 -14
- gcore/types/fastedge/__init__.py +48 -0
- gcore/types/fastedge/app.py +81 -0
- gcore/types/fastedge/app_create_params.py +56 -0
- gcore/types/fastedge/app_list_params.py +50 -0
- gcore/types/fastedge/app_param.py +56 -0
- gcore/types/fastedge/app_replace_params.py +17 -0
- gcore/types/fastedge/app_short.py +60 -0
- gcore/types/fastedge/app_update_params.py +56 -0
- gcore/types/fastedge/apps/__init__.py +6 -0
- gcore/types/fastedge/apps/log.py +28 -0
- gcore/types/fastedge/apps/log_list_params.py +37 -0
- gcore/types/fastedge/binary.py +40 -0
- gcore/types/fastedge/binary_list_response.py +12 -0
- gcore/types/fastedge/binary_short.py +32 -0
- gcore/types/fastedge/call_status.py +24 -0
- gcore/types/fastedge/client.py +57 -0
- gcore/types/fastedge/duration_stats.py +30 -0
- gcore/types/fastedge/kv_store.py +33 -0
- gcore/types/fastedge/kv_store_create_params.py +23 -0
- gcore/types/fastedge/kv_store_get_response.py +10 -0
- gcore/types/fastedge/kv_store_list_params.py +12 -0
- gcore/types/fastedge/kv_store_list_response.py +15 -0
- gcore/types/fastedge/kv_store_replace_params.py +23 -0
- gcore/types/fastedge/kv_store_short.py +19 -0
- gcore/types/fastedge/kv_store_stats.py +26 -0
- gcore/types/fastedge/secret.py +29 -0
- gcore/types/fastedge/secret_create_params.py +27 -0
- gcore/types/fastedge/secret_create_response.py +12 -0
- gcore/types/fastedge/secret_delete_params.py +12 -0
- gcore/types/fastedge/secret_list_params.py +15 -0
- gcore/types/{cloud → fastedge}/secret_list_response.py +2 -6
- gcore/types/fastedge/secret_replace_params.py +27 -0
- gcore/types/fastedge/secret_short.py +21 -0
- gcore/types/fastedge/secret_update_params.py +27 -0
- gcore/types/fastedge/statistic_get_call_series_params.py +28 -0
- gcore/types/fastedge/statistic_get_call_series_response.py +12 -0
- gcore/types/fastedge/statistic_get_duration_series_params.py +28 -0
- gcore/types/fastedge/statistic_get_duration_series_response.py +12 -0
- gcore/types/fastedge/template.py +31 -0
- gcore/types/fastedge/template_create_params.py +30 -0
- gcore/types/fastedge/template_delete_params.py +12 -0
- gcore/types/fastedge/template_list_params.py +25 -0
- gcore/types/fastedge/template_parameter.py +22 -0
- gcore/types/fastedge/template_parameter_param.py +21 -0
- gcore/types/fastedge/template_replace_params.py +30 -0
- gcore/types/fastedge/template_short.py +27 -0
- {gcore-0.4.0.dist-info → gcore-0.6.0.dist-info}/METADATA +8 -7
- {gcore-0.4.0.dist-info → gcore-0.6.0.dist-info}/RECORD +124 -80
- gcore/types/cloud/aws_iam_data.py +0 -13
- gcore/types/cloud/aws_iam_data_param.py +0 -15
- gcore/types/cloud/capacity.py +0 -13
- gcore/types/cloud/container_probe_config_create_param.py +0 -17
- gcore/types/cloud/container_probe_create_param.py +0 -38
- gcore/types/cloud/container_probe_exec_create_param.py +0 -13
- gcore/types/cloud/container_probe_http_get_create_param.py +0 -25
- gcore/types/cloud/container_probe_tcp_socket_create_param.py +0 -12
- gcore/types/cloud/container_scale.py +0 -25
- gcore/types/cloud/container_scale_trigger_rate.py +0 -13
- gcore/types/cloud/container_scale_trigger_sqs.py +0 -33
- gcore/types/cloud/container_scale_trigger_threshold.py +0 -10
- gcore/types/cloud/container_scale_triggers.py +0 -36
- gcore/types/cloud/deploy_status.py +0 -13
- gcore/types/cloud/inference/container.py +0 -26
- gcore/types/cloud/inference/inference.py +0 -95
- gcore/types/cloud/inference/mlcatalog_order_by_choices.py +0 -7
- gcore/types/cloud/inference_probes.py +0 -19
- gcore/types/cloud/ingress_opts_out.py +0 -16
- gcore/types/cloud/ingress_opts_param.py +0 -18
- gcore/types/cloud/secret_create_params.py +0 -66
- {gcore-0.4.0.dist-info → gcore-0.6.0.dist-info}/WHEEL +0 -0
- {gcore-0.4.0.dist-info → gcore-0.6.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["APIKeyCreateParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class APIKeyCreateParams(TypedDict, total=False):
|
|
11
|
+
project_id: int
|
|
12
|
+
"""Project ID"""
|
|
13
|
+
|
|
14
|
+
name: Required[str]
|
|
15
|
+
"""Name of the API Key."""
|
|
16
|
+
|
|
17
|
+
description: str
|
|
18
|
+
"""Description of the API Key."""
|
|
19
|
+
|
|
20
|
+
expires_at: str
|
|
21
|
+
"""Expiration date of the API Key in ISO 8601 format."""
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["APIKeyListParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class APIKeyListParams(TypedDict, total=False):
|
|
11
|
+
project_id: int
|
|
12
|
+
"""Project ID"""
|
|
13
|
+
|
|
14
|
+
limit: int
|
|
15
|
+
"""Optional. Limit the number of returned items"""
|
|
16
|
+
|
|
17
|
+
offset: int
|
|
18
|
+
"""Optional.
|
|
19
|
+
|
|
20
|
+
Offset value is used to exclude the first set of records from the result
|
|
21
|
+
"""
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Optional
|
|
6
|
+
from typing_extensions import TypedDict
|
|
7
|
+
|
|
8
|
+
__all__ = ["APIKeyUpdateParams"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class APIKeyUpdateParams(TypedDict, total=False):
|
|
12
|
+
project_id: int
|
|
13
|
+
"""Project ID"""
|
|
14
|
+
|
|
15
|
+
description: Optional[str]
|
|
16
|
+
"""Description of the API Key."""
|
|
@@ -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[
|
|
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[
|
|
432
|
+
liveness_probe: Optional[ProbesLivenessProbe]
|
|
216
433
|
"""Liveness probe configuration"""
|
|
217
434
|
|
|
218
|
-
readiness_probe: Optional[
|
|
435
|
+
readiness_probe: Optional[ProbesReadinessProbe]
|
|
219
436
|
"""Readiness probe configuration"""
|
|
220
437
|
|
|
221
|
-
startup_probe: Optional[
|
|
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[
|
|
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"""
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
from datetime import datetime
|
|
4
4
|
|
|
5
|
-
from
|
|
5
|
+
from ....._models import BaseModel
|
|
6
6
|
|
|
7
|
-
__all__ = ["
|
|
7
|
+
__all__ = ["InferenceDeploymentLog"]
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
class
|
|
10
|
+
class InferenceDeploymentLog(BaseModel):
|
|
11
11
|
message: str
|
|
12
12
|
"""Log message."""
|
|
13
13
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
|
|
5
|
+
from ...._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["InferenceAPIKey"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class InferenceAPIKey(BaseModel):
|
|
11
|
+
created_at: str
|
|
12
|
+
"""Timestamp when the API Key was created."""
|
|
13
|
+
|
|
14
|
+
deployment_names: List[str]
|
|
15
|
+
"""List of inference deployment names to which this API Key has been attached."""
|
|
16
|
+
|
|
17
|
+
description: Optional[str] = None
|
|
18
|
+
"""Description of the API Key."""
|
|
19
|
+
|
|
20
|
+
expires_at: Optional[str] = None
|
|
21
|
+
"""Timestamp when the API Key will expire."""
|
|
22
|
+
|
|
23
|
+
name: str
|
|
24
|
+
"""API Key name."""
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
|
|
5
|
+
from ...._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["InferenceAPIKeyCreate"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class InferenceAPIKeyCreate(BaseModel):
|
|
11
|
+
created_at: str
|
|
12
|
+
"""Timestamp when the API Key was created."""
|
|
13
|
+
|
|
14
|
+
deployment_names: List[str]
|
|
15
|
+
"""List of inference deployment names to which this API Key has been attached."""
|
|
16
|
+
|
|
17
|
+
description: Optional[str] = None
|
|
18
|
+
"""Description of the API Key."""
|
|
19
|
+
|
|
20
|
+
expires_at: Optional[str] = None
|
|
21
|
+
"""Timestamp when the API Key will expire."""
|
|
22
|
+
|
|
23
|
+
name: str
|
|
24
|
+
"""API Key name."""
|
|
25
|
+
|
|
26
|
+
secret: str
|
|
27
|
+
"""The actual API Key secret."""
|