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
@@ -4,36 +4,49 @@ from typing import List, Optional
4
4
  from typing_extensions import Literal
5
5
 
6
6
  from ..._models import BaseModel
7
- from .load_balancer_l7_rule import LoadBalancerL7Rule
7
+ from .provisioning_status import ProvisioningStatus
8
+ from .load_balancer_operating_status import LoadBalancerOperatingStatus
8
9
 
9
- __all__ = ["LoadBalancerL7Policy"]
10
+ __all__ = ["LoadBalancerL7Policy", "Rule"]
11
+
12
+
13
+ class Rule(BaseModel):
14
+ id: str
15
+ """L7Rule ID"""
16
+
17
+ project_id: int
18
+ """Project ID"""
19
+
20
+ region: str
21
+ """Region name"""
22
+
23
+ region_id: int
24
+ """Region ID"""
10
25
 
11
26
 
12
27
  class LoadBalancerL7Policy(BaseModel):
13
- id: Optional[str] = None
28
+ id: str
14
29
  """ID"""
15
30
 
16
- action: Optional[Literal["REDIRECT_PREFIX", "REDIRECT_TO_POOL", "REDIRECT_TO_URL", "REJECT"]] = None
31
+ action: Literal["REDIRECT_PREFIX", "REDIRECT_TO_POOL", "REDIRECT_TO_URL", "REJECT"]
17
32
  """Action"""
18
33
 
19
- listener_id: Optional[str] = None
34
+ listener_id: str
20
35
  """Listener ID"""
21
36
 
22
- name: Optional[str] = None
37
+ name: str
23
38
  """Human-readable name of the policy"""
24
39
 
25
- operating_status: Optional[Literal["DEGRADED", "DRAINING", "ERROR", "NO_MONITOR", "OFFLINE", "ONLINE"]] = None
40
+ operating_status: LoadBalancerOperatingStatus
26
41
  """L7 policy operating status"""
27
42
 
28
- position: Optional[int] = None
43
+ position: int
29
44
  """The position of this policy on the listener. Positions start at 1."""
30
45
 
31
- project_id: Optional[int] = None
46
+ project_id: int
32
47
  """Project ID"""
33
48
 
34
- provisioning_status: Optional[
35
- Literal["ACTIVE", "DELETED", "ERROR", "PENDING_CREATE", "PENDING_DELETE", "PENDING_UPDATE"]
36
- ] = None
49
+ provisioning_status: ProvisioningStatus
37
50
 
38
51
  redirect_http_code: Optional[int] = None
39
52
  """
@@ -60,13 +73,13 @@ class LoadBalancerL7Policy(BaseModel):
60
73
  Only valid if action is `REDIRECT_TO_URL`.
61
74
  """
62
75
 
63
- region: Optional[str] = None
76
+ region: str
64
77
  """Region name"""
65
78
 
66
- region_id: Optional[int] = None
79
+ region_id: int
67
80
  """Region ID"""
68
81
 
69
- rules: Optional[List[LoadBalancerL7Rule]] = None
82
+ rules: List[Rule]
70
83
  """Rules.
71
84
 
72
85
  All the rules associated with a given policy are logically ANDed together. A
@@ -75,7 +88,7 @@ class LoadBalancerL7Policy(BaseModel):
75
88
  policies with the same action.
76
89
  """
77
90
 
78
- tags: Optional[List[str]] = None
91
+ tags: List[str]
79
92
  """A list of simple strings assigned to the resource."""
80
93
 
81
94
  task_id: Optional[str] = None
@@ -1,6 +1,6 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- from typing import List, Optional
3
+ from typing import List
4
4
 
5
5
  from ..._models import BaseModel
6
6
  from .load_balancer_l7_policy import LoadBalancerL7Policy
@@ -9,8 +9,8 @@ __all__ = ["LoadBalancerL7PolicyList"]
9
9
 
10
10
 
11
11
  class LoadBalancerL7PolicyList(BaseModel):
12
- count: Optional[int] = None
12
+ count: int
13
13
  """Number of objects"""
14
14
 
15
- results: Optional[List[LoadBalancerL7Policy]] = None
15
+ results: List[LoadBalancerL7Policy]
16
16
  """Objects"""
@@ -4,18 +4,20 @@ from typing import List, Optional
4
4
  from typing_extensions import Literal
5
5
 
6
6
  from ..._models import BaseModel
