gcore 0.16.0__py3-none-any.whl → 0.17.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 (52) hide show
  1. gcore/_client.py +16 -0
  2. gcore/_version.py +1 -1
  3. gcore/resources/cdn/cdn.py +120 -21
  4. gcore/resources/cdn/{logs/logs.py → logs.py} +9 -9
  5. gcore/resources/cloud/baremetal/servers.py +8 -0
  6. gcore/resources/cloud/cloud.py +18 -0
  7. gcore/resources/cloud/file_shares/file_shares.py +124 -33
  8. gcore/resources/cloud/floating_ips.py +8 -0
  9. gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +12 -0
  10. gcore/resources/cloud/gpu_baremetal_clusters/images.py +8 -0
  11. gcore/resources/cloud/gpu_baremetal_clusters/servers.py +4 -0
  12. gcore/resources/cloud/inference/deployments/deployments.py +12 -0
  13. gcore/resources/cloud/instances/images.py +12 -0
  14. gcore/resources/cloud/instances/instances.py +20 -0
  15. gcore/resources/cloud/instances/interfaces.py +12 -0
  16. gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +12 -0
  17. gcore/resources/cloud/load_balancers/l7_policies/rules.py +12 -0
  18. gcore/resources/cloud/load_balancers/listeners.py +12 -0
  19. gcore/resources/cloud/load_balancers/load_balancers.py +16 -0
  20. gcore/resources/cloud/load_balancers/pools/pools.py +12 -0
  21. gcore/resources/cloud/networks/networks.py +8 -0
  22. gcore/resources/cloud/networks/subnets.py +4 -0
  23. gcore/resources/cloud/placement_groups.py +8 -0
  24. gcore/resources/cloud/projects.py +109 -109
  25. gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +18 -0
  26. gcore/resources/cloud/secrets.py +4 -0
  27. gcore/resources/cloud/tasks.py +22 -7
  28. gcore/resources/cloud/volumes.py +27 -1
  29. gcore/types/cdn/__init__.py +3 -0
  30. gcore/types/cdn/alibaba_regions.py +22 -0
  31. gcore/types/cdn/aws_regions.py +22 -0
  32. gcore/types/cdn/cdn_list_purge_statuses_response.py +10 -0
  33. gcore/types/cdn/cdn_resource.py +1 -1
  34. gcore/types/cdn/resource_create_params.py +1 -1
  35. gcore/types/cdn/resource_replace_params.py +1 -1
  36. gcore/types/cdn/resource_update_params.py +1 -1
  37. gcore/types/cdn/resources/cdn_resource_rule.py +1 -1
  38. gcore/types/cdn/resources/rule_create_params.py +1 -1
  39. gcore/types/cdn/resources/rule_replace_params.py +1 -1
  40. gcore/types/cdn/resources/rule_update_params.py +1 -1
  41. gcore/types/cdn/rule_template.py +1 -1
  42. gcore/types/cdn/rule_template_create_params.py +1 -1
  43. gcore/types/cdn/rule_template_replace_params.py +1 -1
  44. gcore/types/cdn/rule_template_update_params.py +1 -1
  45. gcore/types/cloud/__init__.py +1 -1
  46. gcore/types/cloud/{project_replace_params.py → project_update_params.py} +2 -2
  47. {gcore-0.16.0.dist-info → gcore-0.17.0.dist-info}/METADATA +2 -2
  48. {gcore-0.16.0.dist-info → gcore-0.17.0.dist-info}/RECORD +50 -49
  49. gcore/resources/cdn/logs/__init__.py +0 -19
  50. gcore/types/cdn/logs/__init__.py +0 -3
  51. {gcore-0.16.0.dist-info → gcore-0.17.0.dist-info}/WHEEL +0 -0
  52. {gcore-0.16.0.dist-info → gcore-0.17.0.dist-info}/licenses/LICENSE +0 -0
@@ -421,6 +421,7 @@ class LoadBalancersResource(SyncAPIResource):
421
421
  vip_port_id: str | Omit = omit,
422
422
  vip_subnet_id: str | Omit = omit,
423
423
  polling_interval_seconds: int | Omit = omit,
