Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Solutions
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Compute Cloud
  • Getting started
    • Overview
    • Creating a Linux VM
    • Creating a Windows VM
    • Creating instance groups
  • Step-by-step instructions
    • All instructions
    • Creating VMs
      • Creating a Linux VM
      • Creating a Windows VM
      • Creating a VM from a set of disks
      • Creating a VM with disks restored from snapshots
      • Creating a VM from a custom image
      • Creating a preemptible VM
      • Creating a VM with a GPU
    • DSVM
      • Overview
      • Creating a VM from a public DSVM image
    • Placement groups
      • Creating a placement group
      • Deleting a placement group
      • Creating a VM in a placement group
      • Adding a VM to a placement group
      • Removing a VM instance from a placement group
    • Images with pre-installed software
      • Creating a VM from a public image
      • Configuring software
      • Working with a VM based on a public image
      • Getting a list of public images
    • Getting information about a VM
      • Getting information about a VM
      • Viewing serial port output
    • Managing VMs
      • Stopping and starting a VM
      • Attaching a disk to a VM
      • Detaching a disk from a VM
      • Moving a VM to a different availability zone
      • Making a VM's public IP address static
      • Updating a VM
      • Changing VM computing resources
      • Deleting a VM
    • Working on VMs
      • Connecting to a VM via SSH
      • Connecting to a VM via RDP
      • Working with Yandex.Cloud from inside a VM
      • Installing NVIDIA drivers
    • Creating new disks
      • Creating an empty disk
      • Create an empty disk with a large block
    • Disk management
      • Creating a disk snapshot
      • Updating a disk
      • Deleting a disk
      • Deleting a disk snapshot
    • Creating new images
      • Uploading your image
    • Managing images
      • Deleting a disk image
    • Managing the serial console
      • Getting started
      • Connecting to a serial console via SSH
      • Connecting to a serial console via CLI
      • Start your terminal in the Windows SAC
      • Disabling access to the serial console
    • Creating instance groups
      • Creating a fixed-size instance group
      • Creating a fixed-size instance group with a network load balancer
      • Creating an automatically scaled instance group
      • Creating an instance group from Container Optimized Image
    • Getting information about instance groups
      • Getting a list of instance groups
      • Getting information about an instance group
      • Getting a list of instances in a group
    • Managing instance groups
      • Editing an instance group
      • Configuring application health check on the VM
      • Updating a instance group
        • Incremental updates
        • Uninterrupted updates
      • Stopping an instance group
      • Starting an instance group
      • Deleting an instance group
    • Dedicated hosts
      • Creating a VM in a group of dedicated hosts
      • Creating a VM on a dedicated host
  • Yandex Container Optimized Solutions
  • Scenarios
    • Configuring NTP time synchronization
    • Running instance groups with auto scaling
  • Concepts
    • Relationship between resources
    • Virtual machines
      • Overview
      • Platforms
      • vCPU performance levels
      • Graphics accelerators (GPUs)
      • Preemptible VMs
      • Network on a VM
      • Live migration
      • Placement groups
      • Statuses
      • Metadata
    • Disks
      • Overview
      • Disk snapshots
    • Images
    • Instance groups
      • Overview
      • Access
      • Instance template
      • Variables in an instance template
      • Policies
        • Overview
        • Allocation policy
        • Deployment policy
        • Scaling policy
      • Scaling types
      • Auto-healing
      • Updating
        • Overview
        • Allocating instances across zones
        • Deployment algorithm
        • Rules for updating instance groups
      • Statuses
    • Dedicated host
    • Backups
    • Quotas and limits
  • Access management
  • Pricing policy
    • Current pricing policy
    • Archive
      • Before January 1, 2019
      • From January 1 to March 1, 2019
      • From March 1 to May 1, 2019
  • Compute API reference
    • Authentication in the API
    • gRPC
      • Overview
      • DiskPlacementGroupService
      • DiskService
      • DiskTypeService
      • HostGroupService
      • HostTypeService
      • ImageService
      • InstanceService
      • PlacementGroupService
      • SnapshotService
      • ZoneService
      • InstanceGroupService
      • OperationService
    • REST
      • Overview
      • Disk
        • Overview
        • create
        • delete
        • get
        • list
        • listOperations
        • update
      • DiskPlacementGroup
        • Overview
        • create
        • delete
        • get
        • list
        • listDisks
        • listOperations
        • update
      • DiskType
        • Overview
        • get
        • list
      • HostGroup
        • Overview
        • create
        • delete
        • get
        • list
        • listHosts
        • listInstances
        • listOperations
        • update
      • HostType
        • Overview
        • get
        • list
      • Image
        • Overview
        • create
        • delete
        • get
        • getLatestByFamily
        • list
        • listOperations
        • update
      • Instance
        • Overview
        • addOneToOneNat
        • attachDisk
        • create
        • delete
        • detachDisk
        • get
        • getSerialPortOutput
        • list
        • listOperations
        • removeOneToOneNat
        • restart
        • start
        • stop
        • update
        • updateMetadata
        • updateNetworkInterface
      • PlacementGroup
        • Overview
        • create
        • delete
        • get
        • list
        • listInstances
        • listOperations
        • update
      • Snapshot
        • Overview
        • create
        • delete
        • get
        • list
        • listOperations
        • update
      • Zone
        • Overview
        • get
        • list
      • Operation
        • Overview
        • get
      • InstanceGroup
        • Overview
        • createFromYaml
        • update
        • list
        • get
        • delete
        • start
        • stop
        • create
        • listAccessBindings
        • setAccessBindings
        • updateFromYaml
        • listLogRecords
        • listInstances
        • updateAccessBindings
        • listOperations
  • Questions and answers
    • General questions
    • Virtual machines
    • Disks and snapshots
    • Licensing
    • All questions on the same page
  1. Compute API reference
  2. REST
  3. HostGroup
  4. listInstances

