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,166 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from ....._compat import cached_property
|
|
6
|
+
from ....._resource import SyncAPIResource, AsyncAPIResource
|
|
7
|
+
from .configurations import (
|
|
8
|
+
ConfigurationsResource,
|
|
9
|
+
AsyncConfigurationsResource,
|
|
10
|
+
ConfigurationsResourceWithRawResponse,
|
|
11
|
+
AsyncConfigurationsResourceWithRawResponse,
|
|
12
|
+
ConfigurationsResourceWithStreamingResponse,
|
|
13
|
+
AsyncConfigurationsResourceWithStreamingResponse,
|
|
14
|
+
)
|
|
15
|
+
from .clusters.clusters import (
|
|
16
|
+
ClustersResource,
|
|
17
|
+
AsyncClustersResource,
|
|
18
|
+
ClustersResourceWithRawResponse,
|
|
19
|
+
AsyncClustersResourceWithRawResponse,
|
|
20
|
+
ClustersResourceWithStreamingResponse,
|
|
21
|
+
AsyncClustersResourceWithStreamingResponse,
|
|
22
|
+
)
|
|
23
|
+
from .custom_configurations import (
|
|
24
|
+
CustomConfigurationsResource,
|
|
25
|
+
AsyncCustomConfigurationsResource,
|
|
26
|
+
CustomConfigurationsResourceWithRawResponse,
|
|
27
|
+
AsyncCustomConfigurationsResourceWithRawResponse,
|
|
28
|
+
CustomConfigurationsResourceWithStreamingResponse,
|
|
29
|
+
AsyncCustomConfigurationsResourceWithStreamingResponse,
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
__all__ = ["PostgresResource", "AsyncPostgresResource"]
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class PostgresResource(SyncAPIResource):
|
|
36
|
+
@cached_property
|
|
37
|
+
def clusters(self) -> ClustersResource:
|
|
38
|
+
return ClustersResource(self._client)
|
|
39
|
+
|
|
40
|
+
@cached_property
|
|
41
|
+
def configurations(self) -> ConfigurationsResource:
|
|
42
|
+
return ConfigurationsResource(self._client)
|
|
43
|
+
|
|
44
|
+
@cached_property
|
|
45
|
+
def custom_configurations(self) -> CustomConfigurationsResource:
|
|
46
|
+
return CustomConfigurationsResource(self._client)
|
|
47
|
+
|
|
48
|
+
@cached_property
|
|
49
|
+
def with_raw_response(self) -> PostgresResourceWithRawResponse:
|
|
50
|
+
"""
|
|
51
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
52
|
+
the raw response object instead of the parsed content.
|
|
53
|
+
|
|
54
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
55
|
+
"""
|
|
56
|
+
return PostgresResourceWithRawResponse(self)
|
|
57
|
+
|
|
58
|
+
@cached_property
|
|
59
|
+
def with_streaming_response(self) -> PostgresResourceWithStreamingResponse:
|
|
60
|
+
"""
|
|
61
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
62
|
+
|
|
63
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
64
|
+
"""
|
|
65
|
+
return PostgresResourceWithStreamingResponse(self)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class AsyncPostgresResource(AsyncAPIResource):
|
|
69
|
+
@cached_property
|
|
70
|
+
def clusters(self) -> AsyncClustersResource:
|
|
71
|
+
return AsyncClustersResource(self._client)
|
|
72
|
+
|
|
73
|
+
@cached_property
|
|
74
|
+
def configurations(self) -> AsyncConfigurationsResource:
|
|
75
|
+
return AsyncConfigurationsResource(self._client)
|
|
76
|
+
|
|
77
|
+
@cached_property
|
|
78
|
+
def custom_configurations(self) -> AsyncCustomConfigurationsResource:
|
|
79
|
+
return AsyncCustomConfigurationsResource(self._client)
|
|
80
|
+
|
|
81
|
+
@cached_property
|
|
82
|
+
def with_raw_response(self) -> AsyncPostgresResourceWithRawResponse:
|
|
83
|
+
"""
|
|
84
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
85
|
+
the raw response object instead of the parsed content.
|
|
86
|
+
|
|
87
|
+
For more information, see https://www.github.com/G-Core/gcore-python#accessing-raw-response-data-eg-headers
|
|
88
|
+
"""
|
|
89
|
+
return AsyncPostgresResourceWithRawResponse(self)
|
|
90
|
+
|
|
91
|
+
@cached_property
|
|
92
|
+
def with_streaming_response(self) -> AsyncPostgresResourceWithStreamingResponse:
|
|
93
|
+
"""
|
|
94
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
95
|
+
|
|
96
|
+
For more information, see https://www.github.com/G-Core/gcore-python#with_streaming_response
|
|
97
|
+
"""
|
|
98
|
+
return AsyncPostgresResourceWithStreamingResponse(self)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
class PostgresResourceWithRawResponse:
|
|
102
|
+
def __init__(self, postgres: PostgresResource) -> None:
|
|
103
|
+
self._postgres = postgres
|
|
104
|
+
|
|
105
|
+
@cached_property
|
|
106
|
+
def clusters(self) -> ClustersResourceWithRawResponse:
|
|
107
|
+
return ClustersResourceWithRawResponse(self._postgres.clusters)
|
|
108
|
+
|
|
109
|
+
@cached_property
|
|
110
|
+
def configurations(self) -> ConfigurationsResourceWithRawResponse:
|
|
111
|
+
return ConfigurationsResourceWithRawResponse(self._postgres.configurations)
|
|
112
|
+
|
|
113
|
+
@cached_property
|
|
114
|
+
def custom_configurations(self) -> CustomConfigurationsResourceWithRawResponse:
|
|
115
|
+
return CustomConfigurationsResourceWithRawResponse(self._postgres.custom_configurations)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
class AsyncPostgresResourceWithRawResponse:
|
|
119
|
+
def __init__(self, postgres: AsyncPostgresResource) -> None:
|
|
120
|
+
self._postgres = postgres
|
|
121
|
+
|
|
122
|
+
@cached_property
|
|
123
|
+
def clusters(self) -> AsyncClustersResourceWithRawResponse:
|
|
124
|
+
return AsyncClustersResourceWithRawResponse(self._postgres.clusters)
|
|
125
|
+
|
|
126
|
+
@cached_property
|
|
127
|
+
def configurations(self) -> AsyncConfigurationsResourceWithRawResponse:
|
|
128
|
+
return AsyncConfigurationsResourceWithRawResponse(self._postgres.configurations)
|
|
129
|
+
|
|
130
|
+
@cached_property
|
|
131
|
+
def custom_configurations(self) -> AsyncCustomConfigurationsResourceWithRawResponse:
|
|
132
|
+
return AsyncCustomConfigurationsResourceWithRawResponse(self._postgres.custom_configurations)
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
class PostgresResourceWithStreamingResponse:
|
|
136
|
+
def __init__(self, postgres: PostgresResource) -> None:
|
|
137
|
+
self._postgres = postgres
|
|
138
|
+
|
|
139
|
+
@cached_property
|
|
140
|
+
def clusters(self) -> ClustersResourceWithStreamingResponse:
|
|
141
|
+
return ClustersResourceWithStreamingResponse(self._postgres.clusters)
|
|
142
|
+
|
|
143
|
+
@cached_property
|
|
144
|
+
def configurations(self) -> ConfigurationsResourceWithStreamingResponse:
|
|
145
|
+
return ConfigurationsResourceWithStreamingResponse(self._postgres.configurations)
|
|
146
|
+
|
|
147
|
+
@cached_property
|
|
148
|
+
def custom_configurations(self) -> CustomConfigurationsResourceWithStreamingResponse:
|
|
149
|
+
return CustomConfigurationsResourceWithStreamingResponse(self._postgres.custom_configurations)
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
class AsyncPostgresResourceWithStreamingResponse:
|
|
153
|
+
def __init__(self, postgres: AsyncPostgresResource) -> None:
|
|
154
|
+
self._postgres = postgres
|
|
155
|
+
|
|
156
|
+
@cached_property
|
|
157
|
+
def clusters(self) -> AsyncClustersResourceWithStreamingResponse:
|
|
158
|
+
return AsyncClustersResourceWithStreamingResponse(self._postgres.clusters)
|
|
159
|
+
|
|
160
|
+
@cached_property
|
|
161
|
+
def configurations(self) -> AsyncConfigurationsResourceWithStreamingResponse:
|
|
162
|
+
return AsyncConfigurationsResourceWithStreamingResponse(self._postgres.configurations)
|
|
163
|
+
|
|
164
|
+
@cached_property
|
|
165
|
+
def custom_configurations(self) -> AsyncCustomConfigurationsResourceWithStreamingResponse:
|
|
166
|
+
return AsyncCustomConfigurationsResourceWithStreamingResponse(self._postgres.custom_configurations)
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
import typing_extensions
|
|
6
5
|
from typing import Dict, Iterable, Optional
|
|
7
6
|
from typing_extensions import Literal, overload
|
|
8
7
|
|
|
@@ -106,9 +105,10 @@ class FileSharesResource(SyncAPIResource):
|
|
|
106
105
|
|
|
107
106
|
tags: Key-value tags to associate with the resource. A tag is a key-value pair that
|
|
108
107
|
can be associated with a resource, enabling efficient filtering and grouping for
|
|
109
|
-
better organization and management.
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
better organization and management. Both tag keys and values have a maximum
|
|
109
|
+
length of 255 characters. Some tags are read-only and cannot be modified by the
|
|
110
|
+
user. Tags are also integrated with cost reports, allowing cost data to be
|
|
111
|
+
filtered based on tag keys or values.
|
|
112
112
|
|
|
113
113
|
type_name: Standard file share type
|
|
114
114
|
|
|
@@ -162,9 +162,10 @@ class FileSharesResource(SyncAPIResource):
|
|
|
162
162
|
|
|
163
163
|
tags: Key-value tags to associate with the resource. A tag is a key-value pair that
|
|
164
164
|
can be associated with a resource, enabling efficient filtering and grouping for
|
|
165
|
-
better organization and management.
|
|
166
|
-
|
|
167
|
-
|
|
165
|
+
better organization and management. Both tag keys and values have a maximum
|
|
166
|
+
length of 255 characters. Some tags are read-only and cannot be modified by the
|
|
167
|
+
user. Tags are also integrated with cost reports, allowing cost data to be
|
|
168
|
+
filtered based on tag keys or values.
|
|
168
169
|
|
|
169
170
|
type_name: Vast file share type
|
|
170
171
|
|
|
@@ -228,7 +229,6 @@ class FileSharesResource(SyncAPIResource):
|
|
|
228
229
|
cast_to=TaskIDList,
|
|
229
230
|
)
|
|
230
231
|
|
|
231
|
-
@typing_extensions.deprecated("deprecated")
|
|
232
232
|
def update(
|
|
233
233
|
self,
|
|
234
234
|
file_share_id: str,
|
|
@@ -244,12 +244,9 @@ class FileSharesResource(SyncAPIResource):
|
|
|
244
244
|
extra_query: Query | None = None,
|
|
245
245
|
extra_body: Body | None = None,
|
|
246
246
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
247
|
-
) ->
|
|
247
|
+
) -> TaskIDList:
|
|
248
248
|
"""
|
|
249
|
-
Rename file share or
|
|
250
|
-
|
|
251
|
-
**Deprecated**: Use PATCH
|
|
252
|
-
/v3/`file_shares`/{`project_id`}/{`region_id`}/{`file_share_id`} instead
|
|
249
|
+
Rename file share, update tags or set share specific properties
|
|
253
250
|
|
|
254
251
|
Args:
|
|
255
252
|
project_id: Project ID
|
|
@@ -272,15 +269,20 @@ class FileSharesResource(SyncAPIResource):
|
|
|
272
269
|
- **Add/update tags:**
|
|
273
270
|
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
|
|
274
271
|
updates existing ones.
|
|
275
|
-
|
|
272
|
+
|
|
273
|
+
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
|
|
274
|
+
|
|
276
275
|
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
|
|
277
276
|
tags are preserved).
|
|
277
|
+
|
|
278
278
|
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
|
|
279
279
|
specified tags.
|
|
280
|
+
|
|
280
281
|
- **Mixed operations:**
|
|
281
|
-
`{'tags': {'environment': 'production', '
|
|
282
|
+
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
|
|
282
283
|
adds/updates 'environment' and '`cost_center`' while removing
|
|
283
284
|
'`deprecated_tag`', preserving other existing tags.
|
|
285
|
+
|
|
284
286
|
- **Replace all:** first delete existing tags with null values, then add new
|
|
285
287
|
ones in the same request.
|
|
286
288
|
|
|
@@ -299,7 +301,7 @@ class FileSharesResource(SyncAPIResource):
|
|
|
299
301
|
if not file_share_id:
|
|
300
302
|
raise ValueError(f"Expected a non-empty value for `file_share_id` but received {file_share_id!r}")
|
|
301
303
|
return self._patch(
|
|
302
|
-
f"/cloud/
|
|
304
|
+
f"/cloud/v3/file_shares/{project_id}/{region_id}/{file_share_id}",
|
|
303
305
|
body=maybe_transform(
|
|
304
306
|
{
|
|
305
307
|
"name": name,
|
|
@@ -311,7 +313,55 @@ class FileSharesResource(SyncAPIResource):
|
|
|
311
313
|
options=make_request_options(
|
|
312
314
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
313
315
|
),
|
|
314
|
-
cast_to=
|
|
316
|
+
cast_to=TaskIDList,
|
|
317
|
+
)
|
|
318
|
+
|
|
319
|
+
def update_and_poll(
|
|
320
|
+
self,
|
|
321
|
+
file_share_id: str,
|
|
322
|
+
*,
|
|
323
|
+
project_id: int | None = None,
|
|
324
|
+
region_id: int | None = None,
|
|
325
|
+
name: str | Omit = omit,
|
|
326
|
+
share_settings: file_share_update_params.ShareSettings | Omit = omit,
|
|
327
|
+
tags: Optional[TagUpdateMapParam] | Omit = omit,
|
|
328
|
+
polling_interval_seconds: int | Omit = omit,
|
|
329
|
+
polling_timeout_seconds: int | Omit = omit,
|
|
330
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
331
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
332
|
+
extra_headers: Headers | None = None,
|
|
333
|
+
extra_query: Query | None = None,
|
|
334
|
+
extra_body: Body | None = None,
|
|
335
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
336
|
+
) -> FileShare:
|
|
337
|
+
response = self.update(
|
|
338
|
+
file_share_id,
|
|
339
|
+
project_id=project_id,
|
|
340
|
+
region_id=region_id,
|
|
341
|
+
name=name,
|
|
342
|
+
share_settings=share_settings,
|
|
343
|
+
tags=tags,
|
|
344
|
+
extra_headers=extra_headers,
|
|
345
|
+
extra_query=extra_query,
|
|
346
|
+
extra_body=extra_body,
|
|
347
|
+
timeout=timeout,
|
|
348
|
+
)
|
|
349
|
+
if not response.tasks:
|
|
350
|
+
raise ValueError("Expected at least one task to be created")
|
|
351
|
+
self._client.cloud.tasks.poll(
|
|
352
|
+
task_id=response.tasks[0],
|
|
353
|
+
extra_headers=extra_headers,
|
|
354
|
+
polling_interval_seconds=polling_interval_seconds,
|
|
355
|
+
polling_timeout_seconds=polling_timeout_seconds,
|
|
356
|
+
)
|
|
357
|
+
return self.get(
|
|
358
|
+
file_share_id,
|
|
359
|
+
project_id=project_id,
|
|
360
|
+
region_id=region_id,
|
|
361
|
+
extra_headers=extra_headers,
|
|
362
|
+
extra_query=extra_query,
|
|
363
|
+
extra_body=extra_body,
|
|
364
|
+
timeout=timeout,
|
|
315
365
|
)
|
|
316
366
|
|
|
317
367
|
def list(
|
|
@@ -585,9 +635,10 @@ class AsyncFileSharesResource(AsyncAPIResource):
|
|
|
585
635
|
|
|
586
636
|
tags: Key-value tags to associate with the resource. A tag is a key-value pair that
|
|
587
637
|
can be associated with a resource, enabling efficient filtering and grouping for
|
|
588
|
-
better organization and management.
|
|
589
|
-
|
|
590
|
-
|
|
638
|
+
better organization and management. Both tag keys and values have a maximum
|
|
639
|
+
length of 255 characters. Some tags are read-only and cannot be modified by the
|
|
640
|
+
user. Tags are also integrated with cost reports, allowing cost data to be
|
|
641
|
+
filtered based on tag keys or values.
|
|
591
642
|
|
|
592
643
|
type_name: Standard file share type
|
|
593
644
|
|
|
@@ -641,9 +692,10 @@ class AsyncFileSharesResource(AsyncAPIResource):
|
|
|
641
692
|
|
|
642
693
|
tags: Key-value tags to associate with the resource. A tag is a key-value pair that
|
|
643
694
|
can be associated with a resource, enabling efficient filtering and grouping for
|
|
644
|
-
better organization and management.
|
|
645
|
-
|
|
646
|
-
|
|
695
|
+
better organization and management. Both tag keys and values have a maximum
|
|
696
|
+
length of 255 characters. Some tags are read-only and cannot be modified by the
|
|
697
|
+
user. Tags are also integrated with cost reports, allowing cost data to be
|
|
698
|
+
filtered based on tag keys or values.
|
|
647
699
|
|
|
648
700
|
type_name: Vast file share type
|
|
649
701
|
|
|
@@ -707,7 +759,6 @@ class AsyncFileSharesResource(AsyncAPIResource):
|
|
|
707
759
|
cast_to=TaskIDList,
|
|
708
760
|
)
|
|
709
761
|
|
|
710
|
-
@typing_extensions.deprecated("deprecated")
|
|
711
762
|
async def update(
|
|
712
763
|
self,
|
|
713
764
|
file_share_id: str,
|
|
@@ -723,12 +774,9 @@ class AsyncFileSharesResource(AsyncAPIResource):
|
|
|
723
774
|
extra_query: Query | None = None,
|
|
724
775
|
extra_body: Body | None = None,
|
|
725
776
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
726
|
-
) ->
|
|
777
|
+
) -> TaskIDList:
|
|
727
778
|
"""
|
|
728
|
-
Rename file share or
|
|
729
|
-
|
|
730
|
-
**Deprecated**: Use PATCH
|
|
731
|
-
/v3/`file_shares`/{`project_id`}/{`region_id`}/{`file_share_id`} instead
|
|
779
|
+
Rename file share, update tags or set share specific properties
|
|
732
780
|
|
|
733
781
|
Args:
|
|
734
782
|
project_id: Project ID
|
|
@@ -751,15 +799,20 @@ class AsyncFileSharesResource(AsyncAPIResource):
|
|
|
751
799
|
- **Add/update tags:**
|
|
752
800
|
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
|
|
753
801
|
updates existing ones.
|
|
754
|
-
|
|
802
|
+
|
|
803
|
+
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
|
|
804
|
+
|
|
755
805
|
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
|
|
756
806
|
tags are preserved).
|
|
807
|
+
|
|
757
808
|
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
|
|
758
809
|
specified tags.
|
|
810
|
+
|
|
759
811
|
- **Mixed operations:**
|
|
760
|
-
`{'tags': {'environment': 'production', '
|
|
812
|
+
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
|
|
761
813
|
adds/updates 'environment' and '`cost_center`' while removing
|
|
762
814
|
'`deprecated_tag`', preserving other existing tags.
|
|
815
|
+
|
|
763
816
|
- **Replace all:** first delete existing tags with null values, then add new
|
|
764
817
|
ones in the same request.
|
|
765
818
|
|
|
@@ -778,7 +831,7 @@ class AsyncFileSharesResource(AsyncAPIResource):
|
|
|
778
831
|
if not file_share_id:
|
|
779
832
|
raise ValueError(f"Expected a non-empty value for `file_share_id` but received {file_share_id!r}")
|
|
780
833
|
return await self._patch(
|
|
781
|
-
f"/cloud/
|
|
834
|
+
f"/cloud/v3/file_shares/{project_id}/{region_id}/{file_share_id}",
|
|
782
835
|
body=await async_maybe_transform(
|
|
783
836
|
{
|
|
784
837
|
"name": name,
|
|
@@ -790,7 +843,55 @@ class AsyncFileSharesResource(AsyncAPIResource):
|
|
|
790
843
|
options=make_request_options(
|
|
791
844
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
792
845
|
),
|
|
793
|
-
cast_to=
|
|
846
|
+
cast_to=TaskIDList,
|
|
847
|
+
)
|
|
848
|
+
|
|
849
|
+
async def update_and_poll(
|
|
850
|
+
self,
|
|
851
|
+
file_share_id: str,
|
|
852
|
+
*,
|
|
853
|
+
project_id: int | None = None,
|
|
854
|
+
region_id: int | None = None,
|
|
855
|
+
name: str | Omit = omit,
|
|
856
|
+
share_settings: file_share_update_params.ShareSettings | Omit = omit,
|
|
857
|
+
tags: Optional[TagUpdateMapParam] | Omit = omit,
|
|
858
|
+
polling_interval_seconds: int | Omit = omit,
|
|
859
|
+
polling_timeout_seconds: int | Omit = omit,
|
|
860
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
861
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
862
|
+
extra_headers: Headers | None = None,
|
|
863
|
+
extra_query: Query | None = None,
|
|
864
|
+
extra_body: Body | None = None,
|
|
865
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
866
|
+
) -> FileShare:
|
|
867
|
+
response = await self.update(
|
|
868
|
+
file_share_id,
|
|
869
|
+
project_id=project_id,
|
|
870
|
+
region_id=region_id,
|
|
871
|
+
name=name,
|
|
872
|
+
share_settings=share_settings,
|
|
873
|
+
tags=tags,
|
|
874
|
+
extra_headers=extra_headers,
|
|
875
|
+
extra_query=extra_query,
|
|
876
|
+
extra_body=extra_body,
|
|
877
|
+
timeout=timeout,
|
|
878
|
+
)
|
|
879
|
+
if not response.tasks:
|
|
880
|
+
raise ValueError("Expected at least one task to be created")
|
|
881
|
+
await self._client.cloud.tasks.poll(
|
|
882
|
+
task_id=response.tasks[0],
|
|
883
|
+
extra_headers=extra_headers,
|
|
884
|
+
polling_interval_seconds=polling_interval_seconds,
|
|
885
|
+
polling_timeout_seconds=polling_timeout_seconds,
|
|
886
|
+
)
|
|
887
|
+
return await self.get(
|
|
888
|
+
file_share_id,
|
|
889
|
+
project_id=project_id,
|
|
890
|
+
region_id=region_id,
|
|
891
|
+
extra_headers=extra_headers,
|
|
892
|
+
extra_query=extra_query,
|
|
893
|
+
extra_body=extra_body,
|
|
894
|
+
timeout=timeout,
|
|
794
895
|
)
|
|
795
896
|
|
|
796
897
|
def list(
|
|
@@ -1006,10 +1107,11 @@ class FileSharesResourceWithRawResponse:
|
|
|
1006
1107
|
self.create = to_raw_response_wrapper(
|
|
1007
1108
|
file_shares.create,
|
|
1008
1109
|
)
|
|
1009
|
-
self.update = (
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1110
|
+
self.update = to_raw_response_wrapper(
|
|
1111
|
+
file_shares.update,
|
|
1112
|
+
)
|
|
1113
|
+
self.update_and_poll = to_raw_response_wrapper(
|
|
1114
|
+
file_shares.update_and_poll,
|
|
1013
1115
|
)
|
|
1014
1116
|
self.list = to_raw_response_wrapper(
|
|
1015
1117
|
file_shares.list,
|
|
@@ -1036,10 +1138,11 @@ class AsyncFileSharesResourceWithRawResponse:
|
|
|
1036
1138
|
self.create = async_to_raw_response_wrapper(
|
|
1037
1139
|
file_shares.create,
|
|
1038
1140
|
)
|
|
1039
|
-
self.update = (
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1141
|
+
self.update = async_to_raw_response_wrapper(
|
|
1142
|
+
file_shares.update,
|
|
1143
|
+
)
|
|
1144
|
+
self.update_and_poll = async_to_raw_response_wrapper(
|
|
1145
|
+
file_shares.update_and_poll,
|
|
1043
1146
|
)
|
|
1044
1147
|
self.list = async_to_raw_response_wrapper(
|
|
1045
1148
|
file_shares.list,
|
|
@@ -1066,10 +1169,11 @@ class FileSharesResourceWithStreamingResponse:
|
|
|
1066
1169
|
self.create = to_streamed_response_wrapper(
|
|
1067
1170
|
file_shares.create,
|
|
1068
1171
|
)
|
|
1069
|
-
self.update = (
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1172
|
+
self.update = to_streamed_response_wrapper(
|
|
1173
|
+
file_shares.update,
|
|
1174
|
+
)
|
|
1175
|
+
self.update_and_poll = to_streamed_response_wrapper(
|
|
1176
|
+
file_shares.update_and_poll,
|
|
1073
1177
|
)
|
|
1074
1178
|
self.list = to_streamed_response_wrapper(
|
|
1075
1179
|
file_shares.list,
|
|
@@ -1096,10 +1200,11 @@ class AsyncFileSharesResourceWithStreamingResponse:
|
|
|
1096
1200
|
self.create = async_to_streamed_response_wrapper(
|
|
1097
1201
|
file_shares.create,
|
|
1098
1202
|
)
|
|
1099
|
-
self.update = (
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1203
|
+
self.update = async_to_streamed_response_wrapper(
|
|
1204
|
+
file_shares.update,
|
|
1205
|
+
)
|
|
1206
|
+
self.update_and_pol = async_to_streamed_response_wrapper(
|
|
1207
|
+
file_shares.update_and_poll,
|
|
1103
1208
|
)
|
|
1104
1209
|
self.list = async_to_streamed_response_wrapper(
|
|
1105
1210
|
file_shares.list,
|