Skip to content

Commit a669aa5

Browse files
authored
feat(apple_silicon): add public bandwidth configuration feature (scaleway#2587)
1 parent d42ad34 commit a669aa5

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

api/applesilicon/v1alpha1/applesilicon_sdk.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,8 @@ type ServerTypeMemory struct {
477477
// ServerTypeNetwork: server type network.
478478
type ServerTypeNetwork struct {
479479
PublicBandwidthBps uint64 `json:"public_bandwidth_bps"`
480+
481+
SupportedBandwidth []uint64 `json:"supported_bandwidth"`
480482
}
481483

482484
// Commitment: commitment.
@@ -627,6 +629,9 @@ type Server struct {
627629

628630
// Commitment: commitment scheme applied to this server.
629631
Commitment *Commitment `json:"commitment"`
632+
633+
// PublicBandwidthBps: public bandwidth configured for this server. Expressed in bits per second.
634+
PublicBandwidthBps uint64 `json:"public_bandwidth_bps"`
630635
}
631636

632637
// CommitmentTypeValue: commitment type value.
@@ -674,6 +679,9 @@ type CreateServerRequest struct {
674679
// CommitmentType: 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.
675680
// Default value: duration_24h
676681
CommitmentType CommitmentType `json:"commitment_type"`
682+
683+
// PublicBandwidthBps: 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.
684+
PublicBandwidthBps uint64 `json:"public_bandwidth_bps"`
677685
}
678686

679687
// DeleteServerRequest: delete server request.
@@ -992,6 +1000,9 @@ type UpdateServerRequest struct {
9921000

9931001
// CommitmentType: change commitment. Use 'none' to automatically cancel a renewing commitment.
9941002
CommitmentType *CommitmentTypeValue `json:"commitment_type,omitempty"`
1003+
1004+
// PublicBandwidthBps: 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.
1005+
PublicBandwidthBps *uint64 `json:"public_bandwidth_bps,omitempty"`
9951006
}
9961007

9971008
// This API allows you to manage your Apple silicon machines.

0 commit comments

Comments
 (0)