gcore 0.16.0__py3-none-any.whl → 0.23.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 (220) hide show
  1. gcore/_client.py +16 -0
  2. gcore/_models.py +37 -15
  3. gcore/_streaming.py +12 -12
  4. gcore/_utils/_sync.py +3 -31
  5. gcore/_utils/_utils.py +1 -1
  6. gcore/_version.py +1 -1
  7. gcore/resources/cdn/audit_log.py +4 -4
  8. gcore/resources/cdn/cdn.py +120 -21
  9. gcore/resources/cdn/ip_ranges.py +97 -5
  10. gcore/resources/cdn/{logs/logs.py → logs.py} +9 -9
  11. gcore/resources/cdn/resources/resources.py +20 -20
  12. gcore/resources/cdn/statistics.py +56 -58
  13. gcore/resources/cloud/__init__.py +40 -12
  14. gcore/resources/cloud/audit_logs.py +20 -0
  15. gcore/resources/cloud/baremetal/servers.py +48 -14
  16. gcore/resources/cloud/billing_reservations.py +2 -2
  17. gcore/resources/cloud/cloud.py +100 -18
  18. gcore/resources/cloud/databases/__init__.py +33 -0
  19. gcore/resources/cloud/databases/databases.py +102 -0
  20. gcore/resources/cloud/databases/postgres/__init__.py +61 -0
  21. gcore/resources/cloud/databases/postgres/clusters/__init__.py +33 -0
  22. gcore/resources/cloud/databases/postgres/clusters/clusters.py +716 -0
  23. gcore/resources/cloud/databases/postgres/clusters/user_credentials.py +281 -0
  24. gcore/resources/cloud/databases/postgres/configurations.py +169 -0
  25. gcore/resources/cloud/databases/postgres/custom_configurations.py +197 -0
  26. gcore/resources/cloud/databases/postgres/postgres.py +166 -0
  27. gcore/resources/cloud/file_shares/file_shares.py +154 -49
  28. gcore/resources/cloud/floating_ips.py +42 -10
  29. gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +70 -10
  30. gcore/resources/cloud/gpu_baremetal_clusters/images.py +40 -6
  31. gcore/resources/cloud/gpu_baremetal_clusters/servers.py +16 -0
  32. gcore/resources/cloud/gpu_virtual_clusters/__init__.py +89 -0
  33. gcore/resources/cloud/gpu_virtual_clusters/flavors.py +211 -0
  34. gcore/resources/cloud/gpu_virtual_clusters/gpu_virtual_clusters.py +1551 -0
  35. gcore/resources/cloud/gpu_virtual_clusters/images.py +582 -0
  36. gcore/resources/cloud/gpu_virtual_clusters/interfaces.py +187 -0
  37. gcore/resources/cloud/gpu_virtual_clusters/servers.py +506 -0
  38. gcore/resources/cloud/gpu_virtual_clusters/volumes.py +187 -0
  39. gcore/resources/cloud/inference/deployments/deployments.py +52 -4
  40. gcore/resources/cloud/instances/images.py +72 -18
  41. gcore/resources/cloud/instances/instances.py +110 -18
  42. gcore/resources/cloud/instances/interfaces.py +12 -0
  43. gcore/resources/cloud/k8s/__init__.py +12 -12
  44. gcore/resources/cloud/k8s/clusters/clusters.py +25 -25
  45. gcore/resources/cloud/k8s/clusters/pools/pools.py +14 -14
  46. gcore/resources/cloud/k8s/k8s.py +24 -24
  47. gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +1420 -218
  48. gcore/resources/cloud/load_balancers/l7_policies/rules.py +134 -22
  49. gcore/resources/cloud/load_balancers/listeners.py +77 -6
  50. gcore/resources/cloud/load_balancers/load_balancers.py +92 -14
  51. gcore/resources/cloud/load_balancers/pools/pools.py +52 -4
  52. gcore/resources/cloud/networks/networks.py +30 -10
  53. gcore/resources/cloud/networks/subnets.py +26 -10
  54. gcore/resources/cloud/placement_groups.py +8 -0
  55. gcore/resources/cloud/projects.py +99 -119
  56. gcore/resources/cloud/quotas/requests.py +0 -8
  57. gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +18 -0
  58. gcore/resources/cloud/secrets.py +16 -0
  59. gcore/resources/cloud/security_groups/security_groups.py +38 -12
  60. gcore/resources/cloud/ssh_keys.py +10 -0
  61. gcore/resources/cloud/tasks.py +22 -7
  62. gcore/resources/cloud/volumes.py +65 -23
  63. gcore/resources/dns/zones/rrsets.py +10 -10
  64. gcore/resources/dns/zones/zones.py +2 -2
  65. gcore/resources/security/bgp_announces.py +0 -4
  66. gcore/resources/security/profiles.py +31 -7
  67. gcore/resources/storage/credentials.py +0 -28
  68. gcore/resources/storage/storage.py +2 -2
  69. gcore/types/cdn/__init__.py +5 -0
  70. gcore/types/cdn/alibaba_regions.py +22 -0
  71. gcore/types/cdn/audit_log_list_params.py +2 -2
  72. gcore/types/cdn/aws_regions.py +22 -0
  73. gcore/types/cdn/cdn_list_purge_statuses_response.py +10 -0
  74. gcore/types/cdn/cdn_resource.py +17 -12
  75. gcore/types/cdn/ip_range_list_ips_params.py +19 -0
  76. gcore/types/cdn/ip_range_list_params.py +19 -0
  77. gcore/types/cdn/resource_create_params.py +17 -12
  78. gcore/types/cdn/resource_purge_params.py +4 -4
  79. gcore/types/cdn/resource_replace_params.py +17 -12
  80. gcore/types/cdn/resource_update_params.py +17 -12
  81. gcore/types/cdn/resource_usage_stats.py +16 -15
  82. gcore/types/cdn/resources/cdn_resource_rule.py +15 -10
  83. gcore/types/cdn/resources/rule_create_params.py +15 -10
  84. gcore/types/cdn/resources/rule_replace_params.py +15 -10
  85. gcore/types/cdn/resources/rule_update_params.py +15 -10
  86. gcore/types/cdn/rule_template.py +15 -10
  87. gcore/types/cdn/rule_template_create_params.py +15 -10
  88. gcore/types/cdn/rule_template_replace_params.py +15 -10
  89. gcore/types/cdn/rule_template_update_params.py +15 -10
  90. gcore/types/cdn/statistic_get_logs_usage_aggregated_params.py +4 -1
  91. gcore/types/cdn/statistic_get_logs_usage_series_params.py +5 -12
  92. gcore/types/cdn/statistic_get_resource_usage_aggregated_params.py +10 -21
  93. gcore/types/cdn/statistic_get_resource_usage_series_params.py +6 -1
  94. gcore/types/cdn/statistic_get_shield_usage_aggregated_params.py +5 -2
  95. gcore/types/cdn/statistic_get_shield_usage_series_params.py +3 -0
  96. gcore/types/cloud/__init__.py +9 -3
  97. gcore/types/cloud/audit_log_entry.py +9 -3
  98. gcore/types/cloud/audit_log_list_params.py +12 -0
  99. gcore/types/cloud/baremetal/server_create_params.py +7 -7
  100. gcore/types/cloud/baremetal_flavor.py +0 -6
  101. gcore/types/cloud/billing_reservation_list_params.py +1 -1
  102. gcore/types/cloud/blackhole_port.py +4 -1
  103. gcore/types/cloud/databases/postgres/__init__.py +12 -0
  104. gcore/types/cloud/databases/postgres/cluster_create_params.py +108 -0
  105. gcore/types/cloud/databases/postgres/cluster_list_params.py +19 -0
  106. gcore/types/cloud/databases/postgres/cluster_update_params.py +102 -0
  107. gcore/types/cloud/databases/postgres/clusters/__init__.py +5 -0
  108. gcore/types/cloud/databases/postgres/clusters/postgres_user_credentials.py +13 -0
  109. gcore/types/cloud/databases/postgres/custom_configuration_validate_params.py +19 -0
  110. gcore/types/cloud/databases/postgres/pg_conf_validation.py +15 -0
  111. gcore/types/cloud/databases/postgres/postgres_cluster.py +118 -0
  112. gcore/types/cloud/databases/postgres/postgres_cluster_short.py +22 -0
  113. gcore/types/cloud/databases/postgres/postgres_configuration.py +31 -0
  114. gcore/types/cloud/file_share_create_params.py +8 -8
  115. gcore/types/cloud/file_share_update_params.py +7 -2
  116. gcore/types/cloud/floating_ip.py +5 -1
  117. gcore/types/cloud/floating_ip_create_params.py +4 -4
  118. gcore/types/cloud/floating_ip_detailed.py +5 -1
  119. gcore/types/cloud/floating_ip_list_params.py +8 -0
  120. gcore/types/cloud/floating_ip_update_params.py +7 -2
  121. gcore/types/cloud/gpu_baremetal_cluster.py +18 -3
  122. gcore/types/cloud/gpu_baremetal_cluster_action_params.py +7 -2
  123. gcore/types/cloud/gpu_baremetal_cluster_create_params.py +16 -4
  124. gcore/types/cloud/gpu_baremetal_clusters/gpu_baremetal_cluster_server.py +5 -2
  125. gcore/types/cloud/gpu_baremetal_clusters/image_upload_params.py +4 -4
  126. gcore/types/cloud/gpu_image.py +9 -0
  127. gcore/types/cloud/gpu_virtual_cluster.py +189 -0
  128. gcore/types/cloud/gpu_virtual_cluster_action_params.py +127 -0
  129. gcore/types/cloud/gpu_virtual_cluster_create_params.py +213 -0
  130. gcore/types/cloud/gpu_virtual_cluster_delete_params.py +41 -0
  131. gcore/types/cloud/gpu_virtual_cluster_list_params.py +21 -0
  132. gcore/types/cloud/gpu_virtual_cluster_update_params.py +18 -0
  133. gcore/types/cloud/gpu_virtual_clusters/__init__.py +16 -0
  134. gcore/types/cloud/gpu_virtual_clusters/flavor_list_params.py +21 -0
  135. gcore/types/cloud/gpu_virtual_clusters/gpu_virtual_cluster_server.py +77 -0
  136. gcore/types/cloud/gpu_virtual_clusters/gpu_virtual_cluster_server_list.py +16 -0
  137. gcore/types/cloud/gpu_virtual_clusters/gpu_virtual_cluster_volume.py +64 -0
  138. gcore/types/cloud/gpu_virtual_clusters/gpu_virtual_cluster_volume_list.py +16 -0
  139. gcore/types/cloud/gpu_virtual_clusters/gpu_virtual_flavor.py +155 -0
  140. gcore/types/cloud/gpu_virtual_clusters/gpu_virtual_flavor_list.py +16 -0
  141. gcore/types/cloud/gpu_virtual_clusters/gpu_virtual_interface.py +190 -0
  142. gcore/types/cloud/gpu_virtual_clusters/gpu_virtual_interface_list.py +16 -0
  143. gcore/types/cloud/gpu_virtual_clusters/image_upload_params.py +56 -0
  144. gcore/types/cloud/gpu_virtual_clusters/server_delete_params.py +44 -0
  145. gcore/types/cloud/gpu_virtual_clusters/server_list_params.py +75 -0
  146. gcore/types/cloud/image.py +9 -0
  147. gcore/types/cloud/inference/deployment_create_params.py +1 -1
  148. gcore/types/cloud/inference/deployment_update_params.py +1 -1
  149. gcore/types/cloud/inference/inference_deployment.py +1 -1
  150. gcore/types/cloud/instance_create_params.py +27 -27
  151. gcore/types/cloud/instance_update_params.py +7 -2
  152. gcore/types/cloud/instances/image_create_from_volume_params.py +4 -4
  153. gcore/types/cloud/instances/image_update_params.py +4 -4
  154. gcore/types/cloud/instances/image_upload_params.py +4 -4
  155. gcore/types/cloud/k8s/__init__.py +4 -4
  156. gcore/types/cloud/k8s/cluster_update_params.py +5 -5
  157. gcore/types/cloud/k8s/clusters/__init__.py +2 -2
  158. gcore/types/cloud/k8s/clusters/k8s_cluster_pool.py +2 -2
  159. gcore/types/cloud/k8s/clusters/k8s_cluster_pool_list.py +4 -4
  160. gcore/types/cloud/k8s/k8s_cluster.py +4 -4
  161. gcore/types/cloud/k8s/k8s_cluster_certificate.py +2 -2
  162. gcore/types/cloud/k8s/k8s_cluster_kubeconfig.py +14 -2
  163. gcore/types/cloud/k8s/k8s_cluster_list.py +4 -4
  164. gcore/types/cloud/k8s_cluster_version.py +2 -2
  165. gcore/types/cloud/k8s_cluster_version_list.py +4 -4
  166. gcore/types/cloud/load_balancer_create_params.py +14 -8
  167. gcore/types/cloud/load_balancer_flavor_detail.py +2 -2
  168. gcore/types/cloud/load_balancer_l7_policy.py +29 -16
  169. gcore/types/cloud/load_balancer_l7_policy_list.py +3 -3
  170. gcore/types/cloud/load_balancer_l7_rule.py +14 -23
  171. gcore/types/cloud/load_balancer_l7_rule_list.py +3 -3
  172. gcore/types/cloud/load_balancer_listener_detail.py +2 -2
  173. gcore/types/cloud/load_balancer_update_params.py +7 -2
  174. gcore/types/cloud/load_balancers/__init__.py +1 -0
  175. gcore/types/cloud/load_balancers/l7_policies/rule_create_params.py +5 -10
  176. gcore/types/cloud/load_balancers/l7_policies/rule_replace_params.py +7 -11
  177. gcore/types/cloud/load_balancers/l7_policy_create_params.py +102 -18
  178. gcore/types/cloud/load_balancers/l7_policy_replace_params.py +94 -16
  179. gcore/types/cloud/load_balancers/listener_create_params.py +4 -1
  180. gcore/types/cloud/load_balancers/listener_delete_params.py +18 -0
  181. gcore/types/cloud/load_balancers/listener_update_params.py +4 -1
  182. gcore/types/cloud/load_balancers/pool_create_params.py +1 -1
  183. gcore/types/cloud/network_create_params.py +4 -4
  184. gcore/types/cloud/network_update_params.py +7 -2
  185. gcore/types/cloud/networks/subnet_create_params.py +4 -4
  186. gcore/types/cloud/networks/subnet_update_params.py +7 -2
  187. gcore/types/cloud/project_create_params.py +0 -6
  188. gcore/types/cloud/{project_replace_params.py → project_update_params.py} +2 -2
  189. gcore/types/cloud/quotas/request_create_params.py +0 -3
  190. gcore/types/cloud/region.py +3 -3
  191. gcore/types/cloud/security_group.py +8 -1
  192. gcore/types/cloud/security_group_create_params.py +7 -5
  193. gcore/types/cloud/security_group_list_params.py +6 -4
  194. gcore/types/cloud/security_group_update_params.py +7 -2
  195. gcore/types/cloud/ssh_key_list_params.py +7 -0
  196. gcore/types/cloud/tag.py +2 -2
  197. gcore/types/cloud/task_id_list.py +3 -3
  198. gcore/types/cloud/volume_create_params.py +12 -12
  199. gcore/types/cloud/volume_update_params.py +7 -2
  200. gcore/types/dns/zone_list_params.py +1 -1
  201. gcore/types/iam/api_token_create.py +70 -1
  202. gcore/types/security/bgp_announce_list_params.py +0 -2
  203. gcore/types/security/client_profile.py +1 -0
  204. gcore/types/security/profile_create_params.py +4 -2
  205. gcore/types/security/profile_recreate_params.py +4 -2
  206. gcore/types/security/profile_replace_params.py +4 -2
  207. gcore/types/storage/credential_recreate_params.py +0 -17
  208. gcore/types/storage/storage.py +1 -1
  209. gcore/types/storage/storage_create_params.py +1 -1
  210. gcore/types/streaming/stream.py +3 -2
  211. gcore/types/streaming/video.py +1 -1
  212. gcore/types/waap/domains/custom_rule_create_params.py +1 -1
  213. gcore/types/waap/domains/custom_rule_update_params.py +1 -1
  214. gcore/types/waap/domains/waap_custom_rule.py +1 -1
  215. {gcore-0.16.0.dist-info → gcore-0.23.0.dist-info}/METADATA +14 -14
  216. {gcore-0.16.0.dist-info → gcore-0.23.0.dist-info}/RECORD +219 -168
  217. gcore/resources/cdn/logs/__init__.py +0 -19
  218. /gcore/types/{cdn/logs → cloud/databases}/__init__.py +0 -0
  219. {gcore-0.16.0.dist-info → gcore-0.23.0.dist-info}/WHEEL +0 -0
  220. {gcore-0.16.0.dist-info → gcore-0.23.0.dist-info}/licenses/LICENSE +0 -0
