Skip to content

Commit 25fa5d5

Browse files
authored
feat(instance): add field private_nic_mac_address for ListServersRequest (#1833)
1 parent 25d7129 commit 25fa5d5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

api/instance/v1/instance_sdk.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2019,6 +2019,8 @@ type ListServersRequest struct {
20192019
Order ListServersRequestOrder `json:"-"`
20202020
// PrivateNetworks: list Instances from the given Private Networks (use commas to separate them).
20212021
PrivateNetworks []string `json:"-"`
2022+
// PrivateNicMacAddress: list Instances associated with the given private NIC MAC address.
2023+
PrivateNicMacAddress *string `json:"-"`
20222024
}
20232025

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

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

0 commit comments

Comments
 (0)