Skip to content

Commit 7f8e112

Browse files
authored
feat(pgw): ipam config for native vpc integration (#1825)
1 parent 0f1b146 commit 7f8e112

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

api/vpcgw/v1/vpcgw_sdk.go

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,12 @@ type IP struct {
556556
Zone scw.Zone `json:"zone"`
557557
}
558558

559+
// IpamConfig: ipam config.
560+
type IpamConfig struct {
561+
// PushDefaultRoute: defines whether the default route is enabled on that Gateway Network.
562+
PushDefaultRoute bool `json:"push_default_route"`
563+
}
564+
559565
// ListDHCPEntriesResponse: list dhcp entries response.
560566
type ListDHCPEntriesResponse struct {
561567
// DHCPEntries: DHCP entries in this page.
@@ -1118,17 +1124,21 @@ type CreateGatewayNetworkRequest struct {
11181124
PrivateNetworkID string `json:"private_network_id"`
11191125
// EnableMasquerade: defines whether to enable masquerade (dynamic NAT) on this network.
11201126
EnableMasquerade bool `json:"enable_masquerade"`
1127+
// EnableDHCP: defines whether to enable DHCP on this Private Network. Defaults to `true` if either `dhcp_id` or `dhcp` are present. If set to `true`, either `dhcp_id` or `dhcp` must be present.
1128+
EnableDHCP *bool `json:"enable_dhcp"`
11211129
// DHCPID: ID of an existing DHCP configuration object to use for this GatewayNetwork.
1122-
// Precisely one of Address, DHCP, DHCPID must be set.
1130+
// Precisely one of Address, DHCP, DHCPID, IpamConfig must be set.
11231131
DHCPID *string `json:"dhcp_id,omitempty"`
11241132
// DHCP: new DHCP configuration object to use for this GatewayNetwork.
1125-
// Precisely one of Address, DHCP, DHCPID must be set.
1133+
// Precisely one of Address, DHCP, DHCPID, IpamConfig must be set.
11261134
DHCP *CreateDHCPRequest `json:"dhcp,omitempty"`
11271135
// Address: static IP address in CIDR format to to use without DHCP.
1128-
// Precisely one of Address, DHCP, DHCPID must be set.
1136+
// Precisely one of Address, DHCP, DHCPID, IpamConfig must be set.
11291137
Address *scw.IPNet `json:"address,omitempty"`
1130-
// EnableDHCP: defines whether to enable DHCP on this Private Network. Defaults to `true` if either `dhcp_id` or `dhcp` are present. If set to `true`, either `dhcp_id` or `dhcp` must be present.
1131-
EnableDHCP *bool `json:"enable_dhcp"`
1138+
// IpamConfig: auto-configure the GatewayNetwork using Scaleway's IPAM (IP address management service).
1139+
// Note: all or none of the GatewayNetworks for a single gateway can use the IPAM. DHCP and IPAM configurations cannot be mixed. Some products may require that the Public Gateway uses the IPAM, to ensure correct functionality.
1140+
// Precisely one of Address, DHCP, DHCPID, IpamConfig must be set.
1141+
IpamConfig *IpamConfig `json:"ipam_config,omitempty"`
11321142
}
11331143

11341144
// CreateGatewayNetwork: attach a Public Gateway to a Private Network.
@@ -1172,14 +1182,17 @@ type UpdateGatewayNetworkRequest struct {
11721182
GatewayNetworkID string `json:"-"`
11731183
// EnableMasquerade: defines whether to enable masquerade (dynamic NAT) on the GatewayNetwork.
11741184
EnableMasquerade *bool `json:"enable_masquerade"`
1175-
// DHCPID: ID of the new DHCP configuration object to use with this GatewayNetwork.
1176-
// Precisely one of Address, DHCPID must be set.
1177-
DHCPID *string `json:"dhcp_id,omitempty"`
11781185
// EnableDHCP: defines whether to enable DHCP on the connected Private Network.
11791186
EnableDHCP *bool `json:"enable_dhcp"`
1187+
// DHCPID: ID of the new DHCP configuration object to use with this GatewayNetwork.
1188+
// Precisely one of Address, DHCPID, IpamConfig must be set.
1189+
DHCPID *string `json:"dhcp_id,omitempty"`
11801190
// Address: new static IP address.
1181-
// Precisely one of Address, DHCPID must be set.
1191+
// Precisely one of Address, DHCPID, IpamConfig must be set.
11821192
Address *scw.IPNet `json:"address,omitempty"`
1193+
// IpamConfig: new IPAM configuration to use for this GatewayNetwork.
1194+
// Precisely one of Address, DHCPID, IpamConfig must be set.
1195+
IpamConfig *IpamConfig `json:"ipam_config,omitempty"`
11831196
}
11841197

11851198
// UpdateGatewayNetwork: update a Public Gateway's connection to a Private Network.

0 commit comments

Comments
 (0)