gcore 0.4.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.
- 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/baremetal/servers.py +2 -2
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +2 -2
- gcore/resources/cloud/inference/deployments/deployments.py +66 -33
- gcore/resources/cloud/inference/deployments/logs.py +7 -7
- gcore/resources/cloud/inference/inference.py +5 -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/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 +2 -28
- gcore/types/cloud/baremetal/server_create_params.py +1 -1
- gcore/types/cloud/gpu_baremetal_cluster_create_params.py +1 -1
- gcore/types/cloud/inference/__init__.py +12 -8
- 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_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/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.5.0.dist-info}/METADATA +7 -5
- {gcore-0.4.0.dist-info → gcore-0.5.0.dist-info}/RECORD +104 -69
- 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.5.0.dist-info}/WHEEL +0 -0
- {gcore-0.4.0.dist-info → gcore-0.5.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,932 @@
|
|
|
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 Dict, Optional
|
|
6
|
+
from typing_extensions import Literal
|
|
7
|
+
|
|
8
|
+
import httpx
|
|
9
|
+
|
|
10
|
+
from .logs import (
|
|
11
|
+
LogsResource,
|
|
12
|
+
AsyncLogsResource,
|
|
13
|
+
LogsResourceWithRawResponse,
|
|
14
|
+
AsyncLogsResourceWithRawResponse,
|
|
15
|
+
LogsResourceWithStreamingResponse,
|
|
16
|
+
AsyncLogsResourceWithStreamingResponse,
|
|
17
|
+
)
|
|
18
|
+
from ...._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
|
|
19
|
+
from ...._utils import maybe_transform, async_maybe_transform
|
|
20
|
+
from ...._compat import cached_property
|
|
21
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
22
|
+
from ...._response import (
|
|
23
|
+
to_raw_response_wrapper,
|
|
24
|
+
to_streamed_response_wrapper,
|
|
25
|
+
async_to_raw_response_wrapper,
|
|
26
|
+
async_to_streamed_response_wrapper,
|
|
27
|
+
)
|
|
28
|
+
from ....pagination import SyncOffsetPageFastedgeApps, AsyncOffsetPageFastedgeApps
|
|
29
|
+
from ...._base_client import AsyncPaginator, make_request_options
|
|
30
|
+
from ....types.fastedge import app_list_params, app_create_params, app_update_params, app_replace_params
|
|
31
|
+
from ....types.fastedge.app import App
|
|
32
|
+
from ....types.fastedge.app_short import AppShort
|
|
33
|
+
|
|
34
|
+
__all__ = ["AppsResource", "AsyncAppsResource"]
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class AppsResource(SyncAPIResource):
|
|
38
|
+
@cached_property
|
|
39
|
+
def logs(self) -> LogsResource:
|
|
40
|
+
return LogsResource(self._client)
|
|
41
|
+
|
|
42
|
+
@cached_property
|
|
43
|
+
def with_raw_response(self) -> AppsResourceWithRawResponse:
|
|
44
|
+
"""
|
|
45
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
46
|
+
the raw response object instead of the parsed content.
|
|
47
|
+
|
|
48
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
49
|
+
"""
|
|
50
|
+
return AppsResourceWithRawResponse(self)
|
|
51
|
+
|
|
52
|
+
@cached_property
|
|
53
|
+
def with_streaming_response(self) -> AppsResourceWithStreamingResponse:
|
|
54
|
+
"""
|
|
55
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
56
|
+
|
|
57
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
58
|
+
"""
|
|
59
|
+
return AppsResourceWithStreamingResponse(self)
|
|
60
|
+
|
|
61
|
+
def create(
|
|
62
|
+
self,
|
|
63
|
+
*,
|
|
64
|
+
binary: int | NotGiven = NOT_GIVEN,
|
|
65
|
+
comment: str | NotGiven = NOT_GIVEN,
|
|
66
|
+
debug: bool | NotGiven = NOT_GIVEN,
|
|
67
|
+
env: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
68
|
+
log: Optional[Literal["kafka", "none"]] | NotGiven = NOT_GIVEN,
|
|
69
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
70
|
+
rsp_headers: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
71
|
+
secrets: Dict[str, app_create_params.Secrets] | NotGiven = NOT_GIVEN,
|
|
72
|
+
status: int | NotGiven = NOT_GIVEN,
|
|
73
|
+
stores: Dict[str, int] | NotGiven = NOT_GIVEN,
|
|
74
|
+
template: int | NotGiven = NOT_GIVEN,
|
|
75
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
76
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
77
|
+
extra_headers: Headers | None = None,
|
|
78
|
+
extra_query: Query | None = None,
|
|
79
|
+
extra_body: Body | None = None,
|
|
80
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
81
|
+
) -> AppShort:
|
|
82
|
+
"""
|
|
83
|
+
Add a new app
|
|
84
|
+
|
|
85
|
+
Args:
|
|
86
|
+
binary: Binary ID
|
|
87
|
+
|
|
88
|
+
comment: App description
|
|
89
|
+
|
|
90
|
+
debug: Switch on logging for 30 minutes (switched off by default)
|
|
91
|
+
|
|
92
|
+
env: Environment variables
|
|
93
|
+
|
|
94
|
+
log: Logging channel (by default - kafka, which allows exploring logs with API)
|
|
95
|
+
|
|
96
|
+
name: App name
|
|
97
|
+
|
|
98
|
+
rsp_headers: Extra headers to add to the response
|
|
99
|
+
|
|
100
|
+
secrets: Application secrets
|
|
101
|
+
|
|
102
|
+
status:
|
|
103
|
+
Status code:
|
|
104
|
+
0 - draft (inactive)
|
|
105
|
+
1 - enabled
|
|
106
|
+
2 - disabled
|
|
107
|
+
3 - hourly call limit exceeded
|
|
108
|
+
4 - daily call limit exceeded
|
|
109
|
+
5 - suspended
|
|
110
|
+
|
|
111
|
+
stores: KV stores for the app
|
|
112
|
+
|
|
113
|
+
template: Template ID
|
|
114
|
+
|
|
115
|
+
extra_headers: Send extra headers
|
|
116
|
+
|
|
117
|
+
extra_query: Add additional query parameters to the request
|
|
118
|
+
|
|
119
|
+
extra_body: Add additional JSON properties to the request
|
|
120
|
+
|
|
121
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
122
|
+
"""
|
|
123
|
+
return self._post(
|
|
124
|
+
"/fastedge/v1/apps",
|
|
125
|
+
body=maybe_transform(
|
|
126
|
+
{
|
|
127
|
+
"binary": binary,
|
|
128
|
+
"comment": comment,
|
|
129
|
+
"debug": debug,
|
|
130
|
+
"env": env,
|
|
131
|
+
"log": log,
|
|
132
|
+
"name": name,
|
|
133
|
+
"rsp_headers": rsp_headers,
|
|
134
|
+
"secrets": secrets,
|
|
135
|
+
"status": status,
|
|
136
|
+
"stores": stores,
|
|
137
|
+
"template": template,
|
|
138
|
+
},
|
|
139
|
+
app_create_params.AppCreateParams,
|
|
140
|
+
),
|
|
141
|
+
options=make_request_options(
|
|
142
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
143
|
+
),
|
|
144
|
+
cast_to=AppShort,
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
def update(
|
|
148
|
+
self,
|
|
149
|
+
id: int,
|
|
150
|
+
*,
|
|
151
|
+
binary: int | NotGiven = NOT_GIVEN,
|
|
152
|
+
comment: str | NotGiven = NOT_GIVEN,
|
|
153
|
+
debug: bool | NotGiven = NOT_GIVEN,
|
|
154
|
+
env: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
155
|
+
log: Optional[Literal["kafka", "none"]] | NotGiven = NOT_GIVEN,
|
|
156
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
157
|
+
rsp_headers: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
158
|
+
secrets: Dict[str, app_update_params.Secrets] | NotGiven = NOT_GIVEN,
|
|
159
|
+
status: int | NotGiven = NOT_GIVEN,
|
|
160
|
+
stores: Dict[str, int] | NotGiven = NOT_GIVEN,
|
|
161
|
+
template: int | NotGiven = NOT_GIVEN,
|
|
162
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
163
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
164
|
+
extra_headers: Headers | None = None,
|
|
165
|
+
extra_query: Query | None = None,
|
|
166
|
+
extra_body: Body | None = None,
|
|
167
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
168
|
+
) -> AppShort:
|
|
169
|
+
"""
|
|
170
|
+
Update app
|
|
171
|
+
|
|
172
|
+
Args:
|
|
173
|
+
binary: Binary ID
|
|
174
|
+
|
|
175
|
+
comment: App description
|
|
176
|
+
|
|
177
|
+
debug: Switch on logging for 30 minutes (switched off by default)
|
|
178
|
+
|
|
179
|
+
env: Environment variables
|
|
180
|
+
|
|
181
|
+
log: Logging channel (by default - kafka, which allows exploring logs with API)
|
|
182
|
+
|
|
183
|
+
name: App name
|
|
184
|
+
|
|
185
|
+
rsp_headers: Extra headers to add to the response
|
|
186
|
+
|
|
187
|
+
secrets: Application secrets
|
|
188
|
+
|
|
189
|
+
status:
|
|
190
|
+
Status code:
|
|
191
|
+
0 - draft (inactive)
|
|
192
|
+
1 - enabled
|
|
193
|
+
2 - disabled
|
|
194
|
+
3 - hourly call limit exceeded
|
|
195
|
+
4 - daily call limit exceeded
|
|
196
|
+
5 - suspended
|
|
197
|
+
|
|
198
|
+
stores: KV stores for the app
|
|
199
|
+
|
|
200
|
+
template: Template ID
|
|
201
|
+
|
|
202
|
+
extra_headers: Send extra headers
|
|
203
|
+
|
|
204
|
+
extra_query: Add additional query parameters to the request
|
|
205
|
+
|
|
206
|
+
extra_body: Add additional JSON properties to the request
|
|
207
|
+
|
|
208
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
209
|
+
"""
|
|
210
|
+
return self._patch(
|
|
211
|
+
f"/fastedge/v1/apps/{id}",
|
|
212
|
+
body=maybe_transform(
|
|
213
|
+
{
|
|
214
|
+
"binary": binary,
|
|
215
|
+
"comment": comment,
|
|
216
|
+
"debug": debug,
|
|
217
|
+
"env": env,
|
|
218
|
+
"log": log,
|
|
219
|
+
"name": name,
|
|
220
|
+
"rsp_headers": rsp_headers,
|
|
221
|
+
"secrets": secrets,
|
|
222
|
+
"status": status,
|
|
223
|
+
"stores": stores,
|
|
224
|
+
"template": template,
|
|
225
|
+
},
|
|
226
|
+
app_update_params.AppUpdateParams,
|
|
227
|
+
),
|
|
228
|
+
options=make_request_options(
|
|
229
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
230
|
+
),
|
|
231
|
+
cast_to=AppShort,
|
|
232
|
+
)
|
|
233
|
+
|
|
234
|
+
def list(
|
|
235
|
+
self,
|
|
236
|
+
*,
|
|
237
|
+
api_type: Literal["wasi-http", "proxy-wasm"] | NotGiven = NOT_GIVEN,
|
|
238
|
+
binary: int | NotGiven = NOT_GIVEN,
|
|
239
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
240
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
241
|
+
offset: int | NotGiven = NOT_GIVEN,
|
|
242
|
+
ordering: Literal[
|
|
243
|
+
"name",
|
|
244
|
+
"-name",
|
|
245
|
+
"status",
|
|
246
|
+
"-status",
|
|
247
|
+
"id",
|
|
248
|
+
"-id",
|
|
249
|
+
"template",
|
|
250
|
+
"-template",
|
|
251
|
+
"binary",
|
|
252
|
+
"-binary",
|
|
253
|
+
"plan",
|
|
254
|
+
"-plan",
|
|
255
|
+
]
|
|
256
|
+
| NotGiven = NOT_GIVEN,
|
|
257
|
+
plan: int | NotGiven = NOT_GIVEN,
|
|
258
|
+
status: int | NotGiven = NOT_GIVEN,
|
|
259
|
+
template: int | NotGiven = NOT_GIVEN,
|
|
260
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
261
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
262
|
+
extra_headers: Headers | None = None,
|
|
263
|
+
extra_query: Query | None = None,
|
|
264
|
+
extra_body: Body | None = None,
|
|
265
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
266
|
+
) -> SyncOffsetPageFastedgeApps[AppShort]:
|
|
267
|
+
"""
|
|
268
|
+
List client's apps
|
|
269
|
+
|
|
270
|
+
Args:
|
|
271
|
+
api_type:
|
|
272
|
+
API type:
|
|
273
|
+
wasi-http - WASI with HTTP entry point
|
|
274
|
+
proxy-wasm - Proxy-Wasm app, callable from CDN
|
|
275
|
+
|
|
276
|
+
binary: Binary ID
|
|
277
|
+
|
|
278
|
+
limit: Limit for pagination
|
|
279
|
+
|
|
280
|
+
name: Name of the app
|
|
281
|
+
|
|
282
|
+
offset: Offset for pagination
|
|
283
|
+
|
|
284
|
+
ordering: Ordering
|
|
285
|
+
|
|
286
|
+
plan: Plan ID
|
|
287
|
+
|
|
288
|
+
status:
|
|
289
|
+
Status code:
|
|
290
|
+
0 - draft (inactive)
|
|
291
|
+
1 - enabled
|
|
292
|
+
2 - disabled
|
|
293
|
+
3 - hourly call limit exceeded
|
|
294
|
+
4 - daily call limit exceeded
|
|
295
|
+
5 - suspended
|
|
296
|
+
|
|
297
|
+
template: Template ID
|
|
298
|
+
|
|
299
|
+
extra_headers: Send extra headers
|
|
300
|
+
|
|
301
|
+
extra_query: Add additional query parameters to the request
|
|
302
|
+
|
|
303
|
+
extra_body: Add additional JSON properties to the request
|
|
304
|
+
|
|
305
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
306
|
+
"""
|
|
307
|
+
return self._get_api_list(
|
|
308
|
+
"/fastedge/v1/apps",
|
|
309
|
+
page=SyncOffsetPageFastedgeApps[AppShort],
|
|
310
|
+
options=make_request_options(
|
|
311
|
+
extra_headers=extra_headers,
|
|
312
|
+
extra_query=extra_query,
|
|
313
|
+
extra_body=extra_body,
|
|
314
|
+
timeout=timeout,
|
|
315
|
+
query=maybe_transform(
|
|
316
|
+
{
|
|
317
|
+
"api_type": api_type,
|
|
318
|
+
"binary": binary,
|
|
319
|
+
"limit": limit,
|
|
320
|
+
"name": name,
|
|
321
|
+
"offset": offset,
|
|
322
|
+
"ordering": ordering,
|
|
323
|
+
"plan": plan,
|
|
324
|
+
"status": status,
|
|
325
|
+
"template": template,
|
|
326
|
+
},
|
|
327
|
+
app_list_params.AppListParams,
|
|
328
|
+
),
|
|
329
|
+
),
|
|
330
|
+
model=AppShort,
|
|
331
|
+
)
|
|
332
|
+
|
|
333
|
+
def delete(
|
|
334
|
+
self,
|
|
335
|
+
id: int,
|
|
336
|
+
*,
|
|
337
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
338
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
339
|
+
extra_headers: Headers | None = None,
|
|
340
|
+
extra_query: Query | None = None,
|
|
341
|
+
extra_body: Body | None = None,
|
|
342
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
343
|
+
) -> None:
|
|
344
|
+
"""
|
|
345
|
+
Delete app
|
|
346
|
+
|
|
347
|
+
Args:
|
|
348
|
+
extra_headers: Send extra headers
|
|
349
|
+
|
|
350
|
+
extra_query: Add additional query parameters to the request
|
|
351
|
+
|
|
352
|
+
extra_body: Add additional JSON properties to the request
|
|
353
|
+
|
|
354
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
355
|
+
"""
|
|
356
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
357
|
+
return self._delete(
|
|
358
|
+
f"/fastedge/v1/apps/{id}",
|
|
359
|
+
options=make_request_options(
|
|
360
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
361
|
+
),
|
|
362
|
+
cast_to=NoneType,
|
|
363
|
+
)
|
|
364
|
+
|
|
365
|
+
def get(
|
|
366
|
+
self,
|
|
367
|
+
id: int,
|
|
368
|
+
*,
|
|
369
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
370
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
371
|
+
extra_headers: Headers | None = None,
|
|
372
|
+
extra_query: Query | None = None,
|
|
373
|
+
extra_body: Body | None = None,
|
|
374
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
375
|
+
) -> App:
|
|
376
|
+
"""
|
|
377
|
+
Get app details
|
|
378
|
+
|
|
379
|
+
Args:
|
|
380
|
+
extra_headers: Send extra headers
|
|
381
|
+
|
|
382
|
+
extra_query: Add additional query parameters to the request
|
|
383
|
+
|
|
384
|
+
extra_body: Add additional JSON properties to the request
|
|
385
|
+
|
|
386
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
387
|
+
"""
|
|
388
|
+
return self._get(
|
|
389
|
+
f"/fastedge/v1/apps/{id}",
|
|
390
|
+
options=make_request_options(
|
|
391
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
392
|
+
),
|
|
393
|
+
cast_to=App,
|
|
394
|
+
)
|
|
395
|
+
|
|
396
|
+
def replace(
|
|
397
|
+
self,
|
|
398
|
+
id: int,
|
|
399
|
+
*,
|
|
400
|
+
body: app_replace_params.Body | NotGiven = NOT_GIVEN,
|
|
401
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
402
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
403
|
+
extra_headers: Headers | None = None,
|
|
404
|
+
extra_query: Query | None = None,
|
|
405
|
+
extra_body: Body | None = None,
|
|
406
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
407
|
+
) -> AppShort:
|
|
408
|
+
"""
|
|
409
|
+
Update an app
|
|
410
|
+
|
|
411
|
+
Args:
|
|
412
|
+
extra_headers: Send extra headers
|
|
413
|
+
|
|
414
|
+
extra_query: Add additional query parameters to the request
|
|
415
|
+
|
|
416
|
+
extra_body: Add additional JSON properties to the request
|
|
417
|
+
|
|
418
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
419
|
+
"""
|
|
420
|
+
return self._put(
|
|
421
|
+
f"/fastedge/v1/apps/{id}",
|
|
422
|
+
body=maybe_transform(body, app_replace_params.AppReplaceParams),
|
|
423
|
+
options=make_request_options(
|
|
424
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
425
|
+
),
|
|
426
|
+
cast_to=AppShort,
|
|
427
|
+
)
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
class AsyncAppsResource(AsyncAPIResource):
|
|
431
|
+
@cached_property
|
|
432
|
+
def logs(self) -> AsyncLogsResource:
|
|
433
|
+
return AsyncLogsResource(self._client)
|
|
434
|
+
|
|
435
|
+
@cached_property
|
|
436
|
+
def with_raw_response(self) -> AsyncAppsResourceWithRawResponse:
|
|
437
|
+
"""
|
|
438
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
439
|
+
the raw response object instead of the parsed content.
|
|
440
|
+
|
|
441
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
442
|
+
"""
|
|
443
|
+
return AsyncAppsResourceWithRawResponse(self)
|
|
444
|
+
|
|
445
|
+
@cached_property
|
|
446
|
+
def with_streaming_response(self) -> AsyncAppsResourceWithStreamingResponse:
|
|
447
|
+
"""
|
|
448
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
449
|
+
|
|
450
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
451
|
+
"""
|
|
452
|
+
return AsyncAppsResourceWithStreamingResponse(self)
|
|
453
|
+
|
|
454
|
+
async def create(
|
|
455
|
+
self,
|
|
456
|
+
*,
|
|
457
|
+
binary: int | NotGiven = NOT_GIVEN,
|
|
458
|
+
comment: str | NotGiven = NOT_GIVEN,
|
|
459
|
+
debug: bool | NotGiven = NOT_GIVEN,
|
|
460
|
+
env: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
461
|
+
log: Optional[Literal["kafka", "none"]] | NotGiven = NOT_GIVEN,
|
|
462
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
463
|
+
rsp_headers: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
464
|
+
secrets: Dict[str, app_create_params.Secrets] | NotGiven = NOT_GIVEN,
|
|
465
|
+
status: int | NotGiven = NOT_GIVEN,
|
|
466
|
+
stores: Dict[str, int] | NotGiven = NOT_GIVEN,
|
|
467
|
+
template: int | NotGiven = NOT_GIVEN,
|
|
468
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
469
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
470
|
+
extra_headers: Headers | None = None,
|
|
471
|
+
extra_query: Query | None = None,
|
|
472
|
+
extra_body: Body | None = None,
|
|
473
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
474
|
+
) -> AppShort:
|
|
475
|
+
"""
|
|
476
|
+
Add a new app
|
|
477
|
+
|
|
478
|
+
Args:
|
|
479
|
+
binary: Binary ID
|
|
480
|
+
|
|
481
|
+
comment: App description
|
|
482
|
+
|
|
483
|
+
debug: Switch on logging for 30 minutes (switched off by default)
|
|
484
|
+
|
|
485
|
+
env: Environment variables
|
|
486
|
+
|
|
487
|
+
log: Logging channel (by default - kafka, which allows exploring logs with API)
|
|
488
|
+
|
|
489
|
+
name: App name
|
|
490
|
+
|
|
491
|
+
rsp_headers: Extra headers to add to the response
|
|
492
|
+
|
|
493
|
+
secrets: Application secrets
|
|
494
|
+
|
|
495
|
+
status:
|
|
496
|
+
Status code:
|
|
497
|
+
0 - draft (inactive)
|
|
498
|
+
1 - enabled
|
|
499
|
+
2 - disabled
|
|
500
|
+
3 - hourly call limit exceeded
|
|
501
|
+
4 - daily call limit exceeded
|
|
502
|
+
5 - suspended
|
|
503
|
+
|
|
504
|
+
stores: KV stores for the app
|
|
505
|
+
|
|
506
|
+
template: Template ID
|
|
507
|
+
|
|
508
|
+
extra_headers: Send extra headers
|
|
509
|
+
|
|
510
|
+
extra_query: Add additional query parameters to the request
|
|
511
|
+
|
|
512
|
+
extra_body: Add additional JSON properties to the request
|
|
513
|
+
|
|
514
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
515
|
+
"""
|
|
516
|
+
return await self._post(
|
|
517
|
+
"/fastedge/v1/apps",
|
|
518
|
+
body=await async_maybe_transform(
|
|
519
|
+
{
|
|
520
|
+
"binary": binary,
|
|
521
|
+
"comment": comment,
|
|
522
|
+
"debug": debug,
|
|
523
|
+
"env": env,
|
|
524
|
+
"log": log,
|
|
525
|
+
"name": name,
|
|
526
|
+
"rsp_headers": rsp_headers,
|
|
527
|
+
"secrets": secrets,
|
|
528
|
+
"status": status,
|
|
529
|
+
"stores": stores,
|
|
530
|
+
"template": template,
|
|
531
|
+
},
|
|
532
|
+
app_create_params.AppCreateParams,
|
|
533
|
+
),
|
|
534
|
+
options=make_request_options(
|
|
535
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
536
|
+
),
|
|
537
|
+
cast_to=AppShort,
|
|
538
|
+
)
|
|
539
|
+
|
|
540
|
+
async def update(
|
|
541
|
+
self,
|
|
542
|
+
id: int,
|
|
543
|
+
*,
|
|
544
|
+
binary: int | NotGiven = NOT_GIVEN,
|
|
545
|
+
comment: str | NotGiven = NOT_GIVEN,
|
|
546
|
+
debug: bool | NotGiven = NOT_GIVEN,
|
|
547
|
+
env: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
548
|
+
log: Optional[Literal["kafka", "none"]] | NotGiven = NOT_GIVEN,
|
|
549
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
550
|
+
rsp_headers: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
551
|
+
secrets: Dict[str, app_update_params.Secrets] | NotGiven = NOT_GIVEN,
|
|
552
|
+
status: int | NotGiven = NOT_GIVEN,
|
|
553
|
+
stores: Dict[str, int] | NotGiven = NOT_GIVEN,
|
|
554
|
+
template: int | NotGiven = NOT_GIVEN,
|
|
555
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
556
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
557
|
+
extra_headers: Headers | None = None,
|
|
558
|
+
extra_query: Query | None = None,
|
|
559
|
+
extra_body: Body | None = None,
|
|
560
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
561
|
+
) -> AppShort:
|
|
562
|
+
"""
|
|
563
|
+
Update app
|
|
564
|
+
|
|
565
|
+
Args:
|
|
566
|
+
binary: Binary ID
|
|
567
|
+
|
|
568
|
+
comment: App description
|
|
569
|
+
|
|
570
|
+
debug: Switch on logging for 30 minutes (switched off by default)
|
|
571
|
+
|
|
572
|
+
env: Environment variables
|
|
573
|
+
|
|
574
|
+
log: Logging channel (by default - kafka, which allows exploring logs with API)
|
|
575
|
+
|
|
576
|
+
name: App name
|
|
577
|
+
|
|
578
|
+
rsp_headers: Extra headers to add to the response
|
|
579
|
+
|
|
580
|
+
secrets: Application secrets
|
|
581
|
+
|
|
582
|
+
status:
|
|
583
|
+
Status code:
|
|
584
|
+
0 - draft (inactive)
|
|
585
|
+
1 - enabled
|
|
586
|
+
2 - disabled
|
|
587
|
+
3 - hourly call limit exceeded
|
|
588
|
+
4 - daily call limit exceeded
|
|
589
|
+
5 - suspended
|
|
590
|
+
|
|
591
|
+
stores: KV stores for the app
|
|
592
|
+
|
|
593
|
+
template: Template ID
|
|
594
|
+
|
|
595
|
+
extra_headers: Send extra headers
|
|
596
|
+
|
|
597
|
+
extra_query: Add additional query parameters to the request
|
|
598
|
+
|
|
599
|
+
extra_body: Add additional JSON properties to the request
|
|
600
|
+
|
|
601
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
602
|
+
"""
|
|
603
|
+
return await self._patch(
|
|
604
|
+
f"/fastedge/v1/apps/{id}",
|
|
605
|
+
body=await async_maybe_transform(
|
|
606
|
+
{
|
|
607
|
+
"binary": binary,
|
|
608
|
+
"comment": comment,
|
|
609
|
+
"debug": debug,
|
|
610
|
+
"env": env,
|
|
611
|
+
"log": log,
|
|
612
|
+
"name": name,
|
|
613
|
+
"rsp_headers": rsp_headers,
|
|
614
|
+
"secrets": secrets,
|
|
615
|
+
"status": status,
|
|
616
|
+
"stores": stores,
|
|
617
|
+
"template": template,
|
|
618
|
+
},
|
|
619
|
+
app_update_params.AppUpdateParams,
|
|
620
|
+
),
|
|
621
|
+
options=make_request_options(
|
|
622
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
623
|
+
),
|
|
624
|
+
cast_to=AppShort,
|
|
625
|
+
)
|
|
626
|
+
|
|
627
|
+
def list(
|
|
628
|
+
self,
|
|
629
|
+
*,
|
|
630
|
+
api_type: Literal["wasi-http", "proxy-wasm"] | NotGiven = NOT_GIVEN,
|
|
631
|
+
binary: int | NotGiven = NOT_GIVEN,
|
|
632
|
+
limit: int | NotGiven = NOT_GIVEN,
|
|
633
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
634
|
+
offset: int | NotGiven = NOT_GIVEN,
|
|
635
|
+
ordering: Literal[
|
|
636
|
+
"name",
|
|
637
|
+
"-name",
|
|
638
|
+
"status",
|
|
639
|
+
"-status",
|
|
640
|
+
"id",
|
|
641
|
+
"-id",
|
|
642
|
+
"template",
|
|
643
|
+
"-template",
|
|
644
|
+
"binary",
|
|
645
|
+
"-binary",
|
|
646
|
+
"plan",
|
|
647
|
+
"-plan",
|
|
648
|
+
]
|
|
649
|
+
| NotGiven = NOT_GIVEN,
|
|
650
|
+
plan: int | NotGiven = NOT_GIVEN,
|
|
651
|
+
status: int | NotGiven = NOT_GIVEN,
|
|
652
|
+
template: int | NotGiven = NOT_GIVEN,
|
|
653
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
654
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
655
|
+
extra_headers: Headers | None = None,
|
|
656
|
+
extra_query: Query | None = None,
|
|
657
|
+
extra_body: Body | None = None,
|
|
658
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
659
|
+
) -> AsyncPaginator[AppShort, AsyncOffsetPageFastedgeApps[AppShort]]:
|
|
660
|
+
"""
|
|
661
|
+
List client's apps
|
|
662
|
+
|
|
663
|
+
Args:
|
|
664
|
+
api_type:
|
|
665
|
+
API type:
|
|
666
|
+
wasi-http - WASI with HTTP entry point
|
|
667
|
+
proxy-wasm - Proxy-Wasm app, callable from CDN
|
|
668
|
+
|
|
669
|
+
binary: Binary ID
|
|
670
|
+
|
|
671
|
+
limit: Limit for pagination
|
|
672
|
+
|
|
673
|
+
name: Name of the app
|
|
674
|
+
|
|
675
|
+
offset: Offset for pagination
|
|
676
|
+
|
|
677
|
+
ordering: Ordering
|
|
678
|
+
|
|
679
|
+
plan: Plan ID
|
|
680
|
+
|
|
681
|
+
status:
|
|
682
|
+
Status code:
|
|
683
|
+
0 - draft (inactive)
|
|
684
|
+
1 - enabled
|
|
685
|
+
2 - disabled
|
|
686
|
+
3 - hourly call limit exceeded
|
|
687
|
+
4 - daily call limit exceeded
|
|
688
|
+
5 - suspended
|
|
689
|
+
|
|
690
|
+
template: Template ID
|
|
691
|
+
|
|
692
|
+
extra_headers: Send extra headers
|
|
693
|
+
|
|
694
|
+
extra_query: Add additional query parameters to the request
|
|
695
|
+
|
|
696
|
+
extra_body: Add additional JSON properties to the request
|
|
697
|
+
|
|
698
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
699
|
+
"""
|
|
700
|
+
return self._get_api_list(
|
|
701
|
+
"/fastedge/v1/apps",
|
|
702
|
+
page=AsyncOffsetPageFastedgeApps[AppShort],
|
|
703
|
+
options=make_request_options(
|
|
704
|
+
extra_headers=extra_headers,
|
|
705
|
+
extra_query=extra_query,
|
|
706
|
+
extra_body=extra_body,
|
|
707
|
+
timeout=timeout,
|
|
708
|
+
query=maybe_transform(
|
|
709
|
+
{
|
|
710
|
+
"api_type": api_type,
|
|
711
|
+
"binary": binary,
|
|
712
|
+
"limit": limit,
|
|
713
|
+
"name": name,
|
|
714
|
+
"offset": offset,
|
|
715
|
+
"ordering": ordering,
|
|
716
|
+
"plan": plan,
|
|
717
|
+
"status": status,
|
|
718
|
+
"template": template,
|
|
719
|
+
},
|
|
720
|
+
app_list_params.AppListParams,
|
|
721
|
+
),
|
|
722
|
+
),
|
|
723
|
+
model=AppShort,
|
|
724
|
+
)
|
|
725
|
+
|
|
726
|
+
async def delete(
|
|
727
|
+
self,
|
|
728
|
+
id: int,
|
|
729
|
+
*,
|
|
730
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
731
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
732
|
+
extra_headers: Headers | None = None,
|
|
733
|
+
extra_query: Query | None = None,
|
|
734
|
+
extra_body: Body | None = None,
|
|
735
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
736
|
+
) -> None:
|
|
737
|
+
"""
|
|
738
|
+
Delete app
|
|
739
|
+
|
|
740
|
+
Args:
|
|
741
|
+
extra_headers: Send extra headers
|
|
742
|
+
|
|
743
|
+
extra_query: Add additional query parameters to the request
|
|
744
|
+
|
|
745
|
+
extra_body: Add additional JSON properties to the request
|
|
746
|
+
|
|
747
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
748
|
+
"""
|
|
749
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
750
|
+
return await self._delete(
|
|
751
|
+
f"/fastedge/v1/apps/{id}",
|
|
752
|
+
options=make_request_options(
|
|
753
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
754
|
+
),
|
|
755
|
+
cast_to=NoneType,
|
|
756
|
+
)
|
|
757
|
+
|
|
758
|
+
async def get(
|
|
759
|
+
self,
|
|
760
|
+
id: int,
|
|
761
|
+
*,
|
|
762
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
763
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
764
|
+
extra_headers: Headers | None = None,
|
|
765
|
+
extra_query: Query | None = None,
|
|
766
|
+
extra_body: Body | None = None,
|
|
767
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
768
|
+
) -> App:
|
|
769
|
+
"""
|
|
770
|
+
Get app details
|
|
771
|
+
|
|
772
|
+
Args:
|
|
773
|
+
extra_headers: Send extra headers
|
|
774
|
+
|
|
775
|
+
extra_query: Add additional query parameters to the request
|
|
776
|
+
|
|
777
|
+
extra_body: Add additional JSON properties to the request
|
|
778
|
+
|
|
779
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
780
|
+
"""
|
|
781
|
+
return await self._get(
|
|
782
|
+
f"/fastedge/v1/apps/{id}",
|
|
783
|
+
options=make_request_options(
|
|
784
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
785
|
+
),
|
|
786
|
+
cast_to=App,
|
|
787
|
+
)
|
|
788
|
+
|
|
789
|
+
async def replace(
|
|
790
|
+
self,
|
|
791
|
+
id: int,
|
|
792
|
+
*,
|
|
793
|
+
body: app_replace_params.Body | NotGiven = NOT_GIVEN,
|
|
794
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
795
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
796
|
+
extra_headers: Headers | None = None,
|
|
797
|
+
extra_query: Query | None = None,
|
|
798
|
+
extra_body: Body | None = None,
|
|
799
|
+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
800
|
+
) -> AppShort:
|
|
801
|
+
"""
|
|
802
|
+
Update an app
|
|
803
|
+
|
|
804
|
+
Args:
|
|
805
|
+
extra_headers: Send extra headers
|
|
806
|
+
|
|
807
|
+
extra_query: Add additional query parameters to the request
|
|
808
|
+
|
|
809
|
+
extra_body: Add additional JSON properties to the request
|
|
810
|
+
|
|
811
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
812
|
+
"""
|
|
813
|
+
return await self._put(
|
|
814
|
+
f"/fastedge/v1/apps/{id}",
|
|
815
|
+
body=await async_maybe_transform(body, app_replace_params.AppReplaceParams),
|
|
816
|
+
options=make_request_options(
|
|
817
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
818
|
+
),
|
|
819
|
+
cast_to=AppShort,
|
|
820
|
+
)
|
|
821
|
+
|
|
822
|
+
|
|
823
|
+
class AppsResourceWithRawResponse:
|
|
824
|
+
def __init__(self, apps: AppsResource) -> None:
|
|
825
|
+
self._apps = apps
|
|
826
|
+
|
|
827
|
+
self.create = to_raw_response_wrapper(
|
|
828
|
+
apps.create,
|
|
829
|
+
)
|
|
830
|
+
self.update = to_raw_response_wrapper(
|
|
831
|
+
apps.update,
|
|
832
|
+
)
|
|
833
|
+
self.list = to_raw_response_wrapper(
|
|
834
|
+
apps.list,
|
|
835
|
+
)
|
|
836
|
+
self.delete = to_raw_response_wrapper(
|
|
837
|
+
apps.delete,
|
|
838
|
+
)
|
|
839
|
+
self.get = to_raw_response_wrapper(
|
|
840
|
+
apps.get,
|
|
841
|
+
)
|
|
842
|
+
self.replace = to_raw_response_wrapper(
|
|
843
|
+
apps.replace,
|
|
844
|
+
)
|
|
845
|
+
|
|
846
|
+
@cached_property
|
|
847
|
+
def logs(self) -> LogsResourceWithRawResponse:
|
|
848
|
+
return LogsResourceWithRawResponse(self._apps.logs)
|
|
849
|
+
|
|
850
|
+
|
|
851
|
+
class AsyncAppsResourceWithRawResponse:
|
|
852
|
+
def __init__(self, apps: AsyncAppsResource) -> None:
|
|
853
|
+
self._apps = apps
|
|
854
|
+
|
|
855
|
+
self.create = async_to_raw_response_wrapper(
|
|
856
|
+
apps.create,
|
|
857
|
+
)
|
|
858
|
+
self.update = async_to_raw_response_wrapper(
|
|
859
|
+
apps.update,
|
|
860
|
+
)
|
|
861
|
+
self.list = async_to_raw_response_wrapper(
|
|
862
|
+
apps.list,
|
|
863
|
+
)
|
|
864
|
+
self.delete = async_to_raw_response_wrapper(
|
|
865
|
+
apps.delete,
|
|
866
|
+
)
|
|
867
|
+
self.get = async_to_raw_response_wrapper(
|
|
868
|
+
apps.get,
|
|
869
|
+
)
|
|
870
|
+
self.replace = async_to_raw_response_wrapper(
|
|
871
|
+
apps.replace,
|
|
872
|
+
)
|
|
873
|
+
|
|
874
|
+
@cached_property
|
|
875
|
+
def logs(self) -> AsyncLogsResourceWithRawResponse:
|
|
876
|
+
return AsyncLogsResourceWithRawResponse(self._apps.logs)
|
|
877
|
+
|
|
878
|
+
|
|
879
|
+
class AppsResourceWithStreamingResponse:
|
|
880
|
+
def __init__(self, apps: AppsResource) -> None:
|
|
881
|
+
self._apps = apps
|
|
882
|
+
|
|
883
|
+
self.create = to_streamed_response_wrapper(
|
|
884
|
+
apps.create,
|
|
885
|
+
)
|
|
886
|
+
self.update = to_streamed_response_wrapper(
|
|
887
|
+
apps.update,
|
|
888
|
+
)
|
|
889
|
+
self.list = to_streamed_response_wrapper(
|
|
890
|
+
apps.list,
|
|
891
|
+
)
|
|
892
|
+
self.delete = to_streamed_response_wrapper(
|
|
893
|
+
apps.delete,
|
|
894
|
+
)
|
|
895
|
+
self.get = to_streamed_response_wrapper(
|
|
896
|
+
apps.get,
|
|
897
|
+
)
|
|
898
|
+
self.replace = to_streamed_response_wrapper(
|
|
899
|
+
apps.replace,
|
|
900
|
+
)
|
|
901
|
+
|
|
902
|
+
@cached_property
|
|
903
|
+
def logs(self) -> LogsResourceWithStreamingResponse:
|
|
904
|
+
return LogsResourceWithStreamingResponse(self._apps.logs)
|
|
905
|
+
|
|
906
|
+
|
|
907
|
+
class AsyncAppsResourceWithStreamingResponse:
|
|
908
|
+
def __init__(self, apps: AsyncAppsResource) -> None:
|
|
909
|
+
self._apps = apps
|
|
910
|
+
|
|
911
|
+
self.create = async_to_streamed_response_wrapper(
|
|
912
|
+
apps.create,
|
|
913
|
+
)
|
|
914
|
+
self.update = async_to_streamed_response_wrapper(
|
|
915
|
+
apps.update,
|
|
916
|
+
)
|
|
917
|
+
self.list = async_to_streamed_response_wrapper(
|
|
918
|
+
apps.list,
|
|
919
|
+
)
|
|
920
|
+
self.delete = async_to_streamed_response_wrapper(
|
|
921
|
+
apps.delete,
|
|
922
|
+
)
|
|
923
|
+
self.get = async_to_streamed_response_wrapper(
|
|
924
|
+
apps.get,
|
|
925
|
+
)
|
|
926
|
+
self.replace = async_to_streamed_response_wrapper(
|
|
927
|
+
apps.replace,
|
|
928
|
+
)
|
|
929
|
+
|
|
930
|
+
@cached_property
|
|
931
|
+
def logs(self) -> AsyncLogsResourceWithStreamingResponse:
|
|
932
|
+
return AsyncLogsResourceWithStreamingResponse(self._apps.logs)
|