Skip to content

Commit 04380f4

Browse files
authored
feat(instance): add commercialType to UpdateServerRequest (#761)
1 parent b9355ba commit 04380f4

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

packages/clients/src/api/instance/v1/marshalling.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2101,6 +2101,7 @@ export const marshalUpdateServerRequest = (
21012101
): Record<string, unknown> => ({
21022102
boot_type: request.bootType,
21032103
bootscript: request.bootscript,
2104+
commercial_type: request.commercialType,
21042105
dynamic_ip_required: request.dynamicIpRequired,
21052106
enable_ipv6: request.enableIpv6,
21062107
name: request.name,

packages/clients/src/api/instance/v1/types.private.gen.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,18 @@ export type UpdateServerRequest = {
203203
placementGroup?: string | null
204204
/** Instance private NICs. */
205205
privateNics?: PrivateNIC[]
206+
/**
207+
* Set the commercial_type for this Instance. Warning: This field has some
208+
* restrictions:
209+
*
210+
* - Cannot be changed if the Instance is not in `stopped` state.
211+
* - Cannot be changed if the Instance is in a placement group.
212+
* - Local storage requirements of the target commercial_types must be fulfilled
213+
* (i.e. if an Instance has 80GB of local storage, it can be changed into a
214+
* GP1-XS, which has a maximum of 150GB, but it cannot be changed into a
215+
* DEV1-S, which has only 20GB).
216+
*/
217+
commercialType?: string
206218
}
207219

208220
export type SetImageRequest = {

0 commit comments

Comments
 (0)