diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index ce5e5c7c..157f0355 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.35.0"
+ ".": "0.36.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index efb5f168..39639bb1 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-2f258036cad399055647446f0aae41c40f29bf6b486de68ed565653c10adb569.yml
-openapi_spec_hash: 319b97727a2c05125aa27228db52053c
-config_hash: 332323cce99008ceec46e04aeb672e0a
+configured_endpoints: 647
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-2c5466e670c12d50bc7234acc899a0833ffc6282ccb8821ebe0c623fb82ea60d.yml
+openapi_spec_hash: a6f0c3323cf195a153b6c5fd3a0d83d4
+config_hash: ee9fe3677a3591bb2fcc219ef6448eb2
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e2a6eb33..6d884b12 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,32 @@
# Changelog
+## 0.36.0 (2026-03-03)
+
+Full Changelog: [v0.35.0...v0.36.0](https://github.com/G-Core/gcore-python/compare/v0.35.0...v0.36.0)
+
+### ⚠ BREAKING CHANGES
+
+* **cloud:** update gpu baremetal endpoints to latest versions
+
+### Features
+
+* **api:** aggregated API specs update ([a93c782](https://github.com/G-Core/gcore-python/commit/a93c7824afaeafd8b1bc641fc7145ed38d3049fb))
+* **api:** aggregated API specs update ([394275c](https://github.com/G-Core/gcore-python/commit/394275c5f5937961bbd0fad0dc2d0b9ab22b8230))
+* **api:** aggregated API specs update ([b484f9c](https://github.com/G-Core/gcore-python/commit/b484f9c9aa4d3e54b42b49fbb06805d290ec2264))
+* **api:** aggregated API specs update ([0e36db9](https://github.com/G-Core/gcore-python/commit/0e36db93402657340c5c9f38263662ba0c905593))
+* **cloud:** update gpu baremetal endpoints to latest versions ([14512b9](https://github.com/G-Core/gcore-python/commit/14512b9907e7201e6b3f6a934dd84d0f277fc55c))
+
+
+### Bug Fixes
+
+* **cloud:** restore custom polling methods and missing wrappers for gpu baremetal ([3321a2f](https://github.com/G-Core/gcore-python/commit/3321a2f287f4a94aa88c738f09c5677e2c670ca9))
+
+
+### Chores
+
+* **docs:** add missing descriptions ([caa4cb6](https://github.com/G-Core/gcore-python/commit/caa4cb6e2a36f9c3ab7213480020421385c86e4e))
+* **internal:** make `test_proxy_environment_variables` more resilient to env ([cdfe354](https://github.com/G-Core/gcore-python/commit/cdfe3544b44f065624b5d7054873b291a54da836))
+
## 0.35.0 (2026-02-24)
Full Changelog: [v0.34.0...v0.35.0](https://github.com/G-Core/gcore-python/compare/v0.34.0...v0.35.0)
diff --git a/pyproject.toml b/pyproject.toml
index 8d80f22d..045fe512 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "gcore"
-version = "0.35.0"
+version = "0.36.0"
description = "The official Python library for the gcore API"
dynamic = ["readme"]
license = "Apache-2.0"
diff --git a/src/gcore/_client.py b/src/gcore/_client.py
index e4ad2425..ad06f5f0 100644
--- a/src/gcore/_client.py
+++ b/src/gcore/_client.py
@@ -3,7 +3,7 @@
from __future__ import annotations
import os
-from typing import Any, Mapping
+from typing import TYPE_CHECKING, Any, Mapping
from typing_extensions import Self, override
import httpx
@@ -20,6 +20,7 @@
not_given,
)
from ._utils import is_given, get_async_library, maybe_coerce_integer
+from ._compat import cached_property
from ._version import __version__
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
from ._exceptions import GcoreError, APIStatusError
@@ -28,32 +29,23 @@
SyncAPIClient,
AsyncAPIClient,
)
-from .resources.cdn import cdn
-from .resources.dns import dns
-from .resources.iam import iam
-from .resources.waap import waap
-from .resources.cloud import cloud
-from .resources.storage import storage
-from .resources.fastedge import fastedge
-from .resources.security import security
-from .resources.streaming import streaming
+
+if TYPE_CHECKING:
+ from .resources import cdn, dns, iam, waap, cloud, storage, fastedge, security, streaming
+ from .resources.cdn.cdn import CDNResource, AsyncCDNResource
+ from .resources.dns.dns import DNSResource, AsyncDNSResource
+ from .resources.iam.iam import IamResource, AsyncIamResource
+ from .resources.waap.waap import WaapResource, AsyncWaapResource
+ from .resources.cloud.cloud import CloudResource, AsyncCloudResource
+ from .resources.storage.storage import StorageResource, AsyncStorageResource
+ from .resources.fastedge.fastedge import FastedgeResource, AsyncFastedgeResource
+ from .resources.security.security import SecurityResource, AsyncSecurityResource
+ from .resources.streaming.streaming import StreamingResource, AsyncStreamingResource
__all__ = ["Timeout", "Transport", "ProxiesTypes", "RequestOptions", "Gcore", "AsyncGcore", "Client", "AsyncClient"]
class Gcore(SyncAPIClient):
- cloud: cloud.CloudResource
- waap: waap.WaapResource
- iam: iam.IamResource
- fastedge: fastedge.FastedgeResource
- streaming: streaming.StreamingResource
- security: security.SecurityResource
- dns: dns.DNSResource
- storage: storage.StorageResource
- cdn: cdn.CDNResource
- with_raw_response: GcoreWithRawResponse
- with_streaming_response: GcoreWithStreamedResponse
-
# client options
api_key: str
cloud_project_id: int | None
@@ -135,17 +127,71 @@ def __init__(
_strict_response_validation=_strict_response_validation,
)
- self.cloud = cloud.CloudResource(self)
- self.waap = waap.WaapResource(self)
- self.iam = iam.IamResource(self)
- self.fastedge = fastedge.FastedgeResource(self)
- self.streaming = streaming.StreamingResource(self)
- self.security = security.SecurityResource(self)
- self.dns = dns.DNSResource(self)
- self.storage = storage.StorageResource(self)
- self.cdn = cdn.CDNResource(self)
- self.with_raw_response = GcoreWithRawResponse(self)
- self.with_streaming_response = GcoreWithStreamedResponse(self)
+ @cached_property
+ def cloud(self) -> CloudResource:
+ from .resources.cloud import CloudResource
+
+ return CloudResource(self)
+
+ @cached_property
+ def waap(self) -> WaapResource:
+ from .resources.waap import WaapResource
+
+ return WaapResource(self)
+
+ @cached_property
+ def iam(self) -> IamResource:
+ """
+ Account management operations including authentication, password management, and account details.
+ """
+ from .resources.iam import IamResource
+
+ return IamResource(self)
+
+ @cached_property
+ def fastedge(self) -> FastedgeResource:
+ """Client-level settings and limits"""
+ from .resources.fastedge import FastedgeResource
+
+ return FastedgeResource(self)
+
+ @cached_property
+ def streaming(self) -> StreamingResource:
+ from .resources.streaming import StreamingResource
+
+ return StreamingResource(self)
+
+ @cached_property
+ def security(self) -> SecurityResource:
+ from .resources.security import SecurityResource
+
+ return SecurityResource(self)
+
+ @cached_property
+ def dns(self) -> DNSResource:
+ from .resources.dns import DNSResource
+
+ return DNSResource(self)
+
+ @cached_property
+ def storage(self) -> StorageResource:
+ from .resources.storage import StorageResource
+
+ return StorageResource(self)
+
+ @cached_property
+ def cdn(self) -> CDNResource:
+ from .resources.cdn import CDNResource
+
+ return CDNResource(self)
+
+ @cached_property
+ def with_raw_response(self) -> GcoreWithRawResponse:
+ return GcoreWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> GcoreWithStreamedResponse:
+ return GcoreWithStreamedResponse(self)
@property
@override
@@ -279,18 +325,6 @@ def _make_status_error(
class AsyncGcore(AsyncAPIClient):
- cloud: cloud.AsyncCloudResource
- waap: waap.AsyncWaapResource
- iam: iam.AsyncIamResource
- fastedge: fastedge.AsyncFastedgeResource
- streaming: streaming.AsyncStreamingResource
- security: security.AsyncSecurityResource
- dns: dns.AsyncDNSResource
- storage: storage.AsyncStorageResource
- cdn: cdn.AsyncCDNResource
- with_raw_response: AsyncGcoreWithRawResponse
- with_streaming_response: AsyncGcoreWithStreamedResponse
-
# client options
api_key: str
cloud_project_id: int | None
@@ -372,17 +406,71 @@ def __init__(
_strict_response_validation=_strict_response_validation,
)
- self.cloud = cloud.AsyncCloudResource(self)
- self.waap = waap.AsyncWaapResource(self)
- self.iam = iam.AsyncIamResource(self)
- self.fastedge = fastedge.AsyncFastedgeResource(self)
- self.streaming = streaming.AsyncStreamingResource(self)
- self.security = security.AsyncSecurityResource(self)
- self.dns = dns.AsyncDNSResource(self)
- self.storage = storage.AsyncStorageResource(self)
- self.cdn = cdn.AsyncCDNResource(self)
- self.with_raw_response = AsyncGcoreWithRawResponse(self)
- self.with_streaming_response = AsyncGcoreWithStreamedResponse(self)
+ @cached_property
+ def cloud(self) -> AsyncCloudResource:
+ from .resources.cloud import AsyncCloudResource
+
+ return AsyncCloudResource(self)
+
+ @cached_property
+ def waap(self) -> AsyncWaapResource:
+ from .resources.waap import AsyncWaapResource
+
+ return AsyncWaapResource(self)
+
+ @cached_property
+ def iam(self) -> AsyncIamResource:
+ """
+ Account management operations including authentication, password management, and account details.
+ """
+ from .resources.iam import AsyncIamResource
+
+ return AsyncIamResource(self)
+
+ @cached_property
+ def fastedge(self) -> AsyncFastedgeResource:
+ """Client-level settings and limits"""
+ from .resources.fastedge import AsyncFastedgeResource
+
+ return AsyncFastedgeResource(self)
+
+ @cached_property
+ def streaming(self) -> AsyncStreamingResource:
+ from .resources.streaming import AsyncStreamingResource
+
+ return AsyncStreamingResource(self)
+
+ @cached_property
+ def security(self) -> AsyncSecurityResource:
+ from .resources.security import AsyncSecurityResource
+
+ return AsyncSecurityResource(self)
+
+ @cached_property
+ def dns(self) -> AsyncDNSResource:
+ from .resources.dns import AsyncDNSResource
+
+ return AsyncDNSResource(self)
+
+ @cached_property
+ def storage(self) -> AsyncStorageResource:
+ from .resources.storage import AsyncStorageResource
+
+ return AsyncStorageResource(self)
+
+ @cached_property
+ def cdn(self) -> AsyncCDNResource:
+ from .resources.cdn import AsyncCDNResource
+
+ return AsyncCDNResource(self)
+
+ @cached_property
+ def with_raw_response(self) -> AsyncGcoreWithRawResponse:
+ return AsyncGcoreWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncGcoreWithStreamedResponse:
+ return AsyncGcoreWithStreamedResponse(self)
@property
@override
@@ -516,55 +604,263 @@ def _make_status_error(
class GcoreWithRawResponse:
+ _client: Gcore
+
def __init__(self, client: Gcore) -> None:
- self.cloud = cloud.CloudResourceWithRawResponse(client.cloud)
- self.waap = waap.WaapResourceWithRawResponse(client.waap)
- self.iam = iam.IamResourceWithRawResponse(client.iam)
- self.fastedge = fastedge.FastedgeResourceWithRawResponse(client.fastedge)
- self.streaming = streaming.StreamingResourceWithRawResponse(client.streaming)
- self.security = security.SecurityResourceWithRawResponse(client.security)
- self.dns = dns.DNSResourceWithRawResponse(client.dns)
- self.storage = storage.StorageResourceWithRawResponse(client.storage)
- self.cdn = cdn.CDNResourceWithRawResponse(client.cdn)
+ self._client = client
+
+ @cached_property
+ def cloud(self) -> cloud.CloudResourceWithRawResponse:
+ from .resources.cloud import CloudResourceWithRawResponse
+
+ return CloudResourceWithRawResponse(self._client.cloud)
+
+ @cached_property
+ def waap(self) -> waap.WaapResourceWithRawResponse:
+ from .resources.waap import WaapResourceWithRawResponse
+
+ return WaapResourceWithRawResponse(self._client.waap)
+
+ @cached_property
+ def iam(self) -> iam.IamResourceWithRawResponse:
+ """
+ Account management operations including authentication, password management, and account details.
+ """
+ from .resources.iam import IamResourceWithRawResponse
+
+ return IamResourceWithRawResponse(self._client.iam)
+
+ @cached_property
+ def fastedge(self) -> fastedge.FastedgeResourceWithRawResponse:
+ """Client-level settings and limits"""
+ from .resources.fastedge import FastedgeResourceWithRawResponse
+
+ return FastedgeResourceWithRawResponse(self._client.fastedge)
+
+ @cached_property
+ def streaming(self) -> streaming.StreamingResourceWithRawResponse:
+ from .resources.streaming import StreamingResourceWithRawResponse
+
+ return StreamingResourceWithRawResponse(self._client.streaming)
+
+ @cached_property
+ def security(self) -> security.SecurityResourceWithRawResponse:
+ from .resources.security import SecurityResourceWithRawResponse
+
+ return SecurityResourceWithRawResponse(self._client.security)
+
+ @cached_property
+ def dns(self) -> dns.DNSResourceWithRawResponse:
+ from .resources.dns import DNSResourceWithRawResponse
+
+ return DNSResourceWithRawResponse(self._client.dns)
+
+ @cached_property
+ def storage(self) -> storage.StorageResourceWithRawResponse:
+ from .resources.storage import StorageResourceWithRawResponse
+
+ return StorageResourceWithRawResponse(self._client.storage)
+
+ @cached_property
+ def cdn(self) -> cdn.CDNResourceWithRawResponse:
+ from .resources.cdn import CDNResourceWithRawResponse
+
+ return CDNResourceWithRawResponse(self._client.cdn)
class AsyncGcoreWithRawResponse:
+ _client: AsyncGcore
+
def __init__(self, client: AsyncGcore) -> None:
- self.cloud = cloud.AsyncCloudResourceWithRawResponse(client.cloud)
- self.waap = waap.AsyncWaapResourceWithRawResponse(client.waap)
- self.iam = iam.AsyncIamResourceWithRawResponse(client.iam)
- self.fastedge = fastedge.AsyncFastedgeResourceWithRawResponse(client.fastedge)
- self.streaming = streaming.AsyncStreamingResourceWithRawResponse(client.streaming)
- self.security = security.AsyncSecurityResourceWithRawResponse(client.security)
- self.dns = dns.AsyncDNSResourceWithRawResponse(client.dns)
- self.storage = storage.AsyncStorageResourceWithRawResponse(client.storage)
- self.cdn = cdn.AsyncCDNResourceWithRawResponse(client.cdn)
+ self._client = client
+
+ @cached_property
+ def cloud(self) -> cloud.AsyncCloudResourceWithRawResponse:
+ from .resources.cloud import AsyncCloudResourceWithRawResponse
+
+ return AsyncCloudResourceWithRawResponse(self._client.cloud)
+
+ @cached_property
+ def waap(self) -> waap.AsyncWaapResourceWithRawResponse:
+ from .resources.waap import AsyncWaapResourceWithRawResponse
+
+ return AsyncWaapResourceWithRawResponse(self._client.waap)
+
+ @cached_property
+ def iam(self) -> iam.AsyncIamResourceWithRawResponse:
+ """
+ Account management operations including authentication, password management, and account details.
+ """
+ from .resources.iam import AsyncIamResourceWithRawResponse
+
+ return AsyncIamResourceWithRawResponse(self._client.iam)
+
+ @cached_property
+ def fastedge(self) -> fastedge.AsyncFastedgeResourceWithRawResponse:
+ """Client-level settings and limits"""
+ from .resources.fastedge import AsyncFastedgeResourceWithRawResponse
+
+ return AsyncFastedgeResourceWithRawResponse(self._client.fastedge)
+
+ @cached_property
+ def streaming(self) -> streaming.AsyncStreamingResourceWithRawResponse:
+ from .resources.streaming import AsyncStreamingResourceWithRawResponse
+
+ return AsyncStreamingResourceWithRawResponse(self._client.streaming)
+
+ @cached_property
+ def security(self) -> security.AsyncSecurityResourceWithRawResponse:
+ from .resources.security import AsyncSecurityResourceWithRawResponse
+
+ return AsyncSecurityResourceWithRawResponse(self._client.security)
+
+ @cached_property
+ def dns(self) -> dns.AsyncDNSResourceWithRawResponse:
+ from .resources.dns import AsyncDNSResourceWithRawResponse
+
+ return AsyncDNSResourceWithRawResponse(self._client.dns)
+
+ @cached_property
+ def storage(self) -> storage.AsyncStorageResourceWithRawResponse:
+ from .resources.storage import AsyncStorageResourceWithRawResponse
+
+ return AsyncStorageResourceWithRawResponse(self._client.storage)
+
+ @cached_property
+ def cdn(self) -> cdn.AsyncCDNResourceWithRawResponse:
+ from .resources.cdn import AsyncCDNResourceWithRawResponse
+
+ return AsyncCDNResourceWithRawResponse(self._client.cdn)
class GcoreWithStreamedResponse:
+ _client: Gcore
+
def __init__(self, client: Gcore) -> None:
- self.cloud = cloud.CloudResourceWithStreamingResponse(client.cloud)
- self.waap = waap.WaapResourceWithStreamingResponse(client.waap)
- self.iam = iam.IamResourceWithStreamingResponse(client.iam)
- self.fastedge = fastedge.FastedgeResourceWithStreamingResponse(client.fastedge)
- self.streaming = streaming.StreamingResourceWithStreamingResponse(client.streaming)
- self.security = security.SecurityResourceWithStreamingResponse(client.security)
- self.dns = dns.DNSResourceWithStreamingResponse(client.dns)
- self.storage = storage.StorageResourceWithStreamingResponse(client.storage)
- self.cdn = cdn.CDNResourceWithStreamingResponse(client.cdn)
+ self._client = client
+
+ @cached_property
+ def cloud(self) -> cloud.CloudResourceWithStreamingResponse:
+ from .resources.cloud import CloudResourceWithStreamingResponse
+
+ return CloudResourceWithStreamingResponse(self._client.cloud)
+
+ @cached_property
+ def waap(self) -> waap.WaapResourceWithStreamingResponse:
+ from .resources.waap import WaapResourceWithStreamingResponse
+
+ return WaapResourceWithStreamingResponse(self._client.waap)
+
+ @cached_property
+ def iam(self) -> iam.IamResourceWithStreamingResponse:
+ """
+ Account management operations including authentication, password management, and account details.
+ """
+ from .resources.iam import IamResourceWithStreamingResponse
+
+ return IamResourceWithStreamingResponse(self._client.iam)
+
+ @cached_property
+ def fastedge(self) -> fastedge.FastedgeResourceWithStreamingResponse:
+ """Client-level settings and limits"""
+ from .resources.fastedge import FastedgeResourceWithStreamingResponse
+
+ return FastedgeResourceWithStreamingResponse(self._client.fastedge)
+
+ @cached_property
+ def streaming(self) -> streaming.StreamingResourceWithStreamingResponse:
+ from .resources.streaming import StreamingResourceWithStreamingResponse
+
+ return StreamingResourceWithStreamingResponse(self._client.streaming)
+
+ @cached_property
+ def security(self) -> security.SecurityResourceWithStreamingResponse:
+ from .resources.security import SecurityResourceWithStreamingResponse
+
+ return SecurityResourceWithStreamingResponse(self._client.security)
+
+ @cached_property
+ def dns(self) -> dns.DNSResourceWithStreamingResponse:
+ from .resources.dns import DNSResourceWithStreamingResponse
+
+ return DNSResourceWithStreamingResponse(self._client.dns)
+
+ @cached_property
+ def storage(self) -> storage.StorageResourceWithStreamingResponse:
+ from .resources.storage import StorageResourceWithStreamingResponse
+
+ return StorageResourceWithStreamingResponse(self._client.storage)
+
+ @cached_property
+ def cdn(self) -> cdn.CDNResourceWithStreamingResponse:
+ from .resources.cdn import CDNResourceWithStreamingResponse
+
+ return CDNResourceWithStreamingResponse(self._client.cdn)
class AsyncGcoreWithStreamedResponse:
+ _client: AsyncGcore
+
def __init__(self, client: AsyncGcore) -> None:
- self.cloud = cloud.AsyncCloudResourceWithStreamingResponse(client.cloud)
- self.waap = waap.AsyncWaapResourceWithStreamingResponse(client.waap)
- self.iam = iam.AsyncIamResourceWithStreamingResponse(client.iam)
- self.fastedge = fastedge.AsyncFastedgeResourceWithStreamingResponse(client.fastedge)
- self.streaming = streaming.AsyncStreamingResourceWithStreamingResponse(client.streaming)
- self.security = security.AsyncSecurityResourceWithStreamingResponse(client.security)
- self.dns = dns.AsyncDNSResourceWithStreamingResponse(client.dns)
- self.storage = storage.AsyncStorageResourceWithStreamingResponse(client.storage)
- self.cdn = cdn.AsyncCDNResourceWithStreamingResponse(client.cdn)
+ self._client = client
+
+ @cached_property
+ def cloud(self) -> cloud.AsyncCloudResourceWithStreamingResponse:
+ from .resources.cloud import AsyncCloudResourceWithStreamingResponse
+
+ return AsyncCloudResourceWithStreamingResponse(self._client.cloud)
+
+ @cached_property
+ def waap(self) -> waap.AsyncWaapResourceWithStreamingResponse:
+ from .resources.waap import AsyncWaapResourceWithStreamingResponse
+
+ return AsyncWaapResourceWithStreamingResponse(self._client.waap)
+
+ @cached_property
+ def iam(self) -> iam.AsyncIamResourceWithStreamingResponse:
+ """
+ Account management operations including authentication, password management, and account details.
+ """
+ from .resources.iam import AsyncIamResourceWithStreamingResponse
+
+ return AsyncIamResourceWithStreamingResponse(self._client.iam)
+
+ @cached_property
+ def fastedge(self) -> fastedge.AsyncFastedgeResourceWithStreamingResponse:
+ """Client-level settings and limits"""
+ from .resources.fastedge import AsyncFastedgeResourceWithStreamingResponse
+
+ return AsyncFastedgeResourceWithStreamingResponse(self._client.fastedge)
+
+ @cached_property
+ def streaming(self) -> streaming.AsyncStreamingResourceWithStreamingResponse:
+ from .resources.streaming import AsyncStreamingResourceWithStreamingResponse
+
+ return AsyncStreamingResourceWithStreamingResponse(self._client.streaming)
+
+ @cached_property
+ def security(self) -> security.AsyncSecurityResourceWithStreamingResponse:
+ from .resources.security import AsyncSecurityResourceWithStreamingResponse
+
+ return AsyncSecurityResourceWithStreamingResponse(self._client.security)
+
+ @cached_property
+ def dns(self) -> dns.AsyncDNSResourceWithStreamingResponse:
+ from .resources.dns import AsyncDNSResourceWithStreamingResponse
+
+ return AsyncDNSResourceWithStreamingResponse(self._client.dns)
+
+ @cached_property
+ def storage(self) -> storage.AsyncStorageResourceWithStreamingResponse:
+ from .resources.storage import AsyncStorageResourceWithStreamingResponse
+
+ return AsyncStorageResourceWithStreamingResponse(self._client.storage)
+
+ @cached_property
+ def cdn(self) -> cdn.AsyncCDNResourceWithStreamingResponse:
+ from .resources.cdn import AsyncCDNResourceWithStreamingResponse
+
+ return AsyncCDNResourceWithStreamingResponse(self._client.cdn)
Client = Gcore
diff --git a/src/gcore/_version.py b/src/gcore/_version.py
index 7bcbde4b..72b7e16a 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.35.0" # x-release-please-version
+__version__ = "0.36.0" # x-release-please-version
diff --git a/src/gcore/resources/cdn/audit_logs.py b/src/gcore/resources/cdn/audit_logs.py
index e77a7315..6bb97f1d 100644
--- a/src/gcore/resources/cdn/audit_logs.py
+++ b/src/gcore/resources/cdn/audit_logs.py
@@ -23,6 +23,15 @@
class AuditLogsResource(SyncAPIResource):
+ """
+ Get the history of users requests to CDN.
+ It contains requests made both via the API and via the control panel.
+
+ The following methods are not tracked in the activity logs:
+ - HEAD
+ - OPTIONS
+ """
+
@cached_property
def with_raw_response(self) -> AuditLogsResourceWithRawResponse:
"""
@@ -187,6 +196,15 @@ def get(
class AsyncAuditLogsResource(AsyncAPIResource):
+ """
+ Get the history of users requests to CDN.
+ It contains requests made both via the API and via the control panel.
+
+ The following methods are not tracked in the activity logs:
+ - HEAD
+ - OPTIONS
+ """
+
@cached_property
def with_raw_response(self) -> AsyncAuditLogsResourceWithRawResponse:
"""
diff --git a/src/gcore/resources/cdn/cdn.py b/src/gcore/resources/cdn/cdn.py
index 892b17b5..8312906e 100644
--- a/src/gcore/resources/cdn/cdn.py
+++ b/src/gcore/resources/cdn/cdn.py
@@ -165,10 +165,23 @@ def trusted_ca_certificates(self) -> TrustedCaCertificatesResource:
@cached_property
def audit_logs(self) -> AuditLogsResource:
+ """
+ Get the history of users requests to CDN.
+ It contains requests made both via the API and via the control panel.
+
+ The following methods are not tracked in the activity logs:
+ - HEAD
+ - OPTIONS
+ """
return AuditLogsResource(self._client)
@cached_property
def logs(self) -> LogsResource:
+ """Log viewer provides you with general information about CDN operation.
+
+ This information does not contain all possible
+ sets of fields and restricted by time. To receive full data, use Logs Uploader.
+ """
return LogsResource(self._client)
@cached_property
@@ -177,14 +190,29 @@ def logs_uploader(self) -> LogsUploaderResource:
@cached_property
def statistics(self) -> StatisticsResource:
+ """
+ Consumption statistics is updated in near real-time as a standard practice.
+ However, the frequency of updates can vary, but they are typically available within a 24-hour period.
+ Exceptions, such as maintenance periods, may delay data beyond 24 hours until servers resume and fill in the missing statistics.
+ """
return StatisticsResource(self._client)
@cached_property
def network_capacity(self) -> NetworkCapacityResource:
+ """
+ Consumption statistics is updated in near real-time as a standard practice.
+ However, the frequency of updates can vary, but they are typically available within a 24-hour period.
+ Exceptions, such as maintenance periods, may delay data beyond 24 hours until servers resume and fill in the missing statistics.
+ """
return NetworkCapacityResource(self._client)
@cached_property
def metrics(self) -> MetricsResource:
+ """
+ Consumption statistics is updated in near real-time as a standard practice.
+ However, the frequency of updates can vary, but they are typically available within a 24-hour period.
+ Exceptions, such as maintenance periods, may delay data beyond 24 hours until servers resume and fill in the missing statistics.
+ """
return MetricsResource(self._client)
@cached_property
@@ -470,10 +498,23 @@ def trusted_ca_certificates(self) -> AsyncTrustedCaCertificatesResource:
@cached_property
def audit_logs(self) -> AsyncAuditLogsResource:
+ """
+ Get the history of users requests to CDN.
+ It contains requests made both via the API and via the control panel.
+
+ The following methods are not tracked in the activity logs:
+ - HEAD
+ - OPTIONS
+ """
return AsyncAuditLogsResource(self._client)
@cached_property
def logs(self) -> AsyncLogsResource:
+ """Log viewer provides you with general information about CDN operation.
+
+ This information does not contain all possible
+ sets of fields and restricted by time. To receive full data, use Logs Uploader.
+ """
return AsyncLogsResource(self._client)
@cached_property
@@ -482,14 +523,29 @@ def logs_uploader(self) -> AsyncLogsUploaderResource:
@cached_property
def statistics(self) -> AsyncStatisticsResource:
+ """
+ Consumption statistics is updated in near real-time as a standard practice.
+ However, the frequency of updates can vary, but they are typically available within a 24-hour period.
+ Exceptions, such as maintenance periods, may delay data beyond 24 hours until servers resume and fill in the missing statistics.
+ """
return AsyncStatisticsResource(self._client)
@cached_property
def network_capacity(self) -> AsyncNetworkCapacityResource:
+ """
+ Consumption statistics is updated in near real-time as a standard practice.
+ However, the frequency of updates can vary, but they are typically available within a 24-hour period.
+ Exceptions, such as maintenance periods, may delay data beyond 24 hours until servers resume and fill in the missing statistics.
+ """
return AsyncNetworkCapacityResource(self._client)
@cached_property
def metrics(self) -> AsyncMetricsResource:
+ """
+ Consumption statistics is updated in near real-time as a standard practice.
+ However, the frequency of updates can vary, but they are typically available within a 24-hour period.
+ Exceptions, such as maintenance periods, may delay data beyond 24 hours until servers resume and fill in the missing statistics.
+ """
return AsyncMetricsResource(self._client)
@cached_property
@@ -800,10 +856,23 @@ def trusted_ca_certificates(self) -> TrustedCaCertificatesResourceWithRawRespons
@cached_property
def audit_logs(self) -> AuditLogsResourceWithRawResponse:
+ """
+ Get the history of users requests to CDN.
+ It contains requests made both via the API and via the control panel.
+
+ The following methods are not tracked in the activity logs:
+ - HEAD
+ - OPTIONS
+ """
return AuditLogsResourceWithRawResponse(self._cdn.audit_logs)
@cached_property
def logs(self) -> LogsResourceWithRawResponse:
+ """Log viewer provides you with general information about CDN operation.
+
+ This information does not contain all possible
+ sets of fields and restricted by time. To receive full data, use Logs Uploader.
+ """
return LogsResourceWithRawResponse(self._cdn.logs)
@cached_property
@@ -812,14 +881,29 @@ def logs_uploader(self) -> LogsUploaderResourceWithRawResponse:
@cached_property
def statistics(self) -> StatisticsResourceWithRawResponse:
+ """
+ Consumption statistics is updated in near real-time as a standard practice.
+ However, the frequency of updates can vary, but they are typically available within a 24-hour period.
+ Exceptions, such as maintenance periods, may delay data beyond 24 hours until servers resume and fill in the missing statistics.
+ """
return StatisticsResourceWithRawResponse(self._cdn.statistics)
@cached_property
def network_capacity(self) -> NetworkCapacityResourceWithRawResponse:
+ """
+ Consumption statistics is updated in near real-time as a standard practice.
+ However, the frequency of updates can vary, but they are typically available within a 24-hour period.
+ Exceptions, such as maintenance periods, may delay data beyond 24 hours until servers resume and fill in the missing statistics.
+ """
return NetworkCapacityResourceWithRawResponse(self._cdn.network_capacity)
@cached_property
def metrics(self) -> MetricsResourceWithRawResponse:
+ """
+ Consumption statistics is updated in near real-time as a standard practice.
+ However, the frequency of updates can vary, but they are typically available within a 24-hour period.
+ Exceptions, such as maintenance periods, may delay data beyond 24 hours until servers resume and fill in the missing statistics.
+ """
return MetricsResourceWithRawResponse(self._cdn.metrics)
@cached_property
@@ -883,10 +967,23 @@ def trusted_ca_certificates(self) -> AsyncTrustedCaCertificatesResourceWithRawRe
@cached_property
def audit_logs(self) -> AsyncAuditLogsResourceWithRawResponse:
+ """
+ Get the history of users requests to CDN.
+ It contains requests made both via the API and via the control panel.
+
+ The following methods are not tracked in the activity logs:
+ - HEAD
+ - OPTIONS
+ """
return AsyncAuditLogsResourceWithRawResponse(self._cdn.audit_logs)
@cached_property
def logs(self) -> AsyncLogsResourceWithRawResponse:
+ """Log viewer provides you with general information about CDN operation.
+
+ This information does not contain all possible
+ sets of fields and restricted by time. To receive full data, use Logs Uploader.
+ """
return AsyncLogsResourceWithRawResponse(self._cdn.logs)
@cached_property
@@ -895,14 +992,29 @@ def logs_uploader(self) -> AsyncLogsUploaderResourceWithRawResponse:
@cached_property
def statistics(self) -> AsyncStatisticsResourceWithRawResponse:
+ """
+ Consumption statistics is updated in near real-time as a standard practice.
+ However, the frequency of updates can vary, but they are typically available within a 24-hour period.
+ Exceptions, such as maintenance periods, may delay data beyond 24 hours until servers resume and fill in the missing statistics.
+ """
return AsyncStatisticsResourceWithRawResponse(self._cdn.statistics)
@cached_property
def network_capacity(self) -> AsyncNetworkCapacityResourceWithRawResponse:
+ """
+ Consumption statistics is updated in near real-time as a standard practice.
+ However, the frequency of updates can vary, but they are typically available within a 24-hour period.
+ Exceptions, such as maintenance periods, may delay data beyond 24 hours until servers resume and fill in the missing statistics.
+ """
return AsyncNetworkCapacityResourceWithRawResponse(self._cdn.network_capacity)
@cached_property
def metrics(self) -> AsyncMetricsResourceWithRawResponse:
+ """
+ Consumption statistics is updated in near real-time as a standard practice.
+ However, the frequency of updates can vary, but they are typically available within a 24-hour period.
+ Exceptions, such as maintenance periods, may delay data beyond 24 hours until servers resume and fill in the missing statistics.
+ """
return AsyncMetricsResourceWithRawResponse(self._cdn.metrics)
@cached_property
@@ -966,10 +1078,23 @@ def trusted_ca_certificates(self) -> TrustedCaCertificatesResourceWithStreamingR
@cached_property
def audit_logs(self) -> AuditLogsResourceWithStreamingResponse:
+ """
+ Get the history of users requests to CDN.
+ It contains requests made both via the API and via the control panel.
+
+ The following methods are not tracked in the activity logs:
+ - HEAD
+ - OPTIONS
+ """
return AuditLogsResourceWithStreamingResponse(self._cdn.audit_logs)
@cached_property
def logs(self) -> LogsResourceWithStreamingResponse:
+ """Log viewer provides you with general information about CDN operation.
+
+ This information does not contain all possible
+ sets of fields and restricted by time. To receive full data, use Logs Uploader.
+ """
return LogsResourceWithStreamingResponse(self._cdn.logs)
@cached_property
@@ -978,14 +1103,29 @@ def logs_uploader(self) -> LogsUploaderResourceWithStreamingResponse:
@cached_property
def statistics(self) -> StatisticsResourceWithStreamingResponse:
+ """
+ Consumption statistics is updated in near real-time as a standard practice.
+ However, the frequency of updates can vary, but they are typically available within a 24-hour period.
+ Exceptions, such as maintenance periods, may delay data beyond 24 hours until servers resume and fill in the missing statistics.
+ """
return StatisticsResourceWithStreamingResponse(self._cdn.statistics)
@cached_property
def network_capacity(self) -> NetworkCapacityResourceWithStreamingResponse:
+ """
+ Consumption statistics is updated in near real-time as a standard practice.
+ However, the frequency of updates can vary, but they are typically available within a 24-hour period.
+ Exceptions, such as maintenance periods, may delay data beyond 24 hours until servers resume and fill in the missing statistics.
+ """
return NetworkCapacityResourceWithStreamingResponse(self._cdn.network_capacity)
@cached_property
def metrics(self) -> MetricsResourceWithStreamingResponse:
+ """
+ Consumption statistics is updated in near real-time as a standard practice.
+ However, the frequency of updates can vary, but they are typically available within a 24-hour period.
+ Exceptions, such as maintenance periods, may delay data beyond 24 hours until servers resume and fill in the missing statistics.
+ """
return MetricsResourceWithStreamingResponse(self._cdn.metrics)
@cached_property
@@ -1049,10 +1189,23 @@ def trusted_ca_certificates(self) -> AsyncTrustedCaCertificatesResourceWithStrea
@cached_property
def audit_logs(self) -> AsyncAuditLogsResourceWithStreamingResponse:
+ """
+ Get the history of users requests to CDN.
+ It contains requests made both via the API and via the control panel.
+
+ The following methods are not tracked in the activity logs:
+ - HEAD
+ - OPTIONS
+ """
return AsyncAuditLogsResourceWithStreamingResponse(self._cdn.audit_logs)
@cached_property
def logs(self) -> AsyncLogsResourceWithStreamingResponse:
+ """Log viewer provides you with general information about CDN operation.
+
+ This information does not contain all possible
+ sets of fields and restricted by time. To receive full data, use Logs Uploader.
+ """
return AsyncLogsResourceWithStreamingResponse(self._cdn.logs)
@cached_property
@@ -1061,14 +1214,29 @@ def logs_uploader(self) -> AsyncLogsUploaderResourceWithStreamingResponse:
@cached_property
def statistics(self) -> AsyncStatisticsResourceWithStreamingResponse:
+ """
+ Consumption statistics is updated in near real-time as a standard practice.
+ However, the frequency of updates can vary, but they are typically available within a 24-hour period.
+ Exceptions, such as maintenance periods, may delay data beyond 24 hours until servers resume and fill in the missing statistics.
+ """
return AsyncStatisticsResourceWithStreamingResponse(self._cdn.statistics)
@cached_property
def network_capacity(self) -> AsyncNetworkCapacityResourceWithStreamingResponse:
+ """
+ Consumption statistics is updated in near real-time as a standard practice.
+ However, the frequency of updates can vary, but they are typically available within a 24-hour period.
+ Exceptions, such as maintenance periods, may delay data beyond 24 hours until servers resume and fill in the missing statistics.
+ """
return AsyncNetworkCapacityResourceWithStreamingResponse(self._cdn.network_capacity)
@cached_property
def metrics(self) -> AsyncMetricsResourceWithStreamingResponse:
+ """
+ Consumption statistics is updated in near real-time as a standard practice.
+ However, the frequency of updates can vary, but they are typically available within a 24-hour period.
+ Exceptions, such as maintenance periods, may delay data beyond 24 hours until servers resume and fill in the missing statistics.
+ """
return AsyncMetricsResourceWithStreamingResponse(self._cdn.metrics)
@cached_property
diff --git a/src/gcore/resources/cdn/cdn_resources/cdn_resources.py b/src/gcore/resources/cdn/cdn_resources/cdn_resources.py
index 52c7821e..d14795b3 100644
--- a/src/gcore/resources/cdn/cdn_resources/cdn_resources.py
+++ b/src/gcore/resources/cdn/cdn_resources/cdn_resources.py
@@ -55,6 +55,15 @@ def shield(self) -> ShieldResource:
@cached_property
def rules(self) -> RulesResource:
+ """
+ Rules allow to set up custom settings for certain file types or paths.
+ By default, the rule inherits all options values from the related CDN resource.
+
+ Each option in rule settings can be in one of the following states:
+ - **Inherit** - Option is not added to the rule. Option inherits its value from the CDN resource settings. In this case, the option value is **null**.
+ - **ON** - Option is added to the rule and enabled. Option values configured in the rule will override values from the CDN resource settings.
+ - **OFF** - Option is added to the rule and disabled. Option will be turned off.
+ """
return RulesResource(self._client)
@cached_property
@@ -963,6 +972,15 @@ def shield(self) -> AsyncShieldResource:
@cached_property
def rules(self) -> AsyncRulesResource:
+ """
+ Rules allow to set up custom settings for certain file types or paths.
+ By default, the rule inherits all options values from the related CDN resource.
+
+ Each option in rule settings can be in one of the following states:
+ - **Inherit** - Option is not added to the rule. Option inherits its value from the CDN resource settings. In this case, the option value is **null**.
+ - **ON** - Option is added to the rule and enabled. Option values configured in the rule will override values from the CDN resource settings.
+ - **OFF** - Option is added to the rule and disabled. Option will be turned off.
+ """
return AsyncRulesResource(self._client)
@cached_property
@@ -1902,6 +1920,15 @@ def shield(self) -> ShieldResourceWithRawResponse:
@cached_property
def rules(self) -> RulesResourceWithRawResponse:
+ """
+ Rules allow to set up custom settings for certain file types or paths.
+ By default, the rule inherits all options values from the related CDN resource.
+
+ Each option in rule settings can be in one of the following states:
+ - **Inherit** - Option is not added to the rule. Option inherits its value from the CDN resource settings. In this case, the option value is **null**.
+ - **ON** - Option is added to the rule and enabled. Option values configured in the rule will override values from the CDN resource settings.
+ - **OFF** - Option is added to the rule and disabled. Option will be turned off.
+ """
return RulesResourceWithRawResponse(self._cdn_resources.rules)
@@ -1943,6 +1970,15 @@ def shield(self) -> AsyncShieldResourceWithRawResponse:
@cached_property
def rules(self) -> AsyncRulesResourceWithRawResponse:
+ """
+ Rules allow to set up custom settings for certain file types or paths.
+ By default, the rule inherits all options values from the related CDN resource.
+
+ Each option in rule settings can be in one of the following states:
+ - **Inherit** - Option is not added to the rule. Option inherits its value from the CDN resource settings. In this case, the option value is **null**.
+ - **ON** - Option is added to the rule and enabled. Option values configured in the rule will override values from the CDN resource settings.
+ - **OFF** - Option is added to the rule and disabled. Option will be turned off.
+ """
return AsyncRulesResourceWithRawResponse(self._cdn_resources.rules)
@@ -1984,6 +2020,15 @@ def shield(self) -> ShieldResourceWithStreamingResponse:
@cached_property
def rules(self) -> RulesResourceWithStreamingResponse:
+ """
+ Rules allow to set up custom settings for certain file types or paths.
+ By default, the rule inherits all options values from the related CDN resource.
+
+ Each option in rule settings can be in one of the following states:
+ - **Inherit** - Option is not added to the rule. Option inherits its value from the CDN resource settings. In this case, the option value is **null**.
+ - **ON** - Option is added to the rule and enabled. Option values configured in the rule will override values from the CDN resource settings.
+ - **OFF** - Option is added to the rule and disabled. Option will be turned off.
+ """
return RulesResourceWithStreamingResponse(self._cdn_resources.rules)
@@ -2025,4 +2070,13 @@ def shield(self) -> AsyncShieldResourceWithStreamingResponse:
@cached_property
def rules(self) -> AsyncRulesResourceWithStreamingResponse:
+ """
+ Rules allow to set up custom settings for certain file types or paths.
+ By default, the rule inherits all options values from the related CDN resource.
+
+ Each option in rule settings can be in one of the following states:
+ - **Inherit** - Option is not added to the rule. Option inherits its value from the CDN resource settings. In this case, the option value is **null**.
+ - **ON** - Option is added to the rule and enabled. Option values configured in the rule will override values from the CDN resource settings.
+ - **OFF** - Option is added to the rule and disabled. Option will be turned off.
+ """
return AsyncRulesResourceWithStreamingResponse(self._cdn_resources.rules)
diff --git a/src/gcore/resources/cdn/cdn_resources/rules.py b/src/gcore/resources/cdn/cdn_resources/rules.py
index 808457fc..7c93a4b1 100644
--- a/src/gcore/resources/cdn/cdn_resources/rules.py
+++ b/src/gcore/resources/cdn/cdn_resources/rules.py
@@ -26,6 +26,16 @@
class RulesResource(SyncAPIResource):
+ """
+ Rules allow to set up custom settings for certain file types or paths.
+ By default, the rule inherits all options values from the related CDN resource.
+
+ Each option in rule settings can be in one of the following states:
+ - **Inherit** - Option is not added to the rule. Option inherits its value from the CDN resource settings. In this case, the option value is **null**.
+ - **ON** - Option is added to the rule and enabled. Option values configured in the rule will override values from the CDN resource settings.
+ - **OFF** - Option is added to the rule and disabled. Option will be turned off.
+ """
+
@cached_property
def with_raw_response(self) -> RulesResourceWithRawResponse:
"""
@@ -467,6 +477,16 @@ def replace(
class AsyncRulesResource(AsyncAPIResource):
+ """
+ Rules allow to set up custom settings for certain file types or paths.
+ By default, the rule inherits all options values from the related CDN resource.
+
+ Each option in rule settings can be in one of the following states:
+ - **Inherit** - Option is not added to the rule. Option inherits its value from the CDN resource settings. In this case, the option value is **null**.
+ - **ON** - Option is added to the rule and enabled. Option values configured in the rule will override values from the CDN resource settings.
+ - **OFF** - Option is added to the rule and disabled. Option will be turned off.
+ """
+
@cached_property
def with_raw_response(self) -> AsyncRulesResourceWithRawResponse:
"""
diff --git a/src/gcore/resources/cdn/logs.py b/src/gcore/resources/cdn/logs.py
index 4791a254..3c0d9c83 100644
--- a/src/gcore/resources/cdn/logs.py
+++ b/src/gcore/resources/cdn/logs.py
@@ -31,6 +31,12 @@
class LogsResource(SyncAPIResource):
+ """Log viewer provides you with general information about CDN operation.
+
+ This information does not contain all possible
+ sets of fields and restricted by time. To receive full data, use Logs Uploader.
+ """
+
@cached_property
def with_raw_response(self) -> LogsResourceWithRawResponse:
"""
@@ -682,6 +688,12 @@ def download(
class AsyncLogsResource(AsyncAPIResource):
+ """Log viewer provides you with general information about CDN operation.
+
+ This information does not contain all possible
+ sets of fields and restricted by time. To receive full data, use Logs Uploader.
+ """
+
@cached_property
def with_raw_response(self) -> AsyncLogsResourceWithRawResponse:
"""
diff --git a/src/gcore/resources/cdn/logs_uploader/configs.py b/src/gcore/resources/cdn/logs_uploader/configs.py
index 66fb217f..dacc13e1 100644
--- a/src/gcore/resources/cdn/logs_uploader/configs.py
+++ b/src/gcore/resources/cdn/logs_uploader/configs.py
@@ -31,6 +31,14 @@
class ConfigsResource(SyncAPIResource):
+ """Logs uploader allows you to upload logs with desired format to desired storages.
+
+ Consists of three main parts:
+ - **Policies** - rules that define which logs are uploaded and how they are uploaded.
+ - **Targets** - destinations where logs are uploaded.
+ - **Configs** - combinations of logs uploader policies, targets and resources to which they are applied.
+ """
+
@cached_property
def with_raw_response(self) -> ConfigsResourceWithRawResponse:
"""
@@ -382,6 +390,14 @@ def validate(
class AsyncConfigsResource(AsyncAPIResource):
+ """Logs uploader allows you to upload logs with desired format to desired storages.
+
+ Consists of three main parts:
+ - **Policies** - rules that define which logs are uploaded and how they are uploaded.
+ - **Targets** - destinations where logs are uploaded.
+ - **Configs** - combinations of logs uploader policies, targets and resources to which they are applied.
+ """
+
@cached_property
def with_raw_response(self) -> AsyncConfigsResourceWithRawResponse:
"""
diff --git a/src/gcore/resources/cdn/logs_uploader/logs_uploader.py b/src/gcore/resources/cdn/logs_uploader/logs_uploader.py
index 9d7c3aeb..6c0a4dc0 100644
--- a/src/gcore/resources/cdn/logs_uploader/logs_uploader.py
+++ b/src/gcore/resources/cdn/logs_uploader/logs_uploader.py
@@ -35,14 +35,35 @@
class LogsUploaderResource(SyncAPIResource):
@cached_property
def policies(self) -> PoliciesResource:
+ """Logs uploader allows you to upload logs with desired format to desired storages.
+
+ Consists of three main parts:
+ - **Policies** - rules that define which logs are uploaded and how they are uploaded.
+ - **Targets** - destinations where logs are uploaded.
+ - **Configs** - combinations of logs uploader policies, targets and resources to which they are applied.
+ """
return PoliciesResource(self._client)
@cached_property
def targets(self) -> TargetsResource:
+ """Logs uploader allows you to upload logs with desired format to desired storages.
+
+ Consists of three main parts:
+ - **Policies** - rules that define which logs are uploaded and how they are uploaded.
+ - **Targets** - destinations where logs are uploaded.
+ - **Configs** - combinations of logs uploader policies, targets and resources to which they are applied.
+ """
return TargetsResource(self._client)
@cached_property
def configs(self) -> ConfigsResource:
+ """Logs uploader allows you to upload logs with desired format to desired storages.
+
+ Consists of three main parts:
+ - **Policies** - rules that define which logs are uploaded and how they are uploaded.
+ - **Targets** - destinations where logs are uploaded.
+ - **Configs** - combinations of logs uploader policies, targets and resources to which they are applied.
+ """
return ConfigsResource(self._client)
@cached_property
@@ -68,14 +89,35 @@ def with_streaming_response(self) -> LogsUploaderResourceWithStreamingResponse:
class AsyncLogsUploaderResource(AsyncAPIResource):
@cached_property
def policies(self) -> AsyncPoliciesResource:
+ """Logs uploader allows you to upload logs with desired format to desired storages.
+
+ Consists of three main parts:
+ - **Policies** - rules that define which logs are uploaded and how they are uploaded.
+ - **Targets** - destinations where logs are uploaded.
+ - **Configs** - combinations of logs uploader policies, targets and resources to which they are applied.
+ """
return AsyncPoliciesResource(self._client)
@cached_property
def targets(self) -> AsyncTargetsResource:
+ """Logs uploader allows you to upload logs with desired format to desired storages.
+
+ Consists of three main parts:
+ - **Policies** - rules that define which logs are uploaded and how they are uploaded.
+ - **Targets** - destinations where logs are uploaded.
+ - **Configs** - combinations of logs uploader policies, targets and resources to which they are applied.
+ """
return AsyncTargetsResource(self._client)
@cached_property
def configs(self) -> AsyncConfigsResource:
+ """Logs uploader allows you to upload logs with desired format to desired storages.
+
+ Consists of three main parts:
+ - **Policies** - rules that define which logs are uploaded and how they are uploaded.
+ - **Targets** - destinations where logs are uploaded.
+ - **Configs** - combinations of logs uploader policies, targets and resources to which they are applied.
+ """
return AsyncConfigsResource(self._client)
@cached_property
@@ -104,14 +146,35 @@ def __init__(self, logs_uploader: LogsUploaderResource) -> None:
@cached_property
def policies(self) -> PoliciesResourceWithRawResponse:
+ """Logs uploader allows you to upload logs with desired format to desired storages.
+
+ Consists of three main parts:
+ - **Policies** - rules that define which logs are uploaded and how they are uploaded.
+ - **Targets** - destinations where logs are uploaded.
+ - **Configs** - combinations of logs uploader policies, targets and resources to which they are applied.
+ """
return PoliciesResourceWithRawResponse(self._logs_uploader.policies)
@cached_property
def targets(self) -> TargetsResourceWithRawResponse:
+ """Logs uploader allows you to upload logs with desired format to desired storages.
+
+ Consists of three main parts:
+ - **Policies** - rules that define which logs are uploaded and how they are uploaded.
+ - **Targets** - destinations where logs are uploaded.
+ - **Configs** - combinations of logs uploader policies, targets and resources to which they are applied.
+ """
return TargetsResourceWithRawResponse(self._logs_uploader.targets)
@cached_property
def configs(self) -> ConfigsResourceWithRawResponse:
+ """Logs uploader allows you to upload logs with desired format to desired storages.
+
+ Consists of three main parts:
+ - **Policies** - rules that define which logs are uploaded and how they are uploaded.
+ - **Targets** - destinations where logs are uploaded.
+ - **Configs** - combinations of logs uploader policies, targets and resources to which they are applied.
+ """
return ConfigsResourceWithRawResponse(self._logs_uploader.configs)
@@ -121,14 +184,35 @@ def __init__(self, logs_uploader: AsyncLogsUploaderResource) -> None:
@cached_property
def policies(self) -> AsyncPoliciesResourceWithRawResponse:
+ """Logs uploader allows you to upload logs with desired format to desired storages.
+
+ Consists of three main parts:
+ - **Policies** - rules that define which logs are uploaded and how they are uploaded.
+ - **Targets** - destinations where logs are uploaded.
+ - **Configs** - combinations of logs uploader policies, targets and resources to which they are applied.
+ """
return AsyncPoliciesResourceWithRawResponse(self._logs_uploader.policies)
@cached_property
def targets(self) -> AsyncTargetsResourceWithRawResponse:
+ """Logs uploader allows you to upload logs with desired format to desired storages.
+
+ Consists of three main parts:
+ - **Policies** - rules that define which logs are uploaded and how they are uploaded.
+ - **Targets** - destinations where logs are uploaded.
+ - **Configs** - combinations of logs uploader policies, targets and resources to which they are applied.
+ """
return AsyncTargetsResourceWithRawResponse(self._logs_uploader.targets)
@cached_property
def configs(self) -> AsyncConfigsResourceWithRawResponse:
+ """Logs uploader allows you to upload logs with desired format to desired storages.
+
+ Consists of three main parts:
+ - **Policies** - rules that define which logs are uploaded and how they are uploaded.
+ - **Targets** - destinations where logs are uploaded.
+ - **Configs** - combinations of logs uploader policies, targets and resources to which they are applied.
+ """
return AsyncConfigsResourceWithRawResponse(self._logs_uploader.configs)
@@ -138,14 +222,35 @@ def __init__(self, logs_uploader: LogsUploaderResource) -> None:
@cached_property
def policies(self) -> PoliciesResourceWithStreamingResponse:
+ """Logs uploader allows you to upload logs with desired format to desired storages.
+
+ Consists of three main parts:
+ - **Policies** - rules that define which logs are uploaded and how they are uploaded.
+ - **Targets** - destinations where logs are uploaded.
+ - **Configs** - combinations of logs uploader policies, targets and resources to which they are applied.
+ """
return PoliciesResourceWithStreamingResponse(self._logs_uploader.policies)
@cached_property
def targets(self) -> TargetsResourceWithStreamingResponse:
+ """Logs uploader allows you to upload logs with desired format to desired storages.
+
+ Consists of three main parts:
+ - **Policies** - rules that define which logs are uploaded and how they are uploaded.
+ - **Targets** - destinations where logs are uploaded.
+ - **Configs** - combinations of logs uploader policies, targets and resources to which they are applied.
+ """
return TargetsResourceWithStreamingResponse(self._logs_uploader.targets)
@cached_property
def configs(self) -> ConfigsResourceWithStreamingResponse:
+ """Logs uploader allows you to upload logs with desired format to desired storages.
+
+ Consists of three main parts:
+ - **Policies** - rules that define which logs are uploaded and how they are uploaded.
+ - **Targets** - destinations where logs are uploaded.
+ - **Configs** - combinations of logs uploader policies, targets and resources to which they are applied.
+ """
return ConfigsResourceWithStreamingResponse(self._logs_uploader.configs)
@@ -155,12 +260,33 @@ def __init__(self, logs_uploader: AsyncLogsUploaderResource) -> None:
@cached_property
def policies(self) -> AsyncPoliciesResourceWithStreamingResponse:
+ """Logs uploader allows you to upload logs with desired format to desired storages.
+
+ Consists of three main parts:
+ - **Policies** - rules that define which logs are uploaded and how they are uploaded.
+ - **Targets** - destinations where logs are uploaded.
+ - **Configs** - combinations of logs uploader policies, targets and resources to which they are applied.
+ """
return AsyncPoliciesResourceWithStreamingResponse(self._logs_uploader.policies)
@cached_property
def targets(self) -> AsyncTargetsResourceWithStreamingResponse:
+ """Logs uploader allows you to upload logs with desired format to desired storages.
+
+ Consists of three main parts:
+ - **Policies** - rules that define which logs are uploaded and how they are uploaded.
+ - **Targets** - destinations where logs are uploaded.
+ - **Configs** - combinations of logs uploader policies, targets and resources to which they are applied.
+ """
return AsyncTargetsResourceWithStreamingResponse(self._logs_uploader.targets)
@cached_property
def configs(self) -> AsyncConfigsResourceWithStreamingResponse:
+ """Logs uploader allows you to upload logs with desired format to desired storages.
+
+ Consists of three main parts:
+ - **Policies** - rules that define which logs are uploaded and how they are uploaded.
+ - **Targets** - destinations where logs are uploaded.
+ - **Configs** - combinations of logs uploader policies, targets and resources to which they are applied.
+ """
return AsyncConfigsResourceWithStreamingResponse(self._logs_uploader.configs)
diff --git a/src/gcore/resources/cdn/logs_uploader/policies.py b/src/gcore/resources/cdn/logs_uploader/policies.py
index e4d15912..7cfd64c2 100644
--- a/src/gcore/resources/cdn/logs_uploader/policies.py
+++ b/src/gcore/resources/cdn/logs_uploader/policies.py
@@ -32,6 +32,14 @@
class PoliciesResource(SyncAPIResource):
+ """Logs uploader allows you to upload logs with desired format to desired storages.
+
+ Consists of three main parts:
+ - **Policies** - rules that define which logs are uploaded and how they are uploaded.
+ - **Targets** - destinations where logs are uploaded.
+ - **Configs** - combinations of logs uploader policies, targets and resources to which they are applied.
+ """
+
@cached_property
def with_raw_response(self) -> PoliciesResourceWithRawResponse:
"""
@@ -566,6 +574,14 @@ def replace(
class AsyncPoliciesResource(AsyncAPIResource):
+ """Logs uploader allows you to upload logs with desired format to desired storages.
+
+ Consists of three main parts:
+ - **Policies** - rules that define which logs are uploaded and how they are uploaded.
+ - **Targets** - destinations where logs are uploaded.
+ - **Configs** - combinations of logs uploader policies, targets and resources to which they are applied.
+ """
+
@cached_property
def with_raw_response(self) -> AsyncPoliciesResourceWithRawResponse:
"""
diff --git a/src/gcore/resources/cdn/logs_uploader/targets.py b/src/gcore/resources/cdn/logs_uploader/targets.py
index c0eba285..3772321d 100644
--- a/src/gcore/resources/cdn/logs_uploader/targets.py
+++ b/src/gcore/resources/cdn/logs_uploader/targets.py
@@ -32,6 +32,14 @@
class TargetsResource(SyncAPIResource):
+ """Logs uploader allows you to upload logs with desired format to desired storages.
+
+ Consists of three main parts:
+ - **Policies** - rules that define which logs are uploaded and how they are uploaded.
+ - **Targets** - destinations where logs are uploaded.
+ - **Configs** - combinations of logs uploader policies, targets and resources to which they are applied.
+ """
+
@cached_property
def with_raw_response(self) -> TargetsResourceWithRawResponse:
"""
@@ -354,6 +362,14 @@ def validate(
class AsyncTargetsResource(AsyncAPIResource):
+ """Logs uploader allows you to upload logs with desired format to desired storages.
+
+ Consists of three main parts:
+ - **Policies** - rules that define which logs are uploaded and how they are uploaded.
+ - **Targets** - destinations where logs are uploaded.
+ - **Configs** - combinations of logs uploader policies, targets and resources to which they are applied.
+ """
+
@cached_property
def with_raw_response(self) -> AsyncTargetsResourceWithRawResponse:
"""
diff --git a/src/gcore/resources/cdn/metrics.py b/src/gcore/resources/cdn/metrics.py
index 1f2297a4..172a0085 100644
--- a/src/gcore/resources/cdn/metrics.py
+++ b/src/gcore/resources/cdn/metrics.py
@@ -24,6 +24,12 @@
class MetricsResource(SyncAPIResource):
+ """
+ Consumption statistics is updated in near real-time as a standard practice.
+ However, the frequency of updates can vary, but they are typically available within a 24-hour period.
+ Exceptions, such as maintenance periods, may delay data beyond 24 hours until servers resume and fill in the missing statistics.
+ """
+
@cached_property
def with_raw_response(self) -> MetricsResourceWithRawResponse:
"""
@@ -202,6 +208,12 @@ def list(
class AsyncMetricsResource(AsyncAPIResource):
+ """
+ Consumption statistics is updated in near real-time as a standard practice.
+ However, the frequency of updates can vary, but they are typically available within a 24-hour period.
+ Exceptions, such as maintenance periods, may delay data beyond 24 hours until servers resume and fill in the missing statistics.
+ """
+
@cached_property
def with_raw_response(self) -> AsyncMetricsResourceWithRawResponse:
"""
diff --git a/src/gcore/resources/cdn/network_capacity.py b/src/gcore/resources/cdn/network_capacity.py
index 870849d3..ad81c972 100644
--- a/src/gcore/resources/cdn/network_capacity.py
+++ b/src/gcore/resources/cdn/network_capacity.py
@@ -20,6 +20,12 @@
class NetworkCapacityResource(SyncAPIResource):
+ """
+ Consumption statistics is updated in near real-time as a standard practice.
+ However, the frequency of updates can vary, but they are typically available within a 24-hour period.
+ Exceptions, such as maintenance periods, may delay data beyond 24 hours until servers resume and fill in the missing statistics.
+ """
+
@cached_property
def with_raw_response(self) -> NetworkCapacityResourceWithRawResponse:
"""
@@ -60,6 +66,12 @@ def list(
class AsyncNetworkCapacityResource(AsyncAPIResource):
+ """
+ Consumption statistics is updated in near real-time as a standard practice.
+ However, the frequency of updates can vary, but they are typically available within a 24-hour period.
+ Exceptions, such as maintenance periods, may delay data beyond 24 hours until servers resume and fill in the missing statistics.
+ """
+
@cached_property
def with_raw_response(self) -> AsyncNetworkCapacityResourceWithRawResponse:
"""
diff --git a/src/gcore/resources/cdn/statistics.py b/src/gcore/resources/cdn/statistics.py
index 0e6a32a6..b3e0d2bd 100644
--- a/src/gcore/resources/cdn/statistics.py
+++ b/src/gcore/resources/cdn/statistics.py
@@ -33,6 +33,12 @@
class StatisticsResource(SyncAPIResource):
+ """
+ Consumption statistics is updated in near real-time as a standard practice.
+ However, the frequency of updates can vary, but they are typically available within a 24-hour period.
+ Exceptions, such as maintenance periods, may delay data beyond 24 hours until servers resume and fill in the missing statistics.
+ """
+
@cached_property
def with_raw_response(self) -> StatisticsResourceWithRawResponse:
"""
@@ -660,6 +666,12 @@ def get_shield_usage_series(
class AsyncStatisticsResource(AsyncAPIResource):
+ """
+ Consumption statistics is updated in near real-time as a standard practice.
+ However, the frequency of updates can vary, but they are typically available within a 24-hour period.
+ Exceptions, such as maintenance periods, may delay data beyond 24 hours until servers resume and fill in the missing statistics.
+ """
+
@cached_property
def with_raw_response(self) -> AsyncStatisticsResourceWithRawResponse:
"""
diff --git a/src/gcore/resources/cloud/api.md b/src/gcore/resources/cloud/api.md
index 79c3958d..0028620e 100644
--- a/src/gcore/resources/cloud/api.md
+++ b/src/gcore/resources/cloud/api.md
@@ -792,8 +792,9 @@ Methods:
- client.cloud.gpu_baremetal.clusters.get(cluster_id, \*, project_id, region_id) -> GPUBaremetalCluster
- client.cloud.gpu_baremetal.clusters.powercycle_all_servers(cluster_id, \*, project_id, region_id) -> GPUBaremetalClusterServerV1List
- client.cloud.gpu_baremetal.clusters.reboot_all_servers(cluster_id, \*, project_id, region_id) -> GPUBaremetalClusterServerV1List
-- client.cloud.gpu_baremetal.clusters.rebuild(cluster_id, \*, project_id, region_id, \*\*params) -> TaskIDList
+- client.cloud.gpu_baremetal.clusters.rebuild(cluster_id, \*, project_id, region_id) -> TaskIDList
- client.cloud.gpu_baremetal.clusters.resize(cluster_id, \*, project_id, region_id, \*\*params) -> TaskIDList
+- client.cloud.gpu_baremetal.clusters.update_servers_settings(cluster_id, \*, project_id, region_id, \*\*params) -> GPUBaremetalCluster
#### Interfaces
@@ -822,6 +823,7 @@ Methods:
- client.cloud.gpu_baremetal.clusters.servers.get_console(instance_id, \*, project_id, region_id) -> Console
- client.cloud.gpu_baremetal.clusters.servers.powercycle(instance_id, \*, project_id, region_id) -> GPUBaremetalClusterServerV1
- client.cloud.gpu_baremetal.clusters.servers.reboot(instance_id, \*, project_id, region_id) -> GPUBaremetalClusterServerV1
+- client.cloud.gpu_baremetal.clusters.servers.rebuild(server_id, \*, project_id, region_id, cluster_id) -> TaskIDList
#### Flavors
diff --git a/src/gcore/resources/cloud/cost_reports.py b/src/gcore/resources/cloud/cost_reports.py
index c0f2f84b..3f2b8b3e 100644
--- a/src/gcore/resources/cloud/cost_reports.py
+++ b/src/gcore/resources/cloud/cost_reports.py
@@ -288,6 +288,25 @@ def get_detailed(
enable_last_day: bool | Omit = omit,
limit: int | Omit = omit,
offset: int | Omit = omit,
+ order_by: List[
+ Literal[
+ "billing_value.asc",
+ "billing_value.desc",
+ "first_seen.asc",
+ "first_seen.desc",
+ "last_name.asc",
+ "last_name.desc",
+ "last_seen.asc",
+ "last_seen.desc",
+ "project.asc",
+ "project.desc",
+ "region.asc",
+ "region.desc",
+ "type.asc",
+ "type.desc",
+ ]
+ ]
+ | Omit = omit,
projects: Iterable[int] | Omit = omit,
regions: Iterable[int] | Omit = omit,
response_format: Literal["csv_records", "json"] | Omit = omit,
@@ -362,6 +381,8 @@ def get_detailed(
offset: The response resources offset.
+ order_by: List of sorting criteria in 'field.direction' format.
+
projects: List of project IDs
regions: List of region IDs.
@@ -372,7 +393,8 @@ def get_detailed(
schema_filter: Extended filter for field filtering.
- sorting: List of sorting filters (JSON objects) fields: project. directions: asc, desc.
+ sorting: (DEPRECATED Use 'order_by' instead) List of sorting filters (JSON objects)
+ fields: project. directions: asc, desc.
tags: Filter by tags
@@ -395,6 +417,7 @@ def get_detailed(
"enable_last_day": enable_last_day,
"limit": limit,
"offset": offset,
+ "order_by": order_by,
"projects": projects,
"regions": regions,
"response_format": response_format,
@@ -670,6 +693,25 @@ async def get_detailed(
enable_last_day: bool | Omit = omit,
limit: int | Omit = omit,
offset: int | Omit = omit,
+ order_by: List[
+ Literal[
+ "billing_value.asc",
+ "billing_value.desc",
+ "first_seen.asc",
+ "first_seen.desc",
+ "last_name.asc",
+ "last_name.desc",
+ "last_seen.asc",
+ "last_seen.desc",
+ "project.asc",
+ "project.desc",
+ "region.asc",
+ "region.desc",
+ "type.asc",
+ "type.desc",
+ ]
+ ]
+ | Omit = omit,
projects: Iterable[int] | Omit = omit,
regions: Iterable[int] | Omit = omit,
response_format: Literal["csv_records", "json"] | Omit = omit,
@@ -744,6 +786,8 @@ async def get_detailed(
offset: The response resources offset.
+ order_by: List of sorting criteria in 'field.direction' format.
+
projects: List of project IDs
regions: List of region IDs.
@@ -754,7 +798,8 @@ async def get_detailed(
schema_filter: Extended filter for field filtering.
- sorting: List of sorting filters (JSON objects) fields: project. directions: asc, desc.
+ sorting: (DEPRECATED Use 'order_by' instead) List of sorting filters (JSON objects)
+ fields: project. directions: asc, desc.
tags: Filter by tags
@@ -777,6 +822,7 @@ async def get_detailed(
"enable_last_day": enable_last_day,
"limit": limit,
"offset": offset,
+ "order_by": order_by,
"projects": projects,
"regions": regions,
"response_format": response_format,
diff --git a/src/gcore/resources/cloud/gpu_baremetal/clusters/clusters.py b/src/gcore/resources/cloud/gpu_baremetal/clusters/clusters.py
index 700297ba..0ea1d06c 100644
--- a/src/gcore/resources/cloud/gpu_baremetal/clusters/clusters.py
+++ b/src/gcore/resources/cloud/gpu_baremetal/clusters/clusters.py
@@ -31,7 +31,7 @@
ServersResourceWithStreamingResponse,
AsyncServersResourceWithStreamingResponse,
)
-from ....._types import NOT_GIVEN, Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
+from ....._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ....._utils import maybe_transform, async_maybe_transform
from .interfaces import (
InterfacesResource,
@@ -58,7 +58,7 @@
cluster_create_params,
cluster_delete_params,
cluster_resize_params,
- cluster_rebuild_params,
+ cluster_update_servers_settings_params,
)
from .....types.cloud.tag_update_map_param import TagUpdateMapParam
from .....types.cloud.gpu_baremetal.gpu_baremetal_cluster import GPUBaremetalCluster
@@ -522,9 +522,6 @@ def rebuild(
*,
project_id: int | None = None,
region_id: int | None = None,
- nodes: SequenceNotStr[str],
- image_id: Optional[str] | Omit = omit,
- user_data: Optional[str] | 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,
@@ -532,19 +529,21 @@ def rebuild(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> TaskIDList:
- """Rebuild one or more nodes in a GPU cluster.
+ """Perform a rebuild operation on a bare metal GPU cluster.
- All cluster nodes must be specified
- to update the cluster image.
+ During the rebuild
+ process, the servers in cluster receive a new image, SSH key, and user data.
+ Important: Before triggering a rebuild, the cluster must have updated server
+ settings to apply. These cluster settings must be patched using the following
+ endpoint: PATCH
+ '/v3/gpu/baremetal/{`project_id`}/{`region_id`}/clusters/{`cluster_id`}/servers_settings'
Args:
- nodes: List of nodes uuids to be rebuild
+ project_id: Project ID
- image_id: AI GPU image ID
+ region_id: Region ID
- user_data:
- String in base64 format.Examples of the `user_data`:
- https://cloudinit.readthedocs.io/en/latest/topics/examples.html
+ cluster_id: Cluster unique identifier
extra_headers: Send extra headers
@@ -561,15 +560,7 @@ def rebuild(
if not cluster_id:
raise ValueError(f"Expected a non-empty value for `cluster_id` but received {cluster_id!r}")
return self._post(
- f"/cloud/v1/ai/clusters/gpu/{project_id}/{region_id}/{cluster_id}/rebuild",
- body=maybe_transform(
- {
- "nodes": nodes,
- "image_id": image_id,
- "user_data": user_data,
- },
- cluster_rebuild_params.ClusterRebuildParams,
- ),
+ f"/cloud/v3/gpu/baremetal/{project_id}/{region_id}/clusters/{cluster_id}/rebuild",
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
@@ -621,6 +612,69 @@ def resize(
cast_to=TaskIDList,
)
+ def update_servers_settings(
+ self,
+ cluster_id: str,
+ *,
+ project_id: int | None = None,
+ region_id: int | None = None,
+ image_id: str | Omit = omit,
+ servers_settings: cluster_update_servers_settings_params.ServersSettings | 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> GPUBaremetalCluster:
+ """
+ This operation only modifies cluster settings such as SSH key, image, and user
+ data. **It does NOT modify or rebuild any existing servers in the cluster.**
+
+ To apply these configuration changes to running servers, use the
+ `/cloud/v3/gpu/baremetal/{project_id}/{region_id}/clusters/{cluster_id}/rebuild`
+ endpoint.
+
+ Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_id: Cluster unique identifier
+
+ image_id: System image ID
+
+ servers_settings: Configuration settings for the servers in the cluster
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if project_id is None:
+ project_id = self._client._get_cloud_project_id_path_param()
+ if region_id is None:
+ region_id = self._client._get_cloud_region_id_path_param()
+ if not cluster_id:
+ raise ValueError(f"Expected a non-empty value for `cluster_id` but received {cluster_id!r}")
+ return self._patch(
+ f"/cloud/v3/gpu/baremetal/{project_id}/{region_id}/clusters/{cluster_id}/servers_settings",
+ body=maybe_transform(
+ {
+ "image_id": image_id,
+ "servers_settings": servers_settings,
+ },
+ cluster_update_servers_settings_params.ClusterUpdateServersSettingsParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=GPUBaremetalCluster,
+ )
+
def create_and_poll(
self,
*,
@@ -639,7 +693,7 @@ def create_and_poll(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> GPUBaremetalCluster:
"""
Create a bare metal GPU cluster and wait for it to be ready.
@@ -687,9 +741,6 @@ def rebuild_and_poll(
*,
project_id: int | None = None,
region_id: int | None = None,
- nodes: List[str],
- image_id: Optional[str] | Omit = omit,
- user_data: Optional[str] | Omit = omit,
polling_interval_seconds: int | Omit = omit,
polling_timeout_seconds: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -697,7 +748,7 @@ def rebuild_and_poll(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> GPUBaremetalCluster:
"""
Rebuild a bare metal GPU cluster and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
@@ -706,9 +757,6 @@ def rebuild_and_poll(
cluster_id=cluster_id,
project_id=project_id,
region_id=region_id,
- nodes=nodes,
- image_id=image_id,
- user_data=user_data,
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
@@ -748,7 +796,7 @@ def resize_and_poll(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> GPUBaremetalCluster:
"""
Resize a bare metal GPU cluster and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
@@ -1239,9 +1287,6 @@ async def rebuild(
*,
project_id: int | None = None,
region_id: int | None = None,
- nodes: SequenceNotStr[str],
- image_id: Optional[str] | Omit = omit,
- user_data: Optional[str] | 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,
@@ -1249,19 +1294,21 @@ async def rebuild(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> TaskIDList:
- """Rebuild one or more nodes in a GPU cluster.
+ """Perform a rebuild operation on a bare metal GPU cluster.
- All cluster nodes must be specified
- to update the cluster image.
+ During the rebuild
+ process, the servers in cluster receive a new image, SSH key, and user data.
+ Important: Before triggering a rebuild, the cluster must have updated server
+ settings to apply. These cluster settings must be patched using the following
+ endpoint: PATCH
+ '/v3/gpu/baremetal/{`project_id`}/{`region_id`}/clusters/{`cluster_id`}/servers_settings'
Args:
- nodes: List of nodes uuids to be rebuild
+ project_id: Project ID
- image_id: AI GPU image ID
+ region_id: Region ID
- user_data:
- String in base64 format.Examples of the `user_data`:
- https://cloudinit.readthedocs.io/en/latest/topics/examples.html
+ cluster_id: Cluster unique identifier
extra_headers: Send extra headers
@@ -1278,15 +1325,7 @@ async def rebuild(
if not cluster_id:
raise ValueError(f"Expected a non-empty value for `cluster_id` but received {cluster_id!r}")
return await self._post(
- f"/cloud/v1/ai/clusters/gpu/{project_id}/{region_id}/{cluster_id}/rebuild",
- body=await async_maybe_transform(
- {
- "nodes": nodes,
- "image_id": image_id,
- "user_data": user_data,
- },
- cluster_rebuild_params.ClusterRebuildParams,
- ),
+ f"/cloud/v3/gpu/baremetal/{project_id}/{region_id}/clusters/{cluster_id}/rebuild",
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
@@ -1340,6 +1379,69 @@ async def resize(
cast_to=TaskIDList,
)
+ async def update_servers_settings(
+ self,
+ cluster_id: str,
+ *,
+ project_id: int | None = None,
+ region_id: int | None = None,
+ image_id: str | Omit = omit,
+ servers_settings: cluster_update_servers_settings_params.ServersSettings | 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> GPUBaremetalCluster:
+ """
+ This operation only modifies cluster settings such as SSH key, image, and user
+ data. **It does NOT modify or rebuild any existing servers in the cluster.**
+
+ To apply these configuration changes to running servers, use the
+ `/cloud/v3/gpu/baremetal/{project_id}/{region_id}/clusters/{cluster_id}/rebuild`
+ endpoint.
+
+ Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_id: Cluster unique identifier
+
+ image_id: System image ID
+
+ servers_settings: Configuration settings for the servers in the cluster
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if project_id is None:
+ project_id = self._client._get_cloud_project_id_path_param()
+ if region_id is None:
+ region_id = self._client._get_cloud_region_id_path_param()
+ if not cluster_id:
+ raise ValueError(f"Expected a non-empty value for `cluster_id` but received {cluster_id!r}")
+ return await self._patch(
+ f"/cloud/v3/gpu/baremetal/{project_id}/{region_id}/clusters/{cluster_id}/servers_settings",
+ body=await async_maybe_transform(
+ {
+ "image_id": image_id,
+ "servers_settings": servers_settings,
+ },
+ cluster_update_servers_settings_params.ClusterUpdateServersSettingsParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=GPUBaremetalCluster,
+ )
+
async def create_and_poll(
self,
*,
@@ -1358,7 +1460,7 @@ async def create_and_poll(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> GPUBaremetalCluster:
"""
Create a bare metal GPU cluster and wait for it to be ready.
@@ -1406,9 +1508,6 @@ async def rebuild_and_poll(
*,
project_id: int | None = None,
region_id: int | None = None,
- nodes: List[str],
- image_id: Optional[str] | Omit = omit,
- user_data: Optional[str] | Omit = omit,
polling_interval_seconds: int | Omit = omit,
polling_timeout_seconds: int | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -1416,7 +1515,7 @@ async def rebuild_and_poll(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> GPUBaremetalCluster:
"""
Rebuild a bare metal GPU cluster and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
@@ -1425,9 +1524,6 @@ async def rebuild_and_poll(
cluster_id=cluster_id,
project_id=project_id,
region_id=region_id,
- nodes=nodes,
- image_id=image_id,
- user_data=user_data,
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
@@ -1467,7 +1563,7 @@ async def resize_and_poll(
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> GPUBaremetalCluster:
"""
Resize a bare metal GPU cluster and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
@@ -1534,6 +1630,9 @@ def __init__(self, clusters: ClustersResource) -> None:
self.resize = to_raw_response_wrapper(
clusters.resize,
)
+ self.update_servers_settings = to_raw_response_wrapper(
+ clusters.update_servers_settings,
+ )
self.create_and_poll = to_raw_response_wrapper(
clusters.create_and_poll,
)
@@ -1592,6 +1691,9 @@ def __init__(self, clusters: AsyncClustersResource) -> None:
self.resize = async_to_raw_response_wrapper(
clusters.resize,
)
+ self.update_servers_settings = async_to_raw_response_wrapper(
+ clusters.update_servers_settings,
+ )
self.create_and_poll = async_to_raw_response_wrapper(
clusters.create_and_poll,
)
@@ -1650,6 +1752,9 @@ def __init__(self, clusters: ClustersResource) -> None:
self.resize = to_streamed_response_wrapper(
clusters.resize,
)
+ self.update_servers_settings = to_streamed_response_wrapper(
+ clusters.update_servers_settings,
+ )
self.create_and_poll = to_streamed_response_wrapper(
clusters.create_and_poll,
)
@@ -1708,6 +1813,9 @@ def __init__(self, clusters: AsyncClustersResource) -> None:
self.resize = async_to_streamed_response_wrapper(
clusters.resize,
)
+ self.update_servers_settings = async_to_streamed_response_wrapper(
+ clusters.update_servers_settings,
+ )
self.create_and_poll = async_to_streamed_response_wrapper(
clusters.create_and_poll,
)
diff --git a/src/gcore/resources/cloud/gpu_baremetal/clusters/servers.py b/src/gcore/resources/cloud/gpu_baremetal/clusters/servers.py
index c4d6ad91..23ecc80b 100644
--- a/src/gcore/resources/cloud/gpu_baremetal/clusters/servers.py
+++ b/src/gcore/resources/cloud/gpu_baremetal/clusters/servers.py
@@ -215,50 +215,6 @@ def delete(
cast_to=TaskIDList,
)
-
- def delete_and_poll(
- self,
- instance_id: str,
- *,
- project_id: int | None = None,
- region_id: int | None = None,
- cluster_id: str,
- delete_floatings: bool | Omit = omit,
- polling_interval_seconds: int | Omit = omit,
- polling_timeout_seconds: 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,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> None:
- """
- Delete a bare metal GPU server from cluster and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
- """
- response = self.delete(
- instance_id=instance_id,
- project_id=project_id,
- region_id=region_id,
- cluster_id=cluster_id,
- delete_floatings=delete_floatings,
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- )
- if not response.tasks or len(response.tasks) < 1:
- raise ValueError("Expected at least one task to be created")
- self._client.cloud.tasks.poll(
- response.tasks[0],
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- polling_interval_seconds=polling_interval_seconds,
- polling_timeout_seconds=polling_timeout_seconds,
- )
-
-
def get_console(
self,
instance_id: str,
@@ -376,6 +332,104 @@ def reboot(
cast_to=GPUBaremetalClusterServerV1,
)
+ def rebuild(
+ self,
+ server_id: str,
+ *,
+ project_id: int | None = None,
+ region_id: int | None = None,
+ cluster_id: str,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> TaskIDList:
+ """Perform a rebuild operation on a bare metal GPU cluster server.
+
+ During the
+ rebuild process, the server receive a new image, SSH key, and user data.
+ Important: Before triggering a rebuild, the cluster must have updated server
+ settings to apply. These cluster settings must be patched using the following
+ endpoint: PATCH
+ '/v3/gpu/baremetal/{`project_id`}/{`region_id`}/clusters/{`cluster_id`}/servers_settings'
+
+ Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_id: Cluster unique identifier
+
+ server_id: Server unique identifier
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if project_id is None:
+ project_id = self._client._get_cloud_project_id_path_param()
+ if region_id is None:
+ region_id = self._client._get_cloud_region_id_path_param()
+ if not cluster_id:
+ raise ValueError(f"Expected a non-empty value for `cluster_id` but received {cluster_id!r}")
+ if not server_id:
+ raise ValueError(f"Expected a non-empty value for `server_id` but received {server_id!r}")
+ return self._post(
+ f"/cloud/v3/gpu/baremetal/{project_id}/{region_id}/clusters/{cluster_id}/servers/{server_id}/rebuild",
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=TaskIDList,
+ )
+
+ def delete_and_poll(
+ self,
+ instance_id: str,
+ *,
+ project_id: int | None = None,
+ region_id: int | None = None,
+ cluster_id: str,
+ delete_floatings: bool | Omit = omit,
+ polling_interval_seconds: int | Omit = omit,
+ polling_timeout_seconds: 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> None:
+ """
+ Delete a bare metal GPU server from cluster and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
+ """
+ response = self.delete(
+ instance_id=instance_id,
+ project_id=project_id,
+ region_id=region_id,
+ cluster_id=cluster_id,
+ delete_floatings=delete_floatings,
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ )
+ if not response.tasks or len(response.tasks) < 1:
+ raise ValueError("Expected at least one task to be created")
+ self._client.cloud.tasks.poll(
+ response.tasks[0],
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ polling_interval_seconds=polling_interval_seconds,
+ polling_timeout_seconds=polling_timeout_seconds,
+ )
+
class AsyncServersResource(AsyncAPIResource):
@cached_property
@@ -565,50 +619,6 @@ async def delete(
cast_to=TaskIDList,
)
-
- async def delete_and_poll(
- self,
- instance_id: str,
- *,
- project_id: int | None = None,
- region_id: int | None = None,
- cluster_id: str,
- delete_floatings: bool | Omit = omit,
- polling_interval_seconds: int | Omit = omit,
- polling_timeout_seconds: 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,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> None:
- """
- Delete a bare metal GPU server from cluster and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
- """
- response = await self.delete(
- instance_id=instance_id,
- project_id=project_id,
- region_id=region_id,
- cluster_id=cluster_id,
- delete_floatings=delete_floatings,
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- )
- if not response.tasks or len(response.tasks) < 1:
- raise ValueError("Expected at least one task to be created")
- await self._client.cloud.tasks.poll(
- response.tasks[0],
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- polling_interval_seconds=polling_interval_seconds,
- polling_timeout_seconds=polling_timeout_seconds,
- )
-
-
async def get_console(
self,
instance_id: str,
@@ -726,6 +736,104 @@ async def reboot(
cast_to=GPUBaremetalClusterServerV1,
)
+ async def rebuild(
+ self,
+ server_id: str,
+ *,
+ project_id: int | None = None,
+ region_id: int | None = None,
+ cluster_id: str,
+ # 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> TaskIDList:
+ """Perform a rebuild operation on a bare metal GPU cluster server.
+
+ During the
+ rebuild process, the server receive a new image, SSH key, and user data.
+ Important: Before triggering a rebuild, the cluster must have updated server
+ settings to apply. These cluster settings must be patched using the following
+ endpoint: PATCH
+ '/v3/gpu/baremetal/{`project_id`}/{`region_id`}/clusters/{`cluster_id`}/servers_settings'
+
+ Args:
+ project_id: Project ID
+
+ region_id: Region ID
+
+ cluster_id: Cluster unique identifier
+
+ server_id: Server unique identifier
+
+ extra_headers: Send extra headers
+
+ extra_query: Add additional query parameters to the request
+
+ extra_body: Add additional JSON properties to the request
+
+ timeout: Override the client-level default timeout for this request, in seconds
+ """
+ if project_id is None:
+ project_id = self._client._get_cloud_project_id_path_param()
+ if region_id is None:
+ region_id = self._client._get_cloud_region_id_path_param()
+ if not cluster_id:
+ raise ValueError(f"Expected a non-empty value for `cluster_id` but received {cluster_id!r}")
+ if not server_id:
+ raise ValueError(f"Expected a non-empty value for `server_id` but received {server_id!r}")
+ return await self._post(
+ f"/cloud/v3/gpu/baremetal/{project_id}/{region_id}/clusters/{cluster_id}/servers/{server_id}/rebuild",
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=TaskIDList,
+ )
+
+ async def delete_and_poll(
+ self,
+ instance_id: str,
+ *,
+ project_id: int | None = None,
+ region_id: int | None = None,
+ cluster_id: str,
+ delete_floatings: bool | Omit = omit,
+ polling_interval_seconds: int | Omit = omit,
+ polling_timeout_seconds: 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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
+ ) -> None:
+ """
+ Delete a bare metal GPU server from cluster and poll for the result. Only the first task will be polled. If you need to poll more tasks, use the `tasks.poll` method.
+ """
+ response = await self.delete(
+ instance_id=instance_id,
+ project_id=project_id,
+ region_id=region_id,
+ cluster_id=cluster_id,
+ delete_floatings=delete_floatings,
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ )
+ if not response.tasks or len(response.tasks) < 1:
+ raise ValueError("Expected at least one task to be created")
+ await self._client.cloud.tasks.poll(
+ response.tasks[0],
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ polling_interval_seconds=polling_interval_seconds,
+ polling_timeout_seconds=polling_timeout_seconds,
+ )
+
class ServersResourceWithRawResponse:
def __init__(self, servers: ServersResource) -> None:
@@ -746,6 +854,9 @@ def __init__(self, servers: ServersResource) -> None:
self.reboot = to_raw_response_wrapper(
servers.reboot,
)
+ self.rebuild = to_raw_response_wrapper(
+ servers.rebuild,
+ )
self.delete_and_poll = to_raw_response_wrapper(
servers.delete_and_poll,
)
@@ -770,6 +881,9 @@ def __init__(self, servers: AsyncServersResource) -> None:
self.reboot = async_to_raw_response_wrapper(
servers.reboot,
)
+ self.rebuild = async_to_raw_response_wrapper(
+ servers.rebuild,
+ )
self.delete_and_poll = async_to_raw_response_wrapper(
servers.delete_and_poll,
)
@@ -794,6 +908,9 @@ def __init__(self, servers: ServersResource) -> None:
self.reboot = to_streamed_response_wrapper(
servers.reboot,
)
+ self.rebuild = to_streamed_response_wrapper(
+ servers.rebuild,
+ )
self.delete_and_poll = to_streamed_response_wrapper(
servers.delete_and_poll,
)
@@ -818,6 +935,9 @@ def __init__(self, servers: AsyncServersResource) -> None:
self.reboot = async_to_streamed_response_wrapper(
servers.reboot,
)
+ self.rebuild = async_to_streamed_response_wrapper(
+ servers.rebuild,
+ )
self.delete_and_poll = async_to_streamed_response_wrapper(
servers.delete_and_poll,
)
diff --git a/src/gcore/resources/cloud/networks/networks.py b/src/gcore/resources/cloud/networks/networks.py
index 847a36da..0ca1e355 100644
--- a/src/gcore/resources/cloud/networks/networks.py
+++ b/src/gcore/resources/cloud/networks/networks.py
@@ -275,10 +275,13 @@ def list(
*,
project_id: int | None = None,
region_id: int | None = None,
+ external: bool | Omit = omit,
limit: int | Omit = omit,
name: str | Omit = omit,
+ network_type: Literal["vlan", "vxlan"] | Omit = omit,
offset: int | Omit = omit,
- order_by: Literal["created_at.asc", "created_at.desc", "name.asc", "name.desc"] | Omit = omit,
+ order_by: Literal["created_at.asc", "created_at.desc", "name.asc", "name.desc", "priority.desc"] | Omit = omit,
+ owned_by: Literal["any", "project"] | Omit = omit,
tag_key: SequenceNotStr[str] | Omit = omit,
tag_key_value: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -288,23 +291,37 @@ def list(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncOffsetPage[Network]:
- """
- List networks
+ """Returns a list of networks.
+
+ Use the `owned_by` query parameter to control which
+ networks are returned: `project` (default) returns only networks owned by the
+ project, `any` returns all networks the project can use, including shared
+ networks.
Args:
project_id: Project ID
region_id: Region ID
+ external: Filter by external network status
+
limit: Optional. Limit the number of returned items
name: Filter networks by name
+ network_type: Filter by network type (vlan or vxlan)
+
offset: Optional. Offset value is used to exclude the first set of records from the
result
- order_by: Ordering networks list result by `name`, `created_at` fields of the network and
- directions (`created_at.desc`).
+ order_by: Ordering networks list result by `name`, `created_at` or `priority` fields and
+ directions (e.g. `created_at.desc`). Default is `created_at.desc`. Use
+ `priority.desc` to sort by shared network priority (relevant when
+ `owned_by=any`).
+
+ owned_by: Controls which networks are returned. 'project' (default) returns only networks
+ owned by the project. 'any' returns all networks that the project can use,
+ including shared networks from other projects.
tag_key: Optional. Filter by tag keys. ?`tag_key`=key1&`tag_key`=key2
@@ -332,10 +349,13 @@ def list(
timeout=timeout,
query=maybe_transform(
{
+ "external": external,
"limit": limit,
"name": name,
+ "network_type": network_type,
"offset": offset,
"order_by": order_by,
+ "owned_by": owned_by,
"tag_key": tag_key,
"tag_key_value": tag_key_value,
},
@@ -702,10 +722,13 @@ def list(
*,
project_id: int | None = None,
region_id: int | None = None,
+ external: bool | Omit = omit,
limit: int | Omit = omit,
name: str | Omit = omit,
+ network_type: Literal["vlan", "vxlan"] | Omit = omit,
offset: int | Omit = omit,
- order_by: Literal["created_at.asc", "created_at.desc", "name.asc", "name.desc"] | Omit = omit,
+ order_by: Literal["created_at.asc", "created_at.desc", "name.asc", "name.desc", "priority.desc"] | Omit = omit,
+ owned_by: Literal["any", "project"] | Omit = omit,
tag_key: SequenceNotStr[str] | Omit = omit,
tag_key_value: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -715,23 +738,37 @@ def list(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[Network, AsyncOffsetPage[Network]]:
- """
- List networks
+ """Returns a list of networks.
+
+ Use the `owned_by` query parameter to control which
+ networks are returned: `project` (default) returns only networks owned by the
+ project, `any` returns all networks the project can use, including shared
+ networks.
Args:
project_id: Project ID
region_id: Region ID
+ external: Filter by external network status
+
limit: Optional. Limit the number of returned items
name: Filter networks by name
+ network_type: Filter by network type (vlan or vxlan)
+
offset: Optional. Offset value is used to exclude the first set of records from the
result
- order_by: Ordering networks list result by `name`, `created_at` fields of the network and
- directions (`created_at.desc`).
+ order_by: Ordering networks list result by `name`, `created_at` or `priority` fields and
+ directions (e.g. `created_at.desc`). Default is `created_at.desc`. Use
+ `priority.desc` to sort by shared network priority (relevant when
+ `owned_by=any`).
+
+ owned_by: Controls which networks are returned. 'project' (default) returns only networks
+ owned by the project. 'any' returns all networks that the project can use,
+ including shared networks from other projects.
tag_key: Optional. Filter by tag keys. ?`tag_key`=key1&`tag_key`=key2
@@ -759,10 +796,13 @@ def list(
timeout=timeout,
query=maybe_transform(
{
+ "external": external,
"limit": limit,
"name": name,
+ "network_type": network_type,
"offset": offset,
"order_by": order_by,
+ "owned_by": owned_by,
"tag_key": tag_key,
"tag_key_value": tag_key_value,
},
diff --git a/src/gcore/resources/cloud/networks/subnets.py b/src/gcore/resources/cloud/networks/subnets.py
index 1ca16f53..e79e88ff 100644
--- a/src/gcore/resources/cloud/networks/subnets.py
+++ b/src/gcore/resources/cloud/networks/subnets.py
@@ -331,6 +331,7 @@ def list(
"updated_at.desc",
]
| Omit = omit,
+ owned_by: Literal["any", "project"] | Omit = omit,
tag_key: SequenceNotStr[str] | Omit = omit,
tag_key_value: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -340,8 +341,11 @@ def list(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> SyncOffsetPage[Subnet]:
- """
- List subnets
+ """Returns a list of subnets.
+
+ Use the `owned_by` query parameter to control which
+ subnets are returned: `project` (default) returns only subnets owned by the
+ project, `any` returns all subnets from networks available to the project.
Args:
project_id: Project ID
@@ -359,6 +363,10 @@ def list(
`available_ips`, `total_ips`, and `cidr` (default) fields of the subnet and
directions (`name.asc`).
+ owned_by: Controls which subnets are returned. 'project' (default) returns only subnets
+ owned by the project. 'any' returns all subnets from networks available to the
+ project, including subnets from shared networks.
+
tag_key: Optional. Filter by tag keys. ?`tag_key`=key1&`tag_key`=key2
tag_key_value: Optional. Filter by tag key-value pairs.
@@ -389,6 +397,7 @@ def list(
"network_id": network_id,
"offset": offset,
"order_by": order_by,
+ "owned_by": owned_by,
"tag_key": tag_key,
"tag_key_value": tag_key_value,
},
@@ -791,6 +800,7 @@ def list(
"updated_at.desc",
]
| Omit = omit,
+ owned_by: Literal["any", "project"] | Omit = omit,
tag_key: SequenceNotStr[str] | Omit = omit,
tag_key_value: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -800,8 +810,11 @@ def list(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AsyncPaginator[Subnet, AsyncOffsetPage[Subnet]]:
- """
- List subnets
+ """Returns a list of subnets.
+
+ Use the `owned_by` query parameter to control which
+ subnets are returned: `project` (default) returns only subnets owned by the
+ project, `any` returns all subnets from networks available to the project.
Args:
project_id: Project ID
@@ -819,6 +832,10 @@ def list(
`available_ips`, `total_ips`, and `cidr` (default) fields of the subnet and
directions (`name.asc`).
+ owned_by: Controls which subnets are returned. 'project' (default) returns only subnets
+ owned by the project. 'any' returns all subnets from networks available to the
+ project, including subnets from shared networks.
+
tag_key: Optional. Filter by tag keys. ?`tag_key`=key1&`tag_key`=key2
tag_key_value: Optional. Filter by tag key-value pairs.
@@ -849,6 +866,7 @@ def list(
"network_id": network_id,
"offset": offset,
"order_by": order_by,
+ "owned_by": owned_by,
"tag_key": tag_key,
"tag_key_value": tag_key_value,
},
diff --git a/src/gcore/resources/cloud/usage_reports.py b/src/gcore/resources/cloud/usage_reports.py
index 0cb9178c..581009fb 100644
--- a/src/gcore/resources/cloud/usage_reports.py
+++ b/src/gcore/resources/cloud/usage_reports.py
@@ -53,6 +53,25 @@ def get(
enable_last_day: bool | Omit = omit,
limit: int | Omit = omit,
offset: int | Omit = omit,
+ order_by: List[
+ Literal[
+ "billing_value.asc",
+ "billing_value.desc",
+ "first_seen.asc",
+ "first_seen.desc",
+ "last_name.asc",
+ "last_name.desc",
+ "last_seen.asc",
+ "last_seen.desc",
+ "project.asc",
+ "project.desc",
+ "region.asc",
+ "region.desc",
+ "type.asc",
+ "type.desc",
+ ]
+ ]
+ | Omit = omit,
projects: Optional[Iterable[int]] | Omit = omit,
regions: Iterable[int] | Omit = omit,
schema_filter: usage_report_get_params.SchemaFilter | Omit = omit,
@@ -117,13 +136,16 @@ def get(
offset: The response resources offset.
+ order_by: List of sorting criteria in 'field.direction' format.
+
projects: List of project IDs
regions: List of region IDs.
schema_filter: Extended filter for field filtering.
- sorting: List of sorting filters (JSON objects) fields: project. directions: asc, desc.
+ sorting: (DEPRECATED Use 'order_by' instead) List of sorting filters (JSON objects)
+ fields: project. directions: asc, desc.
tags: Filter by tags
@@ -146,6 +168,7 @@ def get(
"enable_last_day": enable_last_day,
"limit": limit,
"offset": offset,
+ "order_by": order_by,
"projects": projects,
"regions": regions,
"schema_filter": schema_filter,
@@ -190,6 +213,25 @@ async def get(
enable_last_day: bool | Omit = omit,
limit: int | Omit = omit,
offset: int | Omit = omit,
+ order_by: List[
+ Literal[
+ "billing_value.asc",
+ "billing_value.desc",
+ "first_seen.asc",
+ "first_seen.desc",
+ "last_name.asc",
+ "last_name.desc",
+ "last_seen.asc",
+ "last_seen.desc",
+ "project.asc",
+ "project.desc",
+ "region.asc",
+ "region.desc",
+ "type.asc",
+ "type.desc",
+ ]
+ ]
+ | Omit = omit,
projects: Optional[Iterable[int]] | Omit = omit,
regions: Iterable[int] | Omit = omit,
schema_filter: usage_report_get_params.SchemaFilter | Omit = omit,
@@ -254,13 +296,16 @@ async def get(
offset: The response resources offset.
+ order_by: List of sorting criteria in 'field.direction' format.
+
projects: List of project IDs
regions: List of region IDs.
schema_filter: Extended filter for field filtering.
- sorting: List of sorting filters (JSON objects) fields: project. directions: asc, desc.
+ sorting: (DEPRECATED Use 'order_by' instead) List of sorting filters (JSON objects)
+ fields: project. directions: asc, desc.
tags: Filter by tags
@@ -283,6 +328,7 @@ async def get(
"enable_last_day": enable_last_day,
"limit": limit,
"offset": offset,
+ "order_by": order_by,
"projects": projects,
"regions": regions,
"schema_filter": schema_filter,
diff --git a/src/gcore/resources/cloud/volumes.py b/src/gcore/resources/cloud/volumes.py
index 28bd9ea0..f07ab83d 100644
--- a/src/gcore/resources/cloud/volumes.py
+++ b/src/gcore/resources/cloud/volumes.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Iterable, Optional
+from typing import Dict, Iterable, Optional
from typing_extensions import Literal, overload
import httpx
@@ -69,7 +69,7 @@ def create(
attachment_tag: str | Omit = omit,
instance_id_to_attach_to: str | Omit = omit,
lifecycle_policy_ids: Iterable[int] | Omit = omit,
- tags: TagUpdateMapParam | Omit = omit,
+ tags: Dict[str, str] | Omit = omit,
type_name: Literal["cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra"] | 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 +138,7 @@ def create(
instance_id_to_attach_to: str | Omit = omit,
lifecycle_policy_ids: Iterable[int] | Omit = omit,
size: int | Omit = omit,
- tags: TagUpdateMapParam | Omit = omit,
+ tags: Dict[str, str] | Omit = omit,
type_name: Literal["cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra"] | 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.
@@ -207,7 +207,7 @@ def create(
attachment_tag: str | Omit = omit,
instance_id_to_attach_to: str | Omit = omit,
lifecycle_policy_ids: Iterable[int] | Omit = omit,
- tags: TagUpdateMapParam | Omit = omit,
+ tags: Dict[str, str] | Omit = omit,
type_name: Literal["cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra"] | 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.
@@ -276,7 +276,7 @@ def create(
attachment_tag: str | Omit = omit,
instance_id_to_attach_to: str | Omit = omit,
lifecycle_policy_ids: Iterable[int] | Omit = omit,
- tags: TagUpdateMapParam | Omit = omit,
+ tags: Dict[str, str] | Omit = omit,
type_name: Literal["cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra"] | Omit = omit,
snapshot_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -1313,7 +1313,7 @@ async def create(
attachment_tag: str | Omit = omit,
instance_id_to_attach_to: str | Omit = omit,
lifecycle_policy_ids: Iterable[int] | Omit = omit,
- tags: TagUpdateMapParam | Omit = omit,
+ tags: Dict[str, str] | Omit = omit,
type_name: Literal["cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra"] | 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.
@@ -1382,7 +1382,7 @@ async def create(
instance_id_to_attach_to: str | Omit = omit,
lifecycle_policy_ids: Iterable[int] | Omit = omit,
size: int | Omit = omit,
- tags: TagUpdateMapParam | Omit = omit,
+ tags: Dict[str, str] | Omit = omit,
type_name: Literal["cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra"] | 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.
@@ -1451,7 +1451,7 @@ async def create(
attachment_tag: str | Omit = omit,
instance_id_to_attach_to: str | Omit = omit,
lifecycle_policy_ids: Iterable[int] | Omit = omit,
- tags: TagUpdateMapParam | Omit = omit,
+ tags: Dict[str, str] | Omit = omit,
type_name: Literal["cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra"] | 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.
@@ -1520,7 +1520,7 @@ async def create(
attachment_tag: str | Omit = omit,
instance_id_to_attach_to: str | Omit = omit,
lifecycle_policy_ids: Iterable[int] | Omit = omit,
- tags: TagUpdateMapParam | Omit = omit,
+ tags: Dict[str, str] | Omit = omit,
type_name: Literal["cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra"] | Omit = omit,
snapshot_id: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
diff --git a/src/gcore/resources/fastedge/apps/apps.py b/src/gcore/resources/fastedge/apps/apps.py
index c415ced9..4d38f97a 100644
--- a/src/gcore/resources/fastedge/apps/apps.py
+++ b/src/gcore/resources/fastedge/apps/apps.py
@@ -35,8 +35,15 @@
class AppsResource(SyncAPIResource):
+ """
+ Apps are descriptions of edge apps, that reference the binary and may contain app-specific settings, such as environment variables.
+ """
+
@cached_property
def logs(self) -> LogsResource:
+ """
+ Apps are descriptions of edge apps, that reference the binary and may contain app-specific settings, such as environment variables.
+ """
return LogsResource(self._client)
@cached_property
@@ -428,8 +435,15 @@ def replace(
class AsyncAppsResource(AsyncAPIResource):
+ """
+ Apps are descriptions of edge apps, that reference the binary and may contain app-specific settings, such as environment variables.
+ """
+
@cached_property
def logs(self) -> AsyncLogsResource:
+ """
+ Apps are descriptions of edge apps, that reference the binary and may contain app-specific settings, such as environment variables.
+ """
return AsyncLogsResource(self._client)
@cached_property
@@ -845,6 +859,9 @@ def __init__(self, apps: AppsResource) -> None:
@cached_property
def logs(self) -> LogsResourceWithRawResponse:
+ """
+ Apps are descriptions of edge apps, that reference the binary and may contain app-specific settings, such as environment variables.
+ """
return LogsResourceWithRawResponse(self._apps.logs)
@@ -873,6 +890,9 @@ def __init__(self, apps: AsyncAppsResource) -> None:
@cached_property
def logs(self) -> AsyncLogsResourceWithRawResponse:
+ """
+ Apps are descriptions of edge apps, that reference the binary and may contain app-specific settings, such as environment variables.
+ """
return AsyncLogsResourceWithRawResponse(self._apps.logs)
@@ -901,6 +921,9 @@ def __init__(self, apps: AppsResource) -> None:
@cached_property
def logs(self) -> LogsResourceWithStreamingResponse:
+ """
+ Apps are descriptions of edge apps, that reference the binary and may contain app-specific settings, such as environment variables.
+ """
return LogsResourceWithStreamingResponse(self._apps.logs)
@@ -929,4 +952,7 @@ def __init__(self, apps: AsyncAppsResource) -> None:
@cached_property
def logs(self) -> AsyncLogsResourceWithStreamingResponse:
+ """
+ Apps are descriptions of edge apps, that reference the binary and may contain app-specific settings, such as environment variables.
+ """
return AsyncLogsResourceWithStreamingResponse(self._apps.logs)
diff --git a/src/gcore/resources/fastedge/apps/logs.py b/src/gcore/resources/fastedge/apps/logs.py
index 8f589ab0..5d88a402 100644
--- a/src/gcore/resources/fastedge/apps/logs.py
+++ b/src/gcore/resources/fastedge/apps/logs.py
@@ -27,6 +27,10 @@
class LogsResource(SyncAPIResource):
+ """
+ Apps are descriptions of edge apps, that reference the binary and may contain app-specific settings, such as environment variables.
+ """
+
@cached_property
def with_raw_response(self) -> LogsResourceWithRawResponse:
"""
@@ -120,6 +124,10 @@ def list(
class AsyncLogsResource(AsyncAPIResource):
+ """
+ Apps are descriptions of edge apps, that reference the binary and may contain app-specific settings, such as environment variables.
+ """
+
@cached_property
def with_raw_response(self) -> AsyncLogsResourceWithRawResponse:
"""
diff --git a/src/gcore/resources/fastedge/binaries.py b/src/gcore/resources/fastedge/binaries.py
index 1fe86c54..a49da25e 100644
--- a/src/gcore/resources/fastedge/binaries.py
+++ b/src/gcore/resources/fastedge/binaries.py
@@ -35,6 +35,10 @@
class BinariesResource(SyncAPIResource):
+ """
+ Binaries are WebAssembly executables that are actually executed when app is ran.
+ """
+
@cached_property
def with_raw_response(self) -> BinariesResourceWithRawResponse:
"""
@@ -171,6 +175,10 @@ def get(
class AsyncBinariesResource(AsyncAPIResource):
+ """
+ Binaries are WebAssembly executables that are actually executed when app is ran.
+ """
+
@cached_property
def with_raw_response(self) -> AsyncBinariesResourceWithRawResponse:
"""
diff --git a/src/gcore/resources/fastedge/fastedge.py b/src/gcore/resources/fastedge/fastedge.py
index d4ba7cf3..82c381fe 100644
--- a/src/gcore/resources/fastedge/fastedge.py
+++ b/src/gcore/resources/fastedge/fastedge.py
@@ -68,28 +68,40 @@
class FastedgeResource(SyncAPIResource):
+ """Client-level settings and limits"""
+
@cached_property
def templates(self) -> TemplatesResource:
+ """Application templates"""
return TemplatesResource(self._client)
@cached_property
def secrets(self) -> SecretsResource:
+ """Secret values that can be used in apps"""
return SecretsResource(self._client)
@cached_property
def binaries(self) -> BinariesResource:
+ """
+ Binaries are WebAssembly executables that are actually executed when app is ran.
+ """
return BinariesResource(self._client)
@cached_property
def statistics(self) -> StatisticsResource:
+ """Statistics of edge app use"""
return StatisticsResource(self._client)
@cached_property
def apps(self) -> AppsResource:
+ """
+ Apps are descriptions of edge apps, that reference the binary and may contain app-specific settings, such as environment variables.
+ """
return AppsResource(self._client)
@cached_property
def kv_stores(self) -> KvStoresResource:
+ """Key-value edge storage for apps"""
return KvStoresResource(self._client)
@cached_property
@@ -132,28 +144,40 @@ def get_account_overview(
class AsyncFastedgeResource(AsyncAPIResource):
+ """Client-level settings and limits"""
+
@cached_property
def templates(self) -> AsyncTemplatesResource:
+ """Application templates"""
return AsyncTemplatesResource(self._client)
@cached_property
def secrets(self) -> AsyncSecretsResource:
+ """Secret values that can be used in apps"""
return AsyncSecretsResource(self._client)
@cached_property
def binaries(self) -> AsyncBinariesResource:
+ """
+ Binaries are WebAssembly executables that are actually executed when app is ran.
+ """
return AsyncBinariesResource(self._client)
@cached_property
def statistics(self) -> AsyncStatisticsResource:
+ """Statistics of edge app use"""
return AsyncStatisticsResource(self._client)
@cached_property
def apps(self) -> AsyncAppsResource:
+ """
+ Apps are descriptions of edge apps, that reference the binary and may contain app-specific settings, such as environment variables.
+ """
return AsyncAppsResource(self._client)
@cached_property
def kv_stores(self) -> AsyncKvStoresResource:
+ """Key-value edge storage for apps"""
return AsyncKvStoresResource(self._client)
@cached_property
@@ -205,26 +229,36 @@ def __init__(self, fastedge: FastedgeResource) -> None:
@cached_property
def templates(self) -> TemplatesResourceWithRawResponse:
+ """Application templates"""
return TemplatesResourceWithRawResponse(self._fastedge.templates)
@cached_property
def secrets(self) -> SecretsResourceWithRawResponse:
+ """Secret values that can be used in apps"""
return SecretsResourceWithRawResponse(self._fastedge.secrets)
@cached_property
def binaries(self) -> BinariesResourceWithRawResponse:
+ """
+ Binaries are WebAssembly executables that are actually executed when app is ran.
+ """
return BinariesResourceWithRawResponse(self._fastedge.binaries)
@cached_property
def statistics(self) -> StatisticsResourceWithRawResponse:
+ """Statistics of edge app use"""
return StatisticsResourceWithRawResponse(self._fastedge.statistics)
@cached_property
def apps(self) -> AppsResourceWithRawResponse:
+ """
+ Apps are descriptions of edge apps, that reference the binary and may contain app-specific settings, such as environment variables.
+ """
return AppsResourceWithRawResponse(self._fastedge.apps)
@cached_property
def kv_stores(self) -> KvStoresResourceWithRawResponse:
+ """Key-value edge storage for apps"""
return KvStoresResourceWithRawResponse(self._fastedge.kv_stores)
@@ -238,26 +272,36 @@ def __init__(self, fastedge: AsyncFastedgeResource) -> None:
@cached_property
def templates(self) -> AsyncTemplatesResourceWithRawResponse:
+ """Application templates"""
return AsyncTemplatesResourceWithRawResponse(self._fastedge.templates)
@cached_property
def secrets(self) -> AsyncSecretsResourceWithRawResponse:
+ """Secret values that can be used in apps"""
return AsyncSecretsResourceWithRawResponse(self._fastedge.secrets)
@cached_property
def binaries(self) -> AsyncBinariesResourceWithRawResponse:
+ """
+ Binaries are WebAssembly executables that are actually executed when app is ran.
+ """
return AsyncBinariesResourceWithRawResponse(self._fastedge.binaries)
@cached_property
def statistics(self) -> AsyncStatisticsResourceWithRawResponse:
+ """Statistics of edge app use"""
return AsyncStatisticsResourceWithRawResponse(self._fastedge.statistics)
@cached_property
def apps(self) -> AsyncAppsResourceWithRawResponse:
+ """
+ Apps are descriptions of edge apps, that reference the binary and may contain app-specific settings, such as environment variables.
+ """
return AsyncAppsResourceWithRawResponse(self._fastedge.apps)
@cached_property
def kv_stores(self) -> AsyncKvStoresResourceWithRawResponse:
+ """Key-value edge storage for apps"""
return AsyncKvStoresResourceWithRawResponse(self._fastedge.kv_stores)
@@ -271,26 +315,36 @@ def __init__(self, fastedge: FastedgeResource) -> None:
@cached_property
def templates(self) -> TemplatesResourceWithStreamingResponse:
+ """Application templates"""
return TemplatesResourceWithStreamingResponse(self._fastedge.templates)
@cached_property
def secrets(self) -> SecretsResourceWithStreamingResponse:
+ """Secret values that can be used in apps"""
return SecretsResourceWithStreamingResponse(self._fastedge.secrets)
@cached_property
def binaries(self) -> BinariesResourceWithStreamingResponse:
+ """
+ Binaries are WebAssembly executables that are actually executed when app is ran.
+ """
return BinariesResourceWithStreamingResponse(self._fastedge.binaries)
@cached_property
def statistics(self) -> StatisticsResourceWithStreamingResponse:
+ """Statistics of edge app use"""
return StatisticsResourceWithStreamingResponse(self._fastedge.statistics)
@cached_property
def apps(self) -> AppsResourceWithStreamingResponse:
+ """
+ Apps are descriptions of edge apps, that reference the binary and may contain app-specific settings, such as environment variables.
+ """
return AppsResourceWithStreamingResponse(self._fastedge.apps)
@cached_property
def kv_stores(self) -> KvStoresResourceWithStreamingResponse:
+ """Key-value edge storage for apps"""
return KvStoresResourceWithStreamingResponse(self._fastedge.kv_stores)
@@ -304,24 +358,34 @@ def __init__(self, fastedge: AsyncFastedgeResource) -> None:
@cached_property
def templates(self) -> AsyncTemplatesResourceWithStreamingResponse:
+ """Application templates"""
return AsyncTemplatesResourceWithStreamingResponse(self._fastedge.templates)
@cached_property
def secrets(self) -> AsyncSecretsResourceWithStreamingResponse:
+ """Secret values that can be used in apps"""
return AsyncSecretsResourceWithStreamingResponse(self._fastedge.secrets)
@cached_property
def binaries(self) -> AsyncBinariesResourceWithStreamingResponse:
+ """
+ Binaries are WebAssembly executables that are actually executed when app is ran.
+ """
return AsyncBinariesResourceWithStreamingResponse(self._fastedge.binaries)
@cached_property
def statistics(self) -> AsyncStatisticsResourceWithStreamingResponse:
+ """Statistics of edge app use"""
return AsyncStatisticsResourceWithStreamingResponse(self._fastedge.statistics)
@cached_property
def apps(self) -> AsyncAppsResourceWithStreamingResponse:
+ """
+ Apps are descriptions of edge apps, that reference the binary and may contain app-specific settings, such as environment variables.
+ """
return AsyncAppsResourceWithStreamingResponse(self._fastedge.apps)
@cached_property
def kv_stores(self) -> AsyncKvStoresResourceWithStreamingResponse:
+ """Key-value edge storage for apps"""
return AsyncKvStoresResourceWithStreamingResponse(self._fastedge.kv_stores)
diff --git a/src/gcore/resources/fastedge/kv_stores.py b/src/gcore/resources/fastedge/kv_stores.py
index 34e59741..a3ac1abe 100644
--- a/src/gcore/resources/fastedge/kv_stores.py
+++ b/src/gcore/resources/fastedge/kv_stores.py
@@ -24,6 +24,8 @@
class KvStoresResource(SyncAPIResource):
+ """Key-value edge storage for apps"""
+
@cached_property
def with_raw_response(self) -> KvStoresResourceWithRawResponse:
"""
@@ -253,6 +255,8 @@ def replace(
class AsyncKvStoresResource(AsyncAPIResource):
+ """Key-value edge storage for apps"""
+
@cached_property
def with_raw_response(self) -> AsyncKvStoresResourceWithRawResponse:
"""
diff --git a/src/gcore/resources/fastedge/secrets.py b/src/gcore/resources/fastedge/secrets.py
index 81685e61..d435256f 100644
--- a/src/gcore/resources/fastedge/secrets.py
+++ b/src/gcore/resources/fastedge/secrets.py
@@ -32,6 +32,8 @@
class SecretsResource(SyncAPIResource):
+ """Secret values that can be used in apps"""
+
@cached_property
def with_raw_response(self) -> SecretsResourceWithRawResponse:
"""
@@ -312,6 +314,8 @@ def replace(
class AsyncSecretsResource(AsyncAPIResource):
+ """Secret values that can be used in apps"""
+
@cached_property
def with_raw_response(self) -> AsyncSecretsResourceWithRawResponse:
"""
diff --git a/src/gcore/resources/fastedge/statistics.py b/src/gcore/resources/fastedge/statistics.py
index 4b344931..7404cad2 100644
--- a/src/gcore/resources/fastedge/statistics.py
+++ b/src/gcore/resources/fastedge/statistics.py
@@ -26,6 +26,8 @@
class StatisticsResource(SyncAPIResource):
+ """Statistics of edge app use"""
+
@cached_property
def with_raw_response(self) -> StatisticsResourceWithRawResponse:
"""
@@ -163,6 +165,8 @@ def get_duration_series(
class AsyncStatisticsResource(AsyncAPIResource):
+ """Statistics of edge app use"""
+
@cached_property
def with_raw_response(self) -> AsyncStatisticsResourceWithRawResponse:
"""
diff --git a/src/gcore/resources/fastedge/templates.py b/src/gcore/resources/fastedge/templates.py
index d58d3110..5c6efc5f 100644
--- a/src/gcore/resources/fastedge/templates.py
+++ b/src/gcore/resources/fastedge/templates.py
@@ -33,6 +33,8 @@
class TemplatesResource(SyncAPIResource):
+ """Application templates"""
+
@cached_property
def with_raw_response(self) -> TemplatesResourceWithRawResponse:
"""
@@ -301,6 +303,8 @@ def replace(
class AsyncTemplatesResource(AsyncAPIResource):
+ """Application templates"""
+
@cached_property
def with_raw_response(self) -> AsyncTemplatesResourceWithRawResponse:
"""
diff --git a/src/gcore/resources/iam/api_tokens.py b/src/gcore/resources/iam/api_tokens.py
index 6395270b..062e086c 100644
--- a/src/gcore/resources/iam/api_tokens.py
+++ b/src/gcore/resources/iam/api_tokens.py
@@ -26,6 +26,21 @@
class APITokensResource(SyncAPIResource):
+ """
+ Use permanent API tokens for regular automated requests to services.
+ You can either set its validity period when creating it or issue a token for an unlimited time.
+ Please address the API documentation of the specific product in order to check if it supports API tokens.
+
+ Provide your APIKey in the Authorization header.
+
+ Example: ```curl -H "Authorization: APIKey 123$61b8e1e7a68c" https://api.gcore.com/iam/users/me```
+
+ Please note: When authorizing via SAML SSO, our system does not have any
+ information about permissions given to the user by the identity provider.
+ Even if the provider revokes the user's access rights, their tokens remain active.
+ Therefore, if necessary, the token will need to be deleted manually.
+ """
+
@cached_property
def with_raw_response(self) -> APITokensResourceWithRawResponse:
"""
@@ -239,6 +254,21 @@ def get(
class AsyncAPITokensResource(AsyncAPIResource):
+ """
+ Use permanent API tokens for regular automated requests to services.
+ You can either set its validity period when creating it or issue a token for an unlimited time.
+ Please address the API documentation of the specific product in order to check if it supports API tokens.
+
+ Provide your APIKey in the Authorization header.
+
+ Example: ```curl -H "Authorization: APIKey 123$61b8e1e7a68c" https://api.gcore.com/iam/users/me```
+
+ Please note: When authorizing via SAML SSO, our system does not have any
+ information about permissions given to the user by the identity provider.
+ Even if the provider revokes the user's access rights, their tokens remain active.
+ Therefore, if necessary, the token will need to be deleted manually.
+ """
+
@cached_property
def with_raw_response(self) -> AsyncAPITokensResourceWithRawResponse:
"""
diff --git a/src/gcore/resources/iam/iam.py b/src/gcore/resources/iam/iam.py
index 7f409c61..ff1ef03f 100644
--- a/src/gcore/resources/iam/iam.py
+++ b/src/gcore/resources/iam/iam.py
@@ -36,8 +36,26 @@
class IamResource(SyncAPIResource):
+ """
+ Account management operations including authentication, password management, and account details.
+ """
+
@cached_property
def api_tokens(self) -> APITokensResource:
+ """
+ Use permanent API tokens for regular automated requests to services.
+ You can either set its validity period when creating it or issue a token for an unlimited time.
+ Please address the API documentation of the specific product in order to check if it supports API tokens.
+
+ Provide your APIKey in the Authorization header.
+
+ Example: ```curl -H "Authorization: APIKey 123$61b8e1e7a68c" https://api.gcore.com/iam/users/me```
+
+ Please note: When authorizing via SAML SSO, our system does not have any
+ information about permissions given to the user by the identity provider.
+ Even if the provider revokes the user's access rights, their tokens remain active.
+ Therefore, if necessary, the token will need to be deleted manually.
+ """
return APITokensResource(self._client)
@cached_property
@@ -84,8 +102,26 @@ def get_account_overview(
class AsyncIamResource(AsyncAPIResource):
+ """
+ Account management operations including authentication, password management, and account details.
+ """
+
@cached_property
def api_tokens(self) -> AsyncAPITokensResource:
+ """
+ Use permanent API tokens for regular automated requests to services.
+ You can either set its validity period when creating it or issue a token for an unlimited time.
+ Please address the API documentation of the specific product in order to check if it supports API tokens.
+
+ Provide your APIKey in the Authorization header.
+
+ Example: ```curl -H "Authorization: APIKey 123$61b8e1e7a68c" https://api.gcore.com/iam/users/me```
+
+ Please note: When authorizing via SAML SSO, our system does not have any
+ information about permissions given to the user by the identity provider.
+ Even if the provider revokes the user's access rights, their tokens remain active.
+ Therefore, if necessary, the token will need to be deleted manually.
+ """
return AsyncAPITokensResource(self._client)
@cached_property
@@ -141,6 +177,20 @@ def __init__(self, iam: IamResource) -> None:
@cached_property
def api_tokens(self) -> APITokensResourceWithRawResponse:
+ """
+ Use permanent API tokens for regular automated requests to services.
+ You can either set its validity period when creating it or issue a token for an unlimited time.
+ Please address the API documentation of the specific product in order to check if it supports API tokens.
+
+ Provide your APIKey in the Authorization header.
+
+ Example: ```curl -H "Authorization: APIKey 123$61b8e1e7a68c" https://api.gcore.com/iam/users/me```
+
+ Please note: When authorizing via SAML SSO, our system does not have any
+ information about permissions given to the user by the identity provider.
+ Even if the provider revokes the user's access rights, their tokens remain active.
+ Therefore, if necessary, the token will need to be deleted manually.
+ """
return APITokensResourceWithRawResponse(self._iam.api_tokens)
@cached_property
@@ -158,6 +208,20 @@ def __init__(self, iam: AsyncIamResource) -> None:
@cached_property
def api_tokens(self) -> AsyncAPITokensResourceWithRawResponse:
+ """
+ Use permanent API tokens for regular automated requests to services.
+ You can either set its validity period when creating it or issue a token for an unlimited time.
+ Please address the API documentation of the specific product in order to check if it supports API tokens.
+
+ Provide your APIKey in the Authorization header.
+
+ Example: ```curl -H "Authorization: APIKey 123$61b8e1e7a68c" https://api.gcore.com/iam/users/me```
+
+ Please note: When authorizing via SAML SSO, our system does not have any
+ information about permissions given to the user by the identity provider.
+ Even if the provider revokes the user's access rights, their tokens remain active.
+ Therefore, if necessary, the token will need to be deleted manually.
+ """
return AsyncAPITokensResourceWithRawResponse(self._iam.api_tokens)
@cached_property
@@ -175,6 +239,20 @@ def __init__(self, iam: IamResource) -> None:
@cached_property
def api_tokens(self) -> APITokensResourceWithStreamingResponse:
+ """
+ Use permanent API tokens for regular automated requests to services.
+ You can either set its validity period when creating it or issue a token for an unlimited time.
+ Please address the API documentation of the specific product in order to check if it supports API tokens.
+
+ Provide your APIKey in the Authorization header.
+
+ Example: ```curl -H "Authorization: APIKey 123$61b8e1e7a68c" https://api.gcore.com/iam/users/me```
+
+ Please note: When authorizing via SAML SSO, our system does not have any
+ information about permissions given to the user by the identity provider.
+ Even if the provider revokes the user's access rights, their tokens remain active.
+ Therefore, if necessary, the token will need to be deleted manually.
+ """
return APITokensResourceWithStreamingResponse(self._iam.api_tokens)
@cached_property
@@ -192,6 +270,20 @@ def __init__(self, iam: AsyncIamResource) -> None:
@cached_property
def api_tokens(self) -> AsyncAPITokensResourceWithStreamingResponse:
+ """
+ Use permanent API tokens for regular automated requests to services.
+ You can either set its validity period when creating it or issue a token for an unlimited time.
+ Please address the API documentation of the specific product in order to check if it supports API tokens.
+
+ Provide your APIKey in the Authorization header.
+
+ Example: ```curl -H "Authorization: APIKey 123$61b8e1e7a68c" https://api.gcore.com/iam/users/me```
+
+ Please note: When authorizing via SAML SSO, our system does not have any
+ information about permissions given to the user by the identity provider.
+ Even if the provider revokes the user's access rights, their tokens remain active.
+ Therefore, if necessary, the token will need to be deleted manually.
+ """
return AsyncAPITokensResourceWithStreamingResponse(self._iam.api_tokens)
@cached_property
diff --git a/src/gcore/resources/security/bgp_announces.py b/src/gcore/resources/security/bgp_announces.py
index 1908f05a..a8f7cd47 100644
--- a/src/gcore/resources/security/bgp_announces.py
+++ b/src/gcore/resources/security/bgp_announces.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Optional
+from typing import List, Optional
from typing_extensions import Literal
import httpx
@@ -48,7 +48,10 @@ def list(
self,
*,
announced: Optional[bool] | Omit = omit,
- origin: Optional[Literal["STATIC", "DYNAMIC"]] | Omit = omit,
+ client_id: Optional[int] | Omit = omit,
+ limit: Optional[int] | Omit = omit,
+ offset: Optional[int] | Omit = omit,
+ origin: Optional[List[Literal["STATIC", "DYNAMIC", "IAAS", "PROTECTED_NETWORK", "EDGE_PROXY"]]] | Omit = omit,
site: Optional[str] | 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.
@@ -57,13 +60,13 @@ def list(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BgpAnnounceListResponse:
- """Get BGP announces filtered by parameters.
-
- Shows announces in active profiles,
- meaning that to get a non-empty response, the client must have at least one
- active profile.
+ """
+ List BGP announces with optional filtering by site, origin, announcement status,
+ and client.
Args:
+ client_id: A positive integer ID
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -82,6 +85,9 @@ def list(
query=maybe_transform(
{
"announced": announced,
+ "client_id": client_id,
+ "limit": limit,
+ "offset": offset,
"origin": origin,
"site": site,
},
@@ -104,13 +110,16 @@ def toggle(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> object:
- """Change BGP announces (it can be enabled or disabled, but not created or
- updated).
-
- Can be applied to already existing announces in active profiles,
- meaning that the client must have at least one active profile.
+ """
+ Enable or disable BGP announces for a client.
Args:
+ announce: IP network to announce
+
+ enabled: Whether the announcement is enabled
+
+ client_id: A positive integer ID
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -163,7 +172,10 @@ async def list(
self,
*,
announced: Optional[bool] | Omit = omit,
- origin: Optional[Literal["STATIC", "DYNAMIC"]] | Omit = omit,
+ client_id: Optional[int] | Omit = omit,
+ limit: Optional[int] | Omit = omit,
+ offset: Optional[int] | Omit = omit,
+ origin: Optional[List[Literal["STATIC", "DYNAMIC", "IAAS", "PROTECTED_NETWORK", "EDGE_PROXY"]]] | Omit = omit,
site: Optional[str] | 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.
@@ -172,13 +184,13 @@ async def list(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> BgpAnnounceListResponse:
- """Get BGP announces filtered by parameters.
-
- Shows announces in active profiles,
- meaning that to get a non-empty response, the client must have at least one
- active profile.
+ """
+ List BGP announces with optional filtering by site, origin, announcement status,
+ and client.
Args:
+ client_id: A positive integer ID
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
@@ -197,6 +209,9 @@ async def list(
query=await async_maybe_transform(
{
"announced": announced,
+ "client_id": client_id,
+ "limit": limit,
+ "offset": offset,
"origin": origin,
"site": site,
},
@@ -219,13 +234,16 @@ async def toggle(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> object:
- """Change BGP announces (it can be enabled or disabled, but not created or
- updated).
-
- Can be applied to already existing announces in active profiles,
- meaning that the client must have at least one active profile.
+ """
+ Enable or disable BGP announces for a client.
Args:
+ announce: IP network to announce
+
+ enabled: Whether the announcement is enabled
+
+ client_id: A positive integer ID
+
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
diff --git a/src/gcore/types/cdn/cdn_account_limits.py b/src/gcore/types/cdn/cdn_account_limits.py
index cb398ffa..da243041 100644
--- a/src/gcore/types/cdn/cdn_account_limits.py
+++ b/src/gcore/types/cdn/cdn_account_limits.py
@@ -17,6 +17,24 @@ class CDNAccountLimits(BaseModel):
plan.
"""
+ prefetch_pattern_limit: Optional[int] = None
+ """Maximum number of patterns per prefetch request."""
+
+ prefetch_request_limit: Optional[str] = None
+ """Rate limit for prefetch requests."""
+
+ purge_by_urls_request_limit: Optional[str] = None
+ """Rate limit for purge-by-URL requests."""
+
+ purge_max_urls_limit: Optional[int] = None
+ """Maximum number of URLs per purge-by-URL request."""
+
+ purge_pattern_limit: Optional[int] = None
+ """Maximum number of patterns per purge request."""
+
+ purge_request_limit: Optional[str] = None
+ """Rate limit for purge-by-pattern requests."""
+
resources_limit: Optional[int] = None
"""Maximum number of CDN resources that can be created on your tariff plan."""
@@ -25,3 +43,6 @@ class CDNAccountLimits(BaseModel):
Maximum number of rules that can be created per CDN resource on your tariff
plan.
"""
+
+ secondary_hostnames_limit: Optional[int] = None
+ """Maximum number of secondary hostnames (additional CNAMEs) per CDN resource."""
diff --git a/src/gcore/types/cloud/cost_report_get_detailed_params.py b/src/gcore/types/cloud/cost_report_get_detailed_params.py
index 86361cf0..05ac3ef6 100644
--- a/src/gcore/types/cloud/cost_report_get_detailed_params.py
+++ b/src/gcore/types/cloud/cost_report_get_detailed_params.py
@@ -68,6 +68,26 @@ class CostReportGetDetailedParams(TypedDict, total=False):
offset: int
"""The response resources offset."""
+ order_by: List[
+ Literal[
+ "billing_value.asc",
+ "billing_value.desc",
+ "first_seen.asc",
+ "first_seen.desc",
+ "last_name.asc",
+ "last_name.desc",
+ "last_seen.asc",
+ "last_seen.desc",
+ "project.asc",
+ "project.desc",
+ "region.asc",
+ "region.desc",
+ "type.asc",
+ "type.desc",
+ ]
+ ]
+ """List of sorting criteria in 'field.direction' format."""
+
projects: Iterable[int]
"""List of project IDs"""
@@ -84,7 +104,10 @@ class CostReportGetDetailedParams(TypedDict, total=False):
"""Extended filter for field filtering."""
sorting: Iterable[Sorting]
- """List of sorting filters (JSON objects) fields: project. directions: asc, desc."""
+ """
+ (DEPRECATED Use 'order_by' instead) List of sorting filters (JSON objects)
+ fields: project. directions: asc, desc.
+ """
tags: Tags
"""Filter by tags"""
diff --git a/src/gcore/types/cloud/gpu_baremetal/__init__.py b/src/gcore/types/cloud/gpu_baremetal/__init__.py
index baff756f..ccd8f847 100644
--- a/src/gcore/types/cloud/gpu_baremetal/__init__.py
+++ b/src/gcore/types/cloud/gpu_baremetal/__init__.py
@@ -8,4 +8,6 @@
from .cluster_delete_params import ClusterDeleteParams as ClusterDeleteParams
from .cluster_resize_params import ClusterResizeParams as ClusterResizeParams
from .gpu_baremetal_cluster import GPUBaremetalCluster as GPUBaremetalCluster
-from .cluster_rebuild_params import ClusterRebuildParams as ClusterRebuildParams
+from .cluster_update_servers_settings_params import (
+ ClusterUpdateServersSettingsParams as ClusterUpdateServersSettingsParams,
+)
diff --git a/src/gcore/types/cloud/gpu_baremetal/cluster_rebuild_params.py b/src/gcore/types/cloud/gpu_baremetal/cluster_rebuild_params.py
deleted file mode 100644
index f9fe6f9d..00000000
--- a/src/gcore/types/cloud/gpu_baremetal/cluster_rebuild_params.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing import Optional
-from typing_extensions import Required, TypedDict
-
-from ...._types import SequenceNotStr
-
-__all__ = ["ClusterRebuildParams"]
-
-
-class ClusterRebuildParams(TypedDict, total=False):
- project_id: int
-
- region_id: int
-
- nodes: Required[SequenceNotStr[str]]
- """List of nodes uuids to be rebuild"""
-
- image_id: Optional[str]
- """AI GPU image ID"""
-
- user_data: Optional[str]
- """
- String in base64 format.Examples of the `user_data`:
- https://cloudinit.readthedocs.io/en/latest/topics/examples.html
- """
diff --git a/src/gcore/types/cloud/gpu_baremetal/cluster_update_servers_settings_params.py b/src/gcore/types/cloud/gpu_baremetal/cluster_update_servers_settings_params.py
new file mode 100644
index 00000000..60977f28
--- /dev/null
+++ b/src/gcore/types/cloud/gpu_baremetal/cluster_update_servers_settings_params.py
@@ -0,0 +1,41 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import TypedDict
+
+__all__ = ["ClusterUpdateServersSettingsParams", "ServersSettings", "ServersSettingsCredentials"]
+
+
+class ClusterUpdateServersSettingsParams(TypedDict, total=False):
+ project_id: int
+ """Project ID"""
+
+ region_id: int
+ """Region ID"""
+
+ image_id: str
+ """System image ID"""
+
+ servers_settings: ServersSettings
+ """Configuration settings for the servers in the cluster"""
+
+
+class ServersSettingsCredentials(TypedDict, total=False):
+ """Optional server access credentials"""
+
+ ssh_key_name: str
+ """
+ Specifies the name of the SSH keypair, created via the
+ [/v1/`ssh_keys` endpoint](/docs/api-reference/cloud/ssh-keys/add-or-generate-ssh-key).
+ """
+
+
+class ServersSettings(TypedDict, total=False):
+ """Configuration settings for the servers in the cluster"""
+
+ credentials: ServersSettingsCredentials
+ """Optional server access credentials"""
+
+ user_data: str
+ """Optional custom user data (Base64-encoded)"""
diff --git a/src/gcore/types/cloud/load_balancer.py b/src/gcore/types/cloud/load_balancer.py
index ebd56ccd..72a75350 100644
--- a/src/gcore/types/cloud/load_balancer.py
+++ b/src/gcore/types/cloud/load_balancer.py
@@ -143,6 +143,9 @@ class LoadBalancer(BaseModel):
vip_address: Optional[str] = None
"""Load balancer IP address"""
+ vip_fqdn: Optional[str] = None
+ """Fully qualified domain name for the load balancer VIP"""
+
vip_ip_family: Optional[InterfaceIPFamily] = None
"""Load balancer IP family"""
diff --git a/src/gcore/types/cloud/network_list_params.py b/src/gcore/types/cloud/network_list_params.py
index a690ab5b..292c5c7a 100644
--- a/src/gcore/types/cloud/network_list_params.py
+++ b/src/gcore/types/cloud/network_list_params.py
@@ -16,22 +16,38 @@ class NetworkListParams(TypedDict, total=False):
region_id: int
"""Region ID"""
+ external: bool
+ """Filter by external network status"""
+
limit: int
"""Optional. Limit the number of returned items"""
name: str
"""Filter networks by name"""
+ network_type: Literal["vlan", "vxlan"]
+ """Filter by network type (vlan or vxlan)"""
+
offset: int
"""Optional.
Offset value is used to exclude the first set of records from the result
"""
- order_by: Literal["created_at.asc", "created_at.desc", "name.asc", "name.desc"]
+ order_by: Literal["created_at.asc", "created_at.desc", "name.asc", "name.desc", "priority.desc"]
+ """
+ Ordering networks list result by `name`, `created_at` or `priority` fields and
+ directions (e.g. `created_at.desc`). Default is `created_at.desc`. Use
+ `priority.desc` to sort by shared network priority (relevant when
+ `owned_by=any`).
"""
- Ordering networks list result by `name`, `created_at` fields of the network and
- directions (`created_at.desc`).
+
+ owned_by: Literal["any", "project"]
+ """Controls which networks are returned.
+
+ 'project' (default) returns only networks owned by the project. 'any' returns
+ all networks that the project can use, including shared networks from other
+ projects.
"""
tag_key: SequenceNotStr[str]
diff --git a/src/gcore/types/cloud/networks/subnet_list_params.py b/src/gcore/types/cloud/networks/subnet_list_params.py
index 4327998f..8db38472 100644
--- a/src/gcore/types/cloud/networks/subnet_list_params.py
+++ b/src/gcore/types/cloud/networks/subnet_list_params.py
@@ -48,6 +48,14 @@ class SubnetListParams(TypedDict, total=False):
directions (`name.asc`).
"""
+ owned_by: Literal["any", "project"]
+ """Controls which subnets are returned.
+
+ 'project' (default) returns only subnets owned by the project. 'any' returns all
+ subnets from networks available to the project, including subnets from shared
+ networks.
+ """
+
tag_key: SequenceNotStr[str]
"""Optional. Filter by tag keys. ?`tag_key`=key1&`tag_key`=key2"""
diff --git a/src/gcore/types/cloud/region.py b/src/gcore/types/cloud/region.py
index b2bf4ac8..b7b24fbe 100644
--- a/src/gcore/types/cloud/region.py
+++ b/src/gcore/types/cloud/region.py
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import List, Union, Optional
+from typing import List, Optional
from datetime import datetime
from typing_extensions import Literal
@@ -12,9 +12,9 @@
class Coordinates(BaseModel):
"""Coordinates of the region"""
- latitude: Union[float, str]
+ latitude: str
- longitude: Union[float, str]
+ longitude: str
class Region(BaseModel):
diff --git a/src/gcore/types/cloud/usage_report_get_params.py b/src/gcore/types/cloud/usage_report_get_params.py
index 6f5b1af2..258c9b8e 100644
--- a/src/gcore/types/cloud/usage_report_get_params.py
+++ b/src/gcore/types/cloud/usage_report_get_params.py
@@ -68,6 +68,26 @@ class UsageReportGetParams(TypedDict, total=False):
offset: int
"""The response resources offset."""
+ order_by: List[
+ Literal[
+ "billing_value.asc",
+ "billing_value.desc",
+ "first_seen.asc",
+ "first_seen.desc",
+ "last_name.asc",
+ "last_name.desc",
+ "last_seen.asc",
+ "last_seen.desc",
+ "project.asc",
+ "project.desc",
+ "region.asc",
+ "region.desc",
+ "type.asc",
+ "type.desc",
+ ]
+ ]
+ """List of sorting criteria in 'field.direction' format."""
+
projects: Optional[Iterable[int]]
"""List of project IDs"""
@@ -78,7 +98,10 @@ class UsageReportGetParams(TypedDict, total=False):
"""Extended filter for field filtering."""
sorting: Iterable[Sorting]
- """List of sorting filters (JSON objects) fields: project. directions: asc, desc."""
+ """
+ (DEPRECATED Use 'order_by' instead) List of sorting filters (JSON objects)
+ fields: project. directions: asc, desc.
+ """
tags: Tags
"""Filter by tags"""
diff --git a/src/gcore/types/cloud/volume_create_params.py b/src/gcore/types/cloud/volume_create_params.py
index 2e2dd5a7..43b240c3 100644
--- a/src/gcore/types/cloud/volume_create_params.py
+++ b/src/gcore/types/cloud/volume_create_params.py
@@ -2,11 +2,9 @@
from __future__ import annotations
-from typing import Union, Iterable
+from typing import Dict, Union, Iterable
from typing_extensions import Literal, Required, TypeAlias, TypedDict
-from .tag_update_map_param import TagUpdateMapParam
-
__all__ = [
"VolumeCreateParams",
"CreateVolumeFromImageSerializer",
@@ -49,7 +47,7 @@ class CreateVolumeFromImageSerializer(TypedDict, total=False):
volume
"""
- tags: TagUpdateMapParam
+ tags: Dict[str, str]
"""Key-value tags to associate with the resource.
A tag is a key-value pair that can be associated with a resource, enabling
@@ -104,7 +102,7 @@ class CreateVolumeFromSnapshotSerializer(TypedDict, total=False):
If specified, value must be equal to respective snapshot size
"""
- tags: TagUpdateMapParam
+ tags: Dict[str, str]
"""Key-value tags to associate with the resource.
A tag is a key-value pair that can be associated with a resource, enabling
@@ -153,7 +151,7 @@ class CreateNewVolumeSerializer(TypedDict, total=False):
volume
"""
- tags: TagUpdateMapParam
+ tags: Dict[str, str]
"""Key-value tags to associate with the resource.
A tag is a key-value pair that can be associated with a resource, enabling
diff --git a/src/gcore/types/security/bgp_announce_list_params.py b/src/gcore/types/security/bgp_announce_list_params.py
index 2bc6a994..64cf7ccf 100644
--- a/src/gcore/types/security/bgp_announce_list_params.py
+++ b/src/gcore/types/security/bgp_announce_list_params.py
@@ -2,7 +2,7 @@
from __future__ import annotations
-from typing import Optional
+from typing import List, Optional
from typing_extensions import Literal, TypedDict
__all__ = ["BgpAnnounceListParams"]
@@ -11,6 +11,13 @@
class BgpAnnounceListParams(TypedDict, total=False):
announced: Optional[bool]
- origin: Optional[Literal["STATIC", "DYNAMIC"]]
+ client_id: Optional[int]
+ """A positive integer ID"""
+
+ limit: Optional[int]
+
+ offset: Optional[int]
+
+ origin: Optional[List[Literal["STATIC", "DYNAMIC", "IAAS", "PROTECTED_NETWORK", "EDGE_PROXY"]]]
site: Optional[str]
diff --git a/src/gcore/types/security/bgp_announce_toggle_params.py b/src/gcore/types/security/bgp_announce_toggle_params.py
index 4c5dd1b6..0dcd2a00 100644
--- a/src/gcore/types/security/bgp_announce_toggle_params.py
+++ b/src/gcore/types/security/bgp_announce_toggle_params.py
@@ -10,7 +10,10 @@
class BgpAnnounceToggleParams(TypedDict, total=False):
announce: Required[str]
+ """IP network to announce"""
enabled: Required[bool]
+ """Whether the announcement is enabled"""
client_id: Optional[int]
+ """A positive integer ID"""
diff --git a/tests/api_resources/cloud/gpu_baremetal/clusters/test_servers.py b/tests/api_resources/cloud/gpu_baremetal/clusters/test_servers.py
index d468d7c4..d51f5379 100644
--- a/tests/api_resources/cloud/gpu_baremetal/clusters/test_servers.py
+++ b/tests/api_resources/cloud/gpu_baremetal/clusters/test_servers.py
@@ -294,6 +294,64 @@ def test_path_params_reboot(self, client: Gcore) -> None:
region_id=0,
)
+ @parametrize
+ def test_method_rebuild(self, client: Gcore) -> None:
+ server = client.cloud.gpu_baremetal.clusters.servers.rebuild(
+ server_id="f1c1eeb6-1834-48c9-a7b0-daafce64872b",
+ project_id=1,
+ region_id=7,
+ cluster_id="1aaaab48-10d0-46d9-80cc-85209284ceb4",
+ )
+ assert_matches_type(TaskIDList, server, path=["response"])
+
+ @parametrize
+ def test_raw_response_rebuild(self, client: Gcore) -> None:
+ response = client.cloud.gpu_baremetal.clusters.servers.with_raw_response.rebuild(
+ server_id="f1c1eeb6-1834-48c9-a7b0-daafce64872b",
+ project_id=1,
+ region_id=7,
+ cluster_id="1aaaab48-10d0-46d9-80cc-85209284ceb4",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ server = response.parse()
+ assert_matches_type(TaskIDList, server, path=["response"])
+
+ @parametrize
+ def test_streaming_response_rebuild(self, client: Gcore) -> None:
+ with client.cloud.gpu_baremetal.clusters.servers.with_streaming_response.rebuild(
+ server_id="f1c1eeb6-1834-48c9-a7b0-daafce64872b",
+ project_id=1,
+ region_id=7,
+ cluster_id="1aaaab48-10d0-46d9-80cc-85209284ceb4",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ server = response.parse()
+ assert_matches_type(TaskIDList, server, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_rebuild(self, client: Gcore) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_id` but received ''"):
+ client.cloud.gpu_baremetal.clusters.servers.with_raw_response.rebuild(
+ server_id="f1c1eeb6-1834-48c9-a7b0-daafce64872b",
+ project_id=1,
+ region_id=7,
+ cluster_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `server_id` but received ''"):
+ client.cloud.gpu_baremetal.clusters.servers.with_raw_response.rebuild(
+ server_id="",
+ project_id=1,
+ region_id=7,
+ cluster_id="1aaaab48-10d0-46d9-80cc-85209284ceb4",
+ )
+
class TestAsyncServers:
parametrize = pytest.mark.parametrize(
@@ -570,3 +628,61 @@ async def test_path_params_reboot(self, async_client: AsyncGcore) -> None:
project_id=0,
region_id=0,
)
+
+ @parametrize
+ async def test_method_rebuild(self, async_client: AsyncGcore) -> None:
+ server = await async_client.cloud.gpu_baremetal.clusters.servers.rebuild(
+ server_id="f1c1eeb6-1834-48c9-a7b0-daafce64872b",
+ project_id=1,
+ region_id=7,
+ cluster_id="1aaaab48-10d0-46d9-80cc-85209284ceb4",
+ )
+ assert_matches_type(TaskIDList, server, path=["response"])
+
+ @parametrize
+ async def test_raw_response_rebuild(self, async_client: AsyncGcore) -> None:
+ response = await async_client.cloud.gpu_baremetal.clusters.servers.with_raw_response.rebuild(
+ server_id="f1c1eeb6-1834-48c9-a7b0-daafce64872b",
+ project_id=1,
+ region_id=7,
+ cluster_id="1aaaab48-10d0-46d9-80cc-85209284ceb4",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ server = await response.parse()
+ assert_matches_type(TaskIDList, server, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_rebuild(self, async_client: AsyncGcore) -> None:
+ async with async_client.cloud.gpu_baremetal.clusters.servers.with_streaming_response.rebuild(
+ server_id="f1c1eeb6-1834-48c9-a7b0-daafce64872b",
+ project_id=1,
+ region_id=7,
+ cluster_id="1aaaab48-10d0-46d9-80cc-85209284ceb4",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ server = await response.parse()
+ assert_matches_type(TaskIDList, server, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_rebuild(self, async_client: AsyncGcore) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_id` but received ''"):
+ await async_client.cloud.gpu_baremetal.clusters.servers.with_raw_response.rebuild(
+ server_id="f1c1eeb6-1834-48c9-a7b0-daafce64872b",
+ project_id=1,
+ region_id=7,
+ cluster_id="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `server_id` but received ''"):
+ await async_client.cloud.gpu_baremetal.clusters.servers.with_raw_response.rebuild(
+ server_id="",
+ project_id=1,
+ region_id=7,
+ cluster_id="1aaaab48-10d0-46d9-80cc-85209284ceb4",
+ )
diff --git a/tests/api_resources/cloud/gpu_baremetal/test_clusters.py b/tests/api_resources/cloud/gpu_baremetal/test_clusters.py
index a46257df..a1522ef3 100644
--- a/tests/api_resources/cloud/gpu_baremetal/test_clusters.py
+++ b/tests/api_resources/cloud/gpu_baremetal/test_clusters.py
@@ -405,32 +405,18 @@ def test_path_params_reboot_all_servers(self, client: Gcore) -> None:
@parametrize
def test_method_rebuild(self, client: Gcore) -> None:
cluster = client.cloud.gpu_baremetal.clusters.rebuild(
- cluster_id="cluster_id",
- project_id=0,
- region_id=0,
- nodes=["string"],
- )
- assert_matches_type(TaskIDList, cluster, path=["response"])
-
- @parametrize
- def test_method_rebuild_with_all_params(self, client: Gcore) -> None:
- cluster = client.cloud.gpu_baremetal.clusters.rebuild(
- cluster_id="cluster_id",
- project_id=0,
- region_id=0,
- nodes=["string"],
- image_id="f01fd9a0-9548-48ba-82dc-a8c8b2d6f2f1",
- user_data="user_data",
+ cluster_id="1aaaab48-10d0-46d9-80cc-85209284ceb4",
+ project_id=1,
+ region_id=7,
)
assert_matches_type(TaskIDList, cluster, path=["response"])
@parametrize
def test_raw_response_rebuild(self, client: Gcore) -> None:
response = client.cloud.gpu_baremetal.clusters.with_raw_response.rebuild(
- cluster_id="cluster_id",
- project_id=0,
- region_id=0,
- nodes=["string"],
+ cluster_id="1aaaab48-10d0-46d9-80cc-85209284ceb4",
+ project_id=1,
+ region_id=7,
)
assert response.is_closed is True
@@ -441,10 +427,9 @@ def test_raw_response_rebuild(self, client: Gcore) -> None:
@parametrize
def test_streaming_response_rebuild(self, client: Gcore) -> None:
with client.cloud.gpu_baremetal.clusters.with_streaming_response.rebuild(
- cluster_id="cluster_id",
- project_id=0,
- region_id=0,
- nodes=["string"],
+ cluster_id="1aaaab48-10d0-46d9-80cc-85209284ceb4",
+ project_id=1,
+ region_id=7,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -459,9 +444,8 @@ def test_path_params_rebuild(self, client: Gcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_id` but received ''"):
client.cloud.gpu_baremetal.clusters.with_raw_response.rebuild(
cluster_id="",
- project_id=0,
- region_id=0,
- nodes=["string"],
+ project_id=1,
+ region_id=7,
)
@parametrize
@@ -514,6 +498,66 @@ def test_path_params_resize(self, client: Gcore) -> None:
instances_count=1,
)
+ @parametrize
+ def test_method_update_servers_settings(self, client: Gcore) -> None:
+ cluster = client.cloud.gpu_baremetal.clusters.update_servers_settings(
+ cluster_id="1aaaab48-10d0-46d9-80cc-85209284ceb4",
+ project_id=1,
+ region_id=7,
+ )
+ assert_matches_type(GPUBaremetalCluster, cluster, path=["response"])
+
+ @parametrize
+ def test_method_update_servers_settings_with_all_params(self, client: Gcore) -> None:
+ cluster = client.cloud.gpu_baremetal.clusters.update_servers_settings(
+ cluster_id="1aaaab48-10d0-46d9-80cc-85209284ceb4",
+ project_id=1,
+ region_id=7,
+ image_id="3793c250-0b3b-4678-bab3-e11afbc29657",
+ servers_settings={
+ "credentials": {"ssh_key_name": "my-ssh-key"},
+ "user_data": "eyJ0ZXN0IjogImRhdGEifQ==",
+ },
+ )
+ assert_matches_type(GPUBaremetalCluster, cluster, path=["response"])
+
+ @parametrize
+ def test_raw_response_update_servers_settings(self, client: Gcore) -> None:
+ response = client.cloud.gpu_baremetal.clusters.with_raw_response.update_servers_settings(
+ cluster_id="1aaaab48-10d0-46d9-80cc-85209284ceb4",
+ project_id=1,
+ region_id=7,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ cluster = response.parse()
+ assert_matches_type(GPUBaremetalCluster, cluster, path=["response"])
+
+ @parametrize
+ def test_streaming_response_update_servers_settings(self, client: Gcore) -> None:
+ with client.cloud.gpu_baremetal.clusters.with_streaming_response.update_servers_settings(
+ cluster_id="1aaaab48-10d0-46d9-80cc-85209284ceb4",
+ project_id=1,
+ region_id=7,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ cluster = response.parse()
+ assert_matches_type(GPUBaremetalCluster, cluster, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_update_servers_settings(self, client: Gcore) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_id` but received ''"):
+ client.cloud.gpu_baremetal.clusters.with_raw_response.update_servers_settings(
+ cluster_id="",
+ project_id=1,
+ region_id=7,
+ )
+
class TestAsyncClusters:
parametrize = pytest.mark.parametrize(
@@ -903,32 +947,18 @@ async def test_path_params_reboot_all_servers(self, async_client: AsyncGcore) ->
@parametrize
async def test_method_rebuild(self, async_client: AsyncGcore) -> None:
cluster = await async_client.cloud.gpu_baremetal.clusters.rebuild(
- cluster_id="cluster_id",
- project_id=0,
- region_id=0,
- nodes=["string"],
- )
- assert_matches_type(TaskIDList, cluster, path=["response"])
-
- @parametrize
- async def test_method_rebuild_with_all_params(self, async_client: AsyncGcore) -> None:
- cluster = await async_client.cloud.gpu_baremetal.clusters.rebuild(
- cluster_id="cluster_id",
- project_id=0,
- region_id=0,
- nodes=["string"],
- image_id="f01fd9a0-9548-48ba-82dc-a8c8b2d6f2f1",
- user_data="user_data",
+ cluster_id="1aaaab48-10d0-46d9-80cc-85209284ceb4",
+ project_id=1,
+ region_id=7,
)
assert_matches_type(TaskIDList, cluster, path=["response"])
@parametrize
async def test_raw_response_rebuild(self, async_client: AsyncGcore) -> None:
response = await async_client.cloud.gpu_baremetal.clusters.with_raw_response.rebuild(
- cluster_id="cluster_id",
- project_id=0,
- region_id=0,
- nodes=["string"],
+ cluster_id="1aaaab48-10d0-46d9-80cc-85209284ceb4",
+ project_id=1,
+ region_id=7,
)
assert response.is_closed is True
@@ -939,10 +969,9 @@ async def test_raw_response_rebuild(self, async_client: AsyncGcore) -> None:
@parametrize
async def test_streaming_response_rebuild(self, async_client: AsyncGcore) -> None:
async with async_client.cloud.gpu_baremetal.clusters.with_streaming_response.rebuild(
- cluster_id="cluster_id",
- project_id=0,
- region_id=0,
- nodes=["string"],
+ cluster_id="1aaaab48-10d0-46d9-80cc-85209284ceb4",
+ project_id=1,
+ region_id=7,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -957,9 +986,8 @@ async def test_path_params_rebuild(self, async_client: AsyncGcore) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_id` but received ''"):
await async_client.cloud.gpu_baremetal.clusters.with_raw_response.rebuild(
cluster_id="",
- project_id=0,
- region_id=0,
- nodes=["string"],
+ project_id=1,
+ region_id=7,
)
@parametrize
@@ -1011,3 +1039,63 @@ async def test_path_params_resize(self, async_client: AsyncGcore) -> None:
region_id=0,
instances_count=1,
)
+
+ @parametrize
+ async def test_method_update_servers_settings(self, async_client: AsyncGcore) -> None:
+ cluster = await async_client.cloud.gpu_baremetal.clusters.update_servers_settings(
+ cluster_id="1aaaab48-10d0-46d9-80cc-85209284ceb4",
+ project_id=1,
+ region_id=7,
+ )
+ assert_matches_type(GPUBaremetalCluster, cluster, path=["response"])
+
+ @parametrize
+ async def test_method_update_servers_settings_with_all_params(self, async_client: AsyncGcore) -> None:
+ cluster = await async_client.cloud.gpu_baremetal.clusters.update_servers_settings(
+ cluster_id="1aaaab48-10d0-46d9-80cc-85209284ceb4",
+ project_id=1,
+ region_id=7,
+ image_id="3793c250-0b3b-4678-bab3-e11afbc29657",
+ servers_settings={
+ "credentials": {"ssh_key_name": "my-ssh-key"},
+ "user_data": "eyJ0ZXN0IjogImRhdGEifQ==",
+ },
+ )
+ assert_matches_type(GPUBaremetalCluster, cluster, path=["response"])
+
+ @parametrize
+ async def test_raw_response_update_servers_settings(self, async_client: AsyncGcore) -> None:
+ response = await async_client.cloud.gpu_baremetal.clusters.with_raw_response.update_servers_settings(
+ cluster_id="1aaaab48-10d0-46d9-80cc-85209284ceb4",
+ project_id=1,
+ region_id=7,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ cluster = await response.parse()
+ assert_matches_type(GPUBaremetalCluster, cluster, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_update_servers_settings(self, async_client: AsyncGcore) -> None:
+ async with async_client.cloud.gpu_baremetal.clusters.with_streaming_response.update_servers_settings(
+ cluster_id="1aaaab48-10d0-46d9-80cc-85209284ceb4",
+ project_id=1,
+ region_id=7,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ cluster = await response.parse()
+ assert_matches_type(GPUBaremetalCluster, cluster, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_update_servers_settings(self, async_client: AsyncGcore) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `cluster_id` but received ''"):
+ await async_client.cloud.gpu_baremetal.clusters.with_raw_response.update_servers_settings(
+ cluster_id="",
+ project_id=1,
+ region_id=7,
+ )
diff --git a/tests/api_resources/cloud/networks/test_subnets.py b/tests/api_resources/cloud/networks/test_subnets.py
index 9ea952ec..58f950c6 100644
--- a/tests/api_resources/cloud/networks/test_subnets.py
+++ b/tests/api_resources/cloud/networks/test_subnets.py
@@ -168,6 +168,7 @@ def test_method_list_with_all_params(self, client: Gcore) -> None:
network_id="b30d0de7-bca2-4c83-9c57-9e645bd2cc92",
offset=0,
order_by="name.asc",
+ owned_by="project",
tag_key=["key1", "key2"],
tag_key_value="tag_key_value",
)
@@ -447,6 +448,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncGcore) -> No
network_id="b30d0de7-bca2-4c83-9c57-9e645bd2cc92",
offset=0,
order_by="name.asc",
+ owned_by="project",
tag_key=["key1", "key2"],
tag_key_value="tag_key_value",
)
diff --git a/tests/api_resources/cloud/test_cost_reports.py b/tests/api_resources/cloud/test_cost_reports.py
index 1e3a60b8..79f71ea2 100644
--- a/tests/api_resources/cloud/test_cost_reports.py
+++ b/tests/api_resources/cloud/test_cost_reports.py
@@ -164,6 +164,7 @@ def test_method_get_detailed_with_all_params(self, client: Gcore) -> None:
enable_last_day=False,
limit=10,
offset=0,
+ order_by=["project.asc", "region.desc"],
projects=[16, 17, 18, 19, 20],
regions=[1, 2, 3],
response_format="csv_records",
@@ -377,6 +378,7 @@ async def test_method_get_detailed_with_all_params(self, async_client: AsyncGcor
enable_last_day=False,
limit=10,
offset=0,
+ order_by=["project.asc", "region.desc"],
projects=[16, 17, 18, 19, 20],
regions=[1, 2, 3],
response_format="csv_records",
diff --git a/tests/api_resources/cloud/test_networks.py b/tests/api_resources/cloud/test_networks.py
index ac99dc88..7a46a77b 100644
--- a/tests/api_resources/cloud/test_networks.py
+++ b/tests/api_resources/cloud/test_networks.py
@@ -140,10 +140,13 @@ def test_method_list_with_all_params(self, client: Gcore) -> None:
network = client.cloud.networks.list(
project_id=1,
region_id=1,
+ external=True,
limit=1000,
name="my-network",
+ network_type="vlan",
offset=0,
order_by="created_at.desc",
+ owned_by="project",
tag_key=["key1", "key2"],
tag_key_value="tag_key_value",
)
@@ -392,10 +395,13 @@ async def test_method_list_with_all_params(self, async_client: AsyncGcore) -> No
network = await async_client.cloud.networks.list(
project_id=1,
region_id=1,
+ external=True,
limit=1000,
name="my-network",
+ network_type="vlan",
offset=0,
order_by="created_at.desc",
+ owned_by="project",
tag_key=["key1", "key2"],
tag_key_value="tag_key_value",
)
diff --git a/tests/api_resources/cloud/test_usage_reports.py b/tests/api_resources/cloud/test_usage_reports.py
index 76b1417d..1b46c101 100644
--- a/tests/api_resources/cloud/test_usage_reports.py
+++ b/tests/api_resources/cloud/test_usage_reports.py
@@ -34,6 +34,7 @@ def test_method_get_with_all_params(self, client: Gcore) -> None:
enable_last_day=False,
limit=10,
offset=0,
+ order_by=["project.asc", "region.desc"],
projects=[16, 17, 18, 19, 20],
regions=[1, 2, 3],
schema_filter={
@@ -119,6 +120,7 @@ async def test_method_get_with_all_params(self, async_client: AsyncGcore) -> Non
enable_last_day=False,
limit=10,
offset=0,
+ order_by=["project.asc", "region.desc"],
projects=[16, 17, 18, 19, 20],
regions=[1, 2, 3],
schema_filter={
diff --git a/tests/api_resources/cloud/test_volumes.py b/tests/api_resources/cloud/test_volumes.py
index ffe1d3bc..1b58422a 100644
--- a/tests/api_resources/cloud/test_volumes.py
+++ b/tests/api_resources/cloud/test_volumes.py
@@ -45,7 +45,7 @@ def test_method_create_with_all_params_overload_1(self, client: Gcore) -> None:
attachment_tag="device-tag",
instance_id_to_attach_to="88f3e0bd-ca86-4cf7-be8b-dd2988e23c2d",
lifecycle_policy_ids=[1, 2],
- tags={"foo": "string"},
+ tags={"my-tag": "my-tag-value"},
type_name="standard",
)
assert_matches_type(TaskIDList, volume, path=["response"])
@@ -107,7 +107,7 @@ def test_method_create_with_all_params_overload_2(self, client: Gcore) -> None:
instance_id_to_attach_to="88f3e0bd-ca86-4cf7-be8b-dd2988e23c2d",
lifecycle_policy_ids=[1, 2],
size=10,
- tags={"foo": "string"},
+ tags={"my-tag": "my-tag-value"},
type_name="standard",
)
assert_matches_type(TaskIDList, volume, path=["response"])
@@ -166,7 +166,7 @@ def test_method_create_with_all_params_overload_3(self, client: Gcore) -> None:
attachment_tag="device-tag",
instance_id_to_attach_to="88f3e0bd-ca86-4cf7-be8b-dd2988e23c2d",
lifecycle_policy_ids=[1, 2],
- tags={"foo": "string"},
+ tags={"my-tag": "my-tag-value"},
type_name="standard",
)
assert_matches_type(TaskIDList, volume, path=["response"])
@@ -701,7 +701,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn
attachment_tag="device-tag",
instance_id_to_attach_to="88f3e0bd-ca86-4cf7-be8b-dd2988e23c2d",
lifecycle_policy_ids=[1, 2],
- tags={"foo": "string"},
+ tags={"my-tag": "my-tag-value"},
type_name="standard",
)
assert_matches_type(TaskIDList, volume, path=["response"])
@@ -763,7 +763,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn
instance_id_to_attach_to="88f3e0bd-ca86-4cf7-be8b-dd2988e23c2d",
lifecycle_policy_ids=[1, 2],
size=10,
- tags={"foo": "string"},
+ tags={"my-tag": "my-tag-value"},
type_name="standard",
)
assert_matches_type(TaskIDList, volume, path=["response"])
@@ -822,7 +822,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn
attachment_tag="device-tag",
instance_id_to_attach_to="88f3e0bd-ca86-4cf7-be8b-dd2988e23c2d",
lifecycle_policy_ids=[1, 2],
- tags={"foo": "string"},
+ tags={"my-tag": "my-tag-value"},
type_name="standard",
)
assert_matches_type(TaskIDList, volume, path=["response"])
diff --git a/tests/api_resources/security/test_bgp_announces.py b/tests/api_resources/security/test_bgp_announces.py
index 8907ce2f..bac96db4 100644
--- a/tests/api_resources/security/test_bgp_announces.py
+++ b/tests/api_resources/security/test_bgp_announces.py
@@ -26,7 +26,10 @@ def test_method_list(self, client: Gcore) -> None:
def test_method_list_with_all_params(self, client: Gcore) -> None:
bgp_announce = client.security.bgp_announces.list(
announced=True,
- origin="STATIC",
+ client_id=1,
+ limit=1,
+ offset=0,
+ origin=["STATIC", "DYNAMIC"],
site="x",
)
assert_matches_type(BgpAnnounceListResponse, bgp_announce, path=["response"])
@@ -64,7 +67,7 @@ def test_method_toggle_with_all_params(self, client: Gcore) -> None:
bgp_announce = client.security.bgp_announces.toggle(
announce="192.9.9.1/32",
enabled=True,
- client_id=0,
+ client_id=1,
)
assert_matches_type(object, bgp_announce, path=["response"])
@@ -109,7 +112,10 @@ async def test_method_list(self, async_client: AsyncGcore) -> None:
async def test_method_list_with_all_params(self, async_client: AsyncGcore) -> None:
bgp_announce = await async_client.security.bgp_announces.list(
announced=True,
- origin="STATIC",
+ client_id=1,
+ limit=1,
+ offset=0,
+ origin=["STATIC", "DYNAMIC"],
site="x",
)
assert_matches_type(BgpAnnounceListResponse, bgp_announce, path=["response"])
@@ -147,7 +153,7 @@ async def test_method_toggle_with_all_params(self, async_client: AsyncGcore) ->
bgp_announce = await async_client.security.bgp_announces.toggle(
announce="192.9.9.1/32",
enabled=True,
- client_id=0,
+ client_id=1,
)
assert_matches_type(object, bgp_announce, path=["response"])
diff --git a/tests/test_client.py b/tests/test_client.py
index c04ade3d..9a14904e 100644
--- a/tests/test_client.py
+++ b/tests/test_client.py
@@ -965,8 +965,14 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None:
# Test that the proxy environment variables are set correctly
monkeypatch.setenv("HTTPS_PROXY", "https://example.org")
- # Delete in case our environment has this set
+ # Delete in case our environment has any proxy env vars set
monkeypatch.delenv("HTTP_PROXY", raising=False)
+ monkeypatch.delenv("ALL_PROXY", raising=False)
+ monkeypatch.delenv("NO_PROXY", raising=False)
+ monkeypatch.delenv("http_proxy", raising=False)
+ monkeypatch.delenv("https_proxy", raising=False)
+ monkeypatch.delenv("all_proxy", raising=False)
+ monkeypatch.delenv("no_proxy", raising=False)
client = DefaultHttpxClient()
@@ -1889,8 +1895,14 @@ async def test_get_platform(self) -> None:
async def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None:
# Test that the proxy environment variables are set correctly
monkeypatch.setenv("HTTPS_PROXY", "https://example.org")
- # Delete in case our environment has this set
+ # Delete in case our environment has any proxy env vars set
monkeypatch.delenv("HTTP_PROXY", raising=False)
+ monkeypatch.delenv("ALL_PROXY", raising=False)
+ monkeypatch.delenv("NO_PROXY", raising=False)
+ monkeypatch.delenv("http_proxy", raising=False)
+ monkeypatch.delenv("https_proxy", raising=False)
+ monkeypatch.delenv("all_proxy", raising=False)
+ monkeypatch.delenv("no_proxy", raising=False)
client = DefaultAsyncHttpxClient()