Skip to content

Commit e84e5b2

Browse files
authored
feat(block): add tags in ListVolumesRequest (scaleway#2299)
1 parent 59f12be commit e84e5b2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

api/block/v1alpha1/block_sdk.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,9 @@ type ListVolumesRequest struct {
828828

829829
// ProductResourceID: filter by a product resource ID linked to this volume (such as an Instance ID).
830830
ProductResourceID *string `json:"-"`
831+
832+
// Tags: filter by tags. Only volumes with one or more matching tags will be returned.
833+
Tags []string `json:"-"`
831834
}
832835

833836
// ListVolumesResponse: list volumes response.
@@ -969,6 +972,7 @@ func (s *API) ListVolumes(req *ListVolumesRequest, opts ...scw.RequestOption) (*
969972
parameter.AddToQuery(query, "page_size", req.PageSize)
970973
parameter.AddToQuery(query, "name", req.Name)
971974
parameter.AddToQuery(query, "product_resource_id", req.ProductResourceID)
975+
parameter.AddToQuery(query, "tags", req.Tags)
972976

973977
if fmt.Sprint(req.Zone) == "" {
974978
return nil, errors.New("field Zone cannot be empty in request")

0 commit comments

Comments
 (0)