Skip to content

Commit

Permalink
feat(vpc/v2): drop MigrateZonalPrivateNetworks (#1760)
Browse files Browse the repository at this point in the history
Co-authored-by: Jules Castéran <[email protected]>
  • Loading branch information
scaleway-bot and Codelax authored Jan 30, 2025
1 parent 90cc4c1 commit c638994
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 75 deletions.
27 changes: 0 additions & 27 deletions packages/clients/src/api/vpc/v2/api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
marshalCreateRouteRequest,
marshalCreateVPCRequest,
marshalDeleteSubnetsRequest,
marshalMigrateZonalPrivateNetworksRequest,
marshalSetSubnetsRequest,
marshalUpdatePrivateNetworkRequest,
marshalUpdateRouteRequest,
Expand Down Expand Up @@ -50,7 +49,6 @@ import type {
ListSubnetsResponse,
ListVPCsRequest,
ListVPCsResponse,
MigrateZonalPrivateNetworksRequest,
PrivateNetwork,
Route,
SetSubnetsRequest,
Expand Down Expand Up @@ -288,31 +286,6 @@ export class API extends ParentAPI {
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/private-networks/${validatePathParam('privateNetworkId', request.privateNetworkId)}`,
})

/**
* Migrate Private Networks from zoned to regional. 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.
*
* @deprecated
* @param request - The request {@link MigrateZonalPrivateNetworksRequest}
*/
migrateZonalPrivateNetworks = (
request: Readonly<MigrateZonalPrivateNetworksRequest> = {},
) =>
this.client.fetch<void>({
body: JSON.stringify(
marshalMigrateZonalPrivateNetworksRequest(
request,
this.client.settings,
),
),
headers: jsonContentHeaders,
method: 'POST',
path: `/vpc/v2/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/private-networks/migrate-zonal`,
})

/**
* Enable DHCP on a Private Network. Enable DHCP managed on an existing
* Private Network. Note that you will not be able to deactivate it
Expand Down
1 change: 0 additions & 1 deletion packages/clients/src/api/vpc/v2/index.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export type {
ListVPCsRequest,
ListVPCsRequestOrderBy,
ListVPCsResponse,
MigrateZonalPrivateNetworksRequest,
PrivateNetwork,
Route,
SetSubnetsRequest,
Expand Down
21 changes: 0 additions & 21 deletions packages/clients/src/api/vpc/v2/marshalling.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import randomName from '@scaleway/random-name'
import {
isJSONObject,
resolveOneOf,
unmarshalArrayOfObject,
unmarshalDate,
} from '../../../bridge'
Expand All @@ -19,7 +18,6 @@ import type {
ListPrivateNetworksResponse,
ListSubnetsResponse,
ListVPCsResponse,
MigrateZonalPrivateNetworksRequest,
PrivateNetwork,
Route,
SetSubnetsRequest,
Expand Down Expand Up @@ -250,25 +248,6 @@ export const marshalDeleteSubnetsRequest = (
subnets: request.subnets,
})

export const marshalMigrateZonalPrivateNetworksRequest = (
request: MigrateZonalPrivateNetworksRequest,
defaults: DefaultValues,
): Record<string, unknown> => ({
private_network_ids: request.privateNetworkIds,
...resolveOneOf([
{
default: defaults.defaultOrganizationId,
param: 'organization_id',
value: request.organizationId,
},
{
default: defaults.defaultProjectId,
param: 'project_id',
value: request.projectId,
},
]),
})

export const marshalSetSubnetsRequest = (
request: SetSubnetsRequest,
defaults: DefaultValues,
Expand Down
26 changes: 0 additions & 26 deletions packages/clients/src/api/vpc/v2/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,32 +413,6 @@ export interface ListVPCsResponse {
totalCount: number
}

export type MigrateZonalPrivateNetworksRequest = {
/**
* Region to target. If none is passed will use default region from the
* config.
*/
region?: ScwRegion
/**
* Organization ID to target. The specified zoned Private Networks within this
* Organization will be migrated to regional.
*
* One-of ('scope'): at most one of 'organizationId', 'projectId' could be
* set.
*/
organizationId?: string
/**
* Project to target. The specified zoned Private Networks within this Project
* will be migrated to regional.
*
* One-of ('scope'): at most one of 'organizationId', 'projectId' could be
* set.
*/
projectId?: string
/** IDs of the Private Networks to migrate. */
privateNetworkIds?: string[]
}

export type SetSubnetsRequest = {
/**
* Region to target. If none is passed will use default region from the
Expand Down

0 comments on commit c638994

Please sign in to comment.