424
+ polling_timeout_seconds: int | Omit = omit,
424
425
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
425
426
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
426
427
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -454,6 +455,7 @@ class LoadBalancersResource(SyncAPIResource):
454
455
  task_id=response.tasks[0],
455
456
  extra_headers=extra_headers,
456
457
  polling_interval_seconds=polling_interval_seconds,
458
+ polling_timeout_seconds=polling_timeout_seconds,
457
459
  )
458
460
  if (
459
461
  not task.created_resources
@@ -476,6 +478,7 @@ class LoadBalancersResource(SyncAPIResource):
476
478
  project_id: int | None = None,
477
479
  region_id: int | None = None,
478
480
  polling_interval_seconds: int | Omit = omit,
481
+ polling_timeout_seconds: int | Omit = omit,
479
482
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
480
483
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
481
484
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -501,6 +504,7 @@ class LoadBalancersResource(SyncAPIResource):
501
504
  task_id=response.tasks[0],
502
505
  extra_headers=extra_headers,
503
506
  polling_interval_seconds=polling_interval_seconds,
507
+ polling_timeout_seconds=polling_timeout_seconds,
504
508
  )
505
509
 
506
510
  def failover_and_poll(
@@ -511,6 +515,7 @@ class LoadBalancersResource(SyncAPIResource):
511
515
  region_id: int | None = None,
512
516
  force: bool | Omit = omit,
513
517
  polling_interval_seconds: int | Omit = omit,
518
+ polling_timeout_seconds: int | Omit = omit,
514
519
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
515
520
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
516
521
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -537,6 +542,7 @@ class LoadBalancersResource(SyncAPIResource):
537
542
  task_id=response.tasks[0],
538
543
  extra_headers=extra_headers,
539
544
  polling_interval_seconds=polling_interval_seconds,
545
+ polling_timeout_seconds=polling_timeout_seconds,
540
546
  )
541
547
  return self.get(
542
548
  load_balancer_id=load_balancer_id,
@@ -554,6 +560,7 @@ class LoadBalancersResource(SyncAPIResource):
554
560
  region_id: int | None = None,
555
561
  flavor: str,
556
562
  polling_interval_seconds: int | Omit = omit,
563
+ polling_timeout_seconds: int | Omit = omit,
557
564
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
558
565
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
559
566
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -580,6 +587,7 @@ class LoadBalancersResource(SyncAPIResource):
580
587
  task_id=response.tasks[0],
581
588
  extra_headers=extra_headers,
582
589
  polling_interval_seconds=polling_interval_seconds,
590
+ polling_timeout_seconds=polling_timeout_seconds,
583
591
  )
584
592
  return self.get(
585
593
  load_balancer_id=load_balancer_id,
@@ -1106,6 +1114,7 @@ class AsyncLoadBalancersResource(AsyncAPIResource):
1106
1114
  vip_port_id: str | Omit = omit,
1107
1115
  vip_subnet_id: str | Omit = omit,
1108
1116
  polling_interval_seconds: int | Omit = omit,
1117
+ polling_timeout_seconds: int | Omit = omit,
1109
1118
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1110
1119
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1111
1120
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1139,6 +1148,7 @@ class AsyncLoadBalancersResource(AsyncAPIResource):
1139
1148
  task_id=response.tasks[0],
1140
1149
  extra_headers=extra_headers,
1141
1150
  polling_interval_seconds=polling_interval_seconds,
1151
+ polling_timeout_seconds=polling_timeout_seconds,
1142
1152
  )
1143
1153
  if (
1144
1154
  not task.created_resources
@@ -1161,6 +1171,7 @@ class AsyncLoadBalancersResource(AsyncAPIResource):
1161
1171
  project_id: int | None = None,
1162
1172
  region_id: int | None = None,
1163
1173
  polling_interval_seconds: int | Omit = omit,
1174
+ polling_timeout_seconds: int | Omit = omit,
1164
1175
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1165
1176
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1166
1177
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1186,6 +1197,7 @@ class AsyncLoadBalancersResource(AsyncAPIResource):
1186
1197
  task_id=response.tasks[0],
1187
1198
  extra_headers=extra_headers,
1188
1199
  polling_interval_seconds=polling_interval_seconds,
1200
+ polling_timeout_seconds=polling_timeout_seconds,
1189
1201
  )