Method listInstances

  • HTTP request
  • Path parameters
  • Query parameters
  • Response

Lists instances that belongs to the specified host group.

HTTP request

GET https://compute.api.cloud.yandex.net/compute/v1/hostGroups/{hostGroupId}/instances

Path parameters

Parameter Description
hostGroupId Required. ID of the host group to list instances for. To get the host group ID, use list request. The maximum string length in characters is 50.

Query parameters

Parameter Description
pageSize The maximum number of results per page to return. If the number of available results is larger than pageSize, the service returns a nextPageToken that can be used to get the next page of results in subsequent list requests. The maximum value is 1000.
pageToken Page token. To get the next page of results, set pageToken to the nextPageToken returned by a previous list request. The maximum string length in characters is 100.
filter A filter expression that filters resources listed in the response. Currently you can use filtering only on the id field. To get the host ID, use listHosts request. The maximum string length in characters is 1000.

Response

HTTP Code: 200 - OK

{
  "instances": [
    {
      "id": "string",
      "folderId": "string",
      "createdAt": "string",
      "name": "string",
      "description": "string",
      "labels": "object",
      "zoneId": "string",
      "platformId": "string",
      "resources": {
        "memory": "string",
        "cores": "string",
        "coreFraction": "string",
        "gpus": "string"
      },
      "status": "string",
      "metadata": "object",
      "bootDisk": {
        "mode": "string",
        "deviceName": "string",
        "autoDelete": true,
        "diskId": "string"
      },
      "secondaryDisks": [
        {
          "mode": "string",
          "deviceName": "string",
          "autoDelete": true,
          "diskId": "string"
        }
      ],
      "networkInterfaces": [
        {
          "index": "string",
          "macAddress": "string",
          "subnetId": "string",
          "primaryV4Address": {
            "address": "string",
            "oneToOneNat": {
              "address": "string",
              "ipVersion": "string"
            }
          },
          "primaryV6Address": {
            "address": "string",
            "oneToOneNat": {
              "address": "string",
              "ipVersion": "string"
            }
          },
          "securityGroupIds": [
            "string"
          ]
        }
      ],
      "fqdn": "string",
      "schedulingPolicy": {
        "preemptible": true
      },
      "serviceAccountId": "string",
      "networkSettings": {
        "type": "string"
      },
      "placementPolicy": {
        "placementGroupId": "string",
        "hostAffinityRules": [
          {
            "key": "string",
            "op": "string",
            "values": [
              "string"
            ]
          }
        ]
      }
    }
  ],
  "nextPageToken": "string"
}
Field Description
instances[] object

An Instance resource. For more information, see Instances.

instances[].
id
string

ID of the instance.

instances[].
folderId
string

ID of the folder that the instance belongs to.

instances[].
createdAt
string (date-time)

String in RFC3339 text format.

instances[].
name
string

Name of the instance. 1-63 characters long.

instances[].
description
string

Description of the instance. 0-256 characters long.

instances[].
labels
object

Resource labels as key:value pairs. Maximum of 64 per resource.

instances[].
zoneId
string

ID of the availability zone where the instance resides.

instances[].
platformId
string

ID of the hardware platform configuration for the instance.

instances[].
resources
object

Computing resources of the instance such as the amount of memory and number of cores.

instances[].
resources.
memory
string (int64)

The amount of memory available to the instance, specified in bytes.

instances[].
resources.
cores
string (int64)

The number of cores available to the instance.

instances[].
resources.
coreFraction
string (int64)

Baseline level of CPU performance with the ability to burst performance above that baseline level. This field sets baseline performance for each core.

instances[].
resources.
gpus
string (int64)

The number of GPUs available to the instance.

instances[].
status
string

Status of the instance.

  • PROVISIONING: Instance is waiting for resources to be allocated.
  • RUNNING: Instance is running normally.
  • STOPPING: Instance is being stopped.
  • STOPPED: Instance stopped.
  • STARTING: Instance is being started.
  • RESTARTING: Instance is being restarted.
  • UPDATING: Instance is being updated.
  • ERROR: Instance encountered a problem and cannot operate.
  • CRASHED: Instance crashed and will be restarted automatically.
  • DELETING: Instance is being deleted.
instances[].
metadata
object

The metadata key:value pairs assigned to this instance. This includes custom metadata and predefined keys.

For example, you may use the metadata in order to provide your public SSH key to the instance. For more information, see Metadata.

instances[].
bootDisk
object

Boot disk that is attached to the instance.

instances[].
bootDisk.
mode
string

Access mode to the Disk resource.

  • READ_ONLY: Read-only access.
  • READ_WRITE: Read/Write access.
instances[].
bootDisk.
deviceName
string

Serial number that is reflected into the /dev/disk/by-id/ tree of a Linux operating system running within the instance.

This value can be used to reference the device for mounting, resizing, and so on, from within the instance.

instances[].
bootDisk.
autoDelete
boolean (boolean)

Specifies whether the disk will be auto-deleted when the instance is deleted.

instances[].
bootDisk.
diskId
string

ID of the disk that is attached to the instance.

instances[].
secondaryDisks[]
object

Array of secondary disks that are attached to the instance.

instances[].
secondaryDisks[].
mode
string

Access mode to the Disk resource.

  • READ_ONLY: Read-only access.
  • READ_WRITE: Read/Write access.
instances[].
secondaryDisks[].
deviceName
string

Serial number that is reflected into the /dev/disk/by-id/ tree of a Linux operating system running within the instance.

This value can be used to reference the device for mounting, resizing, and so on, from within the instance.

instances[].
secondaryDisks[].
autoDelete
boolean (boolean)

Specifies whether the disk will be auto-deleted when the instance is deleted.

instances[].
secondaryDisks[].
diskId
string

ID of the disk that is attached to the instance.

instances[].
networkInterfaces[]
object

Array of network interfaces that are attached to the instance.

instances[].
networkInterfaces[].
index
string

The index of the network interface, generated by the server, 0,1,2... etc. Currently only one network interface is supported per instance.

instances[].
networkInterfaces[].
macAddress
string

MAC address that is assigned to the network interface.

instances[].
networkInterfaces[].
subnetId
string

ID of the subnet.

instances[].
networkInterfaces[].
primaryV4Address
object

Primary IPv4 address that is assigned to the instance for this network interface.

instances[].
networkInterfaces[].
primaryV4Address.
address
string

An IPv4 internal network address that is assigned to the instance for this network interface.

instances[].
networkInterfaces[].
primaryV4Address.
oneToOneNat
object

One-to-one NAT configuration. If missing, NAT has not been set up.

instances[].
networkInterfaces[].
primaryV4Address.
oneToOneNat.
address
string

An external IP address associated with this instance.

instances[].
networkInterfaces[].
primaryV4Address.
oneToOneNat.
ipVersion
string

IP version for the external IP address.

  • IPV4: IPv4 address, for example 192.0.2.235.
  • IPV6: IPv6 address. Not available yet.
instances[].
networkInterfaces[].
primaryV6Address
object

Primary IPv6 address that is assigned to the instance for this network interface. IPv6 not available yet.

instances[].
networkInterfaces[].
primaryV6Address.
address
string

An IPv4 internal network address that is assigned to the instance for this network interface.

instances[].
networkInterfaces[].
primaryV6Address.
oneToOneNat
object

One-to-one NAT configuration. If missing, NAT has not been set up.

instances[].
networkInterfaces[].
primaryV6Address.
oneToOneNat.
address
string

An external IP address associated with this instance.

instances[].
networkInterfaces[].
primaryV6Address.
oneToOneNat.
ipVersion
string

IP version for the external IP address.

  • IPV4: IPv4 address, for example 192.0.2.235.
  • IPV6: IPv6 address. Not available yet.
instances[].
networkInterfaces[].
securityGroupIds[]
string

ID's of security groups attached to the interface

instances[].
fqdn
string

A domain name of the instance. FQDN is defined by the server in the format <hostname>.&lt;region_id&gt;.internal when the instance is created. If the hostname were not specified when the instance was created, FQDN would be <id>.auto.internal.

instances[].
schedulingPolicy
object

Scheduling policy configuration.

instances[].
schedulingPolicy.
preemptible
boolean (boolean)

True for short-lived compute instances. For more information, see Preemptible VMs.

instances[].
serviceAccountId
string

ID of the service account to use for authentication inside the instance. To get the service account ID, use a list request.

instances[].
networkSettings
object

Network Settings

instances[].
networkSettings.
type
string

Network Type

  • STANDARD: Standard network.
  • SOFTWARE_ACCELERATED: Software accelerated network.
  • HARDWARE_ACCELERATED: Hardware accelerated network (not available yet, reserved for future use).
instances[].
placementPolicy
object

Placement policy configuration.

instances[].
placementPolicy.
placementGroupId
string

Placement group ID.

instances[].
placementPolicy.
hostAffinityRules[]
object

Affinitity definition

instances[].
placementPolicy.
hostAffinityRules[].
key
string

Affinity label or one of reserved values - 'yc.hostId', 'yc.hostGroupId'

instances[].
placementPolicy.
hostAffinityRules[].
op
string

Include or exclude action

instances[].
placementPolicy.
hostAffinityRules[].
values[]
string

Affinity value or host ID or host group ID

nextPageToken string

This token allows you to get the next page of results for list requests. If the number of results is more than pageSize, use nextPageToken as the value for the pageToken query parameter in the next list request. Each subsequent list request will have its own nextPageToken to continue paging through the results.

In this article:
  • HTTP request
  • Path parameters
  • Query parameters
  • Response
Language / Region
Careers
Privacy policy
Terms of use
Brandbook
© 2021 Yandex.Cloud LLC