Skip to content

Commit 7b9019d

Browse files
authored
feat(rdb): prepare ipam integration (#1573)
1 parent 6494c5a commit 7b9019d

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

api/rdb/v1/rdb_sdk.go

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,14 @@ type EndpointSpecPrivateNetwork struct {
912912
// PrivateNetworkID: UUID of the private network to be connected to the database instance.
913913
PrivateNetworkID string `json:"private_network_id"`
914914
// ServiceIP: endpoint IPv4 adress with a CIDR notation. Check documentation about IP and subnet limitation.
915-
ServiceIP scw.IPNet `json:"service_ip"`
915+
// Precisely one of IpamConfig, ServiceIP must be set.
916+
ServiceIP *scw.IPNet `json:"service_ip,omitempty"`
917+
// IpamConfig: automated configuration of your private network endpoint with Scaleway IPAM service. One at the most per RDB instance or read replica (an RDB instance and its read replica can have different private networks). Cannot be updated (has to be deleted and recreated).
918+
// Precisely one of IpamConfig, ServiceIP must be set.
919+
IpamConfig *EndpointSpecPrivateNetworkIpamConfig `json:"ipam_config,omitempty"`
920+
}
921+
922+
type EndpointSpecPrivateNetworkIpamConfig struct {
916923
}
917924

918925
// EngineSetting: engine setting.
@@ -1256,7 +1263,14 @@ type ReadReplicaEndpointSpecPrivateNetwork struct {
12561263
// PrivateNetworkID: UUID of the private network to be connected to the read replica.
12571264
PrivateNetworkID string `json:"private_network_id"`
12581265
// ServiceIP: endpoint IPv4 adress with a CIDR notation. Check documentation about IP and subnet limitations.
1259-
ServiceIP scw.IPNet `json:"service_ip"`
1266+
// Precisely one of IpamConfig, ServiceIP must be set.
1267+
ServiceIP *scw.IPNet `json:"service_ip,omitempty"`
1268+
// IpamConfig: automated configuration of your private network endpoint with Scaleway IPAM service. One at the most per RDB instance or read replica (an RDB instance and its read replica can have different private networks). Cannot be updated (has to be deleted and recreated).
1269+
// Precisely one of IpamConfig, ServiceIP must be set.
1270+
IpamConfig *ReadReplicaEndpointSpecPrivateNetworkIpamConfig `json:"ipam_config,omitempty"`
1271+
}
1272+
1273+
type ReadReplicaEndpointSpecPrivateNetworkIpamConfig struct {
12601274
}
12611275

12621276
// SetInstanceACLRulesResponse: set instance acl rules response.

0 commit comments

Comments
 (0)