gcore 0.1.0a2__py3-none-any.whl → 0.2.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 (78) hide show
  1. gcore/__init__.py +5 -0
  2. gcore/_client.py +9 -0
  3. gcore/_utils/_proxy.py +4 -1
  4. gcore/_utils/_resources_proxy.py +24 -0
  5. gcore/_version.py +1 -1
  6. gcore/resources/__init__.py +14 -0
  7. gcore/resources/cloud/baremetal/servers.py +234 -0
  8. gcore/resources/cloud/billing_reservations.py +24 -0
  9. gcore/resources/cloud/file_shares/file_shares.py +16 -0
  10. gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +352 -2
  11. gcore/resources/cloud/gpu_baremetal_clusters/images.py +204 -0
  12. gcore/resources/cloud/gpu_baremetal_clusters/servers.py +80 -0
  13. gcore/resources/cloud/inference/deployments/deployments.py +322 -4
  14. gcore/resources/cloud/instances/images.py +316 -0
  15. gcore/resources/cloud/instances/instances.py +472 -0
  16. gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +282 -0
  17. gcore/resources/cloud/load_balancers/l7_policies/rules.py +326 -0
  18. gcore/resources/cloud/load_balancers/listeners.py +371 -6
  19. gcore/resources/cloud/load_balancers/load_balancers.py +364 -0
  20. gcore/resources/cloud/load_balancers/pools/health_monitors.py +24 -0
  21. gcore/resources/cloud/load_balancers/pools/members.py +28 -0
  22. gcore/resources/cloud/load_balancers/pools/pools.py +388 -8
  23. gcore/resources/cloud/networks/networks.py +72 -16
  24. gcore/resources/cloud/secrets.py +56 -11
  25. gcore/resources/cloud/tasks.py +107 -96
  26. gcore/resources/waap/__init__.py +33 -0
  27. gcore/resources/waap/domains/__init__.py +33 -0
  28. gcore/resources/waap/domains/domains.py +515 -0
  29. gcore/resources/waap/domains/settings.py +271 -0
  30. gcore/resources/waap/waap.py +102 -0
  31. gcore/types/cloud/__init__.py +1 -0
  32. gcore/types/cloud/billing_reservation_list_params.py +5 -0
  33. gcore/types/cloud/container_probe_config_create_param.py +1 -2
  34. gcore/types/cloud/file_share.py +3 -0
  35. gcore/types/cloud/file_share_list_params.py +7 -1
  36. gcore/types/cloud/gpu_baremetal_cluster_create_params.py +20 -0
  37. gcore/types/cloud/inference/deployment_update_params.py +203 -6
  38. gcore/types/cloud/inference/inference.py +3 -1
  39. gcore/types/cloud/load_balancer_listener_detail.py +13 -13
  40. gcore/types/cloud/load_balancer_pool.py +13 -13
  41. gcore/types/cloud/load_balancer_pool_list.py +99 -4
  42. gcore/types/cloud/load_balancers/listener_create_params.py +2 -0
  43. gcore/types/cloud/load_balancers/listener_get_params.py +3 -1
  44. gcore/types/cloud/load_balancers/listener_list_params.py +4 -2
  45. gcore/types/cloud/load_balancers/listener_update_params.py +2 -0
  46. gcore/types/cloud/load_balancers/pool_create_params.py +2 -0
  47. gcore/types/cloud/load_balancers/pool_list_params.py +5 -6
  48. gcore/types/cloud/load_balancers/pool_update_params.py +2 -0
  49. gcore/types/cloud/load_balancers/pools/health_monitor_create_params.py +2 -0
  50. gcore/types/cloud/load_balancers/pools/member_add_params.py +2 -0
  51. gcore/types/cloud/network.py +21 -21
  52. gcore/types/cloud/network_create_params.py +2 -0
  53. gcore/types/cloud/network_details.py +24 -23
  54. gcore/types/cloud/network_list_params.py +15 -10
  55. gcore/types/cloud/network_update_params.py +2 -0
  56. gcore/types/cloud/quota_get_all_response.py +18 -0
  57. gcore/types/cloud/quota_get_by_region_response.py +18 -0
  58. gcore/types/cloud/quotas/request_create_params.py +9 -0
  59. gcore/types/cloud/quotas/request_get_response.py +9 -0
  60. gcore/types/cloud/quotas/request_list_response.py +9 -0
  61. gcore/types/cloud/secret_list_params.py +24 -0
  62. gcore/types/cloud/task.py +0 -3
  63. gcore/types/cloud/task_list_params.py +8 -2
  64. gcore/types/waap/__init__.py +12 -0
  65. gcore/types/waap/domain_list_params.py +30 -0
  66. gcore/types/waap/domain_update_params.py +12 -0
  67. gcore/types/waap/domains/__init__.py +5 -0
  68. gcore/types/waap/domains/setting_update_params.py +41 -0
  69. gcore/types/waap/waap_api_urls.py +15 -0
  70. gcore/types/waap/waap_detailed_domain.py +37 -0
  71. gcore/types/waap/waap_domain_ddos_settings.py +31 -0
  72. gcore/types/waap/waap_domain_settings.py +15 -0
  73. gcore/types/waap/waap_domain_status.py +7 -0
  74. gcore/types/waap/waap_summary_domain.py +26 -0
  75. {gcore-0.1.0a2.dist-info → gcore-0.2.0.dist-info}/METADATA +3 -3
  76. {gcore-0.1.0a2.dist-info → gcore-0.2.0.dist-info}/RECORD +78 -60
  77. {gcore-0.1.0a2.dist-info → gcore-0.2.0.dist-info}/WHEEL +0 -0
  78. {gcore-0.1.0a2.dist-info → gcore-0.2.0.dist-info}/licenses/LICENSE +0 -0
