From 96dc9c465e2956eec118690194c9ac9518a45b99 Mon Sep 17 00:00:00 2001 From: sfroment Date: Tue, 22 Sep 2026 12:58:10 +0000 Subject: [PATCH] [create-pull-request] automated change --- Makefile | 2 +- bumpver.toml | 2 +- koyeb/__init__.py | 2 +- koyeb/api/.openapi-generator/FILES | 23 -- koyeb/api/__init__.py | 2 +- koyeb/api/api/service_pools_api.py | 259 ++++++++++++++++++++++- koyeb/api/api_client.py | 2 +- koyeb/api/configuration.py | 2 +- koyeb/api/docs/ServicePoolsApi.md | 84 ++++++++ koyeb/api_README.md | 3 +- koyeb/api_async/.openapi-generator/FILES | 23 -- koyeb/api_async/__init__.py | 2 +- koyeb/api_async/api/service_pools_api.py | 259 ++++++++++++++++++++++- koyeb/api_async/api_client.py | 2 +- koyeb/api_async/configuration.py | 2 +- koyeb/api_async/docs/ServicePoolsApi.md | 84 ++++++++ koyeb/api_async_README.md | 3 +- koyeb/sandbox/__init__.py | 2 +- pyproject.toml | 2 +- spec/openapi.json | 65 ++++++ 20 files changed, 764 insertions(+), 61 deletions(-) diff --git a/Makefile b/Makefile index da9592cc..c7cf8075 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ TEST_OPTS=-v -test.timeout 300s GIT_USER_ID?=koyeb GIT_REPO_ID?=koyeb-api-client-python OPENAPI_GENERATOR_VERSION?=latest -PACKAGE_VERSION?=1.5.3 +PACKAGE_VERSION?=1.5.4 DOCKER ?= docker diff --git a/bumpver.toml b/bumpver.toml index e5aeae02..24181c61 100644 --- a/bumpver.toml +++ b/bumpver.toml @@ -1,5 +1,5 @@ [tool.bumpver] -current_version = "1.5.3" +current_version = "1.5.4" version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]" commit = false tag = false diff --git a/koyeb/__init__.py b/koyeb/__init__.py index 982b1270..6f1ca46e 100644 --- a/koyeb/__init__.py +++ b/koyeb/__init__.py @@ -1,6 +1,6 @@ # coding: utf-8 -__version__ = "1.5.3" +__version__ = "1.5.4" # Make Sandbox available at package level from .sandbox import Sandbox, AsyncSandbox, ConfigFile, Secret diff --git a/koyeb/api/.openapi-generator/FILES b/koyeb/api/.openapi-generator/FILES index 7307b87a..2f555426 100644 --- a/koyeb/api/.openapi-generator/FILES +++ b/koyeb/api/.openapi-generator/FILES @@ -942,27 +942,4 @@ koyeb/api/models/verify_docker_image_reply.py koyeb/api/models/verify_docker_image_reply_err_code.py koyeb/api/rest.py koyeb/api/test/__init__.py -koyeb/api/test/test_create_service_pool.py -koyeb/api/test/test_create_service_pool_reply.py -koyeb/api/test/test_get_organization_quotas_usage_reply.py -koyeb/api/test/test_get_pool_claim_reply.py -koyeb/api/test/test_get_service_pool_reply.py -koyeb/api/test/test_instance_snapshot_type_usage.py -koyeb/api/test/test_instance_type_usage.py -koyeb/api/test/test_list_pool_claim_reply.py -koyeb/api/test/test_list_service_pools_reply.py -koyeb/api/test/test_mesh.py -koyeb/api/test/test_mesh_scope.py -koyeb/api/test/test_persistent_volume_region_usage.py -koyeb/api/test/test_pool_claim.py -koyeb/api/test/test_pool_claim_reply.py -koyeb/api/test/test_pool_claim_request.py -koyeb/api/test/test_pool_claim_status.py -koyeb/api/test/test_pool_claims_api.py -koyeb/api/test/test_quota_usage.py -koyeb/api/test/test_service_pool.py -koyeb/api/test/test_service_pool_status.py -koyeb/api/test/test_service_pools_api.py -koyeb/api/test/test_update_service_pool.py -koyeb/api/test/test_update_service_pool_reply.py koyeb/api_README.md diff --git a/koyeb/api/__init__.py b/koyeb/api/__init__.py index c3f6ebb7..88c7ac6b 100644 --- a/koyeb/api/__init__.py +++ b/koyeb/api/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "1.5.3" +__version__ = "1.5.4" # Define package exports __all__ = [ diff --git a/koyeb/api/api/service_pools_api.py b/koyeb/api/api/service_pools_api.py index 2fc093ee..6f0c793f 100644 --- a/koyeb/api/api/service_pools_api.py +++ b/koyeb/api/api/service_pools_api.py @@ -16,7 +16,7 @@ from typing_extensions import Annotated from pydantic import StrictStr -from typing import Optional +from typing import Any, Dict, Optional from koyeb.api.models.create_service_pool import CreateServicePool from koyeb.api.models.create_service_pool_reply import CreateServicePoolReply from koyeb.api.models.get_service_pool_reply import GetServicePoolReply @@ -298,6 +298,263 @@ def _create_service_pool_serialize( _request_auth=_request_auth, ) + @validate_call + def delete_service_pool( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Delete a ServicePool + + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_service_pool_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + "400": "ErrorWithFields", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "503": "Error", + "default": "GoogleRpcStatus", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def delete_service_pool_with_http_info( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Delete a ServicePool + + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_service_pool_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + "400": "ErrorWithFields", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "503": "Error", + "default": "GoogleRpcStatus", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def delete_service_pool_without_preload_content( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a ServicePool + + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_service_pool_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + "400": "ErrorWithFields", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "503": "Error", + "default": "GoogleRpcStatus", + } + response_data = self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _delete_service_pool_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + + # authentication setting + _auth_settings: List[str] = ["Bearer"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/v1/service_pools/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + @validate_call def get_service_pool( self, diff --git a/koyeb/api/api_client.py b/koyeb/api/api_client.py index 022554a1..139f5eb9 100644 --- a/koyeb/api/api_client.py +++ b/koyeb/api/api_client.py @@ -87,7 +87,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = "OpenAPI-Generator/1.5.3/python" + self.user_agent = "OpenAPI-Generator/1.5.4/python" self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/koyeb/api/configuration.py b/koyeb/api/configuration.py index a814c203..1b880601 100644 --- a/koyeb/api/configuration.py +++ b/koyeb/api/configuration.py @@ -600,7 +600,7 @@ def to_debug_report(self) -> str: "OS: {env}\n" "Python Version: {pyversion}\n" "Version of the API: 1.0.0\n" - "SDK Package Version: 1.5.3".format(env=sys.platform, pyversion=sys.version) + "SDK Package Version: 1.5.4".format(env=sys.platform, pyversion=sys.version) ) def get_host_settings(self) -> List[HostSetting]: diff --git a/koyeb/api/docs/ServicePoolsApi.md b/koyeb/api/docs/ServicePoolsApi.md index 4c94fb83..3b2f6675 100644 --- a/koyeb/api/docs/ServicePoolsApi.md +++ b/koyeb/api/docs/ServicePoolsApi.md @@ -5,6 +5,7 @@ All URIs are relative to *https://app.koyeb.com* Method | HTTP request | Description ------------- | ------------- | ------------- [**create_service_pool**](ServicePoolsApi.md#create_service_pool) | **POST** /v1/service_pools | Create a ServicePool +[**delete_service_pool**](ServicePoolsApi.md#delete_service_pool) | **DELETE** /v1/service_pools/{id} | Delete a ServicePool [**get_service_pool**](ServicePoolsApi.md#get_service_pool) | **GET** /v1/service_pools/{id} | Get a ServicePool [**list_service_pools**](ServicePoolsApi.md#list_service_pools) | **GET** /v1/service_pools | List ServicePools [**update_service_pool**](ServicePoolsApi.md#update_service_pool) | **PUT** /v1/service_pools/{id} | @@ -95,6 +96,89 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **delete_service_pool** +> object delete_service_pool(id) + +Delete a ServicePool + +### Example + +* Api Key Authentication (Bearer): + +```python +import koyeb.api +from koyeb.api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.koyeb.com +# See configuration.py for a list of all supported configuration parameters. +configuration = koyeb.api.Configuration( + host = "https://app.koyeb.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration.api_key['Bearer'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer'] = 'Bearer' + +# Enter a context with an instance of the API client +with koyeb.api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = koyeb.api.ServicePoolsApi(api_client) + id = 'id_example' # str | + + try: + # Delete a ServicePool + api_response = api_instance.delete_service_pool(id) + print("The response of ServicePoolsApi->delete_service_pool:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ServicePoolsApi->delete_service_pool: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +**object** + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**400** | Validation error | - | +**401** | Returned when the token is not valid. | - | +**403** | Returned when the user does not have permission to access the resource. | - | +**404** | Returned when the resource does not exist. | - | +**500** | Returned in case of server error. | - | +**503** | Service is unavailable. | - | +**0** | An unexpected error response. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_service_pool** > GetServicePoolReply get_service_pool(id) diff --git a/koyeb/api_README.md b/koyeb/api_README.md index b648ac6c..b5d013ed 100644 --- a/koyeb/api_README.md +++ b/koyeb/api_README.md @@ -4,7 +4,7 @@ The Koyeb API allows you to interact with the Koyeb platform in a simple, progra The `koyeb.api` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 1.0.0 -- Package version: 1.5.3 +- Package version: 1.5.4 - Generator version: 7.26.0-SNAPSHOT - Build package: org.openapitools.codegen.languages.PythonClientCodegen @@ -196,6 +196,7 @@ Class | Method | HTTP request | Description *SecretsApi* | [**update_secret**](koyeb/api/docs/SecretsApi.md#update_secret) | **PUT** /v1/secrets/{id} | Update Secret *SecretsApi* | [**update_secret2**](koyeb/api/docs/SecretsApi.md#update_secret2) | **PATCH** /v1/secrets/{id} | Update Secret *ServicePoolsApi* | [**create_service_pool**](koyeb/api/docs/ServicePoolsApi.md#create_service_pool) | **POST** /v1/service_pools | Create a ServicePool +*ServicePoolsApi* | [**delete_service_pool**](koyeb/api/docs/ServicePoolsApi.md#delete_service_pool) | **DELETE** /v1/service_pools/{id} | Delete a ServicePool *ServicePoolsApi* | [**get_service_pool**](koyeb/api/docs/ServicePoolsApi.md#get_service_pool) | **GET** /v1/service_pools/{id} | Get a ServicePool *ServicePoolsApi* | [**list_service_pools**](koyeb/api/docs/ServicePoolsApi.md#list_service_pools) | **GET** /v1/service_pools | List ServicePools *ServicePoolsApi* | [**update_service_pool**](koyeb/api/docs/ServicePoolsApi.md#update_service_pool) | **PUT** /v1/service_pools/{id} | diff --git a/koyeb/api_async/.openapi-generator/FILES b/koyeb/api_async/.openapi-generator/FILES index aa91b9b9..448e4a33 100644 --- a/koyeb/api_async/.openapi-generator/FILES +++ b/koyeb/api_async/.openapi-generator/FILES @@ -942,27 +942,4 @@ koyeb/api_async/models/verify_docker_image_reply.py koyeb/api_async/models/verify_docker_image_reply_err_code.py koyeb/api_async/rest.py koyeb/api_async/test/__init__.py -koyeb/api_async/test/test_create_service_pool.py -koyeb/api_async/test/test_create_service_pool_reply.py -koyeb/api_async/test/test_get_organization_quotas_usage_reply.py -koyeb/api_async/test/test_get_pool_claim_reply.py -koyeb/api_async/test/test_get_service_pool_reply.py -koyeb/api_async/test/test_instance_snapshot_type_usage.py -koyeb/api_async/test/test_instance_type_usage.py -koyeb/api_async/test/test_list_pool_claim_reply.py -koyeb/api_async/test/test_list_service_pools_reply.py -koyeb/api_async/test/test_mesh.py -koyeb/api_async/test/test_mesh_scope.py -koyeb/api_async/test/test_persistent_volume_region_usage.py -koyeb/api_async/test/test_pool_claim.py -koyeb/api_async/test/test_pool_claim_reply.py -koyeb/api_async/test/test_pool_claim_request.py -koyeb/api_async/test/test_pool_claim_status.py -koyeb/api_async/test/test_pool_claims_api.py -koyeb/api_async/test/test_quota_usage.py -koyeb/api_async/test/test_service_pool.py -koyeb/api_async/test/test_service_pool_status.py -koyeb/api_async/test/test_service_pools_api.py -koyeb/api_async/test/test_update_service_pool.py -koyeb/api_async/test/test_update_service_pool_reply.py koyeb/api_async_README.md diff --git a/koyeb/api_async/__init__.py b/koyeb/api_async/__init__.py index bb9bbd31..77a7c484 100644 --- a/koyeb/api_async/__init__.py +++ b/koyeb/api_async/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "1.5.3" +__version__ = "1.5.4" # Define package exports __all__ = [ diff --git a/koyeb/api_async/api/service_pools_api.py b/koyeb/api_async/api/service_pools_api.py index abec566c..13fc2184 100644 --- a/koyeb/api_async/api/service_pools_api.py +++ b/koyeb/api_async/api/service_pools_api.py @@ -16,7 +16,7 @@ from typing_extensions import Annotated from pydantic import StrictStr -from typing import Optional +from typing import Any, Dict, Optional from koyeb.api_async.models.create_service_pool import CreateServicePool from koyeb.api_async.models.create_service_pool_reply import CreateServicePoolReply from koyeb.api_async.models.get_service_pool_reply import GetServicePoolReply @@ -298,6 +298,263 @@ def _create_service_pool_serialize( _request_auth=_request_auth, ) + @validate_call + async def delete_service_pool( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Delete a ServicePool + + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_service_pool_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + "400": "ErrorWithFields", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "503": "Error", + "default": "GoogleRpcStatus", + } + response_data = await self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + async def delete_service_pool_with_http_info( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Delete a ServicePool + + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_service_pool_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + "400": "ErrorWithFields", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "503": "Error", + "default": "GoogleRpcStatus", + } + response_data = await self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + async def delete_service_pool_without_preload_content( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] + ], + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a ServicePool + + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_service_pool_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index, + ) + + _response_types_map: Dict[str, Optional[str]] = { + "200": "object", + "400": "ErrorWithFields", + "401": "Error", + "403": "Error", + "404": "Error", + "500": "Error", + "503": "Error", + "default": "GoogleRpcStatus", + } + response_data = await self.api_client.call_api( + *_param, _request_timeout=_request_timeout + ) + return response_data.response + + def _delete_service_pool_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + _host = None + + _collection_formats: Dict[str, str] = {} + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params["id"] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + if "Accept" not in _header_params: + _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + + # authentication setting + _auth_settings: List[str] = ["Bearer"] + + return self.api_client.param_serialize( + method="DELETE", + resource_path="/v1/service_pools/{id}", + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth, + ) + @validate_call async def get_service_pool( self, diff --git a/koyeb/api_async/api_client.py b/koyeb/api_async/api_client.py index 91076827..cb5efc4c 100644 --- a/koyeb/api_async/api_client.py +++ b/koyeb/api_async/api_client.py @@ -87,7 +87,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = "OpenAPI-Generator/1.5.3/python" + self.user_agent = "OpenAPI-Generator/1.5.4/python" self.client_side_validation = configuration.client_side_validation async def __aenter__(self): diff --git a/koyeb/api_async/configuration.py b/koyeb/api_async/configuration.py index ad850739..a85f2cf9 100644 --- a/koyeb/api_async/configuration.py +++ b/koyeb/api_async/configuration.py @@ -567,7 +567,7 @@ def to_debug_report(self) -> str: "OS: {env}\n" "Python Version: {pyversion}\n" "Version of the API: 1.0.0\n" - "SDK Package Version: 1.5.3".format(env=sys.platform, pyversion=sys.version) + "SDK Package Version: 1.5.4".format(env=sys.platform, pyversion=sys.version) ) def get_host_settings(self) -> List[HostSetting]: diff --git a/koyeb/api_async/docs/ServicePoolsApi.md b/koyeb/api_async/docs/ServicePoolsApi.md index 8331fbda..bd2bf31d 100644 --- a/koyeb/api_async/docs/ServicePoolsApi.md +++ b/koyeb/api_async/docs/ServicePoolsApi.md @@ -5,6 +5,7 @@ All URIs are relative to *https://app.koyeb.com* Method | HTTP request | Description ------------- | ------------- | ------------- [**create_service_pool**](ServicePoolsApi.md#create_service_pool) | **POST** /v1/service_pools | Create a ServicePool +[**delete_service_pool**](ServicePoolsApi.md#delete_service_pool) | **DELETE** /v1/service_pools/{id} | Delete a ServicePool [**get_service_pool**](ServicePoolsApi.md#get_service_pool) | **GET** /v1/service_pools/{id} | Get a ServicePool [**list_service_pools**](ServicePoolsApi.md#list_service_pools) | **GET** /v1/service_pools | List ServicePools [**update_service_pool**](ServicePoolsApi.md#update_service_pool) | **PUT** /v1/service_pools/{id} | @@ -95,6 +96,89 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **delete_service_pool** +> object delete_service_pool(id) + +Delete a ServicePool + +### Example + +* Api Key Authentication (Bearer): + +```python +import koyeb.api_async +from koyeb.api_async.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.koyeb.com +# See configuration.py for a list of all supported configuration parameters. +configuration = koyeb.api_async.Configuration( + host = "https://app.koyeb.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration.api_key['Bearer'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer'] = 'Bearer' + +# Enter a context with an instance of the API client +async with koyeb.api_async.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = koyeb.api_async.ServicePoolsApi(api_client) + id = 'id_example' # str | + + try: + # Delete a ServicePool + api_response = await api_instance.delete_service_pool(id) + print("The response of ServicePoolsApi->delete_service_pool:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ServicePoolsApi->delete_service_pool: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +**object** + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**400** | Validation error | - | +**401** | Returned when the token is not valid. | - | +**403** | Returned when the user does not have permission to access the resource. | - | +**404** | Returned when the resource does not exist. | - | +**500** | Returned in case of server error. | - | +**503** | Service is unavailable. | - | +**0** | An unexpected error response. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_service_pool** > GetServicePoolReply get_service_pool(id) diff --git a/koyeb/api_async_README.md b/koyeb/api_async_README.md index 5d2fe329..21859b1c 100644 --- a/koyeb/api_async_README.md +++ b/koyeb/api_async_README.md @@ -4,7 +4,7 @@ The Koyeb API allows you to interact with the Koyeb platform in a simple, progra The `koyeb.api_async` package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 1.0.0 -- Package version: 1.5.3 +- Package version: 1.5.4 - Generator version: 7.26.0-SNAPSHOT - Build package: org.openapitools.codegen.languages.PythonClientCodegen @@ -198,6 +198,7 @@ Class | Method | HTTP request | Description *SecretsApi* | [**update_secret**](koyeb/api_async/docs/SecretsApi.md#update_secret) | **PUT** /v1/secrets/{id} | Update Secret *SecretsApi* | [**update_secret2**](koyeb/api_async/docs/SecretsApi.md#update_secret2) | **PATCH** /v1/secrets/{id} | Update Secret *ServicePoolsApi* | [**create_service_pool**](koyeb/api_async/docs/ServicePoolsApi.md#create_service_pool) | **POST** /v1/service_pools | Create a ServicePool +*ServicePoolsApi* | [**delete_service_pool**](koyeb/api_async/docs/ServicePoolsApi.md#delete_service_pool) | **DELETE** /v1/service_pools/{id} | Delete a ServicePool *ServicePoolsApi* | [**get_service_pool**](koyeb/api_async/docs/ServicePoolsApi.md#get_service_pool) | **GET** /v1/service_pools/{id} | Get a ServicePool *ServicePoolsApi* | [**list_service_pools**](koyeb/api_async/docs/ServicePoolsApi.md#list_service_pools) | **GET** /v1/service_pools | List ServicePools *ServicePoolsApi* | [**update_service_pool**](koyeb/api_async/docs/ServicePoolsApi.md#update_service_pool) | **PUT** /v1/service_pools/{id} | diff --git a/koyeb/sandbox/__init__.py b/koyeb/sandbox/__init__.py index 91b997e4..d84e5bf6 100644 --- a/koyeb/sandbox/__init__.py +++ b/koyeb/sandbox/__init__.py @@ -4,7 +4,7 @@ Koyeb Sandbox - Interactive execution environment for running arbitrary code on Koyeb """ -__version__ = "1.5.3" +__version__ = "1.5.4" from koyeb.api.models.config_file import ConfigFile from koyeb.api.models.instance_status import InstanceStatus as SandboxStatus diff --git a/pyproject.toml b/pyproject.toml index b462deee..61310870 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "koyeb-sdk" -version = "1.5.3" +version = "1.5.4" description = "Koyeb python sdk" authors = [{ name = "Koyeb team", email = "support@koyeb.com" }] license = "Apache-2.0" diff --git a/spec/openapi.json b/spec/openapi.json index 1bd1ef77..9f548be5 100644 --- a/spec/openapi.json +++ b/spec/openapi.json @@ -11888,6 +11888,71 @@ "ServicePools" ] }, + "delete": { + "summary": "Delete a ServicePool", + "operationId": "DeleteServicePool", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/DeleteServicePoolReply" + } + }, + "400": { + "description": "Validation error", + "schema": { + "$ref": "#/definitions/ErrorWithFields" + } + }, + "401": { + "description": "Returned when the token is not valid.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "500": { + "description": "Returned in case of server error.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "503": { + "description": "Service is unavailable.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/google.rpc.Status" + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "ServicePools" + ] + }, "put": { "operationId": "UpdateServicePool", "responses": {