applesilicon

package
v1.0.0-beta.35 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2025 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Overview

Package applesilicon provides methods and message types of the applesilicon v1alpha1 API.

Index

Constants

View Source
const (
	CommitmentTypeDuration24h    = CommitmentType("duration_24h")
	CommitmentTypeRenewedMonthly = CommitmentType("renewed_monthly")
	CommitmentTypeNone           = CommitmentType("none")
)
View Source
const (
	ConnectivityDiagnosticActionTypeRebootServer    = ConnectivityDiagnosticActionType("reboot_server")
	ConnectivityDiagnosticActionTypeReinstallServer = ConnectivityDiagnosticActionType("reinstall_server")
)
View Source
const (
	ConnectivityDiagnosticDiagnosticStatusUnknownStatus = ConnectivityDiagnosticDiagnosticStatus("unknown_status")
	ConnectivityDiagnosticDiagnosticStatusProcessing    = ConnectivityDiagnosticDiagnosticStatus("processing")
	ConnectivityDiagnosticDiagnosticStatusError         = ConnectivityDiagnosticDiagnosticStatus("error")
	ConnectivityDiagnosticDiagnosticStatusCompleted     = ConnectivityDiagnosticDiagnosticStatus("completed")
)
View Source
const (
	ListServerPrivateNetworksRequestOrderByCreatedAtAsc  = ListServerPrivateNetworksRequestOrderBy("created_at_asc")
	ListServerPrivateNetworksRequestOrderByCreatedAtDesc = ListServerPrivateNetworksRequestOrderBy("created_at_desc")
	ListServerPrivateNetworksRequestOrderByUpdatedAtAsc  = ListServerPrivateNetworksRequestOrderBy("updated_at_asc")
	ListServerPrivateNetworksRequestOrderByUpdatedAtDesc = ListServerPrivateNetworksRequestOrderBy("updated_at_desc")
)
View Source
const (
	ListServersRequestOrderByCreatedAtAsc  = ListServersRequestOrderBy("created_at_asc")
	ListServersRequestOrderByCreatedAtDesc = ListServersRequestOrderBy("created_at_desc")
)
View Source
const (
	ServerPrivateNetworkServerStatusUnknownStatus = ServerPrivateNetworkServerStatus("unknown_status")
	ServerPrivateNetworkServerStatusAttaching     = ServerPrivateNetworkServerStatus("attaching")
	ServerPrivateNetworkServerStatusAttached      = ServerPrivateNetworkServerStatus("attached")
	ServerPrivateNetworkServerStatusError         = ServerPrivateNetworkServerStatus("error")
	ServerPrivateNetworkServerStatusDetaching     = ServerPrivateNetworkServerStatus("detaching")
	ServerPrivateNetworkServerStatusLocked        = ServerPrivateNetworkServerStatus("locked")
)
View Source
const (
	ServerPrivateNetworkStatusVpcUnknownStatus = ServerPrivateNetworkStatus("vpc_unknown_status")
	ServerPrivateNetworkStatusVpcEnabled       = ServerPrivateNetworkStatus("vpc_enabled")
	ServerPrivateNetworkStatusVpcUpdating      = ServerPrivateNetworkStatus("vpc_updating")
	ServerPrivateNetworkStatusVpcDisabled      = ServerPrivateNetworkStatus("vpc_disabled")
)
View Source
const (
	ServerStatusUnknownStatus = ServerStatus("unknown_status")
	ServerStatusStarting      = ServerStatus("starting")
	ServerStatusReady         = ServerStatus("ready")
	ServerStatusError         = ServerStatus("error")
	ServerStatusRebooting     = ServerStatus("rebooting")
	ServerStatusUpdating      = ServerStatus("updating")
	ServerStatusLocking       = ServerStatus("locking")
	ServerStatusLocked        = ServerStatus("locked")
	ServerStatusUnlocking     = ServerStatus("unlocking")
	ServerStatusReinstalling  = ServerStatus("reinstalling")
	ServerStatusBusy          = ServerStatus("busy")
)
View Source
const (
	ServerTypeStockUnknownStock = ServerTypeStock("unknown_stock")
	ServerTypeStockNoStock      = ServerTypeStock("no_stock")
	ServerTypeStockLowStock     = ServerTypeStock("low_stock")
	ServerTypeStockHighStock    = ServerTypeStock("high_stock")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	// contains filtered or unexported fields
}

