Skip to content

Commit

Permalink
feat(instance): add field private_nic_mac_address for ListServersRequ…
Browse files Browse the repository at this point in the history
…est (#1833)
  • Loading branch information
scaleway-bot authored Sep 14, 2023
1 parent 25d7129 commit 25fa5d5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/instance/v1/instance_sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -2019,6 +2019,8 @@ type ListServersRequest struct {
Order ListServersRequestOrder `json:"-"`
// PrivateNetworks: list Instances from the given Private Networks (use commas to separate them).
PrivateNetworks []string `json:"-"`
// PrivateNicMacAddress: list Instances associated with the given private NIC MAC address.
PrivateNicMacAddress *string `json:"-"`
}

// ListServers: list all Instances.
Expand Down Expand Up @@ -2054,6 +2056,7 @@ func (s *API) ListServers(req *ListServersRequest, opts ...scw.RequestOption) (*
if len(req.PrivateNetworks) != 0 {
parameter.AddToQuery(query, "private_networks", strings.Join(req.PrivateNetworks, ","))
}
parameter.AddToQuery(query, "private_nic_mac_address", req.PrivateNicMacAddress)

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

0 comments on commit 25fa5d5

Please sign in to comment.