Skip to content

Commit a8f5160

Browse files
feat(vpc_gw): add a call to migrate a V1 gateway to V2 (#1827)
Co-authored-by: Rémy Léone <[email protected]>
1 parent eaf54ab commit a8f5160

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

packages/clients/src/api/vpcgw/v1/api.gen.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ import type {
8383
ListIPsResponse,
8484
ListPATRulesRequest,
8585
ListPATRulesResponse,
86+
MigrateToV2Request,
8687
PATRule,
8788
RefreshSSHKeysRequest,
8889
SetDHCPEntriesRequest,
@@ -943,4 +944,12 @@ export class API extends ParentAPI {
943944
},
944945
unmarshalGateway,
945946
)
947+
948+
migrateToV2 = (request: Readonly<MigrateToV2Request>) =>
949+
this.client.fetch<void>({
950+
body: '{}',
951+
headers: jsonContentHeaders,
952+
method: 'POST',
953+
path: `/vpc-gw/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/gateways/${validatePathParam('gatewayId', request.gatewayId)}/migrate-to-v2`,
954+
})
946955
}

packages/clients/src/api/vpcgw/v1/index.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export type {
5353
ListPATRulesRequest,
5454
ListPATRulesRequestOrderBy,
5555
ListPATRulesResponse,
56+
MigrateToV2Request,
5657
PATRule,
5758
PATRuleProtocol,
5859
RefreshSSHKeysRequest,

packages/clients/src/api/vpcgw/v1/types.gen.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,12 @@ export interface ListPATRulesResponse {
815815
totalCount: number
816816
}
817817

818+
export type MigrateToV2Request = {
819+
/** Zone to target. If none is passed will use default zone from the config. */
820+
zone?: ScwZone
821+
gatewayId: string
822+
}
823+
818824
export type RefreshSSHKeysRequest = {
819825
/** Zone to target. If none is passed will use default zone from the config. */
820826
zone?: ScwZone

0 commit comments

Comments
 (0)