gcore 0.5.0__py3-none-any.whl → 0.7.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/_client.py +9 -0
- gcore/_models.py +24 -3
- gcore/_version.py +1 -1
- gcore/pagination.py +101 -1
- gcore/resources/__init__.py +14 -0
- gcore/resources/cloud/__init__.py +42 -0
- gcore/resources/cloud/audit_logs.py +480 -0
- gcore/resources/cloud/cloud.py +96 -0
- gcore/resources/cloud/cost_reports.py +811 -0
- gcore/resources/cloud/file_shares/file_shares.py +74 -9
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +61 -26
- gcore/resources/cloud/inference/__init__.py +14 -0
- gcore/resources/cloud/inference/api_keys.py +621 -0
- gcore/resources/cloud/inference/inference.py +32 -0
- gcore/resources/cloud/inference/registry_credentials.py +4 -6
- gcore/resources/cloud/load_balancers/pools/members.py +22 -6
- gcore/resources/cloud/usage_reports.py +337 -0
- gcore/resources/streaming/__init__.py +159 -0
- gcore/resources/streaming/ai_tasks.py +1288 -0
- gcore/resources/streaming/broadcasts.py +579 -0
- gcore/resources/streaming/directories.py +515 -0
- gcore/resources/streaming/players.py +577 -0
- gcore/resources/streaming/playlists.py +1059 -0
- gcore/resources/streaming/quality_sets.py +331 -0
- gcore/resources/streaming/restreams.py +484 -0
- gcore/resources/streaming/statistics.py +3224 -0
- gcore/resources/streaming/streaming.py +390 -0
- gcore/resources/streaming/streams/__init__.py +33 -0
- gcore/resources/streaming/streams/overlays.py +716 -0
- gcore/resources/streaming/streams/streams.py +1592 -0
- gcore/resources/streaming/videos/__init__.py +33 -0
- gcore/resources/streaming/videos/subtitles.py +623 -0
- gcore/resources/streaming/videos/videos.py +1553 -0
- gcore/resources/waap/ip_info.py +28 -10
- gcore/types/cloud/__init__.py +12 -0
- gcore/types/cloud/audit_log_entry.py +254 -0
- gcore/types/cloud/audit_log_list_params.py +158 -0
- gcore/types/cloud/cost_report_aggregated.py +865 -0
- gcore/types/cloud/cost_report_aggregated_monthly.py +865 -0
- gcore/types/cloud/cost_report_detailed.py +1343 -0
- gcore/types/cloud/cost_report_get_aggregated_monthly_params.py +394 -0
- gcore/types/cloud/cost_report_get_aggregated_params.py +409 -0
- gcore/types/cloud/cost_report_get_detailed_params.py +435 -0
- gcore/types/cloud/file_share.py +37 -3
- gcore/types/cloud/file_share_create_params.py +16 -0
- gcore/types/cloud/file_share_update_params.py +29 -3
- gcore/types/cloud/gpu_baremetal_cluster.py +2 -2
- gcore/types/cloud/gpu_baremetal_cluster_create_params.py +9 -0
- gcore/types/cloud/inference/__init__.py +5 -0
- 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/inference_api_key.py +24 -0
- gcore/types/cloud/inference/inference_api_key_create.py +27 -0
- 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/quota_get_all_response.py +24 -2
- gcore/types/cloud/quota_get_by_region_response.py +24 -2
- gcore/types/cloud/quotas/request_create_params.py +12 -1
- gcore/types/cloud/quotas/request_get_response.py +12 -1
- gcore/types/cloud/quotas/request_list_response.py +12 -1
- gcore/types/cloud/usage_report.py +1612 -0
- gcore/types/cloud/usage_report_get_params.py +432 -0
- gcore/types/streaming/__init__.py +143 -0
- gcore/types/streaming/ai_contentmoderation_casm.py +39 -0
- gcore/types/streaming/ai_contentmoderation_hardnudity.py +54 -0
- gcore/types/streaming/ai_contentmoderation_nsfw.py +39 -0
- gcore/types/streaming/ai_contentmoderation_softnudity.py +66 -0
- gcore/types/streaming/ai_contentmoderation_sport.py +39 -0
- gcore/types/streaming/ai_contentmoderation_weapon.py +39 -0
- gcore/types/streaming/ai_task.py +205 -0
- gcore/types/streaming/ai_task_cancel_response.py +12 -0
- gcore/types/streaming/ai_task_create_params.py +168 -0
- gcore/types/streaming/ai_task_create_response.py +10 -0
- gcore/types/streaming/ai_task_get_ai_settings_params.py +27 -0
- gcore/types/streaming/ai_task_get_ai_settings_response.py +12 -0
- gcore/types/streaming/ai_task_get_response.py +313 -0
- gcore/types/streaming/ai_task_list_params.py +50 -0
- gcore/types/streaming/broadcast.py +71 -0
- gcore/types/streaming/broadcast_create_params.py +76 -0
- gcore/types/streaming/broadcast_list_params.py +12 -0
- gcore/types/streaming/broadcast_spectators_count.py +12 -0
- gcore/types/streaming/broadcast_update_params.py +76 -0
- gcore/types/streaming/clip.py +78 -0
- gcore/types/streaming/create_video_param.py +214 -0
- gcore/types/streaming/direct_upload_parameters.py +33 -0
- gcore/types/streaming/directories_tree.py +19 -0
- gcore/types/streaming/directory_base.py +31 -0
- gcore/types/streaming/directory_create_params.py +15 -0
- gcore/types/streaming/directory_get_response.py +19 -0
- gcore/types/streaming/directory_item.py +13 -0
- gcore/types/streaming/directory_update_params.py +18 -0
- gcore/types/streaming/directory_video.py +13 -0
- gcore/types/streaming/ffprobes.py +25 -0
- gcore/types/streaming/max_stream_series.py +21 -0
- gcore/types/streaming/meet_series.py +23 -0
- gcore/types/streaming/player.py +114 -0
- gcore/types/streaming/player_create_params.py +18 -0
- gcore/types/streaming/player_list_params.py +12 -0
- gcore/types/streaming/player_param.py +114 -0
- gcore/types/streaming/player_update_params.py +18 -0
- gcore/types/streaming/playlist.py +102 -0
- gcore/types/streaming/playlist_create.py +12 -0
- gcore/types/streaming/playlist_create_params.py +102 -0
- gcore/types/streaming/playlist_list_params.py +12 -0
- gcore/types/streaming/playlist_list_videos_response.py +10 -0
- gcore/types/streaming/playlist_update_params.py +102 -0
- gcore/types/streaming/playlist_video.py +215 -0
- gcore/types/streaming/popular_videos.py +17 -0
- gcore/types/streaming/quality_set_set_default_params.py +23 -0
- gcore/types/streaming/quality_sets.py +57 -0
- gcore/types/streaming/restream.py +37 -0
- gcore/types/streaming/restream_create_params.py +41 -0
- gcore/types/streaming/restream_list_params.py +12 -0
- gcore/types/streaming/restream_update_params.py +41 -0
- gcore/types/streaming/statistic_get_ffprobes_params.py +22 -0
- gcore/types/streaming/statistic_get_live_unique_viewers_params.py +26 -0
- gcore/types/streaming/statistic_get_live_unique_viewers_response.py +25 -0
- gcore/types/streaming/statistic_get_live_watch_time_cdn_params.py +32 -0
- gcore/types/streaming/statistic_get_live_watch_time_total_cdn_params.py +30 -0
- gcore/types/streaming/statistic_get_max_streams_series_params.py +20 -0
- gcore/types/streaming/statistic_get_meet_series_params.py +20 -0
- gcore/types/streaming/statistic_get_popular_videos_params.py +15 -0
- gcore/types/streaming/statistic_get_storage_series_params.py +20 -0
- gcore/types/streaming/statistic_get_stream_series_params.py +20 -0
- gcore/types/streaming/statistic_get_unique_viewers_cdn_params.py +27 -0
- gcore/types/streaming/statistic_get_unique_viewers_params.py +34 -0
- gcore/types/streaming/statistic_get_views_by_browsers_params.py +15 -0
- gcore/types/streaming/statistic_get_views_by_country_params.py +15 -0
- gcore/types/streaming/statistic_get_views_by_hostname_params.py +15 -0
- gcore/types/streaming/statistic_get_views_by_operating_system_params.py +15 -0
- gcore/types/streaming/statistic_get_views_by_referer_params.py +15 -0
- gcore/types/streaming/statistic_get_views_by_region_params.py +15 -0
- gcore/types/streaming/statistic_get_views_heatmap_params.py +21 -0
- gcore/types/streaming/statistic_get_views_params.py +34 -0
- gcore/types/streaming/statistic_get_vod_storage_volume_params.py +17 -0
- gcore/types/streaming/statistic_get_vod_transcoding_duration_params.py +17 -0
- gcore/types/streaming/statistic_get_vod_unique_viewers_cdn_params.py +26 -0
- gcore/types/streaming/statistic_get_vod_watch_time_cdn_params.py +32 -0
- gcore/types/streaming/statistic_get_vod_watch_time_total_cdn_params.py +30 -0
- gcore/types/streaming/statistic_get_vod_watch_time_total_cdn_response.py +22 -0
- gcore/types/streaming/storage_series.py +23 -0
- gcore/types/streaming/stream.py +420 -0
- gcore/types/streaming/stream_create_clip_params.py +48 -0
- gcore/types/streaming/stream_create_params.py +165 -0
- gcore/types/streaming/stream_list_clips_response.py +10 -0
- gcore/types/streaming/stream_list_params.py +18 -0
- gcore/types/streaming/stream_series.py +21 -0
- gcore/types/streaming/stream_start_recording_response.py +76 -0
- gcore/types/streaming/stream_update_params.py +169 -0
- gcore/types/streaming/streams/__init__.py +11 -0
- gcore/types/streaming/streams/overlay.py +43 -0
- gcore/types/streaming/streams/overlay_create_params.py +36 -0
- gcore/types/streaming/streams/overlay_create_response.py +10 -0
- gcore/types/streaming/streams/overlay_list_response.py +10 -0
- gcore/types/streaming/streams/overlay_update_multiple_params.py +39 -0
- gcore/types/streaming/streams/overlay_update_multiple_response.py +10 -0
- gcore/types/streaming/streams/overlay_update_params.py +33 -0
- gcore/types/streaming/subtitle.py +12 -0
- gcore/types/streaming/subtitle_base.py +18 -0
- gcore/types/streaming/subtitle_base_param.py +18 -0
- gcore/types/streaming/unique_viewers.py +35 -0
- gcore/types/streaming/unique_viewers_cdn.py +17 -0
- gcore/types/streaming/video.py +444 -0
- gcore/types/streaming/video_create_multiple_params.py +28 -0
- gcore/types/streaming/video_create_multiple_response.py +10 -0
- gcore/types/streaming/video_create_params.py +13 -0
- gcore/types/streaming/video_create_response.py +10 -0
- gcore/types/streaming/video_list_names_params.py +13 -0
- gcore/types/streaming/video_list_params.py +59 -0
- gcore/types/streaming/video_update_params.py +214 -0
- gcore/types/streaming/videos/__init__.py +7 -0
- gcore/types/streaming/videos/subtitle_create_params.py +17 -0
- gcore/types/streaming/videos/subtitle_list_response.py +10 -0
- gcore/types/streaming/videos/subtitle_update_params.py +20 -0
- gcore/types/streaming/views.py +35 -0
- gcore/types/streaming/views_by_browser.py +17 -0
- gcore/types/streaming/views_by_country.py +19 -0
- gcore/types/streaming/views_by_hostname.py +17 -0
- gcore/types/streaming/views_by_operating_system.py +17 -0
- gcore/types/streaming/views_by_referer.py +17 -0
- gcore/types/streaming/views_by_region.py +19 -0
- gcore/types/streaming/views_heatmap.py +19 -0
- gcore/types/streaming/vod_statistics_series.py +21 -0
- gcore/types/streaming/vod_total_stream_duration_series.py +22 -0
- gcore/types/waap/domains/custom_rule_create_params.py +4 -4
- gcore/types/waap/domains/custom_rule_update_params.py +4 -4
- gcore/types/waap/ip_info_get_blocked_requests_params.py +5 -1
- gcore/types/waap/ip_info_get_counts_params.py +2 -1
- gcore/types/waap/ip_info_get_top_sessions_params.py +5 -1
- gcore/types/waap/ip_info_get_top_urls_params.py +5 -1
- gcore/types/waap/ip_info_get_top_user_agents_params.py +5 -1
- gcore/types/waap/waap_custom_rule.py +4 -4
- {gcore-0.5.0.dist-info → gcore-0.7.0.dist-info}/METADATA +2 -3
- {gcore-0.5.0.dist-info → gcore-0.7.0.dist-info}/RECORD +200 -43
- {gcore-0.5.0.dist-info → gcore-0.7.0.dist-info}/WHEEL +0 -0
- {gcore-0.5.0.dist-info → gcore-0.7.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Dict, Iterable
|
|
5
|
+
from typing import Dict, Iterable, Optional
|
|
6
6
|
from typing_extensions import Literal, overload
|
|
7
7
|
|
|
8
8
|
import httpx
|
|
@@ -35,6 +35,7 @@ from ....types.cloud import (
|
|
|
35
35
|
from ...._base_client import AsyncPaginator, make_request_options
|
|
36
36
|
from ....types.cloud.file_share import FileShare
|
|
37
37
|
from ....types.cloud.task_id_list import TaskIDList
|
|
38
|
+
from ....types.cloud.tag_update_map_param import TagUpdateMapParam
|
|
38
39
|
|
|
39
40
|
__all__ = ["FileSharesResource", "AsyncFileSharesResource"]
|
|
40
41
|
|
|
@@ -129,6 +130,7 @@ class FileSharesResource(SyncAPIResource):
|
|
|
129
130
|
protocol: Literal["NFS"],
|
|
130
131
|
size: int,
|
|
131
132
|
volume_type: Literal["vast_share_type"],
|
|
133
|
+
share_settings: file_share_create_params.CreateVastFileShareSerializerShareSettings | NotGiven = NOT_GIVEN,
|
|
132
134
|
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
133
135
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
134
136
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -153,6 +155,8 @@ class FileSharesResource(SyncAPIResource):
|
|
|
153
155
|
|
|
154
156
|
volume_type: File share volume type
|
|
155
157
|
|
|
158
|
+
share_settings: Configuration settings for the share
|
|
159
|
+
|
|
156
160
|
tags: Key-value tags to associate with the resource. A tag is a key-value pair that
|
|
157
161
|
can be associated with a resource, enabling efficient filtering and grouping for
|
|
158
162
|
better organization and management. Some tags are read-only and cannot be
|
|
@@ -182,6 +186,7 @@ class FileSharesResource(SyncAPIResource):
|
|
|
182
186
|
access: Iterable[file_share_create_params.CreateStandardFileShareSerializerAccess] | NotGiven = NOT_GIVEN,
|
|
183
187
|
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
184
188
|
volume_type: Literal["default_share_type"] | Literal["vast_share_type"] | NotGiven = NOT_GIVEN,
|
|
189
|
+
share_settings: file_share_create_params.CreateVastFileShareSerializerShareSettings | NotGiven = NOT_GIVEN,
|
|
185
190
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
186
191
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
187
192
|
extra_headers: Headers | None = None,
|
|
@@ -204,6 +209,7 @@ class FileSharesResource(SyncAPIResource):
|
|
|
204
209
|
"access": access,
|
|
205
210
|
"tags": tags,
|
|
206
211
|
"volume_type": volume_type,
|
|
212
|
+
"share_settings": share_settings,
|
|
207
213
|
},
|
|
208
214
|
file_share_create_params.FileShareCreateParams,
|
|
209
215
|
),
|
|
@@ -219,7 +225,8 @@ class FileSharesResource(SyncAPIResource):
|
|
|
219
225
|
*,
|
|
220
226
|
project_id: int | None = None,
|
|
221
227
|
region_id: int | None = None,
|
|
222
|
-
name: str,
|
|
228
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
229
|
+
tags: Optional[TagUpdateMapParam] | NotGiven = NOT_GIVEN,
|
|
223
230
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
224
231
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
225
232
|
extra_headers: Headers | None = None,
|
|
@@ -228,7 +235,7 @@ class FileSharesResource(SyncAPIResource):
|
|
|
228
235
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
229
236
|
) -> FileShare:
|
|
230
237
|
"""
|
|
231
|
-
Rename file share
|
|
238
|
+
Rename file share or update tags
|
|
232
239
|
|
|
233
240
|
Args:
|
|
234
241
|
project_id: Project ID
|
|
@@ -237,7 +244,27 @@ class FileSharesResource(SyncAPIResource):
|
|
|
237
244
|
|
|
238
245
|
file_share_id: File Share ID
|
|
239
246
|
|
|
240
|
-
name: Name
|
|
247
|
+
name: Name
|
|
248
|
+
|
|
249
|
+
tags: Update key-value tags using JSON Merge Patch semantics (RFC 7386). Provide
|
|
250
|
+
key-value pairs to add or update tags. Set tag values to `null` to remove tags.
|
|
251
|
+
Unspecified tags remain unchanged. Read-only tags are always preserved and
|
|
252
|
+
cannot be modified. **Examples:**
|
|
253
|
+
|
|
254
|
+
- **Add/update tags:**
|
|
255
|
+
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
|
|
256
|
+
updates existing ones.
|
|
257
|
+
- **Delete tags:** `{'tags': {'`old_tag`': null}}` removes specific tags.
|
|
258
|
+
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
|
|
259
|
+
tags are preserved).
|
|
260
|
+
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
|
|
261
|
+
specified tags.
|
|
262
|
+
- **Mixed operations:**
|
|
263
|
+
`{'tags': {'environment': 'production', '`cost_center`': 'engineering', '`deprecated_tag`': null}}`
|
|
264
|
+
adds/updates 'environment' and '`cost_center`' while removing
|
|
265
|
+
'`deprecated_tag`', preserving other existing tags.
|
|
266
|
+
- **Replace all:** first delete existing tags with null values, then add new
|
|
267
|
+
ones in the same request.
|
|
241
268
|
|
|
242
269
|
extra_headers: Send extra headers
|
|
243
270
|
|
|
@@ -255,7 +282,13 @@ class FileSharesResource(SyncAPIResource):
|
|
|
255
282
|
raise ValueError(f"Expected a non-empty value for `file_share_id` but received {file_share_id!r}")
|
|
256
283
|
return self._patch(
|
|
257
284
|
f"/cloud/v1/file_shares/{project_id}/{region_id}/{file_share_id}",
|
|
258
|
-
body=maybe_transform(
|
|
285
|
+
body=maybe_transform(
|
|
286
|
+
{
|
|
287
|
+
"name": name,
|
|
288
|
+
"tags": tags,
|
|
289
|
+
},
|
|
290
|
+
file_share_update_params.FileShareUpdateParams,
|
|
291
|
+
),
|
|
259
292
|
options=make_request_options(
|
|
260
293
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
261
294
|
),
|
|
@@ -558,6 +591,7 @@ class AsyncFileSharesResource(AsyncAPIResource):
|
|
|
558
591
|
protocol: Literal["NFS"],
|
|
559
592
|
size: int,
|
|
560
593
|
volume_type: Literal["vast_share_type"],
|
|
594
|
+
share_settings: file_share_create_params.CreateVastFileShareSerializerShareSettings | NotGiven = NOT_GIVEN,
|
|
561
595
|
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
562
596
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
563
597
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -582,6 +616,8 @@ class AsyncFileSharesResource(AsyncAPIResource):
|
|
|
582
616
|
|
|
583
617
|
volume_type: File share volume type
|
|
584
618
|
|
|
619
|
+
share_settings: Configuration settings for the share
|
|
620
|
+
|
|
585
621
|
tags: Key-value tags to associate with the resource. A tag is a key-value pair that
|
|
586
622
|
can be associated with a resource, enabling efficient filtering and grouping for
|
|
587
623
|
better organization and management. Some tags are read-only and cannot be
|
|
@@ -611,6 +647,7 @@ class AsyncFileSharesResource(AsyncAPIResource):
|
|
|
611
647
|
access: Iterable[file_share_create_params.CreateStandardFileShareSerializerAccess] | NotGiven = NOT_GIVEN,
|
|
612
648
|
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
613
649
|
volume_type: Literal["default_share_type"] | Literal["vast_share_type"] | NotGiven = NOT_GIVEN,
|
|
650
|
+
share_settings: file_share_create_params.CreateVastFileShareSerializerShareSettings | NotGiven = NOT_GIVEN,
|
|
614
651
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
615
652
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
616
653
|
extra_headers: Headers | None = None,
|
|
@@ -633,6 +670,7 @@ class AsyncFileSharesResource(AsyncAPIResource):
|
|
|
633
670
|
"access": access,
|
|
634
671
|
"tags": tags,
|
|
635
672
|
"volume_type": volume_type,
|
|
673
|
+
"share_settings": share_settings,
|
|
636
674
|
},
|
|
637
675
|
file_share_create_params.FileShareCreateParams,
|
|
638
676
|
),
|
|
@@ -648,7 +686,8 @@ class AsyncFileSharesResource(AsyncAPIResource):
|
|
|
648
686
|
*,
|
|
649
687
|
project_id: int | None = None,
|
|
650
688
|
region_id: int | None = None,
|
|
651
|
-
name: str,
|
|
689
|
+
name: str | NotGiven = NOT_GIVEN,
|
|
690
|
+
tags: Optional[TagUpdateMapParam] | NotGiven = NOT_GIVEN,
|
|
652
691
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
653
692
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
654
693
|
extra_headers: Headers | None = None,
|
|
@@ -657,7 +696,7 @@ class AsyncFileSharesResource(AsyncAPIResource):
|
|
|
657
696
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
658
697
|
) -> FileShare:
|
|
659
698
|
"""
|
|
660
|
-
Rename file share
|
|
699
|
+
Rename file share or update tags
|
|
661
700
|
|
|
662
701
|
Args:
|
|
663
702
|
project_id: Project ID
|
|
@@ -666,7 +705,27 @@ class AsyncFileSharesResource(AsyncAPIResource):
|
|
|
666
705
|
|
|
667
706
|
file_share_id: File Share ID
|
|
668
707
|
|
|
669
|
-
name: Name
|
|
708
|
+
name: Name
|
|
709
|
+
|
|
710
|
+
tags: Update key-value tags using JSON Merge Patch semantics (RFC 7386). Provide
|
|
711
|
+
key-value pairs to add or update tags. Set tag values to `null` to remove tags.
|
|
712
|
+
Unspecified tags remain unchanged. Read-only tags are always preserved and
|
|
713
|
+
cannot be modified. **Examples:**
|
|
714
|
+
|
|
715
|
+
- **Add/update tags:**
|
|
716
|
+
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
|
|
717
|
+
updates existing ones.
|
|
718
|
+
- **Delete tags:** `{'tags': {'`old_tag`': null}}` removes specific tags.
|
|
719
|
+
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
|
|
720
|
+
tags are preserved).
|
|
721
|
+
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
|
|
722
|
+
specified tags.
|
|
723
|
+
- **Mixed operations:**
|
|
724
|
+
`{'tags': {'environment': 'production', '`cost_center`': 'engineering', '`deprecated_tag`': null}}`
|
|
725
|
+
adds/updates 'environment' and '`cost_center`' while removing
|
|
726
|
+
'`deprecated_tag`', preserving other existing tags.
|
|
727
|
+
- **Replace all:** first delete existing tags with null values, then add new
|
|
728
|
+
ones in the same request.
|
|
670
729
|
|
|
671
730
|
extra_headers: Send extra headers
|
|
672
731
|
|
|
@@ -684,7 +743,13 @@ class AsyncFileSharesResource(AsyncAPIResource):
|
|
|
684
743
|
raise ValueError(f"Expected a non-empty value for `file_share_id` but received {file_share_id!r}")
|
|
685
744
|
return await self._patch(
|
|
686
745
|
f"/cloud/v1/file_shares/{project_id}/{region_id}/{file_share_id}",
|
|
687
|
-
body=await async_maybe_transform(
|
|
746
|
+
body=await async_maybe_transform(
|
|
747
|
+
{
|
|
748
|
+
"name": name,
|
|
749
|
+
"tags": tags,
|
|
750
|
+
},
|
|
751
|
+
file_share_update_params.FileShareUpdateParams,
|
|
752
|
+
),
|
|
688
753
|
options=make_request_options(
|
|
689
754
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
690
755
|
),
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
import typing_extensions
|
|
5
6
|
from typing import Dict, List, Iterable, Optional
|
|
6
7
|
|
|
7
8
|
import httpx
|
|
@@ -111,6 +112,7 @@ class GPUBaremetalClustersResource(SyncAPIResource):
|
|
|
111
112
|
name: str,
|
|
112
113
|
instances_count: int | NotGiven = NOT_GIVEN,
|
|
113
114
|
password: str | NotGiven = NOT_GIVEN,
|
|
115
|
+
security_groups: Iterable[gpu_baremetal_cluster_create_params.SecurityGroup] | NotGiven = NOT_GIVEN,
|
|
114
116
|
ssh_key_name: str | NotGiven = NOT_GIVEN,
|
|
115
117
|
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
116
118
|
user_data: str | NotGiven = NOT_GIVEN,
|
|
@@ -143,6 +145,8 @@ class GPUBaremetalClustersResource(SyncAPIResource):
|
|
|
143
145
|
the "Admin" user on a Windows instance, a default user or a new user on a Linux
|
|
144
146
|
instance
|
|
145
147
|
|
|
148
|
+
security_groups: Security group UUIDs
|
|
149
|
+
|
|
146
150
|
ssh_key_name: Specifies the name of the SSH keypair, created via the
|
|
147
151
|
[/v1/`ssh_keys` endpoint](/docs/api-reference/cloud/ssh-keys/add-or-generate-ssh-key).
|
|
148
152
|
|
|
@@ -181,6 +185,7 @@ class GPUBaremetalClustersResource(SyncAPIResource):
|
|
|
181
185
|
"name": name,
|
|
182
186
|
"instances_count": instances_count,
|
|
183
187
|
"password": password,
|
|
188
|
+
"security_groups": security_groups,
|
|
184
189
|
"ssh_key_name": ssh_key_name,
|
|
185
190
|
"tags": tags,
|
|
186
191
|
"user_data": user_data,
|
|
@@ -194,6 +199,7 @@ class GPUBaremetalClustersResource(SyncAPIResource):
|
|
|
194
199
|
cast_to=TaskIDList,
|
|
195
200
|
)
|
|
196
201
|
|
|
202
|
+
@typing_extensions.deprecated("deprecated")
|
|
197
203
|
def list(
|
|
198
204
|
self,
|
|
199
205
|
*,
|
|
@@ -209,7 +215,8 @@ class GPUBaremetalClustersResource(SyncAPIResource):
|
|
|
209
215
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
210
216
|
) -> SyncOffsetPage[GPUBaremetalCluster]:
|
|
211
217
|
"""
|
|
212
|
-
|
|
218
|
+
Please use the `/v3/gpu/baremetal/{`project_id`}/{`region_id`}/clusters`
|
|
219
|
+
instead.
|
|
213
220
|
|
|
214
221
|
Args:
|
|
215
222
|
limit: Limit the number of returned clusters
|
|
@@ -308,6 +315,7 @@ class GPUBaremetalClustersResource(SyncAPIResource):
|
|
|
308
315
|
cast_to=TaskIDList,
|
|
309
316
|
)
|
|
310
317
|
|
|
318
|
+
@typing_extensions.deprecated("deprecated")
|
|
311
319
|
def get(
|
|
312
320
|
self,
|
|
313
321
|
cluster_id: str,
|
|
@@ -322,7 +330,9 @@ class GPUBaremetalClustersResource(SyncAPIResource):
|
|
|
322
330
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
323
331
|
) -> GPUBaremetalCluster:
|
|
324
332
|
"""
|
|
325
|
-
|
|
333
|
+
Please use the
|
|
334
|
+
`/v3/gpu/baremetal/{`project_id`}/{`region_id`}/clusters/{`cluster_id`}`
|
|
335
|
+
instead.
|
|
326
336
|
|
|
327
337
|
Args:
|
|
328
338
|
extra_headers: Send extra headers
|
|
@@ -583,7 +593,7 @@ class GPUBaremetalClustersResource(SyncAPIResource):
|
|
|
583
593
|
if not task.created_resources or not task.created_resources.ai_clusters:
|
|
584
594
|
raise ValueError("No cluster was created")
|
|
585
595
|
cluster_id = task.created_resources.ai_clusters[0]
|
|
586
|
-
return self.get(
|
|
596
|
+
return self.get( # pyright: ignore[reportDeprecated]
|
|
587
597
|
cluster_id=cluster_id,
|
|
588
598
|
project_id=project_id,
|
|
589
599
|
region_id=region_id,
|
|
@@ -634,7 +644,7 @@ class GPUBaremetalClustersResource(SyncAPIResource):
|
|
|
634
644
|
extra_body=extra_body,
|
|
635
645
|
polling_interval_seconds=polling_interval_seconds,
|
|
636
646
|
)
|
|
637
|
-
return self.get(
|
|
647
|
+
return self.get( # pyright: ignore[reportDeprecated]
|
|
638
648
|
cluster_id=cluster_id,
|
|
639
649
|
project_id=project_id,
|
|
640
650
|
region_id=region_id,
|
|
@@ -681,7 +691,7 @@ class GPUBaremetalClustersResource(SyncAPIResource):
|
|
|
681
691
|
extra_body=extra_body,
|
|
682
692
|
polling_interval_seconds=polling_interval_seconds,
|
|
683
693
|
)
|
|
684
|
-
return self.get(
|
|
694
|
+
return self.get( # pyright: ignore[reportDeprecated]
|
|
685
695
|
cluster_id=cluster_id,
|
|
686
696
|
project_id=project_id,
|
|
687
697
|
region_id=region_id,
|
|
@@ -739,6 +749,7 @@ class AsyncGPUBaremetalClustersResource(AsyncAPIResource):
|
|
|
739
749
|
name: str,
|
|
740
750
|
instances_count: int | NotGiven = NOT_GIVEN,
|
|
741
751
|
password: str | NotGiven = NOT_GIVEN,
|
|
752
|
+
security_groups: Iterable[gpu_baremetal_cluster_create_params.SecurityGroup] | NotGiven = NOT_GIVEN,
|
|
742
753
|
ssh_key_name: str | NotGiven = NOT_GIVEN,
|
|
743
754
|
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
744
755
|
user_data: str | NotGiven = NOT_GIVEN,
|
|
@@ -771,6 +782,8 @@ class AsyncGPUBaremetalClustersResource(AsyncAPIResource):
|
|
|
771
782
|
the "Admin" user on a Windows instance, a default user or a new user on a Linux
|
|
772
783
|
instance
|
|
773
784
|
|
|
785
|
+
security_groups: Security group UUIDs
|
|
786
|
+
|
|
774
787
|
ssh_key_name: Specifies the name of the SSH keypair, created via the
|
|
775
788
|
[/v1/`ssh_keys` endpoint](/docs/api-reference/cloud/ssh-keys/add-or-generate-ssh-key).
|
|
776
789
|
|
|
@@ -809,6 +822,7 @@ class AsyncGPUBaremetalClustersResource(AsyncAPIResource):
|
|
|
809
822
|
"name": name,
|
|
810
823
|
"instances_count": instances_count,
|
|
811
824
|
"password": password,
|
|
825
|
+
"security_groups": security_groups,
|
|
812
826
|
"ssh_key_name": ssh_key_name,
|
|
813
827
|
"tags": tags,
|
|
814
828
|
"user_data": user_data,
|
|
@@ -822,6 +836,7 @@ class AsyncGPUBaremetalClustersResource(AsyncAPIResource):
|
|
|
822
836
|
cast_to=TaskIDList,
|
|
823
837
|
)
|
|
824
838
|
|
|
839
|
+
@typing_extensions.deprecated("deprecated")
|
|
825
840
|
def list(
|
|
826
841
|
self,
|
|
827
842
|
*,
|
|
@@ -837,7 +852,8 @@ class AsyncGPUBaremetalClustersResource(AsyncAPIResource):
|
|
|
837
852
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
838
853
|
) -> AsyncPaginator[GPUBaremetalCluster, AsyncOffsetPage[GPUBaremetalCluster]]:
|
|
839
854
|
"""
|
|
840
|
-
|
|
855
|
+
Please use the `/v3/gpu/baremetal/{`project_id`}/{`region_id`}/clusters`
|
|
856
|
+
instead.
|
|
841
857
|
|
|
842
858
|
Args:
|
|
843
859
|
limit: Limit the number of returned clusters
|
|
@@ -936,6 +952,7 @@ class AsyncGPUBaremetalClustersResource(AsyncAPIResource):
|
|
|
936
952
|
cast_to=TaskIDList,
|
|
937
953
|
)
|
|
938
954
|
|
|
955
|
+
@typing_extensions.deprecated("deprecated")
|
|
939
956
|
async def get(
|
|
940
957
|
self,
|
|
941
958
|
cluster_id: str,
|
|
@@ -950,7 +967,9 @@ class AsyncGPUBaremetalClustersResource(AsyncAPIResource):
|
|
|
950
967
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
951
968
|
) -> GPUBaremetalCluster:
|
|
952
969
|
"""
|
|
953
|
-
|
|
970
|
+
Please use the
|
|
971
|
+
`/v3/gpu/baremetal/{`project_id`}/{`region_id`}/clusters/{`cluster_id`}`
|
|
972
|
+
instead.
|
|
954
973
|
|
|
955
974
|
Args:
|
|
956
975
|
extra_headers: Send extra headers
|
|
@@ -1211,7 +1230,7 @@ class AsyncGPUBaremetalClustersResource(AsyncAPIResource):
|
|
|
1211
1230
|
if not task.created_resources or not task.created_resources.ai_clusters:
|
|
1212
1231
|
raise ValueError("No cluster was created")
|
|
1213
1232
|
cluster_id = task.created_resources.ai_clusters[0]
|
|
1214
|
-
return await self.get(
|
|
1233
|
+
return await self.get( # pyright: ignore[reportDeprecated]
|
|
1215
1234
|
cluster_id=cluster_id,
|
|
1216
1235
|
project_id=project_id,
|
|
1217
1236
|
region_id=region_id,
|
|
@@ -1262,7 +1281,7 @@ class AsyncGPUBaremetalClustersResource(AsyncAPIResource):
|
|
|
1262
1281
|
extra_body=extra_body,
|
|
1263
1282
|
polling_interval_seconds=polling_interval_seconds,
|
|
1264
1283
|
)
|
|
1265
|
-
return await self.get(
|
|
1284
|
+
return await self.get( # pyright: ignore[reportDeprecated]
|
|
1266
1285
|
cluster_id=cluster_id,
|
|
1267
1286
|
project_id=project_id,
|
|
1268
1287
|
region_id=region_id,
|
|
@@ -1309,7 +1328,7 @@ class AsyncGPUBaremetalClustersResource(AsyncAPIResource):
|
|
|
1309
1328
|
extra_body=extra_body,
|
|
1310
1329
|
polling_interval_seconds=polling_interval_seconds,
|
|
1311
1330
|
)
|
|
1312
|
-
return await self.get(
|
|
1331
|
+
return await self.get( # pyright: ignore[reportDeprecated]
|
|
1313
1332
|
cluster_id=cluster_id,
|
|
1314
1333
|
project_id=project_id,
|
|
1315
1334
|
region_id=region_id,
|
|
@@ -1327,14 +1346,18 @@ class GPUBaremetalClustersResourceWithRawResponse:
|
|
|
1327
1346
|
self.create = to_raw_response_wrapper(
|
|
1328
1347
|
gpu_baremetal_clusters.create,
|
|
1329
1348
|
)
|
|
1330
|
-
self.list =
|
|
1331
|
-
|
|
1349
|
+
self.list = ( # pyright: ignore[reportDeprecated]
|
|
1350
|
+
to_raw_response_wrapper(
|
|
1351
|
+
gpu_baremetal_clusters.list # pyright: ignore[reportDeprecated],
|
|
1352
|
+
)
|
|
1332
1353
|
)
|
|
1333
1354
|
self.delete = to_raw_response_wrapper(
|
|
1334
1355
|
gpu_baremetal_clusters.delete,
|
|
1335
1356
|
)
|
|
1336
|
-
self.get =
|
|
1337
|
-
|
|
1357
|
+
self.get = ( # pyright: ignore[reportDeprecated]
|
|
1358
|
+
to_raw_response_wrapper(
|
|
1359
|
+
gpu_baremetal_clusters.get # pyright: ignore[reportDeprecated],
|
|
1360
|
+
)
|
|
1338
1361
|
)
|
|
1339
1362
|
self.powercycle_all_servers = to_raw_response_wrapper(
|
|
1340
1363
|
gpu_baremetal_clusters.powercycle_all_servers,
|
|
@@ -1373,14 +1396,18 @@ class AsyncGPUBaremetalClustersResourceWithRawResponse:
|
|
|
1373
1396
|
self.create = async_to_raw_response_wrapper(
|
|
1374
1397
|
gpu_baremetal_clusters.create,
|
|
1375
1398
|
)
|
|
1376
|
-
self.list =
|
|
1377
|
-
|
|
1399
|
+
self.list = ( # pyright: ignore[reportDeprecated]
|
|
1400
|
+
async_to_raw_response_wrapper(
|
|
1401
|
+
gpu_baremetal_clusters.list # pyright: ignore[reportDeprecated],
|
|
1402
|
+
)
|
|
1378
1403
|
)
|
|
1379
1404
|
self.delete = async_to_raw_response_wrapper(
|
|
1380
1405
|
gpu_baremetal_clusters.delete,
|
|
1381
1406
|
)
|
|
1382
|
-
self.get =
|
|
1383
|
-
|
|
1407
|
+
self.get = ( # pyright: ignore[reportDeprecated]
|
|
1408
|
+
async_to_raw_response_wrapper(
|
|
1409
|
+
gpu_baremetal_clusters.get # pyright: ignore[reportDeprecated],
|
|
1410
|
+
)
|
|
1384
1411
|
)
|
|
1385
1412
|
self.powercycle_all_servers = async_to_raw_response_wrapper(
|
|
1386
1413
|
gpu_baremetal_clusters.powercycle_all_servers,
|
|
@@ -1419,14 +1446,18 @@ class GPUBaremetalClustersResourceWithStreamingResponse:
|
|
|
1419
1446
|
self.create = to_streamed_response_wrapper(
|
|
1420
1447
|
gpu_baremetal_clusters.create,
|
|
1421
1448
|
)
|
|
1422
|
-
self.list =
|
|
1423
|
-
|
|
1449
|
+
self.list = ( # pyright: ignore[reportDeprecated]
|
|
1450
|
+
to_streamed_response_wrapper(
|
|
1451
|
+
gpu_baremetal_clusters.list # pyright: ignore[reportDeprecated],
|
|
1452
|
+
)
|
|
1424
1453
|
)
|
|
1425
1454
|
self.delete = to_streamed_response_wrapper(
|
|
1426
1455
|
gpu_baremetal_clusters.delete,
|
|
1427
1456
|
)
|
|
1428
|
-
self.get =
|
|
1429
|
-
|
|
1457
|
+
self.get = ( # pyright: ignore[reportDeprecated]
|
|
1458
|
+
to_streamed_response_wrapper(
|
|
1459
|
+
gpu_baremetal_clusters.get # pyright: ignore[reportDeprecated],
|
|
1460
|
+
)
|
|
1430
1461
|
)
|
|
1431
1462
|
self.powercycle_all_servers = to_streamed_response_wrapper(
|
|
1432
1463
|
gpu_baremetal_clusters.powercycle_all_servers,
|
|
@@ -1465,14 +1496,18 @@ class AsyncGPUBaremetalClustersResourceWithStreamingResponse:
|
|
|
1465
1496
|
self.create = async_to_streamed_response_wrapper(
|
|
1466
1497
|
gpu_baremetal_clusters.create,
|
|
1467
1498
|
)
|
|
1468
|
-
self.list =
|
|
1469
|
-
|
|
1499
|
+
self.list = ( # pyright: ignore[reportDeprecated]
|
|
1500
|
+
async_to_streamed_response_wrapper(
|
|
1501
|
+
gpu_baremetal_clusters.list # pyright: ignore[reportDeprecated],
|
|
1502
|
+
)
|
|
1470
1503
|
)
|
|
1471
1504
|
self.delete = async_to_streamed_response_wrapper(
|
|
1472
1505
|
gpu_baremetal_clusters.delete,
|
|
1473
1506
|
)
|
|
1474
|
-
self.get =
|
|
1475
|
-
|
|
1507
|
+
self.get = ( # pyright: ignore[reportDeprecated]
|
|
1508
|
+
async_to_streamed_response_wrapper(
|
|
1509
|
+
gpu_baremetal_clusters.get # pyright: ignore[reportDeprecated],
|
|
1510
|
+
)
|
|
1476
1511
|
)
|
|
1477
1512
|
self.powercycle_all_servers = async_to_streamed_response_wrapper(
|
|
1478
1513
|
gpu_baremetal_clusters.powercycle_all_servers,
|
|
@@ -24,6 +24,14 @@ from .secrets import (
|
|
|
24
24
|
SecretsResourceWithStreamingResponse,
|
|
25
25
|
AsyncSecretsResourceWithStreamingResponse,
|
|
26
26
|
)
|
|
27
|
+
from .api_keys import (
|
|
28
|
+
APIKeysResource,
|
|
29
|
+
AsyncAPIKeysResource,
|
|
30
|
+
APIKeysResourceWithRawResponse,
|
|
31
|
+
AsyncAPIKeysResourceWithRawResponse,
|
|
32
|
+
APIKeysResourceWithStreamingResponse,
|
|
33
|
+
AsyncAPIKeysResourceWithStreamingResponse,
|
|
34
|
+
)
|
|
27
35
|
from .inference import (
|
|
28
36
|
InferenceResource,
|
|
29
37
|
AsyncInferenceResource,
|
|
@@ -80,6 +88,12 @@ __all__ = [
|
|
|
80
88
|
"AsyncSecretsResourceWithRawResponse",
|
|
81
89
|
"SecretsResourceWithStreamingResponse",
|
|
82
90
|
"AsyncSecretsResourceWithStreamingResponse",
|
|
91
|
+
"APIKeysResource",
|
|
92
|
+
"AsyncAPIKeysResource",
|
|
93
|
+
"APIKeysResourceWithRawResponse",
|
|
94
|
+
"AsyncAPIKeysResourceWithRawResponse",
|
|
95
|
+
"APIKeysResourceWithStreamingResponse",
|
|
96
|
+
"AsyncAPIKeysResourceWithStreamingResponse",
|
|
83
97
|
"InferenceResource",
|
|
84
98
|
"AsyncInferenceResource",
|
|
85
99
|
"InferenceResourceWithRawResponse",
|