This API allows you to manage your Apple silicon machines.

func NewAPI

func NewAPI(client *scw.Client) *API

NewAPI returns a API object from a Scaleway client.

func (*API) BatchCreateServers

func (s *API) BatchCreateServers(req *BatchCreateServersRequest, opts ...scw.RequestOption) (*BatchCreateServersResponse, error)

BatchCreateServers: Create multiple servers in the targeted zone specifying their configurations. If the request cannot entirely be fulfilled, no servers are created.

func (*API) CreateServer

func (s *API) CreateServer(req *CreateServerRequest, opts ...scw.RequestOption) (*Server, error)

CreateServer: Create a new server in the targeted zone, specifying its configuration including name and type.

func (*API) DeleteServer

func (s *API) DeleteServer(req *DeleteServerRequest, opts ...scw.RequestOption) error

DeleteServer: Delete an existing Apple silicon server, specified by its server ID. Deleting a server is permanent, and cannot be undone. Note that the minimum allocation period for Apple silicon-as-a-service is 24 hours, meaning you cannot delete your server prior to that.

func (*API) GetConnectivityDiagnostic

func (s *API) GetConnectivityDiagnostic(req *GetConnectivityDiagnosticRequest, opts ...scw.RequestOption) (*ConnectivityDiagnostic, error)

GetConnectivityDiagnostic:

func (*API) GetOS

func (s *API) GetOS(req *GetOSRequest, opts ...scw.RequestOption) (*OS, error)

GetOS: Get an Operating System (OS). The response will include the OS's unique ID as well as its name and label.

func (*API) GetServer

func (s *API) GetServer(req *GetServerRequest, opts ...scw.RequestOption) (*Server, error)

GetServer: Retrieve information about an existing Apple silicon server, specified by its server ID. Its full details, including name, status and IP address, are returned in the response object.

func (*API) GetServerType

func (s *API) GetServerType(req *GetServerTypeRequest, opts ...scw.RequestOption) (*ServerType, error)

GetServerType: Get technical details (CPU, disk size etc.) of a server type.

func (*API) ListOS

func (s *API) ListOS(req *ListOSRequest, opts ...scw.RequestOption) (*ListOSResponse, error)

ListOS: List all Operating Systems (OS). The response will include the total number of OS as well as their associated IDs, names and labels.

func (*API) ListServerTypes

func (s *API) ListServerTypes(req *ListServerTypesRequest, opts ...scw.RequestOption) (*ListServerTypesResponse, error)

ListServerTypes: List all technical details about Apple silicon server types available in the specified zone. Since there is only one Availability Zone for Apple silicon servers, the targeted value is `fr-par-3`.

func (*API) ListServers

func (s *API) ListServers(req *ListServersRequest, opts ...scw.RequestOption) (*ListServersResponse, error)

ListServers: List all servers in the specified zone. By default, returned servers in the list are ordered by creation date in ascending order, though this can be modified via the `order_by` field.

func (*API) RebootServer

func (s *API) RebootServer(req *RebootServerRequest, opts ...scw.RequestOption) (*Server, error)

RebootServer: Reboot an existing Apple silicon server, specified by its server ID.

func (*API) ReinstallServer

func (s *API) ReinstallServer(req *ReinstallServerRequest, opts ...scw.RequestOption) (*Server, error)

ReinstallServer: Reinstall an existing Apple silicon server (specified by its server ID) from a new image (OS). All the data on the disk is deleted and all configuration is reset to the defailt configuration values of the image (OS).

func (*API) StartConnectivityDiagnostic

func (s *API) StartConnectivityDiagnostic(req *StartConnectivityDiagnosticRequest, opts ...scw.RequestOption) (*StartConnectivityDiagnosticResponse, error)

StartConnectivityDiagnostic:

func (*API) UpdateServer

func (s *API) UpdateServer(req *UpdateServerRequest, opts ...scw.RequestOption) (*Server, error)

UpdateServer: Update the parameters of an existing Apple silicon server, specified by its server ID.

func (*API) WaitForServer

func (s *API) WaitForServer(req *WaitForServerRequest, opts ...scw.RequestOption) (*Server, error)

WaitForServer waits for the instance to be in a "terminal state" before returning. This function can be used to wait for an instance to be ready for example.

func (*API) WaitForServerVPCOptionTerminalState

