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.
- gcore/_client.py +16 -0
- gcore/_models.py +37 -15
- gcore/_streaming.py +12 -12
- gcore/_utils/_sync.py +3 -31
- gcore/_utils/_utils.py +1 -1
- gcore/_version.py +1 -1
- gcore/resources/cdn/audit_log.py +4 -4
- gcore/resources/cdn/cdn.py +120 -21
- gcore/resources/cdn/ip_ranges.py +97 -5
- gcore/resources/cdn/{logs/logs.py → logs.py} +9 -9
- gcore/resources/cdn/resources/resources.py +20 -20
- gcore/resources/cdn/statistics.py +56 -58
- gcore/resources/cloud/__init__.py +40 -12
- gcore/resources/cloud/audit_logs.py +20 -0
- gcore/resources/cloud/baremetal/servers.py +48 -14
- gcore/resources/cloud/billing_reservations.py +2 -2
- gcore/resources/cloud/cloud.py +100 -18
- gcore/resources/cloud/databases/__init__.py +33 -0
- gcore/resources/cloud/databases/databases.py +102 -0
- gcore/resources/cloud/databases/postgres/__init__.py +61 -0
- gcore/resources/cloud/databases/postgres/clusters/__init__.py +33 -0
- gcore/resources/cloud/databases/postgres/clusters/clusters.py +716 -0
- gcore/resources/cloud/databases/postgres/clusters/user_credentials.py +281 -0
- gcore/resources/cloud/databases/postgres/configurations.py +169 -0
- gcore/resources/cloud/databases/postgres/custom_configurations.py +197 -0
- gcore/resources/cloud/databases/postgres/postgres.py +166 -0
- gcore/resources/cloud/file_shares/file_shares.py +154 -49
- gcore/resources/cloud/floating_ips.py +42 -10
- gcore/resources/cloud/gpu_baremetal_clusters/gpu_baremetal_clusters.py +70 -10
- gcore/resources/cloud/gpu_baremetal_clusters/images.py +40 -6
- gcore/resources/cloud/gpu_baremetal_clusters/servers.py +16 -0
- gcore/resources/cloud/gpu_virtual_clusters/__init__.py +89 -0
- gcore/resources/cloud/gpu_virtual_clusters/flavors.py +211 -0
- gcore/resources/cloud/gpu_virtual_clusters/gpu_virtual_clusters.py +1551 -0
- gcore/resources/cloud/gpu_virtual_clusters/images.py +582 -0
- gcore/resources/cloud/gpu_virtual_clusters/interfaces.py +187 -0
- gcore/resources/cloud/gpu_virtual_clusters/servers.py +506 -0
- gcore/resources/cloud/gpu_virtual_clusters/volumes.py +187 -0
- gcore/resources/cloud/inference/deployments/deployments.py +52 -4
- gcore/resources/cloud/instances/images.py +72 -18
- gcore/resources/cloud/instances/instances.py +110 -18
- gcore/resources/cloud/instances/interfaces.py +12 -0
- gcore/resources/cloud/k8s/__init__.py +12 -12
- gcore/resources/cloud/k8s/clusters/clusters.py +25 -25
- gcore/resources/cloud/k8s/clusters/pools/pools.py +14 -14
- gcore/resources/cloud/k8s/k8s.py +24 -24
- gcore/resources/cloud/load_balancers/l7_policies/l7_policies.py +1420 -218
- gcore/resources/cloud/load_balancers/l7_policies/rules.py +134 -22
- gcore/resources/cloud/load_balancers/listeners.py +77 -6
- gcore/resources/cloud/load_balancers/load_balancers.py +92 -14
- gcore/resources/cloud/load_balancers/pools/pools.py +52 -4
- gcore/resources/cloud/networks/networks.py +30 -10
- gcore/resources/cloud/networks/subnets.py +26 -10
- gcore/resources/cloud/placement_groups.py +8 -0
- gcore/resources/cloud/projects.py +99 -119
- gcore/resources/cloud/quotas/requests.py +0 -8
- gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py +18 -0
- gcore/resources/cloud/secrets.py +16 -0
- gcore/resources/cloud/security_groups/security_groups.py +38 -12
- gcore/resources/cloud/ssh_keys.py +10 -0
- gcore/resources/cloud/tasks.py +22 -7
- gcore/resources/cloud/volumes.py +65 -23
- gcore/resources/dns/zones/rrsets.py +10 -10
- gcore/resources/dns/zones/zones.py +2 -2
- gcore/resources/security/bgp_announces.py +0 -4
- gcore/resources/security/profiles.py +31 -7
- gcore/resources/storage/credentials.py +0 -28
- gcore/resources/storage/storage.py +2 -2
- gcore/types/cdn/__init__.py +5 -0
- gcore/types/cdn/alibaba_regions.py +22 -0
- gcore/types/cdn/audit_log_list_params.py +2 -2
- gcore/types/cdn/aws_regions.py +22 -0
- gcore/types/cdn/cdn_list_purge_statuses_response.py +10 -0
- gcore/types/cdn/cdn_resource.py +17 -12
- gcore/types/cdn/ip_range_list_ips_params.py +19 -0
- gcore/types/cdn/ip_range_list_params.py +19 -0
- gcore/types/cdn/resource_create_params.py +17 -12
- gcore/types/cdn/resource_purge_params.py +4 -4
- gcore/types/cdn/resource_replace_params.py +17 -12
- gcore/types/cdn/resource_update_params.py +17 -12
- gcore/types/cdn/resource_usage_stats.py +16 -15
- gcore/types/cdn/resources/cdn_resource_rule.py +15 -10
- gcore/types/cdn/resources/rule_create_params.py +15 -10
- gcore/types/cdn/resources/rule_replace_params.py +15 -10
- gcore/types/cdn/resources/rule_update_params.py +15 -10
- gcore/types/cdn/rule_template.py +15 -10
- gcore/types/cdn/rule_template_create_params.py +15 -10
- gcore/types/cdn/rule_template_replace_params.py +15 -10
- gcore/types/cdn/rule_template_update_params.py +15 -10
- gcore/types/cdn/statistic_get_logs_usage_aggregated_params.py +4 -1
- gcore/types/cdn/statistic_get_logs_usage_series_params.py +5 -12
- gcore/types/cdn/statistic_get_resource_usage_aggregated_params.py +10 -21
- gcore/types/cdn/statistic_get_resource_usage_series_params.py +6 -1
- gcore/types/cdn/statistic_get_shield_usage_aggregated_params.py +5 -2
- gcore/types/cdn/statistic_get_shield_usage_series_params.py +3 -0
- gcore/types/cloud/__init__.py +9 -3
- gcore/types/cloud/audit_log_entry.py +9 -3
- gcore/types/cloud/audit_log_list_params.py +12 -0
- gcore/types/cloud/baremetal/server_create_params.py +7 -7
- gcore/types/cloud/baremetal_flavor.py +0 -6
- gcore/types/cloud/billing_reservation_list_params.py +1 -1
- gcore/types/cloud/blackhole_port.py +4 -1
- gcore/types/cloud/databases/postgres/__init__.py +12 -0
- gcore/types/cloud/databases/postgres/cluster_create_params.py +108 -0
- gcore/types/cloud/databases/postgres/cluster_list_params.py +19 -0
- gcore/types/cloud/databases/postgres/cluster_update_params.py +102 -0
- gcore/types/cloud/databases/postgres/clusters/__init__.py +5 -0
- gcore/types/cloud/databases/postgres/clusters/postgres_user_credentials.py +13 -0
- gcore/types/cloud/databases/postgres/custom_configuration_validate_params.py +19 -0
- gcore/types/cloud/databases/postgres/pg_conf_validation.py +15 -0
- gcore/types/cloud/databases/postgres/postgres_cluster.py +118 -0
- gcore/types/cloud/databases/postgres/postgres_cluster_short.py +22 -0
- gcore/types/cloud/databases/postgres/postgres_configuration.py +31 -0
- gcore/types/cloud/file_share_create_params.py +8 -8
- gcore/types/cloud/file_share_update_params.py +7 -2
- gcore/types/cloud/floating_ip.py +5 -1
- gcore/types/cloud/floating_ip_create_params.py +4 -4
- gcore/types/cloud/floating_ip_detailed.py +5 -1
- gcore/types/cloud/floating_ip_list_params.py +8 -0
- gcore/types/cloud/floating_ip_update_params.py +7 -2
- gcore/types/cloud/gpu_baremetal_cluster.py +18 -3
- gcore/types/cloud/gpu_baremetal_cluster_action_params.py +7 -2
- gcore/types/cloud/gpu_baremetal_cluster_create_params.py +16 -4
- gcore/types/cloud/gpu_baremetal_clusters/gpu_baremetal_cluster_server.py +5 -2
- gcore/types/cloud/gpu_baremetal_clusters/image_upload_params.py +4 -4
- gcore/types/cloud/gpu_image.py +9 -0
- gcore/types/cloud/gpu_virtual_cluster.py +189 -0
- gcore/types/cloud/gpu_virtual_cluster_action_params.py +127 -0
- gcore/types/cloud/gpu_virtual_cluster_create_params.py +213 -0
- gcore/types/cloud/gpu_virtual_cluster_delete_params.py +41 -0
- gcore/types/cloud/gpu_virtual_cluster_list_params.py +21 -0
- gcore/types/cloud/gpu_virtual_cluster_update_params.py +18 -0
- gcore/types/cloud/gpu_virtual_clusters/__init__.py +16 -0
- gcore/types/cloud/gpu_virtual_clusters/flavor_list_params.py +21 -0
- gcore/types/cloud/gpu_virtual_clusters/gpu_virtual_cluster_server.py +77 -0
- gcore/types/cloud/gpu_virtual_clusters/gpu_virtual_cluster_server_list.py +16 -0
- gcore/types/cloud/gpu_virtual_clusters/gpu_virtual_cluster_volume.py +64 -0
- gcore/types/cloud/gpu_virtual_clusters/gpu_virtual_cluster_volume_list.py +16 -0
- gcore/types/cloud/gpu_virtual_clusters/gpu_virtual_flavor.py +155 -0
- gcore/types/cloud/gpu_virtual_clusters/gpu_virtual_flavor_list.py +16 -0
- gcore/types/cloud/gpu_virtual_clusters/gpu_virtual_interface.py +190 -0
- gcore/types/cloud/gpu_virtual_clusters/gpu_virtual_interface_list.py +16 -0
- gcore/types/cloud/gpu_virtual_clusters/image_upload_params.py +56 -0
- gcore/types/cloud/gpu_virtual_clusters/server_delete_params.py +44 -0
- gcore/types/cloud/gpu_virtual_clusters/server_list_params.py +75 -0
- gcore/types/cloud/image.py +9 -0
- gcore/types/cloud/inference/deployment_create_params.py +1 -1
- gcore/types/cloud/inference/deployment_update_params.py +1 -1
- gcore/types/cloud/inference/inference_deployment.py +1 -1
- gcore/types/cloud/instance_create_params.py +27 -27
- gcore/types/cloud/instance_update_params.py +7 -2
- gcore/types/cloud/instances/image_create_from_volume_params.py +4 -4
- gcore/types/cloud/instances/image_update_params.py +4 -4
- gcore/types/cloud/instances/image_upload_params.py +4 -4
- gcore/types/cloud/k8s/__init__.py +4 -4
- gcore/types/cloud/k8s/cluster_update_params.py +5 -5
- gcore/types/cloud/k8s/clusters/__init__.py +2 -2
- gcore/types/cloud/k8s/clusters/k8s_cluster_pool.py +2 -2
- gcore/types/cloud/k8s/clusters/k8s_cluster_pool_list.py +4 -4
- gcore/types/cloud/k8s/k8s_cluster.py +4 -4
- gcore/types/cloud/k8s/k8s_cluster_certificate.py +2 -2
- gcore/types/cloud/k8s/k8s_cluster_kubeconfig.py +14 -2
- gcore/types/cloud/k8s/k8s_cluster_list.py +4 -4
- gcore/types/cloud/k8s_cluster_version.py +2 -2
- gcore/types/cloud/k8s_cluster_version_list.py +4 -4
- gcore/types/cloud/load_balancer_create_params.py +14 -8
- gcore/types/cloud/load_balancer_flavor_detail.py +2 -2
- gcore/types/cloud/load_balancer_l7_policy.py +29 -16
- gcore/types/cloud/load_balancer_l7_policy_list.py +3 -3
- gcore/types/cloud/load_balancer_l7_rule.py +14 -23
- gcore/types/cloud/load_balancer_l7_rule_list.py +3 -3
- gcore/types/cloud/load_balancer_listener_detail.py +2 -2
- gcore/types/cloud/load_balancer_update_params.py +7 -2
- gcore/types/cloud/load_balancers/__init__.py +1 -0
- gcore/types/cloud/load_balancers/l7_policies/rule_create_params.py +5 -10
- gcore/types/cloud/load_balancers/l7_policies/rule_replace_params.py +7 -11
- gcore/types/cloud/load_balancers/l7_policy_create_params.py +102 -18
- gcore/types/cloud/load_balancers/l7_policy_replace_params.py +94 -16
- gcore/types/cloud/load_balancers/listener_create_params.py +4 -1
- gcore/types/cloud/load_balancers/listener_delete_params.py +18 -0
- gcore/types/cloud/load_balancers/listener_update_params.py +4 -1
- gcore/types/cloud/load_balancers/pool_create_params.py +1 -1
- gcore/types/cloud/network_create_params.py +4 -4
- gcore/types/cloud/network_update_params.py +7 -2
- gcore/types/cloud/networks/subnet_create_params.py +4 -4
- gcore/types/cloud/networks/subnet_update_params.py +7 -2
- gcore/types/cloud/project_create_params.py +0 -6
- gcore/types/cloud/{project_replace_params.py → project_update_params.py} +2 -2
- gcore/types/cloud/quotas/request_create_params.py +0 -3
- gcore/types/cloud/region.py +3 -3
- gcore/types/cloud/security_group.py +8 -1
- gcore/types/cloud/security_group_create_params.py +7 -5
- gcore/types/cloud/security_group_list_params.py +6 -4
- gcore/types/cloud/security_group_update_params.py +7 -2
- gcore/types/cloud/ssh_key_list_params.py +7 -0
- gcore/types/cloud/tag.py +2 -2
- gcore/types/cloud/task_id_list.py +3 -3
- gcore/types/cloud/volume_create_params.py +12 -12
- gcore/types/cloud/volume_update_params.py +7 -2
- gcore/types/dns/zone_list_params.py +1 -1
- gcore/types/iam/api_token_create.py +70 -1
- gcore/types/security/bgp_announce_list_params.py +0 -2
- gcore/types/security/client_profile.py +1 -0
- gcore/types/security/profile_create_params.py +4 -2
- gcore/types/security/profile_recreate_params.py +4 -2
- gcore/types/security/profile_replace_params.py +4 -2
- gcore/types/storage/credential_recreate_params.py +0 -17
- gcore/types/storage/storage.py +1 -1
- gcore/types/storage/storage_create_params.py +1 -1
- gcore/types/streaming/stream.py +3 -2
- gcore/types/streaming/video.py +1 -1
- gcore/types/waap/domains/custom_rule_create_params.py +1 -1
- gcore/types/waap/domains/custom_rule_update_params.py +1 -1
- gcore/types/waap/domains/waap_custom_rule.py +1 -1
- {gcore-0.16.0.dist-info → gcore-0.23.0.dist-info}/METADATA +14 -14
- {gcore-0.16.0.dist-info → gcore-0.23.0.dist-info}/RECORD +219 -168
- gcore/resources/cdn/logs/__init__.py +0 -19
- /gcore/types/{cdn/logs → cloud/databases}/__init__.py +0 -0
- {gcore-0.16.0.dist-info → gcore-0.23.0.dist-info}/WHEEL +0 -0
- {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 .
|
|
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:
|
|
28
|
+
id: str
|
|
14
29
|
"""ID"""
|
|
15
30
|
|
|
16
|
-
action:
|
|
31
|
+
action: Literal["REDIRECT_PREFIX", "REDIRECT_TO_POOL", "REDIRECT_TO_URL", "REJECT"]
|
|
17
32
|
"""Action"""
|
|
18
33
|
|
|
19
|
-
listener_id:
|
|
34
|
+
listener_id: str
|
|
20
35
|
"""Listener ID"""
|
|
21
36
|
|
|
22
|
-
name:
|
|
37
|
+
name: str
|
|
23
38
|
"""Human-readable name of the policy"""
|
|
24
39
|
|
|
25
|
-
operating_status:
|
|
40
|
+
operating_status: LoadBalancerOperatingStatus
|
|
26
41
|
"""L7 policy operating status"""
|
|
27
42
|
|
|
28
|
-
position:
|
|
43
|
+
position: int
|
|
29
44
|
"""The position of this policy on the listener. Positions start at 1."""
|
|
30
45
|
|
|
31
|
-
project_id:
|
|
46
|
+
project_id: int
|
|
32
47
|
"""Project ID"""
|
|
33
48
|
|
|
34
|
-
provisioning_status:
|
|
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:
|
|
76
|
+
region: str
|
|
64
77
|
"""Region name"""
|
|
65
78
|
|
|
66
|
-
region_id:
|
|
79
|
+
region_id: int
|
|
67
80
|
"""Region ID"""
|
|
68
81
|
|
|
69
|
-
rules:
|
|
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:
|
|
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
|
|
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:
|
|
12
|
+
count: int
|
|
13
13
|
"""Number of objects"""
|
|
14
14
|
|
|
15
|
-
results:
|
|
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:
|
|
14
|
+
id: str
|
|
13
15
|
"""L7Rule ID"""
|
|
14
16
|
|
|
15
|
-
compare_type:
|
|
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:
|
|
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:
|
|
33
|
+
operating_status: LoadBalancerOperatingStatus
|
|
32
34
|
"""L7 policy operating status"""
|
|
33
35
|
|
|
34
|
-
project_id:
|
|
36
|
+
project_id: int
|
|
35
37
|
"""Project ID"""
|
|
36
38
|
|
|
37
|
-
provisioning_status:
|
|
38
|
-
Literal["ACTIVE", "DELETED", "ERROR", "PENDING_CREATE", "PENDING_DELETE", "PENDING_UPDATE"]
|
|
39
|
-
] = None
|
|
39
|
+
provisioning_status: ProvisioningStatus
|
|
40
40
|
|
|
41
|
-
region:
|
|
41
|
+
region: str
|
|
42
42
|
"""Region name"""
|
|
43
43
|
|
|
44
|
-
region_id:
|
|
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:
|
|
58
|
-
|
|
59
|
-
|
|
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:
|
|
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
|
|
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:
|
|
12
|
+
count: int
|
|
13
13
|
"""Number of objects"""
|
|
14
14
|
|
|
15
|
-
results:
|
|
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
|
-
|
|
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', '
|
|
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
|
|
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
|
|
40
|
+
"""The value to use for the comparison"""
|
|
@@ -2,54 +2,138 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from
|
|
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__ = [
|
|
10
|
+
__all__ = [
|
|
11
|
+
"L7PolicyCreateParams",
|
|
12
|
+
"CreateL7PolicyRedirectToURLSerializer",
|
|
13
|
+
"CreateL7PolicyRedirectPrefixSerializer",
|
|
14
|
+
"CreateL7PolicyRedirectToPoolSerializer",
|
|
15
|
+
"CreateL7PolicyRejectSerializer",
|
|
16
|
+
]
|
|
10
17
|
|
|
11
18
|
|
|
12
|
-
class
|
|
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["
|
|
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
|
|
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
|
|
33
|
-
|
|
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
|
-
|
|
37
|
-
"""
|
|
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
|
-
|
|
43
|
-
|
|
52
|
+
class CreateL7PolicyRedirectPrefixSerializer(TypedDict, total=False):
|
|
53
|
+
project_id: int
|
|
54
|
+
"""Project ID"""
|
|
44
55
|
|
|
45
|
-
|
|
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
|
-
|
|
49
|
-
"""
|
|
71
|
+
position: int
|
|
72
|
+
"""The position of this policy on the listener"""
|
|
50
73
|
|
|
51
|
-
|
|
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
|
|
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__ = [
|
|
10
|
+
__all__ = [
|
|
11
|
+
"L7PolicyReplaceParams",
|
|
12
|
+
"UpdateL7PolicyRedirectToURLSerializer",
|
|
13
|
+
"UpdateL7PolicyRedirectPrefixSerializer",
|
|
14
|
+
"UpdateL7PolicyRedirectToPoolSerializer",
|
|
15
|
+
"UpdateL7PolicyRejectSerializer",
|
|
16
|
+
]
|
|
10
17
|
|
|
11
18
|
|
|
12
|
-
class
|
|
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["
|
|
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
|
|
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
|
-
|
|
34
|
-
"""
|
|
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
|
-
|
|
40
|
-
|
|
52
|
+
class UpdateL7PolicyRedirectPrefixSerializer(TypedDict, total=False):
|
|
53
|
+
project_id: int
|
|
54
|
+
"""Project ID"""
|
|
41
55
|
|
|
42
|
-
|
|
43
|
-
"""
|
|
56
|
+
region_id: int
|
|
57
|
+
"""Region ID"""
|
|
44
58
|
|
|
45
|
-
|
|
46
|
-
"""
|
|
59
|
+
action: Required[Literal["REDIRECT_PREFIX"]]
|
|
60
|
+
"""Action"""
|
|
47
61
|
|
|
48
|
-
|
|
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"""
|