Skip to content

Commit

Permalink
feat(block): add tags in ListVolumesRequest (scaleway#2299)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaleway-bot authored Nov 7, 2024
1 parent 59f12be commit e84e5b2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/block/v1alpha1/block_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,9 @@ type ListVolumesRequest struct {

// ProductResourceID: filter by a product resource ID linked to this volume (such as an Instance ID).
ProductResourceID *string `json:"-"`

// Tags: filter by tags. Only volumes with one or more matching tags will be returned.
Tags []string `json:"-"`
}

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

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

0 comments on commit e84e5b2

Please sign in to comment.