Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ const unmarshalServerTypeNetwork = (data: unknown): ServerTypeNetwork => {

return {
publicBandwidthBps: data.public_bandwidth_bps,
supportedBandwidth: data.supported_bandwidth,
} as ServerTypeNetwork
}

Expand Down Expand Up @@ -197,6 +198,7 @@ export const unmarshalServer = (data: unknown): Server => {
organizationId: data.organization_id,
os: data.os ? unmarshalOS(data.os) : undefined,
projectId: data.project_id,
publicBandwidthBps: data.public_bandwidth_bps,
sshUsername: data.ssh_username,
status: data.status,
sudoPassword: data.sudo_password,
Expand Down Expand Up @@ -349,6 +351,7 @@ export const marshalCreateServerRequest = (
name: request.name || randomName('as'),
os_id: request.osId,
project_id: request.projectId ?? defaults.defaultProjectId,
public_bandwidth_bps: request.publicBandwidthBps,
type: request.type,
})

Expand Down Expand Up @@ -398,5 +401,6 @@ export const marshalUpdateServerRequest = (
: undefined,
enable_vpc: request.enableVpc,
name: request.name,
public_bandwidth_bps: request.publicBandwidthBps,
schedule_deletion: request.scheduleDeletion,
})
13 changes: 13 additions & 0 deletions packages_generated/applesilicon/src/v1alpha1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export interface ServerTypeMemory {

export interface ServerTypeNetwork {
publicBandwidthBps: number
supportedBandwidth: number[]
}

export interface Commitment {
Expand Down Expand Up @@ -291,6 +292,10 @@ export interface Server {
* Commitment scheme applied to this server.
*/
commitment?: Commitment
/**
* Public bandwidth configured for this server. Expressed in bits per second.
*/
publicBandwidthBps: number
}

export interface CommitmentTypeValue {
Expand Down Expand Up @@ -335,6 +340,10 @@ export type CreateServerRequest = {
* Activate commitment for this server. If not specified, there is a 24h commitment due to Apple licensing (commitment_type `duration_24h`). It can be updated with the Update Server request. Available commitment depends on server type.
*/
commitmentType?: CommitmentType
/**
* Public bandwidth to configure for this server. This defaults to the minimum bandwidth for this server type. For compatible server types, the bandwidth can be increased which incurs additional costs.
*/
publicBandwidthBps: number
}

export type DeleteServerRequest = {
Expand Down Expand Up @@ -644,4 +653,8 @@ export type UpdateServerRequest = {
* Change commitment. Use 'none' to automatically cancel a renewing commitment.
*/
commitmentType?: CommitmentTypeValue
/**
* Public bandwidth to configure for this server. Setting an higher bandwidth incurs additional costs. Supported bandwidth levels depends on server type and can be queried using the `/server-types` endpoint.
*/
publicBandwidthBps?: number
}
Loading