gcore 0.14.0__py3-none-any.whl → 0.16.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of gcore might be problematic. Click here for more details.

Files changed (207) hide show
  1. gcore/_client.py +2 -8
  2. gcore/_version.py +1 -1
  3. gcore/resources/cdn/audit_log.py +4 -12
  4. gcore/resources/cdn/cdn.py +10 -18
  5. gcore/resources/cdn/certificates.py +16 -40
  6. gcore/resources/cdn/ip_ranges.py +4 -8
  7. gcore/resources/cdn/logs/__init__.py +0 -14
  8. gcore/resources/cdn/logs/logs.py +4 -44
  9. gcore/resources/cdn/logs_uploader/configs.py +14 -42
  10. gcore/resources/cdn/logs_uploader/policies.py +14 -42
  11. gcore/resources/cdn/logs_uploader/targets.py +14 -42
  12. gcore/resources/cdn/metrics.py +2 -6
  13. gcore/resources/cdn/network_capacity.py +2 -6
  14. gcore/resources/cdn/origin_groups.py +12 -32
  15. gcore/resources/cdn/resources/resources.py +18 -46
  16. gcore/resources/cdn/resources/rules.py +12 -36
  17. gcore/resources/cdn/resources/shield.py +4 -12
  18. gcore/resources/cdn/rule_templates.py +12 -36
  19. gcore/resources/cdn/shields.py +2 -6
  20. gcore/resources/cdn/statistics.py +16 -40
  21. gcore/resources/cdn/trusted_ca_certificates.py +10 -30
  22. gcore/resources/cloud/audit_logs.py +2 -6
  23. gcore/resources/cloud/baremetal/flavors.py +2 -6
  24. gcore/resources/cloud/baremetal/images.py +2 -6
  25. gcore/resources/cloud/baremetal/servers.py +6 -18
  26. gcore/resources/cloud/billing_reservations.py +25 -208
  27. gcore/resources/cloud/cost_reports.py +44 -62
  28. gcore/resources/cloud/file_shares/access_rules.py +6 -18
  29. gcore/resources/cloud/file_shares/file_shares.py +37 -44
  30. gcore/resources/cloud/floating_ips.py +14 -42
  31. gcore/resources/cloud/gpu_baremetal_clusters/flavors.py +2 -6
  32. gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +18 -54
  33. gcore/resources/cloud/gpu_baremetal_clusters/images.py +8 -24
  34. gcore/resources/cloud/gpu_baremetal_clusters/interfaces.py +2 -6
  35. gcore/resources/cloud/gpu_baremetal_clusters/servers.py +14 -42
  36. gcore/resources/cloud/inference/api_keys.py +10 -30
  37. gcore/resources/cloud/inference/applications/deployments.py +135 -155
  38. gcore/resources/cloud/inference/applications/templates.py +4 -12
  39. gcore/resources/cloud/inference/deployments/deployments.py +16 -48
  40. gcore/resources/cloud/inference/deployments/logs.py +2 -6
  41. gcore/resources/cloud/inference/flavors.py +4 -12
  42. gcore/resources/cloud/inference/inference.py +2 -6
  43. gcore/resources/cloud/inference/registry_credentials.py +10 -30
  44. gcore/resources/cloud/inference/secrets.py +10 -30
  45. gcore/resources/cloud/instances/flavors.py +2 -6
  46. gcore/resources/cloud/instances/images.py +12 -36
  47. gcore/resources/cloud/instances/instances.py +99 -94
  48. gcore/resources/cloud/instances/interfaces.py +6 -18
  49. gcore/resources/cloud/instances/metrics.py +2 -6
  50. gcore/resources/cloud/ip_ranges.py +2 -6
  51. gcore/resources/cloud/k8s/clusters/clusters.py +18 -54
  52. gcore/resources/cloud/k8s/clusters/nodes.py +4 -12
  53. gcore/resources/cloud/k8s/clusters/pools/nodes.py +4 -12
  54. gcore/resources/cloud/k8s/clusters/pools/pools.py +12 -36
  55. gcore/resources/cloud/k8s/flavors.py +2 -6
  56. gcore/resources/cloud/k8s/k8s.py +2 -6
  57. gcore/resources/cloud/load_balancers/flavors.py +2 -6
  58. gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +10 -30
  59. gcore/resources/cloud/load_balancers/l7_policies/rules.py +10 -30
  60. gcore/resources/cloud/load_balancers/listeners.py +26 -46
  61. gcore/resources/cloud/load_balancers/load_balancers.py +493 -521
  62. gcore/resources/cloud/load_balancers/metrics.py +8 -12
  63. gcore/resources/cloud/load_balancers/pools/health_monitors.py +4 -12
  64. gcore/resources/cloud/load_balancers/pools/members.py +4 -12
  65. gcore/resources/cloud/load_balancers/pools/pools.py +26 -46
  66. gcore/resources/cloud/load_balancers/statuses.py +10 -18
  67. gcore/resources/cloud/networks/networks.py +10 -30
  68. gcore/resources/cloud/networks/routers.py +14 -42
  69. gcore/resources/cloud/networks/subnets.py +15 -37
  70. gcore/resources/cloud/placement_groups.py +8 -24
  71. gcore/resources/cloud/projects.py +10 -22
  72. gcore/resources/cloud/quotas/quotas.py +6 -18
  73. gcore/resources/cloud/quotas/requests.py +8 -24
  74. gcore/resources/cloud/regions.py +4 -8
  75. gcore/resources/cloud/registries/artifacts.py +4 -12
  76. gcore/resources/cloud/registries/registries.py +10 -30
  77. gcore/resources/cloud/registries/repositories.py +4 -12
  78. gcore/resources/cloud/registries/tags.py +2 -6
  79. gcore/resources/cloud/registries/users.py +12 -36
  80. gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +114 -25
  81. gcore/resources/cloud/reserved_fixed_ips/vip.py +10 -30
  82. gcore/resources/cloud/secrets.py +8 -24
  83. gcore/resources/cloud/security_groups/rules.py +6 -18
  84. gcore/resources/cloud/security_groups/security_groups.py +14 -42
  85. gcore/resources/cloud/ssh_keys.py +10 -30
  86. gcore/resources/cloud/tasks.py +14 -26
  87. gcore/resources/cloud/usage_reports.py +18 -24
  88. gcore/resources/cloud/users/role_assignments.py +8 -24
  89. gcore/resources/cloud/volumes.py +20 -60
  90. gcore/resources/dns/dns.py +4 -8
  91. gcore/resources/dns/locations.py +8 -20
  92. gcore/resources/dns/metrics.py +2 -6
  93. gcore/resources/dns/pickers/pickers.py +2 -2
  94. gcore/resources/dns/pickers/presets.py +2 -6
  95. gcore/resources/dns/zones/dnssec.py +4 -12
  96. gcore/resources/dns/zones/rrsets.py +12 -36
  97. gcore/resources/dns/zones/zones.py +22 -58
  98. gcore/resources/fastedge/apps/apps.py +12 -28
  99. gcore/resources/fastedge/apps/logs.py +2 -6
  100. gcore/resources/fastedge/binaries.py +8 -24
  101. gcore/resources/fastedge/fastedge.py +2 -2
  102. gcore/resources/fastedge/kv_stores.py +10 -22
  103. gcore/resources/fastedge/secrets.py +12 -36
  104. gcore/resources/fastedge/statistics.py +4 -12
  105. gcore/resources/fastedge/templates.py +10 -30
  106. gcore/resources/iam/api_tokens.py +12 -26
  107. gcore/resources/iam/iam.py +2 -2
  108. gcore/resources/iam/users.py +10 -26
  109. gcore/resources/security/bgp_announces.py +4 -12
  110. gcore/resources/security/events.py +2 -6
  111. gcore/resources/security/profile_templates.py +2 -6
  112. gcore/resources/security/profiles.py +16 -40
  113. gcore/resources/storage/buckets/buckets.py +6 -18
  114. gcore/resources/storage/buckets/cors.py +4 -12
  115. gcore/resources/storage/buckets/lifecycle.py +4 -12
  116. gcore/resources/storage/buckets/policy.py +6 -18
  117. gcore/resources/storage/credentials.py +2 -6
  118. gcore/resources/storage/locations.py +2 -6
  119. gcore/resources/storage/statistics.py +4 -12
  120. gcore/resources/storage/storage.py +16 -48
  121. gcore/resources/streaming/ai_tasks.py +10 -18
  122. gcore/resources/streaming/broadcasts.py +12 -36
  123. gcore/resources/streaming/directories.py +10 -30
  124. gcore/resources/streaming/players.py +12 -28
  125. gcore/resources/streaming/playlists.py +12 -36
  126. gcore/resources/streaming/quality_sets.py +4 -12
  127. gcore/resources/streaming/restreams.py +10 -30
  128. gcore/resources/streaming/statistics.py +46 -138
  129. gcore/resources/streaming/streams/overlays.py +12 -36
  130. gcore/resources/streaming/streams/streams.py +20 -52
  131. gcore/resources/streaming/videos/subtitles.py +10 -30
  132. gcore/resources/streaming/videos/videos.py +16 -40
  133. gcore/resources/waap/advanced_rules.py +2 -6
  134. gcore/resources/waap/custom_page_sets.py +12 -36
  135. gcore/resources/waap/domains/advanced_rules.py +12 -36
  136. gcore/resources/waap/domains/api_discovery.py +12 -36
  137. gcore/resources/waap/domains/api_path_groups.py +2 -6
  138. gcore/resources/waap/domains/api_paths.py +10 -30
  139. gcore/resources/waap/domains/custom_rules.py +14 -42
  140. gcore/resources/waap/domains/domains.py +12 -32
  141. gcore/resources/waap/domains/firewall_rules.py +14 -42
  142. gcore/resources/waap/domains/insight_silences.py +10 -30
  143. gcore/resources/waap/domains/insights.py +6 -18
  144. gcore/resources/waap/domains/settings.py +4 -12
  145. gcore/resources/waap/domains/statistics.py +12 -36
  146. gcore/resources/waap/insights.py +2 -6
  147. gcore/resources/waap/ip_info/ip_info.py +16 -48
  148. gcore/resources/waap/ip_info/metrics.py +2 -6
  149. gcore/resources/waap/organizations.py +2 -6
  150. gcore/resources/waap/statistics.py +2 -6
  151. gcore/resources/waap/tags.py +2 -2
  152. gcore/resources/waap/waap.py +2 -2
  153. gcore/types/cdn/cdn_resource.py +20 -0
  154. gcore/types/cdn/logs/__init__.py +0 -4
  155. gcore/types/cdn/logs_aggregated_stats.py +1 -1
  156. gcore/types/cdn/resource_create_params.py +20 -0
  157. gcore/types/cdn/resource_replace_params.py +20 -0
  158. gcore/types/cdn/resource_update_params.py +20 -0
  159. gcore/types/cdn/resources/cdn_resource_rule.py +20 -0
  160. gcore/types/cdn/resources/rule_create_params.py +20 -0
  161. gcore/types/cdn/resources/rule_replace_params.py +20 -0
  162. gcore/types/cdn/resources/rule_update_params.py +20 -0
  163. gcore/types/cdn/rule_template.py +20 -0
  164. gcore/types/cdn/rule_template_create_params.py +20 -0
  165. gcore/types/cdn/rule_template_replace_params.py +20 -0
  166. gcore/types/cdn/rule_template_update_params.py +20 -0
  167. gcore/types/cloud/__init__.py +2 -0
  168. gcore/types/cloud/billing_reservation.py +52 -114
  169. gcore/types/cloud/billing_reservation_list_params.py +4 -42
  170. gcore/types/cloud/billing_reservations.py +16 -0
  171. gcore/types/cloud/cost_report_get_aggregated_params.py +2 -2
  172. gcore/types/cloud/cost_report_get_detailed_params.py +2 -2
  173. gcore/types/cloud/gpu_baremetal_clusters/gpu_baremetal_flavor.py +12 -0
  174. gcore/types/cloud/inference/applications/__init__.py +1 -1
  175. gcore/types/cloud/inference/applications/{deployment_patch_params.py → deployment_update_params.py} +2 -2
  176. gcore/types/cloud/instance_list_params.py +1 -1
  177. gcore/types/cloud/instance_update_params.py +31 -3
  178. gcore/types/cloud/load_balancer_create_params.py +1 -1
  179. gcore/types/cloud/load_balancer_listener_detail.py +1 -1
  180. gcore/types/cloud/load_balancers/listener_create_params.py +1 -1
  181. gcore/types/cloud/load_balancers/listener_list_params.py +1 -1
  182. gcore/types/cloud/load_balancers/pool_create_params.py +1 -1
  183. gcore/types/cloud/load_balancers/pool_list_params.py +1 -1
  184. gcore/types/cloud/quota_get_all_response.py +8 -8
  185. gcore/types/cloud/quota_get_by_region_response.py +8 -8
  186. gcore/types/cloud/quotas/request_create_params.py +4 -4
  187. gcore/types/cloud/quotas/request_get_response.py +4 -4
  188. gcore/types/cloud/quotas/request_list_response.py +4 -4
  189. gcore/types/cloud/reserved_fixed_ip_update_params.py +16 -0
  190. gcore/types/cloud/task_list_params.py +3 -3
  191. gcore/types/cloud/usage_report_get_params.py +2 -2
  192. gcore/types/iam/account_overview.py +24 -26
  193. gcore/types/iam/api_token.py +24 -24
  194. gcore/types/iam/api_token_create_params.py +2 -1
  195. gcore/types/iam/api_token_list.py +24 -24
  196. gcore/types/iam/user_detailed.py +15 -15
  197. gcore/types/iam/user_invite.py +2 -4
  198. gcore/types/iam/user_update.py +15 -15
  199. gcore/types/security/profile_create_params.py +2 -2
  200. {gcore-0.14.0.dist-info → gcore-0.16.0.dist-info}/METADATA +1 -1
  201. {gcore-0.14.0.dist-info → gcore-0.16.0.dist-info}/RECORD +203 -205
  202. gcore/resources/cdn/logs/settings.py +0 -1081
  203. gcore/types/cdn/logs/log_settings.py +0 -172
  204. gcore/types/cdn/logs/setting_create_params.py +0 -200
  205. gcore/types/cdn/logs/setting_update_params.py +0 -200
  206. {gcore-0.14.0.dist-info → gcore-0.16.0.dist-info}/WHEEL +0 -0
  207. {gcore-0.14.0.dist-info → gcore-0.16.0.dist-info}/licenses/LICENSE +0 -0
@@ -18,7 +18,7 @@ from ....._response import (
18
18
  )
19
19
  from ....._base_client import make_request_options
20
20
  from .....types.cloud.task_id_list import TaskIDList
21
- from .....types.cloud.inference.applications import deployment_patch_params, deployment_create_params
21
+ from .....types.cloud.inference.applications import deployment_create_params, deployment_update_params
22
22
  from .....types.cloud.inference.applications.inference_application_deployment import InferenceApplicationDeployment
23
23
  from .....types.cloud.inference.applications.inference_application_deployment_list import (
24
24
  InferenceApplicationDeploymentList,
@@ -93,9 +93,7 @@ class DeploymentsResource(SyncAPIResource):
93
93
  if project_id is None:
94
94
  project_id = self._client._get_cloud_project_id_path_param()
95
95
  return self._post(
96
- f"/cloud/v3/inference/applications/{project_id}/deployments"
97
- if self._client._base_url_overridden
98
- else f"https://api.gcore.com//cloud/v3/inference/applications/{project_id}/deployments",
96
+ f"/cloud/v3/inference/applications/{project_id}/deployments",
99
97
  body=maybe_transform(
100
98
  {
101
99
  "application_name": application_name,
@@ -112,25 +110,39 @@ class DeploymentsResource(SyncAPIResource):
112
110
  cast_to=TaskIDList,
113
111
  )
114
112
 
115
- def list(
113
+ def update(
116
114
  self,
115
+ deployment_name: str,
117
116
  *,
118
117
  project_id: int | None = None,
118
+ api_keys: SequenceNotStr[str] | Omit = omit,
119
+ components_configuration: Dict[str, Optional[deployment_update_params.ComponentsConfiguration]] | Omit = omit,
120
+ regions: Iterable[int] | Omit = omit,
119
121
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
120
122
  # The extra values given here take precedence over values defined on the client or passed to this method.
121
123
  extra_headers: Headers | None = None,
122
124
  extra_query: Query | None = None,
123
125
  extra_body: Body | None = None,
124
126
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
125
- ) -> InferenceApplicationDeploymentList:
126
- """
127
- Returns a list of your application deployments, including deployment names,
128
- associated catalog applications, regions, component configurations, and current
129
- status. Useful for monitoring and managing all active AI application instances.
127
+ ) -> TaskIDList:
128
+ """Updates an existing application deployment.
129
+
130
+ You can modify the target regions
131
+ and update configurations for individual components. To disable a component, set
132
+ its value to null. Only the provided fields will be updated; all others remain
133
+ unchanged.
130
134
 
131
135
  Args:
132
136
  project_id: Project ID
133
137
 
138
+ deployment_name: Name of deployment
139
+
140
+ api_keys: List of API keys for the application
141
+
142
+ components_configuration: Mapping of component names to their configuration (e.g., `"model": {...}`)
143
+
144
+ regions: Geographical regions to be updated for the deployment
145
+
134
146
  extra_headers: Send extra headers
135
147
 
136
148
  extra_query: Add additional query parameters to the request
@@ -141,19 +153,26 @@ class DeploymentsResource(SyncAPIResource):
141
153
  """
142
154
  if project_id is None:
143
155
  project_id = self._client._get_cloud_project_id_path_param()
144
- return self._get(
145
- f"/cloud/v3/inference/applications/{project_id}/deployments"
146
- if self._client._base_url_overridden
147
- else f"https://api.gcore.com//cloud/v3/inference/applications/{project_id}/deployments",
156
+ if not deployment_name:
157
+ raise ValueError(f"Expected a non-empty value for `deployment_name` but received {deployment_name!r}")
158
+ return self._patch(
159
+ f"/cloud/v3/inference/applications/{project_id}/deployments/{deployment_name}",
160
+ body=maybe_transform(
161
+ {
162
+ "api_keys": api_keys,
163
+ "components_configuration": components_configuration,
164
+ "regions": regions,
165
+ },
166
+ deployment_update_params.DeploymentUpdateParams,
167
+ ),
148
168
  options=make_request_options(
149
169
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
150
170
  ),
151
- cast_to=InferenceApplicationDeploymentList,
171
+ cast_to=TaskIDList,
152
172
  )
153
173
 
154
- def delete(
174
+ def list(
155
175
  self,
156
- deployment_name: str,
157
176
  *,
158
177
  project_id: int | None = None,
159
178
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -162,17 +181,15 @@ class DeploymentsResource(SyncAPIResource):
162
181
  extra_query: Query | None = None,
163
182
  extra_body: Body | None = None,
164
183
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
165
- ) -> TaskIDList:
184
+ ) -> InferenceApplicationDeploymentList:
166
185
  """
167
- Deletes an existing application deployment along with all associated resources.
168
- This action will permanently remove the deployment and **terminate all related
169
- inference instances** that are part of the application.
186
+ Returns a list of your application deployments, including deployment names,
187
+ associated catalog applications, regions, component configurations, and current
188
+ status. Useful for monitoring and managing all active AI application instances.
170
189
 
171
190
  Args:
172
191
  project_id: Project ID
173
192
 
174
- deployment_name: Name of deployment
175
-
176
193
  extra_headers: Send extra headers
177
194
 
178
195
  extra_query: Add additional query parameters to the request
@@ -183,19 +200,15 @@ class DeploymentsResource(SyncAPIResource):
183
200
  """
184
201
  if project_id is None:
185
202
  project_id = self._client._get_cloud_project_id_path_param()
186
- if not deployment_name:
187
- raise ValueError(f"Expected a non-empty value for `deployment_name` but received {deployment_name!r}")
188
- return self._delete(
189
- f"/cloud/v3/inference/applications/{project_id}/deployments/{deployment_name}"
190
- if self._client._base_url_overridden
191
- else f"https://api.gcore.com//cloud/v3/inference/applications/{project_id}/deployments/{deployment_name}",
203
+ return self._get(
204
+ f"/cloud/v3/inference/applications/{project_id}/deployments",
192
205
  options=make_request_options(
193
206
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
194
207
  ),
195
- cast_to=TaskIDList,
208
+ cast_to=InferenceApplicationDeploymentList,
196
209
  )
197
210
 
198
- def get(
211
+ def delete(
199
212
  self,
200
213
  deployment_name: str,
201
214
  *,
@@ -206,13 +219,11 @@ class DeploymentsResource(SyncAPIResource):
206
219
  extra_query: Query | None = None,
207
220
  extra_body: Body | None = None,
208
221
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
209
- ) -> InferenceApplicationDeployment:
210
- """Retrieves detailed information about a specific application deployment.
211
-
212
- The
213
- response includes the catalog application it was created from, deployment name,
214
- active regions, configuration of each component, and the current status of the
215
- deployment.
222
+ ) -> TaskIDList:
223
+ """
224
+ Deletes an existing application deployment along with all associated resources.
225
+ This action will permanently remove the deployment and **terminate all related
226
+ inference instances** that are part of the application.
216
227
 
217
228
  Args:
218
229
  project_id: Project ID
@@ -231,49 +242,38 @@ class DeploymentsResource(SyncAPIResource):
231
242
  project_id = self._client._get_cloud_project_id_path_param()
232
243
  if not deployment_name:
233
244
  raise ValueError(f"Expected a non-empty value for `deployment_name` but received {deployment_name!r}")
234
- return self._get(
235
- f"/cloud/v3/inference/applications/{project_id}/deployments/{deployment_name}"
236
- if self._client._base_url_overridden
237
- else f"https://api.gcore.com//cloud/v3/inference/applications/{project_id}/deployments/{deployment_name}",
245
+ return self._delete(
246
+ f"/cloud/v3/inference/applications/{project_id}/deployments/{deployment_name}",
238
247
  options=make_request_options(
239
248
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
240
249
  ),
241
- cast_to=InferenceApplicationDeployment,
250
+ cast_to=TaskIDList,
242
251
  )
243
252
 
244
- def patch(
253
+ def get(
245
254
  self,
246
255
  deployment_name: str,
247
256
  *,
248
257
  project_id: int | None = None,
249
- api_keys: SequenceNotStr[str] | Omit = omit,
250
- components_configuration: Dict[str, Optional[deployment_patch_params.ComponentsConfiguration]] | Omit = omit,
251
- regions: Iterable[int] | Omit = omit,
252
258
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
253
259
  # The extra values given here take precedence over values defined on the client or passed to this method.
254
260
  extra_headers: Headers | None = None,
255
261
  extra_query: Query | None = None,
256
262
  extra_body: Body | None = None,
257
263
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
258
- ) -> TaskIDList:
259
- """Updates an existing application deployment.
264
+ ) -> InferenceApplicationDeployment:
265
+ """Retrieves detailed information about a specific application deployment.
260
266
 
261
- You can modify the target regions
262
- and update configurations for individual components. To disable a component, set
263
- its value to null. Only the provided fields will be updated; all others remain
264
- unchanged.
267
+ The
268
+ response includes the catalog application it was created from, deployment name,
269
+ active regions, configuration of each component, and the current status of the
270
+ deployment.
265
271
 
266
272
  Args:
267
273
  project_id: Project ID
268
274
 
269
275
  deployment_name: Name of deployment
270
276
 
271
- api_keys: List of API keys for the application
272
-
273
- components_configuration: Mapping of component names to their configuration (e.g., `"model": {...}`)
274
-
275
- regions: Geographical regions to be updated for the deployment
276
-
277
277
  extra_headers: Send extra headers
278
278
 
279
279
  extra_query: Add additional query parameters to the request
@@ -286,22 +286,12 @@ class DeploymentsResource(SyncAPIResource):
286
286
  project_id = self._client._get_cloud_project_id_path_param()
287
287
  if not deployment_name:
288
288
  raise ValueError(f"Expected a non-empty value for `deployment_name` but received {deployment_name!r}")
289
- return self._patch(
290
- f"/cloud/v3/inference/applications/{project_id}/deployments/{deployment_name}"
291
- if self._client._base_url_overridden
292
- else f"https://api.gcore.com//cloud/v3/inference/applications/{project_id}/deployments/{deployment_name}",
293
- body=maybe_transform(
294
- {
295
- "api_keys": api_keys,
296
- "components_configuration": components_configuration,
297
- "regions": regions,
298
- },
299
- deployment_patch_params.DeploymentPatchParams,
300
- ),
289
+ return self._get(
290
+ f"/cloud/v3/inference/applications/{project_id}/deployments/{deployment_name}",
301
291
  options=make_request_options(
302
292
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
303
293
  ),
304
- cast_to=TaskIDList,
294
+ cast_to=InferenceApplicationDeployment,
305
295
  )
306
296
 
307
297
 
@@ -371,9 +361,7 @@ class AsyncDeploymentsResource(AsyncAPIResource):
371
361
  if project_id is None:
372
362
  project_id = self._client._get_cloud_project_id_path_param()
373
363
  return await self._post(
374
- f"/cloud/v3/inference/applications/{project_id}/deployments"
375
- if self._client._base_url_overridden
376
- else f"https://api.gcore.com//cloud/v3/inference/applications/{project_id}/deployments",
364
+ f"/cloud/v3/inference/applications/{project_id}/deployments",
377
365
  body=await async_maybe_transform(
378
366
  {
379
367
  "application_name": application_name,
@@ -390,25 +378,39 @@ class AsyncDeploymentsResource(AsyncAPIResource):
390
378
  cast_to=TaskIDList,
391
379
  )
392
380
 
393
- async def list(
381
+ async def update(
394
382
  self,
383
+ deployment_name: str,
395
384
  *,
396
385
  project_id: int | None = None,
386
+ api_keys: SequenceNotStr[str] | Omit = omit,
387
+ components_configuration: Dict[str, Optional[deployment_update_params.ComponentsConfiguration]] | Omit = omit,
388
+ regions: Iterable[int] | Omit = omit,
397
389
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
398
390
  # The extra values given here take precedence over values defined on the client or passed to this method.
399
391
  extra_headers: Headers | None = None,
400
392
  extra_query: Query | None = None,
401
393
  extra_body: Body | None = None,
402
394
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
403
- ) -> InferenceApplicationDeploymentList:
404
- """
405
- Returns a list of your application deployments, including deployment names,
406
- associated catalog applications, regions, component configurations, and current
407
- status. Useful for monitoring and managing all active AI application instances.
395
+ ) -> TaskIDList:
396
+ """Updates an existing application deployment.
397
+
398
+ You can modify the target regions
399
+ and update configurations for individual components. To disable a component, set
400
+ its value to null. Only the provided fields will be updated; all others remain
401
+ unchanged.
408
402
 
409
403
  Args:
410
404
  project_id: Project ID
411
405
 
406
+ deployment_name: Name of deployment
407
+
408
+ api_keys: List of API keys for the application
409
+
410
+ components_configuration: Mapping of component names to their configuration (e.g., `"model": {...}`)
411
+
412
+ regions: Geographical regions to be updated for the deployment
413
+
412
414
  extra_headers: Send extra headers
413
415
 
414
416
  extra_query: Add additional query parameters to the request
@@ -419,19 +421,26 @@ class AsyncDeploymentsResource(AsyncAPIResource):
419
421
  """
420
422
  if project_id is None:
421
423
  project_id = self._client._get_cloud_project_id_path_param()
422
- return await self._get(
423
- f"/cloud/v3/inference/applications/{project_id}/deployments"
424
- if self._client._base_url_overridden
425
- else f"https://api.gcore.com//cloud/v3/inference/applications/{project_id}/deployments",
424
+ if not deployment_name:
425
+ raise ValueError(f"Expected a non-empty value for `deployment_name` but received {deployment_name!r}")
426
+ return await self._patch(
427
+ f"/cloud/v3/inference/applications/{project_id}/deployments/{deployment_name}",
428
+ body=await async_maybe_transform(
429
+ {
430
+ "api_keys": api_keys,
431
+ "components_configuration": components_configuration,
432
+ "regions": regions,
433
+ },
434
+ deployment_update_params.DeploymentUpdateParams,
435
+ ),
426
436
  options=make_request_options(
427
437
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
428
438
  ),
429
- cast_to=InferenceApplicationDeploymentList,
439
+ cast_to=TaskIDList,
430
440
  )
431
441
 
432
- async def delete(
442
+ async def list(
433
443
  self,
434
- deployment_name: str,
435
444
  *,
436
445
  project_id: int | None = None,
437
446
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -440,17 +449,15 @@ class AsyncDeploymentsResource(AsyncAPIResource):
440
449
  extra_query: Query | None = None,
441
450
  extra_body: Body | None = None,
442
451
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
443
- ) -> TaskIDList:
452
+ ) -> InferenceApplicationDeploymentList:
444
453
  """
445
- Deletes an existing application deployment along with all associated resources.
446
- This action will permanently remove the deployment and **terminate all related
447
- inference instances** that are part of the application.
454
+ Returns a list of your application deployments, including deployment names,
455
+ associated catalog applications, regions, component configurations, and current
456
+ status. Useful for monitoring and managing all active AI application instances.
448
457
 
449
458
  Args:
450
459
  project_id: Project ID
451
460
 
452
- deployment_name: Name of deployment
453
-
454
461
  extra_headers: Send extra headers
455
462
 
456
463
  extra_query: Add additional query parameters to the request
@@ -461,19 +468,15 @@ class AsyncDeploymentsResource(AsyncAPIResource):
461
468
  """
462
469
  if project_id is None:
463
470
  project_id = self._client._get_cloud_project_id_path_param()
464
- if not deployment_name:
465
- raise ValueError(f"Expected a non-empty value for `deployment_name` but received {deployment_name!r}")
466
- return await self._delete(
467
- f"/cloud/v3/inference/applications/{project_id}/deployments/{deployment_name}"
468
- if self._client._base_url_overridden
469
- else f"https://api.gcore.com//cloud/v3/inference/applications/{project_id}/deployments/{deployment_name}",
471
+ return await self._get(
472
+ f"/cloud/v3/inference/applications/{project_id}/deployments",
470
473
  options=make_request_options(
471
474
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
472
475
  ),
473
- cast_to=TaskIDList,
476
+ cast_to=InferenceApplicationDeploymentList,
474
477
  )
475
478
 
476
- async def get(
479
+ async def delete(
477
480
  self,
478
481
  deployment_name: str,
479
482
  *,
@@ -484,13 +487,11 @@ class AsyncDeploymentsResource(AsyncAPIResource):
484
487
  extra_query: Query | None = None,
485
488
  extra_body: Body | None = None,
486
489
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
487
- ) -> InferenceApplicationDeployment:
488
- """Retrieves detailed information about a specific application deployment.
489
-
490
- The
491
- response includes the catalog application it was created from, deployment name,
492
- active regions, configuration of each component, and the current status of the
493
- deployment.
490
+ ) -> TaskIDList:
491
+ """
492
+ Deletes an existing application deployment along with all associated resources.
493
+ This action will permanently remove the deployment and **terminate all related
494
+ inference instances** that are part of the application.
494
495
 
495
496
  Args:
496
497
  project_id: Project ID
@@ -509,49 +510,38 @@ class AsyncDeploymentsResource(AsyncAPIResource):
509
510
  project_id = self._client._get_cloud_project_id_path_param()
510
511
  if not deployment_name:
511
512
  raise ValueError(f"Expected a non-empty value for `deployment_name` but received {deployment_name!r}")
512
- return await self._get(
513
- f"/cloud/v3/inference/applications/{project_id}/deployments/{deployment_name}"
514
- if self._client._base_url_overridden
515
- else f"https://api.gcore.com//cloud/v3/inference/applications/{project_id}/deployments/{deployment_name}",
513
+ return await self._delete(
514
+ f"/cloud/v3/inference/applications/{project_id}/deployments/{deployment_name}",
516
515
  options=make_request_options(
517
516
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
518
517
  ),
519
- cast_to=InferenceApplicationDeployment,
518
+ cast_to=TaskIDList,
520
519
  )
521
520
 
522
- async def patch(
521
+ async def get(
523
522
  self,
524
523
  deployment_name: str,
525
524
  *,
526
525
  project_id: int | None = None,
527
- api_keys: SequenceNotStr[str] | Omit = omit,
528
- components_configuration: Dict[str, Optional[deployment_patch_params.ComponentsConfiguration]] | Omit = omit,
529
- regions: Iterable[int] | Omit = omit,
530
526
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
531
527
  # The extra values given here take precedence over values defined on the client or passed to this method.
532
528
  extra_headers: Headers | None = None,
533
529
  extra_query: Query | None = None,
534
530
  extra_body: Body | None = None,
535
531
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
536
- ) -> TaskIDList:
537
- """Updates an existing application deployment.
532
+ ) -> InferenceApplicationDeployment:
533
+ """Retrieves detailed information about a specific application deployment.
538
534
 
539
- You can modify the target regions
540
- and update configurations for individual components. To disable a component, set
541
- its value to null. Only the provided fields will be updated; all others remain
542
- unchanged.
535
+ The
536
+ response includes the catalog application it was created from, deployment name,
537
+ active regions, configuration of each component, and the current status of the
538
+ deployment.
543
539
 
544
540
  Args:
545
541
  project_id: Project ID
546
542
 
547
543
  deployment_name: Name of deployment
548
544
 
549
- api_keys: List of API keys for the application
550
-
551
- components_configuration: Mapping of component names to their configuration (e.g., `"model": {...}`)
552
-
553
- regions: Geographical regions to be updated for the deployment
554
-
555
545
  extra_headers: Send extra headers
556
546
 
557
547
  extra_query: Add additional query parameters to the request
@@ -564,22 +554,12 @@ class AsyncDeploymentsResource(AsyncAPIResource):
564
554
  project_id = self._client._get_cloud_project_id_path_param()
565
555
  if not deployment_name:
566
556
  raise ValueError(f"Expected a non-empty value for `deployment_name` but received {deployment_name!r}")
567
- return await self._patch(
568
- f"/cloud/v3/inference/applications/{project_id}/deployments/{deployment_name}"
569
- if self._client._base_url_overridden
570
- else f"https://api.gcore.com//cloud/v3/inference/applications/{project_id}/deployments/{deployment_name}",
571
- body=await async_maybe_transform(
572
- {
573
- "api_keys": api_keys,
574
- "components_configuration": components_configuration,
575
- "regions": regions,
576
- },
577
- deployment_patch_params.DeploymentPatchParams,
578
- ),
557
+ return await self._get(
558
+ f"/cloud/v3/inference/applications/{project_id}/deployments/{deployment_name}",
579
559
  options=make_request_options(
580
560
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
581
561
  ),
582
- cast_to=TaskIDList,
562
+ cast_to=InferenceApplicationDeployment,
583
563
  )
584
564
 
585
565
 
@@ -590,6 +570,9 @@ class DeploymentsResourceWithRawResponse:
590
570
  self.create = to_raw_response_wrapper(
591
571
  deployments.create,
592
572
  )
573
+ self.update = to_raw_response_wrapper(
574
+ deployments.update,
575
+ )
593
576
  self.list = to_raw_response_wrapper(
594
577
  deployments.list,
595
578
  )
@@ -599,9 +582,6 @@ class DeploymentsResourceWithRawResponse:
599
582
  self.get = to_raw_response_wrapper(
600
583
  deployments.get,
601
584
  )
602
- self.patch = to_raw_response_wrapper(
603
- deployments.patch,
604
- )
605
585
 
606
586
 
607
587
  class AsyncDeploymentsResourceWithRawResponse:
@@ -611,6 +591,9 @@ class AsyncDeploymentsResourceWithRawResponse:
611
591
  self.create = async_to_raw_response_wrapper(
612
592
  deployments.create,
613
593
  )
594
+ self.update = async_to_raw_response_wrapper(
595
+ deployments.update,
596
+ )
614
597
  self.list = async_to_raw_response_wrapper(
615
598
  deployments.list,
616
599
  )
@@ -620,9 +603,6 @@ class AsyncDeploymentsResourceWithRawResponse:
620
603
  self.get = async_to_raw_response_wrapper(
621
604
  deployments.get,
622
605
  )
623
- self.patch = async_to_raw_response_wrapper(
624
- deployments.patch,
625
- )
626
606
 
627
607
 
628
608
  class DeploymentsResourceWithStreamingResponse:
@@ -632,6 +612,9 @@ class DeploymentsResourceWithStreamingResponse:
632
612
  self.create = to_streamed_response_wrapper(
633
613
  deployments.create,
634
614
  )
615
+ self.update = to_streamed_response_wrapper(
616
+ deployments.update,
617
+ )
635
618
  self.list = to_streamed_response_wrapper(
636
619
  deployments.list,
637
620
  )
@@ -641,9 +624,6 @@ class DeploymentsResourceWithStreamingResponse:
641
624
  self.get = to_streamed_response_wrapper(
642
625
  deployments.get,
643
626
  )
644
- self.patch = to_streamed_response_wrapper(
645
- deployments.patch,
646
- )
647
627
 
648
628
 
649
629
  class AsyncDeploymentsResourceWithStreamingResponse:
@@ -653,6 +633,9 @@ class AsyncDeploymentsResourceWithStreamingResponse:
653
633
  self.create = async_to_streamed_response_wrapper(
654
634
  deployments.create,
655
635
  )
636
+ self.update = async_to_streamed_response_wrapper(
637
+ deployments.update,
638
+ )
656
639
  self.list = async_to_streamed_response_wrapper(
657
640
  deployments.list,
658
641
  )
@@ -662,6 +645,3 @@ class AsyncDeploymentsResourceWithStreamingResponse:
662
645
  self.get = async_to_streamed_response_wrapper(
663
646
  deployments.get,
664
647
  )
665
- self.patch = async_to_streamed_response_wrapper(
666
- deployments.patch,
667
- )
@@ -58,9 +58,7 @@ class TemplatesResource(SyncAPIResource):
58
58
  required to create a fully functional application deployment.
59
59
  """
60
60
  return self._get(
61
- "/cloud/v3/inference/applications/catalog"
62
- if self._client._base_url_overridden
63
- else "https://api.gcore.com//cloud/v3/inference/applications/catalog",
61
+ "/cloud/v3/inference/applications/catalog",
64
62
  options=make_request_options(
65
63
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
66
64
  ),
@@ -99,9 +97,7 @@ class TemplatesResource(SyncAPIResource):
99
97
  if not application_name:
100
98
  raise ValueError(f"Expected a non-empty value for `application_name` but received {application_name!r}")
101
99
  return self._get(
102
- f"/cloud/v3/inference/applications/catalog/{application_name}"
103
- if self._client._base_url_overridden
104
- else f"https://api.gcore.com//cloud/v3/inference/applications/catalog/{application_name}",
100
+ f"/cloud/v3/inference/applications/catalog/{application_name}",
105
101
  options=make_request_options(
106
102
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
107
103
  ),
@@ -147,9 +143,7 @@ class AsyncTemplatesResource(AsyncAPIResource):
147
143
  required to create a fully functional application deployment.
148
144
  """
149
145
  return await self._get(
150
- "/cloud/v3/inference/applications/catalog"
151
- if self._client._base_url_overridden
152
- else "https://api.gcore.com//cloud/v3/inference/applications/catalog",
146
+ "/cloud/v3/inference/applications/catalog",
153
147
  options=make_request_options(
154
148
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
155
149
  ),
@@ -188,9 +182,7 @@ class AsyncTemplatesResource(AsyncAPIResource):
188
182
  if not application_name:
189
183
  raise ValueError(f"Expected a non-empty value for `application_name` but received {application_name!r}")
190
184
  return await self._get(
191
- f"/cloud/v3/inference/applications/catalog/{application_name}"
192
- if self._client._base_url_overridden
193
- else f"https://api.gcore.com//cloud/v3/inference/applications/catalog/{application_name}",
185
+ f"/cloud/v3/inference/applications/catalog/{application_name}",
194
186
  options=make_request_options(
195
187
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
196
188
  ),