baremetal

package
v1.0.0-beta.26 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 14 Imported by: 15

Documentation

Overview

Package baremetal provides methods and message types of the baremetal v1 API.

Index

Constants

View Source
const (
	IPReverseStatusUnknown = IPReverseStatus("unknown")
	IPReverseStatusPending = IPReverseStatus("pending")
	IPReverseStatusActive  = IPReverseStatus("active")
	IPReverseStatusError   = IPReverseStatus("error")
)
View Source
const (
	IPVersionIPv4 = IPVersion("IPv4")
	IPVersionIPv6 = IPVersion("IPv6")
)
View Source
const (
	ListServerEventsRequestOrderByCreatedAtAsc  = ListServerEventsRequestOrderBy("created_at_asc")
	ListServerEventsRequestOrderByCreatedAtDesc = ListServerEventsRequestOrderBy("created_at_desc")
)
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 (
	ListSettingsRequestOrderByCreatedAtAsc  = ListSettingsRequestOrderBy("created_at_asc")
	ListSettingsRequestOrderByCreatedAtDesc = ListSettingsRequestOrderBy("created_at_desc")
)
View Source
const (
	OfferStockEmpty     = OfferStock("empty")
	OfferStockLow       = OfferStock("low")
	OfferStockAvailable = OfferStock("available")
)
View Source
const (
	OfferSubscriptionPeriodUnknownSubscriptionPeriod = OfferSubscriptionPeriod("unknown_subscription_period")
	OfferSubscriptionPeriodHourly                    = OfferSubscriptionPeriod("hourly")
	OfferSubscriptionPeriodMonthly                   = OfferSubscriptionPeriod("monthly")
)
View Source
const (
	ServerBootTypeUnknownBootType = ServerBootType("unknown_boot_type")
	ServerBootTypeNormal          = ServerBootType("normal")
	ServerBootTypeRescue          = ServerBootType("rescue")
)
View Source
const (
	ServerInstallStatusUnknown    = ServerInstallStatus("unknown")
	ServerInstallStatusToInstall  = ServerInstallStatus("to_install")
	ServerInstallStatusInstalling = ServerInstallStatus("installing")
	ServerInstallStatusCompleted  = ServerInstallStatus("completed")
	ServerInstallStatusError      = ServerInstallStatus("error")
)
View Source
const (
	ServerOptionOptionStatusOptionStatusUnknown   = ServerOptionOptionStatus("option_status_unknown")
	ServerOptionOptionStatusOptionStatusEnable    = ServerOptionOptionStatus("option_status_enable")
	ServerOptionOptionStatusOptionStatusEnabling  = ServerOptionOptionStatus("option_status_enabling")
	ServerOptionOptionStatusOptionStatusDisabling = ServerOptionOptionStatus("option_status_disabling")
	ServerOptionOptionStatusOptionStatusError     = ServerOptionOptionStatus("option_status_error")
)
View Source
const (
	ServerPingStatusPingStatusUnknown = ServerPingStatus("ping_status_unknown")
	ServerPingStatusPingStatusUp      = ServerPingStatus("ping_status_up")
	ServerPingStatusPingStatusDown    = ServerPingStatus("ping_status_down")
)
View Source
const (
	ServerPrivateNetworkStatusUnknown   = ServerPrivateNetworkStatus("unknown")
	ServerPrivateNetworkStatusAttaching = ServerPrivateNetworkStatus("attaching")
	ServerPrivateNetworkStatusAttached  = ServerPrivateNetworkStatus("attached")
	ServerPrivateNetworkStatusError     = ServerPrivateNetworkStatus("error")
	ServerPrivateNetworkStatusDetaching = ServerPrivateNetworkStatus("detaching")
	ServerPrivateNetworkStatusLocked    = ServerPrivateNetworkStatus("locked")
)
View Source
const (
	ServerStatusUnknown    = ServerStatus("unknown")
	ServerStatusDelivering = ServerStatus("delivering")
	ServerStatusReady      = ServerStatus("ready")
	ServerStatusStopping   = ServerStatus("stopping")
	ServerStatusStopped    = ServerStatus("stopped")
	ServerStatusStarting   = ServerStatus("starting")
	ServerStatusError      = ServerStatus("error")
	ServerStatusDeleting   = ServerStatus("deleting")
	ServerStatusLocked     = ServerStatus("locked")
	ServerStatusOutOfStock = ServerStatus("out_of_stock")
	ServerStatusOrdered    = ServerStatus("ordered")
	ServerStatusResetting  = ServerStatus("resetting")
)
View Source
const (
	SettingTypeUnknown = SettingType("unknown")
	SettingTypeSMTP    = SettingType("smtp")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

This API allows to manage your Elastic Metal server.

func NewAPI

func NewAPI(client *scw.Client) *API

NewAPI returns a API object from a Scaleway client.

func (*API) AddOptionServer

func (s *API) AddOptionServer(req *AddOptionServerRequest, opts ...scw.RequestOption) (*Server, error)

AddOptionServer: Add an option, such as Private Networks, to a specific server.

func (*API) CreateServer

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

CreateServer: Create a new Elastic Metal server. Once the server is created, proceed with the [installation of an OS](#post-3e949e).

func (*API) DeleteOptionServer

func (s *API) DeleteOptionServer(req *DeleteOptionServerRequest, opts ...scw.RequestOption) (*Server, error)

DeleteOptionServer: Delete an option from a specific server.

func (*API) DeleteServer

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

DeleteServer: Delete the server associated with the ID.

func (*API) GetBMCAccess

func (s *API) GetBMCAccess(req *GetBMCAccessRequest, opts ...scw.RequestOption) (*BMCAccess, error)

GetBMCAccess: Get the BMC (Baseboard Management Controller) access associated with the ID, including the URL and login information needed to connect.

func (*API) GetOS

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

GetOS: Return the specific OS for the ID.

func (*API) GetOffer

func (s *API) GetOffer(req *GetOfferRequest, opts ...scw.RequestOption) (*Offer, error)

GetOffer: Get details of an offer identified by its offer ID.

func (*API) GetOfferByName

func (s *API) GetOfferByName(req *GetOfferByNameRequest) (*Offer, error)

GetOfferByName returns an offer from its commercial name

func (*API) GetOption

func (s *API) GetOption(req *GetOptionRequest, opts ...scw.RequestOption) (*Option, error)

GetOption: Return specific option for the ID.

func (*API) GetServer

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

GetServer: Get full details of an existing Elastic Metal server associated with the ID.

func (*API) GetServerMetrics

func (s *API) GetServerMetrics(req *GetServerMetricsRequest, opts ...scw.RequestOption) (*GetServerMetricsResponse, error)

GetServerMetrics: Get the ping status of the server associated with the ID.

func (*API) GetServerOffer

func (s *API) GetServerOffer(server *Server) (*Offer, error)

GetServerOffer returns the offer of a baremetal server

func (*API) InstallServer

func (s *API) InstallServer(req *InstallServerRequest, opts ...scw.RequestOption) (*Server, error)

InstallServer: Install an Operating System (OS) on the Elastic Metal server with a specific ID.

func (*API) ListOS

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

ListOS: List all OSes that are available for installation on Elastic Metal servers.

func (*API) ListOffers

func (s *API) ListOffers(req *ListOffersRequest, opts ...scw.RequestOption) (*ListOffersResponse, error)

ListOffers: List all available Elastic Metal server configurations.

func (*API) ListOptions

func (s *API) ListOptions(req *ListOptionsRequest, opts ...scw.RequestOption) (*ListOptionsResponse, error)

ListOptions: List all options matching with filters.

func (*API) ListServerEvents

func (s *API) ListServerEvents(req *ListServerEventsRequest, opts ...scw.RequestOption) (*ListServerEventsResponse, error)

ListServerEvents: List event (i.e. start/stop/reboot) associated to the server ID.

func (*API) ListServers

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

ListServers: List Elastic Metal servers for a specific Organization.

func (*API) ListSettings

func (s *API) ListSettings(req *ListSettingsRequest, opts ...scw.RequestOption) (*ListSettingsResponse, error)

ListSettings: Return all settings for a Project ID.

func (*API) RebootServer

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

RebootServer: Reboot the Elastic Metal server associated with the ID, use the `boot_type` `rescue` to reboot the server in rescue mode.

func (*API) StartBMCAccess

func (s *API) StartBMCAccess(req *StartBMCAccessRequest, opts ...scw.RequestOption) (*BMCAccess, error)

StartBMCAccess: Start BMC (Baseboard Management Controller) access associated with the ID. The BMC (Baseboard Management Controller) access is available one hour after the installation of the server. You need first to create an option Remote Access. You will find the ID and the price with a call to listOffers (https://developers.scaleway.com/en/products/baremetal/api/#get-78db92). Then add the option https://developers.scaleway.com/en/products/baremetal/api/#post-b14abd. After adding the BMC option, you need to Get Remote Access to get the login/password https://developers.scaleway.com/en/products/baremetal/api/#get-cefc0f. Do not forget to delete the Option after use.

func (*API) StartServer

func (s *API) StartServer(req *StartServerRequest, opts ...scw.RequestOption) (*Server, error)

StartServer: Start the server associated with the ID.

func (*API) StopBMCAccess

func (s *API) StopBMCAccess(req *StopBMCAccessRequest, opts ...scw.RequestOption) error

StopBMCAccess: Stop BMC (Baseboard Management Controller) access associated with the ID.

func (*API) StopServer

func (s *API) StopServer(req *StopServerRequest, opts ...scw.RequestOption) (*Server, error)

StopServer: Stop the server associated with the ID. The server remains allocated to your account and all data remains on the local storage of the server.

func (*API) UpdateIP

func (s *API) UpdateIP(req *UpdateIPRequest, opts ...scw.RequestOption) (*IP, error)

UpdateIP: Configure the IP address associated with the server ID and IP ID. You can use this method to set a reverse DNS for an IP address.

func (*API) UpdateServer

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

UpdateServer: Update the server associated with the ID. You can update parameters such as the server's name, tags and description. Any parameters left null in the request body are not updated.

func (*API) UpdateSetting

func (s *API) UpdateSetting(req *UpdateSettingRequest, opts ...scw.RequestOption) (*Setting, error)

UpdateSetting: Update a setting for a Project ID (enable or disable).

func (*API) WaitForServer

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

WaitForServer wait for the server to be in a "terminal state" before returning. This function can be used to wait for a server to be created.

func (*API) WaitForServerInstall

func (s *API) WaitForServerInstall(req *WaitForServerInstallRequest, opts ...scw.RequestOption) (*Server, error)

WaitForServerInstall wait for the server install to be in a "terminal state" before returning. This function can be used to wait for a server to be installed.

func (*API) WaitForServerOptions

func (s *API) WaitForServerOptions(req *WaitForServerOptionsRequest, opts ...scw.RequestOption) (*Server, error)

WaitForServerOptions wait for all server options to be in a "terminal state" before returning. This function can be used to wait for all server options to be set.

func (*API) Zones

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

type AddOptionServerRequest

type AddOptionServerRequest 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:"-"`

	// OptionID: ID of the option to add.
	OptionID string `json:"-"`

	// ExpiresAt: auto expire the option after this date.
	ExpiresAt *time.Time `json:"expires_at,omitempty"`
}

AddOptionServerRequest: add option server request.

type BMCAccess

type BMCAccess struct {
	// URL: URL to access to the server console.
	URL string `json:"url"`

	// Login: the login to use for the BMC (Baseboard Management Controller) access authentification.
	Login string `json:"login"`

	// Password: the password to use for the BMC (Baseboard Management Controller) access authentification.
	Password string `json:"password"`

	// ExpiresAt: the date after which the BMC (Baseboard Management Controller) access will be closed.
	ExpiresAt *time.Time `json:"expires_at"`
}

BMCAccess: bmc access.

type CPU

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

	// CoreCount: number of CPU cores.
	CoreCount uint32 `json:"core_count"`

	// ThreadCount: number CPU threads.
	ThreadCount uint32 `json:"thread_count"`

	// Frequency: frequency of the CPU in MHz.
	Frequency uint32 `json:"frequency"`

	// Benchmark: benchmark of the CPU.
	Benchmark string `json:"benchmark"`
}

CPU: cpu.

type CreateServerRequest

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

	// OfferID: offer ID of the new server.
	OfferID string `json:"offer_id"`

	// Deprecated: OrganizationID: organization ID with which the server will be created.
	// Precisely one of ProjectID, OrganizationID must be set.
	OrganizationID *string `json:"organization_id,omitempty"`

	// ProjectID: project ID with which the server will be created.
	// Precisely one of ProjectID, OrganizationID must be set.
	ProjectID *string `json:"project_id,omitempty"`

	// Name: name of the server (≠hostname).
	Name string `json:"name"`

	// Description: description associated with the server, max 255 characters.
	Description string `json:"description"`

	// Tags: tags to associate to the server.
	Tags []string `json:"tags"`

	// Install: object describing the configuration details of the OS installation on the server.
	Install *CreateServerRequestInstall `json:"install,omitempty"`

	// OptionIDs: iDs of options to enable on server.
	OptionIDs []string `json:"option_ids"`
}

CreateServerRequest: create server request.

type CreateServerRequestInstall

type CreateServerRequestInstall struct {
	// OsID: ID of the OS to installation on the server.
	OsID string `json:"os_id"`

	// Hostname: hostname of the server.
	Hostname string `json:"hostname"`

	// SSHKeyIDs: SSH key IDs authorized on the server.
	SSHKeyIDs []string `json:"ssh_key_ids"`

	// User: user for the installation.
	User *string `json:"user"`

	// Password: password for the installation.
	Password *string `json:"password"`

	// ServiceUser: regular user that runs the service to be installed on the server.
	ServiceUser *string `json:"service_user"`

	// ServicePassword: password used for the service to install.
	ServicePassword *string `json:"service_password"`
}

CreateServerRequestInstall: create server request install.

type DeleteOptionServerRequest

type DeleteOptionServerRequest 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:"-"`

	// OptionID: ID of the option to delete.
	OptionID string `json:"-"`
}

DeleteOptionServerRequest: delete option 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: ID of the server to delete.
	ServerID string `json:"-"`
}

DeleteServerRequest: delete server request.

type Disk

type Disk struct {
	// Capacity: capacity of the disk in bytes.
	Capacity scw.Size `json:"capacity"`

	// Type: type of the disk.
	Type string `json:"type"`
}

Disk: disk.

type GetBMCAccessRequest

type GetBMCAccessRequest 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:"-"`
}

GetBMCAccessRequest: get bmc access 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: ID of the OS.
	OsID string `json:"-"`
}

GetOSRequest: get os request.

type GetOfferByNameRequest

type GetOfferByNameRequest struct {
	OfferName string
	Zone      scw.Zone
}

type GetOfferRequest

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

	// OfferID: ID of the researched Offer.
	OfferID string `json:"-"`
}

GetOfferRequest: get offer request.

type GetOptionRequest

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

	// OptionID: ID of the option.
	OptionID string `json:"-"`
}

GetOptionRequest: get option request.

type GetServerMetricsRequest

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

	// ServerID: server ID to get the metrics.
	ServerID string `json:"-"`
}

GetServerMetricsRequest: get server metrics request.

type GetServerMetricsResponse

type GetServerMetricsResponse struct {
	// Pings: timeseries object representing pings on the server.
	Pings *scw.TimeSeries `json:"pings"`
}

GetServerMetricsResponse: get server metrics response.

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: ID of the server.
	ServerID string `json:"-"`
}

GetServerRequest: get server request.

type IP

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

	// Address: address of the IP.
	Address net.IP `json:"address"`

	// Reverse: reverse IP value.
	Reverse string `json:"reverse"`

	// Version: version of IP (v4 or v6).
	// Default value: IPv4
	Version IPVersion `json:"version"`

	// ReverseStatus: status of the reverse.
	// Default value: unknown
	ReverseStatus IPReverseStatus `json:"reverse_status"`

	// ReverseStatusMessage: a message related to the reverse status, e.g. in case of an error.
	ReverseStatusMessage string `json:"reverse_status_message"`
}

IP: ip.

type IPReverseStatus

type IPReverseStatus string

func (IPReverseStatus) MarshalJSON

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

func (IPReverseStatus) String

func (enum IPReverseStatus) String() string

func (*IPReverseStatus) UnmarshalJSON

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

type IPVersion

type IPVersion string

func (IPVersion) MarshalJSON

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

func (IPVersion) String

func (enum IPVersion) String() string

func (*IPVersion) UnmarshalJSON

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

type InstallServerRequest

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

	// ServerID: server ID to install.
	ServerID string `json:"-"`

	// OsID: ID of the OS to installation on the server.
	OsID string `json:"os_id"`

	// Hostname: hostname of the server.
	Hostname string `json:"hostname"`

	// SSHKeyIDs: SSH key IDs authorized on the server.
	SSHKeyIDs []string `json:"ssh_key_ids"`

	// User: user used for the installation.
	User *string `json:"user,omitempty"`

	// Password: password used for the installation.
	Password *string `json:"password,omitempty"`

	// ServiceUser: user used for the service to install.
	ServiceUser *string `json:"service_user,omitempty"`

	// ServicePassword: password used for the service to install.
	ServicePassword *string `json:"service_password,omitempty"`
}

InstallServerRequest: install server 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: page number.
	Page *int32 `json:"-"`

	// PageSize: number of OS per page.
	PageSize *uint32 `json:"-"`

	// OfferID: offer IDs to filter OSes for.
	OfferID *string `json:"-"`
}

ListOSRequest: list os request.

type ListOSResponse

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

	// Os: oS that match filters.
	Os []*OS `json:"os"`
}

ListOSResponse: list os response.

func (*ListOSResponse) UnsafeAppend

func (r *ListOSResponse) UnsafeAppend(res interface{}) (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 ListOffersRequest

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

	// Page: page number.
	Page *int32 `json:"-"`

	// PageSize: number of offers per page.
	PageSize *uint32 `json:"-"`

	// SubscriptionPeriod: subscription period type to filter offers by.
	// Default value: unknown_subscription_period
	SubscriptionPeriod OfferSubscriptionPeriod `json:"-"`
}

ListOffersRequest: list offers request.

type ListOffersResponse

type ListOffersResponse struct {
	// TotalCount: total count of matching offers.
	TotalCount uint32 `json:"total_count"`

	// Offers: offers that match filters.
	Offers []*Offer `json:"offers"`
}

ListOffersResponse: list offers response.

func (*ListOffersResponse) UnsafeAppend

func (r *ListOffersResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListOffersResponse) UnsafeGetTotalCount

func (r *ListOffersResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type ListOptionsRequest

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

	// Page: page number.
	Page *int32 `json:"-"`

	// PageSize: number of options per page.
	PageSize *uint32 `json:"-"`

	// OfferID: offer ID to filter options for.
	OfferID *string `json:"-"`

	// Name: name to filter options for.
	Name *string `json:"-"`
}

ListOptionsRequest: list options request.

type ListOptionsResponse

type ListOptionsResponse struct {
	// TotalCount: total count of matching options.
	TotalCount uint32 `json:"total_count"`

	// Options: options that match filters.
	Options []*Option `json:"options"`
}

ListOptionsResponse: list options response.

func (*ListOptionsResponse) UnsafeAppend

func (r *ListOptionsResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListOptionsResponse) UnsafeGetTotalCount

func (r *ListOptionsResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type ListServerEventsRequest

type ListServerEventsRequest 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 events searched.
	ServerID string `json:"-"`

	// Page: page number.
	Page *int32 `json:"-"`

	// PageSize: number of server events per page.
	PageSize *uint32 `json:"-"`

	// OrderBy: order of the server events.
	// Default value: created_at_asc
	OrderBy ListServerEventsRequestOrderBy `json:"-"`
}

ListServerEventsRequest: list server events request.

type ListServerEventsRequestOrderBy

type ListServerEventsRequestOrderBy string

func (ListServerEventsRequestOrderBy) MarshalJSON

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

func (ListServerEventsRequestOrderBy) String

func (enum ListServerEventsRequestOrderBy) String() string

func (*ListServerEventsRequestOrderBy) UnmarshalJSON

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

type ListServerEventsResponse

type ListServerEventsResponse struct {
	// TotalCount: total count of matching events.
	TotalCount uint32 `json:"total_count"`

	// Events: server events that match filters.
	Events []*ServerEvent `json:"events"`
}

ListServerEventsResponse: list server events response.

func (*ListServerEventsResponse) UnsafeAppend

func (r *ListServerEventsResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListServerEventsResponse) UnsafeGetTotalCount

func (r *ListServerEventsResponse) 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

type ListServerPrivateNetworksResponse

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

	TotalCount uint32 `json:"total_count"`
}

ListServerPrivateNetworksResponse: list server private networks response.

func (*ListServerPrivateNetworksResponse) UnsafeAppend

func (r *ListServerPrivateNetworksResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListServerPrivateNetworksResponse) UnsafeGetTotalCount

func (r *ListServerPrivateNetworksResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type ListServersRequest

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

	// Page: page number.
	Page *int32 `json:"-"`

	// PageSize: number of servers per page.
	PageSize *uint32 `json:"-"`

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

	// Tags: tags to filter for.
	Tags []string `json:"-"`

	// Status: status to filter for.
	Status []string `json:"-"`

	// Name: names to filter for.
	Name *string `json:"-"`

	// OrganizationID: organization ID to filter for.
	OrganizationID *string `json:"-"`

	// ProjectID: project ID to filter for.
	ProjectID *string `json:"-"`

	// OptionID: option ID to filter for.
	OptionID *string `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

type ListServersResponse

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

	// Servers: array of Elastic Metal server objects matching the filters in the request.
	Servers []*Server `json:"servers"`
}

ListServersResponse: list servers response.

func (*ListServersResponse) UnsafeAppend

func (r *ListServersResponse) UnsafeAppend(res interface{}) (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 ListSettingsRequest

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

	// Page: page number.
	Page *int32 `json:"-"`

	// PageSize: set the maximum list size.
	PageSize *uint32 `json:"-"`

	// OrderBy: sort order for items in the response.
	// Default value: created_at_asc
	OrderBy ListSettingsRequestOrderBy `json:"-"`

	// ProjectID: ID of the Project.
	ProjectID *string `json:"-"`
}

ListSettingsRequest: list settings request.

type ListSettingsRequestOrderBy

type ListSettingsRequestOrderBy string

func (ListSettingsRequestOrderBy) MarshalJSON

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

func (ListSettingsRequestOrderBy) String

func (enum ListSettingsRequestOrderBy) String() string

func (*ListSettingsRequestOrderBy) UnmarshalJSON

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

type ListSettingsResponse

type ListSettingsResponse struct {
	// TotalCount: total count of matching settings.
	TotalCount uint32 `json:"total_count"`

	// Settings: settings that match filters.
	Settings []*Setting `json:"settings"`
}

ListSettingsResponse: list settings response.

func (*ListSettingsResponse) UnsafeAppend

func (r *ListSettingsResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListSettingsResponse) UnsafeGetTotalCount

func (r *ListSettingsResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type Memory

type Memory struct {
	// Capacity: capacity of the memory in bytes.
	Capacity scw.Size `json:"capacity"`

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

	// Frequency: frequency of the memory in MHz.
	Frequency uint32 `json:"frequency"`

	// IsEcc: true if the memory is an error-correcting code memory.
	IsEcc bool `json:"is_ecc"`
}

Memory: memory.

type OS

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

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

	// Version: version of the OS.
	Version string `json:"version"`

	// LogoURL: URL of this OS's logo.
	LogoURL string `json:"logo_url"`

	// SSH: object defining the SSH requirements to install the OS.
	SSH *OSOSField `json:"ssh"`

	// User: object defining the username requirements to install the OS.
	User *OSOSField `json:"user"`

	// Password: object defining the password requirements to install the OS.
	Password *OSOSField `json:"password"`

	// ServiceUser: object defining the username requirements to install the service.
	ServiceUser *OSOSField `json:"service_user"`

	// ServicePassword: object defining the password requirements to install the service.
	ServicePassword *OSOSField `json:"service_password"`

	// Enabled: defines if the operating system is enabled or not.
	Enabled bool `json:"enabled"`

	// LicenseRequired: license required (check server options for pricing details).
	LicenseRequired bool `json:"license_required"`

	// Allowed: defines if a specific Organization is allowed to install this OS type.
	Allowed bool `json:"allowed"`
}

OS: os.

type OSOSField

type OSOSField struct {
	Editable bool `json:"editable"`

	Required bool `json:"required"`

	DefaultValue *string `json:"default_value"`
}

OSOSField: osos field.

type Offer

type Offer struct {
	// ID: ID of the offer.
	ID string `json:"id"`

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

	// Stock: stock level.
	// Default value: empty
	Stock OfferStock `json:"stock"`

	// Bandwidth: public bandwidth available (in bits/s) with the offer.
	Bandwidth uint64 `json:"bandwidth"`

	// CommercialRange: commercial range of the offer.
	CommercialRange string `json:"commercial_range"`

	// PricePerHour: price of the offer for the next 60 minutes (a server order at 11h32 will be payed until 12h32).
	PricePerHour *scw.Money `json:"price_per_hour"`

	// PricePerMonth: monthly price of the offer, if subscribing on a monthly basis.
	PricePerMonth *scw.Money `json:"price_per_month"`

	// Disks: disks specifications of the offer.
	Disks []*Disk `json:"disks"`

	// Enable: defines whether the offer is currently available.
	Enable bool `json:"enable"`

	// CPUs: CPU specifications of the offer.
	CPUs []*CPU `json:"cpus"`

	// Memories: memory specifications of the offer.
	Memories []*Memory `json:"memories"`

	// QuotaName: name of the quota associated to the offer.
	QuotaName string `json:"quota_name"`

	// PersistentMemories: persistent memory specifications of the offer.
	PersistentMemories []*PersistentMemory `json:"persistent_memories"`

	// RaidControllers: raid controller specifications of the offer.
	RaidControllers []*RaidController `json:"raid_controllers"`

	// IncompatibleOsIDs: array of OS images IDs incompatible with the server.
	IncompatibleOsIDs []string `json:"incompatible_os_ids"`

	// SubscriptionPeriod: period of subscription for the offer.
	// Default value: unknown_subscription_period
	SubscriptionPeriod OfferSubscriptionPeriod `json:"subscription_period"`

	// OperationPath: operation path of the service.
	OperationPath string `json:"operation_path"`

	// Fee: one time fee invoiced by Scaleway for the setup and activation of the server.
	Fee *scw.Money `json:"fee"`

	// Options: available options for customization of the server.
	Options []*OfferOptionOffer `json:"options"`

	// PrivateBandwidth: private bandwidth available in bits/s with the offer.
	PrivateBandwidth uint64 `json:"private_bandwidth"`

	// SharedBandwidth: defines whether the offer's bandwidth is shared or not.
	SharedBandwidth bool `json:"shared_bandwidth"`

	// Tags: array of tags attached to the offer.
	Tags []string `json:"tags"`
}

Offer: offer.

type OfferOptionOffer

type OfferOptionOffer struct {
	// ID: ID of the option.
	ID string `json:"id"`

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

	// Enabled: if true the option is enabled and included by default in the offer
	// If false the option is available for the offer but not included by default.
	Enabled bool `json:"enabled"`

	// SubscriptionPeriod: period of subscription for the offer.
	// Default value: unknown_subscription_period
	SubscriptionPeriod OfferSubscriptionPeriod `json:"subscription_period"`

	// Price: price of the option.
	Price *scw.Money `json:"price"`

	// Manageable: boolean to know if option could be managed.
	Manageable bool `json:"manageable"`

	// OsID: ID of the OS linked to the option.
	OsID *string `json:"os_id"`
}

OfferOptionOffer: offer option offer.

type OfferStock

type OfferStock string

func (OfferStock) MarshalJSON

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

func (OfferStock) String

func (enum OfferStock) String() string

func (*OfferStock) UnmarshalJSON

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

type OfferSubscriptionPeriod

type OfferSubscriptionPeriod string

func (OfferSubscriptionPeriod) MarshalJSON

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

func (OfferSubscriptionPeriod) String

func (enum OfferSubscriptionPeriod) String() string

func (*OfferSubscriptionPeriod) UnmarshalJSON

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

type Option

type Option struct {
	// ID: ID of the option.
	ID string `json:"id"`

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

	// Manageable: defines whether the option is manageable (could be added or removed).
	Manageable bool `json:"manageable"`
}

Option: option.

type PersistentMemory

type PersistentMemory struct {
	// Capacity: capacity of the memory in bytes.
	Capacity scw.Size `json:"capacity"`

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

	// Frequency: frequency of the memory in MHz.
	Frequency uint32 `json:"frequency"`
}

PersistentMemory: persistent memory.

type PrivateNetworkAPI

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

Elastic Metal Private Network API.

func NewPrivateNetworkAPI

func NewPrivateNetworkAPI(client *scw.Client) *PrivateNetworkAPI

NewPrivateNetworkAPI returns a PrivateNetworkAPI object from a Scaleway client.

func (*PrivateNetworkAPI) AddServerPrivateNetwork

AddServerPrivateNetwork: Add a server to a Private Network.

func (*PrivateNetworkAPI) DeleteServerPrivateNetwork

DeleteServerPrivateNetwork: Delete a Private Network.

func (*PrivateNetworkAPI) ListServerPrivateNetworks

ListServerPrivateNetworks: List the Private Networks of a server.

func (*PrivateNetworkAPI) SetServerPrivateNetworks

SetServerPrivateNetworks: Set multiple Private Networks on a server.

func (*PrivateNetworkAPI) WaitForServerPrivateNetworks

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

WaitForServerPrivateNetworks wait for all server private networks to be in a "terminal state" before returning. This function can be used to wait for all server private networks to be set.

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: the ID of the server.
	ServerID string `json:"-"`

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

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: the ID of the server.
	ServerID string `json:"-"`

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

PrivateNetworkAPIDeleteServerPrivateNetworkRequest: private network api delete 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: the sort order for the returned Private Networks.
	// Default value: created_at_asc
	OrderBy ListServerPrivateNetworksRequestOrderBy `json:"-"`

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

	// PageSize: the 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:"-"`
}

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: the ID of the server.
	ServerID string `json:"-"`

	// PrivateNetworkIDs: the IDs of the Private Networks.
	PrivateNetworkIDs []string `json:"private_network_ids"`
}

PrivateNetworkAPISetServerPrivateNetworksRequest: private network api set server private networks request.

type RaidController

type RaidController struct {
	Model string `json:"model"`

	RaidLevel []string `json:"raid_level"`
}

RaidController: raid controller.

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: ID of the server to reboot.
	ServerID string `json:"-"`

	// BootType: the type of boot.
	// Default value: unknown_boot_type
	BootType ServerBootType `json:"boot_type"`
}

RebootServerRequest: reboot server request.

type Server

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

	// OrganizationID: organization ID the server is attached to.
	OrganizationID string `json:"organization_id"`

	// ProjectID: project ID the server is attached to.
	ProjectID string `json:"project_id"`

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

	// Description: description of the server.
	Description string `json:"description"`

	// UpdatedAt: last modification date of the server.
	UpdatedAt *time.Time `json:"updated_at"`

	// CreatedAt: creation date of the server.
	CreatedAt *time.Time `json:"created_at"`

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

	// OfferID: offer ID of the server.
	OfferID string `json:"offer_id"`

	// OfferName: offer name of the server.
	OfferName string `json:"offer_name"`

	// Tags: array of custom tags attached to the server.
	Tags []string `json:"tags"`

	// IPs: array of IPs attached to the server.
	IPs []*IP `json:"ips"`

	// Domain: domain of the server.
	Domain string `json:"domain"`

	// BootType: boot type of the server.
	// Default value: unknown_boot_type
	BootType ServerBootType `json:"boot_type"`

	// Zone: zone in which is the server located.
	Zone scw.Zone `json:"zone"`

	// Install: configuration of the installation.
	Install *ServerInstall `json:"install"`

	// PingStatus: status of server ping.
	// Default value: ping_status_unknown
	PingStatus ServerPingStatus `json:"ping_status"`

	// Options: options enabled on the server.
	Options []*ServerOption `json:"options"`

	// RescueServer: configuration of rescue boot.
	RescueServer *ServerRescueServer `json:"rescue_server"`
}

Server: server.

type ServerBootType

type ServerBootType string

func (ServerBootType) MarshalJSON

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

func (ServerBootType) String

func (enum ServerBootType) String() string

func (*ServerBootType) UnmarshalJSON

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

type ServerEvent

type ServerEvent struct {
	// ID: ID of the server to which the action will be applied.
	ID string `json:"id"`

	// Action: the action that will be applied to the server.
	Action string `json:"action"`

	// UpdatedAt: date of last modification of the action.
	UpdatedAt *time.Time `json:"updated_at"`

	// CreatedAt: date of creation of the action.
	CreatedAt *time.Time `json:"created_at"`
}

ServerEvent: server event.

type ServerInstall

type ServerInstall struct {
	// OsID: ID of the OS.
	OsID string `json:"os_id"`

	// Hostname: host defined during the server installation.
	Hostname string `json:"hostname"`

	// SSHKeyIDs: SSH public key IDs defined during server installation.
	SSHKeyIDs []string `json:"ssh_key_ids"`

	// Status: status of the server installation.
	// Default value: unknown
	Status ServerInstallStatus `json:"status"`

	// User: user defined in the server installation, or the default user if none were specified.
	User string `json:"user"`

	// ServiceUser: service user defined in the server installation, or the default user if none were specified.
	ServiceUser string `json:"service_user"`

	// ServiceURL: address of the installed service.
	ServiceURL string `json:"service_url"`
}