1190
1202
 
1191
1203
  async def failover_and_poll(
@@ -1196,6 +1208,7 @@ class AsyncLoadBalancersResource(AsyncAPIResource):
1196
1208
  region_id: int | None = None,
1197
1209
  force: bool | Omit = omit,
1198
1210
  polling_interval_seconds: int | Omit = omit,
1211
+ polling_timeout_seconds: int | Omit = omit,
1199
1212
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1200
1213
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1201
1214
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1222,6 +1235,7 @@ class AsyncLoadBalancersResource(AsyncAPIResource):
1222
1235
  task_id=response.tasks[0],
1223
1236
  extra_headers=extra_headers,
1224
1237
  polling_interval_seconds=polling_interval_seconds,
1238
+ polling_timeout_seconds=polling_timeout_seconds,
1225
1239
  )
1226
1240
  return await self.get(
1227
1241
  load_balancer_id=load_balancer_id,
@@ -1239,6 +1253,7 @@ class AsyncLoadBalancersResource(AsyncAPIResource):
1239
1253
  region_id: int | None = None,
1240
1254
  flavor: str,
1241
1255
  polling_interval_seconds: int | Omit = omit,
1256
+ polling_timeout_seconds: int | Omit = omit,
1242
1257
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1243
1258
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1244
1259
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1265,6 +1280,7 @@ class AsyncLoadBalancersResource(AsyncAPIResource):
1265
1280
  task_id=response.tasks[0],
1266
1281
  extra_headers=extra_headers,
1267
1282
  polling_interval_seconds=polling_interval_seconds,
1283
+ polling_timeout_seconds=polling_timeout_seconds,
1268
1284
  )
1269
1285
  return await self.get(
1270
1286
  load_balancer_id=load_balancer_id,
@@ -459,6 +459,7 @@ class PoolsResource(SyncAPIResource):
459
459
  timeout_member_connect: Optional[int] | Omit = omit,
460
460
  timeout_member_data: Optional[int] | Omit = omit,
461
461
  polling_interval_seconds: int | Omit = omit,
462
+ polling_timeout_seconds: int | Omit = omit,
462
463
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
463
464
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
464
465
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -494,6 +495,7 @@ class PoolsResource(SyncAPIResource):
494
495
  task_id=response.tasks[0],
495
496
  extra_headers=extra_headers,
496
497
  polling_interval_seconds=polling_interval_seconds,
498
+ polling_timeout_seconds=polling_timeout_seconds,
497
499
  )
498
500
  if not task.created_resources or not task.created_resources.pools or len(task.created_resources.pools) != 1:
499
501
  raise ValueError(f"Expected exactly one resource to be created in a task")
@@ -512,6 +514,7 @@ class PoolsResource(SyncAPIResource):
512
514
  project_id: int | None = None,
513
515
  region_id: int | None = None,
514
516
  polling_interval_seconds: int | Omit = omit,
517
+ polling_timeout_seconds: int | Omit = omit,
515
518
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
516
519
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
517
520
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -537,6 +540,7 @@ class PoolsResource(SyncAPIResource):
537
540
  task_id=response.tasks[0],
538
541
  extra_headers=extra_headers,
539
542
  polling_interval_seconds=polling_interval_seconds,
543
+ polling_timeout_seconds=polling_timeout_seconds,
540
544
  )
541
545
 
542
546
  def update_and_poll(
@@ -558,6 +562,7 @@ class PoolsResource(SyncAPIResource):
558
562
  timeout_member_connect: Optional[int] | Omit = omit,
559
563
  timeout_member_data: Optional[int] | Omit = omit,
560
564
  polling_interval_seconds: int | Omit = omit,
565
+ polling_timeout_seconds: int | Omit = omit,
561
566
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
562
567
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
563
568
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -595,6 +600,7 @@ class PoolsResource(SyncAPIResource):
595
600
  task_id=response.tasks[0],
596
601
  extra_headers=extra_headers,
597
602
  polling_interval_seconds=polling_interval_seconds,
603
+ polling_timeout_seconds=polling_timeout_seconds,
598
604
  )
