diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index b8dda9bf..554e34bb 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.29.0"
+ ".": "0.30.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 70d5bc3d..f6bc2e9b 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-3fc43b72b82321f8d4ceea9ea44d7ab14e75872dbe66e3e698e1f59ba300ec55.yml
-openapi_spec_hash: 1b1043a0ef7bcf106abf14f9187f5755
-config_hash: 7085751e6bd8f3fd13cfebe04bb99fed
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-2d64161889a53046ca5e593a772328a5290246c3d74f8c07fed1037feae1bdbc.yml
+openapi_spec_hash: 2360d25764d74e6972cf600fcd20fd4e
+config_hash: e9e5b750687e9071d8b606963f0ffd6d
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e4b5a07b..1511c56c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,22 @@
# Changelog
+## 0.30.0 (2026-01-22)
+
+Full Changelog: [v0.29.0...v0.30.0](https://github.com/G-Core/gcore-python/compare/v0.29.0...v0.30.0)
+
+### ⚠ BREAKING CHANGES
+
+* **cloud:** use create and update v2 endpoints for security groups
+* **cloud:** use v2 endpoint for floating IPs updates
+
+### Features
+
+* **api:** aggregated API specs update ([fa26406](https://github.com/G-Core/gcore-python/commit/fa264060cead49f546830f072683f4cd06f3351e))
+* **cloud:** add create_and_poll and update_and_poll methods for security groups ([a0f8a75](https://github.com/G-Core/gcore-python/commit/a0f8a759796951e084b318e91a95ba413fa3b349))
+* **cloud:** add update_and_poll method for floating IPs ([26bfe18](https://github.com/G-Core/gcore-python/commit/26bfe184ecda853f88b7ba13f4eb4f2153237a7b))
+* **cloud:** use create and update v2 endpoints for security groups ([31501d3](https://github.com/G-Core/gcore-python/commit/31501d36608339851da4b8982bb32bf18a7518cb))
+* **cloud:** use v2 endpoint for floating IPs updates ([31ef098](https://github.com/G-Core/gcore-python/commit/31ef0984768bca7f1aa8b2fa5eb8249fca7af36f))
+
## 0.29.0 (2026-01-19)
Full Changelog: [v0.28.0...v0.29.0](https://github.com/G-Core/gcore-python/compare/v0.28.0...v0.29.0)
diff --git a/api.md b/api.md
index a877e26b..4184baed 100644
--- a/api.md
+++ b/api.md
@@ -414,7 +414,7 @@ from gcore.types.cloud import FloatingIPDetailed
Methods:
- client.cloud.floating_ips.create(\*, project_id, region_id, \*\*params) -> TaskIDList
-- client.cloud.floating_ips.update(floating_ip_id, \*, project_id, region_id, \*\*params) -> FloatingIP
+- client.cloud.floating_ips.update(floating_ip_id, \*, project_id, region_id, \*\*params) -> TaskIDList
- client.cloud.floating_ips.list(\*, project_id, region_id, \*\*params) -> SyncOffsetPage[FloatingIPDetailed]
- client.cloud.floating_ips.delete(floating_ip_id, \*, project_id, region_id) -> TaskIDList
- client.cloud.floating_ips.assign(floating_ip_id, \*, project_id, region_id, \*\*params) -> FloatingIP
@@ -431,8 +431,8 @@ from gcore.types.cloud import SecurityGroup, SecurityGroupRule
Methods:
-- client.cloud.security_groups.create(\*, project_id, region_id, \*\*params) -> SecurityGroup
-- client.cloud.security_groups.update(group_id, \*, project_id, region_id, \*\*params) -> SecurityGroup
+- client.cloud.security_groups.create(\*, project_id, region_id, \*\*params) -> TaskIDList
+- client.cloud.security_groups.update(group_id, \*, project_id, region_id, \*\*params) -> TaskIDList
- client.cloud.security_groups.list(\*, project_id, region_id, \*\*params) -> SyncOffsetPage[SecurityGroup]
- client.cloud.security_groups.delete(group_id, \*, project_id, region_id) -> None
- client.cloud.security_groups.copy(group_id, \*, project_id, region_id, \*\*params) -> SecurityGroup
diff --git a/examples/cloud/floating_ips.py b/examples/cloud/floating_ips.py
index a2b44c48..8cf9ba33 100644
--- a/examples/cloud/floating_ips.py
+++ b/examples/cloud/floating_ips.py
@@ -26,6 +26,7 @@ def main() -> None:
floating_ip_id = create_floating_ip(client=gcore)
list_floating_ips(client=gcore)
get_floating_ip(client=gcore, floating_ip_id=floating_ip_id)
+ update_tags_floating_ip(client=gcore, floating_ip_id=floating_ip_id)
assign_floating_ip(client=gcore, floating_ip_id=floating_ip_id, port_id=cloud_port_id)
unassign_floating_ip(client=gcore, floating_ip_id=floating_ip_id)
delete_floating_ip(client=gcore, floating_ip_id=floating_ip_id)
@@ -33,7 +34,7 @@ def main() -> None:
def create_floating_ip(*, client: Gcore) -> str:
print("\n=== CREATE FLOATING IP ===")
- floating_ip = client.cloud.floating_ips.create_and_poll(tags={"name": "gcore-go-example"})
+ floating_ip = client.cloud.floating_ips.create_and_poll(tags={"name": "gcore-gython-example"})
print(f"Created Floating IP: ID={floating_ip.id}")
print("========================")
return floating_ip.id
@@ -58,9 +59,19 @@ def get_floating_ip(*, client: Gcore, floating_ip_id: str) -> None:
print("========================")
+def update_tags_floating_ip(*, client: Gcore, floating_ip_id: str) -> None:
+ print("\n=== UPDATE TAGS FLOATING IP ===")
+ floating_ip = client.cloud.floating_ips.update_and_poll(
+ floating_ip_id=floating_ip_id,
+ tags={"environment": "production", "team": "backend"},
+ )
+ print(f"Updated floating IP tags: ID={floating_ip.id}, tags={floating_ip.tags}")
+ print("========================")
+
+
def assign_floating_ip(*, client: Gcore, floating_ip_id: str, port_id: str) -> None:
print("\n=== ASSIGN FLOATING IP ===")
- floating_ip = client.cloud.floating_ips.assign( # pyright: ignore[reportDeprecated]
+ floating_ip = client.cloud.floating_ips.update_and_poll(
floating_ip_id=floating_ip_id,
port_id=port_id,
)
@@ -70,7 +81,10 @@ def assign_floating_ip(*, client: Gcore, floating_ip_id: str, port_id: str) -> N
def unassign_floating_ip(*, client: Gcore, floating_ip_id: str) -> None:
print("\n=== UNASSIGN FLOATING IP ===")
- floating_ip = client.cloud.floating_ips.unassign(floating_ip_id=floating_ip_id) # pyright: ignore[reportDeprecated]
+ floating_ip = client.cloud.floating_ips.update_and_poll(
+ floating_ip_id=floating_ip_id,
+ port_id=None,
+ )
print(f"Unassigned floating IP: ID={floating_ip.id}")
print("========================")
diff --git a/examples/cloud/floating_ips_async.py b/examples/cloud/floating_ips_async.py
index aea3370e..7fc4d467 100644
--- a/examples/cloud/floating_ips_async.py
+++ b/examples/cloud/floating_ips_async.py
@@ -27,6 +27,7 @@ async def main() -> None:
floating_ip_id = await create_floating_ip(client=gcore)
await list_floating_ips(client=gcore)
await get_floating_ip(client=gcore, floating_ip_id=floating_ip_id)
+ await update_tags_floating_ip(client=gcore, floating_ip_id=floating_ip_id)
await assign_floating_ip(client=gcore, floating_ip_id=floating_ip_id, port_id=cloud_port_id)
await unassign_floating_ip(client=gcore, floating_ip_id=floating_ip_id)
await delete_floating_ip(client=gcore, floating_ip_id=floating_ip_id)
@@ -34,7 +35,7 @@ async def main() -> None:
async def create_floating_ip(*, client: AsyncGcore) -> str:
print("\n=== CREATE FLOATING IP ===")
- floating_ip = await client.cloud.floating_ips.create_and_poll(tags={"name": "gcore-go-example"})
+ floating_ip = await client.cloud.floating_ips.create_and_poll(tags={"name": "gcore-python-example"})
print(f"Created floating IP: ID={floating_ip.id}")
print("========================")
return floating_ip.id
@@ -58,9 +59,19 @@ async def get_floating_ip(*, client: AsyncGcore, floating_ip_id: str) -> None:
print("========================")
+async def update_tags_floating_ip(*, client: AsyncGcore, floating_ip_id: str) -> None:
+ print("\n=== UPDATE TAGS FLOATING IP ===")
+ floating_ip = await client.cloud.floating_ips.update_and_poll(
+ floating_ip_id=floating_ip_id,
+ tags={"environment": "production", "team": "backend"},
+ )
+ print(f"Updated floating IP tags: ID={floating_ip.id}, tags={floating_ip.tags}")
+ print("========================")
+
+
async def assign_floating_ip(*, client: AsyncGcore, floating_ip_id: str, port_id: str) -> None:
print("\n=== ASSIGN FLOATING IP ===")
- floating_ip = await client.cloud.floating_ips.assign( # pyright: ignore[reportDeprecated]
+ floating_ip = await client.cloud.floating_ips.update_and_poll(
floating_ip_id=floating_ip_id,
port_id=port_id,
)
@@ -70,7 +81,10 @@ async def assign_floating_ip(*, client: AsyncGcore, floating_ip_id: str, port_id
async def unassign_floating_ip(*, client: AsyncGcore, floating_ip_id: str) -> None:
print("\n=== UNASSIGN FLOATING IP ===")
- floating_ip = await client.cloud.floating_ips.unassign(floating_ip_id=floating_ip_id) # pyright: ignore[reportDeprecated]
+ floating_ip = await client.cloud.floating_ips.update_and_poll(
+ floating_ip_id=floating_ip_id,
+ port_id=None,
+ )
print(f"Unassigned floating IP: ID={floating_ip.id}")
print("========================")
diff --git a/examples/cloud/security_groups.py b/examples/cloud/security_groups.py
index 9d46c6df..6188d57e 100644
--- a/examples/cloud/security_groups.py
+++ b/examples/cloud/security_groups.py
@@ -1,5 +1,4 @@
from gcore import Gcore
-from gcore.types.cloud.security_group_create_params import SecurityGroup
def main() -> None:
@@ -20,6 +19,7 @@ def main() -> None:
security_group_id = create_security_group(client=gcore)
list_security_groups(client=gcore)
get_security_group(client=gcore, security_group_id=security_group_id)
+ update_tags_security_group(client=gcore, security_group_id=security_group_id)
update_security_group(client=gcore, security_group_id=security_group_id)
# Rules
@@ -32,7 +32,10 @@ def main() -> None:
def create_security_group(*, client: Gcore) -> str:
print("\n=== CREATE SECURITY GROUP ===")
- security_group = client.cloud.security_groups.create(security_group=SecurityGroup(name="gcore-go-example")) # pyright: ignore[reportDeprecated]
+ security_group = client.cloud.security_groups.create_and_poll(
+ name="gcore-python-example",
+ tags={"environment": "development"},
+ )
print(f"Created security group: ID={security_group.id}, name={security_group.name}")
print("========================")
return security_group.id
@@ -55,11 +58,21 @@ def get_security_group(*, client: Gcore, security_group_id: str) -> None:
print("========================")
+def update_tags_security_group(*, client: Gcore, security_group_id: str) -> None:
+ print("\n=== UPDATE TAGS SECURITY GROUP ===")
+ security_group = client.cloud.security_groups.update_and_poll(
+ group_id=security_group_id,
+ tags={"environment": "production", "team": "backend"},
+ )
+ print(f"Updated security group tags: ID={security_group.id}, tags={security_group.tags_v2}")
+ print("========================")
+
+
def update_security_group(*, client: Gcore, security_group_id: str) -> None:
print("\n=== UPDATE SECURITY GROUP ===")
- security_group = client.cloud.security_groups.update( # pyright: ignore[reportDeprecated]
+ security_group = client.cloud.security_groups.update_and_poll(
group_id=security_group_id,
- name="gcore-go-example-updated",
+ name="gcore-python-example-updated",
)
print(f"Updated security group: ID={security_group.id}, name={security_group.name}")
print("========================")
diff --git a/examples/cloud/security_groups_async.py b/examples/cloud/security_groups_async.py
index 543cba84..29ed42ad 100644
--- a/examples/cloud/security_groups_async.py
+++ b/examples/cloud/security_groups_async.py
@@ -1,7 +1,6 @@
import asyncio
from gcore import AsyncGcore
-from gcore.types.cloud.security_group_create_params import SecurityGroup
async def main() -> None:
@@ -22,6 +21,7 @@ async def main() -> None:
security_group_id = await create_security_group(client=gcore)
await list_security_groups(client=gcore)
await get_security_group(client=gcore, security_group_id=security_group_id)
+ await update_tags_security_group(client=gcore, security_group_id=security_group_id)
await update_security_group(client=gcore, security_group_id=security_group_id)
# Rules
@@ -34,7 +34,10 @@ async def main() -> None:
async def create_security_group(client: AsyncGcore) -> str:
print("\n=== CREATE SECURITY GROUP ===")
- security_group = await client.cloud.security_groups.create(security_group=SecurityGroup(name="gcore-go-example")) # pyright: ignore[reportDeprecated]
+ security_group = await client.cloud.security_groups.create_and_poll(
+ name="gcore-python-example",
+ tags={"environment": "development"},
+ )
print(f"Created security group: ID={security_group.id}, name={security_group.name}")
print("========================")
return security_group.id
@@ -42,9 +45,8 @@ async def create_security_group(client: AsyncGcore) -> str:
async def list_security_groups(*, client: AsyncGcore) -> None:
print("\n=== LIST SECURITY GROUPS ===")
- security_groups = await client.cloud.security_groups.list()
count = 0
- async for security_group in security_groups:
+ async for security_group in client.cloud.security_groups.list():
count += 1
print(f"{count}. Security group: ID={security_group.id}, name={security_group.name}")
print("========================")
@@ -59,11 +61,21 @@ async def get_security_group(*, client: AsyncGcore, security_group_id: str) -> N
print("========================")
+async def update_tags_security_group(*, client: AsyncGcore, security_group_id: str) -> None:
+ print("\n=== UPDATE TAGS SECURITY GROUP ===")
+ security_group = await client.cloud.security_groups.update_and_poll(
+ group_id=security_group_id,
+ tags={"environment": "production", "team": "backend"},
+ )
+ print(f"Updated security group tags: ID={security_group.id}, tags={security_group.tags_v2}")
+ print("========================")
+
+
async def update_security_group(*, client: AsyncGcore, security_group_id: str) -> None:
print("\n=== UPDATE SECURITY GROUP ===")
- security_group = await client.cloud.security_groups.update( # pyright: ignore[reportDeprecated]
+ security_group = await client.cloud.security_groups.update_and_poll(
group_id=security_group_id,
- name="gcore-go-example-updated",
+ name="gcore-python-example-updated",
)
print(f"Updated security group: ID={security_group.id}, name={security_group.name}")
print("========================")
diff --git a/pyproject.toml b/pyproject.toml
index 89661fbe..26af6423 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "gcore"
-version = "0.29.0"
+version = "0.30.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 606d0626..574d5dd3 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.29.0" # x-release-please-version
+__version__ = "0.30.0" # x-release-please-version
diff --git a/src/gcore/resources/cdn/resources/resources.py b/src/gcore/resources/cdn/resources/resources.py
index 1757c8f3..2ceda584 100644
--- a/src/gcore/resources/cdn/resources/resources.py
+++ b/src/gcore/resources/cdn/resources/resources.py
@@ -684,14 +684,14 @@ def purge(
the CDN cache, purge by URL will delete only the first slice (with bytes=0…
.)
3. "ignoreQueryString" is used. Don’t specify parameters in the purge request.
- 4. "`query_params_blacklist`" is used. Only files with the listed in the option
+ 4. "query_params_blacklist" is used. Only files with the listed in the option
parameters will be cached as different objects. Files with other parameters
will be cached as one object. In this case, specify the listed parameters in
the Purge request. Don't specify other parameters.
- 5. "`query_params_whitelist`" is used. Files with listed in the option
- parameters will be cached as one object. Files with other parameters will be
- cached as different objects. In this case, specify other parameters (if any)
- besides the ones listed in the purge request.
+ 5. "query_params_whitelist" is used. Files with listed in the option parameters
+ will be cached as one object. Files with other parameters will be cached as
+ different objects. In this case, specify other parameters (if any) besides
+ the ones listed in the purge request.
extra_headers: Send extra headers
@@ -1594,14 +1594,14 @@ async def purge(
the CDN cache, purge by URL will delete only the first slice (with bytes=0…
.)
3. "ignoreQueryString" is used. Don’t specify parameters in the purge request.
- 4. "`query_params_blacklist`" is used. Only files with the listed in the option
+ 4. "query_params_blacklist" is used. Only files with the listed in the option
parameters will be cached as different objects. Files with other parameters
will be cached as one object. In this case, specify the listed parameters in
the Purge request. Don't specify other parameters.
- 5. "`query_params_whitelist`" is used. Files with listed in the option
- parameters will be cached as one object. Files with other parameters will be
- cached as different objects. In this case, specify other parameters (if any)
- besides the ones listed in the purge request.
+ 5. "query_params_whitelist" is used. Files with listed in the option parameters
+ will be cached as one object. Files with other parameters will be cached as
+ different objects. In this case, specify other parameters (if any) besides
+ the ones listed in the purge request.
extra_headers: Send extra headers
diff --git a/src/gcore/resources/cloud/audit_logs.py b/src/gcore/resources/cloud/audit_logs.py
index f47fa720..bca05f96 100644
--- a/src/gcore/resources/cloud/audit_logs.py
+++ b/src/gcore/resources/cloud/audit_logs.py
@@ -192,8 +192,8 @@ def list(
search_field: Extra search field for common object properties such as name, IP address, or
other, depending on the `resource_type`
- sorting: (DEPRECATED Use '`order_by`' instead) Sorting by timestamp. Oldest first, or
- most recent first
+ sorting: (DEPRECATED Use 'order_by' instead) Sorting by timestamp. Oldest first, or most
+ recent first
source_user_ips: Originating IP address of the client making the request. Several options can be
specified.
@@ -410,8 +410,8 @@ def list(
search_field: Extra search field for common object properties such as name, IP address, or
other, depending on the `resource_type`
- sorting: (DEPRECATED Use '`order_by`' instead) Sorting by timestamp. Oldest first, or
- most recent first
+ sorting: (DEPRECATED Use 'order_by' instead) Sorting by timestamp. Oldest first, or most
+ recent first
source_user_ips: Originating IP address of the client making the request. Several options can be
specified.
diff --git a/src/gcore/resources/cloud/baremetal/servers.py b/src/gcore/resources/cloud/baremetal/servers.py
index b8be6814..ae77f521 100644
--- a/src/gcore/resources/cloud/baremetal/servers.py
+++ b/src/gcore/resources/cloud/baremetal/servers.py
@@ -127,8 +127,8 @@ def create(
When only 'password' is provided, it is set as the password for the default user
of the image. For Windows instances, 'username' cannot be specified. Use the
'password' field to set the password for the 'Admin' user on Windows. Use the
- '`user_data`' field to provide a script to create new users on Windows. The
- password of the Admin user cannot be updated via '`user_data`'.
+ 'user_data' field to provide a script to create new users on Windows. The
+ password of the Admin user cannot be updated via 'user_data'.
ssh_key_name: 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).
@@ -140,9 +140,9 @@ def create(
user. Tags are also integrated with cost reports, allowing cost data to be
filtered based on tag keys or values.
- user_data: String in base64 format. For Linux instances, '`user_data`' is ignored when
+ user_data: String in base64 format. For Linux instances, 'user_data' is ignored when
'password' field is provided. For Windows instances, Admin user password is set
- by 'password' field and cannot be updated via '`user_data`'. Examples of the
+ by 'password' field and cannot be updated via 'user_data'. Examples of the
`user_data`: https://cloudinit.readthedocs.io/en/latest/topics/examples.html
username: For Linux instances, 'username' and 'password' are used to create a new user.
@@ -619,8 +619,8 @@ async def create(
When only 'password' is provided, it is set as the password for the default user
of the image. For Windows instances, 'username' cannot be specified. Use the
'password' field to set the password for the 'Admin' user on Windows. Use the
- '`user_data`' field to provide a script to create new users on Windows. The
- password of the Admin user cannot be updated via '`user_data`'.
+ 'user_data' field to provide a script to create new users on Windows. The
+ password of the Admin user cannot be updated via 'user_data'.
ssh_key_name: 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).
@@ -632,9 +632,9 @@ async def create(
user. Tags are also integrated with cost reports, allowing cost data to be
filtered based on tag keys or values.
- user_data: String in base64 format. For Linux instances, '`user_data`' is ignored when
+ user_data: String in base64 format. For Linux instances, 'user_data' is ignored when
'password' field is provided. For Windows instances, Admin user password is set
- by 'password' field and cannot be updated via '`user_data`'. Examples of the
+ by 'password' field and cannot be updated via 'user_data'. Examples of the
`user_data`: https://cloudinit.readthedocs.io/en/latest/topics/examples.html
username: For Linux instances, 'username' and 'password' are used to create a new user.
diff --git a/src/gcore/resources/cloud/billing_reservations.py b/src/gcore/resources/cloud/billing_reservations.py
index 12ea8829..1ea0a26c 100644
--- a/src/gcore/resources/cloud/billing_reservations.py
+++ b/src/gcore/resources/cloud/billing_reservations.py
@@ -62,7 +62,7 @@ def list(
configurations and associated pricing.
Args:
- metric_name: Metric name for the resource (e.g., 'bm1-hf-`medium_min`')
+ metric_name: Metric name for the resource (e.g., 'bm1-hf-medium_min')
order_by: Order by field and direction.
@@ -138,7 +138,7 @@ async def list(
configurations and associated pricing.
Args:
- metric_name: Metric name for the resource (e.g., 'bm1-hf-`medium_min`')
+ metric_name: Metric name for the resource (e.g., 'bm1-hf-medium_min')
order_by: Order by field and direction.
diff --git a/src/gcore/resources/cloud/cost_reports.py b/src/gcore/resources/cloud/cost_reports.py
index 730f57bc..c0f2f84b 100644
--- a/src/gcore/resources/cloud/cost_reports.py
+++ b/src/gcore/resources/cloud/cost_reports.py
@@ -222,7 +222,7 @@ def get_aggregated_monthly(
"""
Retrieve a detailed cost report totals for a specified month, which includes
both commit and pay-as-you-go (overcommit) prices. Additionally, it provides the
- spent billing units (e.g., hours or GB) for resources. The "`time_to`" parameter
+ spent billing units (e.g., hours or GB) for resources. The "time_to" parameter
represents all days in the specified month.
Data from the past hour may not reflect the full set of statistics. For the most
@@ -604,7 +604,7 @@ async def get_aggregated_monthly(
"""
Retrieve a detailed cost report totals for a specified month, which includes
both commit and pay-as-you-go (overcommit) prices. Additionally, it provides the
- spent billing units (e.g., hours or GB) for resources. The "`time_to`" parameter
+ spent billing units (e.g., hours or GB) for resources. The "time_to" parameter
represents all days in the specified month.
Data from the past hour may not reflect the full set of statistics. For the most
diff --git a/src/gcore/resources/cloud/file_shares/file_shares.py b/src/gcore/resources/cloud/file_shares/file_shares.py
index 90861f62..7b5cdea2 100644
--- a/src/gcore/resources/cloud/file_shares/file_shares.py
+++ b/src/gcore/resources/cloud/file_shares/file_shares.py
@@ -269,20 +269,15 @@ def update(
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
@@ -799,20 +794,15 @@ async def update(
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
diff --git a/src/gcore/resources/cloud/floating_ips.py b/src/gcore/resources/cloud/floating_ips.py
index a2cfd223..d2273ff7 100644
--- a/src/gcore/resources/cloud/floating_ips.py
+++ b/src/gcore/resources/cloud/floating_ips.py
@@ -124,13 +124,14 @@ def create(
cast_to=TaskIDList,
)
- @typing_extensions.deprecated("deprecated")
def update(
self,
floating_ip_id: str,
*,
project_id: int | None = None,
region_id: int | None = None,
+ fixed_ip_address: Optional[str] | Omit = omit,
+ port_id: Optional[str] | Omit = omit,
tags: Optional[TagUpdateMapParam] | 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,10 +139,52 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> FloatingIP:
- """
- **Deprecated**: Use PATCH
- /v2/floatingips/{`project_id`}/{`region_id`}/{`floating_ip_id`} instead
+ ) -> TaskIDList:
+ """This endpoint updates the association and tags of an existing Floating IP.
+
+ The
+ behavior depends on the current association state and the provided fields:
+
+ Parameters:
+
+ `port_id`: The unique identifier of the network interface (port) to which the
+ Floating IP should be assigned. This ID can be retrieved from the "Get instance"
+ or "List network interfaces" endpoints.
+
+ `fixed_ip_address`: The private IP address assigned to the network interface.
+ This must be one of the IP addresses currently assigned to the specified port.
+ You can retrieve available fixed IP addresses from the "Get instance" or "List
+ network interfaces" endpoints.
+
+ When the Floating IP has no port associated (`port_id` is null):
+
+ - Patch with both `port_id` and `fixed_ip_address`: Assign the Floating IP to
+ the specified port and the provided `fixed_ip_address`, if that
+ `fixed_ip_address` exists on the port and is not yet used by another Floating
+ IP.
+ - Patch with `port_id` only (`fixed_ip_address` omitted): Assign the Floating IP
+ to the specified port using the first available IPv4 fixed IP of that port.
+
+ When the Floating IP is already associated with a port:
+
+ - Patch with both `port_id` and `fixed_ip_address`: Re-assign the Floating IP to
+ the specified port and address if all validations pass.
+ - Patch with `port_id` only (`fixed_ip_address` omitted): Re-assign the Floating
+ IP to the specified port using the first available IPv4 fixed IP of that port.
+ - Patch with `port_id` = null: Unassign the Floating IP from its current port.
+
+ Tags:
+
+ - You can update tags alongside association changes. Tags are provided as a list
+ of key-value pairs.
+
+ Idempotency and task creation:
+
+ - No worker task is created if the requested state is already actual, i.e., the
+ requested `port_id` equals the current `port_id` and/or the requested
+ `fixed_ip_address` equals the current `fixed_ip_address`, and the tags already
+ match the current tags. In such cases, the endpoint returns an empty tasks
+ list.
Args:
project_id: Project ID
@@ -150,6 +193,10 @@ def update(
floating_ip_id: Floating IP ID
+ fixed_ip_address: Fixed IP address
+
+ port_id: Port ID
+
tags: Update key-value tags using JSON Merge Patch semantics (RFC 7386). Provide
key-value pairs to add or update tags. Set tag values to `null` to remove tags.
Unspecified tags remain unchanged. Read-only tags are always preserved and
@@ -160,20 +207,15 @@ def update(
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
@@ -192,12 +234,19 @@ def update(
if not floating_ip_id:
raise ValueError(f"Expected a non-empty value for `floating_ip_id` but received {floating_ip_id!r}")
return self._patch(
- f"/cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}",
- body=maybe_transform({"tags": tags}, floating_ip_update_params.FloatingIPUpdateParams),
+ f"/cloud/v2/floatingips/{project_id}/{region_id}/{floating_ip_id}",
+ body=maybe_transform(
+ {
+ "fixed_ip_address": fixed_ip_address,
+ "port_id": port_id,
+ "tags": tags,
+ },
+ floating_ip_update_params.FloatingIPUpdateParams,
+ ),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=FloatingIP,
+ cast_to=TaskIDList,
)
def list(
@@ -522,6 +571,56 @@ def create_and_poll(
timeout=timeout,
)
+ def update_and_poll(
+ self,
+ floating_ip_id: str,
+ *,
+ project_id: int | None = None,
+ region_id: int | None = None,
+ fixed_ip_address: Optional[str] | Omit = omit,
+ port_id: Optional[str] | Omit = omit,
+ tags: Optional[TagUpdateMapParam] | Omit = omit,
+ polling_interval_seconds: int | Omit = omit,
+ polling_timeout_seconds: int | Omit = omit,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ # 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,
+ ) -> FloatingIP:
+ """
+ Update floating IP 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.update(
+ floating_ip_id=floating_ip_id,
+ project_id=project_id,
+ region_id=region_id,
+ fixed_ip_address=fixed_ip_address,
+ port_id=port_id,
+ tags=tags,
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ )
+ if response.tasks:
+ self._client.cloud.tasks.poll(
+ task_id=response.tasks[0],
+ extra_headers=extra_headers,
+ polling_interval_seconds=polling_interval_seconds,
+ polling_timeout_seconds=polling_timeout_seconds,
+ )
+ return self.get(
+ floating_ip_id=floating_ip_id,
+ project_id=project_id,
+ region_id=region_id,
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ )
+
def delete_and_poll(
self,
floating_ip_id: str,
@@ -648,13 +747,14 @@ async def create(
cast_to=TaskIDList,
)
- @typing_extensions.deprecated("deprecated")
async def update(
self,
floating_ip_id: str,
*,
project_id: int | None = None,
region_id: int | None = None,
+ fixed_ip_address: Optional[str] | Omit = omit,
+ port_id: Optional[str] | Omit = omit,
tags: Optional[TagUpdateMapParam] | 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.
@@ -662,10 +762,52 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> FloatingIP:
- """
- **Deprecated**: Use PATCH
- /v2/floatingips/{`project_id`}/{`region_id`}/{`floating_ip_id`} instead
+ ) -> TaskIDList:
+ """This endpoint updates the association and tags of an existing Floating IP.
+
+ The
+ behavior depends on the current association state and the provided fields:
+
+ Parameters:
+
+ `port_id`: The unique identifier of the network interface (port) to which the
+ Floating IP should be assigned. This ID can be retrieved from the "Get instance"
+ or "List network interfaces" endpoints.
+
+ `fixed_ip_address`: The private IP address assigned to the network interface.
+ This must be one of the IP addresses currently assigned to the specified port.
+ You can retrieve available fixed IP addresses from the "Get instance" or "List
+ network interfaces" endpoints.
+
+ When the Floating IP has no port associated (`port_id` is null):
+
+ - Patch with both `port_id` and `fixed_ip_address`: Assign the Floating IP to
+ the specified port and the provided `fixed_ip_address`, if that
+ `fixed_ip_address` exists on the port and is not yet used by another Floating
+ IP.
+ - Patch with `port_id` only (`fixed_ip_address` omitted): Assign the Floating IP
+ to the specified port using the first available IPv4 fixed IP of that port.
+
+ When the Floating IP is already associated with a port:
+
+ - Patch with both `port_id` and `fixed_ip_address`: Re-assign the Floating IP to
+ the specified port and address if all validations pass.
+ - Patch with `port_id` only (`fixed_ip_address` omitted): Re-assign the Floating
+ IP to the specified port using the first available IPv4 fixed IP of that port.
+ - Patch with `port_id` = null: Unassign the Floating IP from its current port.
+
+ Tags:
+
+ - You can update tags alongside association changes. Tags are provided as a list
+ of key-value pairs.
+
+ Idempotency and task creation:
+
+ - No worker task is created if the requested state is already actual, i.e., the
+ requested `port_id` equals the current `port_id` and/or the requested
+ `fixed_ip_address` equals the current `fixed_ip_address`, and the tags already
+ match the current tags. In such cases, the endpoint returns an empty tasks
+ list.
Args:
project_id: Project ID
@@ -674,6 +816,10 @@ async def update(
floating_ip_id: Floating IP ID
+ fixed_ip_address: Fixed IP address
+
+ port_id: Port ID
+
tags: Update key-value tags using JSON Merge Patch semantics (RFC 7386). Provide
key-value pairs to add or update tags. Set tag values to `null` to remove tags.
Unspecified tags remain unchanged. Read-only tags are always preserved and
@@ -684,20 +830,15 @@ async def update(
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
@@ -716,12 +857,19 @@ async def update(
if not floating_ip_id:
raise ValueError(f"Expected a non-empty value for `floating_ip_id` but received {floating_ip_id!r}")
return await self._patch(
- f"/cloud/v1/floatingips/{project_id}/{region_id}/{floating_ip_id}",
- body=await async_maybe_transform({"tags": tags}, floating_ip_update_params.FloatingIPUpdateParams),
+ f"/cloud/v2/floatingips/{project_id}/{region_id}/{floating_ip_id}",
+ body=await async_maybe_transform(
+ {
+ "fixed_ip_address": fixed_ip_address,
+ "port_id": port_id,
+ "tags": tags,
+ },
+ floating_ip_update_params.FloatingIPUpdateParams,
+ ),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=FloatingIP,
+ cast_to=TaskIDList,
)
def list(
@@ -1046,6 +1194,56 @@ async def create_and_poll(
timeout=timeout,
)
+ async def update_and_poll(
+ self,
+ floating_ip_id: str,
+ *,
+ project_id: int | None = None,
+ region_id: int | None = None,
+ fixed_ip_address: Optional[str] | Omit = omit,
+ port_id: Optional[str] | Omit = omit,
+ tags: Optional[TagUpdateMapParam] | Omit = omit,
+ polling_interval_seconds: int | Omit = omit,
+ polling_timeout_seconds: int | Omit = omit,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ # 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,
+ ) -> FloatingIP:
+ """
+ Update floating IP 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.update(
+ floating_ip_id=floating_ip_id,
+ project_id=project_id,
+ region_id=region_id,
+ fixed_ip_address=fixed_ip_address,
+ port_id=port_id,
+ tags=tags,
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ )
+ if response.tasks:
+ await self._client.cloud.tasks.poll(
+ task_id=response.tasks[0],
+ extra_headers=extra_headers,
+ polling_interval_seconds=polling_interval_seconds,
+ polling_timeout_seconds=polling_timeout_seconds,
+ )
+ return await self.get(
+ floating_ip_id=floating_ip_id,
+ project_id=project_id,
+ region_id=region_id,
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ )
+
async def delete_and_poll(
self,
floating_ip_id: str,
@@ -1090,10 +1288,8 @@ def __init__(self, floating_ips: FloatingIPsResource) -> None:
self.create = to_raw_response_wrapper(
floating_ips.create,
)
- self.update = ( # pyright: ignore[reportDeprecated]
- to_raw_response_wrapper(
- floating_ips.update, # pyright: ignore[reportDeprecated],
- )
+ self.update = to_raw_response_wrapper(
+ floating_ips.update,
)
self.list = to_raw_response_wrapper(
floating_ips.list,
@@ -1117,6 +1313,9 @@ def __init__(self, floating_ips: FloatingIPsResource) -> None:
self.create_and_poll = to_raw_response_wrapper(
floating_ips.create_and_poll,
)
+ self.update_and_poll = to_raw_response_wrapper(
+ floating_ips.update_and_poll,
+ )
self.delete_and_poll = to_raw_response_wrapper(
floating_ips.delete_and_poll,
)
@@ -1129,10 +1328,8 @@ def __init__(self, floating_ips: AsyncFloatingIPsResource) -> None:
self.create = async_to_raw_response_wrapper(
floating_ips.create,
)
- self.update = ( # pyright: ignore[reportDeprecated]
- async_to_raw_response_wrapper(
- floating_ips.update, # pyright: ignore[reportDeprecated],
- )
+ self.update = async_to_raw_response_wrapper(
+ floating_ips.update,
)
self.list = async_to_raw_response_wrapper(
floating_ips.list,
@@ -1156,6 +1353,9 @@ def __init__(self, floating_ips: AsyncFloatingIPsResource) -> None:
self.create_and_poll = async_to_raw_response_wrapper(
floating_ips.create_and_poll,
)
+ self.update_and_poll = async_to_raw_response_wrapper(
+ floating_ips.update_and_poll,
+ )
self.delete_and_poll = async_to_raw_response_wrapper(
floating_ips.delete_and_poll,
)
@@ -1168,10 +1368,8 @@ def __init__(self, floating_ips: FloatingIPsResource) -> None:
self.create = to_streamed_response_wrapper(
floating_ips.create,
)
- self.update = ( # pyright: ignore[reportDeprecated]
- to_streamed_response_wrapper(
- floating_ips.update, # pyright: ignore[reportDeprecated],
- )
+ self.update = to_streamed_response_wrapper(
+ floating_ips.update,
)
self.list = to_streamed_response_wrapper(
floating_ips.list,
@@ -1195,6 +1393,9 @@ def __init__(self, floating_ips: FloatingIPsResource) -> None:
self.create_and_poll = to_streamed_response_wrapper(
floating_ips.create_and_poll,
)
+ self.update_and_poll = to_streamed_response_wrapper(
+ floating_ips.update_and_poll,
+ )
self.delete_and_poll = to_streamed_response_wrapper(
floating_ips.delete_and_poll,
)
@@ -1207,10 +1408,8 @@ def __init__(self, floating_ips: AsyncFloatingIPsResource) -> None:
self.create = async_to_streamed_response_wrapper(
floating_ips.create,
)
- self.update = ( # pyright: ignore[reportDeprecated]
- async_to_streamed_response_wrapper(
- floating_ips.update, # pyright: ignore[reportDeprecated],
- )
+ self.update = async_to_streamed_response_wrapper(
+ floating_ips.update,
)
self.list = async_to_streamed_response_wrapper(
floating_ips.list,
@@ -1234,6 +1433,9 @@ def __init__(self, floating_ips: AsyncFloatingIPsResource) -> None:
self.create_and_poll = async_to_streamed_response_wrapper(
floating_ips.create_and_poll,
)
+ self.update_and_poll = async_to_streamed_response_wrapper(
+ floating_ips.update_and_poll,
+ )
self.delete_and_poll = async_to_streamed_response_wrapper(
floating_ips.delete_and_poll,
)
diff --git a/src/gcore/resources/cloud/gpu_baremetal/clusters/clusters.py b/src/gcore/resources/cloud/gpu_baremetal/clusters/clusters.py
index 130b0821..adfb58cb 100644
--- a/src/gcore/resources/cloud/gpu_baremetal/clusters/clusters.py
+++ b/src/gcore/resources/cloud/gpu_baremetal/clusters/clusters.py
@@ -352,20 +352,15 @@ def action(
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
@@ -1074,20 +1069,15 @@ async def action(
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
diff --git a/src/gcore/resources/cloud/gpu_baremetal/clusters/interfaces.py b/src/gcore/resources/cloud/gpu_baremetal/clusters/interfaces.py
index 0b4d0768..dcd6f5f0 100644
--- a/src/gcore/resources/cloud/gpu_baremetal/clusters/interfaces.py
+++ b/src/gcore/resources/cloud/gpu_baremetal/clusters/interfaces.py
@@ -214,7 +214,7 @@ def attach(
security_groups: List of security group IDs
- type: Must be '`any_subnet`'
+ type: Must be 'any_subnet'
extra_headers: Send extra headers
@@ -260,7 +260,7 @@ def attach(
security_groups: List of security group IDs
- type: Must be '`reserved_fixed_ip`'. Union tag
+ type: Must be 'reserved_fixed_ip'. Union tag
extra_headers: Send extra headers
@@ -572,7 +572,7 @@ async def attach(
security_groups: List of security group IDs
- type: Must be '`any_subnet`'
+ type: Must be 'any_subnet'
extra_headers: Send extra headers
@@ -618,7 +618,7 @@ async def attach(
security_groups: List of security group IDs
- type: Must be '`reserved_fixed_ip`'. Union tag
+ type: Must be 'reserved_fixed_ip'. Union tag
extra_headers: Send extra headers
diff --git a/src/gcore/resources/cloud/gpu_virtual/clusters/clusters.py b/src/gcore/resources/cloud/gpu_virtual/clusters/clusters.py
index a94d8752..486048b5 100644
--- a/src/gcore/resources/cloud/gpu_virtual/clusters/clusters.py
+++ b/src/gcore/resources/cloud/gpu_virtual/clusters/clusters.py
@@ -564,20 +564,15 @@ def action(
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
@@ -1214,20 +1209,15 @@ async def action(
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
diff --git a/src/gcore/resources/cloud/instances/instances.py b/src/gcore/resources/cloud/instances/instances.py
index 68723851..2c83bbae 100644
--- a/src/gcore/resources/cloud/instances/instances.py
+++ b/src/gcore/resources/cloud/instances/instances.py
@@ -190,8 +190,8 @@ def create(
When only 'password' is provided, it is set as the password for the default user
of the image. For Windows instances, 'username' cannot be specified. Use the
'password' field to set the password for the 'Admin' user on Windows. Use the
- '`user_data`' field to provide a script to create new users on Windows. The
- password of the Admin user cannot be updated via '`user_data`'.
+ 'user_data' field to provide a script to create new users on Windows. The
+ password of the Admin user cannot be updated via 'user_data'.
security_groups: Specifies security group UUIDs to be applied to all instance network interfaces.
@@ -215,9 +215,9 @@ def create(
user. Tags are also integrated with cost reports, allowing cost data to be
filtered based on tag keys or values.
- user_data: String in base64 format. For Linux instances, '`user_data`' is ignored when
+ user_data: String in base64 format. For Linux instances, 'user_data' is ignored when
'password' field is provided. For Windows instances, Admin user password is set
- by 'password' field and cannot be updated via '`user_data`'. Examples of the
+ by 'password' field and cannot be updated via 'user_data'. Examples of the
`user_data`: https://cloudinit.readthedocs.io/en/latest/topics/examples.html
username: For Linux instances, 'username' and 'password' are used to create a new user.
@@ -372,20 +372,15 @@ def update(
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
@@ -1614,8 +1609,8 @@ async def create(
When only 'password' is provided, it is set as the password for the default user
of the image. For Windows instances, 'username' cannot be specified. Use the
'password' field to set the password for the 'Admin' user on Windows. Use the
- '`user_data`' field to provide a script to create new users on Windows. The
- password of the Admin user cannot be updated via '`user_data`'.
+ 'user_data' field to provide a script to create new users on Windows. The
+ password of the Admin user cannot be updated via 'user_data'.
security_groups: Specifies security group UUIDs to be applied to all instance network interfaces.
@@ -1639,9 +1634,9 @@ async def create(
user. Tags are also integrated with cost reports, allowing cost data to be
filtered based on tag keys or values.
- user_data: String in base64 format. For Linux instances, '`user_data`' is ignored when
+ user_data: String in base64 format. For Linux instances, 'user_data' is ignored when
'password' field is provided. For Windows instances, Admin user password is set
- by 'password' field and cannot be updated via '`user_data`'. Examples of the
+ by 'password' field and cannot be updated via 'user_data'. Examples of the
`user_data`: https://cloudinit.readthedocs.io/en/latest/topics/examples.html
username: For Linux instances, 'username' and 'password' are used to create a new user.
@@ -1796,20 +1791,15 @@ async def update(
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
diff --git a/src/gcore/resources/cloud/instances/interfaces.py b/src/gcore/resources/cloud/instances/interfaces.py
index 98ef5ec9..b42a1daf 100644
--- a/src/gcore/resources/cloud/instances/interfaces.py
+++ b/src/gcore/resources/cloud/instances/interfaces.py
@@ -214,7 +214,7 @@ def attach(
security_groups: List of security group IDs
- type: Must be '`any_subnet`'
+ type: Must be 'any_subnet'
extra_headers: Send extra headers
@@ -260,7 +260,7 @@ def attach(
security_groups: List of security group IDs
- type: Must be '`reserved_fixed_ip`'. Union tag
+ type: Must be 'reserved_fixed_ip'. Union tag
extra_headers: Send extra headers
@@ -869,7 +869,7 @@ async def attach(
security_groups: List of security group IDs
- type: Must be '`any_subnet`'
+ type: Must be 'any_subnet'
extra_headers: Send extra headers
@@ -915,7 +915,7 @@ async def attach(
security_groups: List of security group IDs
- type: Must be '`reserved_fixed_ip`'. Union tag
+ type: Must be 'reserved_fixed_ip'. Union tag
extra_headers: Send extra headers
diff --git a/src/gcore/resources/cloud/load_balancers/load_balancers.py b/src/gcore/resources/cloud/load_balancers/load_balancers.py
index f25262eb..d2bfe2a1 100644
--- a/src/gcore/resources/cloud/load_balancers/load_balancers.py
+++ b/src/gcore/resources/cloud/load_balancers/load_balancers.py
@@ -285,20 +285,15 @@ def update(
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
@@ -1038,20 +1033,15 @@ async def update(
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
diff --git a/src/gcore/resources/cloud/networks/networks.py b/src/gcore/resources/cloud/networks/networks.py
index 1eb0f244..847a36da 100644
--- a/src/gcore/resources/cloud/networks/networks.py
+++ b/src/gcore/resources/cloud/networks/networks.py
@@ -229,20 +229,15 @@ def update(
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
@@ -661,20 +656,15 @@ async def update(
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
diff --git a/src/gcore/resources/cloud/networks/subnets.py b/src/gcore/resources/cloud/networks/subnets.py
index f1ea953f..1ca16f53 100644
--- a/src/gcore/resources/cloud/networks/subnets.py
+++ b/src/gcore/resources/cloud/networks/subnets.py
@@ -263,20 +263,15 @@ def update(
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
@@ -728,20 +723,15 @@ async def update(
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
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 c41f3adc..35da4dca 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
@@ -159,7 +159,7 @@ def create(
Args:
network_id: Reserved fixed IP will be allocated in a subnet of this network
- type: Must be '`any_subnet`'.
+ type: Must be 'any_subnet'.
ip_family: Which subnets should be selected: IPv4, IPv6 or use dual stack.
@@ -200,7 +200,7 @@ def create(
network_id: Reserved fixed IP will be allocated in a subnet of this network
- type: Must be '`ip_address`'.
+ type: Must be 'ip_address'.
is_vip: If reserved fixed IP is a VIP
@@ -383,7 +383,7 @@ def list(
order_by: Ordering reserved fixed IP list result by name, status, `updated_at`,
`created_at` or `fixed_ip_address` fields and directions (status.asc), default
- is "`fixed_ip_address`.asc"
+ is "fixed_ip_address.asc"
vip_only: Set to true if the response should only list VIPs
@@ -924,7 +924,7 @@ async def create(
Args:
network_id: Reserved fixed IP will be allocated in a subnet of this network
- type: Must be '`any_subnet`'.
+ type: Must be 'any_subnet'.
ip_family: Which subnets should be selected: IPv4, IPv6 or use dual stack.
@@ -965,7 +965,7 @@ async def create(
network_id: Reserved fixed IP will be allocated in a subnet of this network
- type: Must be '`ip_address`'.
+ type: Must be 'ip_address'.
is_vip: If reserved fixed IP is a VIP
@@ -1150,7 +1150,7 @@ def list(
order_by: Ordering reserved fixed IP list result by name, status, `updated_at`,
`created_at` or `fixed_ip_address` fields and directions (status.asc), default
- is "`fixed_ip_address`.asc"
+ is "fixed_ip_address.asc"
vip_only: Set to true if the response should only list VIPs
diff --git a/src/gcore/resources/cloud/security_groups/security_groups.py b/src/gcore/resources/cloud/security_groups/security_groups.py
index a287b6bf..52b209e1 100644
--- a/src/gcore/resources/cloud/security_groups/security_groups.py
+++ b/src/gcore/resources/cloud/security_groups/security_groups.py
@@ -2,8 +2,7 @@
from __future__ import annotations
-import typing_extensions
-from typing import Iterable, Optional
+from typing import Dict, Iterable, Optional
import httpx
@@ -15,7 +14,7 @@
RulesResourceWithStreamingResponse,
AsyncRulesResourceWithStreamingResponse,
)
-from ...._types import Body, Omit, Query, Headers, NoneType, NotGiven, SequenceNotStr, omit, not_given
+from ...._types import NOT_GIVEN, Body, Omit, Query, Headers, NoneType, NotGiven, SequenceNotStr, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
@@ -33,6 +32,7 @@
security_group_update_params,
)
from ...._base_client import AsyncPaginator, make_request_options
+from ....types.cloud.task_id_list import TaskIDList
from ....types.cloud.security_group import SecurityGroup
from ....types.cloud.tag_update_map_param import TagUpdateMapParam
@@ -63,32 +63,45 @@ def with_streaming_response(self) -> SecurityGroupsResourceWithStreamingResponse
"""
return SecurityGroupsResourceWithStreamingResponse(self)
- @typing_extensions.deprecated("deprecated")
def create(
self,
*,
project_id: int | None = None,
region_id: int | None = None,
- security_group: security_group_create_params.SecurityGroup,
- instances: SequenceNotStr[str] | Omit = omit,
+ name: str,
+ description: str | Omit = omit,
+ rules: Iterable[security_group_create_params.Rule] | Omit = omit,
+ tags: Dict[str, 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> SecurityGroup:
- """
- **Deprecated** Use `/v2/security_groups//` instead.
+ ) -> TaskIDList:
+ """Creates a new security group with the specified configuration.
+
+ If no egress
+ rules are provided, default set of egress rules will be applied If rules are
+ explicitly set to empty, no rules will be created.
Args:
project_id: Project ID
region_id: Region ID
- security_group: Security group
+ name: Security group name
+
+ description: Security group description
- instances: List of instances
+ rules: Security group rules
+
+ tags: Key-value tags to associate with the resource. A tag is a key-value pair that
+ can be associated with a resource, enabling efficient filtering and grouping for
+ better organization and management. Both tag keys and values have a maximum
+ length of 255 characters. Some tags are read-only and cannot be modified by the
+ user. Tags are also integrated with cost reports, allowing cost data to be
+ filtered based on tag keys or values.
extra_headers: Send extra headers
@@ -103,29 +116,31 @@ def create(
if region_id is None:
region_id = self._client._get_cloud_region_id_path_param()
return self._post(
- f"/cloud/v1/securitygroups/{project_id}/{region_id}",
+ f"/cloud/v2/security_groups/{project_id}/{region_id}",
body=maybe_transform(
{
- "security_group": security_group,
- "instances": instances,
+ "name": name,
+ "description": description,
+ "rules": rules,
+ "tags": tags,
},
security_group_create_params.SecurityGroupCreateParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=SecurityGroup,
+ cast_to=TaskIDList,
)
- @typing_extensions.deprecated("deprecated")
def update(
self,
group_id: str,
*,
project_id: int | None = None,
region_id: int | None = None,
- changed_rules: Iterable[security_group_update_params.ChangedRule] | Omit = omit,
+ description: str | Omit = omit,
name: str | Omit = omit,
+ rules: Iterable[security_group_update_params.Rule] | Omit = omit,
tags: Optional[TagUpdateMapParam] | 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.
@@ -133,22 +148,41 @@ def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> SecurityGroup:
+ ) -> TaskIDList:
"""
- **Deprecated** Use `/v2/security_groups///`
- instead.
+ Updates the specified security group with the provided changes.
+
+ **Behavior:**
+
+ - Simple fields (name, description) will be updated if provided
+ - Undefined fields will remain unchanged
+ - If no change is detected for a specific field compared to the current security
+ group state, that field will be skipped
+ - If no changes are detected at all across all fields, no task will be created
+ and an empty task list will be returned
+
+ **Important - Security Group Rules:**
+
+ - Rules must be specified completely as the desired final state
+ - The system compares the provided rules against the current state
+ - Rules that exist in the request but not in the current state will be added
+ - Rules that exist in the current state but not in the request will be removed
+ - To keep existing rules, they must be included in the request alongside any new
+ rules
Args:
project_id: Project ID
region_id: Region ID
- group_id: Group ID
+ group_id: Security group ID
- changed_rules: List of rules to create or delete
+ description: Security group description
name: Name
+ rules: Security group rules
+
tags: Update key-value tags using JSON Merge Patch semantics (RFC 7386). Provide
key-value pairs to add or update tags. Set tag values to `null` to remove tags.
Unspecified tags remain unchanged. Read-only tags are always preserved and
@@ -159,20 +193,15 @@ def update(
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
@@ -191,11 +220,12 @@ def update(
if not group_id:
raise ValueError(f"Expected a non-empty value for `group_id` but received {group_id!r}")
return self._patch(
- f"/cloud/v1/securitygroups/{project_id}/{region_id}/{group_id}",
+ f"/cloud/v2/security_groups/{project_id}/{region_id}/{group_id}",
body=maybe_transform(
{
- "changed_rules": changed_rules,
+ "description": description,
"name": name,
+ "rules": rules,
"tags": tags,
},
security_group_update_params.SecurityGroupUpdateParams,
@@ -203,7 +233,7 @@ def update(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=SecurityGroup,
+ cast_to=TaskIDList,
)
def list(
@@ -460,6 +490,112 @@ def revert_to_default(
cast_to=SecurityGroup,
)
+ def create_and_poll(
+ self,
+ *,
+ project_id: int | None = None,
+ region_id: int | None = None,
+ name: str,
+ description: str | Omit = omit,
+ rules: Iterable[security_group_create_params.Rule] | Omit = omit,
+ tags: Dict[str, str] | Omit = omit,
+ polling_interval_seconds: int | Omit = omit,
+ polling_timeout_seconds: int | Omit = omit,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ # 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,
+ ) -> SecurityGroup:
+ """
+ Create security group 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.create(
+ project_id=project_id,
+ region_id=region_id,
+ name=name,
+ description=description,
+ rules=rules,
+ tags=tags,
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ )
+ if not response.tasks:
+ raise ValueError("Expected at least one task to be created")
+ task = self._client.cloud.tasks.poll(
+ task_id=response.tasks[0],
+ extra_headers=extra_headers,
+ polling_interval_seconds=polling_interval_seconds,
+ polling_timeout_seconds=polling_timeout_seconds,
+ )
+ if task.created_resources is None or task.created_resources.security_groups is None:
+ raise ValueError("Task completed but created_resources or security_groups is missing")
+ security_group_id = task.created_resources.security_groups[0]
+ return self.get(
+ group_id=security_group_id,
+ project_id=project_id,
+ region_id=region_id,
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ )
+
+ def update_and_poll(
+ self,
+ group_id: str,
+ *,
+ project_id: int | None = None,
+ region_id: int | None = None,
+ description: str | Omit = omit,
+ name: str | Omit = omit,
+ rules: Iterable[security_group_update_params.Rule] | Omit = omit,
+ tags: Optional[TagUpdateMapParam] | Omit = omit,
+ polling_interval_seconds: int | Omit = omit,
+ polling_timeout_seconds: int | Omit = omit,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ # 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,
+ ) -> SecurityGroup:
+ """
+ Update security group 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.update(
+ group_id=group_id,
+ project_id=project_id,
+ region_id=region_id,
+ description=description,
+ name=name,
+ rules=rules,
+ tags=tags,
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ )
+ if response.tasks:
+ self._client.cloud.tasks.poll(
+ task_id=response.tasks[0],
+ extra_headers=extra_headers,
+ polling_interval_seconds=polling_interval_seconds,
+ polling_timeout_seconds=polling_timeout_seconds,
+ )
+ return self.get(
+ group_id=group_id,
+ project_id=project_id,
+ region_id=region_id,
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ )
+
class AsyncSecurityGroupsResource(AsyncAPIResource):
@cached_property
@@ -485,32 +621,45 @@ def with_streaming_response(self) -> AsyncSecurityGroupsResourceWithStreamingRes
"""
return AsyncSecurityGroupsResourceWithStreamingResponse(self)
- @typing_extensions.deprecated("deprecated")
async def create(
self,
*,
project_id: int | None = None,
region_id: int | None = None,
- security_group: security_group_create_params.SecurityGroup,
- instances: SequenceNotStr[str] | Omit = omit,
+ name: str,
+ description: str | Omit = omit,
+ rules: Iterable[security_group_create_params.Rule] | Omit = omit,
+ tags: Dict[str, 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> SecurityGroup:
- """
- **Deprecated** Use `/v2/security_groups//` instead.
+ ) -> TaskIDList:
+ """Creates a new security group with the specified configuration.
+
+ If no egress
+ rules are provided, default set of egress rules will be applied If rules are
+ explicitly set to empty, no rules will be created.
Args:
project_id: Project ID
region_id: Region ID
- security_group: Security group
+ name: Security group name
- instances: List of instances
+ description: Security group description
+
+ rules: Security group rules
+
+ tags: Key-value tags to associate with the resource. A tag is a key-value pair that
+ can be associated with a resource, enabling efficient filtering and grouping for
+ better organization and management. Both tag keys and values have a maximum
+ length of 255 characters. Some tags are read-only and cannot be modified by the
+ user. Tags are also integrated with cost reports, allowing cost data to be
+ filtered based on tag keys or values.
extra_headers: Send extra headers
@@ -525,29 +674,31 @@ async def create(
if region_id is None:
region_id = self._client._get_cloud_region_id_path_param()
return await self._post(
- f"/cloud/v1/securitygroups/{project_id}/{region_id}",
+ f"/cloud/v2/security_groups/{project_id}/{region_id}",
body=await async_maybe_transform(
{
- "security_group": security_group,
- "instances": instances,
+ "name": name,
+ "description": description,
+ "rules": rules,
+ "tags": tags,
},
security_group_create_params.SecurityGroupCreateParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=SecurityGroup,
+ cast_to=TaskIDList,
)
- @typing_extensions.deprecated("deprecated")
async def update(
self,
group_id: str,
*,
project_id: int | None = None,
region_id: int | None = None,
- changed_rules: Iterable[security_group_update_params.ChangedRule] | Omit = omit,
+ description: str | Omit = omit,
name: str | Omit = omit,
+ rules: Iterable[security_group_update_params.Rule] | Omit = omit,
tags: Optional[TagUpdateMapParam] | 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.
@@ -555,22 +706,41 @@ async def update(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
- ) -> SecurityGroup:
+ ) -> TaskIDList:
"""
- **Deprecated** Use `/v2/security_groups///`
- instead.
+ Updates the specified security group with the provided changes.
+
+ **Behavior:**
+
+ - Simple fields (name, description) will be updated if provided
+ - Undefined fields will remain unchanged
+ - If no change is detected for a specific field compared to the current security
+ group state, that field will be skipped
+ - If no changes are detected at all across all fields, no task will be created
+ and an empty task list will be returned
+
+ **Important - Security Group Rules:**
+
+ - Rules must be specified completely as the desired final state
+ - The system compares the provided rules against the current state
+ - Rules that exist in the request but not in the current state will be added
+ - Rules that exist in the current state but not in the request will be removed
+ - To keep existing rules, they must be included in the request alongside any new
+ rules
Args:
project_id: Project ID
region_id: Region ID
- group_id: Group ID
+ group_id: Security group ID
- changed_rules: List of rules to create or delete
+ description: Security group description
name: Name
+ rules: Security group rules
+
tags: Update key-value tags using JSON Merge Patch semantics (RFC 7386). Provide
key-value pairs to add or update tags. Set tag values to `null` to remove tags.
Unspecified tags remain unchanged. Read-only tags are always preserved and
@@ -581,20 +751,15 @@ async def update(
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
@@ -613,11 +778,12 @@ async def update(
if not group_id:
raise ValueError(f"Expected a non-empty value for `group_id` but received {group_id!r}")
return await self._patch(
- f"/cloud/v1/securitygroups/{project_id}/{region_id}/{group_id}",
+ f"/cloud/v2/security_groups/{project_id}/{region_id}/{group_id}",
body=await async_maybe_transform(
{
- "changed_rules": changed_rules,
+ "description": description,
"name": name,
+ "rules": rules,
"tags": tags,
},
security_group_update_params.SecurityGroupUpdateParams,
@@ -625,7 +791,7 @@ async def update(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=SecurityGroup,
+ cast_to=TaskIDList,
)
def list(
@@ -882,20 +1048,122 @@ async def revert_to_default(
cast_to=SecurityGroup,
)
+ async def create_and_poll(
+ self,
+ *,
+ project_id: int | None = None,
+ region_id: int | None = None,
+ name: str,
+ description: str | Omit = omit,
+ rules: Iterable[security_group_create_params.Rule] | Omit = omit,
+ tags: Dict[str, str] | Omit = omit,
+ polling_interval_seconds: int | Omit = omit,
+ polling_timeout_seconds: int | Omit = omit,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ # 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,
+ ) -> SecurityGroup:
+ """
+ Create security group 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.create(
+ project_id=project_id,
+ region_id=region_id,
+ name=name,
+ description=description,
+ rules=rules,
+ tags=tags,
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ )
+ if not response.tasks:
+ raise ValueError("Expected at least one task to be created")
+ task = await self._client.cloud.tasks.poll(
+ task_id=response.tasks[0],
+ extra_headers=extra_headers,
+ polling_interval_seconds=polling_interval_seconds,
+ polling_timeout_seconds=polling_timeout_seconds,
+ )
+ if task.created_resources is None or task.created_resources.security_groups is None:
+ raise ValueError("Task completed but created_resources or security_groups is missing")
+ security_group_id = task.created_resources.security_groups[0]
+ return await self.get(
+ group_id=security_group_id,
+ project_id=project_id,
+ region_id=region_id,
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ )
+
+ async def update_and_poll(
+ self,
+ group_id: str,
+ *,
+ project_id: int | None = None,
+ region_id: int | None = None,
+ description: str | Omit = omit,
+ name: str | Omit = omit,
+ rules: Iterable[security_group_update_params.Rule] | Omit = omit,
+ tags: Optional[TagUpdateMapParam] | Omit = omit,
+ polling_interval_seconds: int | Omit = omit,
+ polling_timeout_seconds: int | Omit = omit,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ # 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,
+ ) -> SecurityGroup:
+ """
+ Update security group 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.update(
+ group_id=group_id,
+ project_id=project_id,
+ region_id=region_id,
+ description=description,
+ name=name,
+ rules=rules,
+ tags=tags,
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ )
+ if response.tasks:
+ await self._client.cloud.tasks.poll(
+ task_id=response.tasks[0],
+ extra_headers=extra_headers,
+ polling_interval_seconds=polling_interval_seconds,
+ polling_timeout_seconds=polling_timeout_seconds,
+ )
+ return await self.get(
+ group_id=group_id,
+ project_id=project_id,
+ region_id=region_id,
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ )
+
class SecurityGroupsResourceWithRawResponse:
def __init__(self, security_groups: SecurityGroupsResource) -> None:
self._security_groups = security_groups
- self.create = ( # pyright: ignore[reportDeprecated]
- to_raw_response_wrapper(
- security_groups.create, # pyright: ignore[reportDeprecated],
- )
+ self.create = to_raw_response_wrapper(
+ security_groups.create,
)
- self.update = ( # pyright: ignore[reportDeprecated]
- to_raw_response_wrapper(
- security_groups.update, # pyright: ignore[reportDeprecated],
- )
+ self.update = to_raw_response_wrapper(
+ security_groups.update,
)
self.list = to_raw_response_wrapper(
security_groups.list,
@@ -912,6 +1180,12 @@ def __init__(self, security_groups: SecurityGroupsResource) -> None:
self.revert_to_default = to_raw_response_wrapper(
security_groups.revert_to_default,
)
+ self.create_and_poll = to_raw_response_wrapper(
+ security_groups.create_and_poll,
+ )
+ self.update_and_poll = to_raw_response_wrapper(
+ security_groups.update_and_poll,
+ )
@cached_property
def rules(self) -> RulesResourceWithRawResponse:
@@ -922,15 +1196,11 @@ class AsyncSecurityGroupsResourceWithRawResponse:
def __init__(self, security_groups: AsyncSecurityGroupsResource) -> None:
self._security_groups = security_groups
- self.create = ( # pyright: ignore[reportDeprecated]
- async_to_raw_response_wrapper(
- security_groups.create, # pyright: ignore[reportDeprecated],
- )
+ self.create = async_to_raw_response_wrapper(
+ security_groups.create,
)
- self.update = ( # pyright: ignore[reportDeprecated]
- async_to_raw_response_wrapper(
- security_groups.update, # pyright: ignore[reportDeprecated],
- )
+ self.update = async_to_raw_response_wrapper(
+ security_groups.update,
)
self.list = async_to_raw_response_wrapper(
security_groups.list,
@@ -947,6 +1217,12 @@ def __init__(self, security_groups: AsyncSecurityGroupsResource) -> None:
self.revert_to_default = async_to_raw_response_wrapper(
security_groups.revert_to_default,
)
+ self.create_and_poll = async_to_raw_response_wrapper(
+ security_groups.create_and_poll,
+ )
+ self.update_and_poll = async_to_raw_response_wrapper(
+ security_groups.update_and_poll,
+ )
@cached_property
def rules(self) -> AsyncRulesResourceWithRawResponse:
@@ -957,15 +1233,11 @@ class SecurityGroupsResourceWithStreamingResponse:
def __init__(self, security_groups: SecurityGroupsResource) -> None:
self._security_groups = security_groups
- self.create = ( # pyright: ignore[reportDeprecated]
- to_streamed_response_wrapper(
- security_groups.create, # pyright: ignore[reportDeprecated],
- )
+ self.create = to_streamed_response_wrapper(
+ security_groups.create,
)
- self.update = ( # pyright: ignore[reportDeprecated]
- to_streamed_response_wrapper(
- security_groups.update, # pyright: ignore[reportDeprecated],
- )
+ self.update = to_streamed_response_wrapper(
+ security_groups.update,
)
self.list = to_streamed_response_wrapper(
security_groups.list,
@@ -982,6 +1254,12 @@ def __init__(self, security_groups: SecurityGroupsResource) -> None:
self.revert_to_default = to_streamed_response_wrapper(
security_groups.revert_to_default,
)
+ self.create_and_poll = to_streamed_response_wrapper(
+ security_groups.create_and_poll,
+ )
+ self.update_and_poll = to_streamed_response_wrapper(
+ security_groups.update_and_poll,
+ )
@cached_property
def rules(self) -> RulesResourceWithStreamingResponse:
@@ -992,15 +1270,11 @@ class AsyncSecurityGroupsResourceWithStreamingResponse:
def __init__(self, security_groups: AsyncSecurityGroupsResource) -> None:
self._security_groups = security_groups
- self.create = ( # pyright: ignore[reportDeprecated]
- async_to_streamed_response_wrapper(
- security_groups.create, # pyright: ignore[reportDeprecated],
- )
+ self.create = async_to_streamed_response_wrapper(
+ security_groups.create,
)
- self.update = ( # pyright: ignore[reportDeprecated]
- async_to_streamed_response_wrapper(
- security_groups.update, # pyright: ignore[reportDeprecated],
- )
+ self.update = async_to_streamed_response_wrapper(
+ security_groups.update,
)
self.list = async_to_streamed_response_wrapper(
security_groups.list,
@@ -1017,6 +1291,12 @@ def __init__(self, security_groups: AsyncSecurityGroupsResource) -> None:
self.revert_to_default = async_to_streamed_response_wrapper(
security_groups.revert_to_default,
)
+ self.create_and_poll = async_to_streamed_response_wrapper(
+ security_groups.create_and_poll,
+ )
+ self.update_and_poll = async_to_streamed_response_wrapper(
+ security_groups.update_and_poll,
+ )
@cached_property
def rules(self) -> AsyncRulesResourceWithStreamingResponse:
diff --git a/src/gcore/resources/cloud/tasks.py b/src/gcore/resources/cloud/tasks.py
index a566b03d..f88d9b39 100644
--- a/src/gcore/resources/cloud/tasks.py
+++ b/src/gcore/resources/cloud/tasks.py
@@ -134,60 +134,55 @@ def list(
region_id: The region ID to filter the tasks by region. Supports multiple values of kind
key=value1&key=value2
- sorting: (DEPRECATED Use '`order_by`' instead) Sorting by creation date. Oldest first, or
+ sorting: (DEPRECATED Use 'order_by' instead) Sorting by creation date. Oldest first, or
most recent first
state: Filter the tasks by state. Supports multiple values of kind
key=value1&key=value2
- task_type: Filter the tasks by their type one of ['`activate_ddos_profile`',
- '`attach_bm_to_reserved_fixed_ip`', '`attach_vm_interface`',
- '`attach_vm_to_reserved_fixed_ip`', '`attach_volume`',
- '`create_ai_cluster_gpu`', '`create_bm`', '`create_caas_container`',
- '`create_dbaas_postgres_cluster`', '`create_ddos_profile`',
- '`create_faas_function`', '`create_faas_namespace`', '`create_fip`',
- '`create_gpu_virtual_cluster`', '`create_image`',
- '`create_inference_application`', '`create_inference_instance`',
- '`create_k8s_cluster_pool_v2`', '`create_k8s_cluster_v2`', '`create_l7policy`',
- '`create_l7rule`', '`create_lblistener`', '`create_lbmember`',
- '`create_lbpool`', '`create_lbpool_health_monitor`', '`create_loadbalancer`',
- '`create_network`', '`create_reserved_fixed_ip`', '`create_router`',
- '`create_secret`', '`create_security_group`', '`create_servergroup`',
- '`create_sfs`', '`create_snapshot`', '`create_subnet`', '`create_vm`',
- '`create_volume`', '`deactivate_ddos_profile`', '`delete_ai_cluster_gpu`',
- '`delete_caas_container`', '`delete_dbaas_postgres_cluster`',
- '`delete_ddos_profile`', '`delete_faas_function`', '`delete_faas_namespace`',
- '`delete_fip`', '`delete_gpu_virtual_cluster`', '`delete_gpu_virtual_server`',
- '`delete_image`', '`delete_inference_application`',
- '`delete_inference_instance`', '`delete_k8s_cluster_pool_v2`',
- '`delete_k8s_cluster_v2`', '`delete_l7policy`', '`delete_l7rule`',
- '`delete_lblistener`', '`delete_lbmember`', '`delete_lbmetadata`',
- '`delete_lbpool`', '`delete_loadbalancer`', '`delete_network`',
- '`delete_project`', '`delete_reserved_fixed_ip`', '`delete_router`',
- '`delete_secret`', '`delete_servergroup`', '`delete_sfs`', '`delete_snapshot`',
- '`delete_subnet`', '`delete_vm`', '`delete_volume`', '`detach_vm_interface`',
- '`detach_volume`', '`download_image`', '`downscale_ai_cluster_gpu`',
- '`downscale_gpu_virtual_cluster`', '`extend_sfs`', '`extend_volume`',
- '`failover_loadbalancer`', '`hard_reboot_gpu_baremetal_server`',
- '`hard_reboot_gpu_virtual_cluster`', '`hard_reboot_gpu_virtual_server`',
- '`hard_reboot_vm`', '`patch_caas_container`', '`patch_dbaas_postgres_cluster`',
- '`patch_faas_function`', '`patch_faas_namespace`', '`patch_lblistener`',
- '`patch_lbpool`', '`put_into_server_group`', '`put_l7rule`', '`rebuild_bm`',
- '`rebuild_gpu_baremetal_node`', '`remove_from_server_group`',
- '`replace_lbmetadata`', '`resize_k8s_cluster_v2`', '`resize_loadbalancer`',
- '`resize_vm`', '`resume_vm`', '`revert_volume`',
- '`soft_reboot_gpu_baremetal_server`', '`soft_reboot_gpu_virtual_cluster`',
- '`soft_reboot_gpu_virtual_server`', '`soft_reboot_vm`',
- '`start_gpu_baremetal_server`', '`start_gpu_virtual_cluster`',
- '`start_gpu_virtual_server`', '`start_vm`', '`stop_gpu_baremetal_server`',
- '`stop_gpu_virtual_cluster`', '`stop_gpu_virtual_server`', '`stop_vm`',
- '`suspend_vm`', '`sync_private_flavors`', '`update_ddos_profile`',
- '`update_floating_ip`', '`update_inference_application`',
- '`update_inference_instance`', '`update_k8s_cluster_v2`', '`update_l7policy`',
- '`update_lbmetadata`', '`update_port_allowed_address_pairs`', '`update_router`',
- '`update_security_group`', '`update_sfs`', '`update_tags_gpu_virtual_cluster`',
- '`upgrade_k8s_cluster_v2`', '`upscale_ai_cluster_gpu`',
- '`upscale_gpu_virtual_cluster`']
+ task_type: Filter the tasks by their type one of ['activate_ddos_profile',
+ 'attach_bm_to_reserved_fixed_ip', 'attach_vm_interface',
+ 'attach_vm_to_reserved_fixed_ip', 'attach_volume', 'create_ai_cluster_gpu',
+ 'create_bm', 'create_caas_container', 'create_dbaas_postgres_cluster',
+ 'create_ddos_profile', 'create_faas_function', 'create_faas_namespace',
+ 'create_fip', 'create_gpu_virtual_cluster', 'create_image',
+ 'create_inference_application', 'create_inference_instance',
+ 'create_k8s_cluster_pool_v2', 'create_k8s_cluster_v2', 'create_l7policy',
+ 'create_l7rule', 'create_lblistener', 'create_lbmember', 'create_lbpool',
+ 'create_lbpool_health_monitor', 'create_loadbalancer', 'create_network',
+ 'create_reserved_fixed_ip', 'create_router', 'create_secret',
+ 'create_security_group', 'create_servergroup', 'create_sfs', 'create_snapshot',
+ 'create_subnet', 'create_vm', 'create_volume', 'deactivate_ddos_profile',
+ 'delete_ai_cluster_gpu', 'delete_caas_container',
+ 'delete_dbaas_postgres_cluster', 'delete_ddos_profile', 'delete_faas_function',
+ 'delete_faas_namespace', 'delete_fip', 'delete_gpu_virtual_cluster',
+ 'delete_gpu_virtual_server', 'delete_image', 'delete_inference_application',
+ 'delete_inference_instance', 'delete_k8s_cluster_pool_v2',
+ 'delete_k8s_cluster_v2', 'delete_l7policy', 'delete_l7rule',
+ 'delete_lblistener', 'delete_lbmember', 'delete_lbmetadata', 'delete_lbpool',
+ 'delete_loadbalancer', 'delete_network', 'delete_project',
+ 'delete_reserved_fixed_ip', 'delete_router', 'delete_secret',
+ 'delete_servergroup', 'delete_sfs', 'delete_snapshot', 'delete_subnet',
+ 'delete_vm', 'delete_volume', 'detach_vm_interface', 'detach_volume',
+ 'download_image', 'downscale_ai_cluster_gpu', 'downscale_gpu_virtual_cluster',
+ 'extend_sfs', 'extend_volume', 'failover_loadbalancer',
+ 'hard_reboot_gpu_baremetal_server', 'hard_reboot_gpu_virtual_cluster',
+ 'hard_reboot_gpu_virtual_server', 'hard_reboot_vm', 'patch_caas_container',
+ 'patch_dbaas_postgres_cluster', 'patch_faas_function', 'patch_faas_namespace',
+ 'patch_lblistener', 'patch_lbpool', 'put_into_server_group', 'put_l7rule',
+ 'rebuild_bm', 'rebuild_gpu_baremetal_node', 'remove_from_server_group',
+ 'replace_lbmetadata', 'resize_k8s_cluster_v2', 'resize_loadbalancer',
+ 'resize_vm', 'resume_vm', 'revert_volume', 'soft_reboot_gpu_baremetal_server',
+ 'soft_reboot_gpu_virtual_cluster', 'soft_reboot_gpu_virtual_server',
+ 'soft_reboot_vm', 'start_gpu_baremetal_server', 'start_gpu_virtual_cluster',
+ 'start_gpu_virtual_server', 'start_vm', 'stop_gpu_baremetal_server',
+ 'stop_gpu_virtual_cluster', 'stop_gpu_virtual_server', 'stop_vm', 'suspend_vm',
+ 'sync_private_flavors', 'update_ddos_profile', 'update_floating_ip',
+ 'update_inference_application', 'update_inference_instance',
+ 'update_k8s_cluster_v2', 'update_l7policy', 'update_lbmetadata',
+ 'update_port_allowed_address_pairs', 'update_router', 'update_security_group',
+ 'update_sfs', 'update_tags_gpu_virtual_cluster', 'upgrade_k8s_cluster_v2',
+ 'upscale_ai_cluster_gpu', 'upscale_gpu_virtual_cluster']
to_timestamp: ISO formatted datetime string. Filter the tasks by creation date less than or
equal to `to_timestamp`
@@ -453,60 +448,55 @@ def list(
region_id: The region ID to filter the tasks by region. Supports multiple values of kind
key=value1&key=value2
- sorting: (DEPRECATED Use '`order_by`' instead) Sorting by creation date. Oldest first, or
+ sorting: (DEPRECATED Use 'order_by' instead) Sorting by creation date. Oldest first, or
most recent first
state: Filter the tasks by state. Supports multiple values of kind
key=value1&key=value2
- task_type: Filter the tasks by their type one of ['`activate_ddos_profile`',
- '`attach_bm_to_reserved_fixed_ip`', '`attach_vm_interface`',
- '`attach_vm_to_reserved_fixed_ip`', '`attach_volume`',
- '`create_ai_cluster_gpu`', '`create_bm`', '`create_caas_container`',
- '`create_dbaas_postgres_cluster`', '`create_ddos_profile`',
- '`create_faas_function`', '`create_faas_namespace`', '`create_fip`',
- '`create_gpu_virtual_cluster`', '`create_image`',
- '`create_inference_application`', '`create_inference_instance`',
- '`create_k8s_cluster_pool_v2`', '`create_k8s_cluster_v2`', '`create_l7policy`',
- '`create_l7rule`', '`create_lblistener`', '`create_lbmember`',
- '`create_lbpool`', '`create_lbpool_health_monitor`', '`create_loadbalancer`',
- '`create_network`', '`create_reserved_fixed_ip`', '`create_router`',
- '`create_secret`', '`create_security_group`', '`create_servergroup`',
- '`create_sfs`', '`create_snapshot`', '`create_subnet`', '`create_vm`',
- '`create_volume`', '`deactivate_ddos_profile`', '`delete_ai_cluster_gpu`',
- '`delete_caas_container`', '`delete_dbaas_postgres_cluster`',
- '`delete_ddos_profile`', '`delete_faas_function`', '`delete_faas_namespace`',
- '`delete_fip`', '`delete_gpu_virtual_cluster`', '`delete_gpu_virtual_server`',
- '`delete_image`', '`delete_inference_application`',
- '`delete_inference_instance`', '`delete_k8s_cluster_pool_v2`',
- '`delete_k8s_cluster_v2`', '`delete_l7policy`', '`delete_l7rule`',
- '`delete_lblistener`', '`delete_lbmember`', '`delete_lbmetadata`',
- '`delete_lbpool`', '`delete_loadbalancer`', '`delete_network`',
- '`delete_project`', '`delete_reserved_fixed_ip`', '`delete_router`',
- '`delete_secret`', '`delete_servergroup`', '`delete_sfs`', '`delete_snapshot`',
- '`delete_subnet`', '`delete_vm`', '`delete_volume`', '`detach_vm_interface`',
- '`detach_volume`', '`download_image`', '`downscale_ai_cluster_gpu`',
- '`downscale_gpu_virtual_cluster`', '`extend_sfs`', '`extend_volume`',
- '`failover_loadbalancer`', '`hard_reboot_gpu_baremetal_server`',
- '`hard_reboot_gpu_virtual_cluster`', '`hard_reboot_gpu_virtual_server`',
- '`hard_reboot_vm`', '`patch_caas_container`', '`patch_dbaas_postgres_cluster`',
- '`patch_faas_function`', '`patch_faas_namespace`', '`patch_lblistener`',
- '`patch_lbpool`', '`put_into_server_group`', '`put_l7rule`', '`rebuild_bm`',
- '`rebuild_gpu_baremetal_node`', '`remove_from_server_group`',
- '`replace_lbmetadata`', '`resize_k8s_cluster_v2`', '`resize_loadbalancer`',
- '`resize_vm`', '`resume_vm`', '`revert_volume`',
- '`soft_reboot_gpu_baremetal_server`', '`soft_reboot_gpu_virtual_cluster`',
- '`soft_reboot_gpu_virtual_server`', '`soft_reboot_vm`',
- '`start_gpu_baremetal_server`', '`start_gpu_virtual_cluster`',
- '`start_gpu_virtual_server`', '`start_vm`', '`stop_gpu_baremetal_server`',
- '`stop_gpu_virtual_cluster`', '`stop_gpu_virtual_server`', '`stop_vm`',
- '`suspend_vm`', '`sync_private_flavors`', '`update_ddos_profile`',
- '`update_floating_ip`', '`update_inference_application`',
- '`update_inference_instance`', '`update_k8s_cluster_v2`', '`update_l7policy`',
- '`update_lbmetadata`', '`update_port_allowed_address_pairs`', '`update_router`',
- '`update_security_group`', '`update_sfs`', '`update_tags_gpu_virtual_cluster`',
- '`upgrade_k8s_cluster_v2`', '`upscale_ai_cluster_gpu`',
- '`upscale_gpu_virtual_cluster`']
+ task_type: Filter the tasks by their type one of ['activate_ddos_profile',
+ 'attach_bm_to_reserved_fixed_ip', 'attach_vm_interface',
+ 'attach_vm_to_reserved_fixed_ip', 'attach_volume', 'create_ai_cluster_gpu',
+ 'create_bm', 'create_caas_container', 'create_dbaas_postgres_cluster',
+ 'create_ddos_profile', 'create_faas_function', 'create_faas_namespace',
+ 'create_fip', 'create_gpu_virtual_cluster', 'create_image',
+ 'create_inference_application', 'create_inference_instance',
+ 'create_k8s_cluster_pool_v2', 'create_k8s_cluster_v2', 'create_l7policy',
+ 'create_l7rule', 'create_lblistener', 'create_lbmember', 'create_lbpool',
+ 'create_lbpool_health_monitor', 'create_loadbalancer', 'create_network',
+ 'create_reserved_fixed_ip', 'create_router', 'create_secret',
+ 'create_security_group', 'create_servergroup', 'create_sfs', 'create_snapshot',
+ 'create_subnet', 'create_vm', 'create_volume', 'deactivate_ddos_profile',
+ 'delete_ai_cluster_gpu', 'delete_caas_container',
+ 'delete_dbaas_postgres_cluster', 'delete_ddos_profile', 'delete_faas_function',
+ 'delete_faas_namespace', 'delete_fip', 'delete_gpu_virtual_cluster',
+ 'delete_gpu_virtual_server', 'delete_image', 'delete_inference_application',
+ 'delete_inference_instance', 'delete_k8s_cluster_pool_v2',
+ 'delete_k8s_cluster_v2', 'delete_l7policy', 'delete_l7rule',
+ 'delete_lblistener', 'delete_lbmember', 'delete_lbmetadata', 'delete_lbpool',
+ 'delete_loadbalancer', 'delete_network', 'delete_project',
+ 'delete_reserved_fixed_ip', 'delete_router', 'delete_secret',
+ 'delete_servergroup', 'delete_sfs', 'delete_snapshot', 'delete_subnet',
+ 'delete_vm', 'delete_volume', 'detach_vm_interface', 'detach_volume',
+ 'download_image', 'downscale_ai_cluster_gpu', 'downscale_gpu_virtual_cluster',
+ 'extend_sfs', 'extend_volume', 'failover_loadbalancer',
+ 'hard_reboot_gpu_baremetal_server', 'hard_reboot_gpu_virtual_cluster',
+ 'hard_reboot_gpu_virtual_server', 'hard_reboot_vm', 'patch_caas_container',
+ 'patch_dbaas_postgres_cluster', 'patch_faas_function', 'patch_faas_namespace',
+ 'patch_lblistener', 'patch_lbpool', 'put_into_server_group', 'put_l7rule',
+ 'rebuild_bm', 'rebuild_gpu_baremetal_node', 'remove_from_server_group',
+ 'replace_lbmetadata', 'resize_k8s_cluster_v2', 'resize_loadbalancer',
+ 'resize_vm', 'resume_vm', 'revert_volume', 'soft_reboot_gpu_baremetal_server',
+ 'soft_reboot_gpu_virtual_cluster', 'soft_reboot_gpu_virtual_server',
+ 'soft_reboot_vm', 'start_gpu_baremetal_server', 'start_gpu_virtual_cluster',
+ 'start_gpu_virtual_server', 'start_vm', 'stop_gpu_baremetal_server',
+ 'stop_gpu_virtual_cluster', 'stop_gpu_virtual_server', 'stop_vm', 'suspend_vm',
+ 'sync_private_flavors', 'update_ddos_profile', 'update_floating_ip',
+ 'update_inference_application', 'update_inference_instance',
+ 'update_k8s_cluster_v2', 'update_l7policy', 'update_lbmetadata',
+ 'update_port_allowed_address_pairs', 'update_router', 'update_security_group',
+ 'update_sfs', 'update_tags_gpu_virtual_cluster', 'upgrade_k8s_cluster_v2',
+ 'upscale_ai_cluster_gpu', 'upscale_gpu_virtual_cluster']
to_timestamp: ISO formatted datetime string. Filter the tasks by creation date less than or
equal to `to_timestamp`
diff --git a/src/gcore/resources/cloud/volume_snapshots.py b/src/gcore/resources/cloud/volume_snapshots.py
index fefcddb8..a8b6850a 100644
--- a/src/gcore/resources/cloud/volume_snapshots.py
+++ b/src/gcore/resources/cloud/volume_snapshots.py
@@ -145,20 +145,15 @@ def update(
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
@@ -402,20 +397,15 @@ async def update(
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
diff --git a/src/gcore/resources/cloud/volumes.py b/src/gcore/resources/cloud/volumes.py
index bbb9904e..28bd9ea0 100644
--- a/src/gcore/resources/cloud/volumes.py
+++ b/src/gcore/resources/cloud/volumes.py
@@ -350,20 +350,15 @@ def update(
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
@@ -1599,20 +1594,15 @@ async def update(
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
diff --git a/src/gcore/resources/streaming/ai_tasks.py b/src/gcore/resources/streaming/ai_tasks.py
index 6811e64c..bb85c829 100644
--- a/src/gcore/resources/streaming/ai_tasks.py
+++ b/src/gcore/resources/streaming/ai_tasks.py
@@ -331,7 +331,7 @@ def create(
processing.
subtitles_language: Indicates which language it is clearly necessary to translate into. If this is
- not set, the original language will be used from attribute "`audio_language`".
+ not set, the original language will be used from attribute "audio_language".
Please note that:
@@ -402,8 +402,7 @@ def list(
ordering: Which field to use when ordering the results: `task_id`, status, and
`task_name`. Sorting is done in ascending (ASC) order.
- If parameter is omitted then "`started_at` DESC" is used for ordering by
- default.
+ If parameter is omitted then "started_at DESC" is used for ordering by default.
page: Page to view from task list, starting from 1
@@ -588,8 +587,8 @@ def get_ai_settings(
Parameter sections:
- - "`language_support`" – AI Translation: check if a language pair is supported
- or not for AI translation.
+ - "language_support" – AI Translation: check if a language pair is supported or
+ not for AI translation.
- this list will expand as new AI methods are added.
**`language_support`**
@@ -597,7 +596,7 @@ def get_ai_settings(
There are many languages available for transcription. But not all languages can
be automatically translated to and from with good quality. In order to determine
the availability of translation from the audio language to the desired subtitle
- language, you can use this type of "`language_support`".
+ language, you can use this type of "language_support".
AI models are constantly improving, so this method can be used for dynamic
determination.
@@ -963,7 +962,7 @@ async def create(
processing.
subtitles_language: Indicates which language it is clearly necessary to translate into. If this is
- not set, the original language will be used from attribute "`audio_language`".
+ not set, the original language will be used from attribute "audio_language".
Please note that:
@@ -1034,8 +1033,7 @@ def list(
ordering: Which field to use when ordering the results: `task_id`, status, and
`task_name`. Sorting is done in ascending (ASC) order.
- If parameter is omitted then "`started_at` DESC" is used for ordering by
- default.
+ If parameter is omitted then "started_at DESC" is used for ordering by default.
page: Page to view from task list, starting from 1
@@ -1220,8 +1218,8 @@ async def get_ai_settings(
Parameter sections:
- - "`language_support`" – AI Translation: check if a language pair is supported
- or not for AI translation.
+ - "language_support" – AI Translation: check if a language pair is supported or
+ not for AI translation.
- this list will expand as new AI methods are added.
**`language_support`**
@@ -1229,7 +1227,7 @@ async def get_ai_settings(
There are many languages available for transcription. But not all languages can
be automatically translated to and from with good quality. In order to determine
the availability of translation from the audio language to the desired subtitle
- language, you can use this type of "`language_support`".
+ language, you can use this type of "language_support".
AI models are constantly improving, so this method can be used for dynamic
determination.
diff --git a/src/gcore/resources/streaming/directories.py b/src/gcore/resources/streaming/directories.py
index 3c45afb6..00a379cc 100644
--- a/src/gcore/resources/streaming/directories.py
+++ b/src/gcore/resources/streaming/directories.py
@@ -100,7 +100,7 @@ def update(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> DirectoryBase:
"""
- Change a directory name or move to another "`parent_id`".
+ Change a directory name or move to another "parent_id".
Args:
name: Title of the directory. Omit this if you don't want to change.
@@ -307,7 +307,7 @@ async def update(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> DirectoryBase:
"""
- Change a directory name or move to another "`parent_id`".
+ Change a directory name or move to another "parent_id".
Args:
name: Title of the directory. Omit this if you don't want to change.
diff --git a/src/gcore/resources/streaming/playlists.py b/src/gcore/resources/streaming/playlists.py
index 60629d9e..fe1f49db 100644
--- a/src/gcore/resources/streaming/playlists.py
+++ b/src/gcore/resources/streaming/playlists.py
@@ -159,7 +159,7 @@ def create(
hls_cmaf_url: A URL to a master playlist HLS (master-cmaf.m3u8) with CMAF-based chunks. Chunks
are in fMP4 container.
- It is possible to use the same suffix-options as described in the "`hls_url`"
+ It is possible to use the same suffix-options as described in the "hls_url"
attribute.
Caution. Solely master.m3u8 (and master[-options].m3u8) is officially documented
@@ -294,7 +294,7 @@ def update(
hls_cmaf_url: A URL to a master playlist HLS (master-cmaf.m3u8) with CMAF-based chunks. Chunks
are in fMP4 container.
- It is possible to use the same suffix-options as described in the "`hls_url`"
+ It is possible to use the same suffix-options as described in the "hls_url"
attribute.
Caution. Solely master.m3u8 (and master[-options].m3u8) is officially documented
@@ -648,7 +648,7 @@ async def create(
hls_cmaf_url: A URL to a master playlist HLS (master-cmaf.m3u8) with CMAF-based chunks. Chunks
are in fMP4 container.
- It is possible to use the same suffix-options as described in the "`hls_url`"
+ It is possible to use the same suffix-options as described in the "hls_url"
attribute.
Caution. Solely master.m3u8 (and master[-options].m3u8) is officially documented
@@ -783,7 +783,7 @@ async def update(
hls_cmaf_url: A URL to a master playlist HLS (master-cmaf.m3u8) with CMAF-based chunks. Chunks
are in fMP4 container.
- It is possible to use the same suffix-options as described in the "`hls_url`"
+ It is possible to use the same suffix-options as described in the "hls_url"
attribute.
Caution. Solely master.m3u8 (and master[-options].m3u8) is officially documented
diff --git a/src/gcore/resources/streaming/quality_sets.py b/src/gcore/resources/streaming/quality_sets.py
index a860d454..4aff7843 100644
--- a/src/gcore/resources/streaming/quality_sets.py
+++ b/src/gcore/resources/streaming/quality_sets.py
@@ -129,13 +129,13 @@ def set_default(
Live transcoding management:
- You can specify quality set explicitly in POST /streams method, look at
- attribute "`quality_set_id`".
+ attribute "quality_set_id".
- Otherwise these default values will be used by the system by default.
VOD transcoding management:
- You can specify quality set explicitly in POST /videos method, look at
- attribute "`quality_set_id`".
+ attribute "quality_set_id".
- Otherwise these default values will be used by the system by default.
Args:
@@ -271,13 +271,13 @@ async def set_default(
Live transcoding management:
- You can specify quality set explicitly in POST /streams method, look at
- attribute "`quality_set_id`".
+ attribute "quality_set_id".
- Otherwise these default values will be used by the system by default.
VOD transcoding management:
- You can specify quality set explicitly in POST /videos method, look at
- attribute "`quality_set_id`".
+ attribute "quality_set_id".
- Otherwise these default values will be used by the system by default.
Args:
diff --git a/src/gcore/resources/streaming/statistics.py b/src/gcore/resources/streaming/statistics.py
index 82b2a1f6..aa67b732 100644
--- a/src/gcore/resources/streaming/statistics.py
+++ b/src/gcore/resources/streaming/statistics.py
@@ -177,11 +177,11 @@ def get_live_unique_viewers(
to: End of time frame. Format is date time in ISO 8601
- client_user_id: Filter by "`client_user_id`"
+ client_user_id: Filter by "client_user_id"
granularity: Specifies the time interval for grouping data
- stream_id: Filter by "`stream_id`"
+ stream_id: Filter by "stream_id"
extra_headers: Send extra headers
@@ -243,7 +243,7 @@ def get_live_watch_time_cdn(
from_: Start of the time period for counting minutes of watching. Format is date time
in ISO 8601.
- client_user_id: Filter by field "`client_user_id`"
+ client_user_id: Filter by field "client_user_id"
granularity: Data is grouped by the specified time interval
@@ -304,7 +304,7 @@ def get_live_watch_time_total_cdn(
player the views were made with.
Args:
- client_user_id: Filter by field "`client_user_id`"
+ client_user_id: Filter by field "client_user_id"
from_: Start of the time period for counting minutes of watching. Format is date time
in ISO 8601. If omitted, the earliest start time for viewing is taken
@@ -1393,7 +1393,7 @@ def get_vod_watch_time_cdn(
from_: Start of the time period for counting minutes of watching. Format is date time
in ISO 8601.
- client_user_id: Filter by field "`client_user_id`"
+ client_user_id: Filter by field "client_user_id"
granularity: Data is grouped by the specified time interval
@@ -1454,7 +1454,7 @@ def get_vod_watch_time_total_cdn(
player the views were made with.
Args:
- client_user_id: Filter by field "`client_user_id`"
+ client_user_id: Filter by field "client_user_id"
from_: Start of the time period for counting minutes of watching. Format is date time
in ISO 8601. If omitted, the earliest start time for viewing is taken
@@ -1604,11 +1604,11 @@ async def get_live_unique_viewers(
to: End of time frame. Format is date time in ISO 8601
- client_user_id: Filter by "`client_user_id`"
+ client_user_id: Filter by "client_user_id"
granularity: Specifies the time interval for grouping data
- stream_id: Filter by "`stream_id`"
+ stream_id: Filter by "stream_id"
extra_headers: Send extra headers
@@ -1670,7 +1670,7 @@ async def get_live_watch_time_cdn(
from_: Start of the time period for counting minutes of watching. Format is date time
in ISO 8601.
- client_user_id: Filter by field "`client_user_id`"
+ client_user_id: Filter by field "client_user_id"
granularity: Data is grouped by the specified time interval
@@ -1731,7 +1731,7 @@ async def get_live_watch_time_total_cdn(
player the views were made with.
Args:
- client_user_id: Filter by field "`client_user_id`"
+ client_user_id: Filter by field "client_user_id"
from_: Start of the time period for counting minutes of watching. Format is date time
in ISO 8601. If omitted, the earliest start time for viewing is taken
@@ -2820,7 +2820,7 @@ async def get_vod_watch_time_cdn(
from_: Start of the time period for counting minutes of watching. Format is date time
in ISO 8601.
- client_user_id: Filter by field "`client_user_id`"
+ client_user_id: Filter by field "client_user_id"
granularity: Data is grouped by the specified time interval
@@ -2881,7 +2881,7 @@ async def get_vod_watch_time_total_cdn(
player the views were made with.
Args:
- client_user_id: Filter by field "`client_user_id`"
+ client_user_id: Filter by field "client_user_id"
from_: Start of the time period for counting minutes of watching. Format is date time
in ISO 8601. If omitted, the earliest start time for viewing is taken
diff --git a/src/gcore/resources/streaming/streams/streams.py b/src/gcore/resources/streaming/streams/streams.py
index 35a3bfca..5fc4b7c5 100644
--- a/src/gcore/resources/streaming/streams/streams.py
+++ b/src/gcore/resources/streaming/streams/streams.py
@@ -242,7 +242,7 @@ def create(
requests and the stream is deactivated (the "active" field switches to "false").
Please, note that this field is for PULL only, so is not suitable for PUSH. Look
- at fields "`push_url`" and "`push_url_srt`" from GET method.
+ at fields "push_url" and "push_url_srt" from GET method.
extra_headers: Send extra headers
@@ -384,8 +384,8 @@ def delete(
is impossible to restore data and files after this.
But if the live had recordings, they continue to remain independent Video
- entities. The "`stream_id`" parameter will simply point to a stream that no
- longer exists.
+ entities. The "stream_id" parameter will simply point to a stream that no longer
+ exists.
Perhaps, instead of deleting, you may use the stream deactivation:
@@ -503,7 +503,7 @@ def create_clip(
**Cutting a clip from a source:**
In order to use clips recording feature, DVR must be enabled for a stream:
- "`dvr_enabled`: true". The DVR serves as a source for creating clips:
+ "dvr_enabled: true". The DVR serves as a source for creating clips:
- By default live stream DVR is set to 1 hour (3600 seconds). You can create an
instant clip using any segment of this time period by specifying the desired
@@ -532,7 +532,7 @@ def create_clip(
can be added to left and right.
Duration of cutted segment cannot be greater than DVR duration for this stream.
- Therefore, to change the maximum, use "`dvr_duration`" parameter of this stream.
+ Therefore, to change the maximum, use "dvr_duration" parameter of this stream.
expiration: Expire time of the clip via a public link.
@@ -635,7 +635,7 @@ def list_clips(
Get list of non expired instant clips for a stream.
You can now use both MP4 just-in-time packager and HLS for all clips. Get URLs
- from "`hls_master`" and "`mp4_master`".
+ from "hls_master" and "mp4_master".
**How to download renditions of clips:**
@@ -689,22 +689,22 @@ def start_recording(
separate video VOD:
- ID of the stream from which the recording was organized is added to
- "`stream_id`" field. You can find the video by that value later.
+ "stream_id" field. You can find the video by that value later.
- Title of the video is based on pattern "Stream Record: {`stream_title`},
{`recording_end_time_utc`}".
- - Recording start time is stored in "`recording_started_at`" field.
+ - Recording start time is stored in "recording_started_at" field.
- You can record the original stream or the transcoded one. Only the transcoded
version will contain overlays. Set the appropriate recording method when
creating the stream or before calling this recording method. Details in the
- "`record_type`" parameter of the stream.
+ "record_type" parameter of the stream.
- If you have access to the premium feature of saving the original stream (so
not just transcoded renditions), then the link to the original file will be in
- the "`origin_url`" field. Look at the description of the field how to use it.
+ the "origin_url" field. Look at the description of the field how to use it.
Stream must be live for the recording to start, please check fields "live"
- and/or "`backup_live`". After the recording starts, field "recording" will
- switch to "true", and the recording duration in seconds will appear in the
- "`recording_duration`" field.
+ and/or "backup_live". After the recording starts, field "recording" will switch
+ to "true", and the recording duration in seconds will appear in the
+ "recording_duration" field.
Please, keep in mind that recording doesn't start instantly, it takes ±3-7
seconds to initialize the process after executing this method.
@@ -980,7 +980,7 @@ async def create(
requests and the stream is deactivated (the "active" field switches to "false").
Please, note that this field is for PULL only, so is not suitable for PUSH. Look
- at fields "`push_url`" and "`push_url_srt`" from GET method.
+ at fields "push_url" and "push_url_srt" from GET method.
extra_headers: Send extra headers
@@ -1122,8 +1122,8 @@ async def delete(
is impossible to restore data and files after this.
But if the live had recordings, they continue to remain independent Video
- entities. The "`stream_id`" parameter will simply point to a stream that no
- longer exists.
+ entities. The "stream_id" parameter will simply point to a stream that no longer
+ exists.
Perhaps, instead of deleting, you may use the stream deactivation:
@@ -1241,7 +1241,7 @@ async def create_clip(
**Cutting a clip from a source:**
In order to use clips recording feature, DVR must be enabled for a stream:
- "`dvr_enabled`: true". The DVR serves as a source for creating clips:
+ "dvr_enabled: true". The DVR serves as a source for creating clips:
- By default live stream DVR is set to 1 hour (3600 seconds). You can create an
instant clip using any segment of this time period by specifying the desired
@@ -1270,7 +1270,7 @@ async def create_clip(
can be added to left and right.
Duration of cutted segment cannot be greater than DVR duration for this stream.
- Therefore, to change the maximum, use "`dvr_duration`" parameter of this stream.
+ Therefore, to change the maximum, use "dvr_duration" parameter of this stream.
expiration: Expire time of the clip via a public link.
@@ -1373,7 +1373,7 @@ async def list_clips(
Get list of non expired instant clips for a stream.
You can now use both MP4 just-in-time packager and HLS for all clips. Get URLs
- from "`hls_master`" and "`mp4_master`".
+ from "hls_master" and "mp4_master".
**How to download renditions of clips:**
@@ -1427,22 +1427,22 @@ async def start_recording(
separate video VOD:
- ID of the stream from which the recording was organized is added to
- "`stream_id`" field. You can find the video by that value later.
+ "stream_id" field. You can find the video by that value later.
- Title of the video is based on pattern "Stream Record: {`stream_title`},
{`recording_end_time_utc`}".
- - Recording start time is stored in "`recording_started_at`" field.
+ - Recording start time is stored in "recording_started_at" field.
- You can record the original stream or the transcoded one. Only the transcoded
version will contain overlays. Set the appropriate recording method when
creating the stream or before calling this recording method. Details in the
- "`record_type`" parameter of the stream.
+ "record_type" parameter of the stream.
- If you have access to the premium feature of saving the original stream (so
not just transcoded renditions), then the link to the original file will be in
- the "`origin_url`" field. Look at the description of the field how to use it.
+ the "origin_url" field. Look at the description of the field how to use it.
Stream must be live for the recording to start, please check fields "live"
- and/or "`backup_live`". After the recording starts, field "recording" will
- switch to "true", and the recording duration in seconds will appear in the
- "`recording_duration`" field.
+ and/or "backup_live". After the recording starts, field "recording" will switch
+ to "true", and the recording duration in seconds will appear in the
+ "recording_duration" field.
Please, keep in mind that recording doesn't start instantly, it takes ±3-7
seconds to initialize the process after executing this method.
diff --git a/src/gcore/resources/streaming/videos/subtitles.py b/src/gcore/resources/streaming/videos/subtitles.py
index 5930fd58..c483d4b5 100644
--- a/src/gcore/resources/streaming/videos/subtitles.py
+++ b/src/gcore/resources/streaming/videos/subtitles.py
@@ -74,7 +74,7 @@ def create(
Language is 3-letter language code according to ISO-639-2 (bibliographic code).
Specify language you need, or just look at our list in the attribute
- "`audio_language`" of section
+ "audio_language" of section
["AI Speech Recognition"](/docs/api-reference/streaming/ai/create-ai-asr-task).
You can add multiple subtitles in the same language, language uniqueness is not
@@ -351,7 +351,7 @@ async def create(
Language is 3-letter language code according to ISO-639-2 (bibliographic code).
Specify language you need, or just look at our list in the attribute
- "`audio_language`" of section
+ "audio_language" of section
["AI Speech Recognition"](/docs/api-reference/streaming/ai/create-ai-asr-task).
You can add multiple subtitles in the same language, language uniqueness is not
diff --git a/src/gcore/resources/streaming/videos/videos.py b/src/gcore/resources/streaming/videos/videos.py
index cc829118..60c435c3 100644
--- a/src/gcore/resources/streaming/videos/videos.py
+++ b/src/gcore/resources/streaming/videos/videos.py
@@ -93,7 +93,6 @@ def create(
execution file will be uploaded and will be sent to transcoding automatically,
you don't have to do anything else. Use extra field `origin_http_headers` if
authorization is required on the external server.
-
- **Direct upload from a local device** – If you need to upload video directly
from your local device or from a mobile app, then use this method. Keep
`origin_url` empty and use TUS protocol ([tus.io](https://tus.io)) to upload
@@ -202,7 +201,7 @@ def update(
It's allowed to update only those public parameters that are described in POST
method to create a new “video” entity. So it's not possible to change calculated
- parameters like "id", "duration", "`hls_url`", etc.
+ parameters like "id", "duration", "hls_url", etc.
Examples of changing:
@@ -211,9 +210,9 @@ def update(
Please note that some parameters are used on initial step (before transcoding)
only, so after transcoding there is no use in changing their values. For
- example, "`origin_url`" parameter is used for downloading an original file from
- a source and never used after transcoding; or "priority" parameter is used to
- set priority of processing and never used after transcoding.
+ example, "origin_url" parameter is used for downloading an original file from a
+ source and never used after transcoding; or "priority" parameter is used to set
+ priority of processing and never used after transcoding.
Args:
name: Video name
@@ -294,16 +293,16 @@ def update(
directory_id: ID of the directory where the video should be uploaded. (beta)
origin_http_headers: Authorization HTTP request header. Will be used as credentials to authenticate a
- request to download a file (specified in "`origin_url`" parameter) on an
- external server.
+ request to download a file (specified in "origin_url" parameter) on an external
+ server.
Syntax: `Authorization: `
Examples:
- - "`origin_http_headers`": "Authorization: Basic ..."
- - "`origin_http_headers`": "Authorization: Bearer ..."
- - "`origin_http_headers`": "Authorization: APIKey ..." Example of usage when
+ - "origin_http_headers": "Authorization: Basic ..."
+ - "origin_http_headers": "Authorization: Bearer ..."
+ - "origin_http_headers": "Authorization: APIKey ..." Example of usage when
downloading a file from Google Drive:
```
@@ -325,7 +324,7 @@ def update(
After uploading the video, the system will automatically create several
screenshots (they will be stored in "screenshots" attribute) from which you can
select an default screenshot. This "poster" field is for uploading your own
- image. Also use attribute "`screenshot_id`" to select poster as a default
+ image. Also use attribute "screenshot_id" to select poster as a default
screnshot.
Attribute accepts single image as base64-encoded string
@@ -476,7 +475,7 @@ def list(
id: IDs of the videos to find. You can specify one or more identifiers separated by
commas. Example, ?id=1,101,1001
- client_user_id: Find videos where "`client_user_id`" meta field is equal to the search value
+ client_user_id: Find videos where "client_user_id" meta field is equal to the search value
fields: Restriction to return only the specified attributes, instead of the entire
dataset. Specify, if you need to get short response. The following fields are
@@ -505,7 +504,7 @@ def list(
- ready
- error
- stream_id: Find videos recorded from a specific stream, so for which "`stream_id`" field is
+ stream_id: Find videos recorded from a specific stream, so for which "stream_id" field is
equal to the search value
extra_headers: Send extra headers
@@ -841,7 +840,6 @@ async def create(
execution file will be uploaded and will be sent to transcoding automatically,
you don't have to do anything else. Use extra field `origin_http_headers` if
authorization is required on the external server.
-
- **Direct upload from a local device** – If you need to upload video directly
from your local device or from a mobile app, then use this method. Keep
`origin_url` empty and use TUS protocol ([tus.io](https://tus.io)) to upload
@@ -950,7 +948,7 @@ async def update(
It's allowed to update only those public parameters that are described in POST
method to create a new “video” entity. So it's not possible to change calculated
- parameters like "id", "duration", "`hls_url`", etc.
+ parameters like "id", "duration", "hls_url", etc.
Examples of changing:
@@ -959,9 +957,9 @@ async def update(
Please note that some parameters are used on initial step (before transcoding)
only, so after transcoding there is no use in changing their values. For
- example, "`origin_url`" parameter is used for downloading an original file from
- a source and never used after transcoding; or "priority" parameter is used to
- set priority of processing and never used after transcoding.
+ example, "origin_url" parameter is used for downloading an original file from a
+ source and never used after transcoding; or "priority" parameter is used to set
+ priority of processing and never used after transcoding.
Args:
name: Video name
@@ -1042,16 +1040,16 @@ async def update(
directory_id: ID of the directory where the video should be uploaded. (beta)
origin_http_headers: Authorization HTTP request header. Will be used as credentials to authenticate a
- request to download a file (specified in "`origin_url`" parameter) on an
- external server.
+ request to download a file (specified in "origin_url" parameter) on an external
+ server.
Syntax: `Authorization: `
Examples:
- - "`origin_http_headers`": "Authorization: Basic ..."
- - "`origin_http_headers`": "Authorization: Bearer ..."
- - "`origin_http_headers`": "Authorization: APIKey ..." Example of usage when
+ - "origin_http_headers": "Authorization: Basic ..."
+ - "origin_http_headers": "Authorization: Bearer ..."
+ - "origin_http_headers": "Authorization: APIKey ..." Example of usage when
downloading a file from Google Drive:
```
@@ -1073,7 +1071,7 @@ async def update(
After uploading the video, the system will automatically create several
screenshots (they will be stored in "screenshots" attribute) from which you can
select an default screenshot. This "poster" field is for uploading your own
- image. Also use attribute "`screenshot_id`" to select poster as a default
+ image. Also use attribute "screenshot_id" to select poster as a default
screnshot.
Attribute accepts single image as base64-encoded string
@@ -1224,7 +1222,7 @@ def list(
id: IDs of the videos to find. You can specify one or more identifiers separated by
commas. Example, ?id=1,101,1001
- client_user_id: Find videos where "`client_user_id`" meta field is equal to the search value
+ client_user_id: Find videos where "client_user_id" meta field is equal to the search value
fields: Restriction to return only the specified attributes, instead of the entire
dataset. Specify, if you need to get short response. The following fields are
@@ -1253,7 +1251,7 @@ def list(
- ready
- error
- stream_id: Find videos recorded from a specific stream, so for which "`stream_id`" field is
+ stream_id: Find videos recorded from a specific stream, so for which "stream_id" field is
equal to the search value
extra_headers: Send extra headers
diff --git a/src/gcore/resources/waap/domains/advanced_rules.py b/src/gcore/resources/waap/domains/advanced_rules.py
index f46e4f46..87e9e974 100644
--- a/src/gcore/resources/waap/domains/advanced_rules.py
+++ b/src/gcore/resources/waap/domains/advanced_rules.py
@@ -89,10 +89,10 @@ def create(
The "access" phase is responsible for modifying the request before it is sent to
the origin server.
- The "`header_filter`" phase is responsible for modifying the HTTP headers of a
+ The "header_filter" phase is responsible for modifying the HTTP headers of a
response before they are sent back to the client.
- The "`body_filter`" phase is responsible for modifying the body of a response
+ The "body_filter" phase is responsible for modifying the body of a response
before it is sent back to the client.
extra_headers: Send extra headers
@@ -161,10 +161,10 @@ def update(
The "access" phase is responsible for modifying the request before it is sent to
the origin server.
- The "`header_filter`" phase is responsible for modifying the HTTP headers of a
+ The "header_filter" phase is responsible for modifying the HTTP headers of a
response before they are sent back to the client.
- The "`body_filter`" phase is responsible for modifying the body of a response
+ The "body_filter" phase is responsible for modifying the body of a response
before it is sent back to the client.
source: A CEL syntax expression that contains the rule's conditions. Allowed objects
@@ -263,10 +263,10 @@ def list(
The "access" phase is responsible for modifying the request before it is sent to
the origin server.
- The "`header_filter`" phase is responsible for modifying the HTTP headers of a
+ The "header_filter" phase is responsible for modifying the HTTP headers of a
response before they are sent back to the client.
- The "`body_filter`" phase is responsible for modifying the body of a response
+ The "body_filter" phase is responsible for modifying the body of a response
before it is sent back to the client.
extra_headers: Send extra headers
@@ -482,10 +482,10 @@ async def create(
The "access" phase is responsible for modifying the request before it is sent to
the origin server.
- The "`header_filter`" phase is responsible for modifying the HTTP headers of a
+ The "header_filter" phase is responsible for modifying the HTTP headers of a
response before they are sent back to the client.
- The "`body_filter`" phase is responsible for modifying the body of a response
+ The "body_filter" phase is responsible for modifying the body of a response
before it is sent back to the client.
extra_headers: Send extra headers
@@ -554,10 +554,10 @@ async def update(
The "access" phase is responsible for modifying the request before it is sent to
the origin server.
- The "`header_filter`" phase is responsible for modifying the HTTP headers of a
+ The "header_filter" phase is responsible for modifying the HTTP headers of a
response before they are sent back to the client.
- The "`body_filter`" phase is responsible for modifying the body of a response
+ The "body_filter" phase is responsible for modifying the body of a response
before it is sent back to the client.
source: A CEL syntax expression that contains the rule's conditions. Allowed objects
@@ -656,10 +656,10 @@ def list(
The "access" phase is responsible for modifying the request before it is sent to
the origin server.
- The "`header_filter`" phase is responsible for modifying the HTTP headers of a
+ The "header_filter" phase is responsible for modifying the HTTP headers of a
response before they are sent back to the client.
- The "`body_filter`" phase is responsible for modifying the body of a response
+ The "body_filter" phase is responsible for modifying the body of a response
before it is sent back to the client.
extra_headers: Send extra headers
diff --git a/src/gcore/types/cdn/cdn_metrics.py b/src/gcore/types/cdn/cdn_metrics.py
index 1922d524..de50e377 100644
--- a/src/gcore/types/cdn/cdn_metrics.py
+++ b/src/gcore/types/cdn/cdn_metrics.py
@@ -16,7 +16,7 @@ class CdnMetrics(BaseModel):
data: Optional[Data] = None
"""
If no grouping was requested then "data" holds an array of metric values. If at
- least one field is specified in "`group_by`" then "data" is an object whose
+ least one field is specified in "group_by" then "data" is an object whose
properties are groups, which may include other groups; the last group will hold
array of metrics values.
"""
diff --git a/src/gcore/types/cdn/cdn_resource.py b/src/gcore/types/cdn/cdn_resource.py
index 9f24e9f9..a1066729 100644
--- a/src/gcore/types/cdn/cdn_resource.py
+++ b/src/gcore/types/cdn/cdn_resource.py
@@ -225,11 +225,11 @@ class OptionsCors(BaseModel):
- **Adds \\** as the Access-Control-Allow-Origin header value** - Content will be
uploaded for requests from any domain. `"value": ["*"]`
- - **Adds "$`http_origin`" as the Access-Control-Allow-Origin header value if the
+ - **Adds "$http_origin" as the Access-Control-Allow-Origin header value if the
origin matches one of the listed domains** - Content will be uploaded only for
requests from the domains specified in the field.
`"value": ["domain.com", "second.dom.com"]`
- - **Adds "$`http_origin`" as the Access-Control-Allow-Origin header value** -
+ - **Adds "$http_origin" as the Access-Control-Allow-Origin header value** -
Content will be uploaded for requests from any domain, and the domain from
which the request was sent will be added to the "Access-Control-Allow-Origin"
header in the response. `"value": ["$http_origin"]`
@@ -821,9 +821,9 @@ class OptionsIPAddressACL(BaseModel):
Possible values:
- - **allow** - Allow access to all IPs except IPs specified in
- "`excepted_values`" field.
- - **deny** - Deny access to all IPs except IPs specified in "`excepted_values`"
+ - **allow** - Allow access to all IPs except IPs specified in "excepted_values"
+ field.
+ - **deny** - Deny access to all IPs except IPs specified in "excepted_values"
field.
"""
diff --git a/src/gcore/types/cdn/origin_group_create_params.py b/src/gcore/types/cdn/origin_group_create_params.py
index 540730d7..2c77824a 100644
--- a/src/gcore/types/cdn/origin_group_create_params.py
+++ b/src/gcore/types/cdn/origin_group_create_params.py
@@ -157,8 +157,8 @@ class AwsSignatureV4Auth(TypedDict, total=False):
- Latin letters (A-Z, a-z), numbers (0-9), pluses, slashes, dashes, colons and
underscores.
- - If "`s3_type`": amazon, length should be 40 characters.
- - If "`s3_type`": other, length should be from 16 to 255 characters.
+ - If "s3_type": amazon, length should be 40 characters.
+ - If "s3_type": other, length should be from 16 to 255 characters.
"""
s3_type: Required[str]
@@ -173,13 +173,13 @@ class AwsSignatureV4Auth(TypedDict, total=False):
s3_region: str
"""S3 storage region.
- The parameter is required, if "`s3_type`": amazon.
+ The parameter is required, if "s3_type": amazon.
"""
s3_storage_hostname: str
"""S3 storage hostname.
- The parameter is required, if "`s3_type`": other.
+ The parameter is required, if "s3_type": other.
"""
diff --git a/src/gcore/types/cdn/origin_group_replace_params.py b/src/gcore/types/cdn/origin_group_replace_params.py
index bfca4218..42086867 100644
--- a/src/gcore/types/cdn/origin_group_replace_params.py
+++ b/src/gcore/types/cdn/origin_group_replace_params.py
@@ -163,8 +163,8 @@ class AwsSignatureV4Auth(TypedDict, total=False):
- Latin letters (A-Z, a-z), numbers (0-9), pluses, slashes, dashes, colons and
underscores.
- - If "`s3_type`": amazon, length should be 40 characters.
- - If "`s3_type`": other, length should be from 16 to 255 characters.
+ - If "s3_type": amazon, length should be 40 characters.
+ - If "s3_type": other, length should be from 16 to 255 characters.
"""
s3_type: Required[str]
@@ -179,13 +179,13 @@ class AwsSignatureV4Auth(TypedDict, total=False):
s3_region: str
"""S3 storage region.
- The parameter is required, if "`s3_type`": amazon.
+ The parameter is required, if "s3_type": amazon.
"""
s3_storage_hostname: str
"""S3 storage hostname.
- The parameter is required, if "`s3_type`": other.
+ The parameter is required, if "s3_type": other.
"""
diff --git a/src/gcore/types/cdn/origin_group_update_params.py b/src/gcore/types/cdn/origin_group_update_params.py
index 09fe43f1..1b4efd18 100644
--- a/src/gcore/types/cdn/origin_group_update_params.py
+++ b/src/gcore/types/cdn/origin_group_update_params.py
@@ -163,8 +163,8 @@ class AwsSignatureV4Auth(TypedDict, total=False):
- Latin letters (A-Z, a-z), numbers (0-9), pluses, slashes, dashes, colons and
underscores.
- - If "`s3_type`": amazon, length should be 40 characters.
- - If "`s3_type`": other, length should be from 16 to 255 characters.
+ - If "s3_type": amazon, length should be 40 characters.
+ - If "s3_type": other, length should be from 16 to 255 characters.
"""
s3_type: Required[str]
@@ -179,13 +179,13 @@ class AwsSignatureV4Auth(TypedDict, total=False):
s3_region: str
"""S3 storage region.
- The parameter is required, if "`s3_type`": amazon.
+ The parameter is required, if "s3_type": amazon.
"""
s3_storage_hostname: str
"""S3 storage hostname.
- The parameter is required, if "`s3_type`": other.
+ The parameter is required, if "s3_type": other.
"""
diff --git a/src/gcore/types/cdn/origin_groups.py b/src/gcore/types/cdn/origin_groups.py
index fd41af74..863ea739 100644
--- a/src/gcore/types/cdn/origin_groups.py
+++ b/src/gcore/types/cdn/origin_groups.py
@@ -125,8 +125,8 @@ class AwsSignatureV4Auth(BaseModel):
- Latin letters (A-Z, a-z), numbers (0-9), pluses, slashes, dashes, colons and
underscores.
- - If "`s3_type`": amazon, length should be 40 characters.
- - If "`s3_type`": other, length should be from 16 to 255 characters.
+ - If "s3_type": amazon, length should be 40 characters.
+ - If "s3_type": other, length should be from 16 to 255 characters.
"""
s3_type: str
@@ -141,13 +141,13 @@ class AwsSignatureV4Auth(BaseModel):
s3_region: Optional[str] = None
"""S3 storage region.
- The parameter is required, if "`s3_type`": amazon.
+ The parameter is required, if "s3_type": amazon.
"""
s3_storage_hostname: Optional[str] = None
"""S3 storage hostname.
- The parameter is required, if "`s3_type`": other.
+ The parameter is required, if "s3_type": other.
"""
diff --git a/src/gcore/types/cdn/resource_create_params.py b/src/gcore/types/cdn/resource_create_params.py
index 488f1f94..09c122d2 100644
--- a/src/gcore/types/cdn/resource_create_params.py
+++ b/src/gcore/types/cdn/resource_create_params.py
@@ -348,11 +348,11 @@ class OptionsCors(TypedDict, total=False):
- **Adds \\** as the Access-Control-Allow-Origin header value** - Content will be
uploaded for requests from any domain. `"value": ["*"]`
- - **Adds "$`http_origin`" as the Access-Control-Allow-Origin header value if the
+ - **Adds "$http_origin" as the Access-Control-Allow-Origin header value if the
origin matches one of the listed domains** - Content will be uploaded only for
requests from the domains specified in the field.
`"value": ["domain.com", "second.dom.com"]`
- - **Adds "$`http_origin`" as the Access-Control-Allow-Origin header value** -
+ - **Adds "$http_origin" as the Access-Control-Allow-Origin header value** -
Content will be uploaded for requests from any domain, and the domain from
which the request was sent will be added to the "Access-Control-Allow-Origin"
header in the response. `"value": ["$http_origin"]`
@@ -944,9 +944,9 @@ class OptionsIPAddressACL(TypedDict, total=False):
Possible values:
- - **allow** - Allow access to all IPs except IPs specified in
- "`excepted_values`" field.
- - **deny** - Deny access to all IPs except IPs specified in "`excepted_values`"
+ - **allow** - Allow access to all IPs except IPs specified in "excepted_values"
+ field.
+ - **deny** - Deny access to all IPs except IPs specified in "excepted_values"
field.
"""
diff --git a/src/gcore/types/cdn/resource_purge_params.py b/src/gcore/types/cdn/resource_purge_params.py
index f55c4797..0a930c50 100644
--- a/src/gcore/types/cdn/resource_purge_params.py
+++ b/src/gcore/types/cdn/resource_purge_params.py
@@ -28,14 +28,14 @@ class PurgeByURL(TypedDict, total=False):
the CDN cache, purge by URL will delete only the first slice (with bytes=0…
.)
3. "ignoreQueryString" is used. Don’t specify parameters in the purge request.
- 4. "`query_params_blacklist`" is used. Only files with the listed in the option
+ 4. "query_params_blacklist" is used. Only files with the listed in the option
parameters will be cached as different objects. Files with other parameters
will be cached as one object. In this case, specify the listed parameters in
the Purge request. Don't specify other parameters.
- 5. "`query_params_whitelist`" is used. Files with listed in the option
- parameters will be cached as one object. Files with other parameters will be
- cached as different objects. In this case, specify other parameters (if any)
- besides the ones listed in the purge request.
+ 5. "query_params_whitelist" is used. Files with listed in the option parameters
+ will be cached as one object. Files with other parameters will be cached as
+ different objects. In this case, specify other parameters (if any) besides
+ the ones listed in the purge request.
"""
diff --git a/src/gcore/types/cdn/resource_replace_params.py b/src/gcore/types/cdn/resource_replace_params.py
index cb423c40..e1ab08b8 100644
--- a/src/gcore/types/cdn/resource_replace_params.py
+++ b/src/gcore/types/cdn/resource_replace_params.py
@@ -326,11 +326,11 @@ class OptionsCors(TypedDict, total=False):
- **Adds \\** as the Access-Control-Allow-Origin header value** - Content will be
uploaded for requests from any domain. `"value": ["*"]`
- - **Adds "$`http_origin`" as the Access-Control-Allow-Origin header value if the
+ - **Adds "$http_origin" as the Access-Control-Allow-Origin header value if the
origin matches one of the listed domains** - Content will be uploaded only for
requests from the domains specified in the field.
`"value": ["domain.com", "second.dom.com"]`
- - **Adds "$`http_origin`" as the Access-Control-Allow-Origin header value** -
+ - **Adds "$http_origin" as the Access-Control-Allow-Origin header value** -
Content will be uploaded for requests from any domain, and the domain from
which the request was sent will be added to the "Access-Control-Allow-Origin"
header in the response. `"value": ["$http_origin"]`
@@ -922,9 +922,9 @@ class OptionsIPAddressACL(TypedDict, total=False):
Possible values:
- - **allow** - Allow access to all IPs except IPs specified in
- "`excepted_values`" field.
- - **deny** - Deny access to all IPs except IPs specified in "`excepted_values`"
+ - **allow** - Allow access to all IPs except IPs specified in "excepted_values"
+ field.
+ - **deny** - Deny access to all IPs except IPs specified in "excepted_values"
field.
"""
diff --git a/src/gcore/types/cdn/resource_update_params.py b/src/gcore/types/cdn/resource_update_params.py
index f96093b8..c231f15d 100644
--- a/src/gcore/types/cdn/resource_update_params.py
+++ b/src/gcore/types/cdn/resource_update_params.py
@@ -317,11 +317,11 @@ class OptionsCors(TypedDict, total=False):
- **Adds \\** as the Access-Control-Allow-Origin header value** - Content will be
uploaded for requests from any domain. `"value": ["*"]`
- - **Adds "$`http_origin`" as the Access-Control-Allow-Origin header value if the
+ - **Adds "$http_origin" as the Access-Control-Allow-Origin header value if the
origin matches one of the listed domains** - Content will be uploaded only for
requests from the domains specified in the field.
`"value": ["domain.com", "second.dom.com"]`
- - **Adds "$`http_origin`" as the Access-Control-Allow-Origin header value** -
+ - **Adds "$http_origin" as the Access-Control-Allow-Origin header value** -
Content will be uploaded for requests from any domain, and the domain from
which the request was sent will be added to the "Access-Control-Allow-Origin"
header in the response. `"value": ["$http_origin"]`
@@ -913,9 +913,9 @@ class OptionsIPAddressACL(TypedDict, total=False):
Possible values:
- - **allow** - Allow access to all IPs except IPs specified in
- "`excepted_values`" field.
- - **deny** - Deny access to all IPs except IPs specified in "`excepted_values`"
+ - **allow** - Allow access to all IPs except IPs specified in "excepted_values"
+ field.
+ - **deny** - Deny access to all IPs except IPs specified in "excepted_values"
field.
"""
diff --git a/src/gcore/types/cdn/resources/cdn_resource_rule.py b/src/gcore/types/cdn/resources/cdn_resource_rule.py
index 9118e322..2b61a6d2 100644
--- a/src/gcore/types/cdn/resources/cdn_resource_rule.py
+++ b/src/gcore/types/cdn/resources/cdn_resource_rule.py
@@ -220,11 +220,11 @@ class OptionsCors(BaseModel):
- **Adds \\** as the Access-Control-Allow-Origin header value** - Content will be
uploaded for requests from any domain. `"value": ["*"]`
- - **Adds "$`http_origin`" as the Access-Control-Allow-Origin header value if the
+ - **Adds "$http_origin" as the Access-Control-Allow-Origin header value if the
origin matches one of the listed domains** - Content will be uploaded only for
requests from the domains specified in the field.
`"value": ["domain.com", "second.dom.com"]`
- - **Adds "$`http_origin`" as the Access-Control-Allow-Origin header value** -
+ - **Adds "$http_origin" as the Access-Control-Allow-Origin header value** -
Content will be uploaded for requests from any domain, and the domain from
which the request was sent will be added to the "Access-Control-Allow-Origin"
header in the response. `"value": ["$http_origin"]`
@@ -793,9 +793,9 @@ class OptionsIPAddressACL(BaseModel):
Possible values:
- - **allow** - Allow access to all IPs except IPs specified in
- "`excepted_values`" field.
- - **deny** - Deny access to all IPs except IPs specified in "`excepted_values`"
+ - **allow** - Allow access to all IPs except IPs specified in "excepted_values"
+ field.
+ - **deny** - Deny access to all IPs except IPs specified in "excepted_values"
field.
"""
diff --git a/src/gcore/types/cdn/resources/rule_create_params.py b/src/gcore/types/cdn/resources/rule_create_params.py
index 243c958e..9d48700f 100644
--- a/src/gcore/types/cdn/resources/rule_create_params.py
+++ b/src/gcore/types/cdn/resources/rule_create_params.py
@@ -296,11 +296,11 @@ class OptionsCors(TypedDict, total=False):
- **Adds \\** as the Access-Control-Allow-Origin header value** - Content will be
uploaded for requests from any domain. `"value": ["*"]`
- - **Adds "$`http_origin`" as the Access-Control-Allow-Origin header value if the
+ - **Adds "$http_origin" as the Access-Control-Allow-Origin header value if the
origin matches one of the listed domains** - Content will be uploaded only for
requests from the domains specified in the field.
`"value": ["domain.com", "second.dom.com"]`
- - **Adds "$`http_origin`" as the Access-Control-Allow-Origin header value** -
+ - **Adds "$http_origin" as the Access-Control-Allow-Origin header value** -
Content will be uploaded for requests from any domain, and the domain from
which the request was sent will be added to the "Access-Control-Allow-Origin"
header in the response. `"value": ["$http_origin"]`
@@ -869,9 +869,9 @@ class OptionsIPAddressACL(TypedDict, total=False):
Possible values:
- - **allow** - Allow access to all IPs except IPs specified in
- "`excepted_values`" field.
- - **deny** - Deny access to all IPs except IPs specified in "`excepted_values`"
+ - **allow** - Allow access to all IPs except IPs specified in "excepted_values"
+ field.
+ - **deny** - Deny access to all IPs except IPs specified in "excepted_values"
field.
"""
diff --git a/src/gcore/types/cdn/resources/rule_replace_params.py b/src/gcore/types/cdn/resources/rule_replace_params.py
index 49d31ee5..44a3a9f7 100644
--- a/src/gcore/types/cdn/resources/rule_replace_params.py
+++ b/src/gcore/types/cdn/resources/rule_replace_params.py
@@ -298,11 +298,11 @@ class OptionsCors(TypedDict, total=False):
- **Adds \\** as the Access-Control-Allow-Origin header value** - Content will be
uploaded for requests from any domain. `"value": ["*"]`
- - **Adds "$`http_origin`" as the Access-Control-Allow-Origin header value if the
+ - **Adds "$http_origin" as the Access-Control-Allow-Origin header value if the
origin matches one of the listed domains** - Content will be uploaded only for
requests from the domains specified in the field.
`"value": ["domain.com", "second.dom.com"]`
- - **Adds "$`http_origin`" as the Access-Control-Allow-Origin header value** -
+ - **Adds "$http_origin" as the Access-Control-Allow-Origin header value** -
Content will be uploaded for requests from any domain, and the domain from
which the request was sent will be added to the "Access-Control-Allow-Origin"
header in the response. `"value": ["$http_origin"]`
@@ -871,9 +871,9 @@ class OptionsIPAddressACL(TypedDict, total=False):
Possible values:
- - **allow** - Allow access to all IPs except IPs specified in
- "`excepted_values`" field.
- - **deny** - Deny access to all IPs except IPs specified in "`excepted_values`"
+ - **allow** - Allow access to all IPs except IPs specified in "excepted_values"
+ field.
+ - **deny** - Deny access to all IPs except IPs specified in "excepted_values"
field.
"""
diff --git a/src/gcore/types/cdn/resources/rule_update_params.py b/src/gcore/types/cdn/resources/rule_update_params.py
index f604e673..a689c70f 100644
--- a/src/gcore/types/cdn/resources/rule_update_params.py
+++ b/src/gcore/types/cdn/resources/rule_update_params.py
@@ -298,11 +298,11 @@ class OptionsCors(TypedDict, total=False):
- **Adds \\** as the Access-Control-Allow-Origin header value** - Content will be
uploaded for requests from any domain. `"value": ["*"]`
- - **Adds "$`http_origin`" as the Access-Control-Allow-Origin header value if the
+ - **Adds "$http_origin" as the Access-Control-Allow-Origin header value if the
origin matches one of the listed domains** - Content will be uploaded only for
requests from the domains specified in the field.
`"value": ["domain.com", "second.dom.com"]`
- - **Adds "$`http_origin`" as the Access-Control-Allow-Origin header value** -
+ - **Adds "$http_origin" as the Access-Control-Allow-Origin header value** -
Content will be uploaded for requests from any domain, and the domain from
which the request was sent will be added to the "Access-Control-Allow-Origin"
header in the response. `"value": ["$http_origin"]`
@@ -871,9 +871,9 @@ class OptionsIPAddressACL(TypedDict, total=False):
Possible values:
- - **allow** - Allow access to all IPs except IPs specified in
- "`excepted_values`" field.
- - **deny** - Deny access to all IPs except IPs specified in "`excepted_values`"
+ - **allow** - Allow access to all IPs except IPs specified in "excepted_values"
+ field.
+ - **deny** - Deny access to all IPs except IPs specified in "excepted_values"
field.
"""
diff --git a/src/gcore/types/cdn/rule_template.py b/src/gcore/types/cdn/rule_template.py
index 17d5656b..12360cca 100644
--- a/src/gcore/types/cdn/rule_template.py
+++ b/src/gcore/types/cdn/rule_template.py
@@ -220,11 +220,11 @@ class OptionsCors(BaseModel):
- **Adds \\** as the Access-Control-Allow-Origin header value** - Content will be
uploaded for requests from any domain. `"value": ["*"]`
- - **Adds "$`http_origin`" as the Access-Control-Allow-Origin header value if the
+ - **Adds "$http_origin" as the Access-Control-Allow-Origin header value if the
origin matches one of the listed domains** - Content will be uploaded only for
requests from the domains specified in the field.
`"value": ["domain.com", "second.dom.com"]`
- - **Adds "$`http_origin`" as the Access-Control-Allow-Origin header value** -
+ - **Adds "$http_origin" as the Access-Control-Allow-Origin header value** -
Content will be uploaded for requests from any domain, and the domain from
which the request was sent will be added to the "Access-Control-Allow-Origin"
header in the response. `"value": ["$http_origin"]`
@@ -793,9 +793,9 @@ class OptionsIPAddressACL(BaseModel):
Possible values:
- - **allow** - Allow access to all IPs except IPs specified in
- "`excepted_values`" field.
- - **deny** - Deny access to all IPs except IPs specified in "`excepted_values`"
+ - **allow** - Allow access to all IPs except IPs specified in "excepted_values"
+ field.
+ - **deny** - Deny access to all IPs except IPs specified in "excepted_values"
field.
"""
diff --git a/src/gcore/types/cdn/rule_template_create_params.py b/src/gcore/types/cdn/rule_template_create_params.py
index 4ed1a187..5a000d28 100644
--- a/src/gcore/types/cdn/rule_template_create_params.py
+++ b/src/gcore/types/cdn/rule_template_create_params.py
@@ -280,11 +280,11 @@ class OptionsCors(TypedDict, total=False):
- **Adds \\** as the Access-Control-Allow-Origin header value** - Content will be
uploaded for requests from any domain. `"value": ["*"]`
- - **Adds "$`http_origin`" as the Access-Control-Allow-Origin header value if the
+ - **Adds "$http_origin" as the Access-Control-Allow-Origin header value if the
origin matches one of the listed domains** - Content will be uploaded only for
requests from the domains specified in the field.
`"value": ["domain.com", "second.dom.com"]`
- - **Adds "$`http_origin`" as the Access-Control-Allow-Origin header value** -
+ - **Adds "$http_origin" as the Access-Control-Allow-Origin header value** -
Content will be uploaded for requests from any domain, and the domain from
which the request was sent will be added to the "Access-Control-Allow-Origin"
header in the response. `"value": ["$http_origin"]`
@@ -853,9 +853,9 @@ class OptionsIPAddressACL(TypedDict, total=False):
Possible values:
- - **allow** - Allow access to all IPs except IPs specified in
- "`excepted_values`" field.
- - **deny** - Deny access to all IPs except IPs specified in "`excepted_values`"
+ - **allow** - Allow access to all IPs except IPs specified in "excepted_values"
+ field.
+ - **deny** - Deny access to all IPs except IPs specified in "excepted_values"
field.
"""
diff --git a/src/gcore/types/cdn/rule_template_replace_params.py b/src/gcore/types/cdn/rule_template_replace_params.py
index d2904e0a..4af0182e 100644
--- a/src/gcore/types/cdn/rule_template_replace_params.py
+++ b/src/gcore/types/cdn/rule_template_replace_params.py
@@ -280,11 +280,11 @@ class OptionsCors(TypedDict, total=False):
- **Adds \\** as the Access-Control-Allow-Origin header value** - Content will be
uploaded for requests from any domain. `"value": ["*"]`
- - **Adds "$`http_origin`" as the Access-Control-Allow-Origin header value if the
+ - **Adds "$http_origin" as the Access-Control-Allow-Origin header value if the
origin matches one of the listed domains** - Content will be uploaded only for
requests from the domains specified in the field.
`"value": ["domain.com", "second.dom.com"]`
- - **Adds "$`http_origin`" as the Access-Control-Allow-Origin header value** -
+ - **Adds "$http_origin" as the Access-Control-Allow-Origin header value** -
Content will be uploaded for requests from any domain, and the domain from
which the request was sent will be added to the "Access-Control-Allow-Origin"
header in the response. `"value": ["$http_origin"]`
@@ -853,9 +853,9 @@ class OptionsIPAddressACL(TypedDict, total=False):
Possible values:
- - **allow** - Allow access to all IPs except IPs specified in
- "`excepted_values`" field.
- - **deny** - Deny access to all IPs except IPs specified in "`excepted_values`"
+ - **allow** - Allow access to all IPs except IPs specified in "excepted_values"
+ field.
+ - **deny** - Deny access to all IPs except IPs specified in "excepted_values"
field.
"""
diff --git a/src/gcore/types/cdn/rule_template_update_params.py b/src/gcore/types/cdn/rule_template_update_params.py
index d5034281..8d45b593 100644
--- a/src/gcore/types/cdn/rule_template_update_params.py
+++ b/src/gcore/types/cdn/rule_template_update_params.py
@@ -280,11 +280,11 @@ class OptionsCors(TypedDict, total=False):
- **Adds \\** as the Access-Control-Allow-Origin header value** - Content will be
uploaded for requests from any domain. `"value": ["*"]`
- - **Adds "$`http_origin`" as the Access-Control-Allow-Origin header value if the
+ - **Adds "$http_origin" as the Access-Control-Allow-Origin header value if the
origin matches one of the listed domains** - Content will be uploaded only for
requests from the domains specified in the field.
`"value": ["domain.com", "second.dom.com"]`
- - **Adds "$`http_origin`" as the Access-Control-Allow-Origin header value** -
+ - **Adds "$http_origin" as the Access-Control-Allow-Origin header value** -
Content will be uploaded for requests from any domain, and the domain from
which the request was sent will be added to the "Access-Control-Allow-Origin"
header in the response. `"value": ["$http_origin"]`
@@ -853,9 +853,9 @@ class OptionsIPAddressACL(TypedDict, total=False):
Possible values:
- - **allow** - Allow access to all IPs except IPs specified in
- "`excepted_values`" field.
- - **deny** - Deny access to all IPs except IPs specified in "`excepted_values`"
+ - **allow** - Allow access to all IPs except IPs specified in "excepted_values"
+ field.
+ - **deny** - Deny access to all IPs except IPs specified in "excepted_values"
field.
"""
diff --git a/src/gcore/types/cloud/audit_log_list_params.py b/src/gcore/types/cloud/audit_log_list_params.py
index 87bcacce..337403f6 100644
--- a/src/gcore/types/cloud/audit_log_list_params.py
+++ b/src/gcore/types/cloud/audit_log_list_params.py
@@ -146,7 +146,7 @@ class AuditLogListParams(TypedDict, total=False):
"""
sorting: Literal["asc", "desc"]
- """(DEPRECATED Use '`order_by`' instead) Sorting by timestamp.
+ """(DEPRECATED Use 'order_by' instead) Sorting by timestamp.
Oldest first, or most recent first
"""
diff --git a/src/gcore/types/cloud/baremetal/server_create_params.py b/src/gcore/types/cloud/baremetal/server_create_params.py
index 5d889df8..6a0d6aa9 100644
--- a/src/gcore/types/cloud/baremetal/server_create_params.py
+++ b/src/gcore/types/cloud/baremetal/server_create_params.py
@@ -77,8 +77,8 @@ class ServerCreateParams(TypedDict, total=False):
When only 'password' is provided, it is set as the password for the default user
of the image. For Windows instances, 'username' cannot be specified. Use the
'password' field to set the password for the 'Admin' user on Windows. Use the
- '`user_data`' field to provide a script to create new users on Windows. The
- password of the Admin user cannot be updated via '`user_data`'.
+ 'user_data' field to provide a script to create new users on Windows. The
+ password of the Admin user cannot be updated via 'user_data'.
"""
ssh_key_name: Optional[str]
@@ -100,9 +100,9 @@ class ServerCreateParams(TypedDict, total=False):
user_data: str
"""String in base64 format.
- For Linux instances, '`user_data`' is ignored when 'password' field is provided.
+ For Linux instances, 'user_data' is ignored when 'password' field is provided.
For Windows instances, Admin user password is set by 'password' field and cannot
- be updated via '`user_data`'. Examples of the `user_data`:
+ be updated via 'user_data'. Examples of the `user_data`:
https://cloudinit.readthedocs.io/en/latest/topics/examples.html
"""
@@ -362,7 +362,7 @@ class DDOSProfileField(TypedDict, total=False):
field_value: object
value: Optional[str]
- """Basic type value. Only one of 'value' or '`field_value`' must be specified."""
+ """Basic type value. Only one of 'value' or 'field_value' must be specified."""
class DDOSProfile(TypedDict, total=False):
diff --git a/src/gcore/types/cloud/billing_reservation_list_params.py b/src/gcore/types/cloud/billing_reservation_list_params.py
index 86c5fed6..3142e04f 100644
--- a/src/gcore/types/cloud/billing_reservation_list_params.py
+++ b/src/gcore/types/cloud/billing_reservation_list_params.py
@@ -9,7 +9,7 @@
class BillingReservationListParams(TypedDict, total=False):
metric_name: str
- """Metric name for the resource (e.g., 'bm1-hf-`medium_min`')"""
+ """Metric name for the resource (e.g., 'bm1-hf-medium_min')"""
order_by: Literal["active_from.asc", "active_from.desc", "active_to.asc", "active_to.desc"]
"""Order by field and direction."""
diff --git a/src/gcore/types/cloud/cost_report_get_aggregated_monthly_params.py b/src/gcore/types/cloud/cost_report_get_aggregated_monthly_params.py
index caddf10c..133a3cc6 100644
--- a/src/gcore/types/cloud/cost_report_get_aggregated_monthly_params.py
+++ b/src/gcore/types/cloud/cost_report_get_aggregated_monthly_params.py
@@ -380,7 +380,7 @@ class SchemaFilterSchemaFilterDbaasPostgreSQLPoolerSerializer(TypedDict, total=F
class TagsCondition(TypedDict, total=False):
key: str
- """The name of the tag to filter (e.g., '`os_version`')."""
+ """The name of the tag to filter (e.g., 'os_version')."""
strict: bool
"""Determines how strictly the tag value must match the specified value.
diff --git a/src/gcore/types/cloud/cost_report_get_aggregated_params.py b/src/gcore/types/cloud/cost_report_get_aggregated_params.py
index 47cbebd5..df4c1727 100644
--- a/src/gcore/types/cloud/cost_report_get_aggregated_params.py
+++ b/src/gcore/types/cloud/cost_report_get_aggregated_params.py
@@ -392,7 +392,7 @@ class SchemaFilterSchemaFilterDbaasPostgreSQLPoolerSerializer(TypedDict, total=F
class TagsCondition(TypedDict, total=False):
key: str
- """The name of the tag to filter (e.g., '`os_version`')."""
+ """The name of the tag to filter (e.g., 'os_version')."""
strict: bool
"""Determines how strictly the tag value must match the specified value.
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 7026096b..86361cf0 100644
--- a/src/gcore/types/cloud/cost_report_get_detailed_params.py
+++ b/src/gcore/types/cloud/cost_report_get_detailed_params.py
@@ -418,7 +418,7 @@ class Sorting(TypedDict, total=False):
class TagsCondition(TypedDict, total=False):
key: str
- """The name of the tag to filter (e.g., '`os_version`')."""
+ """The name of the tag to filter (e.g., 'os_version')."""
strict: bool
"""Determines how strictly the tag value must match the specified value.
diff --git a/src/gcore/types/cloud/ddos_profile_field.py b/src/gcore/types/cloud/ddos_profile_field.py
index f0d03515..0bcfbca1 100644
--- a/src/gcore/types/cloud/ddos_profile_field.py
+++ b/src/gcore/types/cloud/ddos_profile_field.py
@@ -27,7 +27,7 @@ class DDOSProfileField(BaseModel):
"""Data type classification of the field (e.g., string, integer, array)"""
field_value: object
- """Complex value. Only one of 'value' or '`field_value`' must be specified."""
+ """Complex value. Only one of 'value' or 'field_value' must be specified."""
name: str
"""Human-readable name of the protection field"""
@@ -41,4 +41,4 @@ class DDOSProfileField(BaseModel):
"""JSON schema defining validation rules and constraints for the field value"""
value: Optional[str] = None
- """Basic type value. Only one of 'value' or '`field_value`' must be specified."""
+ """Basic type value. Only one of 'value' or 'field_value' must be specified."""
diff --git a/src/gcore/types/cloud/file_share_update_params.py b/src/gcore/types/cloud/file_share_update_params.py
index 2df15e25..11745736 100644
--- a/src/gcore/types/cloud/file_share_update_params.py
+++ b/src/gcore/types/cloud/file_share_update_params.py
@@ -35,20 +35,15 @@ class FileShareUpdateParams(TypedDict, total=False):
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
"""
diff --git a/src/gcore/types/cloud/floating_ip_update_params.py b/src/gcore/types/cloud/floating_ip_update_params.py
index 13dfa1d0..26bbcd02 100644
--- a/src/gcore/types/cloud/floating_ip_update_params.py
+++ b/src/gcore/types/cloud/floating_ip_update_params.py
@@ -17,6 +17,12 @@ class FloatingIPUpdateParams(TypedDict, total=False):
region_id: int
"""Region ID"""
+ fixed_ip_address: Optional[str]
+ """Fixed IP address"""
+
+ port_id: Optional[str]
+ """Port ID"""
+
tags: Optional[TagUpdateMapParam]
"""Update key-value tags using JSON Merge Patch semantics (RFC 7386).
@@ -29,20 +35,15 @@ class FloatingIPUpdateParams(TypedDict, total=False):
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
"""
diff --git a/src/gcore/types/cloud/gpu_baremetal/cluster_action_params.py b/src/gcore/types/cloud/gpu_baremetal/cluster_action_params.py
index 95167930..e3208874 100644
--- a/src/gcore/types/cloud/gpu_baremetal/cluster_action_params.py
+++ b/src/gcore/types/cloud/gpu_baremetal/cluster_action_params.py
@@ -32,20 +32,15 @@ class ClusterActionParams(TypedDict, total=False):
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
"""
diff --git a/src/gcore/types/cloud/gpu_baremetal/cluster_create_params.py b/src/gcore/types/cloud/gpu_baremetal/cluster_create_params.py
index 7e407d87..ed821b5d 100644
--- a/src/gcore/types/cloud/gpu_baremetal/cluster_create_params.py
+++ b/src/gcore/types/cloud/gpu_baremetal/cluster_create_params.py
@@ -121,7 +121,7 @@ class ServersSettingsCredentials(TypedDict, total=False):
"""Used to set the password for the specified 'username' on Linux instances.
If 'username' is not provided, the password is applied to the default user of
- the image. Mutually exclusive with '`user_data`' - only one can be specified.
+ the image. Mutually exclusive with 'user_data' - only one can be specified.
"""
ssh_key_name: str
diff --git a/src/gcore/types/cloud/gpu_baremetal/clusters/interface_attach_params.py b/src/gcore/types/cloud/gpu_baremetal/clusters/interface_attach_params.py
index 43ff9ee3..f3a3c26e 100644
--- a/src/gcore/types/cloud/gpu_baremetal/clusters/interface_attach_params.py
+++ b/src/gcore/types/cloud/gpu_baremetal/clusters/interface_attach_params.py
@@ -58,10 +58,10 @@ class NewInterfaceExternalExtendSchemaWithDdosddosProfileField(TypedDict, total=
"""Name of DDoS profile field"""
field_value: object
- """Complex value. Only one of 'value' or '`field_value`' must be specified."""
+ """Complex value. Only one of 'value' or 'field_value' must be specified."""
value: Optional[str]
- """Basic type value. Only one of 'value' or '`field_value`' must be specified."""
+ """Basic type value. Only one of 'value' or 'field_value' must be specified."""
class NewInterfaceExternalExtendSchemaWithDDOSDDOSProfile(TypedDict, total=False):
@@ -116,10 +116,10 @@ class NewInterfaceSpecificSubnetSchemaDDOSProfileField(TypedDict, total=False):
"""Name of DDoS profile field"""
field_value: object
- """Complex value. Only one of 'value' or '`field_value`' must be specified."""
+ """Complex value. Only one of 'value' or 'field_value' must be specified."""
value: Optional[str]
- """Basic type value. Only one of 'value' or '`field_value`' must be specified."""
+ """Basic type value. Only one of 'value' or 'field_value' must be specified."""
class NewInterfaceSpecificSubnetSchemaDDOSProfile(TypedDict, total=False):
@@ -166,7 +166,7 @@ class NewInterfaceAnySubnetSchema(TypedDict, total=False):
"""List of security group IDs"""
type: str
- """Must be '`any_subnet`'"""
+ """Must be 'any_subnet'"""
class NewInterfaceAnySubnetSchemaDDOSProfileField(TypedDict, total=False):
@@ -177,10 +177,10 @@ class NewInterfaceAnySubnetSchemaDDOSProfileField(TypedDict, total=False):
"""Name of DDoS profile field"""
field_value: object
- """Complex value. Only one of 'value' or '`field_value`' must be specified."""
+ """Complex value. Only one of 'value' or 'field_value' must be specified."""
value: Optional[str]
- """Basic type value. Only one of 'value' or '`field_value`' must be specified."""
+ """Basic type value. Only one of 'value' or 'field_value' must be specified."""
class NewInterfaceAnySubnetSchemaDDOSProfile(TypedDict, total=False):
@@ -224,7 +224,7 @@ class NewInterfaceReservedFixedIPSchema(TypedDict, total=False):
"""List of security group IDs"""
type: str
- """Must be '`reserved_fixed_ip`'. Union tag"""
+ """Must be 'reserved_fixed_ip'. Union tag"""
class NewInterfaceReservedFixedIPSchemaDDOSProfileField(TypedDict, total=False):
@@ -235,10 +235,10 @@ class NewInterfaceReservedFixedIPSchemaDDOSProfileField(TypedDict, total=False):
"""Name of DDoS profile field"""
field_value: object
- """Complex value. Only one of 'value' or '`field_value`' must be specified."""
+ """Complex value. Only one of 'value' or 'field_value' must be specified."""
value: Optional[str]
- """Basic type value. Only one of 'value' or '`field_value`' must be specified."""
+ """Basic type value. Only one of 'value' or 'field_value' must be specified."""
class NewInterfaceReservedFixedIPSchemaDDOSProfile(TypedDict, total=False):
diff --git a/src/gcore/types/cloud/gpu_virtual/cluster_action_params.py b/src/gcore/types/cloud/gpu_virtual/cluster_action_params.py
index a1c0cd75..e620f9ee 100644
--- a/src/gcore/types/cloud/gpu_virtual/cluster_action_params.py
+++ b/src/gcore/types/cloud/gpu_virtual/cluster_action_params.py
@@ -84,20 +84,15 @@ class UpdateTagsGPUClusterSerializer(TypedDict, total=False):
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
"""
diff --git a/src/gcore/types/cloud/gpu_virtual/cluster_create_params.py b/src/gcore/types/cloud/gpu_virtual/cluster_create_params.py
index f6235455..762e4879 100644
--- a/src/gcore/types/cloud/gpu_virtual/cluster_create_params.py
+++ b/src/gcore/types/cloud/gpu_virtual/cluster_create_params.py
@@ -173,7 +173,7 @@ class ServersSettingsCredentials(TypedDict, total=False):
"""Used to set the password for the specified 'username' on Linux instances.
If 'username' is not provided, the password is applied to the default user of
- the image. Mutually exclusive with '`user_data`' - only one can be specified.
+ the image. Mutually exclusive with 'user_data' - only one can be specified.
"""
ssh_key_name: str
diff --git a/src/gcore/types/cloud/instance_create_params.py b/src/gcore/types/cloud/instance_create_params.py
index e25ccdb9..ee1ba080 100644
--- a/src/gcore/types/cloud/instance_create_params.py
+++ b/src/gcore/types/cloud/instance_create_params.py
@@ -87,8 +87,8 @@ class InstanceCreateParams(TypedDict, total=False):
When only 'password' is provided, it is set as the password for the default user
of the image. For Windows instances, 'username' cannot be specified. Use the
'password' field to set the password for the 'Admin' user on Windows. Use the
- '`user_data`' field to provide a script to create new users on Windows. The
- password of the Admin user cannot be updated via '`user_data`'.
+ 'user_data' field to provide a script to create new users on Windows. The
+ password of the Admin user cannot be updated via 'user_data'.
"""
security_groups: Iterable[SecurityGroup]
@@ -127,9 +127,9 @@ class InstanceCreateParams(TypedDict, total=False):
user_data: str
"""String in base64 format.
- For Linux instances, '`user_data`' is ignored when 'password' field is provided.
+ For Linux instances, 'user_data' is ignored when 'password' field is provided.
For Windows instances, Admin user password is set by 'password' field and cannot
- be updated via '`user_data`'. Examples of the `user_data`:
+ be updated via 'user_data'. Examples of the `user_data`:
https://cloudinit.readthedocs.io/en/latest/topics/examples.html
"""
diff --git a/src/gcore/types/cloud/instance_update_params.py b/src/gcore/types/cloud/instance_update_params.py
index 78235205..d3c2c7ce 100644
--- a/src/gcore/types/cloud/instance_update_params.py
+++ b/src/gcore/types/cloud/instance_update_params.py
@@ -32,20 +32,15 @@ class InstanceUpdateParams(TypedDict, total=False):
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
"""
diff --git a/src/gcore/types/cloud/instances/interface_attach_params.py b/src/gcore/types/cloud/instances/interface_attach_params.py
index 43ff9ee3..f3a3c26e 100644
--- a/src/gcore/types/cloud/instances/interface_attach_params.py
+++ b/src/gcore/types/cloud/instances/interface_attach_params.py
@@ -58,10 +58,10 @@ class NewInterfaceExternalExtendSchemaWithDdosddosProfileField(TypedDict, total=
"""Name of DDoS profile field"""
field_value: object
- """Complex value. Only one of 'value' or '`field_value`' must be specified."""
+ """Complex value. Only one of 'value' or 'field_value' must be specified."""
value: Optional[str]
- """Basic type value. Only one of 'value' or '`field_value`' must be specified."""
+ """Basic type value. Only one of 'value' or 'field_value' must be specified."""
class NewInterfaceExternalExtendSchemaWithDDOSDDOSProfile(TypedDict, total=False):
@@ -116,10 +116,10 @@ class NewInterfaceSpecificSubnetSchemaDDOSProfileField(TypedDict, total=False):
"""Name of DDoS profile field"""
field_value: object
- """Complex value. Only one of 'value' or '`field_value`' must be specified."""
+ """Complex value. Only one of 'value' or 'field_value' must be specified."""
value: Optional[str]
- """Basic type value. Only one of 'value' or '`field_value`' must be specified."""
+ """Basic type value. Only one of 'value' or 'field_value' must be specified."""
class NewInterfaceSpecificSubnetSchemaDDOSProfile(TypedDict, total=False):
@@ -166,7 +166,7 @@ class NewInterfaceAnySubnetSchema(TypedDict, total=False):
"""List of security group IDs"""
type: str
- """Must be '`any_subnet`'"""
+ """Must be 'any_subnet'"""
class NewInterfaceAnySubnetSchemaDDOSProfileField(TypedDict, total=False):
@@ -177,10 +177,10 @@ class NewInterfaceAnySubnetSchemaDDOSProfileField(TypedDict, total=False):
"""Name of DDoS profile field"""
field_value: object
- """Complex value. Only one of 'value' or '`field_value`' must be specified."""
+ """Complex value. Only one of 'value' or 'field_value' must be specified."""
value: Optional[str]
- """Basic type value. Only one of 'value' or '`field_value`' must be specified."""
+ """Basic type value. Only one of 'value' or 'field_value' must be specified."""
class NewInterfaceAnySubnetSchemaDDOSProfile(TypedDict, total=False):
@@ -224,7 +224,7 @@ class NewInterfaceReservedFixedIPSchema(TypedDict, total=False):
"""List of security group IDs"""
type: str
- """Must be '`reserved_fixed_ip`'. Union tag"""
+ """Must be 'reserved_fixed_ip'. Union tag"""
class NewInterfaceReservedFixedIPSchemaDDOSProfileField(TypedDict, total=False):
@@ -235,10 +235,10 @@ class NewInterfaceReservedFixedIPSchemaDDOSProfileField(TypedDict, total=False):
"""Name of DDoS profile field"""
field_value: object
- """Complex value. Only one of 'value' or '`field_value`' must be specified."""
+ """Complex value. Only one of 'value' or 'field_value' must be specified."""
value: Optional[str]
- """Basic type value. Only one of 'value' or '`field_value`' must be specified."""
+ """Basic type value. Only one of 'value' or 'field_value' must be specified."""
class NewInterfaceReservedFixedIPSchemaDDOSProfile(TypedDict, total=False):
diff --git a/src/gcore/types/cloud/k8s/cluster_create_params.py b/src/gcore/types/cloud/k8s/cluster_create_params.py
index bda1ddee..8f97757c 100644
--- a/src/gcore/types/cloud/k8s/cluster_create_params.py
+++ b/src/gcore/types/cloud/k8s/cluster_create_params.py
@@ -323,10 +323,10 @@ class DDOSProfileField(TypedDict, total=False):
base_field: Required[int]
field_value: object
- """Complex value. Only one of 'value' or '`field_value`' must be specified"""
+ """Complex value. Only one of 'value' or 'field_value' must be specified"""
value: Optional[str]
- """Basic value. Only one of 'value' or '`field_value`' must be specified"""
+ """Basic value. Only one of 'value' or 'field_value' must be specified"""
class DDOSProfile(TypedDict, total=False):
diff --git a/src/gcore/types/cloud/k8s/cluster_update_params.py b/src/gcore/types/cloud/k8s/cluster_update_params.py
index 137cff46..4216b832 100644
--- a/src/gcore/types/cloud/k8s/cluster_update_params.py
+++ b/src/gcore/types/cloud/k8s/cluster_update_params.py
@@ -233,10 +233,10 @@ class DDOSProfileField(TypedDict, total=False):
base_field: Required[int]
field_value: object
- """Complex value. Only one of 'value' or '`field_value`' must be specified"""
+ """Complex value. Only one of 'value' or 'field_value' must be specified"""
value: Optional[str]
- """Basic value. Only one of 'value' or '`field_value`' must be specified"""
+ """Basic value. Only one of 'value' or 'field_value' must be specified"""
class DDOSProfile(TypedDict, total=False):
diff --git a/src/gcore/types/cloud/k8s/k8s_cluster.py b/src/gcore/types/cloud/k8s/k8s_cluster.py
index 6296a09b..c219d2fa 100644
--- a/src/gcore/types/cloud/k8s/k8s_cluster.py
+++ b/src/gcore/types/cloud/k8s/k8s_cluster.py
@@ -160,10 +160,10 @@ class DDOSProfileField(BaseModel):
base_field: int
field_value: Optional[object] = None
- """Complex value. Only one of 'value' or '`field_value`' must be specified"""
+ """Complex value. Only one of 'value' or 'field_value' must be specified"""
value: Optional[str] = None
- """Basic value. Only one of 'value' or '`field_value`' must be specified"""
+ """Basic value. Only one of 'value' or 'field_value' must be specified"""
class DDOSProfile(BaseModel):
diff --git a/src/gcore/types/cloud/load_balancer_update_params.py b/src/gcore/types/cloud/load_balancer_update_params.py
index 0b6f23d8..6bd7a916 100644
--- a/src/gcore/types/cloud/load_balancer_update_params.py
+++ b/src/gcore/types/cloud/load_balancer_update_params.py
@@ -43,20 +43,15 @@ class LoadBalancerUpdateParams(TypedDict, total=False):
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
"""
diff --git a/src/gcore/types/cloud/network_update_params.py b/src/gcore/types/cloud/network_update_params.py
index 8f9f5b85..ab91fcf7 100644
--- a/src/gcore/types/cloud/network_update_params.py
+++ b/src/gcore/types/cloud/network_update_params.py
@@ -32,20 +32,15 @@ class NetworkUpdateParams(TypedDict, total=False):
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
"""
diff --git a/src/gcore/types/cloud/networks/subnet_update_params.py b/src/gcore/types/cloud/networks/subnet_update_params.py
index 267a9af7..d7a68399 100644
--- a/src/gcore/types/cloud/networks/subnet_update_params.py
+++ b/src/gcore/types/cloud/networks/subnet_update_params.py
@@ -50,20 +50,15 @@ class SubnetUpdateParams(TypedDict, total=False):
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
"""
diff --git a/src/gcore/types/cloud/region.py b/src/gcore/types/cloud/region.py
index e7bde6fe..b2bf4ac8 100644
--- a/src/gcore/types/cloud/region.py
+++ b/src/gcore/types/cloud/region.py
@@ -25,7 +25,7 @@ class Region(BaseModel):
"""The access level of the region."""
available_volume_types: Optional[List[str]] = None
- """List of available volume types, 'standard', '`ssd_hiiops`', 'cold']."""
+ """List of available volume types, 'standard', 'ssd_hiiops', 'cold']."""
coordinates: Optional[Coordinates] = None
"""Coordinates of the region"""
diff --git a/src/gcore/types/cloud/reserved_fixed_ip_create_params.py b/src/gcore/types/cloud/reserved_fixed_ip_create_params.py
index 66f352c1..553101d5 100644
--- a/src/gcore/types/cloud/reserved_fixed_ip_create_params.py
+++ b/src/gcore/types/cloud/reserved_fixed_ip_create_params.py
@@ -56,7 +56,7 @@ class NewReservedFixedIPAnySubnetSerializer(TypedDict, total=False):
"""Reserved fixed IP will be allocated in a subnet of this network"""
type: Required[Literal["any_subnet"]]
- """Must be '`any_subnet`'."""
+ """Must be 'any_subnet'."""
ip_family: Optional[InterfaceIPFamily]
"""Which subnets should be selected: IPv4, IPv6 or use dual stack."""
@@ -77,7 +77,7 @@ class NewReservedFixedIPSpecificIPAddressSerializer(TypedDict, total=False):
"""Reserved fixed IP will be allocated in a subnet of this network"""
type: Required[Literal["ip_address"]]
- """Must be '`ip_address`'."""
+ """Must be 'ip_address'."""
is_vip: bool
"""If reserved fixed IP is a VIP"""
diff --git a/src/gcore/types/cloud/reserved_fixed_ip_list_params.py b/src/gcore/types/cloud/reserved_fixed_ip_list_params.py
index 655ef02a..4678f7c5 100644
--- a/src/gcore/types/cloud/reserved_fixed_ip_list_params.py
+++ b/src/gcore/types/cloud/reserved_fixed_ip_list_params.py
@@ -40,7 +40,7 @@ class ReservedFixedIPListParams(TypedDict, total=False):
"""
Ordering reserved fixed IP list result by name, status, `updated_at`,
`created_at` or `fixed_ip_address` fields and directions (status.asc), default
- is "`fixed_ip_address`.asc"
+ is "fixed_ip_address.asc"
"""
vip_only: bool
diff --git a/src/gcore/types/cloud/security_group_create_params.py b/src/gcore/types/cloud/security_group_create_params.py
index b932ad13..e660dee3 100644
--- a/src/gcore/types/cloud/security_group_create_params.py
+++ b/src/gcore/types/cloud/security_group_create_params.py
@@ -5,9 +5,7 @@
from typing import Dict, Iterable, Optional
from typing_extensions import Literal, Required, TypedDict
-from ..._types import SequenceNotStr
-
-__all__ = ["SecurityGroupCreateParams", "SecurityGroup", "SecurityGroupSecurityGroupRule"]
+__all__ = ["SecurityGroupCreateParams", "Rule"]
class SecurityGroupCreateParams(TypedDict, total=False):
@@ -17,14 +15,27 @@ class SecurityGroupCreateParams(TypedDict, total=False):
region_id: int
"""Region ID"""
- security_group: Required[SecurityGroup]
- """Security group"""
+ name: Required[str]
+ """Security group name"""
+
+ description: str
+ """Security group description"""
+
+ rules: Iterable[Rule]
+ """Security group rules"""
+
+ tags: Dict[str, str]
+ """Key-value tags to associate with the resource.
- instances: SequenceNotStr[str]
- """List of instances"""
+ A tag is a key-value pair that can be associated with a resource, enabling
+ efficient filtering and grouping for better organization and management. Both
+ tag keys and values have a maximum length of 255 characters. Some tags are
+ read-only and cannot be modified by the user. Tags are also integrated with cost
+ reports, allowing cost data to be filtered based on tag keys or values.
+ """
-class SecurityGroupSecurityGroupRule(TypedDict, total=False):
+class Rule(TypedDict, total=False):
direction: Required[Literal["egress", "ingress"]]
"""
Ingress or egress, which is the direction in which the security group is applied
@@ -75,26 +86,3 @@ class SecurityGroupSecurityGroupRule(TypedDict, total=False):
remote_ip_prefix: Optional[str]
"""The remote IP prefix that is matched by this security group rule"""
-
-
-class SecurityGroup(TypedDict, total=False):
- """Security group"""
-
- name: Required[str]
- """Security group name"""
-
- description: Optional[str]
- """Security group description"""
-
- security_group_rules: Iterable[SecurityGroupSecurityGroupRule]
- """Security group rules"""
-
- 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
- efficient filtering and grouping for better organization and management. Both
- tag keys and values have a maximum length of 255 characters. Some tags are
- read-only and cannot be modified by the user. Tags are also integrated with cost
- reports, allowing cost data to be filtered based on tag keys or values.
- """
diff --git a/src/gcore/types/cloud/security_group_update_params.py b/src/gcore/types/cloud/security_group_update_params.py
index 1ac56005..a5e34df0 100644
--- a/src/gcore/types/cloud/security_group_update_params.py
+++ b/src/gcore/types/cloud/security_group_update_params.py
@@ -3,11 +3,11 @@
from __future__ import annotations
from typing import Iterable, Optional
-from typing_extensions import Literal, Required, TypedDict
+from typing_extensions import Literal, TypedDict
from .tag_update_map_param import TagUpdateMapParam
-__all__ = ["SecurityGroupUpdateParams", "ChangedRule"]
+__all__ = ["SecurityGroupUpdateParams", "Rule"]
class SecurityGroupUpdateParams(TypedDict, total=False):
@@ -17,12 +17,15 @@ class SecurityGroupUpdateParams(TypedDict, total=False):
region_id: int
"""Region ID"""
- changed_rules: Iterable[ChangedRule]
- """List of rules to create or delete"""
+ description: str
+ """Security group description"""
name: str
"""Name"""
+ rules: Iterable[Rule]
+ """Security group rules"""
+
tags: Optional[TagUpdateMapParam]
"""Update key-value tags using JSON Merge Patch semantics (RFC 7386).
@@ -35,29 +38,21 @@ class SecurityGroupUpdateParams(TypedDict, total=False):
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
"""
-class ChangedRule(TypedDict, total=False):
- action: Required[Literal["create", "delete"]]
- """Action for a rule"""
-
+class Rule(TypedDict, total=False):
description: str
"""Security grpup rule description"""
@@ -67,7 +62,7 @@ class ChangedRule(TypedDict, total=False):
applied
"""
- ethertype: Optional[Literal["IPv4", "IPv6"]]
+ ethertype: Literal["IPv4", "IPv6"]
"""
Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress
or egress rules.
@@ -107,11 +102,8 @@ class ChangedRule(TypedDict, total=False):
]
"""Protocol"""
- remote_group_id: Optional[str]
+ remote_group_id: str
"""The remote group UUID to associate with this security group rule"""
- remote_ip_prefix: Optional[str]
+ remote_ip_prefix: str
"""The remote IP prefix that is matched by this security group rule"""
-
- security_group_rule_id: Optional[str]
- """UUID of rule to be deleted. Required for action 'delete' only"""
diff --git a/src/gcore/types/cloud/task_list_params.py b/src/gcore/types/cloud/task_list_params.py
index 440e4900..23658f26 100644
--- a/src/gcore/types/cloud/task_list_params.py
+++ b/src/gcore/types/cloud/task_list_params.py
@@ -46,7 +46,7 @@ class TaskListParams(TypedDict, total=False):
"""
sorting: Literal["asc", "desc"]
- """(DEPRECATED Use '`order_by`' instead) Sorting by creation date.
+ """(DEPRECATED Use 'order_by' instead) Sorting by creation date.
Oldest first, or most recent first
"""
@@ -59,54 +59,49 @@ class TaskListParams(TypedDict, total=False):
task_type: str
"""
- Filter the tasks by their type one of ['`activate_ddos_profile`',
- '`attach_bm_to_reserved_fixed_ip`', '`attach_vm_interface`',
- '`attach_vm_to_reserved_fixed_ip`', '`attach_volume`',
- '`create_ai_cluster_gpu`', '`create_bm`', '`create_caas_container`',
- '`create_dbaas_postgres_cluster`', '`create_ddos_profile`',
- '`create_faas_function`', '`create_faas_namespace`', '`create_fip`',
- '`create_gpu_virtual_cluster`', '`create_image`',
- '`create_inference_application`', '`create_inference_instance`',
- '`create_k8s_cluster_pool_v2`', '`create_k8s_cluster_v2`', '`create_l7policy`',
- '`create_l7rule`', '`create_lblistener`', '`create_lbmember`',
- '`create_lbpool`', '`create_lbpool_health_monitor`', '`create_loadbalancer`',
- '`create_network`', '`create_reserved_fixed_ip`', '`create_router`',
- '`create_secret`', '`create_security_group`', '`create_servergroup`',
- '`create_sfs`', '`create_snapshot`', '`create_subnet`', '`create_vm`',
- '`create_volume`', '`deactivate_ddos_profile`', '`delete_ai_cluster_gpu`',
- '`delete_caas_container`', '`delete_dbaas_postgres_cluster`',
- '`delete_ddos_profile`', '`delete_faas_function`', '`delete_faas_namespace`',
- '`delete_fip`', '`delete_gpu_virtual_cluster`', '`delete_gpu_virtual_server`',
- '`delete_image`', '`delete_inference_application`',
- '`delete_inference_instance`', '`delete_k8s_cluster_pool_v2`',
- '`delete_k8s_cluster_v2`', '`delete_l7policy`', '`delete_l7rule`',
- '`delete_lblistener`', '`delete_lbmember`', '`delete_lbmetadata`',
- '`delete_lbpool`', '`delete_loadbalancer`', '`delete_network`',
- '`delete_project`', '`delete_reserved_fixed_ip`', '`delete_router`',
- '`delete_secret`', '`delete_servergroup`', '`delete_sfs`', '`delete_snapshot`',
- '`delete_subnet`', '`delete_vm`', '`delete_volume`', '`detach_vm_interface`',
- '`detach_volume`', '`download_image`', '`downscale_ai_cluster_gpu`',
- '`downscale_gpu_virtual_cluster`', '`extend_sfs`', '`extend_volume`',
- '`failover_loadbalancer`', '`hard_reboot_gpu_baremetal_server`',
- '`hard_reboot_gpu_virtual_cluster`', '`hard_reboot_gpu_virtual_server`',
- '`hard_reboot_vm`', '`patch_caas_container`', '`patch_dbaas_postgres_cluster`',
- '`patch_faas_function`', '`patch_faas_namespace`', '`patch_lblistener`',
- '`patch_lbpool`', '`put_into_server_group`', '`put_l7rule`', '`rebuild_bm`',
- '`rebuild_gpu_baremetal_node`', '`remove_from_server_group`',
- '`replace_lbmetadata`', '`resize_k8s_cluster_v2`', '`resize_loadbalancer`',
- '`resize_vm`', '`resume_vm`', '`revert_volume`',
- '`soft_reboot_gpu_baremetal_server`', '`soft_reboot_gpu_virtual_cluster`',
- '`soft_reboot_gpu_virtual_server`', '`soft_reboot_vm`',
- '`start_gpu_baremetal_server`', '`start_gpu_virtual_cluster`',
- '`start_gpu_virtual_server`', '`start_vm`', '`stop_gpu_baremetal_server`',
- '`stop_gpu_virtual_cluster`', '`stop_gpu_virtual_server`', '`stop_vm`',
- '`suspend_vm`', '`sync_private_flavors`', '`update_ddos_profile`',
- '`update_floating_ip`', '`update_inference_application`',
- '`update_inference_instance`', '`update_k8s_cluster_v2`', '`update_l7policy`',
- '`update_lbmetadata`', '`update_port_allowed_address_pairs`', '`update_router`',
- '`update_security_group`', '`update_sfs`', '`update_tags_gpu_virtual_cluster`',
- '`upgrade_k8s_cluster_v2`', '`upscale_ai_cluster_gpu`',
- '`upscale_gpu_virtual_cluster`']
+ Filter the tasks by their type one of ['activate_ddos_profile',
+ 'attach_bm_to_reserved_fixed_ip', 'attach_vm_interface',
+ 'attach_vm_to_reserved_fixed_ip', 'attach_volume', 'create_ai_cluster_gpu',
+ 'create_bm', 'create_caas_container', 'create_dbaas_postgres_cluster',
+ 'create_ddos_profile', 'create_faas_function', 'create_faas_namespace',
+ 'create_fip', 'create_gpu_virtual_cluster', 'create_image',
+ 'create_inference_application', 'create_inference_instance',
+ 'create_k8s_cluster_pool_v2', 'create_k8s_cluster_v2', 'create_l7policy',
+ 'create_l7rule', 'create_lblistener', 'create_lbmember', 'create_lbpool',
+ 'create_lbpool_health_monitor', 'create_loadbalancer', 'create_network',
+ 'create_reserved_fixed_ip', 'create_router', 'create_secret',
+ 'create_security_group', 'create_servergroup', 'create_sfs', 'create_snapshot',
+ 'create_subnet', 'create_vm', 'create_volume', 'deactivate_ddos_profile',
+ 'delete_ai_cluster_gpu', 'delete_caas_container',
+ 'delete_dbaas_postgres_cluster', 'delete_ddos_profile', 'delete_faas_function',
+ 'delete_faas_namespace', 'delete_fip', 'delete_gpu_virtual_cluster',
+ 'delete_gpu_virtual_server', 'delete_image', 'delete_inference_application',
+ 'delete_inference_instance', 'delete_k8s_cluster_pool_v2',
+ 'delete_k8s_cluster_v2', 'delete_l7policy', 'delete_l7rule',
+ 'delete_lblistener', 'delete_lbmember', 'delete_lbmetadata', 'delete_lbpool',
+ 'delete_loadbalancer', 'delete_network', 'delete_project',
+ 'delete_reserved_fixed_ip', 'delete_router', 'delete_secret',
+ 'delete_servergroup', 'delete_sfs', 'delete_snapshot', 'delete_subnet',
+ 'delete_vm', 'delete_volume', 'detach_vm_interface', 'detach_volume',
+ 'download_image', 'downscale_ai_cluster_gpu', 'downscale_gpu_virtual_cluster',
+ 'extend_sfs', 'extend_volume', 'failover_loadbalancer',
+ 'hard_reboot_gpu_baremetal_server', 'hard_reboot_gpu_virtual_cluster',
+ 'hard_reboot_gpu_virtual_server', 'hard_reboot_vm', 'patch_caas_container',
+ 'patch_dbaas_postgres_cluster', 'patch_faas_function', 'patch_faas_namespace',
+ 'patch_lblistener', 'patch_lbpool', 'put_into_server_group', 'put_l7rule',
+ 'rebuild_bm', 'rebuild_gpu_baremetal_node', 'remove_from_server_group',
+ 'replace_lbmetadata', 'resize_k8s_cluster_v2', 'resize_loadbalancer',
+ 'resize_vm', 'resume_vm', 'revert_volume', 'soft_reboot_gpu_baremetal_server',
+ 'soft_reboot_gpu_virtual_cluster', 'soft_reboot_gpu_virtual_server',
+ 'soft_reboot_vm', 'start_gpu_baremetal_server', 'start_gpu_virtual_cluster',
+ 'start_gpu_virtual_server', 'start_vm', 'stop_gpu_baremetal_server',
+ 'stop_gpu_virtual_cluster', 'stop_gpu_virtual_server', 'stop_vm', 'suspend_vm',
+ 'sync_private_flavors', 'update_ddos_profile', 'update_floating_ip',
+ 'update_inference_application', 'update_inference_instance',
+ 'update_k8s_cluster_v2', 'update_l7policy', 'update_lbmetadata',
+ 'update_port_allowed_address_pairs', 'update_router', 'update_security_group',
+ 'update_sfs', 'update_tags_gpu_virtual_cluster', 'upgrade_k8s_cluster_v2',
+ 'upscale_ai_cluster_gpu', 'upscale_gpu_virtual_cluster']
"""
to_timestamp: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
diff --git a/src/gcore/types/cloud/usage_report_get_params.py b/src/gcore/types/cloud/usage_report_get_params.py
index 7af78190..6f5b1af2 100644
--- a/src/gcore/types/cloud/usage_report_get_params.py
+++ b/src/gcore/types/cloud/usage_report_get_params.py
@@ -412,7 +412,7 @@ class Sorting(TypedDict, total=False):
class TagsCondition(TypedDict, total=False):
key: str
- """The name of the tag to filter (e.g., '`os_version`')."""
+ """The name of the tag to filter (e.g., 'os_version')."""
strict: bool
"""Determines how strictly the tag value must match the specified value.
diff --git a/src/gcore/types/cloud/volume_snapshot_update_params.py b/src/gcore/types/cloud/volume_snapshot_update_params.py
index 5e279e7e..7ac318f9 100644
--- a/src/gcore/types/cloud/volume_snapshot_update_params.py
+++ b/src/gcore/types/cloud/volume_snapshot_update_params.py
@@ -35,20 +35,15 @@ class VolumeSnapshotUpdateParams(TypedDict, total=False):
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
"""
diff --git a/src/gcore/types/cloud/volume_update_params.py b/src/gcore/types/cloud/volume_update_params.py
index 09cf5e3f..a81d36f1 100644
--- a/src/gcore/types/cloud/volume_update_params.py
+++ b/src/gcore/types/cloud/volume_update_params.py
@@ -32,20 +32,15 @@ class VolumeUpdateParams(TypedDict, total=False):
- **Add/update tags:**
`{'tags': {'environment': 'production', 'team': 'backend'}}` adds new tags or
updates existing ones.
-
- **Delete tags:** `{'tags': {'old_tag': null}}` removes specific tags.
-
- **Remove all tags:** `{'tags': null}` removes all user-managed tags (read-only
tags are preserved).
-
- **Partial update:** `{'tags': {'environment': 'staging'}}` only updates
specified tags.
-
- **Mixed operations:**
`{'tags': {'environment': 'production', 'cost_center': 'engineering', 'deprecated_tag': null}}`
- adds/updates 'environment' and '`cost_center`' while removing
- '`deprecated_tag`', preserving other existing tags.
-
+ adds/updates 'environment' and 'cost_center' while removing 'deprecated_tag',
+ preserving other existing tags.
- **Replace all:** first delete existing tags with null values, then add new
ones in the same request.
"""
diff --git a/src/gcore/types/streaming/ai_contentmoderation_hardnudity.py b/src/gcore/types/streaming/ai_contentmoderation_hardnudity.py
index 11b0629a..500bc907 100644
--- a/src/gcore/types/streaming/ai_contentmoderation_hardnudity.py
+++ b/src/gcore/types/streaming/ai_contentmoderation_hardnudity.py
@@ -10,7 +10,7 @@
class AIContentmoderationHardnudity(BaseModel):
category: Literal["hard_nudity", "sport", "nsfw", "soft_nudity"]
- """AI content moderation with "`hard_nudity`" algorithm"""
+ """AI content moderation with "hard_nudity" algorithm"""
task_name: Literal["content-moderation"]
"""Name of the task to be performed"""
diff --git a/src/gcore/types/streaming/ai_contentmoderation_softnudity.py b/src/gcore/types/streaming/ai_contentmoderation_softnudity.py
index ebfb6a59..1fdd19b2 100644
--- a/src/gcore/types/streaming/ai_contentmoderation_softnudity.py
+++ b/src/gcore/types/streaming/ai_contentmoderation_softnudity.py
@@ -10,7 +10,7 @@
class AIContentmoderationSoftnudity(BaseModel):
category: Literal["soft_nudity", "sport", "nsfw", "hard_nudity"]
- """AI content moderation with "`soft_nudity`" algorithm"""
+ """AI content moderation with "soft_nudity" algorithm"""
task_name: Literal["content-moderation"]
"""Name of the task to be performed"""
diff --git a/src/gcore/types/streaming/ai_task.py b/src/gcore/types/streaming/ai_task.py
index f5f3c6e7..7d677e33 100644
--- a/src/gcore/types/streaming/ai_task.py
+++ b/src/gcore/types/streaming/ai_task.py
@@ -163,7 +163,7 @@ class TaskDataAITranscribe(BaseModel):
subtitles_language: Optional[str] = None
"""
Indicates which language it is clearly necessary to translate into. If this is
- not set, the original language will be used from attribute "`audio_language`".
+ not set, the original language will be used from attribute "audio_language".
Please note that:
diff --git a/src/gcore/types/streaming/ai_task_create_params.py b/src/gcore/types/streaming/ai_task_create_params.py
index cbf354f3..e336f45f 100644
--- a/src/gcore/types/streaming/ai_task_create_params.py
+++ b/src/gcore/types/streaming/ai_task_create_params.py
@@ -164,7 +164,7 @@ class AITaskCreateParams(TypedDict, total=False):
subtitles_language: str
"""
Indicates which language it is clearly necessary to translate into. If this is
- not set, the original language will be used from attribute "`audio_language`".
+ not set, the original language will be used from attribute "audio_language".
Please note that:
diff --git a/src/gcore/types/streaming/ai_task_list_params.py b/src/gcore/types/streaming/ai_task_list_params.py
index 8fe3d727..f449705d 100644
--- a/src/gcore/types/streaming/ai_task_list_params.py
+++ b/src/gcore/types/streaming/ai_task_list_params.py
@@ -19,8 +19,7 @@ class AITaskListParams(TypedDict, total=False):
Which field to use when ordering the results: `task_id`, status, and
`task_name`. Sorting is done in ascending (ASC) order.
- If parameter is omitted then "`started_at` DESC" is used for ordering by
- default.
+ If parameter is omitted then "started_at DESC" is used for ordering by default.
"""
page: int
diff --git a/src/gcore/types/streaming/clip.py b/src/gcore/types/streaming/clip.py
index b29471a8..3cab9cc9 100644
--- a/src/gcore/types/streaming/clip.py
+++ b/src/gcore/types/streaming/clip.py
@@ -24,7 +24,7 @@ class Clip(BaseModel):
can be added to left and right.
Duration of cutted segment cannot be greater than DVR duration for this stream.
- Therefore, to change the maximum, use "`dvr_duration`" parameter of this stream.
+ Therefore, to change the maximum, use "dvr_duration" parameter of this stream.
"""
created_at: Optional[str] = None
@@ -56,7 +56,7 @@ class Clip(BaseModel):
"""Link to HLS .m3u8 with immediate clip.
The link retains same adaptive bitrate as in the stream for end viewers. For
- additional restrictions, see the description of parameter "`mp4_master`".
+ additional restrictions, see the description of parameter "mp4_master".
"""
mp4_master: Optional[str] = None
diff --git a/src/gcore/types/streaming/create_video_param.py b/src/gcore/types/streaming/create_video_param.py
index 111f0095..bb4b74bc 100644
--- a/src/gcore/types/streaming/create_video_param.py
+++ b/src/gcore/types/streaming/create_video_param.py
@@ -106,15 +106,15 @@ class CreateVideoParam(TypedDict, total=False):
"""Authorization HTTP request header.
Will be used as credentials to authenticate a request to download a file
- (specified in "`origin_url`" parameter) on an external server.
+ (specified in "origin_url" parameter) on an external server.
Syntax: `Authorization: `
Examples:
- - "`origin_http_headers`": "Authorization: Basic ..."
- - "`origin_http_headers`": "Authorization: Bearer ..."
- - "`origin_http_headers`": "Authorization: APIKey ..." Example of usage when
+ - "origin_http_headers": "Authorization: Basic ..."
+ - "origin_http_headers": "Authorization: Bearer ..."
+ - "origin_http_headers": "Authorization: APIKey ..." Example of usage when
downloading a file from Google Drive:
```
@@ -141,7 +141,7 @@ class CreateVideoParam(TypedDict, total=False):
After uploading the video, the system will automatically create several
screenshots (they will be stored in "screenshots" attribute) from which you can
select an default screenshot. This "poster" field is for uploading your own
- image. Also use attribute "`screenshot_id`" to select poster as a default
+ image. Also use attribute "screenshot_id" to select poster as a default
screnshot.
Attribute accepts single image as base64-encoded string
diff --git a/src/gcore/types/streaming/playlist.py b/src/gcore/types/streaming/playlist.py
index a6349c50..495c206d 100644
--- a/src/gcore/types/streaming/playlist.py
+++ b/src/gcore/types/streaming/playlist.py
@@ -33,7 +33,7 @@ class Playlist(BaseModel):
Chunks are in fMP4 container.
- It is possible to use the same suffix-options as described in the "`hls_url`"
+ It is possible to use the same suffix-options as described in the "hls_url"
attribute.
Caution. Solely master.m3u8 (and master[-options].m3u8) is officially documented
diff --git a/src/gcore/types/streaming/playlist_create_params.py b/src/gcore/types/streaming/playlist_create_params.py
index c393d54f..f9102a3f 100644
--- a/src/gcore/types/streaming/playlist_create_params.py
+++ b/src/gcore/types/streaming/playlist_create_params.py
@@ -33,7 +33,7 @@ class PlaylistCreateParams(TypedDict, total=False):
Chunks are in fMP4 container.
- It is possible to use the same suffix-options as described in the "`hls_url`"
+ It is possible to use the same suffix-options as described in the "hls_url"
attribute.
Caution. Solely master.m3u8 (and master[-options].m3u8) is officially documented
diff --git a/src/gcore/types/streaming/playlist_update_params.py b/src/gcore/types/streaming/playlist_update_params.py
index ec9e9fd2..10fe4362 100644
--- a/src/gcore/types/streaming/playlist_update_params.py
+++ b/src/gcore/types/streaming/playlist_update_params.py
@@ -33,7 +33,7 @@ class PlaylistUpdateParams(TypedDict, total=False):
Chunks are in fMP4 container.
- It is possible to use the same suffix-options as described in the "`hls_url`"
+ It is possible to use the same suffix-options as described in the "hls_url"
attribute.
Caution. Solely master.m3u8 (and master[-options].m3u8) is officially documented
diff --git a/src/gcore/types/streaming/playlist_video.py b/src/gcore/types/streaming/playlist_video.py
index d271fb3b..e8762a5e 100644
--- a/src/gcore/types/streaming/playlist_video.py
+++ b/src/gcore/types/streaming/playlist_video.py
@@ -107,15 +107,15 @@ class PlaylistVideo(BaseModel):
"""Authorization HTTP request header.
Will be used as credentials to authenticate a request to download a file
- (specified in "`origin_url`" parameter) on an external server.
+ (specified in "origin_url" parameter) on an external server.
Syntax: `Authorization: `
Examples:
- - "`origin_http_headers`": "Authorization: Basic ..."
- - "`origin_http_headers`": "Authorization: Bearer ..."
- - "`origin_http_headers`": "Authorization: APIKey ..." Example of usage when
+ - "origin_http_headers": "Authorization: Basic ..."
+ - "origin_http_headers": "Authorization: Bearer ..."
+ - "origin_http_headers": "Authorization: APIKey ..." Example of usage when
downloading a file from Google Drive:
```
@@ -142,7 +142,7 @@ class PlaylistVideo(BaseModel):
After uploading the video, the system will automatically create several
screenshots (they will be stored in "screenshots" attribute) from which you can
select an default screenshot. This "poster" field is for uploading your own
- image. Also use attribute "`screenshot_id`" to select poster as a default
+ image. Also use attribute "screenshot_id" to select poster as a default
screnshot.
Attribute accepts single image as base64-encoded string
diff --git a/src/gcore/types/streaming/statistic_get_live_unique_viewers_params.py b/src/gcore/types/streaming/statistic_get_live_unique_viewers_params.py
index 7766326f..76f5fad1 100644
--- a/src/gcore/types/streaming/statistic_get_live_unique_viewers_params.py
+++ b/src/gcore/types/streaming/statistic_get_live_unique_viewers_params.py
@@ -17,10 +17,10 @@ class StatisticGetLiveUniqueViewersParams(TypedDict, total=False):
"""End of time frame. Format is date time in ISO 8601"""
client_user_id: int
- """Filter by "`client_user_id`" """
+ """Filter by "client_user_id" """
granularity: Literal["1m", "5m", "15m", "1h", "1d"]
"""Specifies the time interval for grouping data"""
stream_id: int
- """Filter by "`stream_id`" """
+ """Filter by "stream_id" """
diff --git a/src/gcore/types/streaming/statistic_get_live_watch_time_cdn_params.py b/src/gcore/types/streaming/statistic_get_live_watch_time_cdn_params.py
index c7178616..74e37c52 100644
--- a/src/gcore/types/streaming/statistic_get_live_watch_time_cdn_params.py
+++ b/src/gcore/types/streaming/statistic_get_live_watch_time_cdn_params.py
@@ -17,7 +17,7 @@ class StatisticGetLiveWatchTimeCdnParams(TypedDict, total=False):
"""
client_user_id: int
- """Filter by field "`client_user_id`" """
+ """Filter by field "client_user_id" """
granularity: Literal["1m", "5m", "15m", "1h", "1d", "1mo"]
"""Data is grouped by the specified time interval"""
diff --git a/src/gcore/types/streaming/statistic_get_live_watch_time_total_cdn_params.py b/src/gcore/types/streaming/statistic_get_live_watch_time_total_cdn_params.py
index 8ba977d6..0711a555 100644
--- a/src/gcore/types/streaming/statistic_get_live_watch_time_total_cdn_params.py
+++ b/src/gcore/types/streaming/statistic_get_live_watch_time_total_cdn_params.py
@@ -11,7 +11,7 @@
class StatisticGetLiveWatchTimeTotalCdnParams(TypedDict, total=False):
client_user_id: int
- """Filter by field "`client_user_id`" """
+ """Filter by field "client_user_id" """
from_: Annotated[str, PropertyInfo(alias="from")]
"""Start of the time period for counting minutes of watching.
diff --git a/src/gcore/types/streaming/statistic_get_vod_watch_time_cdn_params.py b/src/gcore/types/streaming/statistic_get_vod_watch_time_cdn_params.py
index 83869ae2..f7af2996 100644
--- a/src/gcore/types/streaming/statistic_get_vod_watch_time_cdn_params.py
+++ b/src/gcore/types/streaming/statistic_get_vod_watch_time_cdn_params.py
@@ -17,7 +17,7 @@ class StatisticGetVodWatchTimeCdnParams(TypedDict, total=False):
"""
client_user_id: int
- """Filter by field "`client_user_id`" """
+ """Filter by field "client_user_id" """
granularity: Literal["1m", "5m", "15m", "1h", "1d", "1mo"]
"""Data is grouped by the specified time interval"""
diff --git a/src/gcore/types/streaming/statistic_get_vod_watch_time_total_cdn_params.py b/src/gcore/types/streaming/statistic_get_vod_watch_time_total_cdn_params.py
index dc7271d3..2599d8bd 100644
--- a/src/gcore/types/streaming/statistic_get_vod_watch_time_total_cdn_params.py
+++ b/src/gcore/types/streaming/statistic_get_vod_watch_time_total_cdn_params.py
@@ -11,7 +11,7 @@
class StatisticGetVodWatchTimeTotalCdnParams(TypedDict, total=False):
client_user_id: int
- """Filter by field "`client_user_id`" """
+ """Filter by field "client_user_id" """
from_: Annotated[str, PropertyInfo(alias="from")]
"""Start of the time period for counting minutes of watching.
diff --git a/src/gcore/types/streaming/stream.py b/src/gcore/types/streaming/stream.py
index c467567c..e096496b 100644
--- a/src/gcore/types/streaming/stream.py
+++ b/src/gcore/types/streaming/stream.py
@@ -57,7 +57,7 @@ class Stream(BaseModel):
backup_live: Optional[bool] = None
"""
State of receiving and transcoding master stream from source by backup server if
- you pushing stream to "`backup_push_url`" or "`backup_push_url_srt`".
+ you pushing stream to "backup_push_url" or "backup_push_url_srt".
Displays the backup server status of PUSH method only. For PULL a "live" field
is always used, even when origin servers are switched using round robin
@@ -191,8 +191,8 @@ class Stream(BaseModel):
- and its possible to enable ±3 sec for LL-HLS, just ask our Support Team.
It is also possible to use modifier-attributes, which are described in the
- "`hls_mpegts_url`" field above. If you need to get MPEG-TS (.ts) chunks, look at
- the attribute "`hls_mpegts_url`".
+ "hls_mpegts_url" field above. If you need to get MPEG-TS (.ts) chunks, look at
+ the attribute "hls_mpegts_url".
Read more information in the article "How Low Latency streaming works" in the
Knowledge Base.
@@ -215,7 +215,7 @@ class Stream(BaseModel):
Some legacy devices or software may require MPEG-TS (.ts) segments as a format
for streaming, so we provide this options keeping backward compatibility with
any of your existing workflows. For other cases it's better to use
- "`hls_cmaf_url`" instead.
+ "hls_cmaf_url" instead.
You can use this legacy HLSv6 format based on MPEG-TS segmenter in parallel with
main HLS CMAF. Both formats are sharing same segments size, manifest length
@@ -225,9 +225,9 @@ class Stream(BaseModel):
- ?`get_duration_sec`=true – Adds the real segment duration in seconds to chunk
requests. A chunk duration will be automatically added to a chunk request
- string with the "`duration_sec`" attribute. The value is an integer for a
- length multiple of whole seconds, or a fractional number separated by a dot
- for chunks that are not multiples of seconds. This attribute allows you to
+ string with the "duration_sec" attribute. The value is an integer for a length
+ multiple of whole seconds, or a fractional number separated by a dot for
+ chunks that are not multiples of seconds. This attribute allows you to
determine duration in seconds at the level of analyzing the logs of CDN
requests and compare it with file size (so to use it in your analytics).
@@ -264,8 +264,8 @@ class Stream(BaseModel):
It can be inserted into an iframe on your website and the video will
automatically play in all browsers.
- Please, remember that transcoded streams from "`hls_cmaf_url`" with .m3u8 at the
- end, and from "`dash_url`" with .mpd at the end are to be played inside video
+ Please, remember that transcoded streams from "hls_cmaf_url" with .m3u8 at the
+ end, and from "dash_url" with .mpd at the end are to be played inside video
players only. For example: AVplayer on iOS, Exoplayer on Android, HTML web
player in browser, etc. General bowsers like Chrome, Firefox, etc cannot play
transcoded streams with .m3u8 and .mpd at the end. The only exception is Safari,
@@ -339,9 +339,9 @@ class Stream(BaseModel):
For advanced customers only: For your complexly distributed broadcast systems,
it is also possible to additionally output an array of multi-regional ingestion
points for manual selection from them. To activate this mode, contact your
- manager or the Support Team to activate the "`multi_region_push_urls`" attibute.
+ manager or the Support Team to activate the "multi_region_push_urls" attibute.
But if you clearly don’t understand why you need this, then it’s best to use the
- default single URL in the "`push_url`" attribute.
+ default single URL in the "push_url" attribute.
"""
push_url_srt: Optional[str] = None
@@ -527,7 +527,7 @@ class Stream(BaseModel):
requests and the stream is deactivated (the "active" field switches to "false").
Please, note that this field is for PULL only, so is not suitable for PUSH. Look
- at fields "`push_url`" and "`push_url_srt`" from GET method.
+ at fields "push_url" and "push_url_srt" from GET method.
"""
video_height: Optional[float] = None
diff --git a/src/gcore/types/streaming/stream_create_clip_params.py b/src/gcore/types/streaming/stream_create_clip_params.py
index 5440a13d..2a2f365a 100644
--- a/src/gcore/types/streaming/stream_create_clip_params.py
+++ b/src/gcore/types/streaming/stream_create_clip_params.py
@@ -21,7 +21,7 @@ class StreamCreateClipParams(TypedDict, total=False):
can be added to left and right.
Duration of cutted segment cannot be greater than DVR duration for this stream.
- Therefore, to change the maximum, use "`dvr_duration`" parameter of this stream.
+ Therefore, to change the maximum, use "dvr_duration" parameter of this stream.
"""
expiration: int
diff --git a/src/gcore/types/streaming/stream_create_params.py b/src/gcore/types/streaming/stream_create_params.py
index 50513e7d..565c9dcb 100644
--- a/src/gcore/types/streaming/stream_create_params.py
+++ b/src/gcore/types/streaming/stream_create_params.py
@@ -164,5 +164,5 @@ class StreamCreateParams(TypedDict, total=False):
requests and the stream is deactivated (the "active" field switches to "false").
Please, note that this field is for PULL only, so is not suitable for PUSH. Look
- at fields "`push_url`" and "`push_url_srt`" from GET method.
+ at fields "push_url" and "push_url_srt" from GET method.
"""
diff --git a/src/gcore/types/streaming/stream_update_params.py b/src/gcore/types/streaming/stream_update_params.py
index da6d8478..f880f872 100644
--- a/src/gcore/types/streaming/stream_update_params.py
+++ b/src/gcore/types/streaming/stream_update_params.py
@@ -168,5 +168,5 @@ class Stream(TypedDict, total=False):
requests and the stream is deactivated (the "active" field switches to "false").
Please, note that this field is for PULL only, so is not suitable for PUSH. Look
- at fields "`push_url`" and "`push_url_srt`" from GET method.
+ at fields "push_url" and "push_url_srt" from GET method.
"""
diff --git a/src/gcore/types/streaming/video.py b/src/gcore/types/streaming/video.py
index 23830bad..c12c6453 100644
--- a/src/gcore/types/streaming/video.py
+++ b/src/gcore/types/streaming/video.py
@@ -220,7 +220,7 @@ class Video(BaseModel):
return just 1 video codec in a manifest. Read the Product Documentation for
details.
- Read more what is ABR soft-limiting in the "`hls_url`" field above.
+ Read more what is ABR soft-limiting in the "hls_url" field above.
Caution. Solely master.mpd is officially documented and intended for your use.
Any additional internal manifests, sub-manifests, parameters, chunk names, file
@@ -235,9 +235,8 @@ class Video(BaseModel):
duration: Optional[int] = None
"""Video duration in milliseconds.
- May differ from "`origin_video_duration`" value if the video was uploaded with
- clipping through the parameters "`clip_start_seconds`" and
- "`clip_duration_seconds`"
+ May differ from "origin_video_duration" value if the video was uploaded with
+ clipping through the parameters "clip_start_seconds" and "clip_duration_seconds"
"""
error: Optional[str] = None
@@ -249,7 +248,7 @@ class Video(BaseModel):
Chunks are in fMP4 container. It's a code-agnostic container, which allows to
use any like H264, H265, AV1, etc.
- It is possible to use the same suffix-options as described in the "`hls_url`"
+ It is possible to use the same suffix-options as described in the "hls_url"
attribute.
Caution. Solely master.m3u8 (and master[-options].m3u8) is officially documented
@@ -366,7 +365,7 @@ class Video(BaseModel):
URL to the original non-transcoded stream recording with original quality, saved
in MP4 format. File is created immediately after the completion of the stream
recording. The stream from which the recording was made is reflected in
- "`stream_id`" field.
+ "stream_id" field.
Can be used for internal operations when a recording needs to be received faster
than the transcoded versions are ready. But this version is not intended for
@@ -515,6 +514,5 @@ class Video(BaseModel):
"""
Number of video views through the built-in HTML video player of the Streaming
Platform only. This attribute does not count views from other external players
- and native OS players, so here may be less number of views than in
- "`cdn_views`".
+ and native OS players, so here may be less number of views than in "cdn_views".
"""
diff --git a/src/gcore/types/streaming/video_list_params.py b/src/gcore/types/streaming/video_list_params.py
index 91cc9504..3d39e7e9 100644
--- a/src/gcore/types/streaming/video_list_params.py
+++ b/src/gcore/types/streaming/video_list_params.py
@@ -16,7 +16,7 @@ class VideoListParams(TypedDict, total=False):
"""
client_user_id: int
- """Find videos where "`client_user_id`" meta field is equal to the search value"""
+ """Find videos where "client_user_id" meta field is equal to the search value"""
fields: str
"""
@@ -56,6 +56,6 @@ class VideoListParams(TypedDict, total=False):
stream_id: int
"""
- Find videos recorded from a specific stream, so for which "`stream_id`" field is
+ Find videos recorded from a specific stream, so for which "stream_id" field is
equal to the search value
"""
diff --git a/src/gcore/types/streaming/video_update_params.py b/src/gcore/types/streaming/video_update_params.py
index d1ad1c8a..72244d21 100644
--- a/src/gcore/types/streaming/video_update_params.py
+++ b/src/gcore/types/streaming/video_update_params.py
@@ -106,15 +106,15 @@ class VideoUpdateParams(TypedDict, total=False):
"""Authorization HTTP request header.
Will be used as credentials to authenticate a request to download a file
- (specified in "`origin_url`" parameter) on an external server.
+ (specified in "origin_url" parameter) on an external server.
Syntax: `Authorization: `
Examples:
- - "`origin_http_headers`": "Authorization: Basic ..."
- - "`origin_http_headers`": "Authorization: Bearer ..."
- - "`origin_http_headers`": "Authorization: APIKey ..." Example of usage when
+ - "origin_http_headers": "Authorization: Basic ..."
+ - "origin_http_headers": "Authorization: Bearer ..."
+ - "origin_http_headers": "Authorization: APIKey ..." Example of usage when
downloading a file from Google Drive:
```
@@ -141,7 +141,7 @@ class VideoUpdateParams(TypedDict, total=False):
After uploading the video, the system will automatically create several
screenshots (they will be stored in "screenshots" attribute) from which you can
select an default screenshot. This "poster" field is for uploading your own
- image. Also use attribute "`screenshot_id`" to select poster as a default
+ image. Also use attribute "screenshot_id" to select poster as a default
screnshot.
Attribute accepts single image as base64-encoded string
diff --git a/src/gcore/types/waap/domains/advanced_rule_create_params.py b/src/gcore/types/waap/domains/advanced_rule_create_params.py
index 7eb0bf01..5ce72816 100644
--- a/src/gcore/types/waap/domains/advanced_rule_create_params.py
+++ b/src/gcore/types/waap/domains/advanced_rule_create_params.py
@@ -42,10 +42,10 @@ class AdvancedRuleCreateParams(TypedDict, total=False):
The "access" phase is responsible for modifying the request before it is sent to
the origin server.
- The "`header_filter`" phase is responsible for modifying the HTTP headers of a
+ The "header_filter" phase is responsible for modifying the HTTP headers of a
response before they are sent back to the client.
- The "`body_filter`" phase is responsible for modifying the body of a response
+ The "body_filter" phase is responsible for modifying the body of a response
before it is sent back to the client.
"""
diff --git a/src/gcore/types/waap/domains/advanced_rule_list_params.py b/src/gcore/types/waap/domains/advanced_rule_list_params.py
index dfa975c3..301d3eb4 100644
--- a/src/gcore/types/waap/domains/advanced_rule_list_params.py
+++ b/src/gcore/types/waap/domains/advanced_rule_list_params.py
@@ -51,9 +51,9 @@ class AdvancedRuleListParams(TypedDict, total=False):
The "access" phase is responsible for modifying the request before it is sent to
the origin server.
- The "`header_filter`" phase is responsible for modifying the HTTP headers of a
+ The "header_filter" phase is responsible for modifying the HTTP headers of a
response before they are sent back to the client.
- The "`body_filter`" phase is responsible for modifying the body of a response
+ The "body_filter" phase is responsible for modifying the body of a response
before it is sent back to the client.
"""
diff --git a/src/gcore/types/waap/domains/advanced_rule_update_params.py b/src/gcore/types/waap/domains/advanced_rule_update_params.py
index 7c191c34..60d061bf 100644
--- a/src/gcore/types/waap/domains/advanced_rule_update_params.py
+++ b/src/gcore/types/waap/domains/advanced_rule_update_params.py
@@ -32,10 +32,10 @@ class AdvancedRuleUpdateParams(TypedDict, total=False):
The "access" phase is responsible for modifying the request before it is sent to
the origin server.
- The "`header_filter`" phase is responsible for modifying the HTTP headers of a
+ The "header_filter" phase is responsible for modifying the HTTP headers of a
response before they are sent back to the client.
- The "`body_filter`" phase is responsible for modifying the body of a response
+ The "body_filter" phase is responsible for modifying the body of a response
before it is sent back to the client.
"""
diff --git a/src/gcore/types/waap/domains/waap_advanced_rule.py b/src/gcore/types/waap/domains/waap_advanced_rule.py
index 22450b73..feb436a2 100644
--- a/src/gcore/types/waap/domains/waap_advanced_rule.py
+++ b/src/gcore/types/waap/domains/waap_advanced_rule.py
@@ -97,9 +97,9 @@ class WaapAdvancedRule(BaseModel):
The "access" phase is responsible for modifying the request before it is sent to
the origin server.
- The "`header_filter`" phase is responsible for modifying the HTTP headers of a
+ The "header_filter" phase is responsible for modifying the HTTP headers of a
response before they are sent back to the client.
- The "`body_filter`" phase is responsible for modifying the body of a response
+ The "body_filter" phase is responsible for modifying the body of a response
before it is sent back to the client.
"""
diff --git a/tests/api_resources/cloud/test_floating_ips.py b/tests/api_resources/cloud/test_floating_ips.py
index b2394861..97ff5795 100644
--- a/tests/api_resources/cloud/test_floating_ips.py
+++ b/tests/api_resources/cloud/test_floating_ips.py
@@ -71,66 +71,61 @@ def test_streaming_response_create(self, client: Gcore) -> None:
@parametrize
def test_method_update(self, client: Gcore) -> None:
- with pytest.warns(DeprecationWarning):
- floating_ip = client.cloud.floating_ips.update(
- floating_ip_id="c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
- project_id=1,
- region_id=1,
- )
-
- assert_matches_type(FloatingIP, floating_ip, path=["response"])
+ floating_ip = client.cloud.floating_ips.update(
+ floating_ip_id="c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
+ project_id=1,
+ region_id=1,
+ )
+ assert_matches_type(TaskIDList, floating_ip, path=["response"])
@parametrize
def test_method_update_with_all_params(self, client: Gcore) -> None:
- with pytest.warns(DeprecationWarning):
- floating_ip = client.cloud.floating_ips.update(
- floating_ip_id="c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
- project_id=1,
- region_id=1,
- tags={"foo": "my-tag-value"},
- )
-
- assert_matches_type(FloatingIP, floating_ip, path=["response"])
+ floating_ip = client.cloud.floating_ips.update(
+ floating_ip_id="c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
+ project_id=1,
+ region_id=1,
+ fixed_ip_address="192.168.10.15",
+ port_id="ee2402d0-f0cd-4503-9b75-69be1d11c5f1",
+ tags={"foo": "my-tag-value"},
+ )
+ assert_matches_type(TaskIDList, floating_ip, path=["response"])
@parametrize
def test_raw_response_update(self, client: Gcore) -> None:
- with pytest.warns(DeprecationWarning):
- response = client.cloud.floating_ips.with_raw_response.update(
- floating_ip_id="c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
- project_id=1,
- region_id=1,
- )
+ response = client.cloud.floating_ips.with_raw_response.update(
+ floating_ip_id="c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
+ project_id=1,
+ region_id=1,
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
floating_ip = response.parse()
- assert_matches_type(FloatingIP, floating_ip, path=["response"])
+ assert_matches_type(TaskIDList, floating_ip, path=["response"])
@parametrize
def test_streaming_response_update(self, client: Gcore) -> None:
- with pytest.warns(DeprecationWarning):
- with client.cloud.floating_ips.with_streaming_response.update(
- floating_ip_id="c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
- project_id=1,
- region_id=1,
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with client.cloud.floating_ips.with_streaming_response.update(
+ floating_ip_id="c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
+ project_id=1,
+ region_id=1,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- floating_ip = response.parse()
- assert_matches_type(FloatingIP, floating_ip, path=["response"])
+ floating_ip = response.parse()
+ assert_matches_type(TaskIDList, floating_ip, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
def test_path_params_update(self, client: Gcore) -> None:
- with pytest.warns(DeprecationWarning):
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `floating_ip_id` but received ''"):
- client.cloud.floating_ips.with_raw_response.update(
- floating_ip_id="",
- project_id=1,
- region_id=1,
- )
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `floating_ip_id` but received ''"):
+ client.cloud.floating_ips.with_raw_response.update(
+ floating_ip_id="",
+ project_id=1,
+ region_id=1,
+ )
@parametrize
def test_method_list(self, client: Gcore) -> None:
@@ -443,66 +438,61 @@ async def test_streaming_response_create(self, async_client: AsyncGcore) -> None
@parametrize
async def test_method_update(self, async_client: AsyncGcore) -> None:
- with pytest.warns(DeprecationWarning):
- floating_ip = await async_client.cloud.floating_ips.update(
- floating_ip_id="c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
- project_id=1,
- region_id=1,
- )
-
- assert_matches_type(FloatingIP, floating_ip, path=["response"])
+ floating_ip = await async_client.cloud.floating_ips.update(
+ floating_ip_id="c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
+ project_id=1,
+ region_id=1,
+ )
+ assert_matches_type(TaskIDList, floating_ip, path=["response"])
@parametrize
async def test_method_update_with_all_params(self, async_client: AsyncGcore) -> None:
- with pytest.warns(DeprecationWarning):
- floating_ip = await async_client.cloud.floating_ips.update(
- floating_ip_id="c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
- project_id=1,
- region_id=1,
- tags={"foo": "my-tag-value"},
- )
-
- assert_matches_type(FloatingIP, floating_ip, path=["response"])
+ floating_ip = await async_client.cloud.floating_ips.update(
+ floating_ip_id="c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
+ project_id=1,
+ region_id=1,
+ fixed_ip_address="192.168.10.15",
+ port_id="ee2402d0-f0cd-4503-9b75-69be1d11c5f1",
+ tags={"foo": "my-tag-value"},
+ )
+ assert_matches_type(TaskIDList, floating_ip, path=["response"])
@parametrize
async def test_raw_response_update(self, async_client: AsyncGcore) -> None:
- with pytest.warns(DeprecationWarning):
- response = await async_client.cloud.floating_ips.with_raw_response.update(
- floating_ip_id="c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
- project_id=1,
- region_id=1,
- )
+ response = await async_client.cloud.floating_ips.with_raw_response.update(
+ floating_ip_id="c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
+ project_id=1,
+ region_id=1,
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
floating_ip = await response.parse()
- assert_matches_type(FloatingIP, floating_ip, path=["response"])
+ assert_matches_type(TaskIDList, floating_ip, path=["response"])
@parametrize
async def test_streaming_response_update(self, async_client: AsyncGcore) -> None:
- with pytest.warns(DeprecationWarning):
- async with async_client.cloud.floating_ips.with_streaming_response.update(
- floating_ip_id="c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
- project_id=1,
- region_id=1,
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ async with async_client.cloud.floating_ips.with_streaming_response.update(
+ floating_ip_id="c64e5db1-5f1f-43ec-a8d9-5090df85b82d",
+ project_id=1,
+ region_id=1,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- floating_ip = await response.parse()
- assert_matches_type(FloatingIP, floating_ip, path=["response"])
+ floating_ip = await response.parse()
+ assert_matches_type(TaskIDList, floating_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.warns(DeprecationWarning):
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `floating_ip_id` but received ''"):
- await async_client.cloud.floating_ips.with_raw_response.update(
- floating_ip_id="",
- project_id=1,
- region_id=1,
- )
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `floating_ip_id` but received ''"):
+ await async_client.cloud.floating_ips.with_raw_response.update(
+ floating_ip_id="",
+ project_id=1,
+ region_id=1,
+ )
@parametrize
async def test_method_list(self, async_client: AsyncGcore) -> None:
diff --git a/tests/api_resources/cloud/test_security_groups.py b/tests/api_resources/cloud/test_security_groups.py
index 0b842fd6..2bd9402b 100644
--- a/tests/api_resources/cloud/test_security_groups.py
+++ b/tests/api_resources/cloud/test_security_groups.py
@@ -11,11 +11,10 @@
from tests.utils import assert_matches_type
from gcore.pagination import SyncOffsetPage, AsyncOffsetPage
from gcore.types.cloud import (
+ TaskIDList,
SecurityGroup,
)
-# pyright: reportDeprecated=false
-
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -24,150 +23,133 @@ class TestSecurityGroups:
@parametrize
def test_method_create(self, client: Gcore) -> None:
- with pytest.warns(DeprecationWarning):
- security_group = client.cloud.security_groups.create(
- project_id=1,
- region_id=1,
- security_group={"name": "my_security_group"},
- )
-
- assert_matches_type(SecurityGroup, security_group, path=["response"])
+ security_group = client.cloud.security_groups.create(
+ project_id=1,
+ region_id=1,
+ name="my_security_group",
+ )
+ assert_matches_type(TaskIDList, security_group, path=["response"])
@parametrize
def test_method_create_with_all_params(self, client: Gcore) -> None:
- with pytest.warns(DeprecationWarning):
- security_group = client.cloud.security_groups.create(
- project_id=1,
- region_id=1,
- security_group={
- "name": "my_security_group",
+ security_group = client.cloud.security_groups.create(
+ project_id=1,
+ region_id=1,
+ name="my_security_group",
+ description="My security group description",
+ rules=[
+ {
+ "direction": "ingress",
"description": "Some description",
- "security_group_rules": [
- {
- "direction": "ingress",
- "description": "Some description",
- "ethertype": "IPv4",
- "port_range_max": 80,
- "port_range_min": 80,
- "protocol": "tcp",
- "remote_group_id": "00000000-0000-4000-8000-000000000000",
- "remote_ip_prefix": "10.0.0.0/8",
- }
- ],
- "tags": {"my-tag": "my-tag-value"},
- },
- instances=["00000000-0000-4000-8000-000000000000"],
- )
-
- assert_matches_type(SecurityGroup, security_group, path=["response"])
+ "ethertype": "IPv4",
+ "port_range_max": 80,
+ "port_range_min": 80,
+ "protocol": "tcp",
+ "remote_group_id": "00000000-0000-4000-8000-000000000000",
+ "remote_ip_prefix": "10.0.0.0/8",
+ }
+ ],
+ tags={"my-tag": "my-tag-value"},
+ )
+ assert_matches_type(TaskIDList, security_group, path=["response"])
@parametrize
def test_raw_response_create(self, client: Gcore) -> None:
- with pytest.warns(DeprecationWarning):
- response = client.cloud.security_groups.with_raw_response.create(
- project_id=1,
- region_id=1,
- security_group={"name": "my_security_group"},
- )
+ response = client.cloud.security_groups.with_raw_response.create(
+ project_id=1,
+ region_id=1,
+ name="my_security_group",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
security_group = response.parse()
- assert_matches_type(SecurityGroup, security_group, path=["response"])
+ assert_matches_type(TaskIDList, security_group, path=["response"])
@parametrize
def test_streaming_response_create(self, client: Gcore) -> None:
- with pytest.warns(DeprecationWarning):
- with client.cloud.security_groups.with_streaming_response.create(
- project_id=1,
- region_id=1,
- security_group={"name": "my_security_group"},
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with client.cloud.security_groups.with_streaming_response.create(
+ project_id=1,
+ region_id=1,
+ name="my_security_group",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- security_group = response.parse()
- assert_matches_type(SecurityGroup, security_group, path=["response"])
+ security_group = response.parse()
+ assert_matches_type(TaskIDList, security_group, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
def test_method_update(self, client: Gcore) -> None:
- with pytest.warns(DeprecationWarning):
- security_group = client.cloud.security_groups.update(
- group_id="024a29e9-b4b7-4c91-9a46-505be123d9f8",
- project_id=1,
- region_id=1,
- )
-
- assert_matches_type(SecurityGroup, security_group, path=["response"])
+ security_group = client.cloud.security_groups.update(
+ group_id="00000000-0000-4000-8000-000000000000",
+ project_id=1,
+ region_id=1,
+ )
+ assert_matches_type(TaskIDList, security_group, path=["response"])
@parametrize
def test_method_update_with_all_params(self, client: Gcore) -> None:
- with pytest.warns(DeprecationWarning):
- security_group = client.cloud.security_groups.update(
- group_id="024a29e9-b4b7-4c91-9a46-505be123d9f8",
- project_id=1,
- region_id=1,
- changed_rules=[
- {
- "action": "delete",
- "description": "Some description",
- "direction": "egress",
- "ethertype": "IPv4",
- "port_range_max": 80,
- "port_range_min": 80,
- "protocol": "tcp",
- "remote_group_id": "00000000-0000-4000-8000-000000000000",
- "remote_ip_prefix": "10.0.0.0/8",
- "security_group_rule_id": "00000000-0000-4000-8000-000000000000",
- }
- ],
- name="some_name",
- tags={"foo": "my-tag-value"},
- )
-
- assert_matches_type(SecurityGroup, security_group, path=["response"])
+ security_group = client.cloud.security_groups.update(
+ group_id="00000000-0000-4000-8000-000000000000",
+ project_id=1,
+ region_id=1,
+ description="Some description",
+ name="some_name",
+ rules=[
+ {
+ "description": "Some description",
+ "direction": "egress",
+ "ethertype": "IPv4",
+ "port_range_max": 80,
+ "port_range_min": 80,
+ "protocol": "tcp",
+ "remote_group_id": "00000000-0000-4000-8000-000000000000",
+ "remote_ip_prefix": "10.0.0.0/8",
+ }
+ ],
+ tags={"foo": "my-tag-value"},
+ )
+ assert_matches_type(TaskIDList, security_group, path=["response"])
@parametrize
def test_raw_response_update(self, client: Gcore) -> None:
- with pytest.warns(DeprecationWarning):
- response = client.cloud.security_groups.with_raw_response.update(
- group_id="024a29e9-b4b7-4c91-9a46-505be123d9f8",
- project_id=1,
- region_id=1,
- )
+ response = client.cloud.security_groups.with_raw_response.update(
+ group_id="00000000-0000-4000-8000-000000000000",
+ project_id=1,
+ region_id=1,
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
security_group = response.parse()
- assert_matches_type(SecurityGroup, security_group, path=["response"])
+ assert_matches_type(TaskIDList, security_group, path=["response"])
@parametrize
def test_streaming_response_update(self, client: Gcore) -> None:
- with pytest.warns(DeprecationWarning):
- with client.cloud.security_groups.with_streaming_response.update(
- group_id="024a29e9-b4b7-4c91-9a46-505be123d9f8",
- project_id=1,
- region_id=1,
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ with client.cloud.security_groups.with_streaming_response.update(
+ group_id="00000000-0000-4000-8000-000000000000",
+ project_id=1,
+ region_id=1,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- security_group = response.parse()
- assert_matches_type(SecurityGroup, security_group, path=["response"])
+ security_group = response.parse()
+ assert_matches_type(TaskIDList, security_group, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
def test_path_params_update(self, client: Gcore) -> None:
- with pytest.warns(DeprecationWarning):
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `group_id` but received ''"):
- client.cloud.security_groups.with_raw_response.update(
- group_id="",
- project_id=1,
- region_id=1,
- )
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `group_id` but received ''"):
+ client.cloud.security_groups.with_raw_response.update(
+ group_id="",
+ project_id=1,
+ region_id=1,
+ )
@parametrize
def test_method_list(self, client: Gcore) -> None:
@@ -412,150 +394,133 @@ class TestAsyncSecurityGroups:
@parametrize
async def test_method_create(self, async_client: AsyncGcore) -> None:
- with pytest.warns(DeprecationWarning):
- security_group = await async_client.cloud.security_groups.create(
- project_id=1,
- region_id=1,
- security_group={"name": "my_security_group"},
- )
-
- assert_matches_type(SecurityGroup, security_group, path=["response"])
+ security_group = await async_client.cloud.security_groups.create(
+ project_id=1,
+ region_id=1,
+ name="my_security_group",
+ )
+ assert_matches_type(TaskIDList, security_group, path=["response"])
@parametrize
async def test_method_create_with_all_params(self, async_client: AsyncGcore) -> None:
- with pytest.warns(DeprecationWarning):
- security_group = await async_client.cloud.security_groups.create(
- project_id=1,
- region_id=1,
- security_group={
- "name": "my_security_group",
+ security_group = await async_client.cloud.security_groups.create(
+ project_id=1,
+ region_id=1,
+ name="my_security_group",
+ description="My security group description",
+ rules=[
+ {
+ "direction": "ingress",
"description": "Some description",
- "security_group_rules": [
- {
- "direction": "ingress",
- "description": "Some description",
- "ethertype": "IPv4",
- "port_range_max": 80,
- "port_range_min": 80,
- "protocol": "tcp",
- "remote_group_id": "00000000-0000-4000-8000-000000000000",
- "remote_ip_prefix": "10.0.0.0/8",
- }
- ],
- "tags": {"my-tag": "my-tag-value"},
- },
- instances=["00000000-0000-4000-8000-000000000000"],
- )
-
- assert_matches_type(SecurityGroup, security_group, path=["response"])
+ "ethertype": "IPv4",
+ "port_range_max": 80,
+ "port_range_min": 80,
+ "protocol": "tcp",
+ "remote_group_id": "00000000-0000-4000-8000-000000000000",
+ "remote_ip_prefix": "10.0.0.0/8",
+ }
+ ],
+ tags={"my-tag": "my-tag-value"},
+ )
+ assert_matches_type(TaskIDList, security_group, path=["response"])
@parametrize
async def test_raw_response_create(self, async_client: AsyncGcore) -> None:
- with pytest.warns(DeprecationWarning):
- response = await async_client.cloud.security_groups.with_raw_response.create(
- project_id=1,
- region_id=1,
- security_group={"name": "my_security_group"},
- )
+ response = await async_client.cloud.security_groups.with_raw_response.create(
+ project_id=1,
+ region_id=1,
+ name="my_security_group",
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
security_group = await response.parse()
- assert_matches_type(SecurityGroup, security_group, path=["response"])
+ assert_matches_type(TaskIDList, security_group, path=["response"])
@parametrize
async def test_streaming_response_create(self, async_client: AsyncGcore) -> None:
- with pytest.warns(DeprecationWarning):
- async with async_client.cloud.security_groups.with_streaming_response.create(
- project_id=1,
- region_id=1,
- security_group={"name": "my_security_group"},
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ async with async_client.cloud.security_groups.with_streaming_response.create(
+ project_id=1,
+ region_id=1,
+ name="my_security_group",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- security_group = await response.parse()
- assert_matches_type(SecurityGroup, security_group, path=["response"])
+ security_group = await response.parse()
+ assert_matches_type(TaskIDList, security_group, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
async def test_method_update(self, async_client: AsyncGcore) -> None:
- with pytest.warns(DeprecationWarning):
- security_group = await async_client.cloud.security_groups.update(
- group_id="024a29e9-b4b7-4c91-9a46-505be123d9f8",
- project_id=1,
- region_id=1,
- )
-
- assert_matches_type(SecurityGroup, security_group, path=["response"])
+ security_group = await async_client.cloud.security_groups.update(
+ group_id="00000000-0000-4000-8000-000000000000",
+ project_id=1,
+ region_id=1,
+ )
+ assert_matches_type(TaskIDList, security_group, path=["response"])
@parametrize
async def test_method_update_with_all_params(self, async_client: AsyncGcore) -> None:
- with pytest.warns(DeprecationWarning):
- security_group = await async_client.cloud.security_groups.update(
- group_id="024a29e9-b4b7-4c91-9a46-505be123d9f8",
- project_id=1,
- region_id=1,
- changed_rules=[
- {
- "action": "delete",
- "description": "Some description",
- "direction": "egress",
- "ethertype": "IPv4",
- "port_range_max": 80,
- "port_range_min": 80,
- "protocol": "tcp",
- "remote_group_id": "00000000-0000-4000-8000-000000000000",
- "remote_ip_prefix": "10.0.0.0/8",
- "security_group_rule_id": "00000000-0000-4000-8000-000000000000",
- }
- ],
- name="some_name",
- tags={"foo": "my-tag-value"},
- )
-
- assert_matches_type(SecurityGroup, security_group, path=["response"])
+ security_group = await async_client.cloud.security_groups.update(
+ group_id="00000000-0000-4000-8000-000000000000",
+ project_id=1,
+ region_id=1,
+ description="Some description",
+ name="some_name",
+ rules=[
+ {
+ "description": "Some description",
+ "direction": "egress",
+ "ethertype": "IPv4",
+ "port_range_max": 80,
+ "port_range_min": 80,
+ "protocol": "tcp",
+ "remote_group_id": "00000000-0000-4000-8000-000000000000",
+ "remote_ip_prefix": "10.0.0.0/8",
+ }
+ ],
+ tags={"foo": "my-tag-value"},
+ )
+ assert_matches_type(TaskIDList, security_group, path=["response"])
@parametrize
async def test_raw_response_update(self, async_client: AsyncGcore) -> None:
- with pytest.warns(DeprecationWarning):
- response = await async_client.cloud.security_groups.with_raw_response.update(
- group_id="024a29e9-b4b7-4c91-9a46-505be123d9f8",
- project_id=1,
- region_id=1,
- )
+ response = await async_client.cloud.security_groups.with_raw_response.update(
+ group_id="00000000-0000-4000-8000-000000000000",
+ project_id=1,
+ region_id=1,
+ )
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
security_group = await response.parse()
- assert_matches_type(SecurityGroup, security_group, path=["response"])
+ assert_matches_type(TaskIDList, security_group, path=["response"])
@parametrize
async def test_streaming_response_update(self, async_client: AsyncGcore) -> None:
- with pytest.warns(DeprecationWarning):
- async with async_client.cloud.security_groups.with_streaming_response.update(
- group_id="024a29e9-b4b7-4c91-9a46-505be123d9f8",
- project_id=1,
- region_id=1,
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ async with async_client.cloud.security_groups.with_streaming_response.update(
+ group_id="00000000-0000-4000-8000-000000000000",
+ project_id=1,
+ region_id=1,
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- security_group = await response.parse()
- assert_matches_type(SecurityGroup, security_group, path=["response"])
+ security_group = await response.parse()
+ assert_matches_type(TaskIDList, security_group, path=["response"])
assert cast(Any, response.is_closed) is True
@parametrize
async def test_path_params_update(self, async_client: AsyncGcore) -> None:
- with pytest.warns(DeprecationWarning):
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `group_id` but received ''"):
- await async_client.cloud.security_groups.with_raw_response.update(
- group_id="",
- project_id=1,
- region_id=1,
- )
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `group_id` but received ''"):
+ await async_client.cloud.security_groups.with_raw_response.update(
+ group_id="",
+ project_id=1,
+ region_id=1,
+ )
@parametrize
async def test_method_list(self, async_client: AsyncGcore) -> None: