diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index f81bf992..f04d0896 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.31.0"
+ ".": "0.32.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index f736874a..e4e9b35f 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 645
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-58d9afa7f8342ead022bd8fa12bb8abbeb9c0fb1e16f052ee6c4a59fae373e27.yml
-openapi_spec_hash: 2ae4db03cfc907be71d44288503838d7
-config_hash: 8d4711ed72633b7443249124a49781da
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-afac9651736e871ab5942174b1c2b741d31f17c1f4ac61e78f0000f1b3fd8d09.yml
+openapi_spec_hash: 9c57a763b4c6b82b581defdcaf5f52df
+config_hash: 7552912a8ca7c67b43b97f51b67a5ae7
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3fbb5e5f..9a2a6a34 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,33 @@
# Changelog
+## 0.32.0 (2026-02-11)
+
+Full Changelog: [v0.31.0...v0.32.0](https://github.com/G-Core/gcore-python/compare/v0.31.0...v0.32.0)
+
+### Features
+
+* **api:** aggregated API specs update ([a87437e](https://github.com/G-Core/gcore-python/commit/a87437e0d582d22c1f4f29bd585c7f757dcb4021))
+* **api:** aggregated API specs update ([c9079e1](https://github.com/G-Core/gcore-python/commit/c9079e1461f0e43df0bae0150a37c48febe557aa))
+* **api:** aggregated API specs update ([d0391a2](https://github.com/G-Core/gcore-python/commit/d0391a2bc77db00787ab6ebdaa46540f0a09fb4f))
+* **api:** aggregated API specs update ([65973ea](https://github.com/G-Core/gcore-python/commit/65973ea8e16ca432498ef3772e47e9927c92a03d))
+* **api:** aggregated API specs update ([732e36f](https://github.com/G-Core/gcore-python/commit/732e36f7509e3036b7800a809f14f364d47d9138))
+* **api:** aggregated API specs update ([3b5292a](https://github.com/G-Core/gcore-python/commit/3b5292a5403a6cfa880072fbbb8dde2ca311f0bd))
+* **api:** aggregated API specs update ([9bf5580](https://github.com/G-Core/gcore-python/commit/9bf55800ab1b90ac5f82e406b31fd61a5225afd9))
+
+
+### Bug Fixes
+
+* **cloud:** fix type in create_and_poll signature of load balancer listeners ([#146](https://github.com/G-Core/gcore-python/issues/146)) ([f99858a](https://github.com/G-Core/gcore-python/commit/f99858a1864e0142781c51f877c080a3b3f417cd))
+* **fastedge:** remove readOnly name from app_store required fields ([b373e1a](https://github.com/G-Core/gcore-python/commit/b373e1a1b1dcc27962f61af8fc11047f79938801))
+* **types:** correctly define false enum ([d5b033c](https://github.com/G-Core/gcore-python/commit/d5b033ca9bd2e52d248b979f739124b5a5c4de72))
+
+
+### Chores
+
+* **api:** minor updates ([b999f2c](https://github.com/G-Core/gcore-python/commit/b999f2c9623fa690a14fbc826aa51cb030121e47))
+* **internal:** bump dependencies ([e5a7288](https://github.com/G-Core/gcore-python/commit/e5a7288a0957da491df6c2cedb2275cbe7d99e11))
+* **internal:** fix lint error on Python 3.14 ([60245d0](https://github.com/G-Core/gcore-python/commit/60245d056b32bc23783f135102fe2acfe6627f88))
+
## 0.31.0 (2026-01-30)
Full Changelog: [v0.30.0...v0.31.0](https://github.com/G-Core/gcore-python/compare/v0.30.0...v0.31.0)
diff --git a/api.md b/api.md
index 92044094..cbc93dbc 100644
--- a/api.md
+++ b/api.md
@@ -1658,21 +1658,15 @@ Methods:
Types:
```python
-from gcore.types.fastedge import (
- KvStore,
- KvStoreShort,
- KvStoreStats,
- KvStoreListResponse,
- KvStoreGetResponse,
-)
+from gcore.types.fastedge import KvStore, KvStoreShort, KvStoreCreateResponse, KvStoreListResponse
```
Methods:
-- client.fastedge.kv_stores.create(\*\*params) -> KvStore
+- client.fastedge.kv_stores.create(\*\*params) -> KvStoreCreateResponse
- client.fastedge.kv_stores.list(\*\*params) -> KvStoreListResponse
- client.fastedge.kv_stores.delete(id) -> None
-- client.fastedge.kv_stores.get(id) -> KvStoreGetResponse
+- client.fastedge.kv_stores.get(id) -> KvStore
- client.fastedge.kv_stores.replace(id, \*\*params) -> KvStore
# Streaming
diff --git a/examples/cloud/load_balancers.py b/examples/cloud/load_balancers.py
index 7d43c183..991bb6fd 100644
--- a/examples/cloud/load_balancers.py
+++ b/examples/cloud/load_balancers.py
@@ -59,7 +59,7 @@ def get_load_balancer(*, client: Gcore, load_balancer_id: str) -> None:
def update_load_balancer(*, client: Gcore, load_balancer_id: str) -> None:
print("\n=== UPDATE LOAD BALANCER ===")
- lb = client.cloud.load_balancers.update(load_balancer_id=load_balancer_id, name="gcore-go-example-updated")
+ lb = client.cloud.load_balancers.update(load_balancer_id=load_balancer_id, name="gcore-go-example-updated") # pyright: ignore[reportDeprecated]
print(f"Updated load balancer: ID={lb.id}, name={lb.name}")
print("========================")
diff --git a/examples/cloud/load_balancers_async.py b/examples/cloud/load_balancers_async.py
index 0b673f02..b000a0be 100644
--- a/examples/cloud/load_balancers_async.py
+++ b/examples/cloud/load_balancers_async.py
@@ -65,7 +65,7 @@ async def get_load_balancer(*, client: AsyncGcore, load_balancer_id: str) -> Non
async def update_load_balancer(*, client: AsyncGcore, load_balancer_id: str) -> None:
print("\n=== UPDATE LOAD BALANCER ===")
- lb = await client.cloud.load_balancers.update(load_balancer_id=load_balancer_id, name="gcore-go-example-updated")
+ lb = await client.cloud.load_balancers.update(load_balancer_id=load_balancer_id, name="gcore-go-example-updated") # pyright: ignore[reportDeprecated]
print(f"Updated load balancer: ID={lb.id}, name={lb.name}")
print("========================")
diff --git a/examples/cloud/networks.py b/examples/cloud/networks.py
index c5f09811..0ed19528 100644
--- a/examples/cloud/networks.py
+++ b/examples/cloud/networks.py
@@ -136,7 +136,7 @@ def get_router(*, client: Gcore, router_id: str) -> None:
def update_router(*, client: Gcore, router_id: str) -> None:
print("\n=== UPDATE ROUTER ===")
- router = client.cloud.networks.routers.update(router_id=router_id, name="gcore-go-example-updated")
+ router = client.cloud.networks.routers.update(router_id=router_id, name="gcore-go-example-updated") # pyright: ignore[reportDeprecated]
print(f"Updated router: ID={router.id}, name={router.name}")
print("========================")
diff --git a/examples/cloud/networks_async.py b/examples/cloud/networks_async.py
index a6764a97..8d76973b 100644
--- a/examples/cloud/networks_async.py
+++ b/examples/cloud/networks_async.py
@@ -144,7 +144,7 @@ async def get_router(*, client: AsyncGcore, router_id: str) -> None:
async def update_router(*, client: AsyncGcore, router_id: str) -> None:
print("\n=== UPDATE ROUTER ===")
- router = await client.cloud.networks.routers.update(router_id=router_id, name="gcore-go-example-updated")
+ router = await client.cloud.networks.routers.update(router_id=router_id, name="gcore-go-example-updated") # pyright: ignore[reportDeprecated]
print(f"Updated router: ID={router.id}, name={router.name}")
print("========================")
diff --git a/pyproject.toml b/pyproject.toml
index 3ad9b84a..4b9b2d7c 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "gcore"
-version = "0.31.0"
+version = "0.32.0"
description = "The official Python library for the gcore API"
dynamic = ["readme"]
license = "Apache-2.0"
diff --git a/requirements-dev.lock b/requirements-dev.lock
index 272bfd52..3f846239 100644
--- a/requirements-dev.lock
+++ b/requirements-dev.lock
@@ -12,14 +12,14 @@
-e file:.
aiohappyeyeballs==2.6.1
# via aiohttp
-aiohttp==3.13.2
+aiohttp==3.13.3
# via gcore
# via httpx-aiohttp
aiosignal==1.4.0
# via aiohttp
annotated-types==0.7.0
# via pydantic
-anyio==4.12.0
+anyio==4.12.1
# via gcore
# via httpx
argcomplete==3.6.3
@@ -31,7 +31,7 @@ attrs==25.4.0
# via nox
backports-asyncio-runner==1.2.0
# via pytest-asyncio
-certifi==2025.11.12
+certifi==2026.1.4
# via httpcore
# via httpx
colorama==0.4.6
@@ -64,7 +64,7 @@ httpx==0.28.1
# via gcore
# via httpx-aiohttp
# via respx
-httpx-aiohttp==0.1.9
+httpx-aiohttp==0.1.12
# via gcore
humanize==4.13.0
# via nox
@@ -72,7 +72,7 @@ idna==3.11
# via anyio
# via httpx
# via yarl
-importlib-metadata==8.7.0
+importlib-metadata==8.7.1
iniconfig==2.1.0
# via pytest
markdown-it-py==3.0.0
@@ -85,14 +85,14 @@ multidict==6.7.0
mypy==1.17.0
mypy-extensions==1.1.0
# via mypy
-nodeenv==1.9.1
+nodeenv==1.10.0
# via pyright
nox==2025.11.12
packaging==25.0
# via dependency-groups
# via nox
# via pytest
-pathspec==0.12.1
+pathspec==1.0.3
# via mypy
platformdirs==4.4.0
# via virtualenv
@@ -121,13 +121,13 @@ pytz==2023.3.post1
# via dirty-equals
respx==0.22.0
rich==14.2.0
-ruff==0.14.7
+ruff==0.14.13
six==1.17.0
# via python-dateutil
sniffio==1.3.1
# via gcore
time-machine==2.19.0
-tomli==2.3.0
+tomli==2.4.0
# via dependency-groups
# via mypy
# via nox
@@ -147,7 +147,7 @@ typing-extensions==4.15.0
# via virtualenv
typing-inspection==0.4.2
# via pydantic
-virtualenv==20.35.4
+virtualenv==20.36.1
# via nox
yarl==1.22.0
# via aiohttp
diff --git a/requirements.lock b/requirements.lock
index 1e9ebf6f..8fa704e1 100644
--- a/requirements.lock
+++ b/requirements.lock
@@ -12,21 +12,21 @@
-e file:.
aiohappyeyeballs==2.6.1
# via aiohttp
-aiohttp==3.13.2
+aiohttp==3.13.3
# via gcore
# via httpx-aiohttp
aiosignal==1.4.0
# via aiohttp
annotated-types==0.7.0
# via pydantic
-anyio==4.12.0
+anyio==4.12.1
# via gcore
# via httpx
async-timeout==5.0.1
# via aiohttp
attrs==25.4.0
# via aiohttp
-certifi==2025.11.12
+certifi==2026.1.4
# via httpcore
# via httpx
distro==1.9.0
@@ -43,7 +43,7 @@ httpcore==1.0.9
httpx==0.28.1
# via gcore
# via httpx-aiohttp
-httpx-aiohttp==0.1.9
+httpx-aiohttp==0.1.12
# via gcore
idna==3.11
# via anyio
diff --git a/src/gcore/_utils/_compat.py b/src/gcore/_utils/_compat.py
index dd703233..2c70b299 100644
--- a/src/gcore/_utils/_compat.py
+++ b/src/gcore/_utils/_compat.py
@@ -26,7 +26,7 @@ def is_union(tp: Optional[Type[Any]]) -> bool:
else:
import types
- return tp is Union or tp is types.UnionType
+ return tp is Union or tp is types.UnionType # type: ignore[comparison-overlap]
def is_typeddict(tp: Type[Any]) -> bool:
diff --git a/src/gcore/_version.py b/src/gcore/_version.py
index d06a94b9..0211e7f4 100644
--- a/src/gcore/_version.py
+++ b/src/gcore/_version.py
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
__title__ = "gcore"
-__version__ = "0.31.0" # x-release-please-version
+__version__ = "0.32.0" # x-release-please-version
diff --git a/src/gcore/resources/cdn/cdn_resources/cdn_resources.py b/src/gcore/resources/cdn/cdn_resources/cdn_resources.py
index e92683c6..52c7821e 100644
--- a/src/gcore/resources/cdn/cdn_resources/cdn_resources.py
+++ b/src/gcore/resources/cdn/cdn_resources/cdn_resources.py
@@ -80,12 +80,12 @@ def create(
self,
*,
cname: str,
- origin: str,
- origin_group: int,
active: bool | Omit = omit,
description: str | Omit = omit,
name: Optional[str] | Omit = omit,
options: cdn_resource_create_params.Options | Omit = omit,
+ origin: str | Omit = omit,
+ origin_group: int | Omit = omit,
origin_protocol: Literal["HTTP", "HTTPS", "MATCH"] | Omit = omit,
primary_resource: Optional[int] | Omit = omit,
proxy_ssl_ca: Optional[int] | Omit = omit,
@@ -110,14 +110,6 @@ def create(
Delivery domains should be added to your DNS settings.
- origin: IP address or domain name of the origin and the port, if custom port is used.
-
- You can use either the `origin` or `originGroup` parameter in the request.
-
- origin_group: Origin group ID with which the CDN resource is associated.
-
- You can use either the `origin` or `originGroup` parameter in the request.
-
active: Enables or disables a CDN resource.
Possible values:
@@ -134,6 +126,16 @@ def create(
In case of `null` value the option is not added to the CDN resource. Option may
inherit its value from the global account settings.
+ origin: IP address or domain name of the origin and the port, if custom port is used.
+
+ Exactly one of `origin` or `originGroup` must be provided during resource
+ creation.
+
+ origin_group: Origin group ID with which the CDN resource is associated.
+
+ Exactly one of `origin` or `originGroup` must be provided during resource
+ creation.
+
origin_protocol: Protocol used by CDN servers to request content from an origin source.
Possible values:
@@ -204,12 +206,12 @@ def create(
body=maybe_transform(
{
"cname": cname,
- "origin": origin,
- "origin_group": origin_group,
"active": active,
"description": description,
"name": name,
"options": options,
+ "origin": origin,
+ "origin_group": origin_group,
"origin_protocol": origin_protocol,
"primary_resource": primary_resource,
"proxy_ssl_ca": proxy_ssl_ca,
@@ -273,8 +275,6 @@ def update(
origin_group: Origin group ID with which the CDN resource is associated.
- You can use either the `origin` or `originGroup` parameter in the request.
-
origin_protocol: Protocol used by CDN servers to request content from an origin source.
Possible values:
@@ -855,8 +855,6 @@ def replace(
Args:
origin_group: Origin group ID with which the CDN resource is associated.
- You can use either the `origin` or `originGroup` parameter in the request.
-
active: Enables or disables a CDN resource.
Possible values:
@@ -990,12 +988,12 @@ async def create(
self,
*,
cname: str,
- origin: str,
- origin_group: int,
active: bool | Omit = omit,
description: str | Omit = omit,
name: Optional[str] | Omit = omit,
options: cdn_resource_create_params.Options | Omit = omit,
+ origin: str | Omit = omit,
+ origin_group: int | Omit = omit,
origin_protocol: Literal["HTTP", "HTTPS", "MATCH"] | Omit = omit,
primary_resource: Optional[int] | Omit = omit,
proxy_ssl_ca: Optional[int] | Omit = omit,
@@ -1020,14 +1018,6 @@ async def create(
Delivery domains should be added to your DNS settings.
- origin: IP address or domain name of the origin and the port, if custom port is used.
-
- You can use either the `origin` or `originGroup` parameter in the request.
-
- origin_group: Origin group ID with which the CDN resource is associated.
-
- You can use either the `origin` or `originGroup` parameter in the request.
-
active: Enables or disables a CDN resource.
Possible values:
@@ -1044,6 +1034,16 @@ async def create(
In case of `null` value the option is not added to the CDN resource. Option may
inherit its value from the global account settings.
+ origin: IP address or domain name of the origin and the port, if custom port is used.
+
+ Exactly one of `origin` or `originGroup` must be provided during resource
+ creation.
+
+ origin_group: Origin group ID with which the CDN resource is associated.
+
+ Exactly one of `origin` or `originGroup` must be provided during resource
+ creation.
+
origin_protocol: Protocol used by CDN servers to request content from an origin source.
Possible values:
@@ -1114,12 +1114,12 @@ async def create(
body=await async_maybe_transform(
{
"cname": cname,
- "origin": origin,
- "origin_group": origin_group,
"active": active,
"description": description,
"name": name,
"options": options,
+ "origin": origin,
+ "origin_group": origin_group,
"origin_protocol": origin_protocol,
"primary_resource": primary_resource,
"proxy_ssl_ca": proxy_ssl_ca,
@@ -1183,8 +1183,6 @@ async def update(
origin_group: Origin group ID with which the CDN resource is associated.
- You can use either the `origin` or `originGroup` parameter in the request.
-
origin_protocol: Protocol used by CDN servers to request content from an origin source.
Possible values:
@@ -1765,8 +1763,6 @@ async def replace(
Args:
origin_group: Origin group ID with which the CDN resource is associated.
- You can use either the `origin` or `originGroup` parameter in the request.
-
active: Enables or disables a CDN resource.
Possible values:
diff --git a/src/gcore/resources/cloud/floating_ips.py b/src/gcore/resources/cloud/floating_ips.py
index d2273ff7..f3b95468 100644
--- a/src/gcore/resources/cloud/floating_ips.py
+++ b/src/gcore/resources/cloud/floating_ips.py
@@ -382,10 +382,10 @@ def assign(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> FloatingIP:
"""
- Assign floating IP to instance or loadbalancer
+ Assign floating IP to instance or loadbalancer.
- **Deprecated**: Use PATCH
- /v2/floatingips/{`project_id`}/{`region_id`}/{`floating_ip_id`} instead
+ **Deprecated**: Use
+ `PATCH /v2/floatingips/{project_id}/{region_id}/{floating_ip_id}` instead.
Args:
project_id: Project ID
@@ -487,8 +487,8 @@ def unassign(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> FloatingIP:
"""
- **Deprecated**: Use PATCH
- /v2/floatingips/{`project_id`}/{`region_id`}/{`floating_ip_id`} instead
+ **Deprecated**: Use
+ `PATCH /v2/floatingips/{project_id}/{region_id}/{floating_ip_id}` instead.
Args:
project_id: Project ID
@@ -1005,10 +1005,10 @@ async def assign(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> FloatingIP:
"""
- Assign floating IP to instance or loadbalancer
+ Assign floating IP to instance or loadbalancer.
- **Deprecated**: Use PATCH
- /v2/floatingips/{`project_id`}/{`region_id`}/{`floating_ip_id`} instead
+ **Deprecated**: Use
+ `PATCH /v2/floatingips/{project_id}/{region_id}/{floating_ip_id}` instead.
Args:
project_id: Project ID
@@ -1110,8 +1110,8 @@ async def unassign(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> FloatingIP:
"""
- **Deprecated**: Use PATCH
- /v2/floatingips/{`project_id`}/{`region_id`}/{`floating_ip_id`} instead
+ **Deprecated**: Use
+ `PATCH /v2/floatingips/{project_id}/{region_id}/{floating_ip_id}` instead.
Args:
project_id: Project ID
diff --git a/src/gcore/resources/cloud/k8s/clusters/clusters.py b/src/gcore/resources/cloud/k8s/clusters/clusters.py
index 52ab2f78..ca2c3529 100644
--- a/src/gcore/resources/cloud/k8s/clusters/clusters.py
+++ b/src/gcore/resources/cloud/k8s/clusters/clusters.py
@@ -111,6 +111,10 @@ def create(
Create k8s cluster
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
keypair: The keypair of the cluster
name: The name of the cluster
@@ -269,6 +273,12 @@ def update(
Update k8s cluster
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
add_ons: Cluster add-ons configuration
authentication: Authentication settings
@@ -386,6 +396,10 @@ def list(
List k8s clusters
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -424,6 +438,12 @@ def delete(
Delete k8s cluster
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
volumes: Comma separated list of volume IDs to be deleted with the cluster
extra_headers: Send extra headers
@@ -469,6 +489,12 @@ def get(
Get k8s cluster
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -508,6 +534,12 @@ def get_certificate(
Get k8s cluster CA certificate
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -547,6 +579,12 @@ def get_kubeconfig(
Get k8s cluster kubeconfig
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -586,6 +624,12 @@ def list_versions_for_upgrade(
List available k8s cluster versions for upgrade
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -626,6 +670,12 @@ def upgrade(
Upgrade k8s cluster
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
version: Target k8s cluster version
extra_headers: Send extra headers
@@ -714,6 +764,10 @@ async def create(
Create k8s cluster
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
keypair: The keypair of the cluster
name: The name of the cluster
@@ -872,6 +926,12 @@ async def update(
Update k8s cluster
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
add_ons: Cluster add-ons configuration
authentication: Authentication settings
@@ -989,6 +1049,10 @@ async def list(
List k8s clusters
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1027,6 +1091,12 @@ async def delete(
Delete k8s cluster
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
volumes: Comma separated list of volume IDs to be deleted with the cluster
extra_headers: Send extra headers
@@ -1072,6 +1142,12 @@ async def get(
Get k8s cluster
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1111,6 +1187,12 @@ async def get_certificate(
Get k8s cluster CA certificate
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1150,6 +1232,12 @@ async def get_kubeconfig(
Get k8s cluster kubeconfig
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1189,6 +1277,12 @@ async def list_versions_for_upgrade(
List available k8s cluster versions for upgrade
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -1229,6 +1323,12 @@ async def upgrade(
Upgrade k8s cluster
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
version: Target k8s cluster version
extra_headers: Send extra headers
diff --git a/src/gcore/resources/cloud/k8s/clusters/nodes.py b/src/gcore/resources/cloud/k8s/clusters/nodes.py
index 4518d8b9..482ece84 100644
--- a/src/gcore/resources/cloud/k8s/clusters/nodes.py
+++ b/src/gcore/resources/cloud/k8s/clusters/nodes.py
@@ -59,6 +59,12 @@ def list(
List k8s cluster nodes
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
with_ddos: Include DDoS profile information if set to true. Default is false.
extra_headers: Send extra headers
@@ -106,6 +112,14 @@ def delete(
pool size.
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
+ instance_id: Instance ID
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -170,6 +184,12 @@ async def list(
List k8s cluster nodes
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
with_ddos: Include DDoS profile information if set to true. Default is false.
extra_headers: Send extra headers
@@ -217,6 +237,14 @@ async def delete(
pool size.
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
+ instance_id: Instance ID
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
diff --git a/src/gcore/resources/cloud/k8s/clusters/pools/nodes.py b/src/gcore/resources/cloud/k8s/clusters/pools/nodes.py
index 797c0e6e..5d360e78 100644
--- a/src/gcore/resources/cloud/k8s/clusters/pools/nodes.py
+++ b/src/gcore/resources/cloud/k8s/clusters/pools/nodes.py
@@ -60,6 +60,14 @@ def list(
List k8s cluster pool nodes
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
+ pool_name: Pool name
+
with_ddos: Include DDoS profile information if set to true. Default is false.
extra_headers: Send extra headers
@@ -110,6 +118,16 @@ def delete(
pool size.
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
+ pool_name: Pool name
+
+ instance_id: Instance ID
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -177,6 +195,14 @@ async def list(
List k8s cluster pool nodes
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
+ pool_name: Pool name
+
with_ddos: Include DDoS profile information if set to true. Default is false.
extra_headers: Send extra headers
@@ -227,6 +253,16 @@ async def delete(
pool size.
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
+ pool_name: Pool name
+
+ instance_id: Instance ID
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
diff --git a/src/gcore/resources/cloud/k8s/clusters/pools/pools.py b/src/gcore/resources/cloud/k8s/clusters/pools/pools.py
index 7de8cf65..d23019c4 100644
--- a/src/gcore/resources/cloud/k8s/clusters/pools/pools.py
+++ b/src/gcore/resources/cloud/k8s/clusters/pools/pools.py
@@ -95,6 +95,12 @@ def create(
Create k8s cluster pool
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
flavor_id: Flavor ID
min_node_count: Minimum node count
@@ -185,6 +191,14 @@ def update(
Update k8s cluster pool
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
+ pool_name: Pool name
+
auto_healing_enabled: Enable/disable auto healing
labels: Labels applied to the cluster pool
@@ -249,6 +263,12 @@ def list(
List k8s cluster pools
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -289,6 +309,14 @@ def delete(
Delete k8s cluster pool
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
+ pool_name: Pool name
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -408,6 +436,14 @@ def get(
Get k8s cluster pool
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
+ pool_name: Pool name
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -451,6 +487,14 @@ def resize(
Resize k8s cluster pool
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
+ pool_name: Pool name
+
node_count: Target node count
extra_headers: Send extra headers
@@ -534,6 +578,12 @@ async def create(
Create k8s cluster pool
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
flavor_id: Flavor ID
min_node_count: Minimum node count
@@ -624,6 +674,14 @@ async def update(
Update k8s cluster pool
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
+ pool_name: Pool name
+
auto_healing_enabled: Enable/disable auto healing
labels: Labels applied to the cluster pool
@@ -688,6 +746,12 @@ async def list(
List k8s cluster pools
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -728,6 +792,14 @@ async def delete(
Delete k8s cluster pool
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
+ pool_name: Pool name
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -847,6 +919,14 @@ async def get(
Get k8s cluster pool
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
+ pool_name: Pool name
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -890,6 +970,14 @@ async def resize(
Resize k8s cluster pool
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_name: Cluster name
+
+ pool_name: Pool name
+
node_count: Target node count
extra_headers: Send extra headers
diff --git a/src/gcore/resources/cloud/k8s/flavors.py b/src/gcore/resources/cloud/k8s/flavors.py
index 0823633e..36f4fc54 100644
--- a/src/gcore/resources/cloud/k8s/flavors.py
+++ b/src/gcore/resources/cloud/k8s/flavors.py
@@ -47,6 +47,7 @@ def list(
project_id: int | None = None,
region_id: int | None = None,
exclude_gpu: bool | Omit = omit,
+ include_capacity: bool | Omit = omit,
include_prices: bool | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -62,7 +63,13 @@ def list(
price values as 0. If you get Pricing Error contact the support
Args:
- exclude_gpu: Set to false to include GPU flavors. Default is True.
+ project_id: Project ID
+
+ region_id: Region ID
+
+ exclude_gpu: Set to true to exclude GPU flavors. Default is false.
+
+ include_capacity: Set to true to include flavor capacity. Default is False.
include_prices: Set to true to include flavor prices. Default is False.
@@ -88,6 +95,7 @@ def list(
query=maybe_transform(
{
"exclude_gpu": exclude_gpu,
+ "include_capacity": include_capacity,
"include_prices": include_prices,
},
flavor_list_params.FlavorListParams,
@@ -123,6 +131,7 @@ async def list(
project_id: int | None = None,
region_id: int | None = None,
exclude_gpu: bool | Omit = omit,
+ include_capacity: bool | Omit = omit,
include_prices: bool | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -138,7 +147,13 @@ async def list(
price values as 0. If you get Pricing Error contact the support
Args:
- exclude_gpu: Set to false to include GPU flavors. Default is True.
+ project_id: Project ID
+
+ region_id: Region ID
+
+ exclude_gpu: Set to true to exclude GPU flavors. Default is false.
+
+ include_capacity: Set to true to include flavor capacity. Default is False.
include_prices: Set to true to include flavor prices. Default is False.
@@ -164,6 +179,7 @@ async def list(
query=await async_maybe_transform(
{
"exclude_gpu": exclude_gpu,
+ "include_capacity": include_capacity,
"include_prices": include_prices,
},
flavor_list_params.FlavorListParams,
diff --git a/src/gcore/resources/cloud/k8s/k8s.py b/src/gcore/resources/cloud/k8s/k8s.py
index e1dabed0..7a31e244 100644
--- a/src/gcore/resources/cloud/k8s/k8s.py
+++ b/src/gcore/resources/cloud/k8s/k8s.py
@@ -79,6 +79,10 @@ def list_versions(
List available k8s cluster versions for creation
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -144,6 +148,10 @@ async def list_versions(
List available k8s cluster versions for creation
Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
diff --git a/src/gcore/resources/cloud/load_balancers/listeners.py b/src/gcore/resources/cloud/load_balancers/listeners.py
index 518b61b1..c9905c4f 100644
--- a/src/gcore/resources/cloud/load_balancers/listeners.py
+++ b/src/gcore/resources/cloud/load_balancers/listeners.py
@@ -3,6 +3,7 @@
from __future__ import annotations
from typing import Iterable, Optional
+from typing_extensions import Literal
import httpx
@@ -66,7 +67,7 @@ def create(
connection_limit: int | Omit = omit,
default_pool_id: str | Omit = omit,
insert_x_forwarded: bool | Omit = omit,
- secret_id: str | Omit = omit,
+ secret_id: Literal[""] | Omit = omit,
sni_secret_id: SequenceNotStr[str] | Omit = omit,
timeout_client_data: Optional[int] | Omit = omit,
timeout_member_connect: Optional[int] | Omit = omit,
@@ -166,6 +167,7 @@ def update(
*,
project_id: int | None = None,
region_id: int | None = None,
+ admin_state_up: bool | Omit = omit,
allowed_cidrs: Optional[SequenceNotStr[str]] | Omit = omit,
connection_limit: int | Omit = omit,
name: str | Omit = omit,
@@ -192,6 +194,10 @@ def update(
listener_id: Listener ID
+ admin_state_up: Administrative state of the resource. When set to true, the resource is enabled
+ and operational. When set to false, the resource is disabled and will not
+ process traffic. Defaults to true.
+
allowed_cidrs: Network CIDRs from which service will be accessible
connection_limit: Limit of simultaneous connections. If -1 is provided, it is translated to the
@@ -233,6 +239,7 @@ def update(
f"/cloud/v2/lblisteners/{project_id}/{region_id}/{listener_id}",
body=maybe_transform(
{
+ "admin_state_up": admin_state_up,
"allowed_cidrs": allowed_cidrs,
"connection_limit": connection_limit,
"name": name,
@@ -425,7 +432,7 @@ def create_and_poll(
allowed_cidrs: Optional[SequenceNotStr[str]] | Omit = omit,
connection_limit: int | Omit = omit,
insert_x_forwarded: bool | Omit = omit,
- secret_id: str | Omit = omit,
+ secret_id: Literal[""] | Omit = omit,
sni_secret_id: SequenceNotStr[str] | Omit = omit,
timeout_client_data: Optional[int] | Omit = omit,
timeout_member_connect: Optional[int] | Omit = omit,
@@ -614,7 +621,7 @@ async def create(
connection_limit: int | Omit = omit,
default_pool_id: str | Omit = omit,
insert_x_forwarded: bool | Omit = omit,
- secret_id: str | Omit = omit,
+ secret_id: Literal[""] | Omit = omit,
sni_secret_id: SequenceNotStr[str] | Omit = omit,
timeout_client_data: Optional[int] | Omit = omit,
timeout_member_connect: Optional[int] | Omit = omit,
@@ -714,6 +721,7 @@ async def update(
*,
project_id: int | None = None,
region_id: int | None = None,
+ admin_state_up: bool | Omit = omit,
allowed_cidrs: Optional[SequenceNotStr[str]] | Omit = omit,
connection_limit: int | Omit = omit,
name: str | Omit = omit,
@@ -740,6 +748,10 @@ async def update(
listener_id: Listener ID
+ admin_state_up: Administrative state of the resource. When set to true, the resource is enabled
+ and operational. When set to false, the resource is disabled and will not
+ process traffic. Defaults to true.
+
allowed_cidrs: Network CIDRs from which service will be accessible
connection_limit: Limit of simultaneous connections. If -1 is provided, it is translated to the
@@ -781,6 +793,7 @@ async def update(
f"/cloud/v2/lblisteners/{project_id}/{region_id}/{listener_id}",
body=await async_maybe_transform(
{
+ "admin_state_up": admin_state_up,
"allowed_cidrs": allowed_cidrs,
"connection_limit": connection_limit,
"name": name,
@@ -973,7 +986,7 @@ async def create_and_poll(
allowed_cidrs: Optional[SequenceNotStr[str]] | Omit = omit,
connection_limit: int | Omit = omit,
insert_x_forwarded: bool | Omit = omit,
- secret_id: str | Omit = omit,
+ secret_id: Literal[""] | Omit = omit,
sni_secret_id: SequenceNotStr[str] | Omit = omit,
timeout_client_data: Optional[int] | Omit = omit,
timeout_member_connect: Optional[int] | Omit = omit,
diff --git a/src/gcore/resources/cloud/load_balancers/load_balancers.py b/src/gcore/resources/cloud/load_balancers/load_balancers.py
index d2bfe2a1..54c7ef99 100644
--- a/src/gcore/resources/cloud/load_balancers/load_balancers.py
+++ b/src/gcore/resources/cloud/load_balancers/load_balancers.py
@@ -2,6 +2,7 @@
from __future__ import annotations
+import typing_extensions
from typing import Dict, Iterable, Optional
from typing_extensions import Literal
@@ -238,6 +239,7 @@ def create(
cast_to=TaskIDList,
)
+ @typing_extensions.deprecated("deprecated")
def update(
self,
load_balancer_id: str,
@@ -261,6 +263,9 @@ def update(
that are provided in the request body. Any fields that are not included will
remain unchanged.
+ Please use PATCH `/v2/loadbalancers/{project_id}/{region_id}/{load_balancer_id}`
+ instead
+
Args:
project_id: Project ID
@@ -986,6 +991,7 @@ async def create(
cast_to=TaskIDList,
)
+ @typing_extensions.deprecated("deprecated")
async def update(
self,
load_balancer_id: str,
@@ -1009,6 +1015,9 @@ async def update(
that are provided in the request body. Any fields that are not included will
remain unchanged.
+ Please use PATCH `/v2/loadbalancers/{project_id}/{region_id}/{load_balancer_id}`
+ instead
+
Args:
project_id: Project ID
@@ -1591,8 +1600,10 @@ def __init__(self, load_balancers: LoadBalancersResource) -> None:
self.create = to_raw_response_wrapper(
load_balancers.create,
)
- self.update = to_raw_response_wrapper(
- load_balancers.update,
+ self.update = ( # pyright: ignore[reportDeprecated]
+ to_raw_response_wrapper(
+ load_balancers.update, # pyright: ignore[reportDeprecated],
+ )
)
self.list = to_raw_response_wrapper(
load_balancers.list,
@@ -1654,8 +1665,10 @@ def __init__(self, load_balancers: AsyncLoadBalancersResource) -> None:
self.create = async_to_raw_response_wrapper(
load_balancers.create,
)
- self.update = async_to_raw_response_wrapper(
- load_balancers.update,
+ self.update = ( # pyright: ignore[reportDeprecated]
+ async_to_raw_response_wrapper(
+ load_balancers.update, # pyright: ignore[reportDeprecated],
+ )
)
self.list = async_to_raw_response_wrapper(
load_balancers.list,
@@ -1717,8 +1730,10 @@ def __init__(self, load_balancers: LoadBalancersResource) -> None:
self.create = to_streamed_response_wrapper(
load_balancers.create,
)
- self.update = to_streamed_response_wrapper(
- load_balancers.update,
+ self.update = ( # pyright: ignore[reportDeprecated]
+ to_streamed_response_wrapper(
+ load_balancers.update, # pyright: ignore[reportDeprecated],
+ )
)
self.list = to_streamed_response_wrapper(
load_balancers.list,
@@ -1780,8 +1795,10 @@ def __init__(self, load_balancers: AsyncLoadBalancersResource) -> None:
self.create = async_to_streamed_response_wrapper(
load_balancers.create,
)
- self.update = async_to_streamed_response_wrapper(
- load_balancers.update,
+ self.update = ( # pyright: ignore[reportDeprecated]
+ async_to_streamed_response_wrapper(
+ load_balancers.update, # pyright: ignore[reportDeprecated],
+ )
)
self.list = async_to_streamed_response_wrapper(
load_balancers.list,
diff --git a/src/gcore/resources/cloud/load_balancers/pools/health_monitors.py b/src/gcore/resources/cloud/load_balancers/pools/health_monitors.py
index cc1baa93..33f56bcc 100644
--- a/src/gcore/resources/cloud/load_balancers/pools/health_monitors.py
+++ b/src/gcore/resources/cloud/load_balancers/pools/health_monitors.py
@@ -56,6 +56,7 @@ def create(
max_retries: int,
api_timeout: int,
type: LbHealthMonitorType,
+ admin_state_up: bool | Omit = omit,
expected_codes: Optional[str] | Omit = omit,
http_method: Optional[HTTPMethod] | Omit = omit,
max_retries_down: int | Omit = omit,
@@ -88,6 +89,10 @@ def create(
type: Health monitor type. Once health monitor is created, cannot be changed.
+ admin_state_up: Administrative state of the resource. When set to true, the resource is enabled
+ and operational. When set to false, the resource is disabled and will not
+ process traffic. Defaults to true.
+
expected_codes: Expected HTTP response codes. Can be a single code or a range of codes. Can only
be used together with `HTTP` or `HTTPS` health monitor type. For example,
200,202,300-302,401,403,404,500-504. If not specified, the default is 200.
@@ -122,6 +127,7 @@ def create(
"max_retries": max_retries,
"api_timeout": api_timeout,
"type": type,
+ "admin_state_up": admin_state_up,
"expected_codes": expected_codes,
"http_method": http_method,
"max_retries_down": max_retries_down,
@@ -215,6 +221,7 @@ async def create(
max_retries: int,
api_timeout: int,
type: LbHealthMonitorType,
+ admin_state_up: bool | Omit = omit,
expected_codes: Optional[str] | Omit = omit,
http_method: Optional[HTTPMethod] | Omit = omit,
max_retries_down: int | Omit = omit,
@@ -247,6 +254,10 @@ async def create(
type: Health monitor type. Once health monitor is created, cannot be changed.
+ admin_state_up: Administrative state of the resource. When set to true, the resource is enabled
+ and operational. When set to false, the resource is disabled and will not
+ process traffic. Defaults to true.
+
expected_codes: Expected HTTP response codes. Can be a single code or a range of codes. Can only
be used together with `HTTP` or `HTTPS` health monitor type. For example,
200,202,300-302,401,403,404,500-504. If not specified, the default is 200.
@@ -281,6 +292,7 @@ async def create(
"max_retries": max_retries,
"api_timeout": api_timeout,
"type": type,
+ "admin_state_up": admin_state_up,
"expected_codes": expected_codes,
"http_method": http_method,
"max_retries_down": max_retries_down,
diff --git a/src/gcore/resources/cloud/load_balancers/pools/members.py b/src/gcore/resources/cloud/load_balancers/pools/members.py
index 2e475708..d28d22ef 100644
--- a/src/gcore/resources/cloud/load_balancers/pools/members.py
+++ b/src/gcore/resources/cloud/load_balancers/pools/members.py
@@ -81,7 +81,7 @@ def create(
admin_state_up: Administrative state of the resource. When set to true, the resource is enabled
and operational. When set to false, the resource is disabled and will not
- process traffic. When null is passed, the value is skipped and defaults to true.
+ process traffic. Defaults to true.
backup: Set to true if the member is a backup member, to which traffic will be sent
exclusively when all non-backup members will be unreachable. It allows to
@@ -261,7 +261,7 @@ async def create(
admin_state_up: Administrative state of the resource. When set to true, the resource is enabled
and operational. When set to false, the resource is disabled and will not
- process traffic. When null is passed, the value is skipped and defaults to true.
+ process traffic. Defaults to true.
backup: Set to true if the member is a backup member, to which traffic will be sent
exclusively when all non-backup members will be unreachable. It allows to
diff --git a/src/gcore/resources/cloud/load_balancers/pools/pools.py b/src/gcore/resources/cloud/load_balancers/pools/pools.py
index 5b5b7909..67c9cb79 100644
--- a/src/gcore/resources/cloud/load_balancers/pools/pools.py
+++ b/src/gcore/resources/cloud/load_balancers/pools/pools.py
@@ -180,6 +180,7 @@ def update(
*,
project_id: int | None = None,
region_id: int | None = None,
+ admin_state_up: bool | Omit = omit,
ca_secret_id: Optional[str] | Omit = omit,
crl_secret_id: Optional[str] | Omit = omit,
healthmonitor: Optional[pool_update_params.Healthmonitor] | Omit = omit,
@@ -226,6 +227,10 @@ def update(
pool_id: Pool ID
+ admin_state_up: Administrative state of the resource. When set to true, the resource is enabled
+ and operational. When set to false, the resource is disabled and will not
+ process traffic. Defaults to true.
+
ca_secret_id: Secret ID of CA certificate bundle
crl_secret_id: Secret ID of CA revocation list file
@@ -270,6 +275,7 @@ def update(
f"/cloud/v2/lbpools/{project_id}/{region_id}/{pool_id}",
body=maybe_transform(
{
+ "admin_state_up": admin_state_up,
"ca_secret_id": ca_secret_id,
"crl_secret_id": crl_secret_id,
"healthmonitor": healthmonitor,
@@ -749,6 +755,7 @@ async def update(
*,
project_id: int | None = None,
region_id: int | None = None,
+ admin_state_up: bool | Omit = omit,
ca_secret_id: Optional[str] | Omit = omit,
crl_secret_id: Optional[str] | Omit = omit,
healthmonitor: Optional[pool_update_params.Healthmonitor] | Omit = omit,
@@ -795,6 +802,10 @@ async def update(
pool_id: Pool ID
+ admin_state_up: Administrative state of the resource. When set to true, the resource is enabled
+ and operational. When set to false, the resource is disabled and will not
+ process traffic. Defaults to true.
+
ca_secret_id: Secret ID of CA certificate bundle
crl_secret_id: Secret ID of CA revocation list file
@@ -839,6 +850,7 @@ async def update(
f"/cloud/v2/lbpools/{project_id}/{region_id}/{pool_id}",
body=await async_maybe_transform(
{
+ "admin_state_up": admin_state_up,
"ca_secret_id": ca_secret_id,
"crl_secret_id": crl_secret_id,
"healthmonitor": healthmonitor,
diff --git a/src/gcore/resources/cloud/networks/routers.py b/src/gcore/resources/cloud/networks/routers.py
index b9a03134..23ed228f 100644
--- a/src/gcore/resources/cloud/networks/routers.py
+++ b/src/gcore/resources/cloud/networks/routers.py
@@ -2,6 +2,7 @@
from __future__ import annotations
+import typing_extensions
from typing import Iterable, Optional
import httpx
@@ -108,6 +109,7 @@ def create(
cast_to=TaskIDList,
)
+ @typing_extensions.deprecated("deprecated")
def update(
self,
router_id: str,
@@ -126,8 +128,8 @@ def update(
) -> Router:
"""Update the configuration of an existing router.
- **Deprecated**: Use PATCH
- /v2/routers/{`project_id`}/{`region_id`}/{`router_id`}
+ **Deprecated**: Use
+ `PATCH /v2/routers/{project_id}/{region_id}/{router_id}` instead.
Args:
external_gateway_info: New external gateway.
@@ -477,6 +479,7 @@ async def create(
cast_to=TaskIDList,
)
+ @typing_extensions.deprecated("deprecated")
async def update(
self,
router_id: str,
@@ -495,8 +498,8 @@ async def update(
) -> Router:
"""Update the configuration of an existing router.
- **Deprecated**: Use PATCH
- /v2/routers/{`project_id`}/{`region_id`}/{`router_id`}
+ **Deprecated**: Use
+ `PATCH /v2/routers/{project_id}/{region_id}/{router_id}` instead.
Args:
external_gateway_info: New external gateway.
@@ -778,8 +781,10 @@ def __init__(self, routers: RoutersResource) -> None:
self.create = to_raw_response_wrapper(
routers.create,
)
- self.update = to_raw_response_wrapper(
- routers.update,
+ self.update = ( # pyright: ignore[reportDeprecated]
+ to_raw_response_wrapper(
+ routers.update, # pyright: ignore[reportDeprecated],
+ )
)
self.list = to_raw_response_wrapper(
routers.list,
@@ -805,8 +810,10 @@ def __init__(self, routers: AsyncRoutersResource) -> None:
self.create = async_to_raw_response_wrapper(
routers.create,
)
- self.update = async_to_raw_response_wrapper(
- routers.update,
+ self.update = ( # pyright: ignore[reportDeprecated]
+ async_to_raw_response_wrapper(
+ routers.update, # pyright: ignore[reportDeprecated],
+ )
)
self.list = async_to_raw_response_wrapper(
routers.list,
@@ -832,8 +839,10 @@ def __init__(self, routers: RoutersResource) -> None:
self.create = to_streamed_response_wrapper(
routers.create,
)
- self.update = to_streamed_response_wrapper(
- routers.update,
+ self.update = ( # pyright: ignore[reportDeprecated]
+ to_streamed_response_wrapper(
+ routers.update, # pyright: ignore[reportDeprecated],
+ )
)
self.list = to_streamed_response_wrapper(
routers.list,
@@ -859,8 +868,10 @@ def __init__(self, routers: AsyncRoutersResource) -> None:
self.create = async_to_streamed_response_wrapper(
routers.create,
)
- self.update = async_to_streamed_response_wrapper(
- routers.update,
+ self.update = ( # pyright: ignore[reportDeprecated]
+ async_to_streamed_response_wrapper(
+ routers.update, # pyright: ignore[reportDeprecated],
+ )
)
self.list = async_to_streamed_response_wrapper(
routers.list,
diff --git a/src/gcore/resources/cloud/projects.py b/src/gcore/resources/cloud/projects.py
index 721ad20b..f8c47c0c 100644
--- a/src/gcore/resources/cloud/projects.py
+++ b/src/gcore/resources/cloud/projects.py
@@ -255,8 +255,7 @@ def get(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Project:
- """Get project.
-
+ """
Retrieve detailed information about a specific project.
Args:
@@ -510,8 +509,7 @@ async def get(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> Project:
- """Get project.
-
+ """
Retrieve detailed information about a specific project.
Args:
diff --git a/src/gcore/resources/cloud/tasks.py b/src/gcore/resources/cloud/tasks.py
index f88d9b39..46ddb0ef 100644
--- a/src/gcore/resources/cloud/tasks.py
+++ b/src/gcore/resources/cloud/tasks.py
@@ -170,7 +170,8 @@ def list(
'hard_reboot_gpu_virtual_server', 'hard_reboot_vm', 'patch_caas_container',
'patch_dbaas_postgres_cluster', 'patch_faas_function', 'patch_faas_namespace',
'patch_lblistener', 'patch_lbpool', 'put_into_server_group', 'put_l7rule',
- 'rebuild_bm', 'rebuild_gpu_baremetal_node', 'remove_from_server_group',
+ 'rebuild_bm', 'rebuild_gpu_baremetal_cluster', 'rebuild_gpu_baremetal_node',
+ 'rebuild_gpu_baremetal_server', 'remove_from_server_group',
'replace_lbmetadata', 'resize_k8s_cluster_v2', 'resize_loadbalancer',
'resize_vm', 'resume_vm', 'revert_volume', 'soft_reboot_gpu_baremetal_server',
'soft_reboot_gpu_virtual_cluster', 'soft_reboot_gpu_virtual_server',
@@ -180,9 +181,10 @@ def list(
'sync_private_flavors', 'update_ddos_profile', 'update_floating_ip',
'update_inference_application', 'update_inference_instance',
'update_k8s_cluster_v2', 'update_l7policy', 'update_lbmetadata',
- 'update_port_allowed_address_pairs', 'update_router', 'update_security_group',
- 'update_sfs', 'update_tags_gpu_virtual_cluster', 'upgrade_k8s_cluster_v2',
- 'upscale_ai_cluster_gpu', 'upscale_gpu_virtual_cluster']
+ 'update_loadbalancer', 'update_port_allowed_address_pairs', 'update_router',
+ 'update_security_group', 'update_sfs', 'update_tags_gpu_virtual_cluster',
+ 'upgrade_k8s_cluster_v2', 'upscale_ai_cluster_gpu',
+ 'upscale_gpu_virtual_cluster']
to_timestamp: ISO formatted datetime string. Filter the tasks by creation date less than or
equal to `to_timestamp`
@@ -484,7 +486,8 @@ def list(
'hard_reboot_gpu_virtual_server', 'hard_reboot_vm', 'patch_caas_container',
'patch_dbaas_postgres_cluster', 'patch_faas_function', 'patch_faas_namespace',
'patch_lblistener', 'patch_lbpool', 'put_into_server_group', 'put_l7rule',
- 'rebuild_bm', 'rebuild_gpu_baremetal_node', 'remove_from_server_group',
+ 'rebuild_bm', 'rebuild_gpu_baremetal_cluster', 'rebuild_gpu_baremetal_node',
+ 'rebuild_gpu_baremetal_server', 'remove_from_server_group',
'replace_lbmetadata', 'resize_k8s_cluster_v2', 'resize_loadbalancer',
'resize_vm', 'resume_vm', 'revert_volume', 'soft_reboot_gpu_baremetal_server',
'soft_reboot_gpu_virtual_cluster', 'soft_reboot_gpu_virtual_server',
@@ -494,9 +497,10 @@ def list(
'sync_private_flavors', 'update_ddos_profile', 'update_floating_ip',
'update_inference_application', 'update_inference_instance',
'update_k8s_cluster_v2', 'update_l7policy', 'update_lbmetadata',
- 'update_port_allowed_address_pairs', 'update_router', 'update_security_group',
- 'update_sfs', 'update_tags_gpu_virtual_cluster', 'upgrade_k8s_cluster_v2',
- 'upscale_ai_cluster_gpu', 'upscale_gpu_virtual_cluster']
+ 'update_loadbalancer', 'update_port_allowed_address_pairs', 'update_router',
+ 'update_security_group', 'update_sfs', 'update_tags_gpu_virtual_cluster',
+ 'upgrade_k8s_cluster_v2', 'upscale_ai_cluster_gpu',
+ 'upscale_gpu_virtual_cluster']
to_timestamp: ISO formatted datetime string. Filter the tasks by creation date less than or
equal to `to_timestamp`
diff --git a/src/gcore/resources/fastedge/apps/apps.py b/src/gcore/resources/fastedge/apps/apps.py
index 21e9fb4c..c415ced9 100644
--- a/src/gcore/resources/fastedge/apps/apps.py
+++ b/src/gcore/resources/fastedge/apps/apps.py
@@ -70,7 +70,7 @@ def create(
rsp_headers: Dict[str, str] | Omit = omit,
secrets: Dict[str, app_create_params.Secrets] | Omit = omit,
status: int | Omit = omit,
- stores: Dict[str, int] | Omit = omit,
+ stores: Dict[str, app_create_params.Stores] | Omit = omit,
template: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -108,7 +108,7 @@ def create(
4 - daily call limit exceeded
5 - suspended
- stores: KV stores for the app
+ stores: Application edge stores
template: Template ID
@@ -157,7 +157,7 @@ def update(
rsp_headers: Dict[str, str] | Omit = omit,
secrets: Dict[str, app_update_params.Secrets] | Omit = omit,
status: int | Omit = omit,
- stores: Dict[str, int] | Omit = omit,
+ stores: Dict[str, app_update_params.Stores] | Omit = omit,
template: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -195,7 +195,7 @@ def update(
4 - daily call limit exceeded
5 - suspended
- stores: KV stores for the app
+ stores: Application edge stores
template: Template ID
@@ -463,7 +463,7 @@ async def create(
rsp_headers: Dict[str, str] | Omit = omit,
secrets: Dict[str, app_create_params.Secrets] | Omit = omit,
status: int | Omit = omit,
- stores: Dict[str, int] | Omit = omit,
+ stores: Dict[str, app_create_params.Stores] | Omit = omit,
template: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -501,7 +501,7 @@ async def create(
4 - daily call limit exceeded
5 - suspended
- stores: KV stores for the app
+ stores: Application edge stores
template: Template ID
@@ -550,7 +550,7 @@ async def update(
rsp_headers: Dict[str, str] | Omit = omit,
secrets: Dict[str, app_update_params.Secrets] | Omit = omit,
status: int | Omit = omit,
- stores: Dict[str, int] | Omit = omit,
+ stores: Dict[str, app_update_params.Stores] | Omit = omit,
template: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -588,7 +588,7 @@ async def update(
4 - daily call limit exceeded
5 - suspended
- stores: KV stores for the app
+ stores: Application edge stores
template: Template ID
diff --git a/src/gcore/resources/fastedge/kv_stores.py b/src/gcore/resources/fastedge/kv_stores.py
index 42193e54..34e59741 100644
--- a/src/gcore/resources/fastedge/kv_stores.py
+++ b/src/gcore/resources/fastedge/kv_stores.py
@@ -17,8 +17,8 @@
from ..._base_client import make_request_options
from ...types.fastedge import kv_store_list_params, kv_store_create_params, kv_store_replace_params
from ...types.fastedge.kv_store import KvStore
-from ...types.fastedge.kv_store_get_response import KvStoreGetResponse
from ...types.fastedge.kv_store_list_response import KvStoreListResponse
+from ...types.fastedge.kv_store_create_response import KvStoreCreateResponse
__all__ = ["KvStoresResource", "AsyncKvStoresResource"]
@@ -46,6 +46,7 @@ def with_streaming_response(self) -> KvStoresResourceWithStreamingResponse:
def create(
self,
*,
+ name: str,
byod: kv_store_create_params.Byod | Omit = omit,
comment: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -54,11 +55,13 @@ def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> KvStore:
+ ) -> KvStoreCreateResponse:
"""
- Add a new KV store
+ Add a new Edge store
Args:
+ name: A name of the store
+
byod: BYOD (Bring Your Own Data) settings
comment: A description of the store
@@ -75,6 +78,7 @@ def create(
"/fastedge/v1/kv",
body=maybe_transform(
{
+ "name": name,
"byod": byod,
"comment": comment,
},
@@ -83,13 +87,15 @@ def create(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=KvStore,
+ cast_to=KvStoreCreateResponse,
)
def list(
self,
*,
app_id: int | Omit = omit,
+ limit: int | Omit = omit,
+ offset: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -98,11 +104,15 @@ def list(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> KvStoreListResponse:
"""
- List available stores
+ List available edge stores
Args:
app_id: App ID
+ limit: Limit for pagination
+
+ offset: Offset for pagination
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -118,7 +128,14 @@ def list(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- query=maybe_transform({"app_id": app_id}, kv_store_list_params.KvStoreListParams),
+ query=maybe_transform(
+ {
+ "app_id": app_id,
+ "limit": limit,
+ "offset": offset,
+ },
+ kv_store_list_params.KvStoreListParams,
+ ),
),
cast_to=KvStoreListResponse,
)
@@ -165,9 +182,9 @@ def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> KvStoreGetResponse:
+ ) -> KvStore:
"""
- Get store by id
+ Get the edge store by id
Args:
extra_headers: Send extra headers
@@ -183,13 +200,14 @@ def get(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=KvStoreGetResponse,
+ cast_to=KvStore,
)
def replace(
self,
id: int,
*,
+ name: str,
byod: kv_store_replace_params.Byod | Omit = omit,
comment: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -203,6 +221,8 @@ def replace(
Update a store
Args:
+ name: A name of the store
+
byod: BYOD (Bring Your Own Data) settings
comment: A description of the store
@@ -219,6 +239,7 @@ def replace(
f"/fastedge/v1/kv/{id}",
body=maybe_transform(
{
+ "name": name,
"byod": byod,
"comment": comment,
},
@@ -254,6 +275,7 @@ def with_streaming_response(self) -> AsyncKvStoresResourceWithStreamingResponse:
async def create(
self,
*,
+ name: str,
byod: kv_store_create_params.Byod | Omit = omit,
comment: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -262,11 +284,13 @@ async def create(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> KvStore:
+ ) -> KvStoreCreateResponse:
"""
- Add a new KV store
+ Add a new Edge store
Args:
+ name: A name of the store
+
byod: BYOD (Bring Your Own Data) settings
comment: A description of the store
@@ -283,6 +307,7 @@ async def create(
"/fastedge/v1/kv",
body=await async_maybe_transform(
{
+ "name": name,
"byod": byod,
"comment": comment,
},
@@ -291,13 +316,15 @@ async def create(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=KvStore,
+ cast_to=KvStoreCreateResponse,
)
async def list(
self,
*,
app_id: int | Omit = omit,
+ limit: int | Omit = omit,
+ offset: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
@@ -306,11 +333,15 @@ async def list(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> KvStoreListResponse:
"""
- List available stores
+ List available edge stores
Args:
app_id: App ID
+ limit: Limit for pagination
+
+ offset: Offset for pagination
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -326,7 +357,14 @@ async def list(
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
- query=await async_maybe_transform({"app_id": app_id}, kv_store_list_params.KvStoreListParams),
+ query=await async_maybe_transform(
+ {
+ "app_id": app_id,
+ "limit": limit,
+ "offset": offset,
+ },
+ kv_store_list_params.KvStoreListParams,
+ ),
),
cast_to=KvStoreListResponse,
)
@@ -373,9 +411,9 @@ async def get(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> KvStoreGetResponse:
+ ) -> KvStore:
"""
- Get store by id
+ Get the edge store by id
Args:
extra_headers: Send extra headers
@@ -391,13 +429,14 @@ async def get(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=KvStoreGetResponse,
+ cast_to=KvStore,
)
async def replace(
self,
id: int,
*,
+ name: str,
byod: kv_store_replace_params.Byod | Omit = omit,
comment: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -411,6 +450,8 @@ async def replace(
Update a store
Args:
+ name: A name of the store
+
byod: BYOD (Bring Your Own Data) settings
comment: A description of the store
@@ -427,6 +468,7 @@ async def replace(
f"/fastedge/v1/kv/{id}",
body=await async_maybe_transform(
{
+ "name": name,
"byod": byod,
"comment": comment,
},
diff --git a/src/gcore/resources/waap/domains/api_discovery.py b/src/gcore/resources/waap/domains/api_discovery.py
index 426426f5..f83862da 100644
--- a/src/gcore/resources/waap/domains/api_discovery.py
+++ b/src/gcore/resources/waap/domains/api_discovery.py
@@ -167,9 +167,9 @@ def list_scan_results(
ordering: Sort the response by given field.
- status: The different statuses a task result can have
+ status: Filter by the status of the scan
- type: The different types of scans that can be performed
+ type: Filter by the path of the scan type
extra_headers: Send extra headers
@@ -485,9 +485,9 @@ def list_scan_results(
ordering: Sort the response by given field.
- status: The different statuses a task result can have
+ status: Filter by the status of the scan
- type: The different types of scans that can be performed
+ type: Filter by the path of the scan type
extra_headers: Send extra headers
diff --git a/src/gcore/resources/waap/domains/api_paths.py b/src/gcore/resources/waap/domains/api_paths.py
index ea3057ec..cdc33365 100644
--- a/src/gcore/resources/waap/domains/api_paths.py
+++ b/src/gcore/resources/waap/domains/api_paths.py
@@ -211,13 +211,13 @@ def list(
api_version: Filter by the API version
- http_scheme: The different HTTP schemes an API path can have
+ http_scheme: Filter by the HTTP version of the API path
ids: Filter by the path ID
limit: Number of items to return
- method: The different methods an API path can have
+ method: Filter by the API RESTful method
offset: Number of items to skip
@@ -225,7 +225,7 @@ def list(
path: Filter by the path. Supports '\\**' as a wildcard character
- source: The different sources an API path can have
+ source: Filter by the source of the discovered API
status: Filter by the status of the discovered API path
@@ -529,13 +529,13 @@ def list(
api_version: Filter by the API version
- http_scheme: The different HTTP schemes an API path can have
+ http_scheme: Filter by the HTTP version of the API path
ids: Filter by the path ID
limit: Number of items to return
- method: The different methods an API path can have
+ method: Filter by the API RESTful method
offset: Number of items to skip
@@ -543,7 +543,7 @@ def list(
path: Filter by the path. Supports '\\**' as a wildcard character
- source: The different sources an API path can have
+ source: Filter by the source of the discovered API
status: Filter by the status of the discovered API path
diff --git a/src/gcore/resources/waap/domains/statistics.py b/src/gcore/resources/waap/domains/statistics.py
index 225b0f77..e990b52d 100644
--- a/src/gcore/resources/waap/domains/statistics.py
+++ b/src/gcore/resources/waap/domains/statistics.py
@@ -407,6 +407,7 @@ def get_requests_series(
model=WaapRequestSummary,
)
+ @typing_extensions.deprecated("deprecated")
def get_traffic_series(
self,
domain_id: int,
@@ -421,10 +422,11 @@ def get_traffic_series(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> StatisticGetTrafficSeriesResponse:
- """
- Retrieves a comprehensive report on a domain's traffic statistics based on
- Clickhouse. The report includes details such as API requests, blocked events,
- error counts, and many more traffic-related metrics.
+ """Deprecated.
+
+ Use
+ [GET /v1/analytics/traffic](/docs/api-reference/waap/analytics/get-traffic-data)
+ instead.
Args:
domain_id: The domain ID
@@ -833,6 +835,7 @@ def get_requests_series(
model=WaapRequestSummary,
)
+ @typing_extensions.deprecated("deprecated")
async def get_traffic_series(
self,
domain_id: int,
@@ -847,10 +850,11 @@ async def get_traffic_series(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> StatisticGetTrafficSeriesResponse:
- """
- Retrieves a comprehensive report on a domain's traffic statistics based on
- Clickhouse. The report includes details such as API requests, blocked events,
- error counts, and many more traffic-related metrics.
+ """Deprecated.
+
+ Use
+ [GET /v1/analytics/traffic](/docs/api-reference/waap/analytics/get-traffic-data)
+ instead.
Args:
domain_id: The domain ID
@@ -911,8 +915,10 @@ def __init__(self, statistics: StatisticsResource) -> None:
statistics.get_requests_series, # pyright: ignore[reportDeprecated],
)
)
- self.get_traffic_series = to_raw_response_wrapper(
- statistics.get_traffic_series,
+ self.get_traffic_series = ( # pyright: ignore[reportDeprecated]
+ to_raw_response_wrapper(
+ statistics.get_traffic_series, # pyright: ignore[reportDeprecated],
+ )
)
@@ -937,8 +943,10 @@ def __init__(self, statistics: AsyncStatisticsResource) -> None:
statistics.get_requests_series, # pyright: ignore[reportDeprecated],
)
)
- self.get_traffic_series = async_to_raw_response_wrapper(
- statistics.get_traffic_series,
+ self.get_traffic_series = ( # pyright: ignore[reportDeprecated]
+ async_to_raw_response_wrapper(
+ statistics.get_traffic_series, # pyright: ignore[reportDeprecated],
+ )
)
@@ -963,8 +971,10 @@ def __init__(self, statistics: StatisticsResource) -> None:
statistics.get_requests_series, # pyright: ignore[reportDeprecated],
)
)
- self.get_traffic_series = to_streamed_response_wrapper(
- statistics.get_traffic_series,
+ self.get_traffic_series = ( # pyright: ignore[reportDeprecated]
+ to_streamed_response_wrapper(
+ statistics.get_traffic_series, # pyright: ignore[reportDeprecated],
+ )
)
@@ -989,6 +999,8 @@ def __init__(self, statistics: AsyncStatisticsResource) -> None:
statistics.get_requests_series, # pyright: ignore[reportDeprecated],
)
)
- self.get_traffic_series = async_to_streamed_response_wrapper(
- statistics.get_traffic_series,
+ self.get_traffic_series = ( # pyright: ignore[reportDeprecated]
+ async_to_streamed_response_wrapper(
+ statistics.get_traffic_series, # pyright: ignore[reportDeprecated],
+ )
)
diff --git a/src/gcore/resources/waap/insights.py b/src/gcore/resources/waap/insights.py
index 5de0a968..c9fc4370 100644
--- a/src/gcore/resources/waap/insights.py
+++ b/src/gcore/resources/waap/insights.py
@@ -76,7 +76,7 @@ def list_types(
ordering: Sort the response by given field.
- slug: The slug of the insight type
+ slug: Filter by the slug of the insight type
extra_headers: Send extra headers
@@ -161,7 +161,7 @@ def list_types(
ordering: Sort the response by given field.
- slug: The slug of the insight type
+ slug: Filter by the slug of the insight type
extra_headers: Send extra headers
diff --git a/src/gcore/types/cdn/cdn_resource.py b/src/gcore/types/cdn/cdn_resource.py
index 0bcef26f..7e143119 100644
--- a/src/gcore/types/cdn/cdn_resource.py
+++ b/src/gcore/types/cdn/cdn_resource.py
@@ -399,7 +399,7 @@ class OptionsFastedgeOnRequestBody(BaseModel):
class OptionsFastedgeOnRequestHeaders(BaseModel):
"""
- Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request.
+ Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request, **before cache**.
"""
app_id: str
@@ -494,7 +494,7 @@ class OptionsFastedge(BaseModel):
on_request_headers: Optional[OptionsFastedgeOnRequestHeaders] = None
"""
Allows to configure FastEdge application that will be called to handle request
- headers as soon as CDN receives incoming HTTP request.
+ headers as soon as CDN receives incoming HTTP request, **before cache**.
"""
on_response_body: Optional[OptionsFastedgeOnResponseBody] = None
@@ -2114,10 +2114,7 @@ class CDNResource(BaseModel):
"""
origin_group: Optional[int] = FieldInfo(alias="originGroup", default=None)
- """Origin group ID with which the CDN resource is associated.
-
- You can use either the `origin` or `originGroup` parameter in the request.
- """
+ """Origin group ID with which the CDN resource is associated."""
origin_group_name: Optional[str] = FieldInfo(alias="originGroup_name", default=None)
"""Origin group name."""
diff --git a/src/gcore/types/cdn/cdn_resource_create_params.py b/src/gcore/types/cdn/cdn_resource_create_params.py
index a7f775a8..58df5896 100644
--- a/src/gcore/types/cdn/cdn_resource_create_params.py
+++ b/src/gcore/types/cdn/cdn_resource_create_params.py
@@ -78,18 +78,6 @@ class CDNResourceCreateParams(TypedDict, total=False):
Delivery domains should be added to your DNS settings.
"""
- origin: Required[str]
- """IP address or domain name of the origin and the port, if custom port is used.
-
- You can use either the `origin` or `originGroup` parameter in the request.
- """
-
- origin_group: Required[Annotated[int, PropertyInfo(alias="originGroup")]]
- """Origin group ID with which the CDN resource is associated.
-
- You can use either the `origin` or `originGroup` parameter in the request.
- """
-
active: bool
"""Enables or disables a CDN resource.
@@ -112,6 +100,20 @@ class CDNResourceCreateParams(TypedDict, total=False):
inherit its value from the global account settings.
"""
+ origin: str
+ """IP address or domain name of the origin and the port, if custom port is used.
+
+ Exactly one of `origin` or `originGroup` must be provided during resource
+ creation.
+ """
+
+ origin_group: Annotated[int, PropertyInfo(alias="originGroup")]
+ """Origin group ID with which the CDN resource is associated.
+
+ Exactly one of `origin` or `originGroup` must be provided during resource
+ creation.
+ """
+
origin_protocol: Annotated[Literal["HTTP", "HTTPS", "MATCH"], PropertyInfo(alias="originProtocol")]
"""Protocol used by CDN servers to request content from an origin source.
@@ -522,7 +524,7 @@ class OptionsFastedgeOnRequestBody(TypedDict, total=False):
class OptionsFastedgeOnRequestHeaders(TypedDict, total=False):
"""
- Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request.
+ Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request, **before cache**.
"""
app_id: Required[str]
@@ -617,7 +619,7 @@ class OptionsFastedge(TypedDict, total=False):
on_request_headers: OptionsFastedgeOnRequestHeaders
"""
Allows to configure FastEdge application that will be called to handle request
- headers as soon as CDN receives incoming HTTP request.
+ headers as soon as CDN receives incoming HTTP request, **before cache**.
"""
on_response_body: OptionsFastedgeOnResponseBody
diff --git a/src/gcore/types/cdn/cdn_resource_replace_params.py b/src/gcore/types/cdn/cdn_resource_replace_params.py
index 0503cf07..352ca804 100644
--- a/src/gcore/types/cdn/cdn_resource_replace_params.py
+++ b/src/gcore/types/cdn/cdn_resource_replace_params.py
@@ -73,10 +73,7 @@
class CDNResourceReplaceParams(TypedDict, total=False):
origin_group: Required[Annotated[int, PropertyInfo(alias="originGroup")]]
- """Origin group ID with which the CDN resource is associated.
-
- You can use either the `origin` or `originGroup` parameter in the request.
- """
+ """Origin group ID with which the CDN resource is associated."""
active: bool
"""Enables or disables a CDN resource.
@@ -500,7 +497,7 @@ class OptionsFastedgeOnRequestBody(TypedDict, total=False):
class OptionsFastedgeOnRequestHeaders(TypedDict, total=False):
"""
- Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request.
+ Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request, **before cache**.
"""
app_id: Required[str]
@@ -595,7 +592,7 @@ class OptionsFastedge(TypedDict, total=False):
on_request_headers: OptionsFastedgeOnRequestHeaders
"""
Allows to configure FastEdge application that will be called to handle request
- headers as soon as CDN receives incoming HTTP request.
+ headers as soon as CDN receives incoming HTTP request, **before cache**.
"""
on_response_body: OptionsFastedgeOnResponseBody
diff --git a/src/gcore/types/cdn/cdn_resource_update_params.py b/src/gcore/types/cdn/cdn_resource_update_params.py
index 9011c2e0..4a907f53 100644
--- a/src/gcore/types/cdn/cdn_resource_update_params.py
+++ b/src/gcore/types/cdn/cdn_resource_update_params.py
@@ -95,10 +95,7 @@ class CDNResourceUpdateParams(TypedDict, total=False):
"""
origin_group: Annotated[int, PropertyInfo(alias="originGroup")]
- """Origin group ID with which the CDN resource is associated.
-
- You can use either the `origin` or `originGroup` parameter in the request.
- """
+ """Origin group ID with which the CDN resource is associated."""
origin_protocol: Annotated[Literal["HTTP", "HTTPS", "MATCH"], PropertyInfo(alias="originProtocol")]
"""Protocol used by CDN servers to request content from an origin source.
@@ -491,7 +488,7 @@ class OptionsFastedgeOnRequestBody(TypedDict, total=False):
class OptionsFastedgeOnRequestHeaders(TypedDict, total=False):
"""
- Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request.
+ Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request, **before cache**.
"""
app_id: Required[str]
@@ -586,7 +583,7 @@ class OptionsFastedge(TypedDict, total=False):
on_request_headers: OptionsFastedgeOnRequestHeaders
"""
Allows to configure FastEdge application that will be called to handle request
- headers as soon as CDN receives incoming HTTP request.
+ headers as soon as CDN receives incoming HTTP request, **before cache**.
"""
on_response_body: OptionsFastedgeOnResponseBody
diff --git a/src/gcore/types/cdn/cdn_resources/cdn_resource_rule.py b/src/gcore/types/cdn/cdn_resources/cdn_resource_rule.py
index 682384fd..6c3b02bf 100644
--- a/src/gcore/types/cdn/cdn_resources/cdn_resource_rule.py
+++ b/src/gcore/types/cdn/cdn_resources/cdn_resource_rule.py
@@ -394,7 +394,7 @@ class OptionsFastedgeOnRequestBody(BaseModel):
class OptionsFastedgeOnRequestHeaders(BaseModel):
"""
- Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request.
+ Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request, **before cache**.
"""
app_id: str
@@ -489,7 +489,7 @@ class OptionsFastedge(BaseModel):
on_request_headers: Optional[OptionsFastedgeOnRequestHeaders] = None
"""
Allows to configure FastEdge application that will be called to handle request
- headers as soon as CDN receives incoming HTTP request.
+ headers as soon as CDN receives incoming HTTP request, **before cache**.
"""
on_response_body: Optional[OptionsFastedgeOnResponseBody] = None
diff --git a/src/gcore/types/cdn/cdn_resources/rule_create_params.py b/src/gcore/types/cdn/cdn_resources/rule_create_params.py
index 052803bb..0426cd93 100644
--- a/src/gcore/types/cdn/cdn_resources/rule_create_params.py
+++ b/src/gcore/types/cdn/cdn_resources/rule_create_params.py
@@ -470,7 +470,7 @@ class OptionsFastedgeOnRequestBody(TypedDict, total=False):
class OptionsFastedgeOnRequestHeaders(TypedDict, total=False):
"""
- Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request.
+ Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request, **before cache**.
"""
app_id: Required[str]
@@ -565,7 +565,7 @@ class OptionsFastedge(TypedDict, total=False):
on_request_headers: OptionsFastedgeOnRequestHeaders
"""
Allows to configure FastEdge application that will be called to handle request
- headers as soon as CDN receives incoming HTTP request.
+ headers as soon as CDN receives incoming HTTP request, **before cache**.
"""
on_response_body: OptionsFastedgeOnResponseBody
diff --git a/src/gcore/types/cdn/cdn_resources/rule_replace_params.py b/src/gcore/types/cdn/cdn_resources/rule_replace_params.py
index 86fb2b30..4cbdefaf 100644
--- a/src/gcore/types/cdn/cdn_resources/rule_replace_params.py
+++ b/src/gcore/types/cdn/cdn_resources/rule_replace_params.py
@@ -472,7 +472,7 @@ class OptionsFastedgeOnRequestBody(TypedDict, total=False):
class OptionsFastedgeOnRequestHeaders(TypedDict, total=False):
"""
- Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request.
+ Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request, **before cache**.
"""
app_id: Required[str]
@@ -567,7 +567,7 @@ class OptionsFastedge(TypedDict, total=False):
on_request_headers: OptionsFastedgeOnRequestHeaders
"""
Allows to configure FastEdge application that will be called to handle request
- headers as soon as CDN receives incoming HTTP request.
+ headers as soon as CDN receives incoming HTTP request, **before cache**.
"""
on_response_body: OptionsFastedgeOnResponseBody
diff --git a/src/gcore/types/cdn/cdn_resources/rule_update_params.py b/src/gcore/types/cdn/cdn_resources/rule_update_params.py
index c4ae3b10..b98453ba 100644
--- a/src/gcore/types/cdn/cdn_resources/rule_update_params.py
+++ b/src/gcore/types/cdn/cdn_resources/rule_update_params.py
@@ -472,7 +472,7 @@ class OptionsFastedgeOnRequestBody(TypedDict, total=False):
class OptionsFastedgeOnRequestHeaders(TypedDict, total=False):
"""
- Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request.
+ Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request, **before cache**.
"""
app_id: Required[str]
@@ -567,7 +567,7 @@ class OptionsFastedge(TypedDict, total=False):
on_request_headers: OptionsFastedgeOnRequestHeaders
"""
Allows to configure FastEdge application that will be called to handle request
- headers as soon as CDN receives incoming HTTP request.
+ headers as soon as CDN receives incoming HTTP request, **before cache**.
"""
on_response_body: OptionsFastedgeOnResponseBody
diff --git a/src/gcore/types/cdn/logs_uploader/logs_uploader_target.py b/src/gcore/types/cdn/logs_uploader/logs_uploader_target.py
index 786af310..e5f040a9 100644
--- a/src/gcore/types/cdn/logs_uploader/logs_uploader_target.py
+++ b/src/gcore/types/cdn/logs_uploader/logs_uploader_target.py
@@ -59,6 +59,8 @@ class ConfigUnionMember2(BaseModel):
directory: Optional[str] = None
+ endpoint: Optional[str] = None
+
region: Optional[str] = None
diff --git a/src/gcore/types/cdn/logs_uploader/target_create_params.py b/src/gcore/types/cdn/logs_uploader/target_create_params.py
index f8d8e8e9..d48e6374 100644
--- a/src/gcore/types/cdn/logs_uploader/target_create_params.py
+++ b/src/gcore/types/cdn/logs_uploader/target_create_params.py
@@ -78,6 +78,8 @@ class ConfigS3OssConfig(TypedDict, total=False):
directory: Optional[str]
+ endpoint: Optional[str]
+
region: Optional[str]
diff --git a/src/gcore/types/cdn/logs_uploader/target_replace_params.py b/src/gcore/types/cdn/logs_uploader/target_replace_params.py
index 77281c94..2a97435c 100644
--- a/src/gcore/types/cdn/logs_uploader/target_replace_params.py
+++ b/src/gcore/types/cdn/logs_uploader/target_replace_params.py
@@ -78,6 +78,8 @@ class ConfigS3OssConfig(TypedDict, total=False):
directory: Optional[str]
+ endpoint: Optional[str]
+
region: Optional[str]
diff --git a/src/gcore/types/cdn/logs_uploader/target_update_params.py b/src/gcore/types/cdn/logs_uploader/target_update_params.py
index e93ab4d9..34730db0 100644
--- a/src/gcore/types/cdn/logs_uploader/target_update_params.py
+++ b/src/gcore/types/cdn/logs_uploader/target_update_params.py
@@ -78,6 +78,8 @@ class ConfigS3OssConfig(TypedDict, total=False):
directory: Optional[str]
+ endpoint: Optional[str]
+
region: Optional[str]
diff --git a/src/gcore/types/cdn/rule_template.py b/src/gcore/types/cdn/rule_template.py
index e23d3805..a2eb3725 100644
--- a/src/gcore/types/cdn/rule_template.py
+++ b/src/gcore/types/cdn/rule_template.py
@@ -394,7 +394,7 @@ class OptionsFastedgeOnRequestBody(BaseModel):
class OptionsFastedgeOnRequestHeaders(BaseModel):
"""
- Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request.
+ Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request, **before cache**.
"""
app_id: str
@@ -489,7 +489,7 @@ class OptionsFastedge(BaseModel):
on_request_headers: Optional[OptionsFastedgeOnRequestHeaders] = None
"""
Allows to configure FastEdge application that will be called to handle request
- headers as soon as CDN receives incoming HTTP request.
+ headers as soon as CDN receives incoming HTTP request, **before cache**.
"""
on_response_body: Optional[OptionsFastedgeOnResponseBody] = None
diff --git a/src/gcore/types/cdn/rule_template_create_params.py b/src/gcore/types/cdn/rule_template_create_params.py
index 6d44873b..1a4d8a41 100644
--- a/src/gcore/types/cdn/rule_template_create_params.py
+++ b/src/gcore/types/cdn/rule_template_create_params.py
@@ -454,7 +454,7 @@ class OptionsFastedgeOnRequestBody(TypedDict, total=False):
class OptionsFastedgeOnRequestHeaders(TypedDict, total=False):
"""
- Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request.
+ Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request, **before cache**.
"""
app_id: Required[str]
@@ -549,7 +549,7 @@ class OptionsFastedge(TypedDict, total=False):
on_request_headers: OptionsFastedgeOnRequestHeaders
"""
Allows to configure FastEdge application that will be called to handle request
- headers as soon as CDN receives incoming HTTP request.
+ headers as soon as CDN receives incoming HTTP request, **before cache**.
"""
on_response_body: OptionsFastedgeOnResponseBody
diff --git a/src/gcore/types/cdn/rule_template_replace_params.py b/src/gcore/types/cdn/rule_template_replace_params.py
index 7dba15b1..2fe52fdc 100644
--- a/src/gcore/types/cdn/rule_template_replace_params.py
+++ b/src/gcore/types/cdn/rule_template_replace_params.py
@@ -454,7 +454,7 @@ class OptionsFastedgeOnRequestBody(TypedDict, total=False):
class OptionsFastedgeOnRequestHeaders(TypedDict, total=False):
"""
- Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request.
+ Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request, **before cache**.
"""
app_id: Required[str]
@@ -549,7 +549,7 @@ class OptionsFastedge(TypedDict, total=False):
on_request_headers: OptionsFastedgeOnRequestHeaders
"""
Allows to configure FastEdge application that will be called to handle request
- headers as soon as CDN receives incoming HTTP request.
+ headers as soon as CDN receives incoming HTTP request, **before cache**.
"""
on_response_body: OptionsFastedgeOnResponseBody
diff --git a/src/gcore/types/cdn/rule_template_update_params.py b/src/gcore/types/cdn/rule_template_update_params.py
index 37b2ec5b..cccc6bc0 100644
--- a/src/gcore/types/cdn/rule_template_update_params.py
+++ b/src/gcore/types/cdn/rule_template_update_params.py
@@ -454,7 +454,7 @@ class OptionsFastedgeOnRequestBody(TypedDict, total=False):
class OptionsFastedgeOnRequestHeaders(TypedDict, total=False):
"""
- Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request.
+ Allows to configure FastEdge application that will be called to handle request headers as soon as CDN receives incoming HTTP request, **before cache**.
"""
app_id: Required[str]
@@ -549,7 +549,7 @@ class OptionsFastedge(TypedDict, total=False):
on_request_headers: OptionsFastedgeOnRequestHeaders
"""
Allows to configure FastEdge application that will be called to handle request
- headers as soon as CDN receives incoming HTTP request.
+ headers as soon as CDN receives incoming HTTP request, **before cache**.
"""
on_response_body: OptionsFastedgeOnResponseBody
diff --git a/src/gcore/types/cloud/health_monitor.py b/src/gcore/types/cloud/health_monitor.py
index 501c3782..44b8ab67 100644
--- a/src/gcore/types/cloud/health_monitor.py
+++ b/src/gcore/types/cloud/health_monitor.py
@@ -19,8 +19,7 @@ class HealthMonitor(BaseModel):
"""Administrative state of the resource.
When set to true, the resource is enabled and operational. When set to false,
- the resource is disabled and will not process traffic. When null is passed, the
- value is skipped and defaults to true.
+ the resource is disabled and will not process traffic. Defaults to true.
"""
delay: int
diff --git a/src/gcore/types/cloud/k8s/cluster_create_params.py b/src/gcore/types/cloud/k8s/cluster_create_params.py
index 8f97757c..6888e441 100644
--- a/src/gcore/types/cloud/k8s/cluster_create_params.py
+++ b/src/gcore/types/cloud/k8s/cluster_create_params.py
@@ -27,8 +27,10 @@
class ClusterCreateParams(TypedDict, total=False):
project_id: int
+ """Project ID"""
region_id: int
+ """Region ID"""
keypair: Required[str]
"""The keypair of the cluster"""
@@ -211,6 +213,8 @@ class AddOnsSlurm(TypedDict, total=False):
Each Slurm worker node will be backed by a Pod scheduled on one of cluster's GPU
nodes.
+
+ Note: Downscaling (reducing worker count) is not supported.
"""
diff --git a/src/gcore/types/cloud/k8s/cluster_delete_params.py b/src/gcore/types/cloud/k8s/cluster_delete_params.py
index 49b5e580..e1b433ea 100644
--- a/src/gcore/types/cloud/k8s/cluster_delete_params.py
+++ b/src/gcore/types/cloud/k8s/cluster_delete_params.py
@@ -9,8 +9,10 @@
class ClusterDeleteParams(TypedDict, total=False):
project_id: int
+ """Project ID"""
region_id: int
+ """Region ID"""
volumes: str
"""Comma separated list of volume IDs to be deleted with the cluster"""
diff --git a/src/gcore/types/cloud/k8s/cluster_update_params.py b/src/gcore/types/cloud/k8s/cluster_update_params.py
index 4216b832..911a71e8 100644
--- a/src/gcore/types/cloud/k8s/cluster_update_params.py
+++ b/src/gcore/types/cloud/k8s/cluster_update_params.py
@@ -26,8 +26,10 @@
class ClusterUpdateParams(TypedDict, total=False):
project_id: int
+ """Project ID"""
region_id: int
+ """Region ID"""
add_ons: AddOns
"""Cluster add-ons configuration"""
@@ -131,6 +133,8 @@ class AddOnsSlurmK8SClusterSlurmAddonEnableV2Serializer(TypedDict, total=False):
Each Slurm worker node will be backed by a Pod scheduled on one of cluster's GPU
nodes.
+
+ Note: Downscaling (reducing worker count) is not supported.
"""
diff --git a/src/gcore/types/cloud/k8s/cluster_upgrade_params.py b/src/gcore/types/cloud/k8s/cluster_upgrade_params.py
index 5301fc15..dd92d0ac 100644
--- a/src/gcore/types/cloud/k8s/cluster_upgrade_params.py
+++ b/src/gcore/types/cloud/k8s/cluster_upgrade_params.py
@@ -9,8 +9,10 @@
class ClusterUpgradeParams(TypedDict, total=False):
project_id: int
+ """Project ID"""
region_id: int
+ """Region ID"""
version: Required[str]
"""Target k8s cluster version"""
diff --git a/src/gcore/types/cloud/k8s/clusters/node_list_params.py b/src/gcore/types/cloud/k8s/clusters/node_list_params.py
index 027c6cf4..390c627e 100644
--- a/src/gcore/types/cloud/k8s/clusters/node_list_params.py
+++ b/src/gcore/types/cloud/k8s/clusters/node_list_params.py
@@ -9,8 +9,10 @@
class NodeListParams(TypedDict, total=False):
project_id: int
+ """Project ID"""
region_id: int
+ """Region ID"""
with_ddos: bool
"""Include DDoS profile information if set to true. Default is false."""
diff --git a/src/gcore/types/cloud/k8s/clusters/pool_create_params.py b/src/gcore/types/cloud/k8s/clusters/pool_create_params.py
index f7b626a9..c7fa5d12 100644
--- a/src/gcore/types/cloud/k8s/clusters/pool_create_params.py
+++ b/src/gcore/types/cloud/k8s/clusters/pool_create_params.py
@@ -10,8 +10,10 @@
class PoolCreateParams(TypedDict, total=False):
project_id: int
+ """Project ID"""
region_id: int
+ """Region ID"""
flavor_id: Required[str]
"""Flavor ID"""
diff --git a/src/gcore/types/cloud/k8s/clusters/pool_resize_params.py b/src/gcore/types/cloud/k8s/clusters/pool_resize_params.py
index 60450f3e..356f779d 100644
--- a/src/gcore/types/cloud/k8s/clusters/pool_resize_params.py
+++ b/src/gcore/types/cloud/k8s/clusters/pool_resize_params.py
@@ -9,10 +9,13 @@
class PoolResizeParams(TypedDict, total=False):
project_id: int
+ """Project ID"""
region_id: int
+ """Region ID"""
cluster_name: Required[str]
+ """Cluster name"""
node_count: Required[int]
"""Target node count"""
diff --git a/src/gcore/types/cloud/k8s/clusters/pool_update_params.py b/src/gcore/types/cloud/k8s/clusters/pool_update_params.py
index 16a46ed7..eb7c4b71 100644
--- a/src/gcore/types/cloud/k8s/clusters/pool_update_params.py
+++ b/src/gcore/types/cloud/k8s/clusters/pool_update_params.py
@@ -10,10 +10,13 @@
class PoolUpdateParams(TypedDict, total=False):
project_id: int
+ """Project ID"""
region_id: int
+ """Region ID"""
cluster_name: Required[str]
+ """Cluster name"""
auto_healing_enabled: Optional[bool]
"""Enable/disable auto healing"""
diff --git a/src/gcore/types/cloud/k8s/clusters/pools/node_list_params.py b/src/gcore/types/cloud/k8s/clusters/pools/node_list_params.py
index 9a31c51b..fd6f0bb2 100644
--- a/src/gcore/types/cloud/k8s/clusters/pools/node_list_params.py
+++ b/src/gcore/types/cloud/k8s/clusters/pools/node_list_params.py
@@ -9,10 +9,13 @@
class NodeListParams(TypedDict, total=False):
project_id: int
+ """Project ID"""
region_id: int
+ """Region ID"""
cluster_name: Required[str]
+ """Cluster name"""
with_ddos: bool
"""Include DDoS profile information if set to true. Default is false."""
diff --git a/src/gcore/types/cloud/k8s/flavor_list_params.py b/src/gcore/types/cloud/k8s/flavor_list_params.py
index 26890db9..10232583 100644
--- a/src/gcore/types/cloud/k8s/flavor_list_params.py
+++ b/src/gcore/types/cloud/k8s/flavor_list_params.py
@@ -9,11 +9,16 @@
class FlavorListParams(TypedDict, total=False):
project_id: int
+ """Project ID"""
region_id: int
+ """Region ID"""
exclude_gpu: bool
- """Set to false to include GPU flavors. Default is True."""
+ """Set to true to exclude GPU flavors. Default is false."""
+
+ include_capacity: bool
+ """Set to true to include flavor capacity. Default is False."""
include_prices: bool
"""Set to true to include flavor prices. Default is False."""
diff --git a/src/gcore/types/cloud/k8s/k8s_cluster.py b/src/gcore/types/cloud/k8s/k8s_cluster.py
index c219d2fa..283626ba 100644
--- a/src/gcore/types/cloud/k8s/k8s_cluster.py
+++ b/src/gcore/types/cloud/k8s/k8s_cluster.py
@@ -48,6 +48,8 @@ class AddOnsSlurm(BaseModel):
Each Slurm worker node is backed by a Pod scheduled on one of cluster's GPU
nodes.
+
+ Note: Downscaling (reducing worker count) is not supported.
"""
diff --git a/src/gcore/types/cloud/k8s/k8s_cluster_kubeconfig.py b/src/gcore/types/cloud/k8s/k8s_cluster_kubeconfig.py
index 717dddc5..6ee2cccd 100644
--- a/src/gcore/types/cloud/k8s/k8s_cluster_kubeconfig.py
+++ b/src/gcore/types/cloud/k8s/k8s_cluster_kubeconfig.py
@@ -1,6 +1,5 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Optional
from datetime import datetime
from ...._models import BaseModel
@@ -21,11 +20,11 @@ class K8SClusterKubeconfig(BaseModel):
config: str
"""Cluster kubeconfig"""
- host: str
- """Cluster host"""
-
- created_at: Optional[datetime] = None
+ created_at: datetime
"""Kubeconfig creation date"""
- expires_at: Optional[datetime] = None
+ expires_at: datetime
"""Kubeconfig expiration date"""
+
+ host: str
+ """Cluster host"""
diff --git a/src/gcore/types/cloud/load_balancer.py b/src/gcore/types/cloud/load_balancer.py
index 1763aa95..ebd56ccd 100644
--- a/src/gcore/types/cloud/load_balancer.py
+++ b/src/gcore/types/cloud/load_balancer.py
@@ -62,6 +62,13 @@ class LoadBalancer(BaseModel):
id: str
"""Load balancer ID"""
+ admin_state_up: bool
+ """Administrative state of the resource.
+
+ When set to true, the resource is enabled and operational. When set to false,
+ the resource is disabled and will not process traffic. Defaults to true.
+ """
+
created_at: datetime
"""Datetime when the load balancer was created"""
diff --git a/src/gcore/types/cloud/load_balancer_create_params.py b/src/gcore/types/cloud/load_balancer_create_params.py
index 49939fac..8d56613c 100644
--- a/src/gcore/types/cloud/load_balancer_create_params.py
+++ b/src/gcore/types/cloud/load_balancer_create_params.py
@@ -154,6 +154,13 @@ class ListenerPoolHealthmonitor(TypedDict, total=False):
type: Required[LbHealthMonitorType]
"""Health monitor type. Once health monitor is created, cannot be changed."""
+ admin_state_up: bool
+ """Administrative state of the resource.
+
+ When set to true, the resource is enabled and operational. When set to false,
+ the resource is disabled and will not process traffic. Defaults to true.
+ """
+
expected_codes: Optional[str]
"""Expected HTTP response codes.
@@ -190,8 +197,7 @@ class ListenerPoolMember(TypedDict, total=False):
"""Administrative state of the resource.
When set to true, the resource is enabled and operational. When set to false,
- the resource is disabled and will not process traffic. When null is passed, the
- value is skipped and defaults to true.
+ the resource is disabled and will not process traffic. Defaults to true.
"""
backup: bool
@@ -338,7 +344,7 @@ class Listener(TypedDict, total=False):
pools: Iterable[ListenerPool]
"""Member pools"""
- secret_id: str
+ secret_id: Literal[""]
"""
ID of the secret where PKCS12 file is stored for `TERMINATED_HTTPS` or
PROMETHEUS listener
diff --git a/src/gcore/types/cloud/load_balancer_listener_detail.py b/src/gcore/types/cloud/load_balancer_listener_detail.py
index c04b3d43..c54675d9 100644
--- a/src/gcore/types/cloud/load_balancer_listener_detail.py
+++ b/src/gcore/types/cloud/load_balancer_listener_detail.py
@@ -23,6 +23,13 @@ class LoadBalancerListenerDetail(BaseModel):
id: str
"""Load balancer listener ID"""
+ admin_state_up: bool
+ """Administrative state of the resource.
+
+ When set to true, the resource is enabled and operational. When set to false,
+ the resource is disabled and will not process traffic. Defaults to true.
+ """
+
allowed_cidrs: Optional[List[str]] = None
"""Network CIDRs from which service will be accessible"""
diff --git a/src/gcore/types/cloud/load_balancer_pool.py b/src/gcore/types/cloud/load_balancer_pool.py
index 9b7267b2..3e67e0a0 100644
--- a/src/gcore/types/cloud/load_balancer_pool.py
+++ b/src/gcore/types/cloud/load_balancer_pool.py
@@ -28,6 +28,13 @@ class LoadBalancerPool(BaseModel):
id: str
"""Pool ID"""
+ admin_state_up: bool
+ """Administrative state of the resource.
+
+ When set to true, the resource is enabled and operational. When set to false,
+ the resource is disabled and will not process traffic. Defaults to true.
+ """
+
ca_secret_id: Optional[str] = None
"""Secret ID of CA certificate bundle"""
diff --git a/src/gcore/types/cloud/load_balancer_pool_list.py b/src/gcore/types/cloud/load_balancer_pool_list.py
index d846c6ca..08f1422a 100644
--- a/src/gcore/types/cloud/load_balancer_pool_list.py
+++ b/src/gcore/types/cloud/load_balancer_pool_list.py
@@ -44,6 +44,13 @@ class Result(BaseModel):
id: str
"""Pool ID"""
+ admin_state_up: bool
+ """Administrative state of the resource.
+
+ When set to true, the resource is enabled and operational. When set to false,
+ the resource is disabled and will not process traffic. Defaults to true.
+ """
+
ca_secret_id: Optional[str] = None
"""Secret ID of CA certificate bundle"""
diff --git a/src/gcore/types/cloud/load_balancers/listener_create_params.py b/src/gcore/types/cloud/load_balancers/listener_create_params.py
index c688d661..652ba39a 100644
--- a/src/gcore/types/cloud/load_balancers/listener_create_params.py
+++ b/src/gcore/types/cloud/load_balancers/listener_create_params.py
@@ -3,7 +3,7 @@
from __future__ import annotations
from typing import Iterable, Optional
-from typing_extensions import Required, TypedDict
+from typing_extensions import Literal, Required, TypedDict
from ...._types import SequenceNotStr
from ..lb_listener_protocol import LbListenerProtocol
@@ -48,7 +48,7 @@ class ListenerCreateParams(TypedDict, total=False):
Only used with HTTP or `TERMINATED_HTTPS` protocols.
"""
- secret_id: str
+ secret_id: Literal[""]
"""
ID of the secret where PKCS12 file is stored for `TERMINATED_HTTPS` or
PROMETHEUS listener
diff --git a/src/gcore/types/cloud/load_balancers/listener_update_params.py b/src/gcore/types/cloud/load_balancers/listener_update_params.py
index 002bb912..e537da9b 100644
--- a/src/gcore/types/cloud/load_balancers/listener_update_params.py
+++ b/src/gcore/types/cloud/load_balancers/listener_update_params.py
@@ -17,6 +17,13 @@ class ListenerUpdateParams(TypedDict, total=False):
region_id: int
"""Region ID"""
+ admin_state_up: bool
+ """Administrative state of the resource.
+
+ When set to true, the resource is enabled and operational. When set to false,
+ the resource is disabled and will not process traffic. Defaults to true.
+ """
+
allowed_cidrs: Optional[SequenceNotStr[str]]
"""Network CIDRs from which service will be accessible"""
diff --git a/src/gcore/types/cloud/load_balancers/pool_create_params.py b/src/gcore/types/cloud/load_balancers/pool_create_params.py
index 81987648..2feef950 100644
--- a/src/gcore/types/cloud/load_balancers/pool_create_params.py
+++ b/src/gcore/types/cloud/load_balancers/pool_create_params.py
@@ -82,6 +82,13 @@ class Healthmonitor(TypedDict, total=False):
type: Required[LbHealthMonitorType]
"""Health monitor type. Once health monitor is created, cannot be changed."""
+ admin_state_up: bool
+ """Administrative state of the resource.
+
+ When set to true, the resource is enabled and operational. When set to false,
+ the resource is disabled and will not process traffic. Defaults to true.
+ """
+
expected_codes: Optional[str]
"""Expected HTTP response codes.
@@ -118,8 +125,7 @@ class Member(TypedDict, total=False):
"""Administrative state of the resource.
When set to true, the resource is enabled and operational. When set to false,
- the resource is disabled and will not process traffic. When null is passed, the
- value is skipped and defaults to true.
+ the resource is disabled and will not process traffic. Defaults to true.
"""
backup: bool
diff --git a/src/gcore/types/cloud/load_balancers/pool_update_params.py b/src/gcore/types/cloud/load_balancers/pool_update_params.py
index b5a32f86..e18d418e 100644
--- a/src/gcore/types/cloud/load_balancers/pool_update_params.py
+++ b/src/gcore/types/cloud/load_balancers/pool_update_params.py
@@ -21,6 +21,13 @@ class PoolUpdateParams(TypedDict, total=False):
region_id: int
"""Region ID"""
+ admin_state_up: bool
+ """Administrative state of the resource.
+
+ When set to true, the resource is enabled and operational. When set to false,
+ the resource is disabled and will not process traffic. Defaults to true.
+ """
+
ca_secret_id: Optional[str]
"""Secret ID of CA certificate bundle"""
@@ -77,6 +84,13 @@ class Healthmonitor(TypedDict, total=False):
timeout: Required[int]
"""The maximum time to connect. Must be less than the delay value"""
+ admin_state_up: bool
+ """Administrative state of the resource.
+
+ When set to true, the resource is enabled and operational. When set to false,
+ the resource is disabled and will not process traffic. Defaults to true.
+ """
+
expected_codes: Optional[str]
"""Expected HTTP response codes.
@@ -116,8 +130,7 @@ class Member(TypedDict, total=False):
"""Administrative state of the resource.
When set to true, the resource is enabled and operational. When set to false,
- the resource is disabled and will not process traffic. When null is passed, the
- value is skipped and defaults to true.
+ the resource is disabled and will not process traffic. Defaults to true.
"""
backup: bool
diff --git a/src/gcore/types/cloud/load_balancers/pools/health_monitor_create_params.py b/src/gcore/types/cloud/load_balancers/pools/health_monitor_create_params.py
index d8de1a60..a1cabcbe 100644
--- a/src/gcore/types/cloud/load_balancers/pools/health_monitor_create_params.py
+++ b/src/gcore/types/cloud/load_balancers/pools/health_monitor_create_params.py
@@ -31,6 +31,13 @@ class HealthMonitorCreateParams(TypedDict, total=False):
type: Required[LbHealthMonitorType]
"""Health monitor type. Once health monitor is created, cannot be changed."""
+ admin_state_up: bool
+ """Administrative state of the resource.
+
+ When set to true, the resource is enabled and operational. When set to false,
+ the resource is disabled and will not process traffic. Defaults to true.
+ """
+
expected_codes: Optional[str]
"""Expected HTTP response codes.
diff --git a/src/gcore/types/cloud/load_balancers/pools/member_create_params.py b/src/gcore/types/cloud/load_balancers/pools/member_create_params.py
index ceab4077..b05d79d6 100644
--- a/src/gcore/types/cloud/load_balancers/pools/member_create_params.py
+++ b/src/gcore/types/cloud/load_balancers/pools/member_create_params.py
@@ -25,8 +25,7 @@ class MemberCreateParams(TypedDict, total=False):
"""Administrative state of the resource.
When set to true, the resource is enabled and operational. When set to false,
- the resource is disabled and will not process traffic. When null is passed, the
- value is skipped and defaults to true.
+ the resource is disabled and will not process traffic. Defaults to true.
"""
backup: bool
diff --git a/src/gcore/types/cloud/member.py b/src/gcore/types/cloud/member.py
index 98acfa1e..c9e2fc0d 100644
--- a/src/gcore/types/cloud/member.py
+++ b/src/gcore/types/cloud/member.py
@@ -20,8 +20,7 @@ class Member(BaseModel):
"""Administrative state of the resource.
When set to true, the resource is enabled and operational. When set to false,
- the resource is disabled and will not process traffic. When null is passed, the
- value is skipped and defaults to true.
+ the resource is disabled and will not process traffic. Defaults to true.
"""
backup: bool
diff --git a/src/gcore/types/cloud/task.py b/src/gcore/types/cloud/task.py
index 7eae7f01..3aea7a7a 100644
--- a/src/gcore/types/cloud/task.py
+++ b/src/gcore/types/cloud/task.py
@@ -148,8 +148,10 @@ class Task(BaseModel):
detailed_state: Optional[
Literal[
"CLUSTER_CLEAN_UP",
+ "CLUSTER_REBUILD",
"CLUSTER_RESIZE",
"CLUSTER_RESUME",
+ "CLUSTER_SERVER_REBUILD",
"CLUSTER_SUSPEND",
"ERROR",
"FINISHED",
diff --git a/src/gcore/types/cloud/task_list_params.py b/src/gcore/types/cloud/task_list_params.py
index 23658f26..9915c84e 100644
--- a/src/gcore/types/cloud/task_list_params.py
+++ b/src/gcore/types/cloud/task_list_params.py
@@ -89,7 +89,8 @@ class TaskListParams(TypedDict, total=False):
'hard_reboot_gpu_virtual_server', 'hard_reboot_vm', 'patch_caas_container',
'patch_dbaas_postgres_cluster', 'patch_faas_function', 'patch_faas_namespace',
'patch_lblistener', 'patch_lbpool', 'put_into_server_group', 'put_l7rule',
- 'rebuild_bm', 'rebuild_gpu_baremetal_node', 'remove_from_server_group',
+ 'rebuild_bm', 'rebuild_gpu_baremetal_cluster', 'rebuild_gpu_baremetal_node',
+ 'rebuild_gpu_baremetal_server', 'remove_from_server_group',
'replace_lbmetadata', 'resize_k8s_cluster_v2', 'resize_loadbalancer',
'resize_vm', 'resume_vm', 'revert_volume', 'soft_reboot_gpu_baremetal_server',
'soft_reboot_gpu_virtual_cluster', 'soft_reboot_gpu_virtual_server',
@@ -99,9 +100,10 @@ class TaskListParams(TypedDict, total=False):
'sync_private_flavors', 'update_ddos_profile', 'update_floating_ip',
'update_inference_application', 'update_inference_instance',
'update_k8s_cluster_v2', 'update_l7policy', 'update_lbmetadata',
- 'update_port_allowed_address_pairs', 'update_router', 'update_security_group',
- 'update_sfs', 'update_tags_gpu_virtual_cluster', 'upgrade_k8s_cluster_v2',
- 'upscale_ai_cluster_gpu', 'upscale_gpu_virtual_cluster']
+ 'update_loadbalancer', 'update_port_allowed_address_pairs', 'update_router',
+ 'update_security_group', 'update_sfs', 'update_tags_gpu_virtual_cluster',
+ 'upgrade_k8s_cluster_v2', 'upscale_ai_cluster_gpu',
+ 'upscale_gpu_virtual_cluster']
"""
to_timestamp: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
diff --git a/src/gcore/types/fastedge/__init__.py b/src/gcore/types/fastedge/__init__.py
index b09dc9e4..59553df9 100644
--- a/src/gcore/types/fastedge/__init__.py
+++ b/src/gcore/types/fastedge/__init__.py
@@ -15,7 +15,6 @@
from .secret_short import SecretShort as SecretShort
from .duration_stats import DurationStats as DurationStats
from .kv_store_short import KvStoreShort as KvStoreShort
-from .kv_store_stats import KvStoreStats as KvStoreStats
from .template_short import TemplateShort as TemplateShort
from .app_list_params import AppListParams as AppListParams
from .app_create_params import AppCreateParams as AppCreateParams
@@ -31,7 +30,6 @@
from .secret_list_response import SecretListResponse as SecretListResponse
from .secret_update_params import SecretUpdateParams as SecretUpdateParams
from .template_list_params import TemplateListParams as TemplateListParams
-from .kv_store_get_response import KvStoreGetResponse as KvStoreGetResponse
from .secret_replace_params import SecretReplaceParams as SecretReplaceParams
from .kv_store_create_params import KvStoreCreateParams as KvStoreCreateParams
from .kv_store_list_response import KvStoreListResponse as KvStoreListResponse
@@ -40,6 +38,7 @@
from .template_delete_params import TemplateDeleteParams as TemplateDeleteParams
from .kv_store_replace_params import KvStoreReplaceParams as KvStoreReplaceParams
from .template_replace_params import TemplateReplaceParams as TemplateReplaceParams
+from .kv_store_create_response import KvStoreCreateResponse as KvStoreCreateResponse
from .template_parameter_param import TemplateParameterParam as TemplateParameterParam
from .statistic_get_call_series_params import StatisticGetCallSeriesParams as StatisticGetCallSeriesParams
from .statistic_get_call_series_response import StatisticGetCallSeriesResponse as StatisticGetCallSeriesResponse
diff --git a/src/gcore/types/fastedge/app.py b/src/gcore/types/fastedge/app.py
index 8229b330..d8cb8b41 100644
--- a/src/gcore/types/fastedge/app.py
+++ b/src/gcore/types/fastedge/app.py
@@ -6,7 +6,7 @@
from ..._models import BaseModel
-__all__ = ["App", "Secrets"]
+__all__ = ["App", "Secrets", "Stores"]
class Secrets(BaseModel):
@@ -22,6 +22,19 @@ class Secrets(BaseModel):
"""The unique name of the secret."""
+class Stores(BaseModel):
+ """Application stores"""
+
+ id: int
+ """The identifier of the store"""
+
+ comment: Optional[str] = None
+ """A description of the store"""
+
+ name: Optional[str] = None
+ """The name of the store"""
+
+
class App(BaseModel):
api_type: Optional[str] = None
"""Wasm API type"""
@@ -70,8 +83,8 @@ class App(BaseModel):
5 - suspended
"""
- stores: Optional[Dict[str, int]] = None
- """KV stores for the app"""
+ stores: Optional[Dict[str, Stores]] = None
+ """Application edge stores"""
template: Optional[int] = None
"""Template ID"""
diff --git a/src/gcore/types/fastedge/app_create_params.py b/src/gcore/types/fastedge/app_create_params.py
index be6ef061..fa8f8f0f 100644
--- a/src/gcore/types/fastedge/app_create_params.py
+++ b/src/gcore/types/fastedge/app_create_params.py
@@ -5,7 +5,7 @@
from typing import Dict, Optional
from typing_extensions import Literal, Required, TypedDict
-__all__ = ["AppCreateParams", "Secrets"]
+__all__ = ["AppCreateParams", "Secrets", "Stores"]
class AppCreateParams(TypedDict, total=False):
@@ -44,8 +44,8 @@ class AppCreateParams(TypedDict, total=False):
5 - suspended
"""
- stores: Dict[str, int]
- """KV stores for the app"""
+ stores: Dict[str, Stores]
+ """Application edge stores"""
template: int
"""Template ID"""
@@ -56,3 +56,10 @@ class Secrets(TypedDict, total=False):
id: Required[int]
"""The unique identifier of the secret."""
+
+
+class Stores(TypedDict, total=False):
+ """Application stores"""
+
+ id: Required[int]
+ """The identifier of the store"""
diff --git a/src/gcore/types/fastedge/app_param.py b/src/gcore/types/fastedge/app_param.py
index 21d6028f..c49448b8 100644
--- a/src/gcore/types/fastedge/app_param.py
+++ b/src/gcore/types/fastedge/app_param.py
@@ -5,7 +5,7 @@
from typing import Dict, Optional
from typing_extensions import Literal, Required, TypedDict
-__all__ = ["AppParam", "Secrets"]
+__all__ = ["AppParam", "Secrets", "Stores"]
class Secrets(TypedDict, total=False):
@@ -15,6 +15,13 @@ class Secrets(TypedDict, total=False):
"""The unique identifier of the secret."""
+class Stores(TypedDict, total=False):
+ """Application stores"""
+
+ id: Required[int]
+ """The identifier of the store"""
+
+
class AppParam(TypedDict, total=False):
binary: int
"""Binary ID"""
@@ -51,8 +58,8 @@ class AppParam(TypedDict, total=False):
5 - suspended
"""
- stores: Dict[str, int]
- """KV stores for the app"""
+ stores: Dict[str, Stores]
+ """Application edge stores"""
template: int
"""Template ID"""
diff --git a/src/gcore/types/fastedge/app_update_params.py b/src/gcore/types/fastedge/app_update_params.py
index 39d58a22..af917ce8 100644
--- a/src/gcore/types/fastedge/app_update_params.py
+++ b/src/gcore/types/fastedge/app_update_params.py
@@ -5,7 +5,7 @@
from typing import Dict, Optional
from typing_extensions import Literal, Required, TypedDict
-__all__ = ["AppUpdateParams", "Secrets"]
+__all__ = ["AppUpdateParams", "Secrets", "Stores"]
class AppUpdateParams(TypedDict, total=False):
@@ -44,8 +44,8 @@ class AppUpdateParams(TypedDict, total=False):
5 - suspended
"""
- stores: Dict[str, int]
- """KV stores for the app"""
+ stores: Dict[str, Stores]
+ """Application edge stores"""
template: int
"""Template ID"""
@@ -56,3 +56,10 @@ class Secrets(TypedDict, total=False):
id: Required[int]
"""The unique identifier of the secret."""
+
+
+class Stores(TypedDict, total=False):
+ """Application stores"""
+
+ id: Required[int]
+ """The identifier of the store"""
diff --git a/src/gcore/types/fastedge/client.py b/src/gcore/types/fastedge/client.py
index eb4d402d..80cc2901 100644
--- a/src/gcore/types/fastedge/client.py
+++ b/src/gcore/types/fastedge/client.py
@@ -19,21 +19,12 @@ class Client(BaseModel):
app_count: int
"""Actual allowed number of apps"""
- app_limit: int
- """Max allowed number of apps"""
-
daily_consumption: int
"""Actual number of calls for all apps during the current day (UTC)"""
- daily_limit: int
- """Max allowed calls for all apps during a day (UTC)"""
-
hourly_consumption: int
"""Actual number of calls for all apps during the current hour"""
- hourly_limit: int
- """Max allowed calls for all apps during an hour"""
-
monthly_consumption: int
"""Actual number of calls for all apps during the current calendar month (UTC)"""
diff --git a/src/gcore/types/fastedge/duration_stats.py b/src/gcore/types/fastedge/duration_stats.py
index 61025235..1c119e6e 100644
--- a/src/gcore/types/fastedge/duration_stats.py
+++ b/src/gcore/types/fastedge/duration_stats.py
@@ -29,4 +29,4 @@ class DurationStats(BaseModel):
"""90% percentile duration in usec"""
time: datetime
- """Beginning ot reporting slot"""
+ """Beginning of reporting slot"""
diff --git a/src/gcore/types/fastedge/kv_store.py b/src/gcore/types/fastedge/kv_store.py
index 4f4975f4..2b9a1d4c 100644
--- a/src/gcore/types/fastedge/kv_store.py
+++ b/src/gcore/types/fastedge/kv_store.py
@@ -19,8 +19,8 @@ class Byod(BaseModel):
class KvStore(BaseModel):
- id: Optional[int] = None
- """The unique identifier of the store"""
+ name: str
+ """A name of the store"""
app_count: Optional[int] = None
"""The number of applications that use this store"""
@@ -31,5 +31,11 @@ class KvStore(BaseModel):
comment: Optional[str] = None
"""A description of the store"""
- updated: Optional[datetime] = None
- """Last update time"""
+ revision: Optional[int] = None
+ """Current store revision (only for non-BYOD stores)"""
+
+ size: Optional[int] = None
+ """Total store size in bytes (zero for BYOD stores)"""
+
+ updated_at: Optional[datetime] = None
+ """Timestamp of last store revision (only for non-BYOD stores)"""
diff --git a/src/gcore/types/fastedge/kv_store_create_params.py b/src/gcore/types/fastedge/kv_store_create_params.py
index 82f25c63..abd3df61 100644
--- a/src/gcore/types/fastedge/kv_store_create_params.py
+++ b/src/gcore/types/fastedge/kv_store_create_params.py
@@ -8,6 +8,9 @@
class KvStoreCreateParams(TypedDict, total=False):
+ name: Required[str]
+ """A name of the store"""
+
byod: Byod
"""BYOD (Bring Your Own Data) settings"""
diff --git a/src/gcore/types/fastedge/kv_store_create_response.py b/src/gcore/types/fastedge/kv_store_create_response.py
new file mode 100644
index 00000000..cec6b49d
--- /dev/null
+++ b/src/gcore/types/fastedge/kv_store_create_response.py
@@ -0,0 +1,12 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from .kv_store import KvStore
+
+__all__ = ["KvStoreCreateResponse"]
+
+
+class KvStoreCreateResponse(KvStore):
+ id: Optional[int] = None
+ """The unique identifier of the store."""
diff --git a/src/gcore/types/fastedge/kv_store_get_response.py b/src/gcore/types/fastedge/kv_store_get_response.py
deleted file mode 100644
index c90559a7..00000000
--- a/src/gcore/types/fastedge/kv_store_get_response.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from .kv_store import KvStore
-from .kv_store_stats import KvStoreStats
-
-__all__ = ["KvStoreGetResponse"]
-
-
-class KvStoreGetResponse(KvStore, KvStoreStats):
- pass
diff --git a/src/gcore/types/fastedge/kv_store_list_params.py b/src/gcore/types/fastedge/kv_store_list_params.py
index 00faa0af..50bac08a 100644
--- a/src/gcore/types/fastedge/kv_store_list_params.py
+++ b/src/gcore/types/fastedge/kv_store_list_params.py
@@ -10,3 +10,9 @@
class KvStoreListParams(TypedDict, total=False):
app_id: int
"""App ID"""
+
+ limit: int
+ """Limit for pagination"""
+
+ offset: int
+ """Offset for pagination"""
diff --git a/src/gcore/types/fastedge/kv_store_list_response.py b/src/gcore/types/fastedge/kv_store_list_response.py
index f0dcefe9..4ed41cb5 100644
--- a/src/gcore/types/fastedge/kv_store_list_response.py
+++ b/src/gcore/types/fastedge/kv_store_list_response.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Optional
+from typing import List
from ..._models import BaseModel
from .kv_store_short import KvStoreShort
@@ -12,4 +12,4 @@ class KvStoreListResponse(BaseModel):
count: int
"""Total number of stores"""
- stores: Optional[List[KvStoreShort]] = None
+ stores: List[KvStoreShort]
diff --git a/src/gcore/types/fastedge/kv_store_replace_params.py b/src/gcore/types/fastedge/kv_store_replace_params.py
index b58d2bae..25b2b5bb 100644
--- a/src/gcore/types/fastedge/kv_store_replace_params.py
+++ b/src/gcore/types/fastedge/kv_store_replace_params.py
@@ -8,6 +8,9 @@
class KvStoreReplaceParams(TypedDict, total=False):
+ name: Required[str]
+ """A name of the store"""
+
byod: Byod
"""BYOD (Bring Your Own Data) settings"""
diff --git a/src/gcore/types/fastedge/kv_store_short.py b/src/gcore/types/fastedge/kv_store_short.py
index 682ab377..7e3d0f55 100644
--- a/src/gcore/types/fastedge/kv_store_short.py
+++ b/src/gcore/types/fastedge/kv_store_short.py
@@ -1,7 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Optional
-from datetime import datetime
from ..._models import BaseModel
@@ -9,11 +8,17 @@
class KvStoreShort(BaseModel):
- id: Optional[int] = None
+ id: int
"""The unique identifier of the store"""
+ app_count: int
+ """The number of applications that use this store"""
+
+ name: str
+ """A name of the store"""
+
comment: Optional[str] = None
"""A description of the store"""
- updated: Optional[datetime] = None
- """Last update time"""
+ size: Optional[int] = None
+ """Total store size in bytes"""
diff --git a/src/gcore/types/fastedge/kv_store_stats.py b/src/gcore/types/fastedge/kv_store_stats.py
deleted file mode 100644
index 4308d772..00000000
--- a/src/gcore/types/fastedge/kv_store_stats.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from typing import Optional
-
-from ..._models import BaseModel
-
-__all__ = ["KvStoreStats", "Stats"]
-
-
-class Stats(BaseModel):
- """Store statistics"""
-
- cf_count: int
- """Total number of Cuckoo filter entries"""
-
- kv_count: int
- """Total number of KV entries"""
-
- size: int
- """Total store size in bytes"""
-
- zset_count: int
- """Total number of sorted set entries"""
-
-
-class KvStoreStats(BaseModel):
- stats: Optional[Stats] = None
- """Store statistics"""
diff --git a/src/gcore/types/fastedge/template_parameter.py b/src/gcore/types/fastedge/template_parameter.py
index efb19b95..48249128 100644
--- a/src/gcore/types/fastedge/template_parameter.py
+++ b/src/gcore/types/fastedge/template_parameter.py
@@ -9,7 +9,7 @@
class TemplateParameter(BaseModel):
- data_type: Literal["string", "number", "date", "time", "secret"]
+ data_type: Literal["string", "number", "date", "time", "secret", "store"]
"""Parameter type"""
mandatory: bool
diff --git a/src/gcore/types/fastedge/template_parameter_param.py b/src/gcore/types/fastedge/template_parameter_param.py
index 6cd74dc9..ee5fb80f 100644
--- a/src/gcore/types/fastedge/template_parameter_param.py
+++ b/src/gcore/types/fastedge/template_parameter_param.py
@@ -8,7 +8,7 @@
class TemplateParameterParam(TypedDict, total=False):
- data_type: Required[Literal["string", "number", "date", "time", "secret"]]
+ data_type: Required[Literal["string", "number", "date", "time", "secret", "store"]]
"""Parameter type"""
mandatory: Required[bool]
diff --git a/src/gcore/types/waap/domains/api_discovery_list_scan_results_params.py b/src/gcore/types/waap/domains/api_discovery_list_scan_results_params.py
index 51007c19..28b05065 100644
--- a/src/gcore/types/waap/domains/api_discovery_list_scan_results_params.py
+++ b/src/gcore/types/waap/domains/api_discovery_list_scan_results_params.py
@@ -35,7 +35,7 @@ class APIDiscoveryListScanResultsParams(TypedDict, total=False):
"""Sort the response by given field."""
status: Optional[Literal["SUCCESS", "FAILURE", "IN_PROGRESS"]]
- """The different statuses a task result can have"""
+ """Filter by the status of the scan"""
type: Optional[Literal["TRAFFIC_SCAN", "API_DESCRIPTION_FILE_SCAN"]]
- """The different types of scans that can be performed"""
+ """Filter by the path of the scan type"""
diff --git a/src/gcore/types/waap/domains/api_path_list_params.py b/src/gcore/types/waap/domains/api_path_list_params.py
index b819dc8b..34ef9fe5 100644
--- a/src/gcore/types/waap/domains/api_path_list_params.py
+++ b/src/gcore/types/waap/domains/api_path_list_params.py
@@ -18,7 +18,7 @@ class APIPathListParams(TypedDict, total=False):
"""Filter by the API version"""
http_scheme: Optional[Literal["HTTP", "HTTPS"]]
- """The different HTTP schemes an API path can have"""
+ """Filter by the HTTP version of the API path"""
ids: Optional[SequenceNotStr[str]]
"""Filter by the path ID"""
@@ -27,7 +27,7 @@ class APIPathListParams(TypedDict, total=False):
"""Number of items to return"""
method: Optional[Literal["GET", "POST", "PUT", "PATCH", "DELETE", "TRACE", "HEAD", "OPTIONS"]]
- """The different methods an API path can have"""
+ """Filter by the API RESTful method"""
offset: int
"""Number of items to skip"""
@@ -58,7 +58,7 @@ class APIPathListParams(TypedDict, total=False):
"""Filter by the path. Supports '\\**' as a wildcard character"""
source: Optional[Literal["API_DESCRIPTION_FILE", "TRAFFIC_SCAN", "USER_DEFINED"]]
- """The different sources an API path can have"""
+ """Filter by the source of the discovered API"""
status: Optional[List[Literal["CONFIRMED_API", "POTENTIAL_API", "NOT_API", "DELISTED_API"]]]
"""Filter by the status of the discovered API path"""
diff --git a/src/gcore/types/waap/domains/waap_request_details.py b/src/gcore/types/waap/domains/waap_request_details.py
index d4a67bad..6099d5de 100644
--- a/src/gcore/types/waap/domains/waap_request_details.py
+++ b/src/gcore/types/waap/domains/waap_request_details.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Dict, List
+from typing import Dict, List, Optional
from datetime import datetime
from typing_extensions import Literal
@@ -196,3 +196,9 @@ class WaapRequestDetails(BaseModel):
user_agent: UserAgent
"""User agent"""
+
+ decision: Optional[Literal["passed", "allowed", "monitored", "blocked", ""]] = None
+ """The decision made for processing the request through the WAAP."""
+
+ optional_action: Optional[Literal["captcha", "challenge", ""]] = None
+ """An optional action that may be applied in addition to the primary decision."""
diff --git a/src/gcore/types/waap/domains/waap_request_summary.py b/src/gcore/types/waap/domains/waap_request_summary.py
index dd114b2b..039a5f70 100644
--- a/src/gcore/types/waap/domains/waap_request_summary.py
+++ b/src/gcore/types/waap/domains/waap_request_summary.py
@@ -22,12 +22,21 @@ class WaapRequestSummary(BaseModel):
country: str
"""Country code"""
+ decision: Literal["passed", "allowed", "monitored", "blocked", ""]
+ """The decision made for processing the request through the WAAP."""
+
domain: str
"""Domain name"""
+ domain_id: int
+ """Domain ID"""
+
method: str
"""HTTP method"""
+ optional_action: Literal["captcha", "challenge", ""]
+ """An optional action that may be applied in addition to the primary decision."""
+
organization: str
"""Organization"""
diff --git a/src/gcore/types/waap/insight_list_types_params.py b/src/gcore/types/waap/insight_list_types_params.py
index 6eae7ac3..534f2cc2 100644
--- a/src/gcore/types/waap/insight_list_types_params.py
+++ b/src/gcore/types/waap/insight_list_types_params.py
@@ -25,4 +25,4 @@ class InsightListTypesParams(TypedDict, total=False):
"""Sort the response by given field."""
slug: Optional[str]
- """The slug of the insight type"""
+ """Filter by the slug of the insight type"""
diff --git a/tests/api_resources/cdn/test_cdn_resources.py b/tests/api_resources/cdn/test_cdn_resources.py
index 79f8e5db..097c60c0 100644
--- a/tests/api_resources/cdn/test_cdn_resources.py
+++ b/tests/api_resources/cdn/test_cdn_resources.py
@@ -24,8 +24,6 @@ class TestCDNResources:
def test_method_create(self, client: Gcore) -> None:
cdn_resource = client.cdn.cdn_resources.create(
cname="cdn.site.com",
- origin="example.com",
- origin_group=132,
)
assert_matches_type(CDNResource, cdn_resource, path=["response"])
@@ -33,8 +31,6 @@ def test_method_create(self, client: Gcore) -> None:
def test_method_create_with_all_params(self, client: Gcore) -> None:
cdn_resource = client.cdn.cdn_resources.create(
cname="cdn.site.com",
- origin="example.com",
- origin_group=132,
active=True,
description="My resource",
name="Resource for images",
@@ -323,6 +319,8 @@ def test_method_create_with_all_params(self, client: Gcore) -> None:
"value": True,
},
},
+ origin="example.com",
+ origin_group=132,
origin_protocol="HTTPS",
primary_resource=None,
proxy_ssl_ca=None,
@@ -339,8 +337,6 @@ def test_method_create_with_all_params(self, client: Gcore) -> None:
def test_raw_response_create(self, client: Gcore) -> None:
response = client.cdn.cdn_resources.with_raw_response.create(
cname="cdn.site.com",
- origin="example.com",
- origin_group=132,
)
assert response.is_closed is True
@@ -352,8 +348,6 @@ def test_raw_response_create(self, client: Gcore) -> None:
def test_streaming_response_create(self, client: Gcore) -> None:
with client.cdn.cdn_resources.with_streaming_response.create(
cname="cdn.site.com",
- origin="example.com",
- origin_group=132,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -1340,8 +1334,6 @@ class TestAsyncCDNResources:
async def test_method_create(self, async_client: AsyncGcore) -> None:
cdn_resource = await async_client.cdn.cdn_resources.create(
cname="cdn.site.com",
- origin="example.com",
- origin_group=132,
)
assert_matches_type(CDNResource, cdn_resource, path=["response"])
@@ -1349,8 +1341,6 @@ async def test_method_create(self, async_client: AsyncGcore) -> None:
async def test_method_create_with_all_params(self, async_client: AsyncGcore) -> None:
cdn_resource = await async_client.cdn.cdn_resources.create(
cname="cdn.site.com",
- origin="example.com",
- origin_group=132,
active=True,
description="My resource",
name="Resource for images",
@@ -1639,6 +1629,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncGcore) ->
"value": True,
},
},
+ origin="example.com",
+ origin_group=132,
origin_protocol="HTTPS",
primary_resource=None,
proxy_ssl_ca=None,
@@ -1655,8 +1647,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncGcore) ->
async def test_raw_response_create(self, async_client: AsyncGcore) -> None:
response = await async_client.cdn.cdn_resources.with_raw_response.create(
cname="cdn.site.com",
- origin="example.com",
- origin_group=132,
)
assert response.is_closed is True
@@ -1668,8 +1658,6 @@ async def test_raw_response_create(self, async_client: AsyncGcore) -> None:
async def test_streaming_response_create(self, async_client: AsyncGcore) -> None:
async with async_client.cdn.cdn_resources.with_streaming_response.create(
cname="cdn.site.com",
- origin="example.com",
- origin_group=132,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
diff --git a/tests/api_resources/cloud/k8s/clusters/pools/test_nodes.py b/tests/api_resources/cloud/k8s/clusters/pools/test_nodes.py
index 1f283cc8..db1bce7d 100644
--- a/tests/api_resources/cloud/k8s/clusters/pools/test_nodes.py
+++ b/tests/api_resources/cloud/k8s/clusters/pools/test_nodes.py
@@ -20,31 +20,31 @@ class TestNodes:
@parametrize
def test_method_list(self, client: Gcore) -> None:
node = client.cloud.k8s.clusters.pools.nodes.list(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
assert_matches_type(InstanceList, node, path=["response"])
@parametrize
def test_method_list_with_all_params(self, client: Gcore) -> None:
node = client.cloud.k8s.clusters.pools.nodes.list(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
- with_ddos=True,
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
+ with_ddos=False,
)
assert_matches_type(InstanceList, node, path=["response"])
@parametrize
def test_raw_response_list(self, client: Gcore) -> None:
response = client.cloud.k8s.clusters.pools.nodes.with_raw_response.list(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
assert response.is_closed is True
@@ -55,10 +55,10 @@ def test_raw_response_list(self, client: Gcore) -> None:
@parametrize
def test_streaming_response_list(self, client: Gcore) -> None:
with client.cloud.k8s.clusters.pools.nodes.with_streaming_response.list(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -72,39 +72,39 @@ def test_streaming_response_list(self, client: Gcore) -> None:
def test_path_params_list(self, client: Gcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
client.cloud.k8s.clusters.pools.nodes.with_raw_response.list(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
cluster_name="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_name` but received ''"):
client.cloud.k8s.clusters.pools.nodes.with_raw_response.list(
pool_name="",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
@parametrize
def test_method_delete(self, client: Gcore) -> None:
node = client.cloud.k8s.clusters.pools.nodes.delete(
- instance_id="instance_id",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
- pool_name="pool_name",
+ instance_id="550e8400-e29b-41d4-a716-446655440000",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
+ pool_name="my-pool",
)
assert node is None
@parametrize
def test_raw_response_delete(self, client: Gcore) -> None:
response = client.cloud.k8s.clusters.pools.nodes.with_raw_response.delete(
- instance_id="instance_id",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
- pool_name="pool_name",
+ instance_id="550e8400-e29b-41d4-a716-446655440000",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
+ pool_name="my-pool",
)
assert response.is_closed is True
@@ -115,11 +115,11 @@ def test_raw_response_delete(self, client: Gcore) -> None:
@parametrize
def test_streaming_response_delete(self, client: Gcore) -> None:
with client.cloud.k8s.clusters.pools.nodes.with_streaming_response.delete(
- instance_id="instance_id",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
- pool_name="pool_name",
+ instance_id="550e8400-e29b-41d4-a716-446655440000",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
+ pool_name="my-pool",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -133,29 +133,29 @@ def test_streaming_response_delete(self, client: Gcore) -> None:
def test_path_params_delete(self, client: Gcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
client.cloud.k8s.clusters.pools.nodes.with_raw_response.delete(
- instance_id="instance_id",
- project_id=0,
- region_id=0,
+ instance_id="550e8400-e29b-41d4-a716-446655440000",
+ project_id=1,
+ region_id=7,
cluster_name="",
- pool_name="pool_name",
+ pool_name="my-pool",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_name` but received ''"):
client.cloud.k8s.clusters.pools.nodes.with_raw_response.delete(
- instance_id="instance_id",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ instance_id="550e8400-e29b-41d4-a716-446655440000",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
pool_name="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `instance_id` but received ''"):
client.cloud.k8s.clusters.pools.nodes.with_raw_response.delete(
instance_id="",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
- pool_name="pool_name",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
+ pool_name="my-pool",
)
@@ -167,31 +167,31 @@ class TestAsyncNodes:
@parametrize
async def test_method_list(self, async_client: AsyncGcore) -> None:
node = await async_client.cloud.k8s.clusters.pools.nodes.list(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
assert_matches_type(InstanceList, node, path=["response"])
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncGcore) -> None:
node = await async_client.cloud.k8s.clusters.pools.nodes.list(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
- with_ddos=True,
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
+ with_ddos=False,
)
assert_matches_type(InstanceList, node, path=["response"])
@parametrize
async def test_raw_response_list(self, async_client: AsyncGcore) -> None:
response = await async_client.cloud.k8s.clusters.pools.nodes.with_raw_response.list(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
assert response.is_closed is True
@@ -202,10 +202,10 @@ async def test_raw_response_list(self, async_client: AsyncGcore) -> None:
@parametrize
async def test_streaming_response_list(self, async_client: AsyncGcore) -> None:
async with async_client.cloud.k8s.clusters.pools.nodes.with_streaming_response.list(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -219,39 +219,39 @@ async def test_streaming_response_list(self, async_client: AsyncGcore) -> None:
async def test_path_params_list(self, async_client: AsyncGcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
await async_client.cloud.k8s.clusters.pools.nodes.with_raw_response.list(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
cluster_name="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_name` but received ''"):
await async_client.cloud.k8s.clusters.pools.nodes.with_raw_response.list(
pool_name="",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
@parametrize
async def test_method_delete(self, async_client: AsyncGcore) -> None:
node = await async_client.cloud.k8s.clusters.pools.nodes.delete(
- instance_id="instance_id",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
- pool_name="pool_name",
+ instance_id="550e8400-e29b-41d4-a716-446655440000",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
+ pool_name="my-pool",
)
assert node is None
@parametrize
async def test_raw_response_delete(self, async_client: AsyncGcore) -> None:
response = await async_client.cloud.k8s.clusters.pools.nodes.with_raw_response.delete(
- instance_id="instance_id",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
- pool_name="pool_name",
+ instance_id="550e8400-e29b-41d4-a716-446655440000",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
+ pool_name="my-pool",
)
assert response.is_closed is True
@@ -262,11 +262,11 @@ async def test_raw_response_delete(self, async_client: AsyncGcore) -> None:
@parametrize
async def test_streaming_response_delete(self, async_client: AsyncGcore) -> None:
async with async_client.cloud.k8s.clusters.pools.nodes.with_streaming_response.delete(
- instance_id="instance_id",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
- pool_name="pool_name",
+ instance_id="550e8400-e29b-41d4-a716-446655440000",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
+ pool_name="my-pool",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -280,27 +280,27 @@ async def test_streaming_response_delete(self, async_client: AsyncGcore) -> None
async def test_path_params_delete(self, async_client: AsyncGcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
await async_client.cloud.k8s.clusters.pools.nodes.with_raw_response.delete(
- instance_id="instance_id",
- project_id=0,
- region_id=0,
+ instance_id="550e8400-e29b-41d4-a716-446655440000",
+ project_id=1,
+ region_id=7,
cluster_name="",
- pool_name="pool_name",
+ pool_name="my-pool",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_name` but received ''"):
await async_client.cloud.k8s.clusters.pools.nodes.with_raw_response.delete(
- instance_id="instance_id",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ instance_id="550e8400-e29b-41d4-a716-446655440000",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
pool_name="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `instance_id` but received ''"):
await async_client.cloud.k8s.clusters.pools.nodes.with_raw_response.delete(
instance_id="",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
- pool_name="pool_name",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
+ pool_name="my-pool",
)
diff --git a/tests/api_resources/cloud/k8s/clusters/test_nodes.py b/tests/api_resources/cloud/k8s/clusters/test_nodes.py
index 624fdf56..7e5c41c3 100644
--- a/tests/api_resources/cloud/k8s/clusters/test_nodes.py
+++ b/tests/api_resources/cloud/k8s/clusters/test_nodes.py
@@ -20,28 +20,28 @@ class TestNodes:
@parametrize
def test_method_list(self, client: Gcore) -> None:
node = client.cloud.k8s.clusters.nodes.list(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert_matches_type(InstanceList, node, path=["response"])
@parametrize
def test_method_list_with_all_params(self, client: Gcore) -> None:
node = client.cloud.k8s.clusters.nodes.list(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
- with_ddos=True,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
+ with_ddos=False,
)
assert_matches_type(InstanceList, node, path=["response"])
@parametrize
def test_raw_response_list(self, client: Gcore) -> None:
response = client.cloud.k8s.clusters.nodes.with_raw_response.list(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert response.is_closed is True
@@ -52,9 +52,9 @@ def test_raw_response_list(self, client: Gcore) -> None:
@parametrize
def test_streaming_response_list(self, client: Gcore) -> None:
with client.cloud.k8s.clusters.nodes.with_streaming_response.list(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -69,27 +69,27 @@ def test_path_params_list(self, client: Gcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
client.cloud.k8s.clusters.nodes.with_raw_response.list(
cluster_name="",
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
)
@parametrize
def test_method_delete(self, client: Gcore) -> None:
node = client.cloud.k8s.clusters.nodes.delete(
- instance_id="instance_id",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ instance_id="550e8400-e29b-41d4-a716-446655440000",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
assert node is None
@parametrize
def test_raw_response_delete(self, client: Gcore) -> None:
response = client.cloud.k8s.clusters.nodes.with_raw_response.delete(
- instance_id="instance_id",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ instance_id="550e8400-e29b-41d4-a716-446655440000",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
assert response.is_closed is True
@@ -100,10 +100,10 @@ def test_raw_response_delete(self, client: Gcore) -> None:
@parametrize
def test_streaming_response_delete(self, client: Gcore) -> None:
with client.cloud.k8s.clusters.nodes.with_streaming_response.delete(
- instance_id="instance_id",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ instance_id="550e8400-e29b-41d4-a716-446655440000",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -117,18 +117,18 @@ def test_streaming_response_delete(self, client: Gcore) -> None:
def test_path_params_delete(self, client: Gcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
client.cloud.k8s.clusters.nodes.with_raw_response.delete(
- instance_id="instance_id",
- project_id=0,
- region_id=0,
+ instance_id="550e8400-e29b-41d4-a716-446655440000",
+ project_id=1,
+ region_id=7,
cluster_name="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `instance_id` but received ''"):
client.cloud.k8s.clusters.nodes.with_raw_response.delete(
instance_id="",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
@@ -140,28 +140,28 @@ class TestAsyncNodes:
@parametrize
async def test_method_list(self, async_client: AsyncGcore) -> None:
node = await async_client.cloud.k8s.clusters.nodes.list(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert_matches_type(InstanceList, node, path=["response"])
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncGcore) -> None:
node = await async_client.cloud.k8s.clusters.nodes.list(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
- with_ddos=True,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
+ with_ddos=False,
)
assert_matches_type(InstanceList, node, path=["response"])
@parametrize
async def test_raw_response_list(self, async_client: AsyncGcore) -> None:
response = await async_client.cloud.k8s.clusters.nodes.with_raw_response.list(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert response.is_closed is True
@@ -172,9 +172,9 @@ async def test_raw_response_list(self, async_client: AsyncGcore) -> None:
@parametrize
async def test_streaming_response_list(self, async_client: AsyncGcore) -> None:
async with async_client.cloud.k8s.clusters.nodes.with_streaming_response.list(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -189,27 +189,27 @@ async def test_path_params_list(self, async_client: AsyncGcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
await async_client.cloud.k8s.clusters.nodes.with_raw_response.list(
cluster_name="",
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
)
@parametrize
async def test_method_delete(self, async_client: AsyncGcore) -> None:
node = await async_client.cloud.k8s.clusters.nodes.delete(
- instance_id="instance_id",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ instance_id="550e8400-e29b-41d4-a716-446655440000",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
assert node is None
@parametrize
async def test_raw_response_delete(self, async_client: AsyncGcore) -> None:
response = await async_client.cloud.k8s.clusters.nodes.with_raw_response.delete(
- instance_id="instance_id",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ instance_id="550e8400-e29b-41d4-a716-446655440000",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
assert response.is_closed is True
@@ -220,10 +220,10 @@ async def test_raw_response_delete(self, async_client: AsyncGcore) -> None:
@parametrize
async def test_streaming_response_delete(self, async_client: AsyncGcore) -> None:
async with async_client.cloud.k8s.clusters.nodes.with_streaming_response.delete(
- instance_id="instance_id",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ instance_id="550e8400-e29b-41d4-a716-446655440000",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -237,16 +237,16 @@ async def test_streaming_response_delete(self, async_client: AsyncGcore) -> None
async def test_path_params_delete(self, async_client: AsyncGcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
await async_client.cloud.k8s.clusters.nodes.with_raw_response.delete(
- instance_id="instance_id",
- project_id=0,
- region_id=0,
+ instance_id="550e8400-e29b-41d4-a716-446655440000",
+ project_id=1,
+ region_id=7,
cluster_name="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `instance_id` but received ''"):
await async_client.cloud.k8s.clusters.nodes.with_raw_response.delete(
instance_id="",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
diff --git a/tests/api_resources/cloud/k8s/clusters/test_pools.py b/tests/api_resources/cloud/k8s/clusters/test_pools.py
index bc2d028a..b928939a 100644
--- a/tests/api_resources/cloud/k8s/clusters/test_pools.py
+++ b/tests/api_resources/cloud/k8s/clusters/test_pools.py
@@ -25,9 +25,9 @@ class TestPools:
@parametrize
def test_method_create(self, client: Gcore) -> None:
pool = client.cloud.k8s.clusters.pools.create(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
flavor_id="g1-standard-1-2",
min_node_count=3,
name="my-pool",
@@ -37,9 +37,9 @@ def test_method_create(self, client: Gcore) -> None:
@parametrize
def test_method_create_with_all_params(self, client: Gcore) -> None:
pool = client.cloud.k8s.clusters.pools.create(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
flavor_id="g1-standard-1-2",
min_node_count=3,
name="my-pool",
@@ -59,9 +59,9 @@ def test_method_create_with_all_params(self, client: Gcore) -> None:
@parametrize
def test_raw_response_create(self, client: Gcore) -> None:
response = client.cloud.k8s.clusters.pools.with_raw_response.create(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
flavor_id="g1-standard-1-2",
min_node_count=3,
name="my-pool",
@@ -75,9 +75,9 @@ def test_raw_response_create(self, client: Gcore) -> None:
@parametrize
def test_streaming_response_create(self, client: Gcore) -> None:
with client.cloud.k8s.clusters.pools.with_streaming_response.create(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
flavor_id="g1-standard-1-2",
min_node_count=3,
name="my-pool",
@@ -95,8 +95,8 @@ def test_path_params_create(self, client: Gcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
client.cloud.k8s.clusters.pools.with_raw_response.create(
cluster_name="",
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
flavor_id="g1-standard-1-2",
min_node_count=3,
name="my-pool",
@@ -105,20 +105,20 @@ def test_path_params_create(self, client: Gcore) -> None:
@parametrize
def test_method_update(self, client: Gcore) -> None:
pool = client.cloud.k8s.clusters.pools.update(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
assert_matches_type(K8SClusterPool, pool, path=["response"])
@parametrize
def test_method_update_with_all_params(self, client: Gcore) -> None:
pool = client.cloud.k8s.clusters.pools.update(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
auto_healing_enabled=True,
labels={"my-label": "foo"},
max_node_count=3,
@@ -131,10 +131,10 @@ def test_method_update_with_all_params(self, client: Gcore) -> None:
@parametrize
def test_raw_response_update(self, client: Gcore) -> None:
response = client.cloud.k8s.clusters.pools.with_raw_response.update(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
assert response.is_closed is True
@@ -145,10 +145,10 @@ def test_raw_response_update(self, client: Gcore) -> None:
@parametrize
def test_streaming_response_update(self, client: Gcore) -> None:
with client.cloud.k8s.clusters.pools.with_streaming_response.update(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -162,35 +162,35 @@ def test_streaming_response_update(self, client: Gcore) -> None:
def test_path_params_update(self, client: Gcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
client.cloud.k8s.clusters.pools.with_raw_response.update(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
cluster_name="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_name` but received ''"):
client.cloud.k8s.clusters.pools.with_raw_response.update(
pool_name="",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
@parametrize
def test_method_list(self, client: Gcore) -> None:
pool = client.cloud.k8s.clusters.pools.list(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert_matches_type(K8SClusterPoolList, pool, path=["response"])
@parametrize
def test_raw_response_list(self, client: Gcore) -> None:
response = client.cloud.k8s.clusters.pools.with_raw_response.list(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert response.is_closed is True
@@ -201,9 +201,9 @@ def test_raw_response_list(self, client: Gcore) -> None:
@parametrize
def test_streaming_response_list(self, client: Gcore) -> None:
with client.cloud.k8s.clusters.pools.with_streaming_response.list(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -218,27 +218,27 @@ def test_path_params_list(self, client: Gcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
client.cloud.k8s.clusters.pools.with_raw_response.list(
cluster_name="",
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
)
@parametrize
def test_method_delete(self, client: Gcore) -> None:
pool = client.cloud.k8s.clusters.pools.delete(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
assert_matches_type(TaskIDList, pool, path=["response"])
@parametrize
def test_raw_response_delete(self, client: Gcore) -> None:
response = client.cloud.k8s.clusters.pools.with_raw_response.delete(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
assert response.is_closed is True
@@ -249,10 +249,10 @@ def test_raw_response_delete(self, client: Gcore) -> None:
@parametrize
def test_streaming_response_delete(self, client: Gcore) -> None:
with client.cloud.k8s.clusters.pools.with_streaming_response.delete(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -266,18 +266,18 @@ def test_streaming_response_delete(self, client: Gcore) -> None:
def test_path_params_delete(self, client: Gcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
client.cloud.k8s.clusters.pools.with_raw_response.delete(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
cluster_name="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_name` but received ''"):
client.cloud.k8s.clusters.pools.with_raw_response.delete(
pool_name="",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
@parametrize
@@ -335,20 +335,20 @@ def test_streaming_response_check_quota(self, client: Gcore) -> None:
@parametrize
def test_method_get(self, client: Gcore) -> None:
pool = client.cloud.k8s.clusters.pools.get(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
assert_matches_type(K8SClusterPool, pool, path=["response"])
@parametrize
def test_raw_response_get(self, client: Gcore) -> None:
response = client.cloud.k8s.clusters.pools.with_raw_response.get(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
assert response.is_closed is True
@@ -359,10 +359,10 @@ def test_raw_response_get(self, client: Gcore) -> None:
@parametrize
def test_streaming_response_get(self, client: Gcore) -> None:
with client.cloud.k8s.clusters.pools.with_streaming_response.get(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -376,27 +376,27 @@ def test_streaming_response_get(self, client: Gcore) -> None:
def test_path_params_get(self, client: Gcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
client.cloud.k8s.clusters.pools.with_raw_response.get(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
cluster_name="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_name` but received ''"):
client.cloud.k8s.clusters.pools.with_raw_response.get(
pool_name="",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
@parametrize
def test_method_resize(self, client: Gcore) -> None:
pool = client.cloud.k8s.clusters.pools.resize(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
node_count=2,
)
assert_matches_type(TaskIDList, pool, path=["response"])
@@ -404,10 +404,10 @@ def test_method_resize(self, client: Gcore) -> None:
@parametrize
def test_raw_response_resize(self, client: Gcore) -> None:
response = client.cloud.k8s.clusters.pools.with_raw_response.resize(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
node_count=2,
)
@@ -419,10 +419,10 @@ def test_raw_response_resize(self, client: Gcore) -> None:
@parametrize
def test_streaming_response_resize(self, client: Gcore) -> None:
with client.cloud.k8s.clusters.pools.with_streaming_response.resize(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
node_count=2,
) as response:
assert not response.is_closed
@@ -437,9 +437,9 @@ def test_streaming_response_resize(self, client: Gcore) -> None:
def test_path_params_resize(self, client: Gcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
client.cloud.k8s.clusters.pools.with_raw_response.resize(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
cluster_name="",
node_count=2,
)
@@ -447,9 +447,9 @@ def test_path_params_resize(self, client: Gcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_name` but received ''"):
client.cloud.k8s.clusters.pools.with_raw_response.resize(
pool_name="",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
node_count=2,
)
@@ -462,9 +462,9 @@ class TestAsyncPools:
@parametrize
async def test_method_create(self, async_client: AsyncGcore) -> None:
pool = await async_client.cloud.k8s.clusters.pools.create(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
flavor_id="g1-standard-1-2",
min_node_count=3,
name="my-pool",
@@ -474,9 +474,9 @@ async def test_method_create(self, async_client: AsyncGcore) -> None:
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncGcore) -> None:
pool = await async_client.cloud.k8s.clusters.pools.create(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
flavor_id="g1-standard-1-2",
min_node_count=3,
name="my-pool",
@@ -496,9 +496,9 @@ async def test_method_create_with_all_params(self, async_client: AsyncGcore) ->
@parametrize
async def test_raw_response_create(self, async_client: AsyncGcore) -> None:
response = await async_client.cloud.k8s.clusters.pools.with_raw_response.create(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
flavor_id="g1-standard-1-2",
min_node_count=3,
name="my-pool",
@@ -512,9 +512,9 @@ async def test_raw_response_create(self, async_client: AsyncGcore) -> None:
@parametrize
async def test_streaming_response_create(self, async_client: AsyncGcore) -> None:
async with async_client.cloud.k8s.clusters.pools.with_streaming_response.create(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
flavor_id="g1-standard-1-2",
min_node_count=3,
name="my-pool",
@@ -532,8 +532,8 @@ async def test_path_params_create(self, async_client: AsyncGcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
await async_client.cloud.k8s.clusters.pools.with_raw_response.create(
cluster_name="",
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
flavor_id="g1-standard-1-2",
min_node_count=3,
name="my-pool",
@@ -542,20 +542,20 @@ async def test_path_params_create(self, async_client: AsyncGcore) -> None:
@parametrize
async def test_method_update(self, async_client: AsyncGcore) -> None:
pool = await async_client.cloud.k8s.clusters.pools.update(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
assert_matches_type(K8SClusterPool, pool, path=["response"])
@parametrize
async def test_method_update_with_all_params(self, async_client: AsyncGcore) -> None:
pool = await async_client.cloud.k8s.clusters.pools.update(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
auto_healing_enabled=True,
labels={"my-label": "foo"},
max_node_count=3,
@@ -568,10 +568,10 @@ async def test_method_update_with_all_params(self, async_client: AsyncGcore) ->
@parametrize
async def test_raw_response_update(self, async_client: AsyncGcore) -> None:
response = await async_client.cloud.k8s.clusters.pools.with_raw_response.update(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
assert response.is_closed is True
@@ -582,10 +582,10 @@ async def test_raw_response_update(self, async_client: AsyncGcore) -> None:
@parametrize
async def test_streaming_response_update(self, async_client: AsyncGcore) -> None:
async with async_client.cloud.k8s.clusters.pools.with_streaming_response.update(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -599,35 +599,35 @@ async def test_streaming_response_update(self, async_client: AsyncGcore) -> None
async def test_path_params_update(self, async_client: AsyncGcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
await async_client.cloud.k8s.clusters.pools.with_raw_response.update(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
cluster_name="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_name` but received ''"):
await async_client.cloud.k8s.clusters.pools.with_raw_response.update(
pool_name="",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
@parametrize
async def test_method_list(self, async_client: AsyncGcore) -> None:
pool = await async_client.cloud.k8s.clusters.pools.list(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert_matches_type(K8SClusterPoolList, pool, path=["response"])
@parametrize
async def test_raw_response_list(self, async_client: AsyncGcore) -> None:
response = await async_client.cloud.k8s.clusters.pools.with_raw_response.list(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert response.is_closed is True
@@ -638,9 +638,9 @@ async def test_raw_response_list(self, async_client: AsyncGcore) -> None:
@parametrize
async def test_streaming_response_list(self, async_client: AsyncGcore) -> None:
async with async_client.cloud.k8s.clusters.pools.with_streaming_response.list(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -655,27 +655,27 @@ async def test_path_params_list(self, async_client: AsyncGcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
await async_client.cloud.k8s.clusters.pools.with_raw_response.list(
cluster_name="",
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
)
@parametrize
async def test_method_delete(self, async_client: AsyncGcore) -> None:
pool = await async_client.cloud.k8s.clusters.pools.delete(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
assert_matches_type(TaskIDList, pool, path=["response"])
@parametrize
async def test_raw_response_delete(self, async_client: AsyncGcore) -> None:
response = await async_client.cloud.k8s.clusters.pools.with_raw_response.delete(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
assert response.is_closed is True
@@ -686,10 +686,10 @@ async def test_raw_response_delete(self, async_client: AsyncGcore) -> None:
@parametrize
async def test_streaming_response_delete(self, async_client: AsyncGcore) -> None:
async with async_client.cloud.k8s.clusters.pools.with_streaming_response.delete(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -703,18 +703,18 @@ async def test_streaming_response_delete(self, async_client: AsyncGcore) -> None
async def test_path_params_delete(self, async_client: AsyncGcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
await async_client.cloud.k8s.clusters.pools.with_raw_response.delete(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
cluster_name="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_name` but received ''"):
await async_client.cloud.k8s.clusters.pools.with_raw_response.delete(
pool_name="",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
@parametrize
@@ -772,20 +772,20 @@ async def test_streaming_response_check_quota(self, async_client: AsyncGcore) ->
@parametrize
async def test_method_get(self, async_client: AsyncGcore) -> None:
pool = await async_client.cloud.k8s.clusters.pools.get(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
assert_matches_type(K8SClusterPool, pool, path=["response"])
@parametrize
async def test_raw_response_get(self, async_client: AsyncGcore) -> None:
response = await async_client.cloud.k8s.clusters.pools.with_raw_response.get(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
assert response.is_closed is True
@@ -796,10 +796,10 @@ async def test_raw_response_get(self, async_client: AsyncGcore) -> None:
@parametrize
async def test_streaming_response_get(self, async_client: AsyncGcore) -> None:
async with async_client.cloud.k8s.clusters.pools.with_streaming_response.get(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -813,27 +813,27 @@ async def test_streaming_response_get(self, async_client: AsyncGcore) -> None:
async def test_path_params_get(self, async_client: AsyncGcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
await async_client.cloud.k8s.clusters.pools.with_raw_response.get(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
cluster_name="",
)
with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_name` but received ''"):
await async_client.cloud.k8s.clusters.pools.with_raw_response.get(
pool_name="",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
)
@parametrize
async def test_method_resize(self, async_client: AsyncGcore) -> None:
pool = await async_client.cloud.k8s.clusters.pools.resize(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
node_count=2,
)
assert_matches_type(TaskIDList, pool, path=["response"])
@@ -841,10 +841,10 @@ async def test_method_resize(self, async_client: AsyncGcore) -> None:
@parametrize
async def test_raw_response_resize(self, async_client: AsyncGcore) -> None:
response = await async_client.cloud.k8s.clusters.pools.with_raw_response.resize(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
node_count=2,
)
@@ -856,10 +856,10 @@ async def test_raw_response_resize(self, async_client: AsyncGcore) -> None:
@parametrize
async def test_streaming_response_resize(self, async_client: AsyncGcore) -> None:
async with async_client.cloud.k8s.clusters.pools.with_streaming_response.resize(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
node_count=2,
) as response:
assert not response.is_closed
@@ -874,9 +874,9 @@ async def test_streaming_response_resize(self, async_client: AsyncGcore) -> None
async def test_path_params_resize(self, async_client: AsyncGcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
await async_client.cloud.k8s.clusters.pools.with_raw_response.resize(
- pool_name="pool_name",
- project_id=0,
- region_id=0,
+ pool_name="my-pool",
+ project_id=1,
+ region_id=7,
cluster_name="",
node_count=2,
)
@@ -884,8 +884,8 @@ async def test_path_params_resize(self, async_client: AsyncGcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `pool_name` but received ''"):
await async_client.cloud.k8s.clusters.pools.with_raw_response.resize(
pool_name="",
- project_id=0,
- region_id=0,
- cluster_name="cluster_name",
+ project_id=1,
+ region_id=7,
+ cluster_name="my-cluster",
node_count=2,
)
diff --git a/tests/api_resources/cloud/k8s/test_clusters.py b/tests/api_resources/cloud/k8s/test_clusters.py
index d9296b23..1fd9c956 100644
--- a/tests/api_resources/cloud/k8s/test_clusters.py
+++ b/tests/api_resources/cloud/k8s/test_clusters.py
@@ -26,8 +26,8 @@ class TestClusters:
@parametrize
def test_method_create(self, client: Gcore) -> None:
cluster = client.cloud.k8s.clusters.create(
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
keypair="some_keypair",
name="string",
pools=[
@@ -44,8 +44,8 @@ def test_method_create(self, client: Gcore) -> None:
@parametrize
def test_method_create_with_all_params(self, client: Gcore) -> None:
cluster = client.cloud.k8s.clusters.create(
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
keypair="some_keypair",
name="string",
pools=[
@@ -133,8 +133,8 @@ def test_method_create_with_all_params(self, client: Gcore) -> None:
@parametrize
def test_raw_response_create(self, client: Gcore) -> None:
response = client.cloud.k8s.clusters.with_raw_response.create(
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
keypair="some_keypair",
name="string",
pools=[
@@ -155,8 +155,8 @@ def test_raw_response_create(self, client: Gcore) -> None:
@parametrize
def test_streaming_response_create(self, client: Gcore) -> None:
with client.cloud.k8s.clusters.with_streaming_response.create(
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
keypair="some_keypair",
name="string",
pools=[
@@ -179,18 +179,18 @@ def test_streaming_response_create(self, client: Gcore) -> None:
@parametrize
def test_method_update(self, client: Gcore) -> None:
cluster = client.cloud.k8s.clusters.update(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert_matches_type(TaskIDList, cluster, path=["response"])
@parametrize
def test_method_update_with_all_params(self, client: Gcore) -> None:
cluster = client.cloud.k8s.clusters.update(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
add_ons={
"slurm": {
"enabled": True,
@@ -250,9 +250,9 @@ def test_method_update_with_all_params(self, client: Gcore) -> None:
@parametrize
def test_raw_response_update(self, client: Gcore) -> None:
response = client.cloud.k8s.clusters.with_raw_response.update(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert response.is_closed is True
@@ -263,9 +263,9 @@ def test_raw_response_update(self, client: Gcore) -> None:
@parametrize
def test_streaming_response_update(self, client: Gcore) -> None:
with client.cloud.k8s.clusters.with_streaming_response.update(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -280,23 +280,23 @@ def test_path_params_update(self, client: Gcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
client.cloud.k8s.clusters.with_raw_response.update(
cluster_name="",
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
)
@parametrize
def test_method_list(self, client: Gcore) -> None:
cluster = client.cloud.k8s.clusters.list(
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
)
assert_matches_type(K8SClusterList, cluster, path=["response"])
@parametrize
def test_raw_response_list(self, client: Gcore) -> None:
response = client.cloud.k8s.clusters.with_raw_response.list(
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
)
assert response.is_closed is True
@@ -307,8 +307,8 @@ def test_raw_response_list(self, client: Gcore) -> None:
@parametrize
def test_streaming_response_list(self, client: Gcore) -> None:
with client.cloud.k8s.clusters.with_streaming_response.list(
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -321,28 +321,28 @@ def test_streaming_response_list(self, client: Gcore) -> None:
@parametrize
def test_method_delete(self, client: Gcore) -> None:
cluster = client.cloud.k8s.clusters.delete(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert_matches_type(TaskIDList, cluster, path=["response"])
@parametrize
def test_method_delete_with_all_params(self, client: Gcore) -> None:
cluster = client.cloud.k8s.clusters.delete(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
- volumes="volumes",
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
+ volumes="550e8400-e29b-41d4-a716-446655440000",
)
assert_matches_type(TaskIDList, cluster, path=["response"])
@parametrize
def test_raw_response_delete(self, client: Gcore) -> None:
response = client.cloud.k8s.clusters.with_raw_response.delete(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert response.is_closed is True
@@ -353,9 +353,9 @@ def test_raw_response_delete(self, client: Gcore) -> None:
@parametrize
def test_streaming_response_delete(self, client: Gcore) -> None:
with client.cloud.k8s.clusters.with_streaming_response.delete(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -370,25 +370,25 @@ def test_path_params_delete(self, client: Gcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
client.cloud.k8s.clusters.with_raw_response.delete(
cluster_name="",
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
)
@parametrize
def test_method_get(self, client: Gcore) -> None:
cluster = client.cloud.k8s.clusters.get(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert_matches_type(K8SCluster, cluster, path=["response"])
@parametrize
def test_raw_response_get(self, client: Gcore) -> None:
response = client.cloud.k8s.clusters.with_raw_response.get(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert response.is_closed is True
@@ -399,9 +399,9 @@ def test_raw_response_get(self, client: Gcore) -> None:
@parametrize
def test_streaming_response_get(self, client: Gcore) -> None:
with client.cloud.k8s.clusters.with_streaming_response.get(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -416,25 +416,25 @@ def test_path_params_get(self, client: Gcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
client.cloud.k8s.clusters.with_raw_response.get(
cluster_name="",
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
)
@parametrize
def test_method_get_certificate(self, client: Gcore) -> None:
cluster = client.cloud.k8s.clusters.get_certificate(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert_matches_type(K8SClusterCertificate, cluster, path=["response"])
@parametrize
def test_raw_response_get_certificate(self, client: Gcore) -> None:
response = client.cloud.k8s.clusters.with_raw_response.get_certificate(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert response.is_closed is True
@@ -445,9 +445,9 @@ def test_raw_response_get_certificate(self, client: Gcore) -> None:
@parametrize
def test_streaming_response_get_certificate(self, client: Gcore) -> None:
with client.cloud.k8s.clusters.with_streaming_response.get_certificate(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -462,25 +462,25 @@ def test_path_params_get_certificate(self, client: Gcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
client.cloud.k8s.clusters.with_raw_response.get_certificate(
cluster_name="",
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
)
@parametrize
def test_method_get_kubeconfig(self, client: Gcore) -> None:
cluster = client.cloud.k8s.clusters.get_kubeconfig(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert_matches_type(K8SClusterKubeconfig, cluster, path=["response"])
@parametrize
def test_raw_response_get_kubeconfig(self, client: Gcore) -> None:
response = client.cloud.k8s.clusters.with_raw_response.get_kubeconfig(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert response.is_closed is True
@@ -491,9 +491,9 @@ def test_raw_response_get_kubeconfig(self, client: Gcore) -> None:
@parametrize
def test_streaming_response_get_kubeconfig(self, client: Gcore) -> None:
with client.cloud.k8s.clusters.with_streaming_response.get_kubeconfig(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -508,25 +508,25 @@ def test_path_params_get_kubeconfig(self, client: Gcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
client.cloud.k8s.clusters.with_raw_response.get_kubeconfig(
cluster_name="",
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
)
@parametrize
def test_method_list_versions_for_upgrade(self, client: Gcore) -> None:
cluster = client.cloud.k8s.clusters.list_versions_for_upgrade(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert_matches_type(K8SClusterVersionList, cluster, path=["response"])
@parametrize
def test_raw_response_list_versions_for_upgrade(self, client: Gcore) -> None:
response = client.cloud.k8s.clusters.with_raw_response.list_versions_for_upgrade(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert response.is_closed is True
@@ -537,9 +537,9 @@ def test_raw_response_list_versions_for_upgrade(self, client: Gcore) -> None:
@parametrize
def test_streaming_response_list_versions_for_upgrade(self, client: Gcore) -> None:
with client.cloud.k8s.clusters.with_streaming_response.list_versions_for_upgrade(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -554,16 +554,16 @@ def test_path_params_list_versions_for_upgrade(self, client: Gcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
client.cloud.k8s.clusters.with_raw_response.list_versions_for_upgrade(
cluster_name="",
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
)
@parametrize
def test_method_upgrade(self, client: Gcore) -> None:
cluster = client.cloud.k8s.clusters.upgrade(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
version="v1.28.1",
)
assert_matches_type(TaskIDList, cluster, path=["response"])
@@ -571,9 +571,9 @@ def test_method_upgrade(self, client: Gcore) -> None:
@parametrize
def test_raw_response_upgrade(self, client: Gcore) -> None:
response = client.cloud.k8s.clusters.with_raw_response.upgrade(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
version="v1.28.1",
)
@@ -585,9 +585,9 @@ def test_raw_response_upgrade(self, client: Gcore) -> None:
@parametrize
def test_streaming_response_upgrade(self, client: Gcore) -> None:
with client.cloud.k8s.clusters.with_streaming_response.upgrade(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
version="v1.28.1",
) as response:
assert not response.is_closed
@@ -603,8 +603,8 @@ def test_path_params_upgrade(self, client: Gcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
client.cloud.k8s.clusters.with_raw_response.upgrade(
cluster_name="",
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
version="v1.28.1",
)
@@ -617,8 +617,8 @@ class TestAsyncClusters:
@parametrize
async def test_method_create(self, async_client: AsyncGcore) -> None:
cluster = await async_client.cloud.k8s.clusters.create(
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
keypair="some_keypair",
name="string",
pools=[
@@ -635,8 +635,8 @@ async def test_method_create(self, async_client: AsyncGcore) -> None:
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncGcore) -> None:
cluster = await async_client.cloud.k8s.clusters.create(
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
keypair="some_keypair",
name="string",
pools=[
@@ -724,8 +724,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncGcore) ->
@parametrize
async def test_raw_response_create(self, async_client: AsyncGcore) -> None:
response = await async_client.cloud.k8s.clusters.with_raw_response.create(
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
keypair="some_keypair",
name="string",
pools=[
@@ -746,8 +746,8 @@ async def test_raw_response_create(self, async_client: AsyncGcore) -> None:
@parametrize
async def test_streaming_response_create(self, async_client: AsyncGcore) -> None:
async with async_client.cloud.k8s.clusters.with_streaming_response.create(
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
keypair="some_keypair",
name="string",
pools=[
@@ -770,18 +770,18 @@ async def test_streaming_response_create(self, async_client: AsyncGcore) -> None
@parametrize
async def test_method_update(self, async_client: AsyncGcore) -> None:
cluster = await async_client.cloud.k8s.clusters.update(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert_matches_type(TaskIDList, cluster, path=["response"])
@parametrize
async def test_method_update_with_all_params(self, async_client: AsyncGcore) -> None:
cluster = await async_client.cloud.k8s.clusters.update(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
add_ons={
"slurm": {
"enabled": True,
@@ -841,9 +841,9 @@ async def test_method_update_with_all_params(self, async_client: AsyncGcore) ->
@parametrize
async def test_raw_response_update(self, async_client: AsyncGcore) -> None:
response = await async_client.cloud.k8s.clusters.with_raw_response.update(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert response.is_closed is True
@@ -854,9 +854,9 @@ async def test_raw_response_update(self, async_client: AsyncGcore) -> None:
@parametrize
async def test_streaming_response_update(self, async_client: AsyncGcore) -> None:
async with async_client.cloud.k8s.clusters.with_streaming_response.update(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -871,23 +871,23 @@ async def test_path_params_update(self, async_client: AsyncGcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
await async_client.cloud.k8s.clusters.with_raw_response.update(
cluster_name="",
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
)
@parametrize
async def test_method_list(self, async_client: AsyncGcore) -> None:
cluster = await async_client.cloud.k8s.clusters.list(
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
)
assert_matches_type(K8SClusterList, cluster, path=["response"])
@parametrize
async def test_raw_response_list(self, async_client: AsyncGcore) -> None:
response = await async_client.cloud.k8s.clusters.with_raw_response.list(
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
)
assert response.is_closed is True
@@ -898,8 +898,8 @@ async def test_raw_response_list(self, async_client: AsyncGcore) -> None:
@parametrize
async def test_streaming_response_list(self, async_client: AsyncGcore) -> None:
async with async_client.cloud.k8s.clusters.with_streaming_response.list(
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -912,28 +912,28 @@ async def test_streaming_response_list(self, async_client: AsyncGcore) -> None:
@parametrize
async def test_method_delete(self, async_client: AsyncGcore) -> None:
cluster = await async_client.cloud.k8s.clusters.delete(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert_matches_type(TaskIDList, cluster, path=["response"])
@parametrize
async def test_method_delete_with_all_params(self, async_client: AsyncGcore) -> None:
cluster = await async_client.cloud.k8s.clusters.delete(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
- volumes="volumes",
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
+ volumes="550e8400-e29b-41d4-a716-446655440000",
)
assert_matches_type(TaskIDList, cluster, path=["response"])
@parametrize
async def test_raw_response_delete(self, async_client: AsyncGcore) -> None:
response = await async_client.cloud.k8s.clusters.with_raw_response.delete(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert response.is_closed is True
@@ -944,9 +944,9 @@ async def test_raw_response_delete(self, async_client: AsyncGcore) -> None:
@parametrize
async def test_streaming_response_delete(self, async_client: AsyncGcore) -> None:
async with async_client.cloud.k8s.clusters.with_streaming_response.delete(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -961,25 +961,25 @@ async def test_path_params_delete(self, async_client: AsyncGcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
await async_client.cloud.k8s.clusters.with_raw_response.delete(
cluster_name="",
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
)
@parametrize
async def test_method_get(self, async_client: AsyncGcore) -> None:
cluster = await async_client.cloud.k8s.clusters.get(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert_matches_type(K8SCluster, cluster, path=["response"])
@parametrize
async def test_raw_response_get(self, async_client: AsyncGcore) -> None:
response = await async_client.cloud.k8s.clusters.with_raw_response.get(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert response.is_closed is True
@@ -990,9 +990,9 @@ async def test_raw_response_get(self, async_client: AsyncGcore) -> None:
@parametrize
async def test_streaming_response_get(self, async_client: AsyncGcore) -> None:
async with async_client.cloud.k8s.clusters.with_streaming_response.get(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -1007,25 +1007,25 @@ async def test_path_params_get(self, async_client: AsyncGcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
await async_client.cloud.k8s.clusters.with_raw_response.get(
cluster_name="",
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
)
@parametrize
async def test_method_get_certificate(self, async_client: AsyncGcore) -> None:
cluster = await async_client.cloud.k8s.clusters.get_certificate(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert_matches_type(K8SClusterCertificate, cluster, path=["response"])
@parametrize
async def test_raw_response_get_certificate(self, async_client: AsyncGcore) -> None:
response = await async_client.cloud.k8s.clusters.with_raw_response.get_certificate(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert response.is_closed is True
@@ -1036,9 +1036,9 @@ async def test_raw_response_get_certificate(self, async_client: AsyncGcore) -> N
@parametrize
async def test_streaming_response_get_certificate(self, async_client: AsyncGcore) -> None:
async with async_client.cloud.k8s.clusters.with_streaming_response.get_certificate(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -1053,25 +1053,25 @@ async def test_path_params_get_certificate(self, async_client: AsyncGcore) -> No
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
await async_client.cloud.k8s.clusters.with_raw_response.get_certificate(
cluster_name="",
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
)
@parametrize
async def test_method_get_kubeconfig(self, async_client: AsyncGcore) -> None:
cluster = await async_client.cloud.k8s.clusters.get_kubeconfig(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert_matches_type(K8SClusterKubeconfig, cluster, path=["response"])
@parametrize
async def test_raw_response_get_kubeconfig(self, async_client: AsyncGcore) -> None:
response = await async_client.cloud.k8s.clusters.with_raw_response.get_kubeconfig(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert response.is_closed is True
@@ -1082,9 +1082,9 @@ async def test_raw_response_get_kubeconfig(self, async_client: AsyncGcore) -> No
@parametrize
async def test_streaming_response_get_kubeconfig(self, async_client: AsyncGcore) -> None:
async with async_client.cloud.k8s.clusters.with_streaming_response.get_kubeconfig(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -1099,25 +1099,25 @@ async def test_path_params_get_kubeconfig(self, async_client: AsyncGcore) -> Non
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
await async_client.cloud.k8s.clusters.with_raw_response.get_kubeconfig(
cluster_name="",
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
)
@parametrize
async def test_method_list_versions_for_upgrade(self, async_client: AsyncGcore) -> None:
cluster = await async_client.cloud.k8s.clusters.list_versions_for_upgrade(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert_matches_type(K8SClusterVersionList, cluster, path=["response"])
@parametrize
async def test_raw_response_list_versions_for_upgrade(self, async_client: AsyncGcore) -> None:
response = await async_client.cloud.k8s.clusters.with_raw_response.list_versions_for_upgrade(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
)
assert response.is_closed is True
@@ -1128,9 +1128,9 @@ async def test_raw_response_list_versions_for_upgrade(self, async_client: AsyncG
@parametrize
async def test_streaming_response_list_versions_for_upgrade(self, async_client: AsyncGcore) -> None:
async with async_client.cloud.k8s.clusters.with_streaming_response.list_versions_for_upgrade(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -1145,16 +1145,16 @@ async def test_path_params_list_versions_for_upgrade(self, async_client: AsyncGc
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
await async_client.cloud.k8s.clusters.with_raw_response.list_versions_for_upgrade(
cluster_name="",
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
)
@parametrize
async def test_method_upgrade(self, async_client: AsyncGcore) -> None:
cluster = await async_client.cloud.k8s.clusters.upgrade(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
version="v1.28.1",
)
assert_matches_type(TaskIDList, cluster, path=["response"])
@@ -1162,9 +1162,9 @@ async def test_method_upgrade(self, async_client: AsyncGcore) -> None:
@parametrize
async def test_raw_response_upgrade(self, async_client: AsyncGcore) -> None:
response = await async_client.cloud.k8s.clusters.with_raw_response.upgrade(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
version="v1.28.1",
)
@@ -1176,9 +1176,9 @@ async def test_raw_response_upgrade(self, async_client: AsyncGcore) -> None:
@parametrize
async def test_streaming_response_upgrade(self, async_client: AsyncGcore) -> None:
async with async_client.cloud.k8s.clusters.with_streaming_response.upgrade(
- cluster_name="cluster_name",
- project_id=0,
- region_id=0,
+ cluster_name="my-cluster",
+ project_id=1,
+ region_id=7,
version="v1.28.1",
) as response:
assert not response.is_closed
@@ -1194,7 +1194,7 @@ async def test_path_params_upgrade(self, async_client: AsyncGcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_name` but received ''"):
await async_client.cloud.k8s.clusters.with_raw_response.upgrade(
cluster_name="",
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
version="v1.28.1",
)
diff --git a/tests/api_resources/cloud/k8s/test_flavors.py b/tests/api_resources/cloud/k8s/test_flavors.py
index 4aabd062..898e9a30 100644
--- a/tests/api_resources/cloud/k8s/test_flavors.py
+++ b/tests/api_resources/cloud/k8s/test_flavors.py
@@ -20,26 +20,27 @@ class TestFlavors:
@parametrize
def test_method_list(self, client: Gcore) -> None:
flavor = client.cloud.k8s.flavors.list(
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
)
assert_matches_type(BaremetalFlavorList, flavor, path=["response"])
@parametrize
def test_method_list_with_all_params(self, client: Gcore) -> None:
flavor = client.cloud.k8s.flavors.list(
- project_id=0,
- region_id=0,
- exclude_gpu=True,
- include_prices=True,
+ project_id=1,
+ region_id=7,
+ exclude_gpu=False,
+ include_capacity=False,
+ include_prices=False,
)
assert_matches_type(BaremetalFlavorList, flavor, path=["response"])
@parametrize
def test_raw_response_list(self, client: Gcore) -> None:
response = client.cloud.k8s.flavors.with_raw_response.list(
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
)
assert response.is_closed is True
@@ -50,8 +51,8 @@ def test_raw_response_list(self, client: Gcore) -> None:
@parametrize
def test_streaming_response_list(self, client: Gcore) -> None:
with client.cloud.k8s.flavors.with_streaming_response.list(
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -70,26 +71,27 @@ class TestAsyncFlavors:
@parametrize
async def test_method_list(self, async_client: AsyncGcore) -> None:
flavor = await async_client.cloud.k8s.flavors.list(
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
)
assert_matches_type(BaremetalFlavorList, flavor, path=["response"])
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncGcore) -> None:
flavor = await async_client.cloud.k8s.flavors.list(
- project_id=0,
- region_id=0,
- exclude_gpu=True,
- include_prices=True,
+ project_id=1,
+ region_id=7,
+ exclude_gpu=False,
+ include_capacity=False,
+ include_prices=False,
)
assert_matches_type(BaremetalFlavorList, flavor, path=["response"])
@parametrize
async def test_raw_response_list(self, async_client: AsyncGcore) -> None:
response = await async_client.cloud.k8s.flavors.with_raw_response.list(
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
)
assert response.is_closed is True
@@ -100,8 +102,8 @@ async def test_raw_response_list(self, async_client: AsyncGcore) -> None:
@parametrize
async def test_streaming_response_list(self, async_client: AsyncGcore) -> None:
async with async_client.cloud.k8s.flavors.with_streaming_response.list(
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
diff --git a/tests/api_resources/cloud/load_balancers/pools/test_health_monitors.py b/tests/api_resources/cloud/load_balancers/pools/test_health_monitors.py
index 0fecec7c..71eb353d 100644
--- a/tests/api_resources/cloud/load_balancers/pools/test_health_monitors.py
+++ b/tests/api_resources/cloud/load_balancers/pools/test_health_monitors.py
@@ -40,6 +40,7 @@ def test_method_create_with_all_params(self, client: Gcore) -> None:
max_retries=2,
api_timeout=5,
type="HTTP",
+ admin_state_up=True,
expected_codes="200,301,302",
http_method="CONNECT",
max_retries_down=2,
@@ -171,6 +172,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGcore) ->
max_retries=2,
api_timeout=5,
type="HTTP",
+ admin_state_up=True,
expected_codes="200,301,302",
http_method="CONNECT",
max_retries_down=2,
diff --git a/tests/api_resources/cloud/load_balancers/test_listeners.py b/tests/api_resources/cloud/load_balancers/test_listeners.py
index 2e098f0f..81c7a2b2 100644
--- a/tests/api_resources/cloud/load_balancers/test_listeners.py
+++ b/tests/api_resources/cloud/load_balancers/test_listeners.py
@@ -42,7 +42,7 @@ def test_method_create_with_all_params(self, client: Gcore) -> None:
connection_limit=100000,
default_pool_id="00000000-0000-4000-8000-000000000000",
insert_x_forwarded=False,
- secret_id="f2e734d0-fa2b-42c2-ad33-4c6db5101e00",
+ secret_id="",
sni_secret_id=["f2e734d0-fa2b-42c2-ad33-4c6db5101e00", "eb121225-7ded-4ff3-ae1f-599e145dd7cb"],
timeout_client_data=50000,
timeout_member_connect=50000,
@@ -105,6 +105,7 @@ def test_method_update_with_all_params(self, client: Gcore) -> None:
listener_id="00000000-0000-4000-8000-000000000000",
project_id=1,
region_id=1,
+ admin_state_up=True,
allowed_cidrs=["10.0.0.0/8"],
connection_limit=100000,
name="new_listener_name",
@@ -346,7 +347,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGcore) ->
connection_limit=100000,
default_pool_id="00000000-0000-4000-8000-000000000000",
insert_x_forwarded=False,
- secret_id="f2e734d0-fa2b-42c2-ad33-4c6db5101e00",
+ secret_id="",
sni_secret_id=["f2e734d0-fa2b-42c2-ad33-4c6db5101e00", "eb121225-7ded-4ff3-ae1f-599e145dd7cb"],
timeout_client_data=50000,
timeout_member_connect=50000,
@@ -409,6 +410,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGcore) ->
listener_id="00000000-0000-4000-8000-000000000000",
project_id=1,
region_id=1,
+ admin_state_up=True,
allowed_cidrs=["10.0.0.0/8"],
connection_limit=100000,
name="new_listener_name",
diff --git a/tests/api_resources/cloud/load_balancers/test_pools.py b/tests/api_resources/cloud/load_balancers/test_pools.py
index 3a381afc..7039089f 100644
--- a/tests/api_resources/cloud/load_balancers/test_pools.py
+++ b/tests/api_resources/cloud/load_balancers/test_pools.py
@@ -43,6 +43,7 @@ def test_method_create_with_all_params(self, client: Gcore) -> None:
"max_retries": 3,
"timeout": 5,
"type": "HTTP",
+ "admin_state_up": True,
"expected_codes": "200,301,302",
"http_method": "GET",
"max_retries_down": 3,
@@ -134,12 +135,14 @@ def test_method_update_with_all_params(self, client: Gcore) -> None:
pool_id="00000000-0000-4000-8000-000000000000",
project_id=1,
region_id=1,
+ admin_state_up=True,
ca_secret_id="ca_secret_id",
crl_secret_id="crl_secret_id",
healthmonitor={
"delay": 10,
"max_retries": 2,
"timeout": 5,
+ "admin_state_up": True,
"expected_codes": "200,301,302",
"http_method": "CONNECT",
"max_retries_down": 2,
@@ -381,6 +384,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGcore) ->
"max_retries": 3,
"timeout": 5,
"type": "HTTP",
+ "admin_state_up": True,
"expected_codes": "200,301,302",
"http_method": "GET",
"max_retries_down": 3,
@@ -472,12 +476,14 @@ async def test_method_update_with_all_params(self, async_client: AsyncGcore) ->
pool_id="00000000-0000-4000-8000-000000000000",
project_id=1,
region_id=1,
+ admin_state_up=True,
ca_secret_id="ca_secret_id",
crl_secret_id="crl_secret_id",
healthmonitor={
"delay": 10,
"max_retries": 2,
"timeout": 5,
+ "admin_state_up": True,
"expected_codes": "200,301,302",
"http_method": "CONNECT",
"max_retries_down": 2,
diff --git a/tests/api_resources/cloud/networks/test_routers.py b/tests/api_resources/cloud/networks/test_routers.py
index 9dfe1a80..968607af 100644
--- a/tests/api_resources/cloud/networks/test_routers.py
+++ b/tests/api_resources/cloud/networks/test_routers.py
@@ -15,6 +15,8 @@
Router,
)
+# pyright: reportDeprecated=false
+
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -85,41 +87,46 @@ def test_streaming_response_create(self, client: Gcore) -> None:
@parametrize
def test_method_update(self, client: Gcore) -> None:
- router = client.cloud.networks.routers.update(
- router_id="router_id",
- project_id=0,
- region_id=0,
- )
+ with pytest.warns(DeprecationWarning):
+ router = client.cloud.networks.routers.update(
+ router_id="router_id",
+ project_id=0,
+ region_id=0,
+ )
+
assert_matches_type(Router, router, path=["response"])
@parametrize
def test_method_update_with_all_params(self, client: Gcore) -> None:
- router = client.cloud.networks.routers.update(
- router_id="router_id",
- project_id=0,
- region_id=0,
- external_gateway_info={
- "network_id": "d7745dcf-b302-4795-9d61-6cc52487af48",
- "enable_snat": False,
- "type": "manual",
- },
- name="my_renamed_router",
- routes=[
- {
- "destination": "10.0.3.0/24",
- "nexthop": "10.0.0.13",
- }
- ],
- )
+ with pytest.warns(DeprecationWarning):
+ router = client.cloud.networks.routers.update(
+ router_id="router_id",
+ project_id=0,
+ region_id=0,
+ external_gateway_info={
+ "network_id": "d7745dcf-b302-4795-9d61-6cc52487af48",
+ "enable_snat": False,
+ "type": "manual",
+ },
+ name="my_renamed_router",
+ routes=[
+ {
+ "destination": "10.0.3.0/24",
+ "nexthop": "10.0.0.13",
+ }
+ ],
+ )
+
assert_matches_type(Router, router, path=["response"])
@parametrize
def test_raw_response_update(self, client: Gcore) -> None:
- response = client.cloud.networks.routers.with_raw_response.update(
- router_id="router_id",
- project_id=0,
- region_id=0,
- )
+ with pytest.warns(DeprecationWarning):
+ response = client.cloud.networks.routers.with_raw_response.update(
+ router_id="router_id",
+ project_id=0,
+ region_id=0,
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -128,27 +135,29 @@ def test_raw_response_update(self, client: Gcore) -> None:
@parametrize
def test_streaming_response_update(self, client: Gcore) -> None:
- with client.cloud.networks.routers.with_streaming_response.update(
- router_id="router_id",
- project_id=0,
- region_id=0,
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ with client.cloud.networks.routers.with_streaming_response.update(
+ router_id="router_id",
+ project_id=0,
+ region_id=0,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- router = response.parse()
- assert_matches_type(Router, router, path=["response"])
+ router = response.parse()
+ assert_matches_type(Router, router, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
def test_path_params_update(self, client: Gcore) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `router_id` but received ''"):
- client.cloud.networks.routers.with_raw_response.update(
- router_id="",
- project_id=0,
- region_id=0,
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `router_id` but received ''"):
+ client.cloud.networks.routers.with_raw_response.update(
+ router_id="",
+ project_id=0,
+ region_id=0,
+ )
@parametrize
def test_method_list(self, client: Gcore) -> None:
@@ -467,41 +476,46 @@ async def test_streaming_response_create(self, async_client: AsyncGcore) -> None
@parametrize
async def test_method_update(self, async_client: AsyncGcore) -> None:
- router = await async_client.cloud.networks.routers.update(
- router_id="router_id",
- project_id=0,
- region_id=0,
- )
+ with pytest.warns(DeprecationWarning):
+ router = await async_client.cloud.networks.routers.update(
+ router_id="router_id",
+ project_id=0,
+ region_id=0,
+ )
+
assert_matches_type(Router, router, path=["response"])
@parametrize
async def test_method_update_with_all_params(self, async_client: AsyncGcore) -> None:
- router = await async_client.cloud.networks.routers.update(
- router_id="router_id",
- project_id=0,
- region_id=0,
- external_gateway_info={
- "network_id": "d7745dcf-b302-4795-9d61-6cc52487af48",
- "enable_snat": False,
- "type": "manual",
- },
- name="my_renamed_router",
- routes=[
- {
- "destination": "10.0.3.0/24",
- "nexthop": "10.0.0.13",
- }
- ],
- )
+ with pytest.warns(DeprecationWarning):
+ router = await async_client.cloud.networks.routers.update(
+ router_id="router_id",
+ project_id=0,
+ region_id=0,
+ external_gateway_info={
+ "network_id": "d7745dcf-b302-4795-9d61-6cc52487af48",
+ "enable_snat": False,
+ "type": "manual",
+ },
+ name="my_renamed_router",
+ routes=[
+ {
+ "destination": "10.0.3.0/24",
+ "nexthop": "10.0.0.13",
+ }
+ ],
+ )
+
assert_matches_type(Router, router, path=["response"])
@parametrize
async def test_raw_response_update(self, async_client: AsyncGcore) -> None:
- response = await async_client.cloud.networks.routers.with_raw_response.update(
- router_id="router_id",
- project_id=0,
- region_id=0,
- )
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.cloud.networks.routers.with_raw_response.update(
+ router_id="router_id",
+ project_id=0,
+ region_id=0,
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -510,27 +524,29 @@ async def test_raw_response_update(self, async_client: AsyncGcore) -> None:
@parametrize
async def test_streaming_response_update(self, async_client: AsyncGcore) -> None:
- async with async_client.cloud.networks.routers.with_streaming_response.update(
- router_id="router_id",
- project_id=0,
- region_id=0,
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ async with async_client.cloud.networks.routers.with_streaming_response.update(
+ router_id="router_id",
+ project_id=0,
+ region_id=0,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- router = await response.parse()
- assert_matches_type(Router, router, path=["response"])
+ router = await response.parse()
+ assert_matches_type(Router, router, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
async def test_path_params_update(self, async_client: AsyncGcore) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `router_id` but received ''"):
- await async_client.cloud.networks.routers.with_raw_response.update(
- router_id="",
- project_id=0,
- region_id=0,
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `router_id` but received ''"):
+ await async_client.cloud.networks.routers.with_raw_response.update(
+ router_id="",
+ project_id=0,
+ region_id=0,
+ )
@parametrize
async def test_method_list(self, async_client: AsyncGcore) -> None:
diff --git a/tests/api_resources/cloud/test_k8s.py b/tests/api_resources/cloud/test_k8s.py
index 98602a71..43c912f3 100644
--- a/tests/api_resources/cloud/test_k8s.py
+++ b/tests/api_resources/cloud/test_k8s.py
@@ -20,16 +20,16 @@ class TestK8S:
@parametrize
def test_method_list_versions(self, client: Gcore) -> None:
k8s = client.cloud.k8s.list_versions(
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
)
assert_matches_type(K8SClusterVersionList, k8s, path=["response"])
@parametrize
def test_raw_response_list_versions(self, client: Gcore) -> None:
response = client.cloud.k8s.with_raw_response.list_versions(
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
)
assert response.is_closed is True
@@ -40,8 +40,8 @@ def test_raw_response_list_versions(self, client: Gcore) -> None:
@parametrize
def test_streaming_response_list_versions(self, client: Gcore) -> None:
with client.cloud.k8s.with_streaming_response.list_versions(
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -60,16 +60,16 @@ class TestAsyncK8S:
@parametrize
async def test_method_list_versions(self, async_client: AsyncGcore) -> None:
k8s = await async_client.cloud.k8s.list_versions(
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
)
assert_matches_type(K8SClusterVersionList, k8s, path=["response"])
@parametrize
async def test_raw_response_list_versions(self, async_client: AsyncGcore) -> None:
response = await async_client.cloud.k8s.with_raw_response.list_versions(
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
)
assert response.is_closed is True
@@ -80,8 +80,8 @@ async def test_raw_response_list_versions(self, async_client: AsyncGcore) -> Non
@parametrize
async def test_streaming_response_list_versions(self, async_client: AsyncGcore) -> None:
async with async_client.cloud.k8s.with_streaming_response.list_versions(
- project_id=0,
- region_id=0,
+ project_id=1,
+ region_id=7,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
diff --git a/tests/api_resources/cloud/test_load_balancers.py b/tests/api_resources/cloud/test_load_balancers.py
index 814fbc75..5b30c022 100644
--- a/tests/api_resources/cloud/test_load_balancers.py
+++ b/tests/api_resources/cloud/test_load_balancers.py
@@ -15,6 +15,8 @@
LoadBalancer,
)
+# pyright: reportDeprecated=false
+
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -59,6 +61,7 @@ def test_method_create_with_all_params(self, client: Gcore) -> None:
"max_retries": 3,
"timeout": 5,
"type": "HTTP",
+ "admin_state_up": True,
"expected_codes": "200,301,302",
"http_method": "GET",
"max_retries_down": 3,
@@ -100,7 +103,7 @@ def test_method_create_with_all_params(self, client: Gcore) -> None:
"timeout_member_data": 0,
}
],
- "secret_id": "f2e734d0-fa2b-42c2-ad33-4c6db5101e00",
+ "secret_id": "",
"sni_secret_id": ["f2e734d0-fa2b-42c2-ad33-4c6db5101e00", "eb121225-7ded-4ff3-ae1f-599e145dd7cb"],
"timeout_client_data": 50000,
"timeout_member_connect": 50000,
@@ -158,38 +161,43 @@ def test_streaming_response_create(self, client: Gcore) -> None:
@parametrize
def test_method_update(self, client: Gcore) -> None:
- load_balancer = client.cloud.load_balancers.update(
- load_balancer_id="ac307687-31a4-4a11-a949-6bea1b2878f5",
- project_id=1,
- region_id=7,
- )
+ with pytest.warns(DeprecationWarning):
+ load_balancer = client.cloud.load_balancers.update(
+ load_balancer_id="ac307687-31a4-4a11-a949-6bea1b2878f5",
+ project_id=1,
+ region_id=7,
+ )
+
assert_matches_type(LoadBalancer, load_balancer, path=["response"])
@parametrize
def test_method_update_with_all_params(self, client: Gcore) -> None:
- load_balancer = client.cloud.load_balancers.update(
- load_balancer_id="ac307687-31a4-4a11-a949-6bea1b2878f5",
- project_id=1,
- region_id=7,
- logging={
- "destination_region_id": 1,
- "enabled": True,
- "retention_policy": {"period": 45},
- "topic_name": "my-log-name",
- },
- name="some_name",
- preferred_connectivity="L2",
- tags={"foo": "my-tag-value"},
- )
+ with pytest.warns(DeprecationWarning):
+ load_balancer = client.cloud.load_balancers.update(
+ load_balancer_id="ac307687-31a4-4a11-a949-6bea1b2878f5",
+ project_id=1,
+ region_id=7,
+ logging={
+ "destination_region_id": 1,
+ "enabled": True,
+ "retention_policy": {"period": 45},
+ "topic_name": "my-log-name",
+ },
+ name="some_name",
+ preferred_connectivity="L2",
+ tags={"foo": "my-tag-value"},
+ )
+
assert_matches_type(LoadBalancer, load_balancer, path=["response"])
@parametrize
def test_raw_response_update(self, client: Gcore) -> None:
- response = client.cloud.load_balancers.with_raw_response.update(
- load_balancer_id="ac307687-31a4-4a11-a949-6bea1b2878f5",
- project_id=1,
- region_id=7,
- )
+ with pytest.warns(DeprecationWarning):
+ response = client.cloud.load_balancers.with_raw_response.update(
+ load_balancer_id="ac307687-31a4-4a11-a949-6bea1b2878f5",
+ project_id=1,
+ region_id=7,
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -198,27 +206,29 @@ def test_raw_response_update(self, client: Gcore) -> None:
@parametrize
def test_streaming_response_update(self, client: Gcore) -> None:
- with client.cloud.load_balancers.with_streaming_response.update(
- load_balancer_id="ac307687-31a4-4a11-a949-6bea1b2878f5",
- project_id=1,
- region_id=7,
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ with client.cloud.load_balancers.with_streaming_response.update(
+ load_balancer_id="ac307687-31a4-4a11-a949-6bea1b2878f5",
+ project_id=1,
+ region_id=7,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- load_balancer = response.parse()
- assert_matches_type(LoadBalancer, load_balancer, path=["response"])
+ load_balancer = response.parse()
+ assert_matches_type(LoadBalancer, load_balancer, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
def test_path_params_update(self, client: Gcore) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `load_balancer_id` but received ''"):
- client.cloud.load_balancers.with_raw_response.update(
- load_balancer_id="",
- project_id=1,
- region_id=7,
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `load_balancer_id` but received ''"):
+ client.cloud.load_balancers.with_raw_response.update(
+ load_balancer_id="",
+ project_id=1,
+ region_id=7,
+ )
@parametrize
def test_method_list(self, client: Gcore) -> None:
@@ -525,6 +535,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGcore) ->
"max_retries": 3,
"timeout": 5,
"type": "HTTP",
+ "admin_state_up": True,
"expected_codes": "200,301,302",
"http_method": "GET",
"max_retries_down": 3,
@@ -566,7 +577,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGcore) ->
"timeout_member_data": 0,
}
],
- "secret_id": "f2e734d0-fa2b-42c2-ad33-4c6db5101e00",
+ "secret_id": "",
"sni_secret_id": ["f2e734d0-fa2b-42c2-ad33-4c6db5101e00", "eb121225-7ded-4ff3-ae1f-599e145dd7cb"],
"timeout_client_data": 50000,
"timeout_member_connect": 50000,
@@ -624,38 +635,43 @@ async def test_streaming_response_create(self, async_client: AsyncGcore) -> None
@parametrize
async def test_method_update(self, async_client: AsyncGcore) -> None:
- load_balancer = await async_client.cloud.load_balancers.update(
- load_balancer_id="ac307687-31a4-4a11-a949-6bea1b2878f5",
- project_id=1,
- region_id=7,
- )
+ with pytest.warns(DeprecationWarning):
+ load_balancer = await async_client.cloud.load_balancers.update(
+ load_balancer_id="ac307687-31a4-4a11-a949-6bea1b2878f5",
+ project_id=1,
+ region_id=7,
+ )
+
assert_matches_type(LoadBalancer, load_balancer, path=["response"])
@parametrize
async def test_method_update_with_all_params(self, async_client: AsyncGcore) -> None:
- load_balancer = await async_client.cloud.load_balancers.update(
- load_balancer_id="ac307687-31a4-4a11-a949-6bea1b2878f5",
- project_id=1,
- region_id=7,
- logging={
- "destination_region_id": 1,
- "enabled": True,
- "retention_policy": {"period": 45},
- "topic_name": "my-log-name",
- },
- name="some_name",
- preferred_connectivity="L2",
- tags={"foo": "my-tag-value"},
- )
+ with pytest.warns(DeprecationWarning):
+ load_balancer = await async_client.cloud.load_balancers.update(
+ load_balancer_id="ac307687-31a4-4a11-a949-6bea1b2878f5",
+ project_id=1,
+ region_id=7,
+ logging={
+ "destination_region_id": 1,
+ "enabled": True,
+ "retention_policy": {"period": 45},
+ "topic_name": "my-log-name",
+ },
+ name="some_name",
+ preferred_connectivity="L2",
+ tags={"foo": "my-tag-value"},
+ )
+
assert_matches_type(LoadBalancer, load_balancer, path=["response"])
@parametrize
async def test_raw_response_update(self, async_client: AsyncGcore) -> None:
- response = await async_client.cloud.load_balancers.with_raw_response.update(
- load_balancer_id="ac307687-31a4-4a11-a949-6bea1b2878f5",
- project_id=1,
- region_id=7,
- )
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.cloud.load_balancers.with_raw_response.update(
+ load_balancer_id="ac307687-31a4-4a11-a949-6bea1b2878f5",
+ project_id=1,
+ region_id=7,
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -664,27 +680,29 @@ async def test_raw_response_update(self, async_client: AsyncGcore) -> None:
@parametrize
async def test_streaming_response_update(self, async_client: AsyncGcore) -> None:
- async with async_client.cloud.load_balancers.with_streaming_response.update(
- load_balancer_id="ac307687-31a4-4a11-a949-6bea1b2878f5",
- project_id=1,
- region_id=7,
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ async with async_client.cloud.load_balancers.with_streaming_response.update(
+ load_balancer_id="ac307687-31a4-4a11-a949-6bea1b2878f5",
+ project_id=1,
+ region_id=7,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- load_balancer = await response.parse()
- assert_matches_type(LoadBalancer, load_balancer, path=["response"])
+ load_balancer = await response.parse()
+ assert_matches_type(LoadBalancer, load_balancer, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
async def test_path_params_update(self, async_client: AsyncGcore) -> None:
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `load_balancer_id` but received ''"):
- await async_client.cloud.load_balancers.with_raw_response.update(
- load_balancer_id="",
- project_id=1,
- region_id=7,
- )
+ with pytest.warns(DeprecationWarning):
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `load_balancer_id` but received ''"):
+ await async_client.cloud.load_balancers.with_raw_response.update(
+ load_balancer_id="",
+ project_id=1,
+ region_id=7,
+ )
@parametrize
async def test_method_list(self, async_client: AsyncGcore) -> None:
diff --git a/tests/api_resources/fastedge/test_apps.py b/tests/api_resources/fastedge/test_apps.py
index 3cf5b982..b2e2949b 100644
--- a/tests/api_resources/fastedge/test_apps.py
+++ b/tests/api_resources/fastedge/test_apps.py
@@ -44,10 +44,7 @@ def test_method_create_with_all_params(self, client: Gcore) -> None:
},
secrets={"foo": {"id": 0}},
status=0,
- stores={
- "country_allow": 1,
- "ip_block": 2,
- },
+ stores={"foo": {"id": 0}},
template=0,
)
assert_matches_type(AppShort, app, path=["response"])
@@ -98,10 +95,7 @@ def test_method_update_with_all_params(self, client: Gcore) -> None:
},
secrets={"foo": {"id": 0}},
status=0,
- stores={
- "country_allow": 1,
- "ip_block": 2,
- },
+ stores={"foo": {"id": 0}},
template=0,
)
assert_matches_type(AppShort, app, path=["response"])
@@ -259,10 +253,7 @@ def test_method_replace_with_all_params(self, client: Gcore) -> None:
},
"secrets": {"foo": {"id": 0}},
"status": 0,
- "stores": {
- "country_allow": 1,
- "ip_block": 2,
- },
+ "stores": {"foo": {"id": 0}},
"template": 0,
},
)
@@ -321,10 +312,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncGcore) ->
},
secrets={"foo": {"id": 0}},
status=0,
- stores={
- "country_allow": 1,
- "ip_block": 2,
- },
+ stores={"foo": {"id": 0}},
template=0,
)
assert_matches_type(AppShort, app, path=["response"])
@@ -375,10 +363,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGcore) ->
},
secrets={"foo": {"id": 0}},
status=0,
- stores={
- "country_allow": 1,
- "ip_block": 2,
- },
+ stores={"foo": {"id": 0}},
template=0,
)
assert_matches_type(AppShort, app, path=["response"])
@@ -536,10 +521,7 @@ async def test_method_replace_with_all_params(self, async_client: AsyncGcore) ->
},
"secrets": {"foo": {"id": 0}},
"status": 0,
- "stores": {
- "country_allow": 1,
- "ip_block": 2,
- },
+ "stores": {"foo": {"id": 0}},
"template": 0,
},
)
diff --git a/tests/api_resources/fastedge/test_kv_stores.py b/tests/api_resources/fastedge/test_kv_stores.py
index 8923cf27..55851568 100644
--- a/tests/api_resources/fastedge/test_kv_stores.py
+++ b/tests/api_resources/fastedge/test_kv_stores.py
@@ -11,8 +11,8 @@
from tests.utils import assert_matches_type
from gcore.types.fastedge import (
KvStore,
- KvStoreGetResponse,
KvStoreListResponse,
+ KvStoreCreateResponse,
)
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -23,37 +23,44 @@ class TestKvStores:
@parametrize
def test_method_create(self, client: Gcore) -> None:
- kv_store = client.fastedge.kv_stores.create()
- assert_matches_type(KvStore, kv_store, path=["response"])
+ kv_store = client.fastedge.kv_stores.create(
+ name="name",
+ )
+ assert_matches_type(KvStoreCreateResponse, kv_store, path=["response"])
@parametrize
def test_method_create_with_all_params(self, client: Gcore) -> None:
kv_store = client.fastedge.kv_stores.create(
+ name="name",
byod={
"prefix": "prefix",
"url": "url",
},
comment="comment",
)
- assert_matches_type(KvStore, kv_store, path=["response"])
+ assert_matches_type(KvStoreCreateResponse, kv_store, path=["response"])
@parametrize
def test_raw_response_create(self, client: Gcore) -> None:
- response = client.fastedge.kv_stores.with_raw_response.create()
+ response = client.fastedge.kv_stores.with_raw_response.create(
+ name="name",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
kv_store = response.parse()
- assert_matches_type(KvStore, kv_store, path=["response"])
+ assert_matches_type(KvStoreCreateResponse, kv_store, path=["response"])
@parametrize
def test_streaming_response_create(self, client: Gcore) -> None:
- with client.fastedge.kv_stores.with_streaming_response.create() as response:
+ with client.fastedge.kv_stores.with_streaming_response.create(
+ name="name",
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
kv_store = response.parse()
- assert_matches_type(KvStore, kv_store, path=["response"])
+ assert_matches_type(KvStoreCreateResponse, kv_store, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -66,6 +73,8 @@ def test_method_list(self, client: Gcore) -> None:
def test_method_list_with_all_params(self, client: Gcore) -> None:
kv_store = client.fastedge.kv_stores.list(
app_id=0,
+ limit=0,
+ offset=0,
)
assert_matches_type(KvStoreListResponse, kv_store, path=["response"])
@@ -125,7 +134,7 @@ def test_method_get(self, client: Gcore) -> None:
kv_store = client.fastedge.kv_stores.get(
0,
)
- assert_matches_type(KvStoreGetResponse, kv_store, path=["response"])
+ assert_matches_type(KvStore, kv_store, path=["response"])
@parametrize
def test_raw_response_get(self, client: Gcore) -> None:
@@ -136,7 +145,7 @@ def test_raw_response_get(self, client: Gcore) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
kv_store = response.parse()
- assert_matches_type(KvStoreGetResponse, kv_store, path=["response"])
+ assert_matches_type(KvStore, kv_store, path=["response"])
@parametrize
def test_streaming_response_get(self, client: Gcore) -> None:
@@ -147,7 +156,7 @@ def test_streaming_response_get(self, client: Gcore) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
kv_store = response.parse()
- assert_matches_type(KvStoreGetResponse, kv_store, path=["response"])
+ assert_matches_type(KvStore, kv_store, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -155,6 +164,7 @@ def test_streaming_response_get(self, client: Gcore) -> None:
def test_method_replace(self, client: Gcore) -> None:
kv_store = client.fastedge.kv_stores.replace(
id=0,
+ name="name",
)
assert_matches_type(KvStore, kv_store, path=["response"])
@@ -162,6 +172,7 @@ def test_method_replace(self, client: Gcore) -> None:
def test_method_replace_with_all_params(self, client: Gcore) -> None:
kv_store = client.fastedge.kv_stores.replace(
id=0,
+ name="name",
byod={
"prefix": "prefix",
"url": "url",
@@ -174,6 +185,7 @@ def test_method_replace_with_all_params(self, client: Gcore) -> None:
def test_raw_response_replace(self, client: Gcore) -> None:
response = client.fastedge.kv_stores.with_raw_response.replace(
id=0,
+ name="name",
)
assert response.is_closed is True
@@ -185,6 +197,7 @@ def test_raw_response_replace(self, client: Gcore) -> None:
def test_streaming_response_replace(self, client: Gcore) -> None:
with client.fastedge.kv_stores.with_streaming_response.replace(
id=0,
+ name="name",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -202,37 +215,44 @@ class TestAsyncKvStores:
@parametrize
async def test_method_create(self, async_client: AsyncGcore) -> None:
- kv_store = await async_client.fastedge.kv_stores.create()
- assert_matches_type(KvStore, kv_store, path=["response"])
+ kv_store = await async_client.fastedge.kv_stores.create(
+ name="name",
+ )
+ assert_matches_type(KvStoreCreateResponse, kv_store, path=["response"])
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncGcore) -> None:
kv_store = await async_client.fastedge.kv_stores.create(
+ name="name",
byod={
"prefix": "prefix",
"url": "url",
},
comment="comment",
)
- assert_matches_type(KvStore, kv_store, path=["response"])
+ assert_matches_type(KvStoreCreateResponse, kv_store, path=["response"])
@parametrize
async def test_raw_response_create(self, async_client: AsyncGcore) -> None:
- response = await async_client.fastedge.kv_stores.with_raw_response.create()
+ response = await async_client.fastedge.kv_stores.with_raw_response.create(
+ name="name",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
kv_store = await response.parse()
- assert_matches_type(KvStore, kv_store, path=["response"])
+ assert_matches_type(KvStoreCreateResponse, kv_store, path=["response"])
@parametrize
async def test_streaming_response_create(self, async_client: AsyncGcore) -> None:
- async with async_client.fastedge.kv_stores.with_streaming_response.create() as response:
+ async with async_client.fastedge.kv_stores.with_streaming_response.create(
+ name="name",
+ ) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
kv_store = await response.parse()
- assert_matches_type(KvStore, kv_store, path=["response"])
+ assert_matches_type(KvStoreCreateResponse, kv_store, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -245,6 +265,8 @@ async def test_method_list(self, async_client: AsyncGcore) -> None:
async def test_method_list_with_all_params(self, async_client: AsyncGcore) -> None:
kv_store = await async_client.fastedge.kv_stores.list(
app_id=0,
+ limit=0,
+ offset=0,
)
assert_matches_type(KvStoreListResponse, kv_store, path=["response"])
@@ -304,7 +326,7 @@ async def test_method_get(self, async_client: AsyncGcore) -> None:
kv_store = await async_client.fastedge.kv_stores.get(
0,
)
- assert_matches_type(KvStoreGetResponse, kv_store, path=["response"])
+ assert_matches_type(KvStore, kv_store, path=["response"])
@parametrize
async def test_raw_response_get(self, async_client: AsyncGcore) -> None:
@@ -315,7 +337,7 @@ async def test_raw_response_get(self, async_client: AsyncGcore) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
kv_store = await response.parse()
- assert_matches_type(KvStoreGetResponse, kv_store, path=["response"])
+ assert_matches_type(KvStore, kv_store, path=["response"])
@parametrize
async def test_streaming_response_get(self, async_client: AsyncGcore) -> None:
@@ -326,7 +348,7 @@ async def test_streaming_response_get(self, async_client: AsyncGcore) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
kv_store = await response.parse()
- assert_matches_type(KvStoreGetResponse, kv_store, path=["response"])
+ assert_matches_type(KvStore, kv_store, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -334,6 +356,7 @@ async def test_streaming_response_get(self, async_client: AsyncGcore) -> None:
async def test_method_replace(self, async_client: AsyncGcore) -> None:
kv_store = await async_client.fastedge.kv_stores.replace(
id=0,
+ name="name",
)
assert_matches_type(KvStore, kv_store, path=["response"])
@@ -341,6 +364,7 @@ async def test_method_replace(self, async_client: AsyncGcore) -> None:
async def test_method_replace_with_all_params(self, async_client: AsyncGcore) -> None:
kv_store = await async_client.fastedge.kv_stores.replace(
id=0,
+ name="name",
byod={
"prefix": "prefix",
"url": "url",
@@ -353,6 +377,7 @@ async def test_method_replace_with_all_params(self, async_client: AsyncGcore) ->
async def test_raw_response_replace(self, async_client: AsyncGcore) -> None:
response = await async_client.fastedge.kv_stores.with_raw_response.replace(
id=0,
+ name="name",
)
assert response.is_closed is True
@@ -364,6 +389,7 @@ async def test_raw_response_replace(self, async_client: AsyncGcore) -> None:
async def test_streaming_response_replace(self, async_client: AsyncGcore) -> None:
async with async_client.fastedge.kv_stores.with_streaming_response.replace(
id=0,
+ name="name",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
diff --git a/tests/api_resources/waap/domains/test_statistics.py b/tests/api_resources/waap/domains/test_statistics.py
index c8a4bcb4..da599e1c 100644
--- a/tests/api_resources/waap/domains/test_statistics.py
+++ b/tests/api_resources/waap/domains/test_statistics.py
@@ -270,30 +270,35 @@ def test_streaming_response_get_requests_series(self, client: Gcore) -> None:
@parametrize
def test_method_get_traffic_series(self, client: Gcore) -> None:
- statistic = client.waap.domains.statistics.get_traffic_series(
- domain_id=1,
- resolution="daily",
- start="2024-04-13T00:00:00+01:00",
- )
+ with pytest.warns(DeprecationWarning):
+ statistic = client.waap.domains.statistics.get_traffic_series(
+ domain_id=1,
+ resolution="daily",
+ start="2024-04-13T00:00:00+01:00",
+ )
+
assert_matches_type(StatisticGetTrafficSeriesResponse, statistic, path=["response"])
@parametrize
def test_method_get_traffic_series_with_all_params(self, client: Gcore) -> None:
- statistic = client.waap.domains.statistics.get_traffic_series(
- domain_id=1,
- resolution="daily",
- start="2024-04-13T00:00:00+01:00",
- end="2024-04-14T12:00:00Z",
- )
+ with pytest.warns(DeprecationWarning):
+ statistic = client.waap.domains.statistics.get_traffic_series(
+ domain_id=1,
+ resolution="daily",
+ start="2024-04-13T00:00:00+01:00",
+ end="2024-04-14T12:00:00Z",
+ )
+
assert_matches_type(StatisticGetTrafficSeriesResponse, statistic, path=["response"])
@parametrize
def test_raw_response_get_traffic_series(self, client: Gcore) -> None:
- response = client.waap.domains.statistics.with_raw_response.get_traffic_series(
- domain_id=1,
- resolution="daily",
- start="2024-04-13T00:00:00+01:00",
- )
+ with pytest.warns(DeprecationWarning):
+ response = client.waap.domains.statistics.with_raw_response.get_traffic_series(
+ domain_id=1,
+ resolution="daily",
+ start="2024-04-13T00:00:00+01:00",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -302,16 +307,17 @@ def test_raw_response_get_traffic_series(self, client: Gcore) -> None:
@parametrize
def test_streaming_response_get_traffic_series(self, client: Gcore) -> None:
- with client.waap.domains.statistics.with_streaming_response.get_traffic_series(
- domain_id=1,
- resolution="daily",
- start="2024-04-13T00:00:00+01:00",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ with client.waap.domains.statistics.with_streaming_response.get_traffic_series(
+ domain_id=1,
+ resolution="daily",
+ start="2024-04-13T00:00:00+01:00",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- statistic = response.parse()
- assert_matches_type(StatisticGetTrafficSeriesResponse, statistic, path=["response"])
+ statistic = response.parse()
+ assert_matches_type(StatisticGetTrafficSeriesResponse, statistic, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -563,30 +569,35 @@ async def test_streaming_response_get_requests_series(self, async_client: AsyncG
@parametrize
async def test_method_get_traffic_series(self, async_client: AsyncGcore) -> None:
- statistic = await async_client.waap.domains.statistics.get_traffic_series(
- domain_id=1,
- resolution="daily",
- start="2024-04-13T00:00:00+01:00",
- )
+ with pytest.warns(DeprecationWarning):
+ statistic = await async_client.waap.domains.statistics.get_traffic_series(
+ domain_id=1,
+ resolution="daily",
+ start="2024-04-13T00:00:00+01:00",
+ )
+
assert_matches_type(StatisticGetTrafficSeriesResponse, statistic, path=["response"])
@parametrize
async def test_method_get_traffic_series_with_all_params(self, async_client: AsyncGcore) -> None:
- statistic = await async_client.waap.domains.statistics.get_traffic_series(
- domain_id=1,
- resolution="daily",
- start="2024-04-13T00:00:00+01:00",
- end="2024-04-14T12:00:00Z",
- )
+ with pytest.warns(DeprecationWarning):
+ statistic = await async_client.waap.domains.statistics.get_traffic_series(
+ domain_id=1,
+ resolution="daily",
+ start="2024-04-13T00:00:00+01:00",
+ end="2024-04-14T12:00:00Z",
+ )
+
assert_matches_type(StatisticGetTrafficSeriesResponse, statistic, path=["response"])
@parametrize
async def test_raw_response_get_traffic_series(self, async_client: AsyncGcore) -> None:
- response = await async_client.waap.domains.statistics.with_raw_response.get_traffic_series(
- domain_id=1,
- resolution="daily",
- start="2024-04-13T00:00:00+01:00",
- )
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.waap.domains.statistics.with_raw_response.get_traffic_series(
+ domain_id=1,
+ resolution="daily",
+ start="2024-04-13T00:00:00+01:00",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -595,15 +606,16 @@ async def test_raw_response_get_traffic_series(self, async_client: AsyncGcore) -
@parametrize
async def test_streaming_response_get_traffic_series(self, async_client: AsyncGcore) -> None:
- async with async_client.waap.domains.statistics.with_streaming_response.get_traffic_series(
- domain_id=1,
- resolution="daily",
- start="2024-04-13T00:00:00+01:00",
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with pytest.warns(DeprecationWarning):
+ async with async_client.waap.domains.statistics.with_streaming_response.get_traffic_series(
+ domain_id=1,
+ resolution="daily",
+ start="2024-04-13T00:00:00+01:00",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- statistic = await response.parse()
- assert_matches_type(StatisticGetTrafficSeriesResponse, statistic, path=["response"])
+ statistic = await response.parse()
+ assert_matches_type(StatisticGetTrafficSeriesResponse, statistic, path=["response"])
assert cast(Any, response.is_closed) is True