599
605
  return self.get(
600
606
  pool_id=pool_id,
@@ -1020,6 +1026,7 @@ class AsyncPoolsResource(AsyncAPIResource):
1020
1026
  timeout_member_connect: Optional[int] | Omit = omit,
1021
1027
  timeout_member_data: Optional[int] | Omit = omit,
1022
1028
  polling_interval_seconds: int | Omit = omit,
1029
+ polling_timeout_seconds: int | Omit = omit,
1023
1030
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1024
1031
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1025
1032
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1055,6 +1062,7 @@ class AsyncPoolsResource(AsyncAPIResource):
1055
1062
  task_id=response.tasks[0],
1056
1063
  extra_headers=extra_headers,
1057
1064
  polling_interval_seconds=polling_interval_seconds,
1065
+ polling_timeout_seconds=polling_timeout_seconds,
1058
1066
  )
1059
1067
  if not task.created_resources or not task.created_resources.pools or len(task.created_resources.pools) != 1:
1060
1068
  raise ValueError(f"Expected exactly one resource to be created in a task")
@@ -1073,6 +1081,7 @@ class AsyncPoolsResource(AsyncAPIResource):
1073
1081
  project_id: int | None = None,
1074
1082
  region_id: int | None = None,
1075
1083
  polling_interval_seconds: int | Omit = omit,
1084
+ polling_timeout_seconds: int | Omit = omit,
1076
1085
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1077
1086
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1078
1087
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1098,6 +1107,7 @@ class AsyncPoolsResource(AsyncAPIResource):
1098
1107
  task_id=response.tasks[0],
1099
1108
  extra_headers=extra_headers,
1100
1109
  polling_interval_seconds=polling_interval_seconds,
1110
+ polling_timeout_seconds=polling_timeout_seconds,
1101
1111
  )
1102
1112
 
1103
1113
  async def update_and_poll(
@@ -1119,6 +1129,7 @@ class AsyncPoolsResource(AsyncAPIResource):
1119
1129
  timeout_member_connect: Optional[int] | Omit = omit,
1120
1130
  timeout_member_data: Optional[int] | Omit = omit,
1121
1131
  polling_interval_seconds: int | Omit = omit,
1132
+ polling_timeout_seconds: int | Omit = omit,
1122
1133
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
1123
1134
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1124
1135
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1156,6 +1167,7 @@ class AsyncPoolsResource(AsyncAPIResource):
1156
1167
  task_id=response.tasks[0],
1157
1168
  extra_headers=extra_headers,
1158
1169
  polling_interval_seconds=polling_interval_seconds,
1170
+ polling_timeout_seconds=polling_timeout_seconds,
1159
1171
  )
1160
1172
  return await self.get(
1161
1173
  pool_id=pool_id,
@@ -146,6 +146,7 @@ class NetworksResource(SyncAPIResource):
146
146
  tags: Dict[str, str] | Omit = omit,
147
147
  type: Literal["vlan", "vxlan"] | Omit = omit,
148
148
  polling_interval_seconds: int | Omit = omit,
149
+ polling_timeout_seconds: int | Omit = omit,
149
150
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
150
151
  # The extra values given here take precedence over values defined on the client or passed to this method.
151
152
  extra_headers: Headers | None = None,
@@ -172,6 +173,7 @@ class NetworksResource(SyncAPIResource):
172
173
  task_id=response.tasks[0],
173
174
  extra_headers=extra_headers,
174
175
  polling_interval_seconds=polling_interval_seconds,
176
+ polling_timeout_seconds=polling_timeout_seconds,
175
177
  )
