Lambda

App · 20 actions

Manage Lambda Cloud GPU instances, SSH keys and shared file systems.

Actions

ActionWhat it does
Add SSH keyAdd an SSH key to your Lambda Cloud account.
Create file systemCreates a new filesystem.
Delete file systemDeletes the filesystem with the specified ID.
Delete SSH keyDeletes the specified SSH key.
Get current identityRetrieves the details of the current identity.
Get instanceRetrieves the details of a specific instance, including whether or not the instance is running.
Get workspaceRetrieves the details of a specific workspace.
Launch instanceLaunches a Lambda On-Demand Cloud instance.
List audit eventsRetrieves a list of audit events that have occurred in your account.
List file systemsRetrieves a list of your filesystems.
List firewall rulesetsRetrieves a list of your firewall rulesets.
List imagesRetrieves a list of available images by region.
List instance typesRetrieves a list of the instance types currently offered on Lambda's public cloud, as well as details about each type.
List instancesRetrieves a list of your running instances.
List regionsRetrieves a list of available regions.
List SSH keysRetrieves a list of your SSH keys.
List workspacesLists the workspaces the requester is a member of, by default (when view=membership), or all workspaces in the account (when view=all).
Restart instancesRestarts one or more instances.
Terminate instancesTerminates one or more instances.
Update instanceUpdates the details of the specified instance.

Add SSH key

Add an SSH key to your Lambda Cloud account. You can upload an existing public key, or you can generate a new key pair.

Inputs

NamenametextRequired
The name of the SSH key.
Public keypublic_keytextRequired
The public key to store. Omit this to generate a new key pair.
Workspaceworkspace_idtext
The unique identifier (ID) of the workspace that will own this SSH key. Defaults to the account's default workspace.

Outputs

dataobject
Result.
Example output
{
  "data": {
    "data": {
      "id": "example",
      "name": "example",
      "public_key": "example",
      "workspace_id": "example"
    }
  }
}

Create file system

Creates a new filesystem.

Inputs

NamenametextRequired
The name of the filesystem.
RegionregiontextRequired
The region in which you want to create the filesystem.
Workspaceworkspace_idtext
The workspace in which to create the filesystem. If not specified, the filesystem will be created within the default workspace.

Outputs

dataobject
Result.
Example output
{
  "data": {
    "data": {
      "bytes_used": 1,
      "created": "example",
      "created_by": {
        "email": "example",
        "id": "example",
        "status": "example"
      },
      "id": "example",
      "is_in_use": false,
      "mount_point": "example",
      "name": "example",
      "region": {
        "description": "example",
        "name": "example"
      },
      "workspace_id": "example"
    }
  }
}

Delete file system

Deletes the filesystem with the specified ID. The filesystem must not be mounted to any running instances at the time of deletion.

Inputs

File systemfile_system_idtextRequired
The unique identifier (ID) of the filesystem to delete

Outputs

dataobject
Result.
Example output
{
  "data": {
    "data": {
      "deleted_ids": []
    }
  }
}

Delete SSH key

Deletes the specified SSH key.

Inputs

SSH keyssh_key_idtextRequired
The unique identifier (ID) of the SSH key to delete

Outputs

dataobject
Result.
Example output
{
  "data": {
    "data": {}
  }
}

Get current identity

Retrieves the details of the current identity.

Inputs

None.

Outputs

dataobject
Result.
Example output
{
  "data": {
    "data": {
      "account_id": "example",
      "created_at": "example",
      "display_name": "example",
      "email": "example",
      "first_name": "example",
      "id": "example",
      "identity_type": "example",
      "is_managed": false,
      "is_verified": false,
      "last_name": "example",
      "status": "example"
    }
  }
}

Get instance

Retrieves the details of a specific instance, including whether or not the instance is running.

Inputs

Instanceinstance_idtextRequired
The unique identifier (ID) of the instance

Outputs

dataobject
Result.
Example output
{
  "data": {
    "data": {
      "actions": {
        "cold_reboot": {
          "available": false,
          "reason_description": "example"
        },
        "migrate": {
          "available": false,
          "reason_description": "example"
        },
        "power_cycle": {
          "available": false,
          "reason_description": "example"
        },
        "rebuild": {
          "available": false,
          "reason_description": "example"
        },
        "restart": {
          "available": false,
          "reason_description": "example"
        },
        "terminate": {
          "available": false,
          "reason_description": "example"
        }
      },
      "file_system_mounts": [],
      "file_system_names": [],
      "firewall_rulesets": [],
      "first_healthy": "example",
      "hostname": "example",
      "id": "example",
      "image": {
        "family": "example",
        "id": "example"
      },
      "instance_type": {
        "architecture": "example",
        "description": "example",
        "gpu_description": "example",
        "name": "example",
        "price_cents_per_hour": 1,
        "specs": {
          "gpus": 1,
          "memory_gib": 1,
          "storage_gib": 1,
          "vcpus": 1
        }
      },
      "ip": "example",
      "name": "example",
      "private_ip": "example",
      "region": {
        "description": "example",
        "name": "example"
      },
      "ssh_key_names": [],
      "status": "example",
      "tags": [],
      "workspace_id": "example"
    }
  }
}

Get workspace

Retrieves the details of a specific workspace.

Inputs

Workspaceworkspace_idtextRequired
The unique identifier (ID) of the workspace

Outputs

dataobject
Result.
Example output
{
  "data": {
    "data": {
      "account_id": "example",
      "created": "example",
      "id": "example",
      "is_default": false,
      "name": "example"
    }
  }
}

Launch instance

Launches a Lambda On-Demand Cloud instance.

Inputs

Region nameregion_nametextRequired
The region into which you want to launch the instance.
Instance type nameinstance_type_nametextRequired
The type of instance you want to launch. To retrieve a list of available instance types, see List available instance types.
SSH key namesssh_key_nameslistRequired
The names of the SSH keys you want to use to provide access to the instance. Currently, exactly one SSH key must be specified.
File system namesfile_system_nameslist
The names of the filesystems you want to mount to the instance. When specified alongside file_system_mounts, any filesystems referred to in both lists will use the mount path specified in file_system_mounts, rather than the default.
File system mountsfile_system_mountslist
The filesystem mounts to mount to the instance. When specified alongside file_system_names, any filesystems referred to in both lists will use the mount path specified in file_system_mounts, rather than the default.
Hostnamehostnametext
The hostname to assign to the instance. If not specified, a default, IP-address-based hostname is assigned. This hostname is driven into /etc/hostname on the instance.
Namenametext
The name you want to assign to your instance. Must be 64 characters or fewer.
Imageimageobject
The machine image you want to use. Defaults to the latest Lambda Stack image.
User datauser_datatext
An instance configuration string specified in a valid cloud-init user-data format. You can use this field to configure your instance on launch. The user data string must be plain text and cannot exceed 1MB in size.
Tagstagslist
Key/value pairs representing the instance's tags.
Firewall rulesetsfirewall_rulesetslist
The firewall rulesets to associate with the instance. The firewall rulesets must exist in the same region as the instance.
Workspaceworkspace_idtext
The workspace ID to associate with the instance. When specified, the instance will be created within the specified workspace.

Outputs

dataobject
Result.
Example output
{
  "data": {
    "data": {
      "instance_ids": []
    }
  }
}

List audit events

Retrieves a list of audit events that have occurred in your account. To view the full catalog of possible audit events, visit Access and security > Audit logs in the Lambda Cloud documentation.

Inputs

Startstartdate and time
An ISO 8601 timestamp defining the start of the time range to query, inclusive. If omitted, the response starts at the earliest available event.
Endenddate and time
An ISO 8601 timestamp defining the end of the time range to query, inclusive. If omitted, the response ends at the most recent event.
Page tokenpage_tokentext
The token returned by the previous API response to retrieve the next page of results.
Resource typeresource_typetext
The resource type to filter by. By default, all available resource types are retrieved.

Outputs

dataobject
Result.
Example output
{
  "data": {
    "data": [],
    "page_token": "example"
  }
}

List file systems

Retrieves a list of your filesystems.

Inputs

Workspaceworkspace_idtext
The unique identifier (ID) of the workspace to filter by

Outputs

dataobject
Result.
Example output
{
  "data": {
    "data": []
  }
}

List firewall rulesets

Retrieves a list of your firewall rulesets.

Inputs

Workspaceworkspace_idtext
The unique identifier (ID) of the workspace to filter by

Outputs

dataobject
Result.
Example output
{
  "data": {
    "data": []
  }
}

List images

Retrieves a list of available images by region.

Inputs

Workspaceworkspace_idtext
The unique identifier (ID) of the workspace to filter by

Outputs

dataobject
Result.
Example output
{
  "data": {
    "data": []
  }
}

List instance types

Retrieves a list of the instance types currently offered on Lambda's public cloud, as well as details about each type. Details include resource specifications, pricing, and regional availability.

Inputs

Workspaceworkspace_idtext
The unique identifier (ID) of the workspace to filter by

Outputs

dataobject
Result.
Example output
{
  "data": {
    "data": {}
  }
}

List instances

Retrieves a list of your running instances.

Inputs

Page sizepage_sizenumber
Maximum number of results per page. Can be between 1 and 100. The default is 50.
Page tokenpage_tokentext
A page token for cursor-based pagination.
Cluster IDcluster_idtext
If provided, the resulting list will only include instances that are part of a cluster with this unique identifier (ID).
Workspaceworkspace_idtext
The unique identifier (ID) of the workspace to filter by

Outputs

dataobject
Result.
Example output
{
  "data": {
    "data": [],
    "page_token": "example"
  }
}

List regions

Retrieves a list of available regions.

Inputs

None.

Outputs

dataobject
Result.
Example output
{
  "data": {
    "data": []
  }
}

List SSH keys

Retrieves a list of your SSH keys.

Inputs

Workspaceworkspace_idtext
The unique identifier (ID) of the workspace to filter by

Outputs

dataobject
Result.
Example output
{
  "data": {
    "data": []
  }
}

List workspaces

Lists the workspaces the requester is a member of, by default (when view=membership), or all workspaces in the account (when view=all). The view=all option requires the iam:workspace:read permission on the account.

Inputs

Viewviewtext
View.One of: membership, all. Default: membership.

Outputs

dataobject
Result.
Example output
{
  "data": {
    "data": []
  }
}

Restart instances

Restarts one or more instances.

Inputs

Instance IDSinstance_idslistRequired
The unique identifiers (IDs) of the instances to restart.

Outputs

dataobject
Result.
Example output
{
  "data": {
    "data": {
      "restarted_instances": []
    }
  }
}

Terminate instances

Terminates one or more instances.

Inputs

Instance IDSinstance_idslistRequired
The unique identifiers (IDs) of the instances to terminate.

Outputs

dataobject
Result.
Example output
{
  "data": {
    "data": {
      "terminated_instances": []
    }
  }
}

Update instance

Updates the details of the specified instance.

Inputs

Instanceinstance_idtextRequired
The unique identifier (ID) of the instance
Namenametext
The new, user-provided name for the instance.
Tagstagslist
The new tags for the instance. If provided, this replaces the existing tags (an empty list clears them). If not provided, the tags will not be updated.

Outputs

dataobject
Result.
Example output
{
  "data": {
    "data": {
      "actions": {
        "cold_reboot": {
          "available": false,
          "reason_description": "example"
        },
        "migrate": {
          "available": false,
          "reason_description": "example"
        },
        "power_cycle": {
          "available": false,
          "reason_description": "example"
        },
        "rebuild": {
          "available": false,
          "reason_description": "example"
        },
        "restart": {
          "available": false,
          "reason_description": "example"
        },
        "terminate": {
          "available": false,
          "reason_description": "example"
        }
      },
      "file_system_mounts": [],
      "file_system_names": [],
      "firewall_rulesets": [],
      "first_healthy": "example",
      "hostname": "example",
      "id": "example",
      "image": {
        "family": "example",
        "id": "example"
      },
      "instance_type": {
        "architecture": "example",
        "description": "example",
        "gpu_description": "example",
        "name": "example",
        "price_cents_per_hour": 1,
        "specs": {
          "gpus": 1,
          "memory_gib": 1,
          "storage_gib": 1,
          "vcpus": 1
        }
      },
      "ip": "example",
      "jupyter_token": "example",
      "jupyter_url": "example",
      "name": "example",
      "private_ip": "example",
      "region": {
        "description": "example",
        "name": "example"
      },
      "ssh_key_names": [],
      "status": "example",
      "tags": [],
      "workspace_id": "example"
    }
  }
}

On this page