@@ -108,9 +108,10 @@ class SubnetsResource(SyncAPIResource):
108
108
 
109
109
  tags: Key-value tags to associate with the resource. A tag is a key-value pair that
110
110
  can be associated with a resource, enabling efficient filtering and grouping for
111
- better organization and management. Some tags are read-only and cannot be
112
- modified by the user. Tags are also integrated with cost reports, allowing cost
113
- data to be filtered based on tag keys or values.
111
+ better organization and management. Both tag keys and values have a maximum
112
+ length of 255 characters. Some tags are read-only and cannot be modified by the
113
+ user. Tags are also integrated with cost reports, allowing cost data to be
114
+ filtered based on tag keys or values.
114
115
 
115
116
  extra_headers: Send extra headers
116
117
 
@@ -165,6 +166,7 @@ class SubnetsResource(SyncAPIResource):
165
166
  router_id_to_connect: Optional[str] | Omit = omit,
166
167
  tags: Dict[str, str] | Omit = omit,
167
168
  polling_interval_seconds: int | Omit = omit,
169
+ polling_timeout_seconds: int | Omit = omit,
168
170
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
169
171
  # The extra values given here take precedence over values defined on the client or passed to this method.
170
172
  extra_headers: Headers | None = None,
@@ -198,6 +200,7 @@ class SubnetsResource(SyncAPIResource):
198
200
  task_id=response.tasks[0],
