instance

package
v2.34.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatSSHKeyToTag added in v2.28.0

func FormatSSHKeyToTag(publicKey string) string

func GetCommands

func GetCommands() *core.Commands

GetCommands returns instance commands.

This function: - Gets the generated commands - Register handwritten marshalers - Apply handwritten overrides (of Command.Run and Command.View) - Merge handwritten commands

func GetGeneratedCommands

func GetGeneratedCommands() *core.Commands

Types

type SSHKeyFormat added in v2.16.0

type SSHKeyFormat struct {
	Name string `json:"name"`
	Type string `json:"type"`
	Key  string `json:"key"`
}

type ServerBuilder added in v2.33.0

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

func NewServerBuilder added in v2.33.0

func NewServerBuilder(client *scw.Client, name string, zone scw.Zone, commercialType string) *ServerBuilder

func (*ServerBuilder) AddAdminPasswordEncryptionSSHKeyID added in v2.33.0

func (sb *ServerBuilder) AddAdminPasswordEncryptionSSHKeyID(adminPasswordEncryptionSSHKeyID *string) *ServerBuilder

func (*ServerBuilder) AddBootType added in v2.33.0

func (sb *ServerBuilder) AddBootType(bootType string) *ServerBuilder

func (*ServerBuilder) AddEnableIPv6 added in v2.33.0

func (sb *ServerBuilder) AddEnableIPv6(enableIPv6 *bool) *ServerBuilder

func (*ServerBuilder) AddIP added in v2.33.0

func (sb *ServerBuilder) AddIP(ip string) (*ServerBuilder, error)

AddIP takes an ip argument and change requests accordingly. ip could be:

  • "new"
  • A flexible IP UUID
  • A flexible IP address
  • "dynamic"
  • "none"

func (*ServerBuilder) AddImage added in v2.33.0

func (sb *ServerBuilder) AddImage(image string) (*ServerBuilder, error)

AddImage handle a custom image argument. image could be:

  • A local image UUID.
  • An image label.

func (*ServerBuilder) AddOrganizationID added in v2.33.0

func (sb *ServerBuilder) AddOrganizationID(orgID *string) *ServerBuilder

func (*ServerBuilder) AddPlacementGroup added in v2.33.0

func (sb *ServerBuilder) AddPlacementGroup(placementGroupID string) *ServerBuilder

func (*ServerBuilder) AddProjectID added in v2.33.0

func (sb *ServerBuilder) AddProjectID(projectID *string) *ServerBuilder

func (*ServerBuilder) AddRoutedIPEnabled added in v2.33.0

func (sb *ServerBuilder) AddRoutedIPEnabled(routedIPEnabled *bool) *ServerBuilder

func (*ServerBuilder) AddSecurityGroup added in v2.33.0

func (sb *ServerBuilder) AddSecurityGroup(securityGroupID string) *ServerBuilder

func (*ServerBuilder) AddTags added in v2.33.0

func (sb *ServerBuilder) AddTags(tags []string) *ServerBuilder

func (*ServerBuilder) AddVolumes added in v2.33.0

func (sb *ServerBuilder) AddVolumes(rootVolume string, additionalVolumes []string) (*ServerBuilder, error)

AddVolumes build volume templates from arguments.

More format details in buildVolumeTemplate function.

Also add default volumes to server, ex: scratch storage for GPU servers

func (*ServerBuilder) Build added in v2.33.0

func (sb *ServerBuilder) Build() (*instance.CreateServerRequest, *instance.CreateIPRequest)

func (*ServerBuilder) Validate added in v2.33.0

func (sb *ServerBuilder) Validate() error

func (*ServerBuilder) ValidateVolumes added in v2.33.0

func (sb *ServerBuilder) ValidateVolumes() error

type ServerGetRdpPasswordResponse added in v2.31.0

type ServerGetRdpPasswordResponse struct {
	Username          string
	Password          string
	SSHKeyID          *string
	SSHKeyDescription string
}

Jump to

Keyboard shortcuts

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