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
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import List, Iterable, Optional
|
|
6
|
+
from typing_extensions import Literal, Required, TypedDict
|
|
7
|
+
|
|
8
|
+
from ....._types import SequenceNotStr
|
|
9
|
+
|
|
10
|
+
__all__ = [
|
|
11
|
+
"ClusterUpdateParams",
|
|
12
|
+
"Database",
|
|
13
|
+
"Flavor",
|
|
14
|
+
"HighAvailability",
|
|
15
|
+
"Network",
|
|
16
|
+
"PgServerConfiguration",
|
|
17
|
+
"PgServerConfigurationPooler",
|
|
18
|
+
"Storage",
|
|
19
|
+
"User",
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class ClusterUpdateParams(TypedDict, total=False):
|
|
24
|
+
project_id: int
|
|
25
|
+
|
|
26
|
+
region_id: int
|
|
27
|
+
|
|
28
|
+
databases: Iterable[Database]
|
|
29
|
+
|
|
30
|
+
flavor: Optional[Flavor]
|
|
31
|
+
"""New instance RAM and CPU"""
|
|
32
|
+
|
|
33
|
+
high_availability: Optional[HighAvailability]
|
|
34
|
+
"""New High Availability settings"""
|
|
35
|
+
|
|
36
|
+
network: Optional[Network]
|
|
37
|
+
|
|
38
|
+
pg_server_configuration: Optional[PgServerConfiguration]
|
|
39
|
+
"""New PosgtreSQL cluster configuration"""
|
|
40
|
+
|
|
41
|
+
storage: Optional[Storage]
|
|
42
|
+
"""New storage configuration"""
|
|
43
|
+
|
|
44
|
+
users: Iterable[User]
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class Database(TypedDict, total=False):
|
|
48
|
+
name: Required[str]
|
|
49
|
+
"""Database name"""
|
|
50
|
+
|
|
51
|
+
owner: Required[str]
|
|
52
|
+
"""Database owner from users list"""
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class Flavor(TypedDict, total=False):
|
|
56
|
+
cpu: Required[int]
|
|
57
|
+
"""Maximum available cores for instance"""
|
|
58
|
+
|
|
59
|
+
memory_gib: Required[int]
|
|
60
|
+
"""Maximum available RAM for instance"""
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class HighAvailability(TypedDict, total=False):
|
|
64
|
+
replication_mode: Required[Literal["async", "sync"]]
|
|
65
|
+
"""Type of replication"""
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class Network(TypedDict, total=False):
|
|
69
|
+
acl: Required[SequenceNotStr[str]]
|
|
70
|
+
"""Allowed IPs and subnets for incoming traffic"""
|
|
71
|
+
|
|
72
|
+
network_type: Required[Literal["public"]]
|
|
73
|
+
"""Network Type"""
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
class PgServerConfigurationPooler(TypedDict, total=False):
|
|
77
|
+
mode: Required[Literal["session", "statement", "transaction"]]
|
|
78
|
+
|
|
79
|
+
type: Literal["pgbouncer"]
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
class PgServerConfiguration(TypedDict, total=False):
|
|
83
|
+
pg_conf: Optional[str]
|
|
84
|
+
"""New pg.conf file settings"""
|
|
85
|
+
|
|
86
|
+
pooler: Optional[PgServerConfigurationPooler]
|
|
87
|
+
|
|
88
|
+
version: Optional[str]
|
|
89
|
+
"""New cluster version"""
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
class Storage(TypedDict, total=False):
|
|
93
|
+
size_gib: Required[int]
|
|
94
|
+
"""Total available storage for database"""
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
class User(TypedDict, total=False):
|
|
98
|
+
name: Required[str]
|
|
99
|
+
"""User name"""
|
|
100
|
+
|
|
101
|
+
role_attributes: Required[List[Literal["BYPASSRLS", "CREATEDB", "CREATEROLE", "INHERIT", "LOGIN", "NOLOGIN"]]]
|
|
102
|
+
"""User's attributes"""
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from ......_models import BaseModel
|
|
4
|
+
|
|
5
|
+
__all__ = ["PostgresUserCredentials"]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class PostgresUserCredentials(BaseModel):
|
|
9
|
+
password: str
|
|
10
|
+
"""Password"""
|
|
11
|
+
|
|
12
|
+
username: str
|
|
13
|
+
"""Username"""
|
|
@@ -0,0 +1,19 @@
|
|
|
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 Required, TypedDict
|
|
6
|
+
|
|
7
|
+
__all__ = ["CustomConfigurationValidateParams"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class CustomConfigurationValidateParams(TypedDict, total=False):
|
|
11
|
+
project_id: int
|
|
12
|
+
|
|
13
|
+
region_id: int
|
|
14
|
+
|
|
15
|
+
pg_conf: Required[str]
|
|
16
|
+
"""PostgreSQL configuration"""
|
|
17
|
+
|
|
18
|
+
version: Required[str]
|
|
19
|
+
"""PostgreSQL version"""
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
|
|
5
|
+
from ....._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["PgConfValidation"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class PgConfValidation(BaseModel):
|
|
11
|
+
errors: List[str]
|
|
12
|
+
"""Errors list"""
|
|
13
|
+
|
|
14
|
+
is_valid: bool
|
|
15
|
+
"""Validity of pg.conf file"""
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from ....._models import BaseModel
|
|
8
|
+
|
|
9
|
+
__all__ = [
|
|
10
|
+
"PostgresCluster",
|
|
11
|
+
"Database",
|
|
12
|
+
"Flavor",
|
|
13
|
+
"HighAvailability",
|
|
14
|
+
"Network",
|
|
15
|
+
"PgServerConfiguration",
|
|
16
|
+
"PgServerConfigurationPooler",
|
|
17
|
+
"Storage",
|
|
18
|
+
"User",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class Database(BaseModel):
|
|
23
|
+
name: str
|
|
24
|
+
"""Database name"""
|
|
25
|
+
|
|
26
|
+
owner: str
|
|
27
|
+
"""Database owner from users list"""
|
|
28
|
+
|
|
29
|
+
size: int
|
|
30
|
+
"""Size in bytes"""
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class Flavor(BaseModel):
|
|
34
|
+
cpu: int
|
|
35
|
+
"""Maximum available cores for instance"""
|
|
36
|
+
|
|
37
|
+
memory_gib: int
|
|
38
|
+
"""Maximum available RAM for instance"""
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class HighAvailability(BaseModel):
|
|
42
|
+
replication_mode: Literal["async", "sync"]
|
|
43
|
+
"""Type of replication"""
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class Network(BaseModel):
|
|
47
|
+
acl: List[str]
|
|
48
|
+
"""Allowed IPs and subnets for incoming traffic"""
|
|
49
|
+
|
|
50
|
+
connection_string: str
|
|
51
|
+
"""Connection string to main database"""
|
|
52
|
+
|
|
53
|
+
host: str
|
|
54
|
+
"""database hostname"""
|
|
55
|
+
|
|
56
|
+
network_type: Literal["public"]
|
|
57
|
+
"""Network Type"""
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
class PgServerConfigurationPooler(BaseModel):
|
|
61
|
+
mode: Literal["session", "statement", "transaction"]
|
|
62
|
+
|
|
63
|
+
type: Optional[Literal["pgbouncer"]] = None
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
class PgServerConfiguration(BaseModel):
|
|
67
|
+
pg_conf: str
|
|
68
|
+
"""pg.conf settings"""
|
|
69
|
+
|
|
70
|
+
version: str
|
|
71
|
+
"""Cluster version"""
|
|
72
|
+
|
|
73
|
+
pooler: Optional[PgServerConfigurationPooler] = None
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
class Storage(BaseModel):
|
|
77
|
+
size_gib: int
|
|
78
|
+
"""Total available storage for database"""
|
|
79
|
+
|
|
80
|
+
type: str
|
|
81
|
+
"""Storage type"""
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
class User(BaseModel):
|
|
85
|
+
is_secret_revealed: bool
|
|
86
|
+
"""Display was secret revealed or not"""
|
|
87
|
+
|
|
88
|
+
name: str
|
|
89
|
+
"""User name"""
|
|
90
|
+
|
|
91
|
+
role_attributes: List[Literal["BYPASSRLS", "CREATEDB", "CREATEROLE", "INHERIT", "LOGIN", "NOLOGIN"]]
|
|
92
|
+
"""User's attributes"""
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
class PostgresCluster(BaseModel):
|
|
96
|
+
cluster_name: str
|
|
97
|
+
|
|
98
|
+
created_at: datetime
|
|
99
|
+
|
|
100
|
+
databases: List[Database]
|
|
101
|
+
|
|
102
|
+
flavor: Flavor
|
|
103
|
+
"""Instance RAM and CPU"""
|
|
104
|
+
|
|
105
|
+
high_availability: Optional[HighAvailability] = None
|
|
106
|
+
|
|
107
|
+
network: Network
|
|
108
|
+
|
|
109
|
+
pg_server_configuration: PgServerConfiguration
|
|
110
|
+
"""Main PG configuration"""
|
|
111
|
+
|
|
112
|
+
status: Literal["DELETING", "FAILED", "PREPARING", "READY", "UNHEALTHY", "UNKNOWN", "UPDATING"]
|
|
113
|
+
"""Current cluster status"""
|
|
114
|
+
|
|
115
|
+
storage: Storage
|
|
116
|
+
"""PG's storage configuration"""
|
|
117
|
+
|
|
118
|
+
users: List[User]
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
from ....._models import BaseModel
|
|
7
|
+
|
|
8
|
+
__all__ = ["PostgresClusterShort"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class PostgresClusterShort(BaseModel):
|
|
12
|
+
cluster_name: str
|
|
13
|
+
"""PostgreSQL cluster name"""
|
|
14
|
+
|
|
15
|
+
created_at: datetime
|
|
16
|
+
"""Creation timestamp"""
|
|
17
|
+
|
|
18
|
+
status: Literal["DELETING", "FAILED", "PREPARING", "READY", "UNHEALTHY", "UNKNOWN", "UPDATING"]
|
|
19
|
+
"""Current cluster status"""
|
|
20
|
+
|
|
21
|
+
version: str
|
|
22
|
+
"""Cluster version"""
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List
|
|
4
|
+
|
|
5
|
+
from ....._models import BaseModel
|
|
6
|
+
|
|
7
|
+
__all__ = ["PostgresConfiguration", "Flavor", "StorageClass"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Flavor(BaseModel):
|
|
11
|
+
cpu: int
|
|
12
|
+
"""Maximum available cores for instance"""
|
|
13
|
+
|
|
14
|
+
memory_gib: int
|
|
15
|
+
"""Maximum available RAM for instance"""
|
|
16
|
+
|
|
17
|
+
pg_conf: str
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class StorageClass(BaseModel):
|
|
21
|
+
name: str
|
|
22
|
+
"""Storage type"""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class PostgresConfiguration(BaseModel):
|
|
26
|
+
flavors: List[Flavor]
|
|
27
|
+
|
|
28
|
+
storage_classes: List[StorageClass]
|
|
29
|
+
|
|
30
|
+
versions: List[str]
|
|
31
|
+
"""Available versions"""
|
|
@@ -41,10 +41,10 @@ class CreateStandardFileShareSerializer(TypedDict, total=False):
|
|
|
41
41
|
"""Key-value tags to associate with the resource.
|
|
42
42
|
|
|
43
43
|
A tag is a key-value pair that can be associated with a resource, enabling
|
|
44
|
-
efficient filtering and grouping for better organization and management.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
values.
|
|
44
|
+
efficient filtering and grouping for better organization and management. Both
|
|
45
|
+
tag keys and values have a maximum length of 255 characters. Some tags are
|
|
46
|
+
read-only and cannot be modified by the user. Tags are also integrated with cost
|
|
47
|
+
reports, allowing cost data to be filtered based on tag keys or values.
|
|
48
48
|
"""
|
|
49
49
|
|
|
50
50
|
type_name: Literal["standard"]
|
|
@@ -96,10 +96,10 @@ class CreateVastFileShareSerializer(TypedDict, total=False):
|
|
|
96
96
|
"""Key-value tags to associate with the resource.
|
|
97
97
|
|
|
98
98
|
A tag is a key-value pair that can be associated with a resource, enabling
|
|
99
|
-
efficient filtering and grouping for better organization and management.
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
values.
|
|
99
|
+
efficient filtering and grouping for better organization and management. Both
|
|
100
|
+
tag keys and values have a maximum length of 255 characters. Some tags are
|
|
101
|
+
read-only and cannot be modified by the user. Tags are also integrated with cost
|
|
102
|
+
reports, allowing cost data to be filtered based on tag keys or values.
|
|
103
103
|
"""
|
|
104
104
|
|
|
105
105
|
type_name: Literal["vast"]
|
|
@@ -35,15 +35,20 @@ class FileShareUpdateParams(TypedDict, total=False):
|
|
|
35
35
|
- **Add/update tags:**
|
|
36
36
|
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
|
|
37
37
|
updates existing ones.
|
|
38
|
-
|
|
38
|
+
|
|
39
|
+
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
|
|
40
|
+
|
|
39
41
|
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
|
|
40
42
|
tags are preserved).
|
|
43
|
+
|
|
41
44
|
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
|
|
42
45
|
specified tags.
|
|
46
|
+
|
|
43
47
|
- **Mixed operations:**
|
|
44
|
-
`{'tags': {'environment': 'production', '
|
|
48
|
+
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
|
|
45
49
|
adds/updates 'environment' and '`cost_center`' while removing
|
|
46
50
|
'`deprecated_tag`', preserving other existing tags.
|
|
51
|
+
|
|
47
52
|
- **Replace all:** first delete existing tags with null values, then add new
|
|
48
53
|
ones in the same request.
|
|
49
54
|
"""
|
gcore/types/cloud/floating_ip.py
CHANGED
|
@@ -45,7 +45,11 @@ class FloatingIP(BaseModel):
|
|
|
45
45
|
"""Router ID"""
|
|
46
46
|
|
|
47
47
|
status: Optional[FloatingIPStatus] = None
|
|
48
|
-
"""Floating IP status
|
|
48
|
+
"""Floating IP status.
|
|
49
|
+
|
|
50
|
+
DOWN - unassigned (available). ACTIVE - attached to a port (in use). ERROR -
|
|
51
|
+
error state.
|
|
52
|
+
"""
|
|
49
53
|
|
|
50
54
|
tags: List[Tag]
|
|
51
55
|
"""List of key-value tags associated with the resource.
|
|
@@ -31,8 +31,8 @@ class FloatingIPCreateParams(TypedDict, total=False):
|
|
|
31
31
|
"""Key-value tags to associate with the resource.
|
|
32
32
|
|
|
33
33
|
A tag is a key-value pair that can be associated with a resource, enabling
|
|
34
|
-
efficient filtering and grouping for better organization and management.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
values.
|
|
34
|
+
efficient filtering and grouping for better organization and management. Both
|
|
35
|
+
tag keys and values have a maximum length of 255 characters. Some tags are
|
|
36
|
+
read-only and cannot be modified by the user. Tags are also integrated with cost
|
|
37
|
+
reports, allowing cost data to be filtered based on tag keys or values.
|
|
38
38
|
"""
|
|
@@ -190,7 +190,11 @@ class FloatingIPDetailed(BaseModel):
|
|
|
190
190
|
"""Router ID"""
|
|
191
191
|
|
|
192
192
|
status: Optional[FloatingIPStatus] = None
|
|
193
|
-
"""Floating IP status
|
|
193
|
+
"""Floating IP status.
|
|
194
|
+
|
|
195
|
+
DOWN - unassigned (available). ACTIVE - attached to a port (in use). ERROR -
|
|
196
|
+
error state.
|
|
197
|
+
"""
|
|
194
198
|
|
|
195
199
|
tags: List[Tag]
|
|
196
200
|
"""List of key-value tags associated with the resource.
|
|
@@ -5,6 +5,7 @@ from __future__ import annotations
|
|
|
5
5
|
from typing_extensions import TypedDict
|
|
6
6
|
|
|
7
7
|
from ..._types import SequenceNotStr
|
|
8
|
+
from .floating_ip_status import FloatingIPStatus
|
|
8
9
|
|
|
9
10
|
__all__ = ["FloatingIPListParams"]
|
|
10
11
|
|
|
@@ -25,6 +26,13 @@ class FloatingIPListParams(TypedDict, total=False):
|
|
|
25
26
|
Offset value is used to exclude the first set of records from the result
|
|
26
27
|
"""
|
|
27
28
|
|
|
29
|
+
status: FloatingIPStatus
|
|
30
|
+
"""Filter by floating IP status.
|
|
31
|
+
|
|
32
|
+
DOWN - unassigned (available). ACTIVE - attached to a port (in use). ERROR -
|
|
33
|
+
error state.
|
|
34
|
+
"""
|
|
35
|
+
|
|
28
36
|
tag_key: SequenceNotStr[str]
|
|
29
37
|
"""Optional. Filter by tag keys. ?`tag_key`=key1&`tag_key`=key2"""
|
|
30
38
|
|
|
@@ -29,15 +29,20 @@ class FloatingIPUpdateParams(TypedDict, total=False):
|
|
|
29
29
|
- **Add/update tags:**
|
|
30
30
|
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
|
|
31
31
|
updates existing ones.
|
|
32
|
-
|
|
32
|
+
|
|
33
|
+
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
|
|
34
|
+
|
|
33
35
|
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
|
|
34
36
|
tags are preserved).
|
|
37
|
+
|
|
35
38
|
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
|
|
36
39
|
specified tags.
|
|
40
|
+
|
|
37
41
|
- **Mixed operations:**
|
|
38
|
-
`{'tags': {'environment': 'production', '
|
|
42
|
+
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
|
|
39
43
|
adds/updates 'environment' and '`cost_center`' while removing
|
|
40
44
|
'`deprecated_tag`', preserving other existing tags.
|
|
45
|
+
|
|
41
46
|
- **Replace all:** first delete existing tags with null values, then add new
|
|
42
47
|
ones in the same request.
|
|
43
48
|
"""
|
|
@@ -11,6 +11,7 @@ from ..._models import BaseModel
|
|
|
11
11
|
__all__ = [
|
|
12
12
|
"GPUBaremetalCluster",
|
|
13
13
|
"ServersSettings",
|
|
14
|
+
"ServersSettingsFileShare",
|
|
14
15
|
"ServersSettingsInterface",
|
|
15
16
|
"ServersSettingsInterfaceExternalInterfaceOutputSerializer",
|
|
16
17
|
"ServersSettingsInterfaceSubnetInterfaceOutputSerializer",
|
|
@@ -21,6 +22,14 @@ __all__ = [
|
|
|
21
22
|
]
|
|
22
23
|
|
|
23
24
|
|
|
25
|
+
class ServersSettingsFileShare(BaseModel):
|
|
26
|
+
id: str
|
|
27
|
+
"""Unique identifier of the file share in UUID format."""
|
|
28
|
+
|
|
29
|
+
mount_path: str
|
|
30
|
+
"""Absolute mount path inside the system where the file share will be mounted."""
|
|
31
|
+
|
|
32
|
+
|
|
24
33
|
class ServersSettingsInterfaceExternalInterfaceOutputSerializer(BaseModel):
|
|
25
34
|
ip_family: Literal["dual", "ipv4", "ipv6"]
|
|
26
35
|
"""Which subnets should be selected: IPv4, IPv6, or use dual stack."""
|
|
@@ -85,21 +94,27 @@ ServersSettingsInterface: TypeAlias = Annotated[
|
|
|
85
94
|
|
|
86
95
|
|
|
87
96
|
class ServersSettingsSecurityGroup(BaseModel):
|
|
97
|
+
id: str
|
|
98
|
+
"""Security group ID"""
|
|
99
|
+
|
|
88
100
|
name: str
|
|
89
|
-
"""
|
|
101
|
+
"""Security group name"""
|
|
90
102
|
|
|
91
103
|
|
|
92
104
|
class ServersSettings(BaseModel):
|
|
105
|
+
file_shares: List[ServersSettingsFileShare]
|
|
106
|
+
"""List of file shares mounted across the cluster."""
|
|
107
|
+
|
|
93
108
|
interfaces: List[ServersSettingsInterface]
|
|
94
109
|
|
|
95
110
|
security_groups: List[ServersSettingsSecurityGroup]
|
|
96
|
-
"""Security groups
|
|
111
|
+
"""Security groups"""
|
|
97
112
|
|
|
98
113
|
ssh_key_name: Optional[str] = None
|
|
99
114
|
"""SSH key name"""
|
|
100
115
|
|
|
101
116
|
user_data: Optional[str] = None
|
|
102
|
-
"""Optional custom user data
|
|
117
|
+
"""Optional custom user data"""
|
|
103
118
|
|
|
104
119
|
|
|
105
120
|
class GPUBaremetalCluster(BaseModel):
|
|
@@ -32,15 +32,20 @@ class GPUBaremetalClusterActionParams(TypedDict, total=False):
|
|
|
32
32
|
- **Add/update tags:**
|
|
33
33
|
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
|
|
34
34
|
updates existing ones.
|
|
35
|
-
|
|
35
|
+
|
|
36
|
+
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
|
|
37
|
+
|
|
36
38
|
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
|
|
37
39
|
tags are preserved).
|
|
40
|
+
|
|
38
41
|
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
|
|
39
42
|
specified tags.
|
|
43
|
+
|
|
40
44
|
- **Mixed operations:**
|
|
41
|
-
`{'tags': {'environment': 'production', '
|
|
45
|
+
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
|
|
42
46
|
adds/updates 'environment' and '`cost_center`' while removing
|
|
43
47
|
'`deprecated_tag`', preserving other existing tags.
|
|
48
|
+
|
|
44
49
|
- **Replace all:** first delete existing tags with null values, then add new
|
|
45
50
|
ones in the same request.
|
|
46
51
|
"""
|
|
@@ -15,6 +15,7 @@ __all__ = [
|
|
|
15
15
|
"ServersSettingsInterfaceAnySubnetInterfaceInputSerializer",
|
|
16
16
|
"ServersSettingsInterfaceAnySubnetInterfaceInputSerializerFloatingIP",
|
|
17
17
|
"ServersSettingsCredentials",
|
|
18
|
+
"ServersSettingsFileShare",
|
|
18
19
|
"ServersSettingsSecurityGroup",
|
|
19
20
|
]
|
|
20
21
|
|
|
@@ -45,10 +46,10 @@ class GPUBaremetalClusterCreateParams(TypedDict, total=False):
|
|
|
45
46
|
"""Key-value tags to associate with the resource.
|
|
46
47
|
|
|
47
48
|
A tag is a key-value pair that can be associated with a resource, enabling
|
|
48
|
-
efficient filtering and grouping for better organization and management.
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
values.
|
|
49
|
+
efficient filtering and grouping for better organization and management. Both
|
|
50
|
+
tag keys and values have a maximum length of 255 characters. Some tags are
|
|
51
|
+
read-only and cannot be modified by the user. Tags are also integrated with cost
|
|
52
|
+
reports, allowing cost data to be filtered based on tag keys or values.
|
|
52
53
|
"""
|
|
53
54
|
|
|
54
55
|
|
|
@@ -127,6 +128,14 @@ class ServersSettingsCredentials(TypedDict, total=False):
|
|
|
127
128
|
"""The 'username' and 'password' fields create a new user on the system"""
|
|
128
129
|
|
|
129
130
|
|
|
131
|
+
class ServersSettingsFileShare(TypedDict, total=False):
|
|
132
|
+
id: Required[str]
|
|
133
|
+
"""Unique identifier of the file share in UUID format."""
|
|
134
|
+
|
|
135
|
+
mount_path: Required[str]
|
|
136
|
+
"""Absolute mount path inside the system where the file share will be mounted."""
|
|
137
|
+
|
|
138
|
+
|
|
130
139
|
class ServersSettingsSecurityGroup(TypedDict, total=False):
|
|
131
140
|
id: Required[str]
|
|
132
141
|
"""Resource ID"""
|
|
@@ -139,6 +148,9 @@ class ServersSettings(TypedDict, total=False):
|
|
|
139
148
|
credentials: ServersSettingsCredentials
|
|
140
149
|
"""Optional server access credentials"""
|
|
141
150
|
|
|
151
|
+
file_shares: Iterable[ServersSettingsFileShare]
|
|
152
|
+
"""List of file shares to be mounted across the cluster."""
|
|
153
|
+
|
|
142
154
|
security_groups: Iterable[ServersSettingsSecurityGroup]
|
|
143
155
|
"""List of security groups UUIDs"""
|
|
144
156
|
|
|
@@ -11,8 +11,11 @@ __all__ = ["GPUBaremetalClusterServer", "SecurityGroup"]
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class SecurityGroup(BaseModel):
|
|
14
|
+
id: str
|
|
15
|
+
"""Security group ID"""
|
|
16
|
+
|
|
14
17
|
name: str
|
|
15
|
-
"""
|
|
18
|
+
"""Security group name"""
|
|
16
19
|
|
|
17
20
|
|
|
18
21
|
class GPUBaremetalClusterServer(BaseModel):
|
|
@@ -35,7 +38,7 @@ class GPUBaremetalClusterServer(BaseModel):
|
|
|
35
38
|
"""Server's name generated using cluster's name"""
|
|
36
39
|
|
|
37
40
|
security_groups: List[SecurityGroup]
|
|
38
|
-
"""Security groups
|
|
41
|
+
"""Security groups"""
|
|
39
42
|
|
|
40
43
|
ssh_key_name: Optional[str] = None
|
|
41
44
|
"""SSH key pair assigned to the server"""
|
|
@@ -49,8 +49,8 @@ class ImageUploadParams(TypedDict, total=False):
|
|
|
49
49
|
"""Key-value tags to associate with the resource.
|
|
50
50
|
|
|
51
51
|
A tag is a key-value pair that can be associated with a resource, enabling
|
|
52
|
-
efficient filtering and grouping for better organization and management.
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
values.
|
|
52
|
+
efficient filtering and grouping for better organization and management. Both
|
|
53
|
+
tag keys and values have a maximum length of 255 characters. Some tags are
|
|
54
|
+
read-only and cannot be modified by the user. Tags are also integrated with cost
|
|
55
|
+
reports, allowing cost data to be filtered based on tag keys or values.
|
|
56
56
|
"""
|
gcore/types/cloud/gpu_image.py
CHANGED
|
@@ -47,6 +47,15 @@ class GPUImage(BaseModel):
|
|
|
47
47
|
architecture: Optional[str] = None
|
|
48
48
|
"""Image architecture type"""
|
|
49
49
|
|
|
50
|
+
gpu_driver: Optional[str] = None
|
|
51
|
+
"""Name of the GPU driver vendor"""
|
|
52
|
+
|
|
53
|
+
gpu_driver_type: Optional[str] = None
|
|
54
|
+
"""Type of the GPU driver"""
|
|
55
|
+
|
|
56
|
+
gpu_driver_version: Optional[str] = None
|
|
57
|
+
"""Version of the installed GPU driver"""
|
|
58
|
+
|
|
50
59
|
os_distro: Optional[str] = None
|
|
51
60
|
"""OS Distribution"""
|
|
52
61
|
|