199
201
  extra_headers=extra_headers,
200
202
  polling_interval_seconds=polling_interval_seconds,
203
+ polling_timeout_seconds=polling_timeout_seconds,
201
204
  )
202
205
  if not task.created_resources or not task.created_resources.subnets or len(task.created_resources.subnets) != 1:
203
206
  raise ValueError(f"Expected exactly one resource to be created in a task")
@@ -260,15 +263,20 @@ class SubnetsResource(SyncAPIResource):
260
263
  - **Add/update tags:**
261
264
  `{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
262
265
  updates existing ones.
263
- - **Delete tags:** `{'tags': {'`old_tag`': null}}` removes specific tags.
266
+
267
+ - **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
268
+
264
269
  - **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
265
270
  tags are preserved).
271
+
266
272
  - **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
267
273
  specified tags.
274
+
268
275
  - **Mixed operations:**
269
- `{'tags': {'environment': 'production', '`cost_center`': 'engineering', '`deprecated_tag`': null}}`
276
+ `{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
270
277
  adds/updates 'environment' and '`cost_center`' while removing
271
278
  '`deprecated_tag`', preserving other existing tags.
279
+
272
280
  - **Replace all:** first delete existing tags with null values, then add new
273
281
  ones in the same request.
274
282
 
@@ -565,9 +573,10 @@ class AsyncSubnetsResource(AsyncAPIResource):
565
573
 
566
574
  tags: Key-value tags to associate with the resource. A tag is a key-value pair that
567
575
  can be associated with a resource, enabling efficient filtering and grouping for
568
- better organization and management. Some tags are read-only and cannot be
569
- modified by the user. Tags are also integrated with cost reports, allowing cost
570
- data to be filtered based on tag keys or values.
576
+ better organization and management. Both tag keys and values have a maximum
577
+ length of 255 characters. Some tags are read-only and cannot be modified by the
578
+ user. Tags are also integrated with cost reports, allowing cost data to be
579
+ filtered based on tag keys or values.
571
580
 
572
581
  extra_headers: Send extra headers
573
582
 
@@ -622,6 +631,7 @@ class AsyncSubnetsResource(AsyncAPIResource):
622
631
  router_id_to_connect: Optional[str] | Omit = omit,
623
632
  tags: Dict[str, str] | Omit = omit,
624
633
  polling_interval_seconds: int | Omit = omit,
634
+ polling_timeout_seconds: int | Omit = omit,
625
635
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
626
636
  # The extra values given here take precedence over values defined on the client or passed to this method.
627
637
  extra_headers: Headers | None = None,
@@ -655,6 +665,7 @@ class AsyncSubnetsResource(AsyncAPIResource):
655
665
  task_id=response.tasks[0],
656
666
  extra_headers=extra_headers,
657
667
  polling_interval_seconds=polling_interval_seconds,
668
+ polling_timeout_seconds=polling_timeout_seconds,
658
669
  )