@@ -2,6 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ import typing_extensions
5
6
  from typing import Union, Optional
6
7
  from datetime import datetime
7
8
  from typing_extensions import Literal
@@ -18,7 +19,7 @@ from ..._response import (
18
19
  async_to_raw_response_wrapper,
19
20
  async_to_streamed_response_wrapper,
20
21
  )
21
- from ...types.cloud import secret_create_params, secret_upload_tls_certificate_params
22
+ from ...types.cloud import secret_list_params, secret_create_params, secret_upload_tls_certificate_params
22
23
  from ..._base_client import make_request_options
23
24
  from ...types.cloud.secret import Secret
24
25
  from ...types.cloud.task_id_list import TaskIDList
@@ -47,6 +48,7 @@ class SecretsResource(SyncAPIResource):
47
48
  """
48
49
  return SecretsResourceWithStreamingResponse(self)
49
50
 
51
+ @typing_extensions.deprecated("deprecated")
50
52
  def create(
51
53
  self,
52
54
  *,
@@ -146,6 +148,8 @@ class SecretsResource(SyncAPIResource):
146
148
  *,
147
149
  project_id: int | None = None,
148
150
  region_id: int | None = None,
151
+ limit: int | NotGiven = NOT_GIVEN,
152
+ offset: int | NotGiven = NOT_GIVEN,
149
153
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
150
154
  # The extra values given here take precedence over values defined on the client or passed to this method.
151
155
  extra_headers: Headers | None = None,
@@ -161,6 +165,11 @@ class SecretsResource(SyncAPIResource):
161
165
 
162
166
  region_id: Region ID
163
167
 
168
+ limit: Optional. Limit the number of returned items
169
+
170
+ offset: Optional. Offset value is used to exclude the first set of records from the
171
+ result
172
+
164
173
  extra_headers: Send extra headers
165
174
 
166
175
  extra_query: Add additional query parameters to the request
@@ -176,7 +185,17 @@ class SecretsResource(SyncAPIResource):
176
185
  return self._get(
177
186
  f"/cloud/v1/secrets/{project_id}/{region_id}",
178
187
  options=make_request_options(
179
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
188
+ extra_headers=extra_headers,
189
+ extra_query=extra_query,
190
+ extra_body=extra_body,
191
+ timeout=timeout,
192
+ query=maybe_transform(
193
+ {
194
+ "limit": limit,
195
+ "offset": offset,
196
+ },
197
+ secret_list_params.SecretListParams,
198
+ ),
180
199
  ),
181
200
  cast_to=SecretListResponse,
182
201
  )
@@ -390,6 +409,7 @@ class AsyncSecretsResource(AsyncAPIResource):
390
409
  """