176
178
  if (
177
179
  not task.created_resources
@@ -394,6 +396,7 @@ class NetworksResource(SyncAPIResource):
394
396
  project_id: int | None = None,
395
397
  region_id: int | None = None,
396
398
  polling_interval_seconds: int | Omit = omit,
399
+ polling_timeout_seconds: int | Omit = omit,
397
400
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
398
401
  # The extra values given here take precedence over values defined on the client or passed to this method.
399
402
  extra_headers: Headers | None = None,
@@ -417,6 +420,7 @@ class NetworksResource(SyncAPIResource):
417
420
  task_id=response.tasks[0],
418
421
  extra_headers=extra_headers,
419
422
  polling_interval_seconds=polling_interval_seconds,
423
+ polling_timeout_seconds=polling_timeout_seconds,
420
424
  )
421
425
 
422
426
  def get(
@@ -568,6 +572,7 @@ class AsyncNetworksResource(AsyncAPIResource):
568
572
  tags: Dict[str, str] | Omit = omit,
569
573
  type: Literal["vlan", "vxlan"] | Omit = omit,
570
574
  polling_interval_seconds: int | Omit = omit,
575
+ polling_timeout_seconds: int | Omit = omit,
571
576
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
572
577
  # The extra values given here take precedence over values defined on the client or passed to this method.
573
578
  extra_headers: Headers | None = None,
@@ -594,6 +599,7 @@ class AsyncNetworksResource(AsyncAPIResource):
594
599
  task_id=response.tasks[0],
595
600
  extra_headers=extra_headers,
596
601
  polling_interval_seconds=polling_interval_seconds,
602
+ polling_timeout_seconds=polling_timeout_seconds,
597
603
  )
598
604
  if (
599
605
  not task.created_resources
@@ -816,6 +822,7 @@ class AsyncNetworksResource(AsyncAPIResource):
816
822
  project_id: int | None = None,
817
823
  region_id: int | None = None,
818
824
  polling_interval_seconds: int | Omit = omit,
825
+ polling_timeout_seconds: int | Omit = omit,
819
826
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
820
827
  # The extra values given here take precedence over values defined on the client or passed to this method.
821
828
  extra_headers: Headers | None = None,
@@ -839,6 +846,7 @@ class AsyncNetworksResource(AsyncAPIResource):
839
846
  task_id=response.tasks[0],
840
847
  extra_headers=extra_headers,
841
848
  polling_interval_seconds=polling_interval_seconds,
849
+ polling_timeout_seconds=polling_timeout_seconds,
842
850
  )
843
851
 
844
852
  async def get(
@@ -165,6 +165,7 @@ class SubnetsResource(SyncAPIResource):
165
165
  router_id_to_connect: Optional[str] | Omit = omit,
166
166
  tags: Dict[str, str] | Omit = omit,
167
167
  polling_interval_seconds: int | Omit = omit,
168
+ polling_timeout_seconds: int | Omit = omit,
168
169
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
169
170
  # The extra values given here take precedence over values defined on the client or passed to this method.
170
171
  extra_headers: Headers | None = None,
@@ -198,6 +199,7 @@ class SubnetsResource(SyncAPIResource):
198
199
  task_id=response.tasks[0],
199
200
  extra_headers=extra_headers,
200
201
  polling_interval_seconds=polling_interval_seconds,
202
+ polling_timeout_seconds=polling_timeout_seconds,
201
203
  )
202
204
  if not task.created_resources or not task.created_resources.subnets or len(task.created_resources.subnets) != 1:
203
205
  raise ValueError(f"Expected exactly one resource to be created in a task")
@@ -622,6 +624,7 @@ class AsyncSubnetsResource(AsyncAPIResource):
622
624
  router_id_to_connect: Optional[str] | Omit = omit,
623
625
  tags: Dict[str, str] | Omit = omit,
624
626
  polling_interval_seconds: int | Omit = omit,
627
+ polling_timeout_seconds: int | Omit = omit,
625
628
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
626
629
  # The extra values given here take precedence over values defined on the client or passed to this method.
627
630
  extra_headers: Headers | None = None,
@@ -655,6 +658,7 @@ class AsyncSubnetsResource(AsyncAPIResource):
655
658
  task_id=response.tasks[0],
656
659
  extra_headers=extra_headers,
657
660
  polling_interval_seconds=polling_interval_seconds,
661
+ polling_timeout_seconds=polling_timeout_seconds,
658
662
  )
