From 7732d10b2f6aa20eebbd85bc38e579782a512c6b Mon Sep 17 00:00:00 2001 From: Scaleway Bot Date: Thu, 31 Oct 2024 18:07:55 +0100 Subject: [PATCH] feat(mongodb): make CreateUser.password none optional (#724) --- scaleway-async/scaleway_async/mongodb/v1alpha1/api.py | 7 ++++--- scaleway-async/scaleway_async/mongodb/v1alpha1/types.py | 8 ++++---- scaleway/scaleway/mongodb/v1alpha1/api.py | 7 ++++--- scaleway/scaleway/mongodb/v1alpha1/types.py | 8 ++++---- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/scaleway-async/scaleway_async/mongodb/v1alpha1/api.py b/scaleway-async/scaleway_async/mongodb/v1alpha1/api.py index 78883abb..6f9df35d 100644 --- a/scaleway-async/scaleway_async/mongodb/v1alpha1/api.py +++ b/scaleway-async/scaleway_async/mongodb/v1alpha1/api.py @@ -1077,16 +1077,16 @@ async def create_user( *, instance_id: str, name: str, + password: str, region: Optional[Region] = None, - password: Optional[str] = None, ) -> User: """ Create an user on a Database Instance. Create an user on a Database Instance. You must define the `name`, `password` of the user and `instance_id` parameters in the request. :param instance_id: UUID of the Database Instance the user belongs to. :param name: Name of the database user. - :param region: Region to target. If none is passed will use default region from the config. :param password: Password of the database user. + :param region: Region to target. If none is passed will use default region from the config. :return: :class:`User ` Usage: @@ -1095,6 +1095,7 @@ async def create_user( result = await api.create_user( instance_id="example", name="example", + password="example", ) """ @@ -1111,8 +1112,8 @@ async def create_user( CreateUserRequest( instance_id=instance_id, name=name, - region=region, password=password, + region=region, ), self.client, ), diff --git a/scaleway-async/scaleway_async/mongodb/v1alpha1/types.py b/scaleway-async/scaleway_async/mongodb/v1alpha1/types.py index fec93e39..9fd17e35 100644 --- a/scaleway-async/scaleway_async/mongodb/v1alpha1/types.py +++ b/scaleway-async/scaleway_async/mongodb/v1alpha1/types.py @@ -604,14 +604,14 @@ class CreateUserRequest: Name of the database user. """ - region: Optional[Region] + password: str """ - Region to target. If none is passed will use default region from the config. + Password of the database user. """ - password: Optional[str] + region: Optional[Region] """ - Password of the database user. + Region to target. If none is passed will use default region from the config. """ diff --git a/scaleway/scaleway/mongodb/v1alpha1/api.py b/scaleway/scaleway/mongodb/v1alpha1/api.py index 15577d85..f1388166 100644 --- a/scaleway/scaleway/mongodb/v1alpha1/api.py +++ b/scaleway/scaleway/mongodb/v1alpha1/api.py @@ -1073,16 +1073,16 @@ def create_user( *, instance_id: str, name: str, + password: str, region: Optional[Region] = None, - password: Optional[str] = None, ) -> User: """ Create an user on a Database Instance. Create an user on a Database Instance. You must define the `name`, `password` of the user and `instance_id` parameters in the request. :param instance_id: UUID of the Database Instance the user belongs to. :param name: Name of the database user. - :param region: Region to target. If none is passed will use default region from the config. :param password: Password of the database user. + :param region: Region to target. If none is passed will use default region from the config. :return: :class:`User ` Usage: @@ -1091,6 +1091,7 @@ def create_user( result = api.create_user( instance_id="example", name="example", + password="example", ) """ @@ -1107,8 +1108,8 @@ def create_user( CreateUserRequest( instance_id=instance_id, name=name, - region=region, password=password, + region=region, ), self.client, ), diff --git a/scaleway/scaleway/mongodb/v1alpha1/types.py b/scaleway/scaleway/mongodb/v1alpha1/types.py index fec93e39..9fd17e35 100644 --- a/scaleway/scaleway/mongodb/v1alpha1/types.py +++ b/scaleway/scaleway/mongodb/v1alpha1/types.py @@ -604,14 +604,14 @@ class CreateUserRequest: Name of the database user. """ - region: Optional[Region] + password: str """ - Region to target. If none is passed will use default region from the config. + Password of the database user. """ - password: Optional[str] + region: Optional[Region] """ - Password of the database user. + Region to target. If none is passed will use default region from the config. """