service

package
v0.0.0-...-278d4fc Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service represents the API service. The specified client is used to communicate with the API

func New

func New(client *client.Client) *Service

New constructs and returns a new service object configured with the specified client

func (*Service) AssignIPAddress

func (s *Service) AssignIPAddress(r *request.AssignIPAddressRequest) (*upcloud.IPAddress, error)

AssignIPAddress assigns the specified IP address to the specified server

func (*Service) AttachStorage

AttachStorage attaches the specified storage to the specified server

func (*Service) CloneStorage

CloneStorage detaches the specified storage from the specified server

func (*Service) CreateBackup

CreateBackup creates a backup of the specified storage

func (*Service) CreateFirewallRule

func (s *Service) CreateFirewallRule(r *request.CreateFirewallRuleRequest) (*upcloud.FirewallRule, error)

CreateFirewallRule creates the firewall rule

func (*Service) CreateServer

CreateServer creates a server and returns the server details for the newly created server

func (*Service) CreateStorage

CreateStorage creates the specified storage

func (*Service) CreateTag

func (s *Service) CreateTag(r *request.CreateTagRequest) (*upcloud.Tag, error)

CreateTag creates a new tag, optionally assigning it to one or more servers at the same time

func (*Service) DeleteFirewallRule

func (s *Service) DeleteFirewallRule(r *request.DeleteFirewallRuleRequest) error

DeleteFirewallRule deletes the specified firewall rule

func (*Service) DeleteServer

func (s *Service) DeleteServer(r *request.DeleteServerRequest) error

DeleteServer deletes the specified server

func (*Service) DeleteServerAndStorages

func (s *Service) DeleteServerAndStorages(r *request.DeleteServerAndStoragesRequest) error

DeleteServerAndStorages deletes the specified server and all attached storages

func (*Service) DeleteStorage

func (s *Service) DeleteStorage(r *request.DeleteStorageRequest) error

DeleteStorage deletes the specified storage device

func (*Service) DeleteTag

func (s *Service) DeleteTag(r *request.DeleteTagRequest) error

DeleteTag deletes the specified tag

func (*Service) DetachStorage

DetachStorage detaches the specified storage from the specified server

func (*Service) EjectCDROM

EjectCDROM ejects the storage from the CD-ROM device of a server

func (*Service) GetAccount

func (s *Service) GetAccount() (*upcloud.Account, error)

GetAccount returns the current user's account

func (*Service) GetFirewallRuleDetails

func (s *Service) GetFirewallRuleDetails(r *request.GetFirewallRuleDetailsRequest) (*upcloud.FirewallRule, error)

GetFirewallRuleDetails returns extended details about the specified firewall rule

func (*Service) GetFirewallRules

func (s *Service) GetFirewallRules(r *request.GetFirewallRulesRequest) (*upcloud.FirewallRules, error)

GetFirewallRules returns the firewall rules for the specified server

func (*Service) GetIPAddressDetails

func (s *Service) GetIPAddressDetails(r *request.GetIPAddressDetailsRequest) (*upcloud.IPAddress, error)

GetIPAddressDetails returns extended details about the specified IP address

func (*Service) GetIPAddresses

func (s *Service) GetIPAddresses() (*upcloud.IPAddresses, error)

GetIPAddresses returns all IP addresses associated with the account

func (*Service) GetPlans

func (s *Service) GetPlans() (*upcloud.Plans, error)

GetPlans returns the available service plans

func (*Service) GetPriceZones

func (s *Service) GetPriceZones() (*upcloud.PrizeZones, error)

GetPriceZones returns the available price zones and their corresponding prices

func (*Service) GetServerConfigurations

func (s *Service) GetServerConfigurations() (*upcloud.ServerConfigurations, error)

GetServerConfigurations returns the available pre-configured server configurations

func (*Service) GetServerDetails

func (s *Service) GetServerDetails(r *request.GetServerDetailsRequest) (*upcloud.ServerDetails, error)

GetServerDetails returns extended details about the specified server

func (*Service) GetServers

func (s *Service) GetServers() (*upcloud.Servers, error)

GetServers returns the available servers

func (*Service) GetStorageDetails

func (s *Service) GetStorageDetails(r *request.GetStorageDetailsRequest) (*upcloud.StorageDetails, error)

GetStorageDetails returns extended details about the specified piece of storage

func (*Service) GetStorages

func (s *Service) GetStorages(r *request.GetStoragesRequest) (*upcloud.Storages, error)

GetStorages returns all available storages

func (*Service) GetTags

func (s *Service) GetTags() (*upcloud.Tags, error)

GetTags returns all tags

func (*Service) GetTimeZones

func (s *Service) GetTimeZones() (*upcloud.TimeZones, error)

GetTimeZones returns the available timezones

func (*Service) GetZones

func (s *Service) GetZones() (*upcloud.Zones, error)

GetZones returns the available zones

func (*Service) LoadCDROM

LoadCDROM loads a storage as a CD-ROM in the CD-ROM device of a server

func (*Service) ModifyIPAddress

func (s *Service) ModifyIPAddress(r *request.ModifyIPAddressRequest) (*upcloud.IPAddress, error)

ModifyIPAddress modifies the specified IP address

func (*Service) ModifyServer

ModifyServer modifies the configuration of an existing server. Attaching and detaching storages as well as assigning and releasing IP addresses have their own separate operations.

func (*Service) ModifyStorage

ModifyStorage modifies the specified storage device

func (*Service) ModifyTag

func (s *Service) ModifyTag(r *request.ModifyTagRequest) (*upcloud.Tag, error)

ModifyTag modifies a tag (e.g. renaming it)

func (*Service) ReleaseIPAddress

func (s *Service) ReleaseIPAddress(r *request.ReleaseIPAddressRequest) error

ReleaseIPAddress releases the specified IP address from the server it is attached to

func (*Service) RestartServer

RestartServer restarts the specified server

func (*Service) RestoreBackup

func (s *Service) RestoreBackup(r *request.RestoreBackupRequest) error

RestoreBackup creates a backup of the specified storage

func (*Service) StartServer

StartServer starts the specified server

func (*Service) StopServer

StopServer stops the specified server

func (*Service) TagServer

TagServer tags a server with with one or more tags

func (*Service) TemplatizeStorage

func (s *Service) TemplatizeStorage(r *request.TemplatizeStorageRequest) (*upcloud.StorageDetails, error)

TemplatizeStorage detaches the specified storage from the specified server

func (*Service) UntagServer

UntagServer removes one or more tags from a server

func (*Service) WaitForServerState

func (s *Service) WaitForServerState(r *request.WaitForServerStateRequest) (*upcloud.ServerDetails, error)

WaitForServerState blocks execution until the specified server has entered the specified state. If the state changes favorably, the new server details are returned. The method will give up after the specified timeout

func (*Service) WaitForStorageState

func (s *Service) WaitForStorageState(r *request.WaitForStorageStateRequest) (*upcloud.StorageDetails, error)

WaitForStorageState blocks execution until the specified storage device has entered the specified state. If the state changes favorably, the new storage details is returned. The method will give up after the specified timeout

Jump to

Keyboard shortcuts

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