shared

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddSSHKey

type AddSSHKey struct {
	// Name of the SSH key
	Name string `json:"name"`
	// Public key for the SSH key
	PublicKey *string `json:"public_key,omitempty"`
}

AddSSHKey - The name for the SSH key. Optionally, an existing public key can be supplied for the `public_key` property. If the `public_key` property is omitted, a new key pair is generated. The private key is returned in the response.

func (*AddSSHKey) GetName

func (o *AddSSHKey) GetName() string

func (*AddSSHKey) GetPublicKey

func (o *AddSSHKey) GetPublicKey() *string

type Data

type Data struct {
	// Hardware configuration and pricing of an instance type
	InstanceType InstanceType `json:"instance_type"`
	// List of regions, if any, that have this instance type available
	RegionsWithCapacityAvailable []Region `json:"regions_with_capacity_available"`
}

func (*Data) GetInstanceType

func (o *Data) GetInstanceType() InstanceType

func (*Data) GetRegionsWithCapacityAvailable

func (o *Data) GetRegionsWithCapacityAvailable() []Region

type Error

type Error struct {
	// Unique identifier for the type of error
	Code ErrorCode `json:"code"`
	// Detailed description of the error
	Message string `json:"message"`
	// Suggestion of possible ways to fix the error.
	Suggestion *string `json:"suggestion,omitempty"`
}

func (*Error) GetCode

func (o *Error) GetCode() ErrorCode

func (*Error) GetMessage

func (o *Error) GetMessage() string

func (*Error) GetSuggestion

func (o *Error) GetSuggestion() *string

type ErrorCode

type ErrorCode string

ErrorCode - Unique identifier for the type of error

const (
	ErrorCodeGlobalUnknown                                   ErrorCode = "global/unknown"
	ErrorCodeGlobalInvalidAPIKey                             ErrorCode = "global/invalid-api-key"
	ErrorCodeGlobalAccountInactive                           ErrorCode = "global/account-inactive"
	ErrorCodeGlobalInvalidAddress                            ErrorCode = "global/invalid-address"
	ErrorCodeGlobalInvalidParameters                         ErrorCode = "global/invalid-parameters"
	ErrorCodeGlobalObjectDoesNotExist                        ErrorCode = "global/object-does-not-exist"
	ErrorCodeGlobalQuotaExceeded                             ErrorCode = "global/quota-exceeded"
	ErrorCodeInstanceOperationsLaunchInsufficientCapacity    ErrorCode = "instance-operations/launch/insufficient-capacity"
	ErrorCodeInstanceOperationsLaunchFileSystemInWrongRegion ErrorCode = "instance-operations/launch/file-system-in-wrong-region"
	ErrorCodeSSHKeysKeyInUse                                 ErrorCode = "ssh-keys/key-in-use"
)

func (ErrorCode) ToPointer

func (e ErrorCode) ToPointer() *ErrorCode

func (*ErrorCode) UnmarshalJSON

func (e *ErrorCode) UnmarshalJSON(data []byte) error

type ErrorResponseBody

type ErrorResponseBody struct {
	Error Error `json:"error"`
	// Details about errors on a per-parameter basis
	FieldErrors map[string]Error `json:"field_errors,omitempty"`
}

func (*ErrorResponseBody) GetError

func (o *ErrorResponseBody) GetError() Error

func (*ErrorResponseBody) GetFieldErrors

func (o *ErrorResponseBody) GetFieldErrors() map[string]Error

type FileSystem

type FileSystem struct {
	// Unique identifier (ID) of a file system
	ID string `json:"id"`
	// Name of a file system
	Name string `json:"name"`
	// A date and time, formatted as an ISO 8601 time stamp
	Created string `json:"created"`
	// Information about a user in your team
	CreatedBy User `json:"created_by"`
	// Absolute path indicating where on instances the file system will be mounted
	MountPoint string `json:"mount_point"`
	Region     Region `json:"region"`
	// Whether the file system is currently in use by an instance. File systems that are in use cannot be deleted.
	IsInUse bool `json:"is_in_use"`
	// Approximate amount of storage used by the file system, in bytes. This value is an estimate that is updated every several hours.
	BytesUsed *int64 `json:"bytes_used,omitempty"`
}