659
670
  if not task.created_resources or not task.created_resources.subnets or len(task.created_resources.subnets) != 1:
660
671
  raise ValueError(f"Expected exactly one resource to be created in a task")
@@ -717,15 +728,20 @@ class AsyncSubnetsResource(AsyncAPIResource):
717
728
  - **Add/update tags:**
718
729
  `{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
719
730
  updates existing ones.
720
- - **Delete tags:** `{'tags': {'`old_tag`': null}}` removes specific tags.
731
+
732
+ - **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
733
+
721
734
  - **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
722
735
  tags are preserved).
736
+
723
737
  - **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
724
738
  specified tags.
739
+
725
740
  - **Mixed operations:**
726
- `{'tags': {'environment': 'production', '`cost_center`': 'engineering', '`deprecated_tag`': null}}`
741
+ `{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
727
742
  adds/updates 'environment' and '`cost_center`' while removing
728
743
  '`deprecated_tag`', preserving other existing tags.
744
+
729
745
  - **Replace all:** first delete existing tags with null values, then add new
730
746
  ones in the same request.
731
747
 
@@ -26,6 +26,10 @@ __all__ = ["PlacementGroupsResource", "AsyncPlacementGroupsResource"]
26
26
 
27
27
 
28
28
  class PlacementGroupsResource(SyncAPIResource):
29
+ """
30
+ Placement Groups allow you to specific a policy that determines whether Virtual Machines will be hosted on the same physical server or on different ones.
31
+ """
32
+
29
33
  @cached_property
30
34
  def with_raw_response(self) -> PlacementGroupsResourceWithRawResponse:
31
35
  """
@@ -210,6 +214,10 @@ class PlacementGroupsResource(SyncAPIResource):
210
214
 
211
215
 
212
216
  class AsyncPlacementGroupsResource(AsyncAPIResource):
217
+ """
218
+ Placement Groups allow you to specific a policy that determines whether Virtual Machines will be hosted on the same physical server or on different ones.
219
+ """
220
+
213
221
  @cached_property
214
222
  def with_raw_response(self) -> AsyncPlacementGroupsResourceWithRawResponse:
215
223
  """
@@ -18,7 +18,7 @@ from ..._response import (
18
18
  async_to_streamed_response_wrapper,
19
19
  )
20
20
  from ...pagination import SyncOffsetPage, AsyncOffsetPage
21
- from ...types.cloud import project_list_params, project_create_params, project_replace_params
21
+ from ...types.cloud import project_list_params, project_create_params, project_update_params
22
22
  from ..._base_client import AsyncPaginator, make_request_options
23
23
  from ...types.cloud.project import Project
24
24
  from ...types.cloud.task_id_list import TaskIDList
@@ -50,9 +50,7 @@ class ProjectsResource(SyncAPIResource):
50
50
  self,
51
51
  *,
52
52
  name: str,
53
- client_id: Optional[int] | Omit = omit,
54
53
  description: Optional[str] | Omit = omit,
55
- state: Optional[str] | Omit = omit,
56
54
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
57
55
  # The extra values given here take precedence over values defined on the client or passed to this method.
58
56
  extra_headers: Headers | None = None,
@@ -68,12 +66,8 @@ class ProjectsResource(SyncAPIResource):
68
66
  Args:
69
67
  name: Unique project name for a client. Each client always has one "default" project.
70
68
 
71
- client_id: ID associated with the client.
72
-
73
69
  description: Description of the project.
74
70
 
75
- state: State of the project.
76
-
77
71
  extra_headers: Send extra headers
78
72
 
79
73
  extra_query: Add additional query parameters to the request
@@ -87,9 +81,7 @@ class ProjectsResource(SyncAPIResource):
87
81
  body=maybe_transform(
88
82
  {
89
83
  "name": name,
90
- "client_id": client_id,
91
84
  "description": description,
92
- "state": state,
93
85
  },
94
86
  project_create_params.ProjectCreateParams,
95
87
  ),
@@ -99,6 +91,52 @@ class ProjectsResource(SyncAPIResource):
99
91
  cast_to=Project,
100
92
  )
