gcore 0.6.0__py3-none-any.whl → 0.8.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 -63
- gcore/resources/__init__.py +14 -0
- gcore/resources/cloud/__init__.py +28 -0
- gcore/resources/cloud/cloud.py +64 -0
- gcore/resources/cloud/cost_reports.py +811 -0
- gcore/resources/cloud/file_shares/file_shares.py +10 -0
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +61 -26
- gcore/resources/cloud/inference/registry_credentials.py +4 -6
- gcore/resources/cloud/usage_reports.py +337 -0
- gcore/resources/iam/users.py +5 -5
- 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 +10 -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/floating_ip.py +0 -9
- gcore/types/cloud/floating_ip_detailed.py +0 -9
- gcore/types/cloud/gpu_baremetal_cluster.py +2 -2
- gcore/types/cloud/gpu_baremetal_cluster_create_params.py +9 -0
- 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/subnet.py +1 -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.6.0.dist-info → gcore-0.8.0.dist-info}/METADATA +1 -1
- {gcore-0.6.0.dist-info → gcore-0.8.0.dist-info}/RECORD +185 -37
- {gcore-0.6.0.dist-info → gcore-0.8.0.dist-info}/WHEEL +0 -0
- {gcore-0.6.0.dist-info → gcore-0.8.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -130,6 +130,7 @@ class FileSharesResource(SyncAPIResource):
|
|
|
130
130
|
protocol: Literal["NFS"],
|
|
131
131
|
size: int,
|
|
132
132
|
volume_type: Literal["vast_share_type"],
|
|
133
|
+
share_settings: file_share_create_params.CreateVastFileShareSerializerShareSettings | NotGiven = NOT_GIVEN,
|
|
133
134
|
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
134
135
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
135
136
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -154,6 +155,8 @@ class FileSharesResource(SyncAPIResource):
|
|
|
154
155
|
|
|
155
156
|
volume_type: File share volume type
|
|
156
157
|
|
|
158
|
+
share_settings: Configuration settings for the share
|
|
159
|
+
|
|
157
160
|
tags: Key-value tags to associate with the resource. A tag is a key-value pair that
|
|
158
161
|
can be associated with a resource, enabling efficient filtering and grouping for
|
|
159
162
|
better organization and management. Some tags are read-only and cannot be
|
|
@@ -183,6 +186,7 @@ class FileSharesResource(SyncAPIResource):
|
|
|
183
186
|
access: Iterable[file_share_create_params.CreateStandardFileShareSerializerAccess] | NotGiven = NOT_GIVEN,
|
|
184
187
|
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
185
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,
|
|
186
190
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
187
191
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
188
192
|
extra_headers: Headers | None = None,
|
|
@@ -205,6 +209,7 @@ class FileSharesResource(SyncAPIResource):
|
|
|
205
209
|
"access": access,
|
|
206
210
|
"tags": tags,
|
|
207
211
|
"volume_type": volume_type,
|
|
212
|
+
"share_settings": share_settings,
|
|
208
213
|
},
|
|
209
214
|
file_share_create_params.FileShareCreateParams,
|
|
210
215
|
),
|
|
@@ -586,6 +591,7 @@ class AsyncFileSharesResource(AsyncAPIResource):
|
|
|
586
591
|
protocol: Literal["NFS"],
|
|
587
592
|
size: int,
|
|
588
593
|
volume_type: Literal["vast_share_type"],
|
|
594
|
+
share_settings: file_share_create_params.CreateVastFileShareSerializerShareSettings | NotGiven = NOT_GIVEN,
|
|
589
595
|
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
590
596
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
591
597
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -610,6 +616,8 @@ class AsyncFileSharesResource(AsyncAPIResource):
|
|
|
610
616
|
|
|
611
617
|
volume_type: File share volume type
|
|
612
618
|
|
|
619
|
+
share_settings: Configuration settings for the share
|
|
620
|
+
|
|
613
621
|
tags: Key-value tags to associate with the resource. A tag is a key-value pair that
|
|
614
622
|
can be associated with a resource, enabling efficient filtering and grouping for
|
|
615
623
|
better organization and management. Some tags are read-only and cannot be
|
|
@@ -639,6 +647,7 @@ class AsyncFileSharesResource(AsyncAPIResource):
|
|
|
639
647
|
access: Iterable[file_share_create_params.CreateStandardFileShareSerializerAccess] | NotGiven = NOT_GIVEN,
|
|
640
648
|
tags: Dict[str, str] | NotGiven = NOT_GIVEN,
|
|
641
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,
|
|
642
651
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
643
652
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
644
653
|
extra_headers: Headers | None = None,
|
|
@@ -661,6 +670,7 @@ class AsyncFileSharesResource(AsyncAPIResource):
|
|
|
661
670
|
"access": access,
|
|
662
671
|
"tags": tags,
|
|
663
672
|
"volume_type": volume_type,
|
|
673
|
+
"share_settings": share_settings,
|
|
664
674
|
},
|
|
665
675
|
file_share_create_params.FileShareCreateParams,
|
|
666
676
|
),
|
|
@@ -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,
|
|
@@ -251,7 +251,7 @@ class RegistryCredentialsResource(SyncAPIResource):
|
|
|
251
251
|
extra_query: Query | None = None,
|
|
252
252
|
extra_body: Body | None = None,
|
|
253
253
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
254
|
-
) ->
|
|
254
|
+
) -> InferenceRegistryCredentialsCreate:
|
|
255
255
|
"""
|
|
256
256
|
Replace inference registry credential
|
|
257
257
|
|
|
@@ -278,7 +278,6 @@ class RegistryCredentialsResource(SyncAPIResource):
|
|
|
278
278
|
project_id = self._client._get_cloud_project_id_path_param()
|
|
279
279
|
if not credential_name:
|
|
280
280
|
raise ValueError(f"Expected a non-empty value for `credential_name` but received {credential_name!r}")
|
|
281
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
282
281
|
return self._put(
|
|
283
282
|
f"/cloud/v3/inference/{project_id}/registry_credentials/{credential_name}",
|
|
284
283
|
body=maybe_transform(
|
|
@@ -292,7 +291,7 @@ class RegistryCredentialsResource(SyncAPIResource):
|
|
|
292
291
|
options=make_request_options(
|
|
293
292
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
294
293
|
),
|
|
295
|
-
cast_to=
|
|
294
|
+
cast_to=InferenceRegistryCredentialsCreate,
|
|
296
295
|
)
|
|
297
296
|
|
|
298
297
|
|
|
@@ -520,7 +519,7 @@ class AsyncRegistryCredentialsResource(AsyncAPIResource):
|
|
|
520
519
|
extra_query: Query | None = None,
|
|
521
520
|
extra_body: Body | None = None,
|
|
522
521
|
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
|
|
523
|
-
) ->
|
|
522
|
+
) -> InferenceRegistryCredentialsCreate:
|
|
524
523
|
"""
|
|
525
524
|
Replace inference registry credential
|
|
526
525
|
|
|
@@ -547,7 +546,6 @@ class AsyncRegistryCredentialsResource(AsyncAPIResource):
|
|
|
547
546
|
project_id = self._client._get_cloud_project_id_path_param()
|
|
548
547
|
if not credential_name:
|
|
549
548
|
raise ValueError(f"Expected a non-empty value for `credential_name` but received {credential_name!r}")
|
|
550
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
551
549
|
return await self._put(
|
|
552
550
|
f"/cloud/v3/inference/{project_id}/registry_credentials/{credential_name}",
|
|
553
551
|
body=await async_maybe_transform(
|
|
@@ -561,7 +559,7 @@ class AsyncRegistryCredentialsResource(AsyncAPIResource):
|
|
|
561
559
|
options=make_request_options(
|
|
562
560
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
563
561
|
),
|
|
564
|
-
cast_to=
|
|
562
|
+
cast_to=InferenceRegistryCredentialsCreate,
|
|
565
563
|
)
|
|
566
564
|
|
|
567
565
|
|