FileSystem - Information about a shared file system

func (*FileSystem) GetBytesUsed

func (o *FileSystem) GetBytesUsed() *int64

func (*FileSystem) GetCreated

func (o *FileSystem) GetCreated() string

func (*FileSystem) GetCreatedBy

func (o *FileSystem) GetCreatedBy() User

func (*FileSystem) GetID

func (o *FileSystem) GetID() string

func (*FileSystem) GetIsInUse

func (o *FileSystem) GetIsInUse() bool

func (*FileSystem) GetMountPoint

func (o *FileSystem) GetMountPoint() string

func (*FileSystem) GetName

func (o *FileSystem) GetName() string

func (*FileSystem) GetRegion

func (o *FileSystem) GetRegion() Region

type FileSystems

type FileSystems struct {
	Data []FileSystem `json:"data"`
}

func (*FileSystems) GetData

func (o *FileSystems) GetData() []FileSystem

type Instance

type Instance struct {
	// Unique identifier (ID) of an instance
	ID string `json:"id"`
	// User-provided name for the instance
	Name *string `json:"name,omitempty"`
	// IPv4 address of the instance
	IP *string `json:"ip,omitempty"`
	// Private IPv4 address of the instance
	PrivateIP *string `json:"private_ip,omitempty"`
	// The current status of the instance
	Status Status `json:"status"`
	// Names of the SSH keys allowed to access the instance
	SSHKeyNames []string `json:"ssh_key_names"`
	// Names of the file systems, if any, attached to the instance
	FileSystemNames []string `json:"file_system_names"`
	Region          *Region  `json:"region,omitempty"`
	// Hardware configuration and pricing of an instance type
	InstanceType *InstanceType `json:"instance_type,omitempty"`
	// Hostname assigned to this instance, which resolves to the instance's IP.
	Hostname *string `json:"hostname,omitempty"`
	// Secret token used to log into the jupyter lab server hosted on the instance.
	JupyterToken *string `json:"jupyter_token,omitempty"`
	// URL that opens a jupyter lab notebook on the instance.
	JupyterURL *string `json:"jupyter_url,omitempty"`
	// Whether the instance is reserved.
	IsReserved *bool `json:"is_reserved,omitempty"`
}

Instance - Virtual machine (VM) in Lambda Cloud

func (*Instance) GetFileSystemNames

func (o *Instance) GetFileSystemNames() []string

func (*Instance) GetHostname

func (o *Instance) GetHostname() *string

func (*Instance) GetID

func (o *Instance) GetID() string

func (*Instance) GetIP

func (o *Instance) GetIP() *string

func (*Instance) GetInstanceType

func (o *Instance) GetInstanceType() *InstanceType

func (*Instance) GetIsReserved

func (o *Instance) GetIsReserved() *bool

func (*Instance) GetJupyterToken

func (o *Instance) GetJupyterToken() *string

func (*Instance) GetJupyterURL

func (o *Instance) GetJupyterURL() *string

func (*Instance) GetName

func (o *Instance) GetName() *string

func (*Instance) GetPrivateIP

func (o *Instance) GetPrivateIP() *string

func (*Instance) GetRegion

func (o *Instance) GetRegion() *Region

func (*Instance) GetSSHKeyNames

func (o *Instance) GetSSHKeyNames() []string

func (*Instance) GetStatus

func (o *Instance) GetStatus() Status

type InstanceType

type InstanceType struct {
	// Name of an instance type
	Name string `json:"name"`
	// Long name of the instance type
	Description string `json:"description"`
	// Description of the GPU(s) in the instance type
	GpuDescription string `json:"gpu_description"`
	// Price of the instance type, in US cents per hour
	PriceCentsPerHour int64 `json:"price_cents_per_hour"`
	Specs             Specs `json:"specs"`
}

InstanceType - Hardware configuration and pricing of an instance type

func (*InstanceType) GetDescription

func (o *InstanceType) GetDescription() string

func (*InstanceType) GetGpuDescription

func (o *InstanceType) GetGpuDescription() string

func (*InstanceType) GetName

func (o *InstanceType) GetName() string

func (*InstanceType) GetPriceCentsPerHour

func (o *InstanceType) GetPriceCentsPerHour() int64