101
93
 
94
+ def update(
95
+ self,
96
+ *,
97
+ project_id: int | None = None,
98
+ name: str,
99
+ description: Optional[str] | Omit = omit,
100
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
101
+ # The extra values given here take precedence over values defined on the client or passed to this method.
102
+ extra_headers: Headers | None = None,
103
+ extra_query: Query | None = None,
104
+ extra_body: Body | None = None,
105
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
106
+ ) -> Project:
107
+ """
108
+ Update project name and description.
109
+
110
+ Args:
111
+ name: Name of the entity, following a specific format.
112
+
113
+ description: Description of the project.
114
+
115
+ extra_headers: Send extra headers
116
+
117
+ extra_query: Add additional query parameters to the request
118
+
119
+ extra_body: Add additional JSON properties to the request
120
+
121
+ timeout: Override the client-level default timeout for this request, in seconds
122
+ """
123
+ if project_id is None:
124
+ project_id = self._client._get_cloud_project_id_path_param()
125
+ return self._put(
126
+ f"/cloud/v1/projects/{project_id}",
127
+ body=maybe_transform(
128
+ {
129
+ "name": name,
130
+ "description": description,
131
+ },
132
+ project_update_params.ProjectUpdateParams,
133
+ ),
134
+ options=make_request_options(
135
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
136
+ ),
137
+ cast_to=Project,
138
+ )
139
+
102
140
  def list(
103
141
  self,
104
142
  *,
@@ -233,10 +271,30 @@ class ProjectsResource(SyncAPIResource):
233
271
  cast_to=Project,
234
272
  )
