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
@@ -2,9 +2,12 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ from typing_extensions import Literal
6
+
5
7
  import httpx
6
8
 
7
- from ..._types import Body, Query, Headers, NotGiven, not_given
9
+ from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
10
+ from ..._utils import is_given, maybe_transform, strip_not_given, async_maybe_transform
8
11
  from ..._compat import cached_property
9
12
  from ..._resource import SyncAPIResource, AsyncAPIResource
10
13
  from ..._response import (
@@ -13,6 +16,7 @@ from ..._response import (
13
16
  async_to_raw_response_wrapper,
14
17
  async_to_streamed_response_wrapper,
15
18
  )
19
+ from ...types.cdn import ip_range_list_params, ip_range_list_ips_params
16
20
  from ..._base_client import make_request_options
17
21
  from ...types.cdn.public_ip_list import PublicIPList
18
22
  from ...types.cdn.public_network_list import PublicNetworkList
@@ -43,6 +47,8 @@ class IPRangesResource(SyncAPIResource):
43
47
  def list(
44
48
  self,
45
49
  *,
50
+ format: Literal["json", "plain"] | Omit = omit,
51
+ accept: Literal["application/json", "text/plain"] | Omit = omit,
46
52
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
47
53
  # The extra values given here take precedence over values defined on the client or passed to this method.
48
54
  extra_headers: Headers | None = None,
@@ -58,11 +64,31 @@ class IPRangesResource(SyncAPIResource):
58
64
  relevance. We recommend using a script for automatically update IP ACL.
59
65
 
60
66
  This request does not require authorization.
67
+
68
+ Args:
69
+ format: Optional format override. When set, this takes precedence over the `Accept`
70
+ header.
71
+
72
+ extra_headers: Send extra headers
73
+
74
+ extra_query: Add additional query parameters to the request
75
+
76
+ extra_body: Add additional JSON properties to the request
77
+
78
+ timeout: Override the client-level default timeout for this request, in seconds
61
79
  """
80
+ extra_headers = {
81
+ **strip_not_given({"Accept": str(accept) if is_given(accept) else not_given}),
82
+ **(extra_headers or {}),
83
+ }
62
84
  return self._get(
63
85
  "/cdn/public-net-list",
64
86
  options=make_request_options(
65
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
87
+ extra_headers=extra_headers,
88
+ extra_query=extra_query,
89
+ extra_body=extra_body,
90
+ timeout=timeout,
91
+ query=maybe_transform({"format": format}, ip_range_list_params.IPRangeListParams),
66
92
  ),
67
93
  cast_to=PublicNetworkList,
68
94
  )
@@ -70,6 +96,8 @@ class IPRangesResource(SyncAPIResource):
70
96
  def list_ips(
71
97
  self,
72
98
  *,
99
+ format: Literal["json", "plain"] | Omit = omit,
100
+ accept: Literal["application/json", "text/plain"] | Omit = omit,
73
101
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
74
102
  # The extra values given here take precedence over values defined on the client or passed to this method.
75
103
  extra_headers: Headers | None = None,
@@ -86,11 +114,31 @@ class IPRangesResource(SyncAPIResource):
86
114
  relevance. We recommend using a script to automatically update IP ACL.
87
115
 
88
116
  This request does not require authorization.
117
+
118
+ Args:
119
+ format: Optional format override. When set, this takes precedence over the `Accept`
120
+ header.
121
+
122
+ extra_headers: Send extra headers
123
+
124
+ extra_query: Add additional query parameters to the request
125
+
126
+ extra_body: Add additional JSON properties to the request
127
+
128
+ timeout: Override the client-level default timeout for this request, in seconds
89
129
  """
130
+ extra_headers = {
131
+ **strip_not_given({"Accept": str(accept) if is_given(accept) else not_given}),
132
+ **(extra_headers or {}),
133
+ }
90
134
  return self._get(
91
135
  "/cdn/public-ip-list",
92
136
  options=make_request_options(
93
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
137
+ extra_headers=extra_headers,
138
+ extra_query=extra_query,
139
+ extra_body=extra_body,
140
+ timeout=timeout,
141
+ query=maybe_transform({"format": format}, ip_range_list_ips_params.IPRangeListIPsParams),
94
142
  ),
95
143
  cast_to=PublicIPList,
96
144
  )
@@ -119,6 +167,8 @@ class AsyncIPRangesResource(AsyncAPIResource):
119
167
  async def list(
120
168
  self,
121
169
  *,
170
+ format: Literal["json", "plain"] | Omit = omit,
171
+ accept: Literal["application/json", "text/plain"] | Omit = omit,
122
172
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
123
173
  # The extra values given here take precedence over values defined on the client or passed to this method.
124
174
  extra_headers: Headers | None = None,
@@ -134,11 +184,31 @@ class AsyncIPRangesResource(AsyncAPIResource):
134
184
  relevance. We recommend using a script for automatically update IP ACL.
135
185
 
136
186
  This request does not require authorization.
187
+
188
+ Args:
189
+ format: Optional format override. When set, this takes precedence over the `Accept`
190
+ header.
191
+
192
+ extra_headers: Send extra headers
193
+
194
+ extra_query: Add additional query parameters to the request
195
+
196
+ extra_body: Add additional JSON properties to the request
197
+
198
+ timeout: Override the client-level default timeout for this request, in seconds
137
199
  """
200
+ extra_headers = {
201
+ **strip_not_given({"Accept": str(accept) if is_given(accept) else not_given}),
202
+ **(extra_headers or {}),
203
+ }
138
204
  return await self._get(
139
205
  "/cdn/public-net-list",
140
206
  options=make_request_options(
141
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
207
+ extra_headers=extra_headers,
208
+ extra_query=extra_query,
209
+ extra_body=extra_body,
210
+ timeout=timeout,
211
+ query=await async_maybe_transform({"format": format}, ip_range_list_params.IPRangeListParams),
142
212
  ),
143
213
  cast_to=PublicNetworkList,
144
214
  )
@@ -146,6 +216,8 @@ class AsyncIPRangesResource(AsyncAPIResource):
146
216
  async def list_ips(
147
217
  self,
148
218
  *,
219
+ format: Literal["json", "plain"] | Omit = omit,
220
+ accept: Literal["application/json", "text/plain"] | Omit = omit,
149
221
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
150
222
  # The extra values given here take precedence over values defined on the client or passed to this method.
151
223
  extra_headers: Headers | None = None,
@@ -162,11 +234,31 @@ class AsyncIPRangesResource(AsyncAPIResource):
162
234
  relevance. We recommend using a script to automatically update IP ACL.
163
235
 
164
236
  This request does not require authorization.
237
+
238
+ Args:
239
+ format: Optional format override. When set, this takes precedence over the `Accept`
240
+ header.
241
+
242
+ extra_headers: Send extra headers
243
+
244
+ extra_query: Add additional query parameters to the request
245
+
246
+ extra_body: Add additional JSON properties to the request
247
+
248
+ timeout: Override the client-level default timeout for this request, in seconds
165
249
  """
250
+ extra_headers = {
251
+ **strip_not_given({"Accept": str(accept) if is_given(accept) else not_given}),
252
+ **(extra_headers or {}),
253
+ }
166
254
  return await self._get(
167
255
  "/cdn/public-ip-list",
168
256
  options=make_request_options(
169
- extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
257
+ extra_headers=extra_headers,
258
+ extra_query=extra_query,
259
+ extra_body=extra_body,
260
+ timeout=timeout,
261
+ query=await async_maybe_transform({"format": format}, ip_range_list_ips_params.IPRangeListIPsParams),
170
262
  ),
171
263
  cast_to=PublicIPList,
172
264
  )
@@ -4,11 +4,11 @@ from __future__ import annotations
4
4
 
5
5
  import httpx
6
6
 
7
- from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
8
- from ...._utils import maybe_transform, async_maybe_transform
9
- from ...._compat import cached_property
10
- from ...._resource import SyncAPIResource, AsyncAPIResource
11
- from ...._response import (
7
+ from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
8
+ from ..._utils import maybe_transform, async_maybe_transform
9
+ from ..._compat import cached_property
10
+ from ..._resource import SyncAPIResource, AsyncAPIResource
11
+ from ..._response import (
12
12
  BinaryAPIResponse,
13
13
  AsyncBinaryAPIResponse,
14
14
  StreamedBinaryAPIResponse,
@@ -22,10 +22,10 @@ from ...._response import (
22
22
  async_to_custom_raw_response_wrapper,
23
23
  async_to_custom_streamed_response_wrapper,
24
24
  )
25
- from ....types.cdn import log_list_params, log_download_params
26
- from ....pagination import SyncOffsetPageCdnLogs, AsyncOffsetPageCdnLogs
27
- from ...._base_client import AsyncPaginator, make_request_options
28
- from ....types.cdn.cdn_log_entry import Data
25
+ from ...types.cdn import log_list_params, log_download_params
26
+ from ...pagination import SyncOffsetPageCdnLogs, AsyncOffsetPageCdnLogs
27
+ from ..._base_client import AsyncPaginator, make_request_options
28
+ from ...types.cdn.cdn_log_entry import Data
29
29
 
30
30
  __all__ = ["LogsResource", "AsyncLogsResource"]
31
31
 
@@ -154,11 +154,11 @@ class ResourcesResource(SyncAPIResource):
154
154
 
155
155
  proxy_ssl_ca: ID of the trusted CA certificate used to verify an origin.
156
156
 
157
- It can be used only with `"`proxy_ssl_enabled`": true`.
157
+ It can be used only with `"proxy_ssl_enabled": true`.
158
158
 
159
159
  proxy_ssl_data: ID of the SSL certificate used to verify an origin.
160
160
 
161
- It can be used only with `"`proxy_ssl_enabled`": true`.
161
+ It can be used only with `"proxy_ssl_enabled": true`.
162
162
 
163
163
  proxy_ssl_enabled: Enables or disables SSL certificate validation of the origin server before
164
164
  completing any connection.
@@ -288,11 +288,11 @@ class ResourcesResource(SyncAPIResource):
288
288
 
289
289
  proxy_ssl_ca: ID of the trusted CA certificate used to verify an origin.
290
290
 
291
- It can be used only with `"`proxy_ssl_enabled`": true`.
291
+ It can be used only with `"proxy_ssl_enabled": true`.
292
292
 
293
293
  proxy_ssl_data: ID of the SSL certificate used to verify an origin.
294
294
 
295
- It can be used only with `"`proxy_ssl_enabled`": true`.
295
+ It can be used only with `"proxy_ssl_enabled": true`.
296
296
 
297
297
  proxy_ssl_enabled: Enables or disables SSL certificate validation of the origin server before
298
298
  completing any connection.
@@ -731,16 +731,16 @@ class ResourcesResource(SyncAPIResource):
731
731
  Args:
732
732
  paths: **Purge by pattern** clears the cache that matches the pattern.
733
733
 
734
- Use \\** operator, which replaces any number of symbols in your path. It's
735
- important to note that wildcard usage (\\**) is permitted only at the end of a
734
+ Use _ operator, which replaces any number of symbols in your path. It's
735
+ important to note that wildcard usage (_) is permitted only at the end of a
736
736
  pattern.
737
737
 
738
738
  Query string added to any patterns will be ignored, and purge request will be
739
739
  processed as if there weren't any parameters.
740
740
 
741
- Purge by pattern is recursive. Both /path and /path\\** will result in recursive
741
+ Purge by pattern is recursive. Both /path and /path* will result in recursive
742
742
  purging, meaning all content under the specified path will be affected. As such,
743
- using the pattern /path\\** is functionally equivalent to simply using /path.
743
+ using the pattern /path* is functionally equivalent to simply using /path.
744
744
 
745
745
  extra_headers: Send extra headers
746
746
 
@@ -886,11 +886,11 @@ class ResourcesResource(SyncAPIResource):
886
886
 
887
887
  proxy_ssl_ca: ID of the trusted CA certificate used to verify an origin.
888
888
 
889
- It can be used only with `"`proxy_ssl_enabled`": true`.
889
+ It can be used only with `"proxy_ssl_enabled": true`.
890
890
 
891
891
  proxy_ssl_data: ID of the SSL certificate used to verify an origin.
892
892
 
893
- It can be used only with `"`proxy_ssl_enabled`": true`.
893
+ It can be used only with `"proxy_ssl_enabled": true`.
894
894
 
895
895
  proxy_ssl_enabled: Enables or disables SSL certificate validation of the origin server before
896
896
  completing any connection.
@@ -1064,11 +1064,11 @@ class AsyncResourcesResource(AsyncAPIResource):
1064
1064
 
1065
1065
  proxy_ssl_ca: ID of the trusted CA certificate used to verify an origin.
1066
1066
 
1067
- It can be used only with `"`proxy_ssl_enabled`": true`.
1067
+ It can be used only with `"proxy_ssl_enabled": true`.
1068
1068
 
1069
1069
  proxy_ssl_data: ID of the SSL certificate used to verify an origin.
1070
1070
 
1071
- It can be used only with `"`proxy_ssl_enabled`": true`.
1071
+ It can be used only with `"proxy_ssl_enabled": true`.
1072
1072
 
1073
1073
  proxy_ssl_enabled: Enables or disables SSL certificate validation of the origin server before
1074
1074
  completing any connection.
@@ -1198,11 +1198,11 @@ class AsyncResourcesResource(AsyncAPIResource):
1198
1198
 
1199
1199
  proxy_ssl_ca: ID of the trusted CA certificate used to verify an origin.
1200
1200
 
1201
- It can be used only with `"`proxy_ssl_enabled`": true`.
1201
+ It can be used only with `"proxy_ssl_enabled": true`.
1202
1202
 
1203
1203
  proxy_ssl_data: ID of the SSL certificate used to verify an origin.
1204
1204
 
1205
- It can be used only with `"`proxy_ssl_enabled`": true`.
1205
+ It can be used only with `"proxy_ssl_enabled": true`.
1206
1206
 
1207
1207
  proxy_ssl_enabled: Enables or disables SSL certificate validation of the origin server before
1208
1208
  completing any connection.
@@ -1641,16 +1641,16 @@ class AsyncResourcesResource(AsyncAPIResource):
1641
1641
  Args:
1642
1642
  paths: **Purge by pattern** clears the cache that matches the pattern.
1643
1643
 
1644
- Use \\** operator, which replaces any number of symbols in your path. It's
1645
- important to note that wildcard usage (\\**) is permitted only at the end of a
1644
+ Use _ operator, which replaces any number of symbols in your path. It's
1645
+ important to note that wildcard usage (_) is permitted only at the end of a
1646
1646
  pattern.
1647
1647
 
1648
1648
  Query string added to any patterns will be ignored, and purge request will be
1649
1649
  processed as if there weren't any parameters.
1650
1650
 
1651
- Purge by pattern is recursive. Both /path and /path\\** will result in recursive
1651
+ Purge by pattern is recursive. Both /path and /path* will result in recursive
1652
1652
  purging, meaning all content under the specified path will be affected. As such,
1653
- using the pattern /path\\** is functionally equivalent to simply using /path.
1653
+ using the pattern /path* is functionally equivalent to simply using /path.
1654
1654
 
1655
1655
  extra_headers: Send extra headers
1656
1656
 
@@ -1796,11 +1796,11 @@ class AsyncResourcesResource(AsyncAPIResource):
1796
1796
 
1797
1797
  proxy_ssl_ca: ID of the trusted CA certificate used to verify an origin.
1798
1798
 
1799
- It can be used only with `"`proxy_ssl_enabled`": true`.
1799
+ It can be used only with `"proxy_ssl_enabled": true`.
1800
1800
 
1801
1801
  proxy_ssl_data: ID of the SSL certificate used to verify an origin.
1802
1802
 
1803
- It can be used only with `"`proxy_ssl_enabled`": true`.
1803
+ It can be used only with `"proxy_ssl_enabled": true`.
1804
1804
 
1805
1805
  proxy_ssl_enabled: Enables or disables SSL certificate validation of the origin server before
1806
1806
  completing any connection.
@@ -77,7 +77,7 @@ class StatisticsResource(SyncAPIResource):
77
77
 
78
78
  to: End of the requested time period (ISO 8601/RFC 3339 format, UTC.)
79
79
 
80
- flat: The waу parameters are arranged in the response.
80
+ flat: The way the parameters are arranged in the response.
81
81
 
82
82
  Possible values:
83
83
 
@@ -96,6 +96,9 @@ class StatisticsResource(SyncAPIResource):
96
96
 
97
97
  - &resource=1&resource=2
98
98
 
99
+ If CDN resource ID is not specified, data related to all CDN resources is
100
+ returned.
101
+
99
102
  extra_headers: Send extra headers
100
103
 
101
104
  extra_query: Add additional query parameters to the request
@@ -146,22 +149,17 @@ class StatisticsResource(SyncAPIResource):
146
149
  Args:
147
150
  from_: Beginning of the requested time period (ISO 8601/RFC 3339 format, UTC.)
148
151
 
149
- Example:
150
-
151
- - &from=2020-01-01T00:00:00.000
152
-
153
152
  to: End of the requested time period (ISO 8601/RFC 3339 format, UTC.)
154
153
 
155
- Example:
156
-
157
- - &from=2020-01-01T00:00:00.000
158
-
159
154
  resource: CDN resources IDs by that statistics data is grouped.
160
155
 
161
156
  To request multiple values, use:
162
157
 
163
158
  - &resource=1&resource=2
164
159
 
160
+ If CDN resource ID is not specified, data related to all CDN resources is
161
+ returned.
162
+
165
163
  extra_headers: Send extra headers
166
164
 
167
165
  extra_query: Add additional query parameters to the request
@@ -218,11 +216,6 @@ class StatisticsResource(SyncAPIResource):
218
216
  Args:
219
217
  from_: Beginning of the requested time period (ISO 8601/RFC 3339 format, UTC.)
220
218
 
221
- Examples:
222
-
223
- - &from=2018-11-01T00:00:00.000
224
- - &from=2018-11-01
225
-
226
219
  metrics: Types of statistics data.
227
220
 
228
221
  Possible values:
@@ -279,15 +272,8 @@ class StatisticsResource(SyncAPIResource):
279
272
 
280
273
  to: End of the requested time period (ISO 8601/RFC 3339 format, UTC.)
281
274
 
282
- Examples:
283
-
284
- - &to=2018-11-01T00:00:00.000
285
- - &to=2018-11-01
286
-
287
- countries: Names of countries for which data is displayed.
288
-
289
- English short name from [ISO 3166 standard][1] without the definite article
290
- "the" should be used.
275
+ countries: Names of countries for which data should be displayed. English short name from
276
+ [ISO 3166 standard][1] without the definite article ("the") should be used.
291
277
 
292
278
  [1]: https://www.iso.org/obp/ui/#search/code/
293
279
 
@@ -295,7 +281,7 @@ class StatisticsResource(SyncAPIResource):
295
281
 
296
282
  - &countries=france&countries=denmark
297
283
 
298
- flat: The waу the parameters are arranged in the response.
284
+ flat: The way the parameters are arranged in the response.
299
285
 
300
286
  Possible values:
301
287
 
@@ -309,7 +295,9 @@ class StatisticsResource(SyncAPIResource):
309
295
  - **resource** – Data is grouped by CDN resources IDs.
310
296
  - **region** – Data is grouped by regions of CDN edge servers.
311
297
  - **country** – Data is grouped by countries of CDN edge servers.
312
- - **vhost** – Data is grouped by resources CNAME.
298
+ - **vhost** – Data is grouped by resources CNAMEs.
299
+ - **`client_country`** - Data is grouped by countries, based on end-users'
300
+ location.
313
301
 
314
302
  To request multiple values, use:
315
303
 
@@ -329,7 +317,7 @@ class StatisticsResource(SyncAPIResource):
329
317
  - **africa** - Africa
330
318
  - **sa** - South America
331
319
 
332
- resource: CDN resources IDs by which statistics data is grouped.
320
+ resource: CDN resources IDs by that statistics data is grouped.
333
321
 
334
322
  To request multiple values, use:
335
323
 
@@ -472,6 +460,8 @@ class StatisticsResource(SyncAPIResource):
472
460
  - **region** – Data is grouped by regions of CDN edge servers.
473
461
  - **country** – Data is grouped by countries of CDN edge servers.
474
462
  - **vhost** – Data is grouped by resources CNAMEs.
463
+ - **`client_country`** - Data is grouped by countries, based on end-users'
464
+ location.
475
465
 
476
466
  To request multiple values, use:
477
467
 
@@ -491,12 +481,15 @@ class StatisticsResource(SyncAPIResource):
491
481
  - **africa** - Africa
492
482
  - **sa** - South America
493
483
 
494
- resource: CDN resource IDs.
484
+ resource: CDN resources IDs by that statistics data is grouped.
495
485
 
496
486
  To request multiple values, use:
497
487
 
498
488
  - &resource=1&resource=2
499
489
 
490
+ If CDN resource ID is not specified, data related to all CDN resources is
491
+ returned.
492
+
500
493
  extra_headers: Send extra headers
501
494
 
502
495
  extra_query: Add additional query parameters to the request
@@ -555,7 +548,7 @@ class StatisticsResource(SyncAPIResource):
555
548
 
556
549
  to: End of the requested time period (ISO 8601/RFC 3339 format, UTC.)
557
550
 
558
- flat: The waу parameters are arranged in the response.
551
+ flat: The way the parameters are arranged in the response.
559
552
 
560
553
  Possible values:
561
554
 
@@ -566,7 +559,7 @@ class StatisticsResource(SyncAPIResource):
566
559
 
567
560
  Possible value:
568
561
 
569
- - **resource** - Data is grouped by CDN resource.
562
+ - **resource** - Data is grouped by CDN resources.
570
563
 
571
564
  resource: CDN resources IDs by that statistics data is grouped.
572
565
 
@@ -574,6 +567,9 @@ class StatisticsResource(SyncAPIResource):
574
567
 
575
568
  - &resource=1&resource=2
576
569
 
570
+ If CDN resource ID is not specified, data related to all CDN resources is
571
+ returned.
572
+
577
573
  extra_headers: Send extra headers
578
574
 
579
575
  extra_query: Add additional query parameters to the request
@@ -632,6 +628,9 @@ class StatisticsResource(SyncAPIResource):
632
628
 
633
629
  - &resource=1&resource=2
634
630
 
631
+ If CDN resource ID is not specified, data related to all CDN resources is
632
+ returned.
633
+
635
634
  extra_headers: Send extra headers
636
635
 
637
636
  extra_query: Add additional query parameters to the request
@@ -705,7 +704,7 @@ class AsyncStatisticsResource(AsyncAPIResource):
705
704
 
706
705
  to: End of the requested time period (ISO 8601/RFC 3339 format, UTC.)
707
706
 
708
- flat: The waу parameters are arranged in the response.
707
+ flat: The way the parameters are arranged in the response.
709
708
 
710
709
  Possible values:
711
710
 
@@ -724,6 +723,9 @@ class AsyncStatisticsResource(AsyncAPIResource):
724
723
 
725
724
  - &resource=1&resource=2
726
725
 
726
+ If CDN resource ID is not specified, data related to all CDN resources is
727
+ returned.
728
+
727
729
  extra_headers: Send extra headers
728
730
 
729
731
  extra_query: Add additional query parameters to the request
@@ -774,22 +776,17 @@ class AsyncStatisticsResource(AsyncAPIResource):
774
776
  Args:
775
777
  from_: Beginning of the requested time period (ISO 8601/RFC 3339 format, UTC.)
776
778
 
777
- Example:
778
-
779
- - &from=2020-01-01T00:00:00.000
780
-
781
779
  to: End of the requested time period (ISO 8601/RFC 3339 format, UTC.)
782
780
 
783
- Example:
784
-
785
- - &from=2020-01-01T00:00:00.000
786
-
787
781
  resource: CDN resources IDs by that statistics data is grouped.
788
782
 
789
783
  To request multiple values, use:
790
784
 
791
785
  - &resource=1&resource=2
792
786
 
787
+ If CDN resource ID is not specified, data related to all CDN resources is
788
+ returned.
789
+
793
790
  extra_headers: Send extra headers
794
791
 
795
792
  extra_query: Add additional query parameters to the request
@@ -846,11 +843,6 @@ class AsyncStatisticsResource(AsyncAPIResource):
846
843
  Args:
847
844
  from_: Beginning of the requested time period (ISO 8601/RFC 3339 format, UTC.)
848
845
 
849
- Examples:
850
-
851
- - &from=2018-11-01T00:00:00.000
852
- - &from=2018-11-01
853
-
854
846
  metrics: Types of statistics data.
855
847
 
856
848
  Possible values:
@@ -907,15 +899,8 @@ class AsyncStatisticsResource(AsyncAPIResource):
907
899
 
908
900
  to: End of the requested time period (ISO 8601/RFC 3339 format, UTC.)
909
901
 
910
- Examples:
911
-
912
- - &to=2018-11-01T00:00:00.000
913
- - &to=2018-11-01
914
-
915
- countries: Names of countries for which data is displayed.
916
-
917
- English short name from [ISO 3166 standard][1] without the definite article
918
- "the" should be used.
902
+ countries: Names of countries for which data should be displayed. English short name from
903
+ [ISO 3166 standard][1] without the definite article ("the") should be used.
919
904
 
920
905
  [1]: https://www.iso.org/obp/ui/#search/code/
921
906
 
@@ -923,7 +908,7 @@ class AsyncStatisticsResource(AsyncAPIResource):
923
908
 
924
909
  - &countries=france&countries=denmark
925
910
 
926
- flat: The waу the parameters are arranged in the response.
911
+ flat: The way the parameters are arranged in the response.
927
912
 
928
913
  Possible values:
929
914
 
@@ -937,7 +922,9 @@ class AsyncStatisticsResource(AsyncAPIResource):
937
922
  - **resource** – Data is grouped by CDN resources IDs.
938
923
  - **region** – Data is grouped by regions of CDN edge servers.
939
924
  - **country** – Data is grouped by countries of CDN edge servers.
940
- - **vhost** – Data is grouped by resources CNAME.
925
+ - **vhost** – Data is grouped by resources CNAMEs.
926
+ - **`client_country`** - Data is grouped by countries, based on end-users'
927
+ location.
941
928
 
942
929
  To request multiple values, use:
943
930
 
@@ -957,7 +944,7 @@ class AsyncStatisticsResource(AsyncAPIResource):
957
944
  - **africa** - Africa
958
945
  - **sa** - South America
959
946
 
960
- resource: CDN resources IDs by which statistics data is grouped.
947
+ resource: CDN resources IDs by that statistics data is grouped.
961
948
 
962
949
  To request multiple values, use:
963
950
 
@@ -1100,6 +1087,8 @@ class AsyncStatisticsResource(AsyncAPIResource):
1100
1087
  - **region** – Data is grouped by regions of CDN edge servers.
1101
1088
  - **country** – Data is grouped by countries of CDN edge servers.
1102
1089
  - **vhost** – Data is grouped by resources CNAMEs.
1090
+ - **`client_country`** - Data is grouped by countries, based on end-users'
1091
+ location.
1103
1092
 
1104
1093
  To request multiple values, use:
1105
1094
 
@@ -1119,12 +1108,15 @@ class AsyncStatisticsResource(AsyncAPIResource):
1119
1108
  - **africa** - Africa
1120
1109
  - **sa** - South America
1121
1110
 
1122
- resource: CDN resource IDs.
1111
+ resource: CDN resources IDs by that statistics data is grouped.
1123
1112
 
1124
1113
  To request multiple values, use:
1125
1114
 
1126
1115
  - &resource=1&resource=2
1127
1116
 
1117
+ If CDN resource ID is not specified, data related to all CDN resources is
1118
+ returned.
1119
+
1128
1120
  extra_headers: Send extra headers
1129
1121
 
1130
1122
  extra_query: Add additional query parameters to the request
@@ -1183,7 +1175,7 @@ class AsyncStatisticsResource(AsyncAPIResource):
1183
1175
 
1184
1176
  to: End of the requested time period (ISO 8601/RFC 3339 format, UTC.)
1185
1177
 
1186
- flat: The waу parameters are arranged in the response.
1178
+ flat: The way the parameters are arranged in the response.
1187
1179
 
1188
1180
  Possible values:
1189
1181
 
@@ -1194,7 +1186,7 @@ class AsyncStatisticsResource(AsyncAPIResource):
1194
1186
 
1195
1187
  Possible value:
1196
1188
 
1197
- - **resource** - Data is grouped by CDN resource.
1189
+ - **resource** - Data is grouped by CDN resources.
1198
1190
 
1199
1191
  resource: CDN resources IDs by that statistics data is grouped.
1200
1192
 
@@ -1202,6 +1194,9 @@ class AsyncStatisticsResource(AsyncAPIResource):
1202
1194
 
1203
1195
  - &resource=1&resource=2
1204
1196
 
1197
+ If CDN resource ID is not specified, data related to all CDN resources is
1198
+ returned.
1199
+
1205
1200
  extra_headers: Send extra headers
1206
1201
 
1207
1202
  extra_query: Add additional query parameters to the request
@@ -1260,6 +1255,9 @@ class AsyncStatisticsResource(AsyncAPIResource):
1260
1255
 
1261
1256
  - &resource=1&resource=2
1262
1257
 
1258
+ If CDN resource ID is not specified, data related to all CDN resources is
1259
+ returned.
1260
+
1263
1261
  extra_headers: Send extra headers
1264
1262
 
1265
1263
  extra_query: Add additional query parameters to the request