Skip to main content

Get

Returns the specified host group.

import { cloudApi, serviceClients, Session } from "@yandex-cloud/nodejs-sdk";

const GetHostGroupRequest =
cloudApi.compute.host_group_service.GetHostGroupRequest;

(async () => {
const authToken = process.env["YC_OAUTH_TOKEN"];
const session = new Session({ oauthToken: authToken });
const client = session.client(serviceClients.HostGroupServiceClient);

const result = await client.get(
GetHostGroupRequest.fromPartial({
hostGroupId: "hostGroupId",
})
);
console.log(result);
})();

GetHostGroupRequest

hostGroupId : string

ID of the host group to return. To get the host group ID, use HostGroupService.List request.

HostGroup

Represents group of dedicated hosts

Status

  • STATUS_UNSPECIFIED

  • CREATING

  • READY

  • UPDATING

  • DELETING

id : string

ID of the group.

folderId : string

ID of the folder that the group belongs to.

createdAt : google.protobuf.Timestamp

Creation timestamp in RFC3339 text format.

name : string

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

description : string

Description of the group.

labels : string

Resource labels as key:value pairs.

zoneId : string

Availability zone where all dedicated hosts are allocated.

status : Status

Status of the group.

typeId : string

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

maintenancePolicy : MaintenancePolicy

Behaviour on maintenance events.

scalePolicy : ScalePolicy

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

ScalePolicy

FixedScale
size : int64

One of scaleType

  • fixedScale : FixedScale

FixedScale

size : int64