diff --git a/scaleway-async/scaleway_async/container/v1beta1/api.py b/scaleway-async/scaleway_async/container/v1beta1/api.py index 3f75db9f2..4aec43e70 100644 --- a/scaleway-async/scaleway_async/container/v1beta1/api.py +++ b/scaleway-async/scaleway_async/container/v1beta1/api.py @@ -616,6 +616,9 @@ async def create_container( """ Create a new container. Create a new container in the specified region. + + When creating a container, the `created` status is no longer used. The deployment process is started + and the status is set to `pending` accordingly. :param namespace_id: UUID of the namespace the container belongs to. :param name: Name of the container. :param region: Region to target. If none is passed will use default region from the config. @@ -733,7 +736,8 @@ async def update_container( Update the container associated with the specified ID. When updating a container, the container is automatically redeployed to apply the changes. - This behavior can be changed by setting the `redeploy` field to `false` in the request. + + Warning: The `redeploy` field has been deprecated. An update now always redeploys the container. :param container_id: UUID of the container to update. :param region: Region to target. If none is passed will use default region from the config. :param environment_variables: Environment variables of the container. @@ -874,6 +878,10 @@ async def deploy_container( """ Deploy a container. Deploy a container associated with the specified ID. + + Since updating a container now always deploys it (and passes its status to `pending`), this call becomes superfluous. + + Moreover, calling `DeployContainer` immediately after `UpdateContainer` can cause `409 - resource is in a transient state` errors, so it is better to not use it when updating a container. :param container_id: UUID of the container to deploy. :param region: Region to target. If none is passed will use default region from the config. :return: :class:`Container ` diff --git a/scaleway-async/scaleway_async/container/v1beta1/types.py b/scaleway-async/scaleway_async/container/v1beta1/types.py index 6f645841b..0c20744c7 100644 --- a/scaleway-async/scaleway_async/container/v1beta1/types.py +++ b/scaleway-async/scaleway_async/container/v1beta1/types.py @@ -428,7 +428,7 @@ class Container: domain_name: str """ - Domain name attributed to the contaioner. + Domain name attributed to the container. """ protocol: ContainerProtocol @@ -657,7 +657,7 @@ class Namespace: error_message: Optional[str] = None """ - Last error message of the namesace. + Last error message of the namespace. """ description: Optional[str] = None diff --git a/scaleway/scaleway/container/v1beta1/api.py b/scaleway/scaleway/container/v1beta1/api.py index 2107b60d3..aaa321d43 100644 --- a/scaleway/scaleway/container/v1beta1/api.py +++ b/scaleway/scaleway/container/v1beta1/api.py @@ -612,6 +612,9 @@ def create_container( """ Create a new container. Create a new container in the specified region. + + When creating a container, the `created` status is no longer used. The deployment process is started + and the status is set to `pending` accordingly. :param namespace_id: UUID of the namespace the container belongs to. :param name: Name of the container. :param region: Region to target. If none is passed will use default region from the config. @@ -729,7 +732,8 @@ def update_container( Update the container associated with the specified ID. When updating a container, the container is automatically redeployed to apply the changes. - This behavior can be changed by setting the `redeploy` field to `false` in the request. + + Warning: The `redeploy` field has been deprecated. An update now always redeploys the container. :param container_id: UUID of the container to update. :param region: Region to target. If none is passed will use default region from the config. :param environment_variables: Environment variables of the container. @@ -870,6 +874,10 @@ def deploy_container( """ Deploy a container. Deploy a container associated with the specified ID. + + Since updating a container now always deploys it (and passes its status to `pending`), this call becomes superfluous. + + Moreover, calling `DeployContainer` immediately after `UpdateContainer` can cause `409 - resource is in a transient state` errors, so it is better to not use it when updating a container. :param container_id: UUID of the container to deploy. :param region: Region to target. If none is passed will use default region from the config. :return: :class:`Container ` diff --git a/scaleway/scaleway/container/v1beta1/types.py b/scaleway/scaleway/container/v1beta1/types.py index 6f645841b..0c20744c7 100644 --- a/scaleway/scaleway/container/v1beta1/types.py +++ b/scaleway/scaleway/container/v1beta1/types.py @@ -428,7 +428,7 @@ class Container: domain_name: str """ - Domain name attributed to the contaioner. + Domain name attributed to the container. """ protocol: ContainerProtocol @@ -657,7 +657,7 @@ class Namespace: error_message: Optional[str] = None """ - Last error message of the namesace. + Last error message of the namespace. """ description: Optional[str] = None