Skip to content

feat(mnq): allow filtering nats credentials listing by project id #779

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
Dec 4, 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
6 changes: 6 additions & 0 deletions scaleway-async/scaleway_async/mnq/v1beta1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ async def list_nats_credentials(
self,
*,
region: Optional[Region] = None,
project_id: Optional[str] = None,
nats_account_id: Optional[str] = None,
page: Optional[int] = None,
page_size: Optional[int] = None,
Expand All @@ -429,6 +430,7 @@ async def list_nats_credentials(
List NATS credentials.
List existing credentials in the specified NATS account. The response contains only the metadata for the credentials, not the credentials themselves, which are only returned after a **Create Credentials** call.
:param region: Region to target. If none is passed will use default region from the config.
:param project_id: Include only NATS accounts in this Project.
:param nats_account_id: Include only credentials for this NATS account.
:param page: Page number to return.
:param page_size: Maximum number of credentials to return per page.
Expand All @@ -453,6 +455,7 @@ async def list_nats_credentials(
"order_by": order_by,
"page": page,
"page_size": page_size or self.client.default_page_size,
"project_id": project_id or self.client.default_project_id,
},
)

Expand All @@ -463,6 +466,7 @@ async def list_nats_credentials_all(
self,
*,
region: Optional[Region] = None,
project_id: Optional[str] = None,
nats_account_id: Optional[str] = None,
page: Optional[int] = None,
page_size: Optional[int] = None,
Expand All @@ -472,6 +476,7 @@ async def list_nats_credentials_all(
List NATS credentials.
List existing credentials in the specified NATS account. The response contains only the metadata for the credentials, not the credentials themselves, which are only returned after a **Create Credentials** call.
:param region: Region to target. If none is passed will use default region from the config.
:param project_id: Include only NATS accounts in this Project.
:param nats_account_id: Include only credentials for this NATS account.
:param page: Page number to return.
:param page_size: Maximum number of credentials to return per page.
Expand All @@ -490,6 +495,7 @@ async def list_nats_credentials_all(
fetcher=self.list_nats_credentials,
args={
"region": region,
"project_id": project_id,
"nats_account_id": nats_account_id,
"page": page,
"page_size": page_size,
Expand Down
5 changes: 5 additions & 0 deletions scaleway-async/scaleway_async/mnq/v1beta1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,11 @@ class NatsApiListNatsCredentialsRequest:
Region to target. If none is passed will use default region from the config.
"""

project_id: Optional[str]
"""
Include only NATS accounts in this Project.
"""

nats_account_id: Optional[str]
"""
Include only credentials for this NATS account.
Expand Down
6 changes: 6 additions & 0 deletions scaleway/scaleway/mnq/v1beta1/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ def list_nats_credentials(
self,
*,
region: Optional[Region] = None,
project_id: Optional[str] = None,
nats_account_id: Optional[str] = None,
page: Optional[int] = None,
page_size: Optional[int] = None,
Expand All @@ -429,6 +430,7 @@ def list_nats_credentials(
List NATS credentials.
List existing credentials in the specified NATS account. The response contains only the metadata for the credentials, not the credentials themselves, which are only returned after a **Create Credentials** call.
:param region: Region to target. If none is passed will use default region from the config.
:param project_id: Include only NATS accounts in this Project.
:param nats_account_id: Include only credentials for this NATS account.
:param page: Page number to return.
:param page_size: Maximum number of credentials to return per page.
Expand All @@ -453,6 +455,7 @@ def list_nats_credentials(
"order_by": order_by,
"page": page,
"page_size": page_size or self.client.default_page_size,
"project_id": project_id or self.client.default_project_id,
},
)

Expand All @@ -463,6 +466,7 @@ def list_nats_credentials_all(
self,
*,
region: Optional[Region] = None,
project_id: Optional[str] = None,
nats_account_id: Optional[str] = None,
page: Optional[int] = None,
page_size: Optional[int] = None,
Expand All @@ -472,6 +476,7 @@ def list_nats_credentials_all(
List NATS credentials.
List existing credentials in the specified NATS account. The response contains only the metadata for the credentials, not the credentials themselves, which are only returned after a **Create Credentials** call.
:param region: Region to target. If none is passed will use default region from the config.
:param project_id: Include only NATS accounts in this Project.
:param nats_account_id: Include only credentials for this NATS account.
:param page: Page number to return.
:param page_size: Maximum number of credentials to return per page.
Expand All @@ -490,6 +495,7 @@ def list_nats_credentials_all(
fetcher=self.list_nats_credentials,
args={
"region": region,
"project_id": project_id,
"nats_account_id": nats_account_id,
"page": page,
"page_size": page_size,
Expand Down
5 changes: 5 additions & 0 deletions scaleway/scaleway/mnq/v1beta1/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,11 @@ class NatsApiListNatsCredentialsRequest:
Region to target. If none is passed will use default region from the config.
"""

project_id: Optional[str]
"""
Include only NATS accounts in this Project.
"""

nats_account_id: Optional[str]
"""
Include only credentials for this NATS account.
Expand Down
Loading