cloudapiserver

package
v6.4.10 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CubeServerType       = "CUBE"
	EnterpriseServerType = "ENTERPRISE"
	VCPUServerType       = "VCPU"

	CubeVMStateStop = "SUSPENDED"

	// These are the vm_state values that are available for VCPU and ENTERPRISE servers
	VMStateStart = "RUNNING"
	VMStateStop  = "SHUTOFF"
)

Variables

View Source
var ErrSuspendCubeLast error

The caller should ignore this error, it only informs that the CUBE server should be suspended after all other updates have been applied.

Functions

This section is empty.

Types

type Service

type Service struct {
	Client *ionoscloud.APIClient
	Meta   interface{}
	D      *schema.ResourceData
}

func (*Service) Create

func (ss *Service) Create(ctx context.Context, datacenterID string) (*ionoscloud.Server, *ionoscloud.APIResponse, error)

func (*Service) Delete

func (ss *Service) Delete(ctx context.Context, datacenterID, serverID, ID string) (*ionoscloud.APIResponse, error)

func (*Service) FindById

func (ss *Service) FindById(ctx context.Context, datacenterID, serverID string, depth int32) (*ionoscloud.Server, error)

func (*Service) GetServerType

func (ss *Service) GetServerType(ctx context.Context, datacenterID, serverID string) (string, error)

func (*Service) GetVmState

func (ss *Service) GetVmState(ctx context.Context, datacenterID, serverID string) (string, error)

func (*Service) Start

func (ss *Service) Start(ctx context.Context, datacenterID, serverID, serverType string) error

func (*Service) Stop

func (ss *Service) Stop(ctx context.Context, datacenterID, serverID, serverType string) error

func (*Service) Update

func (ss *Service) Update(ctx context.Context, datacenterID, serverID string, serverProperties ionoscloud.ServerProperties) (*ionoscloud.Server, *ionoscloud.APIResponse, error)

func (*Service) UpdateVmState

func (ss *Service) UpdateVmState(ctx context.Context, datacenterID, serverID, newVmState string) error

Jump to

Keyboard shortcuts

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