659
663
  if not task.created_resources or not task.created_resources.subnets or len(task.created_resources.subnets) != 1:
660
664
  raise ValueError(f"Expected exactly one resource to be created in a task")
@@ -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
@@ -99,6 +99,54 @@ class ProjectsResource(SyncAPIResource):
99
99
  cast_to=Project,
100
100
  )
101
101
 
102
+ def update(
103
+ self,
104
+ *,
105
+ project_id: int | None = None,
106
+ name: str,
107
+ description: Optional[str] | Omit = omit,
108
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
109
+ # The extra values given here take precedence over values defined on the client or passed to this method.
110
+ extra_headers: Headers | None = None,
111
+ extra_query: Query | None = None,
112
+ extra_body: Body | None = None,
113
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
114
+ ) -> Project:
115
+ """Update project name and description.
116
+
117
+ Project management must be enabled to
118
+ perform this operation.
119
+
120
+ Args:
121
+ name: Name of the entity, following a specific format.
122
+
123
+ description: Description of the project.
124
+
125
+ extra_headers: Send extra headers
126
+
127
+ extra_query: Add additional query parameters to the request
128
+
129
+ extra_body: Add additional JSON properties to the request
130
+
131
+ timeout: Override the client-level default timeout for this request, in seconds
132
+ """
133
+ if project_id is None:
134
+ project_id = self._client._get_cloud_project_id_path_param()
135
+ return self._put(
136
+ f"/cloud/v1/projects/{project_id}",
137
+ body=maybe_transform(
138
+ {
139
+ "name": name,
140
+ "description": description,
141
+ },
142
+ project_update_params.ProjectUpdateParams,
143
+ ),
144
+ options=make_request_options(
145
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
146
+ ),
147
+ cast_to=Project,
148
+ )
149
+
102
150
  def list(
103
151
  self,
104
152
  *,
@@ -233,54 +281,6 @@ class ProjectsResource(SyncAPIResource):
233
281
  cast_to=Project,
234
282
  )
235
283
 
236
- def replace(
237
- self,
238
- *,
239
- project_id: int | None = None,
240
- name: str,
241
- description: Optional[str] | Omit = omit,
242
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
243
- # The extra values given here take precedence over values defined on the client or passed to this method.
244
- extra_headers: Headers | None = None,
245
- extra_query: Query | None = None,
246
- extra_body: Body | None = None,
247
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
248
- ) -> Project:
249
- """Update project name and description.
250
-
251
- Project management must be enabled to
252
- perform this operation.
253
-
254
- Args:
255
- name: Name of the entity, following a specific format.
256
-
257
- description: Description of the project.
258
-
259
- extra_headers: Send extra headers
260
-
261
- extra_query: Add additional query parameters to the request
262
-
263
- extra_body: Add additional JSON properties to the request
264
-
265
- timeout: Override the client-level default timeout for this request, in seconds
266
- """
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(
272
- {
273
- "name": name,
274
- "description": description,
275
- },
276
- project_replace_params.ProjectReplaceParams,
277
- ),
278
- options=make_request_options(
279
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
280
- ),
281
- cast_to=Project,
282
- )
283
-
284
284
 
285
285
  class AsyncProjectsResource(AsyncAPIResource):
286
286
  @cached_property
@@ -355,6 +355,54 @@ class AsyncProjectsResource(AsyncAPIResource):
355
355
  cast_to=Project,
356
356
  )
357
357
 
