Skip to content

Commit 6c07829

Browse files
authored
feat(ipam): add new ip source (scaleway#2575)
1 parent 5c022ea commit 6c07829

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

api/ipam/v1/ipam_sdk.go

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,16 +191,19 @@ type Reverse struct {
191191
// Source: source.
192192
type Source struct {
193193
// Zonal: this source is global.
194-
// Precisely one of Zonal, PrivateNetworkID, SubnetID must be set.
194+
// Precisely one of Zonal, PrivateNetworkID, SubnetID, VpcID must be set.
195195
Zonal *string `json:"zonal,omitempty"`
196196

197197
// PrivateNetworkID: this source is specific.
198-
// Precisely one of Zonal, PrivateNetworkID, SubnetID must be set.
198+
// Precisely one of Zonal, PrivateNetworkID, SubnetID, VpcID must be set.
199199
PrivateNetworkID *string `json:"private_network_id,omitempty"`
200200

201201
// SubnetID: this source is specific.
202-
// Precisely one of Zonal, PrivateNetworkID, SubnetID must be set.
202+
// Precisely one of Zonal, PrivateNetworkID, SubnetID, VpcID must be set.
203203
SubnetID *string `json:"subnet_id,omitempty"`
204+
205+
// Precisely one of Zonal, PrivateNetworkID, SubnetID, VpcID must be set.
206+
VpcID *string `json:"vpc_id,omitempty"`
204207
}
205208

206209
// CustomResource: custom resource.
@@ -327,15 +330,15 @@ type ListIPsRequest struct {
327330
ProjectID *string `json:"-"`
328331

329332
// Zonal: zone to filter for. Only IPs that are zonal, and in this zone, will be returned.
330-
// Precisely one of Zonal, PrivateNetworkID, SubnetID must be set.
333+
// Precisely one of Zonal, PrivateNetworkID, SubnetID, SourceVpcID must be set.
331334
Zonal *string `json:"zonal,omitempty"`
332335

333336
// PrivateNetworkID: only IPs that are private, and in this Private Network, will be returned.
334-
// Precisely one of Zonal, PrivateNetworkID, SubnetID must be set.
337+
// Precisely one of Zonal, PrivateNetworkID, SubnetID, SourceVpcID must be set.
335338
PrivateNetworkID *string `json:"private_network_id,omitempty"`
336339

337340
// SubnetID: only IPs inside this exact subnet will be returned.
338-
// Precisely one of Zonal, PrivateNetworkID, SubnetID must be set.
341+
// Precisely one of Zonal, PrivateNetworkID, SubnetID, SourceVpcID must be set.
339342
SubnetID *string `json:"subnet_id,omitempty"`
340343

341344
// VpcID: only IPs owned by resources in this VPC will be returned.
@@ -374,6 +377,9 @@ type ListIPsRequest struct {
374377

375378
// IPIDs: IP IDs to filter for. Only IPs with these UUIDs will be returned.
376379
IPIDs []string `json:"-"`
380+
381+
// Precisely one of Zonal, PrivateNetworkID, SubnetID, SourceVpcID must be set.
382+
SourceVpcID *string `json:"source_vpc_id,omitempty"`
377383
}
378384

379385
// ListIPsResponse: list i ps response.
@@ -667,6 +673,7 @@ func (s *API) ListIPs(req *ListIPsRequest, opts ...scw.RequestOption) (*ListIPsR
667673
parameter.AddToQuery(query, "zonal", req.Zonal)
668674
parameter.AddToQuery(query, "private_network_id", req.PrivateNetworkID)
669675
parameter.AddToQuery(query, "subnet_id", req.SubnetID)
676+
parameter.AddToQuery(query, "source_vpc_id", req.SourceVpcID)
670677

671678
if fmt.Sprint(req.Region) == "" {
672679
return nil, errors.New("field Region cannot be empty in request")

0 commit comments

Comments
 (0)