diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index a26ebfc1..8f3e0a49 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.14.0"
+ ".": "0.15.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 28d74a32..d690e547 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 612
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-d59e09eb6882032973e42339edbc5170a0d695dcb127e28e29109f1a1f088afd.yml
-openapi_spec_hash: 8768c88e22bbe1d3042539be56ea8469
-config_hash: 11eb703eee66609eba76695b18f8cb4a
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-0c766e6ecf7e97b4bad1f4ee664a81ab3f3c76e655993623084f9cf9517097cd.yml
+openapi_spec_hash: 1a1ec9ecc3cdf29e91d4dd75570af164
+config_hash: e660d386571b7b7f97e632d15f98719f
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 05bda150..5d027c2b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,21 @@
# Changelog
+## 0.15.0 (2025-10-02)
+
+Full Changelog: [v0.14.0...v0.15.0](https://github.com/G-Core/gcore-python/compare/v0.14.0...v0.15.0)
+
+### Features
+
+* **api:** Add missing reserved_fixed_ips update method ([b7b8db0](https://github.com/G-Core/gcore-python/commit/b7b8db03bd75a4889601a6da2fd5aa2e8004a141))
+* **api:** aggregated API specs update ([8c59ffa](https://github.com/G-Core/gcore-python/commit/8c59ffa34fe9d77a585d53b9243fb0ec752de5c4))
+* **api:** aggregated API specs update ([6281066](https://github.com/G-Core/gcore-python/commit/6281066df4e5cc479f7f53f731e4ecd59f41e7a4))
+* **api:** aggregated API specs update ([0a2f63b](https://github.com/G-Core/gcore-python/commit/0a2f63b1a5dd2dfc26cfa9b3e5ad4e4e997e4988))
+
+
+### Bug Fixes
+
+* **examples:** remove unnecessary None checks in quota examples ([#97](https://github.com/G-Core/gcore-python/issues/97)) ([ff71c83](https://github.com/G-Core/gcore-python/commit/ff71c83bb97e5fabf25efc32e0e2f6b60addbe64))
+
## 0.14.0 (2025-09-30)
Full Changelog: [v0.13.0...v0.14.0](https://github.com/G-Core/gcore-python/compare/v0.13.0...v0.14.0)
diff --git a/api.md b/api.md
index b15ab5ea..86601a2c 100644
--- a/api.md
+++ b/api.md
@@ -301,6 +301,7 @@ from gcore.types.cloud import ReservedFixedIP
Methods:
- client.cloud.reserved_fixed_ips.create(\*, project_id, region_id, \*\*params) -> TaskIDList
+- client.cloud.reserved_fixed_ips.update(port_id, \*, project_id, region_id, \*\*params) -> ReservedFixedIP
- client.cloud.reserved_fixed_ips.list(\*, project_id, region_id, \*\*params) -> SyncOffsetPage[ReservedFixedIP]
- client.cloud.reserved_fixed_ips.delete(port_id, \*, project_id, region_id) -> TaskIDList
- client.cloud.reserved_fixed_ips.get(port_id, \*, project_id, region_id) -> ReservedFixedIP
@@ -344,7 +345,7 @@ Methods:
- client.cloud.networks.subnets.create(\*, project_id, region_id, \*\*params) -> TaskIDList
- client.cloud.networks.subnets.update(subnet_id, \*, project_id, region_id, \*\*params) -> Subnet
- client.cloud.networks.subnets.list(\*, project_id, region_id, \*\*params) -> SyncOffsetPage[Subnet]
-- client.cloud.networks.subnets.delete(subnet_id, \*, project_id, region_id) -> None
+- client.cloud.networks.subnets.delete(subnet_id, \*, project_id, region_id) -> TaskIDList
- client.cloud.networks.subnets.get(subnet_id, \*, project_id, region_id) -> Subnet
### Routers
diff --git a/examples/cloud/quotas.py b/examples/cloud/quotas.py
index 0fadfa2d..c23ebe6c 100644
--- a/examples/cloud/quotas.py
+++ b/examples/cloud/quotas.py
@@ -23,8 +23,6 @@ def main() -> None:
# Get client ID from IAM account overview
gcore_client_id = gcore.iam.get_account_overview().id
- if gcore_client_id is None:
- raise ValueError("Client ID is None for this account")
get_all_quotas(client=gcore)
get_regional_quotas(client=gcore, client_id=gcore_client_id)
diff --git a/examples/cloud/quotas_async.py b/examples/cloud/quotas_async.py
index 594b0e68..74145412 100644
--- a/examples/cloud/quotas_async.py
+++ b/examples/cloud/quotas_async.py
@@ -25,8 +25,6 @@ async def main() -> None:
# Get client ID from IAM account overview
account_overview = await gcore.iam.get_account_overview()
gcore_client_id = account_overview.id
- if gcore_client_id is None:
- raise ValueError("Client ID is None for this account")
await get_all_quotas(client=gcore)
await get_regional_quotas(client=gcore, client_id=gcore_client_id)
diff --git a/pyproject.toml b/pyproject.toml
index 21dd7b46..57937a9e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "gcore"
-version = "0.14.0"
+version = "0.15.0"
description = "The official Python library for the gcore API"
dynamic = ["readme"]
license = "Apache-2.0"
diff --git a/src/gcore/_version.py b/src/gcore/_version.py
index 426ebfb3..0bfdd66b 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.14.0" # x-release-please-version
+__version__ = "0.15.0" # x-release-please-version
diff --git a/src/gcore/resources/cloud/networks/subnets.py b/src/gcore/resources/cloud/networks/subnets.py
index baf4173e..f79cdcbd 100644
--- a/src/gcore/resources/cloud/networks/subnets.py
+++ b/src/gcore/resources/cloud/networks/subnets.py
@@ -7,7 +7,7 @@
import httpx
-from ...._types import NOT_GIVEN, Body, Omit, Query, Headers, NoneType, NotGiven, SequenceNotStr, omit, not_given
+from ...._types import NOT_GIVEN, Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@@ -413,7 +413,7 @@ def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> None:
+ ) -> TaskIDList:
"""
Delete subnet
@@ -438,7 +438,6 @@ def delete(
region_id = self._client._get_cloud_region_id_path_param()
if not subnet_id:
raise ValueError(f"Expected a non-empty value for `subnet_id` but received {subnet_id!r}")
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
return self._delete(
f"/cloud/v1/subnets/{project_id}/{region_id}/{subnet_id}"
if self._client._base_url_overridden
@@ -446,7 +445,7 @@ def delete(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=NoneType,
+ cast_to=TaskIDList,
)
def get(
@@ -881,7 +880,7 @@ async def delete(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> None:
+ ) -> TaskIDList:
"""
Delete subnet
@@ -906,7 +905,6 @@ async def delete(
region_id = self._client._get_cloud_region_id_path_param()
if not subnet_id:
raise ValueError(f"Expected a non-empty value for `subnet_id` but received {subnet_id!r}")
- extra_headers = {"Accept": "*/*", **(extra_headers or {})}
return await self._delete(
f"/cloud/v1/subnets/{project_id}/{region_id}/{subnet_id}"
if self._client._base_url_overridden
@@ -914,7 +912,7 @@ async def delete(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=NoneType,
+ cast_to=TaskIDList,
)
async def get(
diff --git a/src/gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py b/src/gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py
index 2441bca0..e0c818b1 100644
--- a/src/gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py
+++ b/src/gcore/resources/cloud/reserved_fixed_ips/reserved_fixed_ips.py
@@ -26,7 +26,12 @@
async_to_streamed_response_wrapper,
)
from ....pagination import SyncOffsetPage, AsyncOffsetPage
-from ....types.cloud import InterfaceIPFamily, reserved_fixed_ip_list_params, reserved_fixed_ip_create_params
+from ....types.cloud import (
+ InterfaceIPFamily,
+ reserved_fixed_ip_list_params,
+ reserved_fixed_ip_create_params,
+ reserved_fixed_ip_update_params,
+)
from ...._base_client import AsyncPaginator, make_request_options
from ....types.cloud.task_id_list import TaskIDList
from ....types.cloud.reserved_fixed_ip import ReservedFixedIP
@@ -295,6 +300,51 @@ def create(
cast_to=TaskIDList,
)
+ def update(
+ self,
+ port_id: str,
+ *,
+ project_id: int | None = None,
+ region_id: int | None = None,
+ is_vip: bool,
+ # 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,
+ ) -> ReservedFixedIP:
+ """
+ Update the VIP status of a reserved fixed IP.
+
+ Args:
+ is_vip: If reserved fixed IP should be a VIP
+
+ 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 port_id:
+ raise ValueError(f"Expected a non-empty value for `port_id` but received {port_id!r}")
+ return self._patch(
+ f"/cloud/v1/reserved_fixed_ips/{project_id}/{region_id}/{port_id}"
+ if self._client._base_url_overridden
+ else f"https://api.gcore.com//cloud/v1/reserved_fixed_ips/{project_id}/{region_id}/{port_id}",
+ body=maybe_transform({"is_vip": is_vip}, reserved_fixed_ip_update_params.ReservedFixedIPUpdateParams),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=ReservedFixedIP,
+ )
+
def list(
self,
*,
@@ -1016,6 +1066,53 @@ async def create(
cast_to=TaskIDList,
)
+ async def update(
+ self,
+ port_id: str,
+ *,
+ project_id: int | None = None,
+ region_id: int | None = None,
+ is_vip: bool,
+ # 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,
+ ) -> ReservedFixedIP:
+ """
+ Update the VIP status of a reserved fixed IP.
+
+ Args:
+ is_vip: If reserved fixed IP should be a VIP
+
+ 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 port_id:
+ raise ValueError(f"Expected a non-empty value for `port_id` but received {port_id!r}")
+ return await self._patch(
+ f"/cloud/v1/reserved_fixed_ips/{project_id}/{region_id}/{port_id}"
+ if self._client._base_url_overridden
+ else f"https://api.gcore.com//cloud/v1/reserved_fixed_ips/{project_id}/{region_id}/{port_id}",
+ body=await async_maybe_transform(
+ {"is_vip": is_vip}, reserved_fixed_ip_update_params.ReservedFixedIPUpdateParams
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=ReservedFixedIP,
+ )
+
def list(
self,
*,
@@ -1484,6 +1581,9 @@ def __init__(self, reserved_fixed_ips: ReservedFixedIPsResource) -> None:
self.create = to_raw_response_wrapper(
reserved_fixed_ips.create,
)
+ self.update = to_raw_response_wrapper(
+ reserved_fixed_ips.update,
+ )
self.list = to_raw_response_wrapper(
reserved_fixed_ips.list,
)
@@ -1512,6 +1612,9 @@ def __init__(self, reserved_fixed_ips: AsyncReservedFixedIPsResource) -> None:
self.create = async_to_raw_response_wrapper(
reserved_fixed_ips.create,
)
+ self.update = async_to_raw_response_wrapper(
+ reserved_fixed_ips.update,
+ )
self.list = async_to_raw_response_wrapper(
reserved_fixed_ips.list,
)
@@ -1540,6 +1643,9 @@ def __init__(self, reserved_fixed_ips: ReservedFixedIPsResource) -> None:
self.create = to_streamed_response_wrapper(
reserved_fixed_ips.create,
)
+ self.update = to_streamed_response_wrapper(
+ reserved_fixed_ips.update,
+ )
self.list = to_streamed_response_wrapper(
reserved_fixed_ips.list,
)
@@ -1568,6 +1674,9 @@ def __init__(self, reserved_fixed_ips: AsyncReservedFixedIPsResource) -> None:
self.create = async_to_streamed_response_wrapper(
reserved_fixed_ips.create,
)
+ self.update = async_to_streamed_response_wrapper(
+ reserved_fixed_ips.update,
+ )
self.list = async_to_streamed_response_wrapper(
reserved_fixed_ips.list,
)
diff --git a/src/gcore/resources/iam/api_tokens.py b/src/gcore/resources/iam/api_tokens.py
index e6031ed5..3cabd1c3 100644
--- a/src/gcore/resources/iam/api_tokens.py
+++ b/src/gcore/resources/iam/api_tokens.py
@@ -2,6 +2,8 @@
from __future__ import annotations
+from typing import Optional
+
import httpx
from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given
@@ -48,7 +50,7 @@ def create(
client_id: int,
*,
client_user: api_token_create_params.ClientUser,
- exp_date: str,
+ exp_date: Optional[str],
name: str,
description: str | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -269,7 +271,7 @@ async def create(
client_id: int,
*,
client_user: api_token_create_params.ClientUser,
- exp_date: str,
+ exp_date: Optional[str],
name: str,
description: 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/types/cdn/cdn_resource.py b/src/gcore/types/cdn/cdn_resource.py
index 978b7f64..6b897448 100644
--- a/src/gcore/types/cdn/cdn_resource.py
+++ b/src/gcore/types/cdn/cdn_resource.py
@@ -832,6 +832,26 @@ class OptionsQueryStringForwarding(BaseModel):
of the streaming session.
"""
+ forward_except_keys: Optional[List[str]] = None
+ """
+ The `forward_except_keys` field provides a mechanism to exclude specific
+ parameters from being forwarded from playlist files to media chunk files. By
+ listing certain keys in this field, you can ensure that these parameters are
+ omitted during the forwarding process. This is particularly useful for
+ preventing sensitive or irrelevant information from being included in requests
+ for media chunks, thereby enhancing security and optimizing performance.
+ """
+
+ forward_only_keys: Optional[List[str]] = None
+ """
+ The `forward_only_keys` field allows for granular control over which specific
+ parameters are forwarded from playlist files to media chunk files. By specifying
+ certain keys, only those parameters will be propagated, ensuring that only
+ relevant information is passed along. This is particularly useful for security
+ and performance optimization, as it prevents unnecessary or sensitive data from
+ being included in requests for media chunks.
+ """
+
class OptionsRedirectHTTPToHTTPS(BaseModel):
enabled: bool
diff --git a/src/gcore/types/cdn/resource_create_params.py b/src/gcore/types/cdn/resource_create_params.py
index fbde3142..544e6f4a 100644
--- a/src/gcore/types/cdn/resource_create_params.py
+++ b/src/gcore/types/cdn/resource_create_params.py
@@ -955,6 +955,26 @@ class OptionsQueryStringForwarding(TypedDict, total=False):
of the streaming session.
"""
+ forward_except_keys: SequenceNotStr[str]
+ """
+ The `forward_except_keys` field provides a mechanism to exclude specific
+ parameters from being forwarded from playlist files to media chunk files. By
+ listing certain keys in this field, you can ensure that these parameters are
+ omitted during the forwarding process. This is particularly useful for
+ preventing sensitive or irrelevant information from being included in requests
+ for media chunks, thereby enhancing security and optimizing performance.
+ """
+
+ forward_only_keys: SequenceNotStr[str]
+ """
+ The `forward_only_keys` field allows for granular control over which specific
+ parameters are forwarded from playlist files to media chunk files. By specifying
+ certain keys, only those parameters will be propagated, ensuring that only
+ relevant information is passed along. This is particularly useful for security
+ and performance optimization, as it prevents unnecessary or sensitive data from
+ being included in requests for media chunks.
+ """
+
class OptionsRedirectHTTPToHTTPS(TypedDict, total=False):
enabled: Required[bool]
diff --git a/src/gcore/types/cdn/resource_replace_params.py b/src/gcore/types/cdn/resource_replace_params.py
index 4128691f..938b1f96 100644
--- a/src/gcore/types/cdn/resource_replace_params.py
+++ b/src/gcore/types/cdn/resource_replace_params.py
@@ -933,6 +933,26 @@ class OptionsQueryStringForwarding(TypedDict, total=False):
of the streaming session.
"""
+ forward_except_keys: SequenceNotStr[str]
+ """
+ The `forward_except_keys` field provides a mechanism to exclude specific
+ parameters from being forwarded from playlist files to media chunk files. By
+ listing certain keys in this field, you can ensure that these parameters are
+ omitted during the forwarding process. This is particularly useful for
+ preventing sensitive or irrelevant information from being included in requests
+ for media chunks, thereby enhancing security and optimizing performance.
+ """
+
+ forward_only_keys: SequenceNotStr[str]
+ """
+ The `forward_only_keys` field allows for granular control over which specific
+ parameters are forwarded from playlist files to media chunk files. By specifying
+ certain keys, only those parameters will be propagated, ensuring that only
+ relevant information is passed along. This is particularly useful for security
+ and performance optimization, as it prevents unnecessary or sensitive data from
+ being included in requests for media chunks.
+ """
+
class OptionsRedirectHTTPToHTTPS(TypedDict, total=False):
enabled: Required[bool]
diff --git a/src/gcore/types/cdn/resource_update_params.py b/src/gcore/types/cdn/resource_update_params.py
index dad17ba7..6ee27ee0 100644
--- a/src/gcore/types/cdn/resource_update_params.py
+++ b/src/gcore/types/cdn/resource_update_params.py
@@ -924,6 +924,26 @@ class OptionsQueryStringForwarding(TypedDict, total=False):
of the streaming session.
"""
+ forward_except_keys: SequenceNotStr[str]
+ """
+ The `forward_except_keys` field provides a mechanism to exclude specific
+ parameters from being forwarded from playlist files to media chunk files. By
+ listing certain keys in this field, you can ensure that these parameters are
+ omitted during the forwarding process. This is particularly useful for
+ preventing sensitive or irrelevant information from being included in requests
+ for media chunks, thereby enhancing security and optimizing performance.
+ """
+
+ forward_only_keys: SequenceNotStr[str]
+ """
+ The `forward_only_keys` field allows for granular control over which specific
+ parameters are forwarded from playlist files to media chunk files. By specifying
+ certain keys, only those parameters will be propagated, ensuring that only
+ relevant information is passed along. This is particularly useful for security
+ and performance optimization, as it prevents unnecessary or sensitive data from
+ being included in requests for media chunks.
+ """
+
class OptionsRedirectHTTPToHTTPS(TypedDict, total=False):
enabled: Required[bool]
diff --git a/src/gcore/types/cdn/resources/cdn_resource_rule.py b/src/gcore/types/cdn/resources/cdn_resource_rule.py
index 8bf93a9e..4975c21d 100644
--- a/src/gcore/types/cdn/resources/cdn_resource_rule.py
+++ b/src/gcore/types/cdn/resources/cdn_resource_rule.py
@@ -809,6 +809,26 @@ class OptionsQueryStringForwarding(BaseModel):
of the streaming session.
"""
+ forward_except_keys: Optional[List[str]] = None
+ """
+ The `forward_except_keys` field provides a mechanism to exclude specific
+ parameters from being forwarded from playlist files to media chunk files. By
+ listing certain keys in this field, you can ensure that these parameters are
+ omitted during the forwarding process. This is particularly useful for
+ preventing sensitive or irrelevant information from being included in requests
+ for media chunks, thereby enhancing security and optimizing performance.
+ """
+
+ forward_only_keys: Optional[List[str]] = None
+ """
+ The `forward_only_keys` field allows for granular control over which specific
+ parameters are forwarded from playlist files to media chunk files. By specifying
+ certain keys, only those parameters will be propagated, ensuring that only
+ relevant information is passed along. This is particularly useful for security
+ and performance optimization, as it prevents unnecessary or sensitive data from
+ being included in requests for media chunks.
+ """
+
class OptionsRedirectHTTPToHTTPS(BaseModel):
enabled: bool
diff --git a/src/gcore/types/cdn/resources/rule_create_params.py b/src/gcore/types/cdn/resources/rule_create_params.py
index b9c282ce..1f1c269f 100644
--- a/src/gcore/types/cdn/resources/rule_create_params.py
+++ b/src/gcore/types/cdn/resources/rule_create_params.py
@@ -885,6 +885,26 @@ class OptionsQueryStringForwarding(TypedDict, total=False):
of the streaming session.
"""
+ forward_except_keys: SequenceNotStr[str]
+ """
+ The `forward_except_keys` field provides a mechanism to exclude specific
+ parameters from being forwarded from playlist files to media chunk files. By
+ listing certain keys in this field, you can ensure that these parameters are
+ omitted during the forwarding process. This is particularly useful for
+ preventing sensitive or irrelevant information from being included in requests
+ for media chunks, thereby enhancing security and optimizing performance.
+ """
+
+ forward_only_keys: SequenceNotStr[str]
+ """
+ The `forward_only_keys` field allows for granular control over which specific
+ parameters are forwarded from playlist files to media chunk files. By specifying
+ certain keys, only those parameters will be propagated, ensuring that only
+ relevant information is passed along. This is particularly useful for security
+ and performance optimization, as it prevents unnecessary or sensitive data from
+ being included in requests for media chunks.
+ """
+
class OptionsRedirectHTTPToHTTPS(TypedDict, total=False):
enabled: Required[bool]
diff --git a/src/gcore/types/cdn/resources/rule_replace_params.py b/src/gcore/types/cdn/resources/rule_replace_params.py
index 6e9dfca4..63da2423 100644
--- a/src/gcore/types/cdn/resources/rule_replace_params.py
+++ b/src/gcore/types/cdn/resources/rule_replace_params.py
@@ -887,6 +887,26 @@ class OptionsQueryStringForwarding(TypedDict, total=False):
of the streaming session.
"""
+ forward_except_keys: SequenceNotStr[str]
+ """
+ The `forward_except_keys` field provides a mechanism to exclude specific
+ parameters from being forwarded from playlist files to media chunk files. By
+ listing certain keys in this field, you can ensure that these parameters are
+ omitted during the forwarding process. This is particularly useful for
+ preventing sensitive or irrelevant information from being included in requests
+ for media chunks, thereby enhancing security and optimizing performance.
+ """
+
+ forward_only_keys: SequenceNotStr[str]
+ """
+ The `forward_only_keys` field allows for granular control over which specific
+ parameters are forwarded from playlist files to media chunk files. By specifying
+ certain keys, only those parameters will be propagated, ensuring that only
+ relevant information is passed along. This is particularly useful for security
+ and performance optimization, as it prevents unnecessary or sensitive data from
+ being included in requests for media chunks.
+ """
+
class OptionsRedirectHTTPToHTTPS(TypedDict, total=False):
enabled: Required[bool]
diff --git a/src/gcore/types/cdn/resources/rule_update_params.py b/src/gcore/types/cdn/resources/rule_update_params.py
index 959e82a8..6351104f 100644
--- a/src/gcore/types/cdn/resources/rule_update_params.py
+++ b/src/gcore/types/cdn/resources/rule_update_params.py
@@ -887,6 +887,26 @@ class OptionsQueryStringForwarding(TypedDict, total=False):
of the streaming session.
"""
+ forward_except_keys: SequenceNotStr[str]
+ """
+ The `forward_except_keys` field provides a mechanism to exclude specific
+ parameters from being forwarded from playlist files to media chunk files. By
+ listing certain keys in this field, you can ensure that these parameters are
+ omitted during the forwarding process. This is particularly useful for
+ preventing sensitive or irrelevant information from being included in requests
+ for media chunks, thereby enhancing security and optimizing performance.
+ """
+
+ forward_only_keys: SequenceNotStr[str]
+ """
+ The `forward_only_keys` field allows for granular control over which specific
+ parameters are forwarded from playlist files to media chunk files. By specifying
+ certain keys, only those parameters will be propagated, ensuring that only
+ relevant information is passed along. This is particularly useful for security
+ and performance optimization, as it prevents unnecessary or sensitive data from
+ being included in requests for media chunks.
+ """
+
class OptionsRedirectHTTPToHTTPS(TypedDict, total=False):
enabled: Required[bool]
diff --git a/src/gcore/types/cdn/rule_template.py b/src/gcore/types/cdn/rule_template.py
index 000e8ebd..4f13a6a2 100644
--- a/src/gcore/types/cdn/rule_template.py
+++ b/src/gcore/types/cdn/rule_template.py
@@ -809,6 +809,26 @@ class OptionsQueryStringForwarding(BaseModel):
of the streaming session.
"""
+ forward_except_keys: Optional[List[str]] = None
+ """
+ The `forward_except_keys` field provides a mechanism to exclude specific
+ parameters from being forwarded from playlist files to media chunk files. By
+ listing certain keys in this field, you can ensure that these parameters are
+ omitted during the forwarding process. This is particularly useful for
+ preventing sensitive or irrelevant information from being included in requests
+ for media chunks, thereby enhancing security and optimizing performance.
+ """
+
+ forward_only_keys: Optional[List[str]] = None
+ """
+ The `forward_only_keys` field allows for granular control over which specific
+ parameters are forwarded from playlist files to media chunk files. By specifying
+ certain keys, only those parameters will be propagated, ensuring that only
+ relevant information is passed along. This is particularly useful for security
+ and performance optimization, as it prevents unnecessary or sensitive data from
+ being included in requests for media chunks.
+ """
+
class OptionsRedirectHTTPToHTTPS(BaseModel):
enabled: bool
diff --git a/src/gcore/types/cdn/rule_template_create_params.py b/src/gcore/types/cdn/rule_template_create_params.py
index bea0ca5a..529ec2a3 100644
--- a/src/gcore/types/cdn/rule_template_create_params.py
+++ b/src/gcore/types/cdn/rule_template_create_params.py
@@ -869,6 +869,26 @@ class OptionsQueryStringForwarding(TypedDict, total=False):
of the streaming session.
"""
+ forward_except_keys: SequenceNotStr[str]
+ """
+ The `forward_except_keys` field provides a mechanism to exclude specific
+ parameters from being forwarded from playlist files to media chunk files. By
+ listing certain keys in this field, you can ensure that these parameters are
+ omitted during the forwarding process. This is particularly useful for
+ preventing sensitive or irrelevant information from being included in requests
+ for media chunks, thereby enhancing security and optimizing performance.
+ """
+
+ forward_only_keys: SequenceNotStr[str]
+ """
+ The `forward_only_keys` field allows for granular control over which specific
+ parameters are forwarded from playlist files to media chunk files. By specifying
+ certain keys, only those parameters will be propagated, ensuring that only
+ relevant information is passed along. This is particularly useful for security
+ and performance optimization, as it prevents unnecessary or sensitive data from
+ being included in requests for media chunks.
+ """
+
class OptionsRedirectHTTPToHTTPS(TypedDict, total=False):
enabled: Required[bool]
diff --git a/src/gcore/types/cdn/rule_template_replace_params.py b/src/gcore/types/cdn/rule_template_replace_params.py
index 61956314..ca412de2 100644
--- a/src/gcore/types/cdn/rule_template_replace_params.py
+++ b/src/gcore/types/cdn/rule_template_replace_params.py
@@ -869,6 +869,26 @@ class OptionsQueryStringForwarding(TypedDict, total=False):
of the streaming session.
"""
+ forward_except_keys: SequenceNotStr[str]
+ """
+ The `forward_except_keys` field provides a mechanism to exclude specific
+ parameters from being forwarded from playlist files to media chunk files. By
+ listing certain keys in this field, you can ensure that these parameters are
+ omitted during the forwarding process. This is particularly useful for
+ preventing sensitive or irrelevant information from being included in requests
+ for media chunks, thereby enhancing security and optimizing performance.
+ """
+
+ forward_only_keys: SequenceNotStr[str]
+ """
+ The `forward_only_keys` field allows for granular control over which specific
+ parameters are forwarded from playlist files to media chunk files. By specifying
+ certain keys, only those parameters will be propagated, ensuring that only
+ relevant information is passed along. This is particularly useful for security
+ and performance optimization, as it prevents unnecessary or sensitive data from
+ being included in requests for media chunks.
+ """
+
class OptionsRedirectHTTPToHTTPS(TypedDict, total=False):
enabled: Required[bool]
diff --git a/src/gcore/types/cdn/rule_template_update_params.py b/src/gcore/types/cdn/rule_template_update_params.py
index 927ca2e9..685df7a4 100644
--- a/src/gcore/types/cdn/rule_template_update_params.py
+++ b/src/gcore/types/cdn/rule_template_update_params.py
@@ -869,6 +869,26 @@ class OptionsQueryStringForwarding(TypedDict, total=False):
of the streaming session.
"""
+ forward_except_keys: SequenceNotStr[str]
+ """
+ The `forward_except_keys` field provides a mechanism to exclude specific
+ parameters from being forwarded from playlist files to media chunk files. By
+ listing certain keys in this field, you can ensure that these parameters are
+ omitted during the forwarding process. This is particularly useful for
+ preventing sensitive or irrelevant information from being included in requests
+ for media chunks, thereby enhancing security and optimizing performance.
+ """
+
+ forward_only_keys: SequenceNotStr[str]
+ """
+ The `forward_only_keys` field allows for granular control over which specific
+ parameters are forwarded from playlist files to media chunk files. By specifying
+ certain keys, only those parameters will be propagated, ensuring that only
+ relevant information is passed along. This is particularly useful for security
+ and performance optimization, as it prevents unnecessary or sensitive data from
+ being included in requests for media chunks.
+ """
+
class OptionsRedirectHTTPToHTTPS(TypedDict, total=False):
enabled: Required[bool]
diff --git a/src/gcore/types/cloud/__init__.py b/src/gcore/types/cloud/__init__.py
index 852d56df..96c25d07 100644
--- a/src/gcore/types/cloud/__init__.py
+++ b/src/gcore/types/cloud/__init__.py
@@ -160,6 +160,7 @@
from .billing_reservation_list_params import BillingReservationListParams as BillingReservationListParams
from .cost_report_get_detailed_params import CostReportGetDetailedParams as CostReportGetDetailedParams
from .reserved_fixed_ip_create_params import ReservedFixedIPCreateParams as ReservedFixedIPCreateParams
+from .reserved_fixed_ip_update_params import ReservedFixedIPUpdateParams as ReservedFixedIPUpdateParams
from .volume_attach_to_instance_params import VolumeAttachToInstanceParams as VolumeAttachToInstanceParams
from .cost_report_get_aggregated_params import CostReportGetAggregatedParams as CostReportGetAggregatedParams
from .gpu_baremetal_cluster_list_params import GPUBaremetalClusterListParams as GPUBaremetalClusterListParams
diff --git a/src/gcore/types/cloud/gpu_baremetal_clusters/gpu_baremetal_flavor.py b/src/gcore/types/cloud/gpu_baremetal_clusters/gpu_baremetal_flavor.py
index 19278108..4664d48a 100644
--- a/src/gcore/types/cloud/gpu_baremetal_clusters/gpu_baremetal_flavor.py
+++ b/src/gcore/types/cloud/gpu_baremetal_clusters/gpu_baremetal_flavor.py
@@ -46,6 +46,12 @@ class GPUBaremetalFlavorSerializerWithoutPriceHardwareProperties(BaseModel):
gpu_model: Optional[str] = None
"""GPU model"""
+ nic_eth: Optional[str] = None
+ """The configuration of the Ethernet ports"""
+
+ nic_ib: Optional[str] = None
+ """The configuration of the InfiniBand ports"""
+
class GPUBaremetalFlavorSerializerWithoutPriceSupportedFeatures(BaseModel):
security_groups: bool
@@ -101,6 +107,12 @@ class GPUBaremetalFlavorSerializerWithPricesHardwareProperties(BaseModel):
gpu_model: Optional[str] = None
"""GPU model"""
+ nic_eth: Optional[str] = None
+ """The configuration of the Ethernet ports"""
+
+ nic_ib: Optional[str] = None
+ """The configuration of the InfiniBand ports"""
+
class GPUBaremetalFlavorSerializerWithPricesPrice(BaseModel):
currency_code: Optional[str] = None
diff --git a/src/gcore/types/cloud/quota_get_all_response.py b/src/gcore/types/cloud/quota_get_all_response.py
index 7839b777..1778f75c 100644
--- a/src/gcore/types/cloud/quota_get_all_response.py
+++ b/src/gcore/types/cloud/quota_get_all_response.py
@@ -59,10 +59,10 @@ class RegionalQuota(BaseModel):
"""Basic bare metal servers count usage"""
baremetal_gpu_a100_count_limit: Optional[int] = None
- """Baremetal A100 GPU card count limit"""
+ """Bare metal A100 GPU server count limit"""
baremetal_gpu_a100_count_usage: Optional[int] = None
- """Baremetal A100 GPU card count usage"""
+ """Bare metal A100 GPU server count usage"""
baremetal_gpu_count_limit: Optional[int] = None
"""Total number of AI GPU bare metal servers.
@@ -81,22 +81,22 @@ class RegionalQuota(BaseModel):
"""
baremetal_gpu_h100_count_limit: Optional[int] = None
- """Baremetal H100 GPU card count limit"""
+ """Bare metal H100 GPU server count limit"""
baremetal_gpu_h100_count_usage: Optional[int] = None
- """Baremetal H100 GPU card count usage"""
+ """Bare metal H100 GPU server count usage"""
baremetal_gpu_h200_count_limit: Optional[int] = None
- """Baremetal H200 GPU card count limit"""
+ """Bare metal H200 GPU server count limit"""
baremetal_gpu_h200_count_usage: Optional[int] = None
- """Baremetal H200 GPU card count usage"""
+ """Bare metal H200 GPU server count usage"""
baremetal_gpu_l40s_count_limit: Optional[int] = None
- """Baremetal L40S GPU card count limit"""
+ """Bare metal L40S GPU server count limit"""
baremetal_gpu_l40s_count_usage: Optional[int] = None
- """Baremetal L40S GPU card count usage"""
+ """Bare metal L40S GPU server count usage"""
baremetal_hf_count_limit: Optional[int] = None
"""High-frequency bare metal servers count limit"""
diff --git a/src/gcore/types/cloud/quota_get_by_region_response.py b/src/gcore/types/cloud/quota_get_by_region_response.py
index c81b8e5d..aef7ba2b 100644
--- a/src/gcore/types/cloud/quota_get_by_region_response.py
+++ b/src/gcore/types/cloud/quota_get_by_region_response.py
@@ -15,10 +15,10 @@ class QuotaGetByRegionResponse(BaseModel):
"""Basic bare metal servers count usage"""
baremetal_gpu_a100_count_limit: Optional[int] = None
- """Baremetal A100 GPU card count limit"""
+ """Bare metal A100 GPU server count limit"""
baremetal_gpu_a100_count_usage: Optional[int] = None
- """Baremetal A100 GPU card count usage"""
+ """Bare metal A100 GPU server count usage"""
baremetal_gpu_count_limit: Optional[int] = None
"""Total number of AI GPU bare metal servers.
@@ -37,22 +37,22 @@ class QuotaGetByRegionResponse(BaseModel):
"""
baremetal_gpu_h100_count_limit: Optional[int] = None
- """Baremetal H100 GPU card count limit"""
+ """Bare metal H100 GPU server count limit"""
baremetal_gpu_h100_count_usage: Optional[int] = None
- """Baremetal H100 GPU card count usage"""
+ """Bare metal H100 GPU server count usage"""
baremetal_gpu_h200_count_limit: Optional[int] = None
- """Baremetal H200 GPU card count limit"""
+ """Bare metal H200 GPU server count limit"""
baremetal_gpu_h200_count_usage: Optional[int] = None
- """Baremetal H200 GPU card count usage"""
+ """Bare metal H200 GPU server count usage"""
baremetal_gpu_l40s_count_limit: Optional[int] = None
- """Baremetal L40S GPU card count limit"""
+ """Bare metal L40S GPU server count limit"""
baremetal_gpu_l40s_count_usage: Optional[int] = None
- """Baremetal L40S GPU card count usage"""
+ """Bare metal L40S GPU server count usage"""
baremetal_hf_count_limit: Optional[int] = None
"""High-frequency bare metal servers count limit"""
diff --git a/src/gcore/types/cloud/quotas/request_create_params.py b/src/gcore/types/cloud/quotas/request_create_params.py
index 09490a25..282e29ad 100644
--- a/src/gcore/types/cloud/quotas/request_create_params.py
+++ b/src/gcore/types/cloud/quotas/request_create_params.py
@@ -47,7 +47,7 @@ class RequestedLimitsRegionalLimit(TypedDict, total=False):
"""Basic bare metal servers count limit"""
baremetal_gpu_a100_count_limit: int
- """Baremetal A100 GPU card count limit"""
+ """Bare metal A100 GPU server count limit"""
baremetal_gpu_count_limit: int
"""Total number of AI GPU bare metal servers.
@@ -58,13 +58,13 @@ class RequestedLimitsRegionalLimit(TypedDict, total=False):
"""
baremetal_gpu_h100_count_limit: int
- """Baremetal H100 GPU card count limit"""
+ """Bare metal H100 GPU server count limit"""
baremetal_gpu_h200_count_limit: int
- """Baremetal H200 GPU card count limit"""
+ """Bare metal H200 GPU server count limit"""
baremetal_gpu_l40s_count_limit: int
- """Baremetal L40S GPU card count limit"""
+ """Bare metal L40S GPU server count limit"""
baremetal_hf_count_limit: int
"""High-frequency bare metal servers count limit"""
diff --git a/src/gcore/types/cloud/quotas/request_get_response.py b/src/gcore/types/cloud/quotas/request_get_response.py
index 17301847..3ac8bc47 100644
--- a/src/gcore/types/cloud/quotas/request_get_response.py
+++ b/src/gcore/types/cloud/quotas/request_get_response.py
@@ -36,7 +36,7 @@ class RequestedLimitsRegionalLimit(BaseModel):
"""Basic bare metal servers count limit"""
baremetal_gpu_a100_count_limit: Optional[int] = None
- """Baremetal A100 GPU card count limit"""
+ """Bare metal A100 GPU server count limit"""
baremetal_gpu_count_limit: Optional[int] = None
"""Total number of AI GPU bare metal servers.
@@ -47,13 +47,13 @@ class RequestedLimitsRegionalLimit(BaseModel):
"""
baremetal_gpu_h100_count_limit: Optional[int] = None
- """Baremetal H100 GPU card count limit"""
+ """Bare metal H100 GPU server count limit"""
baremetal_gpu_h200_count_limit: Optional[int] = None
- """Baremetal H200 GPU card count limit"""
+ """Bare metal H200 GPU server count limit"""
baremetal_gpu_l40s_count_limit: Optional[int] = None
- """Baremetal L40S GPU card count limit"""
+ """Bare metal L40S GPU server count limit"""
baremetal_hf_count_limit: Optional[int] = None
"""High-frequency bare metal servers count limit"""
diff --git a/src/gcore/types/cloud/quotas/request_list_response.py b/src/gcore/types/cloud/quotas/request_list_response.py
index e69e988c..971dce9b 100644
--- a/src/gcore/types/cloud/quotas/request_list_response.py
+++ b/src/gcore/types/cloud/quotas/request_list_response.py
@@ -36,7 +36,7 @@ class RequestedLimitsRegionalLimit(BaseModel):
"""Basic bare metal servers count limit"""
baremetal_gpu_a100_count_limit: Optional[int] = None
- """Baremetal A100 GPU card count limit"""
+ """Bare metal A100 GPU server count limit"""
baremetal_gpu_count_limit: Optional[int] = None
"""Total number of AI GPU bare metal servers.
@@ -47,13 +47,13 @@ class RequestedLimitsRegionalLimit(BaseModel):
"""
baremetal_gpu_h100_count_limit: Optional[int] = None
- """Baremetal H100 GPU card count limit"""
+ """Bare metal H100 GPU server count limit"""
baremetal_gpu_h200_count_limit: Optional[int] = None
- """Baremetal H200 GPU card count limit"""
+ """Bare metal H200 GPU server count limit"""
baremetal_gpu_l40s_count_limit: Optional[int] = None
- """Baremetal L40S GPU card count limit"""
+ """Bare metal L40S GPU server count limit"""
baremetal_hf_count_limit: Optional[int] = None
"""High-frequency bare metal servers count limit"""
diff --git a/src/gcore/types/cloud/reserved_fixed_ip_update_params.py b/src/gcore/types/cloud/reserved_fixed_ip_update_params.py
new file mode 100644
index 00000000..9d2bbb2d
--- /dev/null
+++ b/src/gcore/types/cloud/reserved_fixed_ip_update_params.py
@@ -0,0 +1,16 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["ReservedFixedIPUpdateParams"]
+
+
+class ReservedFixedIPUpdateParams(TypedDict, total=False):
+ project_id: int
+
+ region_id: int
+
+ is_vip: Required[bool]
+ """If reserved fixed IP should be a VIP"""
diff --git a/src/gcore/types/iam/account_overview.py b/src/gcore/types/iam/account_overview.py
index 68de5bbd..e0907b58 100644
--- a/src/gcore/types/iam/account_overview.py
+++ b/src/gcore/types/iam/account_overview.py
@@ -410,50 +410,44 @@ class User(BaseModel):
class AccountOverview(BaseModel):
- id: Optional[int] = None
+ id: int
"""The account ID."""
- bill_type: Optional[str] = None
+ bill_type: str
"""System field. Billing type of the account."""
- capabilities: Optional[List[Literal["CDN", "STORAGE", "STREAMING", "DNS", "DDOS", "CLOUD"]]] = None
+ capabilities: List[Literal["CDN", "STORAGE", "STREAMING", "DNS", "DDOS", "CLOUD"]]
"""System field. List of services available for the account."""
- company_name: Optional[str] = FieldInfo(alias="companyName", default=None)
+ company_name: str = FieldInfo(alias="companyName")
"""The company name."""
- country_code: Optional[str] = None
- """System field. The company country (ISO 3166-1 alpha-2 format)."""
-
- current_user: Optional[int] = FieldInfo(alias="currentUser", default=None)
+ current_user: int = FieldInfo(alias="currentUser")
"""ID of the current user."""
- custom_id: Optional[str] = None
- """The account custom ID."""
-
- deleted: Optional[bool] = None
+ deleted: bool
"""The field shows the status of the account:
- `true` – the account has been deleted
- `false` – the account is not deleted
"""
- email: Optional[str] = None
+ email: str
"""The account email."""
entry_base_domain: Optional[str] = FieldInfo(alias="entryBaseDomain", default=None)
"""System field. Control panel domain."""
- free_features: Optional[FreeFeatures] = FieldInfo(alias="freeFeatures", default=None)
+ free_features: FreeFeatures = FieldInfo(alias="freeFeatures")
"""
An object of arrays which contains information about free features available for
the requested account.
"""
- has_active_admin: Optional[bool] = None
+ has_active_admin: bool
"""System field."""
- is_test: Optional[bool] = None
+ is_test: bool
"""System field:
- `true` — a test account;
@@ -463,29 +457,33 @@ class AccountOverview(BaseModel):
name: Optional[str] = None
"""Name of a user who registered the requested account."""
- paid_features: Optional[PaidFeatures] = FieldInfo(alias="paidFeatures", default=None)
+ paid_features: PaidFeatures = FieldInfo(alias="paidFeatures")
"""
An object of arrays which contains information about paid features available for
the requested account.
"""
- phone: Optional[str] = None
- """Phone of a user who registered the requested account."""
-
- service_statuses: Optional[ServiceStatuses] = FieldInfo(alias="serviceStatuses", default=None)
+ service_statuses: ServiceStatuses = FieldInfo(alias="serviceStatuses")
"""
An object of arrays which contains information about all services available for
the requested account.
"""
+ status: Literal["new", "trial", "trialend", "active", "integration", "paused", "preparation", "ready"]
+ """Status of the account."""
+
+ country_code: Optional[str] = None
+ """System field. The company country (ISO 3166-1 alpha-2 format)."""
+
+ custom_id: Optional[str] = None
+ """The account custom ID."""
+
+ phone: Optional[str] = None
+ """Phone of a user who registered the requested account."""
+
signup_process: Optional[Literal["sign_up_full", "sign_up_simple"]] = None
"""System field. Type of the account registration process."""
- status: Optional[Literal["new", "trial", "trialend", "active", "integration", "paused", "preparation", "ready"]] = (
- None
- )
- """Status of the account."""
-
users: Optional[List[User]] = None
"""List of account users."""
diff --git a/src/gcore/types/iam/api_token.py b/src/gcore/types/iam/api_token.py
index c896a522..0348d230 100644
--- a/src/gcore/types/iam/api_token.py
+++ b/src/gcore/types/iam/api_token.py
@@ -25,54 +25,54 @@ class ClientUserRole(BaseModel):
class ClientUser(BaseModel):
- client_id: Optional[int] = None
+ client_id: int
"""Account's ID."""
- deleted: Optional[bool] = None
+ deleted: bool
"""Deletion flag. If true, then the API token was deleted."""
- role: Optional[ClientUserRole] = None
+ role: ClientUserRole
- user_email: Optional[str] = None
+ user_email: str
"""User's email who issued the API token."""
- user_id: Optional[int] = None
+ user_id: int
"""User's ID who issued the API token."""
- user_name: Optional[str] = None
+ user_name: str
"""User's name who issued the API token."""
class APIToken(BaseModel):
- client_user: ClientUser
-
- exp_date: str
- """
- Date when the API token becomes expired (ISO 8086/RFC 3339 format), UTC. If
- null, then the API token will never expire.
- """
-
- name: str
- """API token name."""
-
- id: Optional[int] = None
+ id: int
"""API token ID."""
- created: Optional[str] = None
+ client_user: ClientUser
+
+ created: str
"""Date when the API token was issued (ISO 8086/RFC 3339 format), UTC."""
- deleted: Optional[bool] = None
+ deleted: bool
"""Deletion flag. If true, then the API token was deleted."""
- description: Optional[str] = None
- """API token description."""
+ exp_date: Optional[str] = None
+ """
+ Date when the API token becomes expired (ISO 8086/RFC 3339 format), UTC. If
+ null, then the API token will never expire.
+ """
- expired: Optional[bool] = None
+ expired: bool
"""Expiration flag.
If true, then the API token has expired. When an API token expires it will be
automatically deleted.
"""
- last_usage: Optional[str] = None
+ last_usage: str
"""Date when the API token was last used (ISO 8086/RFC 3339 format), UTC."""
+
+ name: str
+ """API token name."""
+
+ description: Optional[str] = None
+ """API token description."""
diff --git a/src/gcore/types/iam/api_token_create_params.py b/src/gcore/types/iam/api_token_create_params.py
index dcb3f8f3..50d23678 100644
--- a/src/gcore/types/iam/api_token_create_params.py
+++ b/src/gcore/types/iam/api_token_create_params.py
@@ -2,6 +2,7 @@
from __future__ import annotations
+from typing import Optional
from typing_extensions import Literal, Required, TypedDict
__all__ = ["APITokenCreateParams", "ClientUser", "ClientUserRole"]
@@ -11,7 +12,7 @@ class APITokenCreateParams(TypedDict, total=False):
client_user: Required[ClientUser]
"""API token role."""
- exp_date: Required[str]
+ exp_date: Required[Optional[str]]
"""
Date when the API token becomes expired (ISO 8086/RFC 3339 format), UTC. If
null, then the API token will never expire.
diff --git a/src/gcore/types/iam/api_token_list.py b/src/gcore/types/iam/api_token_list.py
index 7a68232a..2bf046b6 100644
--- a/src/gcore/types/iam/api_token_list.py
+++ b/src/gcore/types/iam/api_token_list.py
@@ -25,57 +25,57 @@ class APITokenListItemClientUserRole(BaseModel):
class APITokenListItemClientUser(BaseModel):
- client_id: Optional[int] = None
+ client_id: int
"""Account's ID."""
- deleted: Optional[bool] = None
+ deleted: bool
"""Deletion flag. If true, then the API token was deleted."""
- role: Optional[APITokenListItemClientUserRole] = None
+ role: APITokenListItemClientUserRole
- user_email: Optional[str] = None
+ user_email: str
"""User's email who issued the API token."""
- user_id: Optional[int] = None
+ user_id: int
"""User's ID who issued the API token."""
- user_name: Optional[str] = None
+ user_name: str
"""User's name who issued the API token."""
class APITokenListItem(BaseModel):
- client_user: APITokenListItemClientUser
-
- exp_date: str
- """
- Date when the API token becomes expired (ISO 8086/RFC 3339 format), UTC. If
- null, then the API token will never expire.
- """
-
- name: str
- """API token name."""
-
- id: Optional[int] = None
+ id: int
"""API token ID."""
- created: Optional[str] = None
+ client_user: APITokenListItemClientUser
+
+ created: str
"""Date when the API token was issued (ISO 8086/RFC 3339 format), UTC."""
- deleted: Optional[bool] = None
+ deleted: bool
"""Deletion flag. If true, then the API token was deleted."""
- description: Optional[str] = None
- """API token description."""
+ exp_date: Optional[str] = None
+ """
+ Date when the API token becomes expired (ISO 8086/RFC 3339 format), UTC. If
+ null, then the API token will never expire.
+ """
- expired: Optional[bool] = None
+ expired: bool
"""Expiration flag.
If true, then the API token has expired. When an API token expires it will be
automatically deleted.
"""
- last_usage: Optional[str] = None
+ last_usage: str
"""Date when the API token was last used (ISO 8086/RFC 3339 format), UTC."""
+ name: str
+ """API token name."""
+
+ description: Optional[str] = None
+ """API token description."""
+
APITokenList: TypeAlias = List[APITokenListItem]
diff --git a/src/gcore/types/iam/user_detailed.py b/src/gcore/types/iam/user_detailed.py
index 15a94926..976262c5 100644
--- a/src/gcore/types/iam/user_detailed.py
+++ b/src/gcore/types/iam/user_detailed.py
@@ -37,35 +37,35 @@ class Group(BaseModel):
class UserDetailed(BaseModel):
- id: Optional[int] = None
+ id: int
"""User's ID."""
- activated: Optional[bool] = None
+ activated: bool
"""Email confirmation:
- `true` – user confirmed the email;
- `false` – user did not confirm the email.
"""
- auth_types: Optional[List[Literal["password", "sso", "github", "google-oauth2"]]] = None
+ auth_types: List[Literal["password", "sso", "github", "google-oauth2"]]
"""System field. List of auth types available for the account."""
- client: Optional[float] = None
+ client: float
"""User's account ID."""
- client_and_roles: Optional[List[ClientAndRole]] = None
+ client_and_roles: List[ClientAndRole]
"""List of user's clients. User can access to one or more clients."""
- company: Optional[str] = None
+ company: str
"""User's company."""
- deleted: Optional[bool] = None
+ deleted: bool
"""Deletion flag. If `true` then user was deleted."""
- email: Optional[str] = None
+ email: str
"""User's email address."""
- groups: Optional[List[Group]] = None
+ groups: List[Group]
"""User's group in the current account.
IAM supports 5 groups:
@@ -77,10 +77,10 @@ class UserDetailed(BaseModel):
- Purge and Prefetch only (API+Web)
"""
- is_active: Optional[bool] = None
+ is_active: bool
"""User activity flag."""
- lang: Optional[Literal["de", "en", "ru", "zh", "az"]] = None
+ lang: Literal["de", "en", "ru", "zh", "az"]
"""User's language.
Defines language of the control panel and email messages.
@@ -92,18 +92,18 @@ class UserDetailed(BaseModel):
phone: Optional[str] = None
"""User's phone."""
- reseller: Optional[int] = None
+ reseller: int
"""Services provider ID."""
- sso_auth: Optional[bool] = None
+ sso_auth: bool
"""SSO authentication flag. If `true` then user can login via SAML SSO."""
- two_fa: Optional[bool] = None
+ two_fa: bool
"""Two-step verification:
- `true` – user enabled two-step verification;
- `false` – user disabled two-step verification.
"""
- user_type: Optional[Literal["common", "reseller", "seller"]] = None
+ user_type: Literal["common", "reseller", "seller"]
"""User's type."""
diff --git a/src/gcore/types/iam/user_invite.py b/src/gcore/types/iam/user_invite.py
index 86eea011..2579f935 100644
--- a/src/gcore/types/iam/user_invite.py
+++ b/src/gcore/types/iam/user_invite.py
@@ -1,15 +1,13 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-from typing import Optional
-
from ..._models import BaseModel
__all__ = ["UserInvite"]
class UserInvite(BaseModel):
- status: Optional[str] = None
+ status: str
"""Status of the invitation."""
- user_id: Optional[int] = None
+ user_id: int
"""Invited user ID."""
diff --git a/src/gcore/types/iam/user_update.py b/src/gcore/types/iam/user_update.py
index 83b13534..b41dcd86 100644
--- a/src/gcore/types/iam/user_update.py
+++ b/src/gcore/types/iam/user_update.py
@@ -37,35 +37,35 @@ class Group(BaseModel):
class UserUpdate(BaseModel):
- id: Optional[int] = None
+ id: int
"""User's ID."""
- activated: Optional[bool] = None
+ activated: bool
"""Email confirmation:
- `true` – user confirmed the email;
- `false` – user did not confirm the email.
"""
- auth_types: Optional[List[Literal["password", "sso", "github", "google-oauth2"]]] = None
+ auth_types: List[Literal["password", "sso", "github", "google-oauth2"]]
"""System field. List of auth types available for the account."""
- client: Optional[float] = None
+ client: float
"""User's account ID."""
- client_and_roles: Optional[List[ClientAndRole]] = None
+ client_and_roles: List[ClientAndRole]
"""List of user's clients. User can access to one or more clients."""
- company: Optional[str] = None
+ company: str
"""User's company."""
- deleted: Optional[bool] = None
+ deleted: bool
"""Deletion flag. If `true` then user was deleted."""
- email: Optional[str] = None
+ email: str
"""User's email address."""
- groups: Optional[List[Group]] = None
+ groups: List[Group]
"""User's group in the current account.
IAM supports 5 groups:
@@ -77,10 +77,10 @@ class UserUpdate(BaseModel):
- Purge and Prefetch only (API+Web)
"""
- is_active: Optional[bool] = None
+ is_active: bool
"""User activity flag."""
- lang: Optional[Literal["de", "en", "ru", "zh", "az"]] = None
+ lang: Literal["de", "en", "ru", "zh", "az"]
"""User's language.
Defines language of the control panel and email messages.
@@ -92,18 +92,18 @@ class UserUpdate(BaseModel):
phone: Optional[str] = None
"""User's phone."""
- reseller: Optional[int] = None
+ reseller: int
"""Services provider ID."""
- sso_auth: Optional[bool] = None
+ sso_auth: bool
"""SSO authentication flag. If `true` then user can login via SAML SSO."""
- two_fa: Optional[bool] = None
+ two_fa: bool
"""Two-step verification:
- `true` – user enabled two-step verification;
- `false` – user disabled two-step verification.
"""
- user_type: Optional[Literal["common", "reseller", "seller"]] = None
+ user_type: Literal["common", "reseller", "seller"]
"""User's type."""
diff --git a/tests/api_resources/cdn/resources/test_rules.py b/tests/api_resources/cdn/resources/test_rules.py
index fbb097c3..9fb7c8b6 100644
--- a/tests/api_resources/cdn/resources/test_rules.py
+++ b/tests/api_resources/cdn/resources/test_rules.py
@@ -211,6 +211,8 @@ def test_method_create_with_all_params(self, client: Gcore) -> None:
"enabled": True,
"forward_from_file_types": ["m3u8", "mpd"],
"forward_to_file_types": ["ts", "mp4"],
+ "forward_except_keys": ["debug_info"],
+ "forward_only_keys": ["auth_token", "session_id"],
},
"redirect_http_to_https": {
"enabled": True,
@@ -522,6 +524,8 @@ def test_method_update_with_all_params(self, client: Gcore) -> None:
"enabled": True,
"forward_from_file_types": ["m3u8", "mpd"],
"forward_to_file_types": ["ts", "mp4"],
+ "forward_except_keys": ["debug_info"],
+ "forward_only_keys": ["auth_token", "session_id"],
},
"redirect_http_to_https": {
"enabled": True,
@@ -934,6 +938,8 @@ def test_method_replace_with_all_params(self, client: Gcore) -> None:
"enabled": True,
"forward_from_file_types": ["m3u8", "mpd"],
"forward_to_file_types": ["ts", "mp4"],
+ "forward_except_keys": ["debug_info"],
+ "forward_only_keys": ["auth_token", "session_id"],
},
"redirect_http_to_https": {
"enabled": True,
@@ -1254,6 +1260,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncGcore) ->
"enabled": True,
"forward_from_file_types": ["m3u8", "mpd"],
"forward_to_file_types": ["ts", "mp4"],
+ "forward_except_keys": ["debug_info"],
+ "forward_only_keys": ["auth_token", "session_id"],
},
"redirect_http_to_https": {
"enabled": True,
@@ -1565,6 +1573,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncGcore) ->
"enabled": True,
"forward_from_file_types": ["m3u8", "mpd"],
"forward_to_file_types": ["ts", "mp4"],
+ "forward_except_keys": ["debug_info"],
+ "forward_only_keys": ["auth_token", "session_id"],
},
"redirect_http_to_https": {
"enabled": True,
@@ -1977,6 +1987,8 @@ async def test_method_replace_with_all_params(self, async_client: AsyncGcore) ->
"enabled": True,
"forward_from_file_types": ["m3u8", "mpd"],
"forward_to_file_types": ["ts", "mp4"],
+ "forward_except_keys": ["debug_info"],
+ "forward_only_keys": ["auth_token", "session_id"],
},
"redirect_http_to_https": {
"enabled": True,
diff --git a/tests/api_resources/cdn/test_resources.py b/tests/api_resources/cdn/test_resources.py
index 1f5c43bb..97602ddc 100644
--- a/tests/api_resources/cdn/test_resources.py
+++ b/tests/api_resources/cdn/test_resources.py
@@ -215,6 +215,8 @@ def test_method_create_with_all_params(self, client: Gcore) -> None:
"enabled": True,
"forward_from_file_types": ["m3u8", "mpd"],
"forward_to_file_types": ["ts", "mp4"],
+ "forward_except_keys": ["debug_info"],
+ "forward_only_keys": ["auth_token", "session_id"],
},
"redirect_http_to_https": {
"enabled": True,
@@ -551,6 +553,8 @@ def test_method_update_with_all_params(self, client: Gcore) -> None:
"enabled": True,
"forward_from_file_types": ["m3u8", "mpd"],
"forward_to_file_types": ["ts", "mp4"],
+ "forward_except_keys": ["debug_info"],
+ "forward_only_keys": ["auth_token", "session_id"],
},
"redirect_http_to_https": {
"enabled": True,
@@ -1175,6 +1179,8 @@ def test_method_replace_with_all_params(self, client: Gcore) -> None:
"enabled": True,
"forward_from_file_types": ["m3u8", "mpd"],
"forward_to_file_types": ["ts", "mp4"],
+ "forward_except_keys": ["debug_info"],
+ "forward_only_keys": ["auth_token", "session_id"],
},
"redirect_http_to_https": {
"enabled": True,
@@ -1516,6 +1522,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncGcore) ->
"enabled": True,
"forward_from_file_types": ["m3u8", "mpd"],
"forward_to_file_types": ["ts", "mp4"],
+ "forward_except_keys": ["debug_info"],
+ "forward_only_keys": ["auth_token", "session_id"],
},
"redirect_http_to_https": {
"enabled": True,
@@ -1852,6 +1860,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncGcore) ->
"enabled": True,
"forward_from_file_types": ["m3u8", "mpd"],
"forward_to_file_types": ["ts", "mp4"],
+ "forward_except_keys": ["debug_info"],
+ "forward_only_keys": ["auth_token", "session_id"],
},
"redirect_http_to_https": {
"enabled": True,
@@ -2476,6 +2486,8 @@ async def test_method_replace_with_all_params(self, async_client: AsyncGcore) ->
"enabled": True,
"forward_from_file_types": ["m3u8", "mpd"],
"forward_to_file_types": ["ts", "mp4"],
+ "forward_except_keys": ["debug_info"],
+ "forward_only_keys": ["auth_token", "session_id"],
},
"redirect_http_to_https": {
"enabled": True,
diff --git a/tests/api_resources/cdn/test_rule_templates.py b/tests/api_resources/cdn/test_rule_templates.py
index 7f1d616d..3ef7dd05 100644
--- a/tests/api_resources/cdn/test_rule_templates.py
+++ b/tests/api_resources/cdn/test_rule_templates.py
@@ -207,6 +207,8 @@ def test_method_create_with_all_params(self, client: Gcore) -> None:
"enabled": True,
"forward_from_file_types": ["m3u8", "mpd"],
"forward_to_file_types": ["ts", "mp4"],
+ "forward_except_keys": ["debug_info"],
+ "forward_only_keys": ["auth_token", "session_id"],
},
"redirect_http_to_https": {
"enabled": True,
@@ -510,6 +512,8 @@ def test_method_update_with_all_params(self, client: Gcore) -> None:
"enabled": True,
"forward_from_file_types": ["m3u8", "mpd"],
"forward_to_file_types": ["ts", "mp4"],
+ "forward_except_keys": ["debug_info"],
+ "forward_only_keys": ["auth_token", "session_id"],
},
"redirect_http_to_https": {
"enabled": True,
@@ -904,6 +908,8 @@ def test_method_replace_with_all_params(self, client: Gcore) -> None:
"enabled": True,
"forward_from_file_types": ["m3u8", "mpd"],
"forward_to_file_types": ["ts", "mp4"],
+ "forward_except_keys": ["debug_info"],
+ "forward_only_keys": ["auth_token", "session_id"],
},
"redirect_http_to_https": {
"enabled": True,
@@ -1217,6 +1223,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncGcore) ->
"enabled": True,
"forward_from_file_types": ["m3u8", "mpd"],
"forward_to_file_types": ["ts", "mp4"],
+ "forward_except_keys": ["debug_info"],
+ "forward_only_keys": ["auth_token", "session_id"],
},
"redirect_http_to_https": {
"enabled": True,
@@ -1520,6 +1528,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncGcore) ->
"enabled": True,
"forward_from_file_types": ["m3u8", "mpd"],
"forward_to_file_types": ["ts", "mp4"],
+ "forward_except_keys": ["debug_info"],
+ "forward_only_keys": ["auth_token", "session_id"],
},
"redirect_http_to_https": {
"enabled": True,
@@ -1914,6 +1924,8 @@ async def test_method_replace_with_all_params(self, async_client: AsyncGcore) ->
"enabled": True,
"forward_from_file_types": ["m3u8", "mpd"],
"forward_to_file_types": ["ts", "mp4"],
+ "forward_except_keys": ["debug_info"],
+ "forward_only_keys": ["auth_token", "session_id"],
},
"redirect_http_to_https": {
"enabled": True,
diff --git a/tests/api_resources/cloud/networks/test_subnets.py b/tests/api_resources/cloud/networks/test_subnets.py
index 0680b1f7..8ba4ff6f 100644
--- a/tests/api_resources/cloud/networks/test_subnets.py
+++ b/tests/api_resources/cloud/networks/test_subnets.py
@@ -206,7 +206,7 @@ def test_method_delete(self, client: Gcore) -> None:
project_id=1,
region_id=1,
)
- assert subnet is None
+ assert_matches_type(TaskIDList, subnet, path=["response"])
@parametrize
def test_raw_response_delete(self, client: Gcore) -> None:
@@ -219,7 +219,7 @@ def test_raw_response_delete(self, client: Gcore) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subnet = response.parse()
- assert subnet is None
+ assert_matches_type(TaskIDList, subnet, path=["response"])
@parametrize
def test_streaming_response_delete(self, client: Gcore) -> None:
@@ -232,7 +232,7 @@ def test_streaming_response_delete(self, client: Gcore) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subnet = response.parse()
- assert subnet is None
+ assert_matches_type(TaskIDList, subnet, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -485,7 +485,7 @@ async def test_method_delete(self, async_client: AsyncGcore) -> None:
project_id=1,
region_id=1,
)
- assert subnet is None
+ assert_matches_type(TaskIDList, subnet, path=["response"])
@parametrize
async def test_raw_response_delete(self, async_client: AsyncGcore) -> None:
@@ -498,7 +498,7 @@ async def test_raw_response_delete(self, async_client: AsyncGcore) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subnet = await response.parse()
- assert subnet is None
+ assert_matches_type(TaskIDList, subnet, path=["response"])
@parametrize
async def test_streaming_response_delete(self, async_client: AsyncGcore) -> None:
@@ -511,7 +511,7 @@ async def test_streaming_response_delete(self, async_client: AsyncGcore) -> None
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
subnet = await response.parse()
- assert subnet is None
+ assert_matches_type(TaskIDList, subnet, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/cloud/test_reserved_fixed_ips.py b/tests/api_resources/cloud/test_reserved_fixed_ips.py
index 3f321ace..21a89074 100644
--- a/tests/api_resources/cloud/test_reserved_fixed_ips.py
+++ b/tests/api_resources/cloud/test_reserved_fixed_ips.py
@@ -267,6 +267,56 @@ def test_streaming_response_create_overload_5(self, client: Gcore) -> None:
assert cast(Any, response.is_closed) is True
+ @parametrize
+ def test_method_update(self, client: Gcore) -> None:
+ reserved_fixed_ip = client.cloud.reserved_fixed_ips.update(
+ port_id="port_id",
+ project_id=0,
+ region_id=0,
+ is_vip=True,
+ )
+ assert_matches_type(ReservedFixedIP, reserved_fixed_ip, path=["response"])
+
+ @parametrize
+ def test_raw_response_update(self, client: Gcore) -> None:
+ response = client.cloud.reserved_fixed_ips.with_raw_response.update(
+ port_id="port_id",
+ project_id=0,
+ region_id=0,
+ is_vip=True,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ reserved_fixed_ip = response.parse()
+ assert_matches_type(ReservedFixedIP, reserved_fixed_ip, path=["response"])
+
+ @parametrize
+ def test_streaming_response_update(self, client: Gcore) -> None:
+ with client.cloud.reserved_fixed_ips.with_streaming_response.update(
+ port_id="port_id",
+ project_id=0,
+ region_id=0,
+ is_vip=True,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ reserved_fixed_ip = response.parse()
+ assert_matches_type(ReservedFixedIP, reserved_fixed_ip, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_update(self, client: Gcore) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `port_id` but received ''"):
+ client.cloud.reserved_fixed_ips.with_raw_response.update(
+ port_id="",
+ project_id=0,
+ region_id=0,
+ is_vip=True,
+ )
+
@parametrize
def test_method_list(self, client: Gcore) -> None:
reserved_fixed_ip = client.cloud.reserved_fixed_ips.list(
@@ -662,6 +712,56 @@ async def test_streaming_response_create_overload_5(self, async_client: AsyncGco
assert cast(Any, response.is_closed) is True
+ @parametrize
+ async def test_method_update(self, async_client: AsyncGcore) -> None:
+ reserved_fixed_ip = await async_client.cloud.reserved_fixed_ips.update(
+ port_id="port_id",
+ project_id=0,
+ region_id=0,
+ is_vip=True,
+ )
+ assert_matches_type(ReservedFixedIP, reserved_fixed_ip, path=["response"])
+
+ @parametrize
+ async def test_raw_response_update(self, async_client: AsyncGcore) -> None:
+ response = await async_client.cloud.reserved_fixed_ips.with_raw_response.update(
+ port_id="port_id",
+ project_id=0,
+ region_id=0,
+ is_vip=True,
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ reserved_fixed_ip = await response.parse()
+ assert_matches_type(ReservedFixedIP, reserved_fixed_ip, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_update(self, async_client: AsyncGcore) -> None:
+ async with async_client.cloud.reserved_fixed_ips.with_streaming_response.update(
+ port_id="port_id",
+ project_id=0,
+ region_id=0,
+ is_vip=True,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ reserved_fixed_ip = await response.parse()
+ assert_matches_type(ReservedFixedIP, reserved_fixed_ip, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_update(self, async_client: AsyncGcore) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `port_id` but received ''"):
+ await async_client.cloud.reserved_fixed_ips.with_raw_response.update(
+ port_id="",
+ project_id=0,
+ region_id=0,
+ is_vip=True,
+ )
+
@parametrize
async def test_method_list(self, async_client: AsyncGcore) -> None:
reserved_fixed_ip = await async_client.cloud.reserved_fixed_ips.list(