Documentation
¶
Index ¶
- type AddSSHKey
- type Data
- type Error
- type ErrorCode
- type ErrorResponseBody
- type FileSystem
- func (o *FileSystem) GetBytesUsed() *int64
- func (o *FileSystem) GetCreated() string
- func (o *FileSystem) GetCreatedBy() User
- func (o *FileSystem) GetID() string
- func (o *FileSystem) GetIsInUse() bool
- func (o *FileSystem) GetMountPoint() string
- func (o *FileSystem) GetName() string
- func (o *FileSystem) GetRegion() Region
- type FileSystems
- type Instance
- func (o *Instance) GetFileSystemNames() []string
- func (o *Instance) GetHostname() *string
- func (o *Instance) GetID() string
- func (o *Instance) GetIP() *string
- func (o *Instance) GetInstanceType() *InstanceType
- func (o *Instance) GetIsReserved() *bool
- func (o *Instance) GetJupyterToken() *string
- func (o *Instance) GetJupyterURL() *string
- func (o *Instance) GetName() *string
- func (o *Instance) GetPrivateIP() *string
- func (o *Instance) GetRegion() *Region
- func (o *Instance) GetSSHKeyNames() []string
- func (o *Instance) GetStatus() Status
- type InstanceType
- type InstanceTypes
- type Instances
- type Launch
- func (o *Launch) GetFileSystemNames() []string
- func (o *Launch) GetInstanceTypeName() string
- func (o *Launch) GetName() *string
- func (o *Launch) GetQuantity() *int64
- func (o *Launch) GetRegionName() string
- func (o *Launch) GetSSHKeyNames() []string
- func (l Launch) MarshalJSON() ([]byte, error)
- func (l *Launch) UnmarshalJSON(data []byte) error
- type LaunchData
- type Region
- type ResponseAddSSHKey
- type ResponseInstance
- type ResponseLaunch
- type ResponseRestart
- type ResponseTerminate
- type Restart
- type RestartData
- type SSHKey
- type SSHKeys
- type Security
- type Specs
- type Status
- type Terminate
- type TerminateData
- type User
- type UserStatus
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) GetPublicKey ¶
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 ¶
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) GetMessage ¶
func (*Error) GetSuggestion ¶
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) UnmarshalJSON ¶
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"`
}
ErrorResponseBody - Unauthorized.
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"`
}
FileSystems - OK
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 (*Instance) GetHostname ¶
func (*Instance) GetInstanceType ¶
func (o *Instance) GetInstanceType() *InstanceType
func (*Instance) GetIsReserved ¶
func (*Instance) GetJupyterToken ¶
func (*Instance) GetJupyterURL ¶
func (*Instance) GetPrivateIP ¶
func (*Instance) GetSSHKeyNames ¶
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"`
}
InstanceTypes - OK
func (*InstanceTypes) GetData ¶
func (o *InstanceTypes) GetData() map[string]Data
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 (*Launch) GetInstanceTypeName ¶
func (*Launch) GetQuantity ¶
func (*Launch) GetRegionName ¶
func (*Launch) GetSSHKeyNames ¶
func (Launch) MarshalJSON ¶
func (*Launch) UnmarshalJSON ¶
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 ¶
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"`
}
ResponseInstance - OK
func (*ResponseInstance) GetData ¶
func (o *ResponseInstance) GetData() Instance
type ResponseLaunch ¶
type ResponseLaunch struct {
Data LaunchData `json:"data"`
}
ResponseLaunch - OK
func (*ResponseLaunch) GetData ¶
func (o *ResponseLaunch) GetData() LaunchData
type ResponseRestart ¶
type ResponseRestart struct {
Data RestartData `json:"data"`
}
ResponseRestart - OK
func (*ResponseRestart) GetData ¶
func (o *ResponseRestart) GetData() RestartData
type ResponseTerminate ¶
type ResponseTerminate struct {
Data TerminateData `json:"data"`
}
ResponseTerminate - OK
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 ¶
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) GetPrivateKey ¶
func (*SSHKey) GetPublicKey ¶
type Security ¶
type Security struct {
BearerAuth *string `security:"scheme,type=http,subtype=bearer,name=Authorization"`
}
func (*Security) GetBearerAuth ¶
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) GetMemoryGib ¶
func (*Specs) GetStorageGib ¶
type Status ¶
type Status string
Status - The current status of the instance
func (*Status) UnmarshalJSON ¶
type Terminate ¶
type Terminate struct {
// The unique identifiers (IDs) of the instances to terminate
InstanceIds []string `json:"instance_ids"`
}
func (*Terminate) GetInstanceIds ¶
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 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) 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
Source Files
¶
- addsshkey.go
- error.go
- errorcode.go
- errorresponsebody.go
- filesystem.go
- filesystems.go
- instance.go
- instances.go
- instancetype.go
- instancetypes.go
- launch.go
- region.go
- responseaddsshkey.go
- responseinstance.go
- responselaunch.go
- responserestart.go
- responseterminate.go
- restart.go
- security.go
- sshkey.go
- sshkeys.go
- terminate.go
- user.go