391
410
  return AsyncSecretsResourceWithStreamingResponse(self)
392
411
 
412
+ @typing_extensions.deprecated("deprecated")
393
413
  async def create(
394
414
  self,
395
415
  *,
@@ -489,6 +509,8 @@ class AsyncSecretsResource(AsyncAPIResource):
489
509
  *,
490
510
  project_id: int | None = None,
491
511
  region_id: int | None = None,
512
+ limit: int | NotGiven = NOT_GIVEN,
513
+ offset: int | NotGiven = NOT_GIVEN,
492
514
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
493
515
  # The extra values given here take precedence over values defined on the client or passed to this method.
494
516
  extra_headers: Headers | None = None,
@@ -504,6 +526,11 @@ class AsyncSecretsResource(AsyncAPIResource):
504
526
 
505
527
  region_id: Region ID
506
528
 
529
+ limit: Optional. Limit the number of returned items
530
+
531
+ offset: Optional. Offset value is used to exclude the first set of records from the
532
+ result
533
+
507
534
  extra_headers: Send extra headers
508
535
 
509
536
  extra_query: Add additional query parameters to the request
@@ -519,7 +546,17 @@ class AsyncSecretsResource(AsyncAPIResource):
519
546
  return await self._get(
520
547
  f"/cloud/v1/secrets/{project_id}/{region_id}",
521
548
  options=make_request_options(
522
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
549
+ extra_headers=extra_headers,
550
+ extra_query=extra_query,
551
+ extra_body=extra_body,
552
+ timeout=timeout,
553
+ query=await async_maybe_transform(
554
+ {
555
+ "limit": limit,
556
+ "offset": offset,
557
+ },
558
+ secret_list_params.SecretListParams,
559
+ ),
523
560
  ),
524
561
  cast_to=SecretListResponse,
525
562
  )
@@ -717,8 +754,10 @@ class SecretsResourceWithRawResponse:
717
754
  def __init__(self, secrets: SecretsResource) -> None:
718
755
  self._secrets = secrets
719
756
 
720
- self.create = to_raw_response_wrapper(
721
- secrets.create,
757
+ self.create = ( # pyright: ignore[reportDeprecated]
758
+ to_raw_response_wrapper(
759
+ secrets.create # pyright: ignore[reportDeprecated],
760
+ )
722
761
  )
723
762
  self.list = to_raw_response_wrapper(
724
763
  secrets.list,
@@ -738,8 +777,10 @@ class AsyncSecretsResourceWithRawResponse:
738
777
  def __init__(self, secrets: AsyncSecretsResource) -> None:
739
778
  self._secrets = secrets
740
779
 
741
- self.create = async_to_raw_response_wrapper(
742
- secrets.create,
780
+ self.create = ( # pyright: ignore[reportDeprecated]
781
+ async_to_raw_response_wrapper(
782
+ secrets.create # pyright: ignore[reportDeprecated],
783
+ )
743
784
  )
744
785
  self.list = async_to_raw_response_wrapper(
745
786
  secrets.list,
@@ -759,8 +800,10 @@ class SecretsResourceWithStreamingResponse:
759
800
  def __init__(self, secrets: SecretsResource) -> None:
760
801
  self._secrets = secrets
761
802
 
762
- self.create = to_streamed_response_wrapper(
763
- secrets.create,
803
+ self.create = ( # pyright: ignore[reportDeprecated]
804
+ to_streamed_response_wrapper(
805
+ secrets.create # pyright: ignore[reportDeprecated],
806
+ )
764
807
  )
765
808
  self.list = to_streamed_response_wrapper(
766
809
  secrets.list,
@@ -780,8 +823,10 @@ class AsyncSecretsResourceWithStreamingResponse:
780
823
  def __init__(self, secrets: AsyncSecretsResource) -> None:
781
824
  self._secrets = secrets
782
825
 
783
- self.create = async_to_streamed_response_wrapper(
784
- secrets.create,
826
+ self.create = ( # pyright: ignore[reportDeprecated]
827
+ async_to_streamed_response_wrapper(
828
+ secrets.create # pyright: ignore[reportDeprecated],
829
+ )
785
830
  )
786
831
  self.list = async_to_streamed_response_wrapper(
787
832
  secrets.list,
@@ -48,40 +48,41 @@ class TasksResource(SyncAPIResource):
48
48
  """
49
49
  return TasksResourceWithStreamingResponse(self)
50
50
 
51
- def get(
51
+ def poll(
52
52
  self,
53
53
  task_id: str,
54
54
  *,
55
+ polling_interval_seconds: int | NotGiven = NOT_GIVEN,
55
56
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
56
57
  # The extra values given here take precedence over values defined on the client or passed to this method.
57
58
  extra_headers: Headers | None = None,
58
59
  extra_query: Query | None = None,
59
60
  extra_body: Body | None = None,
60
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
61
+ timeout: float | NotGiven = NOT_GIVEN,
61
62
  ) -> Task:
62
- """
63
- Get task
64
-
65
- Args:
66
- task_id: Task ID
67
-
68
- extra_headers: Send extra headers
63
+ if not is_given(polling_interval_seconds):
64
+ polling_interval_seconds = cast(int, self._client.cloud_polling_interval_seconds)
65
+ # Ensure the polling interval is at least 1 second
66
+ polling_interval_seconds = max(1, polling_interval_seconds)
69
67
 
70
- extra_query: Add additional query parameters to the request
68
+ if not is_given(timeout):
69
+ timeout = extract_timeout_value(self._client.timeout)
71
70
 
72
- extra_body: Add additional JSON properties to the request
71
+ end_time = time.time() + timeout
72
+ while time.time() <= end_time:
73
+ task = self.get(
74
+ task_id,
75
+ extra_headers=extra_headers,
76
+ extra_query=extra_query,
77
+ extra_body=extra_body,
78
+ )
79
+ if task.state == "ERROR":
80
+ raise ValueError(task.error or f"Task {task_id} failed")
81
+ elif task.state == "FINISHED":
82
+ return task
83
+ self._sleep(polling_interval_seconds)
73
84
 
74
- timeout: Override the client-level default timeout for this request, in seconds
75
- """
76
- if not task_id:
77
- raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
78
- return self._get(
79
- f"/cloud/v1/tasks/{task_id}",
80
- options=make_request_options(
81
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
82
- ),
83
- cast_to=Task,
84
- )
85
+ raise TimeoutError(f"Timed out waiting for task {task_id}")
85
86
 
86
87
  def list(
87
88
  self,
@@ -90,9 +91,10 @@ class TasksResource(SyncAPIResource):
90
91
  is_acknowledged: Optional[bool] | NotGiven = NOT_GIVEN,
91
92
  limit: int | NotGiven = NOT_GIVEN,
92
93
  offset: int | NotGiven = NOT_GIVEN,
94
+ order_by: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
93
95
  project_id: Optional[Iterable[int]] | NotGiven = NOT_GIVEN,
94
96
  region_id: Optional[Iterable[int]] | NotGiven = NOT_GIVEN,
95
- sorting: Optional[Literal["asc", "desc"]] | NotGiven = NOT_GIVEN,
97
+ sorting: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
96
98
  state: Optional[List[Literal["ERROR", "FINISHED", "NEW", "RUNNING"]]] | NotGiven = NOT_GIVEN,
97
99
  task_type: Optional[str] | NotGiven = NOT_GIVEN,
98
100
  to_timestamp: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
@@ -118,13 +120,16 @@ class TasksResource(SyncAPIResource):
118
120
 
119
121
  offset: Offset value is used to exclude the first set of records from the result
120
122
 
123
+ order_by: Sorting by creation date. Oldest first, or most recent first
124
+
121
125
  project_id: The project ID to filter the tasks by project. Supports multiple values of kind
122
126
  key=value1&key=value2
123
127
 
124
128
  region_id: The region ID to filter the tasks by region. Supports multiple values of kind
125
129
  key=value1&key=value2
126
130
 
127
- sorting: Sorting by creation date. Oldest first, or most recent first
131
+ sorting: (DEPRECATED Use 'order_by' instead) Sorting by creation date. Oldest first, or
132
+ most recent first
128
133
 
129
134
  state: Filter the tasks by state. Supports multiple values of kind
130
135
  key=value1&key=value2
@@ -197,6 +202,7 @@ class TasksResource(SyncAPIResource):
197
202
  "is_acknowledged": is_acknowledged,
198
203
  "limit": limit,
199
204
  "offset": offset,
205
+ "order_by": order_by,
200
206
  "project_id": project_id,
201
207
  "region_id": region_id,
202
208
  "sorting": sorting,
@@ -210,42 +216,6 @@ class TasksResource(SyncAPIResource):
210
216
  model=Task,
211
217
  )
212
218
 
213
- def poll(
214
- self,
215
- task_id: str,
216
- *,
217
- polling_interval_seconds: int | NotGiven = NOT_GIVEN,
218
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
219
- # The extra values given here take precedence over values defined on the client or passed to this method.
220
- extra_headers: Headers | None = None,
221
- extra_query: Query | None = None,
222
- extra_body: Body | None = None,
223
- timeout: float | NotGiven = NOT_GIVEN,
224
- ) -> Task:
225
- if not is_given(polling_interval_seconds):
226
- polling_interval_seconds = cast(int, self._client.cloud_polling_interval_seconds)
227
- # Ensure the polling interval is at least 1 second
228
- polling_interval_seconds = max(1, polling_interval_seconds)
229
-
230
- if not is_given(timeout):
231
- timeout = extract_timeout_value(self._client.timeout)
232
-
233
- end_time = time.time() + timeout
234
- while time.time() <= end_time:
235
- task = self.get(
236
- task_id,
237
- extra_headers=extra_headers,
238
- extra_query=extra_query,
239
- extra_body=extra_body,
240
- )
241
- if task.state == "ERROR":
242
- raise ValueError(task.error or f"Task {task_id} failed")
243
- elif task.state == "FINISHED":
244
- return task
245
- self._sleep(polling_interval_seconds)
246
-
247
- raise TimeoutError(f"Timed out waiting for task {task_id}")
248
-
249
219
  def acknowledge_all(
250
220
  self,
251
221
  *,
@@ -328,6 +298,42 @@ class TasksResource(SyncAPIResource):
328
298
  cast_to=Task,
329
299
  )
330
300
 
301
+ def get(
302
+ self,
303
+ task_id: str,
304
+ *,
305
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
306
+ # The extra values given here take precedence over values defined on the client or passed to this method.
307
+ extra_headers: Headers | None = None,
308
+ extra_query: Query | None = None,
309
+ extra_body: Body | None = None,
310
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
311
+ ) -> Task:
312
+ """
313
+ Get task
314
+
315
+ Args:
316
+ task_id: Task ID
317
+
318
+ extra_headers: Send extra headers
319
+
320
+ extra_query: Add additional query parameters to the request
321
+
322
+ extra_body: Add additional JSON properties to the request
323
+
324
+ timeout: Override the client-level default timeout for this request, in seconds
325
+ """
326
+ if not task_id:
327
+ raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
328
+ return self._get(
329
+ f"/cloud/v1/tasks/{task_id}",
330
+ options=make_request_options(
331
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
332
+ ),
333
+ cast_to=Task,
334
+ )
335
+
336
+
331
337
  class AsyncTasksResource(AsyncAPIResource):
332
338
  @cached_property
333
339
  def with_raw_response(self) -> AsyncTasksResourceWithRawResponse:
@@ -348,6 +354,40 @@ class AsyncTasksResource(AsyncAPIResource):
348
354
  """
349
355
  return AsyncTasksResourceWithStreamingResponse(self)
350
356
 
357
+ async def poll(
358
+ self,
359
+ task_id: str,
360
+ *,
361
+ polling_interval_seconds: int | NotGiven = NOT_GIVEN,
362
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
363
+ # The extra values given here take precedence over values defined on the client or passed to this method.
364
+ extra_headers: Headers | None = None,
365
+ extra_query: Query | None = None,
366
+ extra_body: Body | None = None,
367
+ timeout: float | NotGiven = NOT_GIVEN,
368
+ ) -> Task:
369
+ if not is_given(polling_interval_seconds):
370
+ polling_interval_seconds = cast(int, self._client.cloud_polling_interval_seconds)
371
+
372
+ if not is_given(timeout):
373
+ timeout = extract_timeout_value(self._client.timeout)
374
+
375
+ end_time = time.time() + timeout
376
+ while time.time() <= end_time:
377
+ task = await self.get(
378
+ task_id,
379
+ extra_headers=extra_headers,
380
+ extra_query=extra_query,
381
+ extra_body=extra_body,
382
+ )
383
+ if task.state == "ERROR":
384
+ raise ValueError(task.error or f"Task {task_id} failed")
385
+ elif task.state == "FINISHED":
386
+ return task
387
+ await self._sleep(polling_interval_seconds)
388
+
389
+ raise TimeoutError(f"Timed out waiting for task {task_id}")
390
+
351
391
  def list(
352
392
  self,
353
393
  *,
@@ -355,9 +395,10 @@ class AsyncTasksResource(AsyncAPIResource):
355
395
  is_acknowledged: Optional[bool] | NotGiven = NOT_GIVEN,
356
396
  limit: int | NotGiven = NOT_GIVEN,
357
397
  offset: int | NotGiven = NOT_GIVEN,
398
+ order_by: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
358
399
  project_id: Optional[Iterable[int]] | NotGiven = NOT_GIVEN,
359
400
  region_id: Optional[Iterable[int]] | NotGiven = NOT_GIVEN,
360
- sorting: Optional[Literal["asc", "desc"]] | NotGiven = NOT_GIVEN,
401
+ sorting: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
361
402
  state: Optional[List[Literal["ERROR", "FINISHED", "NEW", "RUNNING"]]] | NotGiven = NOT_GIVEN,
362
403
  task_type: Optional[str] | NotGiven = NOT_GIVEN,
363
404
  to_timestamp: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
@@ -383,13 +424,16 @@ class AsyncTasksResource(AsyncAPIResource):
383
424
 
384
425
  offset: Offset value is used to exclude the first set of records from the result
385
426
 
427
+ order_by: Sorting by creation date. Oldest first, or most recent first
428
+
386
429
  project_id: The project ID to filter the tasks by project. Supports multiple values of kind
387
430
  key=value1&key=value2
388
431
 
389
432
  region_id: The region ID to filter the tasks by region. Supports multiple values of kind
390
433
  key=value1&key=value2
391
434
 
392
- sorting: Sorting by creation date. Oldest first, or most recent first
435
+ sorting: (DEPRECATED Use 'order_by' instead) Sorting by creation date. Oldest first, or
436
+ most recent first
393
437
 
394
438
  state: Filter the tasks by state. Supports multiple values of kind
395
439
  key=value1&key=value2
@@ -462,6 +506,7 @@ class AsyncTasksResource(AsyncAPIResource):
462
506
  "is_acknowledged": is_acknowledged,
463
507
  "limit": limit,
464
508
  "offset": offset,
509
+ "order_by": order_by,
465
510
  "project_id": project_id,
466
511
  "region_id": region_id,
467
512
  "sorting": sorting,
@@ -592,40 +637,6 @@ class AsyncTasksResource(AsyncAPIResource):
592
637
  cast_to=Task,
593
638
  )
594
639
 
595
- async def poll(
596
- self,
597
- task_id: str,
598
- *,
599
- polling_interval_seconds: int | NotGiven = NOT_GIVEN,
600
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
601
- # The extra values given here take precedence over values defined on the client or passed to this method.
602
- extra_headers: Headers | None = None,
603
- extra_query: Query | None = None,
604
- extra_body: Body | None = None,
605
- timeout: float | NotGiven = NOT_GIVEN,
606
- ) -> Task:
607
- if not is_given(polling_interval_seconds):
608
- polling_interval_seconds = cast(int, self._client.cloud_polling_interval_seconds)
609
-
610
- if not is_given(timeout):
611
- timeout = extract_timeout_value(self._client.timeout)
612
-
613
- end_time = time.time() + timeout
614
- while time.time() <= end_time:
615
- task = await self.get(
616
- task_id,
617
- extra_headers=extra_headers,
618
- extra_query=extra_query,
619
- extra_body=extra_body,
620
- )
621
- if task.state == "ERROR":
622
- raise ValueError(task.error or f"Task {task_id} failed")
623
- elif task.state == "FINISHED":
624
- return task
625
- await self._sleep(polling_interval_seconds)
626
-
627
- raise TimeoutError(f"Timed out waiting for task {task_id}")
628
-
629
640
 
630
641
  class TasksResourceWithRawResponse:
631
642
  def __init__(self, tasks: TasksResource) -> None:
@@ -0,0 +1,33 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .waap import (
4
+ WaapResource,
5
+ AsyncWaapResource,
6
+ WaapResourceWithRawResponse,
7
+ AsyncWaapResourceWithRawResponse,
8
+ WaapResourceWithStreamingResponse,
9
+ AsyncWaapResourceWithStreamingResponse,
10
+ )
11
+ from .domains import (
12
+ DomainsResource,
13
+ AsyncDomainsResource,
14
+ DomainsResourceWithRawResponse,
15
+ AsyncDomainsResourceWithRawResponse,
16
+ DomainsResourceWithStreamingResponse,
17
+ AsyncDomainsResourceWithStreamingResponse,
18
+ )
19
+
20
+ __all__ = [
21
+ "DomainsResource",
22
+ "AsyncDomainsResource",
23
+ "DomainsResourceWithRawResponse",
24
+ "AsyncDomainsResourceWithRawResponse",
25
+ "DomainsResourceWithStreamingResponse",
26
+ "AsyncDomainsResourceWithStreamingResponse",
27
+ "WaapResource",
28
+ "AsyncWaapResource",
29
+ "WaapResourceWithRawResponse",
30
+ "AsyncWaapResourceWithRawResponse",
31
+ "WaapResourceWithStreamingResponse",
32
+ "AsyncWaapResourceWithStreamingResponse",
33
+ ]
@@ -0,0 +1,33 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .domains import (
4
+ DomainsResource,
5
+ AsyncDomainsResource,
6
+ DomainsResourceWithRawResponse,
7
+ AsyncDomainsResourceWithRawResponse,
8
+ DomainsResourceWithStreamingResponse,
9
+ AsyncDomainsResourceWithStreamingResponse,
10
+ )
11
+ from .settings import (
12
+ SettingsResource,
13
+ AsyncSettingsResource,
14
+ SettingsResourceWithRawResponse,
15
+ AsyncSettingsResourceWithRawResponse,
16
+ SettingsResourceWithStreamingResponse,
17
+ AsyncSettingsResourceWithStreamingResponse,
18
+ )
19
+
20
+ __all__ = [
21
+ "SettingsResource",
22
+ "AsyncSettingsResource",
23
+ "SettingsResourceWithRawResponse",
24
+ "AsyncSettingsResourceWithRawResponse",
25
+ "SettingsResourceWithStreamingResponse",
26
+ "AsyncSettingsResourceWithStreamingResponse",
27
+ "DomainsResource",
28
+ "AsyncDomainsResource",
29
+ "DomainsResourceWithRawResponse",
30
+ "AsyncDomainsResourceWithRawResponse",
31
+ "DomainsResourceWithStreamingResponse",
32
+ "AsyncDomainsResourceWithStreamingResponse",
33
+ ]