Retrieve Details of all Instances in a Container
/instance/{container}/
?parameter1=value1&parameter2=value2&parameterN=valueN
Required Role: To complete this task, you must have the Compute_Monitor
or Compute_Operations
role. If this role isn't assigned to you or you're not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud My Services. See Modifying User Roles in Managing and Monitoring Oracle Cloud.
Request
- application/oracle-compute-v3+json
-
container: string
/Compute-identity_domain/user
or/Compute-identity_domain
-
availability_domain(optional): string
The availability domain the instance is in
-
tags(optional): array
Strings used to tag the instance. When you specify tags, only instances tagged with the specified value are displayed.
-
Cookie: string
The Cookie: header must be included with every request to the service. It must be set to the value of the set-cookie header in the response received to the POST /authenticate/ call.
Response
- application/oracle-compute-v3+json
200 Response
-
set-cookie: string
The cookie value is returned if the session is extended
object
-
account(optional):
string
Shows the default account for your identity domain.
-
attributes(optional):
object attributes
Additional Properties Allowed: additionalPropertiesA dictionary of attributes to be made available to the instance. A value with the key "userdata" will be made available in an EC2-compatible manner.
-
availability_domain(optional):
string
The availability domain the instance is in
-
boot_order(optional):
array boot_order
Boot order list.
-
desired_state(optional):
string
Desired state for the instance. The value can be
shutdown
orrunning
to shutdown an instance or to restart a previously shutdown instance respectively. -
disk_attach(optional):
string
A label assigned by the user to identify disks.
-
domain(optional):
string
The default domain to use for the hostname and for DNS lookups.
-
entry(optional):
integer
Optional imagelistentry number (default will be used if not specified).
-
error_reason(optional):
string
The reason for the instance going to error state, if available.
-
fingerprint(optional):
string
SSH server fingerprint presented by the instance.
-
hostname(optional):
string
The hostname for this instance.
-
hypervisor(optional):
object hypervisor
Additional Properties Allowed: additionalPropertiesA dictionary of hypervisor-specific attributes.
-
image_format(optional):
string
The format of the image.
-
imagelist(optional):
string
Name of imagelist to be launched.
-
ip(optional):
string
IP address of the instance.
-
label(optional):
string
A label assigned by the user, specifically for defining inter-instance relationships.
-
name(optional):
string
Multipart name of the instance.
-
networking(optional):
object networking
Additional Properties Allowed: additionalPropertiesMapping of
to network specifiers for virtual NICs to be attached to this instance. -
placement_requirements(optional):
array placement_requirements
A list of strings specifying arbitrary tags on nodes to be matched on placement.
-
platform(optional):
string
The OS platform for the instance.
-
priority(optional):
string
The priority at which this instance will be run.
-
quota(optional):
string
Not used
-
relationships(optional):
array relationships
A list of relationship specifications to be satisfied on this instance's placement
-
resolvers(optional):
array resolvers
Resolvers to use instead of the default resolvers.
-
reverse_dns(optional):
boolean
Add PTR records for the hostname.
-
shape(optional):
string
A shape is a resource profile that specifies the number of CPU threads and the amount of memory (in MB) to be allocated to an instance.
-
sshkeys(optional):
array sshkeys
SSH keys that will be exposed to the instance.
-
start_time(optional):
string
Start time of the instance.
-
state(optional):
string
State of the instance.
-
storage_attachments(optional):
array storage_attachments
List of dictionaries containing storage attachment Information.
-
tags(optional):
array tags
Comma-separated list of strings used to tag the instance.
-
uri(optional):
string
Uniform Resource Identifier
-
vcable_id(optional):
string
vCable for this instance.
-
vnc(optional):
string
IP address and port of the VNC console for the instance.
object
object
object
array
array
-
Array of:
object items
Additional Properties Allowed: additionalProperties
array
array
object
object
object
object
Examples
cURL Command
The following example shows how to retrieve details about all the instances in the /Compute-acme/jack.jones@example.com/
container by submitting a GET
request on the REST resource using cURL. For more information about cURL, see Use cURL.
Enter the command on a single line. Line breaks are used in this example for readability.
curl -X GET -H "Cookie: $COMPUTE_COOKIE" -H "Accept: application/oracle-compute-v3+json" https://api-z999.compute.us0.oraclecloud.com/instance/Compute-acme/jack.jones@example.com/
-
COMPUTE_COOKIE
is the name of the variable in which you stored the authentication cookie earlier. For information about retrieving the authentication cookie and storing it in a variable, see Authentication. -
api-z999.compute.us0.oraclecloud.com
is an example REST endpoint URL. Change this value to the REST endpoint URL of your Compute Classic site. For information about finding out REST endpoint URL for your site, see Send Requests.
Example of Response Body
The following example shows the response body in JSON format for an instance.
The response is similar to the output of GET /instance/{name}
(Retrieve Details of an Instance), but for all the instances in the container.
Some lines may be truncated with ellipses (...) for readability.
{ "list": [ { "domain": "acme...", "placement_requirements": [ "/system/compute/placement/default", "/system/compute/allow_instances" ], "ip": "10...", "site": "", "shape": "oc5", "imagelist": "/oracle/public/oel_6.4_60GB", "attributes": { "network": { "nimbula_vcable-eth0": { "vethernet_id": "0", "vethernet": "/oracle/public/default", "address": [ "c6:b0:09:f4:bc:c0", "0.0.0.0" ], "model": "", "vethernet_type": "vlan", "id": "/Compute-acme/jack.jones@example.com/016e75e7-e911-42d1-bfe1-6a7f1b3f7908", "dhcp_options": [] } }, "dns": { "domain": "acme...", "hostname": "d06886.compute-acme...", "nimbula_vcable-eth0": "d06886.acme..." }, "sshkeys": [ "ssh-rsa AAAAB3NzaC1yc2EAAA..." ] }, "networking": { "eth0": { "model": "", "dns": [ "d06886.acme..." ], "seclists": [ "/Compute-acme/default/default", "/Compute-acme/jack.jones@example.com/prod-ng" ], "vethernet": "/oracle/public/default", "nat": "ipreservation:/Compute-acme/jack.jones@example.com/prod-vm1" } }, "hostname": "d06886.acme...", "quota_reservation": "/Compute-acme/ffc8e6d4-8f93-41f3-a062-bdbb042c3191", "disk_attach": "", "label": "Production instance 1", "priority": "/oracle/public/default", "state": "running", "vnc": "10...", "storage_attachments": [ { "index": 1, "storage_volume_name": "/Compute-acme/jack.jones@example.com/prod-vol1", "name": "/Compute-acme/admin/dev1/f653a677-b566-4f92-8e93-71d47b364119/f1a67244-9abc-45d5-af69-8..." } ], "start_time": "2014-06-24T17:51:35Z", "quota": "/acme", "fingerprint": "19:c4:3f:2d:dc:76:b1:06:e8:88:bd:7f:a3:3b:3c:93", "error_reason": "", "sshkeys": [ "/Compute-acme/jack.jones@example.com/acme-prod-admin" ], "tags": [ "prod2" ], "resolvers": null, "account": "/Compute-acme/default", "name": "/Compute-acme/jack.jones@example.com/dev1/f653a677-b566-4f92-8e93-71d47b364119", "vcable_id": "/Compute-acme/jack.jones@example.com/016e75e7-e911-42d1-bfe1-6a7f1b3f7908", "uri": "http://10....", "reverse_dns": true, "entry": 1, "boot_order": [] } ] }