235
273
 
236
- def replace(
274
+
275
+ class AsyncProjectsResource(AsyncAPIResource):
276
+ @cached_property
277
+ def with_raw_response(self) -> AsyncProjectsResourceWithRawResponse:
278
+ """
279
+ This property can be used as a prefix for any HTTP method call to return
280
+ the raw response object instead of the parsed content.
281
+
282
+ For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
283
+ """
284
+ return AsyncProjectsResourceWithRawResponse(self)
285
+
286
+ @cached_property
287
+ def with_streaming_response(self) -> AsyncProjectsResourceWithStreamingResponse:
288
+ """
289
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
290
+
291
+ For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
292
+ """
293
+ return AsyncProjectsResourceWithStreamingResponse(self)
294
+
295
+ async def create(
237
296
  self,
238
297
  *,
239
- project_id: int | None = None,
240
298
  name: str,
241
299
  description: Optional[str] | Omit = omit,
242
300
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -246,13 +304,13 @@ class ProjectsResource(SyncAPIResource):
246
304
  extra_body: Body | None = None,
247
305
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
248
306
  ) -> Project:
249
- """Update project name and description.
307
+ """Create a new project for a client.
250
308
 
251
- Project management must be enabled to
252
- perform this operation.
309
+ Project management must be enabled to perform
310
+ this operation.
253
311
 
254
312
  Args:
255
- name: Name of the entity, following a specific format.
313
+ name: Unique project name for a client. Each client always has one "default" project.
256
314
 
257
315
  description: Description of the project.
258
316
 
@@ -264,16 +322,14 @@ class ProjectsResource(SyncAPIResource):
264
322
 
265
323
  timeout: Override the client-level default timeout for this request, in seconds
266
324
  """
267
- if project_id is None:
268
- project_id = self._client._get_cloud_project_id_path_param()
269
- return self._put(
270
- f"/cloud/v1/projects/{project_id}",
271
- body=maybe_transform(
325
+ return await self._post(
326
+ "/cloud/v1/projects",
327
+ body=await async_maybe_transform(
272
328
  {
273
329
  "name": name,
274
330
  "description": description,
275
331
  },
276
- project_replace_params.ProjectReplaceParams,
332
+ project_create_params.ProjectCreateParams,
277
333
  ),
278
334
  options=make_request_options(
279
335
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
@@ -281,34 +337,12 @@ class ProjectsResource(SyncAPIResource):
281
337
  cast_to=Project,
282
338
  )
283
339
 
284
-
285
- class AsyncProjectsResource(AsyncAPIResource):
286
- @cached_property
287
- def with_raw_response(self) -> AsyncProjectsResourceWithRawResponse:
288
- """
289
- This property can be used as a prefix for any HTTP method call to return
290
- the raw response object instead of the parsed content.
291
-
292
- For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
293
- """
294
- return AsyncProjectsResourceWithRawResponse(self)
295
-
296
- @cached_property
297
- def with_streaming_response(self) -> AsyncProjectsResourceWithStreamingResponse:
298
- """
299
- An alternative to `.with_raw_response` that doesn't eagerly read the response body.
300
-
301
- For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
302
- """
303
- return AsyncProjectsResourceWithStreamingResponse(self)
304
-
305
- async def create(
340
+ async def update(
306
341
  self,
307
342
  *,
343
+ project_id: int | None = None,
308
344
  name: str,
309
- client_id: Optional[int] | Omit = omit,
310
345
  description: Optional[str] | Omit = omit,
311
- state: Optional[str] | Omit = omit,
312
346
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
313
347
  # The extra values given here take precedence over values defined on the client or passed to this method.
314
348
  extra_headers: Headers | None = None,
@@ -316,20 +350,14 @@ class AsyncProjectsResource(AsyncAPIResource):
316
350
  extra_body: Body | None = None,
317
351
  timeout: float | httpx.Timeout | None | NotGiven = not_given,
318
352
  ) -> Project:
319
- """Create a new project for a client.
320
-
321
- Project management must be enabled to perform
322
- this operation.
353
+ """
354
+ Update project name and description.
323
355
 
324
356
  Args:
325
- name: Unique project name for a client. Each client always has one "default" project.
326
-
327
- client_id: ID associated with the client.
357
+ name: Name of the entity, following a specific format.
328
358
 
329
359
  description: Description of the project.
330
360
 
331
- state: State of the project.
332
-
333
361
  extra_headers: Send extra headers
334
362
 
335
363
  extra_query: Add additional query parameters to the request
@@ -338,16 +366,16 @@ class AsyncProjectsResource(AsyncAPIResource):
338
366
 
339
367
  timeout: Override the client-level default timeout for this request, in seconds
340
368
  """
341
- return await self._post(
342
- "/cloud/v1/projects",
369
+ if project_id is None:
370
+ project_id = self._client._get_cloud_project_id_path_param()
371
+ return await self._put(
372
+ f"/cloud/v1/projects/{project_id}",
343
373
  body=await async_maybe_transform(
344
374
  {
345
375
  "name": name,
346
- "client_id": client_id,
347
376
  "description": description,
348
- "state": state,
349
377
  },
350
- project_create_params.ProjectCreateParams,
378
+ project_update_params.ProjectUpdateParams,
351
379
  ),
352
380
  options=make_request_options(
353
381
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
@@ -489,54 +517,6 @@ class AsyncProjectsResource(AsyncAPIResource):
489
517
  cast_to=Project,
490
518
  )
491
519
 
492
- async def replace(
493
- self,
494
- *,
495
- project_id: int | None = None,
496
- name: str,
497
- description: Optional[str] | Omit = omit,
498
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
499
- # The extra values given here take precedence over values defined on the client or passed to this method.
500
- extra_headers: Headers | None = None,
501
- extra_query: Query | None = None,
502
- extra_body: Body | None = None,
503
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
504
- ) -> Project:
505
- """Update project name and description.
506
-
507
- Project management must be enabled to
508
- perform this operation.
509
-
510
- Args:
511
- name: Name of the entity, following a specific format.
512
-
513
- description: Description of the project.
514
-
515
- extra_headers: Send extra headers
516
-
517
- extra_query: Add additional query parameters to the request
518
-
519
- extra_body: Add additional JSON properties to the request
520
-
521
- timeout: Override the client-level default timeout for this request, in seconds
522
- """
523
- if project_id is None:
524
- project_id = self._client._get_cloud_project_id_path_param()
525
- return await self._put(
526
- f"/cloud/v1/projects/{project_id}",
527
- body=await async_maybe_transform(
528
- {
529
- "name": name,
530
- "description": description,
531
- },
532
- project_replace_params.ProjectReplaceParams,
533
- ),
534
- options=make_request_options(
535
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
536
- ),
537
- cast_to=Project,
538
- )
539
-
540
520
 
541
521
  class ProjectsResourceWithRawResponse:
542
522
  def __init__(self, projects: ProjectsResource) -> None:
@@ -545,6 +525,9 @@ class ProjectsResourceWithRawResponse:
545
525
  self.create = to_raw_response_wrapper(
546
526
  projects.create,
547
527
  )
528
+ self.update = to_raw_response_wrapper(
529
+ projects.update,
530
+ )
548
531
  self.list = to_raw_response_wrapper(
549
532
  projects.list,
550
533
  )
@@ -554,9 +537,6 @@ class ProjectsResourceWithRawResponse:
554
537
  self.get = to_raw_response_wrapper(
555
538
  projects.get,
556
539
  )
557
- self.replace = to_raw_response_wrapper(
558
- projects.replace,
559
- )
560
540
 
561
541
 
562
542
  class AsyncProjectsResourceWithRawResponse:
@@ -566,6 +546,9 @@ class AsyncProjectsResourceWithRawResponse:
566
546
  self.create = async_to_raw_response_wrapper(
567
547
  projects.create,
568
548
  )
549
+ self.update = async_to_raw_response_wrapper(
550
+ projects.update,
551
+ )
569
552
  self.list = async_to_raw_response_wrapper(
570
553
  projects.list,
571
554
  )
@@ -575,9 +558,6 @@ class AsyncProjectsResourceWithRawResponse:
575
558
  self.get = async_to_raw_response_wrapper(
576
559
  projects.get,
577
560
  )
578
- self.replace = async_to_raw_response_wrapper(
579
- projects.replace,
580
- )
581
561
 
582
562
 
583
563
  class ProjectsResourceWithStreamingResponse:
@@ -587,6 +567,9 @@ class ProjectsResourceWithStreamingResponse:
587
567
  self.create = to_streamed_response_wrapper(
588
568
  projects.create,
589
569
  )
570
+ self.update = to_streamed_response_wrapper(
571
+ projects.update,
572
+ )
590
573
  self.list = to_streamed_response_wrapper(
591
574
  projects.list,
592
575
  )
@@ -596,9 +579,6 @@ class ProjectsResourceWithStreamingResponse:
596
579
  self.get = to_streamed_response_wrapper(
597
580
  projects.get,
598
581
  )
599
- self.replace = to_streamed_response_wrapper(
600
- projects.replace,
601
- )
602
582
 
603
583
 
604
584
  class AsyncProjectsResourceWithStreamingResponse:
@@ -608,6 +588,9 @@ class AsyncProjectsResourceWithStreamingResponse:
608
588
  self.create = async_to_streamed_response_wrapper(
609
589
  projects.create,
610
590
  )
591
+ self.update = async_to_streamed_response_wrapper(
592
+ projects.update,
593
+ )
611
594
  self.list = async_to_streamed_response_wrapper(
612
595
  projects.list,
613
596
  )
@@ -617,6 +600,3 @@ class AsyncProjectsResourceWithStreamingResponse:
617
600
  self.get = async_to_streamed_response_wrapper(
618
601
  projects.get,
619
602
  )
620
- self.replace = async_to_streamed_response_wrapper(
621
- projects.replace,
622
- )
@@ -51,7 +51,6 @@ class RequestsResource(SyncAPIResource):
51
51
  *,
52
52
  description: str,
53
53
  requested_limits: request_create_params.RequestedLimits,
54
- client_id: int | Omit = omit,
55
54
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
56
55
  # The extra values given here take precedence over values defined on the client or passed to this method.
57
56
  extra_headers: Headers | None = None,
@@ -67,8 +66,6 @@ class RequestsResource(SyncAPIResource):
67
66
 
68
67
  requested_limits: Limits you want to increase.
69
68
 
70
- client_id: Client ID that requests the limit increase.
71
-
72
69
  extra_headers: Send extra headers
73
70
 
74
71
  extra_query: Add additional query parameters to the request
@@ -84,7 +81,6 @@ class RequestsResource(SyncAPIResource):
84
81
  {
85
82
  "description": description,
86
83
  "requested_limits": requested_limits,
87
- "client_id": client_id,
88
84
  },
89
85
  request_create_params.RequestCreateParams,
90
86
  ),
@@ -239,7 +235,6 @@ class AsyncRequestsResource(AsyncAPIResource):
239
235
  *,
240
236
  description: str,
241
237
  requested_limits: request_create_params.RequestedLimits,
242
- client_id: int | Omit = omit,
243
238
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
244
239
  # The extra values given here take precedence over values defined on the client or passed to this method.
245
240
  extra_headers: Headers | None = None,
@@ -255,8 +250,6 @@ class AsyncRequestsResource(AsyncAPIResource):
255
250
 
256
251
  requested_limits: Limits you want to increase.
257
252
 
258
- client_id: Client ID that requests the limit increase.
259
-
260
253
  extra_headers: Send extra headers
261
254
 
262
255
  extra_query: Add additional query parameters to the request
@@ -272,7 +265,6 @@ class AsyncRequestsResource(AsyncAPIResource):
272
265
  {
273
266
  "description": description,
274
267
  "requested_limits": requested_limits,
275
- "client_id": client_id,
276
268
  },
277
269
  request_create_params.RequestCreateParams,
278
270
  ),