Documentation ¶
Overview ¶
Package baremetal provides methods and message types of the baremetal v1alpha1 API.
Index ¶
- Constants
- type API
- func (s *API) AttachIPFailovers(req *AttachIPFailoversRequest, opts ...scw.RequestOption) (*AttachIPFailoversResponse, error)
- func (s *API) CreateIPFailover(req *CreateIPFailoverRequest, opts ...scw.RequestOption) (*IPFailover, error)
- func (s *API) CreateRemoteServerAccess(req *CreateRemoteServerAccessRequest, opts ...scw.RequestOption) (*RemoteServerAccess, error)
- func (s *API) CreateServer(req *CreateServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) DeleteIPFailover(req *DeleteIPFailoverRequest, opts ...scw.RequestOption) (*IPFailover, error)
- func (s *API) DeleteRemoteServerAccess(req *DeleteRemoteServerAccessRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteServer(req *DeleteServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) DetachIPFailovers(req *DetachIPFailoversRequest, opts ...scw.RequestOption) (*DetachIPFailoversResponse, error)
- func (s *API) GetIPFailover(req *GetIPFailoverRequest, opts ...scw.RequestOption) (*IPFailover, error)
- func (s *API) GetOffer(req *GetOfferRequest, opts ...scw.RequestOption) (*Offer, error)
- func (s *API) GetOfferByName(req *GetOfferByNameRequest) (*Offer, error)
- func (s *API) GetOs(req *GetOsRequest, opts ...scw.RequestOption) (*Os, error)
- func (s *API) GetRemoteServerAccess(req *GetRemoteServerAccessRequest, opts ...scw.RequestOption) (*RemoteServerAccess, 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) ListIPFailoverEvents(req *ListIPFailoverEventsRequest, opts ...scw.RequestOption) (*ListIPFailoverEventsResponse, error)
- func (s *API) ListIPFailovers(req *ListIPFailoversRequest, opts ...scw.RequestOption) (*ListIPFailoversResponse, error)
- func (s *API) ListOffers(req *ListOffersRequest, opts ...scw.RequestOption) (*ListOffersResponse, error)
- func (s *API) ListOs(req *ListOsRequest, opts ...scw.RequestOption) (*ListOsResponse, 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) RebootServer(req *RebootServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) StartServer(req *StartServerRequest, opts ...scw.RequestOption) (*Server, 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) UpdateIPFailover(req *UpdateIPFailoverRequest, opts ...scw.RequestOption) (*IPFailover, error)
- func (s *API) UpdateServer(req *UpdateServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) WaitForServer(req *WaitForServerRequest) (*Server, error)
- func (s *API) WaitForServerInstall(req *WaitForServerInstallRequest) (*Server, error)
- type AttachIPFailoversRequest
- type AttachIPFailoversResponse
- type CPU
- type CreateIPFailoverRequest
- type CreateRemoteServerAccessRequest
- type CreateServerRequest
- type DeleteIPFailoverRequest
- type DeleteRemoteServerAccessRequest
- type DeleteServerRequest
- type DetachIPFailoversRequest
- type DetachIPFailoversResponse
- type Disk
- type GetIPFailoverRequest
- type GetOfferByNameRequest
- type GetOfferRequest
- type GetOsRequest
- type GetRemoteServerAccessRequest
- type GetServerMetricsRequest
- type GetServerMetricsResponse
- type GetServerRequest
- type IP
- type IPFailover
- type IPFailoverEvent
- type IPFailoverEventAction
- type IPFailoverMACType
- type IPFailoverStatus
- type IPReverseStatus
- type IPVersion
- type InstallServerRequest
- type ListIPFailoverEventsRequest
- type ListIPFailoverEventsRequestOrderBy
- type ListIPFailoverEventsResponse
- type ListIPFailoversRequest
- type ListIPFailoversRequestOrderBy
- type ListIPFailoversResponse
- type ListOffersRequest
- type ListOffersResponse
- type ListOsRequest
- type ListOsResponse
- type ListServerEventsRequest
- type ListServerEventsRequestOrderBy
- type ListServerEventsResponse
- type ListServersRequest
- type ListServersRequestOrderBy
- type ListServersResponse
- type Memory
- type Offer
- type OfferStock
- type Os
- type RebootServerRequest
- type RebootServerRequestBootType
- type RemoteServerAccess
- type Server
- type ServerBootType
- type ServerEvent
- type ServerInstall
- type ServerInstallStatus
- type ServerPingStatus
- type ServerStatus
- type StartServerRequest
- type StopServerRequest
- type UpdateIPFailoverRequest
- type UpdateIPRequest
- type UpdateServerRequest
- type WaitForServerInstallRequest
- type WaitForServerRequest
Constants ¶
const ( // IPFailoverEventActionUnknown is [insert doc]. IPFailoverEventActionUnknown = IPFailoverEventAction("unknown") // IPFailoverEventActionBillingStart is [insert doc]. IPFailoverEventActionBillingStart = IPFailoverEventAction("billing_start") // IPFailoverEventActionBillingStop is [insert doc]. IPFailoverEventActionBillingStop = IPFailoverEventAction("billing_stop") // IPFailoverEventActionOrderFail is [insert doc]. IPFailoverEventActionOrderFail = IPFailoverEventAction("order_fail") // IPFailoverEventActionUpdateIP is [insert doc]. IPFailoverEventActionUpdateIP = IPFailoverEventAction("update_ip") // IPFailoverEventActionUpdateIPFail is [insert doc]. IPFailoverEventActionUpdateIPFail = IPFailoverEventAction("update_ip_fail") )
const ( // IPFailoverMACTypeUnknownMacType is [insert doc]. IPFailoverMACTypeUnknownMacType = IPFailoverMACType("unknown_mac_type") // IPFailoverMACTypeNone is [insert doc]. IPFailoverMACTypeNone = IPFailoverMACType("none") // IPFailoverMACTypeDuplicate is [insert doc]. IPFailoverMACTypeDuplicate = IPFailoverMACType("duplicate") // IPFailoverMACTypeVmware is [insert doc]. IPFailoverMACTypeVmware = IPFailoverMACType("vmware") // IPFailoverMACTypeXen is [insert doc]. IPFailoverMACTypeXen = IPFailoverMACType("xen") // IPFailoverMACTypeKvm is [insert doc]. IPFailoverMACTypeKvm = IPFailoverMACType("kvm") )
const ( // IPFailoverStatusUnknown is [insert doc]. IPFailoverStatusUnknown = IPFailoverStatus("unknown") // IPFailoverStatusDelivering is [insert doc]. IPFailoverStatusDelivering = IPFailoverStatus("delivering") // IPFailoverStatusReady is [insert doc]. IPFailoverStatusReady = IPFailoverStatus("ready") // IPFailoverStatusUpdating is [insert doc]. IPFailoverStatusUpdating = IPFailoverStatus("updating") // IPFailoverStatusError is [insert doc]. IPFailoverStatusError = IPFailoverStatus("error") // IPFailoverStatusDeleting is [insert doc]. IPFailoverStatusDeleting = IPFailoverStatus("deleting") // IPFailoverStatusLocked is [insert doc]. IPFailoverStatusLocked = IPFailoverStatus("locked") )
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 ( // ListIPFailoverEventsRequestOrderByCreatedAtAsc is [insert doc]. ListIPFailoverEventsRequestOrderByCreatedAtAsc = ListIPFailoverEventsRequestOrderBy("created_at_asc") // ListIPFailoverEventsRequestOrderByCreatedAtDesc is [insert doc]. ListIPFailoverEventsRequestOrderByCreatedAtDesc = ListIPFailoverEventsRequestOrderBy("created_at_desc") )
const ( // ListIPFailoversRequestOrderByCreatedAtAsc is [insert doc]. ListIPFailoversRequestOrderByCreatedAtAsc = ListIPFailoversRequestOrderBy("created_at_asc") // ListIPFailoversRequestOrderByCreatedAtDesc is [insert doc]. ListIPFailoversRequestOrderByCreatedAtDesc = ListIPFailoversRequestOrderBy("created_at_desc") )
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 ( // OfferStockEmpty is [insert doc]. OfferStockEmpty = OfferStock("empty") // OfferStockLow is [insert doc]. OfferStockLow = OfferStock("low") // OfferStockAvailable is [insert doc]. OfferStockAvailable = OfferStock("available") )
const ( // RebootServerRequestBootTypeNormal is [insert doc]. RebootServerRequestBootTypeNormal = RebootServerRequestBootType("normal") // RebootServerRequestBootTypeRescue is [insert doc]. RebootServerRequestBootTypeRescue = RebootServerRequestBootType("rescue") )
const ( // ServerBootTypeNormal is [insert doc]. ServerBootTypeNormal = ServerBootType("normal") // ServerBootTypeRescue is [insert doc]. ServerBootTypeRescue = ServerBootType("rescue") )
const ( // ServerInstallStatusUnknown is [insert doc]. ServerInstallStatusUnknown = ServerInstallStatus("unknown") // ServerInstallStatusCompleted is [insert doc]. ServerInstallStatusCompleted = ServerInstallStatus("completed") // ServerInstallStatusInstalling is [insert doc]. ServerInstallStatusInstalling = ServerInstallStatus("installing") // ServerInstallStatusToInstall is [insert doc]. ServerInstallStatusToInstall = ServerInstallStatus("to_install") // ServerInstallStatusError is [insert doc]. ServerInstallStatusError = ServerInstallStatus("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") // ServerStatusUndelivered is [insert doc]. ServerStatusUndelivered = ServerStatus("undelivered") // 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") )
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) AttachIPFailovers ¶
func (s *API) AttachIPFailovers(req *AttachIPFailoversRequest, opts ...scw.RequestOption) (*AttachIPFailoversResponse, error)
AttachIPFailovers: attach IP failovers
Attach IP failovers to the given server ID.
func (*API) CreateIPFailover ¶
func (s *API) CreateIPFailover(req *CreateIPFailoverRequest, opts ...scw.RequestOption) (*IPFailover, error)
CreateIPFailover: create IP failover
Create an IP failover. Once the IP failover is created, you probably want to attach it to a server.
func (*API) CreateRemoteServerAccess ¶
func (s *API) CreateRemoteServerAccess(req *CreateRemoteServerAccessRequest, opts ...scw.RequestOption) (*RemoteServerAccess, error)
CreateRemoteServerAccess: create remote server access
Create remote server access associated with the given ID. The remote access is available one hour after the installation of the server.
func (*API) CreateServer ¶
func (s *API) CreateServer(req *CreateServerRequest, opts ...scw.RequestOption) (*Server, error)
CreateServer: create server
Create a new server. Once the server is created, you probably want to install an OS.
func (*API) DeleteIPFailover ¶
func (s *API) DeleteIPFailover(req *DeleteIPFailoverRequest, opts ...scw.RequestOption) (*IPFailover, error)
DeleteIPFailover: delete IP failover
Delete the IP failover associated with the given IP.
func (*API) DeleteRemoteServerAccess ¶
func (s *API) DeleteRemoteServerAccess(req *DeleteRemoteServerAccessRequest, opts ...scw.RequestOption) error
DeleteRemoteServerAccess: delete remote server access
Delete remote server access associated with the given ID.
func (*API) DeleteServer ¶
func (s *API) DeleteServer(req *DeleteServerRequest, opts ...scw.RequestOption) (*Server, error)
DeleteServer: delete server
Delete the server associated with the given ID.
func (*API) DetachIPFailovers ¶
func (s *API) DetachIPFailovers(req *DetachIPFailoversRequest, opts ...scw.RequestOption) (*DetachIPFailoversResponse, error)
DetachIPFailovers: detach IP failovers
Detach IP failovers to the given server ID.
func (*API) GetIPFailover ¶
func (s *API) GetIPFailover(req *GetIPFailoverRequest, opts ...scw.RequestOption) (*IPFailover, error)
GetIPFailover: get IP failover
Get the IP failover associated with 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) GetOs ¶
func (s *API) GetOs(req *GetOsRequest, opts ...scw.RequestOption) (*Os, error)
GetOs: get OS
Return specific OS for the given ID.
func (*API) GetRemoteServerAccess ¶
func (s *API) GetRemoteServerAccess(req *GetRemoteServerAccessRequest, opts ...scw.RequestOption) (*RemoteServerAccess, error)
GetRemoteServerAccess: get remote server access
Get the remote server access associated with the given ID.
func (*API) GetServer ¶
func (s *API) GetServer(req *GetServerRequest, opts ...scw.RequestOption) (*Server, error)
GetServer: get 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 server
Install an OS on the server associated with the given ID.
func (*API) ListIPFailoverEvents ¶
func (s *API) ListIPFailoverEvents(req *ListIPFailoverEventsRequest, opts ...scw.RequestOption) (*ListIPFailoverEventsResponse, error)
ListIPFailoverEvents: list IP failover events
List IP failover events associated with the given ID.
func (*API) ListIPFailovers ¶
func (s *API) ListIPFailovers(req *ListIPFailoversRequest, opts ...scw.RequestOption) (*ListIPFailoversResponse, error)
ListIPFailovers: list IP failovers
List all created IP failovers.
func (*API) ListOffers ¶
func (s *API) ListOffers(req *ListOffersRequest, opts ...scw.RequestOption) (*ListOffersResponse, error)
ListOffers: list offers
List all available server offers.
func (*API) ListOs ¶
func (s *API) ListOs(req *ListOsRequest, opts ...scw.RequestOption) (*ListOsResponse, error)
ListOs: list OS
List all available OS that can be install on a baremetal server.
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 servers
List all created servers.
func (*API) RebootServer ¶
func (s *API) RebootServer(req *RebootServerRequest, opts ...scw.RequestOption) (*Server, error)
RebootServer: reboot server
Reboot the server associated with the given ID, use boot param to reboot in rescue.
func (*API) StartServer ¶
func (s *API) StartServer(req *StartServerRequest, opts ...scw.RequestOption) (*Server, error)
StartServer: start server
Start the server associated with the given ID.
func (*API) StopServer ¶
func (s *API) StopServer(req *StopServerRequest, opts ...scw.RequestOption) (*Server, error)
StopServer: stop 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) UpdateIPFailover ¶
func (s *API) UpdateIPFailover(req *UpdateIPFailoverRequest, opts ...scw.RequestOption) (*IPFailover, error)
UpdateIPFailover: update IP failover
Update the IP failover associated with the given IP.
func (*API) UpdateServer ¶
func (s *API) UpdateServer(req *UpdateServerRequest, opts ...scw.RequestOption) (*Server, error)
UpdateServer: update server
Update the server associated with the given ID.
func (*API) WaitForServer ¶
func (s *API) WaitForServer(req *WaitForServerRequest) (*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) (*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 AttachIPFailoversResponse ¶
type AttachIPFailoversResponse struct { // Failovers: list of the attached IP failovers Failovers []*IPFailover `json:"failovers"` }
AttachIPFailoversResponse: attach ip failovers response
type CPU ¶
type CPU struct { // Name: name of the CPU Name string `json:"name"` // Cores: number of cores of the CPU Cores uint32 `json:"cores"` // Threads: number of threads of the CPU Threads uint32 `json:"threads"` Frequency uint32 `json:"frequency"` }
CPU: cpu
type CreateIPFailoverRequest ¶
type CreateIPFailoverRequest struct { Zone scw.Zone `json:"-"` // Deprecated: OrganizationID: ID of the organization to associate to the IP failover // Precisely one of OrganizationID, ProjectID must be set. OrganizationID *string `json:"organization_id,omitempty"` // ProjectID: ID of the project to associate to the IP failover // Precisely one of OrganizationID, ProjectID must be set. ProjectID *string `json:"project_id,omitempty"` // Description: description to associate to the IP failover, max 255 characters Description string `json:"description"` // Tags: tags to associate to the IP failover Tags []string `json:"tags"` // MacType: mAC type to use for the IP failover // // Default value: unknown_mac_type MacType IPFailoverMACType `json:"mac_type"` // DuplicateMacFrom: ID of the IP failover which must be duplicate DuplicateMacFrom *string `json:"duplicate_mac_from"` }
type CreateServerRequest ¶
type CreateServerRequest struct { Zone scw.Zone `json:"-"` // OfferID: offer ID of the new server OfferID string `json:"offer_id"` // OrganizationID: organization ID with which the server will be created OrganizationID string `json:"organization_id"` // 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"` }
type DeleteIPFailoverRequest ¶
type DeleteServerRequest ¶
type DetachIPFailoversResponse ¶
type DetachIPFailoversResponse struct { // Failovers: list of the detached IP failovers Failovers []*IPFailover `json:"failovers"` }
DetachIPFailoversResponse: detach ip failovers response
type Disk ¶
type Disk struct { // Capacity: capacity of the disk in GB Capacity uint64 `json:"capacity"` // Type: type of the disk Type string `json:"type"` }
Disk: disk
type GetIPFailoverRequest ¶
type GetOfferByNameRequest ¶
type GetOfferRequest ¶
type GetOsRequest ¶
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 IPFailover ¶
type IPFailover struct { // ID: ID of the IP failover ID string `json:"id"` // OrganizationID: organization ID the IP failover is attached to OrganizationID string `json:"organization_id"` // ProjectID: project ID the IP failover is attached to ProjectID string `json:"project_id"` // Description: description of the IP failover Description string `json:"description"` // Tags: tags associated to the IP failover Tags []string `json:"tags"` // UpdatedAt: date of last update of the IP failover UpdatedAt *time.Time `json:"updated_at"` // CreatedAt: date of creation of the IP failover CreatedAt *time.Time `json:"created_at"` // Status: status of the IP failover // // Default value: unknown Status IPFailoverStatus `json:"status"` // IPAddress: IP of the IP failover IPAddress net.IP `json:"ip_address"` // MacAddress: mac address of the IP failover MacAddress string `json:"mac_address"` // ServerID: serverID linked to the IP failover ServerID string `json:"server_id"` // MacType: type of the MAC generated of the IP failover // // Default value: unknown_mac_type MacType IPFailoverMACType `json:"mac_type"` // Reverse: reverse IP value Reverse string `json:"reverse"` // 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"` // Zone: the zone in which is the ip Zone scw.Zone `json:"zone"` }
IPFailover: ip failover
type IPFailoverEvent ¶
type IPFailoverEvent struct { // ID: ID of the IP failover for whom the action will be applied ID string `json:"id"` // Action: the action that will be applied to the IP failover // // Default value: unknown Action IPFailoverEventAction `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"` }
IPFailoverEvent: ip failover event
type IPFailoverEventAction ¶
type IPFailoverEventAction string
func (IPFailoverEventAction) MarshalJSON ¶
func (enum IPFailoverEventAction) MarshalJSON() ([]byte, error)
func (IPFailoverEventAction) String ¶
func (enum IPFailoverEventAction) String() string
func (*IPFailoverEventAction) UnmarshalJSON ¶
func (enum *IPFailoverEventAction) UnmarshalJSON(data []byte) error
type IPFailoverMACType ¶
type IPFailoverMACType string
func (IPFailoverMACType) MarshalJSON ¶
func (enum IPFailoverMACType) MarshalJSON() ([]byte, error)
func (IPFailoverMACType) String ¶
func (enum IPFailoverMACType) String() string
func (*IPFailoverMACType) UnmarshalJSON ¶
func (enum *IPFailoverMACType) UnmarshalJSON(data []byte) error
type IPFailoverStatus ¶
type IPFailoverStatus string
func (IPFailoverStatus) MarshalJSON ¶
func (enum IPFailoverStatus) MarshalJSON() ([]byte, error)
func (IPFailoverStatus) String ¶
func (enum IPFailoverStatus) String() string
func (*IPFailoverStatus) UnmarshalJSON ¶
func (enum *IPFailoverStatus) UnmarshalJSON(data []byte) error
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"` }
type ListIPFailoverEventsRequest ¶
type ListIPFailoverEventsRequest struct { Zone scw.Zone `json:"-"` // IPFailoverID: ID of the IP failover events searched IPFailoverID string `json:"-"` // Page: page number Page *int32 `json:"-"` // PageSize: number of IP failover events per page PageSize *uint32 `json:"-"` // OrderBy: order of the IP failover events // // Default value: created_at_asc OrderBy ListIPFailoverEventsRequestOrderBy `json:"-"` }
type ListIPFailoverEventsRequestOrderBy ¶
type ListIPFailoverEventsRequestOrderBy string
func (ListIPFailoverEventsRequestOrderBy) MarshalJSON ¶
func (enum ListIPFailoverEventsRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListIPFailoverEventsRequestOrderBy) String ¶
func (enum ListIPFailoverEventsRequestOrderBy) String() string
func (*ListIPFailoverEventsRequestOrderBy) UnmarshalJSON ¶
func (enum *ListIPFailoverEventsRequestOrderBy) UnmarshalJSON(data []byte) error
type ListIPFailoverEventsResponse ¶
type ListIPFailoverEventsResponse struct { // TotalCount: total count of matching IP failover events TotalCount uint32 `json:"total_count"` // Event: IP failover events that match filters Event []*IPFailoverEvent `json:"event"` }
ListIPFailoverEventsResponse: list ip failover events response
func (*ListIPFailoverEventsResponse) UnsafeAppend ¶
func (r *ListIPFailoverEventsResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListIPFailoverEventsResponse) UnsafeGetTotalCount ¶
func (r *ListIPFailoverEventsResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListIPFailoversRequest ¶
type ListIPFailoversRequest struct { Zone scw.Zone `json:"-"` // Page: page number Page *int32 `json:"-"` // PageSize: number of IP failover per page PageSize *uint32 `json:"-"` // OrderBy: order of the IP failovers // // Default value: created_at_asc OrderBy ListIPFailoversRequestOrderBy `json:"-"` // Tags: filter IP failovers by tags Tags []string `json:"-"` // Status: filter IP failovers by status Status []string `json:"-"` // ServerIDs: filter IP failovers by server IDs ServerIDs []string `json:"-"` // OrganizationID: filter servers by organization ID OrganizationID *string `json:"-"` // ProjectID: filter servers by project ID ProjectID *string `json:"-"` }
type ListIPFailoversRequestOrderBy ¶
type ListIPFailoversRequestOrderBy string
func (ListIPFailoversRequestOrderBy) MarshalJSON ¶
func (enum ListIPFailoversRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListIPFailoversRequestOrderBy) String ¶
func (enum ListIPFailoversRequestOrderBy) String() string
func (*ListIPFailoversRequestOrderBy) UnmarshalJSON ¶
func (enum *ListIPFailoversRequestOrderBy) UnmarshalJSON(data []byte) error
type ListIPFailoversResponse ¶
type ListIPFailoversResponse struct { // TotalCount: total count of matching IP failovers TotalCount uint32 `json:"total_count"` // Failovers: listing of failovers Failovers []*IPFailover `json:"failovers"` }
ListIPFailoversResponse: list ip failovers response
func (*ListIPFailoversResponse) UnsafeAppend ¶
func (r *ListIPFailoversResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListIPFailoversResponse) UnsafeGetTotalCount ¶
func (r *ListIPFailoversResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListOffersRequest ¶
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 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 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"` // Event: server events that match filters Event []*ServerEvent `json:"event"` }
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 servers by tags Tags []string `json:"-"` // Status: filter servers by status Status []string `json:"-"` // Name: filter servers by name Name *string `json:"-"` // OrganizationID: filter servers by organization ID OrganizationID *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 Memory ¶
type Memory struct { Capacity uint64 `json:"capacity"` Type string `json:"type"` Frequency uint32 `json:"frequency"` Ecc bool `json:"ecc"` }
Memory: memory
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 with the offer Bandwidth uint32 `json:"bandwidth"` // CommercialRange: commercial range of the offer CommercialRange string `json:"commercial_range"` // Deprecated: PriceByMinute: price of the offer by minutes, this field is deprecated, please use `price_per_sixty_minutes` instead PriceByMinute *scw.Money `json:"price_by_minute"` // Deprecated: PriceByMonth: price of the offer by months, this field is deprecated, please use `price_per_month` instead PriceByMonth *scw.Money `json:"price_by_month"` // PricePerSixtyMinutes: price of the offer for the next 60 minutes (a server order at 11h32 will be payed until 12h32) PricePerSixtyMinutes *scw.Money `json:"price_per_sixty_minutes"` // PricePerMonth: price of the offer per months PricePerMonth *scw.Money `json:"price_per_month"` // Disk: disks specifications of the offer Disk []*Disk `json:"disk"` // Enable: true if the offer is currently available Enable bool `json:"enable"` // CPU: CPU specifications of the offer CPU []*CPU `json:"cpu"` // Memory: memory specifications of the offer Memory []*Memory `json:"memory"` // QuotaName: name of the quota associated to the offer QuotaName string `json:"quota_name"` }
Offer: 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 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"` }
Os: os
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: normal BootType RebootServerRequestBootType `json:"boot_type"` }
type RebootServerRequestBootType ¶
type RebootServerRequestBootType string
func (RebootServerRequestBootType) MarshalJSON ¶
func (enum RebootServerRequestBootType) MarshalJSON() ([]byte, error)
func (RebootServerRequestBootType) String ¶
func (enum RebootServerRequestBootType) String() string
func (*RebootServerRequestBootType) UnmarshalJSON ¶
func (enum *RebootServerRequestBootType) UnmarshalJSON(data []byte) error
type RemoteServerAccess ¶
type RemoteServerAccess struct { // URL: URL to access to the server console URL string `json:"url"` // Login: the login to use for the remote access authentification Login string `json:"login"` // Password: the password to use for the remote access authentification Password string `json:"password"` // ExpiresAt: the date after which the remote access will be closed ExpiresAt *time.Time `json:"expires_at"` }
RemoteServerAccess: remote server access
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"` // 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"` // Install: information about the last installation of the server Install *ServerInstall `json:"install"` // 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: normal BootType ServerBootType `json:"boot_type"` // Zone: the zone in which is the server Zone scw.Zone `json:"zone"` // PingStatus: server status of ping // // Default value: ping_status_unknown PingStatus ServerPingStatus `json:"ping_status"` }
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: ID of the OS OsID string `json:"os_id"` // Hostname: host defined in the server install Hostname string `json:"hostname"` // SSHKeyIDs: SSH public key IDs defined in the server install SSHKeyIDs []string `json:"ssh_key_ids"` // Status: status of the server install // // Default value: unknown Status ServerInstallStatus `json:"status"` }
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 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 StartServerRequest ¶
type StopServerRequest ¶
type UpdateIPFailoverRequest ¶
type UpdateIPFailoverRequest struct { Zone scw.Zone `json:"-"` // IPFailoverID: ID of the IP failover to update IPFailoverID string `json:"-"` // Description: description to associate to the IP failover, max 255 characters, not updated if null Description *string `json:"description"` // Tags: tags to associate to the IP failover, not updated if null Tags *[]string `json:"tags"` // MacType: mAC type to use for the IP failover, not updated if null // // Default value: unknown_mac_type MacType IPFailoverMACType `json:"mac_type"` // DuplicateMacFrom: ID of the IP failover which must be duplicate, not updated if null DuplicateMacFrom *string `json:"duplicate_mac_from"` // Reverse: new reverse IP to update, not updated if null Reverse *string `json:"reverse"` }
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"` }