Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Blog
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
Yandex project
© 2023 Intertech Services AG
Yandex Compute Cloud
  • Getting started
  • Step-by-step guides
  • Yandex Container Solution
  • Tutorials
  • Concepts
  • Access management
  • Pricing policy
  • API reference
    • Authentication in the API
    • gRPC
    • REST
      • Overview
      • DiskPlacementGroup
      • Disk
      • DiskType
      • Filesystem
      • GpuCluster
      • HostGroup
        • Overview
        • create
        • delete
        • get
        • list
        • listHosts
        • listInstances
        • listOperations
        • update
      • HostType
      • Image
      • Instance
      • PlacementGroup
      • SnapshotSchedule
      • Snapshot
      • Zone
      • Operation
      • InstanceGroup
  • Questions and answers
  1. API reference
  2. REST
  3. HostGroup
  4. list

Compute Cloud API, REST: HostGroup.list

Written by
Yandex Cloud
  • HTTP request
  • Query parameters
  • Response

Retrieves the list of host groups in the specified folder.

HTTP request

GET https://compute.api.cloud.yandex.net/compute/v1/hostGroups

Query parameters

Parameter Description
folderId

Required. ID of the folder to list host groups in. To get the folder ID, use list request.

The maximum string length in characters is 50.

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 HostGroup.name field.

The maximum string length in characters is 1000.

Response

HTTP Code: 200 - OK

{
  "hostGroups": [
    {
      "id": "string",
      "folderId": "string",
      "createdAt": "string",
      "name": "string",
      "description": "string",
      "labels": "object",
      "zoneId": "string",
      "status": "string",
      "typeId": "string",
      "maintenancePolicy": "string",
      "scalePolicy": {
        "fixedScale": {
          "size": "string"
        }
      }
    }
  ],
  "nextPageToken": "string"
}
Field Description
hostGroups[] object

Lists host groups for the specified folder.

hostGroups[].
id
string

ID of the group.

hostGroups[].
folderId
string

ID of the folder that the group belongs to.

hostGroups[].
createdAt
string (date-time)

Creation timestamp in RFC3339 text format.

String in RFC3339 text format. The range of possible values is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

hostGroups[].
name
string

Name of the group. The name is unique within the folder.

hostGroups[].
description
string

Description of the group.

hostGroups[].
labels
object

Resource labels as key:value pairs.

hostGroups[].
zoneId
string

Availability zone where all dedicated hosts are allocated.

hostGroups[].
status
string

Status of the group.

hostGroups[].
typeId
string

ID of host type. Resources provided by each host of the group.

hostGroups[].
maintenancePolicy
string

Behaviour on maintenance events.

  • RESTART: Restart instances on the same host after maintenance event.
  • MIGRATE: Migrate instances to another host before maintenance event.
hostGroups[].
scalePolicy
object

Scale policy. Only fixed number of hosts are supported at this moment.

hostGroups[].
scalePolicy.
fixedScale
object
hostGroups[].
scalePolicy.
fixedScale.
size
string (int64)
nextPageToken string

This token allows you to get the next page of results for list requests. If the number of results is larger 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.

Was the article helpful?

Language / Region
Yandex project
© 2023 Intertech Services AG
In this article:
  • HTTP request
  • Query parameters
  • Response