From a49fad6abe89040d3837b7183787457ebb309899 Mon Sep 17 00:00:00 2001 From: Scaleway Bot Date: Mon, 25 Mar 2024 17:16:46 +0100 Subject: [PATCH] feat(lb): add tags filter when listing lbs (#2027) --- api/lb/v1/lb_sdk.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api/lb/v1/lb_sdk.go b/api/lb/v1/lb_sdk.go index b2b48fd7..7bfe818c 100644 --- a/api/lb/v1/lb_sdk.go +++ b/api/lb/v1/lb_sdk.go @@ -2538,6 +2538,9 @@ type ListLBsRequest struct { // ProjectID: project ID to filter for, only Load Balancers from this Project will be returned. ProjectID *string `json:"-"` + + // Tags: filter by tag, only Load Balancers with one or more matching tags will be returned. + Tags []string `json:"-"` } // ListLBsResponse: list l bs response. @@ -3822,6 +3825,9 @@ type ZonedAPIListLBsRequest struct { // ProjectID: project ID to filter for, only Load Balancers from this Project will be returned. ProjectID *string `json:"-"` + + // Tags: filter by tag, only Load Balancers with one or more matching tags will be returned. + Tags []string `json:"-"` } // ZonedAPIListRoutesRequest: zoned api list routes request. @@ -4342,6 +4348,7 @@ func (s *ZonedAPI) ListLBs(req *ZonedAPIListLBsRequest, opts ...scw.RequestOptio parameter.AddToQuery(query, "page", req.Page) parameter.AddToQuery(query, "organization_id", req.OrganizationID) parameter.AddToQuery(query, "project_id", req.ProjectID) + parameter.AddToQuery(query, "tags", req.Tags) if fmt.Sprint(req.Zone) == "" { return nil, errors.New("field Zone cannot be empty in request") @@ -6302,6 +6309,7 @@ func (s *API) ListLBs(req *ListLBsRequest, opts ...scw.RequestOption) (*ListLBsR parameter.AddToQuery(query, "page", req.Page) parameter.AddToQuery(query, "organization_id", req.OrganizationID) parameter.AddToQuery(query, "project_id", req.ProjectID) + parameter.AddToQuery(query, "tags", req.Tags) if fmt.Sprint(req.Region) == "" { return nil, errors.New("field Region cannot be empty in request")