func (s *API) WaitForServerVPCOptionTerminalState(req *WaitForServerRequest, opts ...scw.RequestOption) error

func (*API) Zones

func (s *API) Zones() []scw.Zone

type BatchCreateServersRequest

type BatchCreateServersRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	// ProjectID: create servers in the given project ID.
	ProjectID string `json:"project_id"`

	// Type: create servers of the given type.
	Type string `json:"type"`

	// OsID: create servers & install the given os_id, when no os_id provided the default OS for this server type is chosen. Requesting a non-default OS will induce an extended delivery time.
	OsID *string `json:"os_id,omitempty"`

	// EnableVpc: activate the Private Network feature for these servers. This feature is configured through the Apple Silicon - Private Networks API.
	EnableVpc bool `json:"enable_vpc"`

	// CommitmentType: activate commitment for these servers. 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.
	// Default value: duration_24h
	CommitmentType CommitmentType `json:"commitment_type"`

	// PublicBandwidthBps: public bandwidth to configure for these servers. This defaults to the minimum bandwidth for the corresponding server type. For compatible server types, the bandwidth can be increased which incurs additional costs.
	PublicBandwidthBps uint64 `json:"public_bandwidth_bps"`

	// Requests: list of servers to create.
	Requests []*BatchCreateServersRequestBatchInnerCreateServerRequest `json:"requests"`
}

BatchCreateServersRequest: batch create servers request.

type BatchCreateServersRequestBatchInnerCreateServerRequest

type BatchCreateServersRequestBatchInnerCreateServerRequest struct {
	Name string `json:"name"`
}

BatchCreateServersRequestBatchInnerCreateServerRequest: batch create servers request batch inner create server request.

type BatchCreateServersResponse

type BatchCreateServersResponse struct {
	// Servers: list of created servers.
	Servers []*Server `json:"servers"`
}

BatchCreateServersResponse: batch create servers response.

type Commitment

type Commitment struct {
	// Type: default value: duration_24h
	Type CommitmentType `json:"type"`

	Cancelled bool `json:"cancelled"`
}

Commitment: commitment.

type CommitmentType

type CommitmentType string

func (CommitmentType) MarshalJSON

func (enum CommitmentType) MarshalJSON() ([]byte, error)

func (CommitmentType) String

func (enum CommitmentType) String() string

func (*CommitmentType) UnmarshalJSON

func (enum *CommitmentType) UnmarshalJSON(data []byte) error

func (CommitmentType) Values

func (enum CommitmentType) Values() []CommitmentType

type CommitmentTypeValue

type CommitmentTypeValue struct {
	// CommitmentType: default value: duration_24h
	CommitmentType CommitmentType `json:"commitment_type"`
}

CommitmentTypeValue: commitment type value.

type ConnectivityDiagnostic

type ConnectivityDiagnostic struct {
	ID string `json:"id"`

	// Status: default value: unknown_status
	Status ConnectivityDiagnosticDiagnosticStatus `json:"status"`

	IsHealthy bool `json:"is_healthy"`

	HealthDetails *ConnectivityDiagnosticServerHealth `json:"health_details"`

	SupportedActions []ConnectivityDiagnosticActionType `json:"supported_actions"`

	ErrorMessage string `json:"error_message"`
}

ConnectivityDiagnostic: connectivity diagnostic.

type ConnectivityDiagnosticActionType

type ConnectivityDiagnosticActionType string

func (ConnectivityDiagnosticActionType) MarshalJSON

func (enum ConnectivityDiagnosticActionType) MarshalJSON() ([]byte, error)

func (ConnectivityDiagnosticActionType) String

func (*ConnectivityDiagnosticActionType) UnmarshalJSON

func (enum *ConnectivityDiagnosticActionType) UnmarshalJSON(data []byte) error

func (ConnectivityDiagnosticActionType) Values

type ConnectivityDiagnosticDiagnosticStatus

type ConnectivityDiagnosticDiagnosticStatus string

func (ConnectivityDiagnosticDiagnosticStatus) MarshalJSON

func (enum ConnectivityDiagnosticDiagnosticStatus) MarshalJSON() ([]byte, error)

func (ConnectivityDiagnosticDiagnosticStatus) String

func (*ConnectivityDiagnosticDiagnosticStatus) UnmarshalJSON

func (enum *ConnectivityDiagnosticDiagnosticStatus) UnmarshalJSON(data []byte) error

func (ConnectivityDiagnosticDiagnosticStatus) Values

type ConnectivityDiagnosticServerHealth

type ConnectivityDiagnosticServerHealth struct {
	LastCheckinDate *time.Time `json:"last_checkin_date"`

	IsServerAlive bool `json:"is_server_alive"`

	IsAgentAlive bool `json:"is_agent_alive"`

	IsMdmAlive bool `json:"is_mdm_alive"`

	IsSSHPortUp bool `json:"is_ssh_port_up"`

	IsVncPortUp bool `json:"is_vnc_port_up"`
}

ConnectivityDiagnosticServerHealth: connectivity diagnostic server health.

type CreateServerRequest

type CreateServerRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	// Name: create a server with this given name.
	Name string `json:"name"`

	// ProjectID: create a server in the given project ID.
	ProjectID string `json:"project_id"`

	// Type: create a server of the given type.
	Type string `json:"type"`

	// OsID: create a server & install the given os_id, when no os_id provided the default OS for this server type is chosen. Requesting a non-default OS will induce an extended delivery time.
	OsID *string `json:"os_id,omitempty"`

	// EnableVpc: activate the Private Network feature for this server. This feature is configured through the Apple Silicon - Private Networks API.
	EnableVpc bool `json:"enable_vpc"`

	// 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.
	// Default value: duration_24h
	CommitmentType CommitmentType `json:"commitment_type"`

	// 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.
	PublicBandwidthBps uint64 `json:"public_bandwidth_bps"`
}

CreateServerRequest: create server request.

type DeleteServerRequest

type DeleteServerRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	// ServerID: UUID of the server you want to delete.
	ServerID string `json:"-"`
}

DeleteServerRequest: delete server request.

type GetConnectivityDiagnosticRequest

type GetConnectivityDiagnosticRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	DiagnosticID string `json:"-"`
}

GetConnectivityDiagnosticRequest: get connectivity diagnostic request.

type GetOSRequest

type GetOSRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	// OsID: UUID of the OS you want to get.
	OsID string `json:"-"`
}

GetOSRequest: get os request.

type GetServerRequest

type GetServerRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	// ServerID: UUID of the server you want to get.
	ServerID string `json:"-"`
}

GetServerRequest: get server request.

type GetServerTypeRequest

type GetServerTypeRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	// ServerType: server type identifier.
	ServerType string `json:"-"`
}

GetServerTypeRequest: get server type request.

type ListOSRequest

type ListOSRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	// Page: positive integer to choose the page to return.
	Page *int32 `json:"-"`

	// PageSize: positive integer lower or equal to 100 to select the number of items to return.
	PageSize *uint32 `json:"-"`

	// ServerType: list of compatible server types.
	ServerType *string `json:"-"`

	// Name: filter OS by name (note that "11.1" will return "11.1.2" and "11.1" but not "12")).
	Name *string `json:"-"`
}

ListOSRequest: list os request.

type ListOSResponse

type ListOSResponse struct {
	// TotalCount: total number of OS.
	TotalCount uint32 `json:"total_count"`

	// Os: list of OS.
	Os []*OS `json:"os"`
}

ListOSResponse: list os response.

func (*ListOSResponse) UnsafeAppend

func (r *ListOSResponse) UnsafeAppend(res any) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListOSResponse) UnsafeGetTotalCount

func (r *ListOSResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type ListServerPrivateNetworksRequestOrderBy

type ListServerPrivateNetworksRequestOrderBy string

func (ListServerPrivateNetworksRequestOrderBy) MarshalJSON

func (enum ListServerPrivateNetworksRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListServerPrivateNetworksRequestOrderBy) String

func (*ListServerPrivateNetworksRequestOrderBy) UnmarshalJSON

func (enum *ListServerPrivateNetworksRequestOrderBy) UnmarshalJSON(data []byte) error

func (ListServerPrivateNetworksRequestOrderBy) Values

type ListServerPrivateNetworksResponse

type ListServerPrivateNetworksResponse struct {
	ServerPrivateNetworks []*ServerPrivateNetwork `json:"server_private_networks"`

	TotalCount uint64 `json:"total_count"`
}

ListServerPrivateNetworksResponse: list server private networks response.

func (*ListServerPrivateNetworksResponse) UnsafeAppend

func (r *ListServerPrivateNetworksResponse) UnsafeAppend(res any) (uint64, error)

UnsafeAppend should not be used Internal usage only

func (*ListServerPrivateNetworksResponse) UnsafeGetTotalCount

func (r *ListServerPrivateNetworksResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type ListServerTypesRequest

type ListServerTypesRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
}

ListServerTypesRequest: list server types request.

type ListServerTypesResponse

type ListServerTypesResponse struct {
	// ServerTypes: available server types.
	ServerTypes []*ServerType `json:"server_types"`
}

ListServerTypesResponse: list server types response.

type ListServersRequest

type ListServersRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	// OrderBy: sort order of the returned servers.
	// Default value: created_at_asc
	OrderBy ListServersRequestOrderBy `json:"-"`

	// ProjectID: only list servers of this project ID.
	ProjectID *string `json:"-"`

	// OrganizationID: only list servers of this Organization ID.
	OrganizationID *string `json:"-"`

	// Page: positive integer to choose the page to return.
	Page *int32 `json:"-"`

	// PageSize: positive integer lower or equal to 100 to select the number of items to return.
	PageSize *uint32 `json:"-"`
}

ListServersRequest: list servers request.

type ListServersRequestOrderBy

type ListServersRequestOrderBy string

func (ListServersRequestOrderBy) MarshalJSON

func (enum ListServersRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListServersRequestOrderBy) String

func (enum ListServersRequestOrderBy) String() string

func (*ListServersRequestOrderBy) UnmarshalJSON

func (enum *ListServersRequestOrderBy) UnmarshalJSON(data []byte) error

func (ListServersRequestOrderBy) Values

type ListServersResponse

type ListServersResponse struct {
	// TotalCount: total number of servers.
	TotalCount uint32 `json:"total_count"`

	// Servers: paginated returned servers.
	Servers []*Server `json:"servers"`
}

ListServersResponse: list servers response.

func (*ListServersResponse) UnsafeAppend

func (r *ListServersResponse) UnsafeAppend(res any) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListServersResponse) UnsafeGetTotalCount

func (r *ListServersResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type OS

type OS struct {
	// ID: unique ID of the OS.
	ID string `json:"id"`

	// Name: oS name.
	Name string `json:"name"`

	// Label: oS name as it should be displayed.
	Label string `json:"label"`

	// ImageURL: URL of the image.
	ImageURL string `json:"image_url"`

	// Family: the OS family to which this OS belongs, eg. 13 or 14.
	Family string `json:"family"`

	// IsBeta: describes if the OS is in beta.
	IsBeta bool `json:"is_beta"`

	// Version: the OS version number, eg. Sonoma has version number 14.3.
	Version string `json:"version"`

	// XcodeVersion: the current xcode version for this OS.
	XcodeVersion string `json:"xcode_version"`

	// CompatibleServerTypes: list of compatible server types.
	CompatibleServerTypes []string `json:"compatible_server_types"`
}

OS: os.

type PrivateNetworkAPI

type PrivateNetworkAPI struct {
	// contains filtered or unexported fields
}

Apple silicon - Private Networks API.

func NewPrivateNetworkAPI

func NewPrivateNetworkAPI(client *scw.Client) *PrivateNetworkAPI

NewPrivateNetworkAPI returns a PrivateNetworkAPI object from a Scaleway client.

func (*PrivateNetworkAPI) AddServerPrivateNetwork

AddServerPrivateNetwork: Add an Apple silicon server to a Private Network.

func (*PrivateNetworkAPI) DeleteServerPrivateNetwork

DeleteServerPrivateNetwork: Delete a Private Network.

func (*PrivateNetworkAPI) GetServerPrivateNetwork

GetServerPrivateNetwork:

func (*PrivateNetworkAPI) ListServerPrivateNetworks

ListServerPrivateNetworks: List the Private Networks of an Apple silicon server.

func (*PrivateNetworkAPI) SetServerPrivateNetworks

SetServerPrivateNetworks: Configure multiple Private Networks on an Apple silicon server.

func (*PrivateNetworkAPI) WaitForServerPrivateNetworks

func (s *PrivateNetworkAPI) WaitForServerPrivateNetworks(req *WaitForServerRequest, opts ...scw.RequestOption) ([]*ServerPrivateNetwork, error)

func (*PrivateNetworkAPI) Zones

func (s *PrivateNetworkAPI) Zones() []scw.Zone

type PrivateNetworkAPIAddServerPrivateNetworkRequest

type PrivateNetworkAPIAddServerPrivateNetworkRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	// ServerID: ID of the server.
	ServerID string `json:"-"`

	// PrivateNetworkID: ID of the Private Network.
	PrivateNetworkID string `json:"private_network_id"`

	// IpamIPIDs: iPAM IDs of IPs to attach to the server.
	IpamIPIDs []string `json:"ipam_ip_ids"`
}

PrivateNetworkAPIAddServerPrivateNetworkRequest: private network api add server private network request.

type PrivateNetworkAPIDeleteServerPrivateNetworkRequest

type PrivateNetworkAPIDeleteServerPrivateNetworkRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	// ServerID: ID of the server.
	ServerID string `json:"-"`

	// PrivateNetworkID: ID of the Private Network.
	PrivateNetworkID string `json:"-"`
}

PrivateNetworkAPIDeleteServerPrivateNetworkRequest: private network api delete server private network request.

type PrivateNetworkAPIGetServerPrivateNetworkRequest

type PrivateNetworkAPIGetServerPrivateNetworkRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	ServerID string `json:"-"`

	PrivateNetworkID string `json:"-"`
}

PrivateNetworkAPIGetServerPrivateNetworkRequest: private network api get server private network request.

type PrivateNetworkAPIListServerPrivateNetworksRequest

type PrivateNetworkAPIListServerPrivateNetworksRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	// OrderBy: sort order for the returned Private Networks.
	// Default value: created_at_asc
	OrderBy ListServerPrivateNetworksRequestOrderBy `json:"-"`

	// Page: page number for the returned Private Networks.
	Page *int32 `json:"-"`

	// PageSize: maximum number of Private Networks per page.
	PageSize *uint32 `json:"-"`

	// ServerID: filter Private Networks by server ID.
	ServerID *string `json:"-"`

	// PrivateNetworkID: filter Private Networks by Private Network ID.
	PrivateNetworkID *string `json:"-"`

	// OrganizationID: filter Private Networks by Organization ID.
	OrganizationID *string `json:"-"`

	// ProjectID: filter Private Networks by Project ID.
	ProjectID *string `json:"-"`

	// IpamIPIDs: filter Private Networks by IPAM IP IDs.
	IpamIPIDs []string `json:"-"`
}

PrivateNetworkAPIListServerPrivateNetworksRequest: private network api list server private networks request.

type PrivateNetworkAPISetServerPrivateNetworksRequest

type PrivateNetworkAPISetServerPrivateNetworksRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	// ServerID: ID of the server.
	ServerID string `json:"-"`

	// PerPrivateNetworkIpamIPIDs: object where the keys are the IDs of Private Networks and the values are arrays of IPAM IDs representing the IPs to assign to this Apple silicon server on the Private Network. If the array supplied for a Private Network is empty, the next available IP from the Private Network's CIDR block will automatically be used for attachment.
	PerPrivateNetworkIpamIPIDs map[string]*[]string `json:"per_private_network_ipam_ip_ids"`
}

PrivateNetworkAPISetServerPrivateNetworksRequest: private network api set server private networks request.

type RebootServerRequest

type RebootServerRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	// ServerID: UUID of the server you want to reboot.
	ServerID string `json:"-"`
}

RebootServerRequest: reboot server request.

type ReinstallServerRequest

type ReinstallServerRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	// ServerID: UUID of the server you want to reinstall.
	ServerID string `json:"-"`

	// OsID: reinstall the server with the target OS, when no os_id provided the default OS for the server type is used.
	OsID *string `json:"os_id,omitempty"`
}

ReinstallServerRequest: reinstall server request.

type Server