358
+ async def update(
359
+ self,
360
+ *,
361
+ project_id: int | None = None,
362
+ name: str,
363
+ description: Optional[str] | Omit = omit,
364
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
365
+ # The extra values given here take precedence over values defined on the client or passed to this method.
366
+ extra_headers: Headers | None = None,
367
+ extra_query: Query | None = None,
368
+ extra_body: Body | None = None,
369
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
370
+ ) -> Project:
371
+ """Update project name and description.
372
+
373
+ Project management must be enabled to
374
+ perform this operation.
375
+
376
+ Args:
377
+ name: Name of the entity, following a specific format.
378
+
379
+ description: Description of the project.
380
+
381
+ extra_headers: Send extra headers
382
+
383
+ extra_query: Add additional query parameters to the request
384
+
385
+ extra_body: Add additional JSON properties to the request
386
+
387
+ timeout: Override the client-level default timeout for this request, in seconds
388
+ """
389
+ if project_id is None:
390
+ project_id = self._client._get_cloud_project_id_path_param()
391
+ return await self._put(
392
+ f"/cloud/v1/projects/{project_id}",
393
+ body=await async_maybe_transform(
394
+ {
395
+ "name": name,
396
+ "description": description,
397
+ },
398
+ project_update_params.ProjectUpdateParams,
399
+ ),
400
+ options=make_request_options(
401
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
402
+ ),
403
+ cast_to=Project,
404
+ )
405
+
358
406
  def list(
359
407
  self,
360
408
  *,
@@ -489,54 +537,6 @@ class AsyncProjectsResource(AsyncAPIResource):
489
537
  cast_to=Project,
490
538
  )
491
539
 
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
540
 
541
541
  class ProjectsResourceWithRawResponse:
542
542
  def __init__(self, projects: ProjectsResource) -> None:
@@ -545,6 +545,9 @@ class ProjectsResourceWithRawResponse:
545
545
  self.create = to_raw_response_wrapper(
546
546
  projects.create,
547
547
  )
548
+ self.update = to_raw_response_wrapper(
549
+ projects.update,
550
+ )
548
551
  self.list = to_raw_response_wrapper(
549
552
  projects.list,
550
553
  )
@@ -554,9 +557,6 @@ class ProjectsResourceWithRawResponse:
554
557
  self.get = to_raw_response_wrapper(
555
558
  projects.get,
556
559
  )
557
- self.replace = to_raw_response_wrapper(
558
- projects.replace,
559
- )
560
560
 
561
561
 
562
562
  class AsyncProjectsResourceWithRawResponse:
@@ -566,6 +566,9 @@ class AsyncProjectsResourceWithRawResponse:
566
566
  self.create = async_to_raw_response_wrapper(
567
567
  projects.create,
568
568
  )
569
+ self.update = async_to_raw_response_wrapper(
570
+ projects.update,
571
+ )
569
572
  self.list = async_to_raw_response_wrapper(
570
573
  projects.list,
571
574
  )
@@ -575,9 +578,6 @@ class AsyncProjectsResourceWithRawResponse:
575
578
  self.get = async_to_raw_response_wrapper(
576
579
  projects.get,
577
580
  )
578
- self.replace = async_to_raw_response_wrapper(
579
- projects.replace,
580
- )
581
581
 
582
582
 
583
583
  class ProjectsResourceWithStreamingResponse:
@@ -587,6 +587,9 @@ class ProjectsResourceWithStreamingResponse:
587
587
  self.create = to_streamed_response_wrapper(
588
588
  projects.create,
589
589
  )
590
+ self.update = to_streamed_response_wrapper(
591
+ projects.update,
592
+ )
590
593
  self.list = to_streamed_response_wrapper(
591
594
  projects.list,
592
595
  )
@@ -596,9 +599,6 @@ class ProjectsResourceWithStreamingResponse:
596
599
  self.get = to_streamed_response_wrapper(
597
600
  projects.get,
598
601
  )
599
- self.replace = to_streamed_response_wrapper(
600
- projects.replace,
601
- )
602
602
 
603
603
 
604
604
  class AsyncProjectsResourceWithStreamingResponse:
@@ -608,6 +608,9 @@ class AsyncProjectsResourceWithStreamingResponse:
608
608
  self.create = async_to_streamed_response_wrapper(
609
609
  projects.create,
610
610
  )
611
+ self.update = async_to_streamed_response_wrapper(
612
+ projects.update,
613
+ )
611
614
  self.list = async_to_streamed_response_wrapper(
612
615
  projects.list,
613
616
  )
@@ -617,6 +620,3 @@ class AsyncProjectsResourceWithStreamingResponse:
617
620
  self.get = async_to_streamed_response_wrapper(
618
621
  projects.get,
619
622
  )
620
- self.replace = async_to_streamed_response_wrapper(
621
- projects.replace,
622
- )