From 13276709b745cdb80fffb6d7ec1d6abcc8f0dc78 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Wed, 21 May 2025 16:08:57 +0000 Subject: [PATCH] feat: update generated APIs --- .../scaleway_async/container/v1beta1/api.py | 12 ++++ .../container/v1beta1/marshalling.py | 44 ++++++++++---- .../scaleway_async/container/v1beta1/types.py | 60 ++++++++++++++----- scaleway/scaleway/container/v1beta1/api.py | 12 ++++ .../scaleway/container/v1beta1/marshalling.py | 44 ++++++++++---- scaleway/scaleway/container/v1beta1/types.py | 60 ++++++++++++++----- 6 files changed, 178 insertions(+), 54 deletions(-) diff --git a/scaleway-async/scaleway_async/container/v1beta1/api.py b/scaleway-async/scaleway_async/container/v1beta1/api.py index b321bdbea..abe70d63b 100644 --- a/scaleway-async/scaleway_async/container/v1beta1/api.py +++ b/scaleway-async/scaleway_async/container/v1beta1/api.py @@ -612,6 +612,8 @@ async def create_container( health_check: Optional[ContainerHealthCheckSpec] = None, tags: Optional[List[str]] = None, private_network_id: Optional[str] = None, + command: Optional[List[str]] = None, + args: Optional[List[str]] = None, ) -> Container: """ Create a new container. @@ -644,6 +646,8 @@ async def create_container( :param health_check: Health check configuration of the container. :param tags: Tags of the Serverless Container. :param private_network_id: + :param command: Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run. + :param args: Arguments passed to the command specified in the "command" field. These override the default arguments from the container image, and behave like command-line parameters. :return: :class:`Container ` Usage: @@ -687,6 +691,8 @@ async def create_container( health_check=health_check, tags=tags, private_network_id=private_network_id, + command=command, + args=args, ), self.client, ), @@ -721,6 +727,8 @@ async def update_container( health_check: Optional[ContainerHealthCheckSpec] = None, tags: Optional[List[str]] = None, private_network_id: Optional[str] = None, + command: Optional[List[str]] = None, + args: Optional[List[str]] = None, ) -> Container: """ Update an existing container. @@ -753,6 +761,8 @@ async def update_container( :param health_check: Health check configuration of the container. :param tags: Tags of the Serverless Container. :param private_network_id: + :param command: Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run. + :param args: Arguments passed to the command specified in the "command" field. These override the default arguments from the container image, and behave like command-line parameters. :return: :class:`Container ` Usage: @@ -796,6 +806,8 @@ async def update_container( health_check=health_check, tags=tags, private_network_id=private_network_id, + command=command, + args=args, ), self.client, ), diff --git a/scaleway-async/scaleway_async/container/v1beta1/marshalling.py b/scaleway-async/scaleway_async/container/v1beta1/marshalling.py index ce0bd5879..90e7258c8 100644 --- a/scaleway-async/scaleway_async/container/v1beta1/marshalling.py +++ b/scaleway-async/scaleway_async/container/v1beta1/marshalling.py @@ -211,6 +211,14 @@ def unmarshal_Container(data: Any) -> Container: if field is not None: args["registry_image"] = field + field = data.get("max_concurrency", None) + if field is not None: + args["max_concurrency"] = field + + field = data.get("domain_name", None) + if field is not None: + args["domain_name"] = field + field = data.get("timeout", None) if field is not None: args["timeout"] = field @@ -229,14 +237,6 @@ def unmarshal_Container(data: Any) -> Container: else: args["description"] = None - field = data.get("max_concurrency", None) - if field is not None: - args["max_concurrency"] = field - - field = data.get("domain_name", None) - if field is not None: - args["domain_name"] = field - field = data.get("protocol", None) if field is not None: args["protocol"] = field @@ -265,6 +265,12 @@ def unmarshal_Container(data: Any) -> Container: if field is not None: args["local_storage_limit"] = field + field = data.get("scaling_option", None) + if field is not None: + args["scaling_option"] = unmarshal_ContainerScalingOption(field) + else: + args["scaling_option"] = None + field = data.get("region", None) if field is not None: args["region"] = field @@ -273,11 +279,13 @@ def unmarshal_Container(data: Any) -> Container: if field is not None: args["tags"] = field - field = data.get("scaling_option", None) + field = data.get("command", None) if field is not None: - args["scaling_option"] = unmarshal_ContainerScalingOption(field) - else: - args["scaling_option"] = None + args["command"] = field + + field = data.get("args", None) + if field is not None: + args["args"] = field field = data.get("health_check", None) if field is not None: @@ -963,6 +971,12 @@ def marshal_CreateContainerRequest( if request.private_network_id is not None: output["private_network_id"] = request.private_network_id + if request.command is not None: + output["command"] = request.command + + if request.args is not None: + output["args"] = request.args + return output @@ -1221,6 +1235,12 @@ def marshal_UpdateContainerRequest( if request.private_network_id is not None: output["private_network_id"] = request.private_network_id + if request.command is not None: + output["command"] = request.command + + if request.args is not None: + output["args"] = request.args + return output diff --git a/scaleway-async/scaleway_async/container/v1beta1/types.py b/scaleway-async/scaleway_async/container/v1beta1/types.py index 29d6cdfc5..c2de6d4cf 100644 --- a/scaleway-async/scaleway_async/container/v1beta1/types.py +++ b/scaleway-async/scaleway_async/container/v1beta1/types.py @@ -416,29 +416,29 @@ class Container: Name of the registry image (e.g. "rg.fr-par.scw.cloud/something/image:tag"). """ - timeout: Optional[str] + max_concurrency: int """ - Processing time limit for the container. + Number of maximum concurrent executions of the container. """ - error_message: Optional[str] + domain_name: str """ - Last error message of the container. + Domain name attributed to the contaioner. """ - description: Optional[str] + timeout: Optional[str] """ - Description of the container. + Processing time limit for the container. """ - max_concurrency: int + error_message: Optional[str] """ - Number of maximum concurrent executions of the container. + Last error message of the container. """ - domain_name: str + description: Optional[str] """ - Domain name attributed to the contaioner. + Description of the container. """ protocol: ContainerProtocol @@ -473,6 +473,14 @@ class Container: Local storage limit of the container (in MB). """ + scaling_option: Optional[ContainerScalingOption] + """ + Possible values: +- concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance. +- cpu_usage_threshold: Scale depending on the CPU usage of a container instance. +- memory_usage_threshold: Scale depending on the memory usage of a container instance. + """ + region: ScwRegion """ Region in which the container will be deployed. @@ -483,12 +491,14 @@ class Container: List of tags applied to the Serverless Container. """ - scaling_option: Optional[ContainerScalingOption] + command: List[str] """ - Possible values: -- concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance. -- cpu_usage_threshold: Scale depending on the CPU usage of a container instance. -- memory_usage_threshold: Scale depending on the memory usage of a container instance. + Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run. + """ + + args: List[str] + """ + Arguments passed to the command specified in the "command" field. These override the default arguments from the container image, and behave like command-line parameters. """ health_check: Optional[ContainerHealthCheckSpec] @@ -867,6 +877,16 @@ class CreateContainerRequest: private_network_id: Optional[str] + command: Optional[List[str]] + """ + Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run. + """ + + args: Optional[List[str]] + """ + Arguments passed to the command specified in the "command" field. These override the default arguments from the container image, and behave like command-line parameters. + """ + @dataclass class CreateCronRequest: @@ -1555,6 +1575,16 @@ class UpdateContainerRequest: private_network_id: Optional[str] + command: Optional[List[str]] + """ + Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run. + """ + + args: Optional[List[str]] + """ + Arguments passed to the command specified in the "command" field. These override the default arguments from the container image, and behave like command-line parameters. + """ + @dataclass class UpdateCronRequest: diff --git a/scaleway/scaleway/container/v1beta1/api.py b/scaleway/scaleway/container/v1beta1/api.py index d924c0f4a..036283f93 100644 --- a/scaleway/scaleway/container/v1beta1/api.py +++ b/scaleway/scaleway/container/v1beta1/api.py @@ -608,6 +608,8 @@ def create_container( health_check: Optional[ContainerHealthCheckSpec] = None, tags: Optional[List[str]] = None, private_network_id: Optional[str] = None, + command: Optional[List[str]] = None, + args: Optional[List[str]] = None, ) -> Container: """ Create a new container. @@ -640,6 +642,8 @@ def create_container( :param health_check: Health check configuration of the container. :param tags: Tags of the Serverless Container. :param private_network_id: + :param command: Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run. + :param args: Arguments passed to the command specified in the "command" field. These override the default arguments from the container image, and behave like command-line parameters. :return: :class:`Container ` Usage: @@ -683,6 +687,8 @@ def create_container( health_check=health_check, tags=tags, private_network_id=private_network_id, + command=command, + args=args, ), self.client, ), @@ -717,6 +723,8 @@ def update_container( health_check: Optional[ContainerHealthCheckSpec] = None, tags: Optional[List[str]] = None, private_network_id: Optional[str] = None, + command: Optional[List[str]] = None, + args: Optional[List[str]] = None, ) -> Container: """ Update an existing container. @@ -749,6 +757,8 @@ def update_container( :param health_check: Health check configuration of the container. :param tags: Tags of the Serverless Container. :param private_network_id: + :param command: Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run. + :param args: Arguments passed to the command specified in the "command" field. These override the default arguments from the container image, and behave like command-line parameters. :return: :class:`Container ` Usage: @@ -792,6 +802,8 @@ def update_container( health_check=health_check, tags=tags, private_network_id=private_network_id, + command=command, + args=args, ), self.client, ), diff --git a/scaleway/scaleway/container/v1beta1/marshalling.py b/scaleway/scaleway/container/v1beta1/marshalling.py index ce0bd5879..90e7258c8 100644 --- a/scaleway/scaleway/container/v1beta1/marshalling.py +++ b/scaleway/scaleway/container/v1beta1/marshalling.py @@ -211,6 +211,14 @@ def unmarshal_Container(data: Any) -> Container: if field is not None: args["registry_image"] = field + field = data.get("max_concurrency", None) + if field is not None: + args["max_concurrency"] = field + + field = data.get("domain_name", None) + if field is not None: + args["domain_name"] = field + field = data.get("timeout", None) if field is not None: args["timeout"] = field @@ -229,14 +237,6 @@ def unmarshal_Container(data: Any) -> Container: else: args["description"] = None - field = data.get("max_concurrency", None) - if field is not None: - args["max_concurrency"] = field - - field = data.get("domain_name", None) - if field is not None: - args["domain_name"] = field - field = data.get("protocol", None) if field is not None: args["protocol"] = field @@ -265,6 +265,12 @@ def unmarshal_Container(data: Any) -> Container: if field is not None: args["local_storage_limit"] = field + field = data.get("scaling_option", None) + if field is not None: + args["scaling_option"] = unmarshal_ContainerScalingOption(field) + else: + args["scaling_option"] = None + field = data.get("region", None) if field is not None: args["region"] = field @@ -273,11 +279,13 @@ def unmarshal_Container(data: Any) -> Container: if field is not None: args["tags"] = field - field = data.get("scaling_option", None) + field = data.get("command", None) if field is not None: - args["scaling_option"] = unmarshal_ContainerScalingOption(field) - else: - args["scaling_option"] = None + args["command"] = field + + field = data.get("args", None) + if field is not None: + args["args"] = field field = data.get("health_check", None) if field is not None: @@ -963,6 +971,12 @@ def marshal_CreateContainerRequest( if request.private_network_id is not None: output["private_network_id"] = request.private_network_id + if request.command is not None: + output["command"] = request.command + + if request.args is not None: + output["args"] = request.args + return output @@ -1221,6 +1235,12 @@ def marshal_UpdateContainerRequest( if request.private_network_id is not None: output["private_network_id"] = request.private_network_id + if request.command is not None: + output["command"] = request.command + + if request.args is not None: + output["args"] = request.args + return output diff --git a/scaleway/scaleway/container/v1beta1/types.py b/scaleway/scaleway/container/v1beta1/types.py index 29d6cdfc5..c2de6d4cf 100644 --- a/scaleway/scaleway/container/v1beta1/types.py +++ b/scaleway/scaleway/container/v1beta1/types.py @@ -416,29 +416,29 @@ class Container: Name of the registry image (e.g. "rg.fr-par.scw.cloud/something/image:tag"). """ - timeout: Optional[str] + max_concurrency: int """ - Processing time limit for the container. + Number of maximum concurrent executions of the container. """ - error_message: Optional[str] + domain_name: str """ - Last error message of the container. + Domain name attributed to the contaioner. """ - description: Optional[str] + timeout: Optional[str] """ - Description of the container. + Processing time limit for the container. """ - max_concurrency: int + error_message: Optional[str] """ - Number of maximum concurrent executions of the container. + Last error message of the container. """ - domain_name: str + description: Optional[str] """ - Domain name attributed to the contaioner. + Description of the container. """ protocol: ContainerProtocol @@ -473,6 +473,14 @@ class Container: Local storage limit of the container (in MB). """ + scaling_option: Optional[ContainerScalingOption] + """ + Possible values: +- concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance. +- cpu_usage_threshold: Scale depending on the CPU usage of a container instance. +- memory_usage_threshold: Scale depending on the memory usage of a container instance. + """ + region: ScwRegion """ Region in which the container will be deployed. @@ -483,12 +491,14 @@ class Container: List of tags applied to the Serverless Container. """ - scaling_option: Optional[ContainerScalingOption] + command: List[str] """ - Possible values: -- concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance. -- cpu_usage_threshold: Scale depending on the CPU usage of a container instance. -- memory_usage_threshold: Scale depending on the memory usage of a container instance. + Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run. + """ + + args: List[str] + """ + Arguments passed to the command specified in the "command" field. These override the default arguments from the container image, and behave like command-line parameters. """ health_check: Optional[ContainerHealthCheckSpec] @@ -867,6 +877,16 @@ class CreateContainerRequest: private_network_id: Optional[str] + command: Optional[List[str]] + """ + Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run. + """ + + args: Optional[List[str]] + """ + Arguments passed to the command specified in the "command" field. These override the default arguments from the container image, and behave like command-line parameters. + """ + @dataclass class CreateCronRequest: @@ -1555,6 +1575,16 @@ class UpdateContainerRequest: private_network_id: Optional[str] + command: Optional[List[str]] + """ + Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run. + """ + + args: Optional[List[str]] + """ + Arguments passed to the command specified in the "command" field. These override the default arguments from the container image, and behave like command-line parameters. + """ + @dataclass class UpdateCronRequest: