Documentation
¶
Overview ¶
Package baremetal provides methods and message types of the baremetal v1 API.
Index ¶
- Constants
- type API
- func (s *API) AddOptionServer(req *AddOptionServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) CreateServer(req *CreateServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) DeleteOptionServer(req *DeleteOptionServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) DeleteServer(req *DeleteServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) GetBMCAccess(req *GetBMCAccessRequest, opts ...scw.RequestOption) (*BMCAccess, error)
- func (s *API) GetOS(req *GetOSRequest, opts ...scw.RequestOption) (*OS, error)
- func (s *API) GetOffer(req *GetOfferRequest, opts ...scw.RequestOption) (*Offer, error)
- func (s *API) GetOfferByName(req *GetOfferByNameRequest) (*Offer, error)
- func (s *API) GetOption(req *GetOptionRequest, opts ...scw.RequestOption) (*Option, error)
- func (s *API) GetServer(req *GetServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) GetServerMetrics(req *GetServerMetricsRequest, opts ...scw.RequestOption) (*GetServerMetricsResponse, error)
- func (s *API) GetServerOffer(server *Server) (*Offer, error)
- func (s *API) InstallServer(req *InstallServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) ListOS(req *ListOSRequest, opts ...scw.RequestOption) (*ListOSResponse, error)
- func (s *API) ListOffers(req *ListOffersRequest, opts ...scw.RequestOption) (*ListOffersResponse, error)
- func (s *API) ListOptions(req *ListOptionsRequest, opts ...scw.RequestOption) (*ListOptionsResponse, error)
- func (s *API) ListServerEvents(req *ListServerEventsRequest, opts ...scw.RequestOption) (*ListServerEventsResponse, error)
- func (s *API) ListServers(req *ListServersRequest, opts ...scw.RequestOption) (*ListServersResponse, error)
- func (s *API) ListSettings(req *ListSettingsRequest, opts ...scw.RequestOption) (*ListSettingsResponse, error)
- func (s *API) RebootServer(req *RebootServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) StartBMCAccess(req *StartBMCAccessRequest, opts ...scw.RequestOption) (*BMCAccess, error)
- func (s *API) StartServer(req *StartServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) StopBMCAccess(req *StopBMCAccessRequest, opts ...scw.RequestOption) error
- func (s *API) StopServer(req *StopServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) UpdateIP(req *UpdateIPRequest, opts ...scw.RequestOption) (*IP, error)
- func (s *API) UpdateServer(req *UpdateServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) UpdateSetting(req *UpdateSettingRequest, opts ...scw.RequestOption) (*Setting, error)
- func (s *API) WaitForServer(req *WaitForServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) WaitForServerInstall(req *WaitForServerInstallRequest, opts ...scw.RequestOption) (*Server, error)
- type AddOptionServerRequest
- type BMCAccess
- type CPU
- type CreateServerRequest
- type CreateServerRequestInstall
- type DeleteOptionServerRequest
- type DeleteServerRequest
- type Disk
- type GetBMCAccessRequest
- type GetOSRequest
- type GetOfferByNameRequest
- type GetOfferRequest
- type GetOptionRequest
- type GetServerMetricsRequest
- type GetServerMetricsResponse
- type GetServerRequest
- type IP
- type IPReverseStatus
- type IPVersion
- type InstallServerRequest
- type ListOSRequest
- type ListOSResponse
- type ListOffersRequest
- type ListOffersResponse
- type ListOptionsRequest
- type ListOptionsResponse
- type ListServerEventsRequest
- type ListServerEventsRequestOrderBy
- type ListServerEventsResponse
- type ListServersRequest
- type ListServersRequestOrderBy
- type ListServersResponse
- type ListSettingsRequest
- type ListSettingsRequestOrderBy
- type ListSettingsResponse
- type Memory
- type OS
- type OSOSField
- type Offer
- type OfferOptionOffer
- type OfferStock
- type OfferSubscriptionPeriod
- type Option
- type PersistentMemory
- type RaidController
- type RebootServerRequest
- type Server
- type ServerBootType
- type ServerEvent
- type ServerInstall
- type ServerInstallStatus
- type ServerOption
- type ServerOptionOptionStatus
- type ServerPingStatus
- type ServerStatus
- type Setting
- type SettingType
- type StartBMCAccessRequest
- type StartServerRequest
- type StopBMCAccessRequest
- type StopServerRequest
- type UpdateIPRequest
- type UpdateServerRequest
- type UpdateSettingRequest
- type WaitForServerInstallRequest
- type WaitForServerRequest
Constants ¶
const ( // IPReverseStatusUnknown is [insert doc]. IPReverseStatusUnknown = IPReverseStatus("unknown") // IPReverseStatusPending is [insert doc]. IPReverseStatusPending = IPReverseStatus("pending") // IPReverseStatusActive is [insert doc]. IPReverseStatusActive = IPReverseStatus("active") // IPReverseStatusError is [insert doc]. IPReverseStatusError = IPReverseStatus("error") )
const ( // IPVersionIPv4 is [insert doc]. IPVersionIPv4 = IPVersion("IPv4") // IPVersionIPv6 is [insert doc]. IPVersionIPv6 = IPVersion("IPv6") )
const ( // ListServerEventsRequestOrderByCreatedAtAsc is [insert doc]. ListServerEventsRequestOrderByCreatedAtAsc = ListServerEventsRequestOrderBy("created_at_asc") // ListServerEventsRequestOrderByCreatedAtDesc is [insert doc]. ListServerEventsRequestOrderByCreatedAtDesc = ListServerEventsRequestOrderBy("created_at_desc") )
const ( // ListServersRequestOrderByCreatedAtAsc is [insert doc]. ListServersRequestOrderByCreatedAtAsc = ListServersRequestOrderBy("created_at_asc") // ListServersRequestOrderByCreatedAtDesc is [insert doc]. ListServersRequestOrderByCreatedAtDesc = ListServersRequestOrderBy("created_at_desc") )
const ( // ListSettingsRequestOrderByCreatedAtAsc is [insert doc]. ListSettingsRequestOrderByCreatedAtAsc = ListSettingsRequestOrderBy("created_at_asc") // ListSettingsRequestOrderByCreatedAtDesc is [insert doc]. ListSettingsRequestOrderByCreatedAtDesc = ListSettingsRequestOrderBy("created_at_desc") )
const ( // OfferStockEmpty is [insert doc]. OfferStockEmpty = OfferStock("empty") // OfferStockLow is [insert doc]. OfferStockLow = OfferStock("low") // OfferStockAvailable is [insert doc]. OfferStockAvailable = OfferStock("available") )
const ( // OfferSubscriptionPeriodUnknownSubscriptionPeriod is [insert doc]. OfferSubscriptionPeriodUnknownSubscriptionPeriod = OfferSubscriptionPeriod("unknown_subscription_period") // OfferSubscriptionPeriodHourly is [insert doc]. OfferSubscriptionPeriodHourly = OfferSubscriptionPeriod("hourly") // OfferSubscriptionPeriodMonthly is [insert doc]. OfferSubscriptionPeriodMonthly = OfferSubscriptionPeriod("monthly") )
const ( // ServerBootTypeUnknownBootType is [insert doc]. ServerBootTypeUnknownBootType = ServerBootType("unknown_boot_type") // ServerBootTypeNormal is [insert doc]. ServerBootTypeNormal = ServerBootType("normal") // ServerBootTypeRescue is [insert doc]. ServerBootTypeRescue = ServerBootType("rescue") )
const ( // ServerInstallStatusUnknown is [insert doc]. ServerInstallStatusUnknown = ServerInstallStatus("unknown") // ServerInstallStatusToInstall is [insert doc]. ServerInstallStatusToInstall = ServerInstallStatus("to_install") // ServerInstallStatusInstalling is [insert doc]. ServerInstallStatusInstalling = ServerInstallStatus("installing") // ServerInstallStatusCompleted is [insert doc]. ServerInstallStatusCompleted = ServerInstallStatus("completed") // ServerInstallStatusError is [insert doc]. ServerInstallStatusError = ServerInstallStatus("error") )
const ( // ServerOptionOptionStatusOptionStatusUnknown is [insert doc]. ServerOptionOptionStatusOptionStatusUnknown = ServerOptionOptionStatus("option_status_unknown") // ServerOptionOptionStatusOptionStatusEnable is [insert doc]. ServerOptionOptionStatusOptionStatusEnable = ServerOptionOptionStatus("option_status_enable") // ServerOptionOptionStatusOptionStatusEnabling is [insert doc]. ServerOptionOptionStatusOptionStatusEnabling = ServerOptionOptionStatus("option_status_enabling") // ServerOptionOptionStatusOptionStatusDisabling is [insert doc]. ServerOptionOptionStatusOptionStatusDisabling = ServerOptionOptionStatus("option_status_disabling") // ServerOptionOptionStatusOptionStatusError is [insert doc]. ServerOptionOptionStatusOptionStatusError = ServerOptionOptionStatus("option_status_error") )
const ( // ServerPingStatusPingStatusUnknown is [insert doc]. ServerPingStatusPingStatusUnknown = ServerPingStatus("ping_status_unknown") // ServerPingStatusPingStatusUp is [insert doc]. ServerPingStatusPingStatusUp = ServerPingStatus("ping_status_up") // ServerPingStatusPingStatusDown is [insert doc]. ServerPingStatusPingStatusDown = ServerPingStatus("ping_status_down") )
const ( // ServerStatusUnknown is [insert doc]. ServerStatusUnknown = ServerStatus("unknown") // ServerStatusDelivering is [insert doc]. ServerStatusDelivering = ServerStatus("delivering") // ServerStatusReady is [insert doc]. ServerStatusReady = ServerStatus("ready") // ServerStatusStopping is [insert doc]. ServerStatusStopping = ServerStatus("stopping") // ServerStatusStopped is [insert doc]. ServerStatusStopped = ServerStatus("stopped") // ServerStatusStarting is [insert doc]. ServerStatusStarting = ServerStatus("starting") // ServerStatusError is [insert doc]. ServerStatusError = ServerStatus("error") // ServerStatusDeleting is [insert doc]. ServerStatusDeleting = ServerStatus("deleting") // ServerStatusLocked is [insert doc]. ServerStatusLocked = ServerStatus("locked") // ServerStatusOutOfStock is [insert doc]. ServerStatusOutOfStock = ServerStatus("out_of_stock") // ServerStatusOrdered is [insert doc]. ServerStatusOrdered = ServerStatus("ordered") )
const ( // SettingTypeUnknown is [insert doc]. SettingTypeUnknown = SettingType("unknown") // SettingTypeSMTP is [insert doc]. SettingTypeSMTP = SettingType("smtp") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API: this API allows to manage your Bare metal server
func (*API) AddOptionServer ¶
func (s *API) AddOptionServer(req *AddOptionServerRequest, opts ...scw.RequestOption) (*Server, error)
AddOptionServer: add server option
Add an option to a specific server.
func (*API) CreateServer ¶
func (s *API) CreateServer(req *CreateServerRequest, opts ...scw.RequestOption) (*Server, error)
CreateServer: create a elastic metal server
Create a new elastic metal server. Once the server is created, you probably want to install an OS.
func (*API) DeleteOptionServer ¶
func (s *API) DeleteOptionServer(req *DeleteOptionServerRequest, opts ...scw.RequestOption) (*Server, error)
DeleteOptionServer: delete server option
Delete an option from a specific server.
func (*API) DeleteServer ¶
func (s *API) DeleteServer(req *DeleteServerRequest, opts ...scw.RequestOption) (*Server, error)
DeleteServer: delete a elastic metal server
Delete the server associated with the given ID.
func (*API) GetBMCAccess ¶
func (s *API) GetBMCAccess(req *GetBMCAccessRequest, opts ...scw.RequestOption) (*BMCAccess, error)
GetBMCAccess: get BMC (Baseboard Management Controller) access for a given elastic metal server
Get the BMC (Baseboard Management Controller) access associated with the given ID.
func (*API) GetOS ¶
func (s *API) GetOS(req *GetOSRequest, opts ...scw.RequestOption) (*OS, error)
GetOS: get an OS with a given ID
Return specific OS for the given ID.
func (*API) GetOffer ¶
func (s *API) GetOffer(req *GetOfferRequest, opts ...scw.RequestOption) (*Offer, error)
GetOffer: get offer
Return specific offer for the given 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: get option
Return specific option for the given ID.
func (*API) GetServer ¶
func (s *API) GetServer(req *GetServerRequest, opts ...scw.RequestOption) (*Server, error)
GetServer: get a specific elastic metal server
Get the server associated with the given ID.
func (*API) GetServerMetrics ¶
func (s *API) GetServerMetrics(req *GetServerMetricsRequest, opts ...scw.RequestOption) (*GetServerMetricsResponse, error)
GetServerMetrics: return server metrics
Give the ping status on the server associated with the given ID.
func (*API) GetServerOffer ¶
GetServerOffer returns the offer of a baremetal server
func (*API) InstallServer ¶
func (s *API) InstallServer(req *InstallServerRequest, opts ...scw.RequestOption) (*Server, error)
InstallServer: install a elastic metal server
Install an OS on the server associated with the given ID.
func (*API) ListOS ¶
func (s *API) ListOS(req *ListOSRequest, opts ...scw.RequestOption) (*ListOSResponse, error)
ListOS: list all available OS that can be install on a elastic metal server
List all available OS that can be install on a elastic metal server.
func (*API) ListOffers ¶
func (s *API) ListOffers(req *ListOffersRequest, opts ...scw.RequestOption) (*ListOffersResponse, error)
ListOffers: list offers
List all available server offers.
func (*API) ListOptions ¶
func (s *API) ListOptions(req *ListOptionsRequest, opts ...scw.RequestOption) (*ListOptionsResponse, error)
ListOptions: list options
List all options matching with filters.
func (*API) ListServerEvents ¶
func (s *API) ListServerEvents(req *ListServerEventsRequest, opts ...scw.RequestOption) (*ListServerEventsResponse, error)
ListServerEvents: list server events
List events associated to the given server ID.
func (*API) ListServers ¶
func (s *API) ListServers(req *ListServersRequest, opts ...scw.RequestOption) (*ListServersResponse, error)
ListServers: list elastic metal servers for organization
List elastic metal servers for organization.
func (*API) ListSettings ¶
func (s *API) ListSettings(req *ListSettingsRequest, opts ...scw.RequestOption) (*ListSettingsResponse, error)
ListSettings: list all settings
Return all settings for a project ID.
func (*API) RebootServer ¶
func (s *API) RebootServer(req *RebootServerRequest, opts ...scw.RequestOption) (*Server, error)
RebootServer: reboot a elastic metal server
Reboot the server associated with the given ID, use boot param to reboot in rescue.
func (*API) StartBMCAccess ¶
func (s *API) StartBMCAccess(req *StartBMCAccessRequest, opts ...scw.RequestOption) (*BMCAccess, error)
StartBMCAccess: unvailable - Start BMC (Baseboard Management Controller) access for a given elastic metal server
Unvailable - Start BMC (Baseboard Management Controller) access associated with the given ID. The BMC (Baseboard Management Controller) access is available one hour after the installation of the server.
func (*API) StartServer ¶
func (s *API) StartServer(req *StartServerRequest, opts ...scw.RequestOption) (*Server, error)
StartServer: start a elastic metal server
Start the server associated with the given ID.
func (*API) StopBMCAccess ¶
func (s *API) StopBMCAccess(req *StopBMCAccessRequest, opts ...scw.RequestOption) error
StopBMCAccess: stop BMC (Baseboard Management Controller) access for a given elastic metal server
Stop BMC (Baseboard Management Controller) access associated with the given ID.
func (*API) StopServer ¶
func (s *API) StopServer(req *StopServerRequest, opts ...scw.RequestOption) (*Server, error)
StopServer: stop a elastic metal server
Stop the server associated with the given ID.
func (*API) UpdateIP ¶
func (s *API) UpdateIP(req *UpdateIPRequest, opts ...scw.RequestOption) (*IP, error)
UpdateIP: update IP
Configure ip associated with the given server ID and ipID. You can use this method to set a reverse dns for an IP.
func (*API) UpdateServer ¶
func (s *API) UpdateServer(req *UpdateServerRequest, opts ...scw.RequestOption) (*Server, error)
UpdateServer: update a elastic metal server
Update the server associated with the given ID.
func (*API) UpdateSetting ¶
func (s *API) UpdateSetting(req *UpdateSettingRequest, opts ...scw.RequestOption) (*Setting, error)
UpdateSetting: update setting
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.
type AddOptionServerRequest ¶
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 cores of the CPU CoreCount uint32 `json:"core_count"` // ThreadCount: number of threads of the CPU ThreadCount uint32 `json:"thread_count"` Frequency uint32 `json:"frequency"` }
CPU: cpu
type CreateServerRequest ¶
type CreateServerRequest struct { 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 OrganizationID, ProjectID must be set. OrganizationID *string `json:"organization_id,omitempty"` // ProjectID: project ID with which the server will be created // Precisely one of OrganizationID, ProjectID must be set. ProjectID *string `json:"project_id,omitempty"` // Name: name of the server (≠hostname) Name string `json:"name"` // Description: description associated to the server, max 255 characters Description string `json:"description"` // Tags: tags to associate to the server Tags []string `json:"tags"` Install *CreateServerRequestInstall `json:"install"` // OptionIDs: iDs of options to enable on server OptionIDs []string `json:"option_ids"` }
type DeleteServerRequest ¶
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 GetOSRequest ¶
type GetOfferByNameRequest ¶
type GetOfferRequest ¶
type GetOptionRequest ¶
type GetServerMetricsRequest ¶
type GetServerMetricsResponse ¶
type GetServerMetricsResponse struct { // Pings: timeseries of ping on the server Pings *scw.TimeSeries `json:"pings"` }
GetServerMetricsResponse: get server metrics response
type GetServerRequest ¶
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, in case of an error for example 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 (*IPVersion) UnmarshalJSON ¶
type InstallServerRequest ¶
type InstallServerRequest struct { Zone scw.Zone `json:"-"` // ServerID: server ID to install ServerID string `json:"-"` // OsID: ID of the OS to install 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"` // Password: password used for the installation Password *string `json:"password"` // ServiceUser: user used for the service to install ServiceUser *string `json:"service_user"` // ServicePassword: password used for the service to install ServicePassword *string `json:"service_password"` }
type ListOSRequest ¶
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 scw.Zone `json:"-"` // Page: page number Page *int32 `json:"-"` // PageSize: number of offers per page PageSize *uint32 `json:"-"` // SubscriptionPeriod: period of subscription to filter offers // // Default value: unknown_subscription_period SubscriptionPeriod OfferSubscriptionPeriod `json:"-"` }
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 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 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:"-"` }
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 ListServersRequest ¶
type ListServersRequest struct { Zone scw.Zone `json:"-"` // Page: page number Page *int32 `json:"-"` // PageSize: number of server per page PageSize *uint32 `json:"-"` // OrderBy: order of the servers // // Default value: created_at_asc OrderBy ListServersRequestOrderBy `json:"-"` // Tags: filter by tags Tags []string `json:"-"` // Status: filter by status Status []string `json:"-"` // Name: filter by name Name *string `json:"-"` // OrganizationID: filter by organization ID OrganizationID *string `json:"-"` // ProjectID: filter by project ID ProjectID *string `json:"-"` // OptionID: filter by option ID OptionID *string `json:"-"` }
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: servers that match filters 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 scw.Zone `json:"-"` // Page: page number Page *int32 `json:"-"` // PageSize: set the maximum list size PageSize *uint32 `json:"-"` // OrderBy: order the response // // Default value: created_at_asc OrderBy ListSettingsRequestOrderBy `json:"-"` // ProjectID: ID of the project ProjectID *string `json:"-"` }
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 sttings 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 scw.Size `json:"capacity"` Type string `json:"type"` Frequency uint32 `json:"frequency"` 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: define the SSH requirements to install the OS SSH *OSOSField `json:"ssh"` // User: define the username requirements to install the OS User *OSOSField `json:"user"` // Password: define the password requirements to install the OS Password *OSOSField `json:"password"` // ServiceUser: define the username requirements to install the service ServiceUser *OSOSField `json:"service_user"` // ServicePassword: define the password requirements to install the service ServicePassword *OSOSField `json:"service_password"` }
OS: os
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: 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: price of the offer per months PricePerMonth *scw.Money `json:"price_per_month"` // Disks: disks specifications of the offer Disks []*Disk `json:"disks"` // Enable: true if 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 incompatible OS ids 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: fee to pay on order Fee *scw.Money `json:"fee"` // Options: options available on offer Options []*OfferOptionOffer `json:"options"` }
Offer: offer
type OfferOptionOffer ¶
type OfferOptionOffer struct { ID string `json:"id"` Name string `json:"name"` Price *scw.Money `json:"price"` Enabled bool `json:"enabled"` // SubscriptionPeriod: // // Default value: unknown_subscription_period SubscriptionPeriod OfferSubscriptionPeriod `json:"subscription_period"` Manageable bool `json:"manageable"` OsID *string `json:"os_id"` }
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: is false if the option could not be remove Manageable bool `json:"manageable"` }
Option: option
type PersistentMemory ¶
type RaidController ¶
type RebootServerRequest ¶
type RebootServerRequest struct { 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"` }
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: date of last modification of the server UpdatedAt *time.Time `json:"updated_at"` // CreatedAt: date of creation 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 customs 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: the zone in which is the server Zone scw.Zone `json:"zone"` // Install: configuration of installation Install *ServerInstall `json:"install"` // PingStatus: server status of ping // // Default value: ping_status_unknown PingStatus ServerPingStatus `json:"ping_status"` // Options: options enabled on server Options []*ServerOption `json:"options"` }
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 for whom 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 string `json:"os_id"` Hostname string `json:"hostname"` SSHKeyIDs []string `json:"ssh_key_ids"` // Status: // // Default value: unknown Status ServerInstallStatus `json:"status"` User string `json:"user"` ServiceUser string `json:"service_user"` ServiceURL string `json:"service_url"` }
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 string `json:"id"` Name string `json:"name"` // Status: // // Default value: option_status_unknown Status ServerOptionOptionStatus `json:"status"` Manageable bool `json:"manageable"` }
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 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 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: the setting is enable or disable 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 StartServerRequest ¶
type StartServerRequest struct { 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"` }
type StopBMCAccessRequest ¶
type StopServerRequest ¶
type UpdateIPRequest ¶
type UpdateServerRequest ¶
type UpdateServerRequest struct { 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"` // Description: description associated to the server, max 255 characters, not updated if null Description *string `json:"description"` // Tags: tags associated to the server, not updated if null Tags *[]string `json:"tags"` }