type Server struct {
	// ID: UUID of the server.
	ID string `json:"id"`

	// Type: type of the server.
	Type string `json:"type"`

	// Name: name of the server.
	Name string `json:"name"`

	// ProjectID: project this server is associated with.
	ProjectID string `json:"project_id"`

	// OrganizationID: organization this server is associated with.
	OrganizationID string `json:"organization_id"`

	// IP: iPv4 address of the server.
	IP net.IP `json:"ip"`

	// VncURL: vnc:// URL to access Apple Remote Desktop.
	VncURL string `json:"vnc_url"`

	// SSHUsername: SSH Username for remote shell.
	SSHUsername string `json:"ssh_username"`

	// SudoPassword: admin password required to execute commands.
	SudoPassword string `json:"sudo_password"`

	// VncPort: vNC port to use for remote desktop connection.
	VncPort uint32 `json:"vnc_port"`

	// Os: initially installed OS, this does not necessarily reflect the current OS version.
	Os *OS `json:"os"`

	// Status: current status of the server.
	// Default value: unknown_status
	Status ServerStatus `json:"status"`

	// CreatedAt: date on which the server was created.
	CreatedAt *time.Time `json:"created_at"`

	// UpdatedAt: date on which the server was last updated.
	UpdatedAt *time.Time `json:"updated_at"`

	// DeletableAt: date from which the server can be deleted.
	DeletableAt *time.Time `json:"deletable_at"`

	// DeletionScheduled: set to true to mark the server for automatic deletion depending on `deletable_at` date. Set to false to cancel an existing deletion schedule. Leave unset otherwise.
	DeletionScheduled bool `json:"deletion_scheduled"`

	// Zone: zone of the server.
	Zone scw.Zone `json:"zone"`

	// Delivered: set to true once the server has completed its provisioning steps and is ready to use. Some OS configurations might require a reinstallation of the server before delivery depending on the available stock. A reinstallation after the initial delivery will not change this flag and can be tracked using the server status.
	Delivered bool `json:"delivered"`

	// VpcStatus: activation status of optional Private Network feature support for this server.
	// Default value: vpc_unknown_status
	VpcStatus ServerPrivateNetworkStatus `json:"vpc_status"`

	// Commitment: commitment scheme applied to this server.
	Commitment *Commitment `json:"commitment"`

	// PublicBandwidthBps: public bandwidth configured for this server. Expressed in bits per second.
	PublicBandwidthBps uint64 `json:"public_bandwidth_bps"`
}

Server: server.

type ServerPrivateNetwork

type ServerPrivateNetwork struct {
	// ID: ID of the Server-to-Private Network mapping.
	ID string `json:"id"`

	// ProjectID: private Network Project ID.
	ProjectID string `json:"project_id"`

	// ServerID: apple silicon server ID.
	ServerID string `json:"server_id"`

	// PrivateNetworkID: private Network ID.
	PrivateNetworkID string `json:"private_network_id"`

	// Vlan: ID of the VLAN associated with the Private Network.
	Vlan *uint32 `json:"vlan"`

	// Status: configuration status of the Private Network.
	// Default value: unknown_status
	Status ServerPrivateNetworkServerStatus `json:"status"`

	// CreatedAt: private Network creation date.
	CreatedAt *time.Time `json:"created_at"`

	// UpdatedAt: date the Private Network was last modified.
	UpdatedAt *time.Time `json:"updated_at"`

	// IpamIPIDs: iPAM IP IDs of the server, if it has any.
	IpamIPIDs []string `json:"ipam_ip_ids"`
}

ServerPrivateNetwork: server private network.

type ServerPrivateNetworkServerStatus

type ServerPrivateNetworkServerStatus string

func (ServerPrivateNetworkServerStatus) MarshalJSON

func (enum ServerPrivateNetworkServerStatus) MarshalJSON() ([]byte, error)

func (ServerPrivateNetworkServerStatus) String

func (*ServerPrivateNetworkServerStatus) UnmarshalJSON

func (enum *ServerPrivateNetworkServerStatus) UnmarshalJSON(data []byte) error

func (ServerPrivateNetworkServerStatus) Values

type ServerPrivateNetworkStatus

type ServerPrivateNetworkStatus string

func (ServerPrivateNetworkStatus) MarshalJSON

func (enum ServerPrivateNetworkStatus) MarshalJSON() ([]byte, error)

func (ServerPrivateNetworkStatus) String

func (enum ServerPrivateNetworkStatus) String() string

func (*ServerPrivateNetworkStatus) UnmarshalJSON

func (enum *ServerPrivateNetworkStatus) UnmarshalJSON(data []byte) error

func (ServerPrivateNetworkStatus) Values

type ServerStatus

type ServerStatus string

func (ServerStatus) MarshalJSON

func (enum ServerStatus) MarshalJSON() ([]byte, error)

func (ServerStatus) String

func (enum ServerStatus) String() string

func (*ServerStatus) UnmarshalJSON

func (enum *ServerStatus) UnmarshalJSON(data []byte) error