ServerInstall: server install.

type ServerInstallStatus

type ServerInstallStatus string

func (ServerInstallStatus) MarshalJSON

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

func (ServerInstallStatus) String

func (enum ServerInstallStatus) String() string

func (*ServerInstallStatus) UnmarshalJSON

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

type ServerOption

type ServerOption struct {
	// ID: ID of the option.
	ID string `json:"id"`

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

	// Status: status of the option on this server.
	// Default value: option_status_unknown
	Status ServerOptionOptionStatus `json:"status"`

	// Manageable: defines whether the option can be managed (added or removed).
	Manageable bool `json:"manageable"`

	// ExpiresAt: auto expiration date for compatible options.
	ExpiresAt *time.Time `json:"expires_at"`
}

ServerOption: server option.

type ServerOptionOptionStatus

type ServerOptionOptionStatus string

func (ServerOptionOptionStatus) MarshalJSON

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

func (ServerOptionOptionStatus) String

func (enum ServerOptionOptionStatus) String() string

func (*ServerOptionOptionStatus) UnmarshalJSON

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

type ServerPingStatus

type ServerPingStatus string

func (ServerPingStatus) MarshalJSON

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

func (ServerPingStatus) String

func (enum ServerPingStatus) String() string

func (*ServerPingStatus) UnmarshalJSON

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

type ServerPrivateNetwork

type ServerPrivateNetwork struct {
	// ID: the Private Network ID.
	ID string `json:"id"`

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

	// ServerID: the server ID.
	ServerID string `json:"server_id"`

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

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

	// Status: the configuration status of the Private Network.
	// Default value: unknown
	Status ServerPrivateNetworkStatus `json:"status"`

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

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

ServerPrivateNetwork: server private network.

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

type ServerRescueServer

type ServerRescueServer struct {
	// User: rescue user name.
	User string `json:"user"`

	// Password: rescue password.
	Password string `json:"password"`
}

ServerRescueServer: server rescue server.

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

type SetServerPrivateNetworksResponse

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

SetServerPrivateNetworksResponse: set server private networks response.

type Setting

type Setting struct {
	// ID: ID of the setting.
	ID string `json:"id"`

	// Type: type of the setting.
	// Default value: unknown
	Type SettingType `json:"type"`

	// ProjectID: ID of the Project ID.
	ProjectID string `json:"project_id"`

	// Enabled: defines whether the setting is enabled.
	Enabled bool `json:"enabled"`
}

Setting: setting.

type SettingType

type SettingType string

func (SettingType) MarshalJSON

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

func (SettingType) String

func (enum SettingType) String() string

func (*SettingType) UnmarshalJSON

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

type StartBMCAccessRequest

type StartBMCAccessRequest 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:"-"`

	// IP: the IP authorized to connect to the server.
	IP net.IP `json:"ip"`
}

StartBMCAccessRequest: start bmc access request.

type StartServerRequest

type StartServerRequest 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 to start.
	ServerID string `json:"-"`

	// BootType: the type of boot.
	// Default value: unknown_boot_type
	BootType ServerBootType `json:"boot_type"`
}

StartServerRequest: start server request.

type StopBMCAccessRequest

type StopBMCAccessRequest 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:"-"`
}

StopBMCAccessRequest: stop bmc access request.

type StopServerRequest

type StopServerRequest 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 to stop.
	ServerID string `json:"-"`
}

StopServerRequest: stop server request.

type UpdateIPRequest

type UpdateIPRequest 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:"-"`

	// IPID: ID of the IP to update.
	IPID string `json:"-"`

	// Reverse: new reverse IP to update, not updated if null.
	Reverse *string `json:"reverse,omitempty"`
}

UpdateIPRequest: update ip request.

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: ID of the server to update.
	ServerID string `json:"-"`

	// Name: name of the server (≠hostname), not updated if null.
	Name *string `json:"name,omitempty"`

	// Description: description associated with the server, max 255 characters, not updated if null.
	Description *string `json:"description,omitempty"`

	// Tags: tags associated with the server, not updated if null.
	Tags *[]string `json:"tags,omitempty"`
}

UpdateServerRequest: update server request.

type UpdateSettingRequest

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

	// SettingID: ID of the setting.
	SettingID string `json:"-"`

	// Enabled: defines whether the setting is enabled.
	Enabled *bool `json:"enabled,omitempty"`
}

UpdateSettingRequest: update setting request.

type WaitForServerInstallRequest

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

WaitForServerInstallRequest is used by WaitForServerInstall method.

type WaitForServerOptionsRequest

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

WaitForServerOptionsRequest is used by WaitForServerOptions method.

type WaitForServerPrivateNetworksRequest

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

WaitForServerPrivateNetworksRequest is used by WaitForServerPrivateNetworks method.

type WaitForServerRequest

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

WaitForServerRequest is used by WaitForServer method.

Jump to

Keyboard shortcuts

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