Skip to content

Commit

Permalink
feat(mongodb): make CreateUser.password none optional (#724)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot authored Oct 31, 2024
1 parent ae4c257 commit 7732d10
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
7 changes: 4 additions & 3 deletions scaleway-async/scaleway_async/mongodb/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <User>`
Usage:
Expand All @@ -1095,6 +1095,7 @@ async def create_user(
result = await api.create_user(
instance_id="example",
name="example",
password="example",
)
"""

Expand All @@ -1111,8 +1112,8 @@ async def create_user(
CreateUserRequest(
instance_id=instance_id,
name=name,
region=region,
password=password,
region=region,
),
self.client,
),
Expand Down
8 changes: 4 additions & 4 deletions scaleway-async/scaleway_async/mongodb/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""


Expand Down
7 changes: 4 additions & 3 deletions scaleway/scaleway/mongodb/v1alpha1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 <User>`
Usage:
Expand All @@ -1091,6 +1091,7 @@ def create_user(
result = api.create_user(
instance_id="example",
name="example",
password="example",
)
"""

Expand All @@ -1107,8 +1108,8 @@ def create_user(
CreateUserRequest(
instance_id=instance_id,
name=name,
region=region,
password=password,
region=region,
),
self.client,
),
Expand Down
8 changes: 4 additions & 4 deletions scaleway/scaleway/mongodb/v1alpha1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""


Expand Down

0 comments on commit 7732d10

Please sign in to comment.