func (*InstanceType) GetSpecs

func (o *InstanceType) GetSpecs() Specs

type InstanceTypes

type InstanceTypes struct {
	// Dict of instance_type_name to instance_type and region availability.
	Data map[string]Data `json:"data"`
}

func (*InstanceTypes) GetData

func (o *InstanceTypes) GetData() map[string]Data

type Instances

type Instances struct {
	Data []Instance `json:"data"`
}

func (*Instances) GetData

func (o *Instances) GetData() []Instance

type Launch

type Launch struct {
	// Short name of a region
	RegionName string `json:"region_name"`
	// Name of an instance type
	InstanceTypeName string `json:"instance_type_name"`
	// Names of the SSH keys to allow access to the instances. Currently, exactly one SSH key must be specified.
	SSHKeyNames []string `json:"ssh_key_names"`
	// Names of the file systems to attach to the instances. Currently, only one (if any) file system may be specified.
	FileSystemNames []string `json:"file_system_names,omitempty"`
	// Number of instances to launch
	Quantity *int64 `default:"1" json:"quantity"`
	// User-provided name for the instance
	Name *string `json:"name,omitempty"`
}

func (*Launch) GetFileSystemNames

func (o *Launch) GetFileSystemNames() []string

func (*Launch) GetInstanceTypeName

func (o *Launch) GetInstanceTypeName() string

func (*Launch) GetName

func (o *Launch) GetName() *string

func (*Launch) GetQuantity

func (o *Launch) GetQuantity() *int64

func (*Launch) GetRegionName

func (o *Launch) GetRegionName() string

func (*Launch) GetSSHKeyNames

func (o *Launch) GetSSHKeyNames() []string

func (Launch) MarshalJSON

func (l Launch) MarshalJSON() ([]byte, error)

func (*Launch) UnmarshalJSON

func (l *Launch) UnmarshalJSON(data []byte) error

type LaunchData

type LaunchData struct {
	// The unique identifiers (IDs) of the launched instances. Note: if a quantity was specified, fewer than the requested quantity might have been launched.
	InstanceIds []string `json:"instance_ids"`
}

func (*LaunchData) GetInstanceIds

func (o *LaunchData) GetInstanceIds() []string

type Region

type Region struct {
	// Short name of a region
	Name string `json:"name"`
	// Long name of a region
	Description string `json:"description"`
}

func (*Region) GetDescription

func (o *Region) GetDescription() string

func (*Region) GetName

func (o *Region) GetName() string

type ResponseAddSSHKey

type ResponseAddSSHKey struct {
	// Information about a stored SSH key, which can be used to access instances over SSH
	Data SSHKey `json:"data"`
}

ResponseAddSSHKey - The added or generated SSH public key. If a new key pair was generated, the response body contains a `private_key` property that *must* be saved locally. Lambda Cloud does not store private keys.

func (*ResponseAddSSHKey) GetData

func (o *ResponseAddSSHKey) GetData() SSHKey

type ResponseInstance

type ResponseInstance struct {
	// Virtual machine (VM) in Lambda Cloud
	Data Instance `json:"data"`
}

func (*ResponseInstance) GetData

func (o *ResponseInstance) GetData() Instance

type ResponseLaunch

type ResponseLaunch struct {
	Data LaunchData `json:"data"`
}

func (*ResponseLaunch) GetData

func (o *ResponseLaunch) GetData() LaunchData

type ResponseRestart

type ResponseRestart struct {
	Data RestartData `json:"data"`
}

func (*ResponseRestart) GetData

func (o *ResponseRestart) GetData() RestartData

type ResponseTerminate

type ResponseTerminate struct {
	Data TerminateData `json:"data"`
}

func (*ResponseTerminate) GetData

func (o *ResponseTerminate) GetData() TerminateData

type Restart

type Restart struct {
	// The unique identifiers (IDs) of the instances to restart
	InstanceIds []string `json:"instance_ids"`
}

func (*Restart) GetInstanceIds

func (o *Restart) GetInstanceIds() []string

type RestartData

type RestartData struct {
	// List of instances that were restarted. Note: this list might not contain all instances requested to be restarted.
	RestartedInstances []Instance `json:"restarted_instances"`
}

