Lists the instances
GET {{baseUrl}}/instances/?compartmentId={{compartment_ocid}}
Lists the instances in the specified compartment and the specified availability domain. You can filter the results by specifying an instance name (the list will include all the identically-named instances in the compartment).
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
compartmentId | string | (Required) The OCID of the Compartment | |
availabilityDomain | null | The name of the availability domain. | |
capacityReservationId | null | The OCID of the compute capacity reservation. | |
displayName | null | A filter to return only resources that match the given display name exactly. | |
limit | null | For list pagination. The maximum number of results per page, or items to return in a paginated "List" call. | |
page | null | For list pagination. The value of the opc-next-page response header from the previous "List" call. | |
sortBy | null | The field to sort by. You can provide one sort order (sortOrder). Default order for TIMECREATED is descending. Default order for DISPLAYNAME is ascending. The DISPLAYNAME sort order is case sensitive. | |
sortOrder | null | The sort order to use, either ascending (ASC) or descending (DESC). The DISPLAYNAME sort order is case sensitive. | |
lifecycleState | null | A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Date | string | (Required) Current Date | |
Authorization | string |
RESPONSES
status: OK
[{"availabilityDomain":"abCD:US-ASHBURN-AD-1","capacityReservationId":null,"compartmentId":"ocid1.compartment.oc1.iad.aaaaaaaaaaaaaaasomeguidaaaaaaaaaaaaaaaaa","dedicatedVmHostId":null,"displayName":"example-compute-1","extendedMetadata":{},"faultDomain":"FAULT-DOMAIN-2","freeformTags":{},"id":"ocid1.instance.oc1.iad.aaaaaaaaaaaaaaasomeguidaaaaaaaaaaaaaaaaa","imageId":"ocid1.image.oc1.iad.aaaaaaaaaaaaaaasomeguidaaaaaaaaaaaaaaaaa","ipxeScript":null,"launchMode":"NATIVE","launchOptions":{"bootVolumeType":"PARAVIRTUALIZED","firmware":"UEFI_64","networkType":"VFIO","remoteDataVolumeType":"PARAVIRTUALIZED","isPvEncryptionInTransitEnabled":false,"isConsistentVolumeNamingEnabled":true},"instanceOptions":{"areLegacyImdsEndpointsDisabled":false},"availabilityConfig":{"isLiveMigrationPreferred":null,"recoveryAction":"RESTORE_INSTANCE"},"preemptibleInstanceConfig":null,"lifecycleState":"RUNNING","metadata":{},"region":"iad","shape":"VM.Standard.E3.Flex","shapeConfig":{"ocpus":1.0,"memoryInGBs":16.0,"baselineOcpuUtilization":null,"processorDescription":"2.25 GHz AMD EPYC™ 7742 (Rome)","networkingBandwidthInGbps":1.0,"maxVnicAttachments":2,"gpus":0,"gpuDescription":null,"localDisks":0,"localDisksTotalSizeInGBs":null,"localDiskDescription":null},"sourceDetails":{"sourceType":"image","bootVolumeSizeInGBs":null,"imageId":"ocid1.image.oc1.iad.aaaaaaaaaaaaaaasomeguidaaaaaaaaaaaaaaaaa","kmsKeyId":null},"systemTags":{},"timeCreated":"2021-03-19T20:36:51.126Z","agentConfig":{"isMonitoringDisabled":false,"isManagementDisabled":false,"areAllPluginsDisabled":false,"pluginsConfig":null},"timeMaintenanceRebootDue":null,"timeStopScheduled":null,"preferredMaintenanceAction":null,"platformConfig":null}]