Compute Cloud API, gRPC: HostGroupService.ListInstances
- gRPC request
- ListHostGroupInstancesRequest
- ListHostGroupInstancesResponse
- Instance
- Resources
- MetadataOptions
- AttachedDisk
- AttachedLocalDisk
- AttachedFilesystem
- NetworkInterface
- PrimaryAddress
- OneToOneNat
- DnsRecord
- SerialPortSettings
- GpuSettings
- SchedulingPolicy
- NetworkSettings
- PlacementPolicy
- HostAffinityRule
- HardwareGeneration
- LegacyHardwareFeatures
- Generation2HardwareFeatures
Lists instances that belongs to the specified host group.
gRPC request
rpc ListInstances (ListHostGroupInstancesRequest) returns (ListHostGroupInstancesResponse)
ListHostGroupInstancesRequest
{
"host_group_id": "string",
"page_size": "int64",
"page_token": "string",
"filter": "string"
}
Field |
Description |
host_group_id |
string Required field. ID of the host group to list instances for. |
page_size |
int64 The maximum number of results per page to return. If the number of available |
page_token |
string Page token. To get the next page of results, |
filter |
string A filter expression that filters resources listed in the response. Each condition has the form
|
ListHostGroupInstancesResponse
{
"instances": [
{
"id": "string",
"folder_id": "string",
"created_at": "google.protobuf.Timestamp",
"name": "string",
"description": "string",
"labels": "map<string, string>",
"zone_id": "string",
"platform_id": "string",
"resources": {
"memory": "int64",
"cores": "int64",
"core_fraction": "int64",
"gpus": "int64"
},
"status": "Status",
"metadata": "map<string, string>",
"metadata_options": {
"gce_http_endpoint": "MetadataOption",
"aws_v1_http_endpoint": "MetadataOption",
"gce_http_token": "MetadataOption",
"aws_v1_http_token": "MetadataOption"
},
"boot_disk": {
"mode": "Mode",
"device_name": "string",
"auto_delete": "bool",
"disk_id": "string"
},
"secondary_disks": [
{
"mode": "Mode",
"device_name": "string",
"auto_delete": "bool",
"disk_id": "string"
}
],
"local_disks": [
{
"size": "int64",
"device_name": "string"
}
],
"filesystems": [
{
"mode": "Mode",
"device_name": "string",
"filesystem_id": "string"
}
],
"network_interfaces": [
{
"index": "string",
"mac_address": "string",
"subnet_id": "string",
"primary_v4_address": {
"address": "string",
"one_to_one_nat": {
"address": "string",
"ip_version": "IpVersion",
"dns_records": [
{
"fqdn": "string",
"dns_zone_id": "string",
"ttl": "int64",
"ptr": "bool"
}
]
},
"dns_records": [
{
"fqdn": "string",
"dns_zone_id": "string",
"ttl": "int64",
"ptr": "bool"
}
]
},
"primary_v6_address": {
"address": "string",
"one_to_one_nat": {
"address": "string",
"ip_version": "IpVersion",
"dns_records": [
{
"fqdn": "string",
"dns_zone_id": "string",
"ttl": "int64",
"ptr": "bool"
}
]
},
"dns_records": [
{
"fqdn": "string",
"dns_zone_id": "string",
"ttl": "int64",
"ptr": "bool"
}
]
},
"security_group_ids": [
"string"
]
}
],
"serial_port_settings": {
"ssh_authorization": "SSHAuthorization"
},
"gpu_settings": {
"gpu_cluster_id": "string"
},
"fqdn": "string",
"scheduling_policy": {
"preemptible": "bool"
},
"service_account_id": "string",
"network_settings": {
"type": "Type"
},
"placement_policy": {
"placement_group_id": "string",
"host_affinity_rules": [
{
"key": "string",
"op": "Operator",
"values": [
"string"
]
}
],
"placement_group_partition": "int64"
},
"host_group_id": "string",
"host_id": "string",
"maintenance_policy": "MaintenancePolicy",
"maintenance_grace_period": "google.protobuf.Duration",
"hardware_generation": {
// Includes only one of the fields `legacy_features`, `generation2_features`
"legacy_features": {
"pci_topology": "PCITopology"
},
"generation2_features": "Generation2HardwareFeatures"
// end of the list of possible fields
}
}
],
"next_page_token": "string"
}
Field |
Description |
instances[] |
Lists instances for the specified host group. |
next_page_token |
string This token allows you to get the next page of results for list requests. If the number of results |
Instance
An Instance resource. For more information, see Instances.
Field |
Description |
id |
string ID of the instance. |
folder_id |
string ID of the folder that the instance belongs to. |
created_at |
|
name |
string Name of the instance. 1-63 characters long. |
description |
string Description of the instance. 0-256 characters long. |
labels |
object (map<string, string>) Resource labels as |
zone_id |
string ID of the availability zone where the instance resides. |
platform_id |
string ID of the hardware platform configuration for the instance. |
resources |
Computing resources of the instance such as the amount of memory and number of cores. |
status |
enum Status Status of the instance.
|
metadata |
object (map<string, string>) The metadata For example, you may use the metadata in order to provide your public SSH key to the instance. |
metadata_options |
Options allow user to configure access to instance's metadata |
boot_disk |
Boot disk that is attached to the instance. |
secondary_disks[] |
Array of secondary disks that are attached to the instance. |
local_disks[] |
Array of local disks that are attached to the instance. |
filesystems[] |
Array of filesystems that are attached to the instance. |
network_interfaces[] |
Array of network interfaces that are attached to the instance. |
serial_port_settings |
Serial port settings |
gpu_settings |
GPU settings |
fqdn |
string A domain name of the instance. FQDN is defined by the server |
scheduling_policy |
Scheduling policy configuration. |
service_account_id |
string ID of the service account to use for authentication inside the instance. |
network_settings |
Network Settings |
placement_policy |
Placement policy configuration. |
host_group_id |
string ID of the dedicated host group that the instance belongs to. |
host_id |
string ID of the dedicated host that the instance belongs to. |
maintenance_policy |
enum MaintenancePolicy Behaviour on maintenance events
|
maintenance_grace_period |
Time between notification via metadata service and maintenance |
hardware_generation |
This feature set is inherited from the image/disk used as a boot one at the creation of the instance. |
Resources
Field |
Description |
memory |
int64 The amount of memory available to the instance, specified in bytes. |
cores |
int64 The number of cores available to the instance. |
core_fraction |
int64 Baseline level of CPU performance with the ability to burst performance above that baseline level. |
gpus |
int64 The number of GPUs available to the instance. |
MetadataOptions
Field |
Description |
gce_http_endpoint |
enum MetadataOption Enabled access to GCE flavored metadata
|
aws_v1_http_endpoint |
enum MetadataOption Enabled access to AWS flavored metadata (IMDSv1)
|
gce_http_token |
enum MetadataOption Enabled access to IAM credentials with GCE flavored metadata
|
aws_v1_http_token |
enum MetadataOption Enabled access to IAM credentials with AWS flavored metadata (IMDSv1)
|
AttachedDisk
Field |
Description |
mode |
enum Mode Access mode to the Disk resource.
|
device_name |
string Serial number that is reflected into the /dev/disk/by-id/ tree This value can be used to reference the device for mounting, resizing, and so on, from within the instance. |
auto_delete |
bool Specifies whether the disk will be auto-deleted when the instance is deleted. |
disk_id |
string ID of the disk that is attached to the instance. |
AttachedLocalDisk
Field |
Description |
size |
int64 Size of the disk, specified in bytes. |
device_name |
string Serial number that is reflected into the /dev/disk/by-id/ tree This value can be used to reference the device for mounting, resizing, and so on, from within the instance. |
AttachedFilesystem
Field |
Description |
mode |
enum Mode Access mode to the filesystem.
|
device_name |
string Name of the device representing the filesystem on the instance. The name should be used for referencing the filesystem from within the instance |
filesystem_id |
string ID of the filesystem that is attached to the instance. |
NetworkInterface
Field |
Description |
index |
string The index of the network interface, will be generated by the server, 0,1,2... etc if not specified. |
mac_address |
string MAC address that is assigned to the network interface. |
subnet_id |
string ID of the subnet. |
primary_v4_address |
Primary IPv4 address that is assigned to the instance for this network interface. |
primary_v6_address |
Primary IPv6 address that is assigned to the instance for this network interface. IPv6 not available yet. |
security_group_ids[] |
string ID's of security groups attached to the interface |
PrimaryAddress
Field |
Description |
address |
string An IPv4 internal network address that is assigned to the instance for this network interface. |
one_to_one_nat |
One-to-one NAT configuration. If missing, NAT has not been set up. |
dns_records[] |
Internal DNS configuration |
OneToOneNat
Field |
Description |
address |
string An external IP address associated with this instance. |
ip_version |
enum IpVersion IP version for the external IP address.
|
dns_records[] |
External DNS configuration |
DnsRecord
Field |
Description |
fqdn |
string Name of the A/AAAA record as specified when creating the instance. |
dns_zone_id |
string DNS zone id for the record (optional, if not set, some private zone is used). |
ttl |
int64 DNS record ttl (optional, if not set, a reasonable default is used.) |
ptr |
bool When true, indicates there is a corresponding auto-created PTR DNS record. |
SerialPortSettings
Field |
Description |
ssh_authorization |
enum SSHAuthorization Authentication and authorization in serial console when using SSH protocol
|
GpuSettings
Field |
Description |
gpu_cluster_id |
string Attach instance to specified GPU cluster. |
SchedulingPolicy
Field |
Description |
preemptible |
bool True for short-lived compute instances. For more information, see Preemptible VMs. |
NetworkSettings
Field |
Description |
type |
enum Type Network Type
|
PlacementPolicy
Field |
Description |
placement_group_id |
string Placement group ID. |
host_affinity_rules[] |
List of affinity rules. Scheduler will attempt to allocate instances according to order of rules. |
placement_group_partition |
int64 Placement group partition |
HostAffinityRule
Affinity definition
Field |
Description |
key |
string Affinity label or one of reserved values - 'yc.hostId', 'yc.hostGroupId' |
op |
enum Operator Include or exclude action
|
values[] |
string Affinity value or host ID or host group ID |
HardwareGeneration
A set of features, specific to a particular Compute hardware generation.
They are not necessary supported by every host OS or distro, thus they are fixed to an image
and are applied to all instances created with it as their boot disk image.
These features significantly determine how the instance is created, thus cannot be changed after the fact.
Field |
Description |
legacy_features |
Includes only one of the fields |
generation2_features |
Includes only one of the fields |
LegacyHardwareFeatures
A first hardware generation, by default compatible with all legacy images.
Allows switching to PCI_TOPOLOGY_V2 and back.
Field |
Description |
pci_topology |
enum PCITopology
|
Generation2HardwareFeatures
A second hardware generation, which by default assumes PCI_TOPOLOGY_V2
and UEFI boot (with UEFI related features).
Field |
Description |
Empty |