func (*RestartData) GetRestartedInstances

func (o *RestartData) GetRestartedInstances() []Instance

type SSHKey

type SSHKey struct {
	// Unique identifier (ID) of an SSH key
	ID string `json:"id"`
	// Name of the SSH key
	Name string `json:"name"`
	// Public key for the SSH key
	PublicKey string `json:"public_key"`
	// Private key for the SSH key. Only returned when generating a new key pair.
	PrivateKey *string `json:"private_key,omitempty"`
}

SSHKey - Information about a stored SSH key, which can be used to access instances over SSH

func (*SSHKey) GetID

func (o *SSHKey) GetID() string

func (*SSHKey) GetName

func (o *SSHKey) GetName() string

func (*SSHKey) GetPrivateKey

func (o *SSHKey) GetPrivateKey() *string

func (*SSHKey) GetPublicKey

func (o *SSHKey) GetPublicKey() string

type SSHKeys

type SSHKeys struct {
	Data []SSHKey `json:"data"`
}

func (*SSHKeys) GetData

func (o *SSHKeys) GetData() []SSHKey

type Security

type Security struct {
	BearerAuth *string `security:"scheme,type=http,subtype=bearer,name=Authorization"`
}

func (*Security) GetBearerAuth

func (o *Security) GetBearerAuth() *string

type Specs

type Specs struct {
	// Number of virtual CPUs
	Vcpus int64 `json:"vcpus"`
	// Amount of RAM, in gibibytes (GiB)
	MemoryGib int64 `json:"memory_gib"`
	// Amount of storage, in gibibytes (GiB).
	StorageGib int64 `json:"storage_gib"`
	// Number of GPUs
	Gpus int64 `json:"gpus"`
}

func (*Specs) GetGpus

func (o *Specs) GetGpus() int64

func (*Specs) GetMemoryGib

func (o *Specs) GetMemoryGib() int64

func (*Specs) GetStorageGib

func (o *Specs) GetStorageGib() int64

func (*Specs) GetVcpus

func (o *Specs) GetVcpus() int64

type Status

type Status string

Status - The current status of the instance

const (
	StatusActive      Status = "active"
	StatusBooting     Status = "booting"
	StatusUnhealthy   Status = "unhealthy"
	StatusTerminating Status = "terminating"
	StatusTerminated  Status = "terminated"
)

func (Status) ToPointer

func (e Status) ToPointer() *Status

func (*Status) UnmarshalJSON

func (e *Status) UnmarshalJSON(data []byte) error

type Terminate

type Terminate struct {
	// The unique identifiers (IDs) of the instances to terminate
	InstanceIds []string `json:"instance_ids"`
}

func (*Terminate) GetInstanceIds

func (o *Terminate) GetInstanceIds() []string

type TerminateData

type TerminateData struct {
	// List of instances that were terminated. Note: this list might not contain all instances requested to be terminated.
	TerminatedInstances []Instance `json:"terminated_instances"`
}

func (*TerminateData) GetTerminatedInstances

func (o *TerminateData) GetTerminatedInstances() []Instance

type Update added in v0.1.3

type Update struct {
	// Unique identifier (ID) of an instance
	ID string `json:"id"`
	// User-provided name for the instance
	Name *string `json:"name"`
}

func (*Update) GetID added in v0.1.3

func (o *Update) GetID() string

func (*Update) GetName added in v0.1.3

func (o *Update) GetName() *string

type User

type User struct {
	// Unique identifier for the user
	ID string `json:"id"`
	// Email address of the user
	Email string `json:"email"`
	// Status of the user's account
	Status UserStatus `json:"status"`
}

User - Information about a user in your team

func (*User) GetEmail

func (o *User) GetEmail() string

func (*User) GetID

func (o *User) GetID() string

func (*User) GetStatus

func (o *User) GetStatus() UserStatus

type UserStatus

type UserStatus string

UserStatus - Status of the user's account

const (
	UserStatusActive      UserStatus = "active"
	UserStatusDeactivated UserStatus = "deactivated"
)

func (UserStatus) ToPointer

func (e UserStatus) ToPointer() *UserStatus

func (*UserStatus) UnmarshalJSON

func (e *UserStatus) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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