Skip to content

Commit 1e60263

Browse files
feat(mnq): allow filtering nats credentials listing by project id (scaleway#2343)
Co-authored-by: Laure-di <[email protected]>
1 parent dcee497 commit 1e60263

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

api/mnq/v1beta1/mnq_sdk.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,9 @@ type NatsAPIListNatsCredentialsRequest struct {
670670
// Region: region to target. If none is passed will use default region from the config.
671671
Region scw.Region `json:"-"`
672672

673+
// ProjectID: include only NATS accounts in this Project.
674+
ProjectID *string `json:"-"`
675+
673676
// NatsAccountID: include only credentials for this NATS account.
674677
NatsAccountID *string `json:"-"`
675678

@@ -1230,6 +1233,7 @@ func (s *NatsAPI) ListNatsCredentials(req *NatsAPIListNatsCredentialsRequest, op
12301233
}
12311234

12321235
query := url.Values{}
1236+
parameter.AddToQuery(query, "project_id", req.ProjectID)
12331237
parameter.AddToQuery(query, "nats_account_id", req.NatsAccountID)
12341238
parameter.AddToQuery(query, "page", req.Page)
12351239
parameter.AddToQuery(query, "page_size", req.PageSize)

0 commit comments

Comments
 (0)