@@ -766,23 +766,6 @@ func (r *ListVPCsResponse) UnsafeAppend(res interface{}) (uint32, error) {
766766 return uint32 (len (results .Vpcs )), nil
767767}
768768
769- // MigrateZonalPrivateNetworksRequest: migrate zonal private networks request.
770- type MigrateZonalPrivateNetworksRequest struct {
771- // Region: region to target. If none is passed will use default region from the config.
772- Region scw.Region `json:"-"`
773-
774- // OrganizationID: organization ID to target. The specified zoned Private Networks within this Organization will be migrated to regional.
775- // Precisely one of OrganizationID, ProjectID must be set.
776- OrganizationID * string `json:"organization_id,omitempty"`
777-
778- // ProjectID: project to target. The specified zoned Private Networks within this Project will be migrated to regional.
779- // Precisely one of OrganizationID, ProjectID must be set.
780- ProjectID * string `json:"project_id,omitempty"`
781-
782- // PrivateNetworkIDs: iDs of the Private Networks to migrate.
783- PrivateNetworkIDs []string `json:"private_network_ids"`
784- }
785-
786769// RoutesWithNexthopAPIListRoutesWithNexthopRequest: routes with nexthop api list routes with nexthop request.
787770type RoutesWithNexthopAPIListRoutesWithNexthopRequest struct {
788771 // Region: region to target. If none is passed will use default region from the config.
@@ -1270,46 +1253,6 @@ func (s *API) DeletePrivateNetwork(req *DeletePrivateNetworkRequest, opts ...scw
12701253 return nil
12711254}
12721255
1273- // MigrateZonalPrivateNetworks: Transform multiple existing zoned Private Networks (scoped to a single Availability Zone) into regional Private Networks, scoped to an entire region. You can transform one or many Private Networks (specified by their Private Network IDs) within a single Scaleway Organization or Project, with the same call.
1274- func (s * API ) MigrateZonalPrivateNetworks (req * MigrateZonalPrivateNetworksRequest , opts ... scw.RequestOption ) error {
1275- var err error
1276-
1277- if req .Region == "" {
1278- defaultRegion , _ := s .client .GetDefaultRegion ()
1279- req .Region = defaultRegion
1280- }
1281-
1282- defaultOrganizationID , exist := s .client .GetDefaultOrganizationID ()
1283- if exist && req .OrganizationID == nil && req .ProjectID == nil {
1284- req .OrganizationID = & defaultOrganizationID
1285- }
1286-
1287- defaultProjectID , exist := s .client .GetDefaultProjectID ()
1288- if exist && req .OrganizationID == nil && req .ProjectID == nil {
1289- req .ProjectID = & defaultProjectID
1290- }
1291-
1292- if fmt .Sprint (req .Region ) == "" {
1293- return errors .New ("field Region cannot be empty in request" )
1294- }
1295-
1296- scwReq := & scw.ScalewayRequest {
1297- Method : "POST" ,
1298- Path : "/vpc/v2/regions/" + fmt .Sprint (req .Region ) + "/private-networks/migrate-zonal" ,
1299- }
1300-
1301- err = scwReq .SetBody (req )
1302- if err != nil {
1303- return err
1304- }
1305-
1306- err = s .client .Do (scwReq , nil , opts ... )
1307- if err != nil {
1308- return err
1309- }
1310- return nil
1311- }
1312-
13131256// EnableDHCP: Enable DHCP managed on an existing Private Network. Note that you will not be able to deactivate it afterwards.
13141257func (s * API ) EnableDHCP (req * EnableDHCPRequest , opts ... scw.RequestOption ) (* PrivateNetwork , error ) {
13151258 var err error
0 commit comments