Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(mongodb): make CreateUser.password none optional #724

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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