func (ServerStatus) Values

func (enum ServerStatus) Values() []ServerStatus

type ServerType

type ServerType struct {
	// CPU: CPU description.
	CPU *ServerTypeCPU `json:"cpu"`

	// Disk: size of the local disk of the server.
	Disk *ServerTypeDisk `json:"disk"`

	// Name: name of the type.
	Name string `json:"name"`

	// Memory: size of memory available.
	Memory *ServerTypeMemory `json:"memory"`

	// Stock: current stock.
	// Default value: unknown_stock
	Stock ServerTypeStock `json:"stock"`

	// MinimumLeaseDuration: minimum duration of the lease in seconds (example. 3.4s).
	MinimumLeaseDuration *scw.Duration `json:"minimum_lease_duration"`

	// Gpu: gPU description.
	Gpu *ServerTypeGPU `json:"gpu"`

	// Network: network description.
	Network *ServerTypeNetwork `json:"network"`

	// DefaultOs: the default OS for this server type.
	DefaultOs *OS `json:"default_os"`
}

ServerType: server type.

type ServerTypeCPU

type ServerTypeCPU struct {
	Name string `json:"name"`

	CoreCount uint32 `json:"core_count"`

	Frequency uint64 `json:"frequency"`
}

ServerTypeCPU: server type cpu.

type ServerTypeDisk

type ServerTypeDisk struct {
	Capacity scw.Size `json:"capacity"`

	Type string `json:"type"`
}

ServerTypeDisk: server type disk.

type ServerTypeGPU

type ServerTypeGPU struct {
	Count uint64 `json:"count"`
}

ServerTypeGPU: server type gpu.

type ServerTypeMemory

type ServerTypeMemory struct {
	Capacity scw.Size `json:"capacity"`

	Type string `json:"type"`
}

ServerTypeMemory: server type memory.

type ServerTypeNetwork

type ServerTypeNetwork struct {
	PublicBandwidthBps uint64 `json:"public_bandwidth_bps"`

	SupportedBandwidth []uint64 `json:"supported_bandwidth"`
}

ServerTypeNetwork: server type network.

type ServerTypeStock

type ServerTypeStock string

func (ServerTypeStock) MarshalJSON

func (enum ServerTypeStock) MarshalJSON() ([]byte, error)

func (ServerTypeStock) String

func (enum ServerTypeStock) String() string

func (*ServerTypeStock) UnmarshalJSON

func (enum *ServerTypeStock) UnmarshalJSON(data []byte) error

func (ServerTypeStock) Values

func (enum ServerTypeStock) Values() []ServerTypeStock

type SetServerPrivateNetworksResponse

type SetServerPrivateNetworksResponse struct {
	ServerPrivateNetworks []*ServerPrivateNetwork `json:"server_private_networks"`
}

SetServerPrivateNetworksResponse: set server private networks response.

type StartConnectivityDiagnosticRequest

type StartConnectivityDiagnosticRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	ServerID string `json:"server_id"`
}

StartConnectivityDiagnosticRequest: start connectivity diagnostic request.

type StartConnectivityDiagnosticResponse

type StartConnectivityDiagnosticResponse struct {
	DiagnosticID string `json:"diagnostic_id"`
}

StartConnectivityDiagnosticResponse: start connectivity diagnostic response.

type UpdateServerRequest

type UpdateServerRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	// ServerID: UUID of the server you want to update.
	ServerID string `json:"-"`

	// Name: updated name for your server.
	Name *string `json:"name,omitempty"`

	// ScheduleDeletion: specify whether the server should be flagged for automatic deletion.
	ScheduleDeletion *bool `json:"schedule_deletion,omitempty"`

	// EnableVpc: activate or deactivate Private Network support for this server.
	EnableVpc *bool `json:"enable_vpc,omitempty"`

	// CommitmentType: change commitment. Use 'none' to automatically cancel a renewing commitment.
	CommitmentType *CommitmentTypeValue `json:"commitment_type,omitempty"`

	// 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.
	PublicBandwidthBps *uint64 `json:"public_bandwidth_bps,omitempty"`
}

UpdateServerRequest: update server request.

type WaitForServerRequest

type WaitForServerRequest struct {
	ServerID      string
	Zone          scw.Zone
	Timeout       *time.Duration
	RetryInterval *time.Duration
}

WaitForInstanceRequest is used by WaitForServer method.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL