navsection: api
navmenu: API Methods
title: "virtual_machines"
-
...
+{% comment %}
+Copyright (C) The Arvados Authors. All rights reserved.
+SPDX-License-Identifier: CC-BY-SA-3.0
+{% endcomment %}
+API endpoint base: @https://{{ site.arvados_api_host }}/arvados/v1/virtual_machines@
-Required arguments are displayed in %{background:#ccffcc}green%.
+Object type: @2x53u@
+Example UUID: @zzzzz-2x53u-0123456789abcde@
-h2. create
+h2. Resource
-Create a new VirtualMachine.
+The virtual_machines resource lists compute resources in the Arvados cluster to which a user may log in to get an interactive shell (via ssh or webshell).
-Arguments:
+Each VirtualMachine has, in addition to the "Common resource fields":{{site.baseurl}}/api/resources.html:
table(table table-bordered table-condensed).
-|_. Argument |_. Type |_. Description |_. Location |_. Example |
-|virtual_machine|object||query||
+|_. Attribute|_. Type|_. Description|_. Example|
+|hostname|string|||
-h2. delete
+h2. Methods
-Delete an existing VirtualMachine.
+See "Common resource methods":{{site.baseurl}}/api/methods.html for more information about @create@, @delete@, @get@, @list@, and @update@.
+
+Required arguments are displayed in %{background:#ccffcc}green%.
+
+h3. create
+
+Create a new VirtualMachine.
Arguments:
table(table table-bordered table-condensed).
|_. Argument |_. Type |_. Description |_. Location |_. Example |
-{background:#ccffcc}.|uuid|string|The UUID of the VirtualMachine in question.|path||
+|virtual_machine|object||query||
-h2. destroy
+h3. delete
-destroy virtual_machines
+Delete an existing VirtualMachine.
Arguments:
table(table table-bordered table-condensed).
|_. Argument |_. Type |_. Description |_. Location |_. Example |
-{background:#ccffcc}.|uuid|string||path||
+{background:#ccffcc}.|uuid|string|The UUID of the VirtualMachine in question.|path||
-h2. get
+h3. get
Gets a VirtualMachine's metadata by UUID.
|_. Argument |_. Type |_. Description |_. Location |_. Example |
{background:#ccffcc}.|uuid|string|The UUID of the VirtualMachine in question.|path||
-h2. get_all_logins
+h3(#logins). logins
-get_all_logins virtual_machines
+Get a list of SSH keys and account names that should be able to log in to a given virtual machine.
Arguments:
table(table table-bordered table-condensed).
|_. Argument |_. Type |_. Description |_. Location |_. Example |
+{background:#ccffcc}.|uuid|string||path||
-h2. list
+The response is an object with the field @items@ containing an array of objects in the following format:
-List virtual_machines.
+table(table table-bordered table-condensed).
+|_. Key|_. Value type|_. Description|_. Example|
+|username|string|Name of the Unix login account to which the user should be able to log in|@"jsmith"@|
+|hostname|string|Hostname of the virtual machine|@"shell.xyzzy.arvadosapi.com"@|
+|public_key|string|SSH public key|@"ssh-rsa AAAAB3NzaC1yc2E..."@|
+|user_uuid|string|UUID of the user who should be able to log in|@"xyzzy-tpzed-mv4d7dy7n91te11"@|
+|virtual_machine_uuid|string|UUID of the "virtual machine resource":{{site.baseurl}}/api/methods/virtual_machines.html|@"zzzzz-2x53u-kvszmclnbjuv8xc"@|
+|authorized_key_uuid|string|UUID of the "authorized key resource":{{site.baseurl}}/api/methods/authorized_keys.html|@"zzzzz-fngyi-v9p0cyfmjxbio64"@|
-Arguments:
+h3. get_all_logins
-table(table table-bordered table-condensed).
-|_. Argument |_. Type |_. Description |_. Location |_. Example |
-|limit|integer (default 100)|Maximum number of virtual_machines to return.|query||
-|order|string|Order in which to return matching virtual_machines.|query||
-|filters|array|Conditions for filtering virtual_machines.|query||
+Get a list of SSH keys and account names that should be able to log in for every virtual machine in the system.
-h2. logins
+Arguments: none.
-logins virtual_machines
+The response has the same format as the response to the "logins method":#logins above.
-Arguments:
+h3. list
-table(table table-bordered table-condensed).
-|_. Argument |_. Type |_. Description |_. Location |_. Example |
-{background:#ccffcc}.|uuid|string||path||
+List virtual_machines.
+
+See "common resource list method.":{{site.baseurl}}/api/methods.html#index
-h2. update
+h3. update
Update attributes of an existing VirtualMachine.