7
+ from .provisioning_status import ProvisioningStatus
8
+ from .load_balancer_operating_status import LoadBalancerOperatingStatus
7
9
 
8
10
  __all__ = ["LoadBalancerL7Rule"]
9
11
 
10
12
 
11
13
  class LoadBalancerL7Rule(BaseModel):
12
- id: Optional[str] = None
14
+ id: str
13
15
  """L7Rule ID"""
14
16
 
15
- compare_type: Optional[Literal["CONTAINS", "ENDS_WITH", "EQUAL_TO", "REGEX", "STARTS_WITH"]] = None
17
+ compare_type: Literal["CONTAINS", "ENDS_WITH", "EQUAL_TO", "REGEX", "STARTS_WITH"]
16
18
  """The comparison type for the L7 rule"""
17
19
 
18
- invert: Optional[bool] = None
20
+ invert: bool
19
21
  """When true the logic of the rule is inverted.
20
22
 
21
23
  For example, with invert true, 'equal to' would become 'not equal to'. Default
@@ -28,20 +30,18 @@ class LoadBalancerL7Rule(BaseModel):
28
30
  For example, the name of the cookie to evaluate.
29
31
  """
30
32
 
31
- operating_status: Optional[Literal["DEGRADED", "DRAINING", "ERROR", "NO_MONITOR", "OFFLINE", "ONLINE"]] = None
33
+ operating_status: LoadBalancerOperatingStatus
32
34
  """L7 policy operating status"""
33
35
 
34
- project_id: Optional[int] = None
36
+ project_id: int
35
37
  """Project ID"""
36
38
 
37
- provisioning_status: Optional[
38
- Literal["ACTIVE", "DELETED", "ERROR", "PENDING_CREATE", "PENDING_DELETE", "PENDING_UPDATE"]
39
- ] = None
39
+ provisioning_status: ProvisioningStatus
40
40
 
41
- region: Optional[str] = None
41
+ region: str
42
42
  """Region name"""
43
43
 
44
- region_id: Optional[int] = None
44
+ region_id: int
45
45
  """Region ID"""
46
46
 
47
47
  tags: Optional[List[str]] = None
@@ -54,19 +54,10 @@ class LoadBalancerL7Rule(BaseModel):
54
54
  the resource is not locked.
55
55
  """
56
56
 
57
- type: Optional[
58
- Literal[
59
- "COOKIE",
60
- "FILE_TYPE",
61
- "HEADER",
62
- "HOST_NAME",
63
- "PATH",
64
- "SSL_CONN_HAS_CERT",
65
- "SSL_DN_FIELD",
66
- "SSL_VERIFY_RESULT",
67
- ]
68
- ] = None
57
+ type: Literal[
58
+ "COOKIE", "FILE_TYPE", "HEADER", "HOST_NAME", "PATH", "SSL_CONN_HAS_CERT", "SSL_DN_FIELD", "SSL_VERIFY_RESULT"
59
+ ]
69
60
  """The L7 rule type"""
70
61
 
71
- value: Optional[str] = None
62
+ value: str
72
63
  """The value to use for the comparison. For example, the file type to compare."""
@@ -1,6 +1,6 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- from typing import List, Optional
3
+ from typing import List
4
4
 
5
5
  from ..._models import BaseModel
6
6
  from .load_balancer_l7_rule import LoadBalancerL7Rule
@@ -9,8 +9,8 @@ __all__ = ["LoadBalancerL7RuleList"]
9
9
 
10
10
 
11
11
  class LoadBalancerL7RuleList(BaseModel):
12
- count: Optional[int] = None
12
+ count: int
13
13
  """Number of objects"""
14
14
 
15
- results: Optional[List[LoadBalancerL7Rule]] = None
15
+ results: List[LoadBalancerL7Rule]
16
16
  """Objects"""
@@ -1,6 +1,6 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- from typing import List, Optional
3
+ from typing import Dict, List, Optional
4
4
 
5
5
  from ..._models import BaseModel
6
6
  from .provisioning_status import ProvisioningStatus
@@ -32,7 +32,7 @@ class LoadBalancerListenerDetail(BaseModel):
32
32
  creator_task_id: Optional[str] = None
33
33
  """Task that created this entity"""
34
34
 
35
- insert_headers: object
35
+ insert_headers: Dict[str, object]
36
36
  """Dictionary of additional header insertion into HTTP headers.
37
37
 
38
38
  Only used with HTTP and `TERMINATED_HTTPS` protocols.
@@ -41,15 +41,20 @@ class LoadBalancerUpdateParams(TypedDict, total=False):
41
41
  - **Add/update tags:**
42
42
  `{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
43
43
  updates existing ones.
44
- - **Delete tags:** `{'tags': {'`old_tag`': null}}` removes specific tags.
44
+
45
+ - **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
46
+
45
47
  - **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
46
48
  tags are preserved).
49
+
47
50
  - **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
48
51
  specified tags.
52
+
49
53
  - **Mixed operations:**
50
- `{'tags': {'environment': 'production', '`cost_center`': 'engineering', '`deprecated_tag`': null}}`
54
+ `{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
51
55
  adds/updates 'environment' and '`cost_center`' while removing
52
56
  '`deprecated_tag`', preserving other existing tags.
57
+
53
58
  - **Replace all:** first delete existing tags with null values, then add new
54
59
  ones in the same request.
55
60
  """
@@ -10,6 +10,7 @@ from .pool_update_params import PoolUpdateParams as PoolUpdateParams
10
10
  from .listener_get_params import ListenerGetParams as ListenerGetParams
11
11
  from .listener_list_params import ListenerListParams as ListenerListParams
12
12
  from .listener_create_params import ListenerCreateParams as ListenerCreateParams
13
+ from .listener_delete_params import ListenerDeleteParams as ListenerDeleteParams
13
14
  from .listener_update_params import ListenerUpdateParams as ListenerUpdateParams
14
15
  from .l7_policy_create_params import L7PolicyCreateParams as L7PolicyCreateParams
15
16
  from .l7_policy_replace_params import L7PolicyReplaceParams as L7PolicyReplaceParams
@@ -11,8 +11,10 @@ __all__ = ["RuleCreateParams"]
11
11
 
12
12
  class RuleCreateParams(TypedDict, total=False):
13
13
  project_id: int
14
+ """Project ID"""
14
15
 
15
16
  region_id: int
17
+ """Region ID"""
16
18
 
17
19
  compare_type: Required[Literal["CONTAINS", "ENDS_WITH", "EQUAL_TO", "REGEX", "STARTS_WITH"]]
18
20
  """The comparison type for the L7 rule"""
@@ -32,20 +34,13 @@ class RuleCreateParams(TypedDict, total=False):
32
34
  """The L7 rule type"""
33
35
 
34
36
  value: Required[str]
35
- """The value to use for the comparison. For example, the file type to compare"""
37
+ """The value to use for the comparison"""
36
38
 
37
39
  invert: bool
38
- """When true the logic of the rule is inverted.
39
-
40
- For example, with invert true, 'equal to' would become 'not equal to'. Default
41
- is false.
42
- """
40
+ """When true the logic of the rule is inverted."""
43
41
 
44
42
  key: str
45
- """The key to use for the comparison.
46
-
47
- For example, the name of the cookie to evaluate.
48
- """
43
+ """The key to use for the comparison."""
49
44
 
50
45
  tags: SequenceNotStr[str]
51
46
  """A list of simple strings assigned to the l7 rule"""
@@ -11,26 +11,22 @@ __all__ = ["RuleReplaceParams"]
11
11
 
12
12
  class RuleReplaceParams(TypedDict, total=False):
13
13
  project_id: int
14
+ """Project ID"""
14
15
 
15
16
  region_id: int
17
+ """Region ID"""
16
18
 
17
19
  l7policy_id: Required[str]
20
+ """L7 policy ID"""
18
21
 
19
- compare_type: Literal["CONTAINS", "ENDS_WITH", "EQUAL_TO", "REGEX", "STARTS_WITH"]
22
+ compare_type: Required[Literal["CONTAINS", "ENDS_WITH", "EQUAL_TO", "REGEX", "STARTS_WITH"]]
20
23
  """The comparison type for the L7 rule"""
21
24
 
22
25
  invert: bool
23
- """When true the logic of the rule is inverted.
24
-
25
- For example, with invert true, 'equal to' would become 'not equal to'. Default
26
- is false.
27
- """
26
+ """When true the logic of the rule is inverted."""
28
27
 
29
28
  key: str
30
- """The key to use for the comparison.
31
-
32
- For example, the name of the cookie to evaluate.
33
- """
29
+ """The key to use for the comparison."""
34
30
 
35
31
  tags: SequenceNotStr[str]
36
32
  """A list of simple strings assigned to the l7 rule"""
@@ -41,4 +37,4 @@ class RuleReplaceParams(TypedDict, total=False):
41
37
  """The L7 rule type"""
42
38
 
43
39
  value: str
44
- """The value to use for the comparison. For example, the file type to compare"""
40
+ """The value to use for the comparison"""
@@ -2,54 +2,138 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing_extensions import Literal, Required, TypedDict
5
+ from typing import Union
6
+ from typing_extensions import Literal, Required, TypeAlias, TypedDict
6
7
 
7
8
  from ...._types import SequenceNotStr
8
9
 
9
- __all__ = ["L7PolicyCreateParams"]
10
+ __all__ = [
11
+ "L7PolicyCreateParams",
12
+ "CreateL7PolicyRedirectToURLSerializer",
13
+ "CreateL7PolicyRedirectPrefixSerializer",
14
+ "CreateL7PolicyRedirectToPoolSerializer",
15
+ "CreateL7PolicyRejectSerializer",
16
+ ]
10
17
 
11
18
 
12
- class L7PolicyCreateParams(TypedDict, total=False):
19
+ class CreateL7PolicyRedirectToURLSerializer(TypedDict, total=False):
13
20
  project_id: int
21
+ """Project ID"""
14
22
 
15
23
  region_id: int
24
+ """Region ID"""
16
25
 
17
- action: Required[Literal["REDIRECT_PREFIX", "REDIRECT_TO_POOL", "REDIRECT_TO_URL", "REJECT"]]
26
+ action: Required[Literal["REDIRECT_TO_URL"]]
18
27
  """Action"""
19
28
 
20
29
  listener_id: Required[str]
21
30
  """Listener ID"""
22
31
 
32
+ redirect_url: Required[str]
33
+ """Requests matching this policy will be redirected to this URL."""
34
+
23
35
  name: str
24
36
  """Human-readable name of the policy"""
25
37
 
26
38
  position: int
27
- """The position of this policy on the listener. Positions start at 1."""
39
+ """The position of this policy on the listener"""
28
40
 
29
41
  redirect_http_code: int
30
42
  """
31
43
  Requests matching this policy will be redirected to the specified URL or Prefix
32
- URL with the HTTP response code. Valid if action is `REDIRECT_TO_URL` or
33
- `REDIRECT_PREFIX`. Valid options are 301, 302, 303, 307, or 308. Default is 302.
44
+ URL with the HTTP response code. Valid options are 301, 302, 303, 307, or 308.
45
+ Default is 302.
34
46
  """
35
47
 
36
- redirect_pool_id: str
37
- """Requests matching this policy will be redirected to the pool withthis ID.
48
+ tags: SequenceNotStr[str]
49
+ """A list of simple strings assigned to the resource."""
38
50
 
39
- Only valid if action is `REDIRECT_TO_POOL`.
40
- """
41
51
 
42
- redirect_prefix: str
43
- """Requests matching this policy will be redirected to this Prefix URL.
52
+ class CreateL7PolicyRedirectPrefixSerializer(TypedDict, total=False):
53
+ project_id: int
54
+ """Project ID"""
44
55
 
45
- Only valid if action is `REDIRECT_PREFIX`.
46
- """
56
+ region_id: int
57
+ """Region ID"""
58
+
59
+ action: Required[Literal["REDIRECT_PREFIX"]]
60
+ """Action"""
61
+
62
+ listener_id: Required[str]
63
+ """Listener ID"""
64
+
65
+ redirect_prefix: Required[str]
66
+ """Requests matching this policy will be redirected to this Prefix URL."""
67
+
68
+ name: str
69
+ """Human-readable name of the policy"""
47
70
 
48
- redirect_url: str
49
- """Requests matching this policy will be redirected to this URL.
71
+ position: int
72
+ """The position of this policy on the listener"""
50
73
 
51
- Only valid if action is `REDIRECT_TO_URL`.
74
+ redirect_http_code: int
75
+ """
76
+ Requests matching this policy will be redirected to the specified URL or Prefix
77
+ URL with the HTTP response code. Valid options are 301, 302, 303, 307, or 308.
78
+ Default is 302.
52
79
  """
53
80
 
54
81
  tags: SequenceNotStr[str]
55
82
  """A list of simple strings assigned to the resource."""
83
+
84
+
85
+ class CreateL7PolicyRedirectToPoolSerializer(TypedDict, total=False):
86
+ project_id: int
87
+ """Project ID"""
88
+
89
+ region_id: int
90
+ """Region ID"""
91
+
92
+ action: Required[Literal["REDIRECT_TO_POOL"]]
93
+ """Action"""
94
+
95
+ listener_id: Required[str]
96
+ """Listener ID"""
97
+
98
+ redirect_pool_id: Required[str]
99
+ """Requests matching this policy will be redirected to the pool with this ID."""
100
+
101
+ name: str
102
+ """Human-readable name of the policy"""
103
+
104
+ position: int
105
+ """The position of this policy on the listener"""
106
+
107
+ tags: SequenceNotStr[str]
108
+ """A list of simple strings assigned to the resource."""
109
+
110
+
111
+ class CreateL7PolicyRejectSerializer(TypedDict, total=False):
112
+ project_id: int
113
+ """Project ID"""
114
+
115
+ region_id: int
116
+ """Region ID"""
117
+
118
+ action: Required[Literal["REJECT"]]
119
+ """Action"""
120
+
121
+ listener_id: Required[str]
122
+ """Listener ID"""
123
+
124
+ name: str
125
+ """Human-readable name of the policy"""
126
+
127
+ position: int
128
+ """The position of this policy on the listener"""
129
+
130
+ tags: SequenceNotStr[str]
131
+ """A list of simple strings assigned to the resource."""
132
+
133
+
134
+ L7PolicyCreateParams: TypeAlias = Union[
135
+ CreateL7PolicyRedirectToURLSerializer,
136
+ CreateL7PolicyRedirectPrefixSerializer,
137
+ CreateL7PolicyRedirectToPoolSerializer,
138
+ CreateL7PolicyRejectSerializer,
139
+ ]
@@ -2,26 +2,41 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing_extensions import Literal, Required, TypedDict
5
+ from typing import Union
6
+ from typing_extensions import Literal, Required, TypeAlias, TypedDict
6
7
 
7
8
  from ...._types import SequenceNotStr
8
9
 
9
- __all__ = ["L7PolicyReplaceParams"]
10
+ __all__ = [
11
+ "L7PolicyReplaceParams",
12
+ "UpdateL7PolicyRedirectToURLSerializer",
13
+ "UpdateL7PolicyRedirectPrefixSerializer",
14
+ "UpdateL7PolicyRedirectToPoolSerializer",
15
+ "UpdateL7PolicyRejectSerializer",
16
+ ]
10
17
 
11
18
 
12
- class L7PolicyReplaceParams(TypedDict, total=False):
19
+ class UpdateL7PolicyRedirectToURLSerializer(TypedDict, total=False):
13
20
  project_id: int
21
+ """Project ID"""
14
22
 
15
23
  region_id: int
24
+ """Region ID"""
16
25
 
17
- action: Required[Literal["REDIRECT_PREFIX", "REDIRECT_TO_POOL", "REDIRECT_TO_URL", "REJECT"]]
26
+ action: Required[Literal["REDIRECT_TO_URL"]]
18
27
  """Action"""
19
28
 
29
+ redirect_url: Required[str]
30
+ """Requests matching this policy will be redirected to this URL.
31
+
32
+ Only valid if action is `REDIRECT_TO_URL`.
33
+ """
34
+
20
35
  name: str
21
36
  """Human-readable name of the policy"""
22
37
 
23
38
  position: int
24
- """The position of this policy on the listener. Positions start at 1."""
39
+ """The position of this policy on the listener"""
25
40
 
26
41
  redirect_http_code: int
27
42
  """
@@ -30,23 +45,86 @@ class L7PolicyReplaceParams(TypedDict, total=False):
30
45
  `REDIRECT_PREFIX`. Valid options are 301, 302, 303, 307, or 308. Default is 302.
31
46
  """
32
47
 
33
- redirect_pool_id: str
34
- """Requests matching this policy will be redirected to the pool with this ID.
48
+ tags: SequenceNotStr[str]
49
+ """A list of simple strings assigned to the resource."""
35
50
 
36
- Only valid if action is `REDIRECT_TO_POOL`.
37
- """
38
51
 
39
- redirect_prefix: str
40
- """Requests matching this policy will be redirected to this Prefix URL.
52
+ class UpdateL7PolicyRedirectPrefixSerializer(TypedDict, total=False):
53
+ project_id: int
54
+ """Project ID"""
41
55
 
42
- Only valid if action is `REDIRECT_PREFIX`.
43
- """
56
+ region_id: int
57
+ """Region ID"""
44
58
 
45
- redirect_url: str
46
- """Requests matching this policy will be redirected to this URL.
59
+ action: Required[Literal["REDIRECT_PREFIX"]]
60
+ """Action"""
47
61
 
48
- Only valid if action is `REDIRECT_TO_URL`.
62
+ redirect_prefix: Required[str]
63
+ """Requests matching this policy will be redirected to this Prefix URL."""
64
+
65
+ name: str
66
+ """Human-readable name of the policy"""
67
+
68
+ position: int
69
+ """The position of this policy on the listener"""
70
+
71
+ redirect_http_code: int
49
72
  """
73
+ Requests matching this policy will be redirected to the specified URL or Prefix
74
+ URL with the HTTP response code. Valid options are 301, 302, 303, 307, or 308.
75
+ Default is 302.
76
+ """
77
+
78
+ tags: SequenceNotStr[str]
79
+ """A list of simple strings assigned to the resource."""
80
+
81
+
82
+ class UpdateL7PolicyRedirectToPoolSerializer(TypedDict, total=False):
83
+ project_id: int
84
+ """Project ID"""
85
+
86
+ region_id: int
87
+ """Region ID"""
88
+
89
+ action: Required[Literal["REDIRECT_TO_POOL"]]
90
+ """Action"""
91
+
92
+ redirect_pool_id: Required[str]
93
+ """Requests matching this policy will be redirected to the pool with this ID."""
94
+
95
+ name: str
96
+ """Human-readable name of the policy"""
97
+
98
+ position: int
99
+ """The position of this policy on the listener"""
100
+
101
+ tags: SequenceNotStr[str]
102
+ """A list of simple strings assigned to the resource."""
103
+
104
+
105
+ class UpdateL7PolicyRejectSerializer(TypedDict, total=False):
106
+ project_id: int
107
+ """Project ID"""
108
+
109
+ region_id: int
110
+ """Region ID"""
111
+
112
+ action: Required[Literal["REJECT"]]
113
+ """Action"""
114
+
115
+ name: str
116
+ """Human-readable name of the policy"""
117
+
118
+ position: int
119
+ """The position of this policy on the listener"""
50
120
 
51
121
  tags: SequenceNotStr[str]
52
122
  """A list of simple strings assigned to the resource."""
123
+
124
+
125
+ L7PolicyReplaceParams: TypeAlias = Union[
126
+ UpdateL7PolicyRedirectToURLSerializer,
127
+ UpdateL7PolicyRedirectPrefixSerializer,
128
+ UpdateL7PolicyRedirectToPoolSerializer,
129
+ UpdateL7PolicyRejectSerializer,
130
+ ]
@@ -34,7 +34,10 @@ class ListenerCreateParams(TypedDict, total=False):
34
34
  """Network CIDRs from which service will be accessible"""
35
35
 
36
36
  connection_limit: int
37
- """Limit of the simultaneous connections"""
37
+ """Limit of the simultaneous connections.
38
+
39
+ If -1 is provided, it is translated to the default value 100000.
40
+ """
38
41
 
39
42
  insert_x_forwarded: bool
40
43
  """Add headers X-Forwarded-For, X-Forwarded-Port, X-Forwarded-Proto to requests.
@@ -0,0 +1,18 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ __all__ = ["ListenerDeleteParams"]
8
+
9
+
10
+ class ListenerDeleteParams(TypedDict, total=False):
11
+ project_id: int
12
+ """Project ID"""
13
+
14
+ region_id: int
15
+ """Region ID"""
16
+
17
+ delete_default_pool: bool
18
+ """Delete default pool attached directly to the listener."""
@@ -21,7 +21,10 @@ class ListenerUpdateParams(TypedDict, total=False):
21
21
  """Network CIDRs from which service will be accessible"""
22
22
 
23
23
  connection_limit: int
24
- """Limit of simultaneous connections"""
24
+ """Limit of simultaneous connections.
25
+
26
+ If -1 is provided, it is translated to the default value 100000.
27
+ """
25
28
 
26
29
  name: str
27
30
  """Load balancer listener name"""