Skip to content

Commit

Permalink
feat(mnq): allow filtering nats credentials listing by project id (#2343
Browse files Browse the repository at this point in the history
)

Co-authored-by: Laure-di <[email protected]>
  • Loading branch information
scaleway-bot and Laure-di authored Dec 5, 2024
1 parent dcee497 commit 1e60263
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/mnq/v1beta1/mnq_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,9 @@ type NatsAPIListNatsCredentialsRequest struct {
// Region: region to target. If none is passed will use default region from the config.
Region scw.Region `json:"-"`

// ProjectID: include only NATS accounts in this Project.
ProjectID *string `json:"-"`

// NatsAccountID: include only credentials for this NATS account.
NatsAccountID *string `json:"-"`

Expand Down Expand Up @@ -1230,6 +1233,7 @@ func (s *NatsAPI) ListNatsCredentials(req *NatsAPIListNatsCredentialsRequest, op
}

query := url.Values{}
parameter.AddToQuery(query, "project_id", req.ProjectID)
parameter.AddToQuery(query, "nats_account_id", req.NatsAccountID)
parameter.AddToQuery(query, "page", req.Page)
parameter.AddToQuery(query, "page_size", req.PageSize)
Expand Down

0 comments on commit